@true-engineering/true-react-common-ui-kit 3.58.0 → 3.60.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.60.0",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -35,11 +35,12 @@
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsc && vite build",
38
+ "build:pr": "vite build",
38
39
  "lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
39
40
  "format": "prettier --write \"**/*.{js,jsx,css,json,ts,tsx}\"",
40
41
  "format:check": "prettier --check \"**/*.{js,jsx,css,json,ts,tsx}\"",
41
- "full-check": "yarn format:check && yarn lint",
42
- "types-check": "tsc --noEmit"
42
+ "types-check": "tsc --noEmit",
43
+ "full-check": "yarn types-check && yarn format:check && yarn lint"
43
44
  },
44
45
  "dependencies": {
45
46
  "@floating-ui/react": "0.26.12",
@@ -2,6 +2,7 @@ import { createThemedStyles, ITweakStyles } from '../../theme';
2
2
 
3
3
  export const useStyles = createThemedStyles('Checkbox', {
4
4
  root: {
5
+ position: 'relative',
5
6
  cursor: 'pointer',
6
7
  display: 'flex',
7
8
  alignItems: 'center',
@@ -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;