@megafon/ui-core 3.10.0 → 4.0.0-beta.2

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 (73) hide show
  1. package/CHANGELOG.md +22 -34
  2. package/dist/es/colors/Colors.css +4 -0
  3. package/dist/es/components/Accordion/Accordion.css +55 -23
  4. package/dist/es/components/Accordion/Accordion.js +12 -17
  5. package/dist/es/components/Badges/components/PriceBadge/PriceBadge.css +1 -1
  6. package/dist/es/components/Badges/components/PromoBadge/PromoBadge.css +1 -1
  7. package/dist/es/components/Badges/components/TimerBadge/TimerBadge.css +1 -1
  8. package/dist/es/components/Banner/Banner.d.ts +0 -2
  9. package/dist/es/components/Banner/Banner.js +17 -49
  10. package/dist/es/components/Button/Button.css +0 -40
  11. package/dist/es/components/Button/Button.d.ts +0 -1
  12. package/dist/es/components/Button/Button.js +1 -2
  13. package/dist/es/components/Calendar/Calendar.js +2 -18
  14. package/dist/es/components/Calendar/components/Day/Day.css +1 -1
  15. package/dist/es/components/Calendar/components/Month/Month.css +1 -1
  16. package/dist/es/components/Calendar/components/Month/Month.js +4 -4
  17. package/dist/es/components/Caption/Caption.css +48 -0
  18. package/dist/es/components/Caption/Caption.d.ts +31 -0
  19. package/dist/es/components/Caption/Caption.js +51 -0
  20. package/dist/es/components/Logo/Logo.js +6 -22
  21. package/dist/es/components/Notification/Notification.d.ts +0 -6
  22. package/dist/es/components/Notification/Notification.js +3 -13
  23. package/dist/es/components/Paragraph/Paragraph.css +8 -5
  24. package/dist/es/components/Paragraph/Paragraph.d.ts +4 -3
  25. package/dist/es/components/Paragraph/Paragraph.js +6 -5
  26. package/dist/es/components/RadioButton/RadioButton.css +1 -1
  27. package/dist/es/components/Select/Select.js +1 -1
  28. package/dist/es/components/Switcher/Switcher.css +1 -4
  29. package/dist/es/components/Switcher/Switcher.d.ts +0 -1
  30. package/dist/es/components/Switcher/Switcher.js +3 -4
  31. package/dist/es/components/TextField/TextField.css +128 -87
  32. package/dist/es/components/TextField/TextField.js +54 -37
  33. package/dist/es/components/Tooltip/Tooltip.d.ts +0 -4
  34. package/dist/es/components/Tooltip/Tooltip.js +1 -32
  35. package/dist/es/index.d.ts +1 -0
  36. package/dist/es/index.js +1 -0
  37. package/dist/lib/colors/Colors.css +4 -0
  38. package/dist/lib/components/Accordion/Accordion.css +55 -23
  39. package/dist/lib/components/Accordion/Accordion.js +12 -17
  40. package/dist/lib/components/Badges/components/PriceBadge/PriceBadge.css +1 -1
  41. package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.css +1 -1
  42. package/dist/lib/components/Badges/components/TimerBadge/TimerBadge.css +1 -1
  43. package/dist/lib/components/Banner/Banner.d.ts +0 -2
  44. package/dist/lib/components/Banner/Banner.js +17 -49
  45. package/dist/lib/components/Button/Button.css +0 -40
  46. package/dist/lib/components/Button/Button.d.ts +0 -1
  47. package/dist/lib/components/Button/Button.js +1 -2
  48. package/dist/lib/components/Calendar/Calendar.js +1 -17
  49. package/dist/lib/components/Calendar/components/Day/Day.css +1 -1
  50. package/dist/lib/components/Calendar/components/Month/Month.css +1 -1
  51. package/dist/lib/components/Calendar/components/Month/Month.js +4 -4
  52. package/dist/lib/components/Caption/Caption.css +48 -0
  53. package/dist/lib/components/Caption/Caption.d.ts +31 -0
  54. package/dist/lib/components/Caption/Caption.js +71 -0
  55. package/dist/lib/components/Logo/Logo.js +6 -22
  56. package/dist/lib/components/Notification/Notification.d.ts +0 -6
  57. package/dist/lib/components/Notification/Notification.js +3 -13
  58. package/dist/lib/components/Paragraph/Paragraph.css +8 -5
  59. package/dist/lib/components/Paragraph/Paragraph.d.ts +4 -3
  60. package/dist/lib/components/Paragraph/Paragraph.js +6 -5
  61. package/dist/lib/components/RadioButton/RadioButton.css +1 -1
  62. package/dist/lib/components/Select/Select.js +1 -1
  63. package/dist/lib/components/Switcher/Switcher.css +1 -4
  64. package/dist/lib/components/Switcher/Switcher.d.ts +0 -1
  65. package/dist/lib/components/Switcher/Switcher.js +3 -4
  66. package/dist/lib/components/TextField/TextField.css +128 -87
  67. package/dist/lib/components/TextField/TextField.js +54 -39
  68. package/dist/lib/components/Tooltip/Tooltip.d.ts +0 -4
  69. package/dist/lib/components/Tooltip/Tooltip.js +1 -36
  70. package/dist/lib/index.d.ts +1 -0
  71. package/dist/lib/index.js +8 -0
  72. package/package.json +3 -3
  73. package/styles/base.less +4 -1
@@ -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;
@@ -7,6 +7,7 @@ import "./Paragraph.css";
7
7
  var COLORS = {
8
8
  INHERIT: 'inherit',
9
9
  DEFAULT: 'default',
10
+ GRAY: 'gray',
10
11
  WHITE: 'white',
11
12
  GREEN: 'green',
12
13
  PURPLE: 'purple'
@@ -14,11 +15,11 @@ var COLORS = {
14
15
  var cn = cnCreate('mfui-paragraph');
15
16
 
16
17
  var Paragraph = function Paragraph(_ref) {
17
- var _ref$size = _ref.size,
18
- size = _ref$size === void 0 ? 'regular' : _ref$size,
19
- align = _ref.align,
18
+ var align = _ref.align,
20
19
  _ref$color = _ref.color,
21
20
  color = _ref$color === void 0 ? 'default' : _ref$color,
21
+ _ref$space = _ref.space,
22
+ space = _ref$space === void 0 ? 'wide' : _ref$space,
22
23
  className = _ref.className,
23
24
  _ref$hasMargin = _ref.hasMargin,
24
25
  hasMargin = _ref$hasMargin === void 0 ? true : _ref$hasMargin,
@@ -26,9 +27,9 @@ var Paragraph = function Paragraph(_ref) {
26
27
  children = _ref.children;
27
28
  return /*#__PURE__*/React.createElement("p", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
28
29
  className: cn({
29
- size: size,
30
30
  align: align,
31
31
  color: color,
32
+ space: space,
32
33
  'has-margin': hasMargin
33
34
  }, className)
34
35
  }), children);
@@ -39,7 +40,7 @@ Paragraph.propTypes = {
39
40
  root: PropTypes.objectOf(PropTypes.string.isRequired)
40
41
  }),
41
42
  align: PropTypes.oneOf(['left', 'center', 'right']),
42
- size: PropTypes.oneOf(['regular', 'small']),
43
+ space: PropTypes.oneOf(['wide', 'tight']),
43
44
  hasMargin: PropTypes.bool,
44
45
  color: PropTypes.oneOf(Object.values(COLORS))
45
46
  };
@@ -60,7 +60,7 @@
60
60
  }
61
61
  .mfui-radio-button__text_size_small {
62
62
  font-size: 12px;
63
- line-height: 16px;
63
+ line-height: 18px;
64
64
  }
65
65
  .mfui-radio-button__text_size_medium {
66
66
  font-size: 15px;
@@ -337,7 +337,7 @@ var Select = function Select(_ref) {
337
337
 
338
338
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.title), {
339
339
  className: cn('title', {
340
- placeholder: !!placeholder && currentValue === undefined
340
+ placeholder: !!placeholder && !currentValue
341
341
  }, [classes === null || classes === void 0 ? void 0 : classes.title]),
342
342
  role: "button",
343
343
  tabIndex: 0,
@@ -13,7 +13,7 @@
13
13
  }
14
14
  .mfui-switcher__content_size_small {
15
15
  font-size: 12px;
16
- line-height: 16px;
16
+ line-height: 18px;
17
17
  }
18
18
  .mfui-switcher__content_left {
19
19
  margin-right: 12px;
@@ -84,9 +84,6 @@
84
84
  border-radius: 15.5px;
85
85
  overflow: hidden;
86
86
  background-color: var(--spbSky1);
87
- outline: none;
88
- -webkit-transform: translateZ(0);
89
- transform: translateZ(0);
90
87
  cursor: pointer;
91
88
  -webkit-transition: background-color 0.3s;
92
89
  transition: background-color 0.3s;
@@ -5,7 +5,6 @@ export interface ISwitcherProps {
5
5
  /** Дополнительные data атрибуты к внутренним элементам */
6
6
  dataAttrs?: {
7
7
  root?: Record<string, string>;
8
- input?: Record<string, string>;
9
8
  };
10
9
  /** Дополнительный класс корневого элемента */
11
10
  className?: string;
@@ -40,7 +40,7 @@ var Switcher = function Switcher(_ref) {
40
40
  size: textSize,
41
41
  left: true
42
42
  })
43
- }, children), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.input), {
43
+ }, children), /*#__PURE__*/React.createElement("div", {
44
44
  className: cn('input', {
45
45
  checked: checked,
46
46
  disabled: disabled,
@@ -50,7 +50,7 @@ var Switcher = function Switcher(_ref) {
50
50
  onClick: handleChange,
51
51
  onKeyDown: handleChange,
52
52
  tabIndex: isInteractiveDisabled ? undefined : 0
53
- }), showLoader && !disabled && /*#__PURE__*/React.createElement("div", {
53
+ }, showLoader && !disabled && /*#__PURE__*/React.createElement("div", {
54
54
  className: cn('loader')
55
55
  }), /*#__PURE__*/React.createElement("div", {
56
56
  className: cn('pointer')
@@ -63,8 +63,7 @@ var Switcher = function Switcher(_ref) {
63
63
 
64
64
  Switcher.propTypes = {
65
65
  dataAttrs: PropTypes.shape({
66
- root: PropTypes.objectOf(PropTypes.string.isRequired),
67
- input: PropTypes.objectOf(PropTypes.string.isRequired)
66
+ root: PropTypes.objectOf(PropTypes.string.isRequired)
68
67
  }),
69
68
  className: PropTypes.string,
70
69
  textSize: PropTypes.oneOf(['small', 'medium']),