@steroidsjs/bootstrap 3.0.0-beta.44 → 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/content/Alert/AlertView.js +1 -1
- package/form/Button/ButtonView.scss +3 -5
- package/form/FieldLayout/FieldLayoutView.js +1 -1
- package/form/FieldList/FieldListItemView.js +6 -4
- package/form/FieldList/FieldListItemView.scss +7 -36
- package/form/FieldList/FieldListView.js +9 -8
- package/form/FieldList/FieldListView.scss +57 -18
- package/form/FieldSet/FieldSetView.js +4 -2
- package/form/FieldSet/FieldSetView.scss +42 -0
- package/form/HtmlField/HtmlFieldView.scss +6 -3
- package/icons/index.js +9 -1
- package/icons/svgs/Cross_12x12.svg +4 -0
- package/icons/svgs/add.svg +3 -0
- package/icons/svgs/add1.svg +5 -0
- package/icons/svgs/comeback.svg +3 -0
- package/icons/svgs/edit1.svg +4 -0
- package/icons/svgs/field-list-remove.svg +4 -0
- package/icons/svgs/remove.svg +4 -0
- package/icons/svgs/show.svg +4 -0
- package/index.d.ts +3 -0
- package/index.js +3 -0
- package/index.scss +1 -0
- package/list/CheckboxColumn/CheckboxColumnView.d.ts +1 -2
- package/list/CheckboxColumn/CheckboxColumnView.js +2 -1
- package/list/Grid/GridView.js +7 -3
- package/list/Grid/GridView.scss +159 -46
- package/list/Grid/views/ContentColumnView/ContentColumnView.d.ts +3 -0
- package/list/Grid/views/ContentColumnView/ContentColumnView.js +51 -0
- package/list/Grid/views/ContentColumnView/ContentColumnView.scss +88 -0
- package/list/Grid/views/ContentColumnView/index.d.ts +2 -0
- package/list/Grid/views/ContentColumnView/index.js +7 -0
- package/list/List/ListView.js +3 -4
- package/list/List/ListView.scss +6 -1
- package/modal/Modal/ModalView.js +4 -7
- package/modal/Modal/ModalView.scss +131 -93
- package/nav/Controls/ControlsView.scss +16 -3
- package/package.json +3 -3
- package/scss/mixins/button.scss +2 -0
- package/scss/variables/common/colors.scss +15 -0
- /package/icons/svgs/{close.svg → alert-close.svg} +0 -0
|
@@ -23,7 +23,7 @@ function Alert(props) {
|
|
|
23
23
|
props.description && (react_1["default"].createElement("div", { className: bem.element('description') }, props.description))),
|
|
24
24
|
react_1["default"].createElement("div", null, props.showClose && (react_1["default"].createElement(Icon_1["default"], { className: bem.element('icon-close', {
|
|
25
25
|
large: !!props.description
|
|
26
|
-
}), name: 'close', onClick: props.onClose })))),
|
|
26
|
+
}), name: 'alert-close', onClick: props.onClose })))),
|
|
27
27
|
props.children || null))));
|
|
28
28
|
}
|
|
29
29
|
exports["default"] = Alert;
|
|
@@ -6,7 +6,7 @@ $btn-letter-spacing: 0.1em;
|
|
|
6
6
|
.ButtonView {
|
|
7
7
|
$root: &;
|
|
8
8
|
|
|
9
|
-
transition-property: color, background-color, border-color, box-shadow;
|
|
9
|
+
transition-property: color, background-color, border-color, box-shadow, stroke;
|
|
10
10
|
transition-duration: 0.15s;
|
|
11
11
|
transition-timing-function: ease-in-out;
|
|
12
12
|
|
|
@@ -61,8 +61,6 @@ $btn-letter-spacing: 0.1em;
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
64
|
&_tag {
|
|
67
65
|
&-a {
|
|
68
66
|
width: auto;
|
|
@@ -114,8 +112,8 @@ $btn-letter-spacing: 0.1em;
|
|
|
114
112
|
|
|
115
113
|
&__icon {
|
|
116
114
|
margin-right: 10px;
|
|
117
|
-
width:
|
|
118
|
-
height:
|
|
115
|
+
width: fit-content;
|
|
116
|
+
height: fit-content;
|
|
119
117
|
&_without-label {
|
|
120
118
|
margin: 0;
|
|
121
119
|
}
|
|
@@ -32,7 +32,7 @@ var hooks_1 = require("@steroidsjs/core/hooks");
|
|
|
32
32
|
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
33
33
|
function FieldLayoutView(props) {
|
|
34
34
|
var bem = (0, hooks_1.useBem)('FieldLayoutView');
|
|
35
|
-
return (React.createElement("div", { className: bem.block() },
|
|
35
|
+
return (React.createElement("div", { className: bem(bem.block(), props.className) },
|
|
36
36
|
props.label && (React.createElement("label", { htmlFor: props.id, className: bem.element('label', {
|
|
37
37
|
required: props.required,
|
|
38
38
|
size: props.size
|
|
@@ -37,13 +37,15 @@ exports.__esModule = true;
|
|
|
37
37
|
var React = __importStar(require("react"));
|
|
38
38
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
39
39
|
var form_1 = require("@steroidsjs/core/ui/form");
|
|
40
|
+
var content_1 = require("@steroidsjs/core/ui/content");
|
|
40
41
|
exports["default"] = React.memo(function (props) {
|
|
41
42
|
var bem = (0, hooks_1.useBem)('FieldListItemView');
|
|
42
|
-
return (React.createElement("tr",
|
|
43
|
-
props.items.map(function (field, index) { return (React.createElement("td", { key: index, className:
|
|
43
|
+
return (React.createElement("tr", { className: bem.block() },
|
|
44
|
+
props.items.map(function (field, index) { return (React.createElement("td", { key: index, className: field.className },
|
|
44
45
|
React.createElement(form_1.Field, __assign({}, field, { prefix: props.prefix })))); }),
|
|
45
|
-
props.showRemove && (React.createElement("td",
|
|
46
|
+
props.showRemove && (React.createElement("td", null, (!props.required || props.rowIndex > 0) && (React.createElement("button", { type: 'button', className: bem.element('remove'), onClick: function (e) {
|
|
46
47
|
e.preventDefault();
|
|
47
48
|
props.onRemove(props.rowIndex);
|
|
48
|
-
} },
|
|
49
|
+
} },
|
|
50
|
+
React.createElement(content_1.Icon, { name: 'field-list-remove' })))))));
|
|
49
51
|
});
|
|
@@ -1,41 +1,12 @@
|
|
|
1
|
-
|
|
2
1
|
.FieldListItemView {
|
|
3
|
-
|
|
4
|
-
&__table {
|
|
5
|
-
th, thead th, td {
|
|
6
|
-
border: none;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&__table-cell {
|
|
11
|
-
.form-group {
|
|
12
|
-
margin-bottom: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&_remove {
|
|
16
|
-
vertical-align: middle !important;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&__table-cell-header {
|
|
21
|
-
padding-bottom: 0 !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
2
|
&__remove {
|
|
3
|
+
background-color: transparent;
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
25
7
|
cursor: pointer;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
&__link-add {
|
|
30
|
-
margin-left: 0.75rem;
|
|
31
|
-
border-bottom: 1px dashed $link-color;
|
|
32
|
-
|
|
33
|
-
&:hover {
|
|
34
|
-
text-decoration: none;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.FileFieldView__files {
|
|
39
|
-
margin-bottom: 0;
|
|
8
|
+
border: none;
|
|
9
|
+
width: 24px;
|
|
10
|
+
height: 24px;
|
|
40
11
|
}
|
|
41
12
|
}
|
|
@@ -28,20 +28,21 @@ var hooks_1 = require("@steroidsjs/core/hooks");
|
|
|
28
28
|
var form_1 = require("@steroidsjs/core/ui/form");
|
|
29
29
|
function FieldListView(props) {
|
|
30
30
|
var bem = (0, hooks_1.useBem)('FieldListView');
|
|
31
|
-
return (React.createElement("div", { className: bem(bem.block(), props.className), style: props.style, ref: props.forwardedRef },
|
|
32
|
-
React.createElement("table", { className: bem(bem.element('table'),
|
|
31
|
+
return (React.createElement("div", { className: bem(bem.block({ hasAlternatingColors: props.hasAlternatingColors }), props.className), style: props.style, ref: props.forwardedRef },
|
|
32
|
+
React.createElement("table", { className: bem(bem.element('table'), props.tableClassName) },
|
|
33
33
|
React.createElement("thead", null,
|
|
34
34
|
React.createElement("tr", null,
|
|
35
|
-
props.items.map(function (field, rowIndex) { return (React.createElement("th", { key: rowIndex, className:
|
|
35
|
+
props.items.map(function (field, rowIndex) { return (React.createElement("th", { key: rowIndex, className: field.headerClassName }, field.title)); }),
|
|
36
36
|
props.showRemove && (
|
|
37
37
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
38
38
|
React.createElement("th", null)))),
|
|
39
39
|
React.createElement("tbody", null, props.children),
|
|
40
|
-
React.createElement("tfoot", null,
|
|
40
|
+
props.showAdd && !props.disabled && (React.createElement("tfoot", null,
|
|
41
41
|
React.createElement("tr", null,
|
|
42
|
-
React.createElement("td", { colSpan: props.items.length
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
React.createElement("td", { colSpan: props.items.length + 1 },
|
|
43
|
+
React.createElement(form_1.Button, { formId: false, color: 'primary', size: 'sm', outline: true, icon: 'add', className: bem.element('button-add'), onClick: function (e) {
|
|
44
|
+
e.preventDefault();
|
|
45
|
+
props.onAdd();
|
|
46
|
+
} }, __('Добавить')))))))));
|
|
46
47
|
}
|
|
47
48
|
exports["default"] = FieldListView;
|
|
@@ -1,35 +1,74 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--background-th: #f1f5f7;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
html[data-theme="dark"] {
|
|
6
|
+
--background-th: #414141;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
$background-th: var(--background-th);
|
|
10
|
+
|
|
1
11
|
.FieldListView {
|
|
12
|
+
table {
|
|
13
|
+
width: 100%;
|
|
14
|
+
background-color: transparent;
|
|
15
|
+
border: 1px solid $additional-gray;
|
|
16
|
+
border-collapse: separate;
|
|
17
|
+
border-radius: 10px;
|
|
18
|
+
border-spacing: 0;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
}
|
|
2
21
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
border: none;
|
|
6
|
-
}
|
|
22
|
+
th:not(:last-child), td:not(:last-child) {
|
|
23
|
+
border-right: 1px solid $additional-gray;
|
|
7
24
|
}
|
|
8
25
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
26
|
+
tr th {
|
|
27
|
+
border-bottom: 1px solid $additional-gray;
|
|
28
|
+
background-color: $background-th;
|
|
29
|
+
color: $text-color;
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
line-height: 18px;
|
|
32
|
+
}
|
|
13
33
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
34
|
+
tr:not(:last-child) td {
|
|
35
|
+
border-bottom: 1px solid $additional-gray;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
tfoot > tr > td{
|
|
39
|
+
border-top: 1px solid $additional-gray;
|
|
17
40
|
}
|
|
18
41
|
|
|
19
|
-
|
|
20
|
-
padding
|
|
42
|
+
tr td {
|
|
43
|
+
padding: 12px;
|
|
21
44
|
}
|
|
22
45
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
46
|
+
tr th {
|
|
47
|
+
text-align: left;
|
|
48
|
+
padding: 20px 12px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
tr td .CheckboxFieldView{
|
|
52
|
+
justify-content: center
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&_hasAlternatingColors {
|
|
56
|
+
tr:nth-child(even) {
|
|
57
|
+
background-color: $additional-light-gray;
|
|
58
|
+
}
|
|
26
59
|
}
|
|
27
60
|
|
|
28
61
|
&__button-add {
|
|
29
|
-
|
|
62
|
+
> span {
|
|
63
|
+
gap: 4px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
svg > * {
|
|
67
|
+
stroke: inherit;
|
|
68
|
+
}
|
|
30
69
|
}
|
|
31
70
|
|
|
32
|
-
.
|
|
71
|
+
.FieldLayoutView {
|
|
33
72
|
margin-bottom: 0;
|
|
34
73
|
}
|
|
35
74
|
}
|
|
@@ -24,9 +24,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
exports.__esModule = true;
|
|
26
26
|
var React = __importStar(require("react"));
|
|
27
|
+
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
27
28
|
function FieldSetView(props) {
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
var bem = (0, hooks_1.useBem)('FieldSetView');
|
|
30
|
+
return (React.createElement("fieldset", { className: bem(bem.block(), props.className) },
|
|
31
|
+
React.createElement("legend", { className: bem.element('legend') }, props.label),
|
|
30
32
|
props.children));
|
|
31
33
|
}
|
|
32
34
|
exports["default"] = FieldSetView;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--legend-color: #152536;
|
|
3
|
+
--legend-background-color: #ffffff;
|
|
4
|
+
--fieldset-border-color: #E6E6E6;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
html[data-theme="dark"] {
|
|
8
|
+
--legend-color: #ffffff;
|
|
9
|
+
--legend-background-color: #414141;
|
|
10
|
+
--fieldset-border-color: #595959;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
$legend-color: var(--legend-color);
|
|
14
|
+
$legend-background-color: var(--legend-background-color);
|
|
15
|
+
$fieldset-border-color: var(--fieldset-border-color);
|
|
16
|
+
|
|
17
|
+
.FieldSetView{
|
|
18
|
+
border: 1px solid $fieldset-border-color;
|
|
19
|
+
border-radius: 8px;
|
|
20
|
+
|
|
21
|
+
&__legend {
|
|
22
|
+
background-color: $legend-background-color;
|
|
23
|
+
color: $legend-color;
|
|
24
|
+
|
|
25
|
+
padding: 8px;
|
|
26
|
+
margin-left: 16px;
|
|
27
|
+
|
|
28
|
+
line-height: 32px;
|
|
29
|
+
font-weight: 700;
|
|
30
|
+
font-size: 24px;
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.FieldLayoutView {
|
|
35
|
+
padding: 0px 24px 24px 24px;
|
|
36
|
+
margin-bottom: 0px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.FieldLayoutView + .FieldLayoutView {
|
|
40
|
+
padding-top: 0px;
|
|
41
|
+
}
|
|
42
|
+
}
|
package/icons/index.js
CHANGED
|
@@ -257,7 +257,7 @@ exports["default"] = (function (customIcons) {
|
|
|
257
257
|
'info',
|
|
258
258
|
'warning',
|
|
259
259
|
'error',
|
|
260
|
-
'close',
|
|
260
|
+
'alert-close',
|
|
261
261
|
'default',
|
|
262
262
|
'badge-close',
|
|
263
263
|
'loader',
|
|
@@ -282,7 +282,15 @@ exports["default"] = (function (customIcons) {
|
|
|
282
282
|
'paste',
|
|
283
283
|
'pin',
|
|
284
284
|
'trash',
|
|
285
|
+
'comeback',
|
|
286
|
+
'remove',
|
|
287
|
+
'show',
|
|
288
|
+
'add1',
|
|
289
|
+
'edit1',
|
|
290
|
+
'field-list-remove',
|
|
291
|
+
'add',
|
|
285
292
|
'file-loading',
|
|
293
|
+
'Cross_12x12',
|
|
286
294
|
];
|
|
287
295
|
steroidsIcons.forEach(function (iconName) {
|
|
288
296
|
icons[iconName] = require("./svgs/".concat(iconName, ".svg"));
|
|
@@ -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>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M3.85156 11.5815C3.85156 9.68173 3.85262 8.30721 3.99355 7.25902C4.13254 6.22521 4.39929 5.58401 4.87669 5.10661C5.35409 4.62921 5.99529 4.36246 7.0291 4.22347C8.07729 4.08254 9.45181 4.08148 11.3516 4.08148H13.3516C15.2513 4.08148 16.6258 4.08254 17.674 4.22347C18.7078 4.36246 19.349 4.62921 19.8264 5.10661C20.3038 5.58401 20.5706 6.22521 20.7096 7.25902C20.8505 8.30721 20.8516 9.68173 20.8516 11.5815V13.5815C20.8516 15.4812 20.8505 16.8558 20.7096 17.9039C20.5706 18.9378 20.3038 19.579 19.8264 20.0564C19.349 20.5338 18.7078 20.8005 17.674 20.9395C16.6258 21.0804 15.2513 21.0815 13.3516 21.0815H11.3516C9.45181 21.0815 8.07729 21.0804 7.0291 20.9395C5.99529 20.8005 5.35409 20.5338 4.87669 20.0564C4.39929 19.579 4.13254 18.9378 3.99355 17.9039C3.85262 16.8558 3.85156 15.4812 3.85156 13.5815V11.5815Z" stroke="#323232"/>
|
|
3
|
+
<path d="M12.3516 8.58148L12.3516 16.5815" stroke="#323232" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path d="M16.3516 12.5815L8.35156 12.5815" stroke="#323232" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6.28127 19.8645L6.28128 19.8645L6.30306 19.8591L6.30307 19.8591L8.9354 19.201C8.95052 19.1972 8.96552 19.1935 8.98041 19.1898C9.20315 19.1343 9.40033 19.0852 9.57936 18.9839C9.75839 18.8825 9.90192 18.7387 10.064 18.5762C10.0749 18.5654 10.0858 18.5544 10.0968 18.5434L17.2909 11.3493L17.2909 11.3493L17.3142 11.326C17.6276 11.0126 17.8977 10.7426 18.0849 10.4973C18.2855 10.2343 18.4373 9.94193 18.4373 9.58154C18.4373 9.22116 18.2855 8.92873 18.0849 8.66582C17.8977 8.42048 17.6276 8.15045 17.3142 7.83704L17.2909 7.81378L16.9373 8.16733L17.2909 7.81377L17.1193 7.6422L17.0961 7.61893C16.7827 7.30549 16.5126 7.03543 16.2673 6.84825C16.0044 6.64765 15.7119 6.49576 15.3516 6.49576C14.9912 6.49576 14.6988 6.64764 14.4358 6.84825C14.1905 7.03543 13.9205 7.30549 13.6071 7.61894L13.5838 7.6422L6.38972 14.8363C6.3787 14.8473 6.36775 14.8582 6.35689 14.8691C6.19442 15.0312 6.05059 15.1747 5.94923 15.3537C5.84786 15.5328 5.79879 15.7299 5.74336 15.9527C5.73965 15.9676 5.73591 15.9826 5.73213 15.9977L5.0686 18.6518C5.06639 18.6607 5.06416 18.6696 5.06192 18.6785C5.02268 18.8352 4.98077 19.0025 4.96702 19.1431C4.95189 19.2978 4.95541 19.5589 5.16482 19.7683C5.37423 19.9777 5.63529 19.9812 5.79002 19.9661C5.93055 19.9523 6.09789 19.9104 6.25457 19.8712C6.26351 19.8689 6.27241 19.8667 6.28127 19.8645Z" stroke="#323232"/>
|
|
3
|
+
<path d="M12.8516 8.08154L16.8516 12.0815" stroke="#323232"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect x="3.35156" y="3" width="18" height="18" rx="9" fill="#323232"/>
|
|
3
|
+
<path d="M9.35156 9L15.3516 14.9784M9.35156 15L15.3516 9.02161" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<circle cx="12.3516" cy="12.5815" r="3.5" stroke="#323232"/>
|
|
3
|
+
<path d="M20.5396 11.5158C20.9278 11.987 21.1218 12.2227 21.1218 12.5815C21.1218 12.9403 20.9278 13.1759 20.5396 13.6472C19.1195 15.3713 15.9873 18.5815 12.3516 18.5815C8.71583 18.5815 5.58362 15.3713 4.16353 13.6472C3.77537 13.1759 3.58129 12.9403 3.58129 12.5815C3.58129 12.2227 3.77537 11.987 4.16353 11.5158C5.58362 9.79162 8.71583 6.58148 12.3516 6.58148C15.9873 6.58148 19.1195 9.79162 20.5396 11.5158Z" stroke="#323232"/>
|
|
4
|
+
</svg>
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -173,6 +173,9 @@ exports["default"] = {
|
|
|
173
173
|
'list.GridView': {
|
|
174
174
|
lazy: function () { return require('./list/Grid/GridView')["default"]; }
|
|
175
175
|
},
|
|
176
|
+
'list.ContentColumnView': {
|
|
177
|
+
lazy: function () { return require('./list/Grid/views/ContentColumnView/ContentColumnView')["default"]; }
|
|
178
|
+
},
|
|
176
179
|
'list.ListView': {
|
|
177
180
|
lazy: function () { return require('./list/List/ListView')["default"]; }
|
|
178
181
|
},
|
package/index.scss
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
@import './form/FieldList/FieldListItemView';
|
|
34
34
|
@import './form/FileField/FileFieldView';
|
|
35
35
|
@import './form/FileField/FileFieldItemView';
|
|
36
|
+
@import './form/FieldSet/FieldSetView';
|
|
36
37
|
@import './form/Form/FormView';
|
|
37
38
|
@import './form/HtmlField/HtmlFieldView';
|
|
38
39
|
@import './form/InputField/InputFieldView';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { IBemHocOutput } from '@steroidsjs/core/hoc/bem';
|
|
2
1
|
import { ICheckboxColumnViewProps } from '@steroidsjs/core/ui/list/CheckboxColumn/CheckboxColumn';
|
|
3
|
-
export default function CheckboxColumnView(props: ICheckboxColumnViewProps
|
|
2
|
+
export default function CheckboxColumnView(props: ICheckboxColumnViewProps): JSX.Element;
|
|
@@ -40,10 +40,11 @@ exports.__esModule = true;
|
|
|
40
40
|
var React = __importStar(require("react"));
|
|
41
41
|
var CheckboxField_1 = __importDefault(require("@steroidsjs/core/ui/form/CheckboxField"));
|
|
42
42
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
43
|
+
var get_1 = __importDefault(require("lodash-es/get"));
|
|
43
44
|
function CheckboxColumnView(props) {
|
|
44
45
|
var bem = (0, hooks_1.useBem)('CheckboxColumnView');
|
|
45
46
|
var CheckboxFieldInternal = CheckboxField_1["default"].WrappedComponent;
|
|
46
47
|
return (React.createElement("div", { className: bem.block() },
|
|
47
|
-
React.createElement(CheckboxFieldInternal, __assign({}, props.fieldProps, { input: props.input }))));
|
|
48
|
+
React.createElement(CheckboxFieldInternal, __assign({}, props.fieldProps, { input: props.input, size: props.size, label: (0, get_1["default"])(props.item, props.attribute) }))));
|
|
48
49
|
}
|
|
49
50
|
exports["default"] = CheckboxColumnView;
|
package/list/Grid/GridView.js
CHANGED
|
@@ -73,10 +73,14 @@ function GridView(props) {
|
|
|
73
73
|
} }));
|
|
74
74
|
}, [bem, props]);
|
|
75
75
|
var emptyContent = (0, react_1.useMemo)(function () { return props.renderEmpty(); }, [props]);
|
|
76
|
-
return props.renderList(React.createElement("div", { className: bem(bem.block({
|
|
76
|
+
return props.renderList(React.createElement("div", { className: bem(bem.block({
|
|
77
|
+
loading: props.isLoading || ((_a = props.list) === null || _a === void 0 ? void 0 : _a.isLoading),
|
|
78
|
+
size: props.size,
|
|
79
|
+
alternatingColors: props.hasAlternatingColors
|
|
80
|
+
}), props.className) },
|
|
77
81
|
props.renderSearchForm(),
|
|
78
82
|
props.renderPaginationSize(),
|
|
79
|
-
React.createElement("table", { className: 'table
|
|
83
|
+
React.createElement("table", { className: bem.element('table') },
|
|
80
84
|
React.createElement("thead", null,
|
|
81
85
|
React.createElement("tr", null, props.columns.map(function (column, columnIndex) { return (React.createElement("th", { key: columnIndex, className: column.headerClassName },
|
|
82
86
|
column.label,
|
|
@@ -86,7 +90,7 @@ function GridView(props) {
|
|
|
86
90
|
renderSortButton(column.attribute, 'desc'))))); })),
|
|
87
91
|
renderInsideSearchForm()),
|
|
88
92
|
React.createElement("tbody", null,
|
|
89
|
-
props.items && props.items.map(function (item, rowIndex) { return (React.createElement("tr", { key: item[props.primaryKey] || rowIndex }, props.columns.map(function (column, columnIndex) { return (React.createElement("td", { key: columnIndex, className: column.className, "data-label": (0, isString_1["default"])(column.label) ? column.label : null }, props.renderValue(item, column))); }))); }),
|
|
93
|
+
props.items && props.items.map(function (item, rowIndex) { return (React.createElement("tr", { key: item[props.primaryKey] || rowIndex }, props.columns.map(function (column, columnIndex) { return (React.createElement("td", { key: columnIndex, className: bem(bem.element('column'), column.className), "data-label": (0, isString_1["default"])(column.label) ? column.label : null }, props.renderValue(item, column))); }))); }),
|
|
90
94
|
emptyContent && (React.createElement("tr", null,
|
|
91
95
|
React.createElement("td", { colSpan: props.columns.length }, emptyContent))))),
|
|
92
96
|
props.renderPagination()));
|
package/list/Grid/GridView.scss
CHANGED
|
@@ -1,51 +1,164 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--grid-header-background-color: #f1f5f7;
|
|
3
|
+
--grid-border-color: #e6e6e6;
|
|
4
|
+
--grid-alternating-color: #F8F8F8;
|
|
5
|
+
--grid-td-background-color: #FFFFFF;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
html[data-theme="dark"] {
|
|
9
|
+
--grid-header-background-color: #414141;
|
|
10
|
+
--grid-border-color: #595959;
|
|
11
|
+
--grid-alternating-color: #4A4B53;
|
|
12
|
+
--grid-td-background-color: #4E4F57;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$grid-header-background-color: var(--grid-header-background-color);
|
|
16
|
+
$grid-border-color: var(--grid-border-color);
|
|
17
|
+
$grid-alternating-color: var(--grid-alternating-color);
|
|
18
|
+
$grid-td-background-color: var(--grid-td-background-color);
|
|
19
|
+
|
|
1
20
|
.GridView {
|
|
2
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
21
|
+
$root: &;
|
|
22
|
+
|
|
23
|
+
text-align: left;
|
|
24
|
+
|
|
25
|
+
width: 100%;
|
|
26
|
+
|
|
27
|
+
&__table {
|
|
28
|
+
width: 100%;
|
|
29
|
+
border: none;
|
|
30
|
+
border-spacing: 0;
|
|
31
|
+
border-collapse: separate;
|
|
32
|
+
border: 1px solid $grid-border-color;
|
|
33
|
+
border-radius: $radius-large;
|
|
34
|
+
margin: 24px 0;
|
|
35
|
+
|
|
36
|
+
th,
|
|
37
|
+
td {
|
|
38
|
+
color: $text-color;
|
|
39
|
+
background-color: $grid-td-background-color;
|
|
40
|
+
}
|
|
41
|
+
th {
|
|
42
|
+
font-weight: $font-weight-lg;
|
|
43
|
+
background-color: $grid-header-background-color;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
th:not(:last-child),
|
|
47
|
+
td:not(:last-child) {
|
|
48
|
+
border-right: 1px solid $grid-border-color;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
thead > tr > th,
|
|
52
|
+
tbody > tr:not(:last-child) > td,
|
|
53
|
+
tr:not(:last-child) > td,
|
|
54
|
+
thead:not(:last-child),
|
|
55
|
+
tbody:not(:last-child) {
|
|
56
|
+
border-bottom: 1px solid $grid-border-color;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
thead > tr > th {
|
|
60
|
+
&:first-child {
|
|
61
|
+
border-top-left-radius: $radius-large;
|
|
62
|
+
}
|
|
63
|
+
&:last-child {
|
|
64
|
+
border-top-right-radius: $radius-large;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
tbody > tr:last-child > td {
|
|
69
|
+
&:first-child {
|
|
70
|
+
border-bottom-left-radius: $radius-large;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:last-child {
|
|
74
|
+
border-bottom-right-radius: $radius-large;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&_alternatingColors{
|
|
80
|
+
#{$root}__table tbody tr:nth-child(even) td {
|
|
81
|
+
background-color: $grid-alternating-color;
|
|
82
|
+
}
|
|
44
83
|
}
|
|
45
84
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
85
|
+
&_size {
|
|
86
|
+
&_lg {
|
|
87
|
+
#{$root}__table {
|
|
88
|
+
font-size: $font-size-lg;
|
|
89
|
+
line-height: $line-height-lg;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
th,
|
|
93
|
+
td {
|
|
94
|
+
padding: 24px 16px;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&_md {
|
|
99
|
+
#{$root}__table {
|
|
100
|
+
font-size: $font-size-base;
|
|
101
|
+
line-height: $line-height-base;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
th,
|
|
105
|
+
td {
|
|
106
|
+
padding: 21px 12px;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&_sm {
|
|
111
|
+
#{$root}__table {
|
|
112
|
+
font-size: $font-size-sm;
|
|
113
|
+
line-height: $line-height-sm;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
th,
|
|
117
|
+
td {
|
|
118
|
+
padding: 16px 8px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
&__column {
|
|
125
|
+
|
|
126
|
+
.IconView {
|
|
127
|
+
display: inline-block;
|
|
128
|
+
width: 24px;
|
|
129
|
+
height: 24px;
|
|
130
|
+
|
|
131
|
+
svg {
|
|
132
|
+
width: 100%;
|
|
133
|
+
height: 100%;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&_hasIcon {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-flow: row nowrap;
|
|
140
|
+
align-items: center;
|
|
141
|
+
|
|
142
|
+
.IconView {
|
|
143
|
+
margin-left: 8px;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&-left {
|
|
147
|
+
span {
|
|
148
|
+
&:nth-child(1) {
|
|
149
|
+
order: 2;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:nth-child(2) {
|
|
153
|
+
order: 1;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.IconView {
|
|
158
|
+
margin-left: 0;
|
|
159
|
+
margin-right: 8px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
49
163
|
}
|
|
50
|
-
}
|
|
51
164
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
exports.__esModule = true;
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var useBem_1 = __importDefault(require("@steroidsjs/core/hooks/useBem"));
|
|
19
|
+
var Format_1 = __importDefault(require("@steroidsjs/core/ui/format/Format"));
|
|
20
|
+
var get_1 = __importDefault(require("lodash-es/get"));
|
|
21
|
+
var nav_1 = require("@steroidsjs/core/ui/nav");
|
|
22
|
+
var content_1 = require("@steroidsjs/core/ui/content");
|
|
23
|
+
require("./ContentColumnView.scss");
|
|
24
|
+
function ContentColumnView(props) {
|
|
25
|
+
var _a, _b, _c, _d, _e;
|
|
26
|
+
var bem = (0, useBem_1["default"])('ContentColumnView');
|
|
27
|
+
var hasLink = !!((_a = props.link) === null || _a === void 0 ? void 0 : _a.attribute);
|
|
28
|
+
var hasPicture = !!((_b = props.picture) === null || _b === void 0 ? void 0 : _b.attribute);
|
|
29
|
+
var hasIcon = !!((_c = props.icon) === null || _c === void 0 ? void 0 : _c.attribute);
|
|
30
|
+
var hasSubtitle = !!props.subtitleAttribute;
|
|
31
|
+
var hasTextData = !!props.attribute || !!props.subtitleAttribute || hasLink;
|
|
32
|
+
var renderFormat = function () { return (react_1["default"].createElement(Format_1["default"], __assign({}, props, (props.formatter || {}), { attribute: hasLink ? props.link.attribute : props.attribute }))); };
|
|
33
|
+
var renderValue = function () {
|
|
34
|
+
var _a;
|
|
35
|
+
if (hasLink) {
|
|
36
|
+
return (react_1["default"].createElement(nav_1.Link, __assign({}, props.link.linkProps, { url: (0, get_1["default"])(props.item, (_a = props.link) === null || _a === void 0 ? void 0 : _a.urlAttribute), className: bem.element('link') }), renderFormat()));
|
|
37
|
+
}
|
|
38
|
+
return (react_1["default"].createElement("span", { className: bem.element('value') }, renderFormat()));
|
|
39
|
+
};
|
|
40
|
+
return (react_1["default"].createElement("div", { className: bem(bem.block({
|
|
41
|
+
size: props.size,
|
|
42
|
+
isLeft: ((_d = props.picture) === null || _d === void 0 ? void 0 : _d.isLeft) || ((_e = props.icon) === null || _e === void 0 ? void 0 : _e.isLeft)
|
|
43
|
+
})) },
|
|
44
|
+
hasTextData && (react_1["default"].createElement("div", { className: bem.element('data') },
|
|
45
|
+
renderValue(),
|
|
46
|
+
hasSubtitle && react_1["default"].createElement("span", { className: bem.element('subtitle') }, (0, get_1["default"])(props.item, props.subtitleAttribute)))),
|
|
47
|
+
hasPicture && (react_1["default"].createElement("span", { className: bem.element('picture') },
|
|
48
|
+
react_1["default"].createElement("img", { src: (0, get_1["default"])(props.item, props.picture.attribute), alt: "cell element" }))),
|
|
49
|
+
hasIcon && (react_1["default"].createElement(content_1.Icon, { name: (0, get_1["default"])(props.item, props.icon.attribute), className: bem.element('icon') }))));
|
|
50
|
+
}
|
|
51
|
+
exports["default"] = ContentColumnView;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
@import "style/variables";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--grid-icon-color: #323232;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
html[data-theme="dark"] {
|
|
8
|
+
--grid-icon-color: #ffffff;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
$grid-icon-color: var(--grid-icon-color);
|
|
12
|
+
|
|
13
|
+
.ContentColumnView {
|
|
14
|
+
$root: &;
|
|
15
|
+
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-flow: row nowrap;
|
|
18
|
+
align-items: center;
|
|
19
|
+
column-gap: 8px;
|
|
20
|
+
|
|
21
|
+
> * {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__data {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-flow: column;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&__subtitle {
|
|
31
|
+
color: $placeholder-color;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__picture {
|
|
35
|
+
width: 24px;
|
|
36
|
+
height: 24px;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
|
|
40
|
+
img {
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
object-fit: cover;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&__icon {
|
|
48
|
+
svg {
|
|
49
|
+
> * {
|
|
50
|
+
stroke: $grid-icon-color;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&_size {
|
|
56
|
+
&_lg {
|
|
57
|
+
#{$root}__subtitle {
|
|
58
|
+
font-size: $font-size-base;
|
|
59
|
+
line-height: $line-height-base;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#{$root}__avatar-wrapper {
|
|
63
|
+
width: 56px;
|
|
64
|
+
height: 56px;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&_md {
|
|
69
|
+
#{$root}__subtitle {
|
|
70
|
+
font-size: $font-size-sm;
|
|
71
|
+
line-height: $line-height-sm;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&_sm {
|
|
76
|
+
#{$root}__subtitle {
|
|
77
|
+
font-size: $font-size-xs;
|
|
78
|
+
line-height: $line-height-xs;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&_isLeft {
|
|
84
|
+
#{$root}__data {
|
|
85
|
+
order: 2;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
var ContentColumnView_1 = __importDefault(require("./ContentColumnView"));
|
|
7
|
+
exports["default"] = ContentColumnView_1["default"];
|
package/list/List/ListView.js
CHANGED
|
@@ -36,10 +36,9 @@ function ListView(props) {
|
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
return (React.createElement("div", { className: bem.element('pagination') },
|
|
39
|
-
React.createElement("div",
|
|
40
|
-
React.createElement("div", { className: bem.element('pagination-sizes') },
|
|
41
|
-
|
|
42
|
-
paginationSize)));
|
|
39
|
+
pagination && (React.createElement("div", { className: bem.element('pagination-button') }, pagination)),
|
|
40
|
+
paginationSize && (React.createElement("div", { className: bem.element('pagination-sizes') }, paginationSize)),
|
|
41
|
+
layout && (React.createElement("div", { className: bem.element('pagination-layout') }, layout))));
|
|
43
42
|
};
|
|
44
43
|
return props.renderList(React.createElement("div", { className: bem(bem.block({ loading: props.isLoading || props.list.isLoading }), props.className) },
|
|
45
44
|
props.renderSearchForm(),
|
package/list/List/ListView.scss
CHANGED
|
@@ -2,17 +2,22 @@
|
|
|
2
2
|
&__pagination {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
5
6
|
flex-flow: row nowrap;
|
|
6
7
|
margin-bottom: 3px;
|
|
7
8
|
|
|
8
9
|
&-sizes {
|
|
9
|
-
width:
|
|
10
|
+
width: fit-content;
|
|
10
11
|
|
|
11
12
|
.PaginationSizeView__sizes {
|
|
12
13
|
display: flex;
|
|
13
14
|
flex-flow: row nowrap;
|
|
14
15
|
}
|
|
15
16
|
}
|
|
17
|
+
|
|
18
|
+
&-button {
|
|
19
|
+
margin: 0 auto;
|
|
20
|
+
}
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
&__content {
|
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
|
}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
.ControlsView {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-flow: row;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
|
|
6
|
+
width: 24px;
|
|
7
|
+
height: 24px;
|
|
8
|
+
|
|
9
|
+
a {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.ButtonView {
|
|
16
|
+
border: none;
|
|
17
|
+
}
|
|
5
18
|
}
|
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
|
}
|
package/scss/mixins/button.scss
CHANGED
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
@mixin button-outline-theme($colorMap, $colorName, $root) {
|
|
51
51
|
background-color: transparent;
|
|
52
52
|
color: map-get($colorMap, color);
|
|
53
|
+
stroke: map-get($colorMap, color);
|
|
53
54
|
border: 1px solid map-get($colorMap, color);
|
|
54
55
|
|
|
55
56
|
@include svg-color(map-get($colorMap, text-color));
|
|
@@ -67,6 +68,7 @@
|
|
|
67
68
|
@include svg-color(map-get($colorMap, color-light));
|
|
68
69
|
color: map-get($colorMap, color-light);
|
|
69
70
|
border-color: map-get($colorMap, color-light);
|
|
71
|
+
stroke: map-get($colorMap, color-light);
|
|
70
72
|
box-shadow: none;
|
|
71
73
|
}
|
|
72
74
|
|
|
@@ -32,6 +32,11 @@
|
|
|
32
32
|
--placeholder-disabled-color: rgba(0, 0, 0, 0.3);
|
|
33
33
|
--background-disabled-color: #f1f5f7;
|
|
34
34
|
--element-background-color: #FFFFFF;
|
|
35
|
+
--additional-gray-dark: #6F6B76;
|
|
36
|
+
--additional-gray: #E6E6E6;
|
|
37
|
+
--additional-light-gray: #F8F8F8;
|
|
38
|
+
--additional-light: #9088A1;
|
|
39
|
+
--additional-light-blue: #F9FCFF;
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
html[data-theme="dark"] {
|
|
@@ -68,6 +73,11 @@ html[data-theme="dark"] {
|
|
|
68
73
|
--placeholder-disabled-color: rgba(255, 255, 255, 0.1);
|
|
69
74
|
--background-disabled-color: #5b5c6b;
|
|
70
75
|
--element-background-color: #414141;
|
|
76
|
+
--additional-gray-dark: #6B6477;
|
|
77
|
+
--additional-gray: #595959;
|
|
78
|
+
--additional-light-gray: #4A4B53;
|
|
79
|
+
--additional-light: #B7AFC7;
|
|
80
|
+
--additional-light-blue: #DAEAF6;
|
|
71
81
|
}
|
|
72
82
|
|
|
73
83
|
/*
|
|
@@ -107,6 +117,11 @@ $placeholder-color: var(--placeholder-color);
|
|
|
107
117
|
$placeholder-disabled-color: var(--placeholder-disabled-color);
|
|
108
118
|
$background-disabled-color: var(--background-disabled-color);
|
|
109
119
|
$element-background-color: var(--element-background-color);
|
|
120
|
+
$additional-gray-dark: var(--additional-gray-dark);
|
|
121
|
+
$additional-gray: var(--additional-gray);
|
|
122
|
+
$additional-light-gray: var(--additional-light-gray);
|
|
123
|
+
$additional-light: var(--additional-light);
|
|
124
|
+
$additional-light-blue: var(--additional-light-blue);
|
|
110
125
|
|
|
111
126
|
/*
|
|
112
127
|
* Common colors
|
|
File without changes
|