@megafon/ui-core 3.0.0-beta.9 → 3.0.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 (60) hide show
  1. package/CHANGELOG.md +47 -106
  2. package/dist/es/colors/Colors.d.ts +2 -2
  3. package/dist/es/components/Accordion/Accordion.js +1 -1
  4. package/dist/es/components/Banner/Banner.css +28 -0
  5. package/dist/es/components/Banner/Banner.d.ts +2 -0
  6. package/dist/es/components/Banner/Banner.js +15 -10
  7. package/dist/es/components/Button/Button.js +3 -3
  8. package/dist/es/components/Calendar/Calendar.js +3 -2
  9. package/dist/es/components/Calendar/components/Day/Day.js +1 -1
  10. package/dist/es/components/Carousel/Carousel.js +17 -14
  11. package/dist/es/components/Checkbox/Checkbox.js +1 -1
  12. package/dist/es/components/Counter/Counter.js +3 -3
  13. package/dist/es/components/Link/Link.d.ts +1 -1
  14. package/dist/es/components/Link/Link.js +19 -27
  15. package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +1 -1
  16. package/dist/es/components/Pagination/helpers.d.ts +1 -1
  17. package/dist/es/components/Paragraph/Paragraph.css +0 -9
  18. package/dist/es/components/Paragraph/Paragraph.d.ts +0 -3
  19. package/dist/es/components/Paragraph/Paragraph.js +1 -4
  20. package/dist/es/components/RadioButton/RadioButton.js +1 -1
  21. package/dist/es/components/Search/Search.js +4 -3
  22. package/dist/es/components/Select/Select.js +6 -14
  23. package/dist/es/components/Switcher/Switcher.css +19 -15
  24. package/dist/es/components/Switcher/Switcher.js +1 -1
  25. package/dist/es/components/Tabs/Tabs.d.ts +2 -0
  26. package/dist/es/components/Tabs/Tabs.js +94 -49
  27. package/dist/es/components/TextField/TextField.d.ts +3 -1
  28. package/dist/es/components/TextField/TextField.js +14 -10
  29. package/dist/es/components/Tile/Tile.js +1 -1
  30. package/dist/es/components/Tooltip/Tooltip.js +17 -17
  31. package/dist/lib/colors/Colors.d.ts +2 -2
  32. package/dist/lib/components/Accordion/Accordion.js +1 -1
  33. package/dist/lib/components/Banner/Banner.css +28 -0
  34. package/dist/lib/components/Banner/Banner.d.ts +2 -0
  35. package/dist/lib/components/Banner/Banner.js +15 -10
  36. package/dist/lib/components/Button/Button.js +3 -3
  37. package/dist/lib/components/Calendar/Calendar.js +3 -3
  38. package/dist/lib/components/Calendar/components/Day/Day.js +1 -1
  39. package/dist/lib/components/Carousel/Carousel.js +15 -12
  40. package/dist/lib/components/Checkbox/Checkbox.js +1 -1
  41. package/dist/lib/components/Counter/Counter.js +3 -3
  42. package/dist/lib/components/Link/Link.d.ts +1 -1
  43. package/dist/lib/components/Link/Link.js +28 -43
  44. package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +1 -1
  45. package/dist/lib/components/Pagination/helpers.d.ts +1 -1
  46. package/dist/lib/components/Paragraph/Paragraph.css +0 -9
  47. package/dist/lib/components/Paragraph/Paragraph.d.ts +0 -3
  48. package/dist/lib/components/Paragraph/Paragraph.js +1 -4
  49. package/dist/lib/components/RadioButton/RadioButton.js +1 -1
  50. package/dist/lib/components/Search/Search.js +4 -3
  51. package/dist/lib/components/Select/Select.js +6 -14
  52. package/dist/lib/components/Switcher/Switcher.css +19 -15
  53. package/dist/lib/components/Switcher/Switcher.js +1 -1
  54. package/dist/lib/components/Tabs/Tabs.d.ts +2 -0
  55. package/dist/lib/components/Tabs/Tabs.js +94 -49
  56. package/dist/lib/components/TextField/TextField.d.ts +3 -1
  57. package/dist/lib/components/TextField/TextField.js +14 -10
  58. package/dist/lib/components/Tile/Tile.js +1 -1
  59. package/dist/lib/components/Tooltip/Tooltip.js +17 -17
  60. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -3,64 +3,49 @@
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.0.0-beta.9](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.8...@megafon/ui-core@3.0.0-beta.9) (2022-02-08)
7
-
8
-
9
- ### Features
10
-
11
- * **select:** made select as a functional component ([b45e697](https://github.com/MegafonWebLab/megafon-ui/commit/b45e697de696f892a42a8fa5756289183624fed6))
12
-
13
-
14
-
15
-
16
-
17
- # [3.0.0-beta.8](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.7...@megafon/ui-core@3.0.0-beta.8) (2022-02-08)
18
-
19
-
20
- ### Features
21
-
22
- * **accordion:** remove prop hasVerticalPaddings ([4da8d8e](https://github.com/MegafonWebLab/megafon-ui/commit/4da8d8e7ee843be266749c4e4a8e35c678b9dc2e))
23
-
24
-
25
- ### BREAKING CHANGES
26
-
27
- * **accordion:** remove prop hasVerticalPaddings
28
-
29
-
30
-
31
-
32
-
33
- # [3.0.0-beta.7](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.6...@megafon/ui-core@3.0.0-beta.7) (2022-02-04)
6
+ # [3.0.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.5.0...@megafon/ui-core@3.0.0) (2022-02-09)
34
7
 
35
8
 
36
9
  ### Bug Fixes
37
10
 
38
- * **components:** change tests for dataAttrs prop ([2a8f306](https://github.com/MegafonWebLab/megafon-ui/commit/2a8f3061a4e89f6877894e5947db7bae2827f86a))
11
+ * **accordion:** add focus on arrow after tab press, add open/close accordion after enter press ([5c49447](https://github.com/MegafonWebLab/megafon-ui/commit/5c494474dc319593283b339c63936fd2b862a33f))
12
+ * **accordion:** change type of onClickAccordion prop ([b74e196](https://github.com/MegafonWebLab/megafon-ui/commit/b74e1963587a140bb25b8e50e64490a1337dda78))
13
+ * **calendar/month:** add focus on month arrows, add enter press handlers ([caad017](https://github.com/MegafonWebLab/megafon-ui/commit/caad0176a9d272b19da11ddfac1830d863d090ae))
14
+ * **checkbox:** add focus on custom checkbox, add enter press handler ([136872c](https://github.com/MegafonWebLab/megafon-ui/commit/136872c84c058502a46d5b6db5088bebd71ebdb8))
15
+ * **checkbox:** add isChecked state, change type of onChange prop ([be62e30](https://github.com/MegafonWebLab/megafon-ui/commit/be62e30f43dcee4c43cab5425c4ddc0c6954f3f7))
16
+ * **colors:** fix colors component ([a45d223](https://github.com/MegafonWebLab/megafon-ui/commit/a45d223e8af199df87c7b0a1fb8278093ecd54b9))
17
+ * **colors:** remove unused classname modifiers ([2536f98](https://github.com/MegafonWebLab/megafon-ui/commit/2536f9878456979e1ea56615ca99eaa19b6ab7a3))
18
+ * **colors:** remove unused method ([50ee358](https://github.com/MegafonWebLab/megafon-ui/commit/50ee358233787dd3f855abea071ea11aa9df9785))
19
+ * **colors:** renabe green and purple to brandGreen and brandPurple to avoid postcss-colormin bug ([089dd42](https://github.com/MegafonWebLab/megafon-ui/commit/089dd42cd18db7fc83e690da45d09b88c636a6f7))
20
+ * **colors:** rename green and purple to brandGreen and brandPurple ([e8ec148](https://github.com/MegafonWebLab/megafon-ui/commit/e8ec1488a249748ca6468bfa53eed56e9fcbb5e4))
21
+ * **colors:** update color values on colors page when user switches theme ([8eb66de](https://github.com/MegafonWebLab/megafon-ui/commit/8eb66dec2ef9de5615ad8c921c422b6a9f00893a))
22
+ * **components:** change tests for dataAttrs prop ([eae8ecb](https://github.com/MegafonWebLab/megafon-ui/commit/eae8ecb5104c050ec0e67357ed5edecdfb042838))
23
+ * **core:** fix build ui-core ([fa9522a](https://github.com/MegafonWebLab/megafon-ui/commit/fa9522ac0931edb7ec772ad040557997db080687))
24
+ * **core:** separated colors.css file ([3a0af6b](https://github.com/MegafonWebLab/megafon-ui/commit/3a0af6b31d711016faa92bc7402ce02c6d8710ae))
25
+ * **less:** import base.less file through reference ([20bd43d](https://github.com/MegafonWebLab/megafon-ui/commit/20bd43d60f9cfac102c55ccdf183578702d2eb96))
26
+ * **paragraph:** remove spbSky... values from color prop ([3a74e2b](https://github.com/MegafonWebLab/megafon-ui/commit/3a74e2ba23b41a1982f72cb1a869e0253c903180))
27
+ * **switcher:** fix switcher design ([642d679](https://github.com/MegafonWebLab/megafon-ui/commit/642d679d6c48c4a96093220415a68c9444d8cb53))
28
+ * color props values changes ([9e3dd31](https://github.com/MegafonWebLab/megafon-ui/commit/9e3dd31a8fd57012482c68c1173aae74028aa3a9))
29
+ * remove deprecated props values ([d09c460](https://github.com/MegafonWebLab/megafon-ui/commit/d09c4606ce6e41f7144e18c2216d039d859288e2))
30
+ * **textlink:** fix color prop type ([4e93cce](https://github.com/MegafonWebLab/megafon-ui/commit/4e93ccef6bcbb1a5e670089dfafe308c23fcbe1e))
31
+ * **tooltip:** add check event function from ui-helpers ([18ef333](https://github.com/MegafonWebLab/megafon-ui/commit/18ef333ba78f7804731da2116b124cdc44a8dfcb))
39
32
 
40
33
 
41
34
  ### Features
42
35
 
43
- * **components:** add dataAttrs props in new format ([026d868](https://github.com/MegafonWebLab/megafon-ui/commit/026d8681743d55ea8c93d17000a64959093f7a05))
44
-
45
-
46
-
47
-
48
-
49
- # [3.0.0-beta.6](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.5...@megafon/ui-core@3.0.0-beta.6) (2022-02-02)
50
-
51
-
52
- ### Bug Fixes
53
-
54
- * color props values changes ([b279f2b](https://github.com/MegafonWebLab/megafon-ui/commit/b279f2b5af0edae92fe9825bbfa90a207cb8009a))
55
- * remove deprecated props values ([add76f3](https://github.com/MegafonWebLab/megafon-ui/commit/add76f38a9ebad8b5b6504dfe6aae862746f0dfc))
56
- * **colors:** rename green and purple to brandGreen and brandPurple ([2266734](https://github.com/MegafonWebLab/megafon-ui/commit/2266734336be1a0faa5f1736fdf39070442837b3))
57
- * **core:** fix build ui-core ([458c824](https://github.com/MegafonWebLab/megafon-ui/commit/458c824aab639e4802db261d0416b3cee58ac274))
58
- * **core:** separated colors.css file ([f0a4d72](https://github.com/MegafonWebLab/megafon-ui/commit/f0a4d728e0b30c5caeae5c8d9607e624fb4ea288))
59
- * **textlink:** fix color prop type ([6edcea0](https://github.com/MegafonWebLab/megafon-ui/commit/6edcea06ce26d137611aaf022d3ee6f7da295366))
36
+ * **accordion:** remove prop hasVerticalPaddings ([c1f0139](https://github.com/MegafonWebLab/megafon-ui/commit/c1f01398154497ed69fb2bb725077e3cc3b5c47e))
37
+ * **colors:** css custom properties and color themes support ([16df5b7](https://github.com/MegafonWebLab/megafon-ui/commit/16df5b7b2644e15bb6c6e49e7347c0f8e4839e58))
38
+ * **components:** add dataAttrs props in new format ([e9cf812](https://github.com/MegafonWebLab/megafon-ui/commit/e9cf8122ac47f83a8e744e0695351d60aa711dbd))
39
+ * **header:** made header as a functional component ([b983934](https://github.com/MegafonWebLab/megafon-ui/commit/b983934ced137ede35f64ce2dfe0c953c1690db0))
40
+ * **radiobutton:** made radiobutton as a functional component ([b225e1d](https://github.com/MegafonWebLab/megafon-ui/commit/b225e1d5e1964fd1e7010a9051586fb627cc90c3))
41
+ * **select:** made select as a functional component ([fc9cfc2](https://github.com/MegafonWebLab/megafon-ui/commit/fc9cfc25505952080bf90095ab183367915d27e6))
42
+ * **styles:** export css version for base.less ([acdea73](https://github.com/MegafonWebLab/megafon-ui/commit/acdea73462713156dee077fde4c223879e356b4d))
60
43
 
61
44
 
62
45
  ### BREAKING CHANGES
63
46
 
47
+ * **paragraph:** remove from color prop values: spbSky0, spbSky1, spbSky2
48
+ * **accordion:** remove prop hasVerticalPaddings
64
49
  * ContentArea: prop color change values from 'base' to 'white' and from 'content' to 'default';
65
50
  remove depreacted value 'freshAsphalt'
66
51
  Paragraph: prop color change values from 'base' to 'white' and from 'contend' to 'default';
@@ -68,100 +53,56 @@ remove deprecared values 'freshAsphalt' and 'clearWhite'
68
53
  StoreBanner: prop theme change value from 'black' to 'default'; remove deprecated value 'clearWhite'
69
54
  * ContentArea, Paragraph, StoreBanner and Breadcrumbs components from no don't have
70
55
  freshAsphalt and clearWhite as values for colorize props
71
-
72
-
73
-
74
-
75
-
76
- # [3.0.0-beta.5](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.4...@megafon/ui-core@3.0.0-beta.5) (2022-01-28)
77
-
78
-
79
- ### Features
80
-
81
- * **header:** made header as a functional component ([81701ad](https://github.com/MegafonWebLab/megafon-ui/commit/81701ad87b6e9df2fe630bf4e183383264c0bb01))
82
- * **radiobutton:** made radiobutton as a functional component ([65406af](https://github.com/MegafonWebLab/megafon-ui/commit/65406afc90fd82f7eb0fdcbbe78569fc98164e78))
83
-
84
-
85
-
86
-
87
-
88
- # [3.0.0-beta.4](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.3...@megafon/ui-core@3.0.0-beta.4) (2022-01-27)
89
-
90
- **Note:** Version bump only for package @megafon/ui-core
91
-
92
-
93
-
94
-
95
-
96
- # [3.0.0-beta.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.2...@megafon/ui-core@3.0.0-beta.3) (2022-01-24)
97
-
98
-
99
- ### Bug Fixes
100
-
101
- * **accordion:** add focus on arrow after tab press, add open/close accordion after enter press ([9bfa0ac](https://github.com/MegafonWebLab/megafon-ui/commit/9bfa0ac5348ac25c0e37a4df51e26e2dabde02ba))
102
- * **accordion:** change type of onClickAccordion prop ([9a150c5](https://github.com/MegafonWebLab/megafon-ui/commit/9a150c5de309547763a714b0eb630dfb386a8107))
103
- * **calendar/month:** add focus on month arrows, add enter press handlers ([63f1e47](https://github.com/MegafonWebLab/megafon-ui/commit/63f1e4761e57ed6d56464b632dce9fd5e77655e1))
104
- * **checkbox:** add focus on custom checkbox, add enter press handler ([83d111d](https://github.com/MegafonWebLab/megafon-ui/commit/83d111d0e4b41d3915bdd079bed4a7f9715ce7a5))
105
- * **checkbox:** add isChecked state, change type of onChange prop ([f535caf](https://github.com/MegafonWebLab/megafon-ui/commit/f535caf39a02ab6793d3c63b654a1f1f3e9b2b93))
106
- * **tooltip:** add check event function from ui-helpers ([a784ab4](https://github.com/MegafonWebLab/megafon-ui/commit/a784ab4f288124eb941fe8f52e46b2efc9aa2f82))
107
-
108
-
109
- ### BREAKING CHANGES
110
-
111
56
  * **checkbox:** change type of onChange prop on (checked: boolean) => void
112
57
  * **accordion:** remove parameter 'title' in onClickAccordion prop
113
58
  * **tooltip:** change onOpen, onClose types; AccessibilityEventTypeNative from @megafon/ui-helpers
59
+ * **colors:** green, green20, green80, purple, purple20 and purple80 colors now have 'brand'
60
+ prefix (e.g. brandGreen)
61
+ * **colors:** read commit description
114
62
 
115
63
 
116
64
 
117
65
 
118
66
 
119
- # [3.0.0-beta.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.1...@megafon/ui-core@3.0.0-beta.2) (2022-01-21)
67
+ # [2.5.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.4.0...@megafon/ui-core@2.5.0) (2022-02-07)
120
68
 
121
- **Note:** Version bump only for package @megafon/ui-core
69
+
70
+ ### Features
71
+
72
+ * **tabs:** add prop outerObserveContainer for observing sticky mode from outside ([bc20c76](https://github.com/MegafonWebLab/megafon-ui/commit/bc20c76f497d88da19ea03cfc66a0c38a7559698))
122
73
 
123
74
 
124
75
 
125
76
 
126
77
 
127
- # [3.0.0-beta.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0-beta.0...@megafon/ui-core@3.0.0-beta.1) (2022-01-20)
78
+ # [2.4.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.3.0...@megafon/ui-core@2.4.0) (2022-01-31)
128
79
 
129
80
 
130
81
  ### Bug Fixes
131
82
 
132
- * **colors:** fix colors component ([3061f7c](https://github.com/MegafonWebLab/megafon-ui/commit/3061f7c7b56d5baa32f109d7ce941bcc7e70c5b9))
133
- * **colors:** remove unused classname modifiers ([d919cdc](https://github.com/MegafonWebLab/megafon-ui/commit/d919cdcf1fa79d60230fc85811518ded1c0537ad))
134
- * **colors:** remove unused method ([2970295](https://github.com/MegafonWebLab/megafon-ui/commit/2970295df9053a4f54ed19d3d46deb07994844e0))
135
- * **colors:** renabe green and purple to brandGreen and brandPurple to avoid postcss-colormin bug ([563d97c](https://github.com/MegafonWebLab/megafon-ui/commit/563d97c42900099415a6872f57b500b87aeed647))
136
- * **colors:** update color values on colors page when user switches theme ([8552ff6](https://github.com/MegafonWebLab/megafon-ui/commit/8552ff69a66153ef890437ffc4dd2e50c31d6f2e))
137
- * **less:** import base.less file through reference ([5a13aae](https://github.com/MegafonWebLab/megafon-ui/commit/5a13aaedec3a7fd09f77dcddfe437fda604f60a5))
83
+ * **link:** new prop dataAttrs ([bde2253](https://github.com/MegafonWebLab/megafon-ui/commit/bde22539ff0db11777be9193adceb6de0f984234))
138
84
 
139
85
 
140
86
  ### Features
141
87
 
142
- * **styles:** export css version for base.less ([14aff17](https://github.com/MegafonWebLab/megafon-ui/commit/14aff17f8d3f77ec7beb2e3cb5c8a489ecd77e74))
88
+ * **banner:** add props withPaginationBottomOffset ([c1485a0](https://github.com/MegafonWebLab/megafon-ui/commit/c1485a083d63b886419109b03bb31230c5fed890))
143
89
 
144
90
 
145
- ### BREAKING CHANGES
146
91
 
147
- * **colors:** green, green20, green80, purple, purple20 and purple80 colors now have 'brand'
148
- prefix (e.g. brandGreen)
149
92
 
150
93
 
94
+ # [2.3.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.2.0...@megafon/ui-core@2.3.0) (2022-01-24)
151
95
 
152
96
 
97
+ ### Bug Fixes
153
98
 
154
- # [3.0.0-beta.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@2.2.0...@megafon/ui-core@3.0.0-beta.0) (2022-01-19)
99
+ * **search:** prevents default action when a menu item is selected and the enter button is pressed ([054cbcf](https://github.com/MegafonWebLab/megafon-ui/commit/054cbcf3457ff779443a82b5ae6383fda57f9cc7))
155
100
 
156
101
 
157
102
  ### Features
158
103
 
159
- * **colors:** css custom properties and color themes support ([b19a9a5](https://github.com/MegafonWebLab/megafon-ui/commit/b19a9a5112ebc7427d60f6514d606dd9d71ca444))
160
-
161
-
162
- ### BREAKING CHANGES
163
-
164
- * **colors:** read commit description
104
+ * **accordion:** props hasVerticalPaddings marked as deprecated ([4d6d4cc](https://github.com/MegafonWebLab/megafon-ui/commit/4d6d4cca2cf45a86441827f0bef625a88a2c44f8))
105
+ * **textfield:** add autocomplete prop ([f2cff94](https://github.com/MegafonWebLab/megafon-ui/commit/f2cff9403503de174b785ea02365ce470811369e))
165
106
 
166
107
 
167
108
 
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import './Colors.less';
3
- declare const Colors: () => JSX.Element;
3
+ declare const Colors: React.FC;
4
4
  export default Colors;
@@ -52,7 +52,7 @@ var Accordion = function Accordion(_ref) {
52
52
 
53
53
  var handleClickTitle = function handleClickTitle(e) {
54
54
  if (checkEventIsClickOrEnterPress(e)) {
55
- onClickAccordion && onClickAccordion(!isOpenedState);
55
+ onClickAccordion === null || onClickAccordion === void 0 ? void 0 : onClickAccordion(!isOpenedState);
56
56
  setIsOpenedState(!isOpenedState);
57
57
  }
58
58
  };
@@ -34,6 +34,11 @@
34
34
  -webkit-transform: translateY(-50%);
35
35
  transform: translateY(-50%);
36
36
  }
37
+ @media screen and (max-width: 767px) {
38
+ .mfui-banner__arrow {
39
+ display: none;
40
+ }
41
+ }
37
42
  .mfui-banner__arrow_prev {
38
43
  left: 12px;
39
44
  }
@@ -98,6 +103,29 @@
98
103
  .mfui-banner__pagination_theme_dark {
99
104
  background-color: var(--stcBlack20);
100
105
  }
106
+ .mfui-banner__pagination_bottom-offset {
107
+ bottom: 60px;
108
+ }
109
+ @media screen and (min-width: 768px) and (max-width: 1023px) {
110
+ .mfui-banner__pagination_bottom-offset {
111
+ bottom: 89px;
112
+ }
113
+ }
114
+ @media screen and (min-width: 1024px) and (max-width: 1279px) {
115
+ .mfui-banner__pagination_bottom-offset {
116
+ bottom: 90px;
117
+ }
118
+ }
119
+ @media screen and (min-width: 1280px) and (max-width: 1439px) {
120
+ .mfui-banner__pagination_bottom-offset {
121
+ bottom: 65px;
122
+ }
123
+ }
124
+ @media screen and (min-width: 1440px) {
125
+ .mfui-banner__pagination_bottom-offset {
126
+ bottom: 72px;
127
+ }
128
+ }
101
129
  .mfui-banner__dot {
102
130
  width: 12px;
103
131
  height: 12px;
@@ -26,6 +26,8 @@ export interface IBannerProps {
26
26
  pagination?: Record<string, string>;
27
27
  dot?: Record<string, string>;
28
28
  };
29
+ /** Предполагается использование с наезжанием на баннер следующего за баннером элемента */
30
+ withPaginationBottomOffset?: boolean;
29
31
  /** Автоматическая прокрутка */
30
32
  autoPlay?: boolean;
31
33
  /** Задержка автоматической прокрутки */
@@ -33,6 +33,8 @@ var Banner = function Banner(_ref) {
33
33
  var className = _ref.className,
34
34
  _ref$classes = _ref.classes,
35
35
  classes = _ref$classes === void 0 ? {} : _ref$classes,
36
+ _ref$withPaginationBo = _ref.withPaginationBottomOffset,
37
+ withPaginationBottomOffset = _ref$withPaginationBo === void 0 ? false : _ref$withPaginationBo,
36
38
  _ref$autoPlay = _ref.autoPlay,
37
39
  autoPlay = _ref$autoPlay === void 0 ? false : _ref$autoPlay,
38
40
  _ref$autoPlayDelay = _ref.autoPlayDelay,
@@ -85,7 +87,8 @@ var Banner = function Banner(_ref) {
85
87
  return;
86
88
  }
87
89
 
88
- autoplay.stop();
90
+ autoplay.stop(); // eslint-disable-next-line no-param-reassign
91
+
89
92
  params.autoplay.delay = autoPlayDelay * 3;
90
93
  autoplay.start();
91
94
  }, [autoPlayDelay]);
@@ -95,18 +98,18 @@ var Banner = function Banner(_ref) {
95
98
  }
96
99
 
97
100
  swiperInstance.slidePrev();
98
- onPrevClick && onPrevClick(swiperInstance.realIndex);
101
+ onPrevClick === null || onPrevClick === void 0 ? void 0 : onPrevClick(swiperInstance.realIndex);
99
102
  increaseAutoplayDelay(swiperInstance);
100
- }, [swiperInstance, onPrevClick]);
103
+ }, [swiperInstance, onPrevClick, increaseAutoplayDelay]);
101
104
  var handleNextClick = React.useCallback(function () {
102
105
  if (!swiperInstance) {
103
106
  return;
104
107
  }
105
108
 
106
109
  swiperInstance.slideNext();
107
- onNextClick && onNextClick(swiperInstance.realIndex);
110
+ onNextClick === null || onNextClick === void 0 ? void 0 : onNextClick(swiperInstance.realIndex);
108
111
  increaseAutoplayDelay(swiperInstance);
109
- }, [swiperInstance, onNextClick]);
112
+ }, [swiperInstance, onNextClick, increaseAutoplayDelay]);
110
113
  var handleDotClick = React.useCallback(function (index) {
111
114
  if (!swiperInstance) {
112
115
  return;
@@ -118,9 +121,9 @@ var Banner = function Banner(_ref) {
118
121
  swiperInstance.slideTo(index);
119
122
  }
120
123
 
121
- onDotClick && onDotClick(swiperInstance.realIndex);
124
+ onDotClick === null || onDotClick === void 0 ? void 0 : onDotClick(swiperInstance.realIndex);
122
125
  increaseAutoplayDelay(swiperInstance);
123
- }, [swiperInstance, loop, onDotClick]);
126
+ }, [swiperInstance, loop, onDotClick, increaseAutoplayDelay]);
124
127
  var handleSwiper = React.useCallback(function (swiper) {
125
128
  setSwiperInstance(swiper);
126
129
  }, []);
@@ -143,8 +146,8 @@ var Banner = function Banner(_ref) {
143
146
  var handleSlideChange = React.useCallback(function (_ref4) {
144
147
  var realIndex = _ref4.realIndex;
145
148
  setActiveIndex(realIndex);
146
- onChange && onChange(realIndex);
147
- }, []);
149
+ onChange === null || onChange === void 0 ? void 0 : onChange(realIndex);
150
+ }, [onChange]);
148
151
  var handleAutoplayStop = React.useCallback(function () {
149
152
  setAutoPlayning(false);
150
153
  }, []);
@@ -185,7 +188,8 @@ var Banner = function Banner(_ref) {
185
188
  theme: navArrowTheme
186
189
  })), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.pagination), {
187
190
  className: cn('pagination', {
188
- theme: navTheme
191
+ theme: navTheme,
192
+ 'bottom-offset': withPaginationBottomOffset
189
193
  })
190
194
  }), React.Children.map(children, function (_, i) {
191
195
  return /*#__PURE__*/React.createElement(BannerDot, {
@@ -209,6 +213,7 @@ Banner.propTypes = {
209
213
  classes: PropTypes.shape({
210
214
  slide: PropTypes.string
211
215
  }),
216
+ withPaginationBottomOffset: PropTypes.bool,
212
217
  dataAttrs: PropTypes.shape({
213
218
  root: PropTypes.objectOf(PropTypes.string.isRequired),
214
219
  swiper: PropTypes.objectOf(PropTypes.string.isRequired),
@@ -96,7 +96,7 @@ var Button = function Button(_ref) {
96
96
  return;
97
97
  }
98
98
 
99
- onClick && onClick(e);
99
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
100
100
  }, [disabled, onClick]);
101
101
  var currentTheme = React.useMemo(function () {
102
102
  return type === ButtonTypes.PRIMARY && theme === ButtonThemes.BLACK ? ButtonThemes.GREEN : theme;
@@ -130,7 +130,7 @@ var Button = function Button(_ref) {
130
130
  }, children), !icon && showArrow && /*#__PURE__*/React.createElement(Arrow, {
131
131
  className: cn('icon-arrow')
132
132
  }));
133
- }, [contentClassName, showArrow, icon, children]);
133
+ }, [children, icon, dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.content, contentClassName, showArrow]);
134
134
  var contentType = React.useMemo(function () {
135
135
  switch (true) {
136
136
  case icon && !children:
@@ -155,7 +155,7 @@ var Button = function Button(_ref) {
155
155
  sizeTablet: sizeTablet && getLoaderSize(sizeTablet),
156
156
  sizeMobile: sizeMobile && getLoaderSize(sizeMobile)
157
157
  });
158
- }, [sizeAll, sizeWide, sizeDesktop, sizeTablet, sizeMobile]);
158
+ }, [dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.loader, loaderColor, sizeAll, sizeWide, sizeDesktop, sizeTablet, sizeMobile]);
159
159
 
160
160
  var setRelAttribute = function setRelAttribute() {
161
161
  if (ElementType !== 'a') {
@@ -113,7 +113,7 @@ var Calendar = function Calendar(_ref) {
113
113
  useEffect(function () {
114
114
  var propsStartDate = calendarStateFromProps.startDate;
115
115
  setCalendarState(calendarStateFromProps);
116
- propsStartDate && goToDate(propsStartDate);
116
+ propsStartDate && goToDate(propsStartDate); // eslint-disable-next-line react-hooks/exhaustive-deps
117
117
  }, [calendarStateFromProps]);
118
118
 
119
119
  var getCalendarState = function getCalendarState(date) {
@@ -178,7 +178,7 @@ var Calendar = function Calendar(_ref) {
178
178
  var nextStartDate = nextState.startDate,
179
179
  nextEndDate = nextState.endDate;
180
180
  setCalendarState(nextState);
181
- onChange && onChange(nextStartDate, nextEndDate);
181
+ onChange === null || onChange === void 0 ? void 0 : onChange(nextStartDate, nextEndDate);
182
182
  };
183
183
 
184
184
  var handleDateHover = function handleDateHover(date) {
@@ -224,6 +224,7 @@ var Calendar = function Calendar(_ref) {
224
224
  var month = _ref2.month,
225
225
  year = _ref2.year;
226
226
 
227
+ // eslint-disable-next-line react-hooks/rules-of-hooks
227
228
  var _useMonth = useMonth({
228
229
  year: year,
229
230
  month: month,
@@ -60,7 +60,7 @@ var Day = function Day(_a) {
60
60
  };
61
61
 
62
62
  var handleMouseLeave = function handleMouseLeave() {
63
- onMouseLeave && onMouseLeave();
63
+ onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave();
64
64
  };
65
65
 
66
66
  return /*#__PURE__*/React.createElement("button", {
@@ -122,7 +122,8 @@ var Carousel = function Carousel(_ref) {
122
122
  return;
123
123
  }
124
124
 
125
- autoplay.stop();
125
+ autoplay.stop(); // eslint-disable-next-line no-param-reassign
126
+
126
127
  params.autoplay.delay = autoPlayDelay * 3;
127
128
  autoplay.start();
128
129
  }, [autoPlayDelay]);
@@ -132,7 +133,7 @@ var Carousel = function Carousel(_ref) {
132
133
  }
133
134
 
134
135
  swiperInstance.slidePrev();
135
- onPrevClick && onPrevClick(swiperInstance.realIndex);
136
+ onPrevClick === null || onPrevClick === void 0 ? void 0 : onPrevClick(swiperInstance.realIndex);
136
137
  increaseAutoplayDelay(swiperInstance);
137
138
  }, [swiperInstance, onPrevClick, increaseAutoplayDelay]);
138
139
  var handleNextClick = React.useCallback(function () {
@@ -141,14 +142,14 @@ var Carousel = function Carousel(_ref) {
141
142
  }
142
143
 
143
144
  swiperInstance.slideNext();
144
- onNextClick && onNextClick(swiperInstance.realIndex);
145
+ onNextClick === null || onNextClick === void 0 ? void 0 : onNextClick(swiperInstance.realIndex);
145
146
  increaseAutoplayDelay(swiperInstance);
146
147
  }, [swiperInstance, onNextClick, increaseAutoplayDelay]);
147
148
  var handleSwiper = React.useCallback(function (swiper) {
148
149
  setSwiperInstance(swiper);
149
150
  setLocked(swiper.isBeginning && swiper.isEnd);
150
- getSwiper && getSwiper(swiper);
151
- }, []);
151
+ getSwiper === null || getSwiper === void 0 ? void 0 : getSwiper(swiper);
152
+ }, [getSwiper]);
152
153
  var handleReachBeginnig = React.useCallback(function () {
153
154
  setBeginning(true);
154
155
  }, []);
@@ -169,7 +170,7 @@ var Carousel = function Carousel(_ref) {
169
170
  var realIndex = _ref4.realIndex,
170
171
  previousIndex = _ref4.previousIndex,
171
172
  params = _ref4.params;
172
- onChange && onChange(realIndex, previousIndex, params.slidesPerView);
173
+ onChange === null || onChange === void 0 ? void 0 : onChange(realIndex, previousIndex, params.slidesPerView);
173
174
  }, [onChange]);
174
175
 
175
176
  var handleRootClick = function handleRootClick(e) {
@@ -182,15 +183,17 @@ var Carousel = function Carousel(_ref) {
182
183
  }; // https://github.com/nolimits4web/Swiper/issues/2346
183
184
 
184
185
 
185
- var handleSwiperResize = React.useCallback(throttle(function (swiper) {
186
- setBeginning(swiper.isBeginning);
187
- setEnd(swiper.isEnd);
188
- setLocked(swiper.isBeginning && swiper.isEnd);
186
+ var handleSwiperResize = React.useCallback(function () {
187
+ throttle(function (swiper) {
188
+ setBeginning(swiper.isBeginning);
189
+ setEnd(swiper.isEnd);
190
+ setLocked(swiper.isBeginning && swiper.isEnd);
189
191
 
190
- if (swiper.params.slidesPerView === SlidesPerView.AUTO) {
191
- swiper.slides.css('width', '');
192
- }
193
- }, throttleTime.resize), []);
192
+ if (swiper.params.slidesPerView === SlidesPerView.AUTO) {
193
+ swiper.slides.css('width', '');
194
+ }
195
+ }, throttleTime.resize);
196
+ }, []);
194
197
 
195
198
  var handleSlideFocus = function handleSlideFocus(index) {
196
199
  return function (e) {
@@ -48,7 +48,7 @@ var Checkbox = function Checkbox(_ref) {
48
48
  var handleChange = function handleChange(e) {
49
49
  if (checkEventIsClickOrEnterPress(e) || e.type === CHANGE_KEY) {
50
50
  setIsChecked(!isChecked);
51
- onChange && onChange(!isChecked);
51
+ onChange === null || onChange === void 0 ? void 0 : onChange(!isChecked);
52
52
  }
53
53
  };
54
54
 
@@ -56,15 +56,15 @@ var Counter = function Counter(_ref) {
56
56
  }
57
57
 
58
58
  if (inputValue < min) {
59
- onChange && onChange(min);
59
+ onChange === null || onChange === void 0 ? void 0 : onChange(min);
60
60
  }
61
61
 
62
62
  if (inputValue > max) {
63
- onChange && onChange(max);
63
+ onChange === null || onChange === void 0 ? void 0 : onChange(max);
64
64
  }
65
65
 
66
66
  if (inputValue >= min && inputValue <= max) {
67
- onChange && onChange(inputValue);
67
+ onChange === null || onChange === void 0 ? void 0 : onChange(inputValue);
68
68
  }
69
69
  }, [min, max, onChange, isControlled]);
70
70
  var handleMinusClick = React.useCallback(function () {
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export interface ILinkProps {
3
3
  /** Дополнительный класс корневого элемента */
4
4
  className?: string;
@@ -1,33 +1,25 @@
1
- import "core-js/modules/es.symbol";
2
- import "core-js/modules/es.array.index-of";
3
1
  import _extends from "@babel/runtime/helpers/extends";
4
-
5
- var __rest = this && this.__rest || function (s, e) {
6
- var t = {};
7
-
8
- for (var p in s) {
9
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
10
- }
11
-
12
- if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
13
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
14
- }
15
- return t;
16
- };
17
-
18
- import * as React from 'react';
2
+ import React from 'react';
19
3
  import { filterDataAttrs } from '@megafon/ui-helpers';
20
- import * as PropTypes from 'prop-types';
21
-
22
- var Link = function Link(_a) {
23
- var dataAttrs = _a.dataAttrs,
24
- props = __rest(_a, ["dataAttrs"]);
4
+ import PropTypes from 'prop-types';
25
5
 
26
- return (
27
- /*#__PURE__*/
28
- // eslint-disable-next-line jsx-a11y/anchor-has-content
29
- React.createElement("a", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), props))
30
- );
6
+ var Link = function Link(_ref) {
7
+ var target = _ref.target,
8
+ href = _ref.href,
9
+ rel = _ref.rel,
10
+ onClick = _ref.onClick,
11
+ className = _ref.className,
12
+ download = _ref.download,
13
+ children = _ref.children,
14
+ dataAttrs = _ref.dataAttrs;
15
+ return /*#__PURE__*/React.createElement("a", _extends({
16
+ className: className,
17
+ href: href,
18
+ target: target,
19
+ rel: rel,
20
+ download: download,
21
+ onClick: onClick
22
+ }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), children);
31
23
  };
32
24
 
33
25
  Link.propTypes = {
@@ -19,7 +19,7 @@ var PaginationButton = function PaginationButton(_ref) {
19
19
  dataAttrs = _ref.dataAttrs;
20
20
 
21
21
  var handleClick = function handleClick() {
22
- onClick && onClick(value);
22
+ onClick === null || onClick === void 0 ? void 0 : onClick(value);
23
23
  };
24
24
 
25
25
  return /*#__PURE__*/React.createElement("button", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
@@ -1,2 +1,2 @@
1
- declare const getRange: (from: any, to: any, step?: number) => number[];
1
+ declare const getRange: (from: number, to: number, step?: number) => number[];
2
2
  export default getRange;
@@ -38,12 +38,3 @@
38
38
  .mfui-paragraph_color_purple {
39
39
  color: var(--brandPurple);
40
40
  }
41
- .mfui-paragraph_color_spbSky0 {
42
- color: var(--spbSky0);
43
- }
44
- .mfui-paragraph_color_spbSky1 {
45
- color: var(--spbSky1);
46
- }
47
- .mfui-paragraph_color_spbSky2 {
48
- color: var(--spbSky2);
49
- }
@@ -6,9 +6,6 @@ declare const COLORS: {
6
6
  readonly WHITE: "white";
7
7
  readonly GREEN: "green";
8
8
  readonly PURPLE: "purple";
9
- readonly SPB_SKY_0: "spbSky0";
10
- readonly SPB_SKY_1: "spbSky1";
11
- readonly SPB_SKY_2: "spbSky2";
12
9
  };
13
10
  declare type ColorType = typeof COLORS[keyof typeof COLORS];
14
11
  export interface IParagraphProps {
@@ -9,10 +9,7 @@ var COLORS = {
9
9
  DEFAULT: 'default',
10
10
  WHITE: 'white',
11
11
  GREEN: 'green',
12
- PURPLE: 'purple',
13
- SPB_SKY_0: 'spbSky0',
14
- SPB_SKY_1: 'spbSky1',
15
- SPB_SKY_2: 'spbSky2'
12
+ PURPLE: 'purple'
16
13
  };
17
14
  var cn = cnCreate('mfui-paragraph');
18
15