@salutejs/plasma-new-hope 0.339.0-canary.2286.18557548158.0 → 0.339.0-canary.2288.18653805742.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. package/cjs/components/Attach/Attach.css +68 -24
  2. package/cjs/components/Attach/Attach.js +177 -32
  3. package/cjs/components/Attach/Attach.js.map +1 -1
  4. package/cjs/components/Attach/Attach.styles.js +46 -5
  5. package/cjs/components/Attach/Attach.styles.js.map +1 -1
  6. package/cjs/components/Attach/Attach.styles_14g2czk.css +8 -0
  7. package/cjs/components/Attach/Attach.tokens.js +21 -6
  8. package/cjs/components/Attach/Attach.tokens.js.map +1 -1
  9. package/cjs/components/Attach/components/AttachButton/AttachButton.css +82 -15
  10. package/cjs/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  11. package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.css +105 -0
  12. package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +29 -0
  13. package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js.map +1 -0
  14. package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +21 -0
  15. package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js.map +1 -0
  16. package/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles_3t6n6e.css +2 -0
  17. package/cjs/components/Attach/ui/Cell/Cell.css +60 -0
  18. package/cjs/components/Attach/ui/Cell/Cell.js +46 -0
  19. package/cjs/components/Attach/ui/Cell/Cell.js.map +1 -0
  20. package/cjs/components/Attach/ui/Cell/Cell.styles.js +1 -1
  21. package/{es/components/Attach/ui/Cell/Cell.styles_69w962.css → cjs/components/Attach/ui/Cell/Cell.styles_lpj30y.css} +1 -1
  22. package/cjs/components/Attach/ui/Dropdown/Dropdown.css +100 -0
  23. package/cjs/components/Attach/ui/Dropdown/Dropdown.js +69 -0
  24. package/cjs/components/Attach/ui/Dropdown/Dropdown.js.map +1 -0
  25. package/cjs/components/Attach/ui/Dropdown/Dropdown.styles.js +22 -0
  26. package/cjs/components/Attach/ui/Dropdown/Dropdown.styles.js.map +1 -0
  27. package/cjs/components/Attach/ui/Dropdown/Dropdown.styles_1ge65dg.css +1 -0
  28. package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.css +3 -0
  29. package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.js +23 -0
  30. package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.js.map +1 -0
  31. package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +15 -0
  32. package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js.map +1 -0
  33. package/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles_5yseaa.css +1 -0
  34. package/cjs/components/Attach/utils/getFilenameParts.js +21 -0
  35. package/cjs/components/Attach/utils/getFilenameParts.js.map +1 -0
  36. package/cjs/components/Attach/variations/_size/base.js +1 -1
  37. package/cjs/components/Attach/variations/_size/base.js.map +1 -1
  38. package/cjs/components/Attach/variations/_size/base_1x0gzlt.css +1 -0
  39. package/cjs/components/Attach/variations/_view/base.js +1 -1
  40. package/cjs/components/Attach/variations/_view/base_d9xz7t.css +1 -0
  41. package/cjs/components/Pagination/Pagination.css +0 -19
  42. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +0 -19
  43. package/cjs/components/Select/Select.css +0 -19
  44. package/cjs/components/Select/Select.js +9 -42
  45. package/cjs/components/Select/Select.js.map +1 -1
  46. package/cjs/components/Select/Select.tokens.js +0 -2
  47. package/cjs/components/Select/Select.tokens.js.map +1 -1
  48. package/cjs/components/Select/hooks/useKeyboardNavigation.js +1 -185
  49. package/cjs/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
  50. package/cjs/components/Select/hooks/usePathMaps.js +3 -7
  51. package/cjs/components/Select/hooks/usePathMaps.js.map +1 -1
  52. package/cjs/components/Table/Table.css +0 -19
  53. package/cjs/components/Table/ui/Cell/Cell.css +0 -19
  54. package/cjs/components/Table/ui/EditableCell/EditableCell.css +0 -19
  55. package/cjs/components/Table/ui/HeadCell/HeadCell.css +0 -19
  56. package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +0 -19
  57. package/cjs/components/Tree/utils/traverseTree.js +23 -2
  58. package/cjs/components/Tree/utils/traverseTree.js.map +1 -1
  59. package/cjs/components/_Icon/Icon.assets/DotsHorizontalOutline.js +27 -0
  60. package/cjs/components/_Icon/Icon.assets/DotsHorizontalOutline.js.map +1 -0
  61. package/cjs/components/_Icon/Icons/IconDotsHorizontalOutline.js +31 -0
  62. package/cjs/components/_Icon/Icons/IconDotsHorizontalOutline.js.map +1 -0
  63. package/cjs/index.css +17 -28
  64. package/cjs/index.js +0 -2
  65. package/cjs/index.js.map +1 -1
  66. package/cjs/utils/index.js.map +1 -1
  67. package/emotion/cjs/components/Attach/Attach.js +190 -28
  68. package/emotion/cjs/components/Attach/Attach.styles.js +33 -14
  69. package/emotion/cjs/components/Attach/Attach.tokens.js +21 -6
  70. package/emotion/cjs/components/Attach/components/AttachButton/AttachButton.js +3 -4
  71. package/emotion/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +64 -0
  72. package/emotion/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +33 -0
  73. package/emotion/cjs/components/Attach/components/HiddenWidthHelper/index.js +11 -0
  74. package/emotion/cjs/components/Attach/components/index.js +19 -0
  75. package/emotion/cjs/components/Attach/ui/Cell/Cell.js +67 -2
  76. package/emotion/cjs/components/Attach/ui/Dropdown/Dropdown.js +225 -0
  77. package/emotion/cjs/components/Attach/ui/Dropdown/Dropdown.styles.js +26 -0
  78. package/emotion/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.js +26 -0
  79. package/emotion/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +21 -0
  80. package/emotion/cjs/components/Attach/ui/index.js +29 -0
  81. package/emotion/cjs/components/Attach/utils/getFilenameParts.js +23 -0
  82. package/emotion/cjs/components/Attach/utils/index.js +4 -0
  83. package/emotion/cjs/components/Attach/variations/_size/base.js +1 -1
  84. package/emotion/cjs/components/Select/Select.js +6 -31
  85. package/emotion/cjs/components/Select/Select.tokens.js +0 -2
  86. package/emotion/cjs/components/Select/hooks/useKeyboardNavigation.js +0 -166
  87. package/emotion/cjs/components/Select/hooks/usePathMaps.js +3 -35
  88. package/emotion/cjs/components/Select/reducers/index.js +0 -1
  89. package/emotion/cjs/components/Select/ui/index.js +0 -1
  90. package/emotion/cjs/components/Tree/utils/traverseTree.js +60 -2
  91. package/emotion/cjs/examples/components/Attach/Attach.config.js +18 -18
  92. package/emotion/cjs/examples/components/Select/Select.config.js +24 -24
  93. package/emotion/cjs/utils/index.js +0 -4
  94. package/emotion/es/components/Attach/Attach.js +193 -31
  95. package/emotion/es/components/Attach/Attach.styles.js +30 -14
  96. package/emotion/es/components/Attach/Attach.tokens.js +21 -6
  97. package/emotion/es/components/Attach/components/AttachButton/AttachButton.js +1 -2
  98. package/emotion/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +13 -0
  99. package/emotion/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +10 -0
  100. package/emotion/es/components/Attach/components/HiddenWidthHelper/index.js +1 -0
  101. package/emotion/es/components/Attach/components/index.js +2 -0
  102. package/emotion/es/components/Attach/ui/Cell/Cell.js +25 -1
  103. package/emotion/es/components/Attach/ui/Dropdown/Dropdown.js +174 -0
  104. package/emotion/es/components/Attach/ui/Dropdown/Dropdown.styles.js +11 -0
  105. package/emotion/es/components/Attach/ui/MoreTrigger/MoreTrigger.js +11 -0
  106. package/emotion/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +6 -0
  107. package/emotion/es/components/Attach/ui/index.js +6 -0
  108. package/emotion/es/components/Attach/utils/getFilenameParts.js +13 -0
  109. package/emotion/es/components/Attach/utils/index.js +1 -0
  110. package/emotion/es/components/Attach/variations/_size/base.js +1 -1
  111. package/emotion/es/components/Select/Select.js +8 -33
  112. package/emotion/es/components/Select/Select.tokens.js +0 -2
  113. package/emotion/es/components/Select/hooks/useKeyboardNavigation.js +0 -166
  114. package/emotion/es/components/Select/hooks/usePathMaps.js +4 -36
  115. package/emotion/es/components/Select/reducers/index.js +0 -1
  116. package/emotion/es/components/Select/ui/index.js +0 -1
  117. package/emotion/es/components/Tree/utils/traverseTree.js +59 -1
  118. package/emotion/es/examples/components/Attach/Attach.config.js +18 -18
  119. package/emotion/es/examples/components/Select/Select.config.js +24 -24
  120. package/emotion/es/utils/index.js +0 -1
  121. package/es/components/Attach/Attach.css +68 -24
  122. package/es/components/Attach/Attach.js +180 -35
  123. package/es/components/Attach/Attach.js.map +1 -1
  124. package/es/components/Attach/Attach.styles.js +46 -6
  125. package/es/components/Attach/Attach.styles.js.map +1 -1
  126. package/es/components/Attach/Attach.styles_14g2czk.css +8 -0
  127. package/es/components/Attach/Attach.tokens.js +21 -6
  128. package/es/components/Attach/Attach.tokens.js.map +1 -1
  129. package/es/components/Attach/components/AttachButton/AttachButton.css +82 -15
  130. package/es/components/Attach/components/AttachButton/AttachButton.js.map +1 -1
  131. package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.css +105 -0
  132. package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +21 -0
  133. package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js.map +1 -0
  134. package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +16 -0
  135. package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js.map +1 -0
  136. package/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles_3t6n6e.css +2 -0
  137. package/es/components/Attach/ui/Cell/Cell.css +60 -0
  138. package/es/components/Attach/ui/Cell/Cell.js +38 -0
  139. package/es/components/Attach/ui/Cell/Cell.js.map +1 -0
  140. package/es/components/Attach/ui/Cell/Cell.styles.js +1 -1
  141. package/{cjs/components/Attach/ui/Cell/Cell.styles_69w962.css → es/components/Attach/ui/Cell/Cell.styles_lpj30y.css} +1 -1
  142. package/es/components/Attach/ui/Dropdown/Dropdown.css +100 -0
  143. package/es/components/Attach/ui/Dropdown/Dropdown.js +61 -0
  144. package/es/components/Attach/ui/Dropdown/Dropdown.js.map +1 -0
  145. package/es/components/Attach/ui/Dropdown/Dropdown.styles.js +18 -0
  146. package/es/components/Attach/ui/Dropdown/Dropdown.styles.js.map +1 -0
  147. package/es/components/Attach/ui/Dropdown/Dropdown.styles_1ge65dg.css +1 -0
  148. package/es/components/Attach/ui/MoreTrigger/MoreTrigger.css +3 -0
  149. package/es/components/Attach/ui/MoreTrigger/MoreTrigger.js +15 -0
  150. package/es/components/Attach/ui/MoreTrigger/MoreTrigger.js.map +1 -0
  151. package/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +11 -0
  152. package/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js.map +1 -0
  153. package/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles_5yseaa.css +1 -0
  154. package/es/components/Attach/utils/getFilenameParts.js +17 -0
  155. package/es/components/Attach/utils/getFilenameParts.js.map +1 -0
  156. package/es/components/Attach/variations/_size/base.js +1 -1
  157. package/es/components/Attach/variations/_size/base.js.map +1 -1
  158. package/es/components/Attach/variations/_size/base_1x0gzlt.css +1 -0
  159. package/es/components/Attach/variations/_view/base.js +1 -1
  160. package/es/components/Attach/variations/_view/base_d9xz7t.css +1 -0
  161. package/es/components/Pagination/Pagination.css +0 -19
  162. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +0 -19
  163. package/es/components/Select/Select.css +0 -19
  164. package/es/components/Select/Select.js +9 -42
  165. package/es/components/Select/Select.js.map +1 -1
  166. package/es/components/Select/Select.tokens.js +0 -2
  167. package/es/components/Select/Select.tokens.js.map +1 -1
  168. package/es/components/Select/hooks/useKeyboardNavigation.js +1 -185
  169. package/es/components/Select/hooks/useKeyboardNavigation.js.map +1 -1
  170. package/es/components/Select/hooks/usePathMaps.js +3 -7
  171. package/es/components/Select/hooks/usePathMaps.js.map +1 -1
  172. package/es/components/Table/Table.css +0 -19
  173. package/es/components/Table/ui/Cell/Cell.css +0 -19
  174. package/es/components/Table/ui/EditableCell/EditableCell.css +0 -19
  175. package/es/components/Table/ui/HeadCell/HeadCell.css +0 -19
  176. package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +0 -19
  177. package/es/components/Tree/utils/traverseTree.js +23 -2
  178. package/es/components/Tree/utils/traverseTree.js.map +1 -1
  179. package/es/components/_Icon/Icon.assets/DotsHorizontalOutline.js +19 -0
  180. package/es/components/_Icon/Icon.assets/DotsHorizontalOutline.js.map +1 -0
  181. package/es/components/_Icon/Icons/IconDotsHorizontalOutline.js +23 -0
  182. package/es/components/_Icon/Icons/IconDotsHorizontalOutline.js.map +1 -0
  183. package/es/index.css +17 -28
  184. package/es/index.js +0 -1
  185. package/es/index.js.map +1 -1
  186. package/es/utils/index.js.map +1 -1
  187. package/package.json +2 -2
  188. package/styled-components/cjs/components/Attach/Attach.js +190 -28
  189. package/styled-components/cjs/components/Attach/Attach.styles.js +40 -12
  190. package/styled-components/cjs/components/Attach/Attach.tokens.js +21 -6
  191. package/styled-components/cjs/components/Attach/components/AttachButton/AttachButton.js +3 -4
  192. package/styled-components/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +64 -0
  193. package/styled-components/cjs/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +39 -0
  194. package/styled-components/cjs/components/Attach/components/HiddenWidthHelper/index.js +11 -0
  195. package/styled-components/cjs/components/Attach/components/index.js +19 -0
  196. package/styled-components/cjs/components/Attach/ui/Cell/Cell.js +67 -2
  197. package/styled-components/cjs/components/Attach/ui/Dropdown/Dropdown.js +225 -0
  198. package/styled-components/cjs/components/Attach/ui/Dropdown/Dropdown.styles.js +45 -0
  199. package/styled-components/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.js +26 -0
  200. package/styled-components/cjs/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +24 -0
  201. package/styled-components/cjs/components/Attach/ui/index.js +29 -0
  202. package/styled-components/cjs/components/Attach/utils/getFilenameParts.js +23 -0
  203. package/styled-components/cjs/components/Attach/utils/index.js +4 -0
  204. package/styled-components/cjs/components/Attach/variations/_size/base.js +5 -2
  205. package/styled-components/cjs/components/Select/Select.js +6 -31
  206. package/styled-components/cjs/components/Select/Select.tokens.js +0 -2
  207. package/styled-components/cjs/components/Select/hooks/useKeyboardNavigation.js +0 -166
  208. package/styled-components/cjs/components/Select/hooks/usePathMaps.js +3 -35
  209. package/styled-components/cjs/components/Select/reducers/index.js +0 -1
  210. package/styled-components/cjs/components/Select/ui/index.js +0 -1
  211. package/styled-components/cjs/components/Tree/utils/traverseTree.js +60 -2
  212. package/styled-components/cjs/examples/components/Attach/Attach.config.js +64 -32
  213. package/styled-components/cjs/examples/components/Select/Select.config.js +4 -12
  214. package/styled-components/cjs/utils/index.js +0 -4
  215. package/styled-components/es/components/Attach/Attach.js +193 -31
  216. package/styled-components/es/components/Attach/Attach.styles.js +37 -12
  217. package/styled-components/es/components/Attach/Attach.tokens.js +21 -6
  218. package/styled-components/es/components/Attach/components/AttachButton/AttachButton.js +1 -2
  219. package/styled-components/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.js +13 -0
  220. package/styled-components/es/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.js +16 -0
  221. package/styled-components/es/components/Attach/components/HiddenWidthHelper/index.js +1 -0
  222. package/styled-components/es/components/Attach/components/index.js +2 -0
  223. package/styled-components/es/components/Attach/ui/Cell/Cell.js +25 -1
  224. package/styled-components/es/components/Attach/ui/Dropdown/Dropdown.js +174 -0
  225. package/styled-components/es/components/Attach/ui/Dropdown/Dropdown.styles.js +30 -0
  226. package/styled-components/es/components/Attach/ui/MoreTrigger/MoreTrigger.js +11 -0
  227. package/styled-components/es/components/Attach/ui/MoreTrigger/MoreTrigger.styles.js +9 -0
  228. package/styled-components/es/components/Attach/ui/index.js +6 -0
  229. package/styled-components/es/components/Attach/utils/getFilenameParts.js +13 -0
  230. package/styled-components/es/components/Attach/utils/index.js +1 -0
  231. package/styled-components/es/components/Attach/variations/_size/base.js +5 -2
  232. package/styled-components/es/components/Select/Select.js +8 -33
  233. package/styled-components/es/components/Select/Select.tokens.js +0 -2
  234. package/styled-components/es/components/Select/hooks/useKeyboardNavigation.js +0 -166
  235. package/styled-components/es/components/Select/hooks/usePathMaps.js +4 -36
  236. package/styled-components/es/components/Select/reducers/index.js +0 -1
  237. package/styled-components/es/components/Select/ui/index.js +0 -1
  238. package/styled-components/es/components/Tree/utils/traverseTree.js +59 -1
  239. package/styled-components/es/examples/components/Attach/Attach.config.js +64 -32
  240. package/styled-components/es/examples/components/Select/Select.config.js +4 -12
  241. package/styled-components/es/utils/index.js +0 -1
  242. package/types/components/Attach/Attach.d.ts.map +1 -1
  243. package/types/components/Attach/Attach.styles.d.ts +9 -2
  244. package/types/components/Attach/Attach.styles.d.ts.map +1 -1
  245. package/types/components/Attach/Attach.tokens.d.ts +13 -0
  246. package/types/components/Attach/Attach.tokens.d.ts.map +1 -1
  247. package/types/components/Attach/Attach.types.d.ts +85 -9
  248. package/types/components/Attach/Attach.types.d.ts.map +1 -1
  249. package/types/components/Attach/components/AttachButton/AttachButton.d.ts.map +1 -1
  250. package/types/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.d.ts +10 -0
  251. package/types/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.d.ts.map +1 -0
  252. package/types/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.d.ts +3 -0
  253. package/types/components/Attach/components/HiddenWidthHelper/HiddenWidthHelper.styles.d.ts.map +1 -0
  254. package/types/components/Attach/components/HiddenWidthHelper/index.d.ts +2 -0
  255. package/types/components/Attach/components/HiddenWidthHelper/index.d.ts.map +1 -0
  256. package/types/components/Attach/components/index.d.ts +3 -0
  257. package/types/components/Attach/components/index.d.ts.map +1 -0
  258. package/types/components/Attach/ui/Cell/Cell.d.ts +14 -1
  259. package/types/components/Attach/ui/Cell/Cell.d.ts.map +1 -1
  260. package/types/components/Attach/ui/Dropdown/Dropdown.d.ts +12 -0
  261. package/types/components/Attach/ui/Dropdown/Dropdown.d.ts.map +1 -0
  262. package/types/components/Attach/ui/Dropdown/Dropdown.styles.d.ts +31 -0
  263. package/types/components/Attach/ui/Dropdown/Dropdown.styles.d.ts.map +1 -0
  264. package/types/components/Attach/ui/MoreTrigger/MoreTrigger.d.ts +6 -0
  265. package/types/components/Attach/ui/MoreTrigger/MoreTrigger.d.ts.map +1 -0
  266. package/types/components/Attach/ui/MoreTrigger/MoreTrigger.styles.d.ts +2 -0
  267. package/types/components/Attach/ui/MoreTrigger/MoreTrigger.styles.d.ts.map +1 -0
  268. package/types/components/Attach/ui/index.d.ts +7 -0
  269. package/types/components/Attach/ui/index.d.ts.map +1 -0
  270. package/types/components/Attach/utils/getFilenameParts.d.ts +8 -0
  271. package/types/components/Attach/utils/getFilenameParts.d.ts.map +1 -0
  272. package/types/components/Attach/utils/index.d.ts +1 -0
  273. package/types/components/Attach/utils/index.d.ts.map +1 -1
  274. package/types/components/Attach/variations/_size/base.d.ts.map +1 -1
  275. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts +0 -12
  276. package/types/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.d.ts.map +1 -1
  277. package/types/components/Select/Select.d.ts.map +1 -1
  278. package/types/components/Select/Select.tokens.d.ts +0 -2
  279. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  280. package/types/components/Select/Select.types.d.ts +2 -26
  281. package/types/components/Select/Select.types.d.ts.map +1 -1
  282. package/types/components/Select/hooks/useKeyboardNavigation.d.ts +2 -6
  283. package/types/components/Select/hooks/useKeyboardNavigation.d.ts.map +1 -1
  284. package/types/components/Select/hooks/usePathMaps.d.ts +1 -2
  285. package/types/components/Select/hooks/usePathMaps.d.ts.map +1 -1
  286. package/types/components/Select/reducers/index.d.ts +0 -1
  287. package/types/components/Select/reducers/index.d.ts.map +1 -1
  288. package/types/components/Select/ui/index.d.ts +0 -1
  289. package/types/components/Select/ui/index.d.ts.map +1 -1
  290. package/types/components/Table/ui/HeadCell/ui/Filter/Filter.styles.d.ts +0 -12
  291. package/types/components/Table/ui/HeadCell/ui/Filter/Filter.styles.d.ts.map +1 -1
  292. package/types/components/Tree/utils/traverseTree.d.ts.map +1 -1
  293. package/types/examples/components/Attach/Attach.config.d.ts.map +1 -1
  294. package/types/examples/components/Attach/Attach.d.ts +448 -16
  295. package/types/examples/components/Attach/Attach.d.ts.map +1 -1
  296. package/types/examples/components/Select/Select.config.d.ts.map +1 -1
  297. package/types/examples/components/Select/Select.d.ts +0 -12
  298. package/types/examples/components/Select/Select.d.ts.map +1 -1
  299. package/types/types/MakeNever.d.ts +4 -0
  300. package/types/types/MakeNever.d.ts.map +1 -0
  301. package/types/types/index.d.ts +1 -0
  302. package/types/types/index.d.ts.map +1 -1
  303. package/types/utils/index.d.ts +0 -1
  304. package/types/utils/index.d.ts.map +1 -1
  305. package/cjs/components/Attach/Attach.styles_pso18d.css +0 -7
  306. package/cjs/components/Attach/variations/_size/base_kpo9at.css +0 -1
  307. package/cjs/components/Attach/variations/_view/base_1nvsg1b.css +0 -1
  308. package/cjs/components/Select/reducers/treePathReducer.js +0 -87
  309. package/cjs/components/Select/reducers/treePathReducer.js.map +0 -1
  310. package/cjs/components/Select/ui/TreeList/TreeList.css +0 -57
  311. package/cjs/components/Select/ui/TreeList/TreeList.js +0 -90
  312. package/cjs/components/Select/ui/TreeList/TreeList.js.map +0 -1
  313. package/cjs/components/Select/ui/TreeList/TreeList.styles.js +0 -30
  314. package/cjs/components/Select/ui/TreeList/TreeList.styles.js.map +0 -1
  315. package/cjs/components/Select/ui/TreeList/TreeList.styles_1t38mek.css +0 -2
  316. package/cjs/components/Select/ui/TreeList/ui/Item/Item.css +0 -54
  317. package/cjs/components/Select/ui/TreeList/ui/Item/Item.js +0 -71
  318. package/cjs/components/Select/ui/TreeList/ui/Item/Item.js.map +0 -1
  319. package/cjs/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -214
  320. package/cjs/components/Select/ui/TreeList/ui/Item/Item.styles.js.map +0 -1
  321. package/cjs/components/Select/ui/TreeList/ui/Item/Item.styles_i0dby2.css +0 -15
  322. package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -89
  323. package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js.map +0 -1
  324. package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -89
  325. package/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js.map +0 -1
  326. package/cjs/utils/deepCopy.js +0 -30
  327. package/cjs/utils/deepCopy.js.map +0 -1
  328. package/emotion/cjs/components/Select/reducers/treePathReducer.js +0 -98
  329. package/emotion/cjs/components/Select/ui/TreeList/TreeList.js +0 -124
  330. package/emotion/cjs/components/Select/ui/TreeList/TreeList.styles.js +0 -36
  331. package/emotion/cjs/components/Select/ui/TreeList/ui/Item/Item.js +0 -101
  332. package/emotion/cjs/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -186
  333. package/emotion/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -112
  334. package/emotion/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -112
  335. package/emotion/cjs/utils/deepCopy.js +0 -82
  336. package/emotion/es/components/Select/reducers/treePathReducer.js +0 -81
  337. package/emotion/es/components/Select/ui/TreeList/TreeList.js +0 -73
  338. package/emotion/es/components/Select/ui/TreeList/TreeList.styles.js +0 -13
  339. package/emotion/es/components/Select/ui/TreeList/ui/Item/Item.js +0 -50
  340. package/emotion/es/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -122
  341. package/emotion/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -61
  342. package/emotion/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -61
  343. package/emotion/es/utils/deepCopy.js +0 -72
  344. package/es/components/Attach/Attach.styles_pso18d.css +0 -7
  345. package/es/components/Attach/variations/_size/base_kpo9at.css +0 -1
  346. package/es/components/Attach/variations/_view/base_1nvsg1b.css +0 -1
  347. package/es/components/Select/reducers/treePathReducer.js +0 -82
  348. package/es/components/Select/reducers/treePathReducer.js.map +0 -1
  349. package/es/components/Select/ui/TreeList/TreeList.css +0 -57
  350. package/es/components/Select/ui/TreeList/TreeList.js +0 -82
  351. package/es/components/Select/ui/TreeList/TreeList.js.map +0 -1
  352. package/es/components/Select/ui/TreeList/TreeList.styles.js +0 -25
  353. package/es/components/Select/ui/TreeList/TreeList.styles.js.map +0 -1
  354. package/es/components/Select/ui/TreeList/TreeList.styles_1t38mek.css +0 -2
  355. package/es/components/Select/ui/TreeList/ui/Item/Item.css +0 -54
  356. package/es/components/Select/ui/TreeList/ui/Item/Item.js +0 -63
  357. package/es/components/Select/ui/TreeList/ui/Item/Item.js.map +0 -1
  358. package/es/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -196
  359. package/es/components/Select/ui/TreeList/ui/Item/Item.styles.js.map +0 -1
  360. package/es/components/Select/ui/TreeList/ui/Item/Item.styles_i0dby2.css +0 -15
  361. package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -81
  362. package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js.map +0 -1
  363. package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -81
  364. package/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js.map +0 -1
  365. package/es/utils/deepCopy.js +0 -26
  366. package/es/utils/deepCopy.js.map +0 -1
  367. package/styled-components/cjs/components/Select/reducers/treePathReducer.js +0 -98
  368. package/styled-components/cjs/components/Select/ui/TreeList/TreeList.js +0 -124
  369. package/styled-components/cjs/components/Select/ui/TreeList/TreeList.styles.js +0 -50
  370. package/styled-components/cjs/components/Select/ui/TreeList/TreeList.types.js +0 -4
  371. package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/Item.js +0 -101
  372. package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -300
  373. package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/Item.types.js +0 -4
  374. package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -112
  375. package/styled-components/cjs/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -112
  376. package/styled-components/cjs/utils/deepCopy.js +0 -82
  377. package/styled-components/es/components/Select/reducers/treePathReducer.js +0 -81
  378. package/styled-components/es/components/Select/ui/TreeList/TreeList.js +0 -73
  379. package/styled-components/es/components/Select/ui/TreeList/TreeList.styles.js +0 -27
  380. package/styled-components/es/components/Select/ui/TreeList/TreeList.types.js +0 -1
  381. package/styled-components/es/components/Select/ui/TreeList/ui/Item/Item.js +0 -50
  382. package/styled-components/es/components/Select/ui/TreeList/ui/Item/Item.styles.js +0 -236
  383. package/styled-components/es/components/Select/ui/TreeList/ui/Item/Item.types.js +0 -1
  384. package/styled-components/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.js +0 -61
  385. package/styled-components/es/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.js +0 -61
  386. package/styled-components/es/utils/deepCopy.js +0 -72
  387. package/types/components/Select/reducers/treePathReducer.d.ts +0 -14
  388. package/types/components/Select/reducers/treePathReducer.d.ts.map +0 -1
  389. package/types/components/Select/ui/TreeList/TreeList.d.ts +0 -4
  390. package/types/components/Select/ui/TreeList/TreeList.d.ts.map +0 -1
  391. package/types/components/Select/ui/TreeList/TreeList.styles.d.ts +0 -6
  392. package/types/components/Select/ui/TreeList/TreeList.styles.d.ts.map +0 -1
  393. package/types/components/Select/ui/TreeList/TreeList.types.d.ts +0 -9
  394. package/types/components/Select/ui/TreeList/TreeList.types.d.ts.map +0 -1
  395. package/types/components/Select/ui/TreeList/ui/Item/Item.d.ts +0 -4
  396. package/types/components/Select/ui/TreeList/ui/Item/Item.d.ts.map +0 -1
  397. package/types/components/Select/ui/TreeList/ui/Item/Item.styles.d.ts +0 -64
  398. package/types/components/Select/ui/TreeList/ui/Item/Item.styles.d.ts.map +0 -1
  399. package/types/components/Select/ui/TreeList/ui/Item/Item.types.d.ts +0 -14
  400. package/types/components/Select/ui/TreeList/ui/Item/Item.types.d.ts.map +0 -1
  401. package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.d.ts +0 -4
  402. package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowLeft/ItemArrowLeft.d.ts.map +0 -1
  403. package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.d.ts +0 -4
  404. package/types/components/Select/ui/TreeList/ui/Item/ui/ItemArrowRight/ItemArrowRight.d.ts.map +0 -1
  405. package/types/utils/deepCopy.d.ts +0 -2
  406. package/types/utils/deepCopy.d.ts.map +0 -1
  407. /package/emotion/cjs/{components/Select/ui/TreeList/TreeList.types.js → types/MakeNever.js} +0 -0
  408. /package/emotion/es/{components/Select/ui/TreeList/TreeList.types.js → types/MakeNever.js} +0 -0
  409. /package/{emotion/cjs/components/Select/ui/TreeList/ui/Item/Item.types.js → styled-components/cjs/types/MakeNever.js} +0 -0
  410. /package/{emotion/es/components/Select/ui/TreeList/ui/Item/Item.types.js → styled-components/es/types/MakeNever.js} +0 -0
@@ -1,5 +1,3 @@
1
- import { keyExists } from '../reducers/treePathReducer.js';
2
-
3
1
  var JUMP_SIZE = 10;
4
2
  var keys = {
5
3
  Enter: 'Enter',
@@ -30,51 +28,7 @@ var useKeyNavigation = function useKeyNavigation(_ref) {
30
28
  pathMap = _ref.pathMap,
31
29
  focusedToValueMap = _ref.focusedToValueMap,
32
30
  handleListToggle = _ref.handleListToggle,
33
- handlePressDown = _ref.handlePressDown,
34
- treePath = _ref.treePath,
35
- dispatchTreePath = _ref.dispatchTreePath,
36
- treeView = _ref.treeView,
37
- valueToPathMap = _ref.valueToPathMap;
38
- if (treeView) {
39
- return keyboardNavigationTree({
40
- focusedPath: focusedPath,
41
- dispatchFocusedPath: dispatchFocusedPath,
42
- path: path,
43
- dispatchPath: dispatchPath,
44
- pathMap: pathMap,
45
- focusedToValueMap: focusedToValueMap,
46
- handleListToggle: handleListToggle,
47
- handlePressDown: handlePressDown,
48
- treePath: treePath,
49
- dispatchTreePath: dispatchTreePath,
50
- treeView: treeView,
51
- valueToPathMap: valueToPathMap
52
- });
53
- }
54
- return keyboardNavigationDefault({
55
- focusedPath: focusedPath,
56
- dispatchFocusedPath: dispatchFocusedPath,
57
- path: path,
58
- dispatchPath: dispatchPath,
59
- pathMap: pathMap,
60
- focusedToValueMap: focusedToValueMap,
61
- handleListToggle: handleListToggle,
62
- handlePressDown: handlePressDown,
63
- treePath: treePath,
64
- dispatchTreePath: dispatchTreePath,
65
- treeView: treeView,
66
- valueToPathMap: valueToPathMap
67
- });
68
- };
69
- var keyboardNavigationDefault = function keyboardNavigationDefault(_ref2) {
70
- var focusedPath = _ref2.focusedPath,
71
- dispatchFocusedPath = _ref2.dispatchFocusedPath,
72
- path = _ref2.path,
73
- dispatchPath = _ref2.dispatchPath,
74
- pathMap = _ref2.pathMap,
75
- focusedToValueMap = _ref2.focusedToValueMap,
76
- handleListToggle = _ref2.handleListToggle,
77
- handlePressDown = _ref2.handlePressDown;
31
+ handlePressDown = _ref.handlePressDown;
78
32
  var currentIndex = (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[focusedPath.length - 1]) || 0;
79
33
  var currentLength = pathMap.get(path === null || path === void 0 ? void 0 : path[focusedPath.length - 1]) || 0;
80
34
  var onKeyDown = function onKeyDown(event) {
@@ -334,144 +288,6 @@ var keyboardNavigationDefault = function keyboardNavigationDefault(_ref2) {
334
288
  onKeyDown: onKeyDown
335
289
  };
336
290
  };
337
- var keyboardNavigationTree = function keyboardNavigationTree(_ref3) {
338
- var _currentItem$parent;
339
- var focusedPath = _ref3.focusedPath,
340
- dispatchFocusedPath = _ref3.dispatchFocusedPath,
341
- path = _ref3.path,
342
- dispatchPath = _ref3.dispatchPath,
343
- pathMap = _ref3.pathMap,
344
- focusedToValueMap = _ref3.focusedToValueMap,
345
- handleListToggle = _ref3.handleListToggle,
346
- handlePressDown = _ref3.handlePressDown,
347
- treePath = _ref3.treePath,
348
- dispatchTreePath = _ref3.dispatchTreePath,
349
- valueToPathMap = _ref3.valueToPathMap;
350
- var currentIndex = (focusedPath === null || focusedPath === void 0 ? void 0 : focusedPath[focusedPath.length - 1]) || 0;
351
- var currentItem = getItemByFocused(focusedPath, focusedToValueMap);
352
- var currentLength = (currentItem === null || currentItem === void 0 || (_currentItem$parent = currentItem.parent) === null || _currentItem$parent === void 0 || (_currentItem$parent = _currentItem$parent.items) === null || _currentItem$parent === void 0 ? void 0 : _currentItem$parent.length) || pathMap.get('root') || 0;
353
- var onKeyDown = function onKeyDown(event) {
354
- switch (event.code) {
355
- case keys.ArrowUp:
356
- {
357
- if (focusedPath.length) {
358
- if (currentIndex > 0) {
359
- dispatchFocusedPath({
360
- type: 'change_last_focus',
361
- value: currentIndex - 1
362
- });
363
- }
364
- } else {
365
- dispatchPath({
366
- type: 'opened_first_level'
367
- });
368
- dispatchFocusedPath({
369
- type: 'set_initial_focus'
370
- });
371
- handleListToggle(true);
372
- }
373
- break;
374
- }
375
- case keys.ArrowDown:
376
- {
377
- if (focusedPath.length) {
378
- if (currentIndex + 1 < currentLength) {
379
- dispatchFocusedPath({
380
- type: 'change_last_focus',
381
- value: currentIndex + 1
382
- });
383
- }
384
- } else {
385
- dispatchPath({
386
- type: 'opened_first_level'
387
- });
388
- dispatchFocusedPath({
389
- type: 'set_initial_focus'
390
- });
391
- handleListToggle(true);
392
- }
393
- break;
394
- }
395
- case keys.ArrowLeft:
396
- {
397
- if (path[0]) {
398
- if (focusedPath.length) {
399
- var isCurrentLevelOpened = keyExists(treePath, valueToPathMap.get((currentItem === null || currentItem === void 0 ? void 0 : currentItem.value.toString()) || '') || []);
400
- if (isCurrentLevelOpened) {
401
- dispatchTreePath({
402
- type: 'toggled_level',
403
- value: valueToPathMap.get((currentItem === null || currentItem === void 0 ? void 0 : currentItem.value.toString()) || '') || []
404
- });
405
- } else if (focusedPath.length === 1) {
406
- handleListToggle(false);
407
- } else {
408
- dispatchFocusedPath({
409
- type: 'return_prev_focus'
410
- });
411
- }
412
- }
413
- }
414
- break;
415
- }
416
- case keys.ArrowRight:
417
- {
418
- if (path[0]) {
419
- if (!focusedPath.length) {
420
- break;
421
- }
422
- if (currentItem !== null && currentItem !== void 0 && currentItem.disabled || currentItem !== null && currentItem !== void 0 && currentItem.isDisabled) {
423
- break;
424
- }
425
- if (currentItem !== null && currentItem !== void 0 && currentItem.items) {
426
- var _isCurrentLevelOpened = keyExists(treePath, valueToPathMap.get(currentItem.value.toString()) || []);
427
- if (_isCurrentLevelOpened) {
428
- dispatchFocusedPath({
429
- type: 'add_focus',
430
- value: 0
431
- });
432
- } else {
433
- dispatchTreePath({
434
- type: 'toggled_level',
435
- value: valueToPathMap.get(currentItem.value.toString()) || []
436
- });
437
- }
438
- }
439
- }
440
- break;
441
- }
442
- case keys.Space:
443
- case keys.Enter:
444
- {
445
- event.preventDefault();
446
- if (!path[0]) {
447
- dispatchPath({
448
- type: 'opened_first_level'
449
- });
450
- dispatchFocusedPath({
451
- type: 'set_initial_focus'
452
- });
453
- break;
454
- }
455
- if (!currentItem || currentItem !== null && currentItem !== void 0 && currentItem.disabled || currentItem !== null && currentItem !== void 0 && currentItem.isDisabled) {
456
- break;
457
- }
458
- handlePressDown(currentItem);
459
- break;
460
- }
461
- case keys.Tab:
462
- case keys.Escape:
463
- {
464
- if (path[0]) {
465
- handleListToggle(false);
466
- }
467
- break;
468
- }
469
- }
470
- };
471
- return {
472
- onKeyDown: onKeyDown
473
- };
474
- };
475
291
 
476
292
  export { getItemByFocused, keys, useKeyNavigation };
477
293
  //# sourceMappingURL=useKeyboardNavigation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardNavigation.js","sources":["../../../../src/components/Select/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import type { KeyboardEvent, Dispatch } from 'react';\nimport React from 'react';\n\nimport { keyExists } from '../reducers/treePathReducer';\nimport { PathAction, PathState, FocusedPathAction, FocusedPathState, TreePathAction, TreePathState } from '../reducers';\nimport type { MergedDropdownNodeTransformed } from '../ui/Inner/ui/Item/Item.types';\n\nimport { PathMapType, FocusedToValueMapType } from './usePathMaps';\n\nconst JUMP_SIZE = 10;\n\nexport const keys = {\n Enter: 'Enter',\n Space: 'Space',\n Tab: 'Tab',\n Escape: 'Escape',\n Backspace: 'Backspace',\n ArrowLeft: 'ArrowLeft',\n ArrowRight: 'ArrowRight',\n ArrowUp: 'ArrowUp',\n ArrowDown: 'ArrowDown',\n Home: 'Home',\n End: 'End',\n PageUp: 'PageUp',\n PageDown: 'PageDown',\n};\n\nexport const getItemByFocused = (focusedPath: FocusedPathState, focusedToValueMap: FocusedToValueMapType) => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n\n return focusedToValueMap.get(focusedPathAsString);\n};\n\ntype Props = {\n focusedPath: FocusedPathState;\n dispatchFocusedPath: Dispatch<FocusedPathAction>;\n path: PathState;\n dispatchPath: Dispatch<PathAction>;\n pathMap: PathMapType;\n focusedToValueMap: FocusedToValueMapType;\n handleListToggle: (opened: boolean) => void;\n handlePressDown: (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => void;\n treePath: TreePathState;\n dispatchTreePath: Dispatch<TreePathAction>;\n treeView: boolean;\n valueToPathMap: Map<string, string[]>;\n};\n\ntype ReturnedProps = {\n onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;\n};\n\nexport const useKeyNavigation = ({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n treePath,\n dispatchTreePath,\n treeView,\n valueToPathMap,\n}: Props): ReturnedProps => {\n if (treeView) {\n return keyboardNavigationTree({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n treePath,\n dispatchTreePath,\n treeView,\n valueToPathMap,\n });\n }\n\n return keyboardNavigationDefault({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n treePath,\n dispatchTreePath,\n treeView,\n valueToPathMap,\n });\n};\n\nconst keyboardNavigationDefault = ({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n}: Props): ReturnedProps => {\n const currentIndex: number = focusedPath?.[focusedPath.length - 1] || 0;\n const currentLength: number = pathMap.get(path?.[focusedPath.length - 1]) || 0;\n\n const onKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n switch (event.code) {\n case keys.ArrowUp: {\n if (focusedPath.length) {\n if (currentIndex > 0) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.ArrowDown: {\n if (focusedPath.length) {\n if (currentIndex + 1 < currentLength) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.ArrowLeft: {\n if (path[0]) {\n if (focusedPath.length) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n } else {\n dispatchFocusedPath({ type: 'return_prev_focus' });\n }\n }\n\n if (path.length === 1) {\n handleListToggle(false);\n }\n }\n\n break;\n }\n\n case keys.ArrowRight: {\n if (path[0]) {\n if (!focusedPath.length) {\n break;\n }\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap);\n\n if (currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n if (currentItem?.items) {\n if (path.length > focusedPath.length) {\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n } else {\n dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });\n }\n }\n }\n\n break;\n }\n\n case keys.Space: {\n event.preventDefault();\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap);\n\n if (!path[0]) {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n break;\n }\n\n if (!currentItem || currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n handlePressDown(currentItem);\n\n break;\n }\n\n case keys.Enter: {\n event.preventDefault();\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap)!;\n\n if (currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n if (!path[0]) {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n break;\n }\n\n if (currentItem?.items) {\n if (path.length > focusedPath.length) {\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n } else {\n dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });\n }\n\n break;\n }\n\n handlePressDown(currentItem);\n\n break;\n }\n\n case keys.Tab:\n case keys.Escape: {\n if (path[0]) {\n handleListToggle(false);\n }\n\n break;\n }\n\n case keys.Home: {\n if (path[0]) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.End: {\n if (path[0]) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'change_last_focus', value: (pathMap.get('root') || 0) - 1 });\n\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.PageUp: {\n if (!path[0]) {\n break;\n }\n\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n if (currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - JUMP_SIZE });\n }\n\n break;\n }\n\n case keys.PageDown: {\n if (!path[0]) {\n break;\n }\n\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n if (currentLength - currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + JUMP_SIZE });\n }\n\n break;\n }\n\n default: {\n break;\n }\n }\n };\n\n return { onKeyDown };\n};\n\nconst keyboardNavigationTree = ({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n treePath,\n dispatchTreePath,\n valueToPathMap,\n}: Props): ReturnedProps => {\n const currentIndex: number = focusedPath?.[focusedPath.length - 1] || 0;\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap);\n const currentLength: number = currentItem?.parent?.items?.length || pathMap.get('root') || 0;\n\n const onKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n switch (event.code) {\n case keys.ArrowUp: {\n if (focusedPath.length) {\n if (currentIndex > 0) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.ArrowDown: {\n if (focusedPath.length) {\n if (currentIndex + 1 < currentLength) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.ArrowLeft: {\n if (path[0]) {\n if (focusedPath.length) {\n const isCurrentLevelOpened = keyExists(\n treePath,\n valueToPathMap.get(currentItem?.value.toString() || '') || [],\n );\n\n if (isCurrentLevelOpened) {\n dispatchTreePath({\n type: 'toggled_level',\n value: valueToPathMap.get(currentItem?.value.toString() || '') || [],\n });\n } else if (focusedPath.length === 1) {\n handleListToggle(false);\n } else {\n dispatchFocusedPath({ type: 'return_prev_focus' });\n }\n }\n }\n\n break;\n }\n\n case keys.ArrowRight: {\n if (path[0]) {\n if (!focusedPath.length) {\n break;\n }\n\n if (currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n if (currentItem?.items) {\n const isCurrentLevelOpened = keyExists(\n treePath,\n valueToPathMap.get(currentItem.value.toString()) || [],\n );\n\n if (isCurrentLevelOpened) {\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n } else {\n dispatchTreePath({\n type: 'toggled_level',\n value: valueToPathMap.get(currentItem.value.toString()) || [],\n });\n }\n }\n }\n\n break;\n }\n\n case keys.Space:\n case keys.Enter: {\n event.preventDefault();\n\n if (!path[0]) {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n break;\n }\n\n if (!currentItem || currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n handlePressDown(currentItem);\n\n break;\n }\n\n case keys.Tab:\n case keys.Escape: {\n if (path[0]) {\n handleListToggle(false);\n }\n\n break;\n }\n\n default: {\n break;\n }\n }\n };\n\n return { onKeyDown };\n};\n"],"names":["JUMP_SIZE","keys","Enter","Space","Tab","Escape","Backspace","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","getItemByFocused","focusedPath","focusedToValueMap","focusedPathAsString","reduce","acc","n","concat","replace","get","useKeyNavigation","_ref","dispatchFocusedPath","path","dispatchPath","pathMap","handleListToggle","handlePressDown","treePath","dispatchTreePath","treeView","valueToPathMap","keyboardNavigationTree","keyboardNavigationDefault","_ref2","currentIndex","length","currentLength","onKeyDown","event","code","type","value","currentItem","disabled","isDisabled","items","toString","preventDefault","_ref3","_currentItem$parent","parent","isCurrentLevelOpened","keyExists"],"mappings":";;AASA,IAAMA,SAAS,GAAG,EAAE,CAAA;AAEb,IAAMC,IAAI,GAAG;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAEM,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,WAA6B,EAAEC,iBAAwC,EAAK;EACzG,IAAMC,mBAAmB,GAAGF,WA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gBAAgB,CAAC,KAAK,CAAC,CAAA;AAC3B,WAAA;AAEA,UAAA,MAAA;AACJ,SAAA;AAKJ,KAAA;GACH,CAAA;EAED,OAAO;AAAEY,IAAAA,SAAS,EAATA,SAAAA;GAAW,CAAA;AACxB,CAAC;;;;"}
1
+ {"version":3,"file":"useKeyboardNavigation.js","sources":["../../../../src/components/Select/hooks/useKeyboardNavigation.ts"],"sourcesContent":["import type { KeyboardEvent, Dispatch } from 'react';\nimport React from 'react';\n\nimport { PathAction, PathState, FocusedPathAction, FocusedPathState } from '../reducers';\nimport type { MergedDropdownNodeTransformed } from '../ui/Inner/ui/Item/Item.types';\n\nimport { PathMapType, FocusedToValueMapType } from './usePathMaps';\n\nconst JUMP_SIZE = 10;\n\nexport const keys = {\n Enter: 'Enter',\n Space: 'Space',\n Tab: 'Tab',\n Escape: 'Escape',\n Backspace: 'Backspace',\n ArrowLeft: 'ArrowLeft',\n ArrowRight: 'ArrowRight',\n ArrowUp: 'ArrowUp',\n ArrowDown: 'ArrowDown',\n Home: 'Home',\n End: 'End',\n PageUp: 'PageUp',\n PageDown: 'PageDown',\n};\n\nexport const getItemByFocused = (focusedPath: FocusedPathState, focusedToValueMap: FocusedToValueMapType) => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n\n return focusedToValueMap.get(focusedPathAsString);\n};\n\ntype Props = {\n focusedPath: FocusedPathState;\n dispatchFocusedPath: Dispatch<FocusedPathAction>;\n path: PathState;\n dispatchPath: Dispatch<PathAction>;\n pathMap: PathMapType;\n focusedToValueMap: FocusedToValueMapType;\n handleListToggle: (opened: boolean) => void;\n handlePressDown: (item: MergedDropdownNodeTransformed, e?: React.MouseEvent<HTMLElement>) => void;\n};\n\ntype ReturnedProps = {\n onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;\n};\n\nexport const useKeyNavigation = ({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleListToggle,\n handlePressDown,\n}: Props): ReturnedProps => {\n const currentIndex: number = focusedPath?.[focusedPath.length - 1] || 0;\n const currentLength: number = pathMap.get(path?.[focusedPath.length - 1]) || 0;\n\n const onKeyDown = (event: KeyboardEvent<HTMLElement>) => {\n switch (event.code) {\n case keys.ArrowUp: {\n if (focusedPath.length) {\n if (currentIndex > 0) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.ArrowDown: {\n if (focusedPath.length) {\n if (currentIndex + 1 < currentLength) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + 1 });\n }\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.ArrowLeft: {\n if (path[0]) {\n if (focusedPath.length) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n } else {\n dispatchFocusedPath({ type: 'return_prev_focus' });\n }\n }\n\n if (path.length === 1) {\n handleListToggle(false);\n }\n }\n\n break;\n }\n\n case keys.ArrowRight: {\n if (path[0]) {\n if (!focusedPath.length) {\n break;\n }\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap);\n\n if (currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n if (currentItem?.items) {\n if (path.length > focusedPath.length) {\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n } else {\n dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });\n }\n }\n }\n\n break;\n }\n\n case keys.Space: {\n event.preventDefault();\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap);\n\n if (!path[0]) {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n break;\n }\n\n if (!currentItem || currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n handlePressDown(currentItem);\n\n break;\n }\n\n case keys.Enter: {\n event.preventDefault();\n\n const currentItem = getItemByFocused(focusedPath, focusedToValueMap)!;\n\n if (currentItem?.disabled || currentItem?.isDisabled) {\n break;\n }\n\n if (!path[0]) {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n break;\n }\n\n if (currentItem?.items) {\n if (path.length > focusedPath.length) {\n dispatchFocusedPath({ type: 'add_focus', value: 0 });\n } else {\n dispatchPath({ type: 'added_next_level', value: currentItem.value.toString() });\n }\n\n break;\n }\n\n handlePressDown(currentItem);\n\n break;\n }\n\n case keys.Tab:\n case keys.Escape: {\n if (path[0]) {\n handleListToggle(false);\n }\n\n break;\n }\n\n case keys.Home: {\n if (path[0]) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'set_initial_focus' });\n\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.End: {\n if (path[0]) {\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchPath({ type: 'opened_first_level' });\n dispatchFocusedPath({ type: 'change_last_focus', value: (pathMap.get('root') || 0) - 1 });\n\n handleListToggle(true);\n }\n\n break;\n }\n\n case keys.PageUp: {\n if (!path[0]) {\n break;\n }\n\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n if (currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: 0 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex - JUMP_SIZE });\n }\n\n break;\n }\n\n case keys.PageDown: {\n if (!path[0]) {\n break;\n }\n\n if (path.length > focusedPath.length) {\n dispatchPath({ type: 'removed_last_level' });\n }\n\n if (currentLength - currentIndex <= JUMP_SIZE) {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentLength - 1 });\n } else {\n dispatchFocusedPath({ type: 'change_last_focus', value: currentIndex + JUMP_SIZE });\n }\n\n break;\n }\n\n default: {\n break;\n }\n }\n };\n\n return { onKeyDown };\n};\n"],"names":["JUMP_SIZE","keys","Enter","Space","Tab","Escape","Backspace","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","getItemByFocused","focusedPath","focusedToValueMap","focusedPathAsString","reduce","acc","n","concat","replace","get","useKeyNavigation","_ref","dispatchFocusedPath","path","dispatchPath","pathMap","handleListToggle","handlePressDown","currentIndex","length","currentLength","onKeyDown","event","code","type","value","currentItem","disabled","isDisabled","items","toString","preventDefault"],"mappings":"AAQA,IAAMA,SAAS,GAAG,EAAE,CAAA;AAEb,IAAMC,IAAI,GAAG;AAChBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAEM,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,WAA6B,EAAEC,iBAAwC,EAAK;EACzG,IAAMC,mBAAmB,GAAGF,WAAW,CAACG,MAAM,CAAC,U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AA,IAAIJ,aAAa,GAAGF,YAAY,IAAIjC,SAAS,EAAE;AAC3C2B,YAAAA,mBAAmB,CAAC;AAAEY,cAAAA,IAAI,EAAE,mBAAmB;cAAEC,KAAK,EAAEL,aAAa,GAAG,CAAA;AAAE,aAAC,CAAC,CAAA;AAChF,WAAC,MAAM;AACHR,YAAAA,mBAAmB,CAAC;AAAEY,cAAAA,IAAI,EAAE,mBAAmB;cAAEC,KAAK,EAAEP,YAAY,GAAGjC,SAAAA;AAAU,aAAC,CAAC,CAAA;AACvF,WAAA;AAEA,UAAA,MAAA;AACJ,SAAA;AAKJ,KAAA;GACH,CAAA;EAED,OAAO;AAAEoC,IAAAA,SAAS,EAATA,SAAAA;GAAW,CAAA;AACxB;;;;"}
@@ -1,34 +1,30 @@
1
- import { toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import { isEmpty } from '../../../utils/isEmpty.js';
3
2
 
4
- // Рекурсивно проходим по дереву items и создаем мапы для быстрой работы с деревом.
3
+ // Рекурсивно проходим по дереву items и создаем 4 мапы: открытых путей, фокусов, выбранных элементов и айтемов.
5
4
  var usePathMaps = function usePathMaps(items) {
6
5
  var pathMap = new Map();
7
6
  var focusedToValueMap = new Map();
8
7
  var valueToCheckedMap = new Map();
9
8
  var valueToItemMap = new Map();
10
- var valueToPathMap = new Map();
11
9
  pathMap.set('root', (items === null || items === void 0 ? void 0 : items.length) || 0);
12
10
  var rec = function rec(items) {
13
11
  var prevIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
14
- var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
15
12
  items === null || items === void 0 || items.forEach(function (item, index) {
16
13
  var value = item.value,
17
14
  innerItems = item.items;
18
15
  var currIndex = "".concat(prevIndex, "/").concat(index).replace(/^(\/)/, '');
19
16
  focusedToValueMap.set(currIndex, item);
20
17
  valueToCheckedMap.set(value, false);
21
- valueToPathMap.set(value.toString(), [].concat(_toConsumableArray(path), [value.toString()]));
22
18
  if (isEmpty(innerItems) || !innerItems) {
23
19
  valueToItemMap.set(value, item);
24
20
  } else {
25
21
  pathMap.set(value, innerItems.length);
26
- rec(innerItems, currIndex, [].concat(_toConsumableArray(path), [value.toString()]));
22
+ rec(innerItems, currIndex);
27
23
  }
28
24
  });
29
25
  };
30
26
  rec(items);
31
- return [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap, valueToPathMap];
27
+ return [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap];
32
28
  };
33
29
 
34
30
  export { usePathMaps };
@@ -1 +1 @@
1
- {"version":3,"file":"usePathMaps.js","sources":["../../../../src/components/Select/hooks/usePathMaps.ts"],"sourcesContent":["import { isEmpty } from 'src/utils';\n\nimport { MergedSelectProps } from '../Select.types';\nimport { MergedDropdownNodeTransformed } from '../ui/Inner/ui/Item/Item.types';\n\nexport type PathMapType = Map<string | number, number>;\nexport type FocusedToValueMapType = Map<string, MergedDropdownNodeTransformed>;\nexport type ValueToCheckedMapType = Map<\n MergedDropdownNodeTransformed['value'],\n boolean | 'done' | 'dot' | 'indeterminate'\n>;\nexport type ValueToItemMapType = Map<MergedDropdownNodeTransformed['value'], MergedDropdownNodeTransformed>;\nexport type ValueToPathMapType = Map<string, string[]>;\n\n// Рекурсивно проходим по дереву items и создаем мапы для быстрой работы с деревом.\nexport const usePathMaps = (items: MergedSelectProps['items']) => {\n const pathMap: PathMapType = new Map();\n const focusedToValueMap: FocusedToValueMapType = new Map();\n const valueToCheckedMap: ValueToCheckedMapType = new Map();\n const valueToItemMap: ValueToItemMapType = new Map();\n const valueToPathMap: ValueToPathMapType = new Map();\n\n pathMap.set('root', items?.length || 0);\n\n const rec = (items: MergedSelectProps['items'], prevIndex = '', path: string[] = []) => {\n items?.forEach((item: MergedDropdownNodeTransformed, index: number) => {\n const { value, items: innerItems } = item;\n\n const currIndex = `${prevIndex}/${index}`.replace(/^(\\/)/, '');\n focusedToValueMap.set(currIndex, item);\n\n valueToCheckedMap.set(value, false);\n valueToPathMap.set(value.toString(), [...path, value.toString()]);\n\n if (isEmpty(innerItems) || !innerItems) {\n valueToItemMap.set(value, item);\n } else {\n pathMap.set(value, innerItems.length);\n rec(innerItems, currIndex, [...path, value.toString()]);\n }\n });\n };\n rec(items);\n\n return [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap, valueToPathMap] as [\n PathMapType,\n FocusedToValueMapType,\n ValueToCheckedMapType,\n ValueToItemMapType,\n ValueToPathMapType,\n ];\n};\n"],"names":["usePathMaps","items","pathMap","Map","focusedToValueMap","valueToCheckedMap","valueToItemMap","valueToPathMap","set","length","rec","prevIndex","arguments","undefined","path","forEach","item","index","value","innerItems","currIndex","concat","replace","toString","_toConsumableArray","isEmpty"],"mappings":";;;AAcA;IACaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,KAAiC,EAAK;AAC9D,EAAA,IAAMC,OAAoB,GAAG,IAAIC,GAAG,EAAE,CAAA;AACtC,EAAA,IAAMC,iBAAwC,GAAG,IAAID,GAAG,EAAE,CAAA;AAC1D,EAAA,IAAME,iBAAwC,GAAG,IAAIF,GAAG,EAAE,CAAA;AAC1D,EAAA,IAAMG,cAAkC,GAAG,IAAIH,GAAG,EAAE,CAAA;AACpD,EAAA,IAAMI,cAAkC,GAAG,IAAIJ,GAAG,EAAE,CAAA;AAEpDD,EAAAA,OAAO,CAACM,GAAG,CAAC,MAAM,EAAE,CAAAP,KAAK,KAALA,IAAAA,IAAAA,KAAK,uBAALA,KAAK,CAAEQ,MAAM,KAAI,CAAC,CAAC,CAAA;AAEvC,EAAA,IAAMC,GAAG,GAAG,SAANA,GAAGA,CAAIT,KAAiC,EAA0C;AAAA,IAAA,IAAxCU,SAAS,GAAAC,SAAA,CAAAH,MAAA,GAAA,CAAA,IAAAG,SAAA,CAAA,CAAA,CAAA,KAAAC,SAAA,GAAAD,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE,CAAA;AAAA,IAAA,IAAEE,IAAc,GAAAF,SAA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ACJ,KAAC,CAAC,CAAA;GACL,CAAA;EACDb,GAAG,CAACT,KAAK,CAAC,CAAA;EAEV,OAAO,CAACC,OAAO,EAAEE,iBAAiB,EAAEC,iBAAiB,EAAEC,cAAc,EAAEC,cAAc,CAAC,CAAA;AAO1F;;;;"}
1
+ {"version":3,"file":"usePathMaps.js","sources":["../../../../src/components/Select/hooks/usePathMaps.ts"],"sourcesContent":["import { isEmpty } from 'src/utils';\n\nimport { MergedSelectProps } from '../Select.types';\nimport { MergedDropdownNodeTransformed } from '../ui/Inner/ui/Item/Item.types';\n\nexport type PathMapType = Map<string | number, number>;\nexport type FocusedToValueMapType = Map<string, MergedDropdownNodeTransformed>;\nexport type ValueToCheckedMapType = Map<\n MergedDropdownNodeTransformed['value'],\n boolean | 'done' | 'dot' | 'indeterminate'\n>;\nexport type ValueToItemMapType = Map<MergedDropdownNodeTransformed['value'], MergedDropdownNodeTransformed>;\n\n// Рекурсивно проходим по дереву items и создаем 4 мапы: открытых путей, фокусов, выбранных элементов и айтемов.\nexport const usePathMaps = (items: MergedSelectProps['items']) => {\n const pathMap: PathMapType = new Map();\n const focusedToValueMap: FocusedToValueMapType = new Map();\n const valueToCheckedMap: ValueToCheckedMapType = new Map();\n const valueToItemMap: ValueToItemMapType = new Map();\n\n pathMap.set('root', items?.length || 0);\n\n const rec = (items: MergedSelectProps['items'], prevIndex = '') => {\n items?.forEach((item: MergedDropdownNodeTransformed, index: number) => {\n const { value, items: innerItems } = item;\n\n const currIndex = `${prevIndex}/${index}`.replace(/^(\\/)/, '');\n focusedToValueMap.set(currIndex, item);\n\n valueToCheckedMap.set(value, false);\n\n if (isEmpty(innerItems) || !innerItems) {\n valueToItemMap.set(value, item);\n } else {\n pathMap.set(value, innerItems.length);\n rec(innerItems, currIndex);\n }\n });\n };\n rec(items);\n\n return [pathMap, focusedToValueMap, valueToCheckedMap, valueToItemMap] as [\n PathMapType,\n FocusedToValueMapType,\n ValueToCheckedMapType,\n ValueToItemMapType,\n ];\n};\n"],"names":["usePathMaps","items","pathMap","Map","focusedToValueMap","valueToCheckedMap","valueToItemMap","set","length","rec","prevIndex","arguments","undefined","forEach","item","index","value","innerItems","currIndex","concat","replace","isEmpty"],"mappings":";;AAaA;IACaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,KAAiC,EAAK;AAC9D,EAAA,IAAMC,OAAoB,GAAG,IAAIC,GAAG,EAAE,CAAA;AACtC,EAAA,IAAMC,iBAAwC,GAAG,IAAID,GAAG,EAAE,CAAA;AAC1D,EAAA,IAAME,iBAAwC,GAAG,IAAIF,GAAG,EAAE,CAAA;AAC1D,EAAA,IAAMG,cAAkC,GAAG,IAAIH,GAAG,EAAE,CAAA;AAEpDD,EAAAA,OAAO,CAACK,GAAG,CAAC,MAAM,EAAE,CAAAN,KAAK,KAALA,IAAAA,IAAAA,KAAK,uBAALA,KAAK,CAAEO,MAAM,KAAI,CAAC,CAAC,CAAA;AAEvC,EAAA,IAAMC,GAAG,GAAG,SAANA,GAAGA,CAAIR,KAAiC,EAAqB;AAAA,IAAA,IAAnBS,SAAS,GAAAC,SAAA,CAAAH,MAAA,GAAA,CAAA,IAAAG,SAAA,CAAA,CAAA,CAAA,KAAAC,SAAA,GAAAD,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE,CAAA;IAC1DV,KAAK,KAAA,IAAA,IAALA,KAAK,KAAA,KAAA,CAAA,IAALA,KAAK,CAAEY,OAAO,CAAC,UAACC,IAAmC,EAAEC,KAAa,EAAK;AACnE,MAAA,IAAQC,KAAK,GAAwBF,IAAI,CAAjCE,KAAK;QAASC,UAAU,GAAKH,IAAI,CAA1Bb,KAAK,CAAA;AAEpB,MAAA,IAAMiB,SAAS,GAAG,EAAA,CAAAC,MAAA,CAAGT,SAAS,EAAAS,GAAAA,CAAAA,CAAAA,MAAA,CAAIJ,KAAK,EAAGK,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;AAC9DhB,MAAAA,iBAAiB,CAACG,GAAG,CAACW,SAAS,EAAEJ,IAAI,CAAC,CAAA;AAEtCT,MAAAA,iBAAiB,CAACE,GAAG,CAACS,KAAK,EAAE,KAAK,CAAC,CAAA;AAEnC,MAAA,IAAIK,OAAO,CAACJ,UAAU,CAAC,IAAI,CAACA,UAAU,EAAE;AACpCX,QAAAA,cAAc,CAACC,GAAG,CAACS,KAAK,EAAEF,IAAI,CAAC,CAAA;AACnC,OAAC,MAAM;QACHZ,OAAO,CAACK,GAAG,CAACS,KAAK,EAAEC,UAAU,CAACT,MAAM,CAAC,CAAA;AACrCC,QAAAA,GAAG,CAACQ,UAAU,EAAEC,SAAS,CAAC,CAAA;AAC9B,OAAA;AACJ,KAAC,CAAC,CAAA;GACL,CAAA;EACDT,GAAG,CAACR,KAAK,CAAC,CAAA;EAEV,OAAO,CAACC,OAAO,EAAEE,iBAAiB,EAAEC,iBAAiB,EAAEC,cAAc,CAAC,CAAA;AAM1E;;;;"}
@@ -124,25 +124,6 @@
124
124
  .SelectAll_styles_ql2mqj_d19w91z6__b71a8639{background:var(--surface-solid-card);}
125
125
  .SelectAll_styles_ql2mqj_d1nbef5q__b71a8639{height:0.0625rem;margin-top:var(--d1nbef5q-0);margin-right:var(--plasma-select-divider-margin-right);margin-left:var(--plasma-select-divider-margin-left);background:var(--plasma-select-divider-color);}
126
126
 
127
-
128
- .Item_styles_i0dby2_s14rxgk6__158876c7{--plasma-cell-title-color:var(--s14rxgk6-0);--plasma-cell-background-color:var(--surface-clear);--plasma-cell-padding:var(--plasma-select-cell-padding);--plasma-cell-padding-left-content:var(--plasma-select-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-select-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-select-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-select-cell-textbox-gap);--plasma-cell-gap:var(--plasma-select-cell-gap);--plasma-cell-title-font-family:var(--plasma-select-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-select-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-select-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-select-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-select-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-select-cell-title-line-height);width:100%;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellContent__158876c7,.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextbox__158876c7{-webkit-flex:1;-ms-flex:1;flex:1;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7{position:relative;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7:before{content:'&nbsp;';visibility:hidden;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7 span{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
129
-
130
- .Item_styles_i0dby2_s1t6abbl__158876c7{--plasma-checkbox-trigger-size:var(--plasma-select-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-select-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--plasma-select-checkbox-fill-color);--plasma-checkbox-icon-color:var(--plasma-select-checkbox-icon-color);--plasma-checkbox-trigger-border-width:var(--plasma-select-checkbox-trigger-border-width);--plasma-checkbox-trigger-border-color:var(--plasma-select-checkbox-trigger-border-color);--plasma-checkbox-trigger-border-checked-color:var(--plasma-select-checkbox-trigger-border-checked-color);}
131
- .Item_styles_i0dby2_swduayr__158876c7{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-item-icon-color);}
132
- .Item_styles_i0dby2_s1r3fsvz__158876c7{width:var(--s1r3fsvz-0);height:var(--s1r3fsvz-0);}.Item_styles_i0dby2_s1r3fsvz__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}
133
- .Item_styles_i0dby2_s1us4s6s__158876c7{width:var(--s1us4s6s-0);height:var(--s1us4s6s-0);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Item_styles_i0dby2_s1us4s6s__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}
134
- .Item_styles_i0dby2_s14lzt5m__158876c7{width:var(--s14lzt5m-0);height:var(--s14lzt5m-0);}
135
- .Item_styles_i0dby2_d1178nq__158876c7{line-height:0;color:var(--plasma-select-disclosure-icon-color);visibility:var(--d1178nq-0);}.Item_styles_i0dby2_d1178nq__158876c7:hover{color:var(--plasma-select-disclosure-icon-color-hover);}
136
- .Item_styles_i0dby2_i1noc5rg__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex:none;-ms-flex:none;flex:none;width:var(--i1noc5rg-0);height:var(--i1noc5rg-0);line-height:0;color:var(--plasma-select-item-icon-color);}
137
- .Item_styles_i0dby2_s1azt70o__158876c7{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
138
- .Item_styles_i0dby2_wa9o46g__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-select-item-gap);min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wa9o46g-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background-color:var(--surface-clear);color:var(--text-primary);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-clip:padding-box;position:relative;}.Item_styles_i0dby2_wa9o46g__158876c7:hover:not(.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7){cursor:pointer;background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsActive__158876c7{background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7{opacity:var(--plasma-select-item-disabled-opacity);color:var(--plasma-select-item-disabled-color);cursor:not-allowed;}.Item_styles_i0dby2_wa9o46g__158876c7:focus{outline:none;}.Item_styles_i0dby2_wa9o46g__158876c7::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0 solid transparent;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-transition:none;transition:none;pointer-events:none;}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsFocused__158876c7:before{outline:none;box-shadow:inset 0 0 0 0.0625rem var(--surface-accent);}
139
-
140
-
141
- .Item_styles_i0dby2_o1888l7c__158876c7{width:calc(var(--o1888l7c-0) * var(--plasma-select-item-tree-offset-width));-webkit-flex:none;-ms-flex:none;flex:none;margin-right:calc(var(--plasma-select-item-gap) * -1);}
142
-
143
- .TreeList_styles_1t38mek_lm92bs9__3097faae{width:100%;padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
144
- .TreeList_styles_1t38mek_s12qznqt__3097faae{max-height:var(--s12qznqt-0);overflow-x:hidden;overflow-y:auto;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));}
145
-
146
127
  .Select_styles_dta4dl_lpxbau6__559b5dde{width:var(--lpxbau6-0);padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
147
128
  .Select_styles_dta4dl_u1yey2x3__559b5dde{max-height:var(--u1yey2x3-0);overflow-x:hidden;overflow-y:var(--u1yey2x3-1);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));margin:0;padding:0;}
148
129
 
@@ -200,25 +200,6 @@
200
200
  .SelectAll_styles_ql2mqj_d19w91z6__b71a8639{background:var(--surface-solid-card);}
201
201
  .SelectAll_styles_ql2mqj_d1nbef5q__b71a8639{height:0.0625rem;margin-top:var(--d1nbef5q-0);margin-right:var(--plasma-select-divider-margin-right);margin-left:var(--plasma-select-divider-margin-left);background:var(--plasma-select-divider-color);}
202
202
 
203
-
204
- .Item_styles_i0dby2_s14rxgk6__158876c7{--plasma-cell-title-color:var(--s14rxgk6-0);--plasma-cell-background-color:var(--surface-clear);--plasma-cell-padding:var(--plasma-select-cell-padding);--plasma-cell-padding-left-content:var(--plasma-select-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-select-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-select-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-select-cell-textbox-gap);--plasma-cell-gap:var(--plasma-select-cell-gap);--plasma-cell-title-font-family:var(--plasma-select-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-select-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-select-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-select-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-select-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-select-cell-title-line-height);width:100%;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellContent__158876c7,.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextbox__158876c7{-webkit-flex:1;-ms-flex:1;flex:1;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7{position:relative;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7:before{content:'&nbsp;';visibility:hidden;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7 span{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
205
-
206
- .Item_styles_i0dby2_s1t6abbl__158876c7{--plasma-checkbox-trigger-size:var(--plasma-select-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-select-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--plasma-select-checkbox-fill-color);--plasma-checkbox-icon-color:var(--plasma-select-checkbox-icon-color);--plasma-checkbox-trigger-border-width:var(--plasma-select-checkbox-trigger-border-width);--plasma-checkbox-trigger-border-color:var(--plasma-select-checkbox-trigger-border-color);--plasma-checkbox-trigger-border-checked-color:var(--plasma-select-checkbox-trigger-border-checked-color);}
207
- .Item_styles_i0dby2_swduayr__158876c7{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-item-icon-color);}
208
- .Item_styles_i0dby2_s1r3fsvz__158876c7{width:var(--s1r3fsvz-0);height:var(--s1r3fsvz-0);}.Item_styles_i0dby2_s1r3fsvz__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}
209
- .Item_styles_i0dby2_s1us4s6s__158876c7{width:var(--s1us4s6s-0);height:var(--s1us4s6s-0);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Item_styles_i0dby2_s1us4s6s__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}
210
- .Item_styles_i0dby2_s14lzt5m__158876c7{width:var(--s14lzt5m-0);height:var(--s14lzt5m-0);}
211
- .Item_styles_i0dby2_d1178nq__158876c7{line-height:0;color:var(--plasma-select-disclosure-icon-color);visibility:var(--d1178nq-0);}.Item_styles_i0dby2_d1178nq__158876c7:hover{color:var(--plasma-select-disclosure-icon-color-hover);}
212
- .Item_styles_i0dby2_i1noc5rg__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex:none;-ms-flex:none;flex:none;width:var(--i1noc5rg-0);height:var(--i1noc5rg-0);line-height:0;color:var(--plasma-select-item-icon-color);}
213
- .Item_styles_i0dby2_s1azt70o__158876c7{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
214
- .Item_styles_i0dby2_wa9o46g__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-select-item-gap);min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wa9o46g-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background-color:var(--surface-clear);color:var(--text-primary);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-clip:padding-box;position:relative;}.Item_styles_i0dby2_wa9o46g__158876c7:hover:not(.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7){cursor:pointer;background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsActive__158876c7{background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7{opacity:var(--plasma-select-item-disabled-opacity);color:var(--plasma-select-item-disabled-color);cursor:not-allowed;}.Item_styles_i0dby2_wa9o46g__158876c7:focus{outline:none;}.Item_styles_i0dby2_wa9o46g__158876c7::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0 solid transparent;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-transition:none;transition:none;pointer-events:none;}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsFocused__158876c7:before{outline:none;box-shadow:inset 0 0 0 0.0625rem var(--surface-accent);}
215
-
216
-
217
- .Item_styles_i0dby2_o1888l7c__158876c7{width:calc(var(--o1888l7c-0) * var(--plasma-select-item-tree-offset-width));-webkit-flex:none;-ms-flex:none;flex:none;margin-right:calc(var(--plasma-select-item-gap) * -1);}
218
-
219
- .TreeList_styles_1t38mek_lm92bs9__3097faae{width:100%;padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
220
- .TreeList_styles_1t38mek_s12qznqt__3097faae{max-height:var(--s12qznqt-0);overflow-x:hidden;overflow-y:auto;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));}
221
-
222
203
  .Select_styles_dta4dl_lpxbau6__559b5dde{width:var(--lpxbau6-0);padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
223
204
  .Select_styles_dta4dl_u1yey2x3__559b5dde{max-height:var(--u1yey2x3-0);overflow-x:hidden;overflow-y:var(--u1yey2x3-1);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));margin:0;padding:0;}
224
205
 
@@ -202,25 +202,6 @@
202
202
  .SelectAll_styles_ql2mqj_d19w91z6__b71a8639{background:var(--surface-solid-card);}
203
203
  .SelectAll_styles_ql2mqj_d1nbef5q__b71a8639{height:0.0625rem;margin-top:var(--d1nbef5q-0);margin-right:var(--plasma-select-divider-margin-right);margin-left:var(--plasma-select-divider-margin-left);background:var(--plasma-select-divider-color);}
204
204
 
205
-
206
- .Item_styles_i0dby2_s14rxgk6__158876c7{--plasma-cell-title-color:var(--s14rxgk6-0);--plasma-cell-background-color:var(--surface-clear);--plasma-cell-padding:var(--plasma-select-cell-padding);--plasma-cell-padding-left-content:var(--plasma-select-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-select-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-select-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-select-cell-textbox-gap);--plasma-cell-gap:var(--plasma-select-cell-gap);--plasma-cell-title-font-family:var(--plasma-select-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-select-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-select-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-select-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-select-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-select-cell-title-line-height);width:100%;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellContent__158876c7,.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextbox__158876c7{-webkit-flex:1;-ms-flex:1;flex:1;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7{position:relative;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7:before{content:'&nbsp;';visibility:hidden;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7 span{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
207
-
208
- .Item_styles_i0dby2_s1t6abbl__158876c7{--plasma-checkbox-trigger-size:var(--plasma-select-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-select-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--plasma-select-checkbox-fill-color);--plasma-checkbox-icon-color:var(--plasma-select-checkbox-icon-color);--plasma-checkbox-trigger-border-width:var(--plasma-select-checkbox-trigger-border-width);--plasma-checkbox-trigger-border-color:var(--plasma-select-checkbox-trigger-border-color);--plasma-checkbox-trigger-border-checked-color:var(--plasma-select-checkbox-trigger-border-checked-color);}
209
- .Item_styles_i0dby2_swduayr__158876c7{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-item-icon-color);}
210
- .Item_styles_i0dby2_s1r3fsvz__158876c7{width:var(--s1r3fsvz-0);height:var(--s1r3fsvz-0);}.Item_styles_i0dby2_s1r3fsvz__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}
211
- .Item_styles_i0dby2_s1us4s6s__158876c7{width:var(--s1us4s6s-0);height:var(--s1us4s6s-0);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Item_styles_i0dby2_s1us4s6s__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}
212
- .Item_styles_i0dby2_s14lzt5m__158876c7{width:var(--s14lzt5m-0);height:var(--s14lzt5m-0);}
213
- .Item_styles_i0dby2_d1178nq__158876c7{line-height:0;color:var(--plasma-select-disclosure-icon-color);visibility:var(--d1178nq-0);}.Item_styles_i0dby2_d1178nq__158876c7:hover{color:var(--plasma-select-disclosure-icon-color-hover);}
214
- .Item_styles_i0dby2_i1noc5rg__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex:none;-ms-flex:none;flex:none;width:var(--i1noc5rg-0);height:var(--i1noc5rg-0);line-height:0;color:var(--plasma-select-item-icon-color);}
215
- .Item_styles_i0dby2_s1azt70o__158876c7{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
216
- .Item_styles_i0dby2_wa9o46g__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-select-item-gap);min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wa9o46g-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background-color:var(--surface-clear);color:var(--text-primary);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-clip:padding-box;position:relative;}.Item_styles_i0dby2_wa9o46g__158876c7:hover:not(.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7){cursor:pointer;background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsActive__158876c7{background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7{opacity:var(--plasma-select-item-disabled-opacity);color:var(--plasma-select-item-disabled-color);cursor:not-allowed;}.Item_styles_i0dby2_wa9o46g__158876c7:focus{outline:none;}.Item_styles_i0dby2_wa9o46g__158876c7::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0 solid transparent;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-transition:none;transition:none;pointer-events:none;}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsFocused__158876c7:before{outline:none;box-shadow:inset 0 0 0 0.0625rem var(--surface-accent);}
217
-
218
-
219
- .Item_styles_i0dby2_o1888l7c__158876c7{width:calc(var(--o1888l7c-0) * var(--plasma-select-item-tree-offset-width));-webkit-flex:none;-ms-flex:none;flex:none;margin-right:calc(var(--plasma-select-item-gap) * -1);}
220
-
221
- .TreeList_styles_1t38mek_lm92bs9__3097faae{width:100%;padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
222
- .TreeList_styles_1t38mek_s12qznqt__3097faae{max-height:var(--s12qznqt-0);overflow-x:hidden;overflow-y:auto;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));}
223
-
224
205
  .Select_styles_dta4dl_lpxbau6__559b5dde{width:var(--lpxbau6-0);padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
225
206
  .Select_styles_dta4dl_u1yey2x3__559b5dde{max-height:var(--u1yey2x3-0);overflow-x:hidden;overflow-y:var(--u1yey2x3-1);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));margin:0;padding:0;}
226
207
 
@@ -213,25 +213,6 @@
213
213
  .SelectAll_styles_ql2mqj_d19w91z6__b71a8639{background:var(--surface-solid-card);}
214
214
  .SelectAll_styles_ql2mqj_d1nbef5q__b71a8639{height:0.0625rem;margin-top:var(--d1nbef5q-0);margin-right:var(--plasma-select-divider-margin-right);margin-left:var(--plasma-select-divider-margin-left);background:var(--plasma-select-divider-color);}
215
215
 
216
-
217
- .Item_styles_i0dby2_s14rxgk6__158876c7{--plasma-cell-title-color:var(--s14rxgk6-0);--plasma-cell-background-color:var(--surface-clear);--plasma-cell-padding:var(--plasma-select-cell-padding);--plasma-cell-padding-left-content:var(--plasma-select-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-select-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-select-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-select-cell-textbox-gap);--plasma-cell-gap:var(--plasma-select-cell-gap);--plasma-cell-title-font-family:var(--plasma-select-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-select-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-select-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-select-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-select-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-select-cell-title-line-height);width:100%;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellContent__158876c7,.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextbox__158876c7{-webkit-flex:1;-ms-flex:1;flex:1;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7{position:relative;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7:before{content:'&nbsp;';visibility:hidden;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7 span{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
218
-
219
- .Item_styles_i0dby2_s1t6abbl__158876c7{--plasma-checkbox-trigger-size:var(--plasma-select-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-select-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--plasma-select-checkbox-fill-color);--plasma-checkbox-icon-color:var(--plasma-select-checkbox-icon-color);--plasma-checkbox-trigger-border-width:var(--plasma-select-checkbox-trigger-border-width);--plasma-checkbox-trigger-border-color:var(--plasma-select-checkbox-trigger-border-color);--plasma-checkbox-trigger-border-checked-color:var(--plasma-select-checkbox-trigger-border-checked-color);}
220
- .Item_styles_i0dby2_swduayr__158876c7{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-item-icon-color);}
221
- .Item_styles_i0dby2_s1r3fsvz__158876c7{width:var(--s1r3fsvz-0);height:var(--s1r3fsvz-0);}.Item_styles_i0dby2_s1r3fsvz__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}
222
- .Item_styles_i0dby2_s1us4s6s__158876c7{width:var(--s1us4s6s-0);height:var(--s1us4s6s-0);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Item_styles_i0dby2_s1us4s6s__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}
223
- .Item_styles_i0dby2_s14lzt5m__158876c7{width:var(--s14lzt5m-0);height:var(--s14lzt5m-0);}
224
- .Item_styles_i0dby2_d1178nq__158876c7{line-height:0;color:var(--plasma-select-disclosure-icon-color);visibility:var(--d1178nq-0);}.Item_styles_i0dby2_d1178nq__158876c7:hover{color:var(--plasma-select-disclosure-icon-color-hover);}
225
- .Item_styles_i0dby2_i1noc5rg__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex:none;-ms-flex:none;flex:none;width:var(--i1noc5rg-0);height:var(--i1noc5rg-0);line-height:0;color:var(--plasma-select-item-icon-color);}
226
- .Item_styles_i0dby2_s1azt70o__158876c7{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
227
- .Item_styles_i0dby2_wa9o46g__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-select-item-gap);min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wa9o46g-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background-color:var(--surface-clear);color:var(--text-primary);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-clip:padding-box;position:relative;}.Item_styles_i0dby2_wa9o46g__158876c7:hover:not(.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7){cursor:pointer;background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsActive__158876c7{background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7{opacity:var(--plasma-select-item-disabled-opacity);color:var(--plasma-select-item-disabled-color);cursor:not-allowed;}.Item_styles_i0dby2_wa9o46g__158876c7:focus{outline:none;}.Item_styles_i0dby2_wa9o46g__158876c7::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0 solid transparent;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-transition:none;transition:none;pointer-events:none;}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsFocused__158876c7:before{outline:none;box-shadow:inset 0 0 0 0.0625rem var(--surface-accent);}
228
-
229
-
230
- .Item_styles_i0dby2_o1888l7c__158876c7{width:calc(var(--o1888l7c-0) * var(--plasma-select-item-tree-offset-width));-webkit-flex:none;-ms-flex:none;flex:none;margin-right:calc(var(--plasma-select-item-gap) * -1);}
231
-
232
- .TreeList_styles_1t38mek_lm92bs9__3097faae{width:100%;padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
233
- .TreeList_styles_1t38mek_s12qznqt__3097faae{max-height:var(--s12qznqt-0);overflow-x:hidden;overflow-y:auto;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));}
234
-
235
216
  .Select_styles_dta4dl_lpxbau6__559b5dde{width:var(--lpxbau6-0);padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
236
217
  .Select_styles_dta4dl_u1yey2x3__559b5dde{max-height:var(--u1yey2x3-0);overflow-x:hidden;overflow-y:var(--u1yey2x3-1);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));margin:0;padding:0;}
237
218
 
@@ -213,25 +213,6 @@
213
213
  .SelectAll_styles_ql2mqj_d19w91z6__b71a8639{background:var(--surface-solid-card);}
214
214
  .SelectAll_styles_ql2mqj_d1nbef5q__b71a8639{height:0.0625rem;margin-top:var(--d1nbef5q-0);margin-right:var(--plasma-select-divider-margin-right);margin-left:var(--plasma-select-divider-margin-left);background:var(--plasma-select-divider-color);}
215
215
 
216
-
217
- .Item_styles_i0dby2_s14rxgk6__158876c7{--plasma-cell-title-color:var(--s14rxgk6-0);--plasma-cell-background-color:var(--surface-clear);--plasma-cell-padding:var(--plasma-select-cell-padding);--plasma-cell-padding-left-content:var(--plasma-select-cell-padding-left-content);--plasma-cell-padding-content:var(--plasma-select-cell-padding-content);--plasma-cell-padding-right-content:var(--plasma-select-cell-padding-right-content);--plasma-cell-textbox-gap:var(--plasma-select-cell-textbox-gap);--plasma-cell-gap:var(--plasma-select-cell-gap);--plasma-cell-title-font-family:var(--plasma-select-cell-title-font-family);--plasma-cell-title-font-size:var(--plasma-select-cell-title-font-size);--plasma-cell-title-font-style:var(--plasma-select-cell-title-font-style);--plasma-cell-title-font-weight:var(--plasma-select-cell-title-font-weight);--plasma-cell-title-letter-spacing:var(--plasma-select-cell-title-letter-spacing);--plasma-cell-title-line-height:var(--plasma-select-cell-title-line-height);width:100%;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellContent__158876c7,.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextbox__158876c7{-webkit-flex:1;-ms-flex:1;flex:1;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7{position:relative;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7:before{content:'&nbsp;';visibility:hidden;}.Item_styles_i0dby2_s14rxgk6__158876c7 div.Item_styles_i0dby2_cellTextboxTitle__158876c7 span{position:absolute;left:0;right:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
218
-
219
- .Item_styles_i0dby2_s1t6abbl__158876c7{--plasma-checkbox-trigger-size:var(--plasma-select-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-select-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--plasma-select-checkbox-fill-color);--plasma-checkbox-icon-color:var(--plasma-select-checkbox-icon-color);--plasma-checkbox-trigger-border-width:var(--plasma-select-checkbox-trigger-border-width);--plasma-checkbox-trigger-border-color:var(--plasma-select-checkbox-trigger-border-color);--plasma-checkbox-trigger-border-checked-color:var(--plasma-select-checkbox-trigger-border-checked-color);}
220
- .Item_styles_i0dby2_swduayr__158876c7{--plasma-indicator-size:var(--plasma-select-indicator-size);--plasma-indicator-color:var(--plasma-select-item-icon-color);}
221
- .Item_styles_i0dby2_s1r3fsvz__158876c7{width:var(--s1r3fsvz-0);height:var(--s1r3fsvz-0);}.Item_styles_i0dby2_s1r3fsvz__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}
222
- .Item_styles_i0dby2_s1us4s6s__158876c7{width:var(--s1us4s6s-0);height:var(--s1us4s6s-0);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);}.Item_styles_i0dby2_s1us4s6s__158876c7.Item_styles_i0dby2_arrowInverse__158876c7{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);}
223
- .Item_styles_i0dby2_s14lzt5m__158876c7{width:var(--s14lzt5m-0);height:var(--s14lzt5m-0);}
224
- .Item_styles_i0dby2_d1178nq__158876c7{line-height:0;color:var(--plasma-select-disclosure-icon-color);visibility:var(--d1178nq-0);}.Item_styles_i0dby2_d1178nq__158876c7:hover{color:var(--plasma-select-disclosure-icon-color-hover);}
225
- .Item_styles_i0dby2_i1noc5rg__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-flex:none;-ms-flex:none;flex:none;width:var(--i1noc5rg-0);height:var(--i1noc5rg-0);line-height:0;color:var(--plasma-select-item-icon-color);}
226
- .Item_styles_i0dby2_s1azt70o__158876c7{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-flex:1;-ms-flex:1;flex:1;}
227
- .Item_styles_i0dby2_wa9o46g__158876c7{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--plasma-select-item-gap);min-height:var(--plasma-select-item-height);margin:0;box-sizing:content-box;padding:var(--wa9o46g-0);font-family:var(--plasma-select-font-family);font-size:var(--plasma-select-font-size);font-style:var(--plasma-select-font-style);font-weight:var(--plasma-select-font-weight);-webkit-letter-spacing:var(--plasma-select-font-letter-spacing);-moz-letter-spacing:var(--plasma-select-font-letter-spacing);-ms-letter-spacing:var(--plasma-select-font-letter-spacing);letter-spacing:var(--plasma-select-font-letter-spacing);line-height:var(--plasma-select-font-line-height);background-color:var(--surface-clear);color:var(--text-primary);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-clip:padding-box;position:relative;}.Item_styles_i0dby2_wa9o46g__158876c7:hover:not(.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7){cursor:pointer;background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsActive__158876c7{background-color:var(--plasma-select-item-background-hover);}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsDisabled__158876c7{opacity:var(--plasma-select-item-disabled-opacity);color:var(--plasma-select-item-disabled-color);cursor:not-allowed;}.Item_styles_i0dby2_wa9o46g__158876c7:focus{outline:none;}.Item_styles_i0dby2_wa9o46g__158876c7::before{content:'';position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;display:block;box-sizing:content-box;border:0 solid transparent;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));-webkit-transition:none;transition:none;pointer-events:none;}.Item_styles_i0dby2_wa9o46g__158876c7.Item_styles_i0dby2_dropdownItemIsFocused__158876c7:before{outline:none;box-shadow:inset 0 0 0 0.0625rem var(--surface-accent);}
228
-
229
-
230
- .Item_styles_i0dby2_o1888l7c__158876c7{width:calc(var(--o1888l7c-0) * var(--plasma-select-item-tree-offset-width));-webkit-flex:none;-ms-flex:none;flex:none;margin-right:calc(var(--plasma-select-item-gap) * -1);}
231
-
232
- .TreeList_styles_1t38mek_lm92bs9__3097faae{width:100%;padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
233
- .TreeList_styles_1t38mek_s12qznqt__3097faae{max-height:var(--s12qznqt-0);overflow-x:hidden;overflow-y:auto;border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));}
234
-
235
216
  .Select_styles_dta4dl_lpxbau6__559b5dde{width:var(--lpxbau6-0);padding:calc(var(--plasma-select-padding) + var(--plasma-select-dropdown-border-width,0rem));border-radius:var(--plasma-select-border-radius);box-sizing:border-box;background:var(--surface-solid-card);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04), inset 0 0 0 var(--plasma-select-dropdown-border-width,0rem) var(--plasma-select-dropdown-border-color,transparent);}
236
217
  .Select_styles_dta4dl_u1yey2x3__559b5dde{max-height:var(--u1yey2x3-0);overflow-x:hidden;overflow-y:var(--u1yey2x3-1);border-radius:calc(var(--plasma-select-border-radius) - 0.125rem - var(--plasma-select-dropdown-border-width,0rem));margin:0;padding:0;}
237
218
 
@@ -1,7 +1,28 @@
1
- import { toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
1
+ import { typeof as _typeof, slicedToArray as _slicedToArray, toConsumableArray as _toConsumableArray } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import cls from 'classnames/dedupe';
3
3
  import { classes } from '../Tree.tokens.js';
4
- import { deepCopy } from '../../../utils/deepCopy.js';
4
+
5
+ // Blazing-fast хелпер для глубокого копирования объектов.
6
+ // Ссылки на функции (React-компоненты) сохраняются.
7
+ var deepCopy = function deepCopy(obj) {
8
+ if (obj === null || _typeof(obj) !== 'object') {
9
+ return obj;
10
+ }
11
+ if (Array.isArray(obj)) {
12
+ return obj.map(function (item) {
13
+ return deepCopy(item);
14
+ });
15
+ }
16
+ if (obj.$$typeof === Symbol["for"]('react.element') || obj.$$typeof === Symbol["for"]('react.fragment') || _typeof(obj === null || obj === void 0 ? void 0 : obj.$$typeof) === 'symbol') {
17
+ return obj;
18
+ }
19
+ return Object.fromEntries(Object.entries(obj).map(function (_ref) {
20
+ var _ref2 = _slicedToArray(_ref, 2),
21
+ key = _ref2[0],
22
+ value = _ref2[1];
23
+ return [key, deepCopy(value)];
24
+ }));
25
+ };
5
26
 
6
27
  // Поиск в глубину для обхода узлов дерева.
7
28
  var dfs = function dfs(node, selectedKeys, rootParentsSelected, parents) {