@salutejs/plasma-new-hope 0.77.0-canary.1185.8720575745.0 → 0.77.0-canary.1195.8808345201.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (612) hide show
  1. package/cjs/_virtual/_rollupPluginBabelHelpers.js +1 -1
  2. package/cjs/components/Avatar/Avatar.js +28 -3
  3. package/cjs/components/Avatar/Avatar.js.map +1 -1
  4. package/cjs/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  5. package/cjs/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  6. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  7. package/cjs/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  8. package/cjs/components/Calendar/hoc/withRange.js +1 -1
  9. package/cjs/components/Calendar/hoc/withRange.js.map +1 -1
  10. package/cjs/components/Calendar/hooks/useKeyNavigation.js +19 -19
  11. package/cjs/components/Calendar/hooks/useKeyNavigation.js.map +1 -1
  12. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
  13. package/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  14. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
  15. package/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  16. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  17. package/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  18. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  19. package/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  20. package/cjs/components/Chip/Chip.js +2 -2
  21. package/cjs/components/Chip/Chip.js.map +1 -1
  22. package/cjs/components/Combobox/Combobox.css +2 -2
  23. package/cjs/components/Combobox/Combobox.js +5 -5
  24. package/cjs/components/Combobox/Combobox.js.map +1 -1
  25. package/cjs/components/Combobox/hooks/useFocusController.js +9 -9
  26. package/cjs/components/Combobox/hooks/useFocusController.js.map +1 -1
  27. package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
  28. package/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js.map +1 -1
  29. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +2 -2
  30. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
  31. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +2 -2
  32. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
  33. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +2 -2
  34. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
  35. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +2 -2
  36. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
  37. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +2 -2
  38. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.js +1 -1
  39. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +1 -1
  40. package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
  41. package/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js.map +1 -1
  42. package/cjs/components/Drawer/DrawerContext.js +1 -1
  43. package/cjs/components/Drawer/DrawerContext.js.map +1 -1
  44. package/cjs/components/Dropdown/Dropdown.css +2 -2
  45. package/cjs/components/Dropdown/Dropdown.js +4 -27
  46. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  47. package/cjs/components/Dropdown/Dropdown.styles.js +1 -1
  48. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  49. package/cjs/components/Dropdown/{Dropdown.styles_13400l5.css → Dropdown.styles_1daxhqh.css} +1 -1
  50. package/cjs/components/Dropdown/Dropdown.tokens.js +0 -1
  51. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  52. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -7
  53. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  54. package/cjs/components/Dropdown/utils/index.js +0 -43
  55. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  56. package/cjs/components/IconButton/IconButton.css +27 -0
  57. package/cjs/components/IconButton/IconButton.js +84 -0
  58. package/cjs/components/IconButton/IconButton.js.map +1 -0
  59. package/cjs/components/IconButton/IconButton.styles.js +27 -0
  60. package/cjs/components/IconButton/IconButton.styles.js.map +1 -0
  61. package/cjs/components/IconButton/IconButton.styles_gh8fim.css +4 -0
  62. package/cjs/components/IconButton/IconButton.tokens.js +36 -0
  63. package/cjs/components/IconButton/IconButton.tokens.js.map +1 -0
  64. package/cjs/components/IconButton/variations/_disabled/base.js +9 -0
  65. package/cjs/components/IconButton/variations/_disabled/base.js.map +1 -0
  66. package/cjs/components/IconButton/variations/_disabled/base_x642ct.css +1 -0
  67. package/cjs/components/IconButton/variations/_focused/base.js +9 -0
  68. package/cjs/components/IconButton/variations/_focused/base.js.map +1 -0
  69. package/cjs/components/IconButton/variations/_focused/base_x642ct.css +1 -0
  70. package/cjs/components/IconButton/variations/_size/base.js +9 -0
  71. package/cjs/components/IconButton/variations/_size/base.js.map +1 -0
  72. package/cjs/components/IconButton/variations/_size/base_x642ct.css +1 -0
  73. package/cjs/components/IconButton/variations/_view/base.js +9 -0
  74. package/cjs/components/IconButton/variations/_view/base.js.map +1 -0
  75. package/cjs/components/IconButton/variations/_view/base_x642ct.css +1 -0
  76. package/cjs/components/Modal/ModalContext.js +1 -1
  77. package/cjs/components/Modal/ModalContext.js.map +1 -1
  78. package/cjs/components/Overlay/Overlay.js +1 -1
  79. package/cjs/components/Overlay/Overlay.js.map +1 -1
  80. package/cjs/components/Pagination/Pagination.css +2 -2
  81. package/cjs/components/Pagination/Pagination.js +2 -2
  82. package/cjs/components/Pagination/Pagination.js.map +1 -1
  83. package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
  84. package/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map +1 -1
  85. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
  86. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
  87. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
  88. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  89. package/cjs/components/Popover/Popover.js +7 -7
  90. package/cjs/components/Popover/Popover.js.map +1 -1
  91. package/cjs/components/Popup/Popup.js +1 -1
  92. package/cjs/components/Popup/Popup.js.map +1 -1
  93. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
  94. package/cjs/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
  95. package/cjs/components/Select/Select.css +2 -2
  96. package/cjs/components/Select/Select.js +5 -5
  97. package/cjs/components/Select/Select.js.map +1 -1
  98. package/cjs/components/Select/hooks/useKeyNavigation.js +12 -12
  99. package/cjs/components/Select/hooks/useKeyNavigation.js.map +1 -1
  100. package/cjs/components/Select/ui/SelectChip/SelectChip.js +1 -1
  101. package/cjs/components/Select/ui/SelectChip/SelectChip.js.map +1 -1
  102. package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +2 -2
  103. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
  104. package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +2 -2
  105. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
  106. package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +2 -2
  107. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
  108. package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +2 -2
  109. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
  110. package/cjs/components/Select/ui/SelectItem/SelectItem.css +2 -2
  111. package/cjs/components/Select/ui/SelectItem/SelectItem.js +1 -1
  112. package/cjs/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
  113. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
  114. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  115. package/cjs/components/Select/utils/index.js +2 -2
  116. package/cjs/components/Select/utils/index.js.map +1 -1
  117. package/cjs/components/Tabs/TabsContext.js +1 -2
  118. package/cjs/components/Tabs/TabsContext.js.map +1 -1
  119. package/cjs/components/Tabs/ui/TabItem/TabItem.js +1 -1
  120. package/cjs/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
  121. package/cjs/components/Tabs/ui/Tabs/Tabs.js +2 -2
  122. package/cjs/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
  123. package/cjs/components/TextArea/TextArea.js +1 -1
  124. package/cjs/components/TextArea/TextArea.js.map +1 -1
  125. package/cjs/components/TextField/TextField.js +2 -2
  126. package/cjs/components/TextField/TextField.js.map +1 -1
  127. package/cjs/components/TextField/hooks/useKeyNavigation.js +9 -9
  128. package/cjs/components/TextField/hooks/useKeyNavigation.js.map +1 -1
  129. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
  130. package/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  131. package/cjs/components/Toast/ToastProvider/ToastProvider.js +2 -2
  132. package/cjs/components/Toast/ToastProvider/ToastProvider.js.map +1 -1
  133. package/cjs/components/Tooltip/Tooltip.js +1 -1
  134. package/cjs/components/Tooltip/Tooltip.js.map +1 -1
  135. package/cjs/index.css +7 -2
  136. package/cjs/index.js +6 -2
  137. package/cjs/index.js.map +1 -1
  138. package/es/_virtual/_rollupPluginBabelHelpers.js +1 -1
  139. package/es/components/Avatar/Avatar.js +29 -4
  140. package/es/components/Avatar/Avatar.js.map +1 -1
  141. package/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  142. package/es/components/Calendar/CalendarBase/CalendarBase.js.map +1 -1
  143. package/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  144. package/es/components/Calendar/CalendarDouble/CalendarDouble.js.map +1 -1
  145. package/es/components/Calendar/hoc/withRange.js +1 -1
  146. package/es/components/Calendar/hoc/withRange.js.map +1 -1
  147. package/es/components/Calendar/hooks/useKeyNavigation.js +19 -19
  148. package/es/components/Calendar/hooks/useKeyNavigation.js.map +1 -1
  149. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
  150. package/es/components/Calendar/ui/CalendarDays/CalendarDays.js.map +1 -1
  151. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
  152. package/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js.map +1 -1
  153. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  154. package/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js.map +1 -1
  155. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  156. package/es/components/Calendar/ui/CalendarYears/CalendarYears.js.map +1 -1
  157. package/es/components/Chip/Chip.js +2 -2
  158. package/es/components/Chip/Chip.js.map +1 -1
  159. package/es/components/Combobox/Combobox.css +2 -2
  160. package/es/components/Combobox/Combobox.js +5 -5
  161. package/es/components/Combobox/Combobox.js.map +1 -1
  162. package/es/components/Combobox/hooks/useFocusController.js +9 -9
  163. package/es/components/Combobox/hooks/useFocusController.js.map +1 -1
  164. package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
  165. package/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js.map +1 -1
  166. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +2 -2
  167. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.js +1 -1
  168. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +2 -2
  169. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.js +1 -1
  170. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +2 -2
  171. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.js +1 -1
  172. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +2 -2
  173. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.js +1 -1
  174. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +2 -2
  175. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.js +1 -1
  176. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.styles.js +1 -1
  177. package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
  178. package/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js.map +1 -1
  179. package/es/components/Drawer/DrawerContext.js +1 -1
  180. package/es/components/Drawer/DrawerContext.js.map +1 -1
  181. package/es/components/Dropdown/Dropdown.css +2 -2
  182. package/es/components/Dropdown/Dropdown.js +6 -29
  183. package/es/components/Dropdown/Dropdown.js.map +1 -1
  184. package/es/components/Dropdown/Dropdown.styles.js +1 -1
  185. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  186. package/es/components/Dropdown/{Dropdown.styles_13400l5.css → Dropdown.styles_1daxhqh.css} +1 -1
  187. package/es/components/Dropdown/Dropdown.tokens.js +0 -1
  188. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  189. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +5 -7
  190. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  191. package/es/components/Dropdown/utils/index.js +3 -45
  192. package/es/components/Dropdown/utils/index.js.map +1 -1
  193. package/es/components/IconButton/IconButton.css +27 -0
  194. package/es/components/IconButton/IconButton.js +79 -0
  195. package/es/components/IconButton/IconButton.js.map +1 -0
  196. package/es/components/IconButton/IconButton.styles.js +22 -0
  197. package/es/components/IconButton/IconButton.styles.js.map +1 -0
  198. package/es/components/IconButton/IconButton.styles_gh8fim.css +4 -0
  199. package/es/components/IconButton/IconButton.tokens.js +31 -0
  200. package/es/components/IconButton/IconButton.tokens.js.map +1 -0
  201. package/es/components/IconButton/variations/_disabled/base.js +5 -0
  202. package/es/components/IconButton/variations/_disabled/base.js.map +1 -0
  203. package/es/components/IconButton/variations/_disabled/base_x642ct.css +1 -0
  204. package/es/components/IconButton/variations/_focused/base.js +5 -0
  205. package/es/components/IconButton/variations/_focused/base.js.map +1 -0
  206. package/es/components/IconButton/variations/_focused/base_x642ct.css +1 -0
  207. package/es/components/IconButton/variations/_size/base.js +5 -0
  208. package/es/components/IconButton/variations/_size/base.js.map +1 -0
  209. package/es/components/IconButton/variations/_size/base_x642ct.css +1 -0
  210. package/es/components/IconButton/variations/_view/base.js +5 -0
  211. package/es/components/IconButton/variations/_view/base.js.map +1 -0
  212. package/es/components/IconButton/variations/_view/base_x642ct.css +1 -0
  213. package/es/components/Modal/ModalContext.js +1 -1
  214. package/es/components/Modal/ModalContext.js.map +1 -1
  215. package/es/components/Overlay/Overlay.js +1 -1
  216. package/es/components/Overlay/Overlay.js.map +1 -1
  217. package/es/components/Pagination/Pagination.css +2 -2
  218. package/es/components/Pagination/Pagination.js +2 -2
  219. package/es/components/Pagination/Pagination.js.map +1 -1
  220. package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
  221. package/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js.map +1 -1
  222. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +2 -2
  223. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
  224. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js.map +1 -1
  225. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.styles.js +1 -1
  226. package/es/components/Popover/Popover.js +7 -7
  227. package/es/components/Popover/Popover.js.map +1 -1
  228. package/es/components/Popup/Popup.js +1 -1
  229. package/es/components/Popup/Popup.js.map +1 -1
  230. package/es/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
  231. package/es/components/Segment/ui/SegmentItem/SegmentItem.js.map +1 -1
  232. package/es/components/Select/Select.css +2 -2
  233. package/es/components/Select/Select.js +5 -5
  234. package/es/components/Select/Select.js.map +1 -1
  235. package/es/components/Select/hooks/useKeyNavigation.js +12 -12
  236. package/es/components/Select/hooks/useKeyNavigation.js.map +1 -1
  237. package/es/components/Select/ui/SelectChip/SelectChip.js +1 -1
  238. package/es/components/Select/ui/SelectChip/SelectChip.js.map +1 -1
  239. package/es/components/Select/ui/SelectDivider/SelectDivider.css +2 -2
  240. package/es/components/Select/ui/SelectDivider/SelectDivider.js +1 -1
  241. package/es/components/Select/ui/SelectFooter/SelectFooter.css +2 -2
  242. package/es/components/Select/ui/SelectFooter/SelectFooter.js +1 -1
  243. package/es/components/Select/ui/SelectGroup/SelectGroup.css +2 -2
  244. package/es/components/Select/ui/SelectGroup/SelectGroup.js +1 -1
  245. package/es/components/Select/ui/SelectHeader/SelectHeader.css +2 -2
  246. package/es/components/Select/ui/SelectHeader/SelectHeader.js +1 -1
  247. package/es/components/Select/ui/SelectItem/SelectItem.css +2 -2
  248. package/es/components/Select/ui/SelectItem/SelectItem.js +1 -1
  249. package/es/components/Select/ui/SelectItem/SelectItem.styles.js +1 -1
  250. package/es/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
  251. package/es/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  252. package/es/components/Select/utils/index.js +2 -2
  253. package/es/components/Select/utils/index.js.map +1 -1
  254. package/es/components/Tabs/TabsContext.js +1 -2
  255. package/es/components/Tabs/TabsContext.js.map +1 -1
  256. package/es/components/Tabs/ui/TabItem/TabItem.js +1 -1
  257. package/es/components/Tabs/ui/TabItem/TabItem.js.map +1 -1
  258. package/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
  259. package/es/components/Tabs/ui/Tabs/Tabs.js.map +1 -1
  260. package/es/components/TextArea/TextArea.js +1 -1
  261. package/es/components/TextArea/TextArea.js.map +1 -1
  262. package/es/components/TextField/TextField.js +2 -2
  263. package/es/components/TextField/TextField.js.map +1 -1
  264. package/es/components/TextField/hooks/useKeyNavigation.js +9 -9
  265. package/es/components/TextField/hooks/useKeyNavigation.js.map +1 -1
  266. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
  267. package/es/components/TextField/ui/TextFieldChip/TextFieldChip.js.map +1 -1
  268. package/es/components/Toast/ToastProvider/ToastProvider.js +2 -2
  269. package/es/components/Toast/ToastProvider/ToastProvider.js.map +1 -1
  270. package/es/components/Tooltip/Tooltip.js +1 -1
  271. package/es/components/Tooltip/Tooltip.js.map +1 -1
  272. package/es/index.css +7 -2
  273. package/es/index.js +2 -1
  274. package/es/index.js.map +1 -1
  275. package/package.json +12 -12
  276. package/styled-components/cjs/components/Avatar/Avatar.js +34 -4
  277. package/styled-components/cjs/components/Avatar/Avatar.styles.js +1 -1
  278. package/styled-components/cjs/components/Avatar/Avatar.template-doc.mdx +52 -2
  279. package/styled-components/cjs/components/AvatarGroup/AvatarGroup.js +1 -1
  280. package/styled-components/cjs/components/Badge/Badge.js +1 -1
  281. package/styled-components/cjs/components/Badge/Badge.styles.js +1 -1
  282. package/styled-components/cjs/components/Button/Button.js +2 -2
  283. package/styled-components/cjs/components/Button/Button.styles.js +1 -1
  284. package/styled-components/cjs/components/ButtonGroup/ButtonGroup.js +1 -1
  285. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.js +2 -2
  286. package/styled-components/cjs/components/Calendar/CalendarBase/CalendarBase.styles.js +1 -1
  287. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.js +2 -2
  288. package/styled-components/cjs/components/Calendar/CalendarDouble/CalendarDouble.styles.js +1 -1
  289. package/styled-components/cjs/components/Calendar/hoc/withRange.js +2 -2
  290. package/styled-components/cjs/components/Calendar/hooks/useKeyNavigation.js +20 -20
  291. package/styled-components/cjs/components/Calendar/store/reducer.js +1 -1
  292. package/styled-components/cjs/components/Calendar/ui/CalendarDayItem/CalendarDayItem.js +1 -1
  293. package/styled-components/cjs/components/Calendar/ui/CalendarDays/CalendarDays.js +4 -4
  294. package/styled-components/cjs/components/Calendar/ui/CalendarHeader/CalendarHeader.js +3 -3
  295. package/styled-components/cjs/components/Calendar/ui/CalendarMonths/CalendarMonths.js +2 -2
  296. package/styled-components/cjs/components/Calendar/ui/CalendarYears/CalendarYears.js +2 -2
  297. package/styled-components/cjs/components/Cell/Cell.js +1 -1
  298. package/styled-components/cjs/components/Cell/Cell.styles.js +1 -1
  299. package/styled-components/cjs/components/Checkbox/Checkbox.js +1 -1
  300. package/styled-components/cjs/components/Chip/Chip.js +3 -3
  301. package/styled-components/cjs/components/Chip/Chip.styles.js +1 -1
  302. package/styled-components/cjs/components/Combobox/Combobox.js +6 -6
  303. package/styled-components/cjs/components/Combobox/hooks/useFocusController.js +9 -9
  304. package/styled-components/cjs/components/Combobox/ui/ComboboxChip/ComboboxChip.js +2 -2
  305. package/styled-components/cjs/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +7 -7
  306. package/styled-components/cjs/components/Counter/Counter.js +1 -1
  307. package/styled-components/cjs/components/Divider/Divider.js +2 -2
  308. package/styled-components/cjs/components/Drawer/Drawer.js +1 -1
  309. package/styled-components/cjs/components/Drawer/DrawerContext.js +1 -1
  310. package/styled-components/cjs/components/Drawer/hooks/useDrawer.js +1 -1
  311. package/styled-components/cjs/components/Drawer/ui/DrawerContent/DrawerContent.js +1 -1
  312. package/styled-components/cjs/components/Drawer/ui/DrawerFooter/DrawerFooter.js +1 -1
  313. package/styled-components/cjs/components/Drawer/ui/DrawerHeader/DrawerHeader.js +1 -1
  314. package/styled-components/cjs/components/Dropdown/Dropdown.js +7 -29
  315. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +1 -1
  316. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +0 -1
  317. package/styled-components/cjs/components/Dropdown/index.js +1 -9
  318. package/styled-components/cjs/components/Dropdown/ui/DropdownDivider/DropdownDivider.js +1 -1
  319. package/styled-components/cjs/components/Dropdown/ui/DropdownFooter/DropdownFooter.js +1 -1
  320. package/styled-components/cjs/components/Dropdown/ui/DropdownGroup/DropdownGroup.js +1 -1
  321. package/styled-components/cjs/components/Dropdown/ui/DropdownHeader/DropdownHeader.js +1 -1
  322. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +7 -9
  323. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +1 -1
  324. package/styled-components/cjs/components/Dropdown/utils/index.js +2 -49
  325. package/styled-components/cjs/components/Grid/Grid.js +2 -2
  326. package/styled-components/cjs/components/Grid/ui/Col/Col.js +2 -2
  327. package/styled-components/cjs/components/Grid/ui/Row/Row.js +1 -1
  328. package/styled-components/cjs/components/Grid/utils/index.js +1 -1
  329. package/styled-components/cjs/components/Header/HeaderRoot/HeaderRoot.js +1 -1
  330. package/styled-components/cjs/components/Header/ui/HeaderArrow/HeaderArrow.js +1 -1
  331. package/styled-components/cjs/components/Header/ui/HeaderLogo/HeaderLogo.js +1 -1
  332. package/styled-components/cjs/components/Header/ui/HeaderTitleWrapper/HeaderTitleWrapper.js +1 -1
  333. package/styled-components/cjs/components/IconButton/IconButton.js +86 -0
  334. package/styled-components/cjs/components/IconButton/IconButton.styles.js +29 -0
  335. package/styled-components/cjs/components/IconButton/IconButton.tokens.js +34 -0
  336. package/styled-components/cjs/components/IconButton/IconButton.types.js +5 -0
  337. package/styled-components/cjs/components/IconButton/index.js +31 -0
  338. package/styled-components/cjs/components/IconButton/variations/_disabled/base.js +8 -0
  339. package/styled-components/cjs/components/IconButton/variations/_disabled/tokens.json +1 -0
  340. package/styled-components/cjs/components/IconButton/variations/_focused/base.js +8 -0
  341. package/styled-components/cjs/components/IconButton/variations/_focused/tokens.json +1 -0
  342. package/styled-components/cjs/components/IconButton/variations/_size/base.js +8 -0
  343. package/styled-components/cjs/components/IconButton/variations/_size/tokens.json +1 -0
  344. package/styled-components/cjs/components/IconButton/variations/_view/base.js +8 -0
  345. package/styled-components/cjs/components/IconButton/variations/_view/tokens.json +1 -0
  346. package/styled-components/cjs/components/Image/Image.js +2 -2
  347. package/styled-components/cjs/components/Image/Image.styles.js +1 -1
  348. package/styled-components/cjs/components/Indicator/Indicator.js +1 -1
  349. package/styled-components/cjs/components/Link/Link.js +1 -1
  350. package/styled-components/cjs/components/Modal/Modal.js +1 -1
  351. package/styled-components/cjs/components/Modal/ModalContext.js +1 -1
  352. package/styled-components/cjs/components/Modal/hooks/useModal.js +1 -1
  353. package/styled-components/cjs/components/Notification/Notification.js +1 -1
  354. package/styled-components/cjs/components/Notification/Notification.styles.js +1 -1
  355. package/styled-components/cjs/components/Notification/NotificationsPortal.js +1 -1
  356. package/styled-components/cjs/components/Notification/NotificationsStore.js +1 -1
  357. package/styled-components/cjs/components/Overlay/Overlay.js +2 -2
  358. package/styled-components/cjs/components/Pagination/Pagination.js +3 -3
  359. package/styled-components/cjs/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +2 -2
  360. package/styled-components/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +2 -2
  361. package/styled-components/cjs/components/Panel/Panel.js +2 -2
  362. package/styled-components/cjs/components/Panel/ui/PanelContent/PanelContent.js +1 -1
  363. package/styled-components/cjs/components/Panel/ui/PanelFooter/PanelFooter.js +1 -1
  364. package/styled-components/cjs/components/Panel/ui/PanelHeader/PanelHeader.js +1 -1
  365. package/styled-components/cjs/components/Popover/Popover.js +9 -9
  366. package/styled-components/cjs/components/Popup/Popup.js +2 -2
  367. package/styled-components/cjs/components/Popup/PopupContext.js +1 -1
  368. package/styled-components/cjs/components/Popup/PopupRoot.js +1 -1
  369. package/styled-components/cjs/components/Popup/hooks/usePopup.js +1 -1
  370. package/styled-components/cjs/components/Progress/Progress.js +1 -1
  371. package/styled-components/cjs/components/Progress/Progress.styles.js +1 -1
  372. package/styled-components/cjs/components/Radiobox/Radiobox.js +1 -1
  373. package/styled-components/cjs/components/SSRProvider/SSRProvider.js +1 -1
  374. package/styled-components/cjs/components/Segment/SegmentProvider/SegmentProvider.js +1 -1
  375. package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +1 -1
  376. package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.styles.js +1 -1
  377. package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.js +3 -3
  378. package/styled-components/cjs/components/Segment/ui/SegmentItem/SegmentItem.styles.js +1 -1
  379. package/styled-components/cjs/components/Select/Select.js +6 -6
  380. package/styled-components/cjs/components/Select/hooks/useKeyNavigation.js +12 -12
  381. package/styled-components/cjs/components/Select/ui/SelectChip/SelectChip.js +2 -2
  382. package/styled-components/cjs/components/Select/ui/SelectTarget/SelectTarget.js +3 -3
  383. package/styled-components/cjs/components/Select/utils/index.js +3 -3
  384. package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.js +1 -1
  385. package/styled-components/cjs/components/Skeleton/LineSkeleton/LineSkeleton.styles.js +1 -1
  386. package/styled-components/cjs/components/Skeleton/RectSkeleton/RectSkeleton.js +1 -1
  387. package/styled-components/cjs/components/Skeleton/TextSkeleton/TextSkeleton.js +2 -2
  388. package/styled-components/cjs/components/Skeleton/hoc/withSkeleton.js +1 -1
  389. package/styled-components/cjs/components/Spinner/Spinner.js +1 -1
  390. package/styled-components/cjs/components/Spinner/Spinner.styles.js +1 -1
  391. package/styled-components/cjs/components/Spinner/utils/index.js +1 -1
  392. package/styled-components/cjs/components/Switch/Switch.js +1 -1
  393. package/styled-components/cjs/components/Tabs/TabsContext.js +2 -3
  394. package/styled-components/cjs/components/Tabs/createTabsController.js +1 -1
  395. package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.js +2 -2
  396. package/styled-components/cjs/components/Tabs/ui/TabItem/TabItem.styles.js +1 -1
  397. package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.js +3 -3
  398. package/styled-components/cjs/components/Tabs/ui/Tabs/Tabs.styles.js +1 -1
  399. package/styled-components/cjs/components/TextArea/TextArea.js +2 -2
  400. package/styled-components/cjs/components/TextField/TextField.js +3 -3
  401. package/styled-components/cjs/components/TextField/hooks/useKeyNavigation.js +9 -9
  402. package/styled-components/cjs/components/TextField/ui/TextFieldChip/TextFieldChip.js +2 -2
  403. package/styled-components/cjs/components/Toast/Toast.js +2 -2
  404. package/styled-components/cjs/components/Toast/Toast.styles.js +1 -1
  405. package/styled-components/cjs/components/Toast/ToastController.js +2 -2
  406. package/styled-components/cjs/components/Toast/ToastProvider/ToastProvider.js +3 -3
  407. package/styled-components/cjs/components/Toolbar/Toolbar.js +1 -1
  408. package/styled-components/cjs/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  409. package/styled-components/cjs/components/Tooltip/Tooltip.js +2 -2
  410. package/styled-components/cjs/components/Typography/Old/Subtitle/Subtitle.js +2 -2
  411. package/styled-components/cjs/components/Typography/Old/TypographyOld.js +2 -2
  412. package/styled-components/cjs/components/Typography/Typography.js +2 -2
  413. package/styled-components/cjs/engines/common.js +1 -1
  414. package/styled-components/cjs/engines/styled-components.js +1 -1
  415. package/styled-components/cjs/examples/_helpers.js +1 -1
  416. package/styled-components/cjs/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +26 -1
  417. package/styled-components/cjs/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
  418. package/styled-components/cjs/examples/plasma_b2c/components/Button/Button.stories.tsx +27 -11
  419. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +1 -1
  420. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +7 -27
  421. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +1 -1
  422. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
  423. package/styled-components/cjs/examples/plasma_b2c/components/Grid/Grid.config.js +1 -1
  424. package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.config.js +45 -0
  425. package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.js +11 -0
  426. package/styled-components/cjs/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +65 -0
  427. package/styled-components/cjs/examples/plasma_b2c/components/Radiobox/Radiobox.stories.tsx +37 -43
  428. package/styled-components/cjs/examples/plasma_web/components/Avatar/Avatar.stories.tsx +26 -1
  429. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +1 -1
  430. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +8 -27
  431. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +1 -1
  432. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
  433. package/styled-components/cjs/examples/plasma_web/components/Grid/Grid.config.js +1 -1
  434. package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.config.js +45 -0
  435. package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.js +11 -0
  436. package/styled-components/cjs/examples/plasma_web/components/IconButton/IconButton.stories.tsx +65 -0
  437. package/styled-components/cjs/examples/plasma_web/components/Radiobox/Radiobox.stories.tsx +37 -43
  438. package/styled-components/cjs/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +27 -1
  439. package/styled-components/cjs/examples/sds_engineer/components/Grid/Grid.config.js +1 -1
  440. package/styled-components/cjs/index.js +11 -0
  441. package/styled-components/cjs/mixins/applySpacing.js +1 -1
  442. package/styled-components/cjs/mixins/typography.js +1 -1
  443. package/styled-components/es/components/Avatar/Avatar.js +34 -3
  444. package/styled-components/es/components/Avatar/Avatar.template-doc.mdx +52 -2
  445. package/styled-components/es/components/Button/Button.js +1 -1
  446. package/styled-components/es/components/Calendar/CalendarBase/CalendarBase.js +1 -1
  447. package/styled-components/es/components/Calendar/CalendarDouble/CalendarDouble.js +1 -1
  448. package/styled-components/es/components/Calendar/hoc/withRange.js +1 -1
  449. package/styled-components/es/components/Calendar/hooks/useKeyNavigation.js +20 -20
  450. package/styled-components/es/components/Calendar/store/reducer.js +1 -1
  451. package/styled-components/es/components/Calendar/ui/CalendarDays/CalendarDays.js +3 -3
  452. package/styled-components/es/components/Calendar/ui/CalendarHeader/CalendarHeader.js +2 -2
  453. package/styled-components/es/components/Calendar/ui/CalendarMonths/CalendarMonths.js +1 -1
  454. package/styled-components/es/components/Calendar/ui/CalendarYears/CalendarYears.js +1 -1
  455. package/styled-components/es/components/Chip/Chip.js +2 -2
  456. package/styled-components/es/components/Combobox/Combobox.js +5 -5
  457. package/styled-components/es/components/Combobox/hooks/useFocusController.js +9 -9
  458. package/styled-components/es/components/Combobox/ui/ComboboxChip/ComboboxChip.js +1 -1
  459. package/styled-components/es/components/Combobox/ui/ComboboxTarget/ComboboxTarget.js +6 -6
  460. package/styled-components/es/components/Divider/Divider.js +1 -1
  461. package/styled-components/es/components/Drawer/DrawerContext.js +1 -1
  462. package/styled-components/es/components/Drawer/hooks/useDrawer.js +1 -1
  463. package/styled-components/es/components/Drawer/ui/DrawerContent/DrawerContent.js +1 -1
  464. package/styled-components/es/components/Drawer/ui/DrawerFooter/DrawerFooter.js +1 -1
  465. package/styled-components/es/components/Drawer/ui/DrawerHeader/DrawerHeader.js +1 -1
  466. package/styled-components/es/components/Dropdown/Dropdown.js +6 -29
  467. package/styled-components/es/components/Dropdown/Dropdown.styles.js +1 -1
  468. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +0 -1
  469. package/styled-components/es/components/Dropdown/index.js +0 -1
  470. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +6 -8
  471. package/styled-components/es/components/Dropdown/utils/index.js +1 -48
  472. package/styled-components/es/components/Grid/Grid.js +1 -1
  473. package/styled-components/es/components/Grid/ui/Col/Col.js +1 -1
  474. package/styled-components/es/components/Grid/utils/index.js +1 -1
  475. package/styled-components/es/components/IconButton/IconButton.js +77 -0
  476. package/styled-components/es/components/IconButton/IconButton.styles.js +22 -0
  477. package/styled-components/es/components/IconButton/IconButton.tokens.js +28 -0
  478. package/styled-components/es/components/IconButton/IconButton.types.js +1 -0
  479. package/styled-components/es/components/IconButton/index.js +2 -0
  480. package/styled-components/es/components/IconButton/variations/_disabled/base.js +2 -0
  481. package/styled-components/es/components/IconButton/variations/_disabled/tokens.json +1 -0
  482. package/styled-components/es/components/IconButton/variations/_focused/base.js +2 -0
  483. package/styled-components/es/components/IconButton/variations/_focused/tokens.json +1 -0
  484. package/styled-components/es/components/IconButton/variations/_size/base.js +2 -0
  485. package/styled-components/es/components/IconButton/variations/_size/tokens.json +1 -0
  486. package/styled-components/es/components/IconButton/variations/_view/base.js +2 -0
  487. package/styled-components/es/components/IconButton/variations/_view/tokens.json +1 -0
  488. package/styled-components/es/components/Image/Image.js +1 -1
  489. package/styled-components/es/components/Modal/ModalContext.js +1 -1
  490. package/styled-components/es/components/Modal/hooks/useModal.js +1 -1
  491. package/styled-components/es/components/Notification/NotificationsStore.js +1 -1
  492. package/styled-components/es/components/Overlay/Overlay.js +1 -1
  493. package/styled-components/es/components/Pagination/Pagination.js +2 -2
  494. package/styled-components/es/components/Pagination/ui/PaginationQuickJumpToPage/PaginationQuickJumpToPage.js +1 -1
  495. package/styled-components/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.js +1 -1
  496. package/styled-components/es/components/Panel/Panel.js +1 -1
  497. package/styled-components/es/components/Popover/Popover.js +8 -8
  498. package/styled-components/es/components/Popup/Popup.js +1 -1
  499. package/styled-components/es/components/Popup/hooks/usePopup.js +1 -1
  500. package/styled-components/es/components/Segment/ui/SegmentItem/SegmentItem.js +2 -2
  501. package/styled-components/es/components/Select/Select.js +5 -5
  502. package/styled-components/es/components/Select/hooks/useKeyNavigation.js +12 -12
  503. package/styled-components/es/components/Select/ui/SelectChip/SelectChip.js +1 -1
  504. package/styled-components/es/components/Select/ui/SelectTarget/SelectTarget.js +2 -2
  505. package/styled-components/es/components/Select/utils/index.js +3 -3
  506. package/styled-components/es/components/Skeleton/TextSkeleton/TextSkeleton.js +1 -1
  507. package/styled-components/es/components/Skeleton/hoc/withSkeleton.js +1 -1
  508. package/styled-components/es/components/Spinner/utils/index.js +1 -1
  509. package/styled-components/es/components/Tabs/TabsContext.js +2 -3
  510. package/styled-components/es/components/Tabs/ui/TabItem/TabItem.js +1 -1
  511. package/styled-components/es/components/Tabs/ui/Tabs/Tabs.js +2 -2
  512. package/styled-components/es/components/TextArea/TextArea.js +1 -1
  513. package/styled-components/es/components/TextField/TextField.js +2 -2
  514. package/styled-components/es/components/TextField/hooks/useKeyNavigation.js +9 -9
  515. package/styled-components/es/components/TextField/ui/TextFieldChip/TextFieldChip.js +1 -1
  516. package/styled-components/es/components/Toast/Toast.js +1 -1
  517. package/styled-components/es/components/Toast/ToastController.js +1 -1
  518. package/styled-components/es/components/Toast/ToastProvider/ToastProvider.js +2 -2
  519. package/styled-components/es/components/Toolbar/ui/ToolbarDivider/ToolbarDivider.js +1 -1
  520. package/styled-components/es/components/Tooltip/Tooltip.js +1 -1
  521. package/styled-components/es/components/Typography/Old/Subtitle/Subtitle.js +1 -1
  522. package/styled-components/es/components/Typography/Old/TypographyOld.js +1 -1
  523. package/styled-components/es/components/Typography/Typography.js +1 -1
  524. package/styled-components/es/engines/common.js +1 -1
  525. package/styled-components/es/examples/_helpers.js +1 -1
  526. package/styled-components/es/examples/plasma_b2c/components/Avatar/Avatar.stories.tsx +26 -1
  527. package/styled-components/es/examples/plasma_b2c/components/AvatarGroup/AvatarGroup.stories.tsx +36 -18
  528. package/styled-components/es/examples/plasma_b2c/components/Button/Button.stories.tsx +27 -11
  529. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.js +1 -1
  530. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.stories.tsx +7 -27
  531. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.js +1 -1
  532. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
  533. package/styled-components/es/examples/plasma_b2c/components/Grid/Grid.config.js +1 -1
  534. package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.config.js +39 -0
  535. package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.js +5 -0
  536. package/styled-components/es/examples/plasma_b2c/components/IconButton/IconButton.stories.tsx +65 -0
  537. package/styled-components/es/examples/plasma_b2c/components/Radiobox/Radiobox.stories.tsx +37 -43
  538. package/styled-components/es/examples/plasma_web/components/Avatar/Avatar.stories.tsx +26 -1
  539. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.js +1 -1
  540. package/styled-components/es/examples/plasma_web/components/Dropdown/Normal/Dropdown.stories.tsx +8 -27
  541. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.js +1 -1
  542. package/styled-components/es/examples/plasma_web/components/Dropdown/Tight/Dropdown.stories.tsx +8 -27
  543. package/styled-components/es/examples/plasma_web/components/Grid/Grid.config.js +1 -1
  544. package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.config.js +39 -0
  545. package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.js +5 -0
  546. package/styled-components/es/examples/plasma_web/components/IconButton/IconButton.stories.tsx +65 -0
  547. package/styled-components/es/examples/plasma_web/components/Radiobox/Radiobox.stories.tsx +37 -43
  548. package/styled-components/es/examples/sds_engineer/components/Avatar/Avatar.stories.tsx +27 -1
  549. package/styled-components/es/examples/sds_engineer/components/Grid/Grid.config.js +1 -1
  550. package/styled-components/es/index.js +1 -0
  551. package/styled-components/es/mixins/applySpacing.js +1 -1
  552. package/styled-components/es/mixins/typography.js +1 -1
  553. package/types/components/Avatar/Avatar.d.ts +3 -1
  554. package/types/components/Avatar/Avatar.d.ts.map +1 -1
  555. package/types/components/Avatar/Avatar.types.d.ts +7 -0
  556. package/types/components/Avatar/Avatar.types.d.ts.map +1 -1
  557. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  558. package/types/components/Dropdown/Dropdown.tokens.d.ts +0 -1
  559. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  560. package/types/components/Dropdown/Dropdown.types.d.ts +2 -7
  561. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  562. package/types/components/Dropdown/index.d.ts +0 -1
  563. package/types/components/Dropdown/index.d.ts.map +1 -1
  564. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  565. package/types/components/Dropdown/utils/index.d.ts +2 -5
  566. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  567. package/types/components/IconButton/IconButton.d.ts +30 -0
  568. package/types/components/IconButton/IconButton.d.ts.map +1 -0
  569. package/types/components/IconButton/IconButton.styles.d.ts +21 -0
  570. package/types/components/IconButton/IconButton.styles.d.ts.map +1 -0
  571. package/types/components/IconButton/IconButton.tokens.d.ts +29 -0
  572. package/types/components/IconButton/IconButton.tokens.d.ts.map +1 -0
  573. package/types/components/IconButton/IconButton.types.d.ts +13 -0
  574. package/types/components/IconButton/IconButton.types.d.ts.map +1 -0
  575. package/types/components/IconButton/index.d.ts +4 -0
  576. package/types/components/IconButton/index.d.ts.map +1 -0
  577. package/types/components/IconButton/variations/_disabled/base.d.ts +2 -0
  578. package/types/components/IconButton/variations/_disabled/base.d.ts.map +1 -0
  579. package/types/components/IconButton/variations/_focused/base.d.ts +2 -0
  580. package/types/components/IconButton/variations/_focused/base.d.ts.map +1 -0
  581. package/types/components/IconButton/variations/_size/base.d.ts +2 -0
  582. package/types/components/IconButton/variations/_size/base.d.ts.map +1 -0
  583. package/types/components/IconButton/variations/_view/base.d.ts +2 -0
  584. package/types/components/IconButton/variations/_view/base.d.ts.map +1 -0
  585. package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts +2 -0
  586. package/types/examples/plasma_b2c/components/Avatar/Avatar.d.ts.map +1 -1
  587. package/types/examples/plasma_b2c/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -1
  588. package/types/examples/plasma_b2c/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -1
  589. package/types/examples/plasma_b2c/components/IconButton/IconButton.config.d.ts +38 -0
  590. package/types/examples/plasma_b2c/components/IconButton/IconButton.config.d.ts.map +1 -0
  591. package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts +32 -0
  592. package/types/examples/plasma_b2c/components/IconButton/IconButton.d.ts.map +1 -0
  593. package/types/examples/plasma_web/components/Avatar/Avatar.d.ts +2 -0
  594. package/types/examples/plasma_web/components/Avatar/Avatar.d.ts.map +1 -1
  595. package/types/examples/plasma_web/components/Dropdown/Normal/Dropdown.config.d.ts.map +1 -1
  596. package/types/examples/plasma_web/components/Dropdown/Tight/Dropdown.config.d.ts.map +1 -1
  597. package/types/examples/plasma_web/components/IconButton/IconButton.config.d.ts +38 -0
  598. package/types/examples/plasma_web/components/IconButton/IconButton.config.d.ts.map +1 -0
  599. package/types/examples/plasma_web/components/IconButton/IconButton.d.ts +32 -0
  600. package/types/examples/plasma_web/components/IconButton/IconButton.d.ts.map +1 -0
  601. package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts +1 -0
  602. package/types/examples/sds_engineer/components/Avatar/Avatar.d.ts.map +1 -1
  603. package/types/index.d.ts +1 -0
  604. package/types/index.d.ts.map +1 -1
  605. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -81
  606. package/cjs/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
  607. package/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -76
  608. package/es/components/Dropdown/hooks/useKeyboardNavigation.js.map +0 -1
  609. package/styled-components/cjs/components/Dropdown/hooks/useKeyboardNavigation.js +0 -83
  610. package/styled-components/es/components/Dropdown/hooks/useKeyboardNavigation.js +0 -77
  611. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts +0 -13
  612. package/types/components/Dropdown/hooks/useKeyboardNavigation.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ToastProvider.js","sources":["../../../../src/components/Toast/ToastProvider/ToastProvider.tsx"],"sourcesContent":["import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport type { ReactNode, FC } from 'react';\n\nimport type { CustomToastProps, ToastControllerProps, ToastProps } from '../Toast.types';\nimport { DEFAULT_FADE, DEFAULT_POSITION, TIMER_DELAY } from '../utils';\n\nimport type { ShowToast, ShowToastArgs, ShowToastCallSignature, ToastContextType } from './ToastProvider.types';\n\nexport const ToastContext = createContext<ToastContextType | null>(null);\n\nexport const useToastInner = () => {\n const context = useContext(ToastContext);\n if (!context) {\n throw new Error('useToast must be used within a ToastProvider');\n }\n return context;\n};\n\nexport const useToast = () => {\n const { showToast, hideToast } = useToastInner();\n return { showToast, hideToast };\n};\n\nconst initialToastData = {\n text: undefined,\n offset: undefined,\n position: DEFAULT_POSITION,\n fade: DEFAULT_FADE,\n timeout: undefined,\n contentLeft: undefined,\n role: undefined,\n pilled: undefined,\n hasClose: undefined,\n width: undefined,\n size: 'm',\n view: 'primary',\n} as CustomToastProps;\n\nconst getShowToastCallSignature = (args: ShowToastCallSignature) => {\n if (typeof args[0] === 'object' && 'text' in args[0]) {\n return args[0];\n }\n\n // TODO: issue https://github.com/salute-developers/plasma/issues/333\n const [text, position, timeout, fade, contentLeft, role, offset, pilled, width, hasClose, size, view] = args;\n\n return { text, position, timeout, fade, contentLeft, role, offset, pilled, width, hasClose, size, view };\n};\n\nexport const ToastProviderHoc = <T extends ToastProps>(ToastComponent: FC<T>) =>\n function ToastProvider({ children }: { children: ReactNode }) {\n const [isVisible, setIsVisible] = useState(false);\n const [isHidden, setIsHidden] = useState(true);\n const hideTimeout = useRef<number | null>(null);\n const animationRunTimeout = useRef<number | null>(null);\n\n const [toastProps, setToastProps] = useState<ToastControllerProps>(initialToastData);\n const [toastInfo, setToastInfo] = useState<Pick<ShowToastArgs, 'timeout' | 'onHide'>>({\n timeout: undefined,\n onHide: undefined,\n });\n\n const showToastCallback: ShowToast = (...args: ShowToastCallSignature) => {\n if (isVisible) {\n return;\n }\n\n const {\n text,\n offset,\n position = DEFAULT_POSITION,\n fade = DEFAULT_FADE,\n timeout,\n contentLeft,\n role,\n pilled,\n hasClose,\n size,\n view,\n width,\n onHide,\n onShow,\n } = getShowToastCallSignature(args);\n\n setToastProps({\n text,\n width,\n position,\n offset,\n fade,\n contentLeft,\n role,\n pilled,\n hasClose,\n size,\n view,\n });\n\n setToastInfo({ timeout, onHide });\n\n setIsHidden(false);\n setIsVisible(true);\n onShow?.();\n };\n\n const showToast = useCallback(showToastCallback, []);\n\n const { onHide, timeout } = toastInfo;\n\n const hideToast = useCallback(() => {\n if (!isVisible) {\n return;\n }\n\n if (hideTimeout?.current) {\n clearTimeout(hideTimeout.current);\n hideTimeout.current = null;\n }\n\n onHide?.();\n setIsVisible(false);\n\n animationRunTimeout.current = setTimeout(() => {\n setIsHidden(true);\n setToastProps(initialToastData);\n }, TIMER_DELAY);\n }, [onHide, isVisible, isHidden]);\n\n useEffect(() => {\n if (timeout === null && animationRunTimeout.current !== null) {\n clearTimeout(animationRunTimeout.current);\n animationRunTimeout.current = null;\n }\n }, [timeout]);\n\n useEffect(() => {\n if (timeout && isVisible) {\n hideTimeout.current = setTimeout(() => {\n hideToast();\n }, timeout);\n }\n }, [isVisible, timeout]);\n\n return (\n <ToastContext.Provider value={{ showToast, hideToast, isVisible, hideTimeout, animationRunTimeout }}>\n {children}\n {!isHidden && <ToastComponent {...(toastProps as T)} />}\n </ToastContext.Provider>\n );\n };\n"],"names":["ToastContext","createContext","useToastInner","context","useContext","Error","useToast","_useToastInner","showToast","hideToast","initialToastData","text","undefined","offset","position","DEFAULT_POSITION","fade","DEFAULT_FADE","timeout","contentLeft","role","pilled","hasClose","width","size","view","getShowToastCallSignature","args","_typeof","_args","_slicedToArray","ToastProviderHoc","ToastComponent","ToastProvider","_ref","children","_useState","useState","_useState2","isVisible","setIsVisible","_useState3","_useState4","isHidden","setIsHidden","hideTimeout","useRef","animationRunTimeout","_useState5","_useState6","toastProps","setToastProps","_useState7","onHide","_useState8","toastInfo","setToastInfo","showToastCallback","_len","arguments","length","Array","_key","_getShowToastCallSign","_getShowToastCallSign2","_getShowToastCallSign3","onShow","useCallback","current","clearTimeout","setTimeout","TIMER_DELAY","useEffect","React","createElement","Provider","value"],"mappings":";;;;IAQaA,YAAY,gBAAGC,aAAa,CAA0B,IAAI,EAAC;IAE3DC,aAAa,GAAG,SAAhBA,aAAaA,GAAS;AAC/B,EAAA,IAAMC,OAAO,GAAGC,UAAU,CAACJ,YAAY,CAAC,CAAA;EACxC,IAAI,CAACG,OAAO,EAAE;AACV,IAAA,MAAM,IAAIE,KAAK,CAAC,8CAA8C,CAAC,CAAA;AACnE,GAAA;AACA,EAAA,OAAOF,OAAO,CAAA;AAClB,EAAC;IAEYG,QAAQ,GAAG,SAAXA,QAAQA,GAAS;AAC1B,EAAA,IAAAC,cAAA,GAAiCL,aAAa,EAAE;IAAxCM,SAAS,GAAAD,cAAA,CAATC,SAAS;IAAEC,SAAS,GAAAF,cAAA,CAATE,SAAS,CAAA;EAC5B,OAAO;AAAED,IAAAA,SAAS,EAATA,SAAS;AAAEC,IAAAA,SAAS,EAATA,SAAAA;GAAW,CAAA;AACnC,EAAC;AAED,IAAMC,gBAAgB,GAAG;AACrBC,EAAAA,IAAI,EAAEC,SAAS;AACfC,EAAAA,MAAM,EAAED,SAAS;AACjBE,EAAAA,QAAQ,EAAEC,gBAAgB;AAC1BC,EAAAA,IAAI,EAAEC,YAAY;AAClBC,EAAAA,OAAO,EAAEN,SAAS;AAClBO,EAAAA,WAAW,EAAEP,SAAS;AACtBQ,EAAAA,IAAI,EAAER,SAAS;AACfS,EAAAA,MAAM,EAAET,SAAS;AACjBU,EAAAA,QAAQ,EAAEV,SAAS;AACnBW,EAAAA,KAAK,EAAEX,SAAS;AAChBY,EAAAA,IAAI,EAAE,GAAG;AACTC,EAAAA,IAAI,EAAE,SAAA;AACV,CAAqB,CAAA;AAErB,IAAMC,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AAC,aAAA,CAAC1E,YAAY,CAAC2E,QAAQ,EAAA;AAACC,MAAAA,KAAK,EAAE;AAAEpE,QAAAA,SAAS,EAATA,SAAS;AAAEC,QAAAA,SAAS,EAATA,SAAS;AAAE8B,QAAAA,SAAS,EAATA,SAAS;AAAEM,QAAAA,WAAW,EAAXA,WAAW;AAAEE,QAAAA,mBAAmB,EAAnBA,mBAAAA;AAAoB,OAAA;AAAE,KAAA,EAC/FZ,QAAQ,EACR,CAACQ,QAAQ,iBAAI8B,KAAA,CAAAC,aAAA,CAAC1C,cAAc,EAAMkB,UAAmB,CACnC,CAAC,CAAA;GAE/B,CAAA;AAAA;;;;"}
1
+ {"version":3,"file":"ToastProvider.js","sources":["../../../../src/components/Toast/ToastProvider/ToastProvider.tsx"],"sourcesContent":["import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport type { ReactNode, FC } from 'react';\n\nimport type { CustomToastProps, ToastControllerProps, ToastProps } from '../Toast.types';\nimport { DEFAULT_FADE, DEFAULT_POSITION, TIMER_DELAY } from '../utils';\n\nimport type { ShowToast, ShowToastArgs, ShowToastCallSignature, ToastContextType } from './ToastProvider.types';\n\nexport const ToastContext = createContext<ToastContextType | null>(null);\n\nexport const useToastInner = () => {\n const context = useContext(ToastContext);\n if (!context) {\n throw new Error('useToast must be used within a ToastProvider');\n }\n return context;\n};\n\nexport const useToast = () => {\n const { showToast, hideToast } = useToastInner();\n return { showToast, hideToast };\n};\n\nconst initialToastData = {\n text: undefined,\n offset: undefined,\n position: DEFAULT_POSITION,\n fade: DEFAULT_FADE,\n timeout: undefined,\n contentLeft: undefined,\n role: undefined,\n pilled: undefined,\n hasClose: undefined,\n width: undefined,\n size: 'm',\n view: 'primary',\n} as CustomToastProps;\n\nconst getShowToastCallSignature = (args: ShowToastCallSignature) => {\n if (typeof args[0] === 'object' && 'text' in args[0]) {\n return args[0];\n }\n\n // TODO: issue https://github.com/salute-developers/plasma/issues/333\n const [text, position, timeout, fade, contentLeft, role, offset, pilled, width, hasClose, size, view] = args;\n\n return { text, position, timeout, fade, contentLeft, role, offset, pilled, width, hasClose, size, view };\n};\n\nexport const ToastProviderHoc = <T extends ToastProps>(ToastComponent: FC<T>) =>\n function ToastProvider({ children }: { children: ReactNode }) {\n const [isVisible, setIsVisible] = useState(false);\n const [isHidden, setIsHidden] = useState(true);\n const hideTimeout = useRef<number | null>(null);\n const animationRunTimeout = useRef<number | null>(null);\n\n const [toastProps, setToastProps] = useState<ToastControllerProps>(initialToastData);\n const [toastInfo, setToastInfo] = useState<Pick<ShowToastArgs, 'timeout' | 'onHide'>>({\n timeout: undefined,\n onHide: undefined,\n });\n\n const showToastCallback: ShowToast = (...args: ShowToastCallSignature) => {\n if (isVisible) {\n return;\n }\n\n const {\n text,\n offset,\n position = DEFAULT_POSITION,\n fade = DEFAULT_FADE,\n timeout,\n contentLeft,\n role,\n pilled,\n hasClose,\n size,\n view,\n width,\n onHide,\n onShow,\n } = getShowToastCallSignature(args);\n\n setToastProps({\n text,\n width,\n position,\n offset,\n fade,\n contentLeft,\n role,\n pilled,\n hasClose,\n size,\n view,\n });\n\n setToastInfo({ timeout, onHide });\n\n setIsHidden(false);\n setIsVisible(true);\n onShow?.();\n };\n\n const showToast = useCallback(showToastCallback, []);\n\n const { onHide, timeout } = toastInfo;\n\n const hideToast = useCallback(() => {\n if (!isVisible) {\n return;\n }\n\n if (hideTimeout?.current) {\n clearTimeout(hideTimeout.current);\n hideTimeout.current = null;\n }\n\n onHide?.();\n setIsVisible(false);\n\n animationRunTimeout.current = setTimeout(() => {\n setIsHidden(true);\n setToastProps(initialToastData);\n }, TIMER_DELAY);\n }, [onHide, isVisible, isHidden]);\n\n useEffect(() => {\n if (timeout === null && animationRunTimeout.current !== null) {\n clearTimeout(animationRunTimeout.current);\n animationRunTimeout.current = null;\n }\n }, [timeout]);\n\n useEffect(() => {\n if (timeout && isVisible) {\n hideTimeout.current = setTimeout(() => {\n hideToast();\n }, timeout);\n }\n }, [isVisible, timeout]);\n\n return (\n <ToastContext.Provider value={{ showToast, hideToast, isVisible, hideTimeout, animationRunTimeout }}>\n {children}\n {!isHidden && <ToastComponent {...(toastProps as T)} />}\n </ToastContext.Provider>\n );\n };\n"],"names":["ToastContext","createContext","useToastInner","context","useContext","Error","useToast","_useToastInner","showToast","hideToast","initialToastData","text","undefined","offset","position","DEFAULT_POSITION","fade","DEFAULT_FADE","timeout","contentLeft","role","pilled","hasClose","width","size","view","getShowToastCallSignature","args","_typeof","_args","_slicedToArray","ToastProviderHoc","ToastComponent","ToastProvider","_ref","children","_useState","useState","_useState2","isVisible","setIsVisible","_useState3","_useState4","isHidden","setIsHidden","hideTimeout","useRef","animationRunTimeout","_useState5","_useState6","toastProps","setToastProps","_useState7","onHide","_useState8","toastInfo","setToastInfo","showToastCallback","_len","arguments","length","Array","_key","_getShowToastCallSign","_getShowToastCallSign2","_getShowToastCallSign3","onShow","useCallback","current","clearTimeout","setTimeout","TIMER_DELAY","useEffect","React","createElement","Provider","value"],"mappings":";;;;IAQaA,YAAY,gBAAGC,aAAa,CAA0B,IAAI,EAAC;IAE3DC,aAAa,GAAG,SAAhBA,aAAaA,GAAS;AAC/B,EAAA,IAAMC,OAAO,GAAGC,UAAU,CAACJ,YAAY,CAAC,CAAA;EACxC,IAAI,CAACG,OAAO,EAAE;AACV,IAAA,MAAM,IAAIE,KAAK,CAAC,8CAA8C,CAAC,CAAA;AACnE,GAAA;AACA,EAAA,OAAOF,OAAO,CAAA;AAClB,EAAC;IAEYG,QAAQ,GAAG,SAAXA,QAAQA,GAAS;AAC1B,EAAA,IAAAC,cAAA,GAAiCL,aAAa,EAAE;IAAxCM,SAAS,GAAAD,cAAA,CAATC,SAAS;IAAEC,SAAS,GAAAF,cAAA,CAATE,SAAS,CAAA;EAC5B,OAAO;AAAED,IAAAA,SAAS,EAATA,SAAS;AAAEC,IAAAA,SAAS,EAATA,SAAAA;GAAW,CAAA;AACnC,EAAC;AAED,IAAMC,gBAAgB,GAAG;AACrBC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,OAAO,GAAG,IAAI,CAAA;AACtC,OAAA;AACJ,KAAC,EAAE,CAAClD,OAAO,CAAC,CAAC,CAAA;AAEbsD,IAAAA,SAAS,CAAC,YAAM;MACZ,IAAItD,OAAO,IAAIqB,SAAS,EAAE;AACtBM,QAAAA,WAAW,CAACuB,OAAO,GAAGE,UAAU,CAAC,YAAM;AACnC7D,UAAAA,SAAS,EAAE,CAAA;SACd,EAAES,OAAO,CAAC,CAAA;AACf,OAAA;AACJ,KAAC,EAAE,CAACqB,SAAS,EAAErB,OAAO,CAAC,CAAC,CAAA;AAExB,IAAA,oBACIuD,KAAA,CAAAC,aAAA,CAAC1E,YAAY,CAAC2E,QAAQ,EAAA;AAACC,MAAAA,KAAK,EAAE;AAAEpE,QAAAA,SAAS,EAATA,SAAS;AAAEC,QAAAA,SAAS,EAATA,SAAS;AAAE8B,QAAAA,SAAS,EAATA,SAAS;AAAEM,QAAAA,WAAW,EAAXA,WAAW;AAAEE,QAAAA,mBAAmB,EAAnBA,mBAAAA;AAAoB,OAAA;AAAE,KAAA,EAC/FZ,QAAQ,EACR,CAACQ,QAAQ,iBAAI8B,KAAA,CAAAC,aAAA,CAAC1C,cAAc,EAAMkB,UAAmB,CACnC,CAAC,CAAA;GAE/B,CAAA;AAAA;;;;"}
@@ -71,7 +71,7 @@ var tooltipRoot = function tooltipRoot(Root) {
71
71
  useEffect(function () {
72
72
  var onKeyDown = function onKeyDown(event) {
73
73
  if (event.keyCode === ESCAPE_KEYCODE) {
74
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
74
+ onDismiss === null || onDismiss === void 0 || onDismiss();
75
75
  }
76
76
  };
77
77
  window.addEventListener('keydown', onKeyDown);
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import React, { useEffect, forwardRef, useState } from 'react';\nimport { styled } from '@linaria/react';\n\nimport { RootProps, component } from '../../engines';\nimport { popoverClasses, popoverConfig, popoverTokens } from '../Popover';\nimport { cx } from '../../utils';\n\nimport { TooltipProps } from './Tooltip.types';\nimport { StyledContentLeft, TooltipRoot } from './Tooltip.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { classes, tokens } from './Tooltip.tokens';\n\nconst ESCAPE_KEYCODE = 27;\n\nconst getStringValue = (value?: number | string) => {\n return typeof value === 'number' ? `${value}rem` : value;\n};\n\nconst Popover = component(popoverConfig);\n\nconst StyledPopover = styled(Popover)`\n ${popoverTokens.arrowMaskWidth}: var(${tokens.arrowMaskWidth});\n ${popoverTokens.arrowMaskHeight}: var(${tokens.arrowMaskHeight});\n ${popoverTokens.arrowMaskImage}: var(${tokens.arrowMaskImage});\n ${popoverTokens.arrowBackground}: var(${tokens.arrowBackground});\n ${popoverTokens.arrowHeight}: var(${tokens.arrowHeight});\n ${popoverTokens.arrowEdgeMargin}: var(${tokens.arrowEdgeMargin});\n\n &.${classes.animated} .${popoverClasses.root} {\n transition: opacity 200ms ease-in-out, visibility 200ms ease-in-out;\n }\n`;\n\n/**\n * Компонент для текстовых подсказок. Основное предназначение — подписи к блокам.\n */\n\nexport const tooltipRoot = (Root: RootProps<HTMLDivElement, Omit<TooltipProps, 'isOpen' | 'text'>>) =>\n forwardRef<HTMLDivElement, TooltipProps>(\n (\n {\n id,\n text,\n isOpen,\n isVisible,\n hasArrow = true,\n arrow,\n animated,\n offset = [0, 8],\n minWidth,\n maxWidth,\n placement = 'bottom',\n usePortal = true,\n target,\n children,\n onDismiss,\n view,\n size,\n contentLeft,\n zIndex = '9200',\n className,\n ...rest\n },\n outerRef,\n ) => {\n const [ref, setRef] = useState<HTMLDivElement | null>(null);\n\n // TODO убрать после отказа от старого API\n const innerIsOpen = isVisible || isOpen;\n const innerHasArrow = arrow || hasArrow;\n const showTooltip = innerIsOpen && Boolean(text?.length);\n\n const animatedClass = animated ? classes.animated : undefined;\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.keyCode === ESCAPE_KEYCODE) {\n onDismiss?.();\n }\n };\n\n window.addEventListener('keydown', onKeyDown);\n\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, []);\n\n const withContentLeft = contentLeft ? classes.hasContentLeft : undefined;\n\n return (\n <StyledPopover\n isOpen={showTooltip}\n placement={placement}\n offset={offset}\n zIndex={zIndex}\n target={target || children}\n usePortal={usePortal}\n hasArrow={innerHasArrow}\n aria-hidden={!innerIsOpen}\n aria-live=\"polite\"\n role=\"tooltip\"\n className={cx(ref?.classList.toString(), animatedClass, className)}\n // INFO: Прокидываем стили для Popover из Root Tooltip-а\n\n {...rest}\n >\n <Root view={view} size={size} ref={setRef}>\n <TooltipRoot\n ref={outerRef}\n id={id}\n className={cx(withContentLeft)}\n maxWidth={getStringValue(maxWidth)}\n minWidth={getStringValue(minWidth)}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {text}\n </TooltipRoot>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const tooltipConfig = {\n name: 'Tooltip',\n tag: 'div',\n layout: tooltipRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["ESCAPE_KEYCODE","getStringValue","value","concat","Popover","component","popoverConfig","_exp","StyledPopover","styled","name","class","propsAsIs","tooltipRoot","Root","forwardRef","_ref","outerRef","id","text","isOpen","isVisible","_ref$hasArrow","hasArrow","arrow","animated","_ref$offset","offset","minWidth","maxWidth","_ref$placement","placement","_ref$usePortal","usePortal","target","children","onDismiss","view","size","contentLeft","_ref$zIndex","zIndex","className","rest","_useState","useState","_useState2","_slicedToArray","ref","setRef","innerIsOpen","innerHasArrow","showTooltip","Boolean","length","animatedClass","classes","undefined","useEffect","onKeyDown","event","keyCode","window","addEventListener","removeEventListener","withContentLeft","hasContentLeft","React","createElement","_extends","role","cx","classList","toString","TooltipRoot","StyledCont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IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import React, { useEffect, forwardRef, useState } from 'react';\nimport { styled } from '@linaria/react';\n\nimport { RootProps, component } from '../../engines';\nimport { popoverClasses, popoverConfig, popoverTokens } from '../Popover';\nimport { cx } from '../../utils';\n\nimport { TooltipProps } from './Tooltip.types';\nimport { StyledContentLeft, TooltipRoot } from './Tooltip.styles';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { classes, tokens } from './Tooltip.tokens';\n\nconst ESCAPE_KEYCODE = 27;\n\nconst getStringValue = (value?: number | string) => {\n return typeof value === 'number' ? `${value}rem` : value;\n};\n\nconst Popover = component(popoverConfig);\n\nconst StyledPopover = styled(Popover)`\n ${popoverTokens.arrowMaskWidth}: var(${tokens.arrowMaskWidth});\n ${popoverTokens.arrowMaskHeight}: var(${tokens.arrowMaskHeight});\n ${popoverTokens.arrowMaskImage}: var(${tokens.arrowMaskImage});\n ${popoverTokens.arrowBackground}: var(${tokens.arrowBackground});\n ${popoverTokens.arrowHeight}: var(${tokens.arrowHeight});\n ${popoverTokens.arrowEdgeMargin}: var(${tokens.arrowEdgeMargin});\n\n &.${classes.animated} .${popoverClasses.root} {\n transition: opacity 200ms ease-in-out, visibility 200ms ease-in-out;\n }\n`;\n\n/**\n * Компонент для текстовых подсказок. Основное предназначение — подписи к блокам.\n */\n\nexport const tooltipRoot = (Root: RootProps<HTMLDivElement, Omit<TooltipProps, 'isOpen' | 'text'>>) =>\n forwardRef<HTMLDivElement, TooltipProps>(\n (\n {\n id,\n text,\n isOpen,\n isVisible,\n hasArrow = true,\n arrow,\n animated,\n offset = [0, 8],\n minWidth,\n maxWidth,\n placement = 'bottom',\n usePortal = true,\n target,\n children,\n onDismiss,\n view,\n size,\n contentLeft,\n zIndex = '9200',\n className,\n ...rest\n },\n outerRef,\n ) => {\n const [ref, setRef] = useState<HTMLDivElement | null>(null);\n\n // TODO убрать после отказа от старого API\n const innerIsOpen = isVisible || isOpen;\n const innerHasArrow = arrow || hasArrow;\n const showTooltip = innerIsOpen && Boolean(text?.length);\n\n const animatedClass = animated ? classes.animated : undefined;\n\n useEffect(() => {\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.keyCode === ESCAPE_KEYCODE) {\n onDismiss?.();\n }\n };\n\n window.addEventListener('keydown', onKeyDown);\n\n return () => {\n window.removeEventListener('keydown', onKeyDown);\n };\n }, []);\n\n const withContentLeft = contentLeft ? classes.hasContentLeft : undefined;\n\n return (\n <StyledPopover\n isOpen={showTooltip}\n placement={placement}\n offset={offset}\n zIndex={zIndex}\n target={target || children}\n usePortal={usePortal}\n hasArrow={innerHasArrow}\n aria-hidden={!innerIsOpen}\n aria-live=\"polite\"\n role=\"tooltip\"\n className={cx(ref?.classList.toString(), animatedClass, className)}\n // INFO: Прокидываем стили для Popover из Root Tooltip-а\n\n {...rest}\n >\n <Root view={view} size={size} ref={setRef}>\n <TooltipRoot\n ref={outerRef}\n id={id}\n className={cx(withContentLeft)}\n maxWidth={getStringValue(maxWidth)}\n minWidth={getStringValue(minWidth)}\n >\n {contentLeft && <StyledContentLeft>{contentLeft}</StyledContentLeft>}\n {text}\n </TooltipRoot>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const tooltipConfig = {\n name: 'Tooltip',\n tag: 'div',\n layout: tooltipRoot,\n base: '',\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["ESCAPE_KEYCODE","getStringValue","value","concat","Popover","component","popoverConfig","_exp","StyledPopover","styled","name","class","propsAsIs","tooltipRoot","Root","forwardRef","_ref","outerRef","id","text","isOpen","isVisible","_ref$hasArrow","hasArrow","arrow","animated","_ref$offset","offset","minWidth","maxWidth","_ref$placement","placement","_ref$usePortal","usePortal","target","children","onDismiss","view","size","contentLeft","_ref$zIndex","zIndex","className","rest","_useState","useState","_useState2","_slicedToArray","ref","setRef","innerIsOpen","innerHasArrow","showTooltip","Boolean","length","animatedClass","classes","undefined","useEffect","onKeyDown","event","keyCode","window","addEventListener","removeEventListener","withContentLeft","hasContentLeft","React","createElement","_extends","role","cx","classList","toString","TooltipRoot","StyledContentLeft","tooltipConfig","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;AAaA,IAAMA,cAAc,GAAG,EAAE,CAAA;AAEzB,IAAMC,cAAc,GAAGA,SAAjBA,cAAcA,CAAIC,KAAuB,EAAK;EAChD,OAAO,OAAOA,KAAK,KAAK,QAAQ,MAAAC,MAAA,CAAMD,KAAM,EAAA,KAAA,CAAA,GAAOA,KAAK,CAAA;AAC5D,CAAC,CAAA;AAED,IAAME,OAAO,gBAAGC,SAAS,CAACC,aAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GAlBvBA,SAkBuBA,IAAAA,GAAA;AAAA,EAAA,OAEZH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,MAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAW3B,CAAA,CAAA;;AAED;AACA;AACA;;IAEaC,WAAW,GAAGA,SAAdA,WAAWA,CAAIC,IAAsE,EAAA;AAAA,EAAA,oBAC9FC,UAAU,CACN,UAAAC,IAAA,EAwBIC,QAAQ,EACP;AAAA,IAAA,IAvBGC,EAAE,GAAAF,IAAA,CAAFE,EAAE;MACFC,IAAI,GAAAH,IAAA,CAAJG,IAAI;MACJC,MAAM,GAAAJ,IAAA,CAANI,MAAM;MACNC,SAAS,GAAAL,IAAA,CAATK,SAAS;MAAAC,aAAA,GAAAN,IAAA,CACTO,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA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;AACF4C,MAAAA,GAAG,EAAEC,IAAAA;KACR;AACD5C,IAAAA,IAAI,EAAE;AACF2C,MAAAA,GAAG,EAAEE,MAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN/C,IAAAA,IAAI,EAAE,SAAS;AACfC,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;"}
package/es/index.css CHANGED
@@ -14,6 +14,11 @@
14
14
  .Button_styles_uqvh6u_l4dfhbg__b7cda4d5{position:absolute;}
15
15
  .Button_styles_uqvh6u_srdlazt__b7cda4d5{--plasma-spinner-size:var(--plasma-button-spinner-size);--plasma-spinner-color:var(--plasma-button-spinner-color);}
16
16
 
17
+ .IconButton_styles_gh8fim_b1ua728l__7324c12e.IconButton_styles_gh8fim_b1ua728l__7324c12e.IconButton_styles_gh8fim_iconButtonItem__7324c12e{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}
18
+ .IconButton_styles_gh8fim_i5roq7j__7324c12e{--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}
19
+ .IconButton_styles_gh8fim_lhwest8__7324c12e{position:absolute;}
20
+ .IconButton_styles_gh8fim_sudin8m__7324c12e{--plasma-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-spinner-color:var(--plasma-icon-button-spinner-color);}
21
+
17
22
  .base_6k3uip_b7jdqtc__e6616a37.base_6k3uip_buttonGroupOverrideStyles__e6616a37 .base_6k3uip_buttonItem__e6616a37{--plasma-button-color:var(--plasma-button-group-item-color);--plasma-button-background-color:var(--plasma-button-group-item-background-color);--plasma-button-color-hover:var(--plasma-button-group-item-color-hover);--plasma-button-background-color-hover:var(--plasma-button-group-item-background-color-hover);--plasma-button-color-active:var(--plasma-button-group-item-color-active);--plasma-button-background-color-active:var(--plasma-button-group-item-background-color-active);}
18
23
 
19
24
  .base_xxxewc_bc0nfse__e70323a1.base_xxxewc_buttonGroupOverrideStyles__e70323a1 .base_xxxewc_buttonItem__e70323a1{--plasma-button-height:var(--plasma-button-group-item-height);--plasma-button-padding:var(--plasma-button-group-item-padding);---plasma-button-scale-active:var(--plasma-button-group-item-scale-active);--plasma-button-scale-hover:var(--plasma-button-group-item-scale-hover);--plasma-button-font-family:var(--plasma-button-group-item-font-family);--plasma-button-font-size:var(--plasma-button-group-item-font-size);--plasma-button-font-style:var(--plasma-button-group-item-font-style);--plasma-button-font-weight:var(--plasma-button-group-item-font-weight);--plasma-button-letter-spacing:var(--plasma-button-group-item-letter-spacing);--plasma-button-line-height:var(--plasma-button-group-item-line-height);}
@@ -275,8 +280,8 @@
275
280
 
276
281
  .base_ydejlv_b175yas1__99ab42b5{--plasma-panel-border-radius:var(--plasma-drawer-border-radius);}
277
282
 
278
- .Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverWrapper__84327758,.Dropdown_styles_13400l5_sn7uamp__84327758 .Dropdown_styles_13400l5_popoverTarget__84327758{display:block;}
279
- .Dropdown_styles_13400l5_sjr7fmv__84327758{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
283
+ .Dropdown_styles_1daxhqh_sn7uamp__488e0a19 .Dropdown_styles_1daxhqh_popoverTarget__488e0a19{display:block;}
284
+ .Dropdown_styles_1daxhqh_sjr7fmv__488e0a19{box-sizing:border-box;background:var(--plasma-dropdown-background);box-shadow:var(--plasma-dropdown-box-shadow);border-radius:var(--plasma-dropdown-border-radius);width:var(--plasma-dropdown-width);height:var(--plasma-dropdown-height);padding:var(--plasma-dropdown-padding-top) var(--plasma-dropdown-padding-right) var(--plasma-dropdown-padding-bottom) var(--plasma-dropdown-padding-left);}
280
285
 
281
286
  .DropdownDivider_styles_v3xor1_s1brpi5d__3a791565{background:var(--plasma-dropdown-divider-color);width:var(--plasma-dropdown-divider-width);height:var(--plasma-dropdown-divider-height);margin:var(--plasma-dropdown-divider-margin-top) var(--plasma-dropdown-divider-margin-right) var(--plasma-dropdown-divider-margin-bottom) var(--plasma-dropdown-divider-margin-left);}
282
287
 
package/es/index.js CHANGED
@@ -16,6 +16,8 @@ export { useDidMountEffect } from './hooks/useDidMountEffect.js';
16
16
  export { composableStyle, cx } from './utils/index.js';
17
17
  export { buttonConfig, buttonRoot } from './components/Button/Button.js';
18
18
  export { classes as buttonClasses, tokens as buttonTokens } from './components/Button/Button.tokens.js';
19
+ export { iconButtonConfig, iconButtonRoot } from './components/IconButton/IconButton.js';
20
+ export { classes as iconButtonClasses, tokens as iconButtonTokens } from './components/IconButton/IconButton.tokens.js';
19
21
  export { buttonGroupConfig, buttonGroupRoot } from './components/ButtonGroup/ButtonGroup.js';
20
22
  export { classes as buttonGroupClasses, tokens as buttonGroupTokens } from './components/ButtonGroup/ButtonGroup.tokens.js';
21
23
  export { chipConfig, chipRoot } from './components/Chip/Chip.js';
@@ -86,7 +88,6 @@ export { drawerHeaderConfig, drawerHeaderRoot } from './components/Drawer/ui/Dra
86
88
  export { classes as drawerClasses, tokens as drawerTokens } from './components/Drawer/Drawer.tokens.js';
87
89
  export { dropdownConfig, dropdownRoot } from './components/Dropdown/Dropdown.js';
88
90
  export { classes as dropdownClasses, tokens as dropdownTokens } from './components/Dropdown/Dropdown.tokens.js';
89
- export { useKeyNavigation as useDropdownKeyNavigation } from './components/Dropdown/hooks/useKeyboardNavigation.js';
90
91
  export { dropdownDividerConfig, dropdownDividerRoot } from './components/Dropdown/ui/DropdownDivider/DropdownDivider.js';
91
92
  export { dropdownFooterConfig, dropdownFooterRoot } from './components/Dropdown/ui/DropdownFooter/DropdownFooter.js';
92
93
  export { dropdownGroupConfig, dropdownGroupRoot } from './components/Dropdown/ui/DropdownGroup/DropdownGroup.js';
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/plasma-new-hope",
3
- "version": "0.77.0-canary.1185.8720575745.0",
3
+ "version": "0.77.0-canary.1195.8808345201.0",
4
4
  "description": "Salute Design System blueprint",
5
5
  "main": "cjs/index.js",
6
6
  "module": "es/index.js",
@@ -55,19 +55,20 @@
55
55
  "react-dom": ">=16.13.1"
56
56
  },
57
57
  "devDependencies": {
58
- "@babel/cli": "7.15.4",
59
- "@babel/core": "7.15.5",
60
- "@babel/plugin-transform-react-constant-elements": "7.17.12",
61
- "@babel/preset-env": "7.15.4",
62
- "@babel/preset-react": "7.14.5",
63
- "@babel/preset-typescript": "7.15.0",
58
+ "@babel/cli": "7.24.1",
59
+ "@babel/core": "7.24.4",
60
+ "@babel/plugin-transform-class-properties": "7.24.1",
61
+ "@babel/plugin-transform-react-constant-elements": "7.24.1",
62
+ "@babel/preset-env": "7.24.4",
63
+ "@babel/preset-react": "7.24.1",
64
+ "@babel/preset-typescript": "7.24.1",
64
65
  "@ironkinoko/rollup-plugin-styles": "^4.0.3",
65
66
  "@linaria/rollup": "5.0.4",
66
67
  "@linaria/vite": "5.0.4",
67
68
  "@rollup/plugin-babel": "^6.0.3",
68
69
  "@rollup/plugin-commonjs": "^25.0.4",
69
70
  "@rollup/plugin-node-resolve": "^15.1.0",
70
- "@salutejs/plasma-sb-utils": "0.156.0-dev.0",
71
+ "@salutejs/plasma-sb-utils": "0.156.3-dev.0",
71
72
  "@storybook/addon-docs": "^7.6.17",
72
73
  "@storybook/addon-essentials": "^7.6.17",
73
74
  "@storybook/addons": "^7.6.17",
@@ -83,7 +84,6 @@
83
84
  "babel-loader": "8.2.2",
84
85
  "babel-plugin-annotate-pure-calls": "0.4.0",
85
86
  "babel-plugin-styled-components": "1.13.2",
86
- "babel-plugin-transform-class-properties": "6.24.1",
87
87
  "default-browser-id": "2.0.0",
88
88
  "react": "18.2.0",
89
89
  "react-dom": "18.2.0",
@@ -91,16 +91,16 @@
91
91
  "storybook": "7.6.17",
92
92
  "styled-components": "5.3.1",
93
93
  "typescript": "4.2.4",
94
- "vite": "4.5.1"
94
+ "vite": "4.5.3"
95
95
  },
96
96
  "dependencies": {
97
97
  "@linaria/core": "5.0.2",
98
98
  "@linaria/react": "5.0.3",
99
99
  "@popperjs/core": "2.11.8",
100
- "@salutejs/plasma-core": "1.158.0-dev.0",
100
+ "@salutejs/plasma-core": "1.158.2-dev.0",
101
101
  "focus-visible": "5.2.0",
102
102
  "react-popper": "2.3.0",
103
103
  "storeon": "3.1.5"
104
104
  },
105
- "gitHead": "37f644891d4068642110a447e08905daf5c1c06b"
105
+ "gitHead": "ff2c70ffc0e633d08c6a27fbd4cfba37908aa42f"
106
106
  }
@@ -15,13 +15,22 @@ var _Avatar2 = /*#__PURE__*/require("./Avatar.styles");
15
15
  var _base = /*#__PURE__*/require("./variations/_size/base");
16
16
  var _base2 = /*#__PURE__*/require("./variations/_focused/base");
17
17
  var _utils2 = /*#__PURE__*/require("./utils");
18
- var _excluded = ["size", "name", "url", "customText", "status", "className", "focused", "isScalable"];
18
+ var _excluded = ["size", "name", "url", "customText", "status", "className", "focused", "isScalable", "statusLabels"];
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
20
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
22
22
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
24
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
25
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
26
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
27
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
23
28
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
24
29
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
30
+ var StatusLabelsDefault = {
31
+ active: 'Активен',
32
+ inactive: 'Неактивен'
33
+ };
25
34
  var getAvatarContent = function getAvatarContent(_ref) {
26
35
  var customText = _ref.customText,
27
36
  url = _ref.url,
@@ -38,12 +47,26 @@ var getAvatarContent = function getAvatarContent(_ref) {
38
47
  }
39
48
  return /*#__PURE__*/_react["default"].createElement(_Avatar2.Text, null, initials);
40
49
  };
50
+ var getAriaLabel = function getAriaLabel(_ref2) {
51
+ var url = _ref2.url,
52
+ name = _ref2.name,
53
+ status = _ref2.status,
54
+ ariaLabelProp = _ref2['aria-label'],
55
+ statusLabels = _ref2.statusLabels;
56
+ if (!url) {
57
+ return;
58
+ }
59
+
60
+ // INFO: включаем aria-label чтобы озвучить что на изображении
61
+ var ariaLabel = !ariaLabelProp || ariaLabelProp.trim() === '' ? name : ariaLabelProp;
62
+ return status ? "".concat(ariaLabel, ". ").concat(statusLabels[status]) : ariaLabel;
63
+ };
41
64
  var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Indicator.indicatorConfig);
42
65
  var Indicator = /*#__PURE__*/(0, _engines.component)(mergedConfig);
43
66
  var StyledIndicator = /*#__PURE__*/(0, _styledComponents["default"])(Indicator).withConfig({
44
67
  componentId: "plasma-new-hope__sc-p4w0wq-0"
45
- })(["", ":var(", ");", ":", ""], _Indicator.indicatorTokens.size, _Avatar.tokens.statusIconSize, _Indicator.indicatorTokens.color, function (_ref2) {
46
- var status = _ref2.status;
68
+ })(["", ":var(", ");", ":", ""], _Indicator.indicatorTokens.size, _Avatar.tokens.statusIconSize, _Indicator.indicatorTokens.color, function (_ref3) {
69
+ var status = _ref3.status;
47
70
  return status === 'active' ? "var(".concat(_Avatar.tokens.statusOnlineColor, ")") : "var(".concat(_Avatar.tokens.statusOfflineColor, ")");
48
71
  });
49
72
  var avatarRoot = exports.avatarRoot = function avatarRoot(Root) {
@@ -57,14 +80,20 @@ var avatarRoot = exports.avatarRoot = function avatarRoot(Root) {
57
80
  _props$focused = props.focused,
58
81
  focused = _props$focused === void 0 ? true : _props$focused,
59
82
  isScalable = props.isScalable,
83
+ _props$statusLabels = props.statusLabels,
84
+ statusLabels = _props$statusLabels === void 0 ? StatusLabelsDefault : _props$statusLabels,
60
85
  rest = _objectWithoutProperties(props, _excluded);
61
86
  var initials = (0, _react.useMemo)(function () {
62
87
  return (0, _utils2.getInitialsForName)(name);
63
88
  }, [name]);
89
+ var ariaLabel = getAriaLabel(_objectSpread(_objectSpread({}, props), {}, {
90
+ statusLabels: statusLabels
91
+ }));
64
92
  return /*#__PURE__*/_react["default"].createElement(Root, _extends({
65
93
  ref: ref,
66
94
  size: avatarSize,
67
95
  className: (0, _utils.cx)(_Avatar.classes.avatarItem, className),
96
+ "aria-label": ariaLabel,
68
97
  focused: focused
69
98
  }, rest), /*#__PURE__*/_react["default"].createElement(_Avatar2.Wrapper, {
70
99
  isScalable: isScalable
@@ -74,6 +103,7 @@ var avatarRoot = exports.avatarRoot = function avatarRoot(Root) {
74
103
  initials: initials,
75
104
  name: name
76
105
  })), status && /*#__PURE__*/_react["default"].createElement(_Avatar2.StatusIcon, null, /*#__PURE__*/_react["default"].createElement(StyledIndicator, {
106
+ "aria-label": statusLabels[status],
77
107
  status: status
78
108
  })));
79
109
  });
@@ -9,7 +9,7 @@ var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/requi
9
9
  var _Avatar = /*#__PURE__*/require("./Avatar.tokens");
10
10
  var _templateObject;
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
13
13
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
14
14
  var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n position: relative;\n"])));
15
15
  var Wrapper = exports.Wrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
@@ -81,7 +81,32 @@ export function App() {
81
81
  ```
82
82
 
83
83
  ### Доступность
84
- Добавляем `"role"` и `"tabIndex"`.
84
+
85
+ #### Avatar c использованием изображения
86
+
87
+ В данном случае руководствуемся принципом универсального дизайна, т.е. незрячий должен получить ту же информацию, что и зрячий.
88
+
89
+ Поэтому добавляем/используем свойства: `role`, `tabIndex` и `aria-label`.
90
+
91
+ Примечание:
92
+ - если указано свойство `name` то `aria-label` можно опустить;
93
+
94
+ ```tsx live
95
+ import React from 'react';
96
+ import { Avatar } from '@salutejs/{{ package }}';
97
+
98
+ export function App() {
99
+ return (
100
+ <>
101
+ <Avatar role="button" tabIndex={0} name="Иван Фадеев" url="https://avatars.githubusercontent.com/u/1813468?v=4" />
102
+ </>
103
+ );
104
+ }
105
+ ```
106
+
107
+ #### Avatar c текстом
108
+
109
+ В этом случае достаточно указать свойство `name`.
85
110
 
86
111
  ```tsx live
87
112
  import React from 'react';
@@ -90,8 +115,33 @@ import { Avatar } from '@salutejs/{{ package }}';
90
115
  export function App() {
91
116
  return (
92
117
  <>
93
- <Avatar role="button" tabIndex="0" name="Иван Фадеев" />
118
+ <Avatar role="button" tabIndex={0} name="Иван Фадеев" />
94
119
  </>
95
120
  );
96
121
  }
97
122
  ```
123
+
124
+ #### Avatar и статус
125
+
126
+ Если указано свойство `status` его значение будет так же озвучено в комбинации со свойством `name` или `aria-label`.
127
+
128
+ ```tsx live
129
+ import React from 'react';
130
+ import { Avatar } from '@salutejs/{{ package }}';
131
+
132
+ export function App() {
133
+ return (
134
+ <>
135
+ <Avatar role="button" tabIndex={0} name="Иван Фадеев" status="inactive" />
136
+ </>
137
+ );
138
+ }
139
+ ```
140
+
141
+ Озвучит как `ИФ. Неактивен`. (В данном примере озвучиваются инициалы, производное от ФИО)
142
+
143
+ #### Свойство statusLabels
144
+
145
+ Опциональное свойство для корректной озвучки значений свойства `status`.
146
+
147
+ По-умолчанию стоит значение для русскоговорящих `{ active: 'Активен', inactive: 'Неактивен' }`.
@@ -9,7 +9,7 @@ var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react")
9
9
  var _AvatarGroup = /*#__PURE__*/require("./AvatarGroup.styles");
10
10
  var _excluded = ["children"];
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
13
13
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
14
14
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
15
15
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -15,7 +15,7 @@ var _Badge = /*#__PURE__*/require("./Badge.styles");
15
15
  var _Badge2 = /*#__PURE__*/require("./Badge.tokens");
16
16
  var _excluded = ["children", "className", "text", "contentLeft", "contentRight", "size", "view", "pilled", "transparent"];
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
19
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
20
20
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
21
21
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -8,7 +8,7 @@ exports.base = exports.StyledContentRight = exports.StyledContentMain = exports.
8
8
  var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("styled-components"));
9
9
  var _Badge = /*#__PURE__*/require("./Badge.tokens");
10
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
12
  var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)(["display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;width:max-content;"]);
13
13
  var StyledContentLeft = exports.StyledContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
14
14
  componentId: "plasma-new-hope__sc-naxmb2-0"
@@ -19,12 +19,12 @@ var _Button2 = /*#__PURE__*/require("./Button.tokens");
19
19
  var _StyledSpinner;
20
20
  var _excluded = ["children", "view", "size", "text", "contentLeft", "contentRight", "isLoading", "loader", "stretch", "square", "pin", "disabled", "focused", "outlined", "className", "blur", "style", "stretching"];
21
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
22
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
23
23
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
24
24
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25
25
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26
26
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
27
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
28
28
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
29
29
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
30
30
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -12,7 +12,7 @@ var _Spinner = /*#__PURE__*/require("../Spinner");
12
12
  var _Button = /*#__PURE__*/require("./Button.tokens");
13
13
  var _templateObject;
14
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
16
16
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
17
17
  // issue #823
18
18
  var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Spinner.spinnerConfig);
@@ -17,7 +17,7 @@ var _ButtonGroup = /*#__PURE__*/require("./ButtonGroup.styles");
17
17
  var _ButtonGroup2 = /*#__PURE__*/require("./ButtonGroup.tokens");
18
18
  var _excluded = ["children", "view", "size", "className", "stretching", "gap", "orientation", "shape", "isCommonButtonStyles"];
19
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
21
21
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
22
22
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
23
23
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -16,7 +16,7 @@ var _base2 = /*#__PURE__*/require("./variations/_size/base");
16
16
  var _CalendarBase = /*#__PURE__*/require("./CalendarBase.styles");
17
17
  var _excluded = ["value", "min", "max", "type", "eventList", "disabledList", "onChangeValue"];
18
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
20
20
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
21
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
22
22
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -162,7 +162,7 @@ var calendarBaseRoot = exports.calendarBaseRoot = function calendarBaseRoot(Root
162
162
  isOutOfRange = _useKeyNavigation2[4];
163
163
  var handleOnChangeDay = (0, _react.useCallback)(function (newDate, coord) {
164
164
  var newDay = new Date(newDate.year, newDate.monthIndex, newDate.day);
165
- onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(newDay);
165
+ onChangeValue === null || onChangeValue === void 0 || onChangeValue(newDay);
166
166
  onSelectIndexes(coord);
167
167
  }, [onChangeValue, onSelectIndexes]);
168
168
  var handleOnChangeMonth = (0, _react.useCallback)(function (monthIndex) {
@@ -8,7 +8,7 @@ exports.StyledCalendar = exports.IsOutOfRange = void 0;
8
8
  var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("styled-components"));
9
9
  var _templateObject;
10
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
12
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
13
13
  var StyledCalendar = exports.StyledCalendar = /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n position: relative;\n user-select: none;\n z-index: 1;\n\n width: 19.5rem;\n height: 19.5rem;\n"])));
14
14
  var IsOutOfRange = exports.IsOutOfRange = /*#__PURE__*/_styledComponents["default"].div.withConfig({
@@ -14,7 +14,7 @@ var _CalendarDouble = /*#__PURE__*/require("./CalendarDouble.styles");
14
14
  var _StyledSeparator;
15
15
  var _excluded = ["value", "min", "max", "eventList", "disabledList", "onChangeValue"];
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
17
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
18
18
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
19
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
20
20
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -102,7 +102,7 @@ var calendarDoubleRoot = exports.calendarDoubleRoot = function calendarDoubleRoo
102
102
  outerRefs = _useKeyNavigation2[3];
103
103
  var handleOnChangeDay = (0, _react.useCallback)(function (newDate, coord) {
104
104
  var newDay = new Date(newDate.year, newDate.monthIndex, newDate.day);
105
- onChangeValue === null || onChangeValue === void 0 ? void 0 : onChangeValue(newDay);
105
+ onChangeValue === null || onChangeValue === void 0 || onChangeValue(newDay);
106
106
  onSelectIndexes(coord);
107
107
  }, [onChangeValue, onSelectIndexes]);
108
108
  var firstDate = (0, _react.useMemo)(function () {
@@ -9,7 +9,7 @@ var _styledComponents = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/requi
9
9
  var _Calendar = /*#__PURE__*/require("../Calendar.tokens");
10
10
  var _templateObject;
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
13
13
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
14
14
  var StyledCalendar = exports.StyledCalendar = /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n position: relative;\n user-select: none;\n z-index: 1;\n\n display: flex;\n flex-direction: column;\n\n width: 39rem;\n height: 19.5rem;\n"])));
15
15
  var StyledSeparator = exports.StyledSeparator = /*#__PURE__*/_styledComponents["default"].div.withConfig({