@steroidsjs/bootstrap 3.0.0-beta.26 → 3.0.0-beta.27
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/Accordion/AccordionItemView.js +1 -1
- package/content/Accordion/AccordionItemView.scss +11 -2
- package/content/Accordion/AccordionView.scss +2 -2
- package/content/Alert/AlertView.scss +13 -4
- package/content/Avatar/AvatarView.scss +0 -1
- package/content/Badge/BadgeView.scss +19 -1
- package/content/Calendar/CaptionElement.scss +4 -5
- package/content/Detail/DetailView.scss +74 -52
- package/content/Icon/IconView.js +2 -2
- package/form/Button/ButtonView.js +5 -2
- package/form/Button/ButtonView.scss +41 -3
- package/form/CheckboxField/CheckboxFieldView.scss +10 -11
- package/form/FieldLayout/FieldLayoutView.js +11 -3
- package/form/FieldLayout/FieldLayoutView.scss +128 -24
- package/form/InputField/InputFieldView.js +32 -13
- package/form/InputField/InputFieldView.scss +270 -98
- package/form/NumberField/NumberFieldView.js +19 -13
- package/form/NumberField/NumberFieldView.scss +213 -88
- package/form/RadioListField/RadioListFieldView.js +7 -3
- package/form/RadioListField/RadioListFieldView.scss +133 -1
- package/form/TextField/TextFieldView.js +10 -2
- package/form/TextField/TextFieldView.scss +145 -2
- package/icons/index.js +3 -0
- package/icons/svgs/arrow.svg +3 -0
- package/icons/svgs/field-close.svg +4 -0
- package/icons/svgs/user.svg +4 -0
- package/package.json +4 -3
- package/scss/mixins/button.scss +8 -8
- package/scss/variables/common/colors.scss +41 -38
- package/scss/variables/components/input.scss +1 -1
- package/scss/variables/index.scss +1 -0
- package/scss/variables/normalize.scss +21 -0
|
@@ -88,7 +88,7 @@ function AccordionItemView(props) {
|
|
|
88
88
|
React.createElement("p", null, props.title)),
|
|
89
89
|
props.showIcon && (React.createElement("div", { className: bem.element('icon-wrapper') }, props.icon
|
|
90
90
|
? renderIcon()
|
|
91
|
-
: (React.createElement(Icon_1["default"], { className: bem.element('icon', {
|
|
91
|
+
: (React.createElement(Icon_1["default"], { className: bem.element('icon-chevron', {
|
|
92
92
|
active: !props.disabled && props.isShowMore
|
|
93
93
|
}), name: "accordion-chevron" }))))),
|
|
94
94
|
React.createElement("div", { className: bem.element('content', { visible: !props.disabled && props.isShowMore }) }, props.children)));
|
|
@@ -94,7 +94,7 @@ $accordion-chevron-color: var(--accordion-chevron-color);
|
|
|
94
94
|
grid-row-end: 2;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
#{$root}__icon {
|
|
97
|
+
#{$root}__icon-chevron {
|
|
98
98
|
transform: rotate(180deg);
|
|
99
99
|
&_active {
|
|
100
100
|
transform: rotate(0deg);
|
|
@@ -120,8 +120,11 @@ $accordion-chevron-color: var(--accordion-chevron-color);
|
|
|
120
120
|
margin: 0;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
&__icon {
|
|
123
|
+
&__icon-chevron {
|
|
124
|
+
width: 24px;
|
|
125
|
+
height: 24px;
|
|
124
126
|
box-shadow: 0px 1px 20px rgba(0, 0, 0, 0.1);
|
|
127
|
+
position: absolute;
|
|
125
128
|
border-radius: $radius-small;
|
|
126
129
|
|
|
127
130
|
transform: rotate(0deg);
|
|
@@ -153,6 +156,7 @@ $accordion-chevron-color: var(--accordion-chevron-color);
|
|
|
153
156
|
display: flex;
|
|
154
157
|
align-items: center;
|
|
155
158
|
justify-content: center;
|
|
159
|
+
background-color: transparent;
|
|
156
160
|
|
|
157
161
|
&_not_visible {
|
|
158
162
|
width: 0;
|
|
@@ -174,6 +178,11 @@ $accordion-chevron-color: var(--accordion-chevron-color);
|
|
|
174
178
|
}
|
|
175
179
|
}
|
|
176
180
|
|
|
181
|
+
&__close-icon, &__open-icon {
|
|
182
|
+
width: 24px;
|
|
183
|
+
height: 24px;
|
|
184
|
+
}
|
|
185
|
+
|
|
177
186
|
&__close-icon {
|
|
178
187
|
position: absolute;
|
|
179
188
|
opacity: 0;
|
|
@@ -25,17 +25,25 @@
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
&__icon
|
|
28
|
+
&__icon {
|
|
29
|
+
width: 24px;
|
|
29
30
|
height: 24px;
|
|
30
31
|
margin-right: 12px;
|
|
31
|
-
|
|
32
|
+
|
|
32
33
|
svg {
|
|
33
34
|
width: 24px;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
&__icon-close
|
|
38
|
-
|
|
38
|
+
&__icon-close {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
width: 24px;
|
|
41
|
+
height: 24px;
|
|
42
|
+
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
align-items: center;
|
|
46
|
+
cursor: pointer;
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
&__text-block {
|
|
@@ -60,6 +68,7 @@
|
|
|
60
68
|
&_error {
|
|
61
69
|
background: $danger-light;
|
|
62
70
|
}
|
|
71
|
+
|
|
63
72
|
&_default {
|
|
64
73
|
background: $light-gray;
|
|
65
74
|
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
@import "../../scss/variables";
|
|
2
2
|
|
|
3
|
+
:root {
|
|
4
|
+
--counter-background-color: #FFFFFF;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
html[data-theme="dark"] {
|
|
8
|
+
--counter-background-color: #414141;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
$counter-background-color: var(--counter-background-color);
|
|
12
|
+
|
|
3
13
|
.BadgeView {
|
|
4
14
|
$root: &;
|
|
5
15
|
|
|
@@ -21,6 +31,12 @@
|
|
|
21
31
|
}
|
|
22
32
|
}
|
|
23
33
|
|
|
34
|
+
&__close {
|
|
35
|
+
width: 17px;
|
|
36
|
+
height: 17px;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
|
|
24
40
|
$badge-types: (
|
|
25
41
|
"primary": $primary,
|
|
26
42
|
"secondary": $secondary,
|
|
@@ -88,12 +104,14 @@
|
|
|
88
104
|
justify-content: center;
|
|
89
105
|
align-items: center;
|
|
90
106
|
border-radius: $radius-circle;
|
|
107
|
+
background-color: $counter-background-color;
|
|
91
108
|
}
|
|
92
109
|
|
|
93
|
-
#{$root}__counter-content {
|
|
110
|
+
#{$root}__counter-content {
|
|
94
111
|
font-weight: $font-weight-sm;
|
|
95
112
|
font-size: $font-size-xs;
|
|
96
113
|
line-height: 16px;
|
|
114
|
+
color: $text-color;
|
|
97
115
|
}
|
|
98
116
|
|
|
99
117
|
#{$root}__close {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
$border-color: gray;
|
|
2
1
|
|
|
3
2
|
.CaptionElement {
|
|
4
3
|
height: 45px;
|
|
5
4
|
display: table-caption;
|
|
6
5
|
padding: 0 10px;
|
|
7
|
-
border-bottom: 1px solid
|
|
6
|
+
border-bottom: 1px solid gray;
|
|
8
7
|
|
|
9
8
|
& > div {
|
|
10
9
|
font-size: 14px;
|
|
@@ -87,12 +86,12 @@ $border-color: gray;
|
|
|
87
86
|
padding: 5px;
|
|
88
87
|
|
|
89
88
|
text-align: center;
|
|
90
|
-
border-bottom: 1px solid
|
|
89
|
+
border-bottom: 1px solid gray;
|
|
91
90
|
background-color: $calendar-primary-light-color;
|
|
92
91
|
|
|
93
92
|
&_months {
|
|
94
93
|
grid-area: HeaderMonths;
|
|
95
|
-
border-right: 1px solid
|
|
94
|
+
border-right: 1px solid gray;
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
&_years {
|
|
@@ -101,7 +100,7 @@ $border-color: gray;
|
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
&__panel-column-months {
|
|
104
|
-
border-right: 1px solid
|
|
103
|
+
border-right: 1px solid gray;
|
|
105
104
|
|
|
106
105
|
&_first {
|
|
107
106
|
grid-area: Months1stCol;
|
|
@@ -1,66 +1,88 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
margin-bottom: 32px;
|
|
7
|
-
}
|
|
1
|
+
:root {
|
|
2
|
+
--detail-background-color-value: #ffffff;
|
|
3
|
+
--detail-background-color-label: #f9fcff;
|
|
4
|
+
--detail-border-color: #e9e9e9;
|
|
5
|
+
}
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
color: #
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
7
|
+
html[data-theme="dark"] {
|
|
8
|
+
--detail-background-color-value: #4E4F57;
|
|
9
|
+
--detail-background-color-label: #5B5C6B;
|
|
10
|
+
--detail-border-color: #ADAAB3;
|
|
11
|
+
}
|
|
15
12
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
$detail-border-color: var(--detail-border-color);
|
|
14
|
+
$detail-background-color-value: var(--detail-background-color-value);
|
|
15
|
+
$detail-background-color-label: var(--detail-background-color-label);
|
|
19
16
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
border-radius: 10px;
|
|
23
|
-
border: 1px solid #cccccc;
|
|
24
|
-
filter: drop-shadow(0px 0px 30px rgba(0, 0, 0, 0.1));
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
}
|
|
17
|
+
.DetailView {
|
|
18
|
+
font-family: $font-family-nunito;
|
|
27
19
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
20
|
+
&__header {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
margin-bottom: 32px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&__title {
|
|
28
|
+
color: $black-30;
|
|
29
|
+
font-size: 56px;
|
|
30
|
+
line-height: 56px;
|
|
31
|
+
font-weight: $font-weight-lg;
|
|
32
|
+
}
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
&__controls {
|
|
35
|
+
margin-left: auto;
|
|
36
|
+
}
|
|
40
37
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
&__table-container {
|
|
39
|
+
display: flex;
|
|
40
|
+
border-radius: 10px;
|
|
41
|
+
border: 1px solid $detail-border-color;
|
|
42
|
+
overflow: hidden;
|
|
45
43
|
}
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
&__table {
|
|
46
|
+
background: #ffffff;
|
|
47
|
+
height: 100%;
|
|
48
|
+
width: 100%;
|
|
49
|
+
border-collapse: collapse;
|
|
50
|
+
border-spacing: 0;
|
|
51
|
+
border: none;
|
|
52
|
+
}
|
|
51
53
|
|
|
52
|
-
&
|
|
53
|
-
|
|
54
|
-
font-size: 16px;
|
|
54
|
+
&__row:not(:last-child) {
|
|
55
|
+
border-bottom: 1px solid $detail-border-color;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
&
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
&__label,
|
|
59
|
+
&__value {
|
|
60
|
+
&:not(:last-child) {
|
|
61
|
+
border-right: 1px solid $detail-border-color;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
padding: 12px;
|
|
65
|
+
|
|
66
|
+
font-weight: $font-weight-md;
|
|
67
|
+
font-size: $font-size-sm;
|
|
68
|
+
line-height: 18px;
|
|
69
|
+
color: $text-color;
|
|
70
|
+
background-color: $detail-background-color-value;
|
|
71
|
+
|
|
72
|
+
&_size_md {
|
|
73
|
+
padding: 16px 12px;
|
|
74
|
+
font-size: $font-size-base;
|
|
75
|
+
line-height: 22px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&_size_lg {
|
|
79
|
+
padding: 18px 12px;
|
|
80
|
+
font-size: $font-size-lg;
|
|
81
|
+
line-height: 24px;
|
|
82
|
+
}
|
|
60
83
|
}
|
|
61
|
-
}
|
|
62
84
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
85
|
+
&__label {
|
|
86
|
+
background: $detail-background-color-label;
|
|
87
|
+
}
|
|
66
88
|
}
|
package/content/Icon/IconView.js
CHANGED
|
@@ -28,9 +28,9 @@ var hooks_1 = require("@steroidsjs/core/hooks");
|
|
|
28
28
|
function IconView(props) {
|
|
29
29
|
var bem = (0, hooks_1.useBem)('IconView');
|
|
30
30
|
if (typeof props.icon === 'string' && props.icon.indexOf('<svg') === 0) {
|
|
31
|
-
return (React.createElement("span", { dangerouslySetInnerHTML: { __html: props.icon } /* eslint-disable-line react/no-danger */, "aria-label": props.title, title: props.title, className: bem(bem.block(), props.className), onClick: props.onClick, onKeyPress: props.onClick, role: 'button', tabIndex: 0 }));
|
|
31
|
+
return (React.createElement("span", { dangerouslySetInnerHTML: { __html: props.icon } /* eslint-disable-line react/no-danger */, "aria-label": props.title, title: props.title, className: bem(bem.block(), props.className), onClick: props.onClick, onKeyPress: props.onClick, role: 'button', tabIndex: props.tabIndex || 0 }));
|
|
32
32
|
}
|
|
33
|
-
return (React.createElement("span", { onClick: props.onClick, onKeyPress: props.onClick, role: 'button', tabIndex: 0 },
|
|
33
|
+
return (React.createElement("span", { onClick: props.onClick, onKeyPress: props.onClick, role: 'button', tabIndex: props.tabIndex || 0 },
|
|
34
34
|
React.createElement("img", { alt: props.title, title: props.title, src: props.icon, className: bem(bem.block(), props.className) })));
|
|
35
35
|
}
|
|
36
36
|
exports["default"] = IconView;
|
|
@@ -38,16 +38,19 @@ function ButtonView(props) {
|
|
|
38
38
|
? props.label
|
|
39
39
|
: (props.hint || null);
|
|
40
40
|
return (React.createElement(React.Fragment, null,
|
|
41
|
-
props.isLoading && (React.createElement(Icon_1["default"], { className: bem.element('loader'), name: 'loader' })),
|
|
41
|
+
props.isLoading && (React.createElement(Icon_1["default"], { className: bem.element('loader'), name: 'loader', tabIndex: -1 })),
|
|
42
42
|
!props.isLoading && (React.createElement("span", { className: bem.element('label') },
|
|
43
43
|
props.icon && (React.createElement(Icon_1["default"], { name: props.icon, title: title, className: bem.element('icon', !props.label && 'without-label') })),
|
|
44
44
|
props.children))));
|
|
45
45
|
};
|
|
46
46
|
var renderBadge = function () {
|
|
47
|
+
var _a;
|
|
47
48
|
if (!props.badge || !props.badge.enable) {
|
|
48
49
|
return null;
|
|
49
50
|
}
|
|
50
|
-
return (React.createElement("span", { className: bem(
|
|
51
|
+
return (React.createElement("span", { className: bem(bem.element('badge', (_a = {},
|
|
52
|
+
_a["".concat(props.badge.color)] = !!props.badge.color,
|
|
53
|
+
_a)), props.badge.className) }, props.badge.value));
|
|
51
54
|
};
|
|
52
55
|
var className = bem(bem.block((_a = {
|
|
53
56
|
button: !props.link
|
|
@@ -12,9 +12,13 @@ $btn-letter-spacing: 0.1em;
|
|
|
12
12
|
|
|
13
13
|
width: 160px;
|
|
14
14
|
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
|
|
15
19
|
&_button {
|
|
16
20
|
position: relative;
|
|
17
|
-
border-radius:
|
|
21
|
+
border-radius: $radius-small;
|
|
18
22
|
user-select: none;
|
|
19
23
|
border: 3px solid transparent;
|
|
20
24
|
|
|
@@ -42,6 +46,12 @@ $btn-letter-spacing: 0.1em;
|
|
|
42
46
|
}
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
&__label {
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
align-items: center;
|
|
53
|
+
}
|
|
54
|
+
|
|
45
55
|
&_block {
|
|
46
56
|
display: block;
|
|
47
57
|
width: 100%;
|
|
@@ -51,7 +61,7 @@ $btn-letter-spacing: 0.1em;
|
|
|
51
61
|
}
|
|
52
62
|
}
|
|
53
63
|
|
|
54
|
-
&_link {
|
|
64
|
+
&_link {
|
|
55
65
|
display: inline;
|
|
56
66
|
width: auto;
|
|
57
67
|
#{$root}__label {
|
|
@@ -61,8 +71,9 @@ $btn-letter-spacing: 0.1em;
|
|
|
61
71
|
|
|
62
72
|
&_disabled {
|
|
63
73
|
opacity: 0.5;
|
|
64
|
-
color: rgba(0, 0, 0, 0.
|
|
74
|
+
color: rgba(0, 0, 0, 0.1);
|
|
65
75
|
cursor: not-allowed;
|
|
76
|
+
|
|
66
77
|
input {
|
|
67
78
|
cursor: inherit;
|
|
68
79
|
}
|
|
@@ -93,6 +104,8 @@ $btn-letter-spacing: 0.1em;
|
|
|
93
104
|
}
|
|
94
105
|
|
|
95
106
|
&__icon {
|
|
107
|
+
width: 16px;
|
|
108
|
+
height: 16px;
|
|
96
109
|
&_without-label {
|
|
97
110
|
margin: 0;
|
|
98
111
|
}
|
|
@@ -117,10 +130,35 @@ $btn-letter-spacing: 0.1em;
|
|
|
117
130
|
position: relative;
|
|
118
131
|
top: -1px;
|
|
119
132
|
margin-left: 4px;
|
|
133
|
+
border-radius: $radius-small;
|
|
134
|
+
padding: 2px 5px;
|
|
135
|
+
|
|
136
|
+
$badge-types: (
|
|
137
|
+
"primary": $primary,
|
|
138
|
+
"secondary": $secondary,
|
|
139
|
+
"success": $success,
|
|
140
|
+
"danger": $danger,
|
|
141
|
+
"warning": $warning,
|
|
142
|
+
"info": $info,
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
@each $type, $color in $badge-types {
|
|
146
|
+
&_#{$type} {
|
|
147
|
+
background-color: $color;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
120
150
|
}
|
|
121
151
|
|
|
122
152
|
&__loader {
|
|
153
|
+
width: 24px;
|
|
154
|
+
height: 24px;
|
|
155
|
+
display: flex;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
align-items: center;
|
|
158
|
+
|
|
123
159
|
svg {
|
|
160
|
+
width: 14px;
|
|
161
|
+
height: 14px;
|
|
124
162
|
transform-origin: center;
|
|
125
163
|
animation: rotate 1.45s linear infinite;
|
|
126
164
|
}
|
|
@@ -38,18 +38,17 @@
|
|
|
38
38
|
content: "";
|
|
39
39
|
display: inline-block;
|
|
40
40
|
position: absolute;
|
|
41
|
-
|
|
41
|
+
top: 0;
|
|
42
|
+
left: 0;
|
|
43
|
+
width: 26px;
|
|
44
|
+
height: 26px;
|
|
42
45
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
flex-shrink: 0;
|
|
46
|
-
flex-grow: 0;
|
|
47
|
-
|
|
48
|
-
border-radius: $radius-small;
|
|
49
|
-
border: 4px solid $primary-light;
|
|
46
|
+
transform: translate(-12%, -11.5%);
|
|
47
|
+
transition: opacity 150ms ease-in-out;
|
|
50
48
|
opacity: 0;
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
border-radius: $radius-large;
|
|
51
|
+
border: 4px solid $primary-light;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
&-text {
|
|
@@ -66,7 +65,7 @@
|
|
|
66
65
|
opacity: 0;
|
|
67
66
|
|
|
68
67
|
//HOVER
|
|
69
|
-
&:not(:disabled):not(:checked):not(:active) + #{$root}__label:hover::before {
|
|
68
|
+
&:not(:focus):not(:disabled):not(:checked):not(:active) + #{$root}__label:hover::before {
|
|
70
69
|
border-color: #d0d0d0;
|
|
71
70
|
}
|
|
72
71
|
|
|
@@ -81,7 +80,7 @@
|
|
|
81
80
|
|
|
82
81
|
&:checked:active + #{$root}__label::before {
|
|
83
82
|
background-color: $primary-light;
|
|
84
|
-
border:
|
|
83
|
+
border-color: transparent;
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
//FOCUS
|
|
@@ -29,17 +29,25 @@ exports.__esModule = true;
|
|
|
29
29
|
var React = __importStar(require("react"));
|
|
30
30
|
var isEmpty_1 = __importDefault(require("lodash-es/isEmpty"));
|
|
31
31
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
32
|
+
var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
32
33
|
function FieldLayoutView(props) {
|
|
33
34
|
var bem = (0, hooks_1.useBem)('FieldLayoutView');
|
|
34
35
|
return (React.createElement("div", { className: bem(bem.block({
|
|
35
36
|
layout: props.layout.layout
|
|
36
37
|
}), 'form-group', props.layout.className, props.layout.layout === 'horizontal' && 'row', props.layout.layout === 'inline' && 'form-inline mb-0'), style: props.layout.style },
|
|
37
38
|
props.label && (React.createElement("div", { className: bem(bem.element('label', {
|
|
38
|
-
required: props.required
|
|
39
|
+
required: props.required,
|
|
40
|
+
size: props.size
|
|
39
41
|
}), props.layout.layout === 'horizontal' && 'col-form-label text-right', props.layout.layout === 'horizontal' && 'col-' + props.layout.cols[0], props.layout.layout === 'inline' && 'sr-only') }, props.label + ':')),
|
|
40
42
|
React.createElement("div", { className: bem(bem.element('field'), props.layout.layout === 'horizontal' && 'col-' + props.layout.cols[1], props.layout.layout === 'horizontal' && !props.label && 'offset-' + props.layout.cols[0], props.layout.layout === 'inline' && 'w-100') },
|
|
41
43
|
props.children,
|
|
42
|
-
!(0, isEmpty_1["default"])(props.errors) && (React.createElement("div", { className: bem(bem.element('invalid-feedback'), 'invalid-feedback') }, [].concat(props.errors).filter(function (error) { return typeof error === 'string'; }).map(function (error, index) { return (React.createElement("div", { key: index
|
|
43
|
-
|
|
44
|
+
!(0, isEmpty_1["default"])(props.errors) && (React.createElement("div", { className: bem(bem.element('invalid-feedback'), 'invalid-feedback') }, [].concat(props.errors).filter(function (error) { return typeof error === 'string'; }).map(function (error, index) { return (React.createElement("div", { key: index, className: bem.element('error-message') },
|
|
45
|
+
React.createElement(Icon_1["default"], { name: "error", className: bem.element('icon_error'), tabIndex: -1 }),
|
|
46
|
+
React.createElement("span", { className: bem.element('error-text', {
|
|
47
|
+
size: !!props.size || 'md'
|
|
48
|
+
}) }, error))); }))),
|
|
49
|
+
(0, isEmpty_1["default"])(props.errors) && props.layout.layout !== 'inline' && props.hint && (React.createElement("div", { className: bem(bem.element('hint', {
|
|
50
|
+
size: props.size
|
|
51
|
+
})) }, props.hint)))));
|
|
44
52
|
}
|
|
45
53
|
exports["default"] = FieldLayoutView;
|