@megafon/ui-core 3.0.0-beta.8 → 3.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.
- package/CHANGELOG.md +59 -85
- package/README.md +2 -2
- package/dist/es/colors/Colors.d.ts +2 -2
- package/dist/es/colors/colorsData.js +1 -1
- package/dist/es/components/Accordion/Accordion.js +1 -1
- package/dist/es/components/Banner/Banner.css +28 -0
- package/dist/es/components/Banner/Banner.d.ts +2 -0
- package/dist/es/components/Banner/Banner.js +15 -10
- package/dist/es/components/Button/Button.css +3 -3
- package/dist/es/components/Button/Button.js +3 -3
- package/dist/es/components/Calendar/Calendar.js +3 -2
- package/dist/es/components/Calendar/components/Day/Day.js +1 -1
- package/dist/es/components/Carousel/Carousel.js +17 -14
- package/dist/es/components/Checkbox/Checkbox.js +1 -1
- package/dist/es/components/Counter/Counter.js +3 -3
- package/dist/es/components/Link/Link.d.ts +1 -1
- package/dist/es/components/Link/Link.js +19 -27
- package/dist/es/components/Logo/Logo.js +1 -1
- package/dist/es/components/NavArrow/NavArrow.css +1 -1
- package/dist/es/components/Notification/Notification.css +34 -25
- package/dist/es/components/Notification/Notification.js +4 -2
- package/dist/es/components/Pagination/components/PaginationButton/PaginationButton.js +1 -1
- package/dist/es/components/Pagination/helpers.d.ts +1 -1
- package/dist/es/components/Paragraph/Paragraph.css +0 -9
- package/dist/es/components/Paragraph/Paragraph.d.ts +0 -3
- package/dist/es/components/Paragraph/Paragraph.js +1 -4
- package/dist/es/components/RadioButton/RadioButton.js +1 -1
- package/dist/es/components/Search/Search.js +4 -3
- package/dist/es/components/Select/Select.css +5 -2
- package/dist/es/components/Select/Select.d.ts +5 -45
- package/dist/es/components/Select/Select.js +364 -467
- package/dist/es/components/Select/reducer/selectReducer.d.ts +34 -0
- package/dist/es/components/Select/reducer/selectReducer.js +123 -0
- package/dist/es/components/Switcher/Switcher.css +19 -15
- package/dist/es/components/Switcher/Switcher.js +1 -1
- package/dist/es/components/Tabs/Tabs.d.ts +2 -0
- package/dist/es/components/Tabs/Tabs.js +94 -49
- package/dist/es/components/TextField/TextField.d.ts +3 -1
- package/dist/es/components/TextField/TextField.js +14 -10
- package/dist/es/components/Tile/Tile.js +4 -2
- package/dist/es/components/Tooltip/Tooltip.js +17 -17
- package/dist/es/index.d.ts +1 -0
- package/dist/es/index.js +1 -0
- package/dist/lib/colors/Colors.d.ts +2 -2
- package/dist/lib/colors/colorsData.js +1 -1
- package/dist/lib/components/Accordion/Accordion.js +1 -1
- package/dist/lib/components/Banner/Banner.css +28 -0
- package/dist/lib/components/Banner/Banner.d.ts +2 -0
- package/dist/lib/components/Banner/Banner.js +15 -10
- package/dist/lib/components/Button/Button.css +3 -3
- package/dist/lib/components/Button/Button.js +3 -3
- package/dist/lib/components/Calendar/Calendar.js +3 -3
- package/dist/lib/components/Calendar/components/Day/Day.js +1 -1
- package/dist/lib/components/Carousel/Carousel.js +15 -12
- package/dist/lib/components/Checkbox/Checkbox.js +1 -1
- package/dist/lib/components/Counter/Counter.js +3 -3
- package/dist/lib/components/Link/Link.d.ts +1 -1
- package/dist/lib/components/Link/Link.js +28 -43
- package/dist/lib/components/Logo/Logo.js +1 -1
- package/dist/lib/components/NavArrow/NavArrow.css +1 -1
- package/dist/lib/components/Notification/Notification.css +34 -25
- package/dist/lib/components/Notification/Notification.js +4 -2
- package/dist/lib/components/Pagination/components/PaginationButton/PaginationButton.js +1 -1
- package/dist/lib/components/Pagination/helpers.d.ts +1 -1
- package/dist/lib/components/Paragraph/Paragraph.css +0 -9
- package/dist/lib/components/Paragraph/Paragraph.d.ts +0 -3
- package/dist/lib/components/Paragraph/Paragraph.js +1 -4
- package/dist/lib/components/RadioButton/RadioButton.js +1 -1
- package/dist/lib/components/Search/Search.js +4 -3
- package/dist/lib/components/Select/Select.css +5 -2
- package/dist/lib/components/Select/Select.d.ts +5 -45
- package/dist/lib/components/Select/Select.js +358 -490
- package/dist/lib/components/Select/reducer/selectReducer.d.ts +34 -0
- package/dist/lib/components/Select/reducer/selectReducer.js +136 -0
- package/dist/lib/components/Switcher/Switcher.css +19 -15
- package/dist/lib/components/Switcher/Switcher.js +1 -1
- package/dist/lib/components/Tabs/Tabs.d.ts +2 -0
- package/dist/lib/components/Tabs/Tabs.js +94 -49
- package/dist/lib/components/TextField/TextField.d.ts +3 -1
- package/dist/lib/components/TextField/TextField.js +14 -10
- package/dist/lib/components/Tile/Tile.js +4 -2
- package/dist/lib/components/Tooltip/Tooltip.js +17 -17
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +8 -0
- package/package.json +4 -4
- package/styles/colors.css +2 -2
- package/styles/colorsDark.css +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,154 +3,128 @@
|
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* **accordion:** remove prop hasVerticalPaddings ([4da8d8e](https://github.com/MegafonWebLab/megafon-ui/commit/4da8d8e7ee843be266749c4e4a8e35c678b9dc2e))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### BREAKING CHANGES
|
|
15
|
-
|
|
16
|
-
* **accordion:** remove prop hasVerticalPaddings
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# [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.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.1...@megafon/ui-core@3.0.2) (2022-02-15)
|
|
23
7
|
|
|
24
8
|
|
|
25
9
|
### Bug Fixes
|
|
26
10
|
|
|
27
|
-
* **
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Features
|
|
31
|
-
|
|
32
|
-
* **components:** add dataAttrs props in new format ([026d868](https://github.com/MegafonWebLab/megafon-ui/commit/026d8681743d55ea8c93d17000a64959093f7a05))
|
|
11
|
+
* **tile:** fixed dataAttrs type in tile component ([d380289](https://github.com/MegafonWebLab/megafon-ui/commit/d3802896c57dc112543c73169c04262f58a29f58))
|
|
33
12
|
|
|
34
13
|
|
|
35
14
|
|
|
36
15
|
|
|
37
16
|
|
|
38
|
-
|
|
17
|
+
## [3.0.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.0...@megafon/ui-core@3.0.1) (2022-02-11)
|
|
39
18
|
|
|
40
19
|
|
|
41
20
|
### Bug Fixes
|
|
42
21
|
|
|
43
|
-
* color
|
|
44
|
-
*
|
|
45
|
-
* **
|
|
46
|
-
* **
|
|
47
|
-
*
|
|
48
|
-
* **textlink:** fix color prop type ([6edcea0](https://github.com/MegafonWebLab/megafon-ui/commit/6edcea06ce26d137611aaf022d3ee6f7da295366))
|
|
22
|
+
* **colors:** fix button hover purple color name and value ([c333348](https://github.com/MegafonWebLab/megafon-ui/commit/c3333489826338f49e4ecb1c1beb07ee9044167e))
|
|
23
|
+
* **colors:** fix typo in brandPurple color ([f7bdb49](https://github.com/MegafonWebLab/megafon-ui/commit/f7bdb4956247a4bf2112c130e960a98f8cea0696))
|
|
24
|
+
* **logo:** fix green color for vertical logo ([c9aed9d](https://github.com/MegafonWebLab/megafon-ui/commit/c9aed9db957cb9857cc20afa8dd824e241e12114))
|
|
25
|
+
* **notification:** fix styles ([7d93f3e](https://github.com/MegafonWebLab/megafon-ui/commit/7d93f3ea0e61af9647478af03f84e963d5d52e0f))
|
|
26
|
+
* revert mistake version ([cc8668a](https://github.com/MegafonWebLab/megafon-ui/commit/cc8668a9ff2bc5fde6bf93ca806d4406a5944107))
|
|
49
27
|
|
|
50
28
|
|
|
51
|
-
### BREAKING CHANGES
|
|
52
29
|
|
|
53
|
-
* ContentArea: prop color change values from 'base' to 'white' and from 'content' to 'default';
|
|
54
|
-
remove depreacted value 'freshAsphalt'
|
|
55
|
-
Paragraph: prop color change values from 'base' to 'white' and from 'contend' to 'default';
|
|
56
|
-
remove deprecared values 'freshAsphalt' and 'clearWhite'
|
|
57
|
-
StoreBanner: prop theme change value from 'black' to 'default'; remove deprecated value 'clearWhite'
|
|
58
|
-
* ContentArea, Paragraph, StoreBanner and Breadcrumbs components from no don't have
|
|
59
|
-
freshAsphalt and clearWhite as values for colorize props
|
|
60
30
|
|
|
61
31
|
|
|
32
|
+
# [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)
|
|
62
33
|
|
|
63
34
|
|
|
35
|
+
### Bug Fixes
|
|
64
36
|
|
|
65
|
-
|
|
37
|
+
* **accordion:** add focus on arrow after tab press, add open/close accordion after enter press ([5c49447](https://github.com/MegafonWebLab/megafon-ui/commit/5c494474dc319593283b339c63936fd2b862a33f))
|
|
38
|
+
* **accordion:** change type of onClickAccordion prop ([b74e196](https://github.com/MegafonWebLab/megafon-ui/commit/b74e1963587a140bb25b8e50e64490a1337dda78))
|
|
39
|
+
* **calendar/month:** add focus on month arrows, add enter press handlers ([caad017](https://github.com/MegafonWebLab/megafon-ui/commit/caad0176a9d272b19da11ddfac1830d863d090ae))
|
|
40
|
+
* **checkbox:** add focus on custom checkbox, add enter press handler ([136872c](https://github.com/MegafonWebLab/megafon-ui/commit/136872c84c058502a46d5b6db5088bebd71ebdb8))
|
|
41
|
+
* **checkbox:** add isChecked state, change type of onChange prop ([be62e30](https://github.com/MegafonWebLab/megafon-ui/commit/be62e30f43dcee4c43cab5425c4ddc0c6954f3f7))
|
|
42
|
+
* **components:** change tests for dataAttrs prop ([eae8ecb](https://github.com/MegafonWebLab/megafon-ui/commit/eae8ecb5104c050ec0e67357ed5edecdfb042838))
|
|
43
|
+
* **core:** fix build ui-core ([fa9522a](https://github.com/MegafonWebLab/megafon-ui/commit/fa9522ac0931edb7ec772ad040557997db080687))
|
|
44
|
+
* **core:** separated colors.css file ([3a0af6b](https://github.com/MegafonWebLab/megafon-ui/commit/3a0af6b31d711016faa92bc7402ce02c6d8710ae))
|
|
45
|
+
* **less:** import base.less file through reference ([20bd43d](https://github.com/MegafonWebLab/megafon-ui/commit/20bd43d60f9cfac102c55ccdf183578702d2eb96))
|
|
46
|
+
* **paragraph:** remove spbSky... values from color prop ([3a74e2b](https://github.com/MegafonWebLab/megafon-ui/commit/3a74e2ba23b41a1982f72cb1a869e0253c903180))
|
|
47
|
+
* **switcher:** fix switcher design ([642d679](https://github.com/MegafonWebLab/megafon-ui/commit/642d679d6c48c4a96093220415a68c9444d8cb53))
|
|
48
|
+
* **textlink:** fix color prop type ([4e93cce](https://github.com/MegafonWebLab/megafon-ui/commit/4e93ccef6bcbb1a5e670089dfafe308c23fcbe1e))
|
|
49
|
+
* **tooltip:** add check event function from ui-helpers ([18ef333](https://github.com/MegafonWebLab/megafon-ui/commit/18ef333ba78f7804731da2116b124cdc44a8dfcb))
|
|
66
50
|
|
|
67
51
|
|
|
68
52
|
### Features
|
|
69
53
|
|
|
70
|
-
* **
|
|
71
|
-
* **
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
# [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)
|
|
86
|
-
|
|
54
|
+
* **accordion:** remove prop hasVerticalPaddings ([c1f0139](https://github.com/MegafonWebLab/megafon-ui/commit/c1f01398154497ed69fb2bb725077e3cc3b5c47e))
|
|
55
|
+
* **colors:** css custom properties and color themes support ([16df5b7](https://github.com/MegafonWebLab/megafon-ui/commit/16df5b7b2644e15bb6c6e49e7347c0f8e4839e58))
|
|
56
|
+
* **colors:** rename green and purple to brandGreen and brandPurple to avoid postcss-colormin bug ([089dd42](https://github.com/MegafonWebLab/megafon-ui/commit/089dd42cd18db7fc83e690da45d09b88c636a6f7))
|
|
57
|
+
* **colors:** update color values on colors page when user switches theme ([8eb66de](https://github.com/MegafonWebLab/megafon-ui/commit/8eb66dec2ef9de5615ad8c921c422b6a9f00893a))
|
|
58
|
+
* **components:** add dataAttrs props in new format ([e9cf812](https://github.com/MegafonWebLab/megafon-ui/commit/e9cf8122ac47f83a8e744e0695351d60aa711dbd))
|
|
59
|
+
* **header:** made header as a functional component ([b983934](https://github.com/MegafonWebLab/megafon-ui/commit/b983934ced137ede35f64ce2dfe0c953c1690db0))
|
|
60
|
+
* **radiobutton:** made radiobutton as a functional component ([b225e1d](https://github.com/MegafonWebLab/megafon-ui/commit/b225e1d5e1964fd1e7010a9051586fb627cc90c3))
|
|
61
|
+
* **select:** made select as a functional component ([fc9cfc2](https://github.com/MegafonWebLab/megafon-ui/commit/fc9cfc25505952080bf90095ab183367915d27e6))
|
|
62
|
+
* **styles:** export css version for base.less ([acdea73](https://github.com/MegafonWebLab/megafon-ui/commit/acdea73462713156dee077fde4c223879e356b4d))
|
|
63
|
+
* remove deprecated props values ([d09c460](https://github.com/MegafonWebLab/megafon-ui/commit/d09c4606ce6e41f7144e18c2216d039d859288e2))
|
|
87
64
|
|
|
88
|
-
### Bug Fixes
|
|
89
|
-
|
|
90
|
-
* **accordion:** add focus on arrow after tab press, add open/close accordion after enter press ([9bfa0ac](https://github.com/MegafonWebLab/megafon-ui/commit/9bfa0ac5348ac25c0e37a4df51e26e2dabde02ba))
|
|
91
|
-
* **accordion:** change type of onClickAccordion prop ([9a150c5](https://github.com/MegafonWebLab/megafon-ui/commit/9a150c5de309547763a714b0eb630dfb386a8107))
|
|
92
|
-
* **calendar/month:** add focus on month arrows, add enter press handlers ([63f1e47](https://github.com/MegafonWebLab/megafon-ui/commit/63f1e4761e57ed6d56464b632dce9fd5e77655e1))
|
|
93
|
-
* **checkbox:** add focus on custom checkbox, add enter press handler ([83d111d](https://github.com/MegafonWebLab/megafon-ui/commit/83d111d0e4b41d3915bdd079bed4a7f9715ce7a5))
|
|
94
|
-
* **checkbox:** add isChecked state, change type of onChange prop ([f535caf](https://github.com/MegafonWebLab/megafon-ui/commit/f535caf39a02ab6793d3c63b654a1f1f3e9b2b93))
|
|
95
|
-
* **tooltip:** add check event function from ui-helpers ([a784ab4](https://github.com/MegafonWebLab/megafon-ui/commit/a784ab4f288124eb941fe8f52e46b2efc9aa2f82))
|
|
96
65
|
|
|
97
66
|
|
|
98
67
|
### BREAKING CHANGES
|
|
99
68
|
|
|
100
|
-
* **
|
|
69
|
+
* **accordion:** remove prop hasVerticalPaddings
|
|
101
70
|
* **accordion:** remove parameter 'title' in onClickAccordion prop
|
|
71
|
+
* **checkbox:** change type of onChange prop on (checked: boolean) => void
|
|
72
|
+
* **colors:** green, green20, green80, purple, purple20 and purple80 colors now have 'brand'
|
|
73
|
+
prefix (e.g. brandGreen)
|
|
74
|
+
* **contentarea**: prop color change values from 'base' to 'white' and from 'content' to 'default';
|
|
75
|
+
remove depreacted value 'freshAsphalt'
|
|
76
|
+
* **contentarea**, **paragraph**, **storebanner** and **breadcrumbs** components from no don't have
|
|
77
|
+
'freshAsphalt' and 'clearWhite' as values for colorizing props
|
|
78
|
+
* **paragraph:** remove from color prop values: 'spbSky0', 'spbSky1', 'spbSky2'
|
|
79
|
+
* **paragraph**: prop color change values from 'base' to 'white' and from 'contend' to 'default';
|
|
80
|
+
remove deprecared values 'freshAsphalt' and 'clearWhite'
|
|
81
|
+
* **storebanner**: prop theme change value from 'black' to 'default'; remove deprecated value 'clearWhite'
|
|
102
82
|
* **tooltip:** change onOpen, onClose types; AccessibilityEventTypeNative from @megafon/ui-helpers
|
|
83
|
+
* **components:** for the components to work correctly, now it's needed to import colors.css file
|
|
103
84
|
|
|
104
85
|
|
|
105
86
|
|
|
106
87
|
|
|
107
88
|
|
|
108
|
-
# [
|
|
89
|
+
# [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)
|
|
109
90
|
|
|
110
|
-
**Note:** Version bump only for package @megafon/ui-core
|
|
111
91
|
|
|
92
|
+
### Features
|
|
112
93
|
|
|
94
|
+
* **tabs:** add prop outerObserveContainer for observing sticky mode from outside ([bc20c76](https://github.com/MegafonWebLab/megafon-ui/commit/bc20c76f497d88da19ea03cfc66a0c38a7559698))
|
|
113
95
|
|
|
114
96
|
|
|
115
97
|
|
|
116
|
-
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
# [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)
|
|
117
101
|
|
|
118
102
|
|
|
119
103
|
### Bug Fixes
|
|
120
104
|
|
|
121
|
-
* **
|
|
122
|
-
* **colors:** remove unused classname modifiers ([d919cdc](https://github.com/MegafonWebLab/megafon-ui/commit/d919cdcf1fa79d60230fc85811518ded1c0537ad))
|
|
123
|
-
* **colors:** remove unused method ([2970295](https://github.com/MegafonWebLab/megafon-ui/commit/2970295df9053a4f54ed19d3d46deb07994844e0))
|
|
124
|
-
* **colors:** renabe green and purple to brandGreen and brandPurple to avoid postcss-colormin bug ([563d97c](https://github.com/MegafonWebLab/megafon-ui/commit/563d97c42900099415a6872f57b500b87aeed647))
|
|
125
|
-
* **colors:** update color values on colors page when user switches theme ([8552ff6](https://github.com/MegafonWebLab/megafon-ui/commit/8552ff69a66153ef890437ffc4dd2e50c31d6f2e))
|
|
126
|
-
* **less:** import base.less file through reference ([5a13aae](https://github.com/MegafonWebLab/megafon-ui/commit/5a13aaedec3a7fd09f77dcddfe437fda604f60a5))
|
|
105
|
+
* **link:** new prop dataAttrs ([bde2253](https://github.com/MegafonWebLab/megafon-ui/commit/bde22539ff0db11777be9193adceb6de0f984234))
|
|
127
106
|
|
|
128
107
|
|
|
129
108
|
### Features
|
|
130
109
|
|
|
131
|
-
* **
|
|
110
|
+
* **banner:** add props withPaginationBottomOffset ([c1485a0](https://github.com/MegafonWebLab/megafon-ui/commit/c1485a083d63b886419109b03bb31230c5fed890))
|
|
132
111
|
|
|
133
112
|
|
|
134
|
-
### BREAKING CHANGES
|
|
135
113
|
|
|
136
|
-
* **colors:** green, green20, green80, purple, purple20 and purple80 colors now have 'brand'
|
|
137
|
-
prefix (e.g. brandGreen)
|
|
138
114
|
|
|
139
115
|
|
|
116
|
+
# [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)
|
|
140
117
|
|
|
141
118
|
|
|
119
|
+
### Bug Fixes
|
|
142
120
|
|
|
143
|
-
|
|
121
|
+
* **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))
|
|
144
122
|
|
|
145
123
|
|
|
146
124
|
### Features
|
|
147
125
|
|
|
148
|
-
* **
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
### BREAKING CHANGES
|
|
152
|
-
|
|
153
|
-
* **colors:** read commit description
|
|
126
|
+
* **accordion:** props hasVerticalPaddings marked as deprecated ([4d6d4cc](https://github.com/MegafonWebLab/megafon-ui/commit/4d6d4cca2cf45a86441827f0bef625a88a2c44f8))
|
|
127
|
+
* **textfield:** add autocomplete prop ([f2cff94](https://github.com/MegafonWebLab/megafon-ui/commit/f2cff9403503de174b785ea02365ce470811369e))
|
|
154
128
|
|
|
155
129
|
|
|
156
130
|
|
package/README.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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),
|
|
@@ -224,9 +224,9 @@
|
|
|
224
224
|
fill: var(--stcWhite);
|
|
225
225
|
}
|
|
226
226
|
.mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_purple:not(.mfui-button_loading):hover {
|
|
227
|
-
background-color: var(--
|
|
228
|
-
-webkit-box-shadow: inset 0 0 0 1px var(--
|
|
229
|
-
box-shadow: inset 0 0 0 1px var(--
|
|
227
|
+
background-color: var(--buttonHoverPurple);
|
|
228
|
+
-webkit-box-shadow: inset 0 0 0 1px var(--buttonHoverPurple);
|
|
229
|
+
box-shadow: inset 0 0 0 1px var(--buttonHoverPurple);
|
|
230
230
|
}
|
|
231
231
|
.mfui-button_no-touch.mfui-button_type_primary.mfui-button_theme_purple:not(.mfui-button_loading):active {
|
|
232
232
|
background-color: var(--buttonDown);
|
|
@@ -96,7 +96,7 @@ var Button = function Button(_ref) {
|
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
onClick
|
|
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
|
-
}, [
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
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
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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
|
|
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
|
|
59
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(min);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
if (inputValue > max) {
|
|
63
|
-
onChange
|
|
63
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(max);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
if (inputValue >= min && inputValue <= max) {
|
|
67
|
-
onChange
|
|
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,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
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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 = {
|
|
@@ -25,7 +25,7 @@ var greenVerticalImg = function greenVerticalImg(props) {
|
|
|
25
25
|
fill: "none",
|
|
26
26
|
d: "M-213 356.4h169v128.5h-169z"
|
|
27
27
|
}), /*#__PURE__*/React.createElement("g", {
|
|
28
|
-
fill: "#
|
|
28
|
+
fill: "#00B956"
|
|
29
29
|
}, /*#__PURE__*/React.createElement("path", {
|
|
30
30
|
d: "M-124.9 372.3v32.4c0 1.4-1.2 2.5-2.6 2.5h-3.9c-.2 0-.3.2-.3.3v27.2c1 .1 1.9.1 2.9.1 17.4 0 31.5-14.1 31.5-31.5 0-15.8-12-29.1-27.6-31zm-.6 48.4c-2.2 0-3.9-1.8-3.9-3.9 0-2.2 1.8-3.9 3.9-3.9 2.2 0 3.9 1.8 3.9 3.9 0 2.2-1.8 3.9-3.9 3.9zm9.2 0c-2.2 0-3.9-1.8-3.9-3.9 0-2.2 1.8-3.9 3.9-3.9 2.2 0 3.9 1.8 3.9 3.9 0 2.2-1.7 3.9-3.9 3.9zm9.2 0c-2.2 0-3.9-1.8-3.9-3.9 0-2.2 1.8-3.9 3.9-3.9s3.9 1.8 3.9 3.9c0 2.2-1.7 3.9-3.9 3.9z"
|
|
31
31
|
}), /*#__PURE__*/React.createElement("path", {
|