@steroidsjs/bootstrap 2.1.0-beta.2 → 2.1.0-beta.7
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/README.md +7 -0
- package/content/Alert/AlertView.d.ts +3 -0
- package/content/Alert/AlertView.js +33 -0
- package/content/Alert/AlertView.scss +120 -0
- package/content/Avatar/AvatarGroupView.d.ts +0 -1
- package/content/Avatar/AvatarGroupView.js +20 -21
- package/content/Avatar/AvatarGroupView.scss +5 -1
- package/content/Avatar/AvatarView.d.ts +0 -1
- package/content/Avatar/AvatarView.js +14 -47
- package/content/Avatar/AvatarView.scss +93 -34
- package/content/Calendar/CalendarView.d.ts +0 -1
- package/content/Calendar/CalendarView.js +0 -1
- package/content/Calendar/CalendarView.scss +24 -24
- package/content/Calendar/CaptionElement.d.ts +0 -1
- package/content/Calendar/CaptionElement.js +2 -3
- package/content/Calendar/CaptionElement.scss +22 -17
- package/content/Card/CardView.d.ts +0 -1
- package/content/Card/CardView.js +15 -12
- package/content/Card/CardView.scss +138 -26
- package/content/Collapse/CollapseItemView.d.ts +3 -0
- package/content/Collapse/CollapseItemView.js +60 -0
- package/content/Collapse/CollapseItemView.scss +88 -0
- package/content/Collapse/CollapseView.d.ts +3 -0
- package/content/Collapse/CollapseView.js +28 -0
- package/content/Collapse/CollapseView.scss +15 -0
- package/content/Detail/DetailView.d.ts +3 -0
- package/content/Detail/DetailView.js +37 -0
- package/content/Detail/DetailView.scss +66 -0
- package/content/DropDown/DropDownView.scss +1 -2
- package/form/AutoCompleteField/AutoCompleteFieldView.d.ts +1 -0
- package/form/AutoCompleteField/AutoCompleteFieldView.js +1 -0
- package/form/AutoCompleteField/AutoCompleteFieldView.scss +31 -20
- package/form/Button/ButtonView.js +15 -11
- package/form/Button/ButtonView.scss +63 -2
- package/form/CheckboxField/CheckboxFieldView.js +1 -1
- package/form/CheckboxField/CheckboxFieldView.scss +40 -6
- package/form/CheckboxListField/CheckboxListFieldView.js +4 -5
- package/form/CheckboxListField/CheckboxListFieldView.scss +45 -1
- package/form/DateField/DateFieldView.d.ts +0 -1
- package/form/DateField/DateFieldView.js +1 -1
- package/form/DateField/DateFieldView.scss +8 -9
- package/form/DateRangeField/DateRangeFieldView.d.ts +0 -1
- package/form/DateRangeField/DateRangeFieldView.js +0 -1
- package/form/DateRangeField/DateRangeFieldView.scss +8 -9
- package/form/DateTimeField/DateTimeFieldView.js +4 -1
- package/form/DateTimeField/DateTimeFieldView.scss +11 -11
- package/form/DateTimeRangeField/DateTimeRangeFieldView.d.ts +0 -1
- package/form/DateTimeRangeField/DateTimeRangeFieldView.js +0 -1
- package/form/DateTimeRangeField/DateTimeRangeFieldView.scss +10 -10
- package/form/DropDownField/DropDownFieldView.js +1 -1
- package/form/DropDownField/DropDownFieldView.scss +28 -18
- package/form/FileField/FileFieldView.js +1 -1
- package/form/Form/FormView.js +4 -1
- package/form/Form/FormView.scss +16 -2
- package/form/HtmlField/HtmlFieldView.d.ts +4 -0
- package/form/HtmlField/HtmlFieldView.js +37 -0
- package/form/ImageField/ImageFieldModalView.d.ts +4 -0
- package/form/ImageField/ImageFieldModalView.js +55 -0
- package/form/ImageField/ImageFieldModalView.scss +7 -0
- package/form/ImageField/ImageFieldView.d.ts +3 -0
- package/form/ImageField/ImageFieldView.js +43 -0
- package/form/ImageField/ImageFieldView.scss +108 -0
- package/form/InputField/InputFieldView.js +8 -3
- package/form/InputField/InputFieldView.scss +77 -14
- package/form/NumberField/NumberFieldView.js +2 -2
- package/form/NumberField/NumberFieldView.scss +30 -12
- package/form/PasswordField/PasswordFieldView.scss +5 -5
- package/form/RateField/RateFieldView.d.ts +0 -1
- package/form/RateField/RateFieldView.js +0 -1
- package/form/RateField/RateFieldView.scss +5 -5
- package/form/SliderField/SliderFieldView.js +29 -9
- package/form/SliderField/SliderFieldView.scss +39 -20
- package/form/TextField/TextFieldView.scss +3 -2
- package/form/TimeField/TimeFieldView.d.ts +0 -1
- package/form/TimeField/TimeFieldView.js +0 -1
- package/form/TimeField/TimeFieldView.scss +8 -9
- package/form/TimeField/TimePanelView.d.ts +0 -1
- package/form/TimeField/TimePanelView.js +0 -1
- package/form/TimeField/TimePanelView.scss +11 -11
- package/icon/Icon/IconView.d.ts +0 -1
- package/icon/Icon/IconView.js +0 -1
- package/icon/Icon/IconView.scss +6 -6
- package/icon/fontawesome.js +5 -1
- package/index.d.ts +33 -0
- package/index.js +217 -67
- package/index.scss +22 -2
- package/layout/ProgressBar/CircleProgressBarView.d.ts +4 -0
- package/layout/ProgressBar/CircleProgressBarView.js +40 -0
- package/layout/ProgressBar/CircleProgressBarView.scss +150 -0
- package/layout/ProgressBar/LineProgressBarView.d.ts +4 -0
- package/layout/ProgressBar/LineProgressBarView.js +31 -0
- package/layout/ProgressBar/LineProgressBarView.scss +115 -0
- package/layout/Skeleton/SkeletonView.d.ts +3 -0
- package/layout/Skeleton/SkeletonView.js +31 -0
- package/layout/Skeleton/SkeletonView.scss +71 -0
- package/list/List/ListView.js +3 -0
- package/list/Steps/StepItemView.d.ts +3 -0
- package/list/Steps/StepItemView.js +41 -0
- package/list/Steps/StepItemView.scss +144 -0
- package/list/Steps/StepsView.d.ts +3 -0
- package/list/Steps/StepsView.js +28 -0
- package/list/Steps/StepsView.scss +16 -0
- package/modal/Modal/ModalView.js +13 -14
- package/modal/Modal/ModalView.scss +34 -30
- package/nav/Breadcrubms/BreadcrumbsView.js +4 -4
- package/nav/Breadcrubms/BreadcrumbsView.scss +14 -0
- package/nav/Controls/ControlsView.scss +1 -1
- package/nav/Nav/NavButtonView.js +1 -1
- package/nav/Nav/NavIconView.js +1 -1
- package/package.json +4 -3
- package/scss/mixins/button.scss +33 -0
- package/scss/mixins/card.scss +26 -0
- package/scss/mixins/index.scss +2 -0
- package/scss/variables/colors.scss +74 -0
- package/scss/variables/components/alert.scss +9 -0
- package/scss/variables/components/avatar.scss +17 -0
- package/scss/variables/components/button.scss +14 -0
- package/scss/variables/components/calendar.scss +15 -0
- package/scss/variables/components/card.scss +20 -0
- package/scss/variables/components/icon.scss +3 -0
- package/scss/variables/components/input.scss +11 -0
- package/scss/variables/components/ratefield.scss +2 -0
- package/scss/variables/index.scss +9 -0
- package/list/Accordion/AccordionView.scss +0 -10
- package/list/Detail/DetailView.scss +0 -5
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
.LineProgressBarView{
|
|
2
|
+
$root: &;
|
|
3
|
+
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
font-weight: bolder;
|
|
7
|
+
|
|
8
|
+
&_size {
|
|
9
|
+
&_small {
|
|
10
|
+
font-size: 20px;
|
|
11
|
+
|
|
12
|
+
#{$root}__emptyLine{
|
|
13
|
+
width: 500px;
|
|
14
|
+
height: 8px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
&_medium {
|
|
18
|
+
font-size: 24px;
|
|
19
|
+
|
|
20
|
+
#{$root}__emptyLine{
|
|
21
|
+
width: 750px;
|
|
22
|
+
height: 12px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
&_large {
|
|
26
|
+
font-size: 24px;
|
|
27
|
+
|
|
28
|
+
#{$root}__emptyLine{
|
|
29
|
+
width: 1000px;
|
|
30
|
+
height: 16px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&_status{
|
|
36
|
+
&_success{
|
|
37
|
+
#{$root}__progressLine{
|
|
38
|
+
background-color: $success;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
svg{
|
|
42
|
+
fill: $success;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&_exception{
|
|
47
|
+
#{$root}__progressLine{
|
|
48
|
+
background-color: $danger;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
svg{
|
|
52
|
+
fill: $danger;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&_normal{
|
|
57
|
+
#{$root}__progressLine{
|
|
58
|
+
background-color: $primary;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__emptyLine{
|
|
65
|
+
position: relative;
|
|
66
|
+
background-color: $back-disabled;
|
|
67
|
+
border-radius: 20px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__progressLine{
|
|
71
|
+
position: absolute;
|
|
72
|
+
height: inherit;
|
|
73
|
+
border-radius: 20px;
|
|
74
|
+
max-width: 100%;
|
|
75
|
+
transition: width .2s linear, background-color .5s linear;
|
|
76
|
+
transform: scaleX(0);
|
|
77
|
+
animation: scale 1s forwards;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
|
|
80
|
+
&::before{
|
|
81
|
+
top: 0;
|
|
82
|
+
left: 0;
|
|
83
|
+
right: 0;
|
|
84
|
+
bottom: 0;
|
|
85
|
+
content: "";
|
|
86
|
+
position: absolute;
|
|
87
|
+
transform: translateX(-100%);
|
|
88
|
+
background: linear-gradient(90deg, transparent, rgba($white, 0.5), transparent);
|
|
89
|
+
animation: wave-animation 1.6s linear 0.5s infinite;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes wave-animation {
|
|
93
|
+
0% {
|
|
94
|
+
transform: translateX(-100%);
|
|
95
|
+
}
|
|
96
|
+
100% {
|
|
97
|
+
transform: translateX(100%);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@keyframes scale {
|
|
103
|
+
0% {
|
|
104
|
+
transform: scaleX(0);
|
|
105
|
+
}
|
|
106
|
+
100% {
|
|
107
|
+
transform: scaleX(1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&__text{
|
|
112
|
+
color: $dark;
|
|
113
|
+
margin-left: 8px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
exports.__esModule = true;
|
|
22
|
+
var React = __importStar(require("react"));
|
|
23
|
+
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
24
|
+
function SkeletonView(props) {
|
|
25
|
+
var bem = hooks_1.useBem('SkeletonView');
|
|
26
|
+
return (React.createElement("span", { className: bem(props.className, bem.block({
|
|
27
|
+
type: props.children ? null : props.type,
|
|
28
|
+
animation: props.animation
|
|
29
|
+
})), style: { height: props.height, width: props.width } }, props.children));
|
|
30
|
+
}
|
|
31
|
+
exports["default"] = SkeletonView;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
.SkeletonView{
|
|
2
|
+
$root: &;
|
|
3
|
+
background-color: $grey-darker;
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
height: auto;
|
|
8
|
+
width: auto;
|
|
9
|
+
display: block;
|
|
10
|
+
|
|
11
|
+
& > * {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&_type{
|
|
16
|
+
&_text{
|
|
17
|
+
height: 1em;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&_rect{
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&_circle{
|
|
26
|
+
height: 100%;
|
|
27
|
+
border-radius: 50%;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&_animation{
|
|
32
|
+
&_pulse{
|
|
33
|
+
animation: pulse 4s infinite;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@keyframes pulse {
|
|
37
|
+
0% {
|
|
38
|
+
background-color: $grey-darker;
|
|
39
|
+
}
|
|
40
|
+
50% {
|
|
41
|
+
background-color: $grey-light;
|
|
42
|
+
}
|
|
43
|
+
100% {
|
|
44
|
+
background-color: $grey-darker;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&_wave{
|
|
49
|
+
&#{$root}::before{
|
|
50
|
+
top: 0;
|
|
51
|
+
left: 0;
|
|
52
|
+
right: 0;
|
|
53
|
+
bottom: 0;
|
|
54
|
+
content: "";
|
|
55
|
+
position: absolute;
|
|
56
|
+
transform: translateX(-100%);
|
|
57
|
+
background: linear-gradient(90deg, transparent, rgba($grey-light, 0.3), transparent);
|
|
58
|
+
animation: wave-animation 1.6s linear 0.5s infinite;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@keyframes wave-animation {
|
|
63
|
+
0% {
|
|
64
|
+
transform: translateX(-100%);
|
|
65
|
+
}
|
|
66
|
+
100% {
|
|
67
|
+
transform: translateX(100%);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
package/list/List/ListView.js
CHANGED
|
@@ -23,6 +23,9 @@ var React = __importStar(require("react"));
|
|
|
23
23
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
24
24
|
function ListView(props) {
|
|
25
25
|
var bem = hooks_1.useBem('ListView');
|
|
26
|
+
if (!props.list) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
26
29
|
var renderPagination = function (pagination, paginationSize, layout) {
|
|
27
30
|
if (!pagination && !paginationSize && !layout) {
|
|
28
31
|
return null;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
exports.__esModule = true;
|
|
25
|
+
var React = __importStar(require("react"));
|
|
26
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/icon/Icon"));
|
|
27
|
+
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
28
|
+
function StepItemView(props) {
|
|
29
|
+
var _a;
|
|
30
|
+
var bem = hooks_1.useBem("StepItemView");
|
|
31
|
+
return (React.createElement("div", { className: bem(props.className, bem.block((_a = {}, _a[props.status] = true, _a))) },
|
|
32
|
+
React.createElement("div", { className: bem.element('body', { disabled: props.disabled }), onClick: props.onChange },
|
|
33
|
+
React.createElement("div", { className: bem.element('header') },
|
|
34
|
+
React.createElement("span", { className: bem.element('icon') }, props.status === 'finish' ? React.createElement(Icon_1["default"], { name: 'check' }) : props.stepItem.icon || "0" + props.index),
|
|
35
|
+
React.createElement("div", null,
|
|
36
|
+
React.createElement("div", { className: bem.element('title') }, props.stepItem.title),
|
|
37
|
+
React.createElement("div", { className: bem.element('subtitle') }, props.stepItem.subtitle))),
|
|
38
|
+
React.createElement("div", { className: bem.element('description') }, props.stepItem.description)),
|
|
39
|
+
React.createElement("span", { className: bem.element('divider') })));
|
|
40
|
+
}
|
|
41
|
+
exports["default"] = StepItemView;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
|
|
2
|
+
.StepItemView{
|
|
3
|
+
$root: &;
|
|
4
|
+
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
|
|
9
|
+
&:last-child{
|
|
10
|
+
flex-grow: 0;
|
|
11
|
+
#{$root}__divider{
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&__icon{
|
|
17
|
+
background-color: rgba($white, .2);
|
|
18
|
+
padding: 5px;
|
|
19
|
+
border-radius: 10px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&_wait{
|
|
23
|
+
#{$root}__icon{
|
|
24
|
+
background-color: $grey-darker;
|
|
25
|
+
svg{
|
|
26
|
+
fill: $white;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#{$root}__title, #{$root}__subtitle, #{$root}__description{
|
|
31
|
+
color: $grey-darker;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#{$root}__divider{
|
|
35
|
+
border-top-color: $grey-darker;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&_active{
|
|
40
|
+
#{$root}__body{
|
|
41
|
+
background-color: $primary;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
#{$root}__icon svg{
|
|
45
|
+
fill: #fff;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#{$root}__title, #{$root}__subtitle, #{$root}__description{
|
|
49
|
+
color: #fff;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
#{$root}__divider{
|
|
53
|
+
border-top-color: $primary;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&_finish{
|
|
58
|
+
#{$root}__body{
|
|
59
|
+
background-color: $success;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#{$root}__icon svg{
|
|
63
|
+
fill: #fff;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#{$root}__title, #{$root}__subtitle, #{$root}__description{
|
|
67
|
+
color: #fff;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#{$root}__divider{
|
|
71
|
+
border-top-color: $success;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&_error{
|
|
76
|
+
#{$root}__body{
|
|
77
|
+
background-color: $danger;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
#{$root}__icon svg{
|
|
81
|
+
fill: #fff;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#{$root}__title, #{$root}__subtitle, #{$root}__description{
|
|
85
|
+
color: #fff;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
#{$root}__divider{
|
|
89
|
+
border-top-color: $danger;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&__body{
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
padding: 8px;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
min-width: 100px;
|
|
99
|
+
|
|
100
|
+
border-radius: 15px;
|
|
101
|
+
background-color: transparent;
|
|
102
|
+
transition: background-color .15s ease-in;
|
|
103
|
+
|
|
104
|
+
&_disabled{
|
|
105
|
+
cursor: default;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&__header{
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
line-height: 1.1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&__icon{
|
|
116
|
+
margin-right: 5px;
|
|
117
|
+
|
|
118
|
+
color: $white;
|
|
119
|
+
font-size: 12px;
|
|
120
|
+
font-weight: 500;
|
|
121
|
+
|
|
122
|
+
transition: background-color .15s ease-in, color .15s ease-in;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&__title{
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
transition: color .15s ease-in;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&__subtitle, &__description{
|
|
131
|
+
font-size: 9px;
|
|
132
|
+
transition: color .15s ease-in;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
&__divider{
|
|
137
|
+
min-width: 10px;
|
|
138
|
+
flex-grow: 2;
|
|
139
|
+
flex-shrink: 1;
|
|
140
|
+
margin: 0 5px;
|
|
141
|
+
border-top: 2px dotted transparent;
|
|
142
|
+
transition: border-top-color .15s ease-in;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
exports.__esModule = true;
|
|
22
|
+
var React = __importStar(require("react"));
|
|
23
|
+
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
24
|
+
function StepsView(props) {
|
|
25
|
+
var bem = hooks_1.useBem("StepsView");
|
|
26
|
+
return (React.createElement("div", { className: bem(props.className, bem.block()) }, props.children));
|
|
27
|
+
}
|
|
28
|
+
exports["default"] = StepsView;
|
package/modal/Modal/ModalView.js
CHANGED
|
@@ -35,25 +35,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
35
|
exports.__esModule = true;
|
|
36
36
|
var React = __importStar(require("react"));
|
|
37
37
|
var react_modal_1 = __importDefault(require("react-modal"));
|
|
38
|
-
var Controls_1 = __importDefault(require("@steroidsjs/core/ui/nav/Controls"));
|
|
39
38
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
39
|
+
var Controls_1 = __importDefault(require("@steroidsjs/core/ui/nav/Controls"));
|
|
40
40
|
function ModalView(props) {
|
|
41
41
|
var bem = hooks_1.useBem('ModalView');
|
|
42
42
|
var overrideDefaultClasses = {
|
|
43
43
|
base: bem.block('overlay'),
|
|
44
|
-
afterOpen:
|
|
45
|
-
beforeClose:
|
|
44
|
+
afterOpen: 'ModalView_overlay-after',
|
|
45
|
+
beforeClose: 'ModalView_overlay-before'
|
|
46
46
|
};
|
|
47
|
-
return (React.createElement("
|
|
48
|
-
React.createElement(
|
|
49
|
-
React.createElement("
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
React.createElement(Controls_1["default"], { items: props.controls, className: bem.element('controls') }))))));
|
|
47
|
+
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 }),
|
|
48
|
+
React.createElement("div", { className: bem.element('header') },
|
|
49
|
+
React.createElement("span", { className: bem.element('title') }, props.title),
|
|
50
|
+
React.createElement("button", { className: bem.element('close'), onClick: function (e) {
|
|
51
|
+
e.preventDefault();
|
|
52
|
+
props.onClose();
|
|
53
|
+
}, "aria-label": __('Закрыть') })),
|
|
54
|
+
React.createElement("div", { className: bem.element('content') }, props.children),
|
|
55
|
+
props.controls && (React.createElement("div", { className: bem.element('footer') },
|
|
56
|
+
React.createElement(Controls_1["default"], { className: bem.element('controls'), items: props.controls })))));
|
|
58
57
|
}
|
|
59
58
|
exports["default"] = ModalView;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
.ModalView_body-opened{
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.ModalView {
|
|
6
2
|
|
|
7
3
|
&_overlay {
|
|
@@ -13,45 +9,40 @@
|
|
|
13
9
|
right: 0;
|
|
14
10
|
|
|
15
11
|
display: flex;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
padding: 3rem;
|
|
12
|
+
padding: 50px;
|
|
19
13
|
|
|
20
14
|
background-color: rgba(0,0,0,0.7);
|
|
21
|
-
opacity: 0;
|
|
22
|
-
transition: opacity 300ms ease-in-out;
|
|
23
15
|
}
|
|
24
16
|
|
|
25
|
-
&__body{
|
|
26
|
-
outline: none;
|
|
27
|
-
width: 600px;
|
|
28
|
-
min-height: 350px;
|
|
17
|
+
&__body {
|
|
29
18
|
margin: auto;
|
|
30
|
-
|
|
31
19
|
background: #fff;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
20
|
+
|
|
21
|
+
&_size {
|
|
22
|
+
&_small {
|
|
23
|
+
width: 400px;
|
|
24
|
+
}
|
|
25
|
+
&_middle {
|
|
26
|
+
width: 600px;
|
|
27
|
+
}
|
|
28
|
+
&_large {
|
|
29
|
+
width: 960px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
38
32
|
}
|
|
39
33
|
|
|
40
34
|
&__header {
|
|
41
|
-
font-size: 20px;
|
|
42
|
-
color: #333;
|
|
43
|
-
display: flex;
|
|
44
|
-
justify-content: space-between;
|
|
45
|
-
padding: 15px;
|
|
46
|
-
border-bottom: 1px solid #e9ecef;
|
|
47
35
|
position: relative;
|
|
48
|
-
|
|
36
|
+
padding: 15px;
|
|
49
37
|
|
|
38
|
+
color: #333;
|
|
39
|
+
font-size: 20px;
|
|
40
|
+
border-bottom: 1px solid #f0f0f0;
|
|
41
|
+
}
|
|
50
42
|
&__close {
|
|
51
43
|
position: absolute;
|
|
52
44
|
top: 0;
|
|
53
45
|
right: 0;
|
|
54
|
-
display: block;
|
|
55
46
|
width: 50px;
|
|
56
47
|
height: 50px;
|
|
57
48
|
|
|
@@ -87,10 +78,19 @@
|
|
|
87
78
|
padding: 15px;
|
|
88
79
|
}
|
|
89
80
|
|
|
90
|
-
|
|
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
91
|
&_overlay {
|
|
92
92
|
opacity: 0;
|
|
93
|
-
transition: opacity .
|
|
93
|
+
transition: opacity .3s ease-in-out;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
&_overlay-after {
|
|
@@ -102,3 +102,7 @@
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
// Class to hide body scroll, when Modal is opened
|
|
106
|
+
.ModalView_body-hide-scroll {
|
|
107
|
+
overflow: hidden;
|
|
108
|
+
}
|
|
@@ -28,11 +28,11 @@ var hooks_1 = require("@steroidsjs/core/hooks");
|
|
|
28
28
|
function BreadcrumbsView(props) {
|
|
29
29
|
var bem = hooks_1.useBem('BreadcrumbsView');
|
|
30
30
|
var items = props.items || [];
|
|
31
|
-
return (React.createElement("nav", { className: bem.block(), "aria-label": 'breadcrumb' },
|
|
32
|
-
React.createElement("ol", { className: bem
|
|
31
|
+
return (React.createElement("nav", { className: bem(bem.block(), props.className), "aria-label": 'breadcrumb' },
|
|
32
|
+
React.createElement("ol", { className: bem.element('list') }, items.map(function (item, index) {
|
|
33
33
|
var isLastItem = items.length === index + 1;
|
|
34
|
-
return (React.createElement("li", { key: item.id || index, className: bem
|
|
35
|
-
!isLastItem && item.id && (React.createElement(Link_1["default"], { toRoute: item.id }, item.title)),
|
|
34
|
+
return (React.createElement("li", { key: item.id || index, className: bem.element('item') },
|
|
35
|
+
!isLastItem && item.id && (React.createElement(Link_1["default"], { toRoute: item.id, href: item.id }, item.title)),
|
|
36
36
|
(isLastItem || !item.id) && (React.createElement("span", null, props.pageTitle || item.title))));
|
|
37
37
|
}))));
|
|
38
38
|
}
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
.BreadcrumbsView {
|
|
2
|
+
$breadcrumb-item-separator: '/';
|
|
3
|
+
|
|
4
|
+
&__list {
|
|
5
|
+
display: flex;
|
|
6
|
+
list-style: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&__item {
|
|
10
|
+
&:not(:first-child)::before {
|
|
11
|
+
content: $breadcrumb-item-separator;
|
|
12
|
+
display: inline-block;
|
|
13
|
+
margin: 0 8px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
2
16
|
}
|
package/nav/Nav/NavButtonView.js
CHANGED
|
@@ -39,7 +39,7 @@ var hooks_1 = require("@steroidsjs/core/hooks");
|
|
|
39
39
|
function NavButtonView(props) {
|
|
40
40
|
var bem = hooks_1.useBem('NavButtonView');
|
|
41
41
|
return (React.createElement("div", { className: bem(bem.block(), props.className) },
|
|
42
|
-
React.createElement("div", { className: bem(props.children && 'mb-3', bem.element('nav')) }, props.items.map(function (item, index) { return (React.createElement(Button_1["default"], __assign({ key: item.id || index, color: 'secondary', outline: !item.isActive, onClick: function () { return props.onClick(item, index); }, className: bem.element('nav-item') }, item))); })),
|
|
42
|
+
React.createElement("div", { className: bem(props.children && 'mb-3', bem.element('nav')) }, props.items.map(function (item, index) { return (React.createElement(Button_1["default"], __assign({ key: item.id || index, color: 'secondary', outline: !item.isActive, disabled: props.disabled, onClick: function () { return props.onClick(item, index); }, className: bem.element('nav-item') }, item))); })),
|
|
43
43
|
React.createElement("div", { className: bem.element('content') }, props.children)));
|
|
44
44
|
}
|
|
45
45
|
exports["default"] = NavButtonView;
|
package/nav/Nav/NavIconView.js
CHANGED
|
@@ -39,7 +39,7 @@ var hooks_1 = require("@steroidsjs/core/hooks");
|
|
|
39
39
|
function NavIconView(props) {
|
|
40
40
|
var bem = hooks_1.useBem('NavIconView');
|
|
41
41
|
return (React.createElement("div", { className: bem(bem.block(), props.className) },
|
|
42
|
-
props.items.map(function (item, index) { return (React.createElement(Button_1["default"], __assign({ key: item.id || index, link: true, onClick: function () { return props.onClick(item, index); } }, item, { label: null, hint: item.hint || item.label || null }))); }),
|
|
42
|
+
props.items.map(function (item, index) { return (React.createElement(Button_1["default"], __assign({ icon: props.icon ? props.icon : 'circle-notch', key: item.id || index, link: true, onClick: function () { return props.onClick(item, index); } }, item, { label: null, hint: item.hint || item.label || null }))); }),
|
|
43
43
|
props.children));
|
|
44
44
|
}
|
|
45
45
|
exports["default"] = NavIconView;
|