@steroidsjs/bootstrap 3.0.0-beta.3 → 3.0.0-beta.30
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 +9 -10
- 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,102 +1,208 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--number-field-arrow-color: #414141;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
html[data-theme="dark"] {
|
|
6
|
+
--number-field-arrow-color: #ffffff;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
$number-field-arrow-color: var(--number-field-arrow-color);
|
|
10
|
+
|
|
1
11
|
.NumberFieldView {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
&_disabled {
|
|
18
|
-
color: rgba(0, 0, 0, .25);
|
|
19
|
-
background-color: $back-disabled;
|
|
20
|
-
border: unset;
|
|
21
|
-
cursor: not-allowed;
|
|
22
|
-
|
|
23
|
-
&:active, &:hover {
|
|
24
|
-
border: unset;
|
|
25
|
-
box-shadow: unset;
|
|
12
|
+
$root: &;
|
|
13
|
+
display: flex;
|
|
14
|
+
position: relative;
|
|
15
|
+
padding: 0;
|
|
16
|
+
|
|
17
|
+
font-family: $font-family-nunito;
|
|
18
|
+
|
|
19
|
+
// Hide default arrows
|
|
20
|
+
/* Chrome, Safari, Edge, Opera */
|
|
21
|
+
input::-webkit-outer-spin-button,
|
|
22
|
+
input::-webkit-inner-spin-button {
|
|
23
|
+
-webkit-appearance: none;
|
|
24
|
+
margin: 0;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
/* Firefox */
|
|
28
|
+
input[type="number"] {
|
|
29
|
+
-moz-appearance: textfield;
|
|
30
30
|
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Hide default arrows
|
|
34
|
-
/* Chrome, Safari, Edge, Opera */
|
|
35
|
-
input::-webkit-outer-spin-button,
|
|
36
|
-
input::-webkit-inner-spin-button {
|
|
37
|
-
-webkit-appearance: none;
|
|
38
|
-
margin: 0;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* Firefox */
|
|
42
|
-
input[type=number] {
|
|
43
|
-
-moz-appearance: textfield;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&__input {
|
|
47
|
-
flex-grow: 1;
|
|
48
|
-
border: none;
|
|
49
|
-
outline: none;
|
|
50
|
-
background-color: transparent;
|
|
51
|
-
color: $heading;
|
|
52
|
-
|
|
53
|
-
width: inherit;
|
|
54
|
-
padding: $input-padding-y $input-padding-x;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&__arrows-container{
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-flow: column;
|
|
60
|
-
grid-gap: 2px;
|
|
61
|
-
font-size: .6em;
|
|
62
|
-
|
|
63
|
-
opacity: 0;
|
|
64
|
-
pointer-events: none;
|
|
65
|
-
transition: opacity .15s;
|
|
66
|
-
}
|
|
67
|
-
&:hover &__arrows-container{
|
|
68
|
-
opacity: 1;
|
|
69
|
-
pointer-events: all;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&__arrow{
|
|
73
|
-
padding: $input-padding-y $input-padding-x;
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
height: 50%;
|
|
76
31
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
32
|
+
&__arrows-container {
|
|
33
|
+
position: absolute;
|
|
34
|
+
z-index: 2;
|
|
35
|
+
right: 0;
|
|
36
|
+
top: 0;
|
|
37
|
+
height: 100%;
|
|
38
|
+
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
align-items: center;
|
|
43
|
+
|
|
44
|
+
transition: opacity 150ms ease-in-out;
|
|
45
|
+
opacity: 0;
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&__arrow {
|
|
50
|
+
width: 30px;
|
|
51
|
+
height: 16px;
|
|
52
|
+
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
outline: none;
|
|
57
|
+
border: none;
|
|
58
|
+
background: transparent;
|
|
59
|
+
|
|
60
|
+
span > svg > path {
|
|
61
|
+
stroke: $number-field-arrow-color;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&_disabled {
|
|
65
|
+
span {
|
|
66
|
+
cursor: not-allowed;
|
|
67
|
+
}
|
|
68
|
+
span > svg > path {
|
|
69
|
+
stroke: $background-disabled-color;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:last-child {
|
|
74
|
+
transform: rotate(180deg);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&_size {
|
|
79
|
+
&_lg {
|
|
80
|
+
#{$root} {
|
|
81
|
+
&__input {
|
|
82
|
+
height: 56px;
|
|
83
|
+
border-radius: $radius-large;
|
|
84
|
+
font-size: $font-size-lg;
|
|
85
|
+
|
|
86
|
+
&-effects {
|
|
87
|
+
border-radius: $radius-large;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&__arrow {
|
|
92
|
+
transform: translateX(-3px) translateY(6px);
|
|
93
|
+
|
|
94
|
+
&:last-child {
|
|
95
|
+
transform: translateX(-3px) translateY(-8px) rotate(180deg);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&_md {
|
|
102
|
+
#{$root} {
|
|
103
|
+
&__input {
|
|
104
|
+
height: 46px;
|
|
105
|
+
border-radius: $radius-large;
|
|
106
|
+
font-size: $font-size-base;
|
|
107
|
+
|
|
108
|
+
&-effects {
|
|
109
|
+
border-radius: $radius-large;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&__arrow {
|
|
114
|
+
transform: translateX(-3px) translateY(4px) scale(0.8);
|
|
115
|
+
|
|
116
|
+
&:last-child {
|
|
117
|
+
transform: translateX(-3px) translateY(-4px) rotate(180deg) scale(0.8);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&_sm {
|
|
124
|
+
#{$root} {
|
|
125
|
+
&__input {
|
|
126
|
+
height: 34px;
|
|
127
|
+
font-size: $font-size-sm;
|
|
128
|
+
|
|
129
|
+
&-effects {
|
|
130
|
+
border-radius: $radius-small;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&__arrow {
|
|
135
|
+
transform: translateX(1px) translateY(2px) scale(0.8);
|
|
136
|
+
|
|
137
|
+
&:last-child {
|
|
138
|
+
transform: translateX(1px) translateY(-3px) rotate(180deg) scale(0.8);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&__input {
|
|
146
|
+
width: 100%;
|
|
147
|
+
outline: none;
|
|
148
|
+
border: 1px solid $border-color;
|
|
149
|
+
border-radius: $radius-small;
|
|
150
|
+
padding: 5px 22px 5px 8px;
|
|
151
|
+
line-height: 24px;
|
|
152
|
+
z-index: 1;
|
|
153
|
+
font-weight: $font-weight-sm;
|
|
154
|
+
color: $text-color;
|
|
155
|
+
|
|
156
|
+
background-color: $element-background-color;
|
|
157
|
+
|
|
158
|
+
&::placeholder {
|
|
159
|
+
color: $placeholder-color;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&:disabled {
|
|
163
|
+
background-color: $background-disabled-color;
|
|
164
|
+
color: $placeholder-disabled-color;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&:hover:not(:disabled):not(:focus) {
|
|
168
|
+
border-color: $border-color-hover;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&:active:not(:disabled) {
|
|
172
|
+
border: 1px solid $primary;
|
|
88
173
|
}
|
|
89
|
-
}
|
|
90
174
|
}
|
|
91
175
|
|
|
92
|
-
|
|
93
|
-
|
|
176
|
+
&:focus-within #{$root}__arrows-container {
|
|
177
|
+
opacity: 1;
|
|
178
|
+
pointer-events: all;
|
|
94
179
|
}
|
|
95
180
|
|
|
96
|
-
|
|
97
|
-
|
|
181
|
+
&__input-effects {
|
|
182
|
+
position: absolute;
|
|
183
|
+
display: block;
|
|
184
|
+
z-index: 5;
|
|
185
|
+
top: 0;
|
|
186
|
+
left: 0;
|
|
187
|
+
|
|
188
|
+
width: 100%;
|
|
189
|
+
height: 100%;
|
|
190
|
+
background-color: transparent;
|
|
191
|
+
border: 4px solid $primary-light;
|
|
192
|
+
opacity: 0;
|
|
193
|
+
pointer-events: none;
|
|
98
194
|
}
|
|
99
195
|
|
|
100
|
-
|
|
101
|
-
|
|
196
|
+
&__input:focus ~ &__input-effects {
|
|
197
|
+
opacity: 1;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&__input:active ~ &__input-effects {
|
|
201
|
+
opacity: 0;
|
|
202
|
+
}
|
|
102
203
|
|
|
204
|
+
&_filled #{$root}__arrows-container {
|
|
205
|
+
opacity: 1;
|
|
206
|
+
pointer-events: all;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -42,15 +42,17 @@ var Icon_1 = __importDefault(require("@steroidsjs/core/ui/content/Icon"));
|
|
|
42
42
|
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
43
43
|
function PasswordFieldView(props) {
|
|
44
44
|
var bem = (0, hooks_1.useBem)('PasswordFieldView');
|
|
45
|
-
return (React.createElement("div", { className: bem(bem.block(
|
|
46
|
-
|
|
45
|
+
return (React.createElement("div", { className: bem(bem.block({
|
|
46
|
+
size: props.size,
|
|
47
|
+
filled: !!props.inputProps.value,
|
|
48
|
+
disabled: props.inputProps.disabled
|
|
49
|
+
}), props.className) },
|
|
50
|
+
React.createElement("div", { className: bem.element('container', {
|
|
47
51
|
disabled: props.inputProps.disabled
|
|
48
|
-
})
|
|
49
|
-
React.createElement("input", __assign({ className: bem
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
React.createElement(Icon_1["default"], { name: props.inputProps.type === 'password' ? 'securityEye' : 'securityEyeSlash' })))),
|
|
54
|
-
props.security && (React.createElement("div", { className: bem.element('security-bar', props.securityLevel) }))));
|
|
52
|
+
}) },
|
|
53
|
+
React.createElement("input", __assign({ className: bem.element('input') }, props.inputProps, { id: props.id })),
|
|
54
|
+
props.showSecurityIcon && (React.createElement("span", { className: bem(bem.element('icon-eye')), onMouseDown: props.onShowPassword, onMouseUp: props.onHidePassword },
|
|
55
|
+
React.createElement(Icon_1["default"], { name: props.inputProps.type === 'password' ? 'crossed-out-eye' : 'visible-eye' })))),
|
|
56
|
+
props.showSecurityBar && (React.createElement("div", { className: bem.element('security-bar', props.securityLevel) }))));
|
|
55
57
|
}
|
|
56
58
|
exports["default"] = PasswordFieldView;
|
|
@@ -1,76 +1,244 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--security-bar-background: #eef1f2;
|
|
3
|
+
--eye-default-color: #eef1f2;
|
|
4
|
+
--eye-filled-color: #323232;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
html[data-theme="dark"] {
|
|
8
|
+
--security-bar-background: #5b5c6b;
|
|
9
|
+
--eye-default-color: #5b5c6b;
|
|
10
|
+
--eye-filled-color: #ffffff;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
$security-bar-background: var(--security-bar-background);
|
|
14
|
+
$eye-default-color: var(--eye-default-color);
|
|
15
|
+
$eye-filled-color: var(--eye-filled-color);
|
|
16
|
+
|
|
1
17
|
.PasswordFieldView {
|
|
18
|
+
$root: &;
|
|
19
|
+
|
|
20
|
+
position: relative;
|
|
21
|
+
line-height: 24px;
|
|
22
|
+
font-weight: $font-weight-sm;
|
|
23
|
+
|
|
24
|
+
&__container {
|
|
25
|
+
position: relative;
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 34px;
|
|
28
|
+
|
|
29
|
+
&::before {
|
|
30
|
+
position: absolute;
|
|
31
|
+
content: "";
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
2
34
|
|
|
35
|
+
transform: translate(-4px, -4px);
|
|
3
36
|
|
|
4
|
-
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-flow: row nowrap;
|
|
7
|
-
align-items: stretch;
|
|
8
|
-
padding: 0;
|
|
37
|
+
border-radius: 16px;
|
|
9
38
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
39
|
+
border: 4px solid $primary-light;
|
|
40
|
+
transition: opacity 150ms ease-in-out;
|
|
41
|
+
opacity: 0;
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:focus-within:not(&_disabled):not(:active)::before {
|
|
46
|
+
opacity: 1;
|
|
47
|
+
}
|
|
14
48
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
49
|
+
|
|
50
|
+
&__input {
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
border-radius: $radius-small;
|
|
54
|
+
border: 1px solid $border-color;
|
|
55
|
+
outline: none;
|
|
56
|
+
padding-left: 8px;
|
|
57
|
+
padding-right: 42px;
|
|
58
|
+
|
|
59
|
+
background-color: $element-background-color;
|
|
60
|
+
color: $text-color;
|
|
61
|
+
|
|
62
|
+
&::placeholder {
|
|
63
|
+
color: $placeholder-color;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&:hover {
|
|
67
|
+
border: 1px solid $border-color-hover;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:not(:disabled):active {
|
|
71
|
+
border: 1px solid $primary;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&:not(:disabled):focus {
|
|
75
|
+
border-color: transparent;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:disabled {
|
|
79
|
+
border: none;
|
|
80
|
+
background-color: $background-disabled-color;
|
|
81
|
+
}
|
|
18
82
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
83
|
+
|
|
84
|
+
&_size {
|
|
85
|
+
&_lg {
|
|
86
|
+
#{$root}__container {
|
|
87
|
+
height: 56px;
|
|
88
|
+
|
|
89
|
+
&::before {
|
|
90
|
+
border-radius: 16px;
|
|
91
|
+
transform: translateX(-2%) translateY(-6.5%)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
#{$root}__input {
|
|
96
|
+
border-radius: $radius-large;
|
|
97
|
+
font-size: $font-size-lg;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&_md {
|
|
103
|
+
#{$root}__container {
|
|
104
|
+
height: 46px;
|
|
105
|
+
|
|
106
|
+
&::before {
|
|
107
|
+
border-radius: 16px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
#{$root}__input {
|
|
112
|
+
border-radius: $radius-large;
|
|
113
|
+
font-size: $font-size-base;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&_sm {
|
|
119
|
+
#{$root}__container {
|
|
120
|
+
height: $input-height-sm;
|
|
121
|
+
|
|
122
|
+
&::before {
|
|
123
|
+
border-radius: 12px;
|
|
124
|
+
transform: translateX(-2%) translateY(-9.5%);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
#{$root}__input {
|
|
129
|
+
border-radius: $radius-small;
|
|
130
|
+
font-size: $font-size-sm;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
}
|
|
26
134
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
135
|
+
|
|
136
|
+
&__security-bar {
|
|
137
|
+
position: relative;
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 4px;
|
|
140
|
+
border-radius: 4px;
|
|
141
|
+
margin-top: 8px;
|
|
142
|
+
|
|
143
|
+
background-color: $security-bar-background;
|
|
144
|
+
|
|
145
|
+
&::before {
|
|
146
|
+
content: "";
|
|
147
|
+
position: absolute;
|
|
148
|
+
width: 0%;
|
|
149
|
+
height: 4px;
|
|
150
|
+
border-radius: 4px;
|
|
151
|
+
transition: width 1s ease-in-out;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&_danger::before {
|
|
155
|
+
width: 33%;
|
|
156
|
+
background-color: $danger;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&_warning::before {
|
|
160
|
+
width: 66%;
|
|
161
|
+
background-color: $warning;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&_success::before {
|
|
165
|
+
width: 100%;
|
|
166
|
+
background-color: $success;
|
|
167
|
+
}
|
|
48
168
|
}
|
|
49
169
|
|
|
50
|
-
&
|
|
51
|
-
|
|
52
|
-
|
|
170
|
+
&__icon-eye {
|
|
171
|
+
outline: none;
|
|
172
|
+
border: none;
|
|
173
|
+
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
position: absolute;
|
|
176
|
+
right: 8px;
|
|
177
|
+
top: 50%;
|
|
178
|
+
transform: translateY(-50%);
|
|
53
179
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
180
|
+
|
|
181
|
+
&__icon-eye {
|
|
182
|
+
width: 24px;
|
|
183
|
+
height: 24px;
|
|
184
|
+
|
|
185
|
+
svg {
|
|
186
|
+
path {
|
|
187
|
+
fill: $eye-default-color;
|
|
188
|
+
|
|
189
|
+
&:last-child {
|
|
190
|
+
stroke: $eye-default-color;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&:active {
|
|
196
|
+
svg {
|
|
197
|
+
path {
|
|
198
|
+
fill: inherit;
|
|
199
|
+
stroke: $eye-default-color;
|
|
200
|
+
}
|
|
201
|
+
circle {
|
|
202
|
+
stroke: $eye-default-color;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
66
206
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
207
|
+
|
|
208
|
+
&_filled {
|
|
209
|
+
#{$root}__icon-eye {
|
|
210
|
+
svg {
|
|
211
|
+
path {
|
|
212
|
+
fill: $eye-filled-color;
|
|
213
|
+
|
|
214
|
+
&:last-child {
|
|
215
|
+
stroke: $eye-filled-color;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
&:active {
|
|
221
|
+
svg {
|
|
222
|
+
path {
|
|
223
|
+
fill: inherit;
|
|
224
|
+
stroke: $eye-filled-color;
|
|
225
|
+
}
|
|
226
|
+
circle {
|
|
227
|
+
stroke: $eye-filled-color;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
70
232
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
233
|
+
|
|
234
|
+
&_disabled {
|
|
235
|
+
#{$root}__icon-eye,
|
|
236
|
+
#{$root}__security-bar {
|
|
237
|
+
opacity: 0;
|
|
238
|
+
|
|
239
|
+
&::before {
|
|
240
|
+
opacity: 0;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
74
243
|
}
|
|
75
|
-
|
|
76
|
-
}
|
|
244
|
+
}
|
|
@@ -43,10 +43,17 @@ var useUniqueId_1 = __importDefault(require("@steroidsjs/core/hooks/useUniqueId"
|
|
|
43
43
|
function RadioListFieldView(props) {
|
|
44
44
|
var bem = (0, hooks_1.useBem)('RadioListFieldView');
|
|
45
45
|
var prefix = (0, useUniqueId_1["default"])('radio');
|
|
46
|
-
return (React.createElement("div", { className: bem.block() }, props.items.map(function (item) { return (React.createElement("div", { key: typeof item.id !== 'boolean' ? item.id : (item.id ? 'true' : 'false'), className: '
|
|
47
|
-
|
|
46
|
+
return (React.createElement("div", { className: bem(bem.block(), props.className) }, props.items.map(function (item, index) { return (React.createElement("div", { key: typeof item.id !== 'boolean' ? item.id : (item.id ? 'true' : 'false'), className: bem(bem.element('item', {
|
|
47
|
+
hasError: !!props.errors,
|
|
48
|
+
size: props.size
|
|
49
|
+
})) },
|
|
50
|
+
React.createElement("input", __assign({}, props.inputProps, { id: "".concat(prefix, "_").concat(item.id), tabIndex: index, className: bem(bem.element('input', {
|
|
51
|
+
checked: props.selectedIds.includes(item.id)
|
|
52
|
+
})), checked: props.selectedIds.includes(item.id), disabled: props.disabled || item.disabled, onChange: function () {
|
|
48
53
|
props.onItemSelect(item.id);
|
|
49
54
|
} })),
|
|
50
|
-
React.createElement("label", {
|
|
55
|
+
React.createElement("label", { htmlFor: "".concat(prefix, "_").concat(item.id), className: bem.element('label') },
|
|
56
|
+
React.createElement("span", { className: bem.element('ellipse') }),
|
|
57
|
+
item.label))); })));
|
|
51
58
|
}
|
|
52
59
|
exports["default"] = RadioListFieldView;
|