@kws3/ui 4.4.0-alpha.2 → 4.4.0-alpha.4
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/controls/FileUpload.svelte +7 -4
- package/controls/RangeSlider.svelte +1 -1
- package/controls/Toggle.svelte +0 -6
- package/controls/ToggleButtons.svelte +2 -43
- package/forms/AutoComplete.svelte +1 -1
- package/forms/actions.d.ts +28 -5
- package/forms/actions.d.ts.map +1 -1
- package/forms/actions.js +21 -7
- package/forms/colorpicker/Colorpicker.svelte +1 -1
- package/helpers/Skeleton.svelte +3 -3
- package/helpers/Timeline/TimelineItem.svelte +2 -2
- package/package.json +2 -2
- package/styles/ActionSheet.scss +7 -6
- package/styles/AutoComplete.scss +45 -51
- package/styles/Canvas.scss +3 -4
- package/styles/Chart.scss +5 -5
- package/styles/CheckRadio.scss +32 -36
- package/styles/Colorpicker.scss +31 -9
- package/styles/DataSearch.scss +14 -7
- package/styles/DataSort.scss +4 -2
- package/styles/Datepicker.scss +36 -31
- package/styles/Divider.scss +16 -16
- package/styles/FileUpload.scss +37 -53
- package/styles/FloatingUI.scss +73 -31
- package/styles/Grid.scss +44 -44
- package/styles/Loader.scss +28 -26
- package/styles/Pagination.scss +52 -34
- package/styles/Panel.scss +16 -14
- package/styles/RangeSlider.scss +56 -56
- package/styles/Select.scss +38 -39
- package/styles/Skeleton.scss +56 -22
- package/styles/SlidingPane.scss +3 -1
- package/styles/Timeline.scss +25 -17
- package/styles/Timepicker.scss +18 -29
- package/styles/Toggle.scss +29 -32
- package/styles/ToggleButtons.scss +50 -0
- package/styles/Tooltip.scss +26 -24
- package/types/type-defs/index.d.ts +1 -1
package/styles/CheckRadio.scss
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
@use "bulma/sass/utilities/css-variables" as cv;
|
|
2
2
|
@use "bulma/sass/utilities/derived-variables" as dv;
|
|
3
|
-
@use "bulma/sass/utilities/functions" as fn;
|
|
4
3
|
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
|
|
9
|
-
) !default;
|
|
10
|
-
$
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#{cv.getVar("focus-l")},
|
|
16
|
-
#{cv.getVar("focus-shadow-alpha")}
|
|
4
|
+
$theme-colors: dv.$colors !default;
|
|
5
|
+
$check-color: cv.getVar("text") !default;
|
|
6
|
+
$check-color-invert: cv.getVar("text-invert") !default;
|
|
7
|
+
$border-color: cv.getVar("text") !default;
|
|
8
|
+
$focus-box-shadow-size: cv.getVar("focus-shadow-size") !default;
|
|
9
|
+
$focus-box-shadow-color: hsla(
|
|
10
|
+
cv.getVar("focus-h"),
|
|
11
|
+
cv.getVar("focus-s"),
|
|
12
|
+
cv.getVar("focus-l"),
|
|
13
|
+
cv.getVar("focus-shadow-alpha")
|
|
17
14
|
) !default;
|
|
18
15
|
|
|
19
16
|
.kws-checkbox {
|
|
@@ -35,7 +32,7 @@ $kws-checkradio-focus-box-shadow-color: hsla(
|
|
|
35
32
|
top: 0.25em;
|
|
36
33
|
left: 0;
|
|
37
34
|
font-size: 1em;
|
|
38
|
-
color: $
|
|
35
|
+
color: $check-color;
|
|
39
36
|
opacity: 0;
|
|
40
37
|
display: inline-flex;
|
|
41
38
|
align-items: center;
|
|
@@ -58,7 +55,7 @@ $kws-checkradio-focus-box-shadow-color: hsla(
|
|
|
58
55
|
content: "";
|
|
59
56
|
}
|
|
60
57
|
&:before {
|
|
61
|
-
border: 0.05em solid $
|
|
58
|
+
border: 0.05em solid $border-color;
|
|
62
59
|
width: 1em;
|
|
63
60
|
height: 1em;
|
|
64
61
|
top: 0.25em;
|
|
@@ -82,7 +79,7 @@ $kws-checkradio-focus-box-shadow-color: hsla(
|
|
|
82
79
|
}
|
|
83
80
|
input[type="checkbox"]:checked + .kws-checkbox-label {
|
|
84
81
|
&:after {
|
|
85
|
-
border: 0.1em solid $
|
|
82
|
+
border: 0.1em solid $check-color;
|
|
86
83
|
border-top: 0;
|
|
87
84
|
border-left: 0;
|
|
88
85
|
}
|
|
@@ -94,36 +91,36 @@ $kws-checkradio-focus-box-shadow-color: hsla(
|
|
|
94
91
|
&:after {
|
|
95
92
|
transform: none;
|
|
96
93
|
border: 0.25em solid #fff;
|
|
97
|
-
background: $
|
|
94
|
+
background: $check-color;
|
|
98
95
|
width: 1em;
|
|
99
96
|
height: 1em;
|
|
100
97
|
top: 0.25em;
|
|
101
98
|
left: 0;
|
|
102
99
|
border-radius: 0.14em;
|
|
103
|
-
box-shadow: 0 0 0 0.05em $
|
|
100
|
+
box-shadow: 0 0 0 0.05em $border-color;
|
|
104
101
|
display: inline-block;
|
|
105
102
|
}
|
|
106
103
|
}
|
|
107
104
|
|
|
108
105
|
&.is-inverted input[type="checkbox"]:checked + .kws-checkbox-label {
|
|
109
106
|
&:before {
|
|
110
|
-
background: $
|
|
107
|
+
background: $check-color;
|
|
111
108
|
}
|
|
112
109
|
&:after {
|
|
113
|
-
border-color: $
|
|
110
|
+
border-color: $check-color-invert;
|
|
114
111
|
}
|
|
115
112
|
}
|
|
116
113
|
&.is-inverted input[type="checkbox"]:checked ~ .icon {
|
|
117
|
-
color: $
|
|
114
|
+
color: $check-color-invert;
|
|
118
115
|
}
|
|
119
116
|
|
|
120
117
|
&.is-inverted input[type="radio"]:checked + .kws-checkbox-label {
|
|
121
118
|
&:before {
|
|
122
|
-
background: $
|
|
119
|
+
background: $check-color;
|
|
123
120
|
}
|
|
124
121
|
&:after {
|
|
125
|
-
background-color: $
|
|
126
|
-
border-color: $
|
|
122
|
+
background-color: $check-color-invert;
|
|
123
|
+
border-color: $check-color;
|
|
127
124
|
box-shadow: none;
|
|
128
125
|
}
|
|
129
126
|
}
|
|
@@ -133,8 +130,7 @@ $kws-checkradio-focus-box-shadow-color: hsla(
|
|
|
133
130
|
input[type="checkbox"]:active + .kws-checkbox-label,
|
|
134
131
|
input[type="radio"]:active + .kws-checkbox-label {
|
|
135
132
|
&:before {
|
|
136
|
-
box-shadow: $
|
|
137
|
-
$kws-checkradio-focus-box-shadow-color;
|
|
133
|
+
box-shadow: $focus-box-shadow-size $focus-box-shadow-color;
|
|
138
134
|
}
|
|
139
135
|
}
|
|
140
136
|
|
|
@@ -152,11 +148,11 @@ $kws-checkradio-focus-box-shadow-color: hsla(
|
|
|
152
148
|
cursor: not-allowed;
|
|
153
149
|
}
|
|
154
150
|
|
|
155
|
-
@each $name, $pair in $
|
|
156
|
-
$color:
|
|
157
|
-
$color-invert:
|
|
158
|
-
$color-light:
|
|
159
|
-
$color-dark:
|
|
151
|
+
@each $name, $pair in $theme-colors {
|
|
152
|
+
$color: cv.getVar($name);
|
|
153
|
+
$color-invert: cv.getVar($name, "", "-invert");
|
|
154
|
+
$color-light: cv.getVar($name, "", "-light");
|
|
155
|
+
$color-dark: cv.getVar($name, "", "-dark");
|
|
160
156
|
&.is-#{$name} input[type="checkbox"]:checked + .kws-checkbox-label {
|
|
161
157
|
&:after {
|
|
162
158
|
border-color: $color;
|
|
@@ -216,12 +212,12 @@ $kws-checkradio-focus-box-shadow-color: hsla(
|
|
|
216
212
|
&.is-#{$name} input[type="checkbox"]:active + .kws-checkbox-label,
|
|
217
213
|
&.is-#{$name} input[type="radio"]:active + .kws-checkbox-label {
|
|
218
214
|
&:before {
|
|
219
|
-
box-shadow: $
|
|
215
|
+
box-shadow: $focus-box-shadow-size
|
|
220
216
|
hsla(
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
217
|
+
cv.getVar($name, "", "-h"),
|
|
218
|
+
cv.getVar($name, "", "-s"),
|
|
219
|
+
cv.getVar($name, "", "-l"),
|
|
220
|
+
cv.getVar("focus-shadow-alpha")
|
|
225
221
|
);
|
|
226
222
|
}
|
|
227
223
|
}
|
package/styles/Colorpicker.scss
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
@use "bulma/sass/utilities/css-variables" as cv;
|
|
2
|
+
|
|
3
|
+
$picker-shadow: cv.getVar("shadow") !default;
|
|
4
|
+
$picker-border-color: cv.getVar("border") !default;
|
|
5
|
+
$preview-shadow:
|
|
6
|
+
0 0.125rem 0.1875rem
|
|
7
|
+
hsla(
|
|
8
|
+
cv.getVar("shadow-h"),
|
|
9
|
+
cv.getVar("shadow-s"),
|
|
10
|
+
cv.getVar("shadow-l"),
|
|
11
|
+
0.1
|
|
12
|
+
),
|
|
13
|
+
0 0 0 0.0625rem
|
|
14
|
+
hsla(
|
|
15
|
+
cv.getVar("shadow-h"),
|
|
16
|
+
cv.getVar("shadow-s"),
|
|
17
|
+
cv.getVar("shadow-l"),
|
|
18
|
+
0.1
|
|
19
|
+
) !default;
|
|
20
|
+
$preview-radius: cv.getVar("radius-small") !default;
|
|
21
|
+
$icon-shadow: 0 0.0625rem 0.0625rem
|
|
22
|
+
hsla(cv.getVar("shadow-h"), cv.getVar("shadow-s"), cv.getVar("shadow-l"), 0.4) !default;
|
|
23
|
+
$dragover-hilight-color: cv.getVar("success-soft") !default;
|
|
24
|
+
|
|
1
25
|
.color-picker,
|
|
2
26
|
.color-picker:before,
|
|
3
27
|
.color-picker:after,
|
|
@@ -18,10 +42,8 @@
|
|
|
18
42
|
font: inherit;
|
|
19
43
|
}
|
|
20
44
|
.color-picker-control {
|
|
21
|
-
border: 1px solid
|
|
22
|
-
|
|
23
|
-
-moz-box-shadow: 0.0625rem 0.3125rem 0.625rem rgba(0, 0, 0, 0.5);
|
|
24
|
-
box-shadow: 0.0625rem 0.3125rem 0.625rem rgba(0, 0, 0, 0.5);
|
|
45
|
+
border: 1px solid $picker-border-color;
|
|
46
|
+
box-shadow: $picker-shadow;
|
|
25
47
|
*,
|
|
26
48
|
*:before,
|
|
27
49
|
*:after {
|
|
@@ -147,7 +169,7 @@
|
|
|
147
169
|
}
|
|
148
170
|
}
|
|
149
171
|
|
|
150
|
-
.color-picker
|
|
172
|
+
.kws-color-picker {
|
|
151
173
|
position: relative;
|
|
152
174
|
.color-preview {
|
|
153
175
|
height: 1.5rem;
|
|
@@ -157,8 +179,7 @@
|
|
|
157
179
|
top: 0.5rem;
|
|
158
180
|
right: 0.5rem;
|
|
159
181
|
z-index: 4;
|
|
160
|
-
box-shadow:
|
|
161
|
-
0 0 0 0.0625rem rgba(0, 0, 0, 0.1);
|
|
182
|
+
box-shadow: $preview-shadow;
|
|
162
183
|
&.is-small {
|
|
163
184
|
height: 0.95rem;
|
|
164
185
|
width: 0.95rem;
|
|
@@ -180,6 +201,7 @@
|
|
|
180
201
|
top: 0.5rem;
|
|
181
202
|
height: 1.5rem;
|
|
182
203
|
width: 1.5rem;
|
|
204
|
+
border-radius: $preview-radius;
|
|
183
205
|
&.is-small {
|
|
184
206
|
height: 0.95rem;
|
|
185
207
|
width: 0.95rem;
|
|
@@ -195,7 +217,7 @@
|
|
|
195
217
|
}
|
|
196
218
|
}
|
|
197
219
|
i {
|
|
198
|
-
text-shadow:
|
|
220
|
+
text-shadow: $icon-shadow;
|
|
199
221
|
}
|
|
200
222
|
input.readonly {
|
|
201
223
|
pointer-events: none;
|
|
@@ -219,6 +241,6 @@
|
|
|
219
241
|
}
|
|
220
242
|
}
|
|
221
243
|
.dragover input {
|
|
222
|
-
background:
|
|
244
|
+
background: $dragover-hilight-color;
|
|
223
245
|
}
|
|
224
246
|
}
|
package/styles/DataSearch.scss
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
@use "bulma/sass/utilities/css-variables" as cv;
|
|
2
|
-
@use "bulma/sass/utilities/derived-variables" as dv;
|
|
3
2
|
@use "bulma/sass/utilities/mixins" as mx;
|
|
4
3
|
|
|
5
4
|
.kws-grid-search {
|
|
6
|
-
.is-not-in-use {
|
|
7
|
-
}
|
|
8
5
|
.is-in-use {
|
|
9
|
-
border-color:
|
|
10
|
-
|
|
6
|
+
border-color: hsla(
|
|
7
|
+
cv.getVar("success-h"),
|
|
8
|
+
cv.getVar("success-s"),
|
|
9
|
+
cv.getVar("success-l"),
|
|
10
|
+
0.5
|
|
11
|
+
);
|
|
12
|
+
box-shadow: 0 0 3px hsla(
|
|
13
|
+
cv.getVar("success-h"),
|
|
14
|
+
cv.getVar("success-s"),
|
|
15
|
+
cv.getVar("success-l"),
|
|
16
|
+
0.23
|
|
17
|
+
) !important;
|
|
11
18
|
z-index: 2;
|
|
12
19
|
}
|
|
13
20
|
|
|
@@ -30,8 +37,8 @@
|
|
|
30
37
|
.main-search {
|
|
31
38
|
width: 100%;
|
|
32
39
|
.input {
|
|
33
|
-
border-bottom-right-radius:
|
|
34
|
-
border-top-right-radius:
|
|
40
|
+
border-bottom-right-radius: cv.getVar("radius") !important;
|
|
41
|
+
border-top-right-radius: cv.getVar("radius") !important;
|
|
35
42
|
}
|
|
36
43
|
}
|
|
37
44
|
.search-control {
|
package/styles/DataSort.scss
CHANGED
|
@@ -8,7 +8,7 @@ $background: cv.getVar("border") !default;
|
|
|
8
8
|
$label-background: hsla(
|
|
9
9
|
cv.getVar("scheme-h"),
|
|
10
10
|
cv.getVar("scheme-s"),
|
|
11
|
-
|
|
11
|
+
calc(cv.getVar("border-l") - 5%),
|
|
12
12
|
1
|
|
13
13
|
) !default;
|
|
14
14
|
$dropdown-text-color: cv.getVar("primary") !default;
|
|
@@ -41,6 +41,7 @@ $dropdown-marker-color: cv.getVar("primary") !default;
|
|
|
41
41
|
padding-top: 0.2rem;
|
|
42
42
|
padding-bottom: 0.2rem;
|
|
43
43
|
border: none;
|
|
44
|
+
box-shadow: none;
|
|
44
45
|
background: transparent;
|
|
45
46
|
color: $dropdown-text-color;
|
|
46
47
|
height: auto;
|
|
@@ -54,8 +55,9 @@ $dropdown-marker-color: cv.getVar("primary") !default;
|
|
|
54
55
|
width: 100%;
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
+
&:not(.is-multiple):not(.is-loading)::after {
|
|
58
59
|
border-color: $dropdown-marker-color;
|
|
60
|
+
top: 40%;
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
}
|
package/styles/Datepicker.scss
CHANGED
|
@@ -1,41 +1,33 @@
|
|
|
1
1
|
@use "bulma/sass/utilities/css-variables" as cv;
|
|
2
2
|
@use "bulma/sass/utilities/derived-variables" as dv;
|
|
3
|
-
@use "bulma/sass/utilities/functions" as fn;
|
|
4
3
|
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$
|
|
9
|
-
|
|
10
|
-
0 0 0 0.0625rem rgba(0, 0, 0, 0.1) !default;
|
|
11
|
-
$kws-datepicker-radius: 0px !default;
|
|
4
|
+
$theme-colors: dv.$colors !default;
|
|
5
|
+
$background: cv.getVar("scheme-main-ter") !default;
|
|
6
|
+
$text: cv.getVar("text") !default;
|
|
7
|
+
$shadow: cv.getVar("shadow") !default;
|
|
8
|
+
$radius: cv.getVar("radius-small") !default;
|
|
12
9
|
|
|
13
10
|
.flatpickr-calendar {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
box-shadow: $kws-datepicker-shadow;
|
|
20
|
-
background: $kws-datepicker-background;
|
|
21
|
-
color: $kws-datepicker-text;
|
|
11
|
+
box-shadow: $shadow;
|
|
12
|
+
background: $background;
|
|
13
|
+
color: $text;
|
|
22
14
|
|
|
23
|
-
border-radius: $
|
|
15
|
+
border-radius: $radius;
|
|
24
16
|
.flatpickr-months {
|
|
25
|
-
border-radius: $
|
|
17
|
+
border-radius: $radius $radius 0 0;
|
|
26
18
|
.flatpickr-month {
|
|
27
|
-
border-radius: $
|
|
19
|
+
border-radius: $radius $radius 0 0;
|
|
28
20
|
}
|
|
29
21
|
}
|
|
30
22
|
.flatpickr-innerContainer {
|
|
31
|
-
border-radius: 0 0 $
|
|
23
|
+
border-radius: 0 0 $radius $radius;
|
|
32
24
|
}
|
|
33
25
|
|
|
34
|
-
@each $name, $pair in $
|
|
35
|
-
$color:
|
|
36
|
-
$color-invert:
|
|
37
|
-
$color-light:
|
|
38
|
-
$color-dark:
|
|
26
|
+
@each $name, $pair in $theme-colors {
|
|
27
|
+
$color: cv.getVar($name);
|
|
28
|
+
$color-invert: cv.getVar($name, "", "-invert");
|
|
29
|
+
$color-light: cv.getVar($name, "", "-soft");
|
|
30
|
+
$color-dark: cv.getVar($name, "", "-bold");
|
|
39
31
|
&.is-#{$name} {
|
|
40
32
|
&.arrowTop:before,
|
|
41
33
|
&.arrowTop:after {
|
|
@@ -140,7 +132,7 @@ $kws-datepicker-radius: 0px !default;
|
|
|
140
132
|
}
|
|
141
133
|
|
|
142
134
|
.flatpickr-day {
|
|
143
|
-
color: $
|
|
135
|
+
color: $text;
|
|
144
136
|
&.flatpickr-disabled,
|
|
145
137
|
&.flatpickr-disabled:hover,
|
|
146
138
|
&.prevMonthDay,
|
|
@@ -148,13 +140,25 @@ $kws-datepicker-radius: 0px !default;
|
|
|
148
140
|
&.notAllowed,
|
|
149
141
|
&.notAllowed.prevMonthDay,
|
|
150
142
|
&.notAllowed.nextMonthDay {
|
|
151
|
-
color:
|
|
143
|
+
color: hsla(
|
|
144
|
+
cv.getVar("text-h"),
|
|
145
|
+
cv.getVar("text-s"),
|
|
146
|
+
cv.getVar("text-l"),
|
|
147
|
+
0.6
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&.startRange,
|
|
152
|
+
&.endRange {
|
|
153
|
+
background-color: cv.getVar("text");
|
|
154
|
+
border-color: cv.getVar("text");
|
|
155
|
+
color: cv.getVar("text-invert");
|
|
152
156
|
}
|
|
153
157
|
|
|
154
158
|
&.inRange {
|
|
155
159
|
box-shadow:
|
|
156
|
-
-5px 0 0
|
|
157
|
-
5px 0 0
|
|
160
|
+
-5px 0 0 cv.getVar("text-weak"),
|
|
161
|
+
5px 0 0 cv.getVar("text-weak");
|
|
158
162
|
}
|
|
159
163
|
|
|
160
164
|
&.inRange,
|
|
@@ -169,8 +173,9 @@ $kws-datepicker-radius: 0px !default;
|
|
|
169
173
|
&:focus,
|
|
170
174
|
&.prevMonthDay:focus,
|
|
171
175
|
&.nextMonthDay:focus {
|
|
172
|
-
background:
|
|
173
|
-
border-color:
|
|
176
|
+
background: cv.getVar("text-weak");
|
|
177
|
+
border-color: cv.getVar("text-weak");
|
|
178
|
+
color: cv.getVar("text-invert");
|
|
174
179
|
}
|
|
175
180
|
}
|
|
176
181
|
}
|
package/styles/Divider.scss
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@use "bulma/sass/utilities/css-variables" as cv;
|
|
2
2
|
@use "bulma/sass/utilities/derived-variables" as dv;
|
|
3
3
|
|
|
4
|
-
$
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$
|
|
4
|
+
$theme-colors: dv.$colors !default;
|
|
5
|
+
$color: cv.getVar("border") !default;
|
|
6
|
+
$font-size: cv.getVar("size-small") !default;
|
|
7
|
+
$gap: 0.25rem !default;
|
|
8
|
+
$margin: 1rem !default;
|
|
9
9
|
|
|
10
10
|
.kws-divider {
|
|
11
11
|
position: relative;
|
|
@@ -13,10 +13,10 @@ $kws-divider-margin: 1rem !default;
|
|
|
13
13
|
align-items: center;
|
|
14
14
|
text-transform: uppercase;
|
|
15
15
|
color: cv.getVar("grey");
|
|
16
|
-
font-size: $
|
|
16
|
+
font-size: $font-size;
|
|
17
17
|
font-weight: cv.getVar("weight-semibold");
|
|
18
18
|
letter-spacing: 0.5px;
|
|
19
|
-
margin: $
|
|
19
|
+
margin: $margin 0;
|
|
20
20
|
width: 100%;
|
|
21
21
|
|
|
22
22
|
&::after,
|
|
@@ -25,20 +25,20 @@ $kws-divider-margin: 1rem !default;
|
|
|
25
25
|
display: block;
|
|
26
26
|
flex: 1;
|
|
27
27
|
height: 1px;
|
|
28
|
-
background-color: $
|
|
28
|
+
background-color: $color;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&:not(.is-right),
|
|
32
32
|
&:not(.is-bottom) {
|
|
33
33
|
&::after {
|
|
34
|
-
margin-left: $
|
|
34
|
+
margin-left: $gap;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
&:not(.is-left),
|
|
39
39
|
&:not(.is-top) {
|
|
40
40
|
&::before {
|
|
41
|
-
margin-right: $
|
|
41
|
+
margin-right: $gap;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -58,7 +58,7 @@ $kws-divider-margin: 1rem !default;
|
|
|
58
58
|
|
|
59
59
|
&.is-vertical {
|
|
60
60
|
flex-direction: column;
|
|
61
|
-
margin: 0 $
|
|
61
|
+
margin: 0 $margin;
|
|
62
62
|
height: 100%;
|
|
63
63
|
width: auto;
|
|
64
64
|
|
|
@@ -70,12 +70,12 @@ $kws-divider-margin: 1rem !default;
|
|
|
70
70
|
|
|
71
71
|
&::after {
|
|
72
72
|
margin-left: 0;
|
|
73
|
-
margin-top: $
|
|
73
|
+
margin-top: $gap;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
&::before {
|
|
77
77
|
margin-right: 0;
|
|
78
|
-
margin-bottom: $
|
|
78
|
+
margin-bottom: $gap;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -86,9 +86,9 @@ $kws-divider-margin: 1rem !default;
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
@each $name, $pair in $
|
|
90
|
-
$color:
|
|
91
|
-
$color-light:
|
|
89
|
+
@each $name, $pair in $theme-colors {
|
|
90
|
+
$color: cv.getVar($name);
|
|
91
|
+
$color-light: cv.getVar($name, "", "-light");
|
|
92
92
|
&.is-#{$name} {
|
|
93
93
|
&::after,
|
|
94
94
|
&::before {
|
package/styles/FileUpload.scss
CHANGED
|
@@ -1,43 +1,29 @@
|
|
|
1
1
|
@use "bulma/sass/utilities/css-variables" as cv;
|
|
2
2
|
@use "bulma/sass/utilities/derived-variables" as dv;
|
|
3
|
-
@use "bulma/sass/utilities/functions" as fn;
|
|
4
3
|
|
|
5
|
-
$
|
|
6
|
-
$
|
|
7
|
-
$
|
|
8
|
-
$
|
|
9
|
-
$kws-fileupload-radius: #{cv.getVar("radius")} !default;
|
|
10
|
-
$kws-fileupload-text-color: #{cv.getVar("text")} !default;
|
|
11
|
-
$kws-fileupload-disabled-bg-color: #{cv.getVar("white-ter")} !default;
|
|
12
|
-
$kws-fileupload-disabled-border-color: #{cv.getVar("white-ter")} !default;
|
|
13
|
-
$kws-fileupload-progress-bg-color: #{cv.getVar("success-light")} !default;
|
|
14
|
-
$kws-fileupload-progress-text-color: #{cv.getVar("success-dark")} !default;
|
|
15
|
-
$kws-fileupload-progress-anim-easing: linear !default;
|
|
16
|
-
@if (variable-exists(#{cv.getVar("easeOutCustom")})) {
|
|
17
|
-
$kws-fileupload-progress-anim-easing: #{cv.getVar("easeOutCustom")} !default;
|
|
18
|
-
}
|
|
4
|
+
$theme-colors: dv.$colors !default;
|
|
5
|
+
$progress-bg-color: cv.getVar("success-light") !default;
|
|
6
|
+
$progress-text-color: cv.getVar("success-dark") !default;
|
|
7
|
+
$progress-easing: linear !default;
|
|
19
8
|
|
|
20
9
|
.kws-file-upload {
|
|
21
10
|
width: 100%;
|
|
22
11
|
.file-upload-inner {
|
|
23
12
|
position: relative;
|
|
24
|
-
background: $kws-fileupload-bg-color;
|
|
25
|
-
border: 1px solid $kws-fileupload-border-color;
|
|
26
|
-
border-radius: $kws-fileupload-radius;
|
|
27
13
|
max-width: 100%;
|
|
28
|
-
height:
|
|
29
|
-
.file {
|
|
14
|
+
height: cv.getVar("control-height");
|
|
15
|
+
.file-target {
|
|
30
16
|
overflow: hidden;
|
|
31
17
|
height: 100%;
|
|
32
18
|
position: absolute;
|
|
33
19
|
left: 0;
|
|
34
20
|
top: 0;
|
|
35
21
|
right: 2rem;
|
|
36
|
-
|
|
37
|
-
.filename,
|
|
22
|
+
.file-name,
|
|
38
23
|
.upload-progress,
|
|
39
24
|
.progress-caption {
|
|
40
|
-
padding:
|
|
25
|
+
padding: cv.getVar("control-padding-horizontal")
|
|
26
|
+
cv.getVar("control-padding-vertical");
|
|
41
27
|
white-space: nowrap;
|
|
42
28
|
overflow: hidden;
|
|
43
29
|
text-overflow: ellipsis;
|
|
@@ -58,17 +44,18 @@ $kws-fileupload-progress-anim-easing: linear !default;
|
|
|
58
44
|
width: 100%;
|
|
59
45
|
height: 100%;
|
|
60
46
|
.bar {
|
|
61
|
-
border-radius:
|
|
47
|
+
border-radius: cv.getVar("input-radius") 0 0
|
|
48
|
+
cv.getVar("input-radius");
|
|
62
49
|
position: relative;
|
|
63
50
|
height: 100%;
|
|
64
|
-
background: $
|
|
65
|
-
transition: width 0.3s $
|
|
51
|
+
background: $progress-bg-color;
|
|
52
|
+
transition: width 0.3s $progress-easing;
|
|
66
53
|
}
|
|
67
54
|
}
|
|
68
55
|
}
|
|
69
56
|
.progress-caption {
|
|
70
57
|
text-shadow: none;
|
|
71
|
-
color: $
|
|
58
|
+
color: $progress-text-color;
|
|
72
59
|
}
|
|
73
60
|
.filename {
|
|
74
61
|
span {
|
|
@@ -79,9 +66,9 @@ $kws-fileupload-progress-anim-easing: linear !default;
|
|
|
79
66
|
}
|
|
80
67
|
}
|
|
81
68
|
.up-icon {
|
|
82
|
-
border-radius: 0
|
|
83
|
-
background:
|
|
84
|
-
color:
|
|
69
|
+
border-radius: 0 cv.getVar("input-radius") cv.getVar("input-radius") 0;
|
|
70
|
+
background: cv.getVar("border");
|
|
71
|
+
color: cv.getVar("text");
|
|
85
72
|
padding: 0.5rem 0;
|
|
86
73
|
width: 2rem;
|
|
87
74
|
text-align: center;
|
|
@@ -94,11 +81,12 @@ $kws-fileupload-progress-anim-easing: linear !default;
|
|
|
94
81
|
justify-content: center;
|
|
95
82
|
.icon {
|
|
96
83
|
height: 1.4rem;
|
|
84
|
+
font-size: 1em;
|
|
97
85
|
}
|
|
98
86
|
.loader {
|
|
99
87
|
margin: 0.2rem auto;
|
|
100
|
-
border-left-color:
|
|
101
|
-
border-bottom-color:
|
|
88
|
+
border-left-color: cv.getVar("text");
|
|
89
|
+
border-bottom-color: cv.getVar("text");
|
|
102
90
|
}
|
|
103
91
|
}
|
|
104
92
|
input[type="file"] {
|
|
@@ -110,14 +98,13 @@ $kws-fileupload-progress-anim-easing: linear !default;
|
|
|
110
98
|
opacity: 0;
|
|
111
99
|
}
|
|
112
100
|
}
|
|
113
|
-
@each $name, $pair in $
|
|
114
|
-
$color:
|
|
115
|
-
$color-invert:
|
|
116
|
-
$color-light:
|
|
117
|
-
$color-dark:
|
|
101
|
+
@each $name, $pair in $theme-colors {
|
|
102
|
+
$color: cv.getVar($name);
|
|
103
|
+
$color-invert: cv.getVar($name, "", "-invert");
|
|
104
|
+
$color-light: cv.getVar($name, "", "-light");
|
|
105
|
+
$color-dark: cv.getVar($name, "", "-dark");
|
|
118
106
|
&.is-#{$name} {
|
|
119
107
|
.file-upload-inner {
|
|
120
|
-
border-color: $color;
|
|
121
108
|
.up-icon {
|
|
122
109
|
background: $color;
|
|
123
110
|
color: $color-invert;
|
|
@@ -142,19 +129,19 @@ $kws-fileupload-progress-anim-easing: linear !default;
|
|
|
142
129
|
&.is-disabled {
|
|
143
130
|
opacity: 0.6;
|
|
144
131
|
.file-upload-inner {
|
|
145
|
-
background:
|
|
146
|
-
border-color:
|
|
147
|
-
color:
|
|
132
|
+
background: cv.getVar("input-disabled-background-color");
|
|
133
|
+
border-color: cv.getVar("input-disabled-border-color");
|
|
134
|
+
color: cv.getVar("input-disabled-color");
|
|
148
135
|
.up-icon {
|
|
149
136
|
text-shadow: none;
|
|
150
|
-
background:
|
|
137
|
+
background: cv.getVar("input-disabled-background-color");
|
|
151
138
|
}
|
|
152
139
|
.file {
|
|
153
140
|
box-shadow: none;
|
|
154
141
|
}
|
|
155
142
|
}
|
|
156
|
-
@each $name, $pair in $
|
|
157
|
-
$color:
|
|
143
|
+
@each $name, $pair in $theme-colors {
|
|
144
|
+
$color: cv.getVar($name);
|
|
158
145
|
&.is-#{$name} {
|
|
159
146
|
.icon {
|
|
160
147
|
color: $color;
|
|
@@ -168,27 +155,24 @@ $kws-fileupload-progress-anim-easing: linear !default;
|
|
|
168
155
|
}
|
|
169
156
|
|
|
170
157
|
&.is-small {
|
|
171
|
-
.file-
|
|
172
|
-
|
|
173
|
-
height: 2rem;
|
|
158
|
+
.file-target {
|
|
159
|
+
right: 1.75rem;
|
|
174
160
|
}
|
|
175
161
|
.up-icon {
|
|
176
162
|
width: 1.75rem;
|
|
177
163
|
}
|
|
178
164
|
}
|
|
179
165
|
&.is-medium {
|
|
180
|
-
.file-
|
|
181
|
-
|
|
182
|
-
height: 3rem;
|
|
166
|
+
.file-target {
|
|
167
|
+
right: 2.5rem;
|
|
183
168
|
}
|
|
184
169
|
.up-icon {
|
|
185
170
|
width: 2.5rem;
|
|
186
171
|
}
|
|
187
172
|
}
|
|
188
173
|
&.is-large {
|
|
189
|
-
.file-
|
|
190
|
-
|
|
191
|
-
height: 3.5rem;
|
|
174
|
+
.file-target {
|
|
175
|
+
right: 3rem;
|
|
192
176
|
}
|
|
193
177
|
.up-icon {
|
|
194
178
|
width: 3rem;
|