@consta/uikit 3.12.4 → 3.13.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 (339) 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/es.js +1 -0
  8. package/BreadcrumbsCanary/index.d.ts +1 -0
  9. package/BreadcrumbsCanary/index.js +4 -0
  10. package/BreadcrumbsCanary/package.json +9 -0
  11. package/Button/package.json +1 -1
  12. package/CHANGELOG.md +22 -14
  13. package/Calendar/package.json +1 -1
  14. package/Card/package.json +1 -1
  15. package/Checkbox/package.json +1 -1
  16. package/CheckboxGroup/package.json +1 -1
  17. package/ChoiceGroup/package.json +1 -1
  18. package/Collapse/package.json +1 -1
  19. package/CollapseGroup/package.json +1 -1
  20. package/Combobox/package.json +1 -1
  21. package/ComboboxDeprecated/package.json +1 -1
  22. package/ContextMenu/package.json +1 -1
  23. package/DatePickerCanary/package.json +1 -1
  24. package/DateTimeCanary/package.json +1 -1
  25. package/DragNDropField/package.json +1 -1
  26. package/EventInterceptor/package.json +1 -1
  27. package/FieldCaption/package.json +1 -1
  28. package/FieldLabel/package.json +1 -1
  29. package/File/package.json +1 -1
  30. package/FileField/package.json +1 -1
  31. package/FileIcon/package.json +1 -1
  32. package/FileIconAvi/package.json +1 -1
  33. package/FileIconBmp/package.json +1 -1
  34. package/FileIconCsv/package.json +1 -1
  35. package/FileIconDoc/package.json +1 -1
  36. package/FileIconExe/package.json +1 -1
  37. package/FileIconGif/package.json +1 -1
  38. package/FileIconJpg/package.json +1 -1
  39. package/FileIconJson/package.json +1 -1
  40. package/FileIconLoading/package.json +1 -1
  41. package/FileIconMov/package.json +1 -1
  42. package/FileIconMp3/package.json +1 -1
  43. package/FileIconMp4/package.json +1 -1
  44. package/FileIconPdf/package.json +1 -1
  45. package/FileIconPng/package.json +1 -1
  46. package/FileIconPtt/package.json +1 -1
  47. package/FileIconRar/package.json +1 -1
  48. package/FileIconRtf/package.json +1 -1
  49. package/FileIconTiff/package.json +1 -1
  50. package/FileIconTxt/package.json +1 -1
  51. package/FileIconUndefined/package.json +1 -1
  52. package/FileIconWav/package.json +1 -1
  53. package/FileIconXls/package.json +1 -1
  54. package/FileIconZip/package.json +1 -1
  55. package/Grid/package.json +1 -1
  56. package/Header/package.json +1 -1
  57. package/Icon/package.json +1 -1
  58. package/IconAdd/package.json +1 -1
  59. package/IconAddToComparison/package.json +1 -1
  60. package/IconAlert/package.json +1 -1
  61. package/IconAlignBlocksLeft/package.json +1 -1
  62. package/IconAlignBlocksRight/package.json +1 -1
  63. package/IconAlignCenter/package.json +1 -1
  64. package/IconAlignJustify/package.json +1 -1
  65. package/IconAlignLeft/package.json +1 -1
  66. package/IconAlignRight/package.json +1 -1
  67. package/IconAllDone/package.json +1 -1
  68. package/IconArrowDown/package.json +1 -1
  69. package/IconArrowLeft/package.json +1 -1
  70. package/IconArrowRight/package.json +1 -1
  71. package/IconArrowUp/package.json +1 -1
  72. package/IconArtBrush/package.json +1 -1
  73. package/IconAttach/package.json +1 -1
  74. package/IconBackward/package.json +1 -1
  75. package/IconBag/package.json +1 -1
  76. package/IconBarrier/package.json +1 -1
  77. package/IconBento/package.json +1 -1
  78. package/IconBold/package.json +1 -1
  79. package/IconBook/package.json +1 -1
  80. package/IconBookmarkFilled/package.json +1 -1
  81. package/IconBookmarkStroked/package.json +1 -1
  82. package/IconCalculator/package.json +1 -1
  83. package/IconCalendar/package.json +1 -1
  84. package/IconCamera/package.json +1 -1
  85. package/IconCancel/package.json +1 -1
  86. package/IconCards/package.json +1 -1
  87. package/IconChat/package.json +1 -1
  88. package/IconCheck/package.json +1 -1
  89. package/IconClose/package.json +1 -1
  90. package/IconCollapse/package.json +1 -1
  91. package/IconColorFill/package.json +1 -1
  92. package/IconColorText/package.json +1 -1
  93. package/IconColumns/package.json +1 -1
  94. package/IconComment/package.json +1 -1
  95. package/IconConnection/package.json +1 -1
  96. package/IconCopy/package.json +1 -1
  97. package/IconCrown/package.json +1 -1
  98. package/IconCursorMouse/package.json +1 -1
  99. package/IconDataNull/package.json +1 -1
  100. package/IconDiamond/package.json +1 -1
  101. package/IconDinosaur/package.json +1 -1
  102. package/IconDisconnection/package.json +1 -1
  103. package/IconDocAdd/package.json +1 -1
  104. package/IconDocBlank/package.json +1 -1
  105. package/IconDocDelete/package.json +1 -1
  106. package/IconDocExport/package.json +1 -1
  107. package/IconDocFilled/package.json +1 -1
  108. package/IconDown/package.json +1 -1
  109. package/IconDownload/package.json +1 -1
  110. package/IconDrag/package.json +1 -1
  111. package/IconDraggable/package.json +1 -1
  112. package/IconDrillingRig/package.json +1 -1
  113. package/IconDrop/package.json +1 -1
  114. package/IconEdit/package.json +1 -1
  115. package/IconExit/package.json +1 -1
  116. package/IconExpand/package.json +1 -1
  117. package/IconEye/package.json +1 -1
  118. package/IconEyeClose/package.json +1 -1
  119. package/IconFavorite/package.json +1 -1
  120. package/IconFilter/package.json +1 -1
  121. package/IconFitToDefault/package.json +1 -1
  122. package/IconFlagFilled/package.json +1 -1
  123. package/IconFlagStroked/package.json +1 -1
  124. package/IconFolders/package.json +1 -1
  125. package/IconForward/package.json +1 -1
  126. package/IconFunnel/package.json +1 -1
  127. package/IconGas/package.json +1 -1
  128. package/IconGeo/package.json +1 -1
  129. package/IconGrouping/package.json +1 -1
  130. package/IconHamburger/package.json +1 -1
  131. package/IconHand/package.json +1 -1
  132. package/IconHealth/package.json +1 -1
  133. package/IconInComparison/package.json +1 -1
  134. package/IconInfo/package.json +1 -1
  135. package/IconIntroduction/package.json +1 -1
  136. package/IconIpad/package.json +1 -1
  137. package/IconItalic/package.json +1 -1
  138. package/IconKebab/package.json +1 -1
  139. package/IconLaptop/package.json +1 -1
  140. package/IconLayers/package.json +1 -1
  141. package/IconLeaf/package.json +1 -1
  142. package/IconLightningBolt/package.json +1 -1
  143. package/IconLineAndBarChart/package.json +1 -1
  144. package/IconLink/package.json +1 -1
  145. package/IconList/package.json +1 -1
  146. package/IconListNumbered/package.json +1 -1
  147. package/IconLock/package.json +1 -1
  148. package/IconLogicalElement/package.json +1 -1
  149. package/IconMBU/package.json +1 -1
  150. package/IconMGRP/package.json +1 -1
  151. package/IconMLSP/package.json +1 -1
  152. package/IconMMP/package.json +1 -1
  153. package/IconMail/package.json +1 -1
  154. package/IconMap/package.json +1 -1
  155. package/IconMaxHeight/package.json +1 -1
  156. package/IconMaxWidth/package.json +1 -1
  157. package/IconMeatball/package.json +1 -1
  158. package/IconMic/package.json +1 -1
  159. package/IconMolecules/package.json +1 -1
  160. package/IconMoon/package.json +1 -1
  161. package/IconNodeEnd/package.json +1 -1
  162. package/IconNodeStart/package.json +1 -1
  163. package/IconNodeStep/package.json +1 -1
  164. package/IconNodes/package.json +1 -1
  165. package/IconOpenInNew/package.json +1 -1
  166. package/IconPanelBottom/package.json +1 -1
  167. package/IconPanelLeft/package.json +1 -1
  168. package/IconPanelRight/package.json +1 -1
  169. package/IconPanelTop/package.json +1 -1
  170. package/IconPaste/package.json +1 -1
  171. package/IconPause/package.json +1 -1
  172. package/IconPhone/package.json +1 -1
  173. package/IconPhoto/package.json +1 -1
  174. package/IconPlay/package.json +1 -1
  175. package/IconPressure/package.json +1 -1
  176. package/IconProcessing/package.json +1 -1
  177. package/IconQuestion/package.json +1 -1
  178. package/IconQuote/package.json +1 -1
  179. package/IconRUO/package.json +1 -1
  180. package/IconRUS/package.json +1 -1
  181. package/IconRecord/package.json +1 -1
  182. package/IconRemove/package.json +1 -1
  183. package/IconRemoveFromComparison/package.json +1 -1
  184. package/IconReply/package.json +1 -1
  185. package/IconResize/package.json +1 -1
  186. package/IconRestart/package.json +1 -1
  187. package/IconRevert/package.json +1 -1
  188. package/IconRing/package.json +1 -1
  189. package/IconRouble/package.json +1 -1
  190. package/IconRuler/package.json +1 -1
  191. package/IconScreen/package.json +1 -1
  192. package/IconSearch/package.json +1 -1
  193. package/IconSelect/package.json +1 -1
  194. package/IconSelectOpen/package.json +1 -1
  195. package/IconSettings/package.json +1 -1
  196. package/IconShape/package.json +1 -1
  197. package/IconShuffle/package.json +1 -1
  198. package/IconSmile/package.json +1 -1
  199. package/IconSortDown/package.json +1 -1
  200. package/IconSortDownCenter/package.json +1 -1
  201. package/IconSortUp/package.json +1 -1
  202. package/IconSortUpCenter/package.json +1 -1
  203. package/IconStop/package.json +1 -1
  204. package/IconStorage/package.json +1 -1
  205. package/IconStrikethrough/package.json +1 -1
  206. package/IconSun/package.json +1 -1
  207. package/IconTable/package.json +1 -1
  208. package/IconTarget/package.json +1 -1
  209. package/IconTeam/package.json +1 -1
  210. package/IconTest/package.json +1 -1
  211. package/IconThumbUp/package.json +1 -1
  212. package/IconTie/package.json +1 -1
  213. package/IconTop/package.json +1 -1
  214. package/IconTrash/package.json +1 -1
  215. package/IconType/package.json +1 -1
  216. package/IconUnderline/package.json +1 -1
  217. package/IconUnlock/package.json +1 -1
  218. package/IconUnsort/package.json +1 -1
  219. package/IconUnsortCenter/package.json +1 -1
  220. package/IconUpload/package.json +1 -1
  221. package/IconUser/package.json +1 -1
  222. package/IconVZD/package.json +1 -1
  223. package/IconVideo/package.json +1 -1
  224. package/IconWarning/package.json +1 -1
  225. package/IconWatch/package.json +1 -1
  226. package/IconWideScreen/package.json +1 -1
  227. package/IconWorld/package.json +1 -1
  228. package/Informer/package.json +1 -1
  229. package/LayoutCanary/package.json +1 -1
  230. package/Loader/package.json +1 -1
  231. package/MixCard/package.json +1 -1
  232. package/MixFocus/package.json +1 -1
  233. package/MixSpace/package.json +1 -1
  234. package/MixVisuallyHidden/package.json +1 -1
  235. package/Modal/package.json +1 -1
  236. package/MultiComboboxDeprecated/package.json +1 -1
  237. package/Pagination/package.json +1 -1
  238. package/Popover/package.json +1 -1
  239. package/PortalWithTheme/package.json +1 -1
  240. package/ProgressSpin/package.json +1 -1
  241. package/ProgressStepBarCanary/package.json +1 -1
  242. package/Radio/package.json +1 -1
  243. package/RadioGroup/package.json +1 -1
  244. package/Responses/package.json +1 -1
  245. package/Responses403/package.json +1 -1
  246. package/Responses404/package.json +1 -1
  247. package/Responses500/package.json +1 -1
  248. package/Responses503/package.json +1 -1
  249. package/ResponsesConnectionError/package.json +1 -1
  250. package/ResponsesDeleted/package.json +1 -1
  251. package/ResponsesEmptyBox/package.json +1 -1
  252. package/ResponsesEmptyPockets/package.json +1 -1
  253. package/ResponsesImage/package.json +1 -1
  254. package/ResponsesImage403/package.json +1 -1
  255. package/ResponsesImage404/package.json +1 -1
  256. package/ResponsesImage500/package.json +1 -1
  257. package/ResponsesImage503/package.json +1 -1
  258. package/ResponsesImageConnectionError/package.json +1 -1
  259. package/ResponsesImageDeleted/package.json +1 -1
  260. package/ResponsesImageEmptyBox/package.json +1 -1
  261. package/ResponsesImageEmptyPockets/package.json +1 -1
  262. package/ResponsesImageNothingFound/package.json +1 -1
  263. package/ResponsesImageSuccess/package.json +1 -1
  264. package/ResponsesNothingFound/package.json +1 -1
  265. package/ResponsesSuccess/package.json +1 -1
  266. package/Select/package.json +1 -1
  267. package/Sidebar/package.json +1 -1
  268. package/Skeleton/package.json +1 -1
  269. package/SliderCanary/package.json +1 -1
  270. package/SnackBar/package.json +1 -1
  271. package/Steps/package.json +1 -1
  272. package/Switch/package.json +1 -1
  273. package/SwitchGroup/package.json +1 -1
  274. package/Table/package.json +1 -1
  275. package/Tabs/package.json +1 -1
  276. package/Tag/package.json +1 -1
  277. package/TagBase/package.json +1 -1
  278. package/Text/package.json +1 -1
  279. package/TextField/package.json +1 -1
  280. package/Theme/package.json +1 -1
  281. package/ThemeToggler/package.json +1 -1
  282. package/Timer/package.json +1 -1
  283. package/Tooltip/package.json +1 -1
  284. package/User/package.json +1 -1
  285. package/UserSelect/package.json +1 -1
  286. package/UserSelectDeprecated/package.json +1 -1
  287. package/__internal__/cjs-src/components/BreadcrumbsCanary/Breadcrumbs.css +75 -0
  288. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsCanary.d.ts +5 -0
  289. package/__internal__/cjs-src/components/BreadcrumbsCanary/BreadcrumbsCanary.js +57 -0
  290. package/__internal__/cjs-src/components/BreadcrumbsCanary/helpers.d.ts +16 -0
  291. package/__internal__/cjs-src/components/BreadcrumbsCanary/helpers.js +21 -0
  292. package/__internal__/cjs-src/components/BreadcrumbsCanary/types.d.ts +36 -0
  293. package/__internal__/cjs-src/components/BreadcrumbsCanary/types.js +5 -0
  294. package/__internal__/cjs-src/components/DatePickerCanary/DatePickerFieldTypeDate/DatePickerFieldTypeDate.js +1 -1
  295. package/__internal__/cjs-src/components/EventInterceptor/eventInterceptorMap.d.ts +1 -0
  296. package/__internal__/cjs-src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +1 -0
  297. package/__internal__/cjs-src/components/TextField/TextField.js +2 -2
  298. package/__internal__/cjs-src/components/TextField/helpers.d.ts +1 -0
  299. package/__internal__/cjs-src/mixs/MixCard/MixCard.css +0 -98
  300. package/__internal__/cjs-src/mixs/MixCard/MixCard.d.ts +1 -1
  301. package/__internal__/cjs-src/mixs/MixCard/MixCard.js +10 -1
  302. package/__internal__/src/components/BreadcrumbsCanary/Breadcrumbs.css +75 -0
  303. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsCanary.d.ts +5 -0
  304. package/__internal__/src/components/BreadcrumbsCanary/BreadcrumbsCanary.js +54 -0
  305. package/__internal__/src/components/BreadcrumbsCanary/helpers.d.ts +16 -0
  306. package/__internal__/src/components/BreadcrumbsCanary/helpers.js +16 -0
  307. package/__internal__/src/components/BreadcrumbsCanary/types.d.ts +36 -0
  308. package/__internal__/src/components/BreadcrumbsCanary/types.js +2 -0
  309. package/__internal__/src/components/DatePickerCanary/DatePickerFieldTypeDate/DatePickerFieldTypeDate.js +1 -1
  310. package/__internal__/src/components/EventInterceptor/eventInterceptorMap.d.ts +1 -0
  311. package/__internal__/src/components/EventInterceptor/propsHandlers/useTextFieldEventsHandler.d.ts +1 -0
  312. package/__internal__/src/components/TextField/TextField.js +2 -2
  313. package/__internal__/src/components/TextField/helpers.d.ts +1 -0
  314. package/__internal__/src/mixs/MixCard/MixCard.css +0 -98
  315. package/__internal__/src/mixs/MixCard/MixCard.d.ts +1 -1
  316. package/__internal__/src/mixs/MixCard/MixCard.js +10 -1
  317. package/createIcon/package.json +1 -1
  318. package/createResponsesImage/package.json +1 -1
  319. package/package.json +2 -1
  320. package/useBreakpoints/package.json +1 -1
  321. package/useChoiceGroup/package.json +1 -1
  322. package/useChoiceGroupIndexed/package.json +1 -1
  323. package/useClickOutside/package.json +1 -1
  324. package/useComponentSize/package.json +1 -1
  325. package/useDebounce/package.json +1 -1
  326. package/useFlag/package.json +1 -1
  327. package/useForkRef/package.json +1 -1
  328. package/useGlobalKeys/package.json +1 -1
  329. package/useKeys/package.json +1 -1
  330. package/useMutableRef/package.json +1 -1
  331. package/useOverflow/package.json +1 -1
  332. package/usePrevious/package.json +1 -1
  333. package/useResizeObserved/package.json +1 -1
  334. package/useScrollElements/package.json +1 -1
  335. package/useScrollPosition/package.json +1 -1
  336. package/useSelect/package.json +1 -1
  337. package/useThemeVars/package.json +1 -1
  338. package/useTimer/package.json +1 -1
  339. package/withTooltip/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import './Breadcrumbs.css';
2
+ import { BreadcrumbsComponent } from './types';
3
+ export declare const cnBreadcrumbs: import("@bem-react/classname").ClassNameFormatter;
4
+ export declare const Breadcrumbs: BreadcrumbsComponent;
5
+ export * from './types';
@@ -0,0 +1,54 @@
1
+ import { __assign, __rest } from "tslib";
2
+ import './Breadcrumbs.css';
3
+ import React, { forwardRef, useMemo } from 'react';
4
+ import { IconArrowRight } from '../../icons/IconArrowRight/IconArrowRight';
5
+ import { cn } from '../../utils/bem';
6
+ import { getByMap } from '../../utils/getByMap';
7
+ import { Button } from '../Button/Button';
8
+ import { getItemClick, withDefaultGetters } from './helpers';
9
+ import { breadcrumbPropSizeDefault } from './types';
10
+ export var cnBreadcrumbs = cn('Breadcrumbs');
11
+ var sizeMap = {
12
+ xs: 'xs',
13
+ s: 'xs',
14
+ m: 'xs',
15
+ l: 'm'
16
+ };
17
+ var BreadcrumbsRender = function (props, ref) {
18
+ var _a = withDefaultGetters(props), items = _a.items, getItemHref = _a.getItemHref, getItemLabel = _a.getItemLabel, getItemActive = _a.getItemActive, getItemIcon = _a.getItemIcon, getItemOnClick = _a.getItemOnClick, onItemClick = _a.onItemClick, _b = _a.size, size = _b === void 0 ? breadcrumbPropSizeDefault : _b, _c = _a.maxCount, maxCount = _c === void 0 ? 0 : _c, _d = _a.onlyIconRoot, onlyIconRoot = _d === void 0 ? false : _d, className = _a.className, restProps = __rest(_a, ["items", "getItemHref", "getItemLabel", "getItemActive", "getItemIcon", "getItemOnClick", "onItemClick", "size", "maxCount", "onlyIconRoot", "className"]);
19
+ var iconSize = getByMap(sizeMap, size);
20
+ var _e = useMemo(function () {
21
+ var rest = items.slice();
22
+ var head = rest.splice(0, 1);
23
+ var tail = rest.splice(2 - maxCount);
24
+ return {
25
+ head: head,
26
+ tail: tail,
27
+ rest: rest
28
+ };
29
+ }, [items, maxCount]), head = _e.head, tail = _e.tail, rest = _e.rest;
30
+ var renderPages = function (items, isFirst) {
31
+ if (isFirst === void 0) { isFirst = false; }
32
+ return items.map(function (item, index) {
33
+ var Icon = getItemIcon(item);
34
+ var label = getItemLabel(item);
35
+ var href = getItemHref(item);
36
+ var active = getItemActive(item);
37
+ var onClick = getItemClick(item, getItemOnClick, onItemClick);
38
+ return (React.createElement("li", { className: cnBreadcrumbs('Item'), key: cnBreadcrumbs('Item', { index: index, href: href }) },
39
+ !isFirst && React.createElement(IconArrowRight, { className: cnBreadcrumbs('Delimiter'), size: iconSize }),
40
+ React.createElement("a", { className: cnBreadcrumbs('Link', { active: active }), onClick: onClick, href: href },
41
+ Icon &&
42
+ (onlyIconRoot && isFirst ? (React.createElement(Button, { view: "clear", onlyIcon: true, iconLeft: Icon, size: iconSize })) : (React.createElement(Icon, { className: cnBreadcrumbs('Icon'), size: iconSize }))),
43
+ (!isFirst || !onlyIconRoot) && React.createElement("span", { className: cnBreadcrumbs('Label') }, label))));
44
+ });
45
+ };
46
+ return (React.createElement("ul", __assign({ className: cnBreadcrumbs({ size: size }, [className]), ref: ref }, restProps),
47
+ renderPages(head, true),
48
+ maxCount && rest.length > 1 ? (React.createElement("li", { className: cnBreadcrumbs('Item') },
49
+ React.createElement(IconArrowRight, { className: cnBreadcrumbs('Delimiter'), size: iconSize }),
50
+ React.createElement("span", { className: cnBreadcrumbs('More') }, "..."))) : (renderPages(rest)),
51
+ renderPages(tail)));
52
+ };
53
+ export var Breadcrumbs = forwardRef(BreadcrumbsRender);
54
+ export * from './types';
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { BreadcrumbsPropGetItemActive, BreadcrumbsPropGetItemHref, BreadcrumbsPropGetItemIcon, BreadcrumbsPropGetItemLabel, BreadcrumbsPropGetItemOnClick, BreadcrumbsPropOnItemClick, BreadcrumbsProps, DefaultItem } from './types';
3
+ export declare function withDefaultGetters<ITEM>(props: BreadcrumbsProps<ITEM>): {
4
+ getItemLabel: BreadcrumbsPropGetItemLabel<DefaultItem> | BreadcrumbsPropGetItemLabel<ITEM>;
5
+ getItemActive: BreadcrumbsPropGetItemActive<DefaultItem> | BreadcrumbsPropGetItemActive<ITEM>;
6
+ getItemHref: BreadcrumbsPropGetItemHref<DefaultItem> | BreadcrumbsPropGetItemHref<ITEM>;
7
+ getItemOnClick: BreadcrumbsPropGetItemOnClick<DefaultItem> | BreadcrumbsPropGetItemOnClick<ITEM>;
8
+ getItemIcon: BreadcrumbsPropGetItemIcon<DefaultItem> | BreadcrumbsPropGetItemIcon<ITEM>;
9
+ items: ITEM[];
10
+ onItemClick?: BreadcrumbsPropOnItemClick<ITEM> | undefined;
11
+ size?: "xs" | "s" | "m" | "l" | undefined;
12
+ maxCount?: number | undefined;
13
+ onlyIconRoot?: boolean | undefined;
14
+ className?: string | undefined;
15
+ };
16
+ export declare function getItemClick<ITEM>(item: ITEM, getItemOnClick: BreadcrumbsPropGetItemOnClick<ITEM>, onItemClick?: BreadcrumbsPropOnItemClick<ITEM>): React.MouseEventHandler;
@@ -0,0 +1,16 @@
1
+ import { __assign } from "tslib";
2
+ var defaultGetItemLabel = function (item) { return item.label; };
3
+ var defaultGetItemIcon = function (item) { return item.icon; };
4
+ var defaultGetItemActive = function (item) { return item.active; };
5
+ var defaultGetItemHref = function (item) { return item.href; };
6
+ var defaultGetItemOnClick = function (item) { return item.onClick; };
7
+ export function withDefaultGetters(props) {
8
+ return __assign(__assign({}, props), { getItemLabel: props.getItemLabel || defaultGetItemLabel, getItemActive: props.getItemActive || defaultGetItemActive, getItemHref: props.getItemHref || defaultGetItemHref, getItemOnClick: props.getItemOnClick || defaultGetItemOnClick, getItemIcon: props.getItemIcon || defaultGetItemIcon });
9
+ }
10
+ export function getItemClick(item, getItemOnClick, onItemClick) {
11
+ return function (e) {
12
+ var _a;
13
+ onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick({ e: e, item: item });
14
+ (_a = getItemOnClick(item)) === null || _a === void 0 ? void 0 : _a(e);
15
+ };
16
+ }
@@ -0,0 +1,36 @@
1
+ /// <reference types="react" />
2
+ import { IconComponent } from '../../icons/Icon/Icon';
3
+ import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
4
+ export declare const breadcrumbPropSize: readonly ["m", "xs", "s", "l"];
5
+ export declare type BreadcrumbPropSize = typeof breadcrumbPropSize[number];
6
+ export declare const breadcrumbPropSizeDefault: "m";
7
+ export declare type BreadcrumbsPropGetItemLabel<ITEM> = (item: ITEM) => string | React.ReactNode;
8
+ export declare type BreadcrumbsPropGetItemActive<ITEM> = (item: ITEM) => boolean | undefined;
9
+ export declare type BreadcrumbsPropGetItemHref<ITEM> = (item: ITEM) => string | undefined;
10
+ export declare type BreadcrumbsPropGetItemIcon<ITEM> = (item: ITEM) => IconComponent | undefined;
11
+ export declare type BreadcrumbsPropGetItemOnClick<ITEM> = (item: ITEM) => React.MouseEventHandler | undefined;
12
+ export declare type BreadcrumbsPropOnItemClick<ITEM> = (props: {
13
+ item: ITEM;
14
+ e: React.MouseEvent;
15
+ }) => void;
16
+ export declare type DefaultItem = {
17
+ label: string;
18
+ active?: boolean;
19
+ icon?: IconComponent;
20
+ href?: string;
21
+ onClick?: React.MouseEventHandler<HTMLAnchorElement>;
22
+ };
23
+ export declare type BreadcrumbsProps<ITEM = DefaultItem> = {
24
+ items: ITEM[];
25
+ getItemLabel?: BreadcrumbsPropGetItemLabel<ITEM>;
26
+ getItemActive?: BreadcrumbsPropGetItemActive<ITEM>;
27
+ getItemHref?: BreadcrumbsPropGetItemHref<ITEM>;
28
+ getItemIcon?: BreadcrumbsPropGetItemIcon<ITEM>;
29
+ getItemOnClick?: BreadcrumbsPropGetItemOnClick<ITEM>;
30
+ onItemClick?: BreadcrumbsPropOnItemClick<ITEM>;
31
+ size?: BreadcrumbPropSize;
32
+ maxCount?: number;
33
+ onlyIconRoot?: boolean;
34
+ className?: string;
35
+ };
36
+ export declare type BreadcrumbsComponent = <ITEM>(props: PropsWithHTMLAttributesAndRef<BreadcrumbsProps<ITEM>, HTMLUListElement>) => React.ReactElement | null;
@@ -0,0 +1,2 @@
1
+ export var breadcrumbPropSize = ['m', 'xs', 's', 'l'];
2
+ export var breadcrumbPropSizeDefault = breadcrumbPropSize[0];
@@ -137,5 +137,5 @@ export var DatePickerFieldTypeDate = React.forwardRef(function (props, ref) {
137
137
  var _a;
138
138
  (_a = imaskRef.current) === null || _a === void 0 ? void 0 : _a.updateValue();
139
139
  }, [stringValue]);
140
- return (React.createElement(TextField, __assign({}, otherProps, { type: "text", ref: ref, inputRef: useForkRef([inputRef, inputRefProp]), value: stringValue, placeholder: placeholder })));
140
+ return (React.createElement(TextField, __assign({}, otherProps, { type: "text", inputContainerRef: ref, inputRef: useForkRef([inputRef, inputRefProp]), value: stringValue, placeholder: placeholder })));
141
141
  });
@@ -62,6 +62,7 @@ export declare const eventInterceptorMap: {
62
62
  required?: boolean | undefined;
63
63
  step?: string | number | undefined;
64
64
  tabIndex?: number | undefined;
65
+ inputContainerRef?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
65
66
  inputRef?: ((instance: HTMLInputElement | HTMLTextAreaElement | null) => void) | import("react").RefObject<HTMLInputElement | HTMLTextAreaElement> | null | undefined;
66
67
  ariaLabel?: string | undefined;
67
68
  iconSize?: "xs" | "s" | "m" | undefined;
@@ -71,6 +71,7 @@ export declare const useTextFieldEventsHandler: <P extends {
71
71
  required?: boolean | undefined;
72
72
  step?: string | number | undefined;
73
73
  tabIndex?: number | undefined;
74
+ inputContainerRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
74
75
  inputRef?: ((instance: HTMLInputElement | HTMLTextAreaElement | null) => void) | React.RefObject<HTMLInputElement | HTMLTextAreaElement> | null | undefined;
75
76
  ariaLabel?: string | undefined;
76
77
  iconSize?: "xs" | "s" | "m" | undefined;
@@ -17,7 +17,7 @@ export var cnTextField = cn(COMPONENT_NAME);
17
17
  export function TextFieldRender(props, ref) {
18
18
  var textFieldRef = React.useRef(null);
19
19
  var inputRef = React.useRef(null);
20
- var _a = usePropsHandler(COMPONENT_NAME, props, textFieldRef), className = _a.className, _b = _a.type, type = _b === void 0 ? 'text' : _b, value = _a.value, onChange = _a.onChange, id = _a.id, name = _a.name, rows = _a.rows, cols = _a.cols, minRows = _a.minRows, maxRows = _a.maxRows, inputRefProp = _a.inputRef, maxLength = _a.maxLength, disabled = _a.disabled, _c = _a.size, size = _c === void 0 ? textFieldPropSizeDefault : _c, _d = _a.view, view = _d === void 0 ? textFieldPropViewDefault : _d, _e = _a.form, form = _e === void 0 ? textFieldPropFormDefault : _e, state = _a.state, status = _a.status, _f = _a.width, width = _f === void 0 ? textFieldPropWidthDefault : _f, onBlur = _a.onBlur, onFocus = _a.onFocus, _g = _a.autoFocus, autoFocus = _g === void 0 ? false : _g, placeholder = _a.placeholder, leftSide = _a.leftSide, rightSide = _a.rightSide, autoComplete = _a.autoComplete, withClearButton = _a.withClearButton, max = _a.max, min = _a.min, readOnly = _a.readOnly, required = _a.required, _h = _a.step, step = _h === void 0 ? 1 : _h, tabIndex = _a.tabIndex, ariaLabel = _a.ariaLabel, label = _a.label, _j = _a.labelPosition, labelPosition = _j === void 0 ? 'top' : _j, caption = _a.caption, iconSizeProp = _a.iconSize, focused = _a.focused, onClick = _a.onClick, otherProps = __rest(_a, ["className", "type", "value", "onChange", "id", "name", "rows", "cols", "minRows", "maxRows", "inputRef", "maxLength", "disabled", "size", "view", "form", "state", "status", "width", "onBlur", "onFocus", "autoFocus", "placeholder", "leftSide", "rightSide", "autoComplete", "withClearButton", "max", "min", "readOnly", "required", "step", "tabIndex", "ariaLabel", "label", "labelPosition", "caption", "iconSize", "focused", "onClick"]);
20
+ var _a = usePropsHandler(COMPONENT_NAME, props, textFieldRef), className = _a.className, _b = _a.type, type = _b === void 0 ? 'text' : _b, value = _a.value, onChange = _a.onChange, id = _a.id, name = _a.name, rows = _a.rows, cols = _a.cols, minRows = _a.minRows, maxRows = _a.maxRows, inputRefProp = _a.inputRef, maxLength = _a.maxLength, disabled = _a.disabled, _c = _a.size, size = _c === void 0 ? textFieldPropSizeDefault : _c, _d = _a.view, view = _d === void 0 ? textFieldPropViewDefault : _d, _e = _a.form, form = _e === void 0 ? textFieldPropFormDefault : _e, state = _a.state, status = _a.status, _f = _a.width, width = _f === void 0 ? textFieldPropWidthDefault : _f, onBlur = _a.onBlur, onFocus = _a.onFocus, _g = _a.autoFocus, autoFocus = _g === void 0 ? false : _g, placeholder = _a.placeholder, leftSide = _a.leftSide, rightSide = _a.rightSide, autoComplete = _a.autoComplete, withClearButton = _a.withClearButton, max = _a.max, min = _a.min, readOnly = _a.readOnly, required = _a.required, _h = _a.step, step = _h === void 0 ? 1 : _h, tabIndex = _a.tabIndex, ariaLabel = _a.ariaLabel, label = _a.label, inputContainerRef = _a.inputContainerRef, _j = _a.labelPosition, labelPosition = _j === void 0 ? 'top' : _j, caption = _a.caption, iconSizeProp = _a.iconSize, focused = _a.focused, onClick = _a.onClick, otherProps = __rest(_a, ["className", "type", "value", "onChange", "id", "name", "rows", "cols", "minRows", "maxRows", "inputRef", "maxLength", "disabled", "size", "view", "form", "state", "status", "width", "onBlur", "onFocus", "autoFocus", "placeholder", "leftSide", "rightSide", "autoComplete", "withClearButton", "max", "min", "readOnly", "required", "step", "tabIndex", "ariaLabel", "label", "inputContainerRef", "labelPosition", "caption", "iconSize", "focused", "onClick"]);
21
21
  var _k = __read(useState(autoFocus), 2), focus = _k[0], setFocus = _k[1];
22
22
  var textarea = type === 'textarea';
23
23
  var LeftIcon = leftSide;
@@ -113,7 +113,7 @@ export function TextFieldRender(props, ref) {
113
113
  return (React.createElement("div", __assign({ className: cnTextField({ labelPosition: labelPosition, size: size, view: view, width: width }, [className]), ref: useForkRef([ref, textFieldRef]) }, rootProps, otherProps),
114
114
  label && (React.createElement(FieldLabel, { required: required, className: cnTextField('Label', { labelPosition: labelPosition }), size: size }, label)),
115
115
  React.createElement("div", { className: cnTextField('Body') },
116
- React.createElement("div", { className: cnTextField('InputContainer', {
116
+ React.createElement("div", { ref: inputContainerRef, className: cnTextField('InputContainer', {
117
117
  view: view,
118
118
  form: form,
119
119
  status: status || state,
@@ -74,6 +74,7 @@ export declare type TextFieldProps<TYPE extends string> = PropsWithHTMLAttribute
74
74
  required?: boolean;
75
75
  step?: number | string;
76
76
  tabIndex?: number;
77
+ inputContainerRef?: React.Ref<HTMLDivElement>;
77
78
  inputRef?: React.Ref<HTMLTextAreaElement | HTMLInputElement>;
78
79
  ariaLabel?: string;
79
80
  iconSize?: IconPropSize;
@@ -8,104 +8,6 @@
8
8
  box-shadow: var(--shadow-group);
9
9
  }
10
10
 
11
- .MixCard_verticalSpace_xs,
12
- .MixCard_verticalSpace_s,
13
- .MixCard_verticalSpace_m,
14
- .MixCard_verticalSpace_l,
15
- .MixCard_verticalSpace_xl,
16
- .MixCard_verticalSpace_2xl,
17
- .MixCard_verticalSpace_3xl,
18
- .MixCard_verticalSpace_4xl,
19
- .MixCard_verticalSpace_5xl {
20
- padding-top: var(--vertical-space);
21
- padding-bottom: var(--vertical-space);
22
- }
23
-
24
- .MixCard_verticalSpace_xs {
25
- --vertical-space: var(--space-xs);
26
- }
27
-
28
- .MixCard_verticalSpace_s {
29
- --vertical-space: var(--space-s);
30
- }
31
-
32
- .MixCard_verticalSpace_m {
33
- --vertical-space: var(--space-m);
34
- }
35
-
36
- .MixCard_verticalSpace_l {
37
- --vertical-space: var(--space-l);
38
- }
39
-
40
- .MixCard_verticalSpace_xl {
41
- --vertical-space: var(--space-xl);
42
- }
43
-
44
- .MixCard_verticalSpace_2xl {
45
- --vertical-space: var(--space-2xl);
46
- }
47
-
48
- .MixCard_verticalSpace_3xl {
49
- --vertical-space: var(--space-3xl);
50
- }
51
-
52
- .MixCard_verticalSpace_4xl {
53
- --vertical-space: var(--space-4xl);
54
- }
55
-
56
- .MixCard_verticalSpace_5xl {
57
- --vertical-space: var(--space-5xl);
58
- }
59
-
60
- .MixCard_horizontalSpace_xs,
61
- .MixCard_horizontalSpace_s,
62
- .MixCard_horizontalSpace_m,
63
- .MixCard_horizontalSpace_l,
64
- .MixCard_horizontalSpace_xl,
65
- .MixCard_horizontalSpace_2xl,
66
- .MixCard_horizontalSpace_3xl,
67
- .MixCard_horizontalSpace_4xl,
68
- .MixCard_horizontalSpace_5xl {
69
- padding-right: var(--horizontal-space);
70
- padding-left: var(--horizontal-space);
71
- }
72
-
73
- .MixCard_horizontalSpace_xs {
74
- --horizontal-space: var(--space-xs);
75
- }
76
-
77
- .MixCard_horizontalSpace_s {
78
- --horizontal-space: var(--space-s);
79
- }
80
-
81
- .MixCard_horizontalSpace_m {
82
- --horizontal-space: var(--space-m);
83
- }
84
-
85
- .MixCard_horizontalSpace_l {
86
- --horizontal-space: var(--space-l);
87
- }
88
-
89
- .MixCard_horizontalSpace_xl {
90
- --horizontal-space: var(--space-xl);
91
- }
92
-
93
- .MixCard_horizontalSpace_2xl {
94
- --horizontal-space: var(--space-2xl);
95
- }
96
-
97
- .MixCard_horizontalSpace_3xl {
98
- --horizontal-space: var(--space-3xl);
99
- }
100
-
101
- .MixCard_horizontalSpace_4xl {
102
- --horizontal-space: var(--space-4xl);
103
- }
104
-
105
- .MixCard_horizontalSpace_5xl {
106
- --horizontal-space: var(--space-5xl);
107
- }
108
-
109
11
  .MixCard_form_round,
110
12
  .MixCard_form_square {
111
13
  border-radius: var(--border-radius);
@@ -11,6 +11,6 @@ declare type Props = {
11
11
  form?: FormMap;
12
12
  status?: CardStatus;
13
13
  };
14
- declare type CnCard = (elemNameOrBlockMods?: Props | string | null, elemModsOrBlockMix?: Props | Array<string | undefined> | null, elemMix?: Array<string | undefined>) => string;
14
+ declare type CnCard = (props: Props, classNames?: Array<string | undefined>) => string;
15
15
  export declare const cnMixCard: CnCard;
16
16
  export {};
@@ -1,5 +1,14 @@
1
+ import { __assign, __read, __rest, __spread } from "tslib";
1
2
  import './MixCard.css';
2
3
  import { cn } from '../../utils/bem';
4
+ import { cnMixSpace } from '../MixSpace/MixSpace';
3
5
  var formMap = ['round', 'square'];
4
6
  var cardStatus = ['alert', 'success', 'warning'];
5
- export var cnMixCard = cn('MixCard');
7
+ var cnCard = cn('MixCard');
8
+ export var cnMixCard = function (props, classNames) {
9
+ if (classNames === void 0) { classNames = []; }
10
+ var verticalSpace = props.verticalSpace, horizontalSpace = props.horizontalSpace, otherProps = __rest(props, ["verticalSpace", "horizontalSpace"]);
11
+ return cnCard(__assign({}, otherProps), __spread([
12
+ cnMixSpace({ pV: verticalSpace, pH: horizontalSpace })
13
+ ], classNames));
14
+ };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/createIcon",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/createResponsesImage",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "keywords": [
5
5
  "ui-kit",
6
6
  "design-system",
@@ -30,6 +30,7 @@
30
30
  "Badge",
31
31
  "BasicSelectDeprecated",
32
32
  "Breadcrumbs",
33
+ "BreadcrumbsCanary",
33
34
  "Button",
34
35
  "Calendar",
35
36
  "Card",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useBreakpoints",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useChoiceGroup",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useChoiceGroupIndexed",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useClickOutside",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useComponentSize",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useDebounce",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useFlag",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useForkRef",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useGlobalKeys",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useKeys",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useMutableRef",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useOverflow",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/usePrevious",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useResizeObserved",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useScrollElements",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useScrollPosition",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useSelect",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useThemeVars",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/useTimer",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@consta/uikit/withTooltip",
3
- "version": "3.12.4",
3
+ "version": "3.13.0",
4
4
  "main": "index.js",
5
5
  "module": "es.js",
6
6
  "sideEffects": [