@megafon/ui-core 2.1.0 → 2.1.4
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/CHANGELOG.md +47 -0
- package/dist/es/colors/ColorItem/ColorItem.css +52 -0
- package/dist/es/colors/ColorItem/ColorItem.d.ts +12 -0
- package/dist/es/colors/ColorItem/ColorItem.js +35 -0
- package/dist/es/colors/Colors.css +203 -32
- package/dist/es/colors/Colors.js +243 -35
- package/dist/es/colors/colorsData.d.ts +20 -7
- package/dist/es/colors/colorsData.js +213 -61
- package/dist/es/components/Banner/BannerDot.css +2 -2
- package/dist/es/components/Button/Button.css +11 -11
- package/dist/es/components/Carousel/Carousel.css +1 -1
- package/dist/es/components/Carousel/Carousel.js +6 -1
- package/dist/es/components/ContentArea/ContentArea.css +4 -0
- package/dist/es/components/ContentArea/ContentArea.d.ts +6 -2
- package/dist/es/components/ContentArea/ContentArea.js +39 -6
- package/dist/es/components/Counter/Counter.css +3 -3
- package/dist/es/components/NavArrow/NavArrow.css +1 -1
- package/dist/es/components/Notification/Notification.css +10 -19
- package/dist/es/components/Paragraph/Paragraph.css +2 -0
- package/dist/es/components/Paragraph/Paragraph.d.ts +17 -1
- package/dist/es/components/Paragraph/Paragraph.js +40 -1
- package/dist/es/components/Tabs/Tabs.css +2 -2
- package/dist/es/components/Tabs/Tabs.js +41 -32
- package/dist/lib/colors/ColorItem/ColorItem.css +52 -0
- package/dist/lib/colors/ColorItem/ColorItem.d.ts +12 -0
- package/dist/lib/colors/ColorItem/ColorItem.js +50 -0
- package/dist/lib/colors/Colors.css +203 -32
- package/dist/lib/colors/Colors.js +250 -36
- package/dist/lib/colors/colorsData.d.ts +20 -7
- package/dist/lib/colors/colorsData.js +213 -61
- package/dist/lib/components/Banner/BannerDot.css +2 -2
- package/dist/lib/components/Button/Button.css +11 -11
- package/dist/lib/components/Carousel/Carousel.css +1 -1
- package/dist/lib/components/Carousel/Carousel.js +6 -1
- package/dist/lib/components/ContentArea/ContentArea.css +4 -0
- package/dist/lib/components/ContentArea/ContentArea.d.ts +6 -2
- package/dist/lib/components/ContentArea/ContentArea.js +42 -6
- package/dist/lib/components/Counter/Counter.css +3 -3
- package/dist/lib/components/NavArrow/NavArrow.css +1 -1
- package/dist/lib/components/Notification/Notification.css +10 -19
- package/dist/lib/components/Paragraph/Paragraph.css +2 -0
- package/dist/lib/components/Paragraph/Paragraph.d.ts +17 -1
- package/dist/lib/components/Paragraph/Paragraph.js +44 -1
- package/dist/lib/components/Tabs/Tabs.css +2 -2
- package/dist/lib/components/Tabs/Tabs.js +41 -32
- package/package.json +4 -3
- package/styles/base.less +49 -21
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,53 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.1.4](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.1.3...@megafon/ui-core@2.1.4) (2021-12-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **colors:** add hover colors to system group ([634ac03](https://github.com/MegafonWebLab/megafon-ui/commit/634ac034445fdcd08b60ff056f75683025cb6d49))
|
|
12
|
+
* **tabs:** fix active tab underline width ([4499399](https://github.com/MegafonWebLab/megafon-ui/commit/449939942730143712a92930a279a8b6fc17a012))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [2.1.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.1.2...@megafon/ui-core@2.1.3) (2021-12-14)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **contentarea:** fix backgroundColor and innerBackgroundColor props values ([d6004a4](https://github.com/MegafonWebLab/megafon-ui/commit/d6004a493b623cced4c453d69b0fd16d3cfbef43))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## [2.1.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.1.1...@megafon/ui-core@2.1.2) (2021-12-14)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Bug Fixes
|
|
33
|
+
|
|
34
|
+
* **paragraph:** rollback deprecated color props clearWhite ([ee4e5a9](https://github.com/MegafonWebLab/megafon-ui/commit/ee4e5a9ce158a4df68e437d316e37ed6e87df664))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [2.1.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.1.0...@megafon/ui-core@2.1.1) (2021-12-13)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* **carousel:** add prevendefault mouse event for disable slide click ([2e8f190](https://github.com/MegafonWebLab/megafon-ui/commit/2e8f1904101ffab860b4e74f28b9609f962f1340))
|
|
46
|
+
* **colors:** refactor colors page by new ui colors scheme ([6ff2629](https://github.com/MegafonWebLab/megafon-ui/commit/6ff262953bd87f77e81f906b0bb195b84aecad13))
|
|
47
|
+
* **notification:** update color style by new color scheme ([3b2b625](https://github.com/MegafonWebLab/megafon-ui/commit/3b2b625f082935b2c24123e06197d0bd4fbe6000))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
6
53
|
# [2.1.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.0.0...@megafon/ui-core@2.1.0) (2021-12-07)
|
|
7
54
|
|
|
8
55
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
h1,
|
|
2
|
+
h2,
|
|
3
|
+
h3,
|
|
4
|
+
h4,
|
|
5
|
+
h5 {
|
|
6
|
+
margin: 0;
|
|
7
|
+
}
|
|
8
|
+
.color-item {
|
|
9
|
+
display: -webkit-box;
|
|
10
|
+
display: -ms-flexbox;
|
|
11
|
+
display: flex;
|
|
12
|
+
-webkit-box-orient: vertical;
|
|
13
|
+
-webkit-box-direction: normal;
|
|
14
|
+
-ms-flex-direction: column;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
-webkit-box-align: center;
|
|
17
|
+
-ms-flex-align: center;
|
|
18
|
+
align-items: center;
|
|
19
|
+
width: 120px;
|
|
20
|
+
text-align: center;
|
|
21
|
+
}
|
|
22
|
+
.color-item__container {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 48px;
|
|
25
|
+
height: 48px;
|
|
26
|
+
margin-bottom: 8px;
|
|
27
|
+
}
|
|
28
|
+
.color-item__color {
|
|
29
|
+
position: relative;
|
|
30
|
+
z-index: 0;
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
}
|
|
35
|
+
.color-item__parent-color {
|
|
36
|
+
position: absolute;
|
|
37
|
+
top: 0;
|
|
38
|
+
right: 0;
|
|
39
|
+
z-index: 1;
|
|
40
|
+
width: 16px;
|
|
41
|
+
height: 16px;
|
|
42
|
+
border-radius: 50%;
|
|
43
|
+
}
|
|
44
|
+
.color-item__name {
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
line-height: 20px;
|
|
47
|
+
}
|
|
48
|
+
.color-item__code {
|
|
49
|
+
color: #33333380;
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
line-height: 18px;
|
|
52
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import './ColorItem.less';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
colorCode: string;
|
|
5
|
+
colorName: string;
|
|
6
|
+
parentColorCode?: string;
|
|
7
|
+
gradient?: string;
|
|
8
|
+
border?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const ColorItem: React.FC<Props>;
|
|
12
|
+
export default ColorItem;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cnCreate } from '@megafon/ui-helpers';
|
|
3
|
+
import "./ColorItem.css";
|
|
4
|
+
var cn = cnCreate('color-item');
|
|
5
|
+
|
|
6
|
+
var ColorItem = function ColorItem(_ref) {
|
|
7
|
+
var colorCode = _ref.colorCode,
|
|
8
|
+
colorName = _ref.colorName,
|
|
9
|
+
parentColorCode = _ref.parentColorCode,
|
|
10
|
+
gradient = _ref.gradient,
|
|
11
|
+
border = _ref.border,
|
|
12
|
+
className = _ref.className;
|
|
13
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
+
className: cn([className])
|
|
15
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
16
|
+
className: cn('container')
|
|
17
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
18
|
+
className: cn('color'),
|
|
19
|
+
style: {
|
|
20
|
+
background: !gradient ? colorCode : gradient,
|
|
21
|
+
border: border
|
|
22
|
+
}
|
|
23
|
+
}), !!parentColorCode && /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: cn('parent-color'),
|
|
25
|
+
style: {
|
|
26
|
+
background: parentColorCode
|
|
27
|
+
}
|
|
28
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
29
|
+
className: cn('name')
|
|
30
|
+
}, colorName), /*#__PURE__*/React.createElement("span", {
|
|
31
|
+
className: cn('code')
|
|
32
|
+
}, colorCode));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default ColorItem;
|
|
@@ -5,58 +5,229 @@ h4,
|
|
|
5
5
|
h5 {
|
|
6
6
|
margin: 0;
|
|
7
7
|
}
|
|
8
|
-
.colors {
|
|
9
|
-
max-width: 835px;
|
|
10
|
-
margin: 0 auto;
|
|
11
|
-
}
|
|
12
8
|
.colors__inner {
|
|
9
|
+
margin: 0 -80px;
|
|
10
|
+
padding: 56px 80px 40px;
|
|
11
|
+
background-color: #F6F6F6;
|
|
12
|
+
}
|
|
13
|
+
@media screen and (max-width: 1120px) {
|
|
14
|
+
.colors__inner {
|
|
15
|
+
margin: 0 -24px;
|
|
16
|
+
padding: 24px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
@media screen and (max-width: 350px) {
|
|
20
|
+
.colors__inner {
|
|
21
|
+
margin: 0 -15px;
|
|
22
|
+
padding: 15px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
.colors__title {
|
|
26
|
+
margin-bottom: 8px;
|
|
27
|
+
}
|
|
28
|
+
.colors__group-title {
|
|
29
|
+
margin-bottom: 24px;
|
|
30
|
+
}
|
|
31
|
+
@media screen and (min-width: 768px) {
|
|
32
|
+
.colors__group-title {
|
|
33
|
+
margin-bottom: 36px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
@media screen and (max-width: 1023px) {
|
|
37
|
+
.colors__basic-group {
|
|
38
|
+
display: -webkit-box;
|
|
39
|
+
display: -ms-flexbox;
|
|
40
|
+
display: flex;
|
|
41
|
+
-webkit-box-orient: vertical;
|
|
42
|
+
-webkit-box-direction: normal;
|
|
43
|
+
-ms-flex-direction: column;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
margin-bottom: 24px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
.colors__basic-group:last-child {
|
|
49
|
+
margin-bottom: 0;
|
|
50
|
+
}
|
|
51
|
+
@media screen and (min-width: 768px) {
|
|
52
|
+
.colors__basic-group:last-child {
|
|
53
|
+
padding-left: 24px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.colors__list,
|
|
57
|
+
.colors__group {
|
|
13
58
|
display: -webkit-box;
|
|
14
59
|
display: -ms-flexbox;
|
|
15
60
|
display: flex;
|
|
16
61
|
-webkit-box-pack: justify;
|
|
17
62
|
-ms-flex-pack: justify;
|
|
18
63
|
justify-content: space-between;
|
|
19
|
-
margin-top: 88px;
|
|
20
64
|
}
|
|
21
|
-
@media screen and (max-width:
|
|
22
|
-
.
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
margin-top: 44px;
|
|
65
|
+
@media screen and (max-width: 1023px) {
|
|
66
|
+
.colors__list,
|
|
67
|
+
.colors__group {
|
|
68
|
+
-ms-flex-wrap: wrap;
|
|
69
|
+
flex-wrap: wrap;
|
|
28
70
|
}
|
|
29
71
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
72
|
+
.colors__list {
|
|
73
|
+
-webkit-box-pack: space-evenly;
|
|
74
|
+
-ms-flex-pack: space-evenly;
|
|
75
|
+
justify-content: space-evenly;
|
|
76
|
+
padding-bottom: 12px;
|
|
77
|
+
}
|
|
78
|
+
@media screen and (max-width: 1023px) {
|
|
79
|
+
.colors__list {
|
|
80
|
+
-webkit-box-ordinal-group: 3;
|
|
81
|
+
-ms-flex-order: 2;
|
|
82
|
+
order: 2;
|
|
83
|
+
padding-bottom: 0;
|
|
33
84
|
}
|
|
34
85
|
}
|
|
35
|
-
.
|
|
36
|
-
|
|
86
|
+
.colors__list_soft {
|
|
87
|
+
-ms-flex-wrap: wrap;
|
|
88
|
+
flex-wrap: wrap;
|
|
89
|
+
}
|
|
90
|
+
.colors__description {
|
|
91
|
+
position: relative;
|
|
92
|
+
padding-top: 15px;
|
|
93
|
+
color: #33333380;
|
|
94
|
+
font-size: 12px;
|
|
95
|
+
line-height: 18px;
|
|
96
|
+
text-align: center;
|
|
97
|
+
}
|
|
98
|
+
@media screen and (max-width: 1023px) {
|
|
99
|
+
.colors__description {
|
|
100
|
+
-webkit-box-ordinal-group: 1;
|
|
101
|
+
-ms-flex-order: 0;
|
|
102
|
+
order: 0;
|
|
103
|
+
margin-bottom: 18px;
|
|
104
|
+
padding-top: 0;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
.colors__container {
|
|
108
|
+
max-width: 978px;
|
|
109
|
+
}
|
|
110
|
+
.colors__line {
|
|
111
|
+
display: -webkit-box;
|
|
112
|
+
display: -ms-flexbox;
|
|
113
|
+
display: flex;
|
|
114
|
+
-webkit-box-orient: vertical;
|
|
115
|
+
-webkit-box-direction: normal;
|
|
116
|
+
-ms-flex-direction: column;
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
margin-bottom: 18px;
|
|
119
|
+
}
|
|
120
|
+
@media screen and (min-width: 768px) {
|
|
121
|
+
.colors__line {
|
|
122
|
+
margin-bottom: 48px;
|
|
123
|
+
}
|
|
37
124
|
}
|
|
38
125
|
.colors__item {
|
|
126
|
+
margin-bottom: 18px;
|
|
127
|
+
}
|
|
128
|
+
@media screen and (min-width: 1024px) {
|
|
129
|
+
.colors__item {
|
|
130
|
+
margin-right: 24px;
|
|
131
|
+
margin-bottom: 0;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
.colors__item:last-child {
|
|
135
|
+
margin-right: 0;
|
|
136
|
+
}
|
|
137
|
+
.colors__item_soft {
|
|
39
138
|
display: -webkit-box;
|
|
40
139
|
display: -ms-flexbox;
|
|
41
140
|
display: flex;
|
|
42
|
-
-webkit-box-
|
|
43
|
-
-ms-flex-
|
|
44
|
-
|
|
141
|
+
-webkit-box-pack: center;
|
|
142
|
+
-ms-flex-pack: center;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
margin-right: 0;
|
|
45
145
|
}
|
|
46
|
-
|
|
47
|
-
|
|
146
|
+
@media screen and (min-width: 1024px) {
|
|
147
|
+
.colors__item_soft {
|
|
148
|
+
width: 14.28571429%;
|
|
149
|
+
min-width: 120px;
|
|
150
|
+
margin-bottom: 36px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
.colors__diagram {
|
|
154
|
+
max-width: 259px;
|
|
155
|
+
margin: 0 auto 24px;
|
|
156
|
+
}
|
|
157
|
+
@media screen and (min-width: 1024px) {
|
|
158
|
+
.colors__diagram {
|
|
159
|
+
width: 259px;
|
|
160
|
+
min-width: 259px;
|
|
161
|
+
height: 259px;
|
|
162
|
+
margin: 0 40px 0 0;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
.colors__soft {
|
|
166
|
+
padding: 24px 16px;
|
|
167
|
+
}
|
|
168
|
+
@media screen and (min-width: 1024px) {
|
|
169
|
+
.colors__soft {
|
|
170
|
+
padding: 36px 32px 30px;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
.colors__soft-list {
|
|
174
|
+
display: -webkit-box;
|
|
175
|
+
display: -ms-flexbox;
|
|
176
|
+
display: flex;
|
|
177
|
+
-webkit-box-orient: vertical;
|
|
178
|
+
-webkit-box-direction: normal;
|
|
179
|
+
-ms-flex-direction: column;
|
|
180
|
+
flex-direction: column;
|
|
181
|
+
-webkit-box-flex: 1;
|
|
182
|
+
-ms-flex-positive: 1;
|
|
183
|
+
flex-grow: 1;
|
|
184
|
+
}
|
|
185
|
+
.colors__underline {
|
|
186
|
+
position: relative;
|
|
187
|
+
width: 100%;
|
|
188
|
+
height: 8px;
|
|
189
|
+
}
|
|
190
|
+
@media screen and (max-width: 1023px) {
|
|
191
|
+
.colors__underline {
|
|
192
|
+
display: none;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
.colors__pointer {
|
|
196
|
+
position: absolute;
|
|
197
|
+
top: 50%;
|
|
198
|
+
display: block;
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 1px;
|
|
201
|
+
background-color: #D8D8D8;
|
|
202
|
+
-webkit-transform: translateY(-50%);
|
|
203
|
+
transform: translateY(-50%);
|
|
204
|
+
}
|
|
205
|
+
.colors__underline:after,
|
|
206
|
+
.colors__underline:before,
|
|
207
|
+
.colors__pointer:after {
|
|
208
|
+
content: '';
|
|
209
|
+
position: absolute;
|
|
210
|
+
width: 1px;
|
|
211
|
+
height: 4px;
|
|
212
|
+
background-color: #D8D8D8;
|
|
48
213
|
}
|
|
49
|
-
.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
border-radius:
|
|
214
|
+
.colors__underline:after,
|
|
215
|
+
.colors__underline:before {
|
|
216
|
+
top: 0;
|
|
217
|
+
border-top-left-radius: 8px;
|
|
218
|
+
border-top-right-radius: 8px;
|
|
53
219
|
}
|
|
54
|
-
.
|
|
55
|
-
|
|
220
|
+
.colors__underline:before {
|
|
221
|
+
left: 0;
|
|
56
222
|
}
|
|
57
|
-
.
|
|
58
|
-
|
|
223
|
+
.colors__underline:after {
|
|
224
|
+
right: 0;
|
|
59
225
|
}
|
|
60
|
-
.
|
|
61
|
-
|
|
226
|
+
.colors__pointer:after {
|
|
227
|
+
top: 100%;
|
|
228
|
+
left: 50%;
|
|
229
|
+
border-bottom-right-radius: 8px;
|
|
230
|
+
border-bottom-left-radius: 8px;
|
|
231
|
+
-webkit-transform: translateX(-50%);
|
|
232
|
+
transform: translateX(-50%);
|
|
62
233
|
}
|