@oruga-ui/theme-oruga 0.7.1 → 0.8.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 +1 -1
- package/README.md +5 -5
- package/dist/scss/components/_autocomplete.scss +3 -12
- package/dist/scss/components/_breadcrumb.scss +122 -103
- package/dist/scss/components/_button.scss +228 -173
- package/dist/scss/components/_carousel.scss +164 -142
- package/dist/scss/components/_checkbox.scss +118 -118
- package/dist/scss/components/_collapse.scss +1 -1
- package/dist/scss/components/_datepicker.scss +228 -290
- package/dist/scss/components/_datetimepicker.scss +8 -2
- package/dist/scss/components/_dialog.scss +243 -0
- package/dist/scss/components/_dropdown.scss +190 -164
- package/dist/scss/components/_field.scss +68 -39
- package/dist/scss/components/_icon.scss +24 -29
- package/dist/scss/components/_input.scss +112 -97
- package/dist/scss/components/_listbox.scss +176 -0
- package/dist/scss/components/_loading.scss +35 -15
- package/dist/scss/components/_menu.scss +113 -109
- package/dist/scss/components/_modal.scss +112 -50
- package/dist/scss/components/_notification.scss +113 -97
- package/dist/scss/components/_pagination.scss +173 -106
- package/dist/scss/components/_radio.scss +91 -84
- package/dist/scss/components/_select.scss +108 -115
- package/dist/scss/components/_sidebar.scss +102 -101
- package/dist/scss/components/_skeleton.scss +50 -39
- package/dist/scss/components/_slider.scss +221 -159
- package/dist/scss/components/_steps.scss +223 -261
- package/dist/scss/components/_switch.scss +126 -90
- package/dist/scss/components/_table.scss +307 -251
- package/dist/scss/components/_tabs.scss +360 -247
- package/dist/scss/components/_tag.scss +95 -39
- package/dist/scss/components/_taginput.scss +48 -36
- package/dist/scss/components/_timepicker.scss +61 -62
- package/dist/scss/components/_tooltip.scss +129 -254
- package/dist/scss/components/_upload.scss +83 -35
- package/dist/scss/theme-build.scss +9 -0
- package/dist/scss/theme.scss +44 -0
- package/dist/scss/utils/_animations.scss +30 -9
- package/dist/scss/utils/_base.scss +6 -4
- package/dist/scss/utils/_helpers.scss +84 -22
- package/dist/scss/utils/_root.scss +82 -29
- package/dist/scss/utils/_variables.scss +64 -42
- package/dist/theme.css +2 -0
- package/dist/theme.js +1 -1
- package/package.json +27 -20
- package/dist/oruga.css +0 -2
- package/dist/scss/oruga-build.scss +0 -9
- package/dist/scss/oruga.scss +0 -42
|
@@ -1,60 +1,88 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
|
+
@use "../utils/helpers" as h;
|
|
3
|
+
@use "../utils/variables" as vars;
|
|
2
4
|
|
|
3
5
|
/* @docs */
|
|
4
|
-
$field-
|
|
6
|
+
$field-spacer: h.useVar("control-spacer") !default;
|
|
7
|
+
$field-margin-bottom: calc(1.5 * $field-spacer) !default;
|
|
8
|
+
|
|
9
|
+
$field-label-color: h.useVar("font-color") !default;
|
|
10
|
+
$field-label-font-size: h.useVar("font-size") !default;
|
|
5
11
|
$field-label-font-weight: 600 !default;
|
|
6
|
-
$field-
|
|
7
|
-
|
|
8
|
-
$field-message-
|
|
9
|
-
$field-
|
|
10
|
-
$field-
|
|
12
|
+
$field-label-line-height: h.useVar("line-height") !default;
|
|
13
|
+
|
|
14
|
+
$field-message-spacer: calc(0.5 * $field-spacer) !default;
|
|
15
|
+
$field-message-color: h.useVar("secondary") !default;
|
|
16
|
+
$field-message-font-size: 0.75em !default;
|
|
17
|
+
$field-message-font-weight: h.useVar("font-weight") !default;
|
|
18
|
+
$field-message-line-height: h.useVar("line-height") !default;
|
|
11
19
|
/* @docs */
|
|
12
20
|
|
|
13
21
|
.o-field {
|
|
14
|
-
|
|
22
|
+
@include h.defineVar("field-spacer", $field-spacer);
|
|
23
|
+
@include h.defineVar("field-margin-bottom", $field-margin-bottom);
|
|
24
|
+
@include h.defineVar("field-label-color", $field-label-color);
|
|
25
|
+
@include h.defineVar("field-label-font-size", $field-label-font-size);
|
|
26
|
+
@include h.defineVar("field-label-font-weight", $field-label-font-weight);
|
|
27
|
+
@include h.defineVar("field-label-line-height", $field-label-line-height);
|
|
28
|
+
@include h.defineVar("field-message-color", $field-message-color);
|
|
29
|
+
@include h.defineVar("field-message-font-size", $field-message-font-size);
|
|
30
|
+
@include h.defineVar(
|
|
31
|
+
"field-message-font-weight",
|
|
32
|
+
$field-message-font-weight
|
|
33
|
+
);
|
|
34
|
+
@include h.defineVar(
|
|
35
|
+
"field-message-line-height",
|
|
36
|
+
$field-message-line-height
|
|
37
|
+
);
|
|
38
|
+
@include h.defineVar("field-message-spacer", $field-message-spacer);
|
|
15
39
|
|
|
16
40
|
&:not(:last-child) {
|
|
17
|
-
margin-bottom:
|
|
18
|
-
--#{$prefix}field-margin-bottom,
|
|
19
|
-
$field-margin-bottom
|
|
20
|
-
);
|
|
41
|
+
margin-bottom: h.useVar("field-margin-bottom");
|
|
21
42
|
}
|
|
22
43
|
|
|
23
44
|
&__label {
|
|
24
45
|
display: block;
|
|
25
|
-
color:
|
|
26
|
-
font-size:
|
|
27
|
-
font-weight:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@each $name, $value in $sizes {
|
|
46
|
+
color: h.useVar("field-label-color");
|
|
47
|
+
font-size: h.useVar("field-label-font-size");
|
|
48
|
+
font-weight: h.useVar("field-label-font-weight");
|
|
49
|
+
line-height: h.useVar("field-label-line-weight");
|
|
50
|
+
|
|
51
|
+
// size variants
|
|
52
|
+
@each $name, $value in vars.$sizes {
|
|
33
53
|
&--#{$name} {
|
|
34
|
-
|
|
54
|
+
@include h.defineVar(
|
|
55
|
+
"field-label-font-size",
|
|
56
|
+
h.useVar("size-#{$name}")
|
|
57
|
+
);
|
|
35
58
|
}
|
|
36
59
|
}
|
|
37
60
|
}
|
|
38
61
|
|
|
39
62
|
&__message {
|
|
40
63
|
display: block;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@each $name, $pair in $colors {
|
|
51
|
-
$color: list.nth($pair, 1);
|
|
64
|
+
color: h.useVar("field-message-color");
|
|
65
|
+
font-size: h.useVar("field-message-font-size");
|
|
66
|
+
font-weight: h.useVar("field-message-font-weight");
|
|
67
|
+
line-height: h.useVar("field-message-line-height");
|
|
68
|
+
|
|
69
|
+
margin-top: h.useVar("field-message-spacer");
|
|
70
|
+
|
|
71
|
+
// color variants
|
|
72
|
+
@each $name, $pair in vars.$colors {
|
|
52
73
|
&--#{$name} {
|
|
53
|
-
color
|
|
74
|
+
@include h.defineVar("field-message-color", h.useVar($name));
|
|
54
75
|
}
|
|
55
76
|
}
|
|
56
77
|
}
|
|
57
78
|
|
|
79
|
+
// color variants
|
|
80
|
+
@each $name, $pair in vars.$colors {
|
|
81
|
+
&--#{$name} {
|
|
82
|
+
@include h.defineVar("field-message-color", h.useVar($name));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
58
86
|
&--addons {
|
|
59
87
|
display: flex;
|
|
60
88
|
justify-content: flex-start;
|
|
@@ -89,15 +117,14 @@ $field-horizontal-spacer: 0 1.5rem 0 0 !default;
|
|
|
89
117
|
}
|
|
90
118
|
}
|
|
91
119
|
|
|
120
|
+
&--multiline,
|
|
92
121
|
&--grouped {
|
|
93
122
|
display: flex;
|
|
94
|
-
gap:
|
|
123
|
+
gap: h.useVar("field-spacer");
|
|
95
124
|
}
|
|
96
125
|
|
|
97
126
|
&--multiline {
|
|
98
|
-
display: flex;
|
|
99
127
|
flex-wrap: wrap;
|
|
100
|
-
gap: var(--#{$prefix}field-spacer, $field-spacer);
|
|
101
128
|
}
|
|
102
129
|
|
|
103
130
|
&__horizontal-body {
|
|
@@ -105,6 +132,10 @@ $field-horizontal-spacer: 0 1.5rem 0 0 !default;
|
|
|
105
132
|
flex-basis: 0;
|
|
106
133
|
flex-grow: 5;
|
|
107
134
|
flex-shrink: 1;
|
|
135
|
+
|
|
136
|
+
& > .o-field:not(:last-child) {
|
|
137
|
+
margin-inline-end: h.useVar("field-spacer");
|
|
138
|
+
}
|
|
108
139
|
}
|
|
109
140
|
|
|
110
141
|
&--horizontal {
|
|
@@ -115,11 +146,9 @@ $field-horizontal-spacer: 0 1.5rem 0 0 !default;
|
|
|
115
146
|
flex-basis: 0;
|
|
116
147
|
flex-grow: 1;
|
|
117
148
|
flex-shrink: 0;
|
|
118
|
-
margin: var(
|
|
119
|
-
--#{$prefix}field-horizontal-spacer,
|
|
120
|
-
$field-horizontal-spacer
|
|
121
|
-
);
|
|
122
149
|
text-align: right;
|
|
150
|
+
|
|
151
|
+
padding-right: h.useVar("field-spacer");
|
|
123
152
|
}
|
|
124
153
|
|
|
125
154
|
&--mobile {
|
|
@@ -1,57 +1,52 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
|
+
@use "../utils/helpers" as h;
|
|
3
|
+
@use "../utils/variables" as vars;
|
|
2
4
|
|
|
3
5
|
/* @docs */
|
|
4
|
-
$icon-
|
|
6
|
+
$icon-color: inherit;
|
|
7
|
+
$icon-font-size: inherit;
|
|
8
|
+
$icon-spin-animation-duration: 2s !default;
|
|
5
9
|
/* @docs */
|
|
6
10
|
|
|
7
|
-
@keyframes icon-spin {
|
|
8
|
-
0% {
|
|
9
|
-
-webkit-transform: rotate(0deg);
|
|
10
|
-
transform: rotate(0deg);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
100% {
|
|
14
|
-
-webkit-transform: rotate(359deg);
|
|
15
|
-
transform: rotate(359deg);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
11
|
.o-icon {
|
|
12
|
+
@include h.defineVar("icon-color", $icon-color);
|
|
13
|
+
@include h.defineVar("icon-font-size", $icon-font-size);
|
|
14
|
+
@include h.defineVar(
|
|
15
|
+
"icon-spin-animation-duration",
|
|
16
|
+
$icon-spin-animation-duration
|
|
17
|
+
);
|
|
18
|
+
|
|
20
19
|
align-items: center;
|
|
21
20
|
display: inline-flex;
|
|
22
21
|
justify-content: center;
|
|
22
|
+
color: h.useVar("icon-color");
|
|
23
|
+
font-size: h.useVar("icon-font-size");
|
|
23
24
|
transition:
|
|
24
|
-
transform
|
|
25
|
-
opacity
|
|
25
|
+
transform h.useVar("animation-speed-fast") h.useVar("animation-timing"),
|
|
26
|
+
opacity h.useVar("animation-speed") h.useVar("animation-timing");
|
|
26
27
|
|
|
27
|
-
//
|
|
28
|
-
@each $name, $value in
|
|
28
|
+
// size variants
|
|
29
|
+
@each $name, $value in vars.$sizes {
|
|
29
30
|
&--#{$name} {
|
|
30
|
-
|
|
31
|
+
@include h.defineVar("icon-font-size", h.useVar("size-#{$name}"));
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
// color variants
|
|
35
|
-
@each $name, $pair in
|
|
36
|
-
$color: list.nth($pair, 1);
|
|
37
|
-
|
|
36
|
+
@each $name, $pair in vars.$colors {
|
|
38
37
|
&--#{$name} {
|
|
39
|
-
color
|
|
38
|
+
@include h.defineVar("icon-color", h.useVar($name));
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
&--clickable {
|
|
44
|
-
|
|
45
|
-
cursor: pointer;
|
|
43
|
+
@include h.clickable;
|
|
46
44
|
}
|
|
47
45
|
|
|
48
46
|
&--spin {
|
|
49
|
-
animation-name:
|
|
47
|
+
animation-name: spinAround;
|
|
50
48
|
animation-iteration-count: infinite;
|
|
51
49
|
animation-timing-function: linear;
|
|
52
|
-
animation-duration:
|
|
53
|
-
--#{$prefix}icon-spin-duration,
|
|
54
|
-
$icon-spin-duration
|
|
55
|
-
);
|
|
50
|
+
animation-duration: h.useVar("icon-spin-animation-duration");
|
|
56
51
|
}
|
|
57
52
|
}
|
|
@@ -1,69 +1,120 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
|
+
@use "../utils/helpers" as h;
|
|
3
|
+
@use "../utils/variables" as vars;
|
|
2
4
|
|
|
3
5
|
/* @docs */
|
|
4
|
-
$input-
|
|
5
|
-
$input-
|
|
6
|
+
$input-color: h.useVar("font-color") !default;
|
|
7
|
+
$input-font-size: h.useVar("font-size") !default;
|
|
8
|
+
$input-font-weight: h.useVar("font-weight") !default;
|
|
9
|
+
$input-line-height: h.useVar("line-height") !default;
|
|
10
|
+
$input-height: h.useVar("control-height") !default;
|
|
11
|
+
|
|
12
|
+
$input-padding: h.useVar("control-padding-vertical")
|
|
13
|
+
h.useVar("control-padding-horizontal") !default;
|
|
14
|
+
$input-disabled-opacity: h.useVar("control-disabled-opacity") !default;
|
|
15
|
+
|
|
16
|
+
$input-box-shadow: h.useVar("control-box-shadow-inset") !default;
|
|
17
|
+
$input-border-width: h.useVar("control-border-width") !default;
|
|
6
18
|
$input-border-style: solid !default;
|
|
7
|
-
$input-border-
|
|
8
|
-
$input-border-radius:
|
|
9
|
-
$input-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
$input-box-shadow: $control-box-shadow !default;
|
|
13
|
-
$input-color: #363636 !default;
|
|
14
|
-
$input-icon-zindex: 4 !default;
|
|
15
|
-
$input-height: $control-height !default;
|
|
16
|
-
$input-line-height: var(--#{$prefix}base-line-height) !default;
|
|
17
|
-
$input-margin: 0 !default;
|
|
18
|
-
$input-padding: $control-padding-vertical $control-padding-horizontal !default;
|
|
19
|
-
$input-counter-font-size: 0.75rem !default;
|
|
20
|
-
$input-counter-margin: 0.25rem 0.5rem !default;
|
|
21
|
-
$input-textarea-max-height: 600px !default;
|
|
19
|
+
$input-border-color: h.useVar("control-border-color") !default;
|
|
20
|
+
$input-border-radius: h.useVar("border-radius") !default;
|
|
21
|
+
$input-border-radius-rounded: h.useVar("border-radius-rounded") !default;
|
|
22
|
+
$input-background-color: h.useVar("control-brackground-color") !default;
|
|
23
|
+
|
|
22
24
|
$input-textarea-min-height: 120px !default;
|
|
23
|
-
$input-textarea-
|
|
25
|
+
$input-textarea-max-height: 600px !default;
|
|
26
|
+
$input-textarea-padding: h.useVar("control-spacer") !default;
|
|
27
|
+
|
|
28
|
+
$input-counter-font-size: 0.75rem !default;
|
|
29
|
+
$input-counter-padding: 0.25rem 0.5rem !default;
|
|
24
30
|
/* @docs */
|
|
25
31
|
|
|
26
32
|
.o-input {
|
|
33
|
+
@include h.defineVar("input-height", $input-height);
|
|
34
|
+
@include h.defineVar("input-padding", $input-padding);
|
|
35
|
+
@include h.defineVar("input-disabled-opacity", $input-disabled-opacity);
|
|
36
|
+
|
|
37
|
+
@include h.defineVar("input-color", $input-color);
|
|
38
|
+
@include h.defineVar("input-font-size", $input-font-size);
|
|
39
|
+
@include h.defineVar("input-font-weight", $input-font-weight);
|
|
40
|
+
@include h.defineVar("input-line-height", $input-line-height);
|
|
41
|
+
|
|
42
|
+
@include h.defineVar("input-box-shadow", $input-box-shadow);
|
|
43
|
+
@include h.defineVar("input-background-color", $input-background-color);
|
|
44
|
+
@include h.defineVar("input-border-width", $input-border-width);
|
|
45
|
+
@include h.defineVar("input-border-style", $input-border-style);
|
|
46
|
+
@include h.defineVar("input-border-color", $input-border-color);
|
|
47
|
+
@include h.defineVar("input-border-radius", $input-border-radius);
|
|
48
|
+
@include h.defineVar(
|
|
49
|
+
"input-border-radius-rounded",
|
|
50
|
+
$input-border-radius-rounded
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
@include h.defineVar(
|
|
54
|
+
"input-textarea-min-height",
|
|
55
|
+
$input-textarea-min-height
|
|
56
|
+
);
|
|
57
|
+
@include h.defineVar(
|
|
58
|
+
"input-textarea-max-height",
|
|
59
|
+
$input-textarea-max-height
|
|
60
|
+
);
|
|
61
|
+
@include h.defineVar("input-textarea-padding", $input-textarea-padding);
|
|
62
|
+
|
|
63
|
+
@include h.defineVar("input-counter-font-size", $input-counter-font-size);
|
|
64
|
+
@include h.defineVar("input-counter-padding", $input-counter-padding);
|
|
65
|
+
|
|
66
|
+
// define focus shadow effect
|
|
67
|
+
@include h.focusable(".o-input__input");
|
|
68
|
+
|
|
69
|
+
// add clickable cursor
|
|
70
|
+
@include h.clickable;
|
|
71
|
+
|
|
27
72
|
display: inline-block;
|
|
28
73
|
position: relative;
|
|
29
74
|
|
|
75
|
+
// size variants
|
|
76
|
+
@each $name, $value in vars.$sizes {
|
|
77
|
+
&--#{$name} {
|
|
78
|
+
@include h.defineVar("input-font-size", h.useVar("size-#{$name}"));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// color variants
|
|
83
|
+
@each $name, $pair in vars.$colors {
|
|
84
|
+
&--#{$name} {
|
|
85
|
+
@include h.defineVar("input-border-color", h.useVar($name));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
30
89
|
&__input {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
90
|
+
// remove default appearance
|
|
91
|
+
@include h.removeAppearance;
|
|
92
|
+
|
|
93
|
+
display: inline-block;
|
|
34
94
|
position: relative;
|
|
35
|
-
vertical-align: top;
|
|
36
|
-
|
|
37
|
-
color: var(--#{$prefix}input-color, $input-color);
|
|
38
|
-
font-size: var(--#{$prefix}base-font-size, $base-font-size);
|
|
39
|
-
box-shadow: var(--#{$prefix}input-box-shadow, $input-box-shadow);
|
|
40
|
-
background-color: var(
|
|
41
|
-
--#{$prefix}input-background-color,
|
|
42
|
-
$input-background-color
|
|
43
|
-
);
|
|
44
|
-
border-color: var(--#{$prefix}input-border-color, $input-border-color);
|
|
45
|
-
border-style: var(--#{$prefix}input-border-style, $input-border-style);
|
|
46
|
-
border-width: var(--#{$prefix}input-border-width, $input-border-width);
|
|
47
|
-
border-radius: var(
|
|
48
|
-
--#{$prefix}input-border-radius,
|
|
49
|
-
$input-border-radius
|
|
50
|
-
);
|
|
51
95
|
|
|
52
|
-
height:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
96
|
+
height: h.useVar("input-height");
|
|
97
|
+
padding: h.useVar("input-padding");
|
|
98
|
+
|
|
99
|
+
color: h.useVar("input-color");
|
|
100
|
+
font-size: h.useVar("input-font-size");
|
|
101
|
+
font-weight: h.useVar("input-font-weight");
|
|
102
|
+
line-height: h.useVar("input-line-height");
|
|
103
|
+
|
|
104
|
+
box-shadow: h.useVar("input-box-shadow");
|
|
105
|
+
background-color: h.useVar("input-background-color");
|
|
106
|
+
|
|
107
|
+
border-color: h.useVar("input-border-color");
|
|
108
|
+
border-style: h.useVar("input-border-style");
|
|
109
|
+
border-width: h.useVar("input-border-width");
|
|
110
|
+
border-radius: h.useVar("input-border-radius");
|
|
56
111
|
|
|
57
112
|
&--iconspace-left {
|
|
58
|
-
padding-left:
|
|
113
|
+
padding-left: h.useVar("input-height");
|
|
59
114
|
}
|
|
60
115
|
|
|
61
116
|
&--iconspace-right {
|
|
62
|
-
padding-right:
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&[disabled] {
|
|
66
|
-
cursor: inherit;
|
|
117
|
+
padding-right: h.useVar("input-height");
|
|
67
118
|
}
|
|
68
119
|
}
|
|
69
120
|
|
|
@@ -73,46 +124,23 @@ $input-textarea-padding: 0.625em !default;
|
|
|
73
124
|
min-width: 100%;
|
|
74
125
|
height: auto;
|
|
75
126
|
resize: vertical;
|
|
76
|
-
padding:
|
|
77
|
-
--#{$prefix}input-textarea-padding,
|
|
78
|
-
$input-textarea-padding
|
|
79
|
-
);
|
|
127
|
+
padding: h.useVar("input-textarea-padding");
|
|
80
128
|
|
|
81
129
|
&:not([rows]) {
|
|
82
|
-
max-height:
|
|
83
|
-
|
|
84
|
-
$input-textarea-max-height
|
|
85
|
-
);
|
|
86
|
-
min-height: var(
|
|
87
|
-
--#{$prefix}input-textarea-min-height,
|
|
88
|
-
$input-textarea-min-height
|
|
89
|
-
);
|
|
130
|
+
max-height: h.useVar("input-textarea-max-height");
|
|
131
|
+
min-height: h.useVar("input-textarea-min-height");
|
|
90
132
|
}
|
|
91
133
|
}
|
|
92
134
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// colar variants
|
|
101
|
-
@each $name, $pair in $colors {
|
|
102
|
-
$color: list.nth($pair, 1);
|
|
103
|
-
|
|
104
|
-
&--#{$name} .o-input__input {
|
|
105
|
-
--#{$prefix}focus: #{createFocus($color)};
|
|
106
|
-
|
|
107
|
-
border-color: var(--#{$prefix}variant-#{$name}, $color);
|
|
108
|
-
}
|
|
135
|
+
&--rounded {
|
|
136
|
+
@include h.defineVar(
|
|
137
|
+
"input-border-radius",
|
|
138
|
+
h.useVar("input-border-radius-rounded")
|
|
139
|
+
);
|
|
109
140
|
}
|
|
110
141
|
|
|
111
|
-
&--
|
|
112
|
-
|
|
113
|
-
--#{$prefix}input-rounded-border-radius,
|
|
114
|
-
$input-rounded-border-radius
|
|
115
|
-
);
|
|
142
|
+
&--disabled {
|
|
143
|
+
@include h.disabled(h.useVar("input-disabled-opacity"));
|
|
116
144
|
}
|
|
117
145
|
|
|
118
146
|
&--expanded {
|
|
@@ -128,11 +156,9 @@ $input-textarea-padding: 0.625em !default;
|
|
|
128
156
|
&__counter {
|
|
129
157
|
display: block;
|
|
130
158
|
float: right;
|
|
131
|
-
font-size:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
);
|
|
135
|
-
margin: var(--#{$prefix}input-counter-margin, $input-counter-margin);
|
|
159
|
+
font-size: h.useVar("input-counter-font-size");
|
|
160
|
+
padding: h.useVar("input-counter-padding");
|
|
161
|
+
height: h.useVar("input-height");
|
|
136
162
|
}
|
|
137
163
|
|
|
138
164
|
&__icon-left,
|
|
@@ -140,8 +166,7 @@ $input-textarea-padding: 0.625em !default;
|
|
|
140
166
|
position: absolute;
|
|
141
167
|
top: 0;
|
|
142
168
|
height: 100%;
|
|
143
|
-
width:
|
|
144
|
-
z-index: var(--#{$prefix}input-icon-zindex, $input-icon-zindex);
|
|
169
|
+
width: h.useVar("input-height");
|
|
145
170
|
}
|
|
146
171
|
|
|
147
172
|
&__icon-right {
|
|
@@ -151,14 +176,4 @@ $input-textarea-padding: 0.625em !default;
|
|
|
151
176
|
&__icon-left {
|
|
152
177
|
left: 0;
|
|
153
178
|
}
|
|
154
|
-
|
|
155
|
-
// focus effect
|
|
156
|
-
&:focus,
|
|
157
|
-
&:focus-visible,
|
|
158
|
-
&:focus-within {
|
|
159
|
-
.o-input__input {
|
|
160
|
-
box-shadow: 0 0 0 0.25rem var(--#{$prefix}focus);
|
|
161
|
-
outline: none;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
179
|
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
@use "../utils/helpers" as h;
|
|
2
|
+
@use "../utils/variables" as vars;
|
|
3
|
+
|
|
4
|
+
/* @docs */
|
|
5
|
+
$listbox-disabled-opacity: h.useVar("control-disabled-opacity") !default;
|
|
6
|
+
$listbox-box-shadow:
|
|
7
|
+
0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1),
|
|
8
|
+
0 0 0 1px rgba(10, 10, 10, 0.02) !default;
|
|
9
|
+
$listbox-background-color: h.useVar("control-brackground-color") !default;
|
|
10
|
+
$listbox-border-color: h.useVar("control-border-color") !default;
|
|
11
|
+
$listbox-border-style: solid !default;
|
|
12
|
+
$listbox-border-width: h.useVar("control-border-width") !default;
|
|
13
|
+
$listbox-border-radius: h.useVar("border-radius") !default;
|
|
14
|
+
|
|
15
|
+
$listbox-item-padding: h.useVar("control-spacer")
|
|
16
|
+
calc(h.useVar("control-spacer") * 2) !default;
|
|
17
|
+
$listbox-item-color: h.useVar("font-color") !default;
|
|
18
|
+
$listbox-item-font-size: h.useVar("font-size") !default;
|
|
19
|
+
$listbox-item-font-weight: h.useVar("font-weight") !default;
|
|
20
|
+
$listbox-item-line-height: h.useVar("line-height") !default;
|
|
21
|
+
|
|
22
|
+
$listbox-item-background-color: transparent !default;
|
|
23
|
+
$listbox-item-active-color: h.useVar("primary-invert") !default;
|
|
24
|
+
$listbox-item-active-background-color: h.useVar("primary") !default;
|
|
25
|
+
$listbox-item-hover-background-color: h.useVar("grey-lighter") !default;
|
|
26
|
+
$listbox-item-hover-color: h.useVar("font-color") !default;
|
|
27
|
+
/* @docs */
|
|
28
|
+
|
|
29
|
+
.o-listbox {
|
|
30
|
+
@include h.defineVar("listbox-disabled-opacity", $listbox-disabled-opacity);
|
|
31
|
+
@include h.defineVar("listbox-box-shadow", $listbox-box-shadow);
|
|
32
|
+
|
|
33
|
+
@include h.defineVar("listbox-background-color", $listbox-background-color);
|
|
34
|
+
@include h.defineVar("listbox-border-style", $listbox-border-style);
|
|
35
|
+
@include h.defineVar("listbox-border-color", $listbox-border-color);
|
|
36
|
+
@include h.defineVar("listbox-border-width", $listbox-border-width);
|
|
37
|
+
@include h.defineVar("listbox-border-radius", $listbox-border-radius);
|
|
38
|
+
|
|
39
|
+
@include h.defineVar("listbox-item-color", $listbox-item-color);
|
|
40
|
+
@include h.defineVar("listbox-item-font-size", $listbox-item-font-size);
|
|
41
|
+
@include h.defineVar("listbox-item-font-weight", $listbox-item-font-weight);
|
|
42
|
+
@include h.defineVar("listbox-item-line-height", $listbox-item-line-height);
|
|
43
|
+
@include h.defineVar("listbox-item-padding", $listbox-item-padding);
|
|
44
|
+
@include h.defineVar(
|
|
45
|
+
"listbox-item-background-color",
|
|
46
|
+
$listbox-item-background-color
|
|
47
|
+
);
|
|
48
|
+
@include h.defineVar(
|
|
49
|
+
"listbox-item-active-color",
|
|
50
|
+
$listbox-item-active-color
|
|
51
|
+
);
|
|
52
|
+
@include h.defineVar(
|
|
53
|
+
"listbox-item-active-background-color",
|
|
54
|
+
$listbox-item-active-background-color
|
|
55
|
+
);
|
|
56
|
+
@include h.defineVar("listbox-item-hover-color", $listbox-item-hover-color);
|
|
57
|
+
@include h.defineVar(
|
|
58
|
+
"listbox-item-hover-background-color",
|
|
59
|
+
$listbox-item-hover-background-color
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
// define focus shadow effect
|
|
63
|
+
@include h.focusable();
|
|
64
|
+
|
|
65
|
+
display: block;
|
|
66
|
+
position: relative;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
|
|
69
|
+
box-shadow: h.useVar("listbox-box-shadow");
|
|
70
|
+
background-color: h.useVar("listbox-background-color");
|
|
71
|
+
border-color: h.useVar("listbox-border-color");
|
|
72
|
+
border-style: h.useVar("listbox-border-style");
|
|
73
|
+
border-width: h.useVar("listbox-border-width");
|
|
74
|
+
border-radius: h.useVar("listbox-border-radius");
|
|
75
|
+
|
|
76
|
+
&--disabled {
|
|
77
|
+
@include h.disabled(h.useVar("listbox-disabled-opacity"));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&__header,
|
|
81
|
+
&__filter {
|
|
82
|
+
padding: h.useVar("listbox-item-padding");
|
|
83
|
+
|
|
84
|
+
border-bottom-color: h.useVar("listbox-border-color");
|
|
85
|
+
border-bottom-style: h.useVar("listbox-border-style");
|
|
86
|
+
border-bottom-width: h.useVar("listbox-border-width");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&__footer,
|
|
90
|
+
&__empty {
|
|
91
|
+
padding: h.useVar("listbox-item-padding");
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&__list {
|
|
95
|
+
outline: none;
|
|
96
|
+
list-style: none;
|
|
97
|
+
padding: 0;
|
|
98
|
+
margin: 0;
|
|
99
|
+
|
|
100
|
+
&:only-child {
|
|
101
|
+
border-radius: h.useVar("listbox-border-radius");
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:first-child {
|
|
105
|
+
border-top-left-radius: h.useVar("listbox-border-radius");
|
|
106
|
+
border-top-right-radius: h.useVar("listbox-border-radius");
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:last-child {
|
|
110
|
+
border-bottom-left-radius: h.useVar("listbox-border-radius");
|
|
111
|
+
border-bottom-right-radius: h.useVar("listbox-border-radius");
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:not(:last-child) {
|
|
115
|
+
.o-listbox__item:last-child {
|
|
116
|
+
border-bottom-color: h.useVar("listbox-border-color");
|
|
117
|
+
border-bottom-style: h.useVar("listbox-border-style");
|
|
118
|
+
border-bottom-width: h.useVar("listbox-border-width");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&__item {
|
|
124
|
+
display: block;
|
|
125
|
+
position: relative;
|
|
126
|
+
|
|
127
|
+
padding: h.useVar("listbox-item-padding");
|
|
128
|
+
|
|
129
|
+
color: h.useVar("listbox-item-color");
|
|
130
|
+
font-size: h.useVar("listbox-item-font-size");
|
|
131
|
+
font-weight: h.useVar("listbox-item-font-weight");
|
|
132
|
+
line-height: h.useVar("listbox-item-line-height");
|
|
133
|
+
|
|
134
|
+
background-color: h.useVar("listbox-item-background-color");
|
|
135
|
+
|
|
136
|
+
&:not(:last-child) {
|
|
137
|
+
border-bottom-color: h.useVar("listbox-border-color");
|
|
138
|
+
border-bottom-style: h.useVar("listbox-border-style");
|
|
139
|
+
border-bottom-width: h.useVar("listbox-border-width");
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&--selected,
|
|
143
|
+
&--active {
|
|
144
|
+
@include h.defineVar(
|
|
145
|
+
"listbox-item-color",
|
|
146
|
+
h.useVar("listbox-item-active-color")
|
|
147
|
+
);
|
|
148
|
+
@include h.defineVar(
|
|
149
|
+
"listbox-item-background-color",
|
|
150
|
+
h.useVar("listbox-item-active-background-color")
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&--clickable {
|
|
155
|
+
@include h.clickable;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&--clickable:not(&--active) {
|
|
159
|
+
&:hover,
|
|
160
|
+
&.o-listbox__item--focused {
|
|
161
|
+
@include h.defineVar(
|
|
162
|
+
"listbox-item-color",
|
|
163
|
+
h.useVar("listbox-item-hover-color")
|
|
164
|
+
);
|
|
165
|
+
@include h.defineVar(
|
|
166
|
+
"listbox-item-background-color",
|
|
167
|
+
h.useVar("listbox-item-hover-background-color")
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&--disabled {
|
|
173
|
+
@include h.disabled(h.useVar("listbox-disabled-opacity"));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|