@megafon/ui-core 4.0.0-beta.2 → 4.0.0-beta.20
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 +286 -16
- package/dist/es/components/Accordion/Accordion.css +9 -4
- package/dist/es/components/Accordion/Accordion.js +2 -2
- package/dist/es/components/Banner/Banner.d.ts +2 -0
- package/dist/es/components/Banner/Banner.js +46 -20
- package/dist/es/components/Button/Button.css +77 -0
- package/dist/es/components/Button/Button.d.ts +3 -0
- package/dist/es/components/Button/Button.js +12 -4
- package/dist/es/components/Calendar/Calendar.js +18 -2
- package/dist/es/components/Calendar/components/Month/Month.js +4 -4
- package/dist/es/components/Header/Header.css +3 -0
- package/dist/es/components/Header/Header.d.ts +2 -0
- package/dist/es/components/Header/Header.js +7 -1
- package/dist/es/components/Logo/Logo.js +22 -6
- package/dist/es/components/Notification/Notification.css +133 -35
- package/dist/es/components/Notification/Notification.d.ts +26 -0
- package/dist/es/components/Notification/Notification.js +190 -19
- package/dist/es/components/Search/Search.css +139 -10
- package/dist/es/components/Search/Search.d.ts +8 -0
- package/dist/es/components/Search/Search.js +32 -10
- package/dist/es/components/Select/Select.css +190 -49
- package/dist/es/components/Select/Select.d.ts +7 -0
- package/dist/es/components/Select/Select.js +37 -21
- package/dist/es/components/Switcher/Switcher.css +3 -0
- package/dist/es/components/Switcher/Switcher.d.ts +1 -0
- package/dist/es/components/Switcher/Switcher.js +4 -3
- package/dist/es/components/Tabs/Tab.d.ts +1 -0
- package/dist/es/components/Tabs/Tab.js +2 -1
- package/dist/es/components/Tabs/Tabs.css +151 -143
- package/dist/es/components/Tabs/Tabs.d.ts +9 -8
- package/dist/es/components/Tabs/Tabs.js +20 -22
- package/dist/es/components/TextField/TextField.css +111 -22
- package/dist/es/components/TextField/TextField.d.ts +2 -0
- package/dist/es/components/TextField/TextField.js +119 -42
- package/dist/es/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/es/components/Tooltip/Tooltip.js +32 -1
- package/dist/es/constants/throttleTime.d.ts +1 -0
- package/dist/es/constants/throttleTime.js +2 -1
- package/dist/es/index.d.ts +0 -1
- package/dist/es/index.js +0 -1
- package/dist/lib/components/Accordion/Accordion.css +9 -4
- package/dist/lib/components/Accordion/Accordion.js +2 -2
- package/dist/lib/components/Banner/Banner.d.ts +2 -0
- package/dist/lib/components/Banner/Banner.js +46 -20
- package/dist/lib/components/Button/Button.css +77 -0
- package/dist/lib/components/Button/Button.d.ts +3 -0
- package/dist/lib/components/Button/Button.js +12 -4
- package/dist/lib/components/Calendar/Calendar.js +17 -1
- package/dist/lib/components/Calendar/components/Month/Month.js +4 -4
- package/dist/lib/components/Header/Header.css +3 -0
- package/dist/lib/components/Header/Header.d.ts +2 -0
- package/dist/lib/components/Header/Header.js +7 -1
- package/dist/lib/components/Logo/Logo.js +22 -6
- package/dist/lib/components/Notification/Notification.css +133 -35
- package/dist/lib/components/Notification/Notification.d.ts +26 -0
- package/dist/lib/components/Notification/Notification.js +192 -19
- package/dist/lib/components/Search/Search.css +139 -10
- package/dist/lib/components/Search/Search.d.ts +8 -0
- package/dist/lib/components/Search/Search.js +35 -12
- package/dist/lib/components/Select/Select.css +190 -49
- package/dist/lib/components/Select/Select.d.ts +7 -0
- package/dist/lib/components/Select/Select.js +39 -23
- package/dist/lib/components/Switcher/Switcher.css +3 -0
- package/dist/lib/components/Switcher/Switcher.d.ts +1 -0
- package/dist/lib/components/Switcher/Switcher.js +4 -3
- package/dist/lib/components/Tabs/Tab.d.ts +1 -0
- package/dist/lib/components/Tabs/Tab.js +2 -1
- package/dist/lib/components/Tabs/Tabs.css +151 -143
- package/dist/lib/components/Tabs/Tabs.d.ts +9 -8
- package/dist/lib/components/Tabs/Tabs.js +22 -24
- package/dist/lib/components/TextField/TextField.css +111 -22
- package/dist/lib/components/TextField/TextField.d.ts +2 -0
- package/dist/lib/components/TextField/TextField.js +123 -41
- package/dist/lib/components/Tooltip/Tooltip.d.ts +4 -0
- package/dist/lib/components/Tooltip/Tooltip.js +36 -1
- package/dist/lib/constants/throttleTime.d.ts +1 -0
- package/dist/lib/constants/throttleTime.js +2 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +0 -8
- package/package.json +3 -3
- package/styles/base.less +1 -1
- package/dist/es/components/InputLabel/InputLabel.css +0 -5
- package/dist/es/components/InputLabel/InputLabel.d.ts +0 -10
- package/dist/es/components/InputLabel/InputLabel.js +0 -24
- package/dist/lib/components/InputLabel/InputLabel.css +0 -5
- package/dist/lib/components/InputLabel/InputLabel.d.ts +0 -10
- package/dist/lib/components/InputLabel/InputLabel.js +0 -43
package/CHANGELOG.md
CHANGED
|
@@ -3,51 +3,216 @@
|
|
|
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.
|
|
6
|
+
# [4.0.0-beta.20](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.19...@megafon/ui-core@4.0.0-beta.20) (2022-08-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **textfield:** returned correct color to notice text ([d6ef976](https://github.com/MegafonWebLab/megafon-ui/commit/d6ef976f755e1fb55d7fd2e462095459d96b74c9))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [4.0.0-beta.19](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.18...@megafon/ui-core@4.0.0-beta.19) (2022-08-23)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **notification:** fix bottom gaps ([1427080](https://github.com/MegafonWebLab/megafon-ui/commit/14270809ec97d18dbdf19183111b9034114d9437))
|
|
23
|
+
* **search:** add modifier for item paddings ([9df5792](https://github.com/MegafonWebLab/megafon-ui/commit/9df5792d6828f852bed9c1c4e64404667e8d2cd7))
|
|
24
|
+
* **select:** add modifier for item paddings ([e5f9735](https://github.com/MegafonWebLab/megafon-ui/commit/e5f97353c9686fba070aad48d3816ec0ce12d5d9))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [4.0.0-beta.18](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.17...@megafon/ui-core@4.0.0-beta.18) (2022-08-22)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **tabs:** fix swiper overflow and box-sizing ([bbfb09d](https://github.com/MegafonWebLab/megafon-ui/commit/bbfb09d86223c3dc1f70aaa2a03d108256c3a37d))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# [4.0.0-beta.17](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.16...@megafon/ui-core@4.0.0-beta.17) (2022-08-22)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* **select:** fix items overflow ([6c795a3](https://github.com/MegafonWebLab/megafon-ui/commit/6c795a35ae27e8100edd6d6ec7456962b8f62a41))
|
|
47
|
+
* **tabs:** fix container alignment ([2bd4f31](https://github.com/MegafonWebLab/megafon-ui/commit/2bd4f31fba455a817e9597103c25ca97fe33d2d8))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# [4.0.0-beta.16](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.15...@megafon/ui-core@4.0.0-beta.16) (2022-08-17)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* **textfield:** fixes permanently visible block after the field ([9cc5184](https://github.com/MegafonWebLab/megafon-ui/commit/9cc5184f7b60a7f7dcfe3f9f49cc3199787a77d7))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# [4.0.0-beta.15](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.14...@megafon/ui-core@4.0.0-beta.15) (2022-08-15)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Bug Fixes
|
|
68
|
+
|
|
69
|
+
* **textfield:** fix label styles ([080f8fa](https://github.com/MegafonWebLab/megafon-ui/commit/080f8faa3ef8ec954704466dc5b56d0313487787))
|
|
7
70
|
|
|
8
71
|
|
|
9
72
|
### Features
|
|
10
73
|
|
|
11
|
-
* **textfield:**
|
|
74
|
+
* **textfield:** add prop hidePlaceholder ([1c0176e](https://github.com/MegafonWebLab/megafon-ui/commit/1c0176ebdae47d11ac972ada200303500618caf1))
|
|
12
75
|
|
|
13
76
|
|
|
14
|
-
### BREAKING CHANGES
|
|
15
77
|
|
|
16
|
-
* **textfield:** add placeholders text by default
|
|
17
|
-
label element positon changed
|
|
18
|
-
if label prop not setted, label element has text from placeholder (default or in props)
|
|
19
78
|
|
|
20
79
|
|
|
80
|
+
# [4.0.0-beta.14](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.13...@megafon/ui-core@4.0.0-beta.14) (2022-08-08)
|
|
81
|
+
|
|
82
|
+
**Note:** Version bump only for package @megafon/ui-core
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# [4.0.0-beta.13](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.12...@megafon/ui-core@4.0.0-beta.13) (2022-08-08)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @megafon/ui-core
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# [4.0.0-beta.12](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.11...@megafon/ui-core@4.0.0-beta.12) (2022-08-02)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Bug Fixes
|
|
100
|
+
|
|
101
|
+
* **select:** update value check for undefined ([06f8dbf](https://github.com/MegafonWebLab/megafon-ui/commit/06f8dbfb065eaef7f6151cb88cebffe68d668ef8))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
# [4.0.0-beta.11](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.10...@megafon/ui-core@4.0.0-beta.11) (2022-07-27)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Features
|
|
111
|
+
|
|
112
|
+
* **search:** changed dropdown list item height ([25ceb63](https://github.com/MegafonWebLab/megafon-ui/commit/25ceb633cdc9922e2a93af919c742b1db82f2f57))
|
|
113
|
+
* **select:** fixed label position with empty string value and minor style changes ([f436d5c](https://github.com/MegafonWebLab/megafon-ui/commit/f436d5c65f0aa874d12cd8d1540698644d57a3db))
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# [4.0.0-beta.10](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.9...@megafon/ui-core@4.0.0-beta.10) (2022-07-15)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
### Bug Fixes
|
|
123
|
+
|
|
124
|
+
* **accordion:** update mobile styles ([910b1c8](https://github.com/MegafonWebLab/megafon-ui/commit/910b1c8f987f1043e362b089a3ff4cfe9638070d))
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
# [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)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Bug Fixes
|
|
134
|
+
|
|
135
|
+
* **select:** update styles ([b863c8c](https://github.com/MegafonWebLab/megafon-ui/commit/b863c8c94af251d6b3c9ee39124486d7d5db9a58))
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
# [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)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### Bug Fixes
|
|
145
|
+
|
|
146
|
+
* **accordion:** change focus and dark theme styles ([d3e07ea](https://github.com/MegafonWebLab/megafon-ui/commit/d3e07ea6fee0c131e25db1bb558d8b205d201e0c))
|
|
147
|
+
* **notification:** change title typography ([f91a60e](https://github.com/MegafonWebLab/megafon-ui/commit/f91a60ee1562626494358ef529321f072ba70890))
|
|
148
|
+
* **tabs:** change dark theme and indents styles ([272dfcb](https://github.com/MegafonWebLab/megafon-ui/commit/272dfcbeef750f2f7ae097b46f7d98405cf53a88))
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Features
|
|
152
|
+
|
|
153
|
+
* **header:** add new prop space ([e5bef7c](https://github.com/MegafonWebLab/megafon-ui/commit/e5bef7c8e13c57e477a4c25f07a4a4a6dbb8b6bd))
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
# [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)
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### Bug Fixes
|
|
163
|
+
|
|
164
|
+
* **select:** fix styles ([3e79c68](https://github.com/MegafonWebLab/megafon-ui/commit/3e79c68fecde72e515b7ef52d38d9188e51680f6))
|
|
21
165
|
|
|
22
166
|
|
|
23
167
|
|
|
24
|
-
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
# [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)
|
|
25
171
|
|
|
26
172
|
|
|
27
173
|
### Features
|
|
28
174
|
|
|
29
|
-
* **
|
|
175
|
+
* **inputlabel:** component removed ([1f236ac](https://github.com/MegafonWebLab/megafon-ui/commit/1f236ace90acfd7ea1917422677fa24c1c5abdf4))
|
|
176
|
+
* **search:** component redesign ([d6f11eb](https://github.com/MegafonWebLab/megafon-ui/commit/d6f11eb7ee810b835879c7a31e5e01c426060ea1))
|
|
177
|
+
* **select:** component redesign ([aeeda00](https://github.com/MegafonWebLab/megafon-ui/commit/aeeda00dfc1db70421a495a686954e19eecf815d))
|
|
30
178
|
|
|
31
179
|
|
|
32
180
|
### BREAKING CHANGES
|
|
33
181
|
|
|
34
|
-
* **
|
|
182
|
+
* **inputlabel:** inputLabel component removed due to non-use
|
|
35
183
|
|
|
36
184
|
|
|
37
185
|
|
|
38
186
|
|
|
39
187
|
|
|
40
|
-
# [4.0.0-beta.
|
|
188
|
+
# [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)
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Bug Fixes
|
|
192
|
+
|
|
193
|
+
* **textfield:** fix textarea design bugs ([287d426](https://github.com/MegafonWebLab/megafon-ui/commit/287d42644b24ca0e1a3824d5907d8af78293d0e3))
|
|
194
|
+
* **textfield:** update textarea scroll and resize ([9dbce52](https://github.com/MegafonWebLab/megafon-ui/commit/9dbce52d6bc3a71076ffdf2365715204231da774))
|
|
41
195
|
|
|
42
196
|
|
|
43
197
|
### Features
|
|
44
198
|
|
|
45
|
-
* **
|
|
46
|
-
* **
|
|
199
|
+
* **accordion:** update by new design ([92dab3a](https://github.com/MegafonWebLab/megafon-ui/commit/92dab3a367544d8507526e7a57a0a9a4015e3acf))
|
|
200
|
+
* **caption:** add new Caption component; update .smallFont() less mixin ([b02a3f7](https://github.com/MegafonWebLab/megafon-ui/commit/b02a3f73ed8d5390d8427ab0a6bc62210710ba40))
|
|
201
|
+
* **paragraph:** remove prop size; add new prop; add 'pale' option to colors ([ffb6bc7](https://github.com/MegafonWebLab/megafon-ui/commit/ffb6bc709a4ef91536e359d5f9edc5501caf0c2c))
|
|
202
|
+
* **tabs:** update by new design ([20ae2cc](https://github.com/MegafonWebLab/megafon-ui/commit/20ae2cc695e1245b9cd06fe37a9e4e3bb0c7eaae))
|
|
203
|
+
* **textfield:** update by new design ([24ec769](https://github.com/MegafonWebLab/megafon-ui/commit/24ec769aeddac9a198941727aaca02ad0fb816f1))
|
|
47
204
|
|
|
48
205
|
|
|
49
206
|
### BREAKING CHANGES
|
|
50
207
|
|
|
208
|
+
* **textfield:** add defaultTransitionTiming in less global variables
|
|
209
|
+
* **tabs:** new prop autoWidth added
|
|
210
|
+
size prop small vallue removed
|
|
211
|
+
new sizes
|
|
212
|
+
* **textfield:** add placeholders text by default
|
|
213
|
+
label element positon changed
|
|
214
|
+
if label prop not setted, label element has text from placeholder (default or in props)
|
|
215
|
+
* **accordion:** change next-sibling accordion styles
|
|
51
216
|
* **caption:** .smallFont() less mixin line-height rule now set to 18px instead of 16px
|
|
52
217
|
either accept new rules or manually add line-height: 16px in your components
|
|
53
218
|
* **paragraph:** prop 'size' is no longer exists.
|
|
@@ -57,17 +222,122 @@ use component Caption instead of Paragraph size="small"
|
|
|
57
222
|
|
|
58
223
|
|
|
59
224
|
|
|
60
|
-
|
|
225
|
+
# [3.12.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.11.0...@megafon/ui-core@3.12.0) (2022-06-28)
|
|
61
226
|
|
|
62
|
-
**Note:** Version bump only for package @megafon/ui-core
|
|
63
227
|
|
|
228
|
+
### Features
|
|
64
229
|
|
|
230
|
+
* **tab:** add data-attribute for inner element ([43e58e1](https://github.com/MegafonWebLab/megafon-ui/commit/43e58e12b8da661020f4b48f55245492c21ad376))
|
|
65
231
|
|
|
66
232
|
|
|
67
233
|
|
|
68
|
-
## [3.5.3-beta.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.5.2...@megafon/ui-core@3.5.3-beta.0) (2022-04-13)
|
|
69
234
|
|
|
70
|
-
|
|
235
|
+
|
|
236
|
+
# [3.11.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.10.1...@megafon/ui-core@3.11.0) (2022-06-21)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
### Bug Fixes
|
|
240
|
+
|
|
241
|
+
* **button:** fix font styles for extra small size ([f475b05](https://github.com/MegafonWebLab/megafon-ui/commit/f475b05ab9d62aa56645fb90ccdef88996e72a70))
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
### Features
|
|
245
|
+
|
|
246
|
+
* **button:** add prop ellipsis ([1978277](https://github.com/MegafonWebLab/megafon-ui/commit/1978277a918cb680e32259042c1a7e3c58056b1b))
|
|
247
|
+
* **notification:** add ability to display button and collapse ([a5fe2f0](https://github.com/MegafonWebLab/megafon-ui/commit/a5fe2f0730b71469c2fb06a148b0e4574adb2d7b))
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
## [3.10.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.10.0...@megafon/ui-core@3.10.1) (2022-06-07)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
### Bug Fixes
|
|
257
|
+
|
|
258
|
+
* **banner:** fix bug with hover on autoplay ([93271d8](https://github.com/MegafonWebLab/megafon-ui/commit/93271d8c8f9dd900c031d41f89207f61c41db063))
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
# [3.10.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.9.0...@megafon/ui-core@3.10.0) (2022-05-30)
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
### Features
|
|
268
|
+
|
|
269
|
+
* **banner:** add new prop 'pauseOnHover' ([ac654c3](https://github.com/MegafonWebLab/megafon-ui/commit/ac654c3c23821a5d29ffd5cd91ff7337b3d087c1))
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
# [3.9.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.8.0...@megafon/ui-core@3.9.0) (2022-05-27)
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
### Bug Fixes
|
|
279
|
+
|
|
280
|
+
* **select:** fix selected item color when value is zero ([9847095](https://github.com/MegafonWebLab/megafon-ui/commit/98470955ef813504d4bfa4cd4d3aba77b5458446))
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
### Features
|
|
284
|
+
|
|
285
|
+
* **switcher:** add data-attribute for inner element ([793a022](https://github.com/MegafonWebLab/megafon-ui/commit/793a0224ab957b938e67dd1b4d16c2389a9fb6f8))
|
|
286
|
+
* **tooltip:** add portal selector props ([6188832](https://github.com/MegafonWebLab/megafon-ui/commit/6188832e9ba212e7a8182333aba06d77c3e979d6))
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
# [3.8.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.7.0...@megafon/ui-core@3.8.0) (2022-05-17)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
### Features
|
|
296
|
+
|
|
297
|
+
* **notification:** add props classes to notification component ([608a424](https://github.com/MegafonWebLab/megafon-ui/commit/608a4246eb99af354fb7cf8ab98c2ed513d87b66))
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
# [3.7.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.6.0...@megafon/ui-core@3.7.0) (2022-05-05)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
### Bug Fixes
|
|
307
|
+
|
|
308
|
+
* **logo:** fix horizontal logo svg ([76655eb](https://github.com/MegafonWebLab/megafon-ui/commit/76655ebb82650cc2617750af0b2b2726d3ebcbf3))
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
### Features
|
|
312
|
+
|
|
313
|
+
* **button:** added extra small size ([a26da46](https://github.com/MegafonWebLab/megafon-ui/commit/a26da4601de7e7c81c40eabf9a87ccdbf18cb790))
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
# [3.6.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.5.3...@megafon/ui-core@3.6.0) (2022-04-25)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
### Bug Fixes
|
|
323
|
+
|
|
324
|
+
* **calendar:** fix go to start day after user choice ([8bbce10](https://github.com/MegafonWebLab/megafon-ui/commit/8bbce102d204f7ea7706158f3e6540c86ed3aada))
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
### Features
|
|
328
|
+
|
|
329
|
+
* **tooltip:** added prop isPortal for tooltip ([e6f6d17](https://github.com/MegafonWebLab/megafon-ui/commit/e6f6d1749cd99f065c50bac4eb6a9b3592653f8d))
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
## [3.5.3](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.5.2...@megafon/ui-core@3.5.3) (2022-04-18)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
### Bug Fixes
|
|
339
|
+
|
|
340
|
+
* **switcher:** fix safari bugs ([65274bc](https://github.com/MegafonWebLab/megafon-ui/commit/65274bc3c5e7385109afff94a8ff3f712c9af097))
|
|
71
341
|
|
|
72
342
|
|
|
73
343
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
.mfui-accordion__title-wrap {
|
|
14
14
|
position: relative;
|
|
15
|
-
padding: 20px
|
|
15
|
+
padding: 20px 44px 20px 16px;
|
|
16
16
|
border-radius: 12px;
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
-webkit-transition: background-color 0.3s;
|
|
@@ -20,11 +20,16 @@
|
|
|
20
20
|
}
|
|
21
21
|
@media screen and (min-width: 768px) {
|
|
22
22
|
.mfui-accordion__title-wrap {
|
|
23
|
-
padding: 20px 24px;
|
|
23
|
+
padding: 20px 56px 20px 24px;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
.mfui-accordion__title-wrap:hover {
|
|
27
|
-
background: var(--spbSky1);
|
|
27
|
+
background-color: var(--spbSky1);
|
|
28
|
+
}
|
|
29
|
+
@media screen and (max-width: 1023px) {
|
|
30
|
+
.mfui-accordion__title-wrap:focus {
|
|
31
|
+
background-color: inherit;
|
|
32
|
+
}
|
|
28
33
|
}
|
|
29
34
|
.mfui-accordion__icon-box {
|
|
30
35
|
position: absolute;
|
|
@@ -42,7 +47,7 @@
|
|
|
42
47
|
width: 24px;
|
|
43
48
|
height: 24px;
|
|
44
49
|
border-radius: 50%;
|
|
45
|
-
background-color: var(--
|
|
50
|
+
background-color: var(--stcWhite);
|
|
46
51
|
-webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
47
52
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
48
53
|
-webkit-transform: translateY(-50%);
|
|
@@ -11,9 +11,9 @@ var ArrowDown = function ArrowDown(props) {
|
|
|
11
11
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
12
12
|
viewBox: "0 0 32 32"
|
|
13
13
|
}, props), /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
d: "M11 14h10l-5 6z",
|
|
14
15
|
fillRule: "evenodd",
|
|
15
|
-
clipRule: "evenodd"
|
|
16
|
-
d: "M11 14h10l-5 6z"
|
|
16
|
+
clipRule: "evenodd"
|
|
17
17
|
}));
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -32,6 +32,8 @@ export interface IBannerProps {
|
|
|
32
32
|
autoPlay?: boolean;
|
|
33
33
|
/** Задержка автоматической прокрутки */
|
|
34
34
|
autoPlayDelay?: number;
|
|
35
|
+
/** Пауза автоматической прокрутки при наведении курсора на компонент */
|
|
36
|
+
pauseOnHover?: boolean;
|
|
35
37
|
/** Цветовая тема навигации */
|
|
36
38
|
navTheme?: NavThemeType;
|
|
37
39
|
/** Обработчик клика по стрелке "вперед" (должен быть обернут в useCallback) */
|
|
@@ -49,7 +49,9 @@ var Banner = function Banner(_ref) {
|
|
|
49
49
|
onPrevClick = _ref.onPrevClick,
|
|
50
50
|
onDotClick = _ref.onDotClick,
|
|
51
51
|
onChange = _ref.onChange,
|
|
52
|
-
dataAttrs = _ref.dataAttrs
|
|
52
|
+
dataAttrs = _ref.dataAttrs,
|
|
53
|
+
_ref$pauseOnHover = _ref.pauseOnHover,
|
|
54
|
+
pauseOnHover = _ref$pauseOnHover === void 0 ? false : _ref$pauseOnHover;
|
|
53
55
|
|
|
54
56
|
var _React$useState = React.useState(),
|
|
55
57
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
@@ -69,29 +71,42 @@ var Banner = function Banner(_ref) {
|
|
|
69
71
|
var _React$useState7 = React.useState(autoPlay),
|
|
70
72
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
71
73
|
isAutoPlaying = _React$useState8[0],
|
|
72
|
-
|
|
74
|
+
setAutoPlaying = _React$useState8[1];
|
|
73
75
|
|
|
74
76
|
var _React$useState9 = React.useState(0),
|
|
75
77
|
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
76
78
|
activeIndex = _React$useState10[0],
|
|
77
79
|
setActiveIndex = _React$useState10[1];
|
|
78
80
|
|
|
81
|
+
var _React$useState11 = React.useState(autoPlayDelay),
|
|
82
|
+
_React$useState12 = _slicedToArray(_React$useState11, 2),
|
|
83
|
+
delay = _React$useState12[0],
|
|
84
|
+
setDelay = _React$useState12[1];
|
|
85
|
+
|
|
86
|
+
var _React$useState13 = React.useState(false),
|
|
87
|
+
_React$useState14 = _slicedToArray(_React$useState13, 2),
|
|
88
|
+
isIncreasedDelay = _React$useState14[0],
|
|
89
|
+
setIsIncreasedDelay = _React$useState14[1];
|
|
90
|
+
|
|
79
91
|
var showDotTimer = loop ? isAutoPlaying : isAutoPlaying && !isEnd;
|
|
80
|
-
var dotTimerDelay =
|
|
92
|
+
var dotTimerDelay = delay / 1000;
|
|
81
93
|
var navArrowTheme = navTheme === NavTheme.DARK ? ArrowTheme.DARK : ArrowTheme.PURPLE;
|
|
94
|
+
var rootRef = React.useRef(null);
|
|
82
95
|
var increaseAutoplayDelay = React.useCallback(function (_ref2) {
|
|
83
96
|
var params = _ref2.params,
|
|
84
97
|
autoplay = _ref2.autoplay;
|
|
85
98
|
|
|
86
|
-
if (_typeof(params.autoplay) !== 'object' || !
|
|
99
|
+
if (_typeof(params.autoplay) !== 'object' || !autoPlay) {
|
|
87
100
|
return;
|
|
88
101
|
}
|
|
89
102
|
|
|
90
103
|
autoplay.stop(); // eslint-disable-next-line no-param-reassign
|
|
91
104
|
|
|
92
105
|
params.autoplay.delay = autoPlayDelay * 3;
|
|
106
|
+
setDelay(autoPlayDelay * 3);
|
|
107
|
+
setIsIncreasedDelay(true);
|
|
93
108
|
autoplay.start();
|
|
94
|
-
}, [autoPlayDelay]);
|
|
109
|
+
}, [autoPlay, autoPlayDelay]);
|
|
95
110
|
var handlePrevClick = React.useCallback(function () {
|
|
96
111
|
if (!swiperInstance) {
|
|
97
112
|
return;
|
|
@@ -99,8 +114,8 @@ var Banner = function Banner(_ref) {
|
|
|
99
114
|
|
|
100
115
|
swiperInstance.slidePrev();
|
|
101
116
|
onPrevClick === null || onPrevClick === void 0 ? void 0 : onPrevClick(swiperInstance.realIndex);
|
|
102
|
-
increaseAutoplayDelay(swiperInstance);
|
|
103
|
-
}, [swiperInstance, onPrevClick, increaseAutoplayDelay]);
|
|
117
|
+
!isIncreasedDelay && increaseAutoplayDelay(swiperInstance);
|
|
118
|
+
}, [swiperInstance, onPrevClick, isIncreasedDelay, increaseAutoplayDelay]);
|
|
104
119
|
var handleNextClick = React.useCallback(function () {
|
|
105
120
|
if (!swiperInstance) {
|
|
106
121
|
return;
|
|
@@ -108,8 +123,8 @@ var Banner = function Banner(_ref) {
|
|
|
108
123
|
|
|
109
124
|
swiperInstance.slideNext();
|
|
110
125
|
onNextClick === null || onNextClick === void 0 ? void 0 : onNextClick(swiperInstance.realIndex);
|
|
111
|
-
increaseAutoplayDelay(swiperInstance);
|
|
112
|
-
}, [swiperInstance, onNextClick, increaseAutoplayDelay]);
|
|
126
|
+
!isIncreasedDelay && increaseAutoplayDelay(swiperInstance);
|
|
127
|
+
}, [swiperInstance, onNextClick, isIncreasedDelay, increaseAutoplayDelay]);
|
|
113
128
|
var handleDotClick = React.useCallback(function (index) {
|
|
114
129
|
if (!swiperInstance) {
|
|
115
130
|
return;
|
|
@@ -122,11 +137,8 @@ var Banner = function Banner(_ref) {
|
|
|
122
137
|
}
|
|
123
138
|
|
|
124
139
|
onDotClick === null || onDotClick === void 0 ? void 0 : onDotClick(swiperInstance.realIndex);
|
|
125
|
-
increaseAutoplayDelay(swiperInstance);
|
|
126
|
-
}, [swiperInstance, loop, onDotClick, increaseAutoplayDelay]);
|
|
127
|
-
var handleSwiper = React.useCallback(function (swiper) {
|
|
128
|
-
setSwiperInstance(swiper);
|
|
129
|
-
}, []);
|
|
140
|
+
!isIncreasedDelay && increaseAutoplayDelay(swiperInstance);
|
|
141
|
+
}, [swiperInstance, loop, onDotClick, isIncreasedDelay, increaseAutoplayDelay]);
|
|
130
142
|
var handleReachBeginning = React.useCallback(function () {
|
|
131
143
|
setBeginning(true);
|
|
132
144
|
}, []);
|
|
@@ -148,24 +160,37 @@ var Banner = function Banner(_ref) {
|
|
|
148
160
|
setActiveIndex(realIndex);
|
|
149
161
|
onChange === null || onChange === void 0 ? void 0 : onChange(realIndex);
|
|
150
162
|
}, [onChange]);
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
163
|
+
React.useEffect(function () {
|
|
164
|
+
var rootElement = rootRef.current;
|
|
165
|
+
|
|
166
|
+
if (!pauseOnHover || !autoPlay) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
rootElement === null || rootElement === void 0 ? void 0 : rootElement.addEventListener('mouseenter', function () {
|
|
171
|
+
swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.autoplay.stop();
|
|
172
|
+
setAutoPlaying(false);
|
|
173
|
+
});
|
|
174
|
+
rootElement === null || rootElement === void 0 ? void 0 : rootElement.addEventListener('mouseleave', function () {
|
|
175
|
+
swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.autoplay.start();
|
|
176
|
+
setAutoPlaying(true);
|
|
177
|
+
});
|
|
178
|
+
}, [autoPlay, pauseOnHover, swiperInstance === null || swiperInstance === void 0 ? void 0 : swiperInstance.autoplay]);
|
|
154
179
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
155
180
|
className: cn({
|
|
156
181
|
'nav-theme': navTheme
|
|
157
|
-
}, className)
|
|
182
|
+
}, className),
|
|
183
|
+
ref: rootRef
|
|
158
184
|
}), /*#__PURE__*/React.createElement(Swiper, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.swiper), {
|
|
159
185
|
className: cn('swiper'),
|
|
160
186
|
loop: loop,
|
|
161
187
|
autoplay: autoPlay ? getAutoPlayConfig(autoPlayDelay) : false,
|
|
162
188
|
watchSlidesVisibility: true,
|
|
163
|
-
onSwiper:
|
|
189
|
+
onSwiper: setSwiperInstance,
|
|
164
190
|
onReachBeginning: handleReachBeginning,
|
|
165
191
|
onReachEnd: handleReachEnd,
|
|
166
192
|
onFromEdge: handleFromEdge,
|
|
167
193
|
onSlideChange: handleSlideChange,
|
|
168
|
-
onAutoplayStop: handleAutoplayStop,
|
|
169
194
|
onTouchEnd: increaseAutoplayDelay
|
|
170
195
|
}), React.Children.map(children, function (child, i) {
|
|
171
196
|
return /*#__PURE__*/React.createElement(SwiperSlide, _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.slide, i + 1), {
|
|
@@ -232,6 +257,7 @@ Banner.propTypes = {
|
|
|
232
257
|
}),
|
|
233
258
|
autoPlay: PropTypes.bool,
|
|
234
259
|
autoPlayDelay: PropTypes.number,
|
|
260
|
+
pauseOnHover: PropTypes.bool,
|
|
235
261
|
navTheme: PropTypes.oneOf(Object.values(NavTheme)),
|
|
236
262
|
onNextClick: PropTypes.func,
|
|
237
263
|
onPrevClick: PropTypes.func,
|