@steroidsjs/bootstrap 3.0.0-beta.45 → 3.0.0-beta.46
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/icons/index.js +1 -0
- package/icons/svgs/Cross_12x12.svg +4 -0
- package/modal/Modal/ModalView.js +4 -7
- package/modal/Modal/ModalView.scss +131 -93
- package/package.json +3 -3
package/icons/index.js
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M18 6.44916L6 18.4492" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M6 6.44916L18 18.4492" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
package/modal/Modal/ModalView.js
CHANGED
|
@@ -40,7 +40,8 @@ exports.__esModule = true;
|
|
|
40
40
|
var React = __importStar(require("react"));
|
|
41
41
|
var react_modal_1 = __importDefault(require("react-modal"));
|
|
42
42
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
43
|
-
var
|
|
43
|
+
var content_1 = require("@steroidsjs/core/ui/content");
|
|
44
|
+
var form_1 = require("@steroidsjs/core/ui/form");
|
|
44
45
|
function ModalView(props) {
|
|
45
46
|
var bem = (0, hooks_1.useBem)('ModalView');
|
|
46
47
|
var overrideDefaultClasses = {
|
|
@@ -51,12 +52,8 @@ function ModalView(props) {
|
|
|
51
52
|
return (React.createElement(react_modal_1["default"], __assign({}, props, { ariaHideApp: false, bodyOpenClassName: 'ModalView_body-hide-scroll', className: bem.element('body', { size: props.size }), closeTimeoutMS: props.closeTimeoutMs, isOpen: !props.isClosing, onRequestClose: props.onClose, overlayClassName: overrideDefaultClasses, shouldCloseOnEsc: props.shouldCloseOnEsc, shouldCloseOnOverlayClick: props.shouldCloseOnOverlayClick }),
|
|
52
53
|
React.createElement("div", { className: bem.element('header') },
|
|
53
54
|
React.createElement("span", { className: bem.element('title') }, props.title),
|
|
54
|
-
React.createElement(
|
|
55
|
-
e.preventDefault();
|
|
56
|
-
props.onClose();
|
|
57
|
-
}, "aria-label": __('Закрыть') })),
|
|
55
|
+
React.createElement(content_1.Icon, { name: 'Cross_12x12', className: bem.element('close'), onClick: props.onClose })),
|
|
58
56
|
React.createElement("div", { className: bem.element('content') }, props.children),
|
|
59
|
-
props.
|
|
60
|
-
React.createElement(Controls_1["default"], { className: bem.element('controls'), items: props.controls })))));
|
|
57
|
+
props.buttons && (React.createElement("div", { className: bem.element('footer') }, props.buttons.map(function (button, buttonIndex) { return (React.createElement(form_1.Button, __assign({ key: buttonIndex, size: props.size }, button))); })))));
|
|
61
58
|
}
|
|
62
59
|
exports["default"] = ModalView;
|
|
@@ -1,108 +1,146 @@
|
|
|
1
1
|
.ModalView {
|
|
2
|
+
$root: &;
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
&_overlay {
|
|
5
|
+
z-index: 100;
|
|
6
|
+
position: fixed;
|
|
7
|
+
top: 0;
|
|
8
|
+
bottom: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
|
|
12
|
+
display: flex;
|
|
13
|
+
padding: 50px;
|
|
14
|
+
|
|
15
|
+
background-color: rgba(0, 0, 0, 0.7);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__body {
|
|
19
|
+
margin: auto;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
background-color: $element-background-color;
|
|
22
|
+
color: $text-color;
|
|
23
|
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
|
|
24
|
+
|
|
25
|
+
&_size {
|
|
26
|
+
&_lg {
|
|
27
|
+
width: 540px;
|
|
28
|
+
border-radius: 16px;
|
|
29
|
+
|
|
30
|
+
font-size: $font-size-lg;
|
|
31
|
+
line-height: $line-height-lg;
|
|
32
|
+
|
|
33
|
+
#{$root}__header {
|
|
34
|
+
padding: 24px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#{$root}__content {
|
|
38
|
+
padding: 24px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#{$root}__footer {
|
|
42
|
+
padding: 24px 116px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
&_md {
|
|
46
|
+
width: 480px;
|
|
47
|
+
border-radius: $radius-large;
|
|
48
|
+
|
|
49
|
+
font-size: $font-size-base;
|
|
50
|
+
line-height: $line-height-base;
|
|
51
|
+
|
|
52
|
+
#{$root}__header {
|
|
53
|
+
padding: 21px 20px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#{$root}__content {
|
|
57
|
+
padding: 20px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#{$root}__footer {
|
|
61
|
+
padding: 20px 86px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
&_sm {
|
|
65
|
+
width: 420px;
|
|
66
|
+
border-radius: $radius-small;
|
|
67
|
+
|
|
68
|
+
font-size: $font-size-sm;
|
|
69
|
+
line-height: $line-height-sm;
|
|
70
|
+
|
|
71
|
+
#{$root}__header {
|
|
72
|
+
padding: 19px 16px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
#{$root}__content {
|
|
76
|
+
padding: 16px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
#{$root}__footer {
|
|
80
|
+
padding: 16px 56px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
31
84
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
85
|
+
|
|
86
|
+
&__header {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-flow: row nowrap;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
|
|
92
|
+
> * {
|
|
93
|
+
display: inline-block;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&__title {
|
|
98
|
+
font-size: inherit;
|
|
99
|
+
line-height: inherit;
|
|
100
|
+
font-weight: $font-weight-lg;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&__close {
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
width: 24px;
|
|
106
|
+
height: 24px;
|
|
107
|
+
|
|
108
|
+
svg {
|
|
109
|
+
path {
|
|
110
|
+
stroke: $text-color;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&__content {
|
|
116
|
+
font-size: inherit;
|
|
117
|
+
line-height: inherit;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&__footer {
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-flow: row wrap;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
align-items: center;
|
|
125
|
+
column-gap: 8px;
|
|
52
126
|
}
|
|
53
127
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
display: block;
|
|
59
|
-
position: absolute;
|
|
60
|
-
top: 50%;
|
|
61
|
-
margin-top: -8px;
|
|
62
|
-
left: 50%;
|
|
63
|
-
width: 1px;
|
|
64
|
-
height: 16px;
|
|
65
|
-
background-color: #888;
|
|
128
|
+
// Fade animation
|
|
129
|
+
&_overlay {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
transition: opacity 0.3s ease-in-out;
|
|
66
132
|
}
|
|
67
133
|
|
|
68
|
-
|
|
69
|
-
|
|
134
|
+
&_overlay-after {
|
|
135
|
+
opacity: 1;
|
|
70
136
|
}
|
|
71
137
|
|
|
72
|
-
|
|
73
|
-
|
|
138
|
+
&_overlay-before {
|
|
139
|
+
opacity: 0;
|
|
74
140
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&__content {
|
|
78
|
-
padding: 15px;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&__footer {
|
|
82
|
-
padding: 15px;
|
|
83
|
-
border-top: 1px solid #f0f0f0;
|
|
84
|
-
}
|
|
85
|
-
&__controls.ControlsView {
|
|
86
|
-
flex-direction: row-reverse;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// Fade animation
|
|
90
|
-
|
|
91
|
-
&_overlay {
|
|
92
|
-
opacity: 0;
|
|
93
|
-
transition: opacity .3s ease-in-out;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&_overlay-after {
|
|
97
|
-
opacity: 1;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&_overlay-before {
|
|
101
|
-
opacity: 0;
|
|
102
|
-
}
|
|
103
141
|
}
|
|
104
142
|
|
|
105
143
|
// Class to hide body scroll, when Modal is opened
|
|
106
144
|
.ModalView_body-hide-scroll {
|
|
107
|
-
|
|
145
|
+
overflow: hidden;
|
|
108
146
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steroidsjs/bootstrap",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.46",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-use": "^17.4.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.
|
|
38
|
+
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.26",
|
|
39
39
|
"@steroidsjs/eslint-config": "^2.1.4",
|
|
40
40
|
"@types/enzyme": "^3.10.8",
|
|
41
41
|
"@types/googlemaps": "^3.43.3",
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
"typescript": "^4.9.5"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.
|
|
56
|
+
"@steroidsjs/core": "^3.0 || >=3.0.0-beta.26"
|
|
57
57
|
}
|
|
58
58
|
}
|