@oruga-ui/theme-oruga 0.2.2 → 0.4.0
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/README.md +6 -14
- package/dist/oruga.css +1894 -207
- package/dist/oruga.min.css +1 -1
- package/dist/scss/components/_autocomplete.scss +4 -49
- package/dist/scss/components/_button.scss +71 -88
- package/dist/scss/components/_carousel.scss +70 -97
- package/dist/scss/components/_checkbox.scss +66 -83
- package/dist/scss/components/_collapse.scss +3 -0
- package/dist/scss/components/_datepicker.scss +146 -242
- package/dist/scss/components/_datetimepicker.scss +3 -0
- package/dist/scss/components/_dropdown.scss +74 -160
- package/dist/scss/components/_field.scss +16 -38
- package/dist/scss/components/_icon.scss +6 -8
- package/dist/scss/components/_input.scss +50 -52
- package/dist/scss/components/_loading.scss +5 -13
- package/dist/scss/components/_menu.scss +33 -65
- package/dist/scss/components/_modal.scss +25 -34
- package/dist/scss/components/_notification.scss +35 -72
- package/dist/scss/components/_pagination.scss +43 -86
- package/dist/scss/components/_radio.scss +53 -60
- package/dist/scss/components/_select.scss +62 -74
- package/dist/scss/components/_sidebar.scss +31 -107
- package/dist/scss/components/_skeleton.scss +10 -23
- package/dist/scss/components/_slider.scss +67 -109
- package/dist/scss/components/_steps.scss +133 -310
- package/dist/scss/components/_switch.scss +64 -87
- package/dist/scss/components/_table.scss +79 -140
- package/dist/scss/components/_tabs.scss +101 -153
- package/dist/scss/components/_taginput.scss +61 -102
- package/dist/scss/components/_timepicker.scss +26 -50
- package/dist/scss/components/_tooltip.scss +120 -216
- package/dist/scss/components/_upload.scss +17 -22
- package/dist/scss/oruga-build.scss +9 -0
- package/dist/scss/oruga.scss +39 -190
- package/dist/scss/utils/_animations.scss +11 -9
- package/dist/scss/utils/_base.scss +4 -4
- package/dist/scss/utils/_helpers.scss +12 -106
- package/dist/scss/utils/_root.scss +46 -24
- package/dist/scss/utils/_variables.scss +6 -7
- package/dist/theme.js +1 -2
- package/package.json +30 -31
- package/src/assets/scss/components/_autocomplete.scss +4 -49
- package/src/assets/scss/components/_button.scss +71 -88
- package/src/assets/scss/components/_carousel.scss +70 -97
- package/src/assets/scss/components/_checkbox.scss +66 -83
- package/src/assets/scss/components/_collapse.scss +3 -0
- package/src/assets/scss/components/_datepicker.scss +146 -242
- package/src/assets/scss/components/_datetimepicker.scss +3 -0
- package/src/assets/scss/components/_dropdown.scss +74 -160
- package/src/assets/scss/components/_field.scss +16 -38
- package/src/assets/scss/components/_icon.scss +6 -8
- package/src/assets/scss/components/_input.scss +50 -52
- package/src/assets/scss/components/_loading.scss +5 -13
- package/src/assets/scss/components/_menu.scss +33 -65
- package/src/assets/scss/components/_modal.scss +25 -34
- package/src/assets/scss/components/_notification.scss +35 -72
- package/src/assets/scss/components/_pagination.scss +43 -86
- package/src/assets/scss/components/_radio.scss +53 -60
- package/src/assets/scss/components/_select.scss +62 -74
- package/src/assets/scss/components/_sidebar.scss +31 -107
- package/src/assets/scss/components/_skeleton.scss +10 -23
- package/src/assets/scss/components/_slider.scss +67 -109
- package/src/assets/scss/components/_steps.scss +133 -310
- package/src/assets/scss/components/_switch.scss +64 -87
- package/src/assets/scss/components/_table.scss +79 -140
- package/src/assets/scss/components/_tabs.scss +101 -153
- package/src/assets/scss/components/_taginput.scss +61 -102
- package/src/assets/scss/components/_timepicker.scss +26 -50
- package/src/assets/scss/components/_tooltip.scss +120 -216
- package/src/assets/scss/components/_upload.scss +17 -22
- package/src/assets/scss/oruga-build.scss +9 -0
- package/src/assets/scss/oruga.scss +39 -190
- package/src/assets/scss/utils/_animations.scss +11 -9
- package/src/assets/scss/utils/_base.scss +4 -4
- package/src/assets/scss/utils/_helpers.scss +12 -106
- package/src/assets/scss/utils/_root.scss +46 -24
- package/src/assets/scss/utils/_variables.scss +6 -7
- package/dist/oruga-full.css +0 -3922
- package/dist/oruga-full.min.css +0 -1
- package/dist/scss/oruga-common.scss +0 -37
- package/dist/scss/oruga-full.scss +0 -9
- package/src/assets/scss/oruga-common.scss +0 -37
- package/src/assets/scss/oruga-full.scss +0 -9
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
2
|
|
|
3
3
|
/* @docs */
|
|
4
|
-
$upload-draggable-border: 1px dashed $grey-light !default;
|
|
5
|
-
$upload-draggable-border-radius: $base-border-radius !default;
|
|
6
|
-
$upload-draggable-disabled-opacity:
|
|
7
|
-
$
|
|
4
|
+
$upload-draggable-border: 1px dashed var(--#{$prefix}grey-light) !default;
|
|
5
|
+
$upload-draggable-border-radius: var(--#{$prefix}base-border-radius) !default;
|
|
6
|
+
$upload-draggable-disabled-opacity: var(
|
|
7
|
+
--#{$prefix}base-disabled-opacity
|
|
8
|
+
) !default;
|
|
9
|
+
$upload-draggable-hover-border-color: var(--#{$prefix}grey) !default;
|
|
8
10
|
$upload-draggable-padding: 0.25em !default;
|
|
9
11
|
/* @docs */
|
|
10
12
|
|
|
@@ -13,9 +15,8 @@ $upload-draggable-padding: 0.25em !default;
|
|
|
13
15
|
display: inline-flex;
|
|
14
16
|
|
|
15
17
|
&--disabled {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"upload-draggable-disabled-opacity",
|
|
18
|
+
opacity: var(
|
|
19
|
+
--#{$prefix}upload-draggable-disabled-opacity,
|
|
19
20
|
$upload-draggable-disabled-opacity
|
|
20
21
|
);
|
|
21
22
|
cursor: not-allowed;
|
|
@@ -29,33 +30,27 @@ $upload-draggable-padding: 0.25em !default;
|
|
|
29
30
|
cursor: pointer;
|
|
30
31
|
width: 100%;
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"upload-draggable-padding",
|
|
33
|
+
padding: var(
|
|
34
|
+
--#{$prefix}upload-draggable-padding,
|
|
35
35
|
$upload-draggable-padding
|
|
36
36
|
);
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
$upload-draggable-border
|
|
41
|
-
);
|
|
42
|
-
@include avariable(
|
|
43
|
-
"border-radius",
|
|
44
|
-
"upload-draggable-border-radius",
|
|
37
|
+
border: var(--#{$prefix}upload-draggable-border, $upload-draggable-border);
|
|
38
|
+
border-radius: var(
|
|
39
|
+
--#{$prefix}upload-draggable-border-radius,
|
|
45
40
|
$upload-draggable-border-radius
|
|
46
41
|
);
|
|
47
42
|
|
|
48
43
|
&--hovered {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"upload-draggable-hover-border-color",
|
|
44
|
+
border-color: var(
|
|
45
|
+
--#{$prefix}upload-draggable-hover-border-color,
|
|
52
46
|
$upload-draggable-hover-border-color
|
|
53
47
|
);
|
|
54
48
|
|
|
55
49
|
@each $name, $pair in $colors {
|
|
56
50
|
$color: list.nth($pair, 1);
|
|
51
|
+
|
|
57
52
|
&-#{$name} {
|
|
58
|
-
|
|
53
|
+
border-color: var(--#{$prefix}variant-#{$name}, $color);
|
|
59
54
|
}
|
|
60
55
|
}
|
|
61
56
|
}
|
package/dist/scss/oruga.scss
CHANGED
|
@@ -1,192 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
* Oruga
|
|
3
|
-
|
|
1
|
+
/******************
|
|
2
|
+
* Oruga Theme
|
|
3
|
+
*******************/
|
|
4
4
|
|
|
5
|
-
//
|
|
6
|
-
|
|
7
|
-
$sizes: () !default;
|
|
8
|
-
|
|
9
|
-
// Import Ourga Theme variables
|
|
10
|
-
@import "utils/variables";
|
|
5
|
+
// import globals, helpers and functions
|
|
6
|
+
@import "utils/animations";
|
|
11
7
|
@import "utils/helpers";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// Datepicker
|
|
48
|
-
$whitelist: add-to-whitelist(
|
|
49
|
-
"datepicker-btn-border-color",
|
|
50
|
-
"datepicker-btn-color",
|
|
51
|
-
"datepicker-item-disabled-color",
|
|
52
|
-
"datepicker-item-hovered-background-color",
|
|
53
|
-
"datepicker-item-hovered-color",
|
|
54
|
-
"datepicker-item-selectable-color",
|
|
55
|
-
"datepicker-item-selected-background-color",
|
|
56
|
-
"datepicker-item-selected-color",
|
|
57
|
-
"datepicker-item-selected-within-background-color",
|
|
58
|
-
"datepicker-event-background-color"
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
// Dropdown
|
|
62
|
-
$whitelist: add-to-whitelist(
|
|
63
|
-
"dropdown-disabled-opacity",
|
|
64
|
-
"dropdown-menu-background",
|
|
65
|
-
"dropdown-menu-zindex",
|
|
66
|
-
"dropdown-menu-spacer",
|
|
67
|
-
"dropdown-mobile-overlay-color",
|
|
68
|
-
"dropdown-mobile-overlay-zindex",
|
|
69
|
-
"dropdown-mobile-zindex",
|
|
70
|
-
"dropdown-item-active-background-color",
|
|
71
|
-
"dropdown-item-active-color",
|
|
72
|
-
"dropdown-item-disabled-opacity"
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
// Icon
|
|
76
|
-
$whitelist: add-to-whitelist("icon-spin-duration");
|
|
77
|
-
|
|
78
|
-
// Input
|
|
79
|
-
$whitelist: add-to-whitelist();
|
|
80
|
-
|
|
81
|
-
// Modal
|
|
82
|
-
$whitelist: add-to-whitelist(
|
|
83
|
-
"modal-zindex",
|
|
84
|
-
"modal-content-background-color",
|
|
85
|
-
"modal-overlay-background-color",
|
|
86
|
-
"moda-close-size",
|
|
87
|
-
"modal-close-top",
|
|
88
|
-
"modal-close-right"
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
// Notification
|
|
92
|
-
$whitelist: add-to-whitelist(
|
|
93
|
-
"notification-background-color",
|
|
94
|
-
"notification-color",
|
|
95
|
-
"notification-close-right",
|
|
96
|
-
"notification-close-top",
|
|
97
|
-
"notification-notices-padding",
|
|
98
|
-
"notification-notices-zindex"
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
// Pagination
|
|
102
|
-
$whitelist: add-to-whitelist(
|
|
103
|
-
"pagination-link-current-background-color",
|
|
104
|
-
"pagination-link-current-border-color",
|
|
105
|
-
"pagination-link-current-color"
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
// Radio
|
|
109
|
-
$whitelist: add-to-whitelist(
|
|
110
|
-
"radio-size",
|
|
111
|
-
"radio-active-background-color",
|
|
112
|
-
"radio-disabled-opacity"
|
|
113
|
-
);
|
|
114
|
-
|
|
115
|
-
// Select
|
|
116
|
-
$whitelist: add-to-whitelist("select-arrow-size");
|
|
117
|
-
|
|
118
|
-
// Sidebar
|
|
119
|
-
$whitelist: add-to-whitelist(
|
|
120
|
-
"sidebar-zindex",
|
|
121
|
-
"sidebar-overlay",
|
|
122
|
-
"sidebar-content-background-color"
|
|
123
|
-
);
|
|
124
|
-
|
|
125
|
-
// Slider
|
|
126
|
-
$whitelist: add-to-whitelist(
|
|
127
|
-
"slider-track-background",
|
|
128
|
-
"slider-tick-background",
|
|
129
|
-
"slider-fill-background",
|
|
130
|
-
"slider-thumb-size",
|
|
131
|
-
"slider-thumb-background",
|
|
132
|
-
"slider-thumb-border",
|
|
133
|
-
"slider-background",
|
|
134
|
-
"slider-tick-width",
|
|
135
|
-
"slider-track-height"
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
// Skeleton
|
|
139
|
-
$whitelist: add-to-whitelist("skeleton-background", "skeleton-duration");
|
|
140
|
-
|
|
141
|
-
// Steps
|
|
142
|
-
$whitelist: add-to-whitelist(
|
|
143
|
-
"steps-marker-color",
|
|
144
|
-
"steps-marker-border",
|
|
145
|
-
"steps-marker-background",
|
|
146
|
-
"steps-previous-color",
|
|
147
|
-
"steps-active-color",
|
|
148
|
-
"steps-details-background-color"
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
// Switch
|
|
152
|
-
$whitelist: add-to-whitelist(
|
|
153
|
-
"switch-width",
|
|
154
|
-
"switch-padding",
|
|
155
|
-
"switch-background",
|
|
156
|
-
"switch-action-background",
|
|
157
|
-
"switch-active-background-color",
|
|
158
|
-
"switch-disabled-opacity",
|
|
159
|
-
"switch-rounded-border-radius"
|
|
160
|
-
);
|
|
161
|
-
|
|
162
|
-
// Tabs
|
|
163
|
-
$whitelist: add-to-whitelist(
|
|
164
|
-
"tabs-disabled-opacity",
|
|
165
|
-
"tabs-link-active-color",
|
|
166
|
-
"tabs-link-active-border-bottom-color",
|
|
167
|
-
"tabs-link-color"
|
|
168
|
-
);
|
|
169
|
-
|
|
170
|
-
// Taginput
|
|
171
|
-
$whitelist: add-to-whitelist(
|
|
172
|
-
"taginput-border-style",
|
|
173
|
-
"taginput-border-color",
|
|
174
|
-
"taginput-border-width",
|
|
175
|
-
"taginput-color",
|
|
176
|
-
"taginput-item-color",
|
|
177
|
-
"taginput-item-background-color"
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
// Timepicker
|
|
181
|
-
$whitelist: add-to-whitelist("timepicker-select-placeholder-opacity");
|
|
182
|
-
|
|
183
|
-
// Tooltip
|
|
184
|
-
$whitelist: add-to-whitelist(
|
|
185
|
-
"tooltip-arrow-size",
|
|
186
|
-
"tooltip-arrow-margin",
|
|
187
|
-
"tooltip-content-zindex",
|
|
188
|
-
"tooltip-background-color"
|
|
189
|
-
);
|
|
190
|
-
|
|
191
|
-
// Import Oruga Theme styles
|
|
192
|
-
@import "./oruga-common";
|
|
8
|
+
@import "utils/root";
|
|
9
|
+
|
|
10
|
+
@import "utils/base";
|
|
11
|
+
|
|
12
|
+
// import Oruga components
|
|
13
|
+
@import "components/autocomplete";
|
|
14
|
+
@import "components/button";
|
|
15
|
+
@import "components/carousel";
|
|
16
|
+
@import "components/checkbox";
|
|
17
|
+
@import "components/collapse";
|
|
18
|
+
@import "components/datepicker";
|
|
19
|
+
@import "components/datetimepicker";
|
|
20
|
+
@import "components/dropdown";
|
|
21
|
+
@import "components/field";
|
|
22
|
+
@import "components/icon";
|
|
23
|
+
@import "components/input";
|
|
24
|
+
@import "components/loading";
|
|
25
|
+
@import "components/menu";
|
|
26
|
+
@import "components/modal";
|
|
27
|
+
@import "components/notification";
|
|
28
|
+
@import "components/pagination";
|
|
29
|
+
@import "components/radio";
|
|
30
|
+
@import "components/select";
|
|
31
|
+
@import "components/skeleton";
|
|
32
|
+
@import "components/sidebar";
|
|
33
|
+
@import "components/slider";
|
|
34
|
+
@import "components/steps";
|
|
35
|
+
@import "components/switch";
|
|
36
|
+
@import "components/table";
|
|
37
|
+
@import "components/tabs";
|
|
38
|
+
@import "components/taginput";
|
|
39
|
+
@import "components/timepicker";
|
|
40
|
+
@import "components/tooltip";
|
|
41
|
+
@import "components/upload";
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
// Fade
|
|
112
112
|
.fade-enter-active,
|
|
113
113
|
.fade-leave-active {
|
|
114
|
-
transition: opacity $speed
|
|
114
|
+
transition: opacity $animation-speed $animation-timing;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
.fade-enter,
|
|
@@ -123,10 +123,10 @@
|
|
|
123
123
|
// Zoom In
|
|
124
124
|
.zoom-in-enter-active,
|
|
125
125
|
.zoom-in-leave-active {
|
|
126
|
-
transition: opacity $speed
|
|
126
|
+
transition: opacity $animation-speed $animation-timing;
|
|
127
127
|
|
|
128
128
|
.animation-content {
|
|
129
|
-
transition: transform $speed
|
|
129
|
+
transition: transform $animation-speed $animation-timing;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
@@ -143,10 +143,10 @@
|
|
|
143
143
|
// Zoom Out
|
|
144
144
|
.zoom-out-enter-active,
|
|
145
145
|
.zoom-out-leave-active {
|
|
146
|
-
transition: opacity $speed
|
|
146
|
+
transition: opacity $animation-speed $animation-timing;
|
|
147
147
|
|
|
148
148
|
.animation-content {
|
|
149
|
-
transition: transform $speed
|
|
149
|
+
transition: transform $animation-speed $animation-timing;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -165,7 +165,8 @@
|
|
|
165
165
|
.slide-next-leave-active,
|
|
166
166
|
.slide-prev-enter-active,
|
|
167
167
|
.slide-prev-leave-active {
|
|
168
|
-
transition: transform $speed-
|
|
168
|
+
transition: transform $animation-speed-fast
|
|
169
|
+
cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
.slide-prev-leave-to,
|
|
@@ -188,7 +189,8 @@
|
|
|
188
189
|
.slide-down-leave-active,
|
|
189
190
|
.slide-up-enter-active,
|
|
190
191
|
.slide-up-leave-active {
|
|
191
|
-
transition: transform $speed-
|
|
192
|
+
transition: transform $animation-speed-fast
|
|
193
|
+
cubic-bezier(0.785, 0.135, 0.15, 0.86);
|
|
192
194
|
}
|
|
193
195
|
|
|
194
196
|
.slide-down-enter,
|
|
@@ -208,11 +210,11 @@
|
|
|
208
210
|
}
|
|
209
211
|
|
|
210
212
|
.slide-enter-active {
|
|
211
|
-
transition: $speed
|
|
213
|
+
transition: $animation-speed $animation-timing;
|
|
212
214
|
}
|
|
213
215
|
|
|
214
216
|
.slide-leave-active {
|
|
215
|
-
transition: $speed
|
|
217
|
+
transition: $animation-speed $animation-timing;
|
|
216
218
|
transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
|
|
217
219
|
}
|
|
218
220
|
|
|
@@ -12,10 +12,10 @@ body {
|
|
|
12
12
|
margin: 0;
|
|
13
13
|
padding: 0;
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
font-family: var(--#{$prefix}base-font-family, $base-font-family);
|
|
16
|
+
font-size: var(--#{$prefix}base-font-size, $base-font-size);
|
|
17
|
+
font-weight: var(--#{$prefix}base-font-weight, $base-font-weight);
|
|
18
|
+
line-height: var(--#{$prefix}base-line-height, $base-line-height);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.o-noscroll {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
@use "sass:list";
|
|
2
1
|
@use "sass:string";
|
|
3
2
|
@use "sass:math";
|
|
3
|
+
@use "sass:color";
|
|
4
|
+
|
|
5
|
+
/**********************************
|
|
6
|
+
* Utility mixins and functions
|
|
7
|
+
***********************************/
|
|
4
8
|
|
|
5
9
|
/// Replaces characters in a string
|
|
6
10
|
///
|
|
@@ -16,9 +20,9 @@
|
|
|
16
20
|
|
|
17
21
|
@return if(
|
|
18
22
|
$index,
|
|
19
|
-
|
|
23
|
+
string.slice($string, 1, $index - 1) + $replace +
|
|
20
24
|
str-replace(
|
|
21
|
-
|
|
25
|
+
string.slice($string, $index + string.length($search)),
|
|
22
26
|
$search,
|
|
23
27
|
$replace
|
|
24
28
|
),
|
|
@@ -56,109 +60,6 @@
|
|
|
56
60
|
@return "data:image/svg+xml,#{$encoded}";
|
|
57
61
|
}
|
|
58
62
|
|
|
59
|
-
/// Appends a list of variables to $whitelist and return a new whitelist.
|
|
60
|
-
///
|
|
61
|
-
/// @param {...} $variables
|
|
62
|
-
/// Variables to whitelist
|
|
63
|
-
/// @return {list} new whitelist.
|
|
64
|
-
///
|
|
65
|
-
/// Example (in components/_radio.scss)
|
|
66
|
-
/// $whitelist: add-to-whitelist('radio-active-background-color','radio-focus-sibiling-box-shadow');
|
|
67
|
-
@function add-to-whitelist($variables...) {
|
|
68
|
-
@return list.join($whitelist, $variables);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/// Checks if a variable is in $whitelist.
|
|
72
|
-
///
|
|
73
|
-
/// @param {string} $variable
|
|
74
|
-
/// Variable to check if present in whitelist
|
|
75
|
-
/// @return {boolean} true if $variable is in $whitelist, else false.
|
|
76
|
-
@function is-in-whitelist($variable) {
|
|
77
|
-
@return list.index($whitelist, $variable) != null;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/// Checks if $whitelist is empty
|
|
81
|
-
///
|
|
82
|
-
/// @return {boolean} true if $whitelist is empty, else false.
|
|
83
|
-
@function is-empty-whitelist() {
|
|
84
|
-
@return list.length($whitelist) == 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/// Returns a variable.
|
|
88
|
-
///
|
|
89
|
-
/// @param {string} $name
|
|
90
|
-
/// Variable name
|
|
91
|
-
/// @param {string} $value
|
|
92
|
-
/// Variable value
|
|
93
|
-
/// @param {string} $forceval
|
|
94
|
-
/// By default is `false`, if `true` it allows to bypass whitelist and set the value
|
|
95
|
-
/// @return {string} the variable or null if not in whitelist when $css-vars == false.
|
|
96
|
-
@function variable($name, $value, $forceval: false) {
|
|
97
|
-
@if is-empty-whitelist() or is-in-whitelist($name) or $forceval {
|
|
98
|
-
@if $css-vars {
|
|
99
|
-
@return var(--#{$prefix}#{$name}, #{$value});
|
|
100
|
-
} @else {
|
|
101
|
-
@return #{$value};
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
@return null;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/// Returns a pair of `(key,value)` to pass to `evariable` function.
|
|
109
|
-
///
|
|
110
|
-
/// @param {string} $key
|
|
111
|
-
/// Key of the parameter
|
|
112
|
-
/// @param {string} $value
|
|
113
|
-
/// Value of the parameter
|
|
114
|
-
/// @return {list} list of two elements representing an `eparam` `(key, value)`.
|
|
115
|
-
@function eparam($key, $value) {
|
|
116
|
-
@return $key, $value;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/// Assigns a specific expression to an attribute
|
|
120
|
-
///
|
|
121
|
-
/// @param {string} $attribute
|
|
122
|
-
/// The attribute we want to include
|
|
123
|
-
/// @param {string} $expression
|
|
124
|
-
/// The body of the function we want to write (e.g. `calc($width/$height)`)
|
|
125
|
-
/// @param {...} $parameters
|
|
126
|
-
/// List of `eparam` to apply to the function
|
|
127
|
-
@mixin evariable($attribute, $expression, $parameters...) {
|
|
128
|
-
$is_valid: true;
|
|
129
|
-
|
|
130
|
-
@each $parameter in $parameters {
|
|
131
|
-
@if not list.nth($parameter, 2) {
|
|
132
|
-
$is_valid: false;
|
|
133
|
-
}
|
|
134
|
-
@if str-slice(list.nth($parameter, 1), 0, 1) != "$" {
|
|
135
|
-
@error "Parameter #{list.nth($parameter, 1)} should start with $.";
|
|
136
|
-
}
|
|
137
|
-
$expression: str-replace(
|
|
138
|
-
$expression,
|
|
139
|
-
list.nth($parameter, 1),
|
|
140
|
-
list.nth($parameter, 2)
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
@if $is_valid {
|
|
144
|
-
#{$attribute}: #{$expression};
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/// Assigns a specific variable to an attribute
|
|
149
|
-
///
|
|
150
|
-
/// @param {string} $attribute
|
|
151
|
-
/// The attribute we want to include
|
|
152
|
-
/// @param {string} $name
|
|
153
|
-
/// Variable name
|
|
154
|
-
/// @param {string} $value
|
|
155
|
-
/// Variable value
|
|
156
|
-
@mixin avariable($attribute, $name, $value) {
|
|
157
|
-
$variable: variable($name, $value);
|
|
158
|
-
@if $variable {
|
|
159
|
-
#{$attribute}: $variable;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
63
|
@mixin unselectable {
|
|
163
64
|
-webkit-touch-callout: none;
|
|
164
65
|
-webkit-user-select: none;
|
|
@@ -205,3 +106,8 @@
|
|
|
205
106
|
|
|
206
107
|
@return ($quotient + $remainder) * $sign;
|
|
207
108
|
}
|
|
109
|
+
|
|
110
|
+
// create a focus color based on a given color
|
|
111
|
+
@function createFocus($color) {
|
|
112
|
+
@return color.adjust($color, $alpha: -0.75);
|
|
113
|
+
}
|
|
@@ -1,32 +1,54 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
|
+
@use "sass:meta";
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// generate color variables
|
|
6
|
-
@each $name, $color in $colors {
|
|
7
|
-
@if type-of($color) == list {
|
|
8
|
-
--#{$prefix}#{$name}: #{list.nth($color, 1)};
|
|
9
|
-
--#{$prefix}#{$name}-invert: #{list.nth($color, 2)};
|
|
10
|
-
} @else {
|
|
11
|
-
--#{$prefix}#{$name}: $color;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
4
|
+
@mixin root() {
|
|
5
|
+
$host-selector: if($enable-host, ":host", ":root");
|
|
14
6
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
--#{$prefix}grey-lighter: #{$grey-lighter};
|
|
20
|
-
--#{$prefix}grey-dark: #{$grey-dark};
|
|
7
|
+
#{$host-selector} {
|
|
8
|
+
@content;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
21
11
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
/*******************************
|
|
13
|
+
* Root variables extensions
|
|
14
|
+
********************************/
|
|
15
|
+
|
|
16
|
+
@include root() {
|
|
17
|
+
// define color variables
|
|
18
|
+
@each $name, $color in $colors {
|
|
19
|
+
@if meta.type-of($color) == list {
|
|
20
|
+
--#{$prefix}#{$name}: #{list.nth($color, 1)};
|
|
21
|
+
--#{$prefix}#{$name}-invert: #{list.nth($color, 2)};
|
|
22
|
+
} @else {
|
|
23
|
+
--#{$prefix}#{$name}: $color;
|
|
25
24
|
}
|
|
25
|
+
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
// define additional colors
|
|
28
|
+
--#{$prefix}white: #{$white};
|
|
29
|
+
--#{$prefix}black: #{$black};
|
|
30
|
+
--#{$prefix}grey: #{$grey};
|
|
31
|
+
--#{$prefix}grey-light: #{$grey-light};
|
|
32
|
+
--#{$prefix}grey-lighter: #{$grey-lighter};
|
|
33
|
+
--#{$prefix}grey-dark: #{$grey-dark};
|
|
34
|
+
--#{$prefix}focus: #{createFocus($primary)};
|
|
35
|
+
|
|
36
|
+
// define size variables
|
|
37
|
+
@each $name, $size in $sizes {
|
|
38
|
+
--#{$prefix}size-#{$name}: #{$size};
|
|
31
39
|
}
|
|
40
|
+
|
|
41
|
+
// define base variables
|
|
42
|
+
--#{$prefix}base-font-family: #{$base-font-family};
|
|
43
|
+
--#{$prefix}base-font-size: #{$base-font-size};
|
|
44
|
+
--#{$prefix}base-font-weight: #{$base-font-weight};
|
|
45
|
+
--#{$prefix}base-line-height: #{$base-line-height};
|
|
46
|
+
|
|
47
|
+
--#{$prefix}base-border-radius: #{$base-border-radius};
|
|
48
|
+
--#{$prefix}base-border-radius-rounded: #{$base-border-radius-rounded};
|
|
49
|
+
--#{$prefix}base-line-height: #{$base-line-height};
|
|
50
|
+
--#{$prefix}base-disabled-opacity: #{$base-disabled-opacity};
|
|
51
|
+
|
|
52
|
+
--#{$prefix}transition-duration: #{$animation-speed};
|
|
53
|
+
--#{$prefix}transition-timing: #{$animation-timing};
|
|
32
54
|
}
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
**********************/
|
|
4
4
|
|
|
5
5
|
// Settings
|
|
6
|
-
$whitelist: () !default;
|
|
7
|
-
$css-vars: true !default;
|
|
8
6
|
$prefix: "oruga-" !default;
|
|
7
|
+
$enable-host: false !default;
|
|
9
8
|
|
|
10
9
|
// Animations
|
|
11
|
-
$speed:
|
|
12
|
-
$speed-
|
|
13
|
-
$
|
|
14
|
-
$easing: ease-out !default;
|
|
10
|
+
$animation-speed: 150ms !default;
|
|
11
|
+
$animation-speed-fast: 300ms !default;
|
|
12
|
+
$animation-timing: ease-out !default;
|
|
15
13
|
|
|
16
14
|
// Font
|
|
17
15
|
$base-font-family:
|
|
@@ -38,7 +36,7 @@ $base-line-height: 1.5 !default;
|
|
|
38
36
|
|
|
39
37
|
// Base Style
|
|
40
38
|
$base-border-radius: 4px !default;
|
|
41
|
-
$base-
|
|
39
|
+
$base-border-radius-rounded: 9999px !default;
|
|
42
40
|
$base-line-height: 1.5 !default;
|
|
43
41
|
$base-disabled-opacity: 0.5 !default;
|
|
44
42
|
|
|
@@ -46,6 +44,7 @@ $control-border-width: 1px !default;
|
|
|
46
44
|
$control-height: 2.25em !default;
|
|
47
45
|
$control-padding-vertical: calc(0.375em - #{$control-border-width});
|
|
48
46
|
$control-padding-horizontal: calc(0.625em - #{$control-border-width});
|
|
47
|
+
$control-box-shadow: inset 0 1px 2px hsla(0, 0%, 4%, 0.1);
|
|
49
48
|
|
|
50
49
|
// Sizes
|
|
51
50
|
$sizes: (
|
package/dist/theme.js
CHANGED