@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,104 +1,130 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
2
|
@use "sass:color";
|
|
3
|
+
@use "../utils/helpers" as h;
|
|
4
|
+
@use "../utils/variables" as vars;
|
|
3
5
|
|
|
4
6
|
/* @docs */
|
|
5
|
-
$switch-spacer:
|
|
7
|
+
$switch-spacer: h.useVar("control-spacer") !default;
|
|
6
8
|
$switch-width: 2.75em !default;
|
|
7
9
|
$switch-height: 1.5em !default;
|
|
8
|
-
|
|
9
|
-
$switch-
|
|
10
|
-
$switch-
|
|
11
|
-
$switch-
|
|
12
|
-
$switch-
|
|
13
|
-
|
|
14
|
-
) !default;
|
|
15
|
-
$switch-
|
|
16
|
-
$switch-
|
|
10
|
+
|
|
11
|
+
$switch-color: h.useVar("font-color") !default;
|
|
12
|
+
$switch-font-size: h.useVar("font-size") !default;
|
|
13
|
+
$switch-font-weight: h.useVar("font-weight") !default;
|
|
14
|
+
$switch-line-height: h.useVar("line-height") !default;
|
|
15
|
+
|
|
16
|
+
$switch-box-shadow: h.useVar("control-box-shadow-inset") !default;
|
|
17
|
+
$switch-border-color: h.useVar("grey-lighter") !default;
|
|
18
|
+
$switch-border-style: solid !default;
|
|
19
|
+
$switch-border-width: h.useVar("control-border-width") !default;
|
|
20
|
+
$switch-border-radius: h.useVar("border-radius") !default;
|
|
21
|
+
$switch-border-radius-rounded: h.useVar("border-radius-rounded") !default;
|
|
22
|
+
$switch-background-color: h.useVar("grey-light") !default;
|
|
23
|
+
$switch-toggle-background-color: vars.$control-brackground-color !default;
|
|
24
|
+
|
|
25
|
+
$switch-checked-background-color: h.useVar("primary") !default;
|
|
26
|
+
$switch-checked-border-color: h.useVar("primary") !default;
|
|
27
|
+
$switch-disabled-opacity: h.useVar("control-disabled-opacity") !default;
|
|
17
28
|
/* @docs */
|
|
18
29
|
|
|
19
30
|
@function switchSVG($color) {
|
|
20
|
-
$
|
|
31
|
+
$start: "<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'>";
|
|
32
|
+
$content: "<circle r='3' fill='#{$color}'/>";
|
|
33
|
+
$end: "</svg>";
|
|
21
34
|
|
|
22
|
-
@return svg-encode($
|
|
35
|
+
@return h.svg-encode("#{$start}#{$content}#{$end}");
|
|
23
36
|
}
|
|
24
37
|
|
|
25
38
|
.o-switch {
|
|
26
|
-
@include
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
@include h.defineVar("switch-spacer", $switch-spacer);
|
|
40
|
+
@include h.defineVar("switch-width", $switch-width);
|
|
41
|
+
@include h.defineVar("switch-height", $switch-height);
|
|
42
|
+
@include h.defineVar("switch-color", $switch-color);
|
|
43
|
+
@include h.defineVar("switch-font-size", $switch-font-size);
|
|
44
|
+
@include h.defineVar("switch-font-weight", $switch-font-weight);
|
|
45
|
+
@include h.defineVar("switch-line-height", $switch-line-height);
|
|
46
|
+
@include h.defineVar("switch-background-color", $switch-background-color);
|
|
47
|
+
@include h.defineVar(
|
|
48
|
+
"switch-background-image",
|
|
49
|
+
url(switchSVG($switch-toggle-background-color))
|
|
50
|
+
);
|
|
51
|
+
@include h.defineVar(
|
|
52
|
+
"switch-checked-background-color",
|
|
53
|
+
$switch-checked-background-color
|
|
54
|
+
);
|
|
55
|
+
@include h.defineVar(
|
|
56
|
+
"switch-checked-border-color",
|
|
57
|
+
$switch-checked-border-color
|
|
58
|
+
);
|
|
59
|
+
@include h.defineVar("switch-box-shadow", $switch-box-shadow);
|
|
60
|
+
@include h.defineVar("switch-border-color", $switch-border-color);
|
|
61
|
+
@include h.defineVar("switch-border-style", $switch-border-style);
|
|
62
|
+
@include h.defineVar("switch-border-width", $switch-border-width);
|
|
63
|
+
@include h.defineVar("switch-border-radius", $switch-border-radius);
|
|
64
|
+
@include h.defineVar(
|
|
65
|
+
"switch-border-radius-rounded",
|
|
66
|
+
$switch-border-radius-rounded
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
// define focus shadow effect
|
|
70
|
+
@include h.focusable(".o-switch__input");
|
|
71
|
+
|
|
72
|
+
// add clickable cursor
|
|
73
|
+
@include h.clickable;
|
|
74
|
+
|
|
75
|
+
display: inline-flex;
|
|
30
76
|
align-items: center;
|
|
31
77
|
position: relative;
|
|
32
78
|
|
|
79
|
+
color: h.useVar("switch-color");
|
|
80
|
+
font-size: h.useVar("switch-font-size");
|
|
81
|
+
font-weight: h.useVar("switch-font-weight");
|
|
82
|
+
line-height: h.useVar("switch-line-height");
|
|
83
|
+
|
|
33
84
|
&__input {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
cursor: pointer;
|
|
40
|
-
-webkit-appearance: none;
|
|
41
|
-
-moz-appearance: none;
|
|
42
|
-
appearance: none;
|
|
43
|
-
background-color: var(
|
|
44
|
-
--#{$prefix}switch-background,
|
|
45
|
-
$switch-background
|
|
46
|
-
);
|
|
47
|
-
background-image: url(switchSVG($switch-toggle-background));
|
|
48
|
-
background-position: left center;
|
|
49
|
-
background-repeat: no-repeat;
|
|
50
|
-
background-size: contain;
|
|
51
|
-
border: var(--#{$prefix}switch-border, $switch-border);
|
|
52
|
-
border-radius: var(
|
|
53
|
-
--#{$prefix}switch-border-radius,
|
|
54
|
-
$switch-border-radius
|
|
55
|
-
);
|
|
85
|
+
// add clickable cursor
|
|
86
|
+
@include h.clickable;
|
|
87
|
+
|
|
88
|
+
// remove default appearance
|
|
89
|
+
@include h.removeAppearance;
|
|
56
90
|
-webkit-print-color-adjust: exact;
|
|
57
91
|
print-color-adjust: exact;
|
|
58
|
-
transition: background-position var(--#{$prefix}transition-duration)
|
|
59
|
-
var(--#{$prefix}transition-timing);
|
|
60
92
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
93
|
+
font-size: inherit;
|
|
94
|
+
outline: none;
|
|
95
|
+
vertical-align: top;
|
|
96
|
+
width: h.useVar("switch-width");
|
|
97
|
+
height: h.useVar("switch-height");
|
|
69
98
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
&--#{$name} {
|
|
73
|
-
font-size: var(--#{$prefix}font-size-#{name}, $value);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
99
|
+
transition: background-position h.useVar("transition-duration")
|
|
100
|
+
h.useVar("transition-timing");
|
|
76
101
|
|
|
77
|
-
|
|
78
|
-
@each $name, $pair in $colors {
|
|
79
|
-
$color: list.nth($pair, 1);
|
|
80
|
-
&--#{$name} {
|
|
81
|
-
--#{$prefix}focus: #{createFocus($color)};
|
|
102
|
+
box-shadow: h.useVar("switch-box-shadow");
|
|
82
103
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
104
|
+
background-color: h.useVar("switch-background-color");
|
|
105
|
+
background-image: h.useVar("switch-background-image");
|
|
106
|
+
background-position: left center;
|
|
107
|
+
background-repeat: no-repeat;
|
|
108
|
+
background-size: contain;
|
|
88
109
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
110
|
+
border-radius: h.useVar("switch-border-radius");
|
|
111
|
+
border-width: h.useVar("switch-border-width");
|
|
112
|
+
border-color: h.useVar("switch-border-color");
|
|
113
|
+
border-style: h.useVar("switch-border-style");
|
|
92
114
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
115
|
+
&:checked {
|
|
116
|
+
background-position: right center;
|
|
117
|
+
background-color: h.useVar("switch-checked-background-color");
|
|
118
|
+
border-color: h.useVar("switch-checked-border-color");
|
|
97
119
|
}
|
|
98
120
|
}
|
|
99
121
|
|
|
100
122
|
&__label {
|
|
101
|
-
|
|
123
|
+
padding: 0 0 0 h.useVar("switch-spacer");
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&--disabled {
|
|
127
|
+
@include h.disabled(h.useVar("switch-disabled-opacity"));
|
|
102
128
|
}
|
|
103
129
|
|
|
104
130
|
&--left {
|
|
@@ -106,32 +132,42 @@ $switch-disabled-opacity: var(--#{$prefix}base-disabled-opacity) !default;
|
|
|
106
132
|
flex-direction: row-reverse;
|
|
107
133
|
|
|
108
134
|
.o-switch__label {
|
|
109
|
-
|
|
110
|
-
margin-right: var(--#{$prefix}switch-spacer, $switch-spacer);
|
|
135
|
+
padding: 0 h.useVar("switch-spacer") 0 0;
|
|
111
136
|
}
|
|
112
137
|
}
|
|
113
138
|
|
|
114
|
-
&--rounded
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
139
|
+
&--rounded {
|
|
140
|
+
@include h.defineVar(
|
|
141
|
+
"switch-border-radius",
|
|
142
|
+
h.useVar("switch-border-radius-rounded")
|
|
118
143
|
);
|
|
119
144
|
}
|
|
120
145
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
146
|
+
// size variants
|
|
147
|
+
@each $name, $value in vars.$sizes {
|
|
148
|
+
&--#{$name} {
|
|
149
|
+
@include h.defineVar("switch-font-size", h.useVar("size-#{$name}"));
|
|
150
|
+
}
|
|
126
151
|
}
|
|
127
152
|
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
153
|
+
// color variants
|
|
154
|
+
@each $name, $pair in vars.$colors {
|
|
155
|
+
// checked variant
|
|
156
|
+
&--#{$name} {
|
|
157
|
+
@include h.defineVar(
|
|
158
|
+
"switch-checked-border-color",
|
|
159
|
+
h.useVar($name)
|
|
160
|
+
);
|
|
161
|
+
@include h.defineVar(
|
|
162
|
+
"switch-checked-background-color",
|
|
163
|
+
h.useVar($name)
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// possive variant
|
|
168
|
+
&--#{$name}-passive {
|
|
169
|
+
@include h.defineVar("switch-border-color", h.useVar($name));
|
|
170
|
+
@include h.defineVar("switch-background-color", h.useVar($name));
|
|
135
171
|
}
|
|
136
172
|
}
|
|
137
173
|
}
|