@salutejs/plasma-new-hope 0.76.2-canary.1184.8705168480.0 → 0.76.2-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (411) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +1 -1
  2. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  3. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  4. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  5. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  6. package/cjs/components/Calendar/hoc/withRange.js +1 -1
  7. package/cjs/components/Calendar/hoc/withRange.js.map +1 -1
  8. package/cjs/components/Calendar/hooks/useKeyNavigation.js +19 -19
  9. package/cjs/components/Calendar/hooks/useKeyNavigation.js.map +1 -1
  10. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
  11. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  12. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
  13. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  14. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  15. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  16. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  17. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  18. package/cjs/components/Chip/Chip.css +2 -0
  19. package/cjs/components/Chip/Chip.js +16 -4
  20. package/cjs/components/Chip/Chip.js.map +1 -1
  21. package/cjs/components/Chip/Chip.tokens.js +5 -0
  22. package/cjs/components/Chip/Chip.tokens.js.map +1 -1
  23. package/cjs/components/Chip/variations/_pilled/base.js +9 -0
  24. package/cjs/components/Chip/variations/_pilled/base.js.map +1 -0
  25. package/cjs/components/Chip/variations/_pilled/base_3kce4h.css +1 -0
  26. package/cjs/components/Combobox/Combobox.css +2 -0
  27. package/cjs/components/Combobox/Combobox.js +5 -5
  28. package/cjs/components/Combobox/Combobox.js.map +1 -1
  29. package/cjs/components/Combobox/hooks/useFocusController.js +9 -9
  30. package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
  31. package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.css +2 -0
  32. package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
  33. package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js.map +1 -1
  34. package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.css +2 -0
  35. package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
  36. package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js.map +1 -1
  37. package/cjs/components/Drawer/DrawerContext.js +1 -1
  38. package/cjs/components/Drawer/DrawerContext.js.map +1 -1
  39. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -2
  40. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  41. package/cjs/components/Modal/ModalContext.js +1 -1
  42. package/cjs/components/Modal/ModalContext.js.map +1 -1
  43. package/cjs/components/Overlay/Overlay.js +1 -1
  44. package/cjs/components/Overlay/Overlay.js.map +1 -1
  45. package/cjs/components/Pagination/Pagination.css +2 -0
  46. package/cjs/components/Pagination/Pagination.js +2 -2
  47. package/cjs/components/Pagination/Pagination.js.map +1 -1
  48. package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
  49. package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map +1 -1
  50. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -0
  51. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
  52. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
  53. package/cjs/components/Popover/Popover.js +7 -7
  54. package/cjs/components/Popover/Popover.js.map +1 -1
  55. package/cjs/components/Popup/Popup.js +1 -1
  56. package/cjs/components/Popup/Popup.js.map +1 -1
  57. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
  58. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
  59. package/cjs/components/Select/Select.css +2 -0
  60. package/cjs/components/Select/Select.js +5 -5
  61. package/cjs/components/Select/Select.js.map +1 -1
  62. package/cjs/components/Select/hooks/useKeyNavigation.js +12 -12
  63. package/cjs/components/Select/hooks/useKeyNavigation.js.map +1 -1
  64. package/cjs/components/Select/ui/SelectChip/SelectChip.css +2 -0
  65. package/cjs/components/Select/ui/SelectChip/SelectChip.js +1 -1
  66. package/cjs/components/Select/ui/SelectChip/SelectChip.js.map +1 -1
  67. package/cjs/components/Select/ui/SelectTarget/SelectTarget.css +2 -0
  68. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
  69. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  70. package/cjs/components/Select/utils/index.js +2 -2
  71. package/cjs/components/Select/utils/index.js.map +1 -1
  72. package/cjs/components/Tabs/TabsContext.js +2 -1
  73. package/cjs/components/Tabs/TabsContext.js.map +1 -1
  74. package/cjs/components/Tabs/ui/TabItem/TabItem.js +1 -1
  75. package/cjs/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
  76. package/cjs/components/Tabs/ui/Tabs/Tabs.js +2 -2
  77. package/cjs/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
  78. package/cjs/components/TextArea/TextArea.js +1 -1
  79. package/cjs/components/TextArea/TextArea.js.map +1 -1
  80. package/cjs/components/TextField/TextField.js +2 -2
  81. package/cjs/components/TextField/TextField.js.map +1 -1
  82. package/cjs/components/TextField/hooks/useKeyNavigation.js +9 -9
  83. package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -1
  84. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.css +2 -0
  85. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
  86. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  87. package/cjs/components/Toast/ToastProvider/ToastProvider.js +2 -2
  88. package/cjs/components/Toast/ToastProvider/ToastProvider.js.map +1 -1
  89. package/cjs/components/Tooltip/Tooltip.js +1 -1
  90. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  91. package/cjs/index.css +2 -0
  92. package/es/_virtual/_rollupPluginBabelHelpers.js +1 -1
  93. package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  94. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  95. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  96. package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  97. package/es/components/Calendar/hoc/withRange.js +1 -1
  98. package/es/components/Calendar/hoc/withRange.js.map +1 -1
  99. package/es/components/Calendar/hooks/useKeyNavigation.js +19 -19
  100. package/es/components/Calendar/hooks/useKeyNavigation.js.map +1 -1
  101. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
  102. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  103. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
  104. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  105. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  106. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  107. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  108. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  109. package/es/components/Chip/Chip.css +2 -0
  110. package/es/components/Chip/Chip.js +17 -5
  111. package/es/components/Chip/Chip.js.map +1 -1
  112. package/es/components/Chip/Chip.tokens.js +5 -1
  113. package/es/components/Chip/Chip.tokens.js.map +1 -1
  114. package/es/components/Chip/variations/_pilled/base.js +5 -0
  115. package/es/components/Chip/variations/_pilled/base.js.map +1 -0
  116. package/es/components/Chip/variations/_pilled/base_3kce4h.css +1 -0
  117. package/es/components/Combobox/Combobox.css +2 -0
  118. package/es/components/Combobox/Combobox.js +5 -5
  119. package/es/components/Combobox/Combobox.js.map +1 -1
  120. package/es/components/Combobox/hooks/useFocusController.js +9 -9
  121. package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
  122. package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.css +2 -0
  123. package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
  124. package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js.map +1 -1
  125. package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.css +2 -0
  126. package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
  127. package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js.map +1 -1
  128. package/es/components/Drawer/DrawerContext.js +1 -1
  129. package/es/components/Drawer/DrawerContext.js.map +1 -1
  130. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +2 -2
  131. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  132. package/es/components/Modal/ModalContext.js +1 -1
  133. package/es/components/Modal/ModalContext.js.map +1 -1
  134. package/es/components/Overlay/Overlay.js +1 -1
  135. package/es/components/Overlay/Overlay.js.map +1 -1
  136. package/es/components/Pagination/Pagination.css +2 -0
  137. package/es/components/Pagination/Pagination.js +2 -2
  138. package/es/components/Pagination/Pagination.js.map +1 -1
  139. package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
  140. package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map +1 -1
  141. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -0
  142. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
  143. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
  144. package/es/components/Popover/Popover.js +7 -7
  145. package/es/components/Popover/Popover.js.map +1 -1
  146. package/es/components/Popup/Popup.js +1 -1
  147. package/es/components/Popup/Popup.js.map +1 -1
  148. package/es/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
  149. package/es/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
  150. package/es/components/Select/Select.css +2 -0
  151. package/es/components/Select/Select.js +5 -5
  152. package/es/components/Select/Select.js.map +1 -1
  153. package/es/components/Select/hooks/useKeyNavigation.js +12 -12
  154. package/es/components/Select/hooks/useKeyNavigation.js.map +1 -1
  155. package/es/components/Select/ui/SelectChip/SelectChip.css +2 -0
  156. package/es/components/Select/ui/SelectChip/SelectChip.js +1 -1
  157. package/es/components/Select/ui/SelectChip/SelectChip.js.map +1 -1
  158. package/es/components/Select/ui/SelectTarget/SelectTarget.css +2 -0
  159. package/es/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
  160. package/es/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  161. package/es/components/Select/utils/index.js +2 -2
  162. package/es/components/Select/utils/index.js.map +1 -1
  163. package/es/components/Tabs/TabsContext.js +2 -1
  164. package/es/components/Tabs/TabsContext.js.map +1 -1
  165. package/es/components/Tabs/ui/TabItem/TabItem.js +1 -1
  166. package/es/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
  167. package/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
  168. package/es/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
  169. package/es/components/TextArea/TextArea.js +1 -1
  170. package/es/components/TextArea/TextArea.js.map +1 -1
  171. package/es/components/TextField/TextField.js +2 -2
  172. package/es/components/TextField/TextField.js.map +1 -1
  173. package/es/components/TextField/hooks/useKeyNavigation.js +9 -9
  174. package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -1
  175. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.css +2 -0
  176. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
  177. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  178. package/es/components/Toast/ToastProvider/ToastProvider.js +2 -2
  179. package/es/components/Toast/ToastProvider/ToastProvider.js.map +1 -1
  180. package/es/components/Tooltip/Tooltip.js +1 -1
  181. package/es/components/Tooltip/Tooltip.js.map +1 -1
  182. package/es/index.css +2 -0
  183. package/package.json +10 -10
  184. package/styled-components/cjs/components/Avatar/Avatar.js +1 -1
  185. package/styled-components/cjs/components/Avatar/Avatar.styles.js +1 -1
  186. package/styled-components/cjs/components/AvatarGroup/AvatarGroup.js +1 -1
  187. package/styled-components/cjs/components/Badge/Badge.js +1 -1
  188. package/styled-components/cjs/components/Badge/Badge.styles.js +1 -1
  189. package/styled-components/cjs/components/Button/Button.js +2 -2
  190. package/styled-components/cjs/components/Button/Button.styles.js +1 -1
  191. package/styled-components/cjs/components/ButtonGroup/ButtonGroup.js +1 -1
  192. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -2
  193. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
  194. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -2
  195. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +1 -1
  196. package/styled-components/cjs/components/Calendar/hoc/withRange.js +2 -2
  197. package/styled-components/cjs/components/Calendar/hooks/useKeyNavigation.js +20 -20
  198. package/styled-components/cjs/components/Calendar/store/reducer.js +1 -1
  199. package/styled-components/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.js +1 -1
  200. package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
  201. package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +3 -3
  202. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -2
  203. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -2
  204. package/styled-components/cjs/components/Cell/Cell.js +1 -1
  205. package/styled-components/cjs/components/Cell/Cell.styles.js +1 -1
  206. package/styled-components/cjs/components/Checkbox/Checkbox.js +1 -1
  207. package/styled-components/cjs/components/Chip/Chip.js +17 -5
  208. package/styled-components/cjs/components/Chip/Chip.styles.js +1 -1
  209. package/styled-components/cjs/components/Chip/Chip.template-doc.mdx +2 -2
  210. package/styled-components/cjs/components/Chip/Chip.tokens.js +5 -1
  211. package/styled-components/cjs/components/Chip/variations/_pilled/base.js +9 -0
  212. package/styled-components/cjs/components/Chip/variations/_pilled/tokens.json +4 -0
  213. package/styled-components/cjs/components/Combobox/Combobox.js +6 -6
  214. package/styled-components/cjs/components/Combobox/hooks/useFocusController.js +9 -9
  215. package/styled-components/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js +2 -2
  216. package/styled-components/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +7 -7
  217. package/styled-components/cjs/components/Counter/Counter.js +1 -1
  218. package/styled-components/cjs/components/Divider/Divider.js +2 -2
  219. package/styled-components/cjs/components/Drawer/Drawer.js +1 -1
  220. package/styled-components/cjs/components/Drawer/DrawerContext.js +1 -1
  221. package/styled-components/cjs/components/Drawer/hooks/useDrawer.js +1 -1
  222. package/styled-components/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +1 -1
  223. package/styled-components/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +1 -1
  224. package/styled-components/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +1 -1
  225. package/styled-components/cjs/components/Dropdown/Dropdown.js +1 -1
  226. package/styled-components/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +1 -1
  227. package/styled-components/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +1 -1
  228. package/styled-components/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +1 -1
  229. package/styled-components/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +1 -1
  230. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +4 -4
  231. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -1
  232. package/styled-components/cjs/components/Dropdown/utils/index.js +1 -1
  233. package/styled-components/cjs/components/Grid/Grid.js +2 -2
  234. package/styled-components/cjs/components/Grid/ui/Col/Col.js +2 -2
  235. package/styled-components/cjs/components/Grid/ui/Row/Row.js +1 -1
  236. package/styled-components/cjs/components/Grid/utils/index.js +1 -1
  237. package/styled-components/cjs/components/Header/HeaderRoot/HeaderRoot.js +1 -1
  238. package/styled-components/cjs/components/Header/ui/HeaderArrow/HeaderArrow.js +1 -1
  239. package/styled-components/cjs/components/Header/ui/HeaderLogo/HeaderLogo.js +1 -1
  240. package/styled-components/cjs/components/Header/ui/HeaderTitleWrapper/HeaderTitleWrapper.js +1 -1
  241. package/styled-components/cjs/components/Image/Image.js +2 -2
  242. package/styled-components/cjs/components/Image/Image.styles.js +1 -1
  243. package/styled-components/cjs/components/Indicator/Indicator.js +1 -1
  244. package/styled-components/cjs/components/Link/Link.js +1 -1
  245. package/styled-components/cjs/components/Modal/Modal.js +1 -1
  246. package/styled-components/cjs/components/Modal/ModalContext.js +1 -1
  247. package/styled-components/cjs/components/Modal/hooks/useModal.js +1 -1
  248. package/styled-components/cjs/components/Notification/Notification.js +1 -1
  249. package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
  250. package/styled-components/cjs/components/Notification/NotificationsPortal.js +1 -1
  251. package/styled-components/cjs/components/Notification/NotificationsStore.js +1 -1
  252. package/styled-components/cjs/components/Overlay/Overlay.js +2 -2
  253. package/styled-components/cjs/components/Pagination/Pagination.js +3 -3
  254. package/styled-components/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +2 -2
  255. package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
  256. package/styled-components/cjs/components/Panel/Panel.js +2 -2
  257. package/styled-components/cjs/components/Panel/ui/PanelContent/PanelContent.js +1 -1
  258. package/styled-components/cjs/components/Panel/ui/PanelFooter/PanelFooter.js +1 -1
  259. package/styled-components/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -1
  260. package/styled-components/cjs/components/Popover/Popover.js +9 -9
  261. package/styled-components/cjs/components/Popup/Popup.js +2 -2
  262. package/styled-components/cjs/components/Popup/PopupContext.js +1 -1
  263. package/styled-components/cjs/components/Popup/PopupRoot.js +1 -1
  264. package/styled-components/cjs/components/Popup/hooks/usePopup.js +1 -1
  265. package/styled-components/cjs/components/Progress/Progress.js +1 -1
  266. package/styled-components/cjs/components/Progress/Progress.styles.js +1 -1
  267. package/styled-components/cjs/components/Radiobox/Radiobox.js +1 -1
  268. package/styled-components/cjs/components/SSRProvider/SSRProvider.js +1 -1
  269. package/styled-components/cjs/components/Segment/SegmentProvider/SegmentProvider.js +1 -1
  270. package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +1 -1
  271. package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +1 -1
  272. package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +3 -3
  273. package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles.js +1 -1
  274. package/styled-components/cjs/components/Select/Select.js +6 -6
  275. package/styled-components/cjs/components/Select/hooks/useKeyNavigation.js +12 -12
  276. package/styled-components/cjs/components/Select/ui/SelectChip/SelectChip.js +2 -2
  277. package/styled-components/cjs/components/Select/ui/SelectTarget/SelectTarget.js +3 -3
  278. package/styled-components/cjs/components/Select/utils/index.js +3 -3
  279. package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +1 -1
  280. package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +1 -1
  281. package/styled-components/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +1 -1
  282. package/styled-components/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +2 -2
  283. package/styled-components/cjs/components/Skeleton/hoc/withSkeleton.js +1 -1
  284. package/styled-components/cjs/components/Spinner/Spinner.js +1 -1
  285. package/styled-components/cjs/components/Spinner/Spinner.styles.js +1 -1
  286. package/styled-components/cjs/components/Spinner/utils/index.js +1 -1
  287. package/styled-components/cjs/components/Switch/Switch.js +1 -1
  288. package/styled-components/cjs/components/Tabs/TabsContext.js +3 -2
  289. package/styled-components/cjs/components/Tabs/createTabsController.js +1 -1
  290. package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.js +2 -2
  291. package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.styles.js +1 -1
  292. package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.js +3 -3
  293. package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +1 -1
  294. package/styled-components/cjs/components/TextArea/TextArea.js +2 -2
  295. package/styled-components/cjs/components/TextField/TextField.js +3 -3
  296. package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +9 -9
  297. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +2 -2
  298. package/styled-components/cjs/components/Toast/Toast.js +2 -2
  299. package/styled-components/cjs/components/Toast/Toast.styles.js +1 -1
  300. package/styled-components/cjs/components/Toast/ToastController.js +2 -2
  301. package/styled-components/cjs/components/Toast/ToastProvider/ToastProvider.js +3 -3
  302. package/styled-components/cjs/components/Toolbar/Toolbar.js +1 -1
  303. package/styled-components/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  304. package/styled-components/cjs/components/Tooltip/Tooltip.js +2 -2
  305. package/styled-components/cjs/components/Typography/Old/Subtitle/Subtitle.js +2 -2
  306. package/styled-components/cjs/components/Typography/Old/TypographyOld.js +2 -2
  307. package/styled-components/cjs/components/Typography/Typography.js +2 -2
  308. package/styled-components/cjs/engines/common.js +1 -1
  309. package/styled-components/cjs/engines/styled-components.js +1 -1
  310. package/styled-components/cjs/examples/_helpers.js +1 -1
  311. package/styled-components/cjs/examples/plasma_b2c/components/Chip/Chip.config.js +10 -7
  312. package/styled-components/cjs/examples/plasma_b2c/components/Chip/Chip.stories.tsx +18 -2
  313. package/styled-components/cjs/examples/plasma_b2c/components/Grid/Grid.config.js +1 -1
  314. package/styled-components/cjs/examples/plasma_web/components/Chip/Chip.config.js +10 -7
  315. package/styled-components/cjs/examples/plasma_web/components/Chip/Chip.stories.tsx +18 -2
  316. package/styled-components/cjs/examples/plasma_web/components/Grid/Grid.config.js +1 -1
  317. package/styled-components/cjs/examples/sds_engineer/components/Grid/Grid.config.js +1 -1
  318. package/styled-components/cjs/mixins/applySpacing.js +1 -1
  319. package/styled-components/cjs/mixins/typography.js +1 -1
  320. package/styled-components/es/components/Button/Button.js +1 -1
  321. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  322. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  323. package/styled-components/es/components/Calendar/hoc/withRange.js +1 -1
  324. package/styled-components/es/components/Calendar/hooks/useKeyNavigation.js +20 -20
  325. package/styled-components/es/components/Calendar/store/reducer.js +1 -1
  326. package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
  327. package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
  328. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  329. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  330. package/styled-components/es/components/Chip/Chip.js +17 -5
  331. package/styled-components/es/components/Chip/Chip.template-doc.mdx +2 -2
  332. package/styled-components/es/components/Chip/Chip.tokens.js +4 -0
  333. package/styled-components/es/components/Chip/variations/_pilled/base.js +3 -0
  334. package/styled-components/es/components/Chip/variations/_pilled/tokens.json +4 -0
  335. package/styled-components/es/components/Combobox/Combobox.js +5 -5
  336. package/styled-components/es/components/Combobox/hooks/useFocusController.js +9 -9
  337. package/styled-components/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
  338. package/styled-components/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
  339. package/styled-components/es/components/Divider/Divider.js +1 -1
  340. package/styled-components/es/components/Drawer/DrawerContext.js +1 -1
  341. package/styled-components/es/components/Drawer/hooks/useDrawer.js +1 -1
  342. package/styled-components/es/components/Drawer/ui/DrawerContent/DrawerContent.js +1 -1
  343. package/styled-components/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +1 -1
  344. package/styled-components/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +1 -1
  345. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +3 -3
  346. package/styled-components/es/components/Grid/Grid.js +1 -1
  347. package/styled-components/es/components/Grid/ui/Col/Col.js +1 -1
  348. package/styled-components/es/components/Grid/utils/index.js +1 -1
  349. package/styled-components/es/components/Image/Image.js +1 -1
  350. package/styled-components/es/components/Modal/ModalContext.js +1 -1
  351. package/styled-components/es/components/Modal/hooks/useModal.js +1 -1
  352. package/styled-components/es/components/Notification/NotificationsStore.js +1 -1
  353. package/styled-components/es/components/Overlay/Overlay.js +1 -1
  354. package/styled-components/es/components/Pagination/Pagination.js +2 -2
  355. package/styled-components/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
  356. package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
  357. package/styled-components/es/components/Panel/Panel.js +1 -1
  358. package/styled-components/es/components/Popover/Popover.js +8 -8
  359. package/styled-components/es/components/Popup/Popup.js +1 -1
  360. package/styled-components/es/components/Popup/hooks/usePopup.js +1 -1
  361. package/styled-components/es/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
  362. package/styled-components/es/components/Select/Select.js +5 -5
  363. package/styled-components/es/components/Select/hooks/useKeyNavigation.js +12 -12
  364. package/styled-components/es/components/Select/ui/SelectChip/SelectChip.js +1 -1
  365. package/styled-components/es/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
  366. package/styled-components/es/components/Select/utils/index.js +3 -3
  367. package/styled-components/es/components/Skeleton/TextSkeleton/TextSkeleton.js +1 -1
  368. package/styled-components/es/components/Skeleton/hoc/withSkeleton.js +1 -1
  369. package/styled-components/es/components/Spinner/utils/index.js +1 -1
  370. package/styled-components/es/components/Tabs/TabsContext.js +3 -2
  371. package/styled-components/es/components/Tabs/ui/TabItem/TabItem.js +1 -1
  372. package/styled-components/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
  373. package/styled-components/es/components/TextArea/TextArea.js +1 -1
  374. package/styled-components/es/components/TextField/TextField.js +2 -2
  375. package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +9 -9
  376. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
  377. package/styled-components/es/components/Toast/Toast.js +1 -1
  378. package/styled-components/es/components/Toast/ToastController.js +1 -1
  379. package/styled-components/es/components/Toast/ToastProvider/ToastProvider.js +2 -2
  380. package/styled-components/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  381. package/styled-components/es/components/Tooltip/Tooltip.js +1 -1
  382. package/styled-components/es/components/Typography/Old/Subtitle/Subtitle.js +1 -1
  383. package/styled-components/es/components/Typography/Old/TypographyOld.js +1 -1
  384. package/styled-components/es/components/Typography/Typography.js +1 -1
  385. package/styled-components/es/engines/common.js +1 -1
  386. package/styled-components/es/examples/_helpers.js +1 -1
  387. package/styled-components/es/examples/plasma_b2c/components/Chip/Chip.config.js +10 -7
  388. package/styled-components/es/examples/plasma_b2c/components/Chip/Chip.stories.tsx +18 -2
  389. package/styled-components/es/examples/plasma_b2c/components/Grid/Grid.config.js +1 -1
  390. package/styled-components/es/examples/plasma_web/components/Chip/Chip.config.js +10 -7
  391. package/styled-components/es/examples/plasma_web/components/Chip/Chip.stories.tsx +18 -2
  392. package/styled-components/es/examples/plasma_web/components/Grid/Grid.config.js +1 -1
  393. package/styled-components/es/examples/sds_engineer/components/Grid/Grid.config.js +1 -1
  394. package/styled-components/es/mixins/applySpacing.js +1 -1
  395. package/styled-components/es/mixins/typography.js +1 -1
  396. package/types/components/Chip/Chip.d.ts +4 -0
  397. package/types/components/Chip/Chip.d.ts.map +1 -1
  398. package/types/components/Chip/Chip.tokens.d.ts +4 -0
  399. package/types/components/Chip/Chip.tokens.d.ts.map +1 -1
  400. package/types/components/Chip/Chip.types.d.ts +6 -0
  401. package/types/components/Chip/Chip.types.d.ts.map +1 -1
  402. package/types/components/Chip/variations/_pilled/base.d.ts +2 -0
  403. package/types/components/Chip/variations/_pilled/base.d.ts.map +1 -0
  404. package/types/examples/plasma_b2c/components/Chip/Chip.config.d.ts +4 -1
  405. package/types/examples/plasma_b2c/components/Chip/Chip.config.d.ts.map +1 -1
  406. package/types/examples/plasma_b2c/components/Chip/Chip.d.ts +4 -1
  407. package/types/examples/plasma_b2c/components/Chip/Chip.d.ts.map +1 -1
  408. package/types/examples/plasma_web/components/Chip/Chip.config.d.ts +4 -1
  409. package/types/examples/plasma_web/components/Chip/Chip.config.d.ts.map +1 -1
  410. package/types/examples/plasma_web/components/Chip/Chip.d.ts +4 -1
  411. package/types/examples/plasma_web/components/Chip/Chip.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxTarget.js","sources":["../../../../../src/components/Combobox/ui/ComboboxTarget/ComboboxTarget.tsx"],"sourcesContent":["import React, { forwardRef, useRef, useState } from 'react';\n\nimport { classes } from '../../Combobox.tokens';\nimport { cx } from '../../../../utils';\nimport { ComboboxChip } from '../ComboboxChip/ComboboxChip';\nimport type { ComboboxPrimitiveValue } from '../../Combobox.types';\nimport { useFocusController } from '../../hooks';\nimport { Keys } from '../../../Select/hooks/useKeyNavigation';\n\nimport {\n StyledArrow,\n StyledChips,\n StyledContent,\n StyledLabel,\n StyledComboboxInput,\n StyledComboboxInputHelper,\n StyledComboboxTarget,\n StyledText,\n} from './ComboboxTarget.styles';\nimport type { ComboboxTargetProps } from './ComboboxTarget.types';\n\nconst {\n hasChips,\n innerLabelUp,\n arrowInverse,\n comboboxTargetArrow,\n comboboxTargeText,\n comboboxTargetInput,\n comboboxTargetLabel,\n} = classes;\n\n/**\n * Элемент для выпадающего списка\n */\nexport const ComboboxTarget = forwardRef<HTMLInputElement, ComboboxTargetProps>(\n (\n {\n values,\n search,\n label,\n placeholder,\n opened,\n readOnly,\n disabled,\n enumerationType,\n valueType,\n size,\n closedWithoutChanges,\n id,\n chipsRefs,\n inputRef,\n onChange,\n onSearch,\n onKeyDown,\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputHelperRef = useRef<HTMLDivElement>(null);\n const [focused, setFocused] = useState(false);\n\n const controlledRefs = { contentRef, inputHelperRef, inputRef };\n const textContent = values?.map(([, text]) => text).join(', ');\n const hasValue = values?.some(([value]) => value);\n\n const isEnumerationComma = enumerationType === 'comma';\n const isExtraSmall = size === 'xs';\n const isInputNotEmpty = hasValue || search;\n const isInputActive = !hasValue && (opened || (focused && !readOnly));\n const hasLabel = label && !isExtraSmall && isEnumerationComma;\n const hasOnlyLabel = !placeholder || label;\n const hasNoAnyTip = !placeholder && !label;\n const placeholderValue = (!label && !hasValue) || isExtraSmall ? placeholder : undefined;\n\n const withInnerLabelUp =\n !isExtraSmall && !hasNoAnyTip && hasOnlyLabel && (isInputActive || (hasLabel && isInputNotEmpty))\n ? innerLabelUp\n : undefined;\n const withArrowInverse = opened ? arrowInverse : undefined;\n const withHasChips = hasValue && enumerationType === 'chip' ? hasChips : undefined;\n\n const isLabelVisible = (!hasValue && !isExtraSmall) || hasLabel;\n const isEnumerationVisible = hasValue && valueType !== 'single';\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const { onClickText, onFocusInput, onBlurInput } = useFocusController({\n controlledRefs,\n opened,\n hasValue,\n textContent,\n search,\n values,\n valueType,\n readOnly,\n closedWithoutChanges,\n updateFocused: setFocused,\n updateSearch: onSearch,\n onChipClick,\n });\n\n const onChipClear = (value: ComboboxPrimitiveValue, text: ComboboxPrimitiveValue, index: number) => {\n const newValue = values\n ?.filter(([itemValue, itemText]) => !(itemValue === value && itemText === text))\n .map(([itemValue]) => itemValue);\n\n chipsRefs?.current.splice(index, 1);\n onChange?.(newValue);\n };\n\n const onChipKeyDown = (\n value: ComboboxPrimitiveValue,\n text: ComboboxPrimitiveValue,\n index: number,\n event: React.KeyboardEvent<HTMLButtonElement>,\n ) => {\n const { code } = event;\n\n if (code === Keys.Tab) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace) {\n onChipClear(value, text, index);\n }\n };\n\n const onKeyDownInput = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const { code } = event;\n\n if (opened && code === Keys.Tab) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace && !event.currentTarget?.value.length) {\n const newValue = values?.map(([itemValue]) => itemValue);\n newValue?.pop();\n chipsRefs?.current.pop();\n\n onChange?.(newValue);\n }\n };\n\n const onChangeInput = (event: React.ChangeEvent<HTMLInputElement>) => {\n onSearch?.(event.currentTarget.value);\n };\n\n const onWheel = (event: React.WheelEvent<HTMLDivElement>) => {\n const { deltaY } = event;\n\n if (contentRef.current) {\n contentRef.current.scrollLeft += Math.round(deltaY);\n }\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs && chipsRefs.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n // INFO: Нужно очищать на каждый ререндер компонента для актуализации состояния рефов\n if (chipsRefs) {\n chipsRefs.current = [];\n }\n\n return (\n <StyledComboboxTarget\n ref={ref}\n opened={opened}\n readOnly={readOnly}\n disabled={disabled}\n title={textContent}\n aria-label={label}\n className={cx(withInnerLabelUp, withHasChips)}\n onWheel={onWheel}\n onKeyDown={onKeyDown}\n {...rest}\n >\n <StyledContent tabIndex={-1} ref={contentRef} className={withHasChips}>\n {isEnumerationVisible &&\n (isEnumerationComma ? (\n <StyledText className={comboboxTargeText} onClick={onClickText}>\n {textContent}\n </StyledText>\n ) : (\n <StyledChips>\n {values?.map(([value, text], index) => (\n <ComboboxChip\n index={index}\n ref={(element) => getRef(element, index)}\n key={`${value}_${text}`}\n disabled={disabled}\n readOnly={readOnly}\n value={value}\n text={text}\n onClear={(v, t) => onChipClear(v, t, index)}\n onClick={onChipClick}\n onKeyDown={onChipKeyDown}\n />\n ))}\n </StyledChips>\n ))}\n <StyledComboboxInput\n ref={inputRef}\n role=\"textbox\"\n className={comboboxTargetInput}\n value={search}\n placeholder={placeholderValue}\n disabled={disabled}\n readOnly={readOnly}\n onFocus={onFocusInput}\n onBlur={onBlurInput}\n onChange={onChangeInput}\n onKeyDown={onKeyDownInput}\n />\n {valueType === 'multiple' && (\n <StyledComboboxInputHelper ref={inputHelperRef}>{search}</StyledComboboxInputHelper>\n )}\n </StyledContent>\n {isLabelVisible && (\n <StyledLabel className={comboboxTargetLabel} htmlFor={id}>\n {label}\n </StyledLabel>\n )}\n <StyledArrow size=\"s\" className={cx(comboboxTargetArrow, withArrowInverse)} />\n </StyledComboboxTarget>\n );\n },\n);\n"],"names":["hasChips","classes","innerLabelUp","arrowInverse","comboboxTargetArrow","comboboxTargeText","comboboxTargetInput","comboboxTargetLabel","ComboboxTarget","forwardRef","_ref","ref","values","search","label","placeholder","opened","readOnly","disabled","enumerationType","valueType","size","closedWithoutChanges","id","chipsRefs","inputRef","onChange","onSearch","onKeyDown","rest","_objectWithoutProperties","_excluded","contentRef","useRef","inputHelperRef","_useState","useState","_useState2","_slicedToArray","focused","setFocused","controlledRefs","textContent","map","_ref2","_ref3","text","join","hasValue","some","_ref4","_ref5","value","isEnumerationComma","isExtraSmall","isInputNotEmpty","isInputActive","hasLabel","hasOnlyLabel","hasNoAnyTip","placeholderValue","undefined","withInnerLabelUp","withArrowInverse","withHasChips","isLabelVisible","isEnumerationVisible","onChipClick","event","stopPropagation","_useFocusController","useFocusController","updateFocused","updateSearch","onClickText","onFocusInput","onBlurInput","onChipClear","index","newValue","filter","_ref6","_ref7","itemValue","itemText","_ref8","_ref9","current","splice","onChipKeyDown","code","Keys","Tab","preventDefault","Backspace","onKeyDownInput","_event$currentTarget","currentTarget","length","_ref10","_ref11","pop","onChangeInput","onWheel","deltaY","scrollLeft","Math","round","getRef","element","React","createElement","StyledComboboxTarget","_extends","title","className","cx","StyledContent","tabIndex","StyledText","onClick","StyledChips","_ref12","_ref13","ComboboxChip","key","concat","onClear","v","t","StyledComboboxInput","role","onFocus","onBlur","StyledComboboxInputHelper","StyledLabel","htmlFor","StyledArrow"],"mappings":";;;;;;;;;;AAqBA,IACIA,QAAQ,GAORC,OAAO,CAPPD,QAAQ;EACRE,YAAY,GAMZD,OAAO,CANPC,YAAY;EACZC,YAAY,GAKZF,OAAO,CALPE,YAAY;EACZC,mBAAmB,GAInBH,OAAO,CAJPG,mBAAmB;EACnBC,iBAAiB,GAGjBJ,OAAO,CAHPI,iBAAiB;EACjBC,mBAAmB,GAEnBL,OAAO,CAFPK,mBAAmB;EACnBC,mBAAmB,GACnBN,OAAO,CADPM,mBAAmB,CAAA;;AAGvB;AACA;AACA;AACO,IAAMC,cAAc,gBAAGC,UAAU,CACpC,UAAAC,IAAA,EAqBIC,GAAG,EACF;AAAA,EAAA,IApBGC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,eAAe,GAAAT,IAAA,CAAfS,eAAe;IACfC,SAAS,GAAAV,IAAA,CAATU,SAAS;IACTC,IAAI,GAAAX,IAAA,CAAJW,IAAI;IACJC,oBAAoB,GAAAZ,IAAA,CAApBY,oBAAoB;IACpBC,EAAE,GAAAb,IAAA,CAAFa,EAAE;IACFC,SAAS,GAAAd,IAAA,CAATc,SAAS;IACTC,QAAQ,GAAAf,IAAA,CAARe,Q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AAAA,GAAG,EAAEc,QAAS;AACd0G,IAAAA,IAAI,EAAC,SAAS;AACdhB,IAAAA,SAAS,EAAE7G,mBAAoB;AAC/B8C,IAAAA,KAAK,EAAEvC,MAAO;AACdE,IAAAA,WAAW,EAAE6C,gBAAiB;AAC9B1C,IAAAA,QAAQ,EAAEA,QAAS;AACnBD,IAAAA,QAAQ,EAAEA,QAAS;AACnBmH,IAAAA,OAAO,EAAEzD,YAAa;AACtB0D,IAAAA,MAAM,EAAEzD,WAAY;AACpBlD,IAAAA,QAAQ,EAAE4E,aAAc;AACxB1E,IAAAA,SAAS,EAAEmE,cAAAA;GACd,CAAC,EACD3E,SAAS,KAAK,UAAU,iBACrB0F,KAAA,CAAAC,aAAA,CAACuB,yBAAyB,EAAA;AAAC3H,IAAAA,GAAG,EAAEuB,cAAAA;GAAiBrB,EAAAA,MAAkC,CAE5E,CAAC,EACfoD,cAAc,iBACX6C,KAAA,CAAAC,aAAA,CAACwB,WAAW,EAAA;AAACpB,IAAAA,SAAS,EAAE5G,mBAAoB;AAACiI,IAAAA,OAAO,EAAEjH,EAAAA;AAAG,GAAA,EACpDT,KACQ,CAChB,eACDgG,KAAA,CAAAC,aAAA,CAAC0B,WAAW,EAAA;AAACpH,IAAAA,IAAI,EAAC,GAAG;AAAC8F,IAAAA,SAAS,EAAEC,EAAE,CAAChH,mBAAmB,EAAE2D,gBAAgB,CAAA;AAAE,GAAE,CAC3D,CAAC,CAAA;AAE/B,CACJ;;;;"}
1
+ {"version":3,"file":"ComboboxTarget.js","sources":["../../../../../src/components/Combobox/ui/ComboboxTarget/ComboboxTarget.tsx"],"sourcesContent":["import React, { forwardRef, useRef, useState } from 'react';\n\nimport { classes } from '../../Combobox.tokens';\nimport { cx } from '../../../../utils';\nimport { ComboboxChip } from '../ComboboxChip/ComboboxChip';\nimport type { ComboboxPrimitiveValue } from '../../Combobox.types';\nimport { useFocusController } from '../../hooks';\nimport { Keys } from '../../../Select/hooks/useKeyNavigation';\n\nimport {\n StyledArrow,\n StyledChips,\n StyledContent,\n StyledLabel,\n StyledComboboxInput,\n StyledComboboxInputHelper,\n StyledComboboxTarget,\n StyledText,\n} from './ComboboxTarget.styles';\nimport type { ComboboxTargetProps } from './ComboboxTarget.types';\n\nconst {\n hasChips,\n innerLabelUp,\n arrowInverse,\n comboboxTargetArrow,\n comboboxTargeText,\n comboboxTargetInput,\n comboboxTargetLabel,\n} = classes;\n\n/**\n * Элемент для выпадающего списка\n */\nexport const ComboboxTarget = forwardRef<HTMLInputElement, ComboboxTargetProps>(\n (\n {\n values,\n search,\n label,\n placeholder,\n opened,\n readOnly,\n disabled,\n enumerationType,\n valueType,\n size,\n closedWithoutChanges,\n id,\n chipsRefs,\n inputRef,\n onChange,\n onSearch,\n onKeyDown,\n ...rest\n },\n ref,\n ) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const inputHelperRef = useRef<HTMLDivElement>(null);\n const [focused, setFocused] = useState(false);\n\n const controlledRefs = { contentRef, inputHelperRef, inputRef };\n const textContent = values?.map(([, text]) => text).join(', ');\n const hasValue = values?.some(([value]) => value);\n\n const isEnumerationComma = enumerationType === 'comma';\n const isExtraSmall = size === 'xs';\n const isInputNotEmpty = hasValue || search;\n const isInputActive = !hasValue && (opened || (focused && !readOnly));\n const hasLabel = label && !isExtraSmall && isEnumerationComma;\n const hasOnlyLabel = !placeholder || label;\n const hasNoAnyTip = !placeholder && !label;\n const placeholderValue = (!label && !hasValue) || isExtraSmall ? placeholder : undefined;\n\n const withInnerLabelUp =\n !isExtraSmall && !hasNoAnyTip && hasOnlyLabel && (isInputActive || (hasLabel && isInputNotEmpty))\n ? innerLabelUp\n : undefined;\n const withArrowInverse = opened ? arrowInverse : undefined;\n const withHasChips = hasValue && enumerationType === 'chip' ? hasChips : undefined;\n\n const isLabelVisible = (!hasValue && !isExtraSmall) || hasLabel;\n const isEnumerationVisible = hasValue && valueType !== 'single';\n\n const onChipClick = (event: React.MouseEvent<HTMLButtonElement>) => event.stopPropagation();\n\n const { onClickText, onFocusInput, onBlurInput } = useFocusController({\n controlledRefs,\n opened,\n hasValue,\n textContent,\n search,\n values,\n valueType,\n readOnly,\n closedWithoutChanges,\n updateFocused: setFocused,\n updateSearch: onSearch,\n onChipClick,\n });\n\n const onChipClear = (value: ComboboxPrimitiveValue, text: ComboboxPrimitiveValue, index: number) => {\n const newValue = values\n ?.filter(([itemValue, itemText]) => !(itemValue === value && itemText === text))\n .map(([itemValue]) => itemValue);\n\n chipsRefs?.current.splice(index, 1);\n onChange?.(newValue);\n };\n\n const onChipKeyDown = (\n value: ComboboxPrimitiveValue,\n text: ComboboxPrimitiveValue,\n index: number,\n event: React.KeyboardEvent<HTMLButtonElement>,\n ) => {\n const { code } = event;\n\n if (code === Keys.Tab) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace) {\n onChipClear(value, text, index);\n }\n };\n\n const onKeyDownInput = (event: React.KeyboardEvent<HTMLInputElement>) => {\n const { code } = event;\n\n if (opened && code === Keys.Tab) {\n event.preventDefault();\n }\n\n if (code === Keys.Backspace && !event.currentTarget?.value.length) {\n const newValue = values?.map(([itemValue]) => itemValue);\n newValue?.pop();\n chipsRefs?.current.pop();\n\n onChange?.(newValue);\n }\n };\n\n const onChangeInput = (event: React.ChangeEvent<HTMLInputElement>) => {\n onSearch?.(event.currentTarget.value);\n };\n\n const onWheel = (event: React.WheelEvent<HTMLDivElement>) => {\n const { deltaY } = event;\n\n if (contentRef.current) {\n contentRef.current.scrollLeft += Math.round(deltaY);\n }\n };\n\n const getRef = (element: HTMLButtonElement | null, index: number) => {\n if (element && chipsRefs && chipsRefs.current) {\n chipsRefs.current[index] = element;\n }\n };\n\n // INFO: Нужно очищать на каждый ререндер компонента для актуализации состояния рефов\n if (chipsRefs) {\n chipsRefs.current = [];\n }\n\n return (\n <StyledComboboxTarget\n ref={ref}\n opened={opened}\n readOnly={readOnly}\n disabled={disabled}\n title={textContent}\n aria-label={label}\n className={cx(withInnerLabelUp, withHasChips)}\n onWheel={onWheel}\n onKeyDown={onKeyDown}\n {...rest}\n >\n <StyledContent tabIndex={-1} ref={contentRef} className={withHasChips}>\n {isEnumerationVisible &&\n (isEnumerationComma ? (\n <StyledText className={comboboxTargeText} onClick={onClickText}>\n {textContent}\n </StyledText>\n ) : (\n <StyledChips>\n {values?.map(([value, text], index) => (\n <ComboboxChip\n index={index}\n ref={(element) => getRef(element, index)}\n key={`${value}_${text}`}\n disabled={disabled}\n readOnly={readOnly}\n value={value}\n text={text}\n onClear={(v, t) => onChipClear(v, t, index)}\n onClick={onChipClick}\n onKeyDown={onChipKeyDown}\n />\n ))}\n </StyledChips>\n ))}\n <StyledComboboxInput\n ref={inputRef}\n role=\"textbox\"\n className={comboboxTargetInput}\n value={search}\n placeholder={placeholderValue}\n disabled={disabled}\n readOnly={readOnly}\n onFocus={onFocusInput}\n onBlur={onBlurInput}\n onChange={onChangeInput}\n onKeyDown={onKeyDownInput}\n />\n {valueType === 'multiple' && (\n <StyledComboboxInputHelper ref={inputHelperRef}>{search}</StyledComboboxInputHelper>\n )}\n </StyledContent>\n {isLabelVisible && (\n <StyledLabel className={comboboxTargetLabel} htmlFor={id}>\n {label}\n </StyledLabel>\n )}\n <StyledArrow size=\"s\" className={cx(comboboxTargetArrow, withArrowInverse)} />\n </StyledComboboxTarget>\n );\n },\n);\n"],"names":["hasChips","classes","innerLabelUp","arrowInverse","comboboxTargetArrow","comboboxTargeText","comboboxTargetInput","comboboxTargetLabel","ComboboxTarget","forwardRef","_ref","ref","values","search","label","placeholder","opened","readOnly","disabled","enumerationType","valueType","size","closedWithoutChanges","id","chipsRefs","inputRef","onChange","onSearch","onKeyDown","rest","_objectWithoutProperties","_excluded","contentRef","useRef","inputHelperRef","_useState","useState","_useState2","_slicedToArray","focused","setFocused","controlledRefs","textContent","map","_ref2","_ref3","text","join","hasValue","some","_ref4","_ref5","value","isEnumerationComma","isExtraSmall","isInputNotEmpty","isInputActive","hasLabel","hasOnlyLabel","hasNoAnyTip","placeholderValue","undefined","withInnerLabelUp","withArrowInverse","withHasChips","isLabelVisible","isEnumerationVisible","onChipClick","event","stopPropagation","_useFocusController","useFocusController","updateFocused","updateSearch","onClickText","onFocusInput","onBlurInput","onChipClear","index","newValue","filter","_ref6","_ref7","itemValue","itemText","_ref8","_ref9","current","splice","onChipKeyDown","code","Keys","Tab","preventDefault","Backspace","onKeyDownInput","_event$currentTarget","currentTarget","length","_ref10","_ref11","pop","onChangeInput","onWheel","deltaY","scrollLeft","Math","round","getRef","element","React","createElement","StyledComboboxTarget","_extends","title","className","cx","StyledContent","tabIndex","StyledText","onClick","StyledChips","_ref12","_ref13","ComboboxChip","key","concat","onClear","v","t","StyledComboboxInput","role","onFocus","onBlur","StyledComboboxInputHelper","StyledLabel","htmlFor","StyledArrow"],"mappings":";;;;;;;;;;AAqBA,IACIA,QAAQ,GAORC,OAAO,CAPPD,QAAQ;EACRE,YAAY,GAMZD,OAAO,CANPC,YAAY;EACZC,YAAY,GAKZF,OAAO,CALPE,YAAY;EACZC,mBAAmB,GAInBH,OAAO,CAJPG,mBAAmB;EACnBC,iBAAiB,GAGjBJ,OAAO,CAHPI,iBAAiB;EACjBC,mBAAmB,GAEnBL,OAAO,CAFPK,mBAAmB;EACnBC,mBAAmB,GACnBN,OAAO,CADPM,mBAAmB,CAAA;;AAGvB;AACA;AACA;AACO,IAAMC,cAAc,gBAAGC,UAAU,CACpC,UAAAC,IAAA,EAqBIC,GAAG,EACF;AAAA,EAAA,IApBGC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,MAAM,GAAAH,IAAA,CAANG,MAAM;IACNC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,WAAW,GAAAL,IAAA,CAAXK,WAAW;IACXC,MAAM,GAAAN,IAAA,CAANM,MAAM;IACNC,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IACRC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IACRC,eAAe,GAAAT,IAAA,CAAfS,eAAe;IACfC,SAAS,GAAAV,IA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J;;;;"}
@@ -4,7 +4,7 @@
4
4
  var getDrawers = function getDrawers(items) {
5
5
  return items.filter(function (item) {
6
6
  var _item$info;
7
- return item === null || item === void 0 || (_item$info = item.info) === null || _item$info === void 0 ? void 0 : _item$info.isDrawer;
7
+ return item === null || item === void 0 ? void 0 : (_item$info = item.info) === null || _item$info === void 0 ? void 0 : _item$info.isDrawer;
8
8
  });
9
9
  };
10
10
  var hasDrawers = function hasDrawers(items) {
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerContext.js","sources":["../../../src/components/Drawer/DrawerContext.tsx"],"sourcesContent":["import { PopupInfo } from '../Popup/Popup.types';\n\nexport interface DrawerInfo extends PopupInfo {\n id: string;\n info?: {\n isDrawer?: true;\n };\n}\n\n/**\n * Взаимодействие с Drawer оконами.\n */\nconst getDrawers = (items: DrawerInfo[]): DrawerInfo[] => {\n return items.filter((item: DrawerInfo) => item?.info?.isDrawer);\n};\n\nexport const hasDrawers = (items: DrawerInfo[]): boolean => {\n return getDrawers(items).length > 0;\n};\n\nexport const getIdLastDrawer = (items: DrawerInfo[]): string | undefined => {\n const drawers = getDrawers(items);\n if (!drawers.length) {\n return;\n }\n return drawers[drawers.length - 1].id;\n};\n\nexport const getIdFirstDrawer = (items: DrawerInfo[]): string | undefined => {\n const drawers = getDrawers(items);\n if (!drawers.length) {\n return;\n }\n return drawers[0].id;\n};\n"],"names":["getDrawers","items","filter","item","_item$info","info","isDrawer","hasDrawers","length","getIdLastDrawer","drawers","id"],"mappings":"AASA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,KAAmB,EAAmB;AACtD,EAAA,OAAOA,KAAK,CAACC,MAAM,CAAC,UAACC,IAAgB,EAAA;AAAA,IAAA,IAAAC,UAAA,CAAA;AAAA,IAAA,OAAKD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,IAAA,CAAAC,UAAA,GAAJD,IAAI,CAAEE,IAAI,MAAAD,IAAAA,IAAAA,UAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAA,CAAYE,QAAQ,CAAA;GAAC,CAAA,CAAA;AACnE,CAAC,CAAA;IAEYC,UAAU,GAAG,SAAbA,UAAUA,CAAIN,KAAmB,EAAc;AACxD,EAAA,OAAOD,UAAU,CAACC,KAAK,CAAC,CAACO,MAAM,GAAG,CAAC,CAAA;AACvC,EAAC;IAEYC,eAAe,GAAG,SAAlBA,eAAeA,CAAIR,KAAmB,EAAyB;AACxE,EAAA,IAAMS,OAAO,GAAGV,UAAU,CAACC,KAAK,CAAC,CAAA;AACjC,EAAA,IAAI,CAACS,OAAO,CAACF,MAAM,EAAE;AACjB,IAAA,OAAA;AACJ,GAAA;EACA,OAAOE,OAAO,CAACA,OAAO,CAACF,MAAM,GAAG,CAAC,CAAC,CAACG,EAAE,CAAA;AACzC;;;;"}
1
+ {"version":3,"file":"DrawerContext.js","sources":["../../../src/components/Drawer/DrawerContext.tsx"],"sourcesContent":["import { PopupInfo } from '../Popup/Popup.types';\n\nexport interface DrawerInfo extends PopupInfo {\n id: string;\n info?: {\n isDrawer?: true;\n };\n}\n\n/**\n * Взаимодействие с Drawer оконами.\n */\nconst getDrawers = (items: DrawerInfo[]): DrawerInfo[] => {\n return items.filter((item: DrawerInfo) => item?.info?.isDrawer);\n};\n\nexport const hasDrawers = (items: DrawerInfo[]): boolean => {\n return getDrawers(items).length > 0;\n};\n\nexport const getIdLastDrawer = (items: DrawerInfo[]): string | undefined => {\n const drawers = getDrawers(items);\n if (!drawers.length) {\n return;\n }\n return drawers[drawers.length - 1].id;\n};\n\nexport const getIdFirstDrawer = (items: DrawerInfo[]): string | undefined => {\n const drawers = getDrawers(items);\n if (!drawers.length) {\n return;\n }\n return drawers[0].id;\n};\n"],"names":["getDrawers","items","filter","item","_item$info","info","isDrawer","hasDrawers","length","getIdLastDrawer","drawers","id"],"mappings":"AASA;AACA;AACA;AACA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAIC,KAAmB,EAAmB;AACtD,EAAA,OAAOA,KAAK,CAACC,MAAM,CAAC,UAACC,IAAgB,EAAA;AAAA,IAAA,IAAAC,UAAA,CAAA;AAAA,IAAA,OAAKD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,CAAAC,UAAA,GAAJD,IAAI,CAAEE,IAAI,MAAAD,IAAAA,IAAAA,UAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAA,CAAYE,QAAQ,CAAA;GAAC,CAAA,CAAA;AACnE,CAAC,CAAA;IAEYC,UAAU,GAAG,SAAbA,UAAUA,CAAIN,KAAmB,EAAc;AACxD,EAAA,OAAOD,UAAU,CAACC,KAAK,CAAC,CAACO,MAAM,GAAG,CAAC,CAAA;AACvC,EAAC;IAEYC,eAAe,GAAG,SAAlBA,eAAeA,CAAIR,KAAmB,EAAyB;AACxE,EAAA,IAAMS,OAAO,GAAGV,UAAU,CAACC,KAAK,CAAC,CAAA;AACjC,EAAA,IAAI,CAACS,OAAO,CAACF,MAAM,EAAE;AACjB,IAAA,OAAA;AACJ,GAAA;EACA,OAAOE,OAAO,CAACA,OAAO,CAACF,MAAM,GAAG,CAAC,CAAC,CAACG,EAAE,CAAA;AACzC;;;;"}
@@ -40,7 +40,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
40
40
  if (disabled) {
41
41
  return;
42
42
  }
43
- onClick === null || onClick === void 0 || onClick(event);
43
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
44
44
  if (onSelect && !ContentLeftComponent) {
45
45
  onSelect(value, text);
46
46
  }
@@ -49,7 +49,7 @@ var dropdownItemRoot = function dropdownItemRoot(Root) {
49
49
  if (disabled) {
50
50
  return;
51
51
  }
52
- onChange === null || onChange === void 0 || onChange(event);
52
+ onChange === null || onChange === void 0 ? void 0 : onChange(event);
53
53
  if (onSelect && ContentLeftComponent) {
54
54
  onSelect(value, text);
55
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../../engines';\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { getValidComponent } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledContentLeft, StyledContentRight, StyledText, base } from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\n/**\n * Элемент выпадающего списка\n */\nexport const dropdownItemRoot = (Root: RootProps<HTMLDivElement, DropdownItemProps>) =>\n forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n id,\n className,\n children,\n text,\n isSelected,\n name,\n checked,\n value,\n role,\n view,\n size,\n disabled,\n contentLeft: ContentLeftComponent,\n contentRight: ContentRightComponent,\n onSelect,\n onClick,\n onChange,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n\n const withDropdownItemIsSelected = checked || isSelected ? classes.dropdownItemIsSelected : undefined;\n const withDropdownItemIsDisabled = disabled ? classes.dropdownItemIsDisabled : undefined;\n\n const handleOnClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n return;\n }\n\n onClick?.(event);\n\n if (onSelect && !ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const handleOnChange = useCallback(\n (event: React.MouseEvent<HTMLInputElement>) => {\n if (disabled) {\n return;\n }\n\n onChange?.(event);\n\n if (onSelect && ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const contentProps = {\n name,\n value,\n checked: checked || isSelected,\n disabled,\n tabIndex: 0,\n ...(!disabled && { onChange: handleOnChange }),\n };\n\n const ContentLeft = useMemo(() => getValidComponent(ContentLeftComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n const ContentRight = useMemo(() => getValidComponent(ContentRightComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n return (\n <Root\n className={cx(withDropdownItemIsSelected, withDropdownItemIsDisabled, className)}\n view={view}\n size={size}\n id={innerId}\n isSelected={isSelected}\n role={role}\n ref={outerRootRef}\n tabIndex={0}\n aria-disabled={disabled}\n onClick={handleOnClick}\n data-value={value}\n {...rest}\n >\n {text ? (\n <>\n <StyledContentLeft>{ContentLeftComponent && ContentLeft}</StyledContentLeft>\n <StyledText>{text}</StyledText>\n <StyledContentRight>{ContentRightComponent && ContentRight}</StyledContentRight>\n </>\n ) : (\n children\n )}\n </Root>\n );\n },\n );\n\nexport const dropdownItemConfig = {\n name: 'DropdownItem',\n tag: 'div',\n layout: dropdownItemRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["dropdownItemRoot","Root","forwardRef","_ref","outerRootRef","id","className","children","text","isSelected","name","checked","value","role","view","size","disabled","ContentLeftComponent","contentLeft","ContentRightComponent","contentRight","onSelect","onClick","onChange","rest","_objectWithoutProperties","_excluded","uniqId","safeUseId","innerId","withDropdownItemIsSelected","classes","dropdownItemIsSelected","undefined","withDropdownItemIsDisabled","dropdownItemIsDisabled","handleOnClick","useCallback","event","handleOnChange","contentProps","_objectSpread","tabIndex","ContentLeft","useMemo","getValidComponent","ContentRight","React","createElement","_extends","cx","ref","Fragment","StyledContentLeft","StyledText","StyledContentRight","dropdownItemConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;AAaA;AACA;AACA;IACaA,gBAAgB,GAAG,SAAnBA,gBAAgBA,CAAIC,IAAkD,EAAA;AAAA,EAAA,oBAC/EC,UAAU,CACN,UAAAC,IAAA,EAqBIC,YAAY,EACX;AAAA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A,IAAI,EAAE;AACF8C,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNlD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"DropdownItem.js","sources":["../../../../../src/components/Dropdown/ui/DropdownItem/DropdownItem.tsx"],"sourcesContent":["import React, { forwardRef, useCallback, useMemo } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../../../engines';\nimport { classes } from '../../Dropdown.tokens';\nimport { cx } from '../../../../utils';\nimport { getValidComponent } from '../../utils';\n\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { StyledContentLeft, StyledContentRight, StyledText, base } from './DropdownItem.styles';\nimport type { DropdownItemProps } from './DropdownItem.type';\n\n/**\n * Элемент выпадающего списка\n */\nexport const dropdownItemRoot = (Root: RootProps<HTMLDivElement, DropdownItemProps>) =>\n forwardRef<HTMLDivElement, DropdownItemProps>(\n (\n {\n id,\n className,\n children,\n text,\n isSelected,\n name,\n checked,\n value,\n role,\n view,\n size,\n disabled,\n contentLeft: ContentLeftComponent,\n contentRight: ContentRightComponent,\n onSelect,\n onClick,\n onChange,\n ...rest\n },\n outerRootRef,\n ) => {\n const uniqId = safeUseId();\n const innerId = id || uniqId;\n\n const withDropdownItemIsSelected = checked || isSelected ? classes.dropdownItemIsSelected : undefined;\n const withDropdownItemIsDisabled = disabled ? classes.dropdownItemIsDisabled : undefined;\n\n const handleOnClick = useCallback(\n (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled) {\n return;\n }\n\n onClick?.(event);\n\n if (onSelect && !ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const handleOnChange = useCallback(\n (event: React.MouseEvent<HTMLInputElement>) => {\n if (disabled) {\n return;\n }\n\n onChange?.(event);\n\n if (onSelect && ContentLeftComponent) {\n onSelect(value, text);\n }\n },\n [onSelect, disabled],\n );\n\n const contentProps = {\n name,\n value,\n checked: checked || isSelected,\n disabled,\n tabIndex: 0,\n ...(!disabled && { onChange: handleOnChange }),\n };\n\n const ContentLeft = useMemo(() => getValidComponent(ContentLeftComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n const ContentRight = useMemo(() => getValidComponent(ContentRightComponent, contentProps), [\n ContentRightComponent,\n contentProps,\n ]);\n\n return (\n <Root\n className={cx(withDropdownItemIsSelected, withDropdownItemIsDisabled, className)}\n view={view}\n size={size}\n id={innerId}\n isSelected={isSelected}\n role={role}\n ref={outerRootRef}\n tabIndex={0}\n aria-disabled={disabled}\n onClick={handleOnClick}\n data-value={value}\n {...rest}\n >\n {text ? (\n <>\n <StyledContentLeft>{ContentLeftComponent && ContentLeft}</StyledContentLeft>\n <StyledText>{text}</StyledText>\n <StyledContentRight>{ContentRightComponent && ContentRight}</StyledContentRight>\n </>\n ) : (\n children\n )}\n </Root>\n );\n },\n );\n\nexport const dropdownItemConfig = {\n name: 'DropdownItem',\n tag: 'div',\n layout: dropdownItemRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'primary',\n size: 'm',\n },\n};\n"],"names":["dropdownItemRoot","Root","forwardRef","_ref","outerRootRef","id","className","children","text","isSelected","name","checked","value","role","view","size","disabled","ContentLeftComponent","contentLeft","ContentRightComponent","contentRight","onSelect","onClick","onChange","rest","_objectWithoutProperties","_excluded","uniqId","safeUseId","innerId","withDropdownItemIsSelected","classes","dropdownItemIsSelected","undefined","withDropdownItemIsDisabled","dropdownItemIsDisabled","handleOnClick","useCallback","event","handleOnChange","contentProps","_objectSpread","tabIndex","ContentLeft","useMemo","getValidComponent","ContentRight","React","createElement","_extends","cx","ref","Fragment","StyledContentLeft","StyledText","StyledContentRight","dropdownItemConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings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A,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAE1D,gBAAgB;AACxB2D,EAAAA,IAAI,EAAJA,IAAI;AACJC,EAAAA,UAAU,EAAE;AACR9C,IAAAA,IAAI,EAAE;AACF+C,MAAAA,GAAG,EAAEC,MAAAA;KACR;AACD/C,IAAAA,IAAI,EAAE;AACF8C,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNlD,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -4,7 +4,7 @@
4
4
  var getModals = function getModals(items) {
5
5
  return items.filter(function (item) {
6
6
  var _item$info;
7
- return item === null || item === void 0 || (_item$info = item.info) === null || _item$info === void 0 ? void 0 : _item$info.isModal;
7
+ return item === null || item === void 0 ? void 0 : (_item$info = item.info) === null || _item$info === void 0 ? void 0 : _item$info.isModal;
8
8
  });
9
9
  };
10
10
  var hasModals = function hasModals(items) {
@@ -1 +1 @@
1
- {"version":3,"file":"ModalContext.js","sources":["../../../src/components/Modal/ModalContext.tsx"],"sourcesContent":["import { PopupInfo } from '../Popup/Popup.types';\n\nexport interface ModalInfo extends PopupInfo {\n id: string;\n info?: {\n isModal?: true;\n };\n}\n\n/**\n * Взаимодействие с модальными оконами.\n */\nconst getModals = (items: ModalInfo[]) => {\n return items.filter((item: ModalInfo) => item?.info?.isModal);\n};\n\nexport const hasModals = (items: ModalInfo[]) => {\n return getModals(items).length > 0;\n};\n\nexport const getIdLastModal = (items: ModalInfo[]) => {\n const modals = getModals(items);\n if (!modals.length) {\n return;\n }\n return modals[modals.length - 1].id;\n};\n\nexport const getIdFirstModal = (items: ModalInfo[]) => {\n const modals = getModals(items);\n if (!modals.length) {\n return;\n }\n return modals[0].id;\n};\n"],"names":["getModals","items","filter","item","_item$info","info","isModal","hasModals","length","getIdLastModal","modals","id"],"mappings":"AASA;AACA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAIC,KAAkB,EAAK;AACtC,EAAA,OAAOA,KAAK,CAACC,MAAM,CAAC,UAACC,IAAe,EAAA;AAAA,IAAA,IAAAC,UAAA,CAAA;AAAA,IAAA,OAAKD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,IAAA,CAAAC,UAAA,GAAJD,IAAI,CAAEE,IAAI,MAAAD,IAAAA,IAAAA,UAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAA,CAAYE,OAAO,CAAA;GAAC,CAAA,CAAA;AACjE,CAAC,CAAA;IAEYC,SAAS,GAAG,SAAZA,SAASA,CAAIN,KAAkB,EAAK;AAC7C,EAAA,OAAOD,SAAS,CAACC,KAAK,CAAC,CAACO,MAAM,GAAG,CAAC,CAAA;AACtC,EAAC;IAEYC,cAAc,GAAG,SAAjBA,cAAcA,CAAIR,KAAkB,EAAK;AAClD,EAAA,IAAMS,MAAM,GAAGV,SAAS,CAACC,KAAK,CAAC,CAAA;AAC/B,EAAA,IAAI,CAACS,MAAM,CAACF,MAAM,EAAE;AAChB,IAAA,OAAA;AACJ,GAAA;EACA,OAAOE,MAAM,CAACA,MAAM,CAACF,MAAM,GAAG,CAAC,CAAC,CAACG,EAAE,CAAA;AACvC;;;;"}
1
+ {"version":3,"file":"ModalContext.js","sources":["../../../src/components/Modal/ModalContext.tsx"],"sourcesContent":["import { PopupInfo } from '../Popup/Popup.types';\n\nexport interface ModalInfo extends PopupInfo {\n id: string;\n info?: {\n isModal?: true;\n };\n}\n\n/**\n * Взаимодействие с модальными оконами.\n */\nconst getModals = (items: ModalInfo[]) => {\n return items.filter((item: ModalInfo) => item?.info?.isModal);\n};\n\nexport const hasModals = (items: ModalInfo[]) => {\n return getModals(items).length > 0;\n};\n\nexport const getIdLastModal = (items: ModalInfo[]) => {\n const modals = getModals(items);\n if (!modals.length) {\n return;\n }\n return modals[modals.length - 1].id;\n};\n\nexport const getIdFirstModal = (items: ModalInfo[]) => {\n const modals = getModals(items);\n if (!modals.length) {\n return;\n }\n return modals[0].id;\n};\n"],"names":["getModals","items","filter","item","_item$info","info","isModal","hasModals","length","getIdLastModal","modals","id"],"mappings":"AASA;AACA;AACA;AACA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAIC,KAAkB,EAAK;AACtC,EAAA,OAAOA,KAAK,CAACC,MAAM,CAAC,UAACC,IAAe,EAAA;AAAA,IAAA,IAAAC,UAAA,CAAA;AAAA,IAAA,OAAKD,IAAI,KAAA,IAAA,IAAJA,IAAI,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,CAAAC,UAAA,GAAJD,IAAI,CAAEE,IAAI,MAAAD,IAAAA,IAAAA,UAAA,KAAVA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,UAAA,CAAYE,OAAO,CAAA;GAAC,CAAA,CAAA;AACjE,CAAC,CAAA;IAEYC,SAAS,GAAG,SAAZA,SAASA,CAAIN,KAAkB,EAAK;AAC7C,EAAA,OAAOD,SAAS,CAACC,KAAK,CAAC,CAACO,MAAM,GAAG,CAAC,CAAA;AACtC,EAAC;IAEYC,cAAc,GAAG,SAAjBA,cAAcA,CAAIR,KAAkB,EAAK;AAClD,EAAA,IAAMS,MAAM,GAAGV,SAAS,CAACC,KAAK,CAAC,CAAA;AAC/B,EAAA,IAAI,CAACS,MAAM,CAACF,MAAM,EAAE;AAChB,IAAA,OAAA;AACJ,GAAA;EACA,OAAOE,MAAM,CAACA,MAAM,CAACF,MAAM,GAAG,CAAC,CAAC,CAACG,EAAE,CAAA;AACvC;;;;"}
@@ -21,7 +21,7 @@ var Overlay = function Overlay(_ref) {
21
21
  if (!isClickable) {
22
22
  return;
23
23
  }
24
- onOverlayClick === null || onOverlayClick === void 0 || onOverlayClick(event);
24
+ onOverlayClick === null || onOverlayClick === void 0 ? void 0 : onOverlayClick(event);
25
25
  }, [isClickable, onOverlayClick]);
26
26
  return /*#__PURE__*/React.createElement(StyledOverlay, _extends({
27
27
  className: className,
@@ -1 +1 @@
1
- {"version":3,"file":"Overlay.js","sources":["../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport type { FC, MouseEvent } from 'react';\n\nimport type { OverlayProps } from './Overlay.types';\nimport { StyledOverlay } from './Overlay.styles';\n\n/**\n * Overlay - подложка для всплывающих компонент (Modal, Toast и т.д.).\n */\nexport const Overlay: FC<OverlayProps> = ({\n withBlur,\n className,\n backgroundColorProperty,\n onOverlayClick,\n zIndex,\n transparent,\n isClickable = true,\n ...rest\n}) => {\n const handleOverlayClick = useCallback(\n (event: MouseEvent<HTMLDivElement>) => {\n if (!isClickable) {\n return;\n }\n\n onOverlayClick?.(event);\n },\n [isClickable, onOverlayClick],\n );\n\n return (\n <StyledOverlay\n className={className}\n backgroundColorToken={backgroundColorProperty}\n transparent={transparent}\n clickable={isClickable}\n onClick={handleOverlayClick}\n zIndex={zIndex}\n withBlur={withBlur}\n {...rest}\n />\n );\n};\n"],"names":["Overlay","_ref","withBlur","className","backgroundColorProperty","onOverlayClick","zIndex","transparent","_ref$isClickable","isClickable","rest","_objectWithoutProperties","_excluded","handleOverlayClick","useCallback","event","React","createElement","StyledOverlay","_extends","backgroundColorToken","clickable","onClick"],"mappings":";;;;;;AAMA;AACA;AACA;IACaA,OAAyB,GAAG,SAA5BA,OAAyBA,CAAAC,IAAA,EAShC;AAAA,EAAA,IARFC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,uBAAuB,GAAAH,IAAA,CAAvBG,uBAAuB;IACvBC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,MAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAAC,gBAAA,GAAAP,IAAA,CACXQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;AACfE,IAAAA,IAAI,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;AAEP,EAAA,IAAMC,kBAAkB,GAAGC,WAAW,CAClC,UAACC,KAAiC,EAAK;IACnC,IAAI,CAACN,WAAW,EAAE;AACd,MAAA,OAAA;AACJ,KAAA;AAEAJ,IAAAA,cAAc,aAAdA,cAAc,KAAA,KAAA,CAAA,IAAdA,cAAc,CAAGU,KAAK,CAAC,CAAA;AAC3B,GAAC,EACD,CAACN,WAAW,EAAEJ,cAAc,CAChC,CAAC,CAAA;AAED,EAAA,oBACIW,KAAA,CAAAC,aAAA,CAACC,aAAa,EAAAC,QAAA,CAAA;AACVhB,IAAAA,SAAS,EAAEA,SAAU;AACrBiB,IAAAA,oBAAoB,EAAEhB,uBAAwB;AAC9CG,IAAAA,WAAW,EAAEA,WAAY;AACzBc,IAAAA,SAAS,EAAEZ,WAAY;AACvBa,IAAAA,OAAO,EAAET,kBAAmB;AAC5BP,IAAAA,MAAM,EAAEA,MAAO;AACfJ,IAAAA,QAAQ,EAAEA,QAAAA;GACNQ,EAAAA,IAAI,CACX,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"Overlay.js","sources":["../../../src/components/Overlay/Overlay.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport type { FC, MouseEvent } from 'react';\n\nimport type { OverlayProps } from './Overlay.types';\nimport { StyledOverlay } from './Overlay.styles';\n\n/**\n * Overlay - подложка для всплывающих компонент (Modal, Toast и т.д.).\n */\nexport const Overlay: FC<OverlayProps> = ({\n withBlur,\n className,\n backgroundColorProperty,\n onOverlayClick,\n zIndex,\n transparent,\n isClickable = true,\n ...rest\n}) => {\n const handleOverlayClick = useCallback(\n (event: MouseEvent<HTMLDivElement>) => {\n if (!isClickable) {\n return;\n }\n\n onOverlayClick?.(event);\n },\n [isClickable, onOverlayClick],\n );\n\n return (\n <StyledOverlay\n className={className}\n backgroundColorToken={backgroundColorProperty}\n transparent={transparent}\n clickable={isClickable}\n onClick={handleOverlayClick}\n zIndex={zIndex}\n withBlur={withBlur}\n {...rest}\n />\n );\n};\n"],"names":["Overlay","_ref","withBlur","className","backgroundColorProperty","onOverlayClick","zIndex","transparent","_ref$isClickable","isClickable","rest","_objectWithoutProperties","_excluded","handleOverlayClick","useCallback","event","React","createElement","StyledOverlay","_extends","backgroundColorToken","clickable","onClick"],"mappings":";;;;;;AAMA;AACA;AACA;IACaA,OAAyB,GAAG,SAA5BA,OAAyBA,CAAAC,IAAA,EAShC;AAAA,EAAA,IARFC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,SAAS,GAAAF,IAAA,CAATE,SAAS;IACTC,uBAAuB,GAAAH,IAAA,CAAvBG,uBAAuB;IACvBC,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IACdC,MAAM,GAAAL,IAAA,CAANK,MAAM;IACNC,WAAW,GAAAN,IAAA,CAAXM,WAAW;IAAAC,gBAAA,GAAAP,IAAA,CACXQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;AACfE,IAAAA,IAAI,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;AAEP,EAAA,IAAMC,kBAAkB,GAAGC,WAAW,CAClC,UAACC,KAAiC,EAAK;IACnC,IAAI,CAACN,WAAW,EAAE;AACd,MAAA,OAAA;AACJ,KAAA;AAEAJ,IAAAA,cAAc,aAAdA,cAAc,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAdA,cAAc,CAAGU,KAAK,CAAC,CAAA;AAC3B,GAAC,EACD,CAACN,WAAW,EAAEJ,cAAc,CAChC,CAAC,CAAA;AAED,EAAA,oBACIW,KAAA,CAAAC,aAAA,CAACC,aAAa,EAAAC,QAAA,CAAA;AACVhB,IAAAA,SAAS,EAAEA,SAAU;AACrBiB,IAAAA,oBAAoB,EAAEhB,uBAAwB;AAC9CG,IAAAA,WAAW,EAAEA,WAAY;AACzBc,IAAAA,SAAS,EAAEZ,WAAY;AACvBa,IAAAA,OAAO,EAAET,kBAAmB;AAC5BP,IAAAA,MAAM,EAAEA,MAAO;AACfJ,IAAAA,QAAQ,EAAEA,QAAAA;GACNQ,EAAAA,IAAI,CACX,CAAC,CAAA;AAEV;;;;"}
@@ -102,6 +102,8 @@
102
102
 
103
103
  .base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
104
104
 
105
+ .base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
106
+
105
107
  .Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
106
108
  .Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
107
109
  .Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@@ -90,12 +90,12 @@ var paginationRoot = function paginationRoot(Root) {
90
90
  return;
91
91
  }
92
92
  setPageValue(pageValue);
93
- onChangePageValue === null || onChangePageValue === void 0 || onChangePageValue(pageValue);
93
+ onChangePageValue === null || onChangePageValue === void 0 ? void 0 : onChangePageValue(pageValue);
94
94
  };
95
95
  var handlerSetPerPage = function handlerSetPerPage(newPerPageValue) {
96
96
  handlerSetPage(1);
97
97
  setPerPageValue(newPerPageValue);
98
- onChangePerPageValue === null || onChangePerPageValue === void 0 || onChangePerPageValue(newPerPageValue);
98
+ onChangePerPageValue === null || onChangePerPageValue === void 0 ? void 0 : onChangePerPageValue(newPerPageValue);
99
99
  handlerSetPages(newPerPageValue);
100
100
  };
101
101
  var isActiveButton = function isActiveButton(checkPage) {
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import React, { useEffect, useState, forwardRef } from 'react';\n\nimport { cx, isNumber } from '../../utils';\nimport { RootProps } from '../../engines';\n\nimport {\n PaginationPages,\n PaginationActions,\n PaginationButton,\n PaginationSection,\n PaginationButtonGroup,\n PaginationRoot,\n PaginationShorter,\n} from './Pagination.styles';\nimport type { PaginationProps } from './Pagination.types';\nimport { getSections, defaultValues } from './utils';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as typeCSS } from './variations/_type/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { classes } from './Pagination.tokens';\nimport { PaginationQuickJumpToPage } from './ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage';\nimport { PaginationSelectPerPage } from './ui/PaginationSelectPerPage/PaginationSelectPerPage';\n\nexport const paginationRoot = (Root: RootProps<HTMLDivElement, PaginationProps>) =>\n forwardRef<HTMLDivElement, PaginationProps>(\n (\n {\n value = defaultValues.value,\n perPage,\n slots = defaultValues.slots,\n\n view,\n viewCurrentPage,\n type = defaultValues.type,\n size,\n pilled = defaultValues.pilled,\n square = defaultValues.square,\n disabledPages = defaultValues.disabledPages,\n\n count = defaultValues.value,\n\n hasQuickJump = defaultValues.hasQuickJump,\n hasPerPage = defaultValues.hasPerPage,\n perPageList = defaultValues.perPageList,\n isCommonButtonStyles = defaultValues.isCommonButtonStyles,\n\n placeholderQuickJump = defaultValues.placeholderQuickJump,\n textQuickJump = defaultValues.textQuickJump,\n textPerPage = defaultValues.textPerPage,\n\n leftContent,\n rightContent,\n\n onChangePageValue,\n onChangePerPageValue,\n ...rest\n },\n ref,\n ) => {\n const [page, setPageValue] = useState<number>(1);\n const [perPageValue, setPerPageValue] = useState(perPage);\n const [pages, setPagesValue] = useState<number>(value);\n const [sections, setSections] = useState<number[][] | null>(null);\n\n const typeClass = classes[`${type}Type` as keyof typeof classes];\n const roundedClass = pilled ? 'circle-circle' : 'square-square';\n\n const withHasPerPageSelect = hasPerPage ? classes.withHasPerPageSelect : undefined;\n const withHasQuickJump = hasQuickJump ? classes.withHasQuickJump : undefined;\n\n const disabled = disabledPages.map((el) => (isNumber(el) ? Number(el) : null));\n\n const handlerSetPages = (newPerPage?: number) => {\n setPagesValue(Math.ceil(count / (newPerPage || (hasPerPage ? defaultValues.perPage : 1))));\n };\n\n const handlerSetPage = (newPageValue?: number) => {\n let pageValue = newPageValue ?? defaultValues.value;\n if (pageValue > pages) {\n pageValue = pages;\n }\n if (pageValue < 1) {\n pageValue = 1;\n }\n if (disabled.includes(pageValue)) {\n return;\n }\n setPageValue(pageValue);\n onChangePageValue?.(pageValue);\n };\n\n const handlerSetPerPage = (newPerPageValue?: number) => {\n handlerSetPage(1);\n setPerPageValue(newPerPageValue);\n onChangePerPageValue?.(newPerPageValue);\n\n handlerSetPages(newPerPageValue);\n };\n\n const isActiveButton = (checkPage: number) => {\n return page === checkPage ? classes.paginationPageButtonActive : '';\n };\n\n useEffect(() => {\n handlerSetPages(perPage);\n }, [perPage, count, handlerSetPages]);\n\n useEffect(() => {\n handlerSetPage(value);\n }, [value]);\n\n useEffect(() => {\n setSections(getSections(page, pages, slots));\n }, [page, slots, pages, setSections, getSections]);\n\n return (\n <Root\n size={size}\n view={view}\n viewCurrentPage={viewCurrentPage}\n className={cx(classes.wrapper, typeClass)}\n ref={ref}\n {...rest}\n >\n <PaginationRoot className={typeClass}>\n <PaginationPages>\n {leftContent && (\n <PaginationButtonGroup isCommonButtonStyles={isCommonButtonStyles}>\n {leftContent}\n </PaginationButtonGroup>\n )}\n {sections &&\n sections.map((section, indexSection) => (\n <>\n {indexSection !== 0 && (\n <PaginationShorter stretching=\"fixed\" disabled>\n ...\n </PaginationShorter>\n )}\n <PaginationSection key={indexSection}>\n {section.map((pageValue) => (\n <PaginationButton\n square={square}\n pin={roundedClass}\n key={pageValue}\n onClick={() => handlerSetPage(pageValue)}\n disabled={disabled.includes(pageValue)}\n className={cx(\n classes.paginationPageButton,\n isActiveButton(pageValue),\n )}\n >\n {pageValue}\n </PaginationButton>\n ))}\n </PaginationSection>\n </>\n ))}\n {rightContent && (\n <PaginationButtonGroup isCommonButtonStyles={isCommonButtonStyles}>\n {rightContent}\n </PaginationButtonGroup>\n )}\n </PaginationPages>\n <PaginationActions\n className={cx(classes.actions, typeClass, withHasPerPageSelect, withHasQuickJump)}\n >\n {hasQuickJump && (\n <PaginationQuickJumpToPage\n placeholderQuickJump={placeholderQuickJump}\n textQuickJump={textQuickJump}\n onChangeValue={handlerSetPage}\n />\n )}\n {hasPerPage && (\n <PaginationSelectPerPage\n textPerPage={textPerPage}\n value={perPageValue}\n valuesList={perPageList}\n onChangeValue={handlerSetPerPage}\n />\n )}\n </PaginationActions>\n </PaginationRoot>\n </Root>\n );\n },\n );\n\nexport const paginationConfig = {\n name: 'Pagination',\n tag: 'div',\n layout: paginationRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n type: {\n css: typeCSS,\n },\n },\n defaults: {\n view: 'clear',\n size: 'm',\n },\n};\n"],"names":["paginationRoot","Root","forwardRef","_ref","ref","_ref$value","value","defaultValues","perPage","_ref$slots","slots","view","viewCurrentPage","_ref$type","type","size","_ref$pilled","pilled","_ref$square","square","_ref$disabledPages","disabledPages","_ref$count","count","_ref$hasQuickJump","hasQuickJump","_ref$hasPerPage","hasPerPage","_ref$perPageList","perPageList","_ref$isCommonButtonSt","isCommonButtonStyles","_ref$placeholderQuick","placeholderQuickJump","_ref$textQuickJump","textQuickJump","_ref$textPerPage","textPerPage","leftContent","rightContent","onChangePageValue","onChangePerPageValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","page","setPageValue","_useState3","_useState4","perPageValue","setPerPageValue","_useState5","_useState6","pages","setPagesValue","_useState7","_useState8","sections","setSections","typeClass","classes","concat","roundedClass","withHasPerPageSelect","undefined","withHasQuickJump","disabled","map","el","isNumber","Number","handlerSetPages","newPerPage","Math","ceil","handlerSetPage","newPageValue","pageValue","includes","handlerSetPerPage","newPerPageValue","isActiveButton","checkPage","paginationPageButtonActive","useEffect","getSections","React","createElement","_extends","className","cx","wrapper","PaginationRoot","PaginationPages","PaginationButtonGroup","section","indexSection","Fragment","_PaginationShorter","PaginationShorter","stretching","PaginationSection","key","PaginationButton","pin","onClick","paginationPageButton","PaginationActions","actions","PaginationQuickJumpToPage","onChangeValue","PaginationSelectPerPage","valuesList","paginationConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","typeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;IAuBaA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAgD,EAAA;AAAA,EAAA,oBAC3EC,UAAU,CACN,UAAAC,IAAA,EAgCIC,GAAG,EACF;AAAA,IAAA,IAAAC,UAAA,GAAAF,IAAA,CA/BGG,KAAK;AAALA,MAAAA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YAAY,iBACTiE,KAAA,CAAAC,aAAA,CAACsB,yBAAyB,EAAA;AACtBhF,MAAAA,oBAAoB,EAAEA,oBAAqB;AAC3CE,MAAAA,aAAa,EAAEA,aAAc;AAC7B+E,MAAAA,aAAa,EAAEnC,cAAAA;KAClB,CACJ,EACApD,UAAU,iBACP+D,KAAA,CAAAC,aAAA,CAACwB,uBAAuB,EAAA;AACpB9E,MAAAA,WAAW,EAAEA,WAAY;AACzB/B,MAAAA,KAAK,EAAE+C,YAAa;AACpB+D,MAAAA,UAAU,EAAEvF,WAAY;AACxBqF,MAAAA,aAAa,EAAE/B,iBAAAA;KAClB,CAEU,CACP,CACd,CAAC,CAAA;AAEf,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAMkC,gBAAgB,GAAG;AAC5BC,EAAAA,IAAI,EAAE,YAAY;AAClBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAExH,cAAc;AACtByH,EAAAA,IAAI,EAAE,EAAE;AACRC,EAAAA,UAAU,EAAE;AACR/G,IAAAA,IAAI,EAAE;AACFgH,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACD7G,IAAAA,IAAI,EAAE;AACF4G,MAAAA,GAAG,EAAEE,MAAAA;KACR;AACD/G,IAAAA,IAAI,EAAE;AACF6G,MAAAA,GAAG,EAAEG,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACNpH,IAAAA,IAAI,EAAE,OAAO;AACbI,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Pagination.js","sources":["../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import React, { useEffect, useState, forwardRef } from 'react';\n\nimport { cx, isNumber } from '../../utils';\nimport { RootProps } from '../../engines';\n\nimport {\n PaginationPages,\n PaginationActions,\n PaginationButton,\n PaginationSection,\n PaginationButtonGroup,\n PaginationRoot,\n PaginationShorter,\n} from './Pagination.styles';\nimport type { PaginationProps } from './Pagination.types';\nimport { getSections, defaultValues } from './utils';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as typeCSS } from './variations/_type/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { classes } from './Pagination.tokens';\nimport { PaginationQuickJumpToPage } from './ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage';\nimport { PaginationSelectPerPage } from './ui/PaginationSelectPerPage/PaginationSelectPerPage';\n\nexport const paginationRoot = (Root: RootProps<HTMLDivElement, PaginationProps>) =>\n forwardRef<HTMLDivElement, PaginationProps>(\n (\n {\n value = defaultValues.value,\n perPage,\n slots = defaultValues.slots,\n\n view,\n viewCurrentPage,\n type = defaultValues.type,\n size,\n pilled = defaultValues.pilled,\n square = defaultValues.square,\n disabledPages = defaultValues.disabledPages,\n\n count = defaultValues.value,\n\n hasQuickJump = defaultValues.hasQuickJump,\n hasPerPage = defaultValues.hasPerPage,\n perPageList = defaultValues.perPageList,\n isCommonButtonStyles = defaultValues.isCommonButtonStyles,\n\n placeholderQuickJump = defaultValues.placeholderQuickJump,\n textQuickJump = defaultValues.textQuickJump,\n textPerPage = defaultValues.textPerPage,\n\n leftContent,\n rightContent,\n\n onChangePageValue,\n onChangePerPageValue,\n ...rest\n },\n ref,\n ) => {\n const [page, setPageValue] = useState<number>(1);\n const [perPageValue, setPerPageValue] = useState(perPage);\n const [pages, setPagesValue] = useState<number>(value);\n const [sections, setSections] = useState<number[][] | null>(null);\n\n const typeClass = classes[`${type}Type` as keyof typeof classes];\n const roundedClass = pilled ? 'circle-circle' : 'square-square';\n\n const withHasPerPageSelect = hasPerPage ? classes.withHasPerPageSelect : undefined;\n const withHasQuickJump = hasQuickJump ? classes.withHasQuickJump : undefined;\n\n const disabled = disabledPages.map((el) => (isNumber(el) ? Number(el) : null));\n\n const handlerSetPages = (newPerPage?: number) => {\n setPagesValue(Math.ceil(count / (newPerPage || (hasPerPage ? defaultValues.perPage : 1))));\n };\n\n const handlerSetPage = (newPageValue?: number) => {\n let pageValue = newPageValue ?? defaultValues.value;\n if (pageValue > pages) {\n pageValue = pages;\n }\n if (pageValue < 1) {\n pageValue = 1;\n }\n if (disabled.includes(pageValue)) {\n return;\n }\n setPageValue(pageValue);\n onChangePageValue?.(pageValue);\n };\n\n const handlerSetPerPage = (newPerPageValue?: number) => {\n handlerSetPage(1);\n setPerPageValue(newPerPageValue);\n onChangePerPageValue?.(newPerPageValue);\n\n handlerSetPages(newPerPageValue);\n };\n\n const isActiveButton = (checkPage: number) => {\n return page === checkPage ? classes.paginationPageButtonActive : '';\n };\n\n useEffect(() => {\n handlerSetPages(perPage);\n }, [perPage, count, handlerSetPages]);\n\n useEffect(() => {\n handlerSetPage(value);\n }, [value]);\n\n useEffect(() => {\n setSections(getSections(page, pages, slots));\n }, [page, slots, pages, setSections, getSections]);\n\n return (\n <Root\n size={size}\n view={view}\n viewCurrentPage={viewCurrentPage}\n className={cx(classes.wrapper, typeClass)}\n ref={ref}\n {...rest}\n >\n <PaginationRoot className={typeClass}>\n <PaginationPages>\n {leftContent && (\n <PaginationButtonGroup isCommonButtonStyles={isCommonButtonStyles}>\n {leftContent}\n </PaginationButtonGroup>\n )}\n {sections &&\n sections.map((section, indexSection) => (\n <>\n {indexSection !== 0 && (\n <PaginationShorter stretching=\"fixed\" disabled>\n ...\n </PaginationShorter>\n )}\n <PaginationSection key={indexSection}>\n {section.map((pageValue) => (\n <PaginationButton\n square={square}\n pin={roundedClass}\n key={pageValue}\n onClick={() => handlerSetPage(pageValue)}\n disabled={disabled.includes(pageValue)}\n className={cx(\n classes.paginationPageButton,\n isActiveButton(pageValue),\n )}\n >\n {pageValue}\n </PaginationButton>\n ))}\n </PaginationSection>\n </>\n ))}\n {rightContent && (\n <PaginationButtonGroup isCommonButtonStyles={isCommonButtonStyles}>\n {rightContent}\n </PaginationButtonGroup>\n )}\n </PaginationPages>\n <PaginationActions\n className={cx(classes.actions, typeClass, withHasPerPageSelect, withHasQuickJump)}\n >\n {hasQuickJump && (\n <PaginationQuickJumpToPage\n placeholderQuickJump={placeholderQuickJump}\n textQuickJump={textQuickJump}\n onChangeValue={handlerSetPage}\n />\n )}\n {hasPerPage && (\n <PaginationSelectPerPage\n textPerPage={textPerPage}\n value={perPageValue}\n valuesList={perPageList}\n onChangeValue={handlerSetPerPage}\n />\n )}\n </PaginationActions>\n </PaginationRoot>\n </Root>\n );\n },\n );\n\nexport const paginationConfig = {\n name: 'Pagination',\n tag: 'div',\n layout: paginationRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n type: {\n css: typeCSS,\n },\n },\n defaults: {\n view: 'clear',\n size: 'm',\n },\n};\n"],"names":["paginationRoot","Root","forwardRef","_ref","ref","_ref$value","value","defaultValues","perPage","_ref$slots","slots","view","viewCurrentPage","_ref$type","type","size","_ref$pilled","pilled","_ref$square","square","_ref$disabledPages","disabledPages","_ref$count","count","_ref$hasQuickJump","hasQuickJump","_ref$hasPerPage","hasPerPage","_ref$perPageList","perPageList","_ref$isCommonButtonSt","isCommonButtonStyles","_ref$placeholderQuick","placeholderQuickJump","_ref$textQuickJump","textQuickJump","_ref$textPerPage","textPerPage","leftContent","rightContent","onChangePageValue","onChangePerPageValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","page","setPageValue","_useState3","_useState4","perPageValue","setPerPageValue","_useState5","_useState6","pages","setPagesValue","_useState7","_useState8","sections","setSections","typeClass","classes","concat","roundedClass","withHasPerPageSelect","undefined","withHasQuickJump","disabled","map","el","isNumber","Number","handlerSetPages","newPerPage","Math","ceil","handlerSetPage","newPageValue","pageValue","includes","handlerSetPerPage","newPerPageValue","isActiveButton","checkPage","paginationPageButtonActive","useEffect","getSections","React","createElement","_extends","className","cx","wrapper","PaginationRoot","PaginationPages","PaginationButtonGroup","section","indexSection","Fragment","_PaginationShorter","PaginationShorter","stretching","PaginationSection","key","PaginationButton","pin","onClick","paginationPageButton","PaginationActions","actions","PaginationQuickJumpToPage","onChangeValue","PaginationS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,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
@@ -17,7 +17,7 @@ var PaginationQuickJumpToPage = function PaginationQuickJumpToPage(_ref) {
17
17
  setPageValue = _useState2[1];
18
18
  var handleKeyPress = function handleKeyPress(event) {
19
19
  if (event.key === 'Enter') {
20
- onChangeValue === null || onChangeValue === void 0 || onChangeValue(Number(pageValue));
20
+ onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(Number(pageValue));
21
21
  setPageValue('');
22
22
  }
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationQuickJumpToPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { defaultValues } from '../../utils';\n\nimport type { PaginationQuickJumpToPageProps } from './PaginationQuickJumpToPage.types';\nimport {\n QuickJumpToPageRoot,\n QuickJumpToPageTypography,\n QuickJumpToPageInput,\n} from './PaginationQuickJumpToPage.styles';\n\nexport const PaginationQuickJumpToPage: React.FC<PaginationQuickJumpToPageProps> = ({\n placeholderQuickJump = defaultValues.placeholderQuickJump,\n textQuickJump = defaultValues.textQuickJump,\n onChangeValue,\n ...rest\n}) => {\n const [pageValue, setPageValue] = useState<number | string | undefined>();\n\n const handleKeyPress = (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Enter') {\n onChangeValue?.(Number(pageValue));\n setPageValue('');\n }\n };\n\n const handleChangeInput = (event: React.FormEvent<HTMLInputElement>) => {\n const result = event.currentTarget.value.replace(/\\D/g, '');\n if (result === '') return setPageValue('');\n setPageValue(Number(result));\n };\n\n return (\n <QuickJumpToPageRoot {...rest}>\n <QuickJumpToPageTypography>{textQuickJump}</QuickJumpToPageTypography>\n <QuickJumpToPageInput\n value={pageValue}\n placeholder={placeholderQuickJump}\n onKeyUp={handleKeyPress}\n onChange={handleChangeInput}\n />\n </QuickJumpToPageRoot>\n );\n};\n"],"names":["PaginationQuickJumpToPage","_ref","_ref$placeholderQuick","placeholderQuickJump","defaultValues","_ref$textQuickJump","textQuickJump","onChangeValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","pageValue","setPageValue","handleKeyPress","event","key","Number","handleChangeInput","result","currentTarget","value","replace","React","createElement","QuickJumpToPageRoot","QuickJumpToPageTypography","QuickJumpToPageInput","placeholder","onKeyUp","onChange"],"mappings":";;;;;;IAWaA,yBAAmE,GAAG,SAAtEA,yBAAmEA,CAAAC,IAAA,EAK1E;AAAA,EAAA,IAAAC,qBAAA,GAAAD,IAAA,CAJFE,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAGE,aAAa,CAACD,oBAAoB,GAAAD,qBAAA;IAAAG,kBAAA,GAAAJ,IAAA,CACzDK,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAA,KAAA,CAAA,GAAGD,aAAa,CAACE,aAAa,GAAAD,kBAAA;IAC3CE,aAAa,GAAAN,IAAA,CAAbM,aAAa;AACVC,IAAAA,IAAI,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAkCC,QAAQ,EAA+B;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,YAAY,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAE9B,EAAA,IAAMI,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAuC,EAAK;AAChE,IAAA,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,EAAE;MACvBZ,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAbA,KAAAA,CAAAA,IAAAA,aAAa,CAAGa,MAAM,CAACL,SAAS,CAAC,CAAC,CAAA;MAClCC,YAAY,CAAC,EAAE,CAAC,CAAA;AACpB,KAAA;GACH,CAAA;AAED,EAAA,IAAMK,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIH,KAAwC,EAAK;AACpE,IAAA,IAAMI,MAAM,GAAGJ,KAAK,CAACK,aAAa,CAACC,KAAK,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAC3D,IAAIH,MAAM,KAAK,EAAE,EAAE,OAAON,YAAY,CAAC,EAAE,CAAC,CAAA;AAC1CA,IAAAA,YAAY,CAACI,MAAM,CAACE,MAAM,CAAC,CAAC,CAAA;GAC/B,CAAA;EAED,oBACII,KAAA,CAAAC,aAAA,CAACC,mBAAmB,EAAKpB,IAAI,eACzBkB,KAAA,CAAAC,aAAA,CAACE,yBAAyB,QAAEvB,aAAyC,CAAC,eACtEoB,KAAA,CAAAC,aAAA,CAACG,oBAAoB,EAAA;AACjBN,IAAAA,KAAK,EAAET,SAAU;AACjBgB,IAAAA,WAAW,EAAE5B,oBAAqB;AAClC6B,IAAAA,OAAO,EAAEf,cAAe;AACxBgB,IAAAA,QAAQ,EAAEZ,iBAAAA;AAAkB,GAC/B,CACgB,CAAC,CAAA;AAE9B;;;;"}
1
+ {"version":3,"file":"PaginationQuickJumpToPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { defaultValues } from '../../utils';\n\nimport type { PaginationQuickJumpToPageProps } from './PaginationQuickJumpToPage.types';\nimport {\n QuickJumpToPageRoot,\n QuickJumpToPageTypography,\n QuickJumpToPageInput,\n} from './PaginationQuickJumpToPage.styles';\n\nexport const PaginationQuickJumpToPage: React.FC<PaginationQuickJumpToPageProps> = ({\n placeholderQuickJump = defaultValues.placeholderQuickJump,\n textQuickJump = defaultValues.textQuickJump,\n onChangeValue,\n ...rest\n}) => {\n const [pageValue, setPageValue] = useState<number | string | undefined>();\n\n const handleKeyPress = (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Enter') {\n onChangeValue?.(Number(pageValue));\n setPageValue('');\n }\n };\n\n const handleChangeInput = (event: React.FormEvent<HTMLInputElement>) => {\n const result = event.currentTarget.value.replace(/\\D/g, '');\n if (result === '') return setPageValue('');\n setPageValue(Number(result));\n };\n\n return (\n <QuickJumpToPageRoot {...rest}>\n <QuickJumpToPageTypography>{textQuickJump}</QuickJumpToPageTypography>\n <QuickJumpToPageInput\n value={pageValue}\n placeholder={placeholderQuickJump}\n onKeyUp={handleKeyPress}\n onChange={handleChangeInput}\n />\n </QuickJumpToPageRoot>\n );\n};\n"],"names":["PaginationQuickJumpToPage","_ref","_ref$placeholderQuick","placeholderQuickJump","defaultValues","_ref$textQuickJump","textQuickJump","onChangeValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","pageValue","setPageValue","handleKeyPress","event","key","Number","handleChangeInput","result","currentTarget","value","replace","React","createElement","QuickJumpToPageRoot","QuickJumpToPageTypography","QuickJumpToPageInput","placeholder","onKeyUp","onChange"],"mappings":";;;;;;IAWaA,yBAAmE,GAAG,SAAtEA,yBAAmEA,CAAAC,IAAA,EAK1E;AAAA,EAAA,IAAAC,qBAAA,GAAAD,IAAA,CAJFE,oBAAoB;AAApBA,IAAAA,oBAAoB,GAAAD,qBAAA,KAAA,KAAA,CAAA,GAAGE,aAAa,CAACD,oBAAoB,GAAAD,qBAAA;IAAAG,kBAAA,GAAAJ,IAAA,CACzDK,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAA,KAAA,CAAA,GAAGD,aAAa,CAACE,aAAa,GAAAD,kBAAA;IAC3CE,aAAa,GAAAN,IAAA,CAAbM,aAAa;AACVC,IAAAA,IAAI,GAAAC,wBAAA,CAAAR,IAAA,EAAAS,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAAkCC,QAAQ,EAA+B;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlEI,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,YAAY,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAE9B,EAAA,IAAMI,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,KAAuC,EAAK;AAChE,IAAA,IAAIA,KAAK,CAACC,GAAG,KAAK,OAAO,EAAE;MACvBZ,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAbA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,aAAa,CAAGa,MAAM,CAACL,SAAS,CAAC,CAAC,CAAA;MAClCC,YAAY,CAAC,EAAE,CAAC,CAAA;AACpB,KAAA;GACH,CAAA;AAED,EAAA,IAAMK,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIH,KAAwC,EAAK;AACpE,IAAA,IAAMI,MAAM,GAAGJ,KAAK,CAACK,aAAa,CAACC,KAAK,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IAC3D,IAAIH,MAAM,KAAK,EAAE,EAAE,OAAON,YAAY,CAAC,EAAE,CAAC,CAAA;AAC1CA,IAAAA,YAAY,CAACI,MAAM,CAACE,MAAM,CAAC,CAAC,CAAA;GAC/B,CAAA;EAED,oBACII,KAAA,CAAAC,aAAA,CAACC,mBAAmB,EAAKpB,IAAI,eACzBkB,KAAA,CAAAC,aAAA,CAACE,yBAAyB,QAAEvB,aAAyC,CAAC,eACtEoB,KAAA,CAAAC,aAAA,CAACG,oBAAoB,EAAA;AACjBN,IAAAA,KAAK,EAAET,SAAU;AACjBgB,IAAAA,WAAW,EAAE5B,oBAAqB;AAClC6B,IAAAA,OAAO,EAAEf,cAAe;AACxBgB,IAAAA,QAAQ,EAAEZ,iBAAAA;AAAkB,GAC/B,CACgB,CAAC,CAAA;AAE9B;;;;"}
@@ -47,6 +47,8 @@
47
47
 
48
48
  .base_kgtz8x_b16hf96__46a206b1{--plasma_private-chip-outline-size:var(--plasma-chip-outline-size,0.125rem);position:relative;}.base_kgtz8x_b16hf96__46a206b1:focus{outline:none;}.base_kgtz8x_b16hf96__46a206b1::before{content:'';position:absolute;top:calc(-1 * var(--plasma_private-chip-outline-size));left:calc(-1 * var(--plasma_private-chip-outline-size));right:calc(-1 * var(--plasma_private-chip-outline-size));bottom:calc(-1 * var(--plasma_private-chip-outline-size));z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-chip-outline-size) solid transparent;border-radius:calc(var(--plasma-chip-border-radius) + var(--plasma_private-chip-outline-size));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.base_kgtz8x_b16hf96__46a206b1.base_kgtz8x_focusVisible__46a206b1:focus::before,.base_kgtz8x_b16hf96__46a206b1[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-chip-outline-size) var(--plasma-chip-focus-color);}
49
49
 
50
+ .base_3kce4h_bvcavwi__c6ad5ca5.base_3kce4h_chipPilled__c6ad5ca5{border-radius:var(--plasma-chip-pilled-border-radius);}
51
+
50
52
  .Chip_styles_1mwwhiw_bol5daj__07da4d18{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);}
51
53
  .Chip_styles_1mwwhiw_sj20on5__07da4d18{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-left:var(--plasma-chip-left-content-margin-left);margin-right:var(--plasma-chip-left-content-margin-right);}
52
54
  .Chip_styles_1mwwhiw_s1ror4o9__07da4d18{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
@@ -24,7 +24,7 @@ var PaginationSelectPerPage = function PaginationSelectPerPage(_ref) {
24
24
  var handleSelectChange = function handleSelectChange(newValue) {
25
25
  if (newValue) {
26
26
  setSelectedValue(Number(newValue));
27
- onChangeValue === null || onChangeValue === void 0 || onChangeValue(Number(newValue));
27
+ onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(Number(newValue));
28
28
  }
29
29
  };
30
30
  return /*#__PURE__*/React.createElement(SelectPerPageRoot, rest, /*#__PURE__*/React.createElement(SelectPerPageTypography, null, textPerPage), /*#__PURE__*/React.createElement(SelectPerPageSelect, {
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationSelectPerPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { IconDone } from '../../../../components/_Icon';\nimport { SelectPrimitiveValue } from '../../../Select';\nimport { defaultValues } from '../../utils';\nimport { classes } from '../../Pagination.tokens';\n\nimport type { PaginationSelectPerPageProps } from './PaginationSelectPerPage.types';\nimport {\n SelectPerPageRoot,\n SelectPerPageTypography,\n SelectPerPageSelect,\n SelectPerPageSelectItem,\n} from './PaginationSelectPerPage.styles';\n\nexport const PaginationSelectPerPage: React.FC<PaginationSelectPerPageProps> = ({\n value = defaultValues.perPage,\n valuesList = defaultValues.perPageList,\n textPerPage = defaultValues.textPerPage,\n onChangeValue,\n ...rest\n}) => {\n const [selectedValue, setSelectedValue] = useState(value);\n\n const handleSelectChange = (newValue?: SelectPrimitiveValue) => {\n if (newValue) {\n setSelectedValue(Number(newValue));\n onChangeValue?.(Number(newValue));\n }\n };\n\n return (\n <SelectPerPageRoot {...rest}>\n <SelectPerPageTypography>{textPerPage}</SelectPerPageTypography>\n <SelectPerPageSelect\n className={classes.selectWrapper}\n value={selectedValue}\n onChangeValue={handleSelectChange}\n >\n {valuesList?.map((item) => (\n <SelectPerPageSelectItem\n contentLeft={item === selectedValue ? <IconDone size=\"xs\" color=\"inherit\" /> : undefined}\n key={item}\n value={item}\n text={String(item)}\n />\n ))}\n </SelectPerPageSelect>\n </SelectPerPageRoot>\n );\n};\n"],"names":["PaginationSelectPerPage","_ref","_ref$value","value","defaultValues","perPage","_ref$valuesList","valuesList","perPageList","_ref$textPerPage","textPerPage","onChangeValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","selectedValue","setSelectedValue","handleSelectChange","newValue","Number","React","createElement","SelectPerPageRoot","SelectPerPageTypography","SelectPerPageSelect","className","classes","selectWrapper","map","item","SelectPerPageSelectItem","contentLeft","_IconDone","IconDone","size","color","undefined","key","text","String"],"mappings":";;;;;;;;;;IAeaA,uBAA+D,GAAG,SAAlEA,uBAA+DA,CAAAC,IAAA,EAMtE;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CALFE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAGE,aAAa,CAACC,OAAO,GAAAH,UAAA;IAAAI,eAAA,GAAAL,IAAA,CAC7BM,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAA,KAAA,CAAA,GAAGF,aAAa,CAACI,WAAW,GAAAF,eAAA;IAAAG,gBAAA,GAAAR,IAAA,CACtCS,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAA,KAAA,CAAA,GAAGL,aAAa,CAACM,WAAW,GAAAD,gBAAA;IACvCE,aAAa,GAAAV,IAAA,CAAbU,aAAa;AACVC,IAAAA,IAAI,GAAAC,wBAAA,CAAAZ,IAAA,EAAAa,SAAA,CAAA,CAAA;AAEP,EAAA,IAAAC,SAAA,GAA0CC,QAAQ,CAACb,KAAK,CAAC;IAAAc,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAlDI,IAAAA,aAAa,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,gBAAgB,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAEtC,EAAA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIC,QAA+B,EAAK;AAC5D,IAAA,IAAIA,QAAQ,EAAE;AACVF,MAAAA,gBAAgB,CAACG,MAAM,CAACD,QAAQ,CAAC,CAAC,CAAA;MAClCX,aAAa,KAAA,IAAA,IAAbA,aAAa,KAAbA,KAAAA,CAAAA,IAAAA,aAAa,CAAGY,MAAM,CAACD,QAAQ,CAAC,CAAC,CAAA;AACrC,KAAA;GACH,CAAA;EAED,oBACIE,KAAA,CAAAC,aAAA,CAACC,iBAAiB,EAAKd,IAAI,eACvBY,KAAA,CAAAC,aAAA,CAACE,uBAAuB,QAAEjB,WAAqC,CAAC,eAChEc,KAAA,CAAAC,aAAA,CAACG,mBAAmB,EAAA;IAChBC,SAAS,EAAEC,OAAO,CAACC,aAAc;AACjC5B,IAAAA,KAAK,EAAEgB,aAAc;AACrBR,IAAAA,aAAa,EAAEU,kBAAAA;GAEdd,EAAAA,UAAU,aAAVA,UAAU,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAVA,UAAU,CAAEyB,GAAG,CAAC,UAACC,IAAI,EAAA;AAAA,IAAA,oBAClBT,KAAA,CAAAC,aAAA,CAACS,uBAAuB,EAAA;AACpBC,MAAAA,WAAW,EAAEF,IAAI,KAAKd,aAAa,GAAAiB,SAAA,KAAAA,SAAA,gBAAGZ,KAAA,CAAAC,aAAA,CAACY,QAAQ,EAAA;AAACC,QAAAA,IAAI,EAAC,IAAI;AAACC,QAAAA,KAAK,EAAC,SAAA;OAAW,CAAC,IAAGC,SAAU;AACzFC,MAAAA,GAAG,EAAER,IAAK;AACV9B,MAAAA,KAAK,EAAE8B,IAAK;MACZS,IAAI,EAAEC,MAAM,CAACV,IAAI,CAAA;AAAE,KACtB,CAAC,CAAA;GACL,CACgB,CACN,CAAC,CAAA;AAE5B;;;;"}
1
+ {"version":3,"file":"PaginationSelectPerPage.js","sources":["../../../../../src/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { IconDone } from '../../../../components/_Icon';\nimport { SelectPrimitiveValue } from '../../../Select';\nimport { defaultValues } from '../../utils';\nimport { classes } from '../../Pagination.tokens';\n\nimport type { PaginationSelectPerPageProps } from './PaginationSelectPerPage.types';\nimport {\n SelectPerPageRoot,\n SelectPerPageTypography,\n SelectPerPageSelect,\n SelectPerPageSelectItem,\n} from './PaginationSelectPerPage.styles';\n\nexport const PaginationSelectPerPage: React.FC<PaginationSelectPerPageProps> = ({\n value = defaultValues.perPage,\n valuesList = defaultValues.perPageList,\n textPerPage = defaultValues.textPerPage,\n onChangeValue,\n ...rest\n}) => {\n const [selectedValue, setSelectedValue] = useState(value);\n\n const handleSelectChange = (newValue?: SelectPrimitiveValue) => {\n if (newValue) {\n setSelectedValue(Number(newValue));\n onChangeValue?.(Number(newValue));\n }\n };\n\n return (\n <SelectPerPageRoot {...rest}>\n <SelectPerPageTypography>{textPerPage}</SelectPerPageTypography>\n <SelectPerPageSelect\n className={classes.selectWrapper}\n value={selectedValue}\n onChangeValue={handleSelectChange}\n >\n {valuesList?.map((item) => (\n <SelectPerPageSelectItem\n contentLeft={item === selectedValue ? <IconDone size=\"xs\" color=\"inherit\" /> : undefined}\n key={item}\n value={item}\n text={String(item)}\n />\n ))}\n </SelectPerPageSelect>\n </SelectPerPageRoot>\n );\n};\n"],"names":["PaginationSelectPerPage","_ref","_ref$value","value","defaultValues","perPage","_ref$valuesList","valuesList","perPageList","_ref$textPerPage","textPerPage","onChangeValue","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","selectedValue","setSelectedValue","handleSelectChange","newValue","Number","React","createElement","SelectPerPageRoot","SelectPerPageTypography","SelectPerPageSelect","className","classes","selectWrapper","map","item","SelectPerPageSelectItem","contentLeft","_IconDone","IconDone","size","color","undefined","key","text","String"],"mappings":";;;;;;;;;;IAeaA,uBAA+D,GAAG,SAAlEA,uBAA+DA,CAAAC,IAAA,EAMtE;AAAA,EAAA,IAAAC,UAAA,GAAAD,IAAA,CALFE,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAA,KAAA,CAAA,GAAGE,aAAa,CAACC,OAAO,GAAAH,UAAA;IAAAI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U,aAAVA,UAAU,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAVA,UAAU,CAAEyB,GAAG,CAAC,UAACC,IAAI,EAAA;AAAA,IAAA,oBAClBT,KAAA,CAAAC,aAAA,CAACS,uBAAuB,EAAA;AACpBC,MAAAA,WAAW,EAAEF,IAAI,KAAKd,aAAa,GAAAiB,SAAA,KAAAA,SAAA,gBAAGZ,KAAA,CAAAC,aAAA,CAACY,QAAQ,EAAA;AAACC,QAAAA,IAAI,EAAC,IAAI;AAACC,QAAAA,KAAK,EAAC,SAAA;OAAW,CAAC,IAAGC,SAAU;AACzFC,MAAAA,GAAG,EAAER,IAAK;AACV9B,MAAAA,KAAK,EAAE8B,IAAK;MACZS,IAAI,EAAEC,MAAM,CAACV,IAAI,CAAA;AAAE,KACtB,CAAC,CAAA;GACL,CACgB,CACN,CAAC,CAAA;AAE5B;;;;"}
@@ -96,7 +96,7 @@ var popoverRoot = function popoverRoot(Root) {
96
96
  forceUpdate = _usePopper.forceUpdate;
97
97
  var onEscape = useCallback(function (event) {
98
98
  if (isOpen && closeOnEsc && event.keyCode === ESCAPE_KEYCODE) {
99
- onToggle === null || onToggle === void 0 || onToggle(false, event);
99
+ onToggle === null || onToggle === void 0 ? void 0 : onToggle(false, event);
100
100
  }
101
101
  }, [closeOnEsc, isOpen, onToggle]);
102
102
  var onDocumentClick = useCallback(function (event) {
@@ -115,28 +115,28 @@ var popoverRoot = function popoverRoot(Root) {
115
115
  var targetIsPopover = event.target === popoverRef.current;
116
116
  var rootHasTarget = (_popoverRef$current = popoverRef.current) === null || _popoverRef$current === void 0 ? void 0 : _popoverRef$current.contains(event.target);
117
117
  if (!targetIsPopover && !rootHasTarget) {
118
- onToggle === null || onToggle === void 0 || onToggle(!isOpen, event);
118
+ onToggle === null || onToggle === void 0 ? void 0 : onToggle(!isOpen, event);
119
119
  }
120
120
  }
121
121
  }, [trigger, isOpen, onToggle]);
122
122
  var onMouseEnter = useCallback(function (event) {
123
123
  if (trigger === 'hover') {
124
- onToggle === null || onToggle === void 0 || onToggle(true, event);
124
+ onToggle === null || onToggle === void 0 ? void 0 : onToggle(true, event);
125
125
  }
126
126
  }, [trigger, onToggle]);
127
127
  var onMouseLeave = useCallback(function (event) {
128
128
  if (trigger === 'hover') {
129
- onToggle === null || onToggle === void 0 || onToggle(false, event);
129
+ onToggle === null || onToggle === void 0 ? void 0 : onToggle(false, event);
130
130
  }
131
131
  }, [trigger, onToggle]);
132
132
  var onFocus = useCallback(function (event) {
133
133
  if (trigger === 'hover') {
134
- onToggle === null || onToggle === void 0 || onToggle(true, event);
134
+ onToggle === null || onToggle === void 0 ? void 0 : onToggle(true, event);
135
135
  }
136
136
  }, [trigger, onToggle]);
137
137
  var onBlur = useCallback(function (event) {
138
138
  if (trigger === 'hover') {
139
- onToggle === null || onToggle === void 0 || onToggle(false, event);
139
+ onToggle === null || onToggle === void 0 ? void 0 : onToggle(false, event);
140
140
  }
141
141
  }, [trigger, onToggle]);
142
142
  useEffect(function () {
@@ -164,7 +164,7 @@ var popoverRoot = function popoverRoot(Root) {
164
164
  portal.setAttribute('id', POPOVER_PORTAL_ID);
165
165
  if (typeof frame === 'string' && frame !== 'document') {
166
166
  var _document$getElementB;
167
- (_document$getElementB = document.getElementById(frame)) === null || _document$getElementB === void 0 || _document$getElementB.appendChild(portal);
167
+ (_document$getElementB = document.getElementById(frame)) === null || _document$getElementB === void 0 ? void 0 : _document$getElementB.appendChild(portal);
168
168
  } else {
169
169
  document.body.appendChild(portal);
170
170
  }