@steroidsjs/bootstrap 3.0.0-beta.3 → 3.0.0-beta.31
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 +1 -2
- package/content/Accordion/AccordionItemView.d.ts +2 -0
- package/content/Accordion/AccordionItemView.js +96 -0
- package/content/Accordion/AccordionItemView.scss +209 -0
- package/content/Accordion/AccordionView.d.ts +2 -0
- package/content/{Collapse/CollapseView.js → Accordion/AccordionView.js} +3 -3
- package/content/{Collapse/CollapseView.scss → Accordion/AccordionView.scss} +3 -4
- package/content/Alert/AlertView.scss +19 -4
- package/content/Avatar/AvatarView.js +2 -3
- package/content/Avatar/AvatarView.scss +29 -36
- package/content/Badge/BadgeView.d.ts +3 -0
- package/content/Badge/BadgeView.js +25 -0
- package/content/Badge/BadgeView.scss +135 -0
- package/content/Calendar/CaptionElement.scss +5 -4
- package/content/Card/CardView.js +34 -14
- package/content/Card/CardView.scss +126 -110
- package/content/Detail/DetailView.scss +75 -52
- package/content/DropDown/DropDownView.js +6 -3
- package/content/DropDown/DropDownView.scss +196 -27
- package/content/Icon/IconView.js +2 -2
- package/form/Button/ButtonView.js +12 -8
- package/form/Button/ButtonView.scss +157 -71
- package/form/CheckboxField/CheckboxFieldView.js +6 -3
- package/form/CheckboxField/CheckboxFieldView.scss +185 -36
- package/form/DropDownField/DropDownFieldView.js +46 -47
- package/form/DropDownField/DropDownFieldView.scss +391 -181
- package/form/DropDownField/views/DropDownItem/DropDownItemView.d.ts +3 -0
- package/form/DropDownField/views/DropDownItem/DropDownItemView.js +80 -0
- package/form/DropDownField/views/DropDownItem/DropDownItemView.scss +217 -0
- package/form/DropDownField/views/DropDownItem/index.d.ts +2 -0
- package/form/DropDownField/views/DropDownItem/index.js +7 -0
- package/form/FieldLayout/FieldLayoutView.js +12 -4
- package/form/FieldLayout/FieldLayoutView.scss +128 -24
- package/form/Form/FormView.js +3 -3
- package/form/Form/FormView.scss +10 -14
- package/form/InputField/InputFieldView.js +32 -13
- package/form/InputField/InputFieldView.scss +245 -99
- package/form/NumberField/NumberFieldView.js +19 -13
- package/form/NumberField/NumberFieldView.scss +195 -89
- package/form/PasswordField/PasswordFieldView.js +11 -9
- package/form/PasswordField/PasswordFieldView.scss +231 -63
- package/form/RadioListField/RadioListFieldView.js +10 -3
- package/form/RadioListField/RadioListFieldView.scss +229 -1
- package/form/TextField/TextFieldView.js +10 -2
- package/form/TextField/TextFieldView.scss +143 -2
- package/icons/index.d.ts +2 -0
- package/{icon/fontawesome.js → icons/index.js} +37 -11
- package/icons/svgs/accordion-chevron.svg +4 -0
- package/icons/svgs/arrow.svg +3 -0
- package/icons/svgs/badge-close.svg +3 -0
- package/icons/svgs/close.svg +4 -0
- package/icons/svgs/crossed-out-eye.svg +5 -0
- package/icons/svgs/default.svg +11 -0
- package/icons/svgs/dots.svg +5 -0
- package/icons/svgs/error.svg +12 -0
- package/icons/svgs/field-close.svg +4 -0
- package/icons/svgs/info.svg +12 -0
- package/icons/svgs/loader.svg +3 -0
- package/icons/svgs/search.svg +4 -0
- package/icons/svgs/success.svg +4 -0
- package/icons/svgs/user.svg +4 -0
- package/icons/svgs/visible-eye.svg +4 -0
- package/icons/svgs/warning.svg +12 -0
- package/index.d.ts +11 -2
- package/index.js +13 -4
- package/index.scss +6 -3
- package/layout/Header/HeaderView.scss +3 -3
- package/layout/Tooltip/TooltipView.js +6 -6
- package/layout/Tooltip/TooltipView.scss +45 -37
- package/list/Grid/GridView.scss +28 -30
- package/nav/Tree/TreeView.scss +14 -11
- package/package.json +56 -56
- package/scss/fonts.scss +6 -0
- package/scss/mixins/button.scss +51 -25
- package/scss/mixins/index.scss +2 -1
- package/scss/mixins/scroll.scss +31 -0
- package/scss/mixins/typography.scss +26 -0
- package/scss/variables/common/colors.scss +87 -67
- package/scss/variables/common/media.scss +2 -0
- package/scss/variables/common/typography.scss +96 -28
- package/scss/variables/components/input.scss +7 -6
- package/scss/variables/index.scss +2 -2
- package/scss/variables/normalize.scss +21 -0
- package/typography/Text/TextView.d.ts +3 -0
- package/typography/Text/TextView.js +46 -0
- package/typography/Text/TextView.scss +16 -0
- package/typography/Title/TitleView.d.ts +3 -0
- package/typography/Title/TitleView.js +50 -0
- package/typography/Title/TitleView.scss +16 -0
- package/content/Collapse/CollapseItemView.d.ts +0 -2
- package/content/Collapse/CollapseItemView.js +0 -65
- package/content/Collapse/CollapseItemView.scss +0 -88
- package/content/Collapse/CollapseView.d.ts +0 -2
- package/content/Icon/IconView.scss +0 -25
- package/icon/fontawesome.d.ts +0 -2
- package/scss/mixins/card.scss +0 -26
- package/scss/variables/components/card.scss +0 -20
|
@@ -1,31 +1,200 @@
|
|
|
1
|
+
@import "../../scss/variables/";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--dropdown-background: #fff;
|
|
5
|
+
--dropdown-triangle-border: #eef1f2;
|
|
6
|
+
--dropdown-triangle-svg: url("data:image/svg+xml,%3Csvg width='21' height='11' viewBox='0 0 21 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.0416 0.5L10.1719 10.2567L1.30215 0.499998L19.0416 0.5Z' fill='white' stroke='%23EEF1F2'/%3E%3C/svg%3E%0A");
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
html[data-theme="dark"] {
|
|
10
|
+
--dropdown-background: #4e4f57;
|
|
11
|
+
--dropdown-triangle-border: transparent;
|
|
12
|
+
--dropdown-triangle-svg: url("data:image/svg+xml,%3Csvg width='21' height='11' viewBox='0 0 21 11' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.1719 11L0.171876 -1.74846e-06L20.1719 0L10.1719 11Z' fill='%234E4F57'/%3E%3C/svg%3E%0A");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
$dropdown-background: var(--dropdown-background);
|
|
16
|
+
$dropdown-triangle-border: var(--triangle-border);
|
|
17
|
+
$dropdown-triangle-svg: var(--dropdown-triangle-svg);
|
|
18
|
+
|
|
1
19
|
$gap: 12px;
|
|
2
20
|
|
|
21
|
+
%triangle {
|
|
22
|
+
content: "";
|
|
23
|
+
position: absolute;
|
|
24
|
+
width: 20px;
|
|
25
|
+
height: 11px;
|
|
26
|
+
z-index: 2;
|
|
27
|
+
background-image: $dropdown-triangle-svg;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
%borderShaper {
|
|
31
|
+
content: "";
|
|
32
|
+
position: absolute;
|
|
33
|
+
z-index: 3;
|
|
34
|
+
|
|
35
|
+
width: 16px;
|
|
36
|
+
height: 1px;
|
|
37
|
+
background-color: $dropdown-background;
|
|
38
|
+
border-left: 2px solid $dropdown-triangle-border;
|
|
39
|
+
border-right: 2px solid $dropdown-triangle-border;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@mixin drop($edge, $padding) {
|
|
43
|
+
@if ($edge == "top") {
|
|
44
|
+
&::before {
|
|
45
|
+
@extend %triangle;
|
|
46
|
+
|
|
47
|
+
top: 100%;
|
|
48
|
+
left: $padding;
|
|
49
|
+
transform: translateX(-50%);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&::after {
|
|
53
|
+
@extend %borderShaper;
|
|
54
|
+
|
|
55
|
+
top: 100%;
|
|
56
|
+
left: $padding;
|
|
57
|
+
transform: translateX(-50%);
|
|
58
|
+
}
|
|
59
|
+
} @else if ($edge == "bottom") {
|
|
60
|
+
&::before {
|
|
61
|
+
@extend %triangle;
|
|
62
|
+
|
|
63
|
+
top: 0;
|
|
64
|
+
left: $padding;
|
|
65
|
+
top: -11px;
|
|
66
|
+
transform: translateX(-50%) rotate(180deg);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::after {
|
|
70
|
+
@extend %borderShaper;
|
|
71
|
+
|
|
72
|
+
transform: translateX(-50%);
|
|
73
|
+
top: -1px;
|
|
74
|
+
left: $padding;
|
|
75
|
+
}
|
|
76
|
+
} @else if($edge == "left") {
|
|
77
|
+
&::before {
|
|
78
|
+
@extend %triangle;
|
|
79
|
+
|
|
80
|
+
left: 100%;
|
|
81
|
+
top: $padding;
|
|
82
|
+
transform: translateX(-22.5%) rotate(-90deg);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&::after {
|
|
86
|
+
@extend %borderShaper;
|
|
87
|
+
|
|
88
|
+
left: 100%;
|
|
89
|
+
top: $padding;
|
|
90
|
+
transform: rotate(-90deg) translate(-30%, -7.5px) ;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
@else if($edge == "right") {
|
|
94
|
+
&::before {
|
|
95
|
+
@extend %triangle;
|
|
96
|
+
|
|
97
|
+
right: 100%;
|
|
98
|
+
top: $padding;
|
|
99
|
+
transform: translateX(22.5%) rotate(90deg);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&::after {
|
|
103
|
+
@extend %borderShaper;
|
|
104
|
+
|
|
105
|
+
right: 100%;
|
|
106
|
+
top: $padding;
|
|
107
|
+
transform: rotate(-90deg) translate(-30%, 7.5px) ;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
3
112
|
.DropDownView {
|
|
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
|
-
|
|
113
|
+
$root: &;
|
|
114
|
+
|
|
115
|
+
z-index: 1000;
|
|
116
|
+
position: absolute;
|
|
117
|
+
|
|
118
|
+
transform: translate(0, 0);
|
|
119
|
+
opacity: 0;
|
|
120
|
+
transition: opacity 0.15s ease-in, transform 0.15s ease-in;
|
|
121
|
+
|
|
122
|
+
z-index: 4;
|
|
123
|
+
width: 200px;
|
|
124
|
+
padding: 12px;
|
|
125
|
+
border-radius: $radius-large;
|
|
126
|
+
background-color: $dropdown-background;
|
|
127
|
+
border: 1px solid $gray;
|
|
128
|
+
|
|
129
|
+
&_show {
|
|
130
|
+
opacity: 1;
|
|
131
|
+
}
|
|
132
|
+
&_position-top,
|
|
133
|
+
&_position-topLeft,
|
|
134
|
+
&_position-topRight {
|
|
135
|
+
transform: translateY(-$gap);
|
|
136
|
+
}
|
|
137
|
+
&_position-bottom,
|
|
138
|
+
&_position-bottomLeft,
|
|
139
|
+
&_position-bottomRight {
|
|
140
|
+
transform: translateY($gap);
|
|
141
|
+
}
|
|
142
|
+
&_position-left,
|
|
143
|
+
&_position-leftTop,
|
|
144
|
+
&_position-leftBottom {
|
|
145
|
+
transform: translateX(-$gap);
|
|
146
|
+
}
|
|
147
|
+
&_position-right,
|
|
148
|
+
&_position-rightTop,
|
|
149
|
+
&_position-rightBottom {
|
|
150
|
+
transform: translateX($gap);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&_position-top {
|
|
154
|
+
@include drop("top", 50%);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&_position-topLeft {
|
|
158
|
+
@include drop("top", 15%);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&_position-topRight {
|
|
162
|
+
@include drop("top", 85%);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&_position-bottom {
|
|
166
|
+
@include drop("bottom", 50%);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&_position-bottomLeft {
|
|
170
|
+
@include drop("bottom", 15%);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&_position-bottomRight {
|
|
174
|
+
@include drop("bottom", 85%);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&_position-left {
|
|
178
|
+
@include drop("left", 46.5%);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&_position-leftTop {
|
|
182
|
+
@include drop("left", 12.5%)
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&_position-leftBottom {
|
|
186
|
+
@include drop("left", 80%)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&_position-right {
|
|
190
|
+
@include drop("right", 46.5%);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
&_position-rightTop {
|
|
194
|
+
@include drop("right", 12.5%);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&_position-rightBottom {
|
|
198
|
+
@include drop("right", 80%);
|
|
199
|
+
}
|
|
31
200
|
}
|
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,17 +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("
|
|
42
|
-
|
|
43
|
-
(props.showLabelOnLoading || !props.isLoading) && (React.createElement("span", { className: bem.element('label') },
|
|
41
|
+
props.isLoading && (React.createElement(Icon_1["default"], { className: bem.element('loader'), name: 'loader', tabIndex: -1 })),
|
|
42
|
+
!props.isLoading && (React.createElement("span", { className: bem.element('label') },
|
|
44
43
|
props.icon && (React.createElement(Icon_1["default"], { name: props.icon, title: title, className: bem.element('icon', !props.label && 'without-label') })),
|
|
45
44
|
props.children))));
|
|
46
45
|
};
|
|
47
46
|
var renderBadge = function () {
|
|
48
|
-
|
|
47
|
+
var _a;
|
|
48
|
+
if (!props.badge || !props.badge.enable) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
-
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));
|
|
52
54
|
};
|
|
53
55
|
var className = bem(bem.block((_a = {
|
|
54
56
|
button: !props.link
|
|
@@ -61,14 +63,16 @@ function ButtonView(props) {
|
|
|
61
63
|
_a.submitting = props.submitting,
|
|
62
64
|
_a.loading = props.isLoading,
|
|
63
65
|
_a.failed = props.isFailed,
|
|
64
|
-
_a.link = props.
|
|
65
|
-
_a
|
|
66
|
+
_a.link = props.link,
|
|
67
|
+
_a.block = props.block,
|
|
68
|
+
_a["tag-".concat(props.tag)] = !!props.tag,
|
|
69
|
+
_a)), props.className);
|
|
66
70
|
if (props.tag === 'a') {
|
|
67
71
|
return (React.createElement("a", { className: className, href: props.url, onClick: props.onClick, style: props.style, target: props.target },
|
|
68
72
|
renderLabel(),
|
|
69
73
|
renderBadge()));
|
|
70
74
|
}
|
|
71
|
-
return (React.createElement("button", { title: props.hint, type: props.type, disabled: props.disabled, onClick: props.onClick, style: props.style, className: className },
|
|
75
|
+
return (React.createElement("button", { title: props.hint, type: props.type, disabled: props.disabled || props.isLoading, onClick: props.onClick, style: props.style, className: className },
|
|
72
76
|
renderLabel(),
|
|
73
77
|
renderBadge()));
|
|
74
78
|
}
|
|
@@ -1,96 +1,182 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
$btn-font-weight-sm: 400;
|
|
2
|
+
$btn-font-weight-lg: 800;
|
|
3
|
+
$btn-line-height: 24px;
|
|
4
|
+
$btn-letter-spacing: 0.1em;
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
transition-timing-function: ease-in-out;
|
|
6
|
+
.ButtonView {
|
|
7
|
+
$root: &;
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
user-select: none;
|
|
12
|
-
border: $button-border;
|
|
9
|
+
transition-property: color, background-color, border-color, box-shadow;
|
|
10
|
+
transition-duration: 0.15s;
|
|
11
|
+
transition-timing-function: ease-in-out;
|
|
13
12
|
|
|
14
|
-
padding: $button-padding-y $button-padding-x;
|
|
15
13
|
display: flex;
|
|
16
14
|
justify-content: center;
|
|
17
15
|
align-items: center;
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
&_button {
|
|
18
|
+
position: relative;
|
|
19
|
+
border-radius: $radius-small;
|
|
20
|
+
user-select: none;
|
|
21
|
+
border: 3px solid transparent;
|
|
22
|
+
|
|
23
|
+
padding: 0 20px;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
|
|
28
|
+
font-family: $font-family-nunito;
|
|
29
|
+
font-weight: $btn-font-weight-sm;
|
|
30
|
+
font-size: $font-size-sm;
|
|
31
|
+
line-height: $btn-line-height;
|
|
32
|
+
outline: none;
|
|
33
|
+
|
|
34
|
+
@each $colorName, $colorMap in $color-themes {
|
|
35
|
+
&#{$root}_color_#{$colorName} {
|
|
36
|
+
@include button-theme($colorMap, $colorName, $root);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@each $colorName, $colorMap in $color-themes {
|
|
41
|
+
&#{$root}_outline_#{$colorName} {
|
|
42
|
+
@include button-outline-theme($colorMap, $colorName, $root);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
21
46
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
47
|
+
&__label {
|
|
48
|
+
display: flex;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
align-items: center;
|
|
26
51
|
}
|
|
27
52
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
53
|
+
&_block {
|
|
54
|
+
display: block;
|
|
55
|
+
width: 100%;
|
|
56
|
+
|
|
57
|
+
#{$root}__label {
|
|
58
|
+
justify-content: center;
|
|
59
|
+
}
|
|
32
60
|
}
|
|
33
61
|
|
|
34
|
-
}
|
|
35
62
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
cursor: inherit;
|
|
63
|
+
|
|
64
|
+
&_tag {
|
|
65
|
+
&-a {
|
|
66
|
+
width: auto;
|
|
67
|
+
}
|
|
42
68
|
}
|
|
43
|
-
}
|
|
44
69
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
&_disabled {
|
|
71
|
+
opacity: 0.5;
|
|
72
|
+
color: rgba(0, 0, 0, 0.1);
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
|
|
75
|
+
input {
|
|
76
|
+
cursor: inherit;
|
|
77
|
+
}
|
|
49
78
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
79
|
+
|
|
80
|
+
&_size {
|
|
81
|
+
&_sm {
|
|
82
|
+
height: 34px;
|
|
83
|
+
font-size: $font-size-sm;
|
|
84
|
+
border-radius: $radius-small;
|
|
85
|
+
}
|
|
86
|
+
&_md {
|
|
87
|
+
height: 46px;
|
|
88
|
+
font-size: $font-size-base;
|
|
89
|
+
border-radius: $radius-large;
|
|
90
|
+
}
|
|
91
|
+
&_lg {
|
|
92
|
+
height: 56px;
|
|
93
|
+
font-size: $font-size-lg;
|
|
94
|
+
border-radius: $radius-large;
|
|
95
|
+
}
|
|
53
96
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
97
|
+
|
|
98
|
+
&_link {
|
|
99
|
+
display: inline;
|
|
100
|
+
width: auto;
|
|
101
|
+
height: auto;
|
|
102
|
+
#{$root}__label {
|
|
103
|
+
display: inline;
|
|
104
|
+
color: $link-color;
|
|
105
|
+
}
|
|
57
106
|
}
|
|
58
|
-
}
|
|
59
107
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
108
|
+
&__label {
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: row;
|
|
111
|
+
column-gap: 10px;
|
|
112
|
+
}
|
|
64
113
|
|
|
65
|
-
|
|
66
|
-
|
|
114
|
+
&__icon {
|
|
115
|
+
width: 16px;
|
|
116
|
+
height: 16px;
|
|
117
|
+
&_without-label {
|
|
118
|
+
margin: 0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&_failed {
|
|
123
|
+
&,
|
|
124
|
+
&:hover {
|
|
125
|
+
border-color: $danger;
|
|
126
|
+
box-shadow: 0 0 1rem rgba($danger, 0.2);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&__preloader {
|
|
131
|
+
position: absolute;
|
|
132
|
+
top: 50%;
|
|
133
|
+
left: 50%;
|
|
134
|
+
transform: translate(-50%, -50%);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&__badge {
|
|
138
|
+
position: relative;
|
|
139
|
+
top: -1px;
|
|
140
|
+
margin-left: 4px;
|
|
141
|
+
border-radius: $radius-small;
|
|
142
|
+
font-size: $font-size-xs;
|
|
143
|
+
line-height: 16px;
|
|
144
|
+
padding: 3px 5px;
|
|
145
|
+
|
|
146
|
+
$badge-types: (
|
|
147
|
+
"primary": $primary,
|
|
148
|
+
"secondary": $secondary,
|
|
149
|
+
"success": $success,
|
|
150
|
+
"danger": $danger,
|
|
151
|
+
"warning": $warning,
|
|
152
|
+
"info": $info,
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
@each $type, $color in $badge-types {
|
|
156
|
+
&_#{$type} {
|
|
157
|
+
background-color: $color;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
67
161
|
|
|
68
|
-
&
|
|
69
|
-
|
|
162
|
+
&__loader {
|
|
163
|
+
width: 24px;
|
|
164
|
+
height: 24px;
|
|
165
|
+
display: flex;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
align-items: center;
|
|
168
|
+
|
|
169
|
+
svg {
|
|
170
|
+
width: 14px;
|
|
171
|
+
height: 14px;
|
|
172
|
+
transform-origin: center;
|
|
173
|
+
animation: rotate 1.45s linear infinite;
|
|
174
|
+
}
|
|
70
175
|
}
|
|
71
|
-
|
|
176
|
+
}
|
|
72
177
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
box-shadow: 0 0 1rem rgba($danger, .2);
|
|
178
|
+
@keyframes rotate {
|
|
179
|
+
100% {
|
|
180
|
+
transform: rotate(360deg);
|
|
77
181
|
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&_loading &__label {
|
|
81
|
-
opacity: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&__preloader {
|
|
85
|
-
position: absolute;
|
|
86
|
-
top: 50%;
|
|
87
|
-
left: 50%;
|
|
88
|
-
transform: translate(-50%, -50%);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&__badge {
|
|
92
|
-
position: relative;
|
|
93
|
-
top: -1px;
|
|
94
|
-
margin-left: 4px;
|
|
95
|
-
}
|
|
96
182
|
}
|
|
@@ -43,9 +43,12 @@ var useUniqueId_1 = __importDefault(require("@steroidsjs/core/hooks/useUniqueId"
|
|
|
43
43
|
function CheckboxFieldView(props) {
|
|
44
44
|
var bem = (0, hooks_1.useBem)('CheckboxFieldView');
|
|
45
45
|
var id = (0, useUniqueId_1["default"])('checkbox');
|
|
46
|
-
return (React.createElement("div", { className: bem(bem.block({
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
return (React.createElement("div", { className: bem(bem.block({
|
|
47
|
+
size: props.size,
|
|
48
|
+
hasErrors: !!props.errors
|
|
49
|
+
}), props.className), style: props.style, onClick: props.onChange },
|
|
50
|
+
React.createElement("input", __assign({ className: bem.element('input'), id: id }, props.inputProps, { disabled: props.disabled, required: props.required })),
|
|
51
|
+
React.createElement("label", { className: bem.element('label'), htmlFor: id },
|
|
49
52
|
React.createElement("span", { className: bem.element('label-text', { required: props.required }) }, props.label))));
|
|
50
53
|
}
|
|
51
54
|
exports["default"] = CheckboxFieldView;
|