@consta/uikit 3.17.3 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (398) hide show
  1. package/Attach/package.json +1 -1
  2. package/Attachment/package.json +1 -1
  3. package/Avatar/package.json +1 -1
  4. package/Badge/package.json +1 -1
  5. package/BasicSelectDeprecated/package.json +1 -1
  6. package/Breadcrumbs/package.json +1 -1
  7. package/BreadcrumbsCanary/package.json +1 -1
  8. package/Button/package.json +1 -1
  9. package/CHANGELOG.md +18 -19
  10. package/Calendar/package.json +1 -1
  11. package/Card/package.json +1 -1
  12. package/Checkbox/package.json +1 -1
  13. package/CheckboxGroup/package.json +1 -1
  14. package/ChoiceGroup/package.json +1 -1
  15. package/Collapse/package.json +1 -1
  16. package/CollapseGroup/package.json +1 -1
  17. package/Combobox/package.json +1 -1
  18. package/ComboboxDeprecated/package.json +1 -1
  19. package/ContextMenu/package.json +1 -1
  20. package/ContextMenuCanary/es.js +1 -0
  21. package/ContextMenuCanary/index.d.ts +1 -0
  22. package/ContextMenuCanary/index.js +4 -0
  23. package/ContextMenuCanary/package.json +9 -0
  24. package/DatePickerCanary/package.json +1 -1
  25. package/DateTimeCanary/package.json +1 -1
  26. package/DragNDropField/package.json +1 -1
  27. package/EventInterceptor/package.json +1 -1
  28. package/FieldCaption/package.json +1 -1
  29. package/FieldLabel/package.json +1 -1
  30. package/File/package.json +1 -1
  31. package/FileField/package.json +1 -1
  32. package/FileIcon/package.json +1 -1
  33. package/FileIconAvi/package.json +1 -1
  34. package/FileIconBmp/package.json +1 -1
  35. package/FileIconCsv/package.json +1 -1
  36. package/FileIconDoc/package.json +1 -1
  37. package/FileIconExe/package.json +1 -1
  38. package/FileIconGif/package.json +1 -1
  39. package/FileIconJpg/package.json +1 -1
  40. package/FileIconJson/package.json +1 -1
  41. package/FileIconLoading/package.json +1 -1
  42. package/FileIconMov/package.json +1 -1
  43. package/FileIconMp3/package.json +1 -1
  44. package/FileIconMp4/package.json +1 -1
  45. package/FileIconPdf/package.json +1 -1
  46. package/FileIconPng/package.json +1 -1
  47. package/FileIconPtt/package.json +1 -1
  48. package/FileIconRar/package.json +1 -1
  49. package/FileIconRtf/package.json +1 -1
  50. package/FileIconTiff/package.json +1 -1
  51. package/FileIconTxt/package.json +1 -1
  52. package/FileIconUndefined/package.json +1 -1
  53. package/FileIconWav/package.json +1 -1
  54. package/FileIconXls/package.json +1 -1
  55. package/FileIconZip/package.json +1 -1
  56. package/Grid/package.json +1 -1
  57. package/Header/package.json +1 -1
  58. package/Icon/package.json +1 -1
  59. package/IconAdd/package.json +1 -1
  60. package/IconAddToComparison/package.json +1 -1
  61. package/IconAlert/package.json +1 -1
  62. package/IconAlignBlocksLeft/package.json +1 -1
  63. package/IconAlignBlocksRight/package.json +1 -1
  64. package/IconAlignCenter/package.json +1 -1
  65. package/IconAlignJustify/package.json +1 -1
  66. package/IconAlignLeft/package.json +1 -1
  67. package/IconAlignRight/package.json +1 -1
  68. package/IconAllDone/package.json +1 -1
  69. package/IconArrowDown/package.json +1 -1
  70. package/IconArrowLeft/package.json +1 -1
  71. package/IconArrowRight/package.json +1 -1
  72. package/IconArrowUp/package.json +1 -1
  73. package/IconArtBrush/package.json +1 -1
  74. package/IconAttach/package.json +1 -1
  75. package/IconBackward/package.json +1 -1
  76. package/IconBag/package.json +1 -1
  77. package/IconBarrier/package.json +1 -1
  78. package/IconBento/package.json +1 -1
  79. package/IconBold/package.json +1 -1
  80. package/IconBook/package.json +1 -1
  81. package/IconBookmarkFilled/package.json +1 -1
  82. package/IconBookmarkStroked/package.json +1 -1
  83. package/IconCalculator/package.json +1 -1
  84. package/IconCalendar/package.json +1 -1
  85. package/IconCamera/package.json +1 -1
  86. package/IconCancel/package.json +1 -1
  87. package/IconCards/package.json +1 -1
  88. package/IconChat/package.json +1 -1
  89. package/IconCheck/package.json +1 -1
  90. package/IconClose/package.json +1 -1
  91. package/IconCollapse/package.json +1 -1
  92. package/IconColorFill/package.json +1 -1
  93. package/IconColorText/package.json +1 -1
  94. package/IconColumns/package.json +1 -1
  95. package/IconComment/package.json +1 -1
  96. package/IconConnection/package.json +1 -1
  97. package/IconCopy/package.json +1 -1
  98. package/IconCrown/package.json +1 -1
  99. package/IconCursorMouse/package.json +1 -1
  100. package/IconDataNull/package.json +1 -1
  101. package/IconDiamond/package.json +1 -1
  102. package/IconDinosaur/package.json +1 -1
  103. package/IconDisconnection/package.json +1 -1
  104. package/IconDocAdd/package.json +1 -1
  105. package/IconDocBlank/package.json +1 -1
  106. package/IconDocDelete/package.json +1 -1
  107. package/IconDocExport/package.json +1 -1
  108. package/IconDocFilled/package.json +1 -1
  109. package/IconDown/package.json +1 -1
  110. package/IconDownload/package.json +1 -1
  111. package/IconDrag/package.json +1 -1
  112. package/IconDraggable/package.json +1 -1
  113. package/IconDrillingRig/package.json +1 -1
  114. package/IconDrop/package.json +1 -1
  115. package/IconEdit/package.json +1 -1
  116. package/IconExit/package.json +1 -1
  117. package/IconExpand/package.json +1 -1
  118. package/IconEye/package.json +1 -1
  119. package/IconEyeClose/package.json +1 -1
  120. package/IconFavorite/package.json +1 -1
  121. package/IconFilter/package.json +1 -1
  122. package/IconFitToDefault/package.json +1 -1
  123. package/IconFlagFilled/package.json +1 -1
  124. package/IconFlagStroked/package.json +1 -1
  125. package/IconFolders/package.json +1 -1
  126. package/IconForward/package.json +1 -1
  127. package/IconFunnel/package.json +1 -1
  128. package/IconGas/package.json +1 -1
  129. package/IconGeo/package.json +1 -1
  130. package/IconGrouping/package.json +1 -1
  131. package/IconHamburger/package.json +1 -1
  132. package/IconHand/package.json +1 -1
  133. package/IconHealth/package.json +1 -1
  134. package/IconHome/package.json +1 -1
  135. package/IconInComparison/package.json +1 -1
  136. package/IconInfo/package.json +1 -1
  137. package/IconIntroduction/package.json +1 -1
  138. package/IconIpad/package.json +1 -1
  139. package/IconItalic/package.json +1 -1
  140. package/IconKebab/package.json +1 -1
  141. package/IconLaptop/package.json +1 -1
  142. package/IconLayers/package.json +1 -1
  143. package/IconLeaf/package.json +1 -1
  144. package/IconLightningBolt/package.json +1 -1
  145. package/IconLineAndBarChart/package.json +1 -1
  146. package/IconLink/package.json +1 -1
  147. package/IconList/package.json +1 -1
  148. package/IconListNumbered/package.json +1 -1
  149. package/IconLock/package.json +1 -1
  150. package/IconLogicalElement/package.json +1 -1
  151. package/IconMBU/package.json +1 -1
  152. package/IconMGRP/package.json +1 -1
  153. package/IconMLSP/package.json +1 -1
  154. package/IconMMP/package.json +1 -1
  155. package/IconMail/package.json +1 -1
  156. package/IconMap/package.json +1 -1
  157. package/IconMaxHeight/package.json +1 -1
  158. package/IconMaxWidth/package.json +1 -1
  159. package/IconMeatball/package.json +1 -1
  160. package/IconMic/package.json +1 -1
  161. package/IconMolecules/package.json +1 -1
  162. package/IconMoon/package.json +1 -1
  163. package/IconNodeEnd/package.json +1 -1
  164. package/IconNodeStart/package.json +1 -1
  165. package/IconNodeStep/package.json +1 -1
  166. package/IconNodes/package.json +1 -1
  167. package/IconOpenInNew/package.json +1 -1
  168. package/IconOperators/package.json +1 -1
  169. package/IconPanelBottom/package.json +1 -1
  170. package/IconPanelLeft/package.json +1 -1
  171. package/IconPanelRight/package.json +1 -1
  172. package/IconPanelTop/package.json +1 -1
  173. package/IconPaste/package.json +1 -1
  174. package/IconPause/package.json +1 -1
  175. package/IconPhone/package.json +1 -1
  176. package/IconPhoto/package.json +1 -1
  177. package/IconPicture/package.json +1 -1
  178. package/IconPlay/package.json +1 -1
  179. package/IconPressure/package.json +1 -1
  180. package/IconPriceLabel/package.json +1 -1
  181. package/IconProcessing/package.json +1 -1
  182. package/IconQuestion/package.json +1 -1
  183. package/IconQuote/package.json +1 -1
  184. package/IconRUO/package.json +1 -1
  185. package/IconRUS/package.json +1 -1
  186. package/IconRecord/package.json +1 -1
  187. package/IconRemove/package.json +1 -1
  188. package/IconRemoveFromComparison/package.json +1 -1
  189. package/IconReply/package.json +1 -1
  190. package/IconResize/package.json +1 -1
  191. package/IconRestart/package.json +1 -1
  192. package/IconRevert/package.json +1 -1
  193. package/IconRing/package.json +1 -1
  194. package/IconRouble/package.json +1 -1
  195. package/IconRuler/package.json +1 -1
  196. package/IconSave/package.json +1 -1
  197. package/IconScreen/package.json +1 -1
  198. package/IconSearch/package.json +1 -1
  199. package/IconSelect/package.json +1 -1
  200. package/IconSelectOpen/package.json +1 -1
  201. package/IconSendMessage/package.json +1 -1
  202. package/IconSettings/package.json +1 -1
  203. package/IconShape/package.json +1 -1
  204. package/IconShuffle/package.json +1 -1
  205. package/IconSmile/package.json +1 -1
  206. package/IconSortDown/package.json +1 -1
  207. package/IconSortDownCenter/package.json +1 -1
  208. package/IconSortUp/package.json +1 -1
  209. package/IconSortUpCenter/package.json +1 -1
  210. package/IconStop/package.json +1 -1
  211. package/IconStorage/package.json +1 -1
  212. package/IconStrikethrough/package.json +1 -1
  213. package/IconSun/package.json +1 -1
  214. package/IconTable/package.json +1 -1
  215. package/IconTable2/package.json +1 -1
  216. package/IconTarget/package.json +1 -1
  217. package/IconTeam/package.json +1 -1
  218. package/IconTechResponse/package.json +1 -1
  219. package/IconTest/package.json +1 -1
  220. package/IconThumbUp/package.json +1 -1
  221. package/IconTie/package.json +1 -1
  222. package/IconTop/package.json +1 -1
  223. package/IconTrash/package.json +1 -1
  224. package/IconType/package.json +1 -1
  225. package/IconUnderline/package.json +1 -1
  226. package/IconUnlock/package.json +1 -1
  227. package/IconUnsort/package.json +1 -1
  228. package/IconUnsortCenter/package.json +1 -1
  229. package/IconUpload/package.json +1 -1
  230. package/IconUser/package.json +1 -1
  231. package/IconVZD/package.json +1 -1
  232. package/IconVideo/package.json +1 -1
  233. package/IconWarning/package.json +1 -1
  234. package/IconWatch/package.json +1 -1
  235. package/IconWideScreen/package.json +1 -1
  236. package/IconWorld/package.json +1 -1
  237. package/IconWrench/package.json +1 -1
  238. package/Informer/package.json +1 -1
  239. package/LayoutCanary/package.json +1 -1
  240. package/Loader/package.json +1 -1
  241. package/MixCard/package.json +1 -1
  242. package/MixFocus/package.json +1 -1
  243. package/MixPopoverAnimate/package.json +1 -1
  244. package/MixPopoverArrow/es.js +1 -0
  245. package/MixPopoverArrow/index.d.ts +1 -0
  246. package/MixPopoverArrow/index.js +4 -0
  247. package/MixPopoverArrow/package.json +9 -0
  248. package/MixSpace/package.json +1 -1
  249. package/MixVisuallyHidden/package.json +1 -1
  250. package/Modal/package.json +1 -1
  251. package/MultiComboboxDeprecated/package.json +1 -1
  252. package/Pagination/package.json +1 -1
  253. package/Popover/package.json +1 -1
  254. package/PortalWithTheme/package.json +1 -1
  255. package/ProgressSpin/package.json +1 -1
  256. package/ProgressStepBarCanary/package.json +1 -1
  257. package/Radio/package.json +1 -1
  258. package/RadioGroup/package.json +1 -1
  259. package/Responses/package.json +1 -1
  260. package/Responses403/package.json +1 -1
  261. package/Responses404/package.json +1 -1
  262. package/Responses500/package.json +1 -1
  263. package/Responses503/package.json +1 -1
  264. package/ResponsesConnectionError/package.json +1 -1
  265. package/ResponsesDeleted/package.json +1 -1
  266. package/ResponsesEmptyBox/package.json +1 -1
  267. package/ResponsesEmptyPockets/package.json +1 -1
  268. package/ResponsesExit/package.json +1 -1
  269. package/ResponsesImage/package.json +1 -1
  270. package/ResponsesImage403/package.json +1 -1
  271. package/ResponsesImage404/package.json +1 -1
  272. package/ResponsesImage500/package.json +1 -1
  273. package/ResponsesImage503/package.json +1 -1
  274. package/ResponsesImageConnectionError/package.json +1 -1
  275. package/ResponsesImageDeleted/package.json +1 -1
  276. package/ResponsesImageEmptyBox/package.json +1 -1
  277. package/ResponsesImageEmptyPockets/package.json +1 -1
  278. package/ResponsesImageNothingFound/package.json +1 -1
  279. package/ResponsesImageSuccess/package.json +1 -1
  280. package/ResponsesNothingFound/package.json +1 -1
  281. package/ResponsesSuccess/package.json +1 -1
  282. package/Select/package.json +1 -1
  283. package/Sidebar/package.json +1 -1
  284. package/Skeleton/package.json +1 -1
  285. package/SliderCanary/package.json +1 -1
  286. package/SnackBar/package.json +1 -1
  287. package/Steps/package.json +1 -1
  288. package/Switch/package.json +1 -1
  289. package/SwitchGroup/package.json +1 -1
  290. package/Table/package.json +1 -1
  291. package/Tabs/package.json +1 -1
  292. package/Tag/package.json +1 -1
  293. package/TagBase/package.json +1 -1
  294. package/Text/package.json +1 -1
  295. package/TextField/package.json +1 -1
  296. package/Theme/package.json +1 -1
  297. package/ThemeToggler/package.json +1 -1
  298. package/Timer/package.json +1 -1
  299. package/Tooltip/package.json +1 -1
  300. package/User/package.json +1 -1
  301. package/UserSelect/package.json +1 -1
  302. package/UserSelectDeprecated/package.json +1 -1
  303. package/__internal__/cjs-src/components/Card/Card.d.ts +1 -0
  304. package/__internal__/cjs-src/components/Card/Card.js +8 -4
  305. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenu.css +18 -0
  306. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuCanary.d.ts +4 -0
  307. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuCanary.js +30 -0
  308. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.css +74 -0
  309. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.d.ts +3 -0
  310. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.js +45 -0
  311. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.css +73 -0
  312. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.d.ts +4 -0
  313. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.js +102 -0
  314. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.d.ts +2 -0
  315. package/__internal__/cjs-src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.js +74 -0
  316. package/__internal__/cjs-src/components/ContextMenuCanary/helper.d.ts +95 -0
  317. package/__internal__/cjs-src/components/ContextMenuCanary/helper.js +119 -0
  318. package/__internal__/cjs-src/components/ContextMenuCanary/types.d.ts +141 -0
  319. package/__internal__/cjs-src/components/ContextMenuCanary/types.js +14 -0
  320. package/__internal__/cjs-src/components/EventInterceptor/EventInterceptor.d.ts +2 -2
  321. package/__internal__/cjs-src/components/EventInterceptor/eventInterceptorMap.d.ts +2 -81
  322. package/__internal__/cjs-src/components/EventInterceptor/types.d.ts +1 -0
  323. package/__internal__/cjs-src/components/EventInterceptor/types.js +2 -0
  324. package/__internal__/cjs-src/components/EventInterceptor/usePropsHandler.d.ts +2 -2
  325. package/__internal__/cjs-src/components/Tag/Tag.d.ts +1 -0
  326. package/__internal__/cjs-src/components/Tag/Tag.js +8 -4
  327. package/__internal__/cjs-src/components/ThemeToggler/ThemeToggler.d.ts +2 -30
  328. package/__internal__/cjs-src/components/ThemeToggler/ThemeToggler.js +23 -37
  329. package/__internal__/cjs-src/components/ThemeToggler/helpers.d.ts +274 -0
  330. package/__internal__/cjs-src/components/ThemeToggler/helpers.js +27 -0
  331. package/__internal__/cjs-src/components/ThemeToggler/types.d.ts +45 -0
  332. package/__internal__/cjs-src/components/ThemeToggler/types.js +5 -0
  333. package/__internal__/cjs-src/components/Tooltip/Tooltip.css +1 -88
  334. package/__internal__/cjs-src/components/Tooltip/Tooltip.js +3 -2
  335. package/__internal__/cjs-src/mixs/MixPopoverArrow/MixPopoverArrow.css +88 -0
  336. package/__internal__/cjs-src/mixs/MixPopoverArrow/MixPopoverArrow.d.ts +8 -0
  337. package/__internal__/cjs-src/mixs/MixPopoverArrow/MixPopoverArrow.js +6 -0
  338. package/__internal__/src/components/Card/Card.d.ts +1 -0
  339. package/__internal__/src/components/Card/Card.js +7 -3
  340. package/__internal__/src/components/ContextMenuCanary/ContextMenu.css +18 -0
  341. package/__internal__/src/components/ContextMenuCanary/ContextMenuCanary.d.ts +4 -0
  342. package/__internal__/src/components/ContextMenuCanary/ContextMenuCanary.js +27 -0
  343. package/__internal__/src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.css +74 -0
  344. package/__internal__/src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.d.ts +3 -0
  345. package/__internal__/src/components/ContextMenuCanary/ContextMenuItem/ContextMenuItem.js +42 -0
  346. package/__internal__/src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.css +73 -0
  347. package/__internal__/src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.d.ts +4 -0
  348. package/__internal__/src/components/ContextMenuCanary/ContextMenuLevel/ContextMenuLevel.js +99 -0
  349. package/__internal__/src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.d.ts +2 -0
  350. package/__internal__/src/components/ContextMenuCanary/ContextMenuLevels/ContextMenuLevels.js +71 -0
  351. package/__internal__/src/components/ContextMenuCanary/helper.d.ts +95 -0
  352. package/__internal__/src/components/ContextMenuCanary/helper.js +115 -0
  353. package/__internal__/src/components/ContextMenuCanary/types.d.ts +141 -0
  354. package/__internal__/src/components/ContextMenuCanary/types.js +11 -0
  355. package/__internal__/src/components/EventInterceptor/EventInterceptor.d.ts +2 -2
  356. package/__internal__/src/components/EventInterceptor/eventInterceptorMap.d.ts +2 -81
  357. package/__internal__/src/components/EventInterceptor/types.d.ts +1 -0
  358. package/__internal__/src/components/EventInterceptor/types.js +0 -0
  359. package/__internal__/src/components/EventInterceptor/usePropsHandler.d.ts +2 -2
  360. package/__internal__/src/components/Tag/Tag.d.ts +1 -0
  361. package/__internal__/src/components/Tag/Tag.js +7 -3
  362. package/__internal__/src/components/ThemeToggler/ThemeToggler.d.ts +2 -30
  363. package/__internal__/src/components/ThemeToggler/ThemeToggler.js +21 -35
  364. package/__internal__/src/components/ThemeToggler/helpers.d.ts +274 -0
  365. package/__internal__/src/components/ThemeToggler/helpers.js +23 -0
  366. package/__internal__/src/components/ThemeToggler/types.d.ts +45 -0
  367. package/__internal__/src/components/ThemeToggler/types.js +2 -0
  368. package/__internal__/src/components/Tooltip/Tooltip.css +1 -88
  369. package/__internal__/src/components/Tooltip/Tooltip.js +3 -2
  370. package/__internal__/src/mixs/MixPopoverArrow/MixPopoverArrow.css +88 -0
  371. package/__internal__/src/mixs/MixPopoverArrow/MixPopoverArrow.d.ts +8 -0
  372. package/__internal__/src/mixs/MixPopoverArrow/MixPopoverArrow.js +3 -0
  373. package/createIcon/package.json +1 -1
  374. package/createResponsesImage/package.json +1 -1
  375. package/package.json +3 -1
  376. package/useBreakpoints/package.json +1 -1
  377. package/useChoiceGroup/package.json +1 -1
  378. package/useChoiceGroupIndexed/package.json +1 -1
  379. package/useClickOutside/package.json +1 -1
  380. package/useComponentSize/package.json +1 -1
  381. package/useDebounce/package.json +1 -1
  382. package/useFlag/package.json +1 -1
  383. package/useForkRef/package.json +1 -1
  384. package/useGlobalKeys/package.json +1 -1
  385. package/useHideElementsInLine/package.json +1 -1
  386. package/useKeys/package.json +1 -1
  387. package/useMutableRef/package.json +1 -1
  388. package/useOverflow/package.json +1 -1
  389. package/usePrevious/package.json +1 -1
  390. package/useRefs/package.json +1 -1
  391. package/useResizeObserved/package.json +1 -1
  392. package/useScrollElements/package.json +1 -1
  393. package/useScrollPosition/package.json +1 -1
  394. package/useSelect/package.json +1 -1
  395. package/useSortSteps/package.json +1 -1
  396. package/useThemeVars/package.json +1 -1
  397. package/useTimer/package.json +1 -1
  398. package/withTooltip/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ /// <reference types="react" />
2
+ import { IconComponent } from '../../icons/Icon/Icon';
3
+ import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
4
+ import { Direction } from '../Popover/Popover';
5
+ export declare const themeTogglerPropSize: readonly ["m", "l", "s", "xs"];
6
+ export declare type ThemeTogglerPropSize = typeof themeTogglerPropSize[number];
7
+ export declare const themeTogglerPropSizeDefault: ThemeTogglerPropSize;
8
+ export declare type ThemeTogglerPropSetValue<ITEM> = (props: {
9
+ e: React.MouseEvent;
10
+ value: ITEM;
11
+ }) => void;
12
+ export declare type ThemeTogglerPropGetItemKey<ITEM> = (item: ITEM) => string | number;
13
+ export declare type ThemeTogglerPropGetItemLabel<ITEM> = (item: ITEM) => string;
14
+ export declare type ThemeTogglerPropGetItemIcon<ITEM> = (item: ITEM) => IconComponent;
15
+ export declare type ThemeTogglerItemDefault = {
16
+ key: string;
17
+ label: string;
18
+ icon: IconComponent;
19
+ };
20
+ export declare type ThemeTogglerProps<ITEM = ThemeTogglerItemDefault> = PropsWithHTMLAttributesAndRef<{
21
+ size?: ThemeTogglerPropSize;
22
+ className?: string;
23
+ items: ITEM[];
24
+ value: ITEM;
25
+ onChange: ThemeTogglerPropSetValue<ITEM>;
26
+ getItemKey?: ThemeTogglerPropGetItemKey<ITEM>;
27
+ getItemLabel?: ThemeTogglerPropGetItemLabel<ITEM>;
28
+ getItemIcon?: ThemeTogglerPropGetItemIcon<ITEM>;
29
+ direction?: Direction;
30
+ possibleDirections?: readonly Direction[];
31
+ children?: never;
32
+ }, HTMLButtonElement> & (ITEM extends {
33
+ key: ThemeTogglerItemDefault['key'];
34
+ } ? {} : {
35
+ getItemKey: ThemeTogglerPropGetItemLabel<ITEM>;
36
+ }) & (ITEM extends {
37
+ label: ThemeTogglerItemDefault['label'];
38
+ } ? {} : {
39
+ getItemLabel: ThemeTogglerPropGetItemLabel<ITEM>;
40
+ }) & (ITEM extends {
41
+ icon: ThemeTogglerItemDefault['icon'];
42
+ } ? {} : {
43
+ getItemIcon: ThemeTogglerPropGetItemIcon<ITEM>;
44
+ });
45
+ export declare type ThemeTogglerComponent = <ITEM>(props: ThemeTogglerProps<ITEM>) => React.ReactElement | null;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.themeTogglerPropSizeDefault = exports.themeTogglerPropSize = void 0;
4
+ exports.themeTogglerPropSize = ['m', 'l', 's', 'xs'];
5
+ exports.themeTogglerPropSizeDefault = exports.themeTogglerPropSize[0];
@@ -1,10 +1,7 @@
1
1
  .Tooltip {
2
2
  --tooltip-bg-color: var(--color-bg-default);
3
+ --popover-arrow-bg-color: var(--tooltip-bg-color);
3
4
  --tooltip-bg-opacity: 0.9;
4
-
5
- /* Задаются через js */
6
- --tooltip-arrow-size: 0;
7
- --tooltip-arrow-offset: 0;
8
5
  }
9
6
 
10
7
  .Tooltip_status_alert {
@@ -67,89 +64,5 @@
67
64
  }
68
65
 
69
66
  .Tooltip-Arrow {
70
- position: absolute;
71
- border: var(--tooltip-arrow-size) solid transparent;
72
67
  opacity: var(--tooltip-bg-opacity);
73
68
  }
74
-
75
- .Tooltip-Arrow_direction_upLeft,
76
- .Tooltip-Arrow_direction_upCenter,
77
- .Tooltip-Arrow_direction_upRight,
78
- .Tooltip-Arrow_direction_upStartLeft,
79
- .Tooltip-Arrow_direction_upStartRight {
80
- bottom: 0;
81
- border-top-color: var(--tooltip-bg-color);
82
- -webkit-transform: translateY(100%);
83
- transform: translateY(100%);
84
- }
85
-
86
- .Tooltip-Arrow_direction_upLeft,
87
- .Tooltip-Arrow_direction_downLeft,
88
- .Tooltip-Arrow_direction_downStartRight,
89
- .Tooltip-Arrow_direction_upStartRight {
90
- right: var(--tooltip-arrow-offset);
91
- }
92
-
93
- .Tooltip-Arrow_direction_upCenter,
94
- .Tooltip-Arrow_direction_downCenter {
95
- left: calc(50% - var(--tooltip-arrow-size));
96
- }
97
-
98
- .Tooltip-Arrow_direction_upRight,
99
- .Tooltip-Arrow_direction_downRight,
100
- .Tooltip-Arrow_direction_downStartLeft,
101
- .Tooltip-Arrow_direction_upStartLeft {
102
- left: var(--tooltip-arrow-offset);
103
- }
104
-
105
- .Tooltip-Arrow_direction_downLeft,
106
- .Tooltip-Arrow_direction_downCenter,
107
- .Tooltip-Arrow_direction_downRight,
108
- .Tooltip-Arrow_direction_downStartLeft,
109
- .Tooltip-Arrow_direction_downStartRight {
110
- top: 0;
111
- border-bottom-color: var(--tooltip-bg-color);
112
- -webkit-transform: translateY(-100%);
113
- transform: translateY(-100%);
114
- }
115
-
116
- .Tooltip-Arrow_direction_rightUp,
117
- .Tooltip-Arrow_direction_rightCenter,
118
- .Tooltip-Arrow_direction_rightDown,
119
- .Tooltip-Arrow_direction_rightStartUp,
120
- .Tooltip-Arrow_direction_rightStartDown {
121
- left: 0;
122
- border-right-color: var(--tooltip-bg-color);
123
- -webkit-transform: translateX(-100%);
124
- transform: translateX(-100%);
125
- }
126
-
127
- .Tooltip-Arrow_direction_rightUp,
128
- .Tooltip-Arrow_direction_leftUp,
129
- .Tooltip-Arrow_direction_leftStartDown,
130
- .Tooltip-Arrow_direction_rightStartDown {
131
- bottom: var(--tooltip-arrow-offset);
132
- }
133
-
134
- .Tooltip-Arrow_direction_rightCenter,
135
- .Tooltip-Arrow_direction_leftCenter {
136
- top: calc(50% - var(--tooltip-arrow-size));
137
- }
138
-
139
- .Tooltip-Arrow_direction_rightDown,
140
- .Tooltip-Arrow_direction_leftDown,
141
- .Tooltip-Arrow_direction_leftStartUp,
142
- .Tooltip-Arrow_direction_rightStartUp {
143
- top: var(--tooltip-arrow-offset);
144
- }
145
-
146
- .Tooltip-Arrow_direction_leftUp,
147
- .Tooltip-Arrow_direction_leftCenter,
148
- .Tooltip-Arrow_direction_leftDown,
149
- .Tooltip-Arrow_direction_leftStartUp,
150
- .Tooltip-Arrow_direction_leftStartDown {
151
- right: 0;
152
- border-left-color: var(--tooltip-bg-color);
153
- -webkit-transform: translateX(100%);
154
- transform: translateX(100%);
155
- }
@@ -4,6 +4,7 @@ exports.Tooltip = exports.tooltipPropStatus = exports.tooltipPropSizesDefault =
4
4
  var tslib_1 = require("tslib");
5
5
  require("./Tooltip.css");
6
6
  var react_1 = tslib_1.__importStar(require("react"));
7
+ var MixPopoverArrow_1 = require("../../mixs/MixPopoverArrow/MixPopoverArrow");
7
8
  var bem_1 = require("../../utils/bem");
8
9
  var Popover_1 = require("../Popover/Popover");
9
10
  var Text_1 = require("../Text/Text");
@@ -38,8 +39,8 @@ exports.Tooltip = react_1["default"].forwardRef(function (props, ref) {
38
39
  setDirection(direction);
39
40
  };
40
41
  return (react_1["default"].createElement(Theme_1.ThemeContext.Provider, { value: { theme: tooltipTheme, themeClassNames: tooltipThemeClassNames } },
41
- react_1["default"].createElement(Popover_1.Popover, tslib_1.__assign({}, rest, { arrowOffset: ARROW_OFFSET + ARROW_SIZE, offset: ARROW_SIZE + 4, onSetDirection: onSetDirection, ref: ref, className: cnTooltip({ status: status }, [className]), style: tslib_1.__assign((_a = {}, _a['--tooltip-arrow-size'] = ARROW_SIZE + "px", _a['--tooltip-arrow-offset'] = ARROW_OFFSET + "px", _a), style) }),
42
+ react_1["default"].createElement(Popover_1.Popover, tslib_1.__assign({}, rest, { arrowOffset: ARROW_OFFSET + ARROW_SIZE, offset: ARROW_SIZE + 4, onSetDirection: onSetDirection, ref: ref, className: cnTooltip({ status: status }, [className]), style: tslib_1.__assign((_a = {}, _a['--popover-arrow-size'] = ARROW_SIZE + "px", _a['--popover-arrow-offset'] = ARROW_OFFSET + "px", _a), style) }),
42
43
  react_1["default"].createElement("div", { className: cnTooltip('Background') }),
43
- react_1["default"].createElement("div", { className: cnTooltip('Arrow', { direction: direction }) }),
44
+ react_1["default"].createElement("div", { className: cnTooltip('Arrow', [MixPopoverArrow_1.cnMixPopoverArrow({ direction: direction })]) }),
44
45
  react_1["default"].createElement("div", { className: cnTooltip('Content', { size: size }) }, renderChildren(children)))));
45
46
  });
@@ -0,0 +1,88 @@
1
+ .MixPopoverArrow {
2
+ --popover-arrow-size: 10px;
3
+ --popover-arrow-offset: 6px;
4
+ position: absolute;
5
+ border: var(--popover-arrow-size) solid transparent;
6
+ }
7
+
8
+ .MixPopoverArrow_direction_upLeft,
9
+ .MixPopoverArrow_direction_upCenter,
10
+ .MixPopoverArrow_direction_upRight,
11
+ .MixPopoverArrow_direction_upStartLeft,
12
+ .MixPopoverArrow_direction_upStartRight {
13
+ bottom: 0;
14
+ border-top-color: var(--popover-arrow-bg-color);
15
+ -webkit-transform: translateY(100%);
16
+ transform: translateY(100%);
17
+ }
18
+
19
+ .MixPopoverArrow_direction_upLeft,
20
+ .MixPopoverArrow_direction_downLeft,
21
+ .MixPopoverArrow_direction_downStartRight,
22
+ .MixPopoverArrow_direction_upStartRight {
23
+ right: var(--popover-arrow-offset);
24
+ }
25
+
26
+ .MixPopoverArrow_direction_upCenter,
27
+ .MixPopoverArrow_direction_downCenter {
28
+ left: calc(50% - var(--popover-arrow-size));
29
+ }
30
+
31
+ .MixPopoverArrow_direction_upRight,
32
+ .MixPopoverArrow_direction_downRight,
33
+ .MixPopoverArrow_direction_downStartLeft,
34
+ .MixPopoverArrow_direction_upStartLeft {
35
+ left: var(--popover-arrow-offset);
36
+ }
37
+
38
+ .MixPopoverArrow_direction_downLeft,
39
+ .MixPopoverArrow_direction_downCenter,
40
+ .MixPopoverArrow_direction_downRight,
41
+ .MixPopoverArrow_direction_downStartLeft,
42
+ .MixPopoverArrow_direction_downStartRight {
43
+ top: 0;
44
+ border-bottom-color: var(--popover-arrow-bg-color);
45
+ -webkit-transform: translateY(-100%);
46
+ transform: translateY(-100%);
47
+ }
48
+
49
+ .MixPopoverArrow_direction_rightUp,
50
+ .MixPopoverArrow_direction_rightCenter,
51
+ .MixPopoverArrow_direction_rightDown,
52
+ .MixPopoverArrow_direction_rightStartUp,
53
+ .MixPopoverArrow_direction_rightStartDown {
54
+ left: 0;
55
+ border-right-color: var(--popover-arrow-bg-color);
56
+ -webkit-transform: translateX(-100%);
57
+ transform: translateX(-100%);
58
+ }
59
+
60
+ .MixPopoverArrow_direction_rightUp,
61
+ .MixPopoverArrow_direction_leftUp,
62
+ .MixPopoverArrow_direction_leftStartDown,
63
+ .MixPopoverArrow_direction_rightStartDown {
64
+ bottom: var(--popover-arrow-offset);
65
+ }
66
+
67
+ .MixPopoverArrow_direction_rightCenter,
68
+ .MixPopoverArrow_direction_leftCenter {
69
+ top: calc(50% - var(--popover-arrow-size));
70
+ }
71
+
72
+ .MixPopoverArrow_direction_rightDown,
73
+ .MixPopoverArrow_direction_leftDown,
74
+ .MixPopoverArrow_direction_leftStartUp,
75
+ .MixPopoverArrow_direction_rightStartUp {
76
+ top: var(--popover-arrow-offset);
77
+ }
78
+
79
+ .MixPopoverArrow_direction_leftUp,
80
+ .MixPopoverArrow_direction_leftCenter,
81
+ .MixPopoverArrow_direction_leftDown,
82
+ .MixPopoverArrow_direction_leftStartUp,
83
+ .MixPopoverArrow_direction_leftStartDown {
84
+ right: 0;
85
+ border-left-color: var(--popover-arrow-bg-color);
86
+ -webkit-transform: translateX(100%);
87
+ transform: translateX(100%);
88
+ }
@@ -0,0 +1,8 @@
1
+ import './MixPopoverArrow.css';
2
+ import { Direction } from '../../components/Popover/Popover';
3
+ declare type Props = {
4
+ direction?: Direction;
5
+ };
6
+ declare type CnMixPopoverArrow = (elemNameOrBlockMods?: Props | string | null, elemModsOrBlockMix?: Props | Array<string | undefined> | null, elemMix?: Array<string | undefined>) => string;
7
+ export declare const cnMixPopoverArrow: CnMixPopoverArrow;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.cnMixPopoverArrow = void 0;
4
+ require("./MixPopoverArrow.css");
5
+ var bem_1 = require("../../utils/bem");
6
+ exports.cnMixPopoverArrow = bem_1.cn('MixPopoverArrow');
@@ -14,5 +14,6 @@ export declare type Props = {
14
14
  shadow?: boolean;
15
15
  children?: React.ReactNode;
16
16
  };
17
+ export declare const COMPONENT_NAME: "Card";
17
18
  export declare const cnCard: import("@bem-react/classname").ClassNameFormatter;
18
19
  export declare const Card: import("../../utils/types/PropsWithAsAttributes").ComponentWithAs<Props, "div">;
@@ -1,17 +1,21 @@
1
1
  import { __assign, __rest } from "tslib";
2
- import React from 'react';
2
+ import React, { useRef } from 'react';
3
+ import { useForkRef } from '../../hooks/useForkRef/useForkRef';
3
4
  import { cnMixCard } from '../../mixs/MixCard/MixCard';
4
5
  import { cn } from '../../utils/bem';
5
6
  import { forwardRefWithAs } from '../../utils/types/PropsWithAsAttributes';
7
+ import { usePropsHandler } from '../EventInterceptor/usePropsHandler';
6
8
  export var cardPropForm = ['round', 'square'];
7
9
  export var cardPropFormDefault = cardPropForm[0];
8
10
  export var cardPropSpace = ['m', 'xs', 's', 'l', 'xl', '2xl', '3xl', '4xl', '5xl'];
9
11
  export var cardPropStatus = ['alert', 'success', 'warning'];
12
+ export var COMPONENT_NAME = 'Card';
10
13
  export var cnCard = cn('Card');
11
14
  export var Card = forwardRefWithAs(function (props, ref) {
12
- var verticalSpace = props.verticalSpace, horizontalSpace = props.horizontalSpace, status = props.status, _a = props.form, form = _a === void 0 ? cardPropFormDefault : _a, _b = props.shadow, shadow = _b === void 0 ? true : _b, children = props.children, tabIndex = props.tabIndex, className = props.className, _c = props.as, as = _c === void 0 ? 'div' : _c, otherProps = __rest(props, ["verticalSpace", "horizontalSpace", "status", "form", "shadow", "children", "tabIndex", "className", "as"]);
15
+ var cardRef = useRef(null);
16
+ var _a = usePropsHandler(COMPONENT_NAME, props, cardRef), verticalSpace = _a.verticalSpace, horizontalSpace = _a.horizontalSpace, status = _a.status, _b = _a.form, form = _b === void 0 ? cardPropFormDefault : _b, _c = _a.shadow, shadow = _c === void 0 ? true : _c, children = _a.children, tabIndex = _a.tabIndex, className = _a.className, _d = _a.as, as = _d === void 0 ? 'div' : _d, otherProps = __rest(_a, ["verticalSpace", "horizontalSpace", "status", "form", "shadow", "children", "tabIndex", "className", "as"]);
13
17
  var Tag = as;
14
- return (React.createElement(Tag, __assign({ tabIndex: tabIndex, ref: ref, className: cnCard(null, [
18
+ return (React.createElement(Tag, __assign({ tabIndex: tabIndex, ref: useForkRef([cardRef, ref]), className: cnCard(null, [
15
19
  cnMixCard({ verticalSpace: verticalSpace, horizontalSpace: horizontalSpace, shadow: shadow, form: form, status: status }),
16
20
  className,
17
21
  ]) }, otherProps), children));
@@ -0,0 +1,18 @@
1
+ .ContextMenuCanary-Level {
2
+ pointer-events: none;
3
+ }
4
+
5
+ .ContextMenuCanary-Level.MixPopoverAnimate_animate_entered {
6
+ pointer-events: auto;
7
+ }
8
+
9
+ .ContextMenuCanary-Level_playAnimation.MixPopoverAnimate {
10
+ opacity: 0 !important;
11
+ pointer-events: none;
12
+ -webkit-transition: opacity 0.2s, -webkit-transform 0.2s !important;
13
+ transition: opacity 0.2s, -webkit-transform 0.2s !important;
14
+ transition: opacity 0.2s, transform 0.2s !important;
15
+ transition: opacity 0.2s, transform 0.2s, -webkit-transform 0.2s !important;
16
+ -webkit-transform: var(--mix-dropdown-animate-transform) !important;
17
+ transform: var(--mix-dropdown-animate-transform) !important;
18
+ }
@@ -0,0 +1,4 @@
1
+ import './ContextMenu.css';
2
+ import { ContextMenuComponent } from './types';
3
+ export declare const ContextMenu: ContextMenuComponent;
4
+ export * from './types';
@@ -0,0 +1,27 @@
1
+ import { __assign, __read, __rest } from "tslib";
2
+ import './ContextMenu.css';
3
+ import React, { useRef, useState } from 'react';
4
+ import { Transition } from 'react-transition-group';
5
+ import { useFlag } from '../../hooks/useFlag/useFlag';
6
+ import { useForkRef } from '../../hooks/useForkRef/useForkRef';
7
+ import { animateTimeout, cnMixPopoverAnimate, } from '../../mixs/MixPopoverAnimate/MixPopoverAnimate';
8
+ import { cn } from '../../utils/bem';
9
+ import { ContextMenuLevels } from './ContextMenuLevels/ContextMenuLevels';
10
+ var cnContextMenu = cn('ContextMenuCanary');
11
+ function ContextMenuRender(props, ref) {
12
+ var isOpen = props.isOpen, className = props.className, onSetDirection = props.onSetDirection, otherProps = __rest(props, ["isOpen", "className", "onSetDirection"]);
13
+ var _a = __read(useFlag(), 2), playAnimation = _a[0], setPlayAnimation = _a[1];
14
+ var _b = __read(useState(props.direction), 2), direction = _b[0], setDirection = _b[1];
15
+ var nodeRef = useRef(null);
16
+ var levelRef = useForkRef([ref, nodeRef]);
17
+ var handleSetDirection = function (d) {
18
+ setDirection(d);
19
+ onSetDirection === null || onSetDirection === void 0 ? void 0 : onSetDirection(d);
20
+ };
21
+ return (React.createElement(Transition, { "in": isOpen, unmountOnExit: true, timeout: animateTimeout, onEnter: setPlayAnimation.off, onExit: setPlayAnimation.on, nodeRef: nodeRef }, function (animate) { return (React.createElement(ContextMenuLevels, __assign({}, otherProps, { ref: levelRef, onSetDirection: handleSetDirection, className: cnContextMenu('Level', { playAnimation: playAnimation }, [
22
+ className,
23
+ cnMixPopoverAnimate({ animate: animate, direction: direction }),
24
+ ]) }))); }));
25
+ }
26
+ export var ContextMenu = React.forwardRef(ContextMenuRender);
27
+ export * from './types';
@@ -0,0 +1,74 @@
1
+ .ContextMenuItemCanary {
2
+ --vertical-space: 0;
3
+ display: -webkit-box;
4
+ display: -ms-flexbox;
5
+ display: flex;
6
+ -webkit-box-align: center;
7
+ -ms-flex-align: center;
8
+ align-items: center;
9
+ padding: var(--vertical-space) var(--space-s);
10
+ text-decoration: none;
11
+ word-break: break-word;
12
+ cursor: pointer;
13
+ -webkit-transition: background-color 0.2s;
14
+ transition: background-color 0.2s;
15
+ gap: var(--space-xs);
16
+ }
17
+
18
+ .ContextMenuItemCanary:hover,
19
+ .ContextMenuItemCanary_active {
20
+ background: var(--color-control-bg-clear-hover);
21
+ }
22
+
23
+ .ContextMenuItemCanary_size_xs {
24
+ --vertical-space: var(--space-2xs);
25
+ }
26
+
27
+ .ContextMenuItemCanary_size_s {
28
+ --vertical-space: var(--space-xs);
29
+ }
30
+
31
+ .ContextMenuItemCanary_size_m {
32
+ --vertical-space: var(--space-s);
33
+ }
34
+
35
+ .ContextMenuItemCanary_size_l {
36
+ --vertical-space: var(--space-m);
37
+ }
38
+
39
+ .ContextMenuItemCanary-Label {
40
+ -webkit-box-flex: 1;
41
+ -ms-flex: 1;
42
+ flex: 1;
43
+ }
44
+
45
+ .ContextMenuItemCanary_disabled.Text {
46
+ color: var(--color-control-typo-disable);
47
+ cursor: default;
48
+ }
49
+
50
+ .ContextMenuItemCanary_disabled.Text:hover {
51
+ background: transparent;
52
+ }
53
+
54
+ .ContextMenuItemCanary-Slot {
55
+ display: -webkit-box;
56
+ display: -ms-flexbox;
57
+ display: flex;
58
+ -webkit-box-align: center;
59
+ -ms-flex-align: center;
60
+ align-items: center;
61
+ }
62
+
63
+ .ContextMenuItemCanary-Slot_position_left,
64
+ .ContextMenuItemCanary-Slot_position_right {
65
+ -webkit-box-flex: 0;
66
+ -ms-flex: 0;
67
+ flex: 0;
68
+ }
69
+
70
+ .ContextMenuItemCanary-Slot_position_center {
71
+ -webkit-box-flex: 1;
72
+ -ms-flex: 1;
73
+ flex: 1;
74
+ }
@@ -0,0 +1,3 @@
1
+ import './ContextMenuItem.css';
2
+ import { ContextMenuItemComponent } from '../types';
3
+ export declare const ContextMenuItem: ContextMenuItemComponent;
@@ -0,0 +1,42 @@
1
+ import { __assign, __read, __rest, __spread } from "tslib";
2
+ import './ContextMenuItem.css';
3
+ import React from 'react';
4
+ import { IconArrowRight } from '../../../icons/IconArrowRight/IconArrowRight';
5
+ import { cn } from '../../../utils/bem';
6
+ import { getByMap } from '../../../utils/getByMap';
7
+ import { Text } from '../../Text/Text';
8
+ import { sizeMapIcon } from '../helper';
9
+ import { contextMenuDefaultSize, } from '../types';
10
+ var cnContextMenuItem = cn('ContextMenuItemCanary');
11
+ function renderSide(side, position, withArrow, size, icon) {
12
+ var sides = side ? __spread((Array.isArray(side) ? side : [side])) : [];
13
+ if (icon) {
14
+ var Icon = icon;
15
+ var render = React.createElement(Icon, { size: getByMap(sizeMapIcon, size) });
16
+ if (position === 'left') {
17
+ sides.unshift(render);
18
+ }
19
+ if (position === 'right') {
20
+ sides.push(render);
21
+ }
22
+ }
23
+ if (withArrow) {
24
+ sides.push(React.createElement(IconArrowRight, { size: "xs", view: "secondary" }));
25
+ }
26
+ var sidesRender = sides.map(function (item, index) { return (React.createElement("div", { className: cnContextMenuItem('Slot', {
27
+ position: position
28
+ }), key: cnContextMenuItem('Slot', {
29
+ position: position,
30
+ index: index
31
+ }) }, item)); });
32
+ return sidesRender;
33
+ }
34
+ function ContextMenuItemRender(props, ref) {
35
+ var label = props.label, rightSide = props.rightSide, leftSide = props.leftSide, _a = props.size, size = _a === void 0 ? contextMenuDefaultSize : _a, _b = props.as, as = _b === void 0 ? 'div' : _b, disabled = props.disabled, status = props.status, withSubMenu = props.withSubMenu, className = props.className, active = props.active, leftIcon = props.leftIcon, rightIcon = props.rightIcon, otherProps = __rest(props, ["label", "rightSide", "leftSide", "size", "as", "disabled", "status", "withSubMenu", "className", "active", "leftIcon", "rightIcon"]);
36
+ var view = (disabled ? undefined : status) || 'primary';
37
+ return (React.createElement(Text, __assign({ className: cnContextMenuItem({ size: size, active: active, disabled: disabled }, [className]), as: as, size: size, view: view, lineHeight: "xs", ref: ref }, otherProps),
38
+ renderSide(leftSide, 'left', false, size, leftIcon),
39
+ !rightSide && !leftSide && !withSubMenu && !leftIcon && !rightIcon ? (label) : (React.createElement("div", { className: cnContextMenuItem('Slot', { position: 'center' }), key: "center" }, label)),
40
+ renderSide(rightSide, 'right', withSubMenu, size, rightIcon)));
41
+ }
42
+ export var ContextMenuItem = React.forwardRef(ContextMenuItemRender);
@@ -0,0 +1,73 @@
1
+ .ContextMenuLevelCanary {
2
+ -webkit-box-sizing: border-box;
3
+ box-sizing: border-box;
4
+ width: 240px;
5
+ padding: var(--space-xs) 0;
6
+ background: var(--color-bg-default);
7
+ border: var(--control-border-width) solid var(--color-control-bg-border-default);
8
+ border-radius: var(--control-radius);
9
+ -webkit-box-shadow: var(--shadow-layer);
10
+ box-shadow: var(--shadow-layer);
11
+ }
12
+
13
+ .ContextMenuLevelCanary:not(.ContextMenuLevelCanary_firstLevel).ContextMenuLevelCanary_direction_rightStartUp,
14
+ .ContextMenuLevelCanary:not(.ContextMenuLevelCanary_firstLevel).ContextMenuLevelCanary_direction_leftStartUp {
15
+ -webkit-transform: translateY(calc(-1 * (var(--space-xs) + 1px)));
16
+ transform: translateY(calc(-1 * (var(--space-xs) + 1px)));
17
+ }
18
+
19
+ .ContextMenuLevelCanary:not(.ContextMenuLevelCanary_firstLevel).ContextMenuLevelCanary_direction_rightStartDown,
20
+ .ContextMenuLevelCanary:not(.ContextMenuLevelCanary_firstLevel).ContextMenuLevelCanary_direction_leftStartDown {
21
+ -webkit-transform: translateY(calc(var(--space-xs) + 1px));
22
+ transform: translateY(calc(var(--space-xs) + 1px));
23
+ }
24
+
25
+ .ContextMenuLevelCanary-Divider {
26
+ --vertical-space: 0;
27
+ height: var(--control-border-width);
28
+ margin: var(--vertical-space) var(--space-s);
29
+ background: var(--color-control-bg-border-default);
30
+ }
31
+
32
+ .ContextMenuLevelCanary-Divider_size_l {
33
+ --vertical-space: var(--space-xs);
34
+ }
35
+
36
+ .ContextMenuLevelCanary-Divider_size_m,
37
+ .ContextMenuLevelCanary-Divider_size_s,
38
+ .ContextMenuLevelCanary-Divider_size_xs {
39
+ --vertical-space: var(--space-2xs);
40
+ }
41
+
42
+ .ContextMenuLevelCanary-Group_size_xs > .ContextMenuLevel-Item:not(:last-child) {
43
+ margin-bottom: var(--space-2xs);
44
+ }
45
+
46
+ .ContextMenuLevelCanary-Header {
47
+ --top-space: 0;
48
+ --bottom-space: 0;
49
+ margin: 0 var(--space-s);
50
+ padding: var(--top-space) 0 var(--bottom-space) 0;
51
+ border-bottom: solid var(--control-border-width) var(--color-control-bg-border-default);
52
+ letter-spacing: 0.05em;
53
+ }
54
+
55
+ .ContextMenuLevelCanary-Header_size_xs,
56
+ .ContextMenuLevelCanary-Header_size_s {
57
+ --top-space: var(--space-xs);
58
+ --bottom-space: var(--space-2xs);
59
+ }
60
+
61
+ .ContextMenuLevelCanary-Header_size_m {
62
+ --top-space: var(--space-s);
63
+ --bottom-space: var(--space-xs);
64
+ }
65
+
66
+ .ContextMenuLevelCanary-Header_size_l {
67
+ --top-space: var(--space-s);
68
+ --bottom-space: var(--space-s);
69
+ }
70
+
71
+ .ContextMenuLevelCanary-Header_first {
72
+ padding: calc(var(--top-space) - var(--space-xs)) 0 var(--bottom-space) 0;
73
+ }
@@ -0,0 +1,4 @@
1
+ import './ContextMenuLevel.css';
2
+ import { ContextMenuLevelComponent } from '../types';
3
+ export declare const cnContextMenuLevel: import("@bem-react/classname").ClassNameFormatter;
4
+ export declare const ContextMenuLevel: ContextMenuLevelComponent;