@laser-ui/themes 0.0.1
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/LICENSE +21 -0
- package/README.md +5 -0
- package/_mixins.scss +5 -0
- package/_variables.scss +17 -0
- package/animations.scss +19 -0
- package/common.scss +9 -0
- package/components/accordion.scss +52 -0
- package/components/alert.scss +110 -0
- package/components/anchor.scss +69 -0
- package/components/avatar.scss +36 -0
- package/components/badge.scss +54 -0
- package/components/breadcrumb.scss +50 -0
- package/components/button.scss +245 -0
- package/components/card.scss +77 -0
- package/components/cascader.scss +313 -0
- package/components/checkbox.scss +194 -0
- package/components/circular-progress.scss +30 -0
- package/components/compose.scss +121 -0
- package/components/date-picker.scss +310 -0
- package/components/drawer.scss +113 -0
- package/components/dropdown.scss +156 -0
- package/components/empty.scss +27 -0
- package/components/fab.scss +293 -0
- package/components/form.scss +137 -0
- package/components/icon.scss +17 -0
- package/components/image.scss +213 -0
- package/components/input.scss +172 -0
- package/components/mask.scss +11 -0
- package/components/menu.scss +327 -0
- package/components/modal.scss +139 -0
- package/components/notification.scss +127 -0
- package/components/pagination.scss +134 -0
- package/components/popover.scss +197 -0
- package/components/progress.scss +125 -0
- package/components/radio.scss +203 -0
- package/components/rating.scss +75 -0
- package/components/select.scss +282 -0
- package/components/separator.scss +95 -0
- package/components/skeleton.scss +44 -0
- package/components/slider.scss +202 -0
- package/components/slides.scss +211 -0
- package/components/spinner.scss +43 -0
- package/components/stepper.scss +226 -0
- package/components/switch.scss +151 -0
- package/components/table.scss +297 -0
- package/components/tabs.scss +517 -0
- package/components/tag.scss +59 -0
- package/components/textarea.scss +69 -0
- package/components/time-picker.scss +212 -0
- package/components/timeline.scss +107 -0
- package/components/toast.scss +101 -0
- package/components/tooltip.scss +118 -0
- package/components/transfer.scss +122 -0
- package/components/tree-select.scss +218 -0
- package/components/tree.scss +169 -0
- package/components/upload.scss +367 -0
- package/components/wave.scss +36 -0
- package/index.scss +58 -0
- package/mixins/_polyfill.scss +34 -0
- package/mixins/_utils.scss +5 -0
- package/mixins/bem/_bem.scss +71 -0
- package/mixins/bem/_config.scss +4 -0
- package/mixins/bem/_function.scss +45 -0
- package/package.json +28 -0
- package/reboot.scss +5 -0
- package/root.scss +90 -0
- package/theme-dark.scss +62 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Xie Jay
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/_mixins.scss
ADDED
package/_variables.scss
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* stylelint-disable declaration-property-value-allowed-list */
|
|
2
|
+
$namespace: 'l' !default;
|
|
3
|
+
$prefix: '#{$namespace}-' !default;
|
|
4
|
+
|
|
5
|
+
$themes: (
|
|
6
|
+
'primary': 56 128 255,
|
|
7
|
+
'success': 45 211 111,
|
|
8
|
+
'warning': 255 196 9,
|
|
9
|
+
'danger': 235 68 90,
|
|
10
|
+
) !default;
|
|
11
|
+
|
|
12
|
+
$colors: (
|
|
13
|
+
'white': #fff,
|
|
14
|
+
'black': #000,
|
|
15
|
+
) !default;
|
|
16
|
+
|
|
17
|
+
$enable-gap: false !default;
|
package/animations.scss
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@use 'variables';
|
|
2
|
+
|
|
3
|
+
@keyframes #{variables.$prefix}spin {
|
|
4
|
+
100% {
|
|
5
|
+
transform: rotate(360deg);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@keyframes #{variables.$prefix}wave-spread {
|
|
10
|
+
0% {
|
|
11
|
+
opacity: 0.5;
|
|
12
|
+
transform: scale(1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
100% {
|
|
16
|
+
opacity: 0;
|
|
17
|
+
transform: scale(1.6);
|
|
18
|
+
}
|
|
19
|
+
}
|
package/common.scss
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
@use '../mixins';
|
|
3
|
+
|
|
4
|
+
@include mixins.b(accordion) {
|
|
5
|
+
@include mixins.e(item) {
|
|
6
|
+
border-top: 1px solid var(--#{variables.$prefix}color-border);
|
|
7
|
+
border-right: 1px solid var(--#{variables.$prefix}color-border);
|
|
8
|
+
border-left: 1px solid var(--#{variables.$prefix}color-border);
|
|
9
|
+
|
|
10
|
+
&:last-child {
|
|
11
|
+
border-bottom: 1px solid var(--#{variables.$prefix}color-border);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@include mixins.e(item-button) {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
padding: 12px 16px;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
background-color: var(--#{variables.$prefix}background-color-light-gray);
|
|
21
|
+
|
|
22
|
+
@include mixins.when(disabled) {
|
|
23
|
+
color: var(--#{variables.$prefix}color-disabled);
|
|
24
|
+
pointer-events: none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include mixins.m(arrow-left) {
|
|
28
|
+
flex-direction: row-reverse;
|
|
29
|
+
|
|
30
|
+
@include mixins.e(item-arrow) {
|
|
31
|
+
margin-right: 10px;
|
|
32
|
+
margin-left: unset;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@include mixins.e(item-title) {
|
|
38
|
+
@include mixins.utils-ellipsis;
|
|
39
|
+
|
|
40
|
+
flex: 1 0 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@include mixins.e(item-arrow) {
|
|
44
|
+
margin-left: 10px;
|
|
45
|
+
transition: transform var(--#{variables.$prefix}animation-duration-base) linear;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@include mixins.e(item-region) {
|
|
49
|
+
padding: 16px;
|
|
50
|
+
border-top: 1px solid var(--#{variables.$prefix}color-border);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
@use '../mixins';
|
|
3
|
+
|
|
4
|
+
@include mixins.b(alert) {
|
|
5
|
+
--color: var(--#{variables.$prefix}alert-color);
|
|
6
|
+
--background-color: var(--#{variables.$prefix}alert-background-color, var(--#{variables.$prefix}background-color-light-gray));
|
|
7
|
+
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: 6px 16px;
|
|
11
|
+
background-color: var(--background-color);
|
|
12
|
+
border: 1px solid var(--color, var(--#{variables.$prefix}color-border));
|
|
13
|
+
|
|
14
|
+
@include mixins.m(success) {
|
|
15
|
+
--color: var(--#{variables.$prefix}alert-color, var(--#{variables.$prefix}color-success));
|
|
16
|
+
--background-color: var(--#{variables.$prefix}alert-background-color, var(--#{variables.$prefix}background-color-success));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include mixins.m(warning) {
|
|
20
|
+
--color: var(--#{variables.$prefix}alert-color, var(--#{variables.$prefix}color-warning));
|
|
21
|
+
--background-color: var(--#{variables.$prefix}alert-background-color, var(--#{variables.$prefix}background-color-warning));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@include mixins.m(error) {
|
|
25
|
+
--color: var(--#{variables.$prefix}alert-color, var(--#{variables.$prefix}color-danger));
|
|
26
|
+
--background-color: var(--#{variables.$prefix}alert-background-color, var(--#{variables.$prefix}background-color-danger));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include mixins.m(info) {
|
|
30
|
+
--color: var(--#{variables.$prefix}alert-color, var(--#{variables.$prefix}color-primary));
|
|
31
|
+
--background-color: var(--#{variables.$prefix}alert-background-color, var(--#{variables.$prefix}background-color-primary));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@include mixins.m(with-title) {
|
|
35
|
+
align-items: flex-start;
|
|
36
|
+
|
|
37
|
+
@include mixins.e(icon) {
|
|
38
|
+
font-size: calc(var(--#{variables.$prefix}font-size-title) * 1.5);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@include mixins.e(content) {
|
|
42
|
+
display: block;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include mixins.e(message) {
|
|
46
|
+
padding-top: 1px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@include mixins.e(icon) {
|
|
51
|
+
padding: 5px 0;
|
|
52
|
+
margin-right: 10px;
|
|
53
|
+
font-size: 1.5em;
|
|
54
|
+
color: var(--color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@include mixins.e(content) {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex: 1 0 0;
|
|
60
|
+
align-items: center;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@include mixins.e(message) {
|
|
64
|
+
flex: 1 0 0;
|
|
65
|
+
padding: 5px 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@include mixins.e(header) {
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: flex-start;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@include mixins.e(title) {
|
|
74
|
+
flex: 1 0 0;
|
|
75
|
+
padding: 5px 0;
|
|
76
|
+
font-size: var(--#{variables.$prefix}font-size-title);
|
|
77
|
+
font-weight: var(--#{variables.$prefix}font-weight-bold);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@include mixins.e(close) {
|
|
81
|
+
display: inline-flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
padding: 5px;
|
|
85
|
+
margin: 0 0 0 8px;
|
|
86
|
+
font: inherit;
|
|
87
|
+
font-size: 1.25em;
|
|
88
|
+
line-height: 1;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
vertical-align: top;
|
|
91
|
+
appearance: none;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
background-color: transparent;
|
|
94
|
+
border: none;
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
outline: none;
|
|
97
|
+
transition:
|
|
98
|
+
color var(--#{variables.$prefix}animation-duration-base) linear,
|
|
99
|
+
background-color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
100
|
+
|
|
101
|
+
&:hover,
|
|
102
|
+
&:focus {
|
|
103
|
+
background-color: var(--#{variables.$prefix}background-color-hover);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&:active {
|
|
107
|
+
color: var(--#{variables.$prefix}color-dark-primary);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
@use '../mixins';
|
|
3
|
+
|
|
4
|
+
@include mixins.b(anchor) {
|
|
5
|
+
position: relative;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin: 0;
|
|
8
|
+
list-style: none;
|
|
9
|
+
|
|
10
|
+
@include mixins.font-size(0.9125rem);
|
|
11
|
+
|
|
12
|
+
@include mixins.e(link) {
|
|
13
|
+
color: var(--#{variables.$prefix}color-text);
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
color: var(--#{variables.$prefix}color-light-primary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@include mixins.when(active) {
|
|
20
|
+
color: var(--#{variables.$prefix}color-primary);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
a {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-wrap: wrap;
|
|
26
|
+
align-items: center;
|
|
27
|
+
min-height: 28px;
|
|
28
|
+
font: inherit;
|
|
29
|
+
color: inherit;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
overflow-wrap: break-word;
|
|
32
|
+
transition: color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include mixins.e(indicator-track) {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
width: 2px;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
background-color: var(--#{variables.$prefix}background-color-indicator);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include mixins.e(indicator-wrapper) {
|
|
46
|
+
position: absolute;
|
|
47
|
+
left: 1px;
|
|
48
|
+
z-index: 5;
|
|
49
|
+
opacity: 0;
|
|
50
|
+
transition:
|
|
51
|
+
top var(--#{variables.$prefix}animation-duration-slow) linear,
|
|
52
|
+
opacity var(--#{variables.$prefix}animation-duration-base) linear;
|
|
53
|
+
transform: translate(-50%, -50%);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@include mixins.e(dot-indicator) {
|
|
57
|
+
width: 8px;
|
|
58
|
+
height: 8px;
|
|
59
|
+
background-color: var(--#{variables.$prefix}background-color);
|
|
60
|
+
border: 2px solid var(--#{variables.$prefix}color-primary);
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@include mixins.e(line-indicator) {
|
|
65
|
+
width: 2px;
|
|
66
|
+
height: 20px;
|
|
67
|
+
background-color: var(--#{variables.$prefix}color-primary);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../variables';
|
|
3
|
+
@use '../mixins';
|
|
4
|
+
|
|
5
|
+
@include mixins.b(avatar) {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
vertical-align: top;
|
|
12
|
+
|
|
13
|
+
@include mixins.m(icon) {
|
|
14
|
+
color: map.get(variables.$colors, 'white');
|
|
15
|
+
background-color: var(--#{variables.$prefix}background-color-img);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@include mixins.m(text) {
|
|
19
|
+
color: map.get(variables.$colors, 'white');
|
|
20
|
+
background-color: var(--#{variables.$prefix}background-color-img);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@include mixins.m(circle) {
|
|
24
|
+
border-radius: 50%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include mixins.m(square) {
|
|
28
|
+
border-radius: var(--#{variables.$prefix}border-radius);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include mixins.e(img) {
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
object-fit: contain;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../variables';
|
|
3
|
+
@use '../mixins';
|
|
4
|
+
|
|
5
|
+
@include mixins.b(badge) {
|
|
6
|
+
position: absolute;
|
|
7
|
+
z-index: 1;
|
|
8
|
+
display: inline-block;
|
|
9
|
+
vertical-align: top;
|
|
10
|
+
transform: translate(-50%, -50%);
|
|
11
|
+
|
|
12
|
+
@each $theme, $rgb in variables.$themes {
|
|
13
|
+
@include mixins.theme(#{$theme}) {
|
|
14
|
+
--color: var(--#{variables.$prefix}badge-color, var(--#{variables.$prefix}color-#{$theme}));
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@include mixins.m(dot) {
|
|
19
|
+
@include mixins.e(wrapper) {
|
|
20
|
+
min-width: 6px;
|
|
21
|
+
height: 6px;
|
|
22
|
+
padding: 0;
|
|
23
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
24
|
+
border-radius: 3px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@include mixins.m(alone) {
|
|
29
|
+
position: relative;
|
|
30
|
+
transform: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@include mixins.e(wrapper) {
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
min-width: 20px;
|
|
37
|
+
height: 20px;
|
|
38
|
+
padding: 0 6px;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
line-height: 20px;
|
|
43
|
+
color: map.get(variables.$colors, 'white');
|
|
44
|
+
background-color: var(--color);
|
|
45
|
+
/* stylelint-disable-next-line declaration-property-value-allowed-list */
|
|
46
|
+
border-radius: 10px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@include mixins.e(number-container) {
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
transition: transform var(--#{variables.$prefix}animation-duration-base) ease-out;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
@use '../mixins';
|
|
3
|
+
|
|
4
|
+
@include mixins.b(breadcrumb) {
|
|
5
|
+
--gutter-x: var(--#{variables.$prefix}breadcrumb-gutter-x, 8px);
|
|
6
|
+
--gutter-y: var(--#{variables.$prefix}breadcrumb-gutter-y, 4px);
|
|
7
|
+
|
|
8
|
+
@include mixins.e(list) {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
align-items: center;
|
|
12
|
+
padding: 0;
|
|
13
|
+
margin: calc(-1 * var(--gutter-y)) calc(-0.5 * var(--gutter-x)) 0 calc(-0.5 * var(--gutter-x));
|
|
14
|
+
list-style: none;
|
|
15
|
+
|
|
16
|
+
& > * {
|
|
17
|
+
padding-right: calc(var(--gutter-x) * 0.5);
|
|
18
|
+
padding-left: calc(var(--gutter-x) * 0.5);
|
|
19
|
+
margin-top: var(--gutter-y);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@include mixins.e(item) {
|
|
24
|
+
display: inline-flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
min-height: 1.5em;
|
|
27
|
+
color: var(--#{variables.$prefix}color-text-sub);
|
|
28
|
+
border-radius: var(--#{variables.$prefix}border-radius);
|
|
29
|
+
|
|
30
|
+
@include mixins.m(link) {
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
transition:
|
|
33
|
+
color var(--#{variables.$prefix}animation-duration-base) linear,
|
|
34
|
+
background-color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
35
|
+
|
|
36
|
+
&:hover {
|
|
37
|
+
color: var(--#{variables.$prefix}text-color);
|
|
38
|
+
background-color: var(--#{variables.$prefix}background-color-hover);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@include mixins.m(last) {
|
|
43
|
+
color: var(--#{variables.$prefix}color-text);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@include mixins.e(separator) {
|
|
48
|
+
color: var(--#{variables.$prefix}color-text-sub);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../variables';
|
|
3
|
+
@use '../mixins';
|
|
4
|
+
|
|
5
|
+
@include mixins.b(button) {
|
|
6
|
+
$selector: &;
|
|
7
|
+
|
|
8
|
+
position: relative;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
min-width: var(--size);
|
|
13
|
+
height: var(--size);
|
|
14
|
+
margin: 0;
|
|
15
|
+
font: inherit;
|
|
16
|
+
font-size: var(--font-size);
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
vertical-align: top;
|
|
19
|
+
appearance: none;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
border-radius: var(--#{variables.$prefix}border-radius);
|
|
22
|
+
outline: none;
|
|
23
|
+
transition:
|
|
24
|
+
color var(--#{variables.$prefix}animation-duration-base) linear,
|
|
25
|
+
background-color var(--#{variables.$prefix}animation-duration-base) linear,
|
|
26
|
+
border-color var(--#{variables.$prefix}animation-duration-base) linear;
|
|
27
|
+
|
|
28
|
+
&:disabled {
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@each $theme, $rgb in variables.$themes {
|
|
33
|
+
@include mixins.theme(#{$theme}) {
|
|
34
|
+
--color-light: var(--#{variables.$prefix}button-color-light, var(--#{variables.$prefix}color-light-#{$theme}));
|
|
35
|
+
--color: var(--#{variables.$prefix}button-color, var(--#{variables.$prefix}color-#{$theme}));
|
|
36
|
+
--color-dark: var(--#{variables.$prefix}button-color-dark, var(--#{variables.$prefix}color-dark-#{$theme}));
|
|
37
|
+
--background-color-light: var(
|
|
38
|
+
--#{variables.$prefix}button-background-color-light,
|
|
39
|
+
var(--#{variables.$prefix}background-color-light-#{$theme})
|
|
40
|
+
);
|
|
41
|
+
--background-color: var(--#{variables.$prefix}button-background-color, var(--#{variables.$prefix}background-color-#{$theme}));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include mixins.when(loading) {
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@include mixins.m(primary) {
|
|
50
|
+
padding: 0 calc(var(--padding-size) - 1px);
|
|
51
|
+
color: map.get(variables.$colors, 'white');
|
|
52
|
+
background-color: var(--color);
|
|
53
|
+
border: 1px solid var(--color);
|
|
54
|
+
|
|
55
|
+
&:hover,
|
|
56
|
+
&:focus,
|
|
57
|
+
&.is-loading {
|
|
58
|
+
background-color: var(--color-light);
|
|
59
|
+
border-color: var(--color-light);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:active {
|
|
63
|
+
background-color: var(--color-dark);
|
|
64
|
+
border-color: var(--color-dark);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:disabled:not(.is-loading) {
|
|
68
|
+
filter: saturate(50%) grayscale(50%);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@include mixins.m(secondary) {
|
|
73
|
+
padding: 0 calc(var(--padding-size) - 1px);
|
|
74
|
+
color: var(--#{variables.$prefix}color-text);
|
|
75
|
+
background-color: transparent;
|
|
76
|
+
border: 1px solid var(--#{variables.$prefix}color-border);
|
|
77
|
+
|
|
78
|
+
&:hover,
|
|
79
|
+
&:focus,
|
|
80
|
+
&.is-loading {
|
|
81
|
+
color: var(--color-light);
|
|
82
|
+
border-color: var(--color-light);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:active {
|
|
86
|
+
color: var(--color-dark);
|
|
87
|
+
border-color: var(--color-dark);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&:disabled:not(.is-loading) {
|
|
91
|
+
color: var(--#{variables.$prefix}color-disabled);
|
|
92
|
+
background-color: var(--#{variables.$prefix}background-color-disabled);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@include mixins.m(outline) {
|
|
97
|
+
padding: 0 calc(var(--padding-size) - 1px);
|
|
98
|
+
color: var(--color);
|
|
99
|
+
background-color: transparent;
|
|
100
|
+
border: 1px solid var(--color);
|
|
101
|
+
|
|
102
|
+
&:hover,
|
|
103
|
+
&:focus,
|
|
104
|
+
&.is-loading {
|
|
105
|
+
color: var(--color-light);
|
|
106
|
+
border-color: var(--color-light);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:active {
|
|
110
|
+
color: var(--color-dark);
|
|
111
|
+
border-color: var(--color-dark);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:disabled:not(.is-loading) {
|
|
115
|
+
color: var(--#{variables.$prefix}color-disabled);
|
|
116
|
+
border-color: var(--#{variables.$prefix}color-border);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@include mixins.m(dashed) {
|
|
121
|
+
padding: 0 calc(var(--padding-size) - 1px);
|
|
122
|
+
color: var(--color);
|
|
123
|
+
background-color: transparent;
|
|
124
|
+
border: 1px dashed var(--color);
|
|
125
|
+
|
|
126
|
+
&:hover,
|
|
127
|
+
&:focus,
|
|
128
|
+
&.is-loading {
|
|
129
|
+
color: var(--color-light);
|
|
130
|
+
border-color: var(--color-light);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:active {
|
|
134
|
+
color: var(--color-dark);
|
|
135
|
+
border-color: var(--color-dark);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:disabled:not(.is-loading) {
|
|
139
|
+
color: var(--#{variables.$prefix}color-disabled);
|
|
140
|
+
border-color: var(--#{variables.$prefix}color-border);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@include mixins.m(text) {
|
|
145
|
+
padding: 0 var(--padding-size);
|
|
146
|
+
color: var(--#{variables.$prefix}color-text);
|
|
147
|
+
background-color: transparent;
|
|
148
|
+
border: none;
|
|
149
|
+
|
|
150
|
+
&:hover,
|
|
151
|
+
&:focus,
|
|
152
|
+
&.is-loading {
|
|
153
|
+
color: var(--color-light);
|
|
154
|
+
background-color: var(--background-color-light);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&:active {
|
|
158
|
+
color: var(--color-dark);
|
|
159
|
+
background-color: var(--background-color);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&:disabled:not(.is-loading) {
|
|
163
|
+
color: var(--#{variables.$prefix}color-disabled);
|
|
164
|
+
pointer-events: none;
|
|
165
|
+
background-color: var(--#{variables.$prefix}background-color-disabled);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@include mixins.m(link) {
|
|
170
|
+
min-width: unset;
|
|
171
|
+
height: auto;
|
|
172
|
+
padding: 0;
|
|
173
|
+
color: var(--color);
|
|
174
|
+
background-color: transparent;
|
|
175
|
+
border: none;
|
|
176
|
+
|
|
177
|
+
&:hover,
|
|
178
|
+
&:focus,
|
|
179
|
+
&.is-loading {
|
|
180
|
+
color: var(--color-light);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&:active {
|
|
184
|
+
color: var(--color-dark);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&:disabled:not(.is-loading) {
|
|
188
|
+
color: var(--#{variables.$prefix}color-disabled);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@include mixins.m(circle) {
|
|
193
|
+
border-radius: 50%;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@include mixins.m(round) {
|
|
197
|
+
border-radius: calc(var(--size) / 2);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@include mixins.m(block) {
|
|
201
|
+
width: 100%;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@include mixins.m(small) {
|
|
205
|
+
--size: var(--#{variables.$prefix}button-size, var(--#{variables.$prefix}size-small));
|
|
206
|
+
--padding-size: var(--#{variables.$prefix}button-padding-size, var(--#{variables.$prefix}padding-size-small));
|
|
207
|
+
--font-size: var(--#{variables.$prefix}button-font-size, var(--#{variables.$prefix}font-size-small));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@include mixins.m(medium) {
|
|
211
|
+
--size: var(--#{variables.$prefix}button-size, var(--#{variables.$prefix}size-medium));
|
|
212
|
+
--padding-size: var(--#{variables.$prefix}button-padding-size, var(--#{variables.$prefix}padding-size-medium));
|
|
213
|
+
--font-size: var(--#{variables.$prefix}button-font-size, var(--#{variables.$prefix}font-size-medium));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@include mixins.m(large) {
|
|
217
|
+
--size: var(--#{variables.$prefix}button-size, var(--#{variables.$prefix}size-large));
|
|
218
|
+
--padding-size: var(--#{variables.$prefix}button-padding-size, var(--#{variables.$prefix}padding-size-large));
|
|
219
|
+
--font-size: var(--#{variables.$prefix}button-font-size, var(--#{variables.$prefix}font-size-large));
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@include mixins.m(icon) {
|
|
223
|
+
&:not(#{$selector}--round) {
|
|
224
|
+
padding: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@include mixins.e(icon) {
|
|
228
|
+
width: auto;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@include mixins.m(icon-right) {
|
|
233
|
+
flex-direction: row-reverse;
|
|
234
|
+
|
|
235
|
+
@include mixins.e(icon) {
|
|
236
|
+
justify-content: flex-end;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@include mixins.e(icon) {
|
|
241
|
+
display: inline-flex;
|
|
242
|
+
width: calc(1em + 8px);
|
|
243
|
+
font-size: 1.25em;
|
|
244
|
+
}
|
|
245
|
+
}
|