@megafon/ui-core 4.0.0-beta.9 → 4.0.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 (60) hide show
  1. package/CHANGELOG.md +74 -16
  2. package/dist/es/components/Accordion/Accordion.css +6 -4
  3. package/dist/es/components/Badges/components/PromoBadge/PromoBadge.css +4 -0
  4. package/dist/es/components/Badges/components/PromoBadge/PromoBadge.d.ts +1 -0
  5. package/dist/es/components/Badges/components/PromoBadge/PromoBadge.js +2 -1
  6. package/dist/es/components/Banner/Banner.css +3 -0
  7. package/dist/es/components/Banner/Banner.d.ts +2 -0
  8. package/dist/es/components/Banner/Banner.js +5 -1
  9. package/dist/es/components/Carousel/Carousel.d.ts +2 -0
  10. package/dist/es/components/Carousel/Carousel.js +7 -2
  11. package/dist/es/components/ContentArea/ContentArea.css +0 -10
  12. package/dist/es/components/ContentArea/ContentArea.d.ts +0 -1
  13. package/dist/es/components/ContentArea/ContentArea.js +1 -3
  14. package/dist/es/components/Header/Header.d.ts +1 -1
  15. package/dist/es/components/Header/Header.js +4 -4
  16. package/dist/es/components/List/List.d.ts +1 -1
  17. package/dist/es/components/List/List.js +3 -3
  18. package/dist/es/components/Notification/Notification.css +20 -7
  19. package/dist/es/components/Search/Search.css +19 -1
  20. package/dist/es/components/Search/Search.d.ts +6 -0
  21. package/dist/es/components/Search/Search.js +12 -3
  22. package/dist/es/components/Select/Select.css +41 -26
  23. package/dist/es/components/Select/Select.d.ts +7 -0
  24. package/dist/es/components/Select/Select.js +14 -5
  25. package/dist/es/components/Tabs/Tabs.css +12 -1
  26. package/dist/es/components/Tabs/Tabs.d.ts +3 -3
  27. package/dist/es/components/Tabs/Tabs.js +8 -6
  28. package/dist/es/components/TextField/TextField.css +33 -20
  29. package/dist/es/components/TextField/TextField.d.ts +2 -0
  30. package/dist/es/components/TextField/TextField.js +14 -9
  31. package/dist/lib/components/Accordion/Accordion.css +6 -4
  32. package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.css +4 -0
  33. package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.d.ts +1 -0
  34. package/dist/lib/components/Badges/components/PromoBadge/PromoBadge.js +2 -1
  35. package/dist/lib/components/Banner/Banner.css +3 -0
  36. package/dist/lib/components/Banner/Banner.d.ts +2 -0
  37. package/dist/lib/components/Banner/Banner.js +5 -1
  38. package/dist/lib/components/Carousel/Carousel.d.ts +2 -0
  39. package/dist/lib/components/Carousel/Carousel.js +7 -2
  40. package/dist/lib/components/ContentArea/ContentArea.css +0 -10
  41. package/dist/lib/components/ContentArea/ContentArea.d.ts +0 -1
  42. package/dist/lib/components/ContentArea/ContentArea.js +1 -3
  43. package/dist/lib/components/Header/Header.d.ts +1 -1
  44. package/dist/lib/components/Header/Header.js +4 -4
  45. package/dist/lib/components/List/List.d.ts +1 -1
  46. package/dist/lib/components/List/List.js +3 -3
  47. package/dist/lib/components/Notification/Notification.css +20 -7
  48. package/dist/lib/components/Search/Search.css +19 -1
  49. package/dist/lib/components/Search/Search.d.ts +6 -0
  50. package/dist/lib/components/Search/Search.js +15 -4
  51. package/dist/lib/components/Select/Select.css +41 -26
  52. package/dist/lib/components/Select/Select.d.ts +7 -0
  53. package/dist/lib/components/Select/Select.js +16 -6
  54. package/dist/lib/components/Tabs/Tabs.css +12 -1
  55. package/dist/lib/components/Tabs/Tabs.d.ts +3 -3
  56. package/dist/lib/components/Tabs/Tabs.js +10 -8
  57. package/dist/lib/components/TextField/TextField.css +33 -20
  58. package/dist/lib/components/TextField/TextField.d.ts +2 -0
  59. package/dist/lib/components/TextField/TextField.js +14 -9
  60. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -3,65 +3,123 @@
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
- # [4.0.0-beta.9](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.8...@megafon/ui-core@4.0.0-beta.9) (2022-07-15)
6
+ ## [4.0.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.1...@megafon/ui-core@4.0.2) (2022-09-14)
7
7
 
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
- * **select:** update styles ([b863c8c](https://github.com/MegafonWebLab/megafon-ui/commit/b863c8c94af251d6b3c9ee39124486d7d5db9a58))
11
+ * change ui-icons peer dependecy ([4936d3f](https://github.com/MegafonWebLab/megafon-ui/commit/4936d3f7d4b04d1dd8fde870c4b251f8ff36c958))
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
- # [4.0.0-beta.8](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.7...@megafon/ui-core@4.0.0-beta.8) (2022-07-14)
17
+ ## [4.0.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0...@megafon/ui-core@4.0.1) (2022-09-14)
18
18
 
19
19
 
20
20
  ### Bug Fixes
21
21
 
22
- * **accordion:** change focus and dark theme styles ([d3e07ea](https://github.com/MegafonWebLab/megafon-ui/commit/d3e07ea6fee0c131e25db1bb558d8b205d201e0c))
23
- * **notification:** change title typography ([f91a60e](https://github.com/MegafonWebLab/megafon-ui/commit/f91a60ee1562626494358ef529321f072ba70890))
24
- * **tabs:** change dark theme and indents styles ([272dfcb](https://github.com/MegafonWebLab/megafon-ui/commit/272dfcbeef750f2f7ae097b46f7d98405cf53a88))
22
+ * remove forgotten deprecated props ([3acaf97](https://github.com/MegafonWebLab/megafon-ui/commit/3acaf9731780f89c7087a8b6f9af943a62f7a185))
25
23
 
26
24
 
27
- ### Features
28
25
 
29
- * **header:** add new prop space ([e5bef7c](https://github.com/MegafonWebLab/megafon-ui/commit/e5bef7c8e13c57e477a4c25f07a4a4a6dbb8b6bd))
30
26
 
31
27
 
28
+ # [4.0.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.14.0...@megafon/ui-core@4.0.0) (2022-09-14)
32
29
 
33
30
 
31
+ ### Bug Fixes
34
32
 
35
- # [4.0.0-beta.7](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.6...@megafon/ui-core@4.0.0-beta.7) (2022-07-13)
33
+ * **accordion:** change focus and dark theme styles ([52b9b80](https://github.com/MegafonWebLab/megafon-ui/commit/52b9b80131013178edb52a9b64f681ede3ca44ae))
34
+ * **accordion:** fixes top and bottom padding for title wrap ([ea078f4](https://github.com/MegafonWebLab/megafon-ui/commit/ea078f47aa61f1f0f3ab531b6189e035cc2f9a50))
35
+ * **accordion:** update mobile styles ([ec039a1](https://github.com/MegafonWebLab/megafon-ui/commit/ec039a12cd27a2dba7646a516c9375dbe454203a))
36
+ * **notification:** change title typography ([74edb02](https://github.com/MegafonWebLab/megafon-ui/commit/74edb0254e77d05cc15630d699d98400b00ee158))
37
+ * **notification:** fix bottom gaps ([8bdf732](https://github.com/MegafonWebLab/megafon-ui/commit/8bdf7320dd57d91c6693dfa2b6d0c2d4860dccef))
38
+ * **notification:** fix margin for bottom block ([2a62d08](https://github.com/MegafonWebLab/megafon-ui/commit/2a62d0826f8fc7d92cc5ab5bc11489478a4f711f))
39
+ * **notification:** fixes passive close icon color for colored error type ([4bb3db7](https://github.com/MegafonWebLab/megafon-ui/commit/4bb3db72374c44fd2e6128fac06eae33418bebbd))
40
+ * **search:** add modifier for item paddings ([cea9ad0](https://github.com/MegafonWebLab/megafon-ui/commit/cea9ad05c3d9fc31e883eb4cccdb714499fae5b8))
41
+ * **search:** fixes hidden placeholder on focus for firefox ([c3177f4](https://github.com/MegafonWebLab/megafon-ui/commit/c3177f4da6358da851c0795e64f4025d9456390d))
42
+ * **select:** add modifier for item paddings ([e363aa2](https://github.com/MegafonWebLab/megafon-ui/commit/e363aa270ac3e0d65c34919e87756687082b2894))
43
+ * **select:** fix items overflow ([2d4a861](https://github.com/MegafonWebLab/megafon-ui/commit/2d4a86151d8575e82a9957366f7d515333543e6c))
44
+ * **select:** fix styles ([f92079c](https://github.com/MegafonWebLab/megafon-ui/commit/f92079c21330baec2aa5eb333dbe2c631fa74939))
45
+ * **select:** fixes hidden placeholder on focus for firefox ([1a965f7](https://github.com/MegafonWebLab/megafon-ui/commit/1a965f71e0876e05fbc8dfdfe4ddc25e3eb67bb2))
46
+ * **select:** update styles ([878d579](https://github.com/MegafonWebLab/megafon-ui/commit/878d579f9ca21e20996e9e3bea4c083fe736e322))
47
+ * **select:** update value check for undefined ([40fe547](https://github.com/MegafonWebLab/megafon-ui/commit/40fe54706093aeab25ab3162e48f523fd25495bf))
48
+ * **tabs:** change dark theme and indents styles ([4cd4c1b](https://github.com/MegafonWebLab/megafon-ui/commit/4cd4c1bda7cae3c501f6c275a959df3097ca7b6d))
49
+ * **tabs:** fix container alignment ([188ae36](https://github.com/MegafonWebLab/megafon-ui/commit/188ae36ebd677982d5be35efae6e94ab5442b308))
50
+ * **tabs:** fix swiper arrows ([ca5d5d7](https://github.com/MegafonWebLab/megafon-ui/commit/ca5d5d7a83df6ed7dea0530bdaec25a123643185))
51
+ * **tabs:** fix swiper overflow and box-sizing ([ff71fb3](https://github.com/MegafonWebLab/megafon-ui/commit/ff71fb3f5e24663d59a2661427f187d600f397a9))
52
+ * **textfield:** fix label styles ([bf6eeee](https://github.com/MegafonWebLab/megafon-ui/commit/bf6eeeeca96cb8dacafe2e33247bacaaca04adc9))
53
+ * **textfield:** fix textarea design bugs ([d903435](https://github.com/MegafonWebLab/megafon-ui/commit/d9034354d5239cd00472fa19c472b6cde7566335))
54
+ * **textfield:** fixes notice text transition ([0585505](https://github.com/MegafonWebLab/megafon-ui/commit/05855055cf5c76a419471ac130587060431af0fd))
55
+ * **textfield:** fixes permanently visible block after the field ([b7355ef](https://github.com/MegafonWebLab/megafon-ui/commit/b7355ef4595922978a208356a5a64f9ded9cae8d))
56
+ * **textfield:** hide verification icon for disabled field ([37de2a2](https://github.com/MegafonWebLab/megafon-ui/commit/37de2a26bb4e61f9b10102d652a2c42a6fd220a5))
57
+ * **textfield:** returned correct color to notice text ([2448a84](https://github.com/MegafonWebLab/megafon-ui/commit/2448a841942af7765da84e403d4c644af38be6ac))
58
+ * **textfield:** update textarea scroll and resize ([af85c70](https://github.com/MegafonWebLab/megafon-ui/commit/af85c70fbb1b598f733bbc92ed3f5cc4f499f6c4))
36
59
 
37
60
 
38
- ### Bug Fixes
61
+ ### Features
39
62
 
40
- * **select:** fix styles ([3e79c68](https://github.com/MegafonWebLab/megafon-ui/commit/3e79c68fecde72e515b7ef52d38d9188e51680f6))
63
+ * **accordion:** update by new design ([b11ead5](https://github.com/MegafonWebLab/megafon-ui/commit/b11ead5db95675f25354634930f5c3fffb207dbf))
64
+ * **caption:** add new Caption component; update .smallFont() less mixin ([31156ff](https://github.com/MegafonWebLab/megafon-ui/commit/31156ff6ff4d47713be7e44f7e1d31508ad75288))
65
+ * **header:** add new prop space ([7a9479e](https://github.com/MegafonWebLab/megafon-ui/commit/7a9479e85c1f5c19b7f2bae2e6a4d234712f2d7c))
66
+ * **inputlabel:** component removed ([418fd61](https://github.com/MegafonWebLab/megafon-ui/commit/418fd618095da254bbfd0825b24a668c15d70d64))
67
+ * **paragraph:** remove prop size; add new prop; add 'pale' option to colors ([32b0c54](https://github.com/MegafonWebLab/megafon-ui/commit/32b0c54eaf82ceb1f24d5fc90a9aa81d3e427ee3))
68
+ * **search:** changed dropdown list item height ([c2932fe](https://github.com/MegafonWebLab/megafon-ui/commit/c2932fefafa67a6a69353c9edc49ccfc86a42dcf))
69
+ * **search:** component redesign ([fe62aff](https://github.com/MegafonWebLab/megafon-ui/commit/fe62aff90aee0109072514ef230d1d8689ef10ba))
70
+ * **select:** component redesign ([b7d552f](https://github.com/MegafonWebLab/megafon-ui/commit/b7d552fe1ba0bae93fe1cbf864b469f9ed4bc9ce))
71
+ * **select:** fixed label position with empty string value and minor style changes ([eeaa6bb](https://github.com/MegafonWebLab/megafon-ui/commit/eeaa6bbd18740acdc450843465525ab0d2e2983b))
72
+ * **tabs:** update by new design ([08d76f0](https://github.com/MegafonWebLab/megafon-ui/commit/08d76f0e15b8b7a54a18d7f115db4744b12e8ac2))
73
+ * **textfield:** add prop hidePlaceholder ([609b4db](https://github.com/MegafonWebLab/megafon-ui/commit/609b4dbfc028897e0f47b07246b0e2d8b066871b))
74
+ * **textfield:** update by new design ([f922fed](https://github.com/MegafonWebLab/megafon-ui/commit/f922fedc186bbe02fb2cf6a554edbd3a208ad60c))
75
+
76
+
77
+ ### BREAKING CHANGES
78
+
79
+ * **inputlabel:** inputLabel component removed due to non-use
80
+ * **textfield:** add defaultTransitionTiming in less global variables
81
+ * **tabs:** new prop autoWidth added
82
+ size prop small vallue removed
83
+ new sizes
84
+ * **textfield:** add placeholders text by default
85
+ label element positon changed
86
+ if label prop not setted, label element has text from placeholder (default or in props)
87
+ * **accordion:** change next-sibling accordion styles
88
+ * **caption:** .smallFont() less mixin line-height rule now set to 18px instead of 16px
89
+ either accept new rules or manually add line-height: 16px in your components
90
+ * **paragraph:** prop 'size' is no longer exists.
91
+ use component Caption instead of Paragraph size="small"
41
92
 
42
93
 
43
94
 
44
95
 
45
96
 
46
- # [4.0.0-beta.6](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.5...@megafon/ui-core@4.0.0-beta.6) (2022-07-05)
97
+ # [3.14.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.13.0...@megafon/ui-core@3.14.0) (2022-09-06)
47
98
 
48
99
 
49
100
  ### Features
50
101
 
51
- * **inputlabel:** component removed ([1f236ac](https://github.com/MegafonWebLab/megafon-ui/commit/1f236ace90acfd7ea1917422677fa24c1c5abdf4))
52
- * **search:** component redesign ([d6f11eb](https://github.com/MegafonWebLab/megafon-ui/commit/d6f11eb7ee810b835879c7a31e5e01c426060ea1))
53
- * **select:** component redesign ([aeeda00](https://github.com/MegafonWebLab/megafon-ui/commit/aeeda00dfc1db70421a495a686954e19eecf815d))
102
+ * **badge:** add new promo badge type ([8cbe525](https://github.com/MegafonWebLab/megafon-ui/commit/8cbe5253b9d08c19c9343b42cb3920ac259c8844))
103
+ * **carousel:** add new prop slideToClickedSlide ([8a43432](https://github.com/MegafonWebLab/megafon-ui/commit/8a4343290f943475c8522adaa3ad2b564c551d83))
104
+
54
105
 
55
106
 
56
107
  ### BREAKING CHANGES
57
108
 
58
109
  * **inputlabel:** inputLabel component removed due to non-use
59
110
 
111
+ # [3.13.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.12.1...@megafon/ui-core@3.13.0) (2022-08-11)
112
+
113
+
114
+ ### Features
115
+
116
+ * **banner:** add auto height ([c7658fa](https://github.com/MegafonWebLab/megafon-ui/commit/c7658faf335bc26f0a1b816e29b9cca114944691))
117
+
60
118
 
61
119
 
62
120
 
63
121
 
64
- # [4.0.0-beta.5](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.12.0...@megafon/ui-core@4.0.0-beta.5) (2022-06-29)
122
+ ## [3.12.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.12.0...@megafon/ui-core@3.12.1) (2022-08-02)
65
123
 
66
124
 
67
125
  ### Bug Fixes
@@ -12,7 +12,7 @@
12
12
  }
13
13
  .mfui-accordion__title-wrap {
14
14
  position: relative;
15
- padding: 20px 20px 44px 16px;
15
+ padding: 24px 44px 24px 16px;
16
16
  border-radius: 12px;
17
17
  cursor: pointer;
18
18
  -webkit-transition: background-color 0.3s;
@@ -20,14 +20,16 @@
20
20
  }
21
21
  @media screen and (min-width: 768px) {
22
22
  .mfui-accordion__title-wrap {
23
- padding: 20px 56px 20px 24px;
23
+ padding: 24px 56px 24px 24px;
24
24
  }
25
25
  }
26
26
  .mfui-accordion__title-wrap:hover {
27
27
  background-color: var(--spbSky1);
28
28
  }
29
- .mfui-accordion__title-wrap:focus {
30
- background-color: inherit;
29
+ @media screen and (max-width: 1023px) {
30
+ .mfui-accordion__title-wrap:focus {
31
+ background-color: inherit;
32
+ }
31
33
  }
32
34
  .mfui-accordion__icon-box {
33
35
  position: absolute;
@@ -27,6 +27,10 @@
27
27
  .mfui-promo-badge_type_user-choice {
28
28
  background-color: var(--reflexBlue);
29
29
  }
30
+ .mfui-promo-badge_type_interests {
31
+ background-color: var(--brandPurple20);
32
+ color: var(--brandPurple);
33
+ }
30
34
  .mfui-promo-badge__text {
31
35
  font-family: inherit;
32
36
  font-size: 12px;
@@ -6,6 +6,7 @@ export declare const PromoBadgeTypes: {
6
6
  readonly VIP: "vip";
7
7
  readonly POPULAR: "popular";
8
8
  readonly USER_CHOICE: "user-choice";
9
+ readonly INTERESTS: "interests";
9
10
  };
10
11
  declare type PromoBadgeTypesType = typeof PromoBadgeTypes[keyof typeof PromoBadgeTypes];
11
12
  export interface IPromoBadgeProps {
@@ -9,7 +9,8 @@ export var PromoBadgeTypes = {
9
9
  NEW: 'new',
10
10
  VIP: 'vip',
11
11
  POPULAR: 'popular',
12
- USER_CHOICE: 'user-choice'
12
+ USER_CHOICE: 'user-choice',
13
+ INTERESTS: 'interests'
13
14
  };
14
15
  var cn = cnCreate('mfui-promo-badge');
15
16
 
@@ -36,6 +36,9 @@
36
36
  height: 400px;
37
37
  }
38
38
  }
39
+ .mfui-banner_auto-height .mfui-banner__slide {
40
+ height: auto;
41
+ }
39
42
  @media screen and (min-width: 1024px) {
40
43
  .mfui-banner .swiper-slide-visible {
41
44
  opacity: 1;
@@ -36,6 +36,8 @@ export interface IBannerProps {
36
36
  pauseOnHover?: boolean;
37
37
  /** Цветовая тема навигации */
38
38
  navTheme?: NavThemeType;
39
+ /** Автоматическая высота слайдов */
40
+ autoHeight?: boolean;
39
41
  /** Обработчик клика по стрелке "вперед" (должен быть обернут в useCallback) */
40
42
  onNextClick?: (index: number) => void;
41
43
  /** Обработчик клика по стрелке "назад" (должен быть обернут в useCallback) */
@@ -43,6 +43,8 @@ var Banner = function Banner(_ref) {
43
43
  loop = _ref$loop === void 0 ? false : _ref$loop,
44
44
  _ref$navTheme = _ref.navTheme,
45
45
  navTheme = _ref$navTheme === void 0 ? 'light' : _ref$navTheme,
46
+ _ref$autoHeight = _ref.autoHeight,
47
+ autoHeight = _ref$autoHeight === void 0 ? false : _ref$autoHeight,
46
48
  _ref$children = _ref.children,
47
49
  children = _ref$children === void 0 ? [] : _ref$children,
48
50
  onNextClick = _ref.onNextClick,
@@ -178,7 +180,8 @@ var Banner = function Banner(_ref) {
178
180
  }, [autoPlay, pauseOnHover, swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.autoplay]);
179
181
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
180
182
  className: cn({
181
- 'nav-theme': navTheme
183
+ 'nav-theme': navTheme,
184
+ 'auto-height': autoHeight
182
185
  }, className),
183
186
  ref: rootRef
184
187
  }), /*#__PURE__*/React.createElement(Swiper, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.swiper), {
@@ -259,6 +262,7 @@ Banner.propTypes = {
259
262
  autoPlayDelay: PropTypes.number,
260
263
  pauseOnHover: PropTypes.bool,
261
264
  navTheme: PropTypes.oneOf(Object.values(NavTheme)),
265
+ autoHeight: PropTypes.bool,
262
266
  onNextClick: PropTypes.func,
263
267
  onPrevClick: PropTypes.func,
264
268
  onDotClick: PropTypes.func,
@@ -72,6 +72,8 @@ export interface ICarouselProps {
72
72
  effectTheme?: EffectThemeType;
73
73
  /** Css селектор элемента, при перетаскивании которого не будет происходить смена слайдов */
74
74
  noSwipingSelector?: string;
75
+ /** Свайп к слайду, по которому произведен клик */
76
+ slideToClickedSlide?: boolean;
75
77
  /** Ref на swiper */
76
78
  getSwiper?: (instance: SwiperCore) => void;
77
79
  /** Обработчик клика по стрелке вперед (должен быть обернут в useCallback) */
@@ -92,7 +92,9 @@ var Carousel = function Carousel(_ref) {
92
92
  getSwiper = _ref.getSwiper,
93
93
  onNextClick = _ref.onNextClick,
94
94
  onPrevClick = _ref.onPrevClick,
95
- onChange = _ref.onChange;
95
+ onChange = _ref.onChange,
96
+ _ref$slideToClickedSl = _ref.slideToClickedSlide,
97
+ slideToClickedSlide = _ref$slideToClickedSl === void 0 ? false : _ref$slideToClickedSl;
96
98
 
97
99
  var _React$useState = React.useState(),
98
100
  _React$useState2 = _slicedToArray(_React$useState, 2),
@@ -219,7 +221,9 @@ var Carousel = function Carousel(_ref) {
219
221
  };
220
222
 
221
223
  var disableFocusOnSlideClick = function disableFocusOnSlideClick(e) {
222
- e.nativeEvent.preventDefault();
224
+ if (e.nativeEvent.target.closest(".".concat(cn()))) {
225
+ e.nativeEvent.preventDefault();
226
+ }
223
227
  };
224
228
 
225
229
  React.useEffect(function () {
@@ -263,6 +267,7 @@ var Carousel = function Carousel(_ref) {
263
267
  allowTouchMove: !disableTouchMove,
264
268
  centeredSlides: centeredSlides,
265
269
  effect: effectTheme,
270
+ slideToClickedSlide: slideToClickedSlide,
266
271
  fadeEffect: effectTheme === EffectTheme.FADE ? {
267
272
  crossFade: effectTheme === EffectTheme.FADE
268
273
  } : undefined,
@@ -5,10 +5,6 @@ h4,
5
5
  h5 {
6
6
  margin: 0;
7
7
  }
8
- .mfui-content-area {
9
- /* deprecated */
10
- /* deprecated */
11
- }
12
8
  .mfui-content-area_background-color_transparent {
13
9
  background-color: transparent;
14
10
  }
@@ -33,9 +29,6 @@ h5 {
33
29
  .mfui-content-area_background-color_spbSky2 {
34
30
  background-color: var(--spbSky2);
35
31
  }
36
- .mfui-content-area_background-color_default {
37
- background-color: var(--content);
38
- }
39
32
  .mfui-content-area__inner {
40
33
  -webkit-box-sizing: content-box;
41
34
  box-sizing: content-box;
@@ -108,6 +101,3 @@ h5 {
108
101
  .mfui-content-area__inner_background-color_spbSky2 {
109
102
  background-color: var(--spbSky2);
110
103
  }
111
- .mfui-content-area__inner_background-color_default {
112
- background-color: var(--content);
113
- }
@@ -9,7 +9,6 @@ declare const BACKGROUND_COLORS: {
9
9
  readonly SPB_SKY_0: "spbSky0";
10
10
  readonly SPB_SKY_1: "spbSky1";
11
11
  readonly SPB_SKY_2: "spbSky2";
12
- readonly DEFAULT: "default";
13
12
  };
14
13
  export declare type BackgroundColorType = typeof BACKGROUND_COLORS[keyof typeof BACKGROUND_COLORS];
15
14
  declare const DisableIndents: {
@@ -11,9 +11,7 @@ var BACKGROUND_COLORS = {
11
11
  PURPLE: 'purple',
12
12
  SPB_SKY_0: 'spbSky0',
13
13
  SPB_SKY_1: 'spbSky1',
14
- SPB_SKY_2: 'spbSky2',
15
- // @deprecated
16
- DEFAULT: 'default'
14
+ SPB_SKY_2: 'spbSky2'
17
15
  };
18
16
  var DisableIndents = {
19
17
  MOBILE: 'mobile',
@@ -18,7 +18,7 @@ interface IHeaderProps {
18
18
  root?: Record<string, string>;
19
19
  };
20
20
  /** Горизонтальное выравнивание */
21
- hAlign?: 'inherit' | 'left' | 'center' | 'right';
21
+ align?: 'inherit' | 'left' | 'center' | 'right';
22
22
  /** Обработчик клика */
23
23
  onClick?: (e: React.SyntheticEvent<EventTarget>) => void;
24
24
  }
@@ -16,8 +16,8 @@ var Header = function Header(_ref) {
16
16
  _ref$color = _ref.color,
17
17
  color = _ref$color === void 0 ? 'default' : _ref$color,
18
18
  dataAttrs = _ref.dataAttrs,
19
- _ref$hAlign = _ref.hAlign,
20
- hAlign = _ref$hAlign === void 0 ? 'inherit' : _ref$hAlign,
19
+ _ref$align = _ref.align,
20
+ align = _ref$align === void 0 ? 'inherit' : _ref$align,
21
21
  margin = _ref.margin,
22
22
  onClick = _ref.onClick;
23
23
  var ElementType = level;
@@ -28,7 +28,7 @@ var Header = function Header(_ref) {
28
28
  color: color,
29
29
  margin: margin,
30
30
  level: level,
31
- 'h-align': hAlign,
31
+ 'h-align': align,
32
32
  space: spaceLevel
33
33
  }, className),
34
34
  onClick: onClick
@@ -43,7 +43,7 @@ Header.propTypes = {
43
43
  space: PropTypes.oneOf(['wide', 'tight']),
44
44
  margin: PropTypes.bool,
45
45
  addition: PropTypes.element,
46
- hAlign: PropTypes.oneOf(['inherit', 'left', 'center', 'right']),
46
+ align: PropTypes.oneOf(['inherit', 'left', 'center', 'right']),
47
47
  dataAttrs: PropTypes.shape({
48
48
  root: PropTypes.objectOf(PropTypes.string.isRequired)
49
49
  }),
@@ -4,7 +4,7 @@ export interface IListProps {
4
4
  /** Тип списка */
5
5
  as?: 'ul' | 'ol';
6
6
  /** Выравнивание по горизонтали */
7
- hAlign?: 'center' | 'right';
7
+ align?: 'center' | 'right';
8
8
  /** Жирность шрифта */
9
9
  weight?: 'light' | 'regular' | 'bold';
10
10
  /** Цвет */
@@ -11,13 +11,13 @@ var List = function List(_ref) {
11
11
  color = _ref$color === void 0 ? 'default' : _ref$color,
12
12
  _ref$weight = _ref.weight,
13
13
  weight = _ref$weight === void 0 ? 'regular' : _ref$weight,
14
- hAlign = _ref.hAlign,
14
+ align = _ref.align,
15
15
  className = _ref.className,
16
16
  children = _ref.children;
17
17
  var ElementType = as;
18
18
  return /*#__PURE__*/React.createElement(ElementType, {
19
19
  className: cn({
20
- 'h-align': hAlign,
20
+ 'h-align': align,
21
21
  color: color,
22
22
  weight: weight,
23
23
  type: as
@@ -27,7 +27,7 @@ var List = function List(_ref) {
27
27
 
28
28
  List.propTypes = {
29
29
  as: PropTypes.oneOf(['ul', 'ol']),
30
- hAlign: PropTypes.oneOf(['center', 'right']),
30
+ align: PropTypes.oneOf(['center', 'right']),
31
31
  weight: PropTypes.oneOf(['light', 'regular', 'bold']),
32
32
  color: PropTypes.oneOf(['default', 'black', 'white', 'gray', 'green', 'purple', 'red', 'inherit']),
33
33
  className: PropTypes.string
@@ -132,7 +132,6 @@ h5 {
132
132
  display: -webkit-box;
133
133
  display: -ms-flexbox;
134
134
  display: flex;
135
- gap: 16px;
136
135
  -webkit-box-align: end;
137
136
  -ms-flex-align: end;
138
137
  align-items: flex-end;
@@ -142,16 +141,10 @@ h5 {
142
141
  width: 100%;
143
142
  margin-top: 8px;
144
143
  }
145
- @media screen and (min-width: 768px) {
146
- .mfui-notification__bottom {
147
- gap: 20px;
148
- }
149
- }
150
144
  .mfui-notification__bottom-block {
151
145
  display: -webkit-box;
152
146
  display: -ms-flexbox;
153
147
  display: flex;
154
- gap: 16px;
155
148
  overflow: hidden;
156
149
  }
157
150
  .mfui-notification__bottom_has-button {
@@ -175,6 +168,9 @@ h5 {
175
168
  line-height: 18px;
176
169
  }
177
170
  }
171
+ .mfui-notification__button + .mfui-notification__link {
172
+ margin-left: 16px;
173
+ }
178
174
  .mfui-notification__link-arrow,
179
175
  .mfui-notification__collapse-arrow {
180
176
  width: 20px;
@@ -214,6 +210,15 @@ h5 {
214
210
  .mfui-notification__collapse-button {
215
211
  font-size: 12px;
216
212
  line-height: 18px;
213
+ margin-left: 16px;
214
+ }
215
+ }
216
+ .mfui-notification__bottom-block + .mfui-notification__collapse-button {
217
+ margin-left: 20px;
218
+ }
219
+ @media screen and (max-width: 767px) {
220
+ .mfui-notification__bottom-block + .mfui-notification__collapse-button {
221
+ margin-left: 16px;
217
222
  }
218
223
  }
219
224
  .mfui-notification__collapse_hidden {
@@ -331,3 +336,11 @@ h5 {
331
336
  /* stylelint-disable-line max-nesting-depth */
332
337
  fill: var(--stcWhite);
333
338
  }
339
+ .mfui-notification_colored.mfui-notification_type_error .mfui-notification__close:not(:hover) {
340
+ background-color: var(--stcWhite20);
341
+ }
342
+ .mfui-notification_colored.mfui-notification_type_error .mfui-notification__close:not(:hover) .mfui-notification__close-icon {
343
+ /* stylelint-disable-line max-nesting-depth */
344
+ opacity: 1;
345
+ fill: var(--stcWhite);
346
+ }
@@ -141,6 +141,15 @@
141
141
  .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus:-ms-input-placeholder {
142
142
  opacity: 1;
143
143
  }
144
+ .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-moz-placeholder {
145
+ opacity: 1;
146
+ }
147
+ .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-ms-input-placeholder {
148
+ opacity: 1;
149
+ }
150
+ .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::placeholder {
151
+ opacity: 1;
152
+ }
144
153
  .mfui-search__search-field_filled + .mfui-search__label,
145
154
  .mfui-search__search-field:focus + .mfui-search__label {
146
155
  -webkit-transform: scale(0.8) translate(-12.5%, -75%);
@@ -224,11 +233,20 @@
224
233
  }
225
234
  .mfui-search__list-item {
226
235
  font-family: inherit;
227
- padding: 8px 32px;
236
+ padding-top: 12px;
237
+ padding-bottom: 12px;
228
238
  border-radius: 16px;
229
239
  background-color: var(--base);
230
240
  cursor: pointer;
231
241
  }
242
+ .mfui-search__list-item_paddings_large {
243
+ padding-right: 32px;
244
+ padding-left: 32px;
245
+ }
246
+ .mfui-search__list-item_paddings_small {
247
+ padding-right: 12px;
248
+ padding-left: 12px;
249
+ }
232
250
  .mfui-search__list-item_active {
233
251
  background-color: var(--spbSky0);
234
252
  }
@@ -6,11 +6,17 @@ export declare const Verification: {
6
6
  };
7
7
  declare type VerificationType = typeof Verification[keyof typeof Verification];
8
8
  declare type ElementOrString = JSX.Element[] | JSX.Element | Element[] | Element;
9
+ export declare const SearchItemsPaddings: {
10
+ readonly SMALL: "small";
11
+ readonly LARGE: "large";
12
+ };
9
13
  export declare type SearchItem = {
10
14
  /** Значение value элемента */
11
15
  value: string;
12
16
  /** Настраиваемое отображение элементов в выпадающем списке */
13
17
  searchView?: ElementOrString;
18
+ /** Размер горизонтальных отступов элемента */
19
+ paddings?: typeof SearchItemsPaddings[keyof typeof SearchItemsPaddings];
14
20
  };
15
21
  export interface ISearchProps {
16
22
  /** Дополнительные data атрибуты к внутренним элементам */
@@ -1,4 +1,5 @@
1
1
  import "core-js/modules/es.array.map";
2
+ import "core-js/modules/es.object.values";
2
3
  import "core-js/modules/es.regexp.constructor";
3
4
  import "core-js/modules/es.regexp.exec";
4
5
  import "core-js/modules/es.regexp.to-string";
@@ -24,6 +25,10 @@ export var Verification = {
24
25
  VALID: 'valid',
25
26
  ERROR: 'error'
26
27
  };
28
+ export var SearchItemsPaddings = {
29
+ SMALL: 'small',
30
+ LARGE: 'large'
31
+ };
27
32
  var cn = cnCreate('mfui-search');
28
33
 
29
34
  var Search = function Search(_ref) {
@@ -220,11 +225,14 @@ var Search = function Search(_ref) {
220
225
  className: cn('list-inner')
221
226
  }, items.map(function (_ref2, i) {
222
227
  var itemValue = _ref2.value,
223
- searchView = _ref2.searchView;
228
+ searchView = _ref2.searchView,
229
+ _ref2$paddings = _ref2.paddings,
230
+ paddings = _ref2$paddings === void 0 ? SearchItemsPaddings.LARGE : _ref2$paddings;
224
231
  return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.item, i + 1), {
225
232
  ref: activeIndex === i ? highlightedItem : null,
226
233
  className: cn('list-item', {
227
- active: activeIndex === i
234
+ active: activeIndex === i,
235
+ paddings: paddings
228
236
  }),
229
237
  onMouseDown: handleSelectSubmit(i),
230
238
  onMouseEnter: handleHoverItem(i),
@@ -254,7 +262,8 @@ Search.propTypes = {
254
262
  hideIcon: PropTypes.bool,
255
263
  items: PropTypes.arrayOf(PropTypes.shape({
256
264
  value: PropTypes.string.isRequired,
257
- searchView: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.arrayOf(PropTypes.element)])
265
+ searchView: PropTypes.oneOfType([PropTypes.string, PropTypes.element, PropTypes.arrayOf(PropTypes.element)]),
266
+ paddings: PropTypes.oneOf(Object.values(SearchItemsPaddings))
258
267
  }).isRequired),
259
268
  changeDelay: PropTypes.number,
260
269
  verification: PropTypes.oneOf(['valid', 'error']),