@megafon/ui-core 3.8.0 → 4.0.0-beta.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 (57) hide show
  1. package/CHANGELOG.md +12 -30
  2. package/dist/es/colors/Colors.css +4 -0
  3. package/dist/es/components/Badges/components/PriceBadge/PriceBadge.css +1 -1
  4. package/dist/es/components/Badges/components/PromoBadge/PromoBadge.css +1 -1
  5. package/dist/es/components/Badges/components/TimerBadge/TimerBadge.css +1 -1
  6. package/dist/es/components/Button/Button.css +0 -40
  7. package/dist/es/components/Button/Button.d.ts +0 -1
  8. package/dist/es/components/Button/Button.js +1 -2
  9. package/dist/es/components/Calendar/Calendar.js +2 -18
  10. package/dist/es/components/Calendar/components/Day/Day.css +1 -1
  11. package/dist/es/components/Calendar/components/Month/Month.css +1 -1
  12. package/dist/es/components/Calendar/components/Month/Month.js +4 -4
  13. package/dist/es/components/Caption/Caption.css +48 -0
  14. package/dist/es/components/Caption/Caption.d.ts +31 -0
  15. package/dist/es/components/Caption/Caption.js +51 -0
  16. package/dist/es/components/Logo/Logo.js +6 -22
  17. package/dist/es/components/Notification/Notification.d.ts +0 -6
  18. package/dist/es/components/Notification/Notification.js +3 -13
  19. package/dist/es/components/Paragraph/Paragraph.css +8 -5
  20. package/dist/es/components/Paragraph/Paragraph.d.ts +4 -3
  21. package/dist/es/components/Paragraph/Paragraph.js +6 -5
  22. package/dist/es/components/RadioButton/RadioButton.css +1 -1
  23. package/dist/es/components/Switcher/Switcher.css +1 -4
  24. package/dist/es/components/TextField/TextField.js +2 -3
  25. package/dist/es/components/Tooltip/Tooltip.d.ts +0 -2
  26. package/dist/es/components/Tooltip/Tooltip.js +1 -27
  27. package/dist/es/index.d.ts +1 -0
  28. package/dist/es/index.js +1 -0
  29. package/dist/lib/colors/Colors.css +4 -0
  30. package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.css +1 -1
  31. package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.css +1 -1
  32. package/dist/lib/components/Badges/components/TimerBadge/TimerBadge.css +1 -1
  33. package/dist/lib/components/Button/Button.css +0 -40
  34. package/dist/lib/components/Button/Button.d.ts +0 -1
  35. package/dist/lib/components/Button/Button.js +1 -2
  36. package/dist/lib/components/Calendar/Calendar.js +1 -17
  37. package/dist/lib/components/Calendar/components/Day/Day.css +1 -1
  38. package/dist/lib/components/Calendar/components/Month/Month.css +1 -1
  39. package/dist/lib/components/Calendar/components/Month/Month.js +4 -4
  40. package/dist/lib/components/Caption/Caption.css +48 -0
  41. package/dist/lib/components/Caption/Caption.d.ts +31 -0
  42. package/dist/lib/components/Caption/Caption.js +71 -0
  43. package/dist/lib/components/Logo/Logo.js +6 -22
  44. package/dist/lib/components/Notification/Notification.d.ts +0 -6
  45. package/dist/lib/components/Notification/Notification.js +3 -13
  46. package/dist/lib/components/Paragraph/Paragraph.css +8 -5
  47. package/dist/lib/components/Paragraph/Paragraph.d.ts +4 -3
  48. package/dist/lib/components/Paragraph/Paragraph.js +6 -5
  49. package/dist/lib/components/RadioButton/RadioButton.css +1 -1
  50. package/dist/lib/components/Switcher/Switcher.css +1 -4
  51. package/dist/lib/components/TextField/TextField.js +3 -4
  52. package/dist/lib/components/Tooltip/Tooltip.d.ts +0 -2
  53. package/dist/lib/components/Tooltip/Tooltip.js +1 -31
  54. package/dist/lib/index.d.ts +1 -0
  55. package/dist/lib/index.js +8 -0
  56. package/package.json +3 -3
  57. package/styles/base.less +1 -1
package/CHANGELOG.md CHANGED
@@ -3,55 +3,37 @@
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
- # [3.8.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.7.0...@megafon/ui-core@3.8.0) (2022-05-17)
6
+ # [4.0.0-beta.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.5.3-beta.1...@megafon/ui-core@4.0.0-beta.0) (2022-05-24)
7
7
 
8
8
 
9
9
  ### Features
10
10
 
11
- * **notification:** add props classes to notification component ([608a424](https://github.com/MegafonWebLab/megafon-ui/commit/608a4246eb99af354fb7cf8ab98c2ed513d87b66))
12
-
13
-
14
-
15
-
16
-
17
- # [3.7.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.6.0...@megafon/ui-core@3.7.0) (2022-05-05)
18
-
19
-
20
- ### Bug Fixes
21
-
22
- * **logo:** fix horizontal logo svg ([76655eb](https://github.com/MegafonWebLab/megafon-ui/commit/76655ebb82650cc2617750af0b2b2726d3ebcbf3))
23
-
24
-
25
- ### Features
26
-
27
- * **button:** added extra small size ([a26da46](https://github.com/MegafonWebLab/megafon-ui/commit/a26da4601de7e7c81c40eabf9a87ccdbf18cb790))
28
-
29
-
11
+ * **caption:** add new Caption component; update .smallFont() less mixin ([603bed3](https://github.com/MegafonWebLab/megafon-ui/commit/603bed3ce782676b22381e3d4df5dae141fb015c))
12
+ * **paragraph:** remove prop size; add new prop; add 'pale' option to colors ([ef15841](https://github.com/MegafonWebLab/megafon-ui/commit/ef15841474473739d3ac88da7a8737e183ff288a))
30
13
 
31
14
 
15
+ ### BREAKING CHANGES
32
16
 
33
- # [3.6.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.5.3...@megafon/ui-core@3.6.0) (2022-04-25)
17
+ * **caption:** .smallFont() less mixin line-height rule now set to 18px instead of 16px
18
+ either accept new rules or manually add line-height: 16px in your components
19
+ * **paragraph:** prop 'size' is no longer exists.
20
+ use component Caption instead of Paragraph size="small"
34
21
 
35
22
 
36
- ### Bug Fixes
37
23
 
38
- * **calendar:** fix go to start day after user choice ([8bbce10](https://github.com/MegafonWebLab/megafon-ui/commit/8bbce102d204f7ea7706158f3e6540c86ed3aada))
39
24
 
40
25
 
41
- ### Features
42
-
43
- * **tooltip:** added prop isPortal for tooltip ([e6f6d17](https://github.com/MegafonWebLab/megafon-ui/commit/e6f6d1749cd99f065c50bac4eb6a9b3592653f8d))
26
+ ## [3.5.3-beta.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.5.3-beta.0...@megafon/ui-core@3.5.3-beta.1) (2022-05-06)
44
27
 
28
+ **Note:** Version bump only for package @megafon/ui-core
45
29
 
46
30
 
47
31
 
48
32
 
49
- ## [3.5.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.5.2...@megafon/ui-core@3.5.3) (2022-04-18)
50
33
 
34
+ ## [3.5.3-beta.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.5.2...@megafon/ui-core@3.5.3-beta.0) (2022-04-13)
51
35
 
52
- ### Bug Fixes
53
-
54
- * **switcher:** fix safari bugs ([65274bc](https://github.com/MegafonWebLab/megafon-ui/commit/65274bc3c5e7385109afff94a8ff3f712c9af097))
36
+ **Note:** Version bump only for package @megafon/ui-core
55
37
 
56
38
 
57
39
 
@@ -2,6 +2,8 @@
2
2
  margin: 0 -80px;
3
3
  padding: 56px 80px 40px;
4
4
  background-color: var(--spbSky0);
5
+ -webkit-transition: background-color 0.3s;
6
+ transition: background-color 0.3s;
5
7
  }
6
8
  @media screen and (max-width: 1120px) {
7
9
  .colors__inner {
@@ -90,6 +92,8 @@
90
92
  font-size: 12px;
91
93
  line-height: 18px;
92
94
  text-align: center;
95
+ -webkit-transition: color 0.3s;
96
+ transition: color 0.3s;
93
97
  }
94
98
  @media screen and (max-width: 1023px) {
95
99
  .colors__description {
@@ -1,6 +1,6 @@
1
1
  .mfui-price-badge {
2
2
  font-size: 12px;
3
- line-height: 16px;
3
+ line-height: 18px;
4
4
  display: -webkit-box;
5
5
  display: -ms-flexbox;
6
6
  display: flex;
@@ -30,6 +30,6 @@
30
30
  .mfui-promo-badge__text {
31
31
  font-family: inherit;
32
32
  font-size: 12px;
33
- line-height: 16px;
33
+ line-height: 18px;
34
34
  font-weight: 500;
35
35
  }
@@ -32,7 +32,7 @@
32
32
  }
33
33
  .mfui-timer-badge__text {
34
34
  font-size: 12px;
35
- line-height: 16px;
35
+ line-height: 18px;
36
36
  font-family: inherit;
37
37
  margin-left: 2px;
38
38
  font-weight: 500;
@@ -21,10 +21,6 @@
21
21
  appearance: none;
22
22
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
23
23
  }
24
- .mfui-button_size-all_extra-small .mfui-button__inner {
25
- min-width: 26px;
26
- height: 26px;
27
- }
28
24
  .mfui-button_size-all_small .mfui-button__inner {
29
25
  min-width: 32px;
30
26
  height: 32px;
@@ -37,10 +33,6 @@
37
33
  min-width: 60px;
38
34
  height: 60px;
39
35
  }
40
- .mfui-button_size-all_extra-small .mfui-button__icon {
41
- width: 18px;
42
- height: 18px;
43
- }
44
36
  .mfui-button_size-all_small .mfui-button__icon {
45
37
  width: 24px;
46
38
  height: 24px;
@@ -54,10 +46,6 @@
54
46
  height: 40px;
55
47
  }
56
48
  @media screen and (min-width: 1280px) {
57
- .mfui-button_size-wide_extra-small .mfui-button__inner {
58
- min-width: 26px;
59
- height: 26px;
60
- }
61
49
  .mfui-button_size-wide_small .mfui-button__inner {
62
50
  min-width: 32px;
63
51
  height: 32px;
@@ -70,10 +58,6 @@
70
58
  min-width: 60px;
71
59
  height: 60px;
72
60
  }
73
- .mfui-button_size-wide_extra-small .mfui-button__icon {
74
- width: 18px;
75
- height: 18px;
76
- }
77
61
  .mfui-button_size-wide_small .mfui-button__icon {
78
62
  width: 24px;
79
63
  height: 24px;
@@ -88,10 +72,6 @@
88
72
  }
89
73
  }
90
74
  @media screen and (min-width: 1024px) {
91
- .mfui-button_size-desktop_extra-small .mfui-button__inner {
92
- min-width: 26px;
93
- height: 26px;
94
- }
95
75
  .mfui-button_size-desktop_small .mfui-button__inner {
96
76
  min-width: 32px;
97
77
  height: 32px;
@@ -104,10 +84,6 @@
104
84
  min-width: 60px;
105
85
  height: 60px;
106
86
  }
107
- .mfui-button_size-desktop_extra-small .mfui-button__icon {
108
- width: 18px;
109
- height: 18px;
110
- }
111
87
  .mfui-button_size-desktop_small .mfui-button__icon {
112
88
  width: 24px;
113
89
  height: 24px;
@@ -122,10 +98,6 @@
122
98
  }
123
99
  }
124
100
  @media screen and (min-width: 768px) and (max-width: 1023px) {
125
- .mfui-button_size-tablet_extra-small .mfui-button__inner {
126
- min-width: 26px;
127
- height: 26px;
128
- }
129
101
  .mfui-button_size-tablet_small .mfui-button__inner {
130
102
  min-width: 32px;
131
103
  height: 32px;
@@ -138,10 +110,6 @@
138
110
  min-width: 60px;
139
111
  height: 60px;
140
112
  }
141
- .mfui-button_size-tablet_extra-small .mfui-button__icon {
142
- width: 18px;
143
- height: 18px;
144
- }
145
113
  .mfui-button_size-tablet_small .mfui-button__icon {
146
114
  width: 24px;
147
115
  height: 24px;
@@ -156,10 +124,6 @@
156
124
  }
157
125
  }
158
126
  @media screen and (max-width: 767px) {
159
- .mfui-button_size-mobile_extra-small .mfui-button__inner {
160
- min-width: 26px;
161
- height: 26px;
162
- }
163
127
  .mfui-button_size-mobile_small .mfui-button__inner {
164
128
  min-width: 32px;
165
129
  height: 32px;
@@ -172,10 +136,6 @@
172
136
  min-width: 60px;
173
137
  height: 60px;
174
138
  }
175
- .mfui-button_size-mobile_extra-small .mfui-button__icon {
176
- width: 18px;
177
- height: 18px;
178
- }
179
139
  .mfui-button_size-mobile_small .mfui-button__icon {
180
140
  width: 24px;
181
141
  height: 24px;
@@ -13,7 +13,6 @@ export declare const ButtonThemes: {
13
13
  };
14
14
  declare type ButtonThemesType = typeof ButtonThemes[keyof typeof ButtonThemes];
15
15
  export declare const ButtonSizes: {
16
- readonly EXTRA_SMALL: "extra-small";
17
16
  readonly SMALL: "small";
18
17
  readonly MEDIUM: "medium";
19
18
  readonly LARGE: "large";
@@ -29,7 +29,6 @@ export var ButtonThemes = {
29
29
  BLACK: 'black'
30
30
  };
31
31
  export var ButtonSizes = {
32
- EXTRA_SMALL: 'extra-small',
33
32
  SMALL: 'small',
34
33
  MEDIUM: 'medium',
35
34
  LARGE: 'large'
@@ -43,7 +42,7 @@ var Content;
43
42
  })(Content || (Content = {}));
44
43
 
45
44
  var getLoaderSize = function getLoaderSize(size) {
46
- return size === ButtonSizes.SMALL || size === ButtonSizes.EXTRA_SMALL ? ButtonSizes.SMALL : ButtonSizes.MEDIUM;
45
+ return size === ButtonSizes.SMALL ? ButtonSizes.SMALL : ButtonSizes.MEDIUM;
47
46
  };
48
47
 
49
48
  var cn = cnCreate('mfui-button');
@@ -20,7 +20,7 @@ var __rest = this && this.__rest || function (s, e) {
20
20
  return t;
21
21
  };
22
22
 
23
- import React, { useState, useEffect, useMemo, useRef } from 'react';
23
+ import React, { useState, useEffect, useMemo } from 'react';
24
24
  import { START_DATE, END_DATE, useDatepicker, useMonth } from '@datepicker-react/hooks';
25
25
  import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
26
26
  import differenceInDays from 'date-fns/differenceInDays';
@@ -53,17 +53,6 @@ var dayLabelFormat = function dayLabelFormat(date) {
53
53
  var monthLabelFormat = function monthLabelFormat(date) {
54
54
  return formatDate(date, 'LLLL');
55
55
  };
56
- /* List of cases to check on component change:
57
-
58
- - Should correctly choose value and trigger callbacks with correct arguments on dates choose.
59
- - Should set 1 day period if start and end date is equal
60
- - Should correctly increase period if choose earlier start date
61
- - Should correctly change start date of selected period if chosen date in period closer to current start date
62
- - Should correctly change end date of selected period if chosen date in period closer to current end date
63
- - Should correctly highlights period if start date chosen and hover on possible end date
64
-
65
- */
66
-
67
56
 
68
57
  var cn = cnCreate('mfui-calendar');
69
58
 
@@ -102,7 +91,6 @@ var Calendar = function Calendar(_ref) {
102
91
  hoveredDate = _useState4[0],
103
92
  setHoveredDate = _useState4[1];
104
93
 
105
- var isUserChoice = useRef(false);
106
94
  var stateStartDate = calendarState.startDate,
107
95
  stateEndDate = calendarState.endDate,
108
96
  stateFocusedInput = calendarState.focusedInput;
@@ -123,13 +111,10 @@ var Calendar = function Calendar(_ref) {
123
111
  goToDate = _a.goToDate,
124
112
  pickerProps = __rest(_a, ["firstDayOfWeek", "activeMonths", "goToPreviousMonths", "goToNextMonths", "goToDate"]);
125
113
 
126
- useEffect(function () {
127
- isUserChoice.current = false;
128
- }, [startDate]);
129
114
  useEffect(function () {
130
115
  var propsStartDate = calendarStateFromProps.startDate;
131
116
  setCalendarState(calendarStateFromProps);
132
- !isUserChoice.current && propsStartDate && goToDate(propsStartDate); // eslint-disable-next-line react-hooks/exhaustive-deps
117
+ propsStartDate && goToDate(propsStartDate); // eslint-disable-next-line react-hooks/exhaustive-deps
133
118
  }, [calendarStateFromProps]);
134
119
 
135
120
  var getCalendarState = function getCalendarState(date) {
@@ -194,7 +179,6 @@ var Calendar = function Calendar(_ref) {
194
179
  var nextStartDate = nextState.startDate,
195
180
  nextEndDate = nextState.endDate;
196
181
  setCalendarState(nextState);
197
- isUserChoice.current = true;
198
182
  onChange === null || onChange === void 0 ? void 0 : onChange(nextStartDate, nextEndDate);
199
183
  };
200
184
 
@@ -21,7 +21,7 @@
21
21
  user-select: none;
22
22
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
23
23
  font-size: 12px;
24
- line-height: 16px;
24
+ line-height: 18px;
25
25
  }
26
26
  .mfui-day:last-child {
27
27
  padding-right: 0;
@@ -56,7 +56,7 @@
56
56
  }
57
57
  .mfui-month__weekday {
58
58
  font-size: 12px;
59
- line-height: 16px;
59
+ line-height: 18px;
60
60
  width: 20px;
61
61
  height: 16px;
62
62
  color: var(--content);
@@ -10,9 +10,9 @@ var ArrowLeft = function ArrowLeft(props) {
10
10
  return /*#__PURE__*/React.createElement("svg", _extends({
11
11
  viewBox: "0 0 20 20"
12
12
  }, props), /*#__PURE__*/React.createElement("path", {
13
- d: "M12 6v8l-5-4z",
14
13
  fillRule: "evenodd",
15
- clipRule: "evenodd"
14
+ clipRule: "evenodd",
15
+ d: "M12 6v8l-5-4z"
16
16
  }));
17
17
  };
18
18
 
@@ -20,9 +20,9 @@ var ArrowRight = function ArrowRight(props) {
20
20
  return /*#__PURE__*/React.createElement("svg", _extends({
21
21
  viewBox: "0 0 20 20"
22
22
  }, props), /*#__PURE__*/React.createElement("path", {
23
- d: "M8 14V6l5 4z",
24
23
  fillRule: "evenodd",
25
- clipRule: "evenodd"
24
+ clipRule: "evenodd",
25
+ d: "M8 14V6l5 4z"
26
26
  }));
27
27
  };
28
28
 
@@ -0,0 +1,48 @@
1
+ .mfui-caption {
2
+ font-family: inherit;
3
+ font-size: 12px;
4
+ line-height: 18px;
5
+ margin: 0;
6
+ }
7
+ .mfui-caption_variant_normal {
8
+ font-weight: 400;
9
+ }
10
+ .mfui-caption_variant_medium {
11
+ font-weight: 600;
12
+ }
13
+ .mfui-caption_space_wide {
14
+ line-height: 18px;
15
+ }
16
+ .mfui-caption_space_tight {
17
+ line-height: 14px;
18
+ }
19
+ .mfui-caption_align_left {
20
+ text-align: left;
21
+ }
22
+ .mfui-caption_align_center {
23
+ text-align: center;
24
+ }
25
+ .mfui-caption_align_right {
26
+ text-align: right;
27
+ }
28
+ .mfui-caption_has-margin {
29
+ margin: 0 0 16px;
30
+ }
31
+ .mfui-caption_color_inherit {
32
+ color: inherit;
33
+ }
34
+ .mfui-caption_color_default {
35
+ color: var(--content);
36
+ }
37
+ .mfui-caption_color_gray {
38
+ color: var(--spbSky3);
39
+ }
40
+ .mfui-caption_color_white {
41
+ color: var(--stcWhite);
42
+ }
43
+ .mfui-caption_color_green {
44
+ color: var(--brandGreen);
45
+ }
46
+ .mfui-caption_color_purple {
47
+ color: var(--brandPurple);
48
+ }
@@ -0,0 +1,31 @@
1
+ import * as React from 'react';
2
+ import './Caption.less';
3
+ declare const COLORS: {
4
+ readonly INHERIT: "inherit";
5
+ readonly DEFAULT: "default";
6
+ readonly GRAY: "gray";
7
+ readonly WHITE: "white";
8
+ readonly GREEN: "green";
9
+ readonly PURPLE: "purple";
10
+ };
11
+ declare type ColorType = typeof COLORS[keyof typeof COLORS];
12
+ export interface ICaptionProps {
13
+ /** Выравнивание по горизонтали */
14
+ align?: 'left' | 'center' | 'right';
15
+ /** Поведение текста при встраивании в широкий или узкий контейнер */
16
+ space?: 'wide' | 'tight';
17
+ /** Начертание шрифта: обычный или полужирный */
18
+ variant?: 'normal' | 'medium';
19
+ /** Вертикальный отступ */
20
+ hasMargin?: boolean;
21
+ /** Цвет текста */
22
+ color?: ColorType;
23
+ /** Дополнительный класс корневого элемента */
24
+ className?: string;
25
+ /** Дополнительные data атрибуты к внутренним элементам */
26
+ dataAttrs?: {
27
+ root?: Record<string, string>;
28
+ };
29
+ }
30
+ declare const Caption: React.FC<ICaptionProps>;
31
+ export default Caption;
@@ -0,0 +1,51 @@
1
+ import "core-js/modules/es.object.values";
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import * as React from 'react';
4
+ import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
5
+ import * as PropTypes from 'prop-types';
6
+ import "./Caption.css";
7
+ var COLORS = {
8
+ INHERIT: 'inherit',
9
+ DEFAULT: 'default',
10
+ GRAY: 'gray',
11
+ WHITE: 'white',
12
+ GREEN: 'green',
13
+ PURPLE: 'purple'
14
+ };
15
+ var cn = cnCreate('mfui-caption');
16
+
17
+ var Caption = function Caption(_ref) {
18
+ var align = _ref.align,
19
+ _ref$color = _ref.color,
20
+ color = _ref$color === void 0 ? 'default' : _ref$color,
21
+ _ref$space = _ref.space,
22
+ space = _ref$space === void 0 ? 'wide' : _ref$space,
23
+ _ref$variant = _ref.variant,
24
+ variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
25
+ className = _ref.className,
26
+ _ref$hasMargin = _ref.hasMargin,
27
+ hasMargin = _ref$hasMargin === void 0 ? true : _ref$hasMargin,
28
+ dataAttrs = _ref.dataAttrs,
29
+ children = _ref.children;
30
+ return /*#__PURE__*/React.createElement("p", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
31
+ className: cn({
32
+ align: align,
33
+ color: color,
34
+ space: space,
35
+ variant: variant,
36
+ 'has-margin': hasMargin
37
+ }, className)
38
+ }), children);
39
+ };
40
+
41
+ Caption.propTypes = {
42
+ dataAttrs: PropTypes.shape({
43
+ root: PropTypes.objectOf(PropTypes.string.isRequired)
44
+ }),
45
+ align: PropTypes.oneOf(['left', 'center', 'right']),
46
+ space: PropTypes.oneOf(['wide', 'tight']),
47
+ variant: PropTypes.oneOf(['normal', 'medium']),
48
+ hasMargin: PropTypes.bool,
49
+ color: PropTypes.oneOf(Object.values(COLORS))
50
+ };
51
+ export default Caption;
@@ -8,30 +8,14 @@ import "./Logo.css";
8
8
 
9
9
  var greenHorizontalImg = function greenHorizontalImg(props) {
10
10
  return /*#__PURE__*/React.createElement("svg", _extends({
11
- viewBox: "0 0 623 112",
12
- fill: "none"
13
- }, props), /*#__PURE__*/React.createElement("path", {
14
- d: "M608.292 31.117V51.95h-27.978V31.117h-13.769v55.067h13.769V63.951h27.978v22.233h13.842V31.117h-13.842z",
15
- fill: "#00B956"
16
- }), /*#__PURE__*/React.createElement("path", {
17
- fillRule: "evenodd",
18
- clipRule: "evenodd",
19
- d: "M367.31 29.865c4.417 0 9.056 2.43 11.338 7.436l22.53 48.883h-14.652l-4.933-11.632h-28.567l-4.933 11.632h-14.652l22.53-48.883c2.282-5.007 6.921-7.436 11.339-7.436zm-1.105 13.693l-8.467 19.951h19.143l-8.467-19.95c-.221-.663-.736-.81-1.104-.81-.369 0-.81.22-1.105.81z",
20
- fill: "#00B956"
21
- }), /*#__PURE__*/React.createElement("path", {
22
- d: "M214.533 21.178c-6.48 0-10.603 3.46-13.622 10.38l-17.965 41.374-17.965-41.374c-3.018-6.92-7.142-10.38-13.621-10.38-6.037 0-12.296 4.343-12.296 13.693v51.313h13.769v-49.84l18.112 41.08c2.43 5.742 6.332 9.349 12.001 9.349 5.67 0 9.572-3.607 12.002-9.35l18.112-41.08v49.841h13.768v-51.24c0-9.423-6.258-13.766-12.295-13.766zm36.445 53.227a1.163 1.163 0 01-1.178-1.178v-9.644h34.384V52.319H249.8v-8.393c0-.662.515-1.178 1.178-1.178h34.016V31.117h-40.79c-4.785 0-8.172 3.975-8.172 8.171v38.577c0 4.196 3.46 8.172 8.172 8.172h40.79V74.405h-34.016zm57.429 11.779V44c0-.663.516-1.178 1.179-1.178h34.015V31.19h-40.789c-4.786 0-8.173 3.976-8.173 8.172v46.822h13.768z",
23
- fill: "#00B956"
24
- }), /*#__PURE__*/React.createElement("path", {
25
- fillRule: "evenodd",
26
- clipRule: "evenodd",
27
- d: "M528.259 30.307c20.837 0 29.157 8.981 29.157 28.27 0 18.994-8.468 28.122-29.304 28.122h-4.565c-20.837 0-29.304-9.128-29.304-28.122 0-19.289 8.246-28.27 29.157-28.27h4.859zm-4.638 44.981h4.417c11.412 0 15.977-5.153 15.977-16.711v-.074c0-11.19-4.27-16.712-15.977-16.712h-4.417c-12.075 0-15.978 5.522-15.978 16.712v.074c0 11.558 4.492 16.711 15.978 16.711zm-95.127-52.785h27.316c20.321 0 28.493 10.307 28.567 28.27 0 2.797-.221 5.374-.589 7.804-2.135 12.736-9.645 20.54-28.715 20.54h-5.963v7.067h-13.769v-7.067h-6.037c-19.07 0-26.58-7.804-28.715-20.54-.442-2.43-.589-5.006-.589-7.804 0-17.963 8.099-28.27 28.494-28.27zm6.774 44.982h-6.332c-9.351 0-12.664-3.46-14.726-8.908-.81-2.135-.81-4.786-.81-7.804 0-11.706 5.449-16.712 13.4-16.712h8.468v33.424zm34.825-8.908c-2.061 5.448-5.448 8.908-14.725 8.908h-6.332V34.06h8.467c7.952 0 13.4 4.933 13.4 16.712 0 3.018 0 5.669-.81 7.804zM62.86 58.135V1.227c27.242 3.313 48.373 26.577 48.447 54.7 0 30.478-24.74 55.214-55.22 55.214a58.32 58.32 0 01-5.081-.221V63.215a.58.58 0 01.589-.59h6.774c2.43 0 4.49-1.987 4.49-4.49zM61.682 86.11a6.913 6.913 0 01-6.921-6.92 6.913 6.913 0 016.92-6.92 6.913 6.913 0 016.922 6.92 6.913 6.913 0 01-6.921 6.92zm9.277-6.92a6.913 6.913 0 006.92 6.92 6.913 6.913 0 006.922-6.92 6.913 6.913 0 00-6.921-6.92 6.913 6.913 0 00-6.921 6.92zm16.198 0a6.913 6.913 0 006.92 6.92A6.913 6.913 0 00101 79.19a6.913 6.913 0 00-6.921-6.92 6.913 6.913 0 00-6.921 6.92z",
11
+ viewBox: "0 0 304 55"
12
+ }, props), /*#__PURE__*/React.createElement("g", {
28
13
  fill: "#00B956"
14
+ }, /*#__PURE__*/React.createElement("path", {
15
+ d: "M30.3.7v27.8c0 1.3-1 2.2-2.2 2.2h-3.3c-.2 0-.3.2-.3.3v23.3c.8 0 1.6.2 2.5.2 14.9 0 27-12.1 27-27C54 13.8 43.7 2.3 30.3.7zm-.6 41.6c-1.9 0-3.3-1.6-3.3-3.3 0-1.9 1.6-3.3 3.3-3.3 1.9 0 3.3 1.6 3.3 3.3.2 1.8-1.4 3.3-3.3 3.3zm7.9 0c-1.9 0-3.3-1.6-3.3-3.3 0-1.9 1.6-3.3 3.3-3.3 1.9 0 3.3 1.6 3.3 3.3s-1.3 3.3-3.3 3.3zm8 0c-1.9 0-3.3-1.6-3.3-3.3 0-1.9 1.6-3.3 3.3-3.3 1.9 0 3.3 1.6 3.3 3.3s-1.4 3.3-3.3 3.3z"
29
16
  }), /*#__PURE__*/React.createElement("path", {
30
- fillRule: "evenodd",
31
- clipRule: "evenodd",
32
- d: "M.792 56C.792 25.521 25.531.785 56.012.785h.148v54.626a.58.58 0 01-.59.589h-6.92c-2.356.074-4.27 2.061-4.344 4.417v49.546C19.42 104.589.792 82.503.792 56zm37.697-16.638a6.913 6.913 0 006.921 6.92 6.913 6.913 0 006.921-6.92 6.913 6.913 0 00-6.92-6.92 6.913 6.913 0 00-6.922 6.92z",
33
- fill: "#00B956"
34
- }));
17
+ d: "M27 .6C12.1.6 0 12.7 0 27.6c0 13.1 9.1 23.8 21.3 26.3V29.6c0-1.1 1-2 2-2.2h3.3c.2 0 .3-.2.3-.3L27 .6zm-5.2 22.2c-1.9 0-3.3-1.6-3.3-3.3 0-1.9 1.6-3.3 3.3-3.3 1.9 0 3.3 1.6 3.3 3.3s-1.5 3.3-3.3 3.3zm275.5-7.5v10.2h-13.6V15.3h-6.9v27h6.9V31.4h13.6v10.9h6.7v-27zm-112.4 3.1c-1.1-2.4-3.3-3.7-5.5-3.7s-4.5 1.3-5.5 3.7l-10.9 24h7.2l2.4-5.7h14l2.4 5.7h7.2l-11.3-24zm-10.4 12.9l4.1-9.9c.2-.3.3-.3.5-.3s.5 0 .5.3l4.1 9.9h-9.2zm-70-20.8c-3.2 0-5.2 1.7-6.7 5.1l-8.7 20.3-8.8-20.4c-1.4-3.3-3.5-5.1-6.7-5.1-3 0-6 2-6 6.7v25.1h6.7V18l8.9 20.1c1.1 2.9 3.2 4.6 5.9 4.6 2.9 0 4.8-1.7 5.9-4.6l8.9-20.1v24.5h6.7V17.4c-.1-4.7-3.1-6.9-6.1-6.9zm17.9 26.1c-.3 0-.7-.3-.7-.7v-4.8h16.8v-5.5h-16.8v-4.1c0-.3.3-.7.7-.7h16.7v-5.7h-20c-2.4 0-4 1.9-4 4V38c0 2 1.7 4 4 4h20v-5.7h-16.7v.3zm28 5.7V21.7c0-.3.3-.7.7-.7h16.7v-5.7h-20c-2.4 0-4 1.9-4 4v22.9l6.6.1zm122-13.4c0-9.4-4.1-13.8-14.3-13.8h-2.4c-10.2 0-14.3 4.5-14.3 13.8 0 9.2 4.1 13.8 14.3 13.8h2.2c10.4-.2 14.5-4.6 14.5-13.8zM257.9 37h-2.2c-5.5 0-7.8-2.5-7.8-8.1 0-5.4 1.9-8.1 7.8-8.1h2.2c5.7 0 7.8 2.7 7.8 8.1 0 5.5-2.1 8.1-7.8 8.1zm-35.2-25.9h-13.4c-10 0-14 5.1-14 13.8 0 1.4.2 2.7.3 3.8 1.1 6.2 4.8 10 14.1 10h3v3.5h6.7v-3.5h2.9c9.4 0 13.1-3.8 14.1-10 .2-1.1.3-2.4.3-3.8-.1-8.7-4.2-13.8-14-13.8zm-10.2 22h-3c-4.6 0-6.2-1.7-7.2-4.5-.3-1-.3-2.4-.3-3.8 0-5.7 2.7-8.1 6.5-8.1h4.1v16.4h-.1zm17.2-4.2c-1 2.7-2.7 4.5-7.2 4.5h-3V16.9h4.1c3.8 0 6.5 2.4 6.5 8.1-.1 1.5-.1 2.7-.4 3.9z"
18
+ })));
35
19
  };
36
20
 
37
21
  var greenVerticalImg = function greenVerticalImg(props) {
@@ -17,12 +17,6 @@ declare type ShadowType = typeof ShadowTypes[keyof typeof ShadowTypes];
17
17
  export interface INotificationProps {
18
18
  /** Дополнительный класс корневого элемента */
19
19
  className?: string;
20
- /** Дополнительные классы для корневого и внутренних элементов */
21
- classes?: {
22
- root?: string;
23
- container?: string;
24
- content?: string;
25
- };
26
20
  /** Тип отображения */
27
21
  type?: NotificationType;
28
22
  /** Уровень тени */
@@ -77,11 +77,6 @@ var cn = cnCreate('mfui-notification');
77
77
 
78
78
  var Notification = function Notification(_ref) {
79
79
  var className = _ref.className,
80
- _ref$classes = _ref.classes;
81
- _ref$classes = _ref$classes === void 0 ? {} : _ref$classes;
82
- var rootClass = _ref$classes.root,
83
- containerClass = _ref$classes.container,
84
- contentClass = _ref$classes.content,
85
80
  children = _ref.children,
86
81
  _ref$type = _ref.type,
87
82
  type = _ref$type === void 0 ? 'info' : _ref$type,
@@ -148,13 +143,13 @@ var Notification = function Notification(_ref) {
148
143
  className: cn({
149
144
  type: type,
150
145
  colored: isColored
151
- }, [className, rootClass])
146
+ }, className)
152
147
  }, /*#__PURE__*/React.createElement("div", {
153
- className: cn('container', [containerClass])
148
+ className: cn('container')
154
149
  }, /*#__PURE__*/React.createElement("div", {
155
150
  className: cn('icon-container')
156
151
  }, renderIcon()), /*#__PURE__*/React.createElement("div", {
157
- className: cn('content', [contentClass])
152
+ className: cn('content')
158
153
  }, title && /*#__PURE__*/React.createElement(Header, {
159
154
  dataAttrs: {
160
155
  root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.title
@@ -179,11 +174,6 @@ var Notification = function Notification(_ref) {
179
174
  Notification.propTypes = {
180
175
  type: PropTypes.oneOf(Object.values(NotificationTypes)),
181
176
  className: PropTypes.string,
182
- classes: PropTypes.shape({
183
- root: PropTypes.string,
184
- container: PropTypes.string,
185
- content: PropTypes.string
186
- }),
187
177
  shadowLevel: PropTypes.oneOf(Object.values(ShadowTypes)),
188
178
  isColored: PropTypes.bool,
189
179
  hasCloseButton: PropTypes.bool,
@@ -1,5 +1,7 @@
1
1
  .mfui-paragraph {
2
2
  font-family: inherit;
3
+ font-size: 15px;
4
+ line-height: 24px;
3
5
  margin: 0;
4
6
  font-weight: 400;
5
7
  }
@@ -12,13 +14,11 @@
12
14
  .mfui-paragraph_align_right {
13
15
  text-align: right;
14
16
  }
15
- .mfui-paragraph_size_regular {
16
- font-size: 15px;
17
+ .mfui-paragraph_space_wide {
17
18
  line-height: 24px;
18
19
  }
19
- .mfui-paragraph_size_small {
20
- font-size: 12px;
21
- line-height: 16px;
20
+ .mfui-paragraph_space_tight {
21
+ line-height: 18px;
22
22
  }
23
23
  .mfui-paragraph_has-margin {
24
24
  margin: 0 0 16px;
@@ -29,6 +29,9 @@
29
29
  .mfui-paragraph_color_default {
30
30
  color: var(--content);
31
31
  }
32
+ .mfui-paragraph_color_gray {
33
+ color: var(--spbSky3);
34
+ }
32
35
  .mfui-paragraph_color_white {
33
36
  color: var(--stcWhite);
34
37
  }
@@ -3,6 +3,7 @@ import './Paragraph.less';
3
3
  declare const COLORS: {
4
4
  readonly INHERIT: "inherit";
5
5
  readonly DEFAULT: "default";
6
+ readonly GRAY: "gray";
6
7
  readonly WHITE: "white";
7
8
  readonly GREEN: "green";
8
9
  readonly PURPLE: "purple";
@@ -11,9 +12,9 @@ declare type ColorType = typeof COLORS[keyof typeof COLORS];
11
12
  export interface IParagraphProps {
12
13
  /** Выравнивание по горизонтали */
13
14
  align?: 'left' | 'center' | 'right';
14
- /** Размер шрифта */
15
- size?: 'regular' | 'small';
16
- /** Вертикальный отступ (включен по умолчанию) */
15
+ /** Поведение текста при встраивании в широкий или узкий контейнер */
16
+ space?: 'wide' | 'tight';
17
+ /** Вертикальный отступ */
17
18
  hasMargin?: boolean;
18
19
  /** Цвет текста */
19
20
  color?: ColorType;