@infomaximum/ui-kit 0.11.1 → 0.12.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 (36) hide show
  1. package/dist/components/BaseTooltip/BaseTooltip.js +1 -1
  2. package/dist/components/BaseTooltip/BaseTooltip.styles.d.ts +1 -1
  3. package/dist/components/BaseTooltip/BaseTooltip.styles.js +10 -8
  4. package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
  5. package/dist/components/Breadcrumb/Breadcrumb.js +20 -0
  6. package/dist/components/Breadcrumb/Breadcrumb.styles.d.ts +15 -0
  7. package/dist/components/Breadcrumb/Breadcrumb.styles.js +21 -0
  8. package/dist/components/Breadcrumb/Breadcrumb.tokens.d.ts +12 -0
  9. package/dist/components/Breadcrumb/Breadcrumb.tokens.js +13 -0
  10. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +20 -0
  11. package/dist/components/Breadcrumb/components/BreadcrumbBlock/BreadcrumbBlock.d.ts +3 -0
  12. package/dist/components/Breadcrumb/components/BreadcrumbBlock/BreadcrumbBlock.js +34 -0
  13. package/dist/components/Breadcrumb/components/BreadcrumbBlock/BreadcrumbBlock.styles.d.ts +27 -0
  14. package/dist/components/Breadcrumb/components/BreadcrumbBlock/BreadcrumbBlock.styles.js +19 -0
  15. package/dist/components/Breadcrumb/components/BreadcrumbBlock/BreadcrumbBlock.types.d.ts +10 -0
  16. package/dist/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.d.ts +3 -0
  17. package/dist/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.js +58 -0
  18. package/dist/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.styles.d.ts +66 -0
  19. package/dist/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.styles.js +74 -0
  20. package/dist/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.types.d.ts +8 -0
  21. package/dist/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.utils.d.ts +4 -0
  22. package/dist/components/Breadcrumb/components/BreadcrumbItem/BreadcrumbItem.utils.js +27 -0
  23. package/dist/components/Breadcrumb/forStories/items.d.ts +76 -0
  24. package/dist/components/Breadcrumb/index.d.ts +2 -0
  25. package/dist/components/Radio/Radio.styles.d.ts +1 -0
  26. package/dist/components/Radio/Radio.styles.js +1 -0
  27. package/dist/components/Radio/components/RadioGroup/RadioGroup.js +3 -2
  28. package/dist/components/Radio/components/RadioGroup/RadioGroup.types.d.ts +1 -1
  29. package/dist/components/Radio/index.d.ts +2 -0
  30. package/dist/components/Tag/Tag.js +4 -3
  31. package/dist/components/Tag/Tag.styles.d.ts +22 -37
  32. package/dist/components/Tag/Tag.styles.js +9 -3
  33. package/dist/components/Tag/Tag.types.d.ts +1 -1
  34. package/dist/index.d.ts +3 -1
  35. package/dist/index.js +2 -0
  36. package/package.json +4 -4
@@ -67,7 +67,7 @@ const BaseTooltip = memo(({
67
67
  });
68
68
  const arrowPlacementCorrection = getArrowPlacementCorrection(floatingPlacement, context);
69
69
  const renderFloatingElement = () => {
70
- return /* @__PURE__ */ jsxs("div", { ref: refs.setFloating, css: getBaseTooltipFloatingWrapperStyle(floatingPlacement), style: {
70
+ return /* @__PURE__ */ jsxs("div", { ref: refs.setFloating, css: getBaseTooltipFloatingWrapperStyle(floatingPlacement, withArrow), style: {
71
71
  ...floatingStyles,
72
72
  zIndex
73
73
  }, className, children: [
@@ -1,5 +1,5 @@
1
1
  import { Placement } from '@floating-ui/react';
2
- export declare const getBaseTooltipFloatingWrapperStyle: (placement: Placement) => {};
2
+ export declare const getBaseTooltipFloatingWrapperStyle: (placement: Placement, withArrow: boolean) => {};
3
3
  export declare const baseTooltipReferenceWrapperStyle: {
4
4
  display: string;
5
5
  width: string;
@@ -1,29 +1,31 @@
1
- import { isTopSide, FLOATING_OFFSET_WITH_ARROW_HEIGHT, isBottomSide, isLeftSide, isRightSide } from "./BaseTooltip.utils.js";
2
- const getPadding = (placement) => {
1
+ import { FLOATING_OFFSET } from "../../utils/consts.js";
2
+ import { isTopSide, isBottomSide, isLeftSide, isRightSide, FLOATING_OFFSET_WITH_ARROW_HEIGHT } from "./BaseTooltip.utils.js";
3
+ const getPadding = (placement, withArrow) => {
4
+ const padding = withArrow ? FLOATING_OFFSET_WITH_ARROW_HEIGHT : FLOATING_OFFSET;
3
5
  if (isTopSide(placement)) {
4
6
  return {
5
- paddingBottom: FLOATING_OFFSET_WITH_ARROW_HEIGHT
7
+ paddingBottom: padding
6
8
  };
7
9
  }
8
10
  if (isBottomSide(placement)) {
9
11
  return {
10
- paddingTop: FLOATING_OFFSET_WITH_ARROW_HEIGHT
12
+ paddingTop: padding
11
13
  };
12
14
  }
13
15
  if (isLeftSide(placement)) {
14
16
  return {
15
- paddingRight: FLOATING_OFFSET_WITH_ARROW_HEIGHT
17
+ paddingRight: padding
16
18
  };
17
19
  }
18
20
  if (isRightSide(placement)) {
19
21
  return {
20
- paddingLeft: FLOATING_OFFSET_WITH_ARROW_HEIGHT
22
+ paddingLeft: padding
21
23
  };
22
24
  }
23
25
  };
24
- const getBaseTooltipFloatingWrapperStyle = (placement) => {
26
+ const getBaseTooltipFloatingWrapperStyle = (placement, withArrow) => {
25
27
  return {
26
- ...getPadding(placement)
28
+ ...getPadding(placement, withArrow)
27
29
  };
28
30
  };
29
31
  const baseTooltipReferenceWrapperStyle = {
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { BreadcrumbProps } from './Breadcrumb.types';
3
+ export declare const Breadcrumb: FC<import('react').PropsWithChildren<BreadcrumbProps>>;
@@ -0,0 +1,20 @@
1
+ import { jsx } from "@emotion/react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { withThemeProvider } from "../../hocs/withThemeProvider.js";
4
+ import { getBreadcrumbDefaultStyle } from "./Breadcrumb.styles.js";
5
+ import { BreadcrumbBlock } from "./components/BreadcrumbBlock/BreadcrumbBlock.js";
6
+ import { useTheme } from "../../hooks/useTheme/useTheme.js";
7
+ const BreadcrumbComponent = memo(({
8
+ items = [],
9
+ size = "middle",
10
+ params = {},
11
+ itemRender
12
+ }) => {
13
+ const theme = useTheme();
14
+ const breadcrumbDefaultStyle = getBreadcrumbDefaultStyle();
15
+ return /* @__PURE__ */ jsx("nav", { css: breadcrumbDefaultStyle.wrapper(theme), children: /* @__PURE__ */ jsx("ol", { css: breadcrumbDefaultStyle.list(), children: items.map((item, index) => /* @__PURE__ */ jsx(BreadcrumbBlock, { index, item, size, params, isLastItem: items.length - 1 === index, items, itemRender }, index.toString())) }) });
16
+ });
17
+ const Breadcrumb = withThemeProvider(BreadcrumbComponent);
18
+ export {
19
+ Breadcrumb
20
+ };
@@ -0,0 +1,15 @@
1
+ import { Theme } from 'themes';
2
+ export declare const getBreadcrumbDefaultStyle: () => {
3
+ wrapper: (theme: Theme) => {
4
+ readonly boxSizing: "border-box";
5
+ readonly margin: `0 -${number}px`;
6
+ readonly padding: 0;
7
+ };
8
+ list: () => {
9
+ readonly display: "flex";
10
+ readonly flexWrap: "wrap";
11
+ readonly listStyle: "none";
12
+ readonly padding: 0;
13
+ readonly margin: 0;
14
+ };
15
+ };
@@ -0,0 +1,21 @@
1
+ import { getBreadcrumbTokens } from "./Breadcrumb.tokens.js";
2
+ const getBreadcrumbDefaultStyle = () => ({
3
+ wrapper: (theme) => {
4
+ const breadcrumbTokens = getBreadcrumbTokens(theme);
5
+ return {
6
+ boxSizing: "border-box",
7
+ margin: `0 -${breadcrumbTokens.breadcrumbItemPaddingHorizontal}px`,
8
+ padding: 0
9
+ };
10
+ },
11
+ list: () => ({
12
+ display: "flex",
13
+ flexWrap: "wrap",
14
+ listStyle: "none",
15
+ padding: 0,
16
+ margin: 0
17
+ })
18
+ });
19
+ export {
20
+ getBreadcrumbDefaultStyle
21
+ };
@@ -0,0 +1,12 @@
1
+ import { Theme } from 'themes';
2
+ export declare const getBreadcrumbTokens: (theme: Theme) => {
3
+ breadcrumbItem: "#8C8C8C";
4
+ breadcrumbItemHover: "#595959";
5
+ breadcrumbItemBgHover: `rgba(${number}, ${number}, ${number}, 0.05)`;
6
+ breadcrumbLastItem: "#262626";
7
+ breadcrumbSeparator: "#BFBFBF";
8
+ breadcrumbItemHeight: number;
9
+ breadcrumbItemPaddingHorizontal: number;
10
+ breadcrumbSeparatorMarginHorizontal: number;
11
+ };
12
+ export type BreadcrumbTokensType = ReturnType<typeof getBreadcrumbTokens>;
@@ -0,0 +1,13 @@
1
+ const getBreadcrumbTokens = (theme) => ({
2
+ breadcrumbItem: theme.textSecondary,
3
+ breadcrumbItemHover: theme.textComplimentary,
4
+ breadcrumbItemBgHover: theme.bgIconHover,
5
+ breadcrumbLastItem: theme.textPrimary,
6
+ breadcrumbSeparator: theme.textHint,
7
+ breadcrumbItemHeight: 24,
8
+ breadcrumbItemPaddingHorizontal: 4,
9
+ breadcrumbSeparatorMarginHorizontal: 4
10
+ });
11
+ export {
12
+ getBreadcrumbTokens
13
+ };
@@ -0,0 +1,20 @@
1
+ import { DropdownMenu, DropdownProps } from 'components/Dropdown';
2
+ import { MouseEvent, ReactNode } from 'react';
3
+ export interface RouteItem {
4
+ title?: ReactNode;
5
+ icon?: ReactNode;
6
+ className?: string;
7
+ dropdownProps?: DropdownProps;
8
+ menu?: DropdownMenu;
9
+ href?: string;
10
+ path?: string;
11
+ onClick?: (e: MouseEvent) => void;
12
+ }
13
+ export type BreadcrumbSizeType = "middle" | "small";
14
+ export type BreadcrumbParamsType = Record<string, string | number>;
15
+ export interface BreadcrumbProps {
16
+ params?: BreadcrumbParamsType;
17
+ items?: RouteItem[];
18
+ size?: BreadcrumbSizeType;
19
+ itemRender?: (route: RouteItem, params: BreadcrumbParamsType, routes: RouteItem[], paths: string[]) => React.ReactNode;
20
+ }
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { BreadcrumbBlockProps } from './BreadcrumbBlock.types';
3
+ export declare const BreadcrumbBlock: FC<BreadcrumbBlockProps>;
@@ -0,0 +1,34 @@
1
+ import { jsxs, Fragment, jsx } from "@emotion/react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { isFunction } from "lodash-es";
4
+ import { BreadcrumbItem } from "../BreadcrumbItem/BreadcrumbItem.js";
5
+ import { getBreadcrumbBlockStyle } from "./BreadcrumbBlock.styles.js";
6
+ import { useTheme } from "../../../../hooks/useTheme/useTheme.js";
7
+ const BreadcrumbBlock = memo(({
8
+ item,
9
+ isLastItem,
10
+ size,
11
+ params,
12
+ index,
13
+ items,
14
+ itemRender
15
+ }) => {
16
+ const theme = useTheme();
17
+ const breadcrumbBlockStyle = getBreadcrumbBlockStyle(size);
18
+ const renderItem = () => {
19
+ if (isFunction(itemRender)) {
20
+ return itemRender(item, params, items, items.map((item2) => item2.path ?? ""));
21
+ }
22
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(BreadcrumbItem, { routeItem: item, isLastItem, size, params, items }) }, `item${index}`);
23
+ };
24
+ const renderSeparator = () => {
25
+ return index < items.length - 1 ? /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("span", { css: breadcrumbBlockStyle.separator(theme), children: "/" }) }, `separator${index}`) : null;
26
+ };
27
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
28
+ renderItem(),
29
+ renderSeparator()
30
+ ] });
31
+ });
32
+ export {
33
+ BreadcrumbBlock
34
+ };
@@ -0,0 +1,27 @@
1
+ import { BreadcrumbSizeType } from 'components/Breadcrumb/Breadcrumb.types';
2
+ import { Theme } from 'themes';
3
+ export declare const getBreadcrumbBlockStyle: (size: BreadcrumbSizeType) => {
4
+ separator: (theme: Theme) => {
5
+ fontFamily: "Roboto";
6
+ fontSize: 14;
7
+ lineHeight: "20px";
8
+ display: string;
9
+ height: number;
10
+ padding: string;
11
+ justifyContent: string;
12
+ alignItems: string;
13
+ flexShrink: number;
14
+ color: "#BFBFBF";
15
+ } | {
16
+ fontFamily: "Roboto";
17
+ fontSize: 12;
18
+ lineHeight: "20px";
19
+ display: string;
20
+ height: number;
21
+ padding: string;
22
+ justifyContent: string;
23
+ alignItems: string;
24
+ flexShrink: number;
25
+ color: "#BFBFBF";
26
+ };
27
+ };
@@ -0,0 +1,19 @@
1
+ import { getBreadcrumbTokens } from "../../Breadcrumb.tokens.js";
2
+ const getBreadcrumbBlockStyle = (size) => ({
3
+ separator: (theme) => {
4
+ const breadcrumbTokens = getBreadcrumbTokens(theme);
5
+ return {
6
+ display: "inline-flex",
7
+ height: breadcrumbTokens.breadcrumbItemHeight,
8
+ padding: `0 ${breadcrumbTokens.breadcrumbSeparatorMarginHorizontal}px`,
9
+ justifyContent: "center",
10
+ alignItems: "center",
11
+ flexShrink: 0,
12
+ color: breadcrumbTokens.breadcrumbSeparator,
13
+ ...size === "middle" ? theme.typography.body2 : theme.typography.body3
14
+ };
15
+ }
16
+ });
17
+ export {
18
+ getBreadcrumbBlockStyle
19
+ };
@@ -0,0 +1,10 @@
1
+ import { BreadcrumbParamsType, BreadcrumbSizeType, RouteItem } from 'components/Breadcrumb/Breadcrumb.types';
2
+ export interface BreadcrumbBlockProps {
3
+ item: RouteItem;
4
+ isLastItem: boolean;
5
+ size: BreadcrumbSizeType;
6
+ params: BreadcrumbParamsType;
7
+ items: RouteItem[];
8
+ index: number;
9
+ itemRender?: (route: RouteItem, params: BreadcrumbParamsType, routes: RouteItem[], paths: string[]) => React.ReactNode;
10
+ }
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { BreadcrumbItemProps } from './BreadcrumbItem.types';
3
+ export declare const BreadcrumbItem: FC<BreadcrumbItemProps>;
@@ -0,0 +1,58 @@
1
+ import { jsx, jsxs, Fragment } from "@emotion/react/jsx-runtime";
2
+ import { memo } from "react";
3
+ import { isUndefined, isNil } from "lodash-es";
4
+ import { getCurrentTitle, getHrefByPath } from "./BreadcrumbItem.utils.js";
5
+ import { DownOutlined } from "@infomaximum/icons";
6
+ import { getBreadcrumbItemStyle } from "./BreadcrumbItem.styles.js";
7
+ import { useTheme } from "../../../../hooks/useTheme/useTheme.js";
8
+ import { Dropdown } from "../../../Dropdown/Dropdown.js";
9
+ const BreadcrumbItem = memo(({
10
+ routeItem,
11
+ isLastItem,
12
+ items,
13
+ size,
14
+ params
15
+ }) => {
16
+ const {
17
+ className,
18
+ dropdownProps,
19
+ menu,
20
+ icon,
21
+ title,
22
+ path,
23
+ href,
24
+ onClick
25
+ } = routeItem;
26
+ const theme = useTheme();
27
+ const currentTitle = getCurrentTitle(title, params);
28
+ const isDropdown = !isUndefined(dropdownProps) || !isUndefined(menu);
29
+ const usingHref = isLastItem ? void 0 : href ?? (path ? getHrefByPath(path, items) : void 0);
30
+ const breadcrumbItemStyle = getBreadcrumbItemStyle(size, !isNil(usingHref));
31
+ const renderItemContent = () => {
32
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
33
+ icon && /* @__PURE__ */ jsx("span", { css: breadcrumbItemStyle.icon(theme), children: icon }),
34
+ currentTitle && /* @__PURE__ */ jsx("span", { css: breadcrumbItemStyle.title(theme), children: currentTitle }),
35
+ isDropdown && /* @__PURE__ */ jsx("span", { css: breadcrumbItemStyle.dropdownSuffix(theme), children: /* @__PURE__ */ jsx(DownOutlined, {}) })
36
+ ] });
37
+ };
38
+ const renderWithLink = () => {
39
+ if (isUndefined(usingHref)) {
40
+ return renderItemContent();
41
+ }
42
+ return /* @__PURE__ */ jsx("a", { href: usingHref, css: breadcrumbItemStyle.link(theme), children: renderItemContent() });
43
+ };
44
+ const renderItem = () => /* @__PURE__ */ jsx("span", { css: breadcrumbItemStyle.itemWrapper(theme), className, onClick, children: renderWithLink() });
45
+ if (isDropdown) {
46
+ const props = isUndefined(dropdownProps) ? {
47
+ menu
48
+ } : menu ? {
49
+ ...dropdownProps,
50
+ menu
51
+ } : dropdownProps;
52
+ return /* @__PURE__ */ jsx(Dropdown, { trigger: ["hover"], ...props, children: renderItem() });
53
+ }
54
+ return renderItem();
55
+ });
56
+ export {
57
+ BreadcrumbItem
58
+ };
@@ -0,0 +1,66 @@
1
+ import { BreadcrumbSizeType } from 'components/Breadcrumb/Breadcrumb.types';
2
+ import { Theme } from 'themes';
3
+ export declare const getBreadcrumbItemStyle: (size: BreadcrumbSizeType, withLink: boolean) => {
4
+ link: (theme: Theme) => {
5
+ display: string;
6
+ width: string;
7
+ height: string;
8
+ gap: 4;
9
+ alignItems: string;
10
+ textDecoration: string;
11
+ color: string;
12
+ ":hover": {
13
+ color: "#595959";
14
+ textDecoration: string;
15
+ };
16
+ ":visited": {
17
+ color: string;
18
+ };
19
+ };
20
+ itemWrapper: (theme: Theme) => {
21
+ display: string;
22
+ alignItems: string;
23
+ gap: 4;
24
+ borderRadius: 4;
25
+ height: number;
26
+ padding: string;
27
+ color: "#262626" | "#8C8C8C";
28
+ cursor: string;
29
+ ":hover": {
30
+ color: "#262626" | "#595959";
31
+ background: string;
32
+ };
33
+ };
34
+ icon: (theme: Theme) => {
35
+ display: string;
36
+ alignItems: string;
37
+ justifyContent: string;
38
+ fontSize: 16;
39
+ };
40
+ title: (theme: Theme) => {
41
+ fontFamily: "Roboto";
42
+ fontSize: 14;
43
+ lineHeight: "20px";
44
+ } | {
45
+ fontFamily: "Roboto";
46
+ fontSize: 12;
47
+ lineHeight: "20px";
48
+ };
49
+ dropdownContent: (theme: Theme) => {
50
+ display: string;
51
+ gap: 4;
52
+ borderRadius: 4;
53
+ color: "#262626" | "#8C8C8C";
54
+ cursor: string;
55
+ ":hover": {
56
+ color: "#262626";
57
+ background: string;
58
+ };
59
+ };
60
+ dropdownSuffix: (theme: Theme) => {
61
+ readonly fontSize: 12 | 16;
62
+ readonly display: "flex";
63
+ readonly alignItems: "center";
64
+ readonly justifyContent: "center";
65
+ };
66
+ };
@@ -0,0 +1,74 @@
1
+ import { getBreadcrumbTokens } from "../../Breadcrumb.tokens.js";
2
+ const getBreadcrumbItemStyle = (size, withLink) => {
3
+ const isMiddle = size === "middle";
4
+ return {
5
+ link: (theme) => {
6
+ const breadcrumbTokens = getBreadcrumbTokens(theme);
7
+ return {
8
+ display: "inline-flex",
9
+ width: "100%",
10
+ height: "100%",
11
+ gap: theme.marginXS,
12
+ alignItems: "center",
13
+ textDecoration: "none",
14
+ color: "unset",
15
+ ":hover": {
16
+ color: breadcrumbTokens.breadcrumbItemHover,
17
+ textDecoration: "none"
18
+ },
19
+ ":visited": {
20
+ color: "unset"
21
+ }
22
+ };
23
+ },
24
+ itemWrapper: (theme) => {
25
+ const breadcrumbTokens = getBreadcrumbTokens(theme);
26
+ return {
27
+ display: "inline-flex",
28
+ alignItems: "center",
29
+ gap: theme.marginXS,
30
+ borderRadius: theme.borderRadiusM,
31
+ height: breadcrumbTokens.breadcrumbItemHeight,
32
+ padding: `0 ${breadcrumbTokens.breadcrumbItemPaddingHorizontal}px`,
33
+ color: withLink ? breadcrumbTokens.breadcrumbItem : breadcrumbTokens.breadcrumbLastItem,
34
+ cursor: withLink ? "pointer" : "default",
35
+ ":hover": {
36
+ color: withLink ? breadcrumbTokens.breadcrumbItemHover : breadcrumbTokens.breadcrumbLastItem,
37
+ background: withLink ? breadcrumbTokens.breadcrumbItemBgHover : "none"
38
+ }
39
+ };
40
+ },
41
+ icon: (theme) => ({
42
+ display: "flex",
43
+ alignItems: "center",
44
+ justifyContent: "center",
45
+ fontSize: theme.iconM
46
+ }),
47
+ title: (theme) => ({
48
+ ...isMiddle ? theme.typography.body2 : theme.typography.body3
49
+ }),
50
+ dropdownContent: (theme) => {
51
+ const breadcrumbTokens = getBreadcrumbTokens(theme);
52
+ return {
53
+ display: "flex",
54
+ gap: theme.marginXS,
55
+ borderRadius: theme.borderRadiusM,
56
+ color: withLink ? breadcrumbTokens.breadcrumbItem : breadcrumbTokens.breadcrumbLastItem,
57
+ cursor: withLink ? "pointer" : "default",
58
+ ":hover": {
59
+ color: breadcrumbTokens.breadcrumbLastItem,
60
+ background: withLink ? breadcrumbTokens.breadcrumbItemBgHover : "none"
61
+ }
62
+ };
63
+ },
64
+ dropdownSuffix: (theme) => ({
65
+ fontSize: isMiddle ? theme.iconM : theme.iconS,
66
+ display: "flex",
67
+ alignItems: "center",
68
+ justifyContent: "center"
69
+ })
70
+ };
71
+ };
72
+ export {
73
+ getBreadcrumbItemStyle
74
+ };
@@ -0,0 +1,8 @@
1
+ import { BreadcrumbParamsType, BreadcrumbSizeType, RouteItem } from 'components/Breadcrumb/Breadcrumb.types';
2
+ export interface BreadcrumbItemProps {
3
+ routeItem: RouteItem;
4
+ isLastItem: boolean;
5
+ size: BreadcrumbSizeType;
6
+ params: BreadcrumbParamsType;
7
+ items: RouteItem[];
8
+ }
@@ -0,0 +1,4 @@
1
+ import { BreadcrumbParamsType, RouteItem } from 'components/Breadcrumb/Breadcrumb.types';
2
+ import { ReactNode } from 'react';
3
+ export declare const getHrefByPath: (path: string, items: RouteItem[]) => string | undefined;
4
+ export declare const getCurrentTitle: (title: ReactNode | undefined, params: BreadcrumbParamsType) => string | number | boolean | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined;
@@ -0,0 +1,27 @@
1
+ import { isUndefined, isString } from "lodash-es";
2
+ const getHrefByPath = (path, items) => {
3
+ const paths = items.map((item) => item.path);
4
+ const index = paths.findIndex((item) => item === path);
5
+ const parentPaths = paths.splice(0, index);
6
+ if (parentPaths.some((item) => isUndefined(item))) {
7
+ return void 0;
8
+ }
9
+ if (paths.length === 1) {
10
+ return "/";
11
+ }
12
+ const joinedPaths = parentPaths.join("/").replace("//", "/");
13
+ return `/${joinedPaths}/${path}`;
14
+ };
15
+ const getCurrentTitle = (title, params) => {
16
+ if (!isString(title)) {
17
+ return title;
18
+ }
19
+ const isParameter = title[0] === ":";
20
+ const parameterName = isParameter ? title.slice(1) : "";
21
+ const hasParameter = isParameter && Object.keys(params).includes(parameterName);
22
+ return hasParameter ? params[parameterName] : title;
23
+ };
24
+ export {
25
+ getCurrentTitle,
26
+ getHrefByPath
27
+ };
@@ -0,0 +1,76 @@
1
+ import { RouteItem } from '../Breadcrumb.types';
2
+ export declare const breadcrumbItems: RouteItem[];
3
+ export declare const baseItems: {
4
+ title: string;
5
+ href: string;
6
+ }[];
7
+ export declare const baseItemsWithClassName: ({
8
+ title: string;
9
+ href: string;
10
+ className: string;
11
+ } | {
12
+ title: string;
13
+ href: string;
14
+ className?: undefined;
15
+ })[];
16
+ export declare const iconItems: ({
17
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
18
+ href: string;
19
+ title?: undefined;
20
+ } | {
21
+ title: string;
22
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
23
+ href: string;
24
+ } | {
25
+ title: string;
26
+ href: string;
27
+ icon?: undefined;
28
+ })[];
29
+ export declare const pathItems: {
30
+ title: string;
31
+ path: string;
32
+ }[];
33
+ export declare const dropdownItems: ({
34
+ title: string;
35
+ path: string;
36
+ menu?: undefined;
37
+ } | {
38
+ title: string;
39
+ path: string;
40
+ menu: {
41
+ items: {
42
+ key: string;
43
+ label: string;
44
+ }[];
45
+ };
46
+ })[];
47
+ export declare const paramsItems: {
48
+ title: string;
49
+ href: string;
50
+ }[];
51
+ export declare const sizeItems: ({
52
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
53
+ href: string;
54
+ title?: undefined;
55
+ menu?: undefined;
56
+ } | {
57
+ title: string;
58
+ icon: import("@emotion/react/jsx-runtime").JSX.Element;
59
+ href: string;
60
+ menu?: undefined;
61
+ } | {
62
+ title: string;
63
+ href: string;
64
+ menu: {
65
+ items: {
66
+ key: string;
67
+ label: string;
68
+ }[];
69
+ };
70
+ icon?: undefined;
71
+ } | {
72
+ title: string;
73
+ href: string;
74
+ icon?: undefined;
75
+ menu?: undefined;
76
+ })[];
@@ -0,0 +1,2 @@
1
+ export { Breadcrumb } from './Breadcrumb';
2
+ export type { BreadcrumbProps } from './Breadcrumb.types';
@@ -31,6 +31,7 @@ export declare const getRadioButtonWrapperStyle: (theme: Theme, radioTokens: Rad
31
31
  };
32
32
  readonly ":not(:first-of-type)::before": {
33
33
  readonly content: "''";
34
+ readonly boxSizing: "content-box";
34
35
  readonly position: "absolute";
35
36
  readonly width: 1;
36
37
  readonly height: "100%";
@@ -27,6 +27,7 @@ const getRadioButtonWrapperStyle = (theme, radioTokens, isRenderIcon, checked, d
27
27
  },
28
28
  ":not(:first-of-type)::before": {
29
29
  content: "''",
30
+ boxSizing: "content-box",
30
31
  position: "absolute",
31
32
  width: 1,
32
33
  height: "100%",
@@ -16,7 +16,8 @@ const RadioGroupComponent = (props) => {
16
16
  buttonType = "text",
17
17
  options,
18
18
  onChange,
19
- children
19
+ children,
20
+ ...restProps
20
21
  } = props;
21
22
  const theme = useTheme();
22
23
  const isButtonType = optionType === "button";
@@ -50,7 +51,7 @@ const RadioGroupComponent = (props) => {
50
51
  return /* @__PURE__ */ jsx(Radio, { disabled: option.disabled || disabled, value: option.value, checked: value === option.value, icon: option.icon, children: option.label }, `radio-group-value-options-${option.value}`);
51
52
  });
52
53
  }
53
- return /* @__PURE__ */ jsx("div", { css: getRadioGroupStyle(theme, isButtonType), children: /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: contextValue, children: childrenToRender }) });
54
+ return /* @__PURE__ */ jsx("div", { css: getRadioGroupStyle(theme, isButtonType), ...restProps, children: /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: contextValue, children: childrenToRender }) });
54
55
  };
55
56
  const RadioGroup = RadioGroupComponent;
56
57
  export {
@@ -3,7 +3,7 @@ import { HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
3
3
  interface RadioOptionType extends Pick<RadioProps, "value" | "disabled" | "icon"> {
4
4
  label?: ReactNode;
5
5
  }
6
- export interface RadioGroupProps extends PropsWithChildren, Pick<RadioProps, "disabled" | "name" | "value" | "onChange">, Pick<HTMLAttributes<HTMLElement>, "defaultValue"> {
6
+ export interface RadioGroupProps extends PropsWithChildren, Pick<RadioProps, "disabled" | "name" | "value" | "onChange">, Pick<HTMLAttributes<HTMLElement>, "defaultValue" | "className" | "id"> {
7
7
  options?: (string | number | RadioOptionType)[];
8
8
  optionType?: "default" | "button";
9
9
  buttonType?: "text" | "icon";
@@ -1,2 +1,4 @@
1
1
  export { Radio } from './Radio';
2
2
  export type { RadioProps } from './Radio.types';
3
+ export type { RadioChangeEvent } from './components/RadioInternal/RadioInternal.types';
4
+ export type { RadioGroupProps } from './components/RadioGroup/RadioGroup.types';
@@ -19,7 +19,8 @@ const TagComponent = memo(({
19
19
  const [isClosed, setIsClosed] = useState(false);
20
20
  const tagDefaultStyle = getTagDefaultStyle({
21
21
  color,
22
- type
22
+ type,
23
+ closable
23
24
  });
24
25
  const handleClick = useCallback((e) => {
25
26
  onClose == null ? void 0 : onClose(e);
@@ -28,9 +29,9 @@ const TagComponent = memo(({
28
29
  if (isClosed) {
29
30
  return null;
30
31
  }
31
- return /* @__PURE__ */ jsxs("span", { ...spanProps, css: [tagDefaultStyle.wrapper(theme), (_a = styles == null ? void 0 : styles.wrapper) == null ? void 0 : _a.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:TagComponent;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFnL1RhZy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0NRIiwiZmlsZSI6Ii9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFnL1RhZy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB0eXBlIEZDLCBtZW1vLCB0eXBlIE1vdXNlRXZlbnQsIHVzZUNhbGxiYWNrLCB1c2VTdGF0ZSB9IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHR5cGUgeyBUYWdGdWxsVHlwZSwgVGFnUHJvcHMgfSBmcm9tIFwiLi9UYWcudHlwZXNcIjtcbmltcG9ydCB7IHVzZVRoZW1lIH0gZnJvbSBcImhvb2tzL3VzZV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gIHsuLi5zcGFuUHJvcHN9XG4gICAgICAgIGNzcz17W3RhZ0RlZmF1bHRTdHlsZS53cmFwcGVyKHRoZW1lKSwgc3R5bGVzPy53cmFwcGVyPy4odGhlbWUpXX1cbiAgICAgICAgY2xhc3NOYW1lPXtjbGFzc05hbWV9XG4gICAgICA+XG4gICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAge2Nsb3NhYmxlICYmIChcbiAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgb25DbGljaz17aGFuZGxlQ2xpY2t9XG4gICAgICAgICAgICBjc3M9e1t0YWdEZWZhdWx0U3R5bGUuY2xvc2VJY29uKHRoZW1lKSwgc3R5bGVzPy5jbG9zZUljb24/Lih0aGVtZSldfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxDbG9zZU91dGxpbmVkIC8+XG4gICAgICAgICAgPC9zcGFuPlxuICAgICAgICApfVxuICAgICAgPC9zcGFuPlxuICAgICk7XG4gIH1cbik7XG5cbmNvbnN0IFRhZ1dpdGhDaGVja2FibGUgPSBUYWdDb21wb25lbnQgYXMgVGFnRnVsbFR5cGU7XG5UYWdXaXRoQ2hlY2thYmxlLkNoZWNrYWJsZSA9IENoZWNrYWJsZTtcblxuZXhwb3J0IGNvbnN0IFRhZyA9IFRhZ1dpdGhDaGVja2FibGU7XG4iXX0= */"], className, children: [
32
+ return /* @__PURE__ */ jsxs("span", { ...spanProps, css: [tagDefaultStyle.wrapper(theme), (_a = styles == null ? void 0 : styles.wrapper) == null ? void 0 : _a.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:TagComponent;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFnL1RhZy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0NRIiwiZmlsZSI6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 */"], className, children: [
32
33
  children,
33
- closable && /* @__PURE__ */ jsx("span", { onClick: handleClick, css: [tagDefaultStyle.closeIcon(theme), (_b = styles == null ? void 0 : styles.closeIcon) == null ? void 0 : _b.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:TagComponent;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFnL1RhZy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkNZIiwiZmlsZSI6Ii9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFnL1RhZy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB0eXBlIEZDLCBtZW1vLCB0eXBlIE1vdXNlRXZlbnQsIHVzZUNhbGxiYWNrLCB1c2VTdGF0ZSB9IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHR5cGUgeyBUYWdGdWxsVHlwZSwgVGFnUHJvcHMgfSBmcm9tIFwiLi9UYWcudHlwZXNcIjtcbmltcG9ydCB7IHVzZVRoZW1lIH0gZnJvbSBcImhvb2tzL3VzZVRoZW1lXCI7XG5pbXBvcnQgeyBnZXRUYWdEZWZhdWx0U3R5bGUgfSBmcm9tIFwiLi9UYWcuc3R5bGVzXCI7XG5pbXBvcnQgeyBDbG9zZU91dGxpbmVkIH0gZnJvbSBcIkBpbmZvbWF4aW11bS9pY29uc1wiO1xuaW1wb3J0IHsgQ2hlY2thYmxlIH0gZnJvbSBcIi4vY29tcG9uZW50cy9DaGVja2FibGUvQ2hlY2thYmxlXCI7XG5cbmV4cG9ydCBjb25zdCBUYWdDb21wb25lbnQ6IEZDPFRhZ1Byb3BzPiA9IG1lbW8oXG4gICh7XG4gICAgY29sb3IgPSBcIm5ldXRyYWxcIixcb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3R5bGVzPy5jbG9zZUljb24/Lih0aGVtZSldfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxDbG9zZU91dGxpbmVkIC8+XG4gICAgICAgICAgPC9zcGFuPlxuICAgICAgICApfVxuICAgICAgPC9zcGFuPlxuICAgICk7XG4gIH1cbik7XG5cbmNvbnN0IFRhZ1dpdGhDaGVja2FibGUgPSBUYWdDb21wb25lbnQgYXMgVGFnRnVsbFR5cGU7XG5UYWdXaXRoQ2hlY2thYmxlLkNoZWNrYWJsZSA9IENoZWNrYWJsZTtcblxuZXhwb3J0IGNvbnN0IFRhZyA9IFRhZ1dpdGhDaGVja2FibGU7XG4iXX0= */"], children: /* @__PURE__ */ jsx(CloseOutlined, {}) })
34
+ closable && /* @__PURE__ */ jsx("span", { onClick: handleClick, css: [tagDefaultStyle.closeIcon(theme), (_b = styles == null ? void 0 : styles.closeIcon) == null ? void 0 : _b.call(styles, theme), process.env.NODE_ENV === "production" ? "" : ";label:TagComponent;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFnL1RhZy50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBNkNZIiwiZmlsZSI6Ii9idWlsZHMvZnJvbnRlbmQvbGlicy91aS1raXQvc3JjL2NvbXBvbmVudHMvVGFnL1RhZy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyB0eXBlIEZDLCBtZW1vLCB0eXBlIE1vdXNlRXZlbnQsIHVzZUNhbGxiYWNrLCB1c2VTdGF0ZSB9IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHR5cGUgeyBUYWdGdWxsVHlwZSwgVGFnUHJvcHMgfSBmcm9tIFwiLi9UYWcudHlwZXNcIjtcbmltcG9ydCB7IHVzZVRoZW1lIH0gZnJvbS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ICAgICA8c3BhblxuICAgICAgICB7Li4uc3BhblByb3BzfVxuICAgICAgICBjc3M9e1t0YWdEZWZhdWx0U3R5bGUud3JhcHBlcih0aGVtZSksIHN0eWxlcz8ud3JhcHBlcj8uKHRoZW1lKV19XG4gICAgICAgIGNsYXNzTmFtZT17Y2xhc3NOYW1lfVxuICAgICAgPlxuICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgIHtjbG9zYWJsZSAmJiAoXG4gICAgICAgICAgPHNwYW5cbiAgICAgICAgICAgIG9uQ2xpY2s9e2hhbmRsZUNsaWNrfVxuICAgICAgICAgICAgY3NzPXtbdGFnRGVmYXVsdFN0eWxlLmNsb3NlSWNvbih0aGVtZSksIHN0eWxlcz8uY2xvc2VJY29uPy4odGhlbWUpXX1cbiAgICAgICAgICA+XG4gICAgICAgICAgICA8Q2xvc2VPdXRsaW5lZCAvPlxuICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgKX1cbiAgICAgIDwvc3Bhbj5cbiAgICApO1xuICB9XG4pO1xuXG5jb25zdCBUYWdXaXRoQ2hlY2thYmxlID0gVGFnQ29tcG9uZW50IGFzIFRhZ0Z1bGxUeXBlO1xuVGFnV2l0aENoZWNrYWJsZS5DaGVja2FibGUgPSBDaGVja2FibGU7XG5cbmV4cG9ydCBjb25zdCBUYWcgPSBUYWdXaXRoQ2hlY2thYmxlO1xuIl19 */"], children: /* @__PURE__ */ jsx(CloseOutlined, {}) })
34
35
  ] });
35
36
  });
36
37
  const TagWithCheckable = TagComponent;
@@ -1,6 +1,6 @@
1
1
  import { Theme } from 'themes';
2
2
  import { TagDefaultStylesProps } from './Tag.types';
3
- export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps) => {
3
+ export declare const getTagDefaultStyle: ({ color, type, closable }: TagDefaultStylesProps) => {
4
4
  wrapper: (theme: Theme) => {
5
5
  readonly background: "#F5F5F5";
6
6
  readonly color: "#262626";
@@ -13,8 +13,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
13
13
  readonly display: "inline-flex";
14
14
  readonly justifyContent: "center";
15
15
  readonly alignItems: "center";
16
- readonly gap: 4;
17
- readonly padding: "0px 8px";
16
+ readonly padding: `0px ${number}px 0px ${number}px`;
18
17
  readonly borderRadius: 4;
19
18
  readonly boxSizing: "border-box";
20
19
  } | {
@@ -29,8 +28,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
29
28
  readonly display: "inline-flex";
30
29
  readonly justifyContent: "center";
31
30
  readonly alignItems: "center";
32
- readonly gap: 4;
33
- readonly padding: "0px 8px";
31
+ readonly padding: `0px ${number}px 0px ${number}px`;
34
32
  readonly borderRadius: 4;
35
33
  readonly boxSizing: "border-box";
36
34
  } | {
@@ -45,8 +43,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
45
43
  readonly display: "inline-flex";
46
44
  readonly justifyContent: "center";
47
45
  readonly alignItems: "center";
48
- readonly gap: 4;
49
- readonly padding: "0px 8px";
46
+ readonly padding: `0px ${number}px 0px ${number}px`;
50
47
  readonly borderRadius: 4;
51
48
  readonly boxSizing: "border-box";
52
49
  } | {
@@ -61,8 +58,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
61
58
  readonly display: "inline-flex";
62
59
  readonly justifyContent: "center";
63
60
  readonly alignItems: "center";
64
- readonly gap: 4;
65
- readonly padding: "0px 8px";
61
+ readonly padding: `0px ${number}px 0px ${number}px`;
66
62
  readonly borderRadius: 4;
67
63
  readonly boxSizing: "border-box";
68
64
  } | {
@@ -77,8 +73,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
77
73
  readonly display: "inline-flex";
78
74
  readonly justifyContent: "center";
79
75
  readonly alignItems: "center";
80
- readonly gap: 4;
81
- readonly padding: "0px 8px";
76
+ readonly padding: `0px ${number}px 0px ${number}px`;
82
77
  readonly borderRadius: 4;
83
78
  readonly boxSizing: "border-box";
84
79
  } | {
@@ -93,8 +88,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
93
88
  readonly display: "inline-flex";
94
89
  readonly justifyContent: "center";
95
90
  readonly alignItems: "center";
96
- readonly gap: 4;
97
- readonly padding: "0px 8px";
91
+ readonly padding: `0px ${number}px 0px ${number}px`;
98
92
  readonly borderRadius: 4;
99
93
  readonly boxSizing: "border-box";
100
94
  } | {
@@ -109,8 +103,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
109
103
  readonly display: "inline-flex";
110
104
  readonly justifyContent: "center";
111
105
  readonly alignItems: "center";
112
- readonly gap: 4;
113
- readonly padding: "0px 8px";
106
+ readonly padding: `0px ${number}px 0px ${number}px`;
114
107
  readonly borderRadius: 4;
115
108
  readonly boxSizing: "border-box";
116
109
  } | {
@@ -125,8 +118,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
125
118
  readonly display: "inline-flex";
126
119
  readonly justifyContent: "center";
127
120
  readonly alignItems: "center";
128
- readonly gap: 4;
129
- readonly padding: "0px 8px";
121
+ readonly padding: `0px ${number}px 0px ${number}px`;
130
122
  readonly borderRadius: 4;
131
123
  readonly boxSizing: "border-box";
132
124
  } | {
@@ -141,8 +133,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
141
133
  readonly display: "inline-flex";
142
134
  readonly justifyContent: "center";
143
135
  readonly alignItems: "center";
144
- readonly gap: 4;
145
- readonly padding: "0px 8px";
136
+ readonly padding: `0px ${number}px 0px ${number}px`;
146
137
  readonly borderRadius: 4;
147
138
  readonly boxSizing: "border-box";
148
139
  } | {
@@ -157,8 +148,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
157
148
  readonly display: "inline-flex";
158
149
  readonly justifyContent: "center";
159
150
  readonly alignItems: "center";
160
- readonly gap: 4;
161
- readonly padding: "0px 8px";
151
+ readonly padding: `0px ${number}px 0px ${number}px`;
162
152
  readonly borderRadius: 4;
163
153
  readonly boxSizing: "border-box";
164
154
  } | {
@@ -173,8 +163,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
173
163
  readonly display: "inline-flex";
174
164
  readonly justifyContent: "center";
175
165
  readonly alignItems: "center";
176
- readonly gap: 4;
177
- readonly padding: "0px 8px";
166
+ readonly padding: `0px ${number}px 0px ${number}px`;
178
167
  readonly borderRadius: 4;
179
168
  readonly boxSizing: "border-box";
180
169
  } | {
@@ -189,8 +178,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
189
178
  readonly display: "inline-flex";
190
179
  readonly justifyContent: "center";
191
180
  readonly alignItems: "center";
192
- readonly gap: 4;
193
- readonly padding: "0px 8px";
181
+ readonly padding: `0px ${number}px 0px ${number}px`;
194
182
  readonly borderRadius: 4;
195
183
  readonly boxSizing: "border-box";
196
184
  } | {
@@ -205,8 +193,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
205
193
  readonly display: "inline-flex";
206
194
  readonly justifyContent: "center";
207
195
  readonly alignItems: "center";
208
- readonly gap: 4;
209
- readonly padding: "0px 8px";
196
+ readonly padding: `0px ${number}px 0px ${number}px`;
210
197
  readonly borderRadius: 4;
211
198
  readonly boxSizing: "border-box";
212
199
  } | {
@@ -221,8 +208,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
221
208
  readonly display: "inline-flex";
222
209
  readonly justifyContent: "center";
223
210
  readonly alignItems: "center";
224
- readonly gap: 4;
225
- readonly padding: "0px 8px";
211
+ readonly padding: `0px ${number}px 0px ${number}px`;
226
212
  readonly borderRadius: 4;
227
213
  readonly boxSizing: "border-box";
228
214
  } | {
@@ -237,8 +223,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
237
223
  readonly display: "inline-flex";
238
224
  readonly justifyContent: "center";
239
225
  readonly alignItems: "center";
240
- readonly gap: 4;
241
- readonly padding: "0px 8px";
226
+ readonly padding: `0px ${number}px 0px ${number}px`;
242
227
  readonly borderRadius: 4;
243
228
  readonly boxSizing: "border-box";
244
229
  } | {
@@ -253,8 +238,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
253
238
  readonly display: "inline-flex";
254
239
  readonly justifyContent: "center";
255
240
  readonly alignItems: "center";
256
- readonly gap: 4;
257
- readonly padding: "0px 8px";
241
+ readonly padding: `0px ${number}px 0px ${number}px`;
258
242
  readonly borderRadius: 4;
259
243
  readonly boxSizing: "border-box";
260
244
  } | {
@@ -269,8 +253,7 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
269
253
  readonly display: "inline-flex";
270
254
  readonly justifyContent: "center";
271
255
  readonly alignItems: "center";
272
- readonly gap: 4;
273
- readonly padding: "0px 8px";
256
+ readonly padding: `0px ${number}px 0px ${number}px`;
274
257
  readonly borderRadius: 4;
275
258
  readonly boxSizing: "border-box";
276
259
  } | {
@@ -285,17 +268,19 @@ export declare const getTagDefaultStyle: ({ color, type }: TagDefaultStylesProps
285
268
  readonly display: "inline-flex";
286
269
  readonly justifyContent: "center";
287
270
  readonly alignItems: "center";
288
- readonly gap: 4;
289
- readonly padding: "0px 8px";
271
+ readonly padding: `0px ${number}px 0px ${number}px`;
290
272
  readonly borderRadius: 4;
291
273
  readonly boxSizing: "border-box";
292
274
  };
293
275
  closeIcon: (theme: Theme) => {
294
276
  color: `rgba(${number}, ${number}, ${number}, 0.8)` | `rgba(${number}, ${number}, ${number}, 0.3)`;
295
277
  cursor: string;
278
+ width: number;
279
+ aspectRatio: string;
296
280
  display: string;
297
281
  alignItems: string;
298
282
  justifyContent: string;
283
+ fontSize: 12;
299
284
  ":hover": {
300
285
  color: "#FFFFFF" | `rgba(${number}, ${number}, ${number}, 0.7)`;
301
286
  };
@@ -12,19 +12,22 @@ const getFilledFeaturesByColor = (theme, color) => {
12
12
  };
13
13
  const getTagDefaultStyle = ({
14
14
  color,
15
- type
15
+ type,
16
+ closable
16
17
  }) => {
17
18
  const isOutlined = type === "outlined";
18
19
  return {
19
20
  wrapper: (theme) => {
21
+ const rightPadding = closable ? theme.paddingXS : theme.paddingM;
22
+ const correctedRightPadding = isOutlined ? rightPadding - 1 : rightPadding;
23
+ const correctedLeftPadding = isOutlined ? theme.paddingM - 1 : theme.paddingM;
20
24
  const generalStyles = {
21
25
  height: theme.x5,
22
26
  maxWidth: "100%",
23
27
  display: "inline-flex",
24
28
  justifyContent: "center",
25
29
  alignItems: "center",
26
- gap: theme.marginXS,
27
- padding: `0px ${theme.paddingM}px`,
30
+ padding: `0px ${correctedRightPadding}px 0px ${correctedLeftPadding}px`,
28
31
  borderRadius: theme.borderRadiusM,
29
32
  boxSizing: "border-box",
30
33
  ...theme.typography.body3
@@ -38,9 +41,12 @@ const getTagDefaultStyle = ({
38
41
  closeIcon: (theme) => ({
39
42
  color: isOutlined ? theme.textIcon : theme.textIconContrast,
40
43
  cursor: "pointer",
44
+ width: 20,
45
+ aspectRatio: "1/1",
41
46
  display: "flex",
42
47
  alignItems: "center",
43
48
  justifyContent: "center",
49
+ fontSize: theme.iconS,
44
50
  ":hover": {
45
51
  color: isOutlined ? theme.textIconHover : theme.textIconContrastHover
46
52
  }
@@ -17,7 +17,7 @@ export interface TagProps extends HTMLAttributes<HTMLSpanElement> {
17
17
  onClose?: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
18
18
  children?: ReactNode | string;
19
19
  }
20
- export type TagDefaultStylesProps = Required<Pick<TagProps, "color" | "type">>;
20
+ export type TagDefaultStylesProps = Required<Pick<TagProps, "color" | "type" | "closable">>;
21
21
  export type TagFullType = typeof TagComponent & {
22
22
  Checkable: typeof Checkable;
23
23
  };
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ export { Select } from './components/Select';
17
17
  export type { SelectProps } from './components/Select';
18
18
  export { type InputProps, Input } from './components/Input';
19
19
  export { type InputNumberProps, InputNumber } from './components/InputNumber';
20
- export { type RadioProps, Radio } from './components/Radio';
20
+ export { type RadioChangeEvent, type RadioGroupProps, type RadioProps, Radio, } from './components/Radio';
21
21
  export { Alert } from './components/Alert';
22
22
  export type { AlertProps } from './components/Alert';
23
23
  export { Tooltip } from './components/Tooltip';
@@ -36,6 +36,8 @@ export { Avatar, avatarColors } from './components/Avatar';
36
36
  export type { AvatarProps, AvatarColorType } from './components/Avatar';
37
37
  export { Tabs } from './components/Tabs';
38
38
  export type { TabsProps } from './components/Tabs';
39
+ export { Breadcrumb } from './components/Breadcrumb';
40
+ export type { BreadcrumbProps } from './components/Breadcrumb';
39
41
  export { Tag } from './components/Tag';
40
42
  export type { TagProps, CheckableProps } from './components/Tag';
41
43
  export { ConfigProvider, useConfig, type Locale } from './components/ConfigProvider';
package/dist/index.js CHANGED
@@ -23,6 +23,7 @@ import { Progress } from "./components/Progress/Progress.js";
23
23
  import { Avatar } from "./components/Avatar/Avatar.js";
24
24
  import { avatarColors } from "./components/Avatar/Avatar.utils.js";
25
25
  import { Tabs } from "./components/Tabs/Tabs.js";
26
+ import { Breadcrumb } from "./components/Breadcrumb/Breadcrumb.js";
26
27
  import { Tag } from "./components/Tag/Tag.js";
27
28
  import { ConfigProvider } from "./components/ConfigProvider/ConfigProvider.js";
28
29
  import { useConfig } from "./components/ConfigProvider/hooks/useConfig/useConfig.js";
@@ -31,6 +32,7 @@ import { Popconfirm } from "./components/Popconfirm/Popconfirm.js";
31
32
  export {
32
33
  Alert,
33
34
  Avatar,
35
+ Breadcrumb,
34
36
  Button,
35
37
  Checkbox,
36
38
  ConfigProvider,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@infomaximum/ui-kit",
3
3
  "license": "Apache-2.0",
4
- "version": "0.11.1",
4
+ "version": "0.12.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -34,8 +34,8 @@
34
34
  "update-icons": "node scripts/updateIcons/updateIcons.js"
35
35
  },
36
36
  "dependencies": {
37
- "@dnd-kit/core": "^6.3.1",
38
- "@dnd-kit/sortable": "^10.0.0",
37
+ "@dnd-kit/core": "6.0.5",
38
+ "@dnd-kit/sortable": "7.0.1",
39
39
  "@dnd-kit/utilities": "^3.2.2",
40
40
  "@emotion/react": "^11.0.0",
41
41
  "@floating-ui/react": "^0.27.6",
@@ -54,7 +54,7 @@
54
54
  "react": "^18",
55
55
  "react-dom": "^18",
56
56
  "@dnd-kit/core": "^6",
57
- "@dnd-kit/sortable": "^10",
57
+ "@dnd-kit/sortable": "^7",
58
58
  "@dnd-kit/utilities": "^3"
59
59
  },
60
60
  "devDependencies": {