armtek-uikit-react 1.0.39 → 1.0.42
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/assets/Alert.scss +1 -1
- package/assets/Button.scss +6 -0
- package/assets/Chip.scss +136 -7
- package/assets/StepItemIcon.scss +1 -0
- package/assets/variables.scss +7 -3
- package/package.json +1 -1
- package/ui/Alert/Alert.js +4 -1
- package/ui/Button/Button.d.ts +1 -0
- package/ui/Button/Button.js +1 -0
- package/ui/ButtonIcon/ButtonIcon.js +1 -0
- package/ui/Chip/Chip.d.ts +3 -2
- package/ui/Chip/Chip.js +7 -2
package/assets/Alert.scss
CHANGED
package/assets/Button.scss
CHANGED
package/assets/Chip.scss
CHANGED
|
@@ -5,8 +5,14 @@
|
|
|
5
5
|
padding: calc($size-step / 1.5) calc($size-step * 1.5);
|
|
6
6
|
border-radius: 20px;
|
|
7
7
|
font-size: 13px;
|
|
8
|
-
display: inline-
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.chip_square{
|
|
13
|
+
border-radius: $radius;
|
|
9
14
|
}
|
|
15
|
+
|
|
10
16
|
.chip__text{
|
|
11
17
|
line-height: 1.15;
|
|
12
18
|
}
|
|
@@ -45,8 +51,12 @@
|
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
.chip_small{
|
|
54
|
+
height: 24px;
|
|
48
55
|
padding: 4px $size-step;
|
|
49
56
|
}
|
|
57
|
+
.chip_medium{
|
|
58
|
+
height: 32px;
|
|
59
|
+
}
|
|
50
60
|
.chip__icon_small{
|
|
51
61
|
font-size: 18px;
|
|
52
62
|
margin-left: 0;
|
|
@@ -61,12 +71,7 @@
|
|
|
61
71
|
border: 1px solid $color-gray-400;
|
|
62
72
|
}
|
|
63
73
|
|
|
64
|
-
|
|
65
|
-
button.chip{
|
|
66
|
-
&:hover{
|
|
67
|
-
background: $color-gray-300;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
74
|
+
|
|
70
75
|
a.chip_outlined,
|
|
71
76
|
button.chip_outlined{
|
|
72
77
|
&:hover{
|
|
@@ -77,17 +82,136 @@ button.chip_outlined{
|
|
|
77
82
|
.chip_secondary{
|
|
78
83
|
color: #fff;
|
|
79
84
|
background-color: $color-secondary;
|
|
85
|
+
&.chip_outlined{
|
|
86
|
+
border-color: $color-secondary;
|
|
87
|
+
background: transparent;
|
|
88
|
+
color: $color-secondary;
|
|
89
|
+
}
|
|
80
90
|
}
|
|
81
91
|
a.chip_secondary,
|
|
82
92
|
button.chip_secondary{
|
|
83
93
|
&:hover{
|
|
84
94
|
background-color: $color-secondary-dark;
|
|
85
95
|
}
|
|
96
|
+
&.chip_outlined:hover{
|
|
97
|
+
background-color: $color-orange-100;
|
|
98
|
+
}
|
|
86
99
|
}
|
|
87
100
|
|
|
101
|
+
.chip_success{
|
|
102
|
+
background-color: $color-success;
|
|
103
|
+
&.chip_outlined{
|
|
104
|
+
border-color: $color-success;
|
|
105
|
+
background: transparent;
|
|
106
|
+
color: $color-success;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
a.chip_success,
|
|
110
|
+
button.chip_success{
|
|
111
|
+
&:hover{
|
|
112
|
+
background-color: $color-success-dark;
|
|
113
|
+
}
|
|
114
|
+
&.chip_outlined:hover{
|
|
115
|
+
background-color: $color-green-100;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
.chip_error{
|
|
122
|
+
background-color: $color-error;
|
|
123
|
+
&.chip_outlined{
|
|
124
|
+
border-color: $color-error;
|
|
125
|
+
background: transparent;
|
|
126
|
+
color: $color-error;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
a.chip_error,
|
|
130
|
+
button.chip_error{
|
|
131
|
+
&:hover{
|
|
132
|
+
background-color: $color-error-dark;
|
|
133
|
+
}
|
|
134
|
+
&.chip_outlined:hover{
|
|
135
|
+
background: $color-red-100;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.chip_warning{
|
|
140
|
+
background-color: $color-warning;
|
|
141
|
+
&.chip_outlined{
|
|
142
|
+
border-color: $color-warning;
|
|
143
|
+
background: transparent;
|
|
144
|
+
color: $color-warning;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
a.chip_warning,
|
|
148
|
+
button.chip_warning{
|
|
149
|
+
&:hover{
|
|
150
|
+
background-color: $color-warning-dark;
|
|
151
|
+
}
|
|
152
|
+
&.chip_outlined:hover{
|
|
153
|
+
background: $color-orange-100;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.chip_info{
|
|
158
|
+
color: #fff;
|
|
159
|
+
background-color: $color-info;
|
|
160
|
+
&.chip_outlined{
|
|
161
|
+
border-color: $color-info;
|
|
162
|
+
background: transparent;
|
|
163
|
+
color: $color-info;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
a.chip_info,
|
|
167
|
+
button.chip_info{
|
|
168
|
+
&:hover{
|
|
169
|
+
background-color: $color-info-dark;
|
|
170
|
+
}
|
|
171
|
+
&.chip_outlined:hover{
|
|
172
|
+
background: $color-blue-100;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.chip_black{
|
|
177
|
+
color: #fff;
|
|
178
|
+
background-color: $color-neutral;
|
|
179
|
+
&.chip_outlined{
|
|
180
|
+
border-color: $color-neutral;
|
|
181
|
+
background: transparent;
|
|
182
|
+
color: $color-neutral;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
a.chip_black,
|
|
186
|
+
button.chip_black{
|
|
187
|
+
&:hover{
|
|
188
|
+
background-color: $color-neutral-dark;
|
|
189
|
+
}
|
|
190
|
+
&.chip_outlined:hover{
|
|
191
|
+
background: $color-gray-100;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.chip_white{
|
|
196
|
+
background: #fff;
|
|
197
|
+
}
|
|
198
|
+
a.chip_white,
|
|
199
|
+
button.chip_white{
|
|
200
|
+
&:hover{
|
|
201
|
+
background-color: $color-gray-100;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
88
207
|
.chip_primary{
|
|
89
208
|
color: #fff;
|
|
90
209
|
background-color: $color-primary;
|
|
210
|
+
&.chip_outlined{
|
|
211
|
+
border-color: $color-primary;
|
|
212
|
+
background: transparent;
|
|
213
|
+
color: $color-primary;
|
|
214
|
+
}
|
|
91
215
|
}
|
|
92
216
|
|
|
93
217
|
a.chip_primary,
|
|
@@ -95,7 +219,12 @@ button.chip_primary{
|
|
|
95
219
|
&:hover{
|
|
96
220
|
background-color: $color-primary-dark;
|
|
97
221
|
}
|
|
222
|
+
&.chip_outlined:hover{
|
|
223
|
+
background: $color-blue-100;
|
|
224
|
+
}
|
|
98
225
|
}
|
|
226
|
+
|
|
227
|
+
|
|
99
228
|
.chip_disabled{
|
|
100
229
|
pointer-events: none;
|
|
101
230
|
opacity: 0.5;
|
package/assets/StepItemIcon.scss
CHANGED
package/assets/variables.scss
CHANGED
|
@@ -10,9 +10,10 @@ $radius: 4px;
|
|
|
10
10
|
$color-primary: #0D46FF;
|
|
11
11
|
$color-primary-dark: #0B3CD9;
|
|
12
12
|
$color-primary-light: #0B3CD9;
|
|
13
|
-
$color-blue-800: #406DFF;
|
|
14
13
|
$color-blue-A100: #D9E2FF;
|
|
15
14
|
$color-blue-50: #F2F5FF;
|
|
15
|
+
$color-blue-100: #DFF0FF;
|
|
16
|
+
$color-blue-800: #406DFF;
|
|
16
17
|
|
|
17
18
|
$color-info: #0D46FF;
|
|
18
19
|
$color-info-dark: #0B3CD9;
|
|
@@ -40,7 +41,9 @@ $color-gray-200: #DFE2E6;
|
|
|
40
41
|
$color-gray-100: #E9ECEF;
|
|
41
42
|
$color-gray-50: #F8F9FA;
|
|
42
43
|
|
|
43
|
-
$color-
|
|
44
|
+
$color-green-50: #F2FFFB;
|
|
45
|
+
$color-green-100: #DEFDEE;
|
|
46
|
+
$color-green-300: #ACF7D6;
|
|
44
47
|
|
|
45
48
|
$color-success: #0BD998;
|
|
46
49
|
$color-success-dark: #08996B;
|
|
@@ -50,6 +53,7 @@ $color-warning: #FFC61A;
|
|
|
50
53
|
$color-warning-dark: #F7B519;
|
|
51
54
|
|
|
52
55
|
$color-red-50: #FFF0F1;
|
|
56
|
+
$color-red-100: #FCE1E1;
|
|
53
57
|
|
|
54
58
|
$box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.1);
|
|
55
59
|
|
|
@@ -95,7 +99,7 @@ $box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.1);
|
|
|
95
99
|
--color-gray-100: #E9ECEF;
|
|
96
100
|
--color-gray-50: #F8F9FA;
|
|
97
101
|
|
|
98
|
-
--color-
|
|
102
|
+
--color-green-50: #F2FFFB;
|
|
99
103
|
|
|
100
104
|
--color-success: #0BD998;
|
|
101
105
|
--color-success-dark: #08996B;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"armtek-uikit-react","version":"1.0.
|
|
1
|
+
{"name":"armtek-uikit-react","version":"1.0.42","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*","clsx":"^2.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
|
package/ui/Alert/Alert.js
CHANGED
|
@@ -38,7 +38,10 @@ const Alert = props => {
|
|
|
38
38
|
color: 'neutral',
|
|
39
39
|
variant: 'transparent',
|
|
40
40
|
className: clsx(css.alert__close, 'material_icon'),
|
|
41
|
-
children: "
|
|
41
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
42
|
+
className: 'material_icon',
|
|
43
|
+
children: "close"
|
|
44
|
+
})
|
|
42
45
|
})]
|
|
43
46
|
})
|
|
44
47
|
});
|
package/ui/Button/Button.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ type OwnProps<T extends ElementType = ElementType> = {
|
|
|
9
9
|
endAdornment?: string | ReactNode;
|
|
10
10
|
group?: 'inline' | 'column';
|
|
11
11
|
radius?: boolean;
|
|
12
|
+
icon?: boolean;
|
|
12
13
|
as?: T;
|
|
13
14
|
};
|
|
14
15
|
export type ButtonProps<T extends ElementType = ElementType<HTMLAttributes<HTMLButtonElement>>> = OwnProps<T> & Omit<ComponentPropsWithoutRef<T>, keyof OwnProps>;
|
package/ui/Button/Button.js
CHANGED
|
@@ -34,6 +34,7 @@ const Button = props => {
|
|
|
34
34
|
className: clsx(css.button__adornment, css.button__adornment_start),
|
|
35
35
|
children: startAdornment
|
|
36
36
|
}), /*#__PURE__*/_jsx("div", {
|
|
37
|
+
className: css.button__iconWrapper,
|
|
37
38
|
children: children
|
|
38
39
|
}), endAdornment && /*#__PURE__*/_jsx("div", {
|
|
39
40
|
className: clsx(css.button__adornment, css.button__adornment_end),
|
package/ui/Chip/Chip.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ElementType, MouseEvent, HTMLAttributes } from 'react';
|
|
2
|
-
import { ColorType, SizeType, VariantType } from '../../types/theme';
|
|
2
|
+
import { ColorStatusType, ColorThemeType, ColorType, SizeType, VariantType, ShapeType } from '../../types/theme';
|
|
3
3
|
export type ChipProps<T extends ElementType = ElementType<HTMLAttributes<HTMLSpanElement>>> = Omit<ComponentPropsWithoutRef<T>, 'color'> & {
|
|
4
4
|
size?: Exclude<SizeType, 'large' | 'extraLarge'>;
|
|
5
|
-
color?: ColorType;
|
|
5
|
+
color?: ColorType | ColorThemeType | ColorStatusType;
|
|
6
6
|
text?: string;
|
|
7
7
|
onClose?: (e: MouseEvent) => void;
|
|
8
8
|
icon?: string;
|
|
9
9
|
variant?: Exclude<VariantType, 'transparent'>;
|
|
10
|
+
shape?: ShapeType;
|
|
10
11
|
as?: T;
|
|
11
12
|
disabled?: boolean;
|
|
12
13
|
className?: string;
|
package/ui/Chip/Chip.js
CHANGED
|
@@ -13,6 +13,7 @@ function Chip(props) {
|
|
|
13
13
|
text,
|
|
14
14
|
icon,
|
|
15
15
|
onClose,
|
|
16
|
+
shape = 'circle',
|
|
16
17
|
as,
|
|
17
18
|
variant,
|
|
18
19
|
color,
|
|
@@ -21,11 +22,12 @@ function Chip(props) {
|
|
|
21
22
|
disabled
|
|
22
23
|
} = props;
|
|
23
24
|
let Component = as || 'span';
|
|
25
|
+
console.log(onClose);
|
|
24
26
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
25
27
|
children: /*#__PURE__*/_jsx(Component, {
|
|
26
28
|
className: clsx('Arm-chip', className, {
|
|
27
29
|
[css.chip_disabled]: !!disabled
|
|
28
|
-
}, css.chip, css['chip_' + size], css['chip_' + variant], css['chip_' + color]),
|
|
30
|
+
}, css.chip, css['chip_' + size], css['chip_' + variant], css['chip_' + color], css['chip_' + shape]),
|
|
29
31
|
children: /*#__PURE__*/_jsxs("span", {
|
|
30
32
|
className: css.chip__inner,
|
|
31
33
|
children: [icon && /*#__PURE__*/_jsx("span", {
|
|
@@ -39,7 +41,10 @@ function Chip(props) {
|
|
|
39
41
|
[css.chip__close_disabled]: !!disabled
|
|
40
42
|
}, css['chip__close_' + size], css['chip__close_' + color], css.chip__close),
|
|
41
43
|
onClick: onClose,
|
|
42
|
-
children: "
|
|
44
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
45
|
+
className: 'material_icon',
|
|
46
|
+
children: "cancel"
|
|
47
|
+
})
|
|
43
48
|
})]
|
|
44
49
|
})
|
|
45
50
|
})
|