@ozen-ui/kit 0.19.0 → 0.20.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 (29) hide show
  1. package/__inner__/cjs/components/Avatar/Avatar.css +28 -25
  2. package/__inner__/cjs/components/Avatar/Avatar.d.ts +3 -3
  3. package/__inner__/cjs/components/Avatar/Avatar.js +15 -27
  4. package/__inner__/cjs/components/Avatar/utils.d.ts +6 -0
  5. package/__inner__/cjs/components/Avatar/utils.js +26 -0
  6. package/__inner__/cjs/components/Button/Button.d.ts +5 -5
  7. package/__inner__/cjs/components/Button/Button.js +12 -3
  8. package/__inner__/cjs/components/Grid/Grid.css +18 -0
  9. package/__inner__/cjs/components/Grid/Grid.d.ts +8 -0
  10. package/__inner__/cjs/components/Grid/Grid.js +12 -3
  11. package/__inner__/cjs/components/Table/components/TableRow/TableRow.css +6 -1
  12. package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_bBusinessDefault.css +2 -2
  13. package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_ozenDark.css +1 -1
  14. package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_ozenDefault.css +1 -1
  15. package/__inner__/esm/components/Avatar/Avatar.css +28 -25
  16. package/__inner__/esm/components/Avatar/Avatar.d.ts +3 -3
  17. package/__inner__/esm/components/Avatar/Avatar.js +14 -26
  18. package/__inner__/esm/components/Avatar/utils.d.ts +6 -0
  19. package/__inner__/esm/components/Avatar/utils.js +22 -0
  20. package/__inner__/esm/components/Button/Button.d.ts +5 -5
  21. package/__inner__/esm/components/Button/Button.js +12 -3
  22. package/__inner__/esm/components/Grid/Grid.css +18 -0
  23. package/__inner__/esm/components/Grid/Grid.d.ts +8 -0
  24. package/__inner__/esm/components/Grid/Grid.js +11 -2
  25. package/__inner__/esm/components/Table/components/TableRow/TableRow.css +6 -1
  26. package/__inner__/esm/components/ThemeProvider/_color/Theme_color_bBusinessDefault.css +2 -2
  27. package/__inner__/esm/components/ThemeProvider/_color/Theme_color_ozenDark.css +1 -1
  28. package/__inner__/esm/components/ThemeProvider/_color/Theme_color_ozenDefault.css +1 -1
  29. package/package.json +1 -1
@@ -1,112 +1,115 @@
1
1
  .Avatar {
2
2
  --avatar-size: 100%;
3
+ --avatar-color: var(--color-content-action-on);
4
+ --avatar-bg-color: unset;
3
5
  display: flex;
4
6
  align-items: center;
5
7
  justify-content: center;
6
8
  flex-shrink: 0;
7
9
  inline-size: var(--avatar-size);
8
10
  block-size: var(--avatar-size);
11
+ color: var(--avatar-color);
12
+ background-color: var(--avatar-bg-color);
9
13
  font-family: Roboto, sans-serif;
10
14
  border-radius: 50%;
11
15
  position: relative;
12
16
  overflow: visible;
13
- color: var(--color-content-action-on);
14
17
  }
15
18
 
16
19
  .Avatar_color_a1 {
17
- background: var(--color-additional-a1);
20
+ --avatar-bg-color: var(--color-additional-a1);
18
21
  }
19
22
 
20
23
  .Avatar_color_a2 {
21
- background: var(--color-additional-a2);
24
+ --avatar-bg-color: var(--color-additional-a2);
22
25
  }
23
26
 
24
27
  .Avatar_color_a3 {
25
- background: var(--color-additional-a3);
28
+ --avatar-bg-color: var(--color-additional-a3);
26
29
  }
27
30
 
28
31
  .Avatar_color_b1 {
29
- background: var(--color-additional-b1);
32
+ --avatar-bg-color: var(--color-additional-b1);
30
33
  }
31
34
 
32
35
  .Avatar_color_b2 {
33
- background: var(--color-additional-b2);
36
+ --avatar-bg-color: var(--color-additional-b2);
34
37
  }
35
38
 
36
39
  .Avatar_color_b3 {
37
- background: var(--color-additional-b3);
40
+ --avatar-bg-color: var(--color-additional-b3);
38
41
  }
39
42
 
40
43
  .Avatar_color_c1 {
41
- background: var(--color-additional-c1);
44
+ --avatar-bg-color: var(--color-additional-c1);
42
45
  }
43
46
 
44
47
  .Avatar_color_c2 {
45
- background: var(--color-additional-c2);
48
+ --avatar-bg-color: var(--color-additional-c2);
46
49
  }
47
50
 
48
51
  .Avatar_color_c3 {
49
- background: var(--color-additional-c3);
52
+ --avatar-bg-color: var(--color-additional-c3);
50
53
  }
51
54
 
52
55
  .Avatar_color_d1 {
53
- background: var(--color-additional-d1);
56
+ --avatar-bg-color: var(--color-additional-d1);
54
57
  }
55
58
 
56
59
  .Avatar_color_d2 {
57
- background: var(--color-additional-d2);
60
+ --avatar-bg-color: var(--color-additional-d2);
58
61
  }
59
62
 
60
63
  .Avatar_color_d3 {
61
- background: var(--color-additional-d3);
64
+ --avatar-bg-color: var(--color-additional-d3);
62
65
  }
63
66
 
64
67
  .Avatar_color_e1 {
65
- background: var(--color-additional-e1);
68
+ --avatar-bg-color: var(--color-additional-e1);
66
69
  }
67
70
 
68
71
  .Avatar_color_e2 {
69
- background: var(--color-additional-e2);
72
+ --avatar-bg-color: var(--color-additional-e2);
70
73
  }
71
74
 
72
75
  .Avatar_color_e3 {
73
- background: var(--color-additional-e3);
76
+ --avatar-bg-color: var(--color-additional-e3);
74
77
  }
75
78
 
76
79
  .Avatar_color_f1 {
77
- background: var(--color-additional-f1);
80
+ --avatar-bg-color: var(--color-additional-f1);
78
81
  }
79
82
 
80
83
  .Avatar_color_f2 {
81
- background: var(--color-additional-f2);
84
+ --avatar-bg-color: var(--color-additional-f2);
82
85
  }
83
86
 
84
87
  .Avatar_color_f3 {
85
- background: var(--color-additional-f3);
88
+ --avatar-bg-color: var(--color-additional-f3);
86
89
  }
87
90
 
88
91
  .Avatar_color_g1 {
89
- background: var(--color-additional-g1);
92
+ --avatar-bg-color: var(--color-additional-g1);
90
93
  }
91
94
 
92
95
  .Avatar_color_g2 {
93
- background: var(--color-additional-g2);
96
+ --avatar-bg-color: var(--color-additional-g2);
94
97
  }
95
98
 
96
99
  .Avatar_color_g3 {
97
- background: var(--color-additional-g3);
100
+ --avatar-bg-color: var(--color-additional-g3);
98
101
  }
99
102
 
100
103
  .Avatar_color_h1 {
101
- background: var(--color-additional-h1);
104
+ --avatar-bg-color: var(--color-additional-h1);
102
105
  }
103
106
 
104
107
  .Avatar_color_h2 {
105
- background: var(--color-additional-h2);
108
+ --avatar-bg-color: var(--color-additional-h2);
106
109
  }
107
110
 
108
111
  .Avatar_color_h3 {
109
- background: var(--color-additional-h3);
112
+ --avatar-bg-color: var(--color-additional-h3);
110
113
  }
111
114
 
112
115
  .Avatar-Image {
@@ -1,6 +1,6 @@
1
1
  import './Avatar.css';
2
2
  import React from 'react';
3
- import type { ComponentPropsWithRef, ComponentRef } from 'react';
3
+ import type { ComponentPropsWithRef, ComponentRef, ReactNode } from 'react';
4
4
  import type { IndicatorProps } from '../Indicator';
5
5
  export declare const avatarSizeVariant: readonly ["4xs", "3xs", "2xs", "xs", "s", "m", "l", "xl"];
6
6
  export declare const avatarHueVariant: number[];
@@ -16,14 +16,14 @@ export type AvatarProps = {
16
16
  /** Url изображения */
17
17
  src?: string;
18
18
  /** Имя пользователя */
19
- name: string;
19
+ name?: string;
20
20
  /** Цветовой оттенок аватарки (при использовании без src) */
21
21
  hue?: AvatarHueVariant;
22
22
  /** Дополнительные СSS-классы */
23
23
  className?: string;
24
24
  /** Свойства компонента Indicator */
25
25
  indicatorProps?: IndicatorProps;
26
- children?: never;
26
+ children?: ReactNode;
27
27
  } & ComponentPropsWithRef<typeof avatarEl>;
28
28
  export declare const cnAvatar: import("@bem-react/classname").ClassNameFormatter;
29
29
  export declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -10,6 +10,7 @@ var classname_1 = require("../../utils/classname");
10
10
  var Indicator_1 = require("../Indicator");
11
11
  var constants_1 = require("./constants");
12
12
  var get_hash_number_1 = require("./get-hash-number");
13
+ var utils_1 = require("./utils");
13
14
  exports.avatarSizeVariant = [
14
15
  '4xs',
15
16
  '3xs',
@@ -23,38 +24,25 @@ exports.avatarSizeVariant = [
23
24
  exports.avatarHueVariant = [1, 2, 3];
24
25
  var avatarEl = 'div';
25
26
  exports.cnAvatar = (0, classname_1.cn)('Avatar');
26
- var getInitials = function (name) {
27
- var _a, _b, _c;
28
- var parts = name.split(' ');
29
- var initials;
30
- if (parts.length === 1) {
31
- initials = ((_a = parts[0]) === null || _a === void 0 ? void 0 : _a.charAt(0)) || '';
32
- }
33
- else {
34
- initials = ((_b = parts.shift()) !== null && _b !== void 0 ? _b : '').charAt(0) + ((_c = parts.pop()) !== null && _c !== void 0 ? _c : '').charAt(0);
35
- }
36
- return initials.toUpperCase();
37
- };
38
- var matchSizeIndicatorToAvatar = {
39
- '4xs': 'xs',
40
- '3xs': 'xs',
41
- '2xs': 'xs',
42
- xs: 's',
43
- s: 's',
44
- m: 's',
45
- l: 'm',
46
- xl: 'm',
47
- };
48
27
  exports.Avatar = (0, react_1.forwardRef)(function (inProps, ref) {
49
28
  var props = (0, useThemeProps_1.useThemeProps)({ props: inProps, name: 'Avatar' });
50
- var _a = props.size, size = _a === void 0 ? constants_1.AVATAR_DEFAULT_SIZE : _a, _b = props.online, online = _b === void 0 ? constants_1.AVATAR_DEFAULT_ONLINE : _b, _c = props.hue, hue = _c === void 0 ? constants_1.AVATAR_DEFAULT_HUE : _c, src = props.src, name = props.name, className = props.className, indicatorProps = props.indicatorProps, other = tslib_1.__rest(props, ["size", "online", "hue", "src", "name", "className", "indicatorProps"]);
29
+ var _a = props.size, size = _a === void 0 ? constants_1.AVATAR_DEFAULT_SIZE : _a, _b = props.online, online = _b === void 0 ? constants_1.AVATAR_DEFAULT_ONLINE : _b, _c = props.hue, hue = _c === void 0 ? constants_1.AVATAR_DEFAULT_HUE : _c, src = props.src, nameProp = props.name, className = props.className, indicatorProps = props.indicatorProps, children = props.children, other = tslib_1.__rest(props, ["size", "online", "hue", "src", "name", "className", "indicatorProps", "children"]);
30
+ var name = nameProp || '';
51
31
  var _d = tslib_1.__read((0, useBoolean_1.useBoolean)(!!src), 2), showImage = _d[0], off = _d[1].off;
52
- var indicatorSize = matchSizeIndicatorToAvatar[size];
32
+ var indicatorSize = utils_1.matchSizeIndicatorToAvatar[size];
53
33
  var colorShades = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
54
34
  var color = "".concat(colorShades[(0, get_hash_number_1.getHashNumber)(name, colorShades.length)]).concat(hue);
55
- var initials = getInitials(name);
35
+ var renderContent = function () {
36
+ if (children) {
37
+ return children;
38
+ }
39
+ if (src && showImage) {
40
+ return (react_1.default.createElement("img", { src: src, alt: name, className: (0, exports.cnAvatar)('Image'), onError: off }));
41
+ }
42
+ return (0, utils_1.getInitials)(name);
43
+ };
56
44
  return (react_1.default.createElement("div", tslib_1.__assign({ className: (0, exports.cnAvatar)({ size: size, color: !showImage && color }, [className]) }, other, { ref: ref }),
57
- src && showImage ? (react_1.default.createElement("img", { src: src, alt: name, className: (0, exports.cnAvatar)('Image'), onError: off })) : (initials),
58
- online && (react_1.default.createElement(Indicator_1.Indicator, tslib_1.__assign({ variant: "success", size: indicatorSize, className: (0, exports.cnAvatar)('Online'), border: true }, indicatorProps)))));
45
+ renderContent(),
46
+ online && (react_1.default.createElement(Indicator_1.Indicator, tslib_1.__assign({ variant: "success", size: indicatorSize, border: true }, indicatorProps, { className: (0, exports.cnAvatar)('Online', indicatorProps === null || indicatorProps === void 0 ? void 0 : indicatorProps.className) })))));
59
47
  });
60
48
  exports.Avatar.displayName = 'Avatar';
@@ -0,0 +1,6 @@
1
+ import type { IndicatorSizeVariant } from '../Indicator';
2
+ import type { AvatarSizeVariant } from './index';
3
+ export declare const getInitials: (name: string) => string;
4
+ export declare const matchSizeIndicatorToAvatar: {
5
+ [key in AvatarSizeVariant]: IndicatorSizeVariant;
6
+ };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.matchSizeIndicatorToAvatar = exports.getInitials = void 0;
4
+ var getInitials = function (name) {
5
+ var _a, _b, _c;
6
+ var parts = name.split(' ');
7
+ var initials;
8
+ if (parts.length === 1) {
9
+ initials = ((_a = parts[0]) === null || _a === void 0 ? void 0 : _a.charAt(0)) || '';
10
+ }
11
+ else {
12
+ initials = ((_b = parts.shift()) !== null && _b !== void 0 ? _b : '').charAt(0) + ((_c = parts.pop()) !== null && _c !== void 0 ? _c : '').charAt(0);
13
+ }
14
+ return initials.toUpperCase();
15
+ };
16
+ exports.getInitials = getInitials;
17
+ exports.matchSizeIndicatorToAvatar = {
18
+ '4xs': 'xs',
19
+ '3xs': 'xs',
20
+ '2xs': 'xs',
21
+ xs: 's',
22
+ s: 's',
23
+ m: 's',
24
+ l: 'm',
25
+ xl: 'm',
26
+ };
@@ -1,17 +1,17 @@
1
1
  import './Button.css';
2
- import React from 'react';
3
2
  import type { ReactNode, ElementType } from 'react';
4
3
  import type { IconProps, IconSize } from '@ozen-ui/icons';
5
4
  import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant';
6
5
  import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
6
+ import type { RenderContentType } from '../../utils/renderContent';
7
7
  import { BUTTON_DEFAULT_TAG } from './constants';
8
8
  export declare const buttonVariant: readonly ["contained", "outlined", "ghost", "function"];
9
9
  export declare const buttonColorVariant: readonly ["primary", "secondary", "warning", "error"];
10
10
  export type ButtonVariant = (typeof buttonVariant)[number];
11
11
  export type ButtonColorVariant = (typeof buttonColorVariant)[number];
12
- export type ButtonIconComponent = React.FC<IconProps & {
12
+ export type ButtonIcon = RenderContentType<IconProps & {
13
13
  size?: IconSize;
14
- }>;
14
+ }>['content'];
15
15
  type ButtonBaseProps = {
16
16
  /**
17
17
  * Вариант отображения кнопки
@@ -37,9 +37,9 @@ type ButtonBaseProps = {
37
37
  /** Дополнительные CSS-классы */
38
38
  className?: string;
39
39
  /** Иконка слева */
40
- iconLeft?: ButtonIconComponent;
40
+ iconLeft?: ButtonIcon;
41
41
  /** Иконка справа */
42
- iconRight?: ButtonIconComponent;
42
+ iconRight?: ButtonIcon;
43
43
  /** Если {true} растягивает кнопку на всю ширину родительского контейнера */
44
44
  fullWidth?: boolean;
45
45
  };
@@ -9,6 +9,7 @@ var useThemeProps_1 = require("../../hooks/useThemeProps");
9
9
  var classname_1 = require("../../utils/classname");
10
10
  var getIconSizeToFormElement_1 = require("../../utils/getIconSizeToFormElement");
11
11
  var polymorphicComponentWithRef_1 = require("../../utils/polymorphicComponentWithRef");
12
+ var renderContent_1 = require("../../utils/renderContent");
12
13
  var Loader_1 = require("../Loader");
13
14
  var constants_1 = require("./constants");
14
15
  exports.buttonVariant = [
@@ -31,19 +32,27 @@ exports.Button = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(
31
32
  props: inProps,
32
33
  name: 'Button',
33
34
  });
34
- var _a = props.as, Tag = _a === void 0 ? constants_1.BUTTON_DEFAULT_TAG : _a, _b = props.variant, variant = _b === void 0 ? constants_1.BUTTON_DEFAULT_VARIANT : _b, _c = props.color, color = _c === void 0 ? constants_1.BUTTON_DEFAULT_COLOR : _c, _d = props.size, size = _d === void 0 ? constants_1.BUTTON_DEFAULT_SIZE : _d, IconLeft = props.iconLeft, IconRight = props.iconRight, loading = props.loading, children = props.children, disabled = props.disabled, className = props.className, fullWidth = props.fullWidth, onClick = props.onClick, other = tslib_1.__rest(props, ["as", "variant", "color", "size", "iconLeft", "iconRight", "loading", "children", "disabled", "className", "fullWidth", "onClick"]);
35
+ var _a = props.as, Tag = _a === void 0 ? constants_1.BUTTON_DEFAULT_TAG : _a, _b = props.variant, variant = _b === void 0 ? constants_1.BUTTON_DEFAULT_VARIANT : _b, _c = props.color, color = _c === void 0 ? constants_1.BUTTON_DEFAULT_COLOR : _c, _d = props.size, size = _d === void 0 ? constants_1.BUTTON_DEFAULT_SIZE : _d, iconLeft = props.iconLeft, iconRight = props.iconRight, loading = props.loading, children = props.children, disabled = props.disabled, className = props.className, fullWidth = props.fullWidth, onClick = props.onClick, other = tslib_1.__rest(props, ["as", "variant", "color", "size", "iconLeft", "iconRight", "loading", "children", "disabled", "className", "fullWidth", "onClick"]);
35
36
  var iconSize = (0, getIconSizeToFormElement_1.getIconSizeToFormElement)(size);
36
37
  var handleClick = function (event) {
37
38
  if (onClick && !disabled && !loading) {
38
39
  onClick(event);
39
40
  }
40
41
  };
42
+ var renderIcon = function (content) {
43
+ return (0, renderContent_1.renderContent)({
44
+ content: content,
45
+ props: {
46
+ size: (0, getIconSizeToFormElement_1.getIconSizeToFormElement)(size),
47
+ },
48
+ });
49
+ };
41
50
  var isInteractionPrevented = disabled || loading;
42
51
  var childContent = (react_1.default.createElement(react_1.default.Fragment, null,
43
52
  react_1.default.createElement("span", { className: (0, exports.cnButton)('Label') },
44
- IconLeft && react_1.default.createElement(IconLeft, { size: iconSize }),
53
+ renderIcon(iconLeft),
45
54
  children,
46
- IconRight && react_1.default.createElement(IconRight, { size: iconSize })),
55
+ renderIcon(iconRight)),
47
56
  react_1.default.createElement(react_transition_group_1.CSSTransition, { in: loading, timeout: 120, classNames: (0, exports.cnButton)('Loader', { animation: true }), unmountOnExit: true },
48
57
  react_1.default.createElement(Loader_1.Loader, { size: iconSize, color: "var(--color-content-disabled)", className: (0, exports.cnButton)('Loader') }))));
49
58
  return (react_1.default.createElement(Tag, tslib_1.__assign({ disabled: isInteractionPrevented, onClick: handleClick, type: "button", className: (0, exports.cnButton)({
@@ -158,6 +158,24 @@
158
158
  .Grid_rowGap_8xl {
159
159
  grid-row-gap: var(--space-8xl);
160
160
  }
161
+ .Grid_align_start {
162
+ align-items: start;
163
+ }
164
+ .Grid_align_end {
165
+ align-items: end;
166
+ }
167
+ .Grid_align_center {
168
+ align-items: center;
169
+ }
170
+ .Grid_justify_start {
171
+ justify-items: start;
172
+ }
173
+ .Grid_justify_end {
174
+ justify-items: end;
175
+ }
176
+ .Grid_justify_center {
177
+ justify-items: center;
178
+ }
161
179
  @media (min-width: 0) {
162
180
  .Grid_gap_xs_0 {
163
181
  grid-gap: 0;
@@ -5,6 +5,10 @@ export declare const gridColsVariant: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1
5
5
  export type GridColsVariant = (typeof gridColsVariant)[number];
6
6
  export declare const gridGapVariant: readonly ["0", "xs", "s", "m", "l", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "8xl"];
7
7
  export type GridGapVariant = (typeof gridGapVariant)[number];
8
+ export declare const gridAlignVariant: readonly ["start", "end", "center"];
9
+ export declare const gridJustifyVariant: readonly ["start", "end", "center"];
10
+ export type GridAlignVariant = (typeof gridAlignVariant)[number];
11
+ export type GridJustifyVariant = (typeof gridJustifyVariant)[number];
8
12
  export declare const cnGrid: import("@bem-react/classname").ClassNameFormatter;
9
13
  export type GridProps = {
10
14
  /** Количество колонок в сетке */
@@ -15,6 +19,10 @@ export type GridProps = {
15
19
  colGap?: ResponsiveValue<GridGapVariant>;
16
20
  /** Отступы вокруг строки */
17
21
  rowGap?: ResponsiveValue<GridGapVariant>;
22
+ /** Выравнивание */
23
+ align?: GridAlignVariant;
24
+ /** Пространство между элементами */
25
+ justify?: GridJustifyVariant;
18
26
  /** Содержимое компонента */
19
27
  children?: ReactNode;
20
28
  /** Дополнительные СSS-классы */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Grid = exports.cnGrid = exports.gridGapVariant = exports.gridColsVariant = void 0;
3
+ exports.Grid = exports.cnGrid = exports.gridJustifyVariant = exports.gridAlignVariant = exports.gridGapVariant = exports.gridColsVariant = void 0;
4
4
  var tslib_1 = require("tslib");
5
5
  require("./Grid.css");
6
6
  var react_1 = tslib_1.__importDefault(require("react"));
@@ -26,13 +26,22 @@ exports.gridGapVariant = [
26
26
  '7xl',
27
27
  '8xl',
28
28
  ];
29
+ exports.gridAlignVariant = ['start', 'end', 'center'];
30
+ exports.gridJustifyVariant = ['start', 'end', 'center'];
29
31
  exports.cnGrid = (0, classname_1.cn)('Grid');
30
32
  exports.Grid = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
31
33
  var props = (0, useThemeProps_1.useThemeProps)({
32
34
  props: inProps,
33
35
  name: 'Grid',
34
36
  });
35
- var _a = props.cols, cols = _a === void 0 ? constants_1.GRID_DEFAULT_COLS : _a, _b = props.gap, gap = _b === void 0 ? constants_1.GRID_DEFAULT_GAP : _b, _c = props.as, Tag = _c === void 0 ? constants_1.GRID_DEFAULT_TAG : _c, colGap = props.colGap, rowGap = props.rowGap, children = props.children, className = props.className, other = tslib_1.__rest(props, ["cols", "gap", "as", "colGap", "rowGap", "children", "className"]);
36
- return (react_1.default.createElement(Tag, tslib_1.__assign({ className: (0, classnames_1.classnames)((0, exports.cnGrid)({}), (0, useGrid_1.useGenerateGridModsCn)(exports.cnGrid, { cols: cols, gap: gap, colGap: colGap, rowGap: rowGap }), className) }, other, { ref: ref }), children));
37
+ var _a = props.cols, cols = _a === void 0 ? constants_1.GRID_DEFAULT_COLS : _a, _b = props.gap, gap = _b === void 0 ? constants_1.GRID_DEFAULT_GAP : _b, _c = props.as, Tag = _c === void 0 ? constants_1.GRID_DEFAULT_TAG : _c, colGap = props.colGap, rowGap = props.rowGap, align = props.align, justify = props.justify, children = props.children, className = props.className, other = tslib_1.__rest(props, ["cols", "gap", "as", "colGap", "rowGap", "align", "justify", "children", "className"]);
38
+ return (react_1.default.createElement(Tag, tslib_1.__assign({ className: (0, classnames_1.classnames)((0, exports.cnGrid)({}), (0, useGrid_1.useGenerateGridModsCn)(exports.cnGrid, {
39
+ cols: cols,
40
+ gap: gap,
41
+ colGap: colGap,
42
+ rowGap: rowGap,
43
+ align: align,
44
+ justify: justify,
45
+ }), className) }, other, { ref: ref }), children));
37
46
  });
38
47
  exports.Grid.displayName = 'Grid';
@@ -1,7 +1,12 @@
1
- .TableRow_hover:hover {
1
+ .TableRow {
2
+ transition: background-color var(--transition-slow);
3
+ }
4
+
5
+ .TableRow_hover:hover {
2
6
  outline: none;
3
7
  background-color: var(--color-background-primary-hover);
4
8
  }
9
+
5
10
  .TableRow_hover:active,
6
11
  .TableRow_selected {
7
12
  outline: none;
@@ -29,7 +29,7 @@
29
29
  --color-content-primary-inverse: #fff;
30
30
  --color-content-accent-main: #a0a0a0;
31
31
  --color-accent-main: #181818;
32
- --color-content-accent-primary: #fff;
32
+ --color-content-accent-primary: #dcdcdc;
33
33
  --color-accent-primary: #282828;
34
34
  --color-content-accent-disabled: #606060;
35
35
  --color-background-main: #fff;
@@ -124,7 +124,7 @@
124
124
  --color-accent-tertiary-pressed: #686868;
125
125
  --color-accent-disabled: #484848;
126
126
  --color-accent-secondary-inverse: #808080;
127
- --color-accent-main-inverse: #fff;
127
+ --color-accent-main-inverse: #dcdcdc;
128
128
  --color-additional-a1: #0b6abe;
129
129
  --color-additional-a2: #1899e9;
130
130
  --color-additional-a3: #b3f1ff;
@@ -30,7 +30,7 @@
30
30
  --color-background-main-inverse: #f5f5f5;
31
31
  --color-content-accent-main: #a0a0a0;
32
32
  --color-accent-main: #181818;
33
- --color-content-accent-primary: #fff;
33
+ --color-content-accent-primary: #dcdcdc;
34
34
  --color-accent-primary: #282828;
35
35
  --color-content-accent-disabled: #606060;
36
36
  --color-background-main-hover: #2c2c2c;
@@ -29,7 +29,7 @@
29
29
  --color-content-primary-inverse: #fff;
30
30
  --color-content-accent-main: #a0a0a0;
31
31
  --color-accent-main: #181818;
32
- --color-content-accent-primary: #fff;
32
+ --color-content-accent-primary: #dcdcdc;
33
33
  --color-accent-primary: #282828;
34
34
  --color-content-accent-disabled: #606060;
35
35
  --color-background-main: #fff;
@@ -1,112 +1,115 @@
1
1
  .Avatar {
2
2
  --avatar-size: 100%;
3
+ --avatar-color: var(--color-content-action-on);
4
+ --avatar-bg-color: unset;
3
5
  display: flex;
4
6
  align-items: center;
5
7
  justify-content: center;
6
8
  flex-shrink: 0;
7
9
  inline-size: var(--avatar-size);
8
10
  block-size: var(--avatar-size);
11
+ color: var(--avatar-color);
12
+ background-color: var(--avatar-bg-color);
9
13
  font-family: Roboto, sans-serif;
10
14
  border-radius: 50%;
11
15
  position: relative;
12
16
  overflow: visible;
13
- color: var(--color-content-action-on);
14
17
  }
15
18
 
16
19
  .Avatar_color_a1 {
17
- background: var(--color-additional-a1);
20
+ --avatar-bg-color: var(--color-additional-a1);
18
21
  }
19
22
 
20
23
  .Avatar_color_a2 {
21
- background: var(--color-additional-a2);
24
+ --avatar-bg-color: var(--color-additional-a2);
22
25
  }
23
26
 
24
27
  .Avatar_color_a3 {
25
- background: var(--color-additional-a3);
28
+ --avatar-bg-color: var(--color-additional-a3);
26
29
  }
27
30
 
28
31
  .Avatar_color_b1 {
29
- background: var(--color-additional-b1);
32
+ --avatar-bg-color: var(--color-additional-b1);
30
33
  }
31
34
 
32
35
  .Avatar_color_b2 {
33
- background: var(--color-additional-b2);
36
+ --avatar-bg-color: var(--color-additional-b2);
34
37
  }
35
38
 
36
39
  .Avatar_color_b3 {
37
- background: var(--color-additional-b3);
40
+ --avatar-bg-color: var(--color-additional-b3);
38
41
  }
39
42
 
40
43
  .Avatar_color_c1 {
41
- background: var(--color-additional-c1);
44
+ --avatar-bg-color: var(--color-additional-c1);
42
45
  }
43
46
 
44
47
  .Avatar_color_c2 {
45
- background: var(--color-additional-c2);
48
+ --avatar-bg-color: var(--color-additional-c2);
46
49
  }
47
50
 
48
51
  .Avatar_color_c3 {
49
- background: var(--color-additional-c3);
52
+ --avatar-bg-color: var(--color-additional-c3);
50
53
  }
51
54
 
52
55
  .Avatar_color_d1 {
53
- background: var(--color-additional-d1);
56
+ --avatar-bg-color: var(--color-additional-d1);
54
57
  }
55
58
 
56
59
  .Avatar_color_d2 {
57
- background: var(--color-additional-d2);
60
+ --avatar-bg-color: var(--color-additional-d2);
58
61
  }
59
62
 
60
63
  .Avatar_color_d3 {
61
- background: var(--color-additional-d3);
64
+ --avatar-bg-color: var(--color-additional-d3);
62
65
  }
63
66
 
64
67
  .Avatar_color_e1 {
65
- background: var(--color-additional-e1);
68
+ --avatar-bg-color: var(--color-additional-e1);
66
69
  }
67
70
 
68
71
  .Avatar_color_e2 {
69
- background: var(--color-additional-e2);
72
+ --avatar-bg-color: var(--color-additional-e2);
70
73
  }
71
74
 
72
75
  .Avatar_color_e3 {
73
- background: var(--color-additional-e3);
76
+ --avatar-bg-color: var(--color-additional-e3);
74
77
  }
75
78
 
76
79
  .Avatar_color_f1 {
77
- background: var(--color-additional-f1);
80
+ --avatar-bg-color: var(--color-additional-f1);
78
81
  }
79
82
 
80
83
  .Avatar_color_f2 {
81
- background: var(--color-additional-f2);
84
+ --avatar-bg-color: var(--color-additional-f2);
82
85
  }
83
86
 
84
87
  .Avatar_color_f3 {
85
- background: var(--color-additional-f3);
88
+ --avatar-bg-color: var(--color-additional-f3);
86
89
  }
87
90
 
88
91
  .Avatar_color_g1 {
89
- background: var(--color-additional-g1);
92
+ --avatar-bg-color: var(--color-additional-g1);
90
93
  }
91
94
 
92
95
  .Avatar_color_g2 {
93
- background: var(--color-additional-g2);
96
+ --avatar-bg-color: var(--color-additional-g2);
94
97
  }
95
98
 
96
99
  .Avatar_color_g3 {
97
- background: var(--color-additional-g3);
100
+ --avatar-bg-color: var(--color-additional-g3);
98
101
  }
99
102
 
100
103
  .Avatar_color_h1 {
101
- background: var(--color-additional-h1);
104
+ --avatar-bg-color: var(--color-additional-h1);
102
105
  }
103
106
 
104
107
  .Avatar_color_h2 {
105
- background: var(--color-additional-h2);
108
+ --avatar-bg-color: var(--color-additional-h2);
106
109
  }
107
110
 
108
111
  .Avatar_color_h3 {
109
- background: var(--color-additional-h3);
112
+ --avatar-bg-color: var(--color-additional-h3);
110
113
  }
111
114
 
112
115
  .Avatar-Image {
@@ -1,6 +1,6 @@
1
1
  import './Avatar.css';
2
2
  import React from 'react';
3
- import type { ComponentPropsWithRef, ComponentRef } from 'react';
3
+ import type { ComponentPropsWithRef, ComponentRef, ReactNode } from 'react';
4
4
  import type { IndicatorProps } from '../Indicator';
5
5
  export declare const avatarSizeVariant: readonly ["4xs", "3xs", "2xs", "xs", "s", "m", "l", "xl"];
6
6
  export declare const avatarHueVariant: number[];
@@ -16,14 +16,14 @@ export type AvatarProps = {
16
16
  /** Url изображения */
17
17
  src?: string;
18
18
  /** Имя пользователя */
19
- name: string;
19
+ name?: string;
20
20
  /** Цветовой оттенок аватарки (при использовании без src) */
21
21
  hue?: AvatarHueVariant;
22
22
  /** Дополнительные СSS-классы */
23
23
  className?: string;
24
24
  /** Свойства компонента Indicator */
25
25
  indicatorProps?: IndicatorProps;
26
- children?: never;
26
+ children?: ReactNode;
27
27
  } & ComponentPropsWithRef<typeof avatarEl>;
28
28
  export declare const cnAvatar: import("@bem-react/classname").ClassNameFormatter;
29
29
  export declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -7,6 +7,7 @@ import { cn } from '../../utils/classname';
7
7
  import { Indicator } from '../Indicator';
8
8
  import { AVATAR_DEFAULT_HUE, AVATAR_DEFAULT_ONLINE, AVATAR_DEFAULT_SIZE, } from './constants';
9
9
  import { getHashNumber } from './get-hash-number';
10
+ import { matchSizeIndicatorToAvatar, getInitials } from './utils';
10
11
  export var avatarSizeVariant = [
11
12
  '4xs',
12
13
  '3xs',
@@ -20,38 +21,25 @@ export var avatarSizeVariant = [
20
21
  export var avatarHueVariant = [1, 2, 3];
21
22
  var avatarEl = 'div';
22
23
  export var cnAvatar = cn('Avatar');
23
- var getInitials = function (name) {
24
- var _a, _b, _c;
25
- var parts = name.split(' ');
26
- var initials;
27
- if (parts.length === 1) {
28
- initials = ((_a = parts[0]) === null || _a === void 0 ? void 0 : _a.charAt(0)) || '';
29
- }
30
- else {
31
- initials = ((_b = parts.shift()) !== null && _b !== void 0 ? _b : '').charAt(0) + ((_c = parts.pop()) !== null && _c !== void 0 ? _c : '').charAt(0);
32
- }
33
- return initials.toUpperCase();
34
- };
35
- var matchSizeIndicatorToAvatar = {
36
- '4xs': 'xs',
37
- '3xs': 'xs',
38
- '2xs': 'xs',
39
- xs: 's',
40
- s: 's',
41
- m: 's',
42
- l: 'm',
43
- xl: 'm',
44
- };
45
24
  export var Avatar = forwardRef(function (inProps, ref) {
46
25
  var props = useThemeProps({ props: inProps, name: 'Avatar' });
47
- var _a = props.size, size = _a === void 0 ? AVATAR_DEFAULT_SIZE : _a, _b = props.online, online = _b === void 0 ? AVATAR_DEFAULT_ONLINE : _b, _c = props.hue, hue = _c === void 0 ? AVATAR_DEFAULT_HUE : _c, src = props.src, name = props.name, className = props.className, indicatorProps = props.indicatorProps, other = __rest(props, ["size", "online", "hue", "src", "name", "className", "indicatorProps"]);
26
+ var _a = props.size, size = _a === void 0 ? AVATAR_DEFAULT_SIZE : _a, _b = props.online, online = _b === void 0 ? AVATAR_DEFAULT_ONLINE : _b, _c = props.hue, hue = _c === void 0 ? AVATAR_DEFAULT_HUE : _c, src = props.src, nameProp = props.name, className = props.className, indicatorProps = props.indicatorProps, children = props.children, other = __rest(props, ["size", "online", "hue", "src", "name", "className", "indicatorProps", "children"]);
27
+ var name = nameProp || '';
48
28
  var _d = __read(useBoolean(!!src), 2), showImage = _d[0], off = _d[1].off;
49
29
  var indicatorSize = matchSizeIndicatorToAvatar[size];
50
30
  var colorShades = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
51
31
  var color = "".concat(colorShades[getHashNumber(name, colorShades.length)]).concat(hue);
52
- var initials = getInitials(name);
32
+ var renderContent = function () {
33
+ if (children) {
34
+ return children;
35
+ }
36
+ if (src && showImage) {
37
+ return (React.createElement("img", { src: src, alt: name, className: cnAvatar('Image'), onError: off }));
38
+ }
39
+ return getInitials(name);
40
+ };
53
41
  return (React.createElement("div", __assign({ className: cnAvatar({ size: size, color: !showImage && color }, [className]) }, other, { ref: ref }),
54
- src && showImage ? (React.createElement("img", { src: src, alt: name, className: cnAvatar('Image'), onError: off })) : (initials),
55
- online && (React.createElement(Indicator, __assign({ variant: "success", size: indicatorSize, className: cnAvatar('Online'), border: true }, indicatorProps)))));
42
+ renderContent(),
43
+ online && (React.createElement(Indicator, __assign({ variant: "success", size: indicatorSize, border: true }, indicatorProps, { className: cnAvatar('Online', indicatorProps === null || indicatorProps === void 0 ? void 0 : indicatorProps.className) })))));
56
44
  });
57
45
  Avatar.displayName = 'Avatar';
@@ -0,0 +1,6 @@
1
+ import type { IndicatorSizeVariant } from '../Indicator';
2
+ import type { AvatarSizeVariant } from './index';
3
+ export declare const getInitials: (name: string) => string;
4
+ export declare const matchSizeIndicatorToAvatar: {
5
+ [key in AvatarSizeVariant]: IndicatorSizeVariant;
6
+ };
@@ -0,0 +1,22 @@
1
+ export var getInitials = function (name) {
2
+ var _a, _b, _c;
3
+ var parts = name.split(' ');
4
+ var initials;
5
+ if (parts.length === 1) {
6
+ initials = ((_a = parts[0]) === null || _a === void 0 ? void 0 : _a.charAt(0)) || '';
7
+ }
8
+ else {
9
+ initials = ((_b = parts.shift()) !== null && _b !== void 0 ? _b : '').charAt(0) + ((_c = parts.pop()) !== null && _c !== void 0 ? _c : '').charAt(0);
10
+ }
11
+ return initials.toUpperCase();
12
+ };
13
+ export var matchSizeIndicatorToAvatar = {
14
+ '4xs': 'xs',
15
+ '3xs': 'xs',
16
+ '2xs': 'xs',
17
+ xs: 's',
18
+ s: 's',
19
+ m: 's',
20
+ l: 'm',
21
+ xl: 'm',
22
+ };
@@ -1,17 +1,17 @@
1
1
  import './Button.css';
2
- import React from 'react';
3
2
  import type { ReactNode, ElementType } from 'react';
4
3
  import type { IconProps, IconSize } from '@ozen-ui/icons';
5
4
  import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant';
6
5
  import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
6
+ import type { RenderContentType } from '../../utils/renderContent';
7
7
  import { BUTTON_DEFAULT_TAG } from './constants';
8
8
  export declare const buttonVariant: readonly ["contained", "outlined", "ghost", "function"];
9
9
  export declare const buttonColorVariant: readonly ["primary", "secondary", "warning", "error"];
10
10
  export type ButtonVariant = (typeof buttonVariant)[number];
11
11
  export type ButtonColorVariant = (typeof buttonColorVariant)[number];
12
- export type ButtonIconComponent = React.FC<IconProps & {
12
+ export type ButtonIcon = RenderContentType<IconProps & {
13
13
  size?: IconSize;
14
- }>;
14
+ }>['content'];
15
15
  type ButtonBaseProps = {
16
16
  /**
17
17
  * Вариант отображения кнопки
@@ -37,9 +37,9 @@ type ButtonBaseProps = {
37
37
  /** Дополнительные CSS-классы */
38
38
  className?: string;
39
39
  /** Иконка слева */
40
- iconLeft?: ButtonIconComponent;
40
+ iconLeft?: ButtonIcon;
41
41
  /** Иконка справа */
42
- iconRight?: ButtonIconComponent;
42
+ iconRight?: ButtonIcon;
43
43
  /** Если {true} растягивает кнопку на всю ширину родительского контейнера */
44
44
  fullWidth?: boolean;
45
45
  };
@@ -6,6 +6,7 @@ import { useThemeProps } from '../../hooks/useThemeProps';
6
6
  import { cn } from '../../utils/classname';
7
7
  import { getIconSizeToFormElement } from '../../utils/getIconSizeToFormElement';
8
8
  import { polymorphicComponentWithRef } from '../../utils/polymorphicComponentWithRef';
9
+ import { renderContent } from '../../utils/renderContent';
9
10
  import { Loader } from '../Loader';
10
11
  import { BUTTON_DEFAULT_SIZE, BUTTON_DEFAULT_VARIANT, BUTTON_DEFAULT_COLOR, BUTTON_DEFAULT_TAG, } from './constants';
11
12
  export var buttonVariant = [
@@ -28,19 +29,27 @@ export var Button = polymorphicComponentWithRef(function (inProps, ref) {
28
29
  props: inProps,
29
30
  name: 'Button',
30
31
  });
31
- var _a = props.as, Tag = _a === void 0 ? BUTTON_DEFAULT_TAG : _a, _b = props.variant, variant = _b === void 0 ? BUTTON_DEFAULT_VARIANT : _b, _c = props.color, color = _c === void 0 ? BUTTON_DEFAULT_COLOR : _c, _d = props.size, size = _d === void 0 ? BUTTON_DEFAULT_SIZE : _d, IconLeft = props.iconLeft, IconRight = props.iconRight, loading = props.loading, children = props.children, disabled = props.disabled, className = props.className, fullWidth = props.fullWidth, onClick = props.onClick, other = __rest(props, ["as", "variant", "color", "size", "iconLeft", "iconRight", "loading", "children", "disabled", "className", "fullWidth", "onClick"]);
32
+ var _a = props.as, Tag = _a === void 0 ? BUTTON_DEFAULT_TAG : _a, _b = props.variant, variant = _b === void 0 ? BUTTON_DEFAULT_VARIANT : _b, _c = props.color, color = _c === void 0 ? BUTTON_DEFAULT_COLOR : _c, _d = props.size, size = _d === void 0 ? BUTTON_DEFAULT_SIZE : _d, iconLeft = props.iconLeft, iconRight = props.iconRight, loading = props.loading, children = props.children, disabled = props.disabled, className = props.className, fullWidth = props.fullWidth, onClick = props.onClick, other = __rest(props, ["as", "variant", "color", "size", "iconLeft", "iconRight", "loading", "children", "disabled", "className", "fullWidth", "onClick"]);
32
33
  var iconSize = getIconSizeToFormElement(size);
33
34
  var handleClick = function (event) {
34
35
  if (onClick && !disabled && !loading) {
35
36
  onClick(event);
36
37
  }
37
38
  };
39
+ var renderIcon = function (content) {
40
+ return renderContent({
41
+ content: content,
42
+ props: {
43
+ size: getIconSizeToFormElement(size),
44
+ },
45
+ });
46
+ };
38
47
  var isInteractionPrevented = disabled || loading;
39
48
  var childContent = (React.createElement(React.Fragment, null,
40
49
  React.createElement("span", { className: cnButton('Label') },
41
- IconLeft && React.createElement(IconLeft, { size: iconSize }),
50
+ renderIcon(iconLeft),
42
51
  children,
43
- IconRight && React.createElement(IconRight, { size: iconSize })),
52
+ renderIcon(iconRight)),
44
53
  React.createElement(CSSTransition, { in: loading, timeout: 120, classNames: cnButton('Loader', { animation: true }), unmountOnExit: true },
45
54
  React.createElement(Loader, { size: iconSize, color: "var(--color-content-disabled)", className: cnButton('Loader') }))));
46
55
  return (React.createElement(Tag, __assign({ disabled: isInteractionPrevented, onClick: handleClick, type: "button", className: cnButton({
@@ -158,6 +158,24 @@
158
158
  .Grid_rowGap_8xl {
159
159
  grid-row-gap: var(--space-8xl);
160
160
  }
161
+ .Grid_align_start {
162
+ align-items: start;
163
+ }
164
+ .Grid_align_end {
165
+ align-items: end;
166
+ }
167
+ .Grid_align_center {
168
+ align-items: center;
169
+ }
170
+ .Grid_justify_start {
171
+ justify-items: start;
172
+ }
173
+ .Grid_justify_end {
174
+ justify-items: end;
175
+ }
176
+ .Grid_justify_center {
177
+ justify-items: center;
178
+ }
161
179
  @media (min-width: 0) {
162
180
  .Grid_gap_xs_0 {
163
181
  grid-gap: 0;
@@ -5,6 +5,10 @@ export declare const gridColsVariant: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1
5
5
  export type GridColsVariant = (typeof gridColsVariant)[number];
6
6
  export declare const gridGapVariant: readonly ["0", "xs", "s", "m", "l", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "8xl"];
7
7
  export type GridGapVariant = (typeof gridGapVariant)[number];
8
+ export declare const gridAlignVariant: readonly ["start", "end", "center"];
9
+ export declare const gridJustifyVariant: readonly ["start", "end", "center"];
10
+ export type GridAlignVariant = (typeof gridAlignVariant)[number];
11
+ export type GridJustifyVariant = (typeof gridJustifyVariant)[number];
8
12
  export declare const cnGrid: import("@bem-react/classname").ClassNameFormatter;
9
13
  export type GridProps = {
10
14
  /** Количество колонок в сетке */
@@ -15,6 +19,10 @@ export type GridProps = {
15
19
  colGap?: ResponsiveValue<GridGapVariant>;
16
20
  /** Отступы вокруг строки */
17
21
  rowGap?: ResponsiveValue<GridGapVariant>;
22
+ /** Выравнивание */
23
+ align?: GridAlignVariant;
24
+ /** Пространство между элементами */
25
+ justify?: GridJustifyVariant;
18
26
  /** Содержимое компонента */
19
27
  children?: ReactNode;
20
28
  /** Дополнительные СSS-классы */
@@ -23,13 +23,22 @@ export var gridGapVariant = [
23
23
  '7xl',
24
24
  '8xl',
25
25
  ];
26
+ export var gridAlignVariant = ['start', 'end', 'center'];
27
+ export var gridJustifyVariant = ['start', 'end', 'center'];
26
28
  export var cnGrid = cn('Grid');
27
29
  export var Grid = polymorphicComponentWithRef(function (inProps, ref) {
28
30
  var props = useThemeProps({
29
31
  props: inProps,
30
32
  name: 'Grid',
31
33
  });
32
- var _a = props.cols, cols = _a === void 0 ? GRID_DEFAULT_COLS : _a, _b = props.gap, gap = _b === void 0 ? GRID_DEFAULT_GAP : _b, _c = props.as, Tag = _c === void 0 ? GRID_DEFAULT_TAG : _c, colGap = props.colGap, rowGap = props.rowGap, children = props.children, className = props.className, other = __rest(props, ["cols", "gap", "as", "colGap", "rowGap", "children", "className"]);
33
- return (React.createElement(Tag, __assign({ className: classnames(cnGrid({}), useGenerateGridModsCn(cnGrid, { cols: cols, gap: gap, colGap: colGap, rowGap: rowGap }), className) }, other, { ref: ref }), children));
34
+ var _a = props.cols, cols = _a === void 0 ? GRID_DEFAULT_COLS : _a, _b = props.gap, gap = _b === void 0 ? GRID_DEFAULT_GAP : _b, _c = props.as, Tag = _c === void 0 ? GRID_DEFAULT_TAG : _c, colGap = props.colGap, rowGap = props.rowGap, align = props.align, justify = props.justify, children = props.children, className = props.className, other = __rest(props, ["cols", "gap", "as", "colGap", "rowGap", "align", "justify", "children", "className"]);
35
+ return (React.createElement(Tag, __assign({ className: classnames(cnGrid({}), useGenerateGridModsCn(cnGrid, {
36
+ cols: cols,
37
+ gap: gap,
38
+ colGap: colGap,
39
+ rowGap: rowGap,
40
+ align: align,
41
+ justify: justify,
42
+ }), className) }, other, { ref: ref }), children));
34
43
  });
35
44
  Grid.displayName = 'Grid';
@@ -1,7 +1,12 @@
1
- .TableRow_hover:hover {
1
+ .TableRow {
2
+ transition: background-color var(--transition-slow);
3
+ }
4
+
5
+ .TableRow_hover:hover {
2
6
  outline: none;
3
7
  background-color: var(--color-background-primary-hover);
4
8
  }
9
+
5
10
  .TableRow_hover:active,
6
11
  .TableRow_selected {
7
12
  outline: none;
@@ -29,7 +29,7 @@
29
29
  --color-content-primary-inverse: #fff;
30
30
  --color-content-accent-main: #a0a0a0;
31
31
  --color-accent-main: #181818;
32
- --color-content-accent-primary: #fff;
32
+ --color-content-accent-primary: #dcdcdc;
33
33
  --color-accent-primary: #282828;
34
34
  --color-content-accent-disabled: #606060;
35
35
  --color-background-main: #fff;
@@ -124,7 +124,7 @@
124
124
  --color-accent-tertiary-pressed: #686868;
125
125
  --color-accent-disabled: #484848;
126
126
  --color-accent-secondary-inverse: #808080;
127
- --color-accent-main-inverse: #fff;
127
+ --color-accent-main-inverse: #dcdcdc;
128
128
  --color-additional-a1: #0b6abe;
129
129
  --color-additional-a2: #1899e9;
130
130
  --color-additional-a3: #b3f1ff;
@@ -30,7 +30,7 @@
30
30
  --color-background-main-inverse: #f5f5f5;
31
31
  --color-content-accent-main: #a0a0a0;
32
32
  --color-accent-main: #181818;
33
- --color-content-accent-primary: #fff;
33
+ --color-content-accent-primary: #dcdcdc;
34
34
  --color-accent-primary: #282828;
35
35
  --color-content-accent-disabled: #606060;
36
36
  --color-background-main-hover: #2c2c2c;
@@ -29,7 +29,7 @@
29
29
  --color-content-primary-inverse: #fff;
30
30
  --color-content-accent-main: #a0a0a0;
31
31
  --color-accent-main: #181818;
32
- --color-content-accent-primary: #fff;
32
+ --color-content-accent-primary: #dcdcdc;
33
33
  --color-accent-primary: #282828;
34
34
  --color-content-accent-disabled: #606060;
35
35
  --color-background-main: #fff;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ozen-ui/kit",
3
- "version": "0.19.0",
3
+ "version": "0.20.0",
4
4
  "description": "React component library",
5
5
  "files": [
6
6
  "*"