@true-engineering/true-react-common-ui-kit 3.58.0 → 3.59.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-engineering/true-react-common-ui-kit",
3
- "version": "3.58.0",
3
+ "version": "3.59.0",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -1,9 +1,5 @@
1
1
  import { ITweakStyles, animations, createThemedStyles } from '../../theme';
2
2
 
3
- const BUTTON_SIZE_S = 24;
4
- const BUTTON_SIZE_M = 32;
5
- const ICON_SIZE = 20;
6
-
7
3
  export const useStyles = createThemedStyles('IconButton', {
8
4
  root: {
9
5
  display: 'flex',
@@ -13,7 +9,7 @@ export const useStyles = createThemedStyles('IconButton', {
13
9
  outline: 'none',
14
10
  boxSizing: 'border-box',
15
11
  transition: animations.defaultTransition,
16
- transitionProperty: 'background-color, color, border-color',
12
+ transitionProperty: 'background-color, color, border-color, opacity, visibility',
17
13
  border: 'none',
18
14
  position: 'relative',
19
15
  boxShadow: 'none',
@@ -29,6 +25,10 @@ export const useStyles = createThemedStyles('IconButton', {
29
25
  '&:active': {
30
26
  extend: 'active',
31
27
  },
28
+
29
+ width: 'var(--icon-button-size)',
30
+ height: 'var(--icon-button-size)',
31
+ '--icon-button-icon-size': '20px',
32
32
  },
33
33
 
34
34
  'cancel-light': {},
@@ -55,8 +55,8 @@ export const useStyles = createThemedStyles('IconButton', {
55
55
  icon: {
56
56
  display: 'flex',
57
57
  alignItems: 'center',
58
- width: ICON_SIZE,
59
- height: ICON_SIZE,
58
+ width: 'var(--icon-button-icon-size)',
59
+ height: 'var(--icon-button-icon-size)',
60
60
  },
61
61
 
62
62
  loader: {
@@ -66,18 +66,20 @@ export const useStyles = createThemedStyles('IconButton', {
66
66
  top: '50%',
67
67
  transform: 'translate(-50%, -50%)',
68
68
 
69
- width: ICON_SIZE,
70
- height: ICON_SIZE,
69
+ width: 'var(--icon-button-icon-size)',
70
+ height: 'var(--icon-button-icon-size)',
71
71
  },
72
72
 
73
73
  s: {
74
- width: BUTTON_SIZE_S,
75
- height: BUTTON_SIZE_S,
74
+ '--icon-button-size': '24px',
76
75
  },
77
76
 
78
77
  m: {
79
- width: BUTTON_SIZE_M,
80
- height: BUTTON_SIZE_M,
78
+ '--icon-button-size': '32px',
79
+ },
80
+
81
+ l: {
82
+ '--icon-button-size': '40px',
81
83
  },
82
84
  });
83
85
 
@@ -1,3 +1,3 @@
1
- export const ICON_BUTTON_SIZES = ['s', 'm'] as const;
1
+ export const ICON_BUTTON_SIZES = ['s', 'm', 'l'] as const;
2
2
 
3
3
  export const ICON_BUTTON_VIEWS = ['cancel', 'cancel-light', 'main', 'custom'] as const;