@salutejs/plasma-new-hope 0.230.0-canary.1670.12462995068.0 → 0.231.0-canary.1647.12467637991.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (303) hide show
  1. package/cjs/components/Autocomplete/Autocomplete.css +4 -4
  2. package/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  3. package/cjs/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  4. package/cjs/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +3 -0
  5. package/cjs/components/Breadcrumbs/utils/getShortItems.js +44 -0
  6. package/cjs/components/Breadcrumbs/utils/getShortItems.js.map +1 -0
  7. package/cjs/components/Breadcrumbs/utils/index.js +0 -38
  8. package/cjs/components/Breadcrumbs/utils/index.js.map +1 -1
  9. package/cjs/components/Calendar/utils/getDateWithModification.js.map +1 -1
  10. package/cjs/components/Combobox/ComboboxNew/Combobox.context.js +10 -0
  11. package/cjs/components/Combobox/ComboboxNew/Combobox.context.js.map +1 -0
  12. package/cjs/components/Combobox/ComboboxNew/Combobox.css +4 -4
  13. package/cjs/components/Combobox/ComboboxNew/Combobox.js +2 -3
  14. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  15. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -75
  16. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -112
  17. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +2 -2
  18. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  19. package/cjs/components/Combobox/ComboboxOld/Combobox.css +4 -4
  20. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  21. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  22. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  23. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  24. package/cjs/components/DatePicker/RangeDate/RangeDate.css +4 -4
  25. package/cjs/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +4 -4
  26. package/cjs/components/DatePicker/SingleDate/SingleDate.css +4 -4
  27. package/cjs/components/Dropdown/Dropdown.context.js +10 -0
  28. package/cjs/components/Dropdown/Dropdown.context.js.map +1 -0
  29. package/cjs/components/Dropdown/Dropdown.css +4 -4
  30. package/cjs/components/Dropdown/Dropdown.js +2 -3
  31. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  32. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.css +27 -0
  33. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  34. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  35. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +0 -25
  36. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -2
  37. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  38. package/cjs/components/Dropdown/ui/DropdownOld/DropdownOld.css +4 -4
  39. package/cjs/components/Pagination/Pagination.css +4 -4
  40. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
  41. package/cjs/components/Popover/Popover.css +4 -4
  42. package/cjs/components/Popover/Popover.js +9 -5
  43. package/cjs/components/Popover/Popover.js.map +1 -1
  44. package/cjs/components/Popover/Popover.styles.js +7 -7
  45. package/cjs/components/Popover/Popover.styles.js.map +1 -1
  46. package/{es/components/Popover/Popover.styles_mzmbre.css → cjs/components/Popover/Popover.styles_gh4xvw.css} +2 -2
  47. package/cjs/components/Popover/Popover.tokens.js +2 -1
  48. package/cjs/components/Popover/Popover.tokens.js.map +1 -1
  49. package/cjs/components/Portal/Portal.js +1 -1
  50. package/cjs/components/Portal/Portal.js.map +1 -1
  51. package/cjs/components/Range/Range.css +4 -4
  52. package/cjs/components/Select/Select.context.js +10 -0
  53. package/cjs/components/Select/Select.context.js.map +1 -0
  54. package/cjs/components/Select/Select.css +4 -4
  55. package/cjs/components/Select/Select.js +2 -3
  56. package/cjs/components/Select/Select.js.map +1 -1
  57. package/cjs/components/Select/ui/Inner/Inner.css +0 -109
  58. package/cjs/components/Select/ui/Inner/Inner.js +1 -1
  59. package/cjs/components/Select/ui/Inner/Inner.js.map +1 -1
  60. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +0 -112
  61. package/cjs/components/Select/ui/Inner/ui/Item/Item.js +2 -2
  62. package/cjs/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  63. package/cjs/components/Select/ui/Target/Target.css +4 -4
  64. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +4 -4
  65. package/cjs/components/Slider/Slider.css +4 -4
  66. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +4 -11
  67. package/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  68. package/cjs/components/TextArea/TextArea.js +0 -1
  69. package/cjs/components/TextArea/TextArea.js.map +1 -1
  70. package/cjs/components/TextArea/ui/Hint/Hint.css +4 -4
  71. package/cjs/components/TextField/TextField.js +0 -1
  72. package/cjs/components/TextField/TextField.js.map +1 -1
  73. package/cjs/components/TextField/ui/Hint/Hint.css +4 -4
  74. package/cjs/engines/common.js +0 -36
  75. package/cjs/engines/common.js.map +1 -1
  76. package/cjs/engines/linaria.js +3 -3
  77. package/cjs/engines/linaria.js.map +1 -1
  78. package/cjs/engines/utils.js +40 -0
  79. package/cjs/engines/utils.js.map +1 -0
  80. package/cjs/index.css +4 -4
  81. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  82. package/emotion/cjs/components/Breadcrumbs/utils/getShortItems.js +42 -0
  83. package/emotion/cjs/components/Breadcrumbs/utils/index.js +1 -37
  84. package/emotion/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
  85. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.context.js +8 -0
  86. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -4
  87. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  88. package/emotion/cjs/components/Dropdown/Dropdown.context.js +8 -0
  89. package/emotion/cjs/components/Dropdown/Dropdown.js +3 -4
  90. package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
  91. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  92. package/emotion/cjs/components/Popover/Popover.js +10 -6
  93. package/emotion/cjs/components/Popover/Popover.styles.js +8 -16
  94. package/emotion/cjs/components/Popover/Popover.template-doc.mdx +128 -43
  95. package/emotion/cjs/components/Popover/Popover.tokens.js +2 -1
  96. package/emotion/cjs/components/Portal/Portal.js +1 -1
  97. package/emotion/cjs/components/Select/Select.context.js +8 -0
  98. package/emotion/cjs/components/Select/Select.js +3 -4
  99. package/emotion/cjs/components/Select/ui/Inner/Inner.js +3 -3
  100. package/emotion/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  101. package/emotion/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
  102. package/emotion/cjs/components/TextArea/TextArea.js +1 -2
  103. package/emotion/cjs/components/TextField/TextField.js +1 -2
  104. package/emotion/cjs/engines/common.js +2 -42
  105. package/emotion/cjs/engines/emotion.js +4 -4
  106. package/emotion/cjs/engines/utils.js +42 -0
  107. package/emotion/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  108. package/emotion/es/components/Breadcrumbs/utils/getShortItems.js +35 -0
  109. package/emotion/es/components/Breadcrumbs/utils/index.js +0 -35
  110. package/emotion/es/components/Calendar/utils/getDateWithModification.js +1 -1
  111. package/emotion/es/components/Combobox/ComboboxNew/Combobox.context.js +2 -0
  112. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
  113. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  114. package/emotion/es/components/Dropdown/Dropdown.context.js +2 -0
  115. package/emotion/es/components/Dropdown/Dropdown.js +2 -2
  116. package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  117. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  118. package/emotion/es/components/Popover/Popover.js +11 -7
  119. package/emotion/es/components/Popover/Popover.styles.js +8 -16
  120. package/emotion/es/components/Popover/Popover.template-doc.mdx +128 -43
  121. package/emotion/es/components/Popover/Popover.tokens.js +2 -1
  122. package/emotion/es/components/Portal/Portal.js +1 -1
  123. package/emotion/es/components/Select/Select.context.js +2 -0
  124. package/emotion/es/components/Select/Select.js +2 -2
  125. package/emotion/es/components/Select/ui/Inner/Inner.js +1 -1
  126. package/emotion/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  127. package/emotion/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
  128. package/emotion/es/components/TextArea/TextArea.js +1 -2
  129. package/emotion/es/components/TextField/TextField.js +1 -2
  130. package/emotion/es/engines/common.js +0 -40
  131. package/emotion/es/engines/emotion.js +2 -2
  132. package/emotion/es/engines/utils.js +36 -0
  133. package/es/components/Autocomplete/Autocomplete.css +4 -4
  134. package/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  135. package/es/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  136. package/es/components/Breadcrumbs/ui/BreadcrumbShorter/BreadcrumbShorter.css +3 -0
  137. package/es/components/Breadcrumbs/utils/getShortItems.js +39 -0
  138. package/es/components/Breadcrumbs/utils/getShortItems.js.map +1 -0
  139. package/es/components/Breadcrumbs/utils/index.js +1 -37
  140. package/es/components/Breadcrumbs/utils/index.js.map +1 -1
  141. package/es/components/Calendar/utils/getDateWithModification.js.map +1 -1
  142. package/es/components/Combobox/ComboboxNew/Combobox.context.js +6 -0
  143. package/es/components/Combobox/ComboboxNew/Combobox.context.js.map +1 -0
  144. package/es/components/Combobox/ComboboxNew/Combobox.css +4 -4
  145. package/es/components/Combobox/ComboboxNew/Combobox.js +3 -3
  146. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  147. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -75
  148. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -112
  149. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  150. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  151. package/es/components/Combobox/ComboboxOld/Combobox.css +4 -4
  152. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  153. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  154. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  155. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  156. package/es/components/DatePicker/RangeDate/RangeDate.css +4 -4
  157. package/es/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.css +4 -4
  158. package/es/components/DatePicker/SingleDate/SingleDate.css +4 -4
  159. package/es/components/Dropdown/Dropdown.context.js +6 -0
  160. package/es/components/Dropdown/Dropdown.context.js.map +1 -0
  161. package/es/components/Dropdown/Dropdown.css +4 -4
  162. package/es/components/Dropdown/Dropdown.js +3 -3
  163. package/es/components/Dropdown/Dropdown.js.map +1 -1
  164. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.css +27 -0
  165. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  166. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  167. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +0 -25
  168. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  169. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  170. package/es/components/Dropdown/ui/DropdownOld/DropdownOld.css +4 -4
  171. package/es/components/Pagination/Pagination.css +4 -4
  172. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
  173. package/es/components/Popover/Popover.css +4 -4
  174. package/es/components/Popover/Popover.js +11 -7
  175. package/es/components/Popover/Popover.js.map +1 -1
  176. package/es/components/Popover/Popover.styles.js +7 -7
  177. package/es/components/Popover/Popover.styles.js.map +1 -1
  178. package/{cjs/components/Popover/Popover.styles_mzmbre.css → es/components/Popover/Popover.styles_gh4xvw.css} +2 -2
  179. package/es/components/Popover/Popover.tokens.js +2 -1
  180. package/es/components/Popover/Popover.tokens.js.map +1 -1
  181. package/es/components/Portal/Portal.js +1 -1
  182. package/es/components/Portal/Portal.js.map +1 -1
  183. package/es/components/Range/Range.css +4 -4
  184. package/es/components/Select/Select.context.js +6 -0
  185. package/es/components/Select/Select.context.js.map +1 -0
  186. package/es/components/Select/Select.css +4 -4
  187. package/es/components/Select/Select.js +3 -3
  188. package/es/components/Select/Select.js.map +1 -1
  189. package/es/components/Select/ui/Inner/Inner.css +0 -109
  190. package/es/components/Select/ui/Inner/Inner.js +1 -1
  191. package/es/components/Select/ui/Inner/Inner.js.map +1 -1
  192. package/es/components/Select/ui/Inner/ui/Item/Item.css +0 -112
  193. package/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  194. package/es/components/Select/ui/Inner/ui/Item/Item.js.map +1 -1
  195. package/es/components/Select/ui/Target/Target.css +4 -4
  196. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +4 -4
  197. package/es/components/Slider/Slider.css +4 -4
  198. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.css +4 -11
  199. package/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js.map +1 -1
  200. package/es/components/TextArea/TextArea.js +0 -1
  201. package/es/components/TextArea/TextArea.js.map +1 -1
  202. package/es/components/TextArea/ui/Hint/Hint.css +4 -4
  203. package/es/components/TextField/TextField.js +0 -1
  204. package/es/components/TextField/TextField.js.map +1 -1
  205. package/es/components/TextField/ui/Hint/Hint.css +4 -4
  206. package/es/engines/common.js +2 -36
  207. package/es/engines/common.js.map +1 -1
  208. package/es/engines/linaria.js +1 -1
  209. package/es/engines/linaria.js.map +1 -1
  210. package/es/engines/utils.js +35 -0
  211. package/es/engines/utils.js.map +1 -0
  212. package/es/index.css +4 -4
  213. package/package.json +22 -5
  214. package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.js +2 -1
  215. package/styled-components/cjs/components/Breadcrumbs/utils/getShortItems.js +42 -0
  216. package/styled-components/cjs/components/Breadcrumbs/utils/index.js +1 -37
  217. package/styled-components/cjs/components/Calendar/utils/getDateWithModification.js +3 -3
  218. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.context.js +8 -0
  219. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +3 -4
  220. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  221. package/styled-components/cjs/components/Dropdown/Dropdown.context.js +8 -0
  222. package/styled-components/cjs/components/Dropdown/Dropdown.js +3 -4
  223. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +3 -3
  224. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  225. package/styled-components/cjs/components/Popover/Popover.js +10 -6
  226. package/styled-components/cjs/components/Popover/Popover.styles.js +4 -4
  227. package/styled-components/cjs/components/Popover/Popover.template-doc.mdx +128 -43
  228. package/styled-components/cjs/components/Popover/Popover.tokens.js +2 -1
  229. package/styled-components/cjs/components/Portal/Portal.js +1 -1
  230. package/styled-components/cjs/components/Select/Select.context.js +8 -0
  231. package/styled-components/cjs/components/Select/Select.js +3 -4
  232. package/styled-components/cjs/components/Select/ui/Inner/Inner.js +3 -3
  233. package/styled-components/cjs/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  234. package/styled-components/cjs/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +3 -3
  235. package/styled-components/cjs/components/TextArea/TextArea.js +0 -1
  236. package/styled-components/cjs/components/TextField/TextField.js +0 -1
  237. package/styled-components/cjs/engines/common.js +2 -42
  238. package/styled-components/cjs/engines/styled-components.js +3 -3
  239. package/styled-components/cjs/engines/utils.js +42 -0
  240. package/styled-components/es/components/Breadcrumbs/Breadcrumbs.js +2 -1
  241. package/styled-components/es/components/Breadcrumbs/utils/getShortItems.js +35 -0
  242. package/styled-components/es/components/Breadcrumbs/utils/index.js +0 -35
  243. package/styled-components/es/components/Calendar/utils/getDateWithModification.js +1 -1
  244. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.context.js +2 -0
  245. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +2 -2
  246. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -1
  247. package/styled-components/es/components/Dropdown/Dropdown.context.js +2 -0
  248. package/styled-components/es/components/Dropdown/Dropdown.js +2 -2
  249. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +1 -1
  250. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +1 -1
  251. package/styled-components/es/components/Popover/Popover.js +11 -7
  252. package/styled-components/es/components/Popover/Popover.styles.js +4 -4
  253. package/styled-components/es/components/Popover/Popover.template-doc.mdx +128 -43
  254. package/styled-components/es/components/Popover/Popover.tokens.js +2 -1
  255. package/styled-components/es/components/Portal/Portal.js +1 -1
  256. package/styled-components/es/components/Select/Select.context.js +2 -0
  257. package/styled-components/es/components/Select/Select.js +2 -2
  258. package/styled-components/es/components/Select/ui/Inner/Inner.js +1 -1
  259. package/styled-components/es/components/Select/ui/Inner/ui/Item/Item.js +1 -1
  260. package/styled-components/es/components/Slider/components/DoubleUncontrolled/DoubleUncontrolled.js +1 -1
  261. package/styled-components/es/components/TextArea/TextArea.js +0 -1
  262. package/styled-components/es/components/TextField/TextField.js +0 -1
  263. package/styled-components/es/engines/common.js +0 -40
  264. package/styled-components/es/engines/styled-components.js +1 -1
  265. package/styled-components/es/engines/utils.js +36 -0
  266. package/types/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  267. package/types/components/Breadcrumbs/utils/getShortItems.d.ts +6 -0
  268. package/types/components/Breadcrumbs/utils/getShortItems.d.ts.map +1 -0
  269. package/types/components/Breadcrumbs/utils/index.d.ts +2 -5
  270. package/types/components/Breadcrumbs/utils/index.d.ts.map +1 -1
  271. package/types/components/Calendar/utils/getDateWithModification.d.ts +1 -1
  272. package/types/components/Calendar/utils/getDateWithModification.d.ts.map +1 -1
  273. package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts +4 -0
  274. package/types/components/Combobox/ComboboxNew/Combobox.context.d.ts.map +1 -0
  275. package/types/components/Combobox/ComboboxNew/Combobox.d.ts +1 -2
  276. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  277. package/types/components/Dropdown/Dropdown.context.d.ts +4 -0
  278. package/types/components/Dropdown/Dropdown.context.d.ts.map +1 -0
  279. package/types/components/Dropdown/Dropdown.d.ts +1 -2
  280. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  281. package/types/components/Popover/Popover.d.ts.map +1 -1
  282. package/types/components/Popover/Popover.styles.d.ts +1 -1
  283. package/types/components/Popover/Popover.styles.d.ts.map +1 -1
  284. package/types/components/Popover/Popover.tokens.d.ts +1 -0
  285. package/types/components/Popover/Popover.tokens.d.ts.map +1 -1
  286. package/types/components/Popover/Popover.types.d.ts +4 -4
  287. package/types/components/Popover/Popover.types.d.ts.map +1 -1
  288. package/types/components/Portal/Portal.types.d.ts +1 -1
  289. package/types/components/Portal/Portal.types.d.ts.map +1 -1
  290. package/types/components/Select/Select.context.d.ts +4 -0
  291. package/types/components/Select/Select.context.d.ts.map +1 -0
  292. package/types/components/Select/Select.d.ts +1 -2
  293. package/types/components/Select/Select.d.ts.map +1 -1
  294. package/types/components/TextArea/TextArea.d.ts.map +1 -1
  295. package/types/components/TextField/TextField.d.ts.map +1 -1
  296. package/types/engines/common.d.ts +1 -3
  297. package/types/engines/common.d.ts.map +1 -1
  298. package/types/engines/utils.d.ts +4 -0
  299. package/types/engines/utils.d.ts.map +1 -0
  300. package/cjs/components/Slider/components/Double/Double.css +0 -91
  301. package/es/components/Slider/components/Double/Double.css +0 -91
  302. /package/cjs/components/Breadcrumbs/utils/{index.css → getShortItems.css} +0 -0
  303. /package/es/components/Breadcrumbs/utils/{index.css → getShortItems.css} +0 -0
@@ -4,51 +4,136 @@ title: Popover
4
4
  ---
5
5
 
6
6
  import { PropsTable, Description } from '@site/src/components';
7
+ import Tabs from '@theme/Tabs';
8
+ import TabItem from '@theme/TabItem';
7
9
 
8
10
  # Popover
9
11
  <Description name="Popover" />
10
12
  <PropsTable name="Popover" />
11
13
 
12
- ```tsx live
13
- import React from 'react';
14
- import styled from "styled-components";
15
- import { surfaceSolidTertiary } from "@salutejs/{{ vertical }}/tokens";
16
- import { Popover, Button } from '@salutejs/{{ package }}';
17
-
18
- export function App() {
19
- const [isOpen, setIsOpen] = React.useState(false);
20
-
21
- const StyledContent = styled.div`
22
- background: ${surfaceSolidTertiary};
23
- padding: 1rem;
24
-
25
- display: flex;
26
- flex-direction: column;
27
- align-items: center;
28
- `;
29
-
30
- return (
31
- <section style=\{{width: '20rem', height: '15rem'}}>
32
- <Popover
33
- opened={isOpen}
34
- onToggle={(is) => setIsOpen(is)}
35
- role="presentation"
36
- id="popover"
37
- target={<Button>Target</Button>}
38
- offset={[0, 6]}
39
- hasArrow
40
- placement='bottom'
41
- trigger='click'
42
- closeOnOverlayClick
43
- closeOnEsc
44
- isFocusTrapped
45
- >
46
- <StyledContent>
47
- <>Content</>
48
- <Button onClick={() => setIsOpen(false)}>close</Button>
49
- </StyledContent>
50
- </Popover>
51
- </section>
52
- );
53
- }
54
- ```
14
+ :::info
15
+ `target` может быть как ReactNode, так и RefObject:
16
+ :::
17
+
18
+ <Tabs>
19
+ <TabItem value="reactNode" label="React Node" default>
20
+ ```tsx live
21
+ import React from 'react';
22
+ import styled from "styled-components";
23
+ import { surfaceSolidTertiary } from "@salutejs/{{ vertical }}/tokens";
24
+ import { Popover, Button } from '@salutejs/{{ package }}';
25
+
26
+ export function App() {
27
+ const [isOpen, setIsOpen] = React.useState(false);
28
+
29
+ const StyledContent = styled.div`
30
+ background: ${surfaceSolidTertiary};
31
+ padding: 1rem;
32
+
33
+ display: flex;
34
+ flex-direction: column;
35
+ align-items: center;
36
+ `;
37
+
38
+ return (
39
+ <section style=\{{width: '20rem', height: '15rem'}}>
40
+ <Popover
41
+ opened={isOpen}
42
+ onToggle={(is) => setIsOpen(is)}
43
+ role="presentation"
44
+ id="popover"
45
+ target={<Button>Target</Button>}
46
+ offset={[0, 6]}
47
+ placement='bottom'
48
+ trigger='click'
49
+ hasArrow
50
+ closeOnOverlayClick
51
+ closeOnEsc
52
+ isFocusTrapped
53
+ >
54
+ <StyledContent>
55
+ <>Content</>
56
+ <Button onClick={() => setIsOpen(false)}>close</Button>
57
+ </StyledContent>
58
+ </Popover>
59
+ </section>
60
+ );
61
+ }
62
+ ```
63
+ </TabItem>
64
+ <TabItem value="refObject" label="RefObject">
65
+ ```tsx live
66
+ import React, { useRef, useState } from 'react';
67
+ import styled from "styled-components";
68
+ import { surfaceSolidTertiary } from "@salutejs/{{ vertical }}/tokens";
69
+ import { Popover, Button } from '@salutejs/{{ package }}';
70
+
71
+ export function App() {
72
+ const [isOpen, setIsOpen] = useState(false);
73
+
74
+ const targetRef = useRef<HTMLButtonElement | null>(null);
75
+ const targetRef2 = useRef<HTMLButtonElement | null>(null);
76
+ const targetRef3 = useRef<HTMLButtonElement | null>(null);
77
+
78
+ const refs = [targetRef, targetRef2, targetRef3];
79
+
80
+ const [currRefIndex, setCurrentRefIndex] = useState(0);
81
+ const [currentRef, setCurrentRef] = useState(targetRef);
82
+
83
+ const changeRef = () => {
84
+ let ind = currRefIndex + 1;
85
+
86
+ if (ind > refs.length - 1) {
87
+ setCurrentRefIndex(0);
88
+ ind = 0;
89
+ }
90
+
91
+ setCurrentRefIndex(ind);
92
+ setCurrentRef(refs[ind]);
93
+ };
94
+
95
+ const StyledContent = styled.div`
96
+ background: ${surfaceSolidTertiary};
97
+ padding: 1rem;
98
+
99
+ display: flex;
100
+ flex-direction: column;
101
+ align-items: center;
102
+ `;
103
+
104
+ return (
105
+ <>
106
+ <Button ref={targetRef}>Target 0</Button>
107
+ <Button style=\{{ margin: '0 5rem' }} onClick={changeRef}>
108
+ Change targetAsRef to Target {currRefIndex + 1 > refs.length - 1 ? 0 : currRefIndex + 1}
109
+ </Button>
110
+ <Button ref={targetRef2}>Target 1</Button>
111
+ <Popover
112
+ opened={isOpen}
113
+ onToggle={(is) => setIsOpen(is)}
114
+ role="presentation"
115
+ id="popover"
116
+ target={currentRef}
117
+ offset={[0, 6]}
118
+ placement='bottom'
119
+ trigger='click'
120
+ hasArrow
121
+ closeOnOverlayClick
122
+ closeOnEsc
123
+ isFocusTrapped
124
+ >
125
+ <StyledContent>
126
+ <>Content</>
127
+ <Button onClick={() => setIsOpen(false)}>Close</Button>
128
+ </StyledContent>
129
+ </Popover>
130
+
131
+ <div style=\{{ padding: '5rem' }}>Current Target: {currRefIndex}</div>
132
+ <Button ref={targetRef3}>Target 2</Button>
133
+ </>
134
+ );
135
+ }
136
+ ```
137
+ </TabItem>
138
+ </Tabs>
139
+
@@ -8,7 +8,8 @@ var classes = exports.classes = {
8
8
  wrapper: 'popover-wrapper',
9
9
  root: 'popover-root',
10
10
  target: 'popover-target',
11
- arrow: 'popover-arrow'
11
+ arrow: 'popover-arrow',
12
+ targetAsRef: 'popover-target-as-ref'
12
13
  };
13
14
  var tokens = exports.tokens = {
14
15
  arrowMaskWidth: '--plasma-popover-arrow-mask-width',
@@ -21,5 +21,5 @@ var Portal = exports.Portal = function Portal(_ref) {
21
21
  return null;
22
22
  }
23
23
  var portalContainer = typeof container === 'function' ? container() : container;
24
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, disabled && children, !disabled && /*#__PURE__*/_reactDom["default"].createPortal(children, portalContainer));
24
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, (disabled || !portalContainer) && children, !disabled && portalContainer && /*#__PURE__*/_reactDom["default"].createPortal(children, portalContainer));
25
25
  };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Context = void 0;
7
+ var _react = /*#__PURE__*/require("react");
8
+ var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.selectRoot = exports.selectConfig = exports.Context = void 0;
6
+ exports.selectRoot = exports.selectConfig = void 0;
7
7
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
8
8
  var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
9
9
  var _utils = /*#__PURE__*/require("../../utils");
@@ -16,6 +16,7 @@ var _usePathMaps3 = /*#__PURE__*/require("./hooks/usePathMaps");
16
16
  var _Select = /*#__PURE__*/require("./Select.styles");
17
17
  var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
18
18
  var _SelectNative = /*#__PURE__*/require("./ui/SelectNative/SelectNative");
19
+ var _Select2 = /*#__PURE__*/require("./Select.context");
19
20
  var _excluded = ["value", "onChange", "target", "items", "placement", "label", "labelPlacement", "placeholder", "helperText", "disabled", "view", "size", "listOverflow", "listHeight", "listWidth", "contentLeft", "onScrollBottom", "chipView", "variant", "portal", "renderValue", "renderItem", "status", "onItemSelect", "separator", "closeAfterSelect", "isTargetAmount", "beforeList", "afterList", "zIndex", "name", "defaultValue"];
20
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -29,8 +30,6 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
29
30
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
30
31
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
31
32
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
32
- var Context = exports.Context = /*#__PURE__*/(0, _react.createContext)({});
33
-
34
33
  /**
35
34
  * Выпадающий список. Поддерживает выбор одного или нескольких значений.
36
35
  */
@@ -309,7 +308,7 @@ var selectRoot = exports.selectRoot = function selectRoot(Root) {
309
308
  onChange: onChange,
310
309
  onSetValue: setInternalValue,
311
310
  ref: ref
312
- }), /*#__PURE__*/_react["default"].createElement(Context.Provider, {
311
+ }), /*#__PURE__*/_react["default"].createElement(_Select2.Context.Provider, {
313
312
  value: {
314
313
  focusedPath: focusedPath,
315
314
  checked: checked,
@@ -9,7 +9,7 @@ var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
9
9
  var _utils = /*#__PURE__*/require("../../../../utils");
10
10
  var _Select = /*#__PURE__*/require("../../Select.styles");
11
11
  var _FloatingPopover = /*#__PURE__*/require("../../FloatingPopover");
12
- var _ui = /*#__PURE__*/require("./ui");
12
+ var _Item = /*#__PURE__*/require("./ui/Item/Item");
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
14
  var Inner = exports.Inner = function Inner(_ref) {
15
15
  var item = _ref.item,
@@ -43,7 +43,7 @@ var Inner = exports.Inner = function Inner(_ref) {
43
43
  opened: isCurrentListOpen,
44
44
  onToggle: handleToggle,
45
45
  offset: 2,
46
- target: /*#__PURE__*/_react["default"].createElement(_ui.Item, {
46
+ target: /*#__PURE__*/_react["default"].createElement(_Item.Item, {
47
47
  item: item,
48
48
  path: path,
49
49
  currentLevel: currentLevel,
@@ -70,7 +70,7 @@ var Inner = exports.Inner = function Inner(_ref) {
70
70
  });
71
71
  })));
72
72
  }
73
- return /*#__PURE__*/_react["default"].createElement(_ui.Item, {
73
+ return /*#__PURE__*/_react["default"].createElement(_Item.Item, {
74
74
  item: item,
75
75
  path: path,
76
76
  index: index,
@@ -10,7 +10,7 @@ var _utils = /*#__PURE__*/require("../../../../utils");
10
10
  var _Select = /*#__PURE__*/require("../../../../Select.tokens");
11
11
  var _utils2 = /*#__PURE__*/require("../../../../../../utils");
12
12
  var _Icon = /*#__PURE__*/require("../../../../../_Icon");
13
- var _Select2 = /*#__PURE__*/require("../../../../Select");
13
+ var _Select2 = /*#__PURE__*/require("../../../../Select.context");
14
14
  var _hooks = /*#__PURE__*/require("../../../../../../hooks");
15
15
  var _Item = /*#__PURE__*/require("./Item.styles");
16
16
  var _StyledIndicator;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.DoubleUncontrolled = void 0;
8
8
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
9
- var _index = /*#__PURE__*/require("../index");
9
+ var _Double = /*#__PURE__*/require("../Double/Double");
10
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
12
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -90,10 +90,10 @@ var DoubleUncontrolled = exports.DoubleUncontrolled = function DoubleUncontrolle
90
90
  setSliderValue(sortValue);
91
91
  }
92
92
  }, [name, value, onChange, sortValues]);
93
- return value ? /*#__PURE__*/_react["default"].createElement(_index.DoubleSlider, _extends({}, props, {
93
+ return value ? /*#__PURE__*/_react["default"].createElement(_Double.DoubleSlider, _extends({}, props, {
94
94
  value: value,
95
95
  onChange: onChange
96
- })) : /*#__PURE__*/_react["default"].createElement(_index.DoubleSlider, _extends({
96
+ })) : /*#__PURE__*/_react["default"].createElement(_Double.DoubleSlider, _extends({
97
97
  value: sliderValue,
98
98
  onKeyDownTextField: onKeyDownTextField,
99
99
  onBlurTextField: onBlurTextField,
@@ -310,7 +310,6 @@ var textAreaRoot = exports.textAreaRoot = function textAreaRoot(Root) {
310
310
  applyCustomWidth: applyCustomWidth,
311
311
  ref: (0, _utils.mergeRefs)(outerRef, innerRef),
312
312
  disabled: disabled,
313
- required: required,
314
313
  height: applyAutoResize ? minAuto : height,
315
314
  width: width,
316
315
  placeholder: placeholderLabel,
@@ -398,7 +398,6 @@ var textFieldRoot = exports.textFieldRoot = function textFieldRoot(Root) {
398
398
  ref: inputForkRef,
399
399
  id: innerId,
400
400
  value: outerValue,
401
- required: required,
402
401
  "aria-labelledby": labelId,
403
402
  "aria-describedby": helperTextId,
404
403
  placeholder: innerPlaceholderValue,
@@ -1,60 +1,20 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.component = component;
8
- exports.mergeConfig = exports.getStaticVariants = exports.getDynamicVariants = void 0;
7
+ exports.mergeConfig = void 0;
9
8
  var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
10
9
  var _styledComponents = /*#__PURE__*/require("./styled-components");
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
12
12
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
15
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
16
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
17
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
18
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
19
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
20
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
21
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
22
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
23
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
24
- //
25
- // Тип HTMLAttributesOmitOnChange требуется чтобы использовать компонент с кастомным пропсом onChange
26
- //
27
-
28
- var getStaticVariants = exports.getStaticVariants = function getStaticVariants(config) {
29
- if (!config.variations) {
30
- return [];
31
- }
32
- var res = [];
33
- var variations = config.variations;
34
-
35
- // eslint-disable-next-line guard-for-in
36
- for (var key in variations) {
37
- var css = variations[key].css;
38
- css && res.push(css);
39
- }
40
- return res;
41
- };
42
- var getDynamicVariants = exports.getDynamicVariants = function getDynamicVariants(config) {
43
- return function (props) {
44
- var res = [];
45
-
46
- // eslint-disable-next-line guard-for-in
47
- for (var key in config.variations) {
48
- if (key in props) {
49
- var variant = config.variations[key];
50
- var css = variant[props[key]];
51
- // no css for { modifier: true }
52
- css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
53
- }
54
- }
55
- return res;
56
- };
57
- };
58
18
  var mergeConfig = exports.mergeConfig = function mergeConfig(baseConfig, userConfig) {
59
19
  var res = _objectSpread(_objectSpread({}, baseConfig), userConfig);
60
20
  if (res.variations) {
@@ -19,7 +19,7 @@ Object.defineProperty(exports, "styled", {
19
19
  });
20
20
  var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react"));
21
21
  var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("styled-components"));
22
- var _common = /*#__PURE__*/require("./common");
22
+ var _utils = /*#__PURE__*/require("./utils");
23
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
24
24
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
25
25
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
@@ -40,8 +40,8 @@ var Root = /*#__PURE__*/_styledComponents["default"].div.withConfig({
40
40
  var _component = exports._component = function _component(componentConfig) {
41
41
  var tag = componentConfig.tag,
42
42
  base = componentConfig.base;
43
- var staticVariants = (0, _common.getStaticVariants)(componentConfig);
44
- var dynamicVariants = (0, _common.getDynamicVariants)(componentConfig);
43
+ var staticVariants = (0, _utils.getStaticVariants)(componentConfig);
44
+ var dynamicVariants = (0, _utils.getDynamicVariants)(componentConfig);
45
45
  return /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
46
46
  return /*#__PURE__*/_react["default"].createElement(Root, _extends({
47
47
  as: tag,
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getStaticVariants = exports.getDynamicVariants = void 0;
7
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
+ var getStaticVariants = exports.getStaticVariants = function getStaticVariants(config) {
14
+ if (!config.variations) {
15
+ return [];
16
+ }
17
+ var res = [];
18
+ var variations = config.variations;
19
+
20
+ // eslint-disable-next-line guard-for-in
21
+ for (var key in variations) {
22
+ var css = variations[key].css;
23
+ css && res.push(css);
24
+ }
25
+ return res;
26
+ };
27
+ var getDynamicVariants = exports.getDynamicVariants = function getDynamicVariants(config) {
28
+ return function (props) {
29
+ var res = [];
30
+
31
+ // eslint-disable-next-line guard-for-in
32
+ for (var key in config.variations) {
33
+ if (key in props) {
34
+ var variant = config.variations[key];
35
+ var css = variant[props[key]];
36
+ // no css for { modifier: true }
37
+ css && Array.isArray(css) ? res.push.apply(res, _toConsumableArray(css)) : res.push(css);
38
+ }
39
+ }
40
+ return res;
41
+ };
42
+ };
@@ -3,7 +3,8 @@ import { cx } from '../../utils';
3
3
  import { base as sizeCSS } from './variations/_size/base';
4
4
  import { base as viewCSS } from './variations/_view/base';
5
5
  import { base, Separator } from './Breadcrumbs.styles';
6
- import { addSeparator, convertIconSize, getRenderItems } from './utils';
6
+ import { addSeparator, convertIconSize } from './utils';
7
+ import { getRenderItems } from './utils/getShortItems';
7
8
  export var breadcrumbsRoot = function breadcrumbsRoot(Root) {
8
9
  return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
9
10
  var view = _ref.view,
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { BreadcrumbShorter } from '../ui/BreadcrumbShorter/BreadcrumbShorter';
3
+ import { StyledLink } from '../Breadcrumbs.styles';
4
+ export var shortItems = function shortItems(items, renderSeparator, showItems) {
5
+ if (!showItems || showItems < 2 || items.length <= showItems) {
6
+ return items;
7
+ }
8
+ var leftSlice = Math.floor(showItems / 2);
9
+ var rightSlice = items.length - leftSlice - showItems % 2;
10
+ var renderItems = items.slice(leftSlice, rightSlice);
11
+ var shorter = /*#__PURE__*/React.createElement(BreadcrumbShorter, {
12
+ separator: renderSeparator
13
+ }, renderItems);
14
+ items.splice(leftSlice, rightSlice - leftSlice, shorter);
15
+ return items;
16
+ };
17
+ export var getRenderItems = function getRenderItems(items, renderSeparator, showItems) {
18
+ var renderItems = shortItems(items.map(function (item) {
19
+ if (item.renderItem) {
20
+ return item.renderItem();
21
+ }
22
+ var title = item.title,
23
+ disabled = item.disabled,
24
+ href = item.href,
25
+ onClick = item.onClick;
26
+ return /*#__PURE__*/React.createElement(StyledLink, {
27
+ tabIndex: 0,
28
+ href: href,
29
+ disabled: disabled,
30
+ onClick: onClick,
31
+ isHref: Boolean(href || onClick)
32
+ }, title);
33
+ }), renderSeparator, showItems);
34
+ return renderItems;
35
+ };
@@ -1,19 +1,3 @@
1
- import React from 'react';
2
- import { BreadcrumbShorter } from '../ui/BreadcrumbShorter/BreadcrumbShorter';
3
- import { StyledLink } from '../Breadcrumbs.styles';
4
- export var shortItems = function shortItems(items, renderSeparator, showItems) {
5
- if (!showItems || showItems < 2 || items.length <= showItems) {
6
- return items;
7
- }
8
- var leftSlice = Math.floor(showItems / 2);
9
- var rightSlice = items.length - leftSlice - showItems % 2;
10
- var renderItems = items.slice(leftSlice, rightSlice);
11
- var shorter = /*#__PURE__*/React.createElement(BreadcrumbShorter, {
12
- separator: renderSeparator
13
- }, renderItems);
14
- items.splice(leftSlice, rightSlice - leftSlice, shorter);
15
- return items;
16
- };
17
1
  export var convertIconSize = function convertIconSize(size) {
18
2
  switch (size) {
19
3
  case 's':
@@ -23,25 +7,6 @@ export var convertIconSize = function convertIconSize(size) {
23
7
  return 's';
24
8
  }
25
9
  };
26
- export var getRenderItems = function getRenderItems(items, renderSeparator, showItems) {
27
- var renderItems = shortItems(items.map(function (item) {
28
- if (item.renderItem) {
29
- return item.renderItem();
30
- }
31
- var title = item.title,
32
- disabled = item.disabled,
33
- href = item.href,
34
- onClick = item.onClick;
35
- return /*#__PURE__*/React.createElement(StyledLink, {
36
- tabIndex: 0,
37
- href: href,
38
- disabled: disabled,
39
- onClick: onClick,
40
- isHref: Boolean(href || onClick)
41
- }, title);
42
- }), renderSeparator, showItems);
43
- return renderItems;
44
- };
45
10
  export var addSeparator = function addSeparator(items, renderSeparator) {
46
11
  return items.flatMap(function (item, idx) {
47
12
  return idx < items.length - 1 ? [item, renderSeparator] : [item];
@@ -1,5 +1,5 @@
1
1
  import { CalendarState } from '../store/types';
2
- import { getPropsMap } from '.';
2
+ import { getPropsMap } from './calendarGridHelper';
3
3
  var dateOperationHandler = {
4
4
  Days: {
5
5
  add: function add(date) {
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'react';
2
+ export var Context = /*#__PURE__*/createContext({});
@@ -13,7 +13,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
13
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
14
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
15
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
16
- import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';
16
+ import React, { forwardRef, useState, useReducer, useMemo, useLayoutEffect, useRef } from 'react';
17
17
  import { safeUseId, useForkRef } from '@salutejs/plasma-core';
18
18
  import { isEmpty } from '../../../utils';
19
19
  import { useOutsideClick } from '../../../hooks';
@@ -29,7 +29,7 @@ import { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Com
29
29
  import { base as viewCSS } from './variations/_view/base';
30
30
  import { base as sizeCSS } from './variations/_size/base';
31
31
  import { SelectNative } from './ui/SelectNative/SelectNative';
32
- export var Context = /*#__PURE__*/createContext({});
32
+ import { Context } from './Combobox.context';
33
33
 
34
34
  /**
35
35
  * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
@@ -8,7 +8,7 @@ import { sizeToIconSize, getItemId } from '../../../../utils';
8
8
  import { classes } from '../../../../Combobox.tokens';
9
9
  import { cx, isEmpty } from '../../../../../../../utils';
10
10
  import { IconDisclosureRightCentered, IconDone } from '../../../../../../_Icon';
11
- import { Context } from '../../../../Combobox';
11
+ import { Context } from '../../../../Combobox.context';
12
12
  import { useDidMountEffect } from '../../../../../../../hooks';
13
13
  import { StyledWrapper, StyledText, Wrapper, DisclosureIconWrapper, StyledCheckbox, IconWrapper, StyledIndicator, StyledCheckboxWrapper, StyledCell } from './Item.styles';
14
14
  export var Item = function Item(_ref) {
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'react';
2
+ export var Context = /*#__PURE__*/createContext({});
@@ -8,7 +8,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
8
8
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import React, { createContext, forwardRef, useReducer, useRef } from 'react';
11
+ import React, { forwardRef, useReducer, useRef } from 'react';
12
12
  import { safeUseId } from '@salutejs/plasma-core';
13
13
  import { cx } from '../../utils';
14
14
  import { useOutsideClick } from '../../hooks';
@@ -23,7 +23,7 @@ import { classes } from './Dropdown.tokens';
23
23
  import { useKeyNavigation } from './hooks/useKeyboardNavigation';
24
24
  import { useHashMaps } from './hooks/useHashMaps';
25
25
  import { FloatingPopover } from './FloatingPopover';
26
- export var Context = /*#__PURE__*/createContext({});
26
+ import { Context } from './Dropdown.context';
27
27
 
28
28
  /**
29
29
  * Выпадающий список.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { safeUseId } from '@salutejs/plasma-core';
3
- import { DropdownItem } from '..';
3
+ import { DropdownItem } from '../DropdownItem/DropdownItem';
4
4
  import { Ul } from '../../Dropdown.styles';
5
5
  import { FloatingPopover } from '../../FloatingPopover';
6
6
  var DropdownInner = function DropdownInner(_ref) {