@steroidsjs/bootstrap 3.0.0-beta.15 → 3.0.0-beta.16
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 +2 -2
- package/content/Accordion/AccordionItemView.scss +3 -8
- package/content/Alert/AlertView.scss +1 -1
- package/content/Badge/BadgeView.scss +18 -12
- package/content/DropDown/DropDownView.js +6 -3
- package/content/DropDown/DropDownView.scss +150 -13
- package/form/Button/ButtonView.js +4 -3
- package/form/Button/ButtonView.scss +21 -9
- package/form/CheckboxField/CheckboxFieldView.scss +1 -0
- package/package.json +1 -1
- package/scss/variables/index.scss +0 -1
|
@@ -86,11 +86,11 @@ function AccordionItemView(props) {
|
|
|
86
86
|
React.createElement("div", { className: bem.element('header-container'), onClick: handleHeaderClick },
|
|
87
87
|
React.createElement("div", { className: bem.element('title-container') },
|
|
88
88
|
React.createElement("p", null, props.title)),
|
|
89
|
-
React.createElement("div", { className: bem.element('icon-wrapper') }, props.
|
|
89
|
+
props.showIcon && (React.createElement("div", { className: bem.element('icon-wrapper') }, props.icon
|
|
90
90
|
? renderIcon()
|
|
91
91
|
: (React.createElement(Icon_1["default"], { className: bem.element('icon', {
|
|
92
92
|
active: !props.disabled && props.isShowMore
|
|
93
|
-
}), name: "accordion-chevron" })))),
|
|
93
|
+
}), name: "accordion-chevron" }))))),
|
|
94
94
|
React.createElement("div", { className: bem.element('content', { visible: !props.disabled && props.isShowMore }) }, props.children)));
|
|
95
95
|
}
|
|
96
96
|
exports["default"] = AccordionItemView;
|
|
@@ -140,7 +140,7 @@ $accordion-chevron-color: var(--accordion-chevron-color);
|
|
|
140
140
|
|
|
141
141
|
&__title-container {
|
|
142
142
|
width: 100%;
|
|
143
|
-
padding:
|
|
143
|
+
padding: 16px;
|
|
144
144
|
align-self: center;
|
|
145
145
|
font-size: $font-size-lg;
|
|
146
146
|
line-height: 24px;
|
|
@@ -164,21 +164,16 @@ $accordion-chevron-color: var(--accordion-chevron-color);
|
|
|
164
164
|
transition: all 200ms ease;
|
|
165
165
|
overflow: hidden;
|
|
166
166
|
max-height: 0;
|
|
167
|
-
padding: 0
|
|
167
|
+
padding: 0 16px;
|
|
168
168
|
color: #343a40;
|
|
169
169
|
|
|
170
170
|
&_visible {
|
|
171
171
|
max-height: 1024px;
|
|
172
|
-
padding: 18px 32px 18px
|
|
172
|
+
padding: 18px 32px 18px 16px;
|
|
173
173
|
border: 1px solid rgba(#000, 0.1);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
&__close-icon,
|
|
178
|
-
&__open-icon {
|
|
179
|
-
transition: opacity 150ms ease-in-out;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
177
|
&__close-icon {
|
|
183
178
|
position: absolute;
|
|
184
179
|
opacity: 0;
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
&_large {
|
|
60
|
-
padding:
|
|
60
|
+
padding: 4px 8px;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&_medium {
|
|
64
|
-
padding:
|
|
64
|
+
padding: 2px 8px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
&_small {
|
|
68
|
-
padding: 0
|
|
68
|
+
padding: 0 8px;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
&_has-counter {
|
|
@@ -74,13 +74,7 @@
|
|
|
74
74
|
|
|
75
75
|
background: $light-gray;
|
|
76
76
|
color: $text-color;
|
|
77
|
-
padding:
|
|
78
|
-
|
|
79
|
-
#{$root}__counter-content {
|
|
80
|
-
background: $white;
|
|
81
|
-
padding: $spacing-2 5px;
|
|
82
|
-
border-radius: 20px;
|
|
83
|
-
}
|
|
77
|
+
padding: 4px 12px;
|
|
84
78
|
|
|
85
79
|
#{$root}__message {
|
|
86
80
|
margin-right: 8px;
|
|
@@ -88,11 +82,23 @@
|
|
|
88
82
|
|
|
89
83
|
#{$root}__counter {
|
|
90
84
|
margin-right: 8px;
|
|
85
|
+
width: 18px;
|
|
86
|
+
background-color: $white;
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
align-items: center;
|
|
90
|
+
border-radius: $radius-circle;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
#{$root}__counter-content {
|
|
94
|
+
font-weight: $font-weight-sm;
|
|
95
|
+
font-size: $font-size-xs;
|
|
96
|
+
line-height: 16px;
|
|
91
97
|
}
|
|
92
98
|
|
|
93
|
-
#{$root}__close {
|
|
99
|
+
#{$root}__close {
|
|
94
100
|
svg {
|
|
95
|
-
path {
|
|
101
|
+
path {
|
|
96
102
|
stroke: #000;
|
|
97
103
|
}
|
|
98
104
|
}
|
|
@@ -42,9 +42,12 @@ function DropDownView(props) {
|
|
|
42
42
|
var contentProps = (0, react_1.useMemo)(function () { return ({
|
|
43
43
|
onClose: props.onClose
|
|
44
44
|
}); }, [props.onClose]);
|
|
45
|
-
var content
|
|
46
|
-
if (
|
|
47
|
-
content =
|
|
45
|
+
var content;
|
|
46
|
+
if (props.content) {
|
|
47
|
+
content = props.content();
|
|
48
|
+
if ((0, isFunction_1["default"])(content)) {
|
|
49
|
+
content = ui.renderView(content, contentProps);
|
|
50
|
+
}
|
|
48
51
|
}
|
|
49
52
|
return (React.createElement("div", { ref: props.forwardedRef, className: bem(bem.block((_a = {
|
|
50
53
|
show: props.isComponentVisible
|
|
@@ -1,18 +1,117 @@
|
|
|
1
1
|
@import "../../scss/variables/";
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
|
-
--
|
|
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");
|
|
5
7
|
|
|
6
8
|
html[data-theme="dark"] {
|
|
7
|
-
--
|
|
9
|
+
--dropdown-background: #4e4f57;
|
|
10
|
+
--dropdown-triangle-border: transparent;
|
|
11
|
+
--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");
|
|
8
12
|
}
|
|
9
13
|
}
|
|
10
14
|
|
|
11
|
-
$
|
|
15
|
+
$dropdown-background: var(--dropdown-background);
|
|
16
|
+
$dropdown-triangle-border: var(--triangle-border);
|
|
17
|
+
$dropdown-triangle-svg: var(--dropdown-triangle-svg);
|
|
12
18
|
|
|
13
19
|
$gap: 12px;
|
|
14
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
|
+
|
|
15
112
|
.DropDownView {
|
|
113
|
+
$root: &;
|
|
114
|
+
|
|
16
115
|
z-index: 1000;
|
|
17
116
|
position: absolute;
|
|
18
117
|
|
|
@@ -20,10 +119,11 @@ $gap: 12px;
|
|
|
20
119
|
opacity: 0;
|
|
21
120
|
transition: opacity 0.15s ease-in, transform 0.15s ease-in;
|
|
22
121
|
|
|
122
|
+
z-index: 4;
|
|
23
123
|
width: 200px;
|
|
24
124
|
padding: 12px;
|
|
25
125
|
border-radius: $radius-large;
|
|
26
|
-
background-color: $
|
|
126
|
+
background-color: $dropdown-background;
|
|
27
127
|
border: 1px solid $gray;
|
|
28
128
|
|
|
29
129
|
&_show {
|
|
@@ -50,14 +150,51 @@ $gap: 12px;
|
|
|
50
150
|
transform: translateX($gap);
|
|
51
151
|
}
|
|
52
152
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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%);
|
|
62
199
|
}
|
|
63
200
|
}
|
|
@@ -57,10 +57,11 @@ function ButtonView(props) {
|
|
|
57
57
|
_a.size = props.size,
|
|
58
58
|
_a.disabled = props.disabled,
|
|
59
59
|
_a.submitting = props.submitting,
|
|
60
|
-
_a.loading =
|
|
60
|
+
_a.loading = props.isLoading,
|
|
61
61
|
_a.failed = props.isFailed,
|
|
62
|
-
_a.link = props.
|
|
63
|
-
_a
|
|
62
|
+
_a.link = props.link,
|
|
63
|
+
_a.block = props.block,
|
|
64
|
+
_a)), props.className);
|
|
64
65
|
if (props.tag === 'a') {
|
|
65
66
|
return (React.createElement("a", { className: className, href: props.url, onClick: props.onClick, style: props.style, target: props.target },
|
|
66
67
|
renderLabel(),
|
|
@@ -42,6 +42,23 @@ $btn-letter-spacing: 0.1em;
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
&_block {
|
|
46
|
+
display: block;
|
|
47
|
+
width: 100%;
|
|
48
|
+
|
|
49
|
+
#{$root}__label {
|
|
50
|
+
justify-content: center;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&_link {
|
|
55
|
+
display: inline;
|
|
56
|
+
width: auto;
|
|
57
|
+
#{$root}__label {
|
|
58
|
+
display: inline;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
45
62
|
&_disabled {
|
|
46
63
|
opacity: 0.5;
|
|
47
64
|
color: rgba(0, 0, 0, 0.25);
|
|
@@ -69,9 +86,10 @@ $btn-letter-spacing: 0.1em;
|
|
|
69
86
|
}
|
|
70
87
|
}
|
|
71
88
|
|
|
72
|
-
&
|
|
73
|
-
|
|
74
|
-
|
|
89
|
+
&__label {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: row;
|
|
92
|
+
column-gap: 10px;
|
|
75
93
|
}
|
|
76
94
|
|
|
77
95
|
&__icon {
|
|
@@ -107,12 +125,6 @@ $btn-letter-spacing: 0.1em;
|
|
|
107
125
|
animation: rotate 1.45s linear infinite;
|
|
108
126
|
}
|
|
109
127
|
}
|
|
110
|
-
|
|
111
|
-
&__label {
|
|
112
|
-
display: flex;
|
|
113
|
-
flex-direction: row;
|
|
114
|
-
column-gap: 10px;
|
|
115
|
-
}
|
|
116
128
|
}
|
|
117
129
|
|
|
118
130
|
@keyframes rotate {
|
package/package.json
CHANGED