@skbkontur/react-ui 4.16.0 → 4.16.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 +28 -145
- package/cjs/components/Button/Button.d.ts +1 -0
- package/cjs/components/Button/Button.js +7 -2
- package/cjs/components/Button/Button.js.map +1 -1
- package/cjs/components/Button/Button.mixins.js +1 -1
- package/cjs/components/Button/Button.mixins.js.map +1 -1
- package/cjs/components/DateInput/DateInput.js +12 -5
- package/cjs/components/DateInput/DateInput.js.map +1 -1
- package/cjs/components/Input/InputLayout/InputLayout.d.ts +3 -2
- package/cjs/components/Input/InputLayout/InputLayout.js +4 -3
- package/cjs/components/Input/InputLayout/InputLayout.js.map +1 -1
- package/cjs/components/SidePage/SidePageHeader.d.ts +1 -0
- package/cjs/components/SidePage/SidePageHeader.js +5 -4
- package/cjs/components/SidePage/SidePageHeader.js.map +1 -1
- package/cjs/internal/themes/Theme2022.d.ts +1 -1
- package/cjs/internal/themes/Theme2022.js +2 -3
- package/cjs/internal/themes/Theme2022.js.map +1 -1
- package/cjs/internal/themes/Theme2022Dark.d.ts +1 -0
- package/cjs/internal/themes/Theme2022Dark.js +2 -1
- package/cjs/internal/themes/Theme2022Dark.js.map +1 -1
- package/components/Button/Button/Button.js +3 -1
- package/components/Button/Button/Button.js.map +1 -1
- package/components/Button/Button.d.ts +1 -0
- package/components/Button/Button.mixins/Button.mixins.js +1 -1
- package/components/Button/Button.mixins/Button.mixins.js.map +1 -1
- package/components/DateInput/DateInput/DateInput.js +21 -8
- package/components/DateInput/DateInput/DateInput.js.map +1 -1
- package/components/Input/InputLayout/InputLayout/InputLayout.js +4 -2
- package/components/Input/InputLayout/InputLayout/InputLayout.js.map +1 -1
- package/components/Input/InputLayout/InputLayout.d.ts +3 -2
- package/components/SidePage/SidePageHeader/SidePageHeader.js +3 -2
- package/components/SidePage/SidePageHeader/SidePageHeader.js.map +1 -1
- package/components/SidePage/SidePageHeader.d.ts +1 -0
- package/internal/themes/Theme2022/Theme2022.js +1 -1
- package/internal/themes/Theme2022/Theme2022.js.map +1 -1
- package/internal/themes/Theme2022.d.ts +1 -1
- package/internal/themes/Theme2022Dark/Theme2022Dark.js +1 -0
- package/internal/themes/Theme2022Dark/Theme2022Dark.js.map +1 -1
- package/internal/themes/Theme2022Dark.d.ts +1 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,188 +3,71 @@
|
|
|
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
|
-
**Note:** Version bump only for package @skbkontur/react-ui
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [4.16.0-next.10](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.16.0-next.9...@skbkontur/react-ui@4.16.0-next.10) (2023-09-21)
|
|
6
|
+
## [4.16.2](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.16.1...@skbkontur/react-ui@4.16.2) (2023-10-24)
|
|
15
7
|
|
|
16
8
|
|
|
17
9
|
### Bug Fixes
|
|
18
10
|
|
|
19
|
-
* **Button:**
|
|
20
|
-
*
|
|
21
|
-
* **Button:** remove outline in disabled state for colored use buttons ([#3244](https://github.com/skbkontur/retail-ui/issues/3244)) ([bd50313](https://github.com/skbkontur/retail-ui/commit/bd503130fff703396ea2e475f1f5998e710dcf98))
|
|
22
|
-
* **ComboBox:** extend getItems type ([#3260](https://github.com/skbkontur/retail-ui/issues/3260)) ([1da0591](https://github.com/skbkontur/retail-ui/commit/1da0591dc2ef91de8c124258da7b167dc6a9fc6c))
|
|
23
|
-
* **Link:** add transition on underline ([#3254](https://github.com/skbkontur/retail-ui/issues/3254)) ([6b9d106](https://github.com/skbkontur/retail-ui/commit/6b9d106369b963e9da6fbc54effb562f4e3467b1))
|
|
24
|
-
* **Toggle:** disable animations for `THEME_2022` ([#3256](https://github.com/skbkontur/retail-ui/issues/3256)) ([cdc9513](https://github.com/skbkontur/retail-ui/commit/cdc95137ce1a46d2720b67435c7c622919068440))
|
|
25
|
-
|
|
11
|
+
* **Button:** enable linkHoverTextDecoration var for THEME_2022 ([#3290](https://github.com/skbkontur/retail-ui/issues/3290)) ([1beb6da](https://github.com/skbkontur/retail-ui/commit/1beb6da47b0d782a2f62c1612b26fe221128f5fc))
|
|
12
|
+
* **SidePage,Sticky:** fix max update depth error ([#3293](https://github.com/skbkontur/retail-ui/issues/3293)) ([950988f](https://github.com/skbkontur/retail-ui/commit/950988f9b3b612b1ac8f3a4f634bd3b001e28a9b))
|
|
26
13
|
|
|
27
|
-
### Features
|
|
28
14
|
|
|
29
|
-
* **Autocomplete,ComboBox,Dropdown,Select:** forward size to MenuItems ([#3265](https://github.com/skbkontur/retail-ui/issues/3265)) ([c0732e5](https://github.com/skbkontur/retail-ui/commit/c0732e51124140e7c1f4a9f7c970e92ca6ddc17a))
|
|
30
|
-
* **MenuHeader,MenuItem:** add prop size ([#3252](https://github.com/skbkontur/retail-ui/issues/3252)) ([e0e981a](https://github.com/skbkontur/retail-ui/commit/e0e981ad61389b04d9cc0ca885ee64c19de389b6))
|
|
31
15
|
|
|
32
16
|
|
|
33
17
|
|
|
18
|
+
## [4.16.1](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.16.0...@skbkontur/react-ui@4.16.1) (2023-10-16)
|
|
34
19
|
|
|
35
20
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
**Note:** Version bump only for package @skbkontur/react-ui
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
# [4.16.0-next.8](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.16.0-next.7...@skbkontur/react-ui@4.16.0-next.8) (2023-08-28)
|
|
45
|
-
|
|
46
|
-
**Note:** Version bump only for package @skbkontur/react-ui
|
|
47
|
-
|
|
48
|
-
|
|
21
|
+
### Bug Fixes
|
|
49
22
|
|
|
23
|
+
* **Button:** fix icons styles on hover in disabled state ([#3281](https://github.com/skbkontur/retail-ui/issues/3281)) ([276e82d](https://github.com/skbkontur/retail-ui/commit/276e82d44ba483ef08ff26827150885ceaaff930))
|
|
24
|
+
* **CurrencyInput:** remove `findDOMNode` console warning in `THEME_2022` ([#3278](https://github.com/skbkontur/retail-ui/issues/3278)) ([21a2a1f](https://github.com/skbkontur/retail-ui/commit/21a2a1f479d243746cf73b40f7300735600a464f))
|
|
25
|
+
* **DateInput:** use `flushSync` in React@18 ([#3286](https://github.com/skbkontur/retail-ui/issues/3286)) ([69efd4d](https://github.com/skbkontur/retail-ui/commit/69efd4d6da9b6546e8bdfbba52fccf676ddea07f))
|
|
26
|
+
* **Button:** add data-tid for spinner icon ([#3277](https://github.com/skbkontur/retail-ui/issues/3277)) ([88a2d15](https://github.com/skbkontur/retail-ui/commit/88a2d1502c537280434ed3004c77d9516e6971af))
|
|
50
27
|
|
|
51
28
|
|
|
52
|
-
# [4.16.0-next.7](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.15.7...@skbkontur/react-ui@4.16.0-next.7) (2023-08-28)
|
|
53
29
|
|
|
54
30
|
|
|
55
|
-
### Bug Fixes
|
|
56
|
-
|
|
57
|
-
* **Autocomplete,Select,ComboBox:** add missing horizontal paddings on mobile ([#3207](https://github.com/skbkontur/retail-ui/issues/3207)) ([15be732](https://github.com/skbkontur/retail-ui/commit/15be73264ae957d5015539217dd76bacef494e25))
|
|
58
|
-
* **Button:** add color to border when `use=text` ([#3216](https://github.com/skbkontur/retail-ui/issues/3216)) ([01a10da](https://github.com/skbkontur/retail-ui/commit/01a10dac6325874581195aaa366ebf8b81bb1cb3))
|
|
59
|
-
* **Button:** add events onClickCapture, onMouseDown and onMouseUp ([#3249](https://github.com/skbkontur/retail-ui/issues/3249)) ([a5b3809](https://github.com/skbkontur/retail-ui/commit/a5b38093371568ac391363349e243075baf107c8))
|
|
60
|
-
* **Button:** repair `btnLink*` theme vars in THEME_2022 ([#3250](https://github.com/skbkontur/retail-ui/issues/3250)) ([5c6673c](https://github.com/skbkontur/retail-ui/commit/5c6673c2710d6d09050690c1f779d7eafaa13b72))
|
|
61
|
-
* **Calendar:** add accessible descriptions ([#3232](https://github.com/skbkontur/retail-ui/issues/3232)) ([b2b0d78](https://github.com/skbkontur/retail-ui/commit/b2b0d78f2d39daaa45e973034de6a533a7e701a3))
|
|
62
|
-
* **Calendar:** return customization of current day border in theme 2022 ([#3186](https://github.com/skbkontur/retail-ui/issues/3186)) ([1595e1d](https://github.com/skbkontur/retail-ui/commit/1595e1df80d72d42116f9604b44565733ce4895f))
|
|
63
|
-
* **DateInput:** remove unnecessary focus half-border ([#3221](https://github.com/skbkontur/retail-ui/issues/3221)) ([4613c66](https://github.com/skbkontur/retail-ui/commit/4613c662675e69401fcfcdfb93fa7c8b33125cca))
|
|
64
|
-
* **DateInput:** set native selection background ([#3222](https://github.com/skbkontur/retail-ui/issues/3222)) ([e3e4935](https://github.com/skbkontur/retail-ui/commit/e3e493523d2efd1d5b0826609180d7b16da5bba0))
|
|
65
|
-
* **Dropdown:** use default button styles ([#3242](https://github.com/skbkontur/retail-ui/issues/3242)) ([ec7aa2f](https://github.com/skbkontur/retail-ui/commit/ec7aa2fcea2230a6f95420544034c610e01291a5))
|
|
66
|
-
* **DropdownMenu,TooltipMenu,Kebab:** add preventIconsOffset prop ([beb6f90](https://github.com/skbkontur/retail-ui/commit/beb6f900f0e4c7c4b9e79d86f8b0066ae75b400d))
|
|
67
|
-
* **Modal:** remove excessive top padding on footer ([#3236](https://github.com/skbkontur/retail-ui/issues/3236)) ([473cb0f](https://github.com/skbkontur/retail-ui/commit/473cb0fe20c5e1f6d904230367600bba37308f1f))
|
|
68
|
-
* handle npm@8.5.0 publish breaking change ([80c5917](https://github.com/skbkontur/retail-ui/commit/80c5917afcdd9787e631c8bb0e64adc472593b2c))
|
|
69
|
-
* **FileUploaderFile:** wrap component in forwardRef ([#3238](https://github.com/skbkontur/retail-ui/issues/3238)) ([8dd42d6](https://github.com/skbkontur/retail-ui/commit/8dd42d6adb442e43f617e76458cc04eaadc30ff2))
|
|
70
|
-
* **InputLikeText:** use debounce to control async content selection ([#3218](https://github.com/skbkontur/retail-ui/issues/3218)) ([39c07d4](https://github.com/skbkontur/retail-ui/commit/39c07d43ee0e70aad99451f9a22dbbe7e276f123))
|
|
71
|
-
* **Select:** add max-width on mobile ([#3210](https://github.com/skbkontur/retail-ui/issues/3210)) ([54f612c](https://github.com/skbkontur/retail-ui/commit/54f612c26a793607d435a0f45b680d1f6235664b))
|
|
72
|
-
* **Tabs:** add prop size ([#3198](https://github.com/skbkontur/retail-ui/issues/3198)) ([69b2299](https://github.com/skbkontur/retail-ui/commit/69b2299e75606c6ee6f381af3591bdfec17e45a7))
|
|
73
31
|
|
|
32
|
+
# [4.16.0](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.16.0-next.10...@skbkontur/react-ui@4.16.0) (2023-09-21)
|
|
74
33
|
|
|
75
34
|
### Features
|
|
76
35
|
|
|
36
|
+
* **Autocomplete,ComboBox,Dropdown,Select:** forward size to MenuItems ([#3265](https://github.com/skbkontur/retail-ui/issues/3265)) ([c0732e5](https://github.com/skbkontur/retail-ui/commit/c0732e51124140e7c1f4a9f7c970e92ca6ddc17a))
|
|
37
|
+
* **MenuHeader,MenuItem:** add prop size ([#3252](https://github.com/skbkontur/retail-ui/issues/3252)) ([e0e981a](https://github.com/skbkontur/retail-ui/commit/e0e981ad61389b04d9cc0ca885ee64c19de389b6))
|
|
77
38
|
* add aria-label to all appropriate components ([#3223](https://github.com/skbkontur/retail-ui/issues/3223)) ([5603ef6](https://github.com/skbkontur/retail-ui/commit/5603ef6eedec2786a68bb86a8b1131b609aea25c))
|
|
78
39
|
* **Checkbox:** add prop size ([#3230](https://github.com/skbkontur/retail-ui/issues/3230)) ([032279a](https://github.com/skbkontur/retail-ui/commit/032279af4673995bbae5f82da0e050ef9da9b53c))
|
|
79
40
|
* **Radio:** add prop size ([#3246](https://github.com/skbkontur/retail-ui/issues/3246)) ([ee270c9](https://github.com/skbkontur/retail-ui/commit/ee270c913d3c7502c27062af8a658e7ab9734098))
|
|
80
41
|
* **Textarea:** add prop size ([#3243](https://github.com/skbkontur/retail-ui/issues/3243)) ([b8c309d](https://github.com/skbkontur/retail-ui/commit/b8c309dfbb6b4ec4a9c3336789a25bd756b2c6cc))
|
|
81
|
-
* refactor and unify menus ([#3234](https://github.com/skbkontur/retail-ui/issues/3234)) ([b19ac8f](https://github.com/skbkontur/retail-ui/commit/b19ac8fcb580384177acbfd2da7ea23b00c8ffdc))
|
|
82
42
|
* **Toggle:** add prop size ([#3233](https://github.com/skbkontur/retail-ui/issues/3233)) ([db76d09](https://github.com/skbkontur/retail-ui/commit/db76d091d6b8d94b25a1710adf9606a09b07c67b))
|
|
83
|
-
* add
|
|
84
|
-
*
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
### Reverts
|
|
88
|
-
|
|
89
|
-
* Revert "ci: publish via yarn" ([ad5e4ef](https://github.com/skbkontur/retail-ui/commit/ad5e4efb3f70cc86a5f6228973c9ddfdcd803b75))
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
# [4.16.0-next.6](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.16.0-next.5...@skbkontur/react-ui@4.16.0-next.6) (2023-08-15)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### Bug Fixes
|
|
99
|
-
|
|
100
|
-
* **Calendar:** add accessible descriptions ([#3232](https://github.com/skbkontur/retail-ui/issues/3232)) ([b2b0d78](https://github.com/skbkontur/retail-ui/commit/b2b0d78f2d39daaa45e973034de6a533a7e701a3))
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
# [4.16.0-next.5](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.15.6...@skbkontur/react-ui@4.16.0-next.5) (2023-08-11)
|
|
43
|
+
* **Tabs:** add prop size ([#3198](https://github.com/skbkontur/retail-ui/issues/3198)) ([69b2299](https://github.com/skbkontur/retail-ui/commit/69b2299e75606c6ee6f381af3591bdfec17e45a7))
|
|
44
|
+
* **InternalMenu:** replace with Menu ([#3234](https://github.com/skbkontur/retail-ui/issues/3234)) ([b19ac8f](https://github.com/skbkontur/retail-ui/commit/b19ac8fcb580384177acbfd2da7ea23b00c8ffdc))
|
|
45
|
+
* **Menu:** improve a11y of dropdown lists ([#3194](https://github.com/skbkontur/retail-ui/issues/3194)) ([c25f090](https://github.com/skbkontur/retail-ui/commit/c25f090f25a9e1078cbe882417f4b2c96559d5ec))
|
|
46
|
+
* **all:** add animations for hover and active states ([#3219](https://github.com/skbkontur/retail-ui/issues/3219)) ([51a6165](https://github.com/skbkontur/retail-ui/commit/51a61652aa8398dbc500cf500af480f883e97857))
|
|
107
47
|
|
|
108
48
|
|
|
109
49
|
### Bug Fixes
|
|
110
50
|
|
|
111
|
-
*
|
|
112
|
-
* **
|
|
51
|
+
* **Button:** disabled state doesn't bubble click ([#3262](https://github.com/skbkontur/retail-ui/issues/3262)) ([79a46a6](https://github.com/skbkontur/retail-ui/commit/79a46a6cc06971b36fc7bff0855b9daaf3bd2750))
|
|
52
|
+
* **Button:** remove outline in disabled state for colored use buttons ([#3244](https://github.com/skbkontur/retail-ui/issues/3244)) ([bd50313](https://github.com/skbkontur/retail-ui/commit/bd503130fff703396ea2e475f1f5998e710dcf98))
|
|
53
|
+
* **ComboBox:** extend getItems type ([#3260](https://github.com/skbkontur/retail-ui/issues/3260)) ([1da0591](https://github.com/skbkontur/retail-ui/commit/1da0591dc2ef91de8c124258da7b167dc6a9fc6c))
|
|
54
|
+
* **Link:** add transition on underline ([#3254](https://github.com/skbkontur/retail-ui/issues/3254)) ([6b9d106](https://github.com/skbkontur/retail-ui/commit/6b9d106369b963e9da6fbc54effb562f4e3467b1))
|
|
55
|
+
* **Toggle:** disable animations for `THEME_2022` ([#3256](https://github.com/skbkontur/retail-ui/issues/3256)) ([cdc9513](https://github.com/skbkontur/retail-ui/commit/cdc95137ce1a46d2720b67435c7c622919068440))
|
|
56
|
+
* **Autocomplete,Select,ComboBox:** add missing horizontal paddings for Menu on mobile ([#3207](https://github.com/skbkontur/retail-ui/issues/3207)) ([15be732](https://github.com/skbkontur/retail-ui/commit/15be73264ae957d5015539217dd76bacef494e25))
|
|
113
57
|
* **Button:** add color to border when `use=text` ([#3216](https://github.com/skbkontur/retail-ui/issues/3216)) ([01a10da](https://github.com/skbkontur/retail-ui/commit/01a10dac6325874581195aaa366ebf8b81bb1cb3))
|
|
58
|
+
* **Button:** add events onClickCapture, onMouseDown and onMouseUp ([#3249](https://github.com/skbkontur/retail-ui/issues/3249)) ([a5b3809](https://github.com/skbkontur/retail-ui/commit/a5b38093371568ac391363349e243075baf107c8))
|
|
59
|
+
* **Button:** repair `btnLink*` theme vars in THEME_2022 ([#3250](https://github.com/skbkontur/retail-ui/issues/3250)) ([5c6673c](https://github.com/skbkontur/retail-ui/commit/5c6673c2710d6d09050690c1f779d7eafaa13b72))
|
|
60
|
+
* **Calendar:** add accessible descriptions ([#3232](https://github.com/skbkontur/retail-ui/issues/3232)) ([b2b0d78](https://github.com/skbkontur/retail-ui/commit/b2b0d78f2d39daaa45e973034de6a533a7e701a3))
|
|
114
61
|
* **Calendar:** return customization of current day border in theme 2022 ([#3186](https://github.com/skbkontur/retail-ui/issues/3186)) ([1595e1d](https://github.com/skbkontur/retail-ui/commit/1595e1df80d72d42116f9604b44565733ce4895f))
|
|
115
62
|
* **DateInput:** remove unnecessary focus half-border ([#3221](https://github.com/skbkontur/retail-ui/issues/3221)) ([4613c66](https://github.com/skbkontur/retail-ui/commit/4613c662675e69401fcfcdfb93fa7c8b33125cca))
|
|
116
63
|
* **DateInput:** set native selection background ([#3222](https://github.com/skbkontur/retail-ui/issues/3222)) ([e3e4935](https://github.com/skbkontur/retail-ui/commit/e3e493523d2efd1d5b0826609180d7b16da5bba0))
|
|
64
|
+
* **Dropdown:** use default button styles ([#3242](https://github.com/skbkontur/retail-ui/issues/3242)) ([ec7aa2f](https://github.com/skbkontur/retail-ui/commit/ec7aa2fcea2230a6f95420544034c610e01291a5))
|
|
117
65
|
* **DropdownMenu,TooltipMenu,Kebab:** add preventIconsOffset prop ([beb6f90](https://github.com/skbkontur/retail-ui/commit/beb6f900f0e4c7c4b9e79d86f8b0066ae75b400d))
|
|
66
|
+
* **Modal:** remove excessive top padding on footer ([#3236](https://github.com/skbkontur/retail-ui/issues/3236)) ([473cb0f](https://github.com/skbkontur/retail-ui/commit/473cb0fe20c5e1f6d904230367600bba37308f1f))
|
|
67
|
+
* handle npm@8.5.0 publish breaking change ([80c5917](https://github.com/skbkontur/retail-ui/commit/80c5917afcdd9787e631c8bb0e64adc472593b2c))
|
|
118
68
|
* **FileUploaderFile:** wrap component in forwardRef ([#3238](https://github.com/skbkontur/retail-ui/issues/3238)) ([8dd42d6](https://github.com/skbkontur/retail-ui/commit/8dd42d6adb442e43f617e76458cc04eaadc30ff2))
|
|
119
69
|
* **InputLikeText:** use debounce to control async content selection ([#3218](https://github.com/skbkontur/retail-ui/issues/3218)) ([39c07d4](https://github.com/skbkontur/retail-ui/commit/39c07d43ee0e70aad99451f9a22dbbe7e276f123))
|
|
120
70
|
* **Select:** add max-width on mobile ([#3210](https://github.com/skbkontur/retail-ui/issues/3210)) ([54f612c](https://github.com/skbkontur/retail-ui/commit/54f612c26a793607d435a0f45b680d1f6235664b))
|
|
121
|
-
* **Tabs:** add prop size ([#3198](https://github.com/skbkontur/retail-ui/issues/3198)) ([69b2299](https://github.com/skbkontur/retail-ui/commit/69b2299e75606c6ee6f381af3591bdfec17e45a7))
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
### Features
|
|
125
|
-
|
|
126
|
-
* refactor and unify menus ([#3234](https://github.com/skbkontur/retail-ui/issues/3234)) ([b19ac8f](https://github.com/skbkontur/retail-ui/commit/b19ac8fcb580384177acbfd2da7ea23b00c8ffdc))
|
|
127
|
-
* **Checkbox:** add prop size ([#3230](https://github.com/skbkontur/retail-ui/issues/3230)) ([032279a](https://github.com/skbkontur/retail-ui/commit/032279af4673995bbae5f82da0e050ef9da9b53c))
|
|
128
|
-
* **Toggle:** add prop size ([#3233](https://github.com/skbkontur/retail-ui/issues/3233)) ([db76d09](https://github.com/skbkontur/retail-ui/commit/db76d091d6b8d94b25a1710adf9606a09b07c67b))
|
|
129
|
-
* add animations for hover and active states ([#3219](https://github.com/skbkontur/retail-ui/issues/3219)) ([51a6165](https://github.com/skbkontur/retail-ui/commit/51a61652aa8398dbc500cf500af480f883e97857))
|
|
130
|
-
* improve a11y of dropdown lists ([#3194](https://github.com/skbkontur/retail-ui/issues/3194)) ([c25f090](https://github.com/skbkontur/retail-ui/commit/c25f090f25a9e1078cbe882417f4b2c96559d5ec))
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
# [4.16.0-next.4](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.16.0-next.3...@skbkontur/react-ui@4.16.0-next.4) (2023-07-24)
|
|
137
|
-
|
|
138
|
-
**Note:** Version bump only for package @skbkontur/react-ui
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
# [4.16.0-next.3](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.15.3...@skbkontur/react-ui@4.16.0-next.3) (2023-07-21)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
### Bug Fixes
|
|
148
|
-
|
|
149
|
-
* **Calendar:** return customization of current day border in theme 2022 ([#3186](https://github.com/skbkontur/retail-ui/issues/3186)) ([1595e1d](https://github.com/skbkontur/retail-ui/commit/1595e1df80d72d42116f9604b44565733ce4895f))
|
|
150
|
-
* **DropdownMenu,TooltipMenu,Kebab:** add preventIconsOffset prop ([beb6f90](https://github.com/skbkontur/retail-ui/commit/beb6f900f0e4c7c4b9e79d86f8b0066ae75b400d))
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
### Features
|
|
154
|
-
|
|
155
|
-
* improve a11y of dropdown lists ([#3194](https://github.com/skbkontur/retail-ui/issues/3194)) ([c25f090](https://github.com/skbkontur/retail-ui/commit/c25f090f25a9e1078cbe882417f4b2c96559d5ec))
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
# [4.16.0-next.2](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.15.2...@skbkontur/react-ui@4.16.0-next.2) (2023-07-17)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
### Bug Fixes
|
|
165
|
-
|
|
166
|
-
* **Calendar:** return customization of current day border in theme 2022 ([#3186](https://github.com/skbkontur/retail-ui/issues/3186)) ([1595e1d](https://github.com/skbkontur/retail-ui/commit/1595e1df80d72d42116f9604b44565733ce4895f))
|
|
167
|
-
* **DropdownMenu,TooltipMenu,Kebab:** add preventIconsOffset prop ([beb6f90](https://github.com/skbkontur/retail-ui/commit/beb6f900f0e4c7c4b9e79d86f8b0066ae75b400d))
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
# [4.16.0-next.1](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.15.1...@skbkontur/react-ui@4.16.0-next.1) (2023-07-04)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
### Bug Fixes
|
|
177
|
-
|
|
178
|
-
* **Calendar:** return customization of current day border in theme 2022 ([#3186](https://github.com/skbkontur/retail-ui/issues/3186)) ([1595e1d](https://github.com/skbkontur/retail-ui/commit/1595e1df80d72d42116f9604b44565733ce4895f))
|
|
179
|
-
* **DropdownMenu,TooltipMenu,Kebab:** add preventIconsOffset prop ([beb6f90](https://github.com/skbkontur/retail-ui/commit/beb6f900f0e4c7c4b9e79d86f8b0066ae75b400d))
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
# [4.16.0-next.0](https://github.com/skbkontur/retail-ui/compare/@skbkontur/react-ui@4.15.0...@skbkontur/react-ui@4.16.0-next.0) (2023-06-13)
|
|
186
|
-
|
|
187
|
-
**Note:** Version bump only for package @skbkontur/react-ui
|
|
188
71
|
|
|
189
72
|
|
|
190
73
|
|
|
@@ -128,6 +128,7 @@ export interface ButtonState {
|
|
|
128
128
|
}
|
|
129
129
|
export declare const ButtonDataTids: {
|
|
130
130
|
readonly root: "Button__root";
|
|
131
|
+
readonly spinner: "Button__spinner";
|
|
131
132
|
};
|
|
132
133
|
declare type DefaultProps = Required<Pick<ButtonProps, 'use' | 'size' | 'type'>>;
|
|
133
134
|
export declare class Button extends React.Component<ButtonProps, ButtonState> {
|
|
@@ -186,7 +186,8 @@ var _getInnerLinkTheme = require("./getInnerLinkTheme");var _class, _class2, _te
|
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
var ButtonDataTids = {
|
|
189
|
-
root: 'Button__root'
|
|
189
|
+
root: 'Button__root',
|
|
190
|
+
spinner: 'Button__spinner' };exports.ButtonDataTids = ButtonDataTids;var
|
|
190
191
|
|
|
191
192
|
|
|
192
193
|
|
|
@@ -525,6 +526,10 @@ Button = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/functi
|
|
|
525
526
|
|
|
526
527
|
|
|
527
528
|
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
528
533
|
|
|
529
534
|
|
|
530
535
|
|
|
@@ -560,5 +565,5 @@ Button = (0, _rootNode.rootNode)(_class = (_temp = _class2 = /*#__PURE__*/functi
|
|
|
560
565
|
var _useButtonArrow = (0, _ButtonArrow.useButtonArrow)((0, _extends2.default)({}, this.props, { isFocused: Boolean(isFocused) }), this.theme),wrapClassNameWithArrow = _useButtonArrow[0],rootClassNameWithArrow = _useButtonArrow[1],arrowNode = _useButtonArrow[2];var isUseStateWithoutOutlineInDisabledState = !['default', 'backless'].includes(use);var rootClassName = '';if (_isTheme2022) {var trueDisabled = disabled || loading;rootClassName = _Emotion.cx.apply(void 0, [_Button.styles.root(this.theme), _Button.styles[use](this.theme), sizeClass, narrow && _Button.styles.narrow(), _noPadding && _Button.styles.noPadding(), _noRightPadding && _Button.styles.noRightPadding(), rootClassNameWithArrow].concat(trueDisabled ? [_Button.styles.disabled(this.theme), isUseStateWithoutOutlineInDisabledState && _Button.styles.disabledWithoutOutline(this.theme), checked && _Button.styles.checkedDisabled(this.theme), checked && _Button.styles.checkedDisabled2022(this.theme), borderless && _Button.styles.borderless2022()] : [active && !checked && _Button.activeStyles[use](this.theme), isFocused && _Button.styles.focus(this.theme), checked && _Button.styles.checked2022(this.theme), checked && isFocused && _Button.styles.checkedFocused(this.theme), borderless && !checked && !isFocused && _Button.styles.borderless2022()]));} else {var _cx;rootClassName = (0, _Emotion.cx)((_cx = {}, _cx[_Button.styles.root(this.theme)] = true, _cx[_Button.styles.simulatedPress()] = true, _cx[_Button.styles[use](this.theme)] = true, _cx[_Button.activeStyles[use](this.theme)] = active, _cx[sizeClass] = true, _cx[_Button.styles.focus(this.theme)] = isFocused, _cx[_Button.styles.checked(this.theme)] = checked, _cx[_Button.styles.checkedFocused(this.theme)] = checked && isFocused, _cx[_Button.styles.disabled(this.theme)] = disabled || loading, _cx[_Button.styles.checkedDisabled(this.theme)] = checked && disabled, _cx[_Button.styles.borderless()] = borderless && !disabled && !loading && !checked && !isFocused && !active, _cx[_Button.styles.narrow()] = narrow, _cx[_Button.styles.noPadding()] = _noPadding, _cx[_Button.styles.noRightPadding()] = _noRightPadding, _cx));}var rootProps = { // By default the type attribute is 'submit'. IE8 will fire a click event
|
|
561
566
|
// on this button if somewhere on the page user presses Enter while some
|
|
562
567
|
// input is focused. So we set type to 'button' by default.
|
|
563
|
-
type: type, role: role, 'aria-describedby': ariaDescribedby, 'aria-haspopup': ariaHasPopup, 'aria-controls': ariaControls, 'aria-label': ariaLabel, 'aria-checked': ariaChecked, 'aria-expanded': ariaExpanded, className: rootClassName, style: (0, _extends2.default)({ textAlign: align }, corners), disabled: disabled || loading, onClick: onClick, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: onKeyDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onClickCapture: onClickCapture, tabIndex: disableFocus ? -1 : 0, title: this.props.title };var wrapProps = { className: (0, _Emotion.cx)((_cx2 = {}, _cx2[_Button.styles.wrap(this.theme)] = true, _cx2[wrapClassNameWithArrow] = true, _cx2[this.getSizeWrapClassName()] = true, _cx2)), style: { width: width } };var innerShadowNode = _isTheme2022 ? null : /*#__PURE__*/_react.default.createElement("div", { className: _Button.globalClasses.innerShadow });var outlineNode = null;var isDisabled2022 = _isTheme2022 && (disabled || loading);if ((!isFocused || isLink) && !isDisabled2022) {var _cx3;outlineNode = /*#__PURE__*/_react.default.createElement("div", { style: { zIndex: _isTheme2022 && isLink ? -1 : undefined }, className: (0, _Emotion.cx)(_Button.styles.outline(), (_cx3 = {}, _cx3[_Button.styles.outlineWarning(this.theme)] = warning, _cx3[_Button.styles.outlineError(this.theme)] = error, _cx3[_Button.styles.outlineLink()] = isLink, _cx3[_Button.styles.outlineLinkWarning(this.theme)] = isLink && warning, _cx3[_Button.styles.outlineLinkError(this.theme)] = isLink && error, _cx3)) });}var iconNode = icon && /*#__PURE__*/_react.default.createElement(_ButtonIcon.ButtonIcon, { icon: icon, size: size, hasChildren: Boolean(children), disabled: disabled || false, loading: loading || false, use: use });var loadingNode = null;if (loading && !icon) {var loadingIcon = _isTheme2022 ? /*#__PURE__*/_react.default.createElement(_LoadingIcon.LoadingIcon, { size: size }) : /*#__PURE__*/_react.default.createElement(_Spinner.Spinner, { caption: null, dimmed: true, type: "mini" });loadingNode = /*#__PURE__*/_react.default.createElement("div", { className: _Button.styles.loading() }, loadingIcon);} // Force disable all props and features, that cannot be use with Link
|
|
568
|
+
type: type, role: role, 'aria-describedby': ariaDescribedby, 'aria-haspopup': ariaHasPopup, 'aria-controls': ariaControls, 'aria-label': ariaLabel, 'aria-checked': ariaChecked, 'aria-expanded': ariaExpanded, className: rootClassName, style: (0, _extends2.default)({ textAlign: align }, corners), disabled: disabled || loading, onClick: onClick, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeyDown: onKeyDown, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onMouseOver: onMouseOver, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onClickCapture: onClickCapture, tabIndex: disableFocus ? -1 : 0, title: this.props.title };var wrapProps = { className: (0, _Emotion.cx)((_cx2 = {}, _cx2[_Button.styles.wrap(this.theme)] = true, _cx2[wrapClassNameWithArrow] = true, _cx2[this.getSizeWrapClassName()] = true, _cx2)), style: { width: width } };var innerShadowNode = _isTheme2022 ? null : /*#__PURE__*/_react.default.createElement("div", { className: _Button.globalClasses.innerShadow });var outlineNode = null;var isDisabled2022 = _isTheme2022 && (disabled || loading);if ((!isFocused || isLink) && !isDisabled2022) {var _cx3;outlineNode = /*#__PURE__*/_react.default.createElement("div", { style: { zIndex: _isTheme2022 && isLink ? -1 : undefined }, className: (0, _Emotion.cx)(_Button.styles.outline(), (_cx3 = {}, _cx3[_Button.styles.outlineWarning(this.theme)] = warning, _cx3[_Button.styles.outlineError(this.theme)] = error, _cx3[_Button.styles.outlineLink()] = isLink, _cx3[_Button.styles.outlineLinkWarning(this.theme)] = isLink && warning, _cx3[_Button.styles.outlineLinkError(this.theme)] = isLink && error, _cx3)) });}var iconNode = icon && /*#__PURE__*/_react.default.createElement(_ButtonIcon.ButtonIcon, { icon: icon, size: size, hasChildren: Boolean(children), disabled: disabled || false, loading: loading || false, use: use });var loadingNode = null;if (loading && !icon) {var loadingIcon = _isTheme2022 ? /*#__PURE__*/_react.default.createElement(_LoadingIcon.LoadingIcon, { size: size }) : /*#__PURE__*/_react.default.createElement(_Spinner.Spinner, { caption: null, dimmed: true, type: "mini" });loadingNode = /*#__PURE__*/_react.default.createElement("div", { "data-tid": ButtonDataTids.spinner, className: _Button.styles.loading() }, loadingIcon);} // Force disable all props and features, that cannot be use with Link
|
|
564
569
|
if (isLink) {var _cx4;rootProps.className = (0, _Emotion.cx)((_cx4 = {}, _cx4[_Button.styles.root(this.theme)] = true, _cx4[sizeClass] = true, _cx4[_Button.styles.link(this.theme)] = true, _cx4[_Button.styles.linkLineHeight()] = !_client.isSafari || _client.isSafari && !_isTheme2022, _cx4[_Button.styles.linkLineHeightSafariFallback()] = _client.isSafari && _isTheme2022, _cx4[_Button.styles.linkFocus(this.theme)] = isFocused, _cx4[_Button.styles.linkDisabled(this.theme)] = disabled || loading, _cx4));Object.assign(wrapProps, { className: (0, _Emotion.cx)(_Button.styles.wrap(this.theme), _Button.styles.wrapLink()), style: { width: wrapProps.style.width } });rootProps.style.textAlign = undefined;}var captionNode = /*#__PURE__*/_react.default.createElement("div", { className: (0, _Emotion.cx)(_Button.styles.caption(), _Button.globalClasses.caption, (_cx5 = {}, _cx5[_Button.styles.captionTranslated()] = (active || checked) && !loading && !_isTheme2022, _cx5[_Button.styles.captionLink()] = isLink, _cx5[_Button.styles.captionDisabled()] = !checked && disabled, _cx5)) }, loadingNode, iconNode, /*#__PURE__*/_react.default.createElement("span", { className: (0, _Emotion.cx)(_Button.globalClasses.text, (_cx6 = {}, _cx6[_Button.styles.visibilityHidden()] = !!loadingNode, _cx6)) }, children));if (_isTheme2022 && isLink && !loading) {captionNode = /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Provider, { value: (0, _getInnerLinkTheme.getInnerLinkTheme)(this.theme) }, /*#__PURE__*/_react.default.createElement(_Link.Link, { focused: isFocused, disabled: disabled, icon: this.renderIcon2022(icon), as: "span", tabIndex: -1 }, children));}return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: this.setRootNode }, this.props), /*#__PURE__*/_react.default.createElement("span", wrapProps, /*#__PURE__*/_react.default.createElement("button", (0, _extends2.default)({ "data-tid": ButtonDataTids.root, ref: this._ref }, rootProps), innerShadowNode, outlineNode, arrowNode, captionNode)));};_proto.renderIcon2022 = function renderIcon2022(icon) {if (icon && (0, _utils.isKonturIcon)(icon)) {var _icon$props$size;var sizes = (0, _ButtonIcon.getButtonIconSizes)(this.theme);return /*#__PURE__*/_react.default.cloneElement(icon, { size: (_icon$props$size = icon.props.size) != null ? _icon$props$size : sizes[this.getProps().size] });}return icon;};_proto.getSizeClassName = function getSizeClassName() {var _cx7, _cx8, _cx9;var _isTheme2022 = (0, _ThemeHelpers.isTheme2022)(this.theme);switch (this.getProps().size) {case 'large':return (0, _Emotion.cx)(_Button.styles.sizeLarge(this.theme), (_cx7 = {}, _cx7[_Button.styles.sizeLargeIE11(this.theme)] = _client.isIE11 || _client.isEdge, _cx7[_Button.styles.sizeLargeWithIcon(this.theme)] = !!this.props.icon, _cx7[_Button.styles.sizeLargeWithIconWithoutText(this.theme)] = _isTheme2022 && !!this.props.icon && !this.props.children, _cx7));case 'medium':return (0, _Emotion.cx)(_Button.styles.sizeMedium(this.theme), (_cx8 = {}, _cx8[_Button.styles.sizeMediumIE11(this.theme)] = _client.isIE11 || _client.isEdge, _cx8[_Button.styles.sizeMediumWithIcon(this.theme)] = !!this.props.icon, _cx8[_Button.styles.sizeMediumWithIconWithoutText(this.theme)] = _isTheme2022 && !!this.props.icon && !this.props.children, _cx8));case 'small':default:return (0, _Emotion.cx)(_Button.styles.sizeSmall(this.theme), (_cx9 = {}, _cx9[_Button.styles.sizeSmallIE11(this.theme)] = _client.isIE11 || _client.isEdge, _cx9[_Button.styles.sizeSmallWithIcon(this.theme)] = !!this.props.icon, _cx9[_Button.styles.sizeSmallWithIconWithoutText(this.theme)] = _isTheme2022 && !!this.props.icon && !this.props.children, _cx9));}};_proto.getSizeWrapClassName = function getSizeWrapClassName() {switch (this.getProps().size) {case 'large':return _Button.styles.wrapLarge(this.theme);case 'medium':return _Button.styles.wrapMedium(this.theme);case 'small':default:return _Button.styles.wrapSmall(this.theme);}};return Button;}(_react.default.Component), _class2.__KONTUR_REACT_UI__ = 'Button', _class2.__BUTTON__ = true, _class2.defaultProps = { use: 'default', size: 'small', type: 'button' }, _temp)) || _class;exports.Button = Button;var isButton = (0, _utils.isReactUIComponent)('Button');exports.isButton = isButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Button.tsx"],"names":["ButtonDataTids","root","Button","rootNode","getProps","defaultProps","state","focusedByTab","node","handleFocus","e","props","disabled","disableFocus","requestAnimationFrame","keyListener","isTabPressed","setState","onFocus","handleBlur","onBlur","_ref","componentDidMount","autoFocus","focus","getDerivedStateFromProps","loading","blur","render","theme","ThemeFactory","create","renderMain","corners","active","borderless","checked","error","warning","narrow","icon","_noPadding","_noRightPadding","visuallyFocused","align","onMouseEnter","onMouseLeave","onMouseOver","onMouseDown","onMouseUp","onKeyDown","onClick","onClickCapture","width","children","ariaDescribedby","ariaHasPopup","ariaControls","ariaLabel","ariaChecked","ariaExpanded","role","use","type","size","sizeClass","getSizeClassName","isFocused","isLink","_isTheme2022","Boolean","wrapClassNameWithArrow","rootClassNameWithArrow","arrowNode","isUseStateWithoutOutlineInDisabledState","includes","rootClassName","trueDisabled","cx","styles","noPadding","noRightPadding","disabledWithoutOutline","checkedDisabled","checkedDisabled2022","borderless2022","activeStyles","checked2022","checkedFocused","simulatedPress","rootProps","className","style","textAlign","tabIndex","title","wrapProps","wrap","getSizeWrapClassName","innerShadowNode","globalClasses","innerShadow","outlineNode","isDisabled2022","zIndex","undefined","outline","outlineWarning","outlineError","outlineLink","outlineLinkWarning","outlineLinkError","iconNode","loadingNode","loadingIcon","link","linkLineHeight","isSafari","linkLineHeightSafariFallback","linkFocus","linkDisabled","Object","assign","wrapLink","captionNode","caption","captionTranslated","captionLink","captionDisabled","text","visibilityHidden","renderIcon2022","setRootNode","sizes","React","cloneElement","sizeLarge","sizeLargeIE11","isIE11","isEdge","sizeLargeWithIcon","sizeLargeWithIconWithoutText","sizeMedium","sizeMediumIE11","sizeMediumWithIcon","sizeMediumWithIconWithoutText","sizeSmall","sizeSmallIE11","sizeSmallWithIcon","sizeSmallWithIconWithoutText","wrapLarge","wrapMedium","wrapSmall","Component","__KONTUR_REACT_UI__","__BUTTON__","isButton"],"mappings":"gXAAA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsKO,IAAMA,cAAc,GAAG;AAC5BC,EAAAA,IAAI,EAAE,cADsB,EAAvB,C;;;;;;AAOMC,M,OADZC,kB;;;;;;;;;;AAWSC,IAAAA,Q,GAAW,0CAAkBF,MAAM,CAACG,YAAzB,C;;AAEZC,IAAAA,K,GAAQ;AACbC,MAAAA,YAAY,EAAE,KADD,E;;;;AAKPC,IAAAA,I,GAAiC,I;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA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I,IAC+B6G,kBAAUC,cADzC,OAEJ5D,eAAOqE,iBAAP,CAAyB,KAAKvH,KAA9B,CAFI,IAEmC,CAAC,CAAC,KAAKlB,KAAL,CAAW6B,IAFhD,OAGJuC,eAAOsE,4BAAP,CAAoC,KAAKxH,KAAzC,CAHI,IAG8CwC,YAAY,IAAI,CAAC,CAAC,KAAK1D,KAAL,CAAW6B,IAA7B,IAAqC,CAAC,KAAK7B,KAAL,CAAW2C,QAH/F,QAAP,CAfJ,CAqBD,C,QAEO4C,oB,GAAR,gCAA+B,CAC7B,QAAQ,KAAK9F,QAAL,GAAgB4D,IAAxB,GACE,KAAK,OAAL,CACE,OAAOe,eAAOuE,SAAP,CAAiB,KAAKzH,KAAtB,CAAP,CACF,KAAK,QAAL,CACE,OAAOkD,eAAOwE,UAAP,CAAkB,KAAK1H,KAAvB,CAAP,CACF,KAAK,OAAL,CACA,QACE,OAAOkD,eAAOyE,SAAP,CAAiB,KAAK3H,KAAtB,CAAP,CAPJ,CASD,C,iBAhVyByG,eAAMmB,S,WAClBC,mB,GAAsB,Q,UACtBC,U,GAAa,I,UAEbtJ,Y,GAA6B,EACzCyD,GAAG,EAAE,SADoC,EAEzCE,IAAI,EAAE,OAFmC,EAGzCD,IAAI,EAAE,QAHmC,E,4CAuWtC,IAAM6F,QAAQ,GAAG,+BAAgC,QAAhC,CAAjB,C","sourcesContent":["import React, { AriaAttributes, HTMLAttributes } from 'react';\n\nimport { HTMLProps } from '../../typings/html';\nimport { isKonturIcon, isReactUIComponent } from '../../lib/utils';\nimport { isIE11, isEdge, isSafari } from '../../lib/client';\nimport { keyListener } from '../../lib/events/keyListener';\nimport { Theme, ThemeIn } from '../../lib/theming/Theme';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { CommonWrapper, CommonProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { isTheme2022 } from '../../lib/theming/ThemeHelpers';\nimport { Link } from '../Link';\nimport { Spinner } from '../Spinner';\nimport { LoadingIcon } from '../../internal/icons2022/LoadingIcon';\n\nimport { styles, activeStyles, globalClasses } from './Button.styles';\nimport { ButtonIcon, getButtonIconSizes } from './ButtonIcon';\nimport { useButtonArrow } from './ButtonArrow';\nimport { getInnerLinkTheme } from './getInnerLinkTheme';\n\nexport type ButtonSize = 'small' | 'medium' | 'large';\nexport type ButtonType = 'button' | 'submit' | 'reset';\nexport type ButtonUse = 'default' | 'primary' | 'success' | 'danger' | 'pay' | 'link' | 'text' | 'backless';\n\nexport interface ButtonProps\n extends CommonProps,\n Pick<\n AriaAttributes,\n 'aria-haspopup' | 'aria-describedby' | 'aria-controls' | 'aria-label' | 'aria-checked' | 'aria-expanded'\n >,\n Pick<HTMLAttributes<unknown>, 'role'>,\n Pick<HTMLProps['button'], 'onClickCapture' | 'onMouseUp' | 'onMouseDown'> {\n /** @ignore */\n _noPadding?: boolean;\n\n /** @ignore */\n _noRightPadding?: boolean;\n\n /**\n * Применяет к кнопке стили псевдокласса `:active`.\n */\n active?: boolean;\n\n /**\n * CSS-свойство `text-align`.\n */\n align?: React.CSSProperties['textAlign'];\n\n /**\n * Превращает обычную кнопку в кнопку со стрелкой.\n */\n arrow?: boolean | 'left';\n\n /**\n * Даёт кнопке фокус после окончания загрузки страницы.\n */\n autoFocus?: boolean;\n\n /**\n * Убирает обводку у кнопки.\n */\n borderless?: boolean;\n\n /**\n * @ignore\n */\n checked?: boolean;\n\n children?: React.ReactNode;\n\n /** @ignore */\n corners?: React.CSSProperties;\n\n /**\n * Отключенное состояние кнопки.\n */\n disabled?: boolean;\n\n /** @ignore */\n disableFocus?: boolean;\n\n /**\n * Состояние валидации при ошибке.\n */\n error?: boolean;\n\n /**\n * Иконка слева от текста кнопки.\n */\n icon?: React.ReactElement<any>;\n\n /**\n * Переводит кнопку в состояние загрузки.\n */\n loading?: boolean;\n\n /**\n * Сужает кнопку.\n */\n narrow?: boolean;\n\n /**\n * HTML-событие `onblur`.\n */\n onBlur?: React.FocusEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `onclick`.\n */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `onfocus`.\n */\n onFocus?: React.FocusEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `keydown`.\n */\n onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `onmouseenter`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `mouseleave`.\n */\n onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `onmouseover`.\n */\n onMouseOver?: React.MouseEventHandler<HTMLButtonElement>;\n\n /**\n * Задаёт размер кнопки.\n *\n * **Допустимые значения**: `\"small\"`, `\"medium\"`, `\"large\"`.\n */\n size?: ButtonSize;\n\n /**\n * HTML-атрибут `type`.\n */\n type?: ButtonType;\n\n /**\n * HTML-атрибут `title`.\n */\n title?: string;\n\n /**\n * Стиль кнопки.\n *\n * **Допустимые значения**: `\"default\"`, `\"primary\"`, `\"success\"`, `\"danger\"`, `\"pay\"`, `\"link\"`, `\"text\"`, `\"backless\"`.\n */\n use?: ButtonUse;\n\n /** @ignore */\n visuallyFocused?: boolean;\n\n /**\n * Состояние валидации при предупреждении.\n */\n warning?: boolean;\n\n /**\n * CSS-свойство `width`.\n */\n width?: number | string;\n\n /**\n * Обычный объект с переменными темы.\n * Он будет объединён с темой из контекста.\n */\n theme?: ThemeIn;\n}\n\nexport interface ButtonState {\n focusedByTab: boolean;\n}\n\nexport const ButtonDataTids = {\n root: 'Button__root',\n} as const;\n\ntype DefaultProps = Required<Pick<ButtonProps, 'use' | 'size' | 'type'>>;\n\n@rootNode\nexport class Button extends React.Component<ButtonProps, ButtonState> {\n public static __KONTUR_REACT_UI__ = 'Button';\n public static __BUTTON__ = true;\n\n public static defaultProps: DefaultProps = {\n use: 'default',\n size: 'small',\n type: 'button',\n };\n\n private getProps = createPropsGetter(Button.defaultProps);\n\n public state = {\n focusedByTab: false,\n };\n\n private theme!: Theme;\n private node: HTMLButtonElement | null = null;\n private setRootNode!: TSetRootNode;\n\n public componentDidMount() {\n if (this.props.autoFocus) {\n keyListener.isTabPressed = true;\n this.focus();\n }\n }\n\n public static getDerivedStateFromProps(props: ButtonProps) {\n if (props.loading || props.disabled) {\n return { focusedByTab: false };\n }\n return null;\n }\n\n /**\n * @public\n */\n public focus() {\n this.node?.focus();\n }\n\n /**\n * @public\n */\n public blur() {\n this.node?.blur();\n }\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = this.props.theme ? ThemeFactory.create(this.props.theme as Theme, theme) : theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const {\n corners,\n active,\n disabled,\n borderless,\n checked,\n error,\n warning,\n loading,\n narrow,\n icon,\n _noPadding,\n _noRightPadding,\n visuallyFocused,\n align,\n disableFocus,\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onMouseDown,\n onMouseUp,\n onKeyDown,\n onClick,\n onClickCapture,\n width,\n children,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup,\n 'aria-controls': ariaControls,\n 'aria-label': ariaLabel,\n 'aria-checked': ariaChecked,\n 'aria-expanded': ariaExpanded,\n role,\n } = this.props;\n const { use, type, size } = this.getProps();\n const sizeClass = this.getSizeClassName();\n\n const isFocused = this.state.focusedByTab || visuallyFocused;\n const isLink = use === 'link';\n const _isTheme2022 = isTheme2022(this.theme);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [wrapClassNameWithArrow, rootClassNameWithArrow, arrowNode] = useButtonArrow(\n { ...this.props, isFocused: Boolean(isFocused) },\n this.theme,\n );\n const isUseStateWithoutOutlineInDisabledState = !['default', 'backless'].includes(use);\n let rootClassName = '';\n if (_isTheme2022) {\n const trueDisabled = disabled || loading;\n rootClassName = cx(\n styles.root(this.theme),\n styles[use](this.theme),\n sizeClass,\n narrow && styles.narrow(),\n _noPadding && styles.noPadding(),\n _noRightPadding && styles.noRightPadding(),\n rootClassNameWithArrow,\n ...(trueDisabled\n ? [\n styles.disabled(this.theme),\n isUseStateWithoutOutlineInDisabledState && styles.disabledWithoutOutline(this.theme),\n checked && styles.checkedDisabled(this.theme),\n checked && styles.checkedDisabled2022(this.theme),\n borderless && styles.borderless2022(),\n ]\n : [\n active && !checked && activeStyles[use](this.theme),\n isFocused && styles.focus(this.theme),\n checked && styles.checked2022(this.theme),\n checked && isFocused && styles.checkedFocused(this.theme),\n borderless && !checked && !isFocused && styles.borderless2022(),\n ]),\n );\n } else {\n rootClassName = cx({\n [styles.root(this.theme)]: true,\n [styles.simulatedPress()]: true,\n [styles[use](this.theme)]: true,\n [activeStyles[use](this.theme)]: active,\n [sizeClass]: true,\n [styles.focus(this.theme)]: isFocused,\n [styles.checked(this.theme)]: checked,\n [styles.checkedFocused(this.theme)]: checked && isFocused,\n [styles.disabled(this.theme)]: disabled || loading,\n [styles.checkedDisabled(this.theme)]: checked && disabled,\n [styles.borderless()]: borderless && !disabled && !loading && !checked && !isFocused && !active,\n [styles.narrow()]: narrow,\n [styles.noPadding()]: _noPadding,\n [styles.noRightPadding()]: _noRightPadding,\n });\n }\n\n const rootProps = {\n // By default the type attribute is 'submit'. IE8 will fire a click event\n // on this button if somewhere on the page user presses Enter while some\n // input is focused. So we set type to 'button' by default.\n type,\n role,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup,\n 'aria-controls': ariaControls,\n 'aria-label': ariaLabel,\n 'aria-checked': ariaChecked,\n 'aria-expanded': ariaExpanded,\n className: rootClassName,\n style: {\n textAlign: align,\n ...corners,\n },\n disabled: disabled || loading,\n onClick,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n onKeyDown,\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onMouseDown,\n onMouseUp,\n onClickCapture,\n tabIndex: disableFocus ? -1 : 0,\n title: this.props.title,\n };\n\n const wrapProps = {\n className: cx({\n [styles.wrap(this.theme)]: true,\n [wrapClassNameWithArrow]: true,\n [this.getSizeWrapClassName()]: true,\n }),\n style: {\n width,\n },\n };\n\n const innerShadowNode = _isTheme2022 ? null : <div className={globalClasses.innerShadow} />;\n\n let outlineNode = null;\n const isDisabled2022 = _isTheme2022 && (disabled || loading);\n if ((!isFocused || isLink) && !isDisabled2022) {\n outlineNode = (\n <div\n style={{ zIndex: _isTheme2022 && isLink ? -1 : undefined }}\n className={cx(styles.outline(), {\n [styles.outlineWarning(this.theme)]: warning,\n [styles.outlineError(this.theme)]: error,\n [styles.outlineLink()]: isLink,\n [styles.outlineLinkWarning(this.theme)]: isLink && warning,\n [styles.outlineLinkError(this.theme)]: isLink && error,\n })}\n />\n );\n }\n\n const iconNode = icon && (\n <ButtonIcon\n icon={icon}\n size={size}\n hasChildren={Boolean(children)}\n disabled={disabled || false}\n loading={loading || false}\n use={use}\n />\n );\n let loadingNode = null;\n if (loading && !icon) {\n const loadingIcon = _isTheme2022 ? <LoadingIcon size={size} /> : <Spinner caption={null} dimmed type=\"mini\" />;\n loadingNode = <div className={styles.loading()}>{loadingIcon}</div>;\n }\n\n // Force disable all props and features, that cannot be use with Link\n if (isLink) {\n rootProps.className = cx({\n [styles.root(this.theme)]: true,\n [sizeClass]: true,\n [styles.link(this.theme)]: true,\n [styles.linkLineHeight()]: !isSafari || (isSafari && !_isTheme2022),\n [styles.linkLineHeightSafariFallback()]: isSafari && _isTheme2022,\n [styles.linkFocus(this.theme)]: isFocused,\n [styles.linkDisabled(this.theme)]: disabled || loading,\n });\n Object.assign(wrapProps, {\n className: cx(styles.wrap(this.theme), styles.wrapLink()),\n style: { width: wrapProps.style.width },\n });\n rootProps.style.textAlign = undefined;\n }\n\n let captionNode = (\n <div\n className={cx(styles.caption(), globalClasses.caption, {\n [styles.captionTranslated()]: (active || checked) && !loading && !_isTheme2022,\n [styles.captionLink()]: isLink,\n [styles.captionDisabled()]: !checked && disabled,\n })}\n >\n {loadingNode}\n {iconNode}\n <span\n className={cx(globalClasses.text, {\n [styles.visibilityHidden()]: !!loadingNode,\n })}\n >\n {children}\n </span>\n </div>\n );\n if (_isTheme2022 && isLink && !loading) {\n captionNode = (\n <ThemeContext.Provider value={getInnerLinkTheme(this.theme)}>\n <Link focused={isFocused} disabled={disabled} icon={this.renderIcon2022(icon)} as=\"span\" tabIndex={-1}>\n {children}\n </Link>\n </ThemeContext.Provider>\n );\n }\n\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n <span {...wrapProps}>\n <button data-tid={ButtonDataTids.root} ref={this._ref} {...rootProps}>\n {innerShadowNode}\n {outlineNode}\n {arrowNode}\n {captionNode}\n </button>\n </span>\n </CommonWrapper>\n );\n }\n\n private renderIcon2022(icon: React.ReactElement | undefined) {\n if (icon && isKonturIcon(icon)) {\n const sizes = getButtonIconSizes(this.theme);\n return React.cloneElement(icon, { size: icon.props.size ?? sizes[this.getProps().size] });\n }\n\n return icon;\n }\n\n private getSizeClassName() {\n const _isTheme2022 = isTheme2022(this.theme);\n switch (this.getProps().size) {\n case 'large':\n return cx(styles.sizeLarge(this.theme), {\n [styles.sizeLargeIE11(this.theme)]: isIE11 || isEdge,\n [styles.sizeLargeWithIcon(this.theme)]: !!this.props.icon,\n [styles.sizeLargeWithIconWithoutText(this.theme)]: _isTheme2022 && !!this.props.icon && !this.props.children,\n });\n case 'medium':\n return cx(styles.sizeMedium(this.theme), {\n [styles.sizeMediumIE11(this.theme)]: isIE11 || isEdge,\n [styles.sizeMediumWithIcon(this.theme)]: !!this.props.icon,\n [styles.sizeMediumWithIconWithoutText(this.theme)]: _isTheme2022 && !!this.props.icon && !this.props.children,\n });\n case 'small':\n default:\n return cx(styles.sizeSmall(this.theme), {\n [styles.sizeSmallIE11(this.theme)]: isIE11 || isEdge,\n [styles.sizeSmallWithIcon(this.theme)]: !!this.props.icon,\n [styles.sizeSmallWithIconWithoutText(this.theme)]: _isTheme2022 && !!this.props.icon && !this.props.children,\n });\n }\n }\n\n private getSizeWrapClassName() {\n switch (this.getProps().size) {\n case 'large':\n return styles.wrapLarge(this.theme);\n case 'medium':\n return styles.wrapMedium(this.theme);\n case 'small':\n default:\n return styles.wrapSmall(this.theme);\n }\n }\n\n private handleFocus = (e: React.FocusEvent<HTMLButtonElement>) => {\n if (!this.props.disabled && !this.props.disableFocus) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n requestAnimationFrame(() => {\n if (keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n this.props.onFocus?.(e);\n }\n };\n\n private handleBlur = (e: React.FocusEvent<HTMLButtonElement>) => {\n this.setState({ focusedByTab: false });\n if (!this.props.disabled && !this.props.disableFocus) {\n this.props.onBlur?.(e);\n }\n };\n\n private _ref = (node: HTMLButtonElement | null) => {\n this.node = node;\n };\n}\n\nexport const isButton = isReactUIComponent<ButtonProps>('Button');\n"]}
|
|
1
|
+
{"version":3,"sources":["Button.tsx"],"names":["ButtonDataTids","root","spinner","Button","rootNode","getProps","defaultProps","state","focusedByTab","node","handleFocus","e","props","disabled","disableFocus","requestAnimationFrame","keyListener","isTabPressed","setState","onFocus","handleBlur","onBlur","_ref","componentDidMount","autoFocus","focus","getDerivedStateFromProps","loading","blur","render","theme","ThemeFactory","create","renderMain","corners","active","borderless","checked","error","warning","narrow","icon","_noPadding","_noRightPadding","visuallyFocused","align","onMouseEnter","onMouseLeave","onMouseOver","onMouseDown","onMouseUp","onKeyDown","onClick","onClickCapture","width","children","ariaDescribedby","ariaHasPopup","ariaControls","ariaLabel","ariaChecked","ariaExpanded","role","use","type","size","sizeClass","getSizeClassName","isFocused","isLink","_isTheme2022","Boolean","wrapClassNameWithArrow","rootClassNameWithArrow","arrowNode","isUseStateWithoutOutlineInDisabledState","includes","rootClassName","trueDisabled","cx","styles","noPadding","noRightPadding","disabledWithoutOutline","checkedDisabled","checkedDisabled2022","borderless2022","activeStyles","checked2022","checkedFocused","simulatedPress","rootProps","className","style","textAlign","tabIndex","title","wrapProps","wrap","getSizeWrapClassName","innerShadowNode","globalClasses","innerShadow","outlineNode","isDisabled2022","zIndex","undefined","outline","outlineWarning","outlineError","outlineLink","outlineLinkWarning","outlineLinkError","iconNode","loadingNode","loadingIcon","link","linkLineHeight","isSafari","linkLineHeightSafariFallback","linkFocus","linkDisabled","Object","assign","wrapLink","captionNode","caption","captionTranslated","captionLink","captionDisabled","text","visibilityHidden","renderIcon2022","setRootNode","sizes","React","cloneElement","sizeLarge","sizeLargeIE11","isIE11","isEdge","sizeLargeWithIcon","sizeLargeWithIconWithoutText","sizeMedium","sizeMediumIE11","sizeMediumWithIcon","sizeMediumWithIconWithoutText","sizeSmall","sizeSmallIE11","sizeSmallWithIcon","sizeSmallWithIconWithoutText","wrapLarge","wrapMedium","wrapSmall","Component","__KONTUR_REACT_UI__","__BUTTON__","isButton"],"mappings":"gXAAA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsKO,IAAMA,cAAc,GAAG;AAC5BC,EAAAA,IAAI,EAAE,cADsB;AAE5BC,EAAAA,OAAO,EAAE,iBAFmB,EAAvB,C;;;;;;AAQMC,M,OADZC,kB;;;;;;;;;;AAWSC,IAAAA,Q,GAAW,0CAAkBF,MAAM,CAACG,YAAzB,C;;AAEZC,IAAAA,K,GAAQ;AACbC,MAAAA,YAAY,EAAE,KADD,E;;;;AAKPC,IAAAA,I,GAAi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F,QAAQ,GAAG,+BAAgC,QAAhC,CAAjB,C","sourcesContent":["import React, { AriaAttributes, HTMLAttributes } from 'react';\n\nimport { HTMLProps } from '../../typings/html';\nimport { isKonturIcon, isReactUIComponent } from '../../lib/utils';\nimport { isIE11, isEdge, isSafari } from '../../lib/client';\nimport { keyListener } from '../../lib/events/keyListener';\nimport { Theme, ThemeIn } from '../../lib/theming/Theme';\nimport { ThemeContext } from '../../lib/theming/ThemeContext';\nimport { CommonWrapper, CommonProps } from '../../internal/CommonWrapper';\nimport { cx } from '../../lib/theming/Emotion';\nimport { rootNode, TSetRootNode } from '../../lib/rootNode';\nimport { ThemeFactory } from '../../lib/theming/ThemeFactory';\nimport { createPropsGetter } from '../../lib/createPropsGetter';\nimport { isTheme2022 } from '../../lib/theming/ThemeHelpers';\nimport { Link } from '../Link';\nimport { Spinner } from '../Spinner';\nimport { LoadingIcon } from '../../internal/icons2022/LoadingIcon';\n\nimport { styles, activeStyles, globalClasses } from './Button.styles';\nimport { ButtonIcon, getButtonIconSizes } from './ButtonIcon';\nimport { useButtonArrow } from './ButtonArrow';\nimport { getInnerLinkTheme } from './getInnerLinkTheme';\n\nexport type ButtonSize = 'small' | 'medium' | 'large';\nexport type ButtonType = 'button' | 'submit' | 'reset';\nexport type ButtonUse = 'default' | 'primary' | 'success' | 'danger' | 'pay' | 'link' | 'text' | 'backless';\n\nexport interface ButtonProps\n extends CommonProps,\n Pick<\n AriaAttributes,\n 'aria-haspopup' | 'aria-describedby' | 'aria-controls' | 'aria-label' | 'aria-checked' | 'aria-expanded'\n >,\n Pick<HTMLAttributes<unknown>, 'role'>,\n Pick<HTMLProps['button'], 'onClickCapture' | 'onMouseUp' | 'onMouseDown'> {\n /** @ignore */\n _noPadding?: boolean;\n\n /** @ignore */\n _noRightPadding?: boolean;\n\n /**\n * Применяет к кнопке стили псевдокласса `:active`.\n */\n active?: boolean;\n\n /**\n * CSS-свойство `text-align`.\n */\n align?: React.CSSProperties['textAlign'];\n\n /**\n * Превращает обычную кнопку в кнопку со стрелкой.\n */\n arrow?: boolean | 'left';\n\n /**\n * Даёт кнопке фокус после окончания загрузки страницы.\n */\n autoFocus?: boolean;\n\n /**\n * Убирает обводку у кнопки.\n */\n borderless?: boolean;\n\n /**\n * @ignore\n */\n checked?: boolean;\n\n children?: React.ReactNode;\n\n /** @ignore */\n corners?: React.CSSProperties;\n\n /**\n * Отключенное состояние кнопки.\n */\n disabled?: boolean;\n\n /** @ignore */\n disableFocus?: boolean;\n\n /**\n * Состояние валидации при ошибке.\n */\n error?: boolean;\n\n /**\n * Иконка слева от текста кнопки.\n */\n icon?: React.ReactElement<any>;\n\n /**\n * Переводит кнопку в состояние загрузки.\n */\n loading?: boolean;\n\n /**\n * Сужает кнопку.\n */\n narrow?: boolean;\n\n /**\n * HTML-событие `onblur`.\n */\n onBlur?: React.FocusEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `onclick`.\n */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `onfocus`.\n */\n onFocus?: React.FocusEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `keydown`.\n */\n onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `onmouseenter`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `mouseleave`.\n */\n onMouseLeave?: React.MouseEventHandler<HTMLButtonElement>;\n\n /**\n * HTML-событие `onmouseover`.\n */\n onMouseOver?: React.MouseEventHandler<HTMLButtonElement>;\n\n /**\n * Задаёт размер кнопки.\n *\n * **Допустимые значения**: `\"small\"`, `\"medium\"`, `\"large\"`.\n */\n size?: ButtonSize;\n\n /**\n * HTML-атрибут `type`.\n */\n type?: ButtonType;\n\n /**\n * HTML-атрибут `title`.\n */\n title?: string;\n\n /**\n * Стиль кнопки.\n *\n * **Допустимые значения**: `\"default\"`, `\"primary\"`, `\"success\"`, `\"danger\"`, `\"pay\"`, `\"link\"`, `\"text\"`, `\"backless\"`.\n */\n use?: ButtonUse;\n\n /** @ignore */\n visuallyFocused?: boolean;\n\n /**\n * Состояние валидации при предупреждении.\n */\n warning?: boolean;\n\n /**\n * CSS-свойство `width`.\n */\n width?: number | string;\n\n /**\n * Обычный объект с переменными темы.\n * Он будет объединён с темой из контекста.\n */\n theme?: ThemeIn;\n}\n\nexport interface ButtonState {\n focusedByTab: boolean;\n}\n\nexport const ButtonDataTids = {\n root: 'Button__root',\n spinner: 'Button__spinner',\n} as const;\n\ntype DefaultProps = Required<Pick<ButtonProps, 'use' | 'size' | 'type'>>;\n\n@rootNode\nexport class Button extends React.Component<ButtonProps, ButtonState> {\n public static __KONTUR_REACT_UI__ = 'Button';\n public static __BUTTON__ = true;\n\n public static defaultProps: DefaultProps = {\n use: 'default',\n size: 'small',\n type: 'button',\n };\n\n private getProps = createPropsGetter(Button.defaultProps);\n\n public state = {\n focusedByTab: false,\n };\n\n private theme!: Theme;\n private node: HTMLButtonElement | null = null;\n private setRootNode!: TSetRootNode;\n\n public componentDidMount() {\n if (this.props.autoFocus) {\n keyListener.isTabPressed = true;\n this.focus();\n }\n }\n\n public static getDerivedStateFromProps(props: ButtonProps) {\n if (props.loading || props.disabled) {\n return { focusedByTab: false };\n }\n return null;\n }\n\n /**\n * @public\n */\n public focus() {\n this.node?.focus();\n }\n\n /**\n * @public\n */\n public blur() {\n this.node?.blur();\n }\n\n public render(): JSX.Element {\n return (\n <ThemeContext.Consumer>\n {(theme) => {\n this.theme = this.props.theme ? ThemeFactory.create(this.props.theme as Theme, theme) : theme;\n return this.renderMain();\n }}\n </ThemeContext.Consumer>\n );\n }\n\n private renderMain() {\n const {\n corners,\n active,\n disabled,\n borderless,\n checked,\n error,\n warning,\n loading,\n narrow,\n icon,\n _noPadding,\n _noRightPadding,\n visuallyFocused,\n align,\n disableFocus,\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onMouseDown,\n onMouseUp,\n onKeyDown,\n onClick,\n onClickCapture,\n width,\n children,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup,\n 'aria-controls': ariaControls,\n 'aria-label': ariaLabel,\n 'aria-checked': ariaChecked,\n 'aria-expanded': ariaExpanded,\n role,\n } = this.props;\n const { use, type, size } = this.getProps();\n const sizeClass = this.getSizeClassName();\n\n const isFocused = this.state.focusedByTab || visuallyFocused;\n const isLink = use === 'link';\n const _isTheme2022 = isTheme2022(this.theme);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [wrapClassNameWithArrow, rootClassNameWithArrow, arrowNode] = useButtonArrow(\n { ...this.props, isFocused: Boolean(isFocused) },\n this.theme,\n );\n const isUseStateWithoutOutlineInDisabledState = !['default', 'backless'].includes(use);\n let rootClassName = '';\n if (_isTheme2022) {\n const trueDisabled = disabled || loading;\n rootClassName = cx(\n styles.root(this.theme),\n styles[use](this.theme),\n sizeClass,\n narrow && styles.narrow(),\n _noPadding && styles.noPadding(),\n _noRightPadding && styles.noRightPadding(),\n rootClassNameWithArrow,\n ...(trueDisabled\n ? [\n styles.disabled(this.theme),\n isUseStateWithoutOutlineInDisabledState && styles.disabledWithoutOutline(this.theme),\n checked && styles.checkedDisabled(this.theme),\n checked && styles.checkedDisabled2022(this.theme),\n borderless && styles.borderless2022(),\n ]\n : [\n active && !checked && activeStyles[use](this.theme),\n isFocused && styles.focus(this.theme),\n checked && styles.checked2022(this.theme),\n checked && isFocused && styles.checkedFocused(this.theme),\n borderless && !checked && !isFocused && styles.borderless2022(),\n ]),\n );\n } else {\n rootClassName = cx({\n [styles.root(this.theme)]: true,\n [styles.simulatedPress()]: true,\n [styles[use](this.theme)]: true,\n [activeStyles[use](this.theme)]: active,\n [sizeClass]: true,\n [styles.focus(this.theme)]: isFocused,\n [styles.checked(this.theme)]: checked,\n [styles.checkedFocused(this.theme)]: checked && isFocused,\n [styles.disabled(this.theme)]: disabled || loading,\n [styles.checkedDisabled(this.theme)]: checked && disabled,\n [styles.borderless()]: borderless && !disabled && !loading && !checked && !isFocused && !active,\n [styles.narrow()]: narrow,\n [styles.noPadding()]: _noPadding,\n [styles.noRightPadding()]: _noRightPadding,\n });\n }\n\n const rootProps = {\n // By default the type attribute is 'submit'. IE8 will fire a click event\n // on this button if somewhere on the page user presses Enter while some\n // input is focused. So we set type to 'button' by default.\n type,\n role,\n 'aria-describedby': ariaDescribedby,\n 'aria-haspopup': ariaHasPopup,\n 'aria-controls': ariaControls,\n 'aria-label': ariaLabel,\n 'aria-checked': ariaChecked,\n 'aria-expanded': ariaExpanded,\n className: rootClassName,\n style: {\n textAlign: align,\n ...corners,\n },\n disabled: disabled || loading,\n onClick,\n onFocus: this.handleFocus,\n onBlur: this.handleBlur,\n onKeyDown,\n onMouseEnter,\n onMouseLeave,\n onMouseOver,\n onMouseDown,\n onMouseUp,\n onClickCapture,\n tabIndex: disableFocus ? -1 : 0,\n title: this.props.title,\n };\n\n const wrapProps = {\n className: cx({\n [styles.wrap(this.theme)]: true,\n [wrapClassNameWithArrow]: true,\n [this.getSizeWrapClassName()]: true,\n }),\n style: {\n width,\n },\n };\n\n const innerShadowNode = _isTheme2022 ? null : <div className={globalClasses.innerShadow} />;\n\n let outlineNode = null;\n const isDisabled2022 = _isTheme2022 && (disabled || loading);\n if ((!isFocused || isLink) && !isDisabled2022) {\n outlineNode = (\n <div\n style={{ zIndex: _isTheme2022 && isLink ? -1 : undefined }}\n className={cx(styles.outline(), {\n [styles.outlineWarning(this.theme)]: warning,\n [styles.outlineError(this.theme)]: error,\n [styles.outlineLink()]: isLink,\n [styles.outlineLinkWarning(this.theme)]: isLink && warning,\n [styles.outlineLinkError(this.theme)]: isLink && error,\n })}\n />\n );\n }\n\n const iconNode = icon && (\n <ButtonIcon\n icon={icon}\n size={size}\n hasChildren={Boolean(children)}\n disabled={disabled || false}\n loading={loading || false}\n use={use}\n />\n );\n let loadingNode = null;\n if (loading && !icon) {\n const loadingIcon = _isTheme2022 ? <LoadingIcon size={size} /> : <Spinner caption={null} dimmed type=\"mini\" />;\n loadingNode = (\n <div data-tid={ButtonDataTids.spinner} className={styles.loading()}>\n {loadingIcon}\n </div>\n );\n }\n\n // Force disable all props and features, that cannot be use with Link\n if (isLink) {\n rootProps.className = cx({\n [styles.root(this.theme)]: true,\n [sizeClass]: true,\n [styles.link(this.theme)]: true,\n [styles.linkLineHeight()]: !isSafari || (isSafari && !_isTheme2022),\n [styles.linkLineHeightSafariFallback()]: isSafari && _isTheme2022,\n [styles.linkFocus(this.theme)]: isFocused,\n [styles.linkDisabled(this.theme)]: disabled || loading,\n });\n Object.assign(wrapProps, {\n className: cx(styles.wrap(this.theme), styles.wrapLink()),\n style: { width: wrapProps.style.width },\n });\n rootProps.style.textAlign = undefined;\n }\n\n let captionNode = (\n <div\n className={cx(styles.caption(), globalClasses.caption, {\n [styles.captionTranslated()]: (active || checked) && !loading && !_isTheme2022,\n [styles.captionLink()]: isLink,\n [styles.captionDisabled()]: !checked && disabled,\n })}\n >\n {loadingNode}\n {iconNode}\n <span\n className={cx(globalClasses.text, {\n [styles.visibilityHidden()]: !!loadingNode,\n })}\n >\n {children}\n </span>\n </div>\n );\n if (_isTheme2022 && isLink && !loading) {\n captionNode = (\n <ThemeContext.Provider value={getInnerLinkTheme(this.theme)}>\n <Link focused={isFocused} disabled={disabled} icon={this.renderIcon2022(icon)} as=\"span\" tabIndex={-1}>\n {children}\n </Link>\n </ThemeContext.Provider>\n );\n }\n\n return (\n <CommonWrapper rootNodeRef={this.setRootNode} {...this.props}>\n <span {...wrapProps}>\n <button data-tid={ButtonDataTids.root} ref={this._ref} {...rootProps}>\n {innerShadowNode}\n {outlineNode}\n {arrowNode}\n {captionNode}\n </button>\n </span>\n </CommonWrapper>\n );\n }\n\n private renderIcon2022(icon: React.ReactElement | undefined) {\n if (icon && isKonturIcon(icon)) {\n const sizes = getButtonIconSizes(this.theme);\n return React.cloneElement(icon, { size: icon.props.size ?? sizes[this.getProps().size] });\n }\n\n return icon;\n }\n\n private getSizeClassName() {\n const _isTheme2022 = isTheme2022(this.theme);\n switch (this.getProps().size) {\n case 'large':\n return cx(styles.sizeLarge(this.theme), {\n [styles.sizeLargeIE11(this.theme)]: isIE11 || isEdge,\n [styles.sizeLargeWithIcon(this.theme)]: !!this.props.icon,\n [styles.sizeLargeWithIconWithoutText(this.theme)]: _isTheme2022 && !!this.props.icon && !this.props.children,\n });\n case 'medium':\n return cx(styles.sizeMedium(this.theme), {\n [styles.sizeMediumIE11(this.theme)]: isIE11 || isEdge,\n [styles.sizeMediumWithIcon(this.theme)]: !!this.props.icon,\n [styles.sizeMediumWithIconWithoutText(this.theme)]: _isTheme2022 && !!this.props.icon && !this.props.children,\n });\n case 'small':\n default:\n return cx(styles.sizeSmall(this.theme), {\n [styles.sizeSmallIE11(this.theme)]: isIE11 || isEdge,\n [styles.sizeSmallWithIcon(this.theme)]: !!this.props.icon,\n [styles.sizeSmallWithIconWithoutText(this.theme)]: _isTheme2022 && !!this.props.icon && !this.props.children,\n });\n }\n }\n\n private getSizeWrapClassName() {\n switch (this.getProps().size) {\n case 'large':\n return styles.wrapLarge(this.theme);\n case 'medium':\n return styles.wrapMedium(this.theme);\n case 'small':\n default:\n return styles.wrapSmall(this.theme);\n }\n }\n\n private handleFocus = (e: React.FocusEvent<HTMLButtonElement>) => {\n if (!this.props.disabled && !this.props.disableFocus) {\n // focus event fires before keyDown eventlistener\n // so we should check tabPressed in async way\n requestAnimationFrame(() => {\n if (keyListener.isTabPressed) {\n this.setState({ focusedByTab: true });\n }\n });\n this.props.onFocus?.(e);\n }\n };\n\n private handleBlur = (e: React.FocusEvent<HTMLButtonElement>) => {\n this.setState({ focusedByTab: false });\n if (!this.props.disabled && !this.props.disableFocus) {\n this.props.onBlur?.(e);\n }\n };\n\n private _ref = (node: HTMLButtonElement | null) => {\n this.node = node;\n };\n}\n\nexport const isButton = isReactUIComponent<ButtonProps>('Button');\n"]}
|
|
@@ -38,7 +38,7 @@ borderBottomColor,
|
|
|
38
38
|
borderWidth)
|
|
39
39
|
{
|
|
40
40
|
var hasGradient = btnBackgroundStart !== btnBackgroundEnd;
|
|
41
|
-
return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n background-color: ", ";\n background-image: ", ";\n color: ", ";\n box-shadow: 0 0 0 ", " ", "", ";\n\n .", " {\n box-shadow: ", " 0 0 0 ", ";\n }\n\n :hover,\n :enabled {\n .", " svg,\n .", " svg {\n color: ", ";\n }\n }\n "])),
|
|
41
|
+
return (0, _Emotion.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2.default)(["\n background-color: ", ";\n background-image: ", ";\n color: ", ";\n box-shadow: 0 0 0 ", " ", "", ";\n\n .", " {\n box-shadow: ", " 0 0 0 ", ";\n }\n\n :enabled:hover,\n :enabled {\n .", " svg,\n .", " svg {\n color: ", ";\n }\n }\n "])),
|
|
42
42
|
hasGradient ? "initial" : btnBackground,
|
|
43
43
|
hasGradient ? "linear-gradient(" + btnBackgroundStart + ", " + btnBackgroundEnd + ")" : "none",
|
|
44
44
|
color,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Button.mixins.ts"],"names":["getBtnPadding","fontSize","paddingY","paddingX","fontFamilyCompensation","additionalOffset","paddingTop","paddingBottom","offset","parseInt","shiftUp","top","bottom","buttonUseMixin","btnBackground","btnBackgroundStart","btnBackgroundEnd","color","borderColor","borderBottomColor","borderWidth","hasGradient","css","globalClasses","arrowHelper","icon","arrow","buttonHoverMixin","buttonActiveMixin","btnShadow","borderTopColor","arrowBgImage","innerShadow","arrowHelperTop","buttonSizeMixin","lineHeight","buttonSizeMixinIE11","arrowOutlineMixin","insetWidth","outlineColor","outlineWidth","insetColor","arrowHelperBottom"],"mappings":"+ZAAA;AACA;;AAEA,yC;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB;AACpBC,QADoB;AAEpBC,QAFoB;AAGpBC,QAHoB;AAIpBC,sBAJoB;AAKpBC,gBALoB;AAMT,KADXA,gBACW,cADXA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AAD,EAAWC,QAAX,EAAqBC,QAArB,EAA+BC,sBAA/B,CAH1B;AAIiB+B,EAAAA,UAJjB;;AAMD,CAbM,C;;AAeA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAsB;AACjCnC,QADiC;AAEjCE,QAFiC;AAGjCD,QAHiC;AAIjCE,sBAJiC;AAK9B;AACH,aAAOkB,YAAP;AACatB,EAAAA,aAAa,CAACC,QAAD,EAAWC,QAAX,EAAqBC,QAArB,EAA+BC,sBAA/B,EAAuD,CAAvD,CAD1B;;;AAID,CAVM,C;;AAYA,IAAMiC,iBAAiB,GAAG,SAApBA,iBAAoB;AAC/BC,UAD+B;AAE/BC,YAF+B;AAG/BC,YAH+B;AAI/BC,UAJ+B;AAK5B;AACH,aAAOnB,YAAP;AACKC,wBAAcC,WADnB;AAEQD,wBAAcU,cAFtB;AAG2BK,EAAAA,UAH3B,EAGyCA,UAHzC,EAG2DG,UAH3D,EAG0ED,YAH1E,EAGgGD,YAHhG;;;AAMQhB,wBAAcmB,iBANtB;AAO2BJ,EAAAA,UAP3B,EAO0CA,UAP1C,EAO4DG,UAP5D,EAO2ED,YAP3E,EAOiGD,YAPjG;;;;;;AAaaD,EAAAA,UAbb;AAceA,EAAAA,UAdf;AAecA,EAAAA,UAfd;;AAiBQf,wBAAcmB,iBAjBtB;AAkBgBJ,EAAAA,UAlBhB;;;;AAsBD,CA5BM,C","sourcesContent":["import { css } from '../../lib/theming/Emotion';\nimport { shift } from '../../lib/styles/DimensionFunctions';\n\nimport { globalClasses } from './Button.styles';\n\nconst getBtnPadding = (\n fontSize: string,\n paddingY: string,\n paddingX: string,\n fontFamilyCompensation: string,\n additionalOffset = 0,\n): string => {\n let paddingTop = paddingY;\n let paddingBottom = paddingY;\n const offset = parseInt(fontFamilyCompensation) || 0;\n\n const shiftUp = (top: string, bottom: string, offset: number) => {\n return [shift(top, `${-offset}`), shift(bottom, `${offset}`)];\n };\n\n if (fontSize === '16px' && offset) {\n [paddingTop, paddingBottom] = shiftUp(paddingTop, paddingBottom, offset);\n }\n if (additionalOffset && offset) {\n [paddingTop, paddingBottom] = shiftUp(paddingTop, paddingBottom, additionalOffset);\n }\n\n return `${paddingTop} ${paddingX} ${paddingBottom}`;\n};\n\nexport const buttonUseMixin = (\n btnBackground: string,\n btnBackgroundStart: string,\n btnBackgroundEnd: string,\n color: string,\n borderColor: string,\n borderBottomColor: string,\n borderWidth: string,\n) => {\n const hasGradient = btnBackgroundStart !== btnBackgroundEnd;\n return css`\n background-color: ${hasGradient ? `initial` : btnBackground};\n background-image: ${hasGradient ? `linear-gradient(${btnBackgroundStart}, ${btnBackgroundEnd})` : `none`};\n color: ${color};\n box-shadow: 0 0 0 ${borderWidth} ${borderColor}${borderBottomColor ? `, 0 ${borderWidth} 0 0 ${borderBottomColor}` : ``};\n\n .${globalClasses.arrowHelper} {\n box-shadow: ${borderWidth} 0 0 0 ${borderColor};\n }\n\n :hover,\n :enabled {\n .${globalClasses.icon} svg,\n .${globalClasses.arrow} svg {\n color: ${color};\n }\n }\n `;\n};\n\nexport const buttonHoverMixin = (\n btnBackground: string,\n btnBackgroundStart: string,\n btnBackgroundEnd: string,\n borderColor: string,\n borderBottomColor: string,\n borderWidth: string,\n) => {\n const hasGradient = btnBackgroundStart !== btnBackgroundEnd;\n return css`\n background-color: ${hasGradient ? `initial` : btnBackground};\n background-image: ${hasGradient ? `linear-gradient(${btnBackgroundStart}, ${btnBackgroundEnd})` : `none`};\n box-shadow: 0 0 0 ${borderWidth} ${borderColor}${borderBottomColor ? `, 0 ${borderWidth} 0 0 ${borderBottomColor}` : ``};\n\n .${globalClasses.arrowHelper} {\n box-shadow: ${borderWidth} 0 0 ${borderColor};\n }\n `;\n};\n\nexport const buttonActiveMixin = (\n btnBackground: string,\n btnShadow: string,\n borderColor: string,\n borderTopColor: string,\n borderWidth: string,\n arrowBgImage: string,\n) => {\n return css`\n &,\n &:hover {\n background-image: none !important; // override :hover styles\n background-color: ${btnBackground} !important; // override :hover styles\n box-shadow: 0 0 0 ${borderWidth} ${borderColor}${borderTopColor ? `, 0 -${borderWidth} 0 0 ${borderTopColor}` : ``} !important; // override :hover styles\n\n .${globalClasses.innerShadow} {\n box-shadow: ${btnShadow};\n }\n\n .${globalClasses.arrowHelper} {\n box-shadow: ${borderWidth} 0 0 ${borderColor};\n\n &.${globalClasses.arrowHelperTop} {\n background-image: ${arrowBgImage};\n }\n }\n }\n `;\n};\n\nexport const buttonSizeMixin = (\n fontSize: string,\n lineHeight: string,\n paddingX: string,\n paddingY: string,\n fontFamilyCompensation: string,\n) => {\n return css`\n font-size: ${fontSize};\n box-sizing: border-box;\n padding: ${getBtnPadding(fontSize, paddingY, paddingX, fontFamilyCompensation)};\n line-height: ${lineHeight};\n `;\n};\n\nexport const buttonSizeMixinIE11 = (\n fontSize: string,\n paddingX: string,\n paddingY: string,\n fontFamilyCompensation: string,\n) => {\n return css`\n padding: ${getBtnPadding(fontSize, paddingY, paddingX, fontFamilyCompensation, 1)};\n line-height: normal;\n `;\n};\n\nexport const arrowOutlineMixin = (\n insetWidth: string,\n outlineColor: string,\n outlineWidth: string,\n insetColor: string,\n) => {\n return css`\n .${globalClasses.arrowHelper} {\n &.${globalClasses.arrowHelperTop} {\n box-shadow: inset -${insetWidth} ${insetWidth} 0 0 ${insetColor}, ${outlineWidth} 0 0 0 ${outlineColor} !important; // override :active styles\n }\n\n &.${globalClasses.arrowHelperBottom} {\n box-shadow: inset -${insetWidth} -${insetWidth} 0 0 ${insetColor}, ${outlineWidth} 0 0 0 ${outlineColor} !important; // override :active styles\n }\n\n // don't hide inner outline\n // and keep the middle-line fix\n &:before {\n top: ${insetWidth};\n right: ${insetWidth};\n left: ${insetWidth};\n }\n &.${globalClasses.arrowHelperBottom}:before {\n bottom: ${insetWidth};\n }\n }\n `;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["Button.mixins.ts"],"names":["getBtnPadding","fontSize","paddingY","paddingX","fontFamilyCompensation","additionalOffset","paddingTop","paddingBottom","offset","parseInt","shiftUp","top","bottom","buttonUseMixin","btnBackground","btnBackgroundStart","btnBackgroundEnd","color","borderColor","borderBottomColor","borderWidth","hasGradient","css","globalClasses","arrowHelper","icon","arrow","buttonHoverMixin","buttonActiveMixin","btnShadow","borderTopColor","arrowBgImage","innerShadow","arrowHelperTop","buttonSizeMixin","lineHeight","buttonSizeMixinIE11","arrowOutlineMixin","insetWidth","outlineColor","outlineWidth","insetColor","arrowHelperBottom"],"mappings":"+ZAAA;AACA;;AAEA,yC;;AAEA,IAAMA,aAAa,GAAG,SAAhBA,aAAgB;AACpBC,QADoB;AAEpBC,QAFoB;AAGpBC,QAHoB;AAIpBC,sBAJoB;AAKpBC,gBALoB;AAMT,KADXA,gBACW,cADXA,gBACW,GADQ,CACR;AACX,MAAIC,UAAU,GAAGJ,QAAjB;AACA,MAAIK,aAAa,GAAGL,QAApB;AACA,MAAMM,MAAM,GAAGC,QAAQ,CAACL,sBAAD,CAAR,IAAoC,CAAnD;;AAEA,MAAMM,OAAO,GAAG,SAAVA,OAAU,CAACC,GAAD,EAAcC,MAAd,EAA8BJ,MAA9B,EAAiD;AAC/D,WAAO,CAAC,+BAAMG,GAAN,OAAc,CAACH,MAAf,CAAD,EAA2B,+BAAMI,MAAN,OAAiBJ,MAAjB,CAA3B,CAAP;AACD,GAFD;;AAIA,MAAIP,QAAQ,KAAK,MAAb,IAAuBO,MAA3B,EAAmC;AACHE,IAAAA,OAAO,CAACJ,UAAD,EAAaC,aAAb,EAA4BC,MAA5B,CADJ,CAChCF,UADgC,eACpBC,aADoB;AAElC;AACD,MAAIF,gBAAgB,IAAIG,MAAxB,EAAgC;AACAE,IAAAA,OAAO,CAACJ,UAAD,EAAaC,aAAb,EAA4BF,gBAA5B,CADP,CAC7BC,UAD6B,gBACjBC,aADiB;AAE/B;;AAED,SAAUD,UAAV,SAAwBH,QAAxB,SAAoCI,aAApC;AACD,CAvBD;;AAyBO,IAAMM,cAAc,GAAG,SAAjBA,cAAiB;AAC5BC,aAD4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A,UAfd;;AAiBQf,wBAAcmB,iBAjBtB;AAkBgBJ,EAAAA,UAlBhB;;;;AAsBD,CA5BM,C","sourcesContent":["import { css } from '../../lib/theming/Emotion';\nimport { shift } from '../../lib/styles/DimensionFunctions';\n\nimport { globalClasses } from './Button.styles';\n\nconst getBtnPadding = (\n fontSize: string,\n paddingY: string,\n paddingX: string,\n fontFamilyCompensation: string,\n additionalOffset = 0,\n): string => {\n let paddingTop = paddingY;\n let paddingBottom = paddingY;\n const offset = parseInt(fontFamilyCompensation) || 0;\n\n const shiftUp = (top: string, bottom: string, offset: number) => {\n return [shift(top, `${-offset}`), shift(bottom, `${offset}`)];\n };\n\n if (fontSize === '16px' && offset) {\n [paddingTop, paddingBottom] = shiftUp(paddingTop, paddingBottom, offset);\n }\n if (additionalOffset && offset) {\n [paddingTop, paddingBottom] = shiftUp(paddingTop, paddingBottom, additionalOffset);\n }\n\n return `${paddingTop} ${paddingX} ${paddingBottom}`;\n};\n\nexport const buttonUseMixin = (\n btnBackground: string,\n btnBackgroundStart: string,\n btnBackgroundEnd: string,\n color: string,\n borderColor: string,\n borderBottomColor: string,\n borderWidth: string,\n) => {\n const hasGradient = btnBackgroundStart !== btnBackgroundEnd;\n return css`\n background-color: ${hasGradient ? `initial` : btnBackground};\n background-image: ${hasGradient ? `linear-gradient(${btnBackgroundStart}, ${btnBackgroundEnd})` : `none`};\n color: ${color};\n box-shadow: 0 0 0 ${borderWidth} ${borderColor}${borderBottomColor ? `, 0 ${borderWidth} 0 0 ${borderBottomColor}` : ``};\n\n .${globalClasses.arrowHelper} {\n box-shadow: ${borderWidth} 0 0 0 ${borderColor};\n }\n\n :enabled:hover,\n :enabled {\n .${globalClasses.icon} svg,\n .${globalClasses.arrow} svg {\n color: ${color};\n }\n }\n `;\n};\n\nexport const buttonHoverMixin = (\n btnBackground: string,\n btnBackgroundStart: string,\n btnBackgroundEnd: string,\n borderColor: string,\n borderBottomColor: string,\n borderWidth: string,\n) => {\n const hasGradient = btnBackgroundStart !== btnBackgroundEnd;\n return css`\n background-color: ${hasGradient ? `initial` : btnBackground};\n background-image: ${hasGradient ? `linear-gradient(${btnBackgroundStart}, ${btnBackgroundEnd})` : `none`};\n box-shadow: 0 0 0 ${borderWidth} ${borderColor}${borderBottomColor ? `, 0 ${borderWidth} 0 0 ${borderBottomColor}` : ``};\n\n .${globalClasses.arrowHelper} {\n box-shadow: ${borderWidth} 0 0 ${borderColor};\n }\n `;\n};\n\nexport const buttonActiveMixin = (\n btnBackground: string,\n btnShadow: string,\n borderColor: string,\n borderTopColor: string,\n borderWidth: string,\n arrowBgImage: string,\n) => {\n return css`\n &,\n &:hover {\n background-image: none !important; // override :hover styles\n background-color: ${btnBackground} !important; // override :hover styles\n box-shadow: 0 0 0 ${borderWidth} ${borderColor}${borderTopColor ? `, 0 -${borderWidth} 0 0 ${borderTopColor}` : ``} !important; // override :hover styles\n\n .${globalClasses.innerShadow} {\n box-shadow: ${btnShadow};\n }\n\n .${globalClasses.arrowHelper} {\n box-shadow: ${borderWidth} 0 0 ${borderColor};\n\n &.${globalClasses.arrowHelperTop} {\n background-image: ${arrowBgImage};\n }\n }\n }\n `;\n};\n\nexport const buttonSizeMixin = (\n fontSize: string,\n lineHeight: string,\n paddingX: string,\n paddingY: string,\n fontFamilyCompensation: string,\n) => {\n return css`\n font-size: ${fontSize};\n box-sizing: border-box;\n padding: ${getBtnPadding(fontSize, paddingY, paddingX, fontFamilyCompensation)};\n line-height: ${lineHeight};\n `;\n};\n\nexport const buttonSizeMixinIE11 = (\n fontSize: string,\n paddingX: string,\n paddingY: string,\n fontFamilyCompensation: string,\n) => {\n return css`\n padding: ${getBtnPadding(fontSize, paddingY, paddingX, fontFamilyCompensation, 1)};\n line-height: normal;\n `;\n};\n\nexport const arrowOutlineMixin = (\n insetWidth: string,\n outlineColor: string,\n outlineWidth: string,\n insetColor: string,\n) => {\n return css`\n .${globalClasses.arrowHelper} {\n &.${globalClasses.arrowHelperTop} {\n box-shadow: inset -${insetWidth} ${insetWidth} 0 0 ${insetColor}, ${outlineWidth} 0 0 0 ${outlineColor} !important; // override :active styles\n }\n\n &.${globalClasses.arrowHelperBottom} {\n box-shadow: inset -${insetWidth} -${insetWidth} 0 0 ${insetColor}, ${outlineWidth} 0 0 0 ${outlineColor} !important; // override :active styles\n }\n\n // don't hide inner outline\n // and keep the middle-line fix\n &:before {\n top: ${insetWidth};\n right: ${insetWidth};\n left: ${insetWidth};\n }\n &.${globalClasses.arrowHelperBottom}:before {\n bottom: ${insetWidth};\n }\n }\n `;\n};\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.DateInputDataTids = exports.DateInput = void 0;var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));var _react = _interopRequireDefault(require("react"));
|
|
2
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
2
3
|
|
|
3
4
|
var _ConditionalHandler = require("../../lib/ConditionalHandler");
|
|
4
5
|
var _constants = require("../../lib/date/constants");
|
|
@@ -352,16 +353,22 @@ DateInput = (_dec = (0, _decorators.locale)('DatePicker', _locale.DatePickerLoca
|
|
|
352
353
|
_this.setState({ selected: selected, inputMode: false });
|
|
353
354
|
};_this.
|
|
354
355
|
|
|
355
|
-
updateValue = function (state) {if (state === void 0) {state = {};}
|
|
356
|
+
updateValue = function (state, sync) {if (state === void 0) {state = {};}if (sync === void 0) {sync = true;}
|
|
356
357
|
var valueFormatted = _this.iDateMediator.getString();
|
|
357
358
|
|
|
358
|
-
_this.setState((0, _extends2.default)({}, state, { valueFormatted: valueFormatted }), _this.emitChange);
|
|
359
|
+
var update = function update() {return _this.setState((0, _extends2.default)({}, state, { valueFormatted: valueFormatted }), _this.emitChange);};
|
|
360
|
+
|
|
361
|
+
if (sync && _react.default.version.search('18') === 0) {
|
|
362
|
+
_reactDom.default.flushSync(update);
|
|
363
|
+
} else {
|
|
364
|
+
update();
|
|
365
|
+
}
|
|
359
366
|
};_this.
|
|
360
367
|
|
|
361
|
-
updateFromProps = function () {
|
|
368
|
+
updateFromProps = function (sync) {
|
|
362
369
|
_this.iDateMediator.update(_this.props, _this.locale);
|
|
363
370
|
|
|
364
|
-
_this.updateValue();
|
|
371
|
+
_this.updateValue({}, sync);
|
|
365
372
|
};_this.
|
|
366
373
|
|
|
367
374
|
fullSelection = function () {
|
|
@@ -458,4 +465,4 @@ DateInput = (_dec = (0, _decorators.locale)('DatePicker', _locale.DatePickerLoca
|
|
|
458
465
|
_this.shiftSelection(1);
|
|
459
466
|
}
|
|
460
467
|
_this.updateValue({ inputMode: inputMode });
|
|
461
|
-
};_this.state = { valueFormatted: '', selected: null, inputMode: false, focused: false, dragged: false };return _this;}var _proto = DateInput.prototype;_proto.componentDidUpdate = function componentDidUpdate(prevProps) {var _this$getProps = this.getProps(),value = _this$getProps.value,minDate = _this$getProps.minDate,maxDate = _this$getProps.maxDate;if (prevProps.value !== value || prevProps.minDate !== minDate || prevProps.maxDate !== maxDate || this.iDateMediator.isChangedLocale(this.locale)) {this.updateFromProps();}this.selectNode();};_proto.componentDidMount = function componentDidMount() {this.updateFromProps();if (this.props.autoFocus) {this.focus();}};_proto.blur = function blur() {if (this.inputLikeText) {this.inputLikeText.blur();}};_proto.focus = function focus() {if (this.inputLikeText) {this.inputLikeText.focus();}};_proto.blink = function blink() {if (this.inputLikeText) {this.inputLikeText.blink();}};_proto.render = function render() {var _this2 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this2.theme = theme;return _this2.renderMain();});};_proto.renderMain = function renderMain() {var _cx2;var _this$state2 = this.state,focused = _this$state2.focused,selected = _this$state2.selected,inputMode = _this$state2.inputMode,valueFormatted = _this$state2.valueFormatted;var showValue = Boolean(focused || valueFormatted);var _this$getProps2 = this.getProps(),width = _this$getProps2.width,size = _this$getProps2.size;return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: this.setRootNode }, this.props), /*#__PURE__*/_react.default.createElement(_InputLikeText.InputLikeText, { width: width, ref: this.inputLikeTextRef, size: size, disabled: this.props.disabled, error: this.props.error, warning: this.props.warning, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.props.onClick, onKeyDown: this.handleKeyDown, onMouseDownCapture: this.handleMouseDownCapture, onPaste: this.handlePaste, rightIcon: this.renderIcon(), onDoubleClickCapture: this.handleDoubleClick, onMouseDragStart: this.handleMouseDragStart, onMouseDragEnd: this.handleMouseDragEnd, value: this.iDateMediator.getInternalString(), inputMode: 'numeric', takeContentWidth: true }, /*#__PURE__*/_react.default.createElement("span", { className: (0, _Emotion.cx)(_DateInput.styles.value(), (_cx2 = {}, _cx2[_DateInput.styles.valueVisible()] = showValue, _cx2)) }, /*#__PURE__*/_react.default.createElement(_DateFragmentsView.DateFragmentsView, { ref: this.dateFragmentsViewRef, fragments: this.iDateMediator.getFragments(), onSelectDateComponent: this.handleSelectDateComponent, selected: selected, inputMode: inputMode }))));};return DateInput;}(_react.default.Component), _class2.__KONTUR_REACT_UI__ = 'DateInput', _class2.defaultProps = { value: '', minDate: _constants.MIN_FULLDATE, maxDate: _constants.MAX_FULLDATE, size: 'small', width: 125 }, _temp)) || _class) || _class);exports.DateInput = DateInput;
|
|
468
|
+
};_this.state = { valueFormatted: '', selected: null, inputMode: false, focused: false, dragged: false };return _this;}var _proto = DateInput.prototype;_proto.componentDidUpdate = function componentDidUpdate(prevProps) {var _this$getProps = this.getProps(),value = _this$getProps.value,minDate = _this$getProps.minDate,maxDate = _this$getProps.maxDate;if (prevProps.value !== value || prevProps.minDate !== minDate || prevProps.maxDate !== maxDate || this.iDateMediator.isChangedLocale(this.locale)) {this.updateFromProps(false);}this.selectNode();};_proto.componentDidMount = function componentDidMount() {this.updateFromProps(false);if (this.props.autoFocus) {this.focus();}};_proto.blur = function blur() {if (this.inputLikeText) {this.inputLikeText.blur();}};_proto.focus = function focus() {if (this.inputLikeText) {this.inputLikeText.focus();}};_proto.blink = function blink() {if (this.inputLikeText) {this.inputLikeText.blink();}};_proto.render = function render() {var _this2 = this;return /*#__PURE__*/_react.default.createElement(_ThemeContext.ThemeContext.Consumer, null, function (theme) {_this2.theme = theme;return _this2.renderMain();});};_proto.renderMain = function renderMain() {var _cx2;var _this$state2 = this.state,focused = _this$state2.focused,selected = _this$state2.selected,inputMode = _this$state2.inputMode,valueFormatted = _this$state2.valueFormatted;var showValue = Boolean(focused || valueFormatted);var _this$getProps2 = this.getProps(),width = _this$getProps2.width,size = _this$getProps2.size;return /*#__PURE__*/_react.default.createElement(_CommonWrapper.CommonWrapper, (0, _extends2.default)({ rootNodeRef: this.setRootNode }, this.props), /*#__PURE__*/_react.default.createElement(_InputLikeText.InputLikeText, { width: width, ref: this.inputLikeTextRef, size: size, disabled: this.props.disabled, error: this.props.error, warning: this.props.warning, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.props.onClick, onKeyDown: this.handleKeyDown, onMouseDownCapture: this.handleMouseDownCapture, onPaste: this.handlePaste, rightIcon: this.renderIcon(), onDoubleClickCapture: this.handleDoubleClick, onMouseDragStart: this.handleMouseDragStart, onMouseDragEnd: this.handleMouseDragEnd, value: this.iDateMediator.getInternalString(), inputMode: 'numeric', takeContentWidth: true }, /*#__PURE__*/_react.default.createElement("span", { className: (0, _Emotion.cx)(_DateInput.styles.value(), (_cx2 = {}, _cx2[_DateInput.styles.valueVisible()] = showValue, _cx2)) }, /*#__PURE__*/_react.default.createElement(_DateFragmentsView.DateFragmentsView, { ref: this.dateFragmentsViewRef, fragments: this.iDateMediator.getFragments(), onSelectDateComponent: this.handleSelectDateComponent, selected: selected, inputMode: inputMode }))));};return DateInput;}(_react.default.Component), _class2.__KONTUR_REACT_UI__ = 'DateInput', _class2.defaultProps = { value: '', minDate: _constants.MIN_FULLDATE, maxDate: _constants.MAX_FULLDATE, size: 'small', width: 125 }, _temp)) || _class) || _class);exports.DateInput = DateInput;
|