@megafon/ui-core 3.0.0-beta.9 → 3.1.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.
- package/CHANGELOG.md +68 -84
- 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 +44 -0
- package/dist/es/components/Banner/Banner.d.ts +2 -0
- package/dist/es/components/Banner/Banner.js +25 -13
- package/dist/es/components/Button/Button.css +11 -11
- package/dist/es/components/Button/Button.js +3 -3
- package/dist/es/components/Calendar/Calendar.d.ts +8 -0
- package/dist/es/components/Calendar/Calendar.js +23 -6
- package/dist/es/components/Calendar/components/Day/Day.d.ts +3 -0
- package/dist/es/components/Calendar/components/Day/Day.js +10 -6
- package/dist/es/components/Calendar/components/Month/Month.d.ts +5 -0
- package/dist/es/components/Calendar/components/Month/Month.js +14 -8
- package/dist/es/components/Carousel/Carousel.js +35 -13
- package/dist/es/components/Checkbox/Checkbox.js +1 -1
- package/dist/es/components/Collapse/Collapse.js +55 -28
- package/dist/es/components/ContentArea/ContentArea.css +32 -22
- package/dist/es/components/ContentArea/ContentArea.d.ts +3 -2
- package/dist/es/components/ContentArea/ContentArea.js +11 -11
- package/dist/es/components/Counter/Counter.d.ts +7 -0
- package/dist/es/components/Counter/Counter.js +18 -11
- 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 +9 -11
- package/dist/es/components/NavArrow/NavArrow.css +1 -1
- package/dist/es/components/NavArrow/NavArrow.d.ts +3 -0
- package/dist/es/components/NavArrow/NavArrow.js +8 -4
- 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 +2 -5
- package/dist/es/components/RadioButton/RadioButton.js +1 -1
- package/dist/es/components/Search/Search.d.ts +7 -0
- package/dist/es/components/Search/Search.js +20 -12
- package/dist/es/components/Select/Select.js +6 -14
- package/dist/es/components/Switcher/Switcher.css +19 -15
- package/dist/es/components/Switcher/Switcher.d.ts +4 -0
- package/dist/es/components/Switcher/Switcher.js +23 -11
- package/dist/es/components/Tabs/Tabs.css +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/TextLink/TextLink.js +6 -8
- package/dist/es/components/Tile/Tile.js +4 -2
- package/dist/es/components/Tooltip/Tooltip.js +17 -17
- 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 +44 -0
- package/dist/lib/components/Banner/Banner.d.ts +2 -0
- package/dist/lib/components/Banner/Banner.js +25 -13
- package/dist/lib/components/Button/Button.css +11 -11
- package/dist/lib/components/Button/Button.js +3 -3
- package/dist/lib/components/Calendar/Calendar.d.ts +8 -0
- package/dist/lib/components/Calendar/Calendar.js +22 -6
- package/dist/lib/components/Calendar/components/Day/Day.d.ts +3 -0
- package/dist/lib/components/Calendar/components/Day/Day.js +9 -5
- package/dist/lib/components/Calendar/components/Month/Month.d.ts +5 -0
- package/dist/lib/components/Calendar/components/Month/Month.js +13 -7
- package/dist/lib/components/Carousel/Carousel.js +33 -11
- package/dist/lib/components/Checkbox/Checkbox.js +1 -1
- package/dist/lib/components/Collapse/Collapse.js +54 -30
- package/dist/lib/components/ContentArea/ContentArea.css +32 -22
- package/dist/lib/components/ContentArea/ContentArea.d.ts +3 -2
- package/dist/lib/components/ContentArea/ContentArea.js +11 -11
- package/dist/lib/components/Counter/Counter.d.ts +7 -0
- package/dist/lib/components/Counter/Counter.js +17 -10
- 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 +9 -11
- package/dist/lib/components/NavArrow/NavArrow.css +1 -1
- package/dist/lib/components/NavArrow/NavArrow.d.ts +3 -0
- package/dist/lib/components/NavArrow/NavArrow.js +7 -3
- 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 +2 -5
- package/dist/lib/components/RadioButton/RadioButton.js +1 -1
- package/dist/lib/components/Search/Search.d.ts +7 -0
- package/dist/lib/components/Search/Search.js +19 -11
- package/dist/lib/components/Select/Select.js +6 -14
- package/dist/lib/components/Switcher/Switcher.css +19 -15
- package/dist/lib/components/Switcher/Switcher.d.ts +4 -0
- package/dist/lib/components/Switcher/Switcher.js +26 -10
- package/dist/lib/components/Tabs/Tabs.css +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/TextLink/TextLink.js +6 -8
- package/dist/lib/components/Tile/Tile.js +4 -2
- package/dist/lib/components/Tooltip/Tooltip.js +17 -17
- package/package.json +4 -4
- package/styles/colors.css +2 -2
- package/styles/colorsDark.css +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,165 +3,149 @@
|
|
|
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.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* **select:** made select as a functional component ([b45e697](https://github.com/MegafonWebLab/megafon-ui/commit/b45e697de696f892a42a8fa5756289183624fed6))
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
# [3.1.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@3.0.2...@megafon/ui-core@3.1.0) (2022-02-22)
|
|
14
7
|
|
|
15
8
|
|
|
9
|
+
### Bug Fixes
|
|
16
10
|
|
|
17
|
-
|
|
11
|
+
* **carousel:** add resize listener to nav display ([12abd93](https://github.com/MegafonWebLab/megafon-ui/commit/12abd93d226676d2c4f78968c9d5de032783ec8d))
|
|
12
|
+
* **colors:** fix colors usage ([f2f59a8](https://github.com/MegafonWebLab/megafon-ui/commit/f2f59a81644c157394817af1531dabb1c0b67b19))
|
|
13
|
+
* **components:** better view of default props values ([1817ed5](https://github.com/MegafonWebLab/megafon-ui/commit/1817ed5cd17fd78a0911a89020138f05d7af9833))
|
|
14
|
+
* **contentarea:** add 'black' color prop value; deprecate 'default' color prop value; more examples ([e0b0c72](https://github.com/MegafonWebLab/megafon-ui/commit/e0b0c723a37f0e42ccb1c0d30df8ae36e9c82920))
|
|
18
15
|
|
|
19
16
|
|
|
20
17
|
### Features
|
|
21
18
|
|
|
22
|
-
* **
|
|
19
|
+
* **banner:** add opacity for slides ([bb403a1](https://github.com/MegafonWebLab/megafon-ui/commit/bb403a1d38fd0c1efd3e1df3ed72ea4e5c772c40))
|
|
20
|
+
* **collapse:** changed collapse animation via setTimeout to requestAnimationFrame ([06d7b4f](https://github.com/MegafonWebLab/megafon-ui/commit/06d7b4ff0f3cdf3cc22fb1d45e8401e259636cf5))
|
|
21
|
+
* **ui-core:** add dataAttrs prop for interactive elements of components that did not have ([f495833](https://github.com/MegafonWebLab/megafon-ui/commit/f495833b33ac7823ae5992a3f7eb8b7cef82c036))
|
|
23
22
|
|
|
24
23
|
|
|
25
|
-
### BREAKING CHANGES
|
|
26
|
-
|
|
27
|
-
* **accordion:** remove prop hasVerticalPaddings
|
|
28
|
-
|
|
29
24
|
|
|
30
25
|
|
|
31
26
|
|
|
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)
|
|
27
|
+
## [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)
|
|
34
28
|
|
|
35
29
|
|
|
36
30
|
### Bug Fixes
|
|
37
31
|
|
|
38
|
-
* **
|
|
39
|
-
|
|
32
|
+
* **tile:** fixed dataAttrs type in tile component ([d380289](https://github.com/MegafonWebLab/megafon-ui/commit/d3802896c57dc112543c73169c04262f58a29f58))
|
|
40
33
|
|
|
41
|
-
### Features
|
|
42
34
|
|
|
43
|
-
* **components:** add dataAttrs props in new format ([026d868](https://github.com/MegafonWebLab/megafon-ui/commit/026d8681743d55ea8c93d17000a64959093f7a05))
|
|
44
35
|
|
|
45
36
|
|
|
46
37
|
|
|
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)
|
|
38
|
+
## [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)
|
|
50
39
|
|
|
51
40
|
|
|
52
41
|
### Bug Fixes
|
|
53
42
|
|
|
54
|
-
* color
|
|
55
|
-
*
|
|
56
|
-
* **
|
|
57
|
-
* **
|
|
58
|
-
*
|
|
59
|
-
* **textlink:** fix color prop type ([6edcea0](https://github.com/MegafonWebLab/megafon-ui/commit/6edcea06ce26d137611aaf022d3ee6f7da295366))
|
|
43
|
+
* **colors:** fix button hover purple color name and value ([c333348](https://github.com/MegafonWebLab/megafon-ui/commit/c3333489826338f49e4ecb1c1beb07ee9044167e))
|
|
44
|
+
* **colors:** fix typo in brandPurple color ([f7bdb49](https://github.com/MegafonWebLab/megafon-ui/commit/f7bdb4956247a4bf2112c130e960a98f8cea0696))
|
|
45
|
+
* **logo:** fix green color for vertical logo ([c9aed9d](https://github.com/MegafonWebLab/megafon-ui/commit/c9aed9db957cb9857cc20afa8dd824e241e12114))
|
|
46
|
+
* **notification:** fix styles ([7d93f3e](https://github.com/MegafonWebLab/megafon-ui/commit/7d93f3ea0e61af9647478af03f84e963d5d52e0f))
|
|
47
|
+
* revert mistake version ([cc8668a](https://github.com/MegafonWebLab/megafon-ui/commit/cc8668a9ff2bc5fde6bf93ca806d4406a5944107))
|
|
60
48
|
|
|
61
49
|
|
|
62
|
-
### BREAKING CHANGES
|
|
63
50
|
|
|
64
|
-
* ContentArea: prop color change values from 'base' to 'white' and from 'content' to 'default';
|
|
65
|
-
remove depreacted value 'freshAsphalt'
|
|
66
|
-
Paragraph: prop color change values from 'base' to 'white' and from 'contend' to 'default';
|
|
67
|
-
remove deprecared values 'freshAsphalt' and 'clearWhite'
|
|
68
|
-
StoreBanner: prop theme change value from 'black' to 'default'; remove deprecated value 'clearWhite'
|
|
69
|
-
* ContentArea, Paragraph, StoreBanner and Breadcrumbs components from no don't have
|
|
70
|
-
freshAsphalt and clearWhite as values for colorize props
|
|
71
51
|
|
|
72
52
|
|
|
53
|
+
# [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)
|
|
73
54
|
|
|
74
55
|
|
|
56
|
+
### Bug Fixes
|
|
75
57
|
|
|
76
|
-
|
|
58
|
+
* **accordion:** add focus on arrow after tab press, add open/close accordion after enter press ([5c49447](https://github.com/MegafonWebLab/megafon-ui/commit/5c494474dc319593283b339c63936fd2b862a33f))
|
|
59
|
+
* **accordion:** change type of onClickAccordion prop ([b74e196](https://github.com/MegafonWebLab/megafon-ui/commit/b74e1963587a140bb25b8e50e64490a1337dda78))
|
|
60
|
+
* **calendar/month:** add focus on month arrows, add enter press handlers ([caad017](https://github.com/MegafonWebLab/megafon-ui/commit/caad0176a9d272b19da11ddfac1830d863d090ae))
|
|
61
|
+
* **checkbox:** add focus on custom checkbox, add enter press handler ([136872c](https://github.com/MegafonWebLab/megafon-ui/commit/136872c84c058502a46d5b6db5088bebd71ebdb8))
|
|
62
|
+
* **checkbox:** add isChecked state, change type of onChange prop ([be62e30](https://github.com/MegafonWebLab/megafon-ui/commit/be62e30f43dcee4c43cab5425c4ddc0c6954f3f7))
|
|
63
|
+
* **components:** change tests for dataAttrs prop ([eae8ecb](https://github.com/MegafonWebLab/megafon-ui/commit/eae8ecb5104c050ec0e67357ed5edecdfb042838))
|
|
64
|
+
* **core:** fix build ui-core ([fa9522a](https://github.com/MegafonWebLab/megafon-ui/commit/fa9522ac0931edb7ec772ad040557997db080687))
|
|
65
|
+
* **core:** separated colors.css file ([3a0af6b](https://github.com/MegafonWebLab/megafon-ui/commit/3a0af6b31d711016faa92bc7402ce02c6d8710ae))
|
|
66
|
+
* **less:** import base.less file through reference ([20bd43d](https://github.com/MegafonWebLab/megafon-ui/commit/20bd43d60f9cfac102c55ccdf183578702d2eb96))
|
|
67
|
+
* **paragraph:** remove spbSky... values from color prop ([3a74e2b](https://github.com/MegafonWebLab/megafon-ui/commit/3a74e2ba23b41a1982f72cb1a869e0253c903180))
|
|
68
|
+
* **switcher:** fix switcher design ([642d679](https://github.com/MegafonWebLab/megafon-ui/commit/642d679d6c48c4a96093220415a68c9444d8cb53))
|
|
69
|
+
* **textlink:** fix color prop type ([4e93cce](https://github.com/MegafonWebLab/megafon-ui/commit/4e93ccef6bcbb1a5e670089dfafe308c23fcbe1e))
|
|
70
|
+
* **tooltip:** add check event function from ui-helpers ([18ef333](https://github.com/MegafonWebLab/megafon-ui/commit/18ef333ba78f7804731da2116b124cdc44a8dfcb))
|
|
77
71
|
|
|
78
72
|
|
|
79
73
|
### Features
|
|
80
74
|
|
|
81
|
-
* **
|
|
82
|
-
* **
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
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
|
|
75
|
+
* **accordion:** remove prop hasVerticalPaddings ([c1f0139](https://github.com/MegafonWebLab/megafon-ui/commit/c1f01398154497ed69fb2bb725077e3cc3b5c47e))
|
|
76
|
+
* **colors:** css custom properties and color themes support ([16df5b7](https://github.com/MegafonWebLab/megafon-ui/commit/16df5b7b2644e15bb6c6e49e7347c0f8e4839e58))
|
|
77
|
+
* **colors:** rename green and purple to brandGreen and brandPurple to avoid postcss-colormin bug ([089dd42](https://github.com/MegafonWebLab/megafon-ui/commit/089dd42cd18db7fc83e690da45d09b88c636a6f7))
|
|
78
|
+
* **colors:** update color values on colors page when user switches theme ([8eb66de](https://github.com/MegafonWebLab/megafon-ui/commit/8eb66dec2ef9de5615ad8c921c422b6a9f00893a))
|
|
79
|
+
* **components:** add dataAttrs props in new format ([e9cf812](https://github.com/MegafonWebLab/megafon-ui/commit/e9cf8122ac47f83a8e744e0695351d60aa711dbd))
|
|
80
|
+
* **header:** made header as a functional component ([b983934](https://github.com/MegafonWebLab/megafon-ui/commit/b983934ced137ede35f64ce2dfe0c953c1690db0))
|
|
81
|
+
* **radiobutton:** made radiobutton as a functional component ([b225e1d](https://github.com/MegafonWebLab/megafon-ui/commit/b225e1d5e1964fd1e7010a9051586fb627cc90c3))
|
|
82
|
+
* **select:** made select as a functional component ([fc9cfc2](https://github.com/MegafonWebLab/megafon-ui/commit/fc9cfc25505952080bf90095ab183367915d27e6))
|
|
83
|
+
* **styles:** export css version for base.less ([acdea73](https://github.com/MegafonWebLab/megafon-ui/commit/acdea73462713156dee077fde4c223879e356b4d))
|
|
84
|
+
* remove deprecated props values ([d09c460](https://github.com/MegafonWebLab/megafon-ui/commit/d09c4606ce6e41f7144e18c2216d039d859288e2))
|
|
100
85
|
|
|
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
86
|
|
|
108
87
|
|
|
109
88
|
### BREAKING CHANGES
|
|
110
89
|
|
|
111
|
-
* **
|
|
90
|
+
* **accordion:** remove prop hasVerticalPaddings
|
|
112
91
|
* **accordion:** remove parameter 'title' in onClickAccordion prop
|
|
92
|
+
* **checkbox:** change type of onChange prop on (checked: boolean) => void
|
|
93
|
+
* **colors:** green, green20, green80, purple, purple20 and purple80 colors now have 'brand'
|
|
94
|
+
prefix (e.g. brandGreen)
|
|
95
|
+
* **contentarea**: prop color change values from 'base' to 'white' and from 'content' to 'default';
|
|
96
|
+
remove depreacted value 'freshAsphalt'
|
|
97
|
+
* **contentarea**, **paragraph**, **storebanner** and **breadcrumbs** components from no don't have
|
|
98
|
+
'freshAsphalt' and 'clearWhite' as values for colorizing props
|
|
99
|
+
* **paragraph:** remove from color prop values: 'spbSky0', 'spbSky1', 'spbSky2'
|
|
100
|
+
* **paragraph**: prop color change values from 'base' to 'white' and from 'content' to 'default';
|
|
101
|
+
remove deprecared values 'freshAsphalt' and 'clearWhite'
|
|
102
|
+
* **storebanner**: prop theme change value from 'black' to 'default'; remove deprecated value 'clearWhite'
|
|
113
103
|
* **tooltip:** change onOpen, onClose types; AccessibilityEventTypeNative from @megafon/ui-helpers
|
|
104
|
+
* **components:** for the components to work correctly, now it's needed to import colors.css file
|
|
114
105
|
|
|
115
106
|
|
|
116
107
|
|
|
117
108
|
|
|
118
109
|
|
|
119
|
-
# [
|
|
110
|
+
# [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
111
|
|
|
121
|
-
**Note:** Version bump only for package @megafon/ui-core
|
|
122
112
|
|
|
113
|
+
### Features
|
|
114
|
+
|
|
115
|
+
* **tabs:** add prop outerObserveContainer for observing sticky mode from outside ([bc20c76](https://github.com/MegafonWebLab/megafon-ui/commit/bc20c76f497d88da19ea03cfc66a0c38a7559698))
|
|
123
116
|
|
|
124
117
|
|
|
125
118
|
|
|
126
119
|
|
|
127
|
-
|
|
120
|
+
|
|
121
|
+
# [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
122
|
|
|
129
123
|
|
|
130
124
|
### Bug Fixes
|
|
131
125
|
|
|
132
|
-
* **
|
|
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))
|
|
126
|
+
* **link:** new prop dataAttrs ([bde2253](https://github.com/MegafonWebLab/megafon-ui/commit/bde22539ff0db11777be9193adceb6de0f984234))
|
|
138
127
|
|
|
139
128
|
|
|
140
129
|
### Features
|
|
141
130
|
|
|
142
|
-
* **
|
|
131
|
+
* **banner:** add props withPaginationBottomOffset ([c1485a0](https://github.com/MegafonWebLab/megafon-ui/commit/c1485a083d63b886419109b03bb31230c5fed890))
|
|
143
132
|
|
|
144
133
|
|
|
145
|
-
### BREAKING CHANGES
|
|
146
134
|
|
|
147
|
-
* **colors:** green, green20, green80, purple, purple20 and purple80 colors now have 'brand'
|
|
148
|
-
prefix (e.g. brandGreen)
|
|
149
135
|
|
|
150
136
|
|
|
137
|
+
# [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
138
|
|
|
152
139
|
|
|
140
|
+
### Bug Fixes
|
|
153
141
|
|
|
154
|
-
|
|
142
|
+
* **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
143
|
|
|
156
144
|
|
|
157
145
|
### Features
|
|
158
146
|
|
|
159
|
-
* **
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
### BREAKING CHANGES
|
|
163
|
-
|
|
164
|
-
* **colors:** read commit description
|
|
147
|
+
* **accordion:** props hasVerticalPaddings marked as deprecated ([4d6d4cc](https://github.com/MegafonWebLab/megafon-ui/commit/4d6d4cca2cf45a86441827f0bef625a88a2c44f8))
|
|
148
|
+
* **textfield:** add autocomplete prop ([f2cff94](https://github.com/MegafonWebLab/megafon-ui/commit/f2cff9403503de174b785ea02365ce470811369e))
|
|
165
149
|
|
|
166
150
|
|
|
167
151
|
|
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
|
};
|
|
@@ -17,6 +17,15 @@
|
|
|
17
17
|
height: 540px;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
@media screen and (min-width: 1024px) {
|
|
21
|
+
.mfui-banner__slide {
|
|
22
|
+
-webkit-backface-visibility: hidden;
|
|
23
|
+
backface-visibility: hidden;
|
|
24
|
+
opacity: 0;
|
|
25
|
+
-webkit-transition: opacity 0.2s;
|
|
26
|
+
transition: opacity 0.2s;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
20
29
|
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
|
21
30
|
.mfui-banner__slide {
|
|
22
31
|
height: 420px;
|
|
@@ -27,6 +36,13 @@
|
|
|
27
36
|
height: 400px;
|
|
28
37
|
}
|
|
29
38
|
}
|
|
39
|
+
@media screen and (min-width: 1024px) {
|
|
40
|
+
.mfui-banner .swiper-slide-visible {
|
|
41
|
+
opacity: 1;
|
|
42
|
+
-webkit-transition: opacity 0.4s;
|
|
43
|
+
transition: opacity 0.4s;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
30
46
|
.mfui-banner__arrow {
|
|
31
47
|
position: absolute;
|
|
32
48
|
top: 50%;
|
|
@@ -34,6 +50,11 @@
|
|
|
34
50
|
-webkit-transform: translateY(-50%);
|
|
35
51
|
transform: translateY(-50%);
|
|
36
52
|
}
|
|
53
|
+
@media screen and (max-width: 767px) {
|
|
54
|
+
.mfui-banner__arrow {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
37
58
|
.mfui-banner__arrow_prev {
|
|
38
59
|
left: 12px;
|
|
39
60
|
}
|
|
@@ -98,6 +119,29 @@
|
|
|
98
119
|
.mfui-banner__pagination_theme_dark {
|
|
99
120
|
background-color: var(--stcBlack20);
|
|
100
121
|
}
|
|
122
|
+
.mfui-banner__pagination_bottom-offset {
|
|
123
|
+
bottom: 60px;
|
|
124
|
+
}
|
|
125
|
+
@media screen and (min-width: 768px) and (max-width: 1023px) {
|
|
126
|
+
.mfui-banner__pagination_bottom-offset {
|
|
127
|
+
bottom: 89px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
@media screen and (min-width: 1024px) and (max-width: 1279px) {
|
|
131
|
+
.mfui-banner__pagination_bottom-offset {
|
|
132
|
+
bottom: 90px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
@media screen and (min-width: 1280px) and (max-width: 1439px) {
|
|
136
|
+
.mfui-banner__pagination_bottom-offset {
|
|
137
|
+
bottom: 65px;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
@media screen and (min-width: 1440px) {
|
|
141
|
+
.mfui-banner__pagination_bottom-offset {
|
|
142
|
+
bottom: 72px;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
101
145
|
.mfui-banner__dot {
|
|
102
146
|
width: 12px;
|
|
103
147
|
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
|
}, []);
|
|
@@ -156,6 +159,7 @@ var Banner = function Banner(_ref) {
|
|
|
156
159
|
className: cn('swiper'),
|
|
157
160
|
loop: loop,
|
|
158
161
|
autoplay: autoPlay ? getAutoPlayConfig(autoPlayDelay) : false,
|
|
162
|
+
watchSlidesVisibility: true,
|
|
159
163
|
onSwiper: handleSwiper,
|
|
160
164
|
onReachBeginning: handleReachBeginning,
|
|
161
165
|
onReachEnd: handleReachEnd,
|
|
@@ -168,14 +172,20 @@ var Banner = function Banner(_ref) {
|
|
|
168
172
|
key: i,
|
|
169
173
|
className: cn('slide', classes === null || classes === void 0 ? void 0 : classes.slide)
|
|
170
174
|
}), child);
|
|
171
|
-
})), /*#__PURE__*/React.createElement(NavArrow,
|
|
175
|
+
})), /*#__PURE__*/React.createElement(NavArrow, {
|
|
176
|
+
dataAttrs: {
|
|
177
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowPrev
|
|
178
|
+
},
|
|
172
179
|
className: cn('arrow', {
|
|
173
180
|
prev: true
|
|
174
181
|
}, [classes.arrow]),
|
|
175
182
|
onClick: handlePrevClick,
|
|
176
183
|
disabled: !loop && isBeginning,
|
|
177
184
|
theme: navArrowTheme
|
|
178
|
-
})
|
|
185
|
+
}), /*#__PURE__*/React.createElement(NavArrow, {
|
|
186
|
+
dataAttrs: {
|
|
187
|
+
root: dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.arrowNext
|
|
188
|
+
},
|
|
179
189
|
className: cn('arrow', {
|
|
180
190
|
next: true
|
|
181
191
|
}, [classes.arrow]),
|
|
@@ -183,9 +193,10 @@ var Banner = function Banner(_ref) {
|
|
|
183
193
|
onClick: handleNextClick,
|
|
184
194
|
disabled: !loop && isEnd,
|
|
185
195
|
theme: navArrowTheme
|
|
186
|
-
})
|
|
196
|
+
}), /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.pagination), {
|
|
187
197
|
className: cn('pagination', {
|
|
188
|
-
theme: navTheme
|
|
198
|
+
theme: navTheme,
|
|
199
|
+
'bottom-offset': withPaginationBottomOffset
|
|
189
200
|
})
|
|
190
201
|
}), React.Children.map(children, function (_, i) {
|
|
191
202
|
return /*#__PURE__*/React.createElement(BannerDot, {
|
|
@@ -209,6 +220,7 @@ Banner.propTypes = {
|
|
|
209
220
|
classes: PropTypes.shape({
|
|
210
221
|
slide: PropTypes.string
|
|
211
222
|
}),
|
|
223
|
+
withPaginationBottomOffset: PropTypes.bool,
|
|
212
224
|
dataAttrs: PropTypes.shape({
|
|
213
225
|
root: PropTypes.objectOf(PropTypes.string.isRequired),
|
|
214
226
|
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);
|
|
@@ -302,14 +302,14 @@
|
|
|
302
302
|
fill: var(--stcWhite);
|
|
303
303
|
}
|
|
304
304
|
.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white {
|
|
305
|
-
--
|
|
306
|
-
--
|
|
305
|
+
--stcWhite7: rgba(255, 255, 255, 0.07);
|
|
306
|
+
--stcWhite14: rgba(255, 255, 255, 0.14);
|
|
307
307
|
}
|
|
308
308
|
.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white:not(.mfui-button_loading):hover {
|
|
309
|
-
background-color: var(--
|
|
309
|
+
background-color: var(--stcWhite7);
|
|
310
310
|
}
|
|
311
311
|
.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_white:not(.mfui-button_loading):active {
|
|
312
|
-
background-color: var(--
|
|
312
|
+
background-color: var(--stcWhite14);
|
|
313
313
|
}
|
|
314
314
|
.mfui-button_type_outline.mfui-button_theme_black {
|
|
315
315
|
color: var(--stcBlack);
|
|
@@ -321,14 +321,14 @@
|
|
|
321
321
|
fill: var(--stcBlack);
|
|
322
322
|
}
|
|
323
323
|
.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_black {
|
|
324
|
-
--
|
|
325
|
-
--
|
|
324
|
+
--stcBlack7: rgba(51, 51, 51, 0.07);
|
|
325
|
+
--stcBlack14: rgba(51, 51, 51, 0.14);
|
|
326
326
|
}
|
|
327
327
|
.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_black:not(.mfui-button_loading):hover {
|
|
328
|
-
background-color: var(--
|
|
328
|
+
background-color: var(--stcBlack7);
|
|
329
329
|
}
|
|
330
330
|
.mfui-button_no-touch.mfui-button_type_outline.mfui-button_theme_black:not(.mfui-button_loading):active {
|
|
331
|
-
background-color: var(--
|
|
331
|
+
background-color: var(--stcBlack14);
|
|
332
332
|
}
|
|
333
333
|
.mfui-button_full-width {
|
|
334
334
|
display: block;
|
|
@@ -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') {
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './Calendar.less';
|
|
3
3
|
export interface ICalendarProps {
|
|
4
|
+
/** Дополнительные data атрибуты к внутренним элементам */
|
|
5
|
+
dataAttrs?: {
|
|
6
|
+
root?: Record<string, string>;
|
|
7
|
+
day?: Record<string, string>;
|
|
8
|
+
month?: Record<string, string>;
|
|
9
|
+
arrowLeft?: Record<string, string>;
|
|
10
|
+
arrowRight?: Record<string, string>;
|
|
11
|
+
};
|
|
4
12
|
/** Переключение календаря в режим выбора одной даты вместо периода */
|
|
5
13
|
isSingleDate?: boolean;
|
|
6
14
|
/** Классы для модификации компонента */
|