jobdone-shared-files 0.0.1-beta.2
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/ProjectManagement/projectNavbar.vue +168 -0
- package/README.md +27 -0
- package/common/directives/collapse.js +13 -0
- package/common/format.js +13 -0
- package/index.js +15 -0
- package/package.json +18 -0
- package/paginate.vue +139 -0
- package/style/css/vue-loading-overlay/index.css +40 -0
- package/style/scss/Bootstrap/_functions.scss +302 -0
- package/style/scss/Bootstrap/_mixins.scss +42 -0
- package/style/scss/Bootstrap/mixins/_alert.scss +18 -0
- package/style/scss/Bootstrap/mixins/_backdrop.scss +14 -0
- package/style/scss/Bootstrap/mixins/_banner.scss +7 -0
- package/style/scss/Bootstrap/mixins/_border-radius.scss +78 -0
- package/style/scss/Bootstrap/mixins/_box-shadow.scss +18 -0
- package/style/scss/Bootstrap/mixins/_breakpoints.scss +127 -0
- package/style/scss/Bootstrap/mixins/_buttons.scss +70 -0
- package/style/scss/Bootstrap/mixins/_caret.scss +69 -0
- package/style/scss/Bootstrap/mixins/_clearfix.scss +9 -0
- package/style/scss/Bootstrap/mixins/_color-mode.scss +21 -0
- package/style/scss/Bootstrap/mixins/_color-scheme.scss +7 -0
- package/style/scss/Bootstrap/mixins/_container.scss +11 -0
- package/style/scss/Bootstrap/mixins/_deprecate.scss +10 -0
- package/style/scss/Bootstrap/mixins/_forms.scss +153 -0
- package/style/scss/Bootstrap/mixins/_gradients.scss +47 -0
- package/style/scss/Bootstrap/mixins/_grid.scss +151 -0
- package/style/scss/Bootstrap/mixins/_image.scss +16 -0
- package/style/scss/Bootstrap/mixins/_list-group.scss +27 -0
- package/style/scss/Bootstrap/mixins/_lists.scss +7 -0
- package/style/scss/Bootstrap/mixins/_pagination.scss +10 -0
- package/style/scss/Bootstrap/mixins/_reset-text.scss +17 -0
- package/style/scss/Bootstrap/mixins/_resize.scss +6 -0
- package/style/scss/Bootstrap/mixins/_table-variants.scss +24 -0
- package/style/scss/Bootstrap/mixins/_text-truncate.scss +8 -0
- package/style/scss/Bootstrap/mixins/_transition.scss +26 -0
- package/style/scss/Bootstrap/mixins/_utilities.scss +97 -0
- package/style/scss/Bootstrap/mixins/_visually-hidden.scss +29 -0
- package/style/scss/Bootstrap/vendor/_rfs.scss +354 -0
- package/style/scss/Settings/_Mixins.scss +228 -0
- package/style/scss/Settings/_basic-import.scss +5 -0
- package/style/scss/Settings/_bs-variables-dark.scss +70 -0
- package/style/scss/Settings/_bs-variables.scss +1703 -0
- package/style/scss/Settings/_color-mode.scss +123 -0
- package/style/scss/Settings/_custom-variables.scss +7 -0
- package/tagEditor.vue +264 -0
- package/tree.vue +62 -0
- package/treeItem.vue +367 -0
- package/vueLoadingOverlay.vue +77 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
// Bootstrap functions
|
|
2
|
+
//
|
|
3
|
+
// Utility mixins and functions for evaluating source code across our variables, maps, and mixins.
|
|
4
|
+
|
|
5
|
+
// Ascending
|
|
6
|
+
// Used to evaluate Sass maps like our grid breakpoints.
|
|
7
|
+
@mixin _assert-ascending($map, $map-name) {
|
|
8
|
+
$prev-key: null;
|
|
9
|
+
$prev-num: null;
|
|
10
|
+
@each $key, $num in $map {
|
|
11
|
+
@if $prev-num == null or unit($num) == "%" or unit($prev-num) == "%" {
|
|
12
|
+
// Do nothing
|
|
13
|
+
} @else if not comparable($prev-num, $num) {
|
|
14
|
+
@warn "Potentially invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} whose unit makes it incomparable to #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
|
15
|
+
} @else if $prev-num >= $num {
|
|
16
|
+
@warn "Invalid value for #{$map-name}: This map must be in ascending order, but key '#{$key}' has value #{$num} which isn't greater than #{$prev-num}, the value of the previous key '#{$prev-key}' !";
|
|
17
|
+
}
|
|
18
|
+
$prev-key: $key;
|
|
19
|
+
$prev-num: $num;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Starts at zero
|
|
24
|
+
// Used to ensure the min-width of the lowest breakpoint starts at 0.
|
|
25
|
+
@mixin _assert-starts-at-zero($map, $map-name: "$grid-breakpoints") {
|
|
26
|
+
@if length($map) > 0 {
|
|
27
|
+
$values: map-values($map);
|
|
28
|
+
$first-value: nth($values, 1);
|
|
29
|
+
@if $first-value != 0 {
|
|
30
|
+
@warn "First breakpoint in #{$map-name} must start at 0, but starts at #{$first-value}.";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Colors
|
|
36
|
+
@function to-rgb($value) {
|
|
37
|
+
@return red($value), green($value), blue($value);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// stylelint-disable scss/dollar-variable-pattern
|
|
41
|
+
@function rgba-css-var($identifier, $target) {
|
|
42
|
+
@if $identifier == "body" and $target == "bg" {
|
|
43
|
+
@return rgba(var(--#{$prefix}#{$identifier}-bg-rgb), var(--#{$prefix}#{$target}-opacity));
|
|
44
|
+
} @if $identifier == "body" and $target == "text" {
|
|
45
|
+
@return rgba(var(--#{$prefix}#{$identifier}-color-rgb), var(--#{$prefix}#{$target}-opacity));
|
|
46
|
+
} @else {
|
|
47
|
+
@return rgba(var(--#{$prefix}#{$identifier}-rgb), var(--#{$prefix}#{$target}-opacity));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@function map-loop($map, $func, $args...) {
|
|
52
|
+
$_map: ();
|
|
53
|
+
|
|
54
|
+
@each $key, $value in $map {
|
|
55
|
+
// allow to pass the $key and $value of the map as an function argument
|
|
56
|
+
$_args: ();
|
|
57
|
+
@each $arg in $args {
|
|
58
|
+
$_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
$_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@return $_map;
|
|
65
|
+
}
|
|
66
|
+
// stylelint-enable scss/dollar-variable-pattern
|
|
67
|
+
|
|
68
|
+
@function varify($list) {
|
|
69
|
+
$result: null;
|
|
70
|
+
@each $entry in $list {
|
|
71
|
+
$result: append($result, var(--#{$prefix}#{$entry}), space);
|
|
72
|
+
}
|
|
73
|
+
@return $result;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Internal Bootstrap function to turn maps into its negative variant.
|
|
77
|
+
// It prefixes the keys with `n` and makes the value negative.
|
|
78
|
+
@function negativify-map($map) {
|
|
79
|
+
$result: ();
|
|
80
|
+
@each $key, $value in $map {
|
|
81
|
+
@if $key != 0 {
|
|
82
|
+
$result: map-merge($result, ("n" + $key: (-$value)));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
@return $result;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Get multiple keys from a sass map
|
|
89
|
+
@function map-get-multiple($map, $values) {
|
|
90
|
+
$result: ();
|
|
91
|
+
@each $key, $value in $map {
|
|
92
|
+
@if (index($values, $key) != null) {
|
|
93
|
+
$result: map-merge($result, ($key: $value));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@return $result;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Merge multiple maps
|
|
100
|
+
@function map-merge-multiple($maps...) {
|
|
101
|
+
$merged-maps: ();
|
|
102
|
+
|
|
103
|
+
@each $map in $maps {
|
|
104
|
+
$merged-maps: map-merge($merged-maps, $map);
|
|
105
|
+
}
|
|
106
|
+
@return $merged-maps;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Replace `$search` with `$replace` in `$string`
|
|
110
|
+
// Used on our SVG icon backgrounds for custom forms.
|
|
111
|
+
//
|
|
112
|
+
// @author Kitty Giraudel
|
|
113
|
+
// @param {String} $string - Initial string
|
|
114
|
+
// @param {String} $search - Substring to replace
|
|
115
|
+
// @param {String} $replace ('') - New value
|
|
116
|
+
// @return {String} - Updated string
|
|
117
|
+
@function str-replace($string, $search, $replace: "") {
|
|
118
|
+
$index: str-index($string, $search);
|
|
119
|
+
|
|
120
|
+
@if $index {
|
|
121
|
+
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@return $string;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// See https://codepen.io/kevinweber/pen/dXWoRw
|
|
128
|
+
//
|
|
129
|
+
// Requires the use of quotes around data URIs.
|
|
130
|
+
|
|
131
|
+
@function escape-svg($string) {
|
|
132
|
+
@if str-index($string, "data:image/svg+xml") {
|
|
133
|
+
@each $char, $encoded in $escaped-characters {
|
|
134
|
+
// Do not escape the url brackets
|
|
135
|
+
@if str-index($string, "url(") == 1 {
|
|
136
|
+
$string: url("#{str-replace(str-slice($string, 6, -3), $char, $encoded)}");
|
|
137
|
+
} @else {
|
|
138
|
+
$string: str-replace($string, $char, $encoded);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@return $string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Color contrast
|
|
147
|
+
// See https://github.com/twbs/bootstrap/pull/30168
|
|
148
|
+
|
|
149
|
+
// A list of pre-calculated numbers of pow(divide((divide($value, 255) + .055), 1.055), 2.4). (from 0 to 255)
|
|
150
|
+
// stylelint-disable-next-line scss/dollar-variable-default, scss/dollar-variable-pattern
|
|
151
|
+
$_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003 .0033 .0037 .004 .0044 .0048 .0052 .0056 .006 .0065 .007 .0075 .008 .0086 .0091 .0097 .0103 .011 .0116 .0123 .013 .0137 .0144 .0152 .016 .0168 .0176 .0185 .0194 .0203 .0212 .0222 .0232 .0242 .0252 .0262 .0273 .0284 .0296 .0307 .0319 .0331 .0343 .0356 .0369 .0382 .0395 .0409 .0423 .0437 .0452 .0467 .0482 .0497 .0513 .0529 .0545 .0561 .0578 .0595 .0612 .063 .0648 .0666 .0685 .0704 .0723 .0742 .0762 .0782 .0802 .0823 .0844 .0865 .0887 .0908 .0931 .0953 .0976 .0999 .1022 .1046 .107 .1095 .1119 .1144 .117 .1195 .1221 .1248 .1274 .1301 .1329 .1356 .1384 .1413 .1441 .147 .15 .1529 .1559 .159 .162 .1651 .1683 .1714 .1746 .1779 .1812 .1845 .1878 .1912 .1946 .1981 .2016 .2051 .2086 .2122 .2159 .2195 .2232 .227 .2307 .2346 .2384 .2423 .2462 .2502 .2542 .2582 .2623 .2664 .2705 .2747 .2789 .2831 .2874 .2918 .2961 .3005 .305 .3095 .314 .3185 .3231 .3278 .3325 .3372 .3419 .3467 .3515 .3564 .3613 .3663 .3712 .3763 .3813 .3864 .3916 .3968 .402 .4072 .4125 .4179 .4233 .4287 .4342 .4397 .4452 .4508 .4564 .4621 .4678 .4735 .4793 .4851 .491 .4969 .5029 .5089 .5149 .521 .5271 .5333 .5395 .5457 .552 .5583 .5647 .5711 .5776 .5841 .5906 .5972 .6038 .6105 .6172 .624 .6308 .6376 .6445 .6514 .6584 .6654 .6724 .6795 .6867 .6939 .7011 .7084 .7157 .7231 .7305 .7379 .7454 .7529 .7605 .7682 .7758 .7835 .7913 .7991 .807 .8148 .8228 .8308 .8388 .8469 .855 .8632 .8714 .8796 .8879 .8963 .9047 .9131 .9216 .9301 .9387 .9473 .956 .9647 .9734 .9823 .9911 1;
|
|
152
|
+
|
|
153
|
+
@function color-contrast($background, $color-contrast-dark: $color-contrast-dark, $color-contrast-light: $color-contrast-light, $min-contrast-ratio: $min-contrast-ratio) {
|
|
154
|
+
$foregrounds: $color-contrast-light, $color-contrast-dark, $white, $black;
|
|
155
|
+
$max-ratio: 0;
|
|
156
|
+
$max-ratio-color: null;
|
|
157
|
+
|
|
158
|
+
@each $color in $foregrounds {
|
|
159
|
+
$contrast-ratio: contrast-ratio($background, $color);
|
|
160
|
+
@if $contrast-ratio > $min-contrast-ratio {
|
|
161
|
+
@return $color;
|
|
162
|
+
} @else if $contrast-ratio > $max-ratio {
|
|
163
|
+
$max-ratio: $contrast-ratio;
|
|
164
|
+
$max-ratio-color: $color;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@warn "Found no color leading to #{$min-contrast-ratio}:1 contrast ratio against #{$background}...";
|
|
169
|
+
|
|
170
|
+
@return $max-ratio-color;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@function contrast-ratio($background, $foreground: $color-contrast-light) {
|
|
174
|
+
$l1: luminance($background);
|
|
175
|
+
$l2: luminance(opaque($background, $foreground));
|
|
176
|
+
|
|
177
|
+
@return if($l1 > $l2, divide($l1 + .05, $l2 + .05), divide($l2 + .05, $l1 + .05));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Return WCAG2.1 relative luminance
|
|
181
|
+
// See https://www.w3.org/TR/WCAG/#dfn-relative-luminance
|
|
182
|
+
// See https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
|
|
183
|
+
@function luminance($color) {
|
|
184
|
+
$rgb: (
|
|
185
|
+
"r": red($color),
|
|
186
|
+
"g": green($color),
|
|
187
|
+
"b": blue($color)
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
@each $name, $value in $rgb {
|
|
191
|
+
$value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
|
|
192
|
+
$rgb: map-merge($rgb, ($name: $value));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@return (map-get($rgb, "r") * .2126) + (map-get($rgb, "g") * .7152) + (map-get($rgb, "b") * .0722);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Return opaque color
|
|
199
|
+
// opaque(#fff, rgba(0, 0, 0, .5)) => #808080
|
|
200
|
+
@function opaque($background, $foreground) {
|
|
201
|
+
@return mix(rgba($foreground, 1), $background, opacity($foreground) * 100%);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// scss-docs-start color-functions
|
|
205
|
+
// Tint a color: mix a color with white
|
|
206
|
+
@function tint-color($color, $weight) {
|
|
207
|
+
@return mix(white, $color, $weight);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Shade a color: mix a color with black
|
|
211
|
+
@function shade-color($color, $weight) {
|
|
212
|
+
@return mix(black, $color, $weight);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// Shade the color if the weight is positive, else tint it
|
|
216
|
+
@function shift-color($color, $weight) {
|
|
217
|
+
@return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
|
|
218
|
+
}
|
|
219
|
+
// scss-docs-end color-functions
|
|
220
|
+
|
|
221
|
+
// Return valid calc
|
|
222
|
+
@function add($value1, $value2, $return-calc: true) {
|
|
223
|
+
@if $value1 == null {
|
|
224
|
+
@return $value2;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@if $value2 == null {
|
|
228
|
+
@return $value1;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
|
232
|
+
@return $value1 + $value2;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
@return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@function subtract($value1, $value2, $return-calc: true) {
|
|
239
|
+
@if $value1 == null and $value2 == null {
|
|
240
|
+
@return null;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
@if $value1 == null {
|
|
244
|
+
@return -$value2;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@if $value2 == null {
|
|
248
|
+
@return $value1;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
@if type-of($value1) == number and type-of($value2) == number and comparable($value1, $value2) {
|
|
252
|
+
@return $value1 - $value2;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
@if type-of($value2) != number {
|
|
256
|
+
$value2: unquote("(") + $value2 + unquote(")");
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@return if($return-calc == true, calc(#{$value1} - #{$value2}), $value1 + unquote(" - ") + $value2);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@function divide($dividend, $divisor, $precision: 10) {
|
|
263
|
+
$sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
|
|
264
|
+
$dividend: abs($dividend);
|
|
265
|
+
$divisor: abs($divisor);
|
|
266
|
+
@if $dividend == 0 {
|
|
267
|
+
@return 0;
|
|
268
|
+
}
|
|
269
|
+
@if $divisor == 0 {
|
|
270
|
+
@error "Cannot divide by 0";
|
|
271
|
+
}
|
|
272
|
+
$remainder: $dividend;
|
|
273
|
+
$result: 0;
|
|
274
|
+
$factor: 10;
|
|
275
|
+
@while ($remainder > 0 and $precision >= 0) {
|
|
276
|
+
$quotient: 0;
|
|
277
|
+
@while ($remainder >= $divisor) {
|
|
278
|
+
$remainder: $remainder - $divisor;
|
|
279
|
+
$quotient: $quotient + 1;
|
|
280
|
+
}
|
|
281
|
+
$result: $result * 10 + $quotient;
|
|
282
|
+
$factor: $factor * .1;
|
|
283
|
+
$remainder: $remainder * 10;
|
|
284
|
+
$precision: $precision - 1;
|
|
285
|
+
@if ($precision < 0 and $remainder >= $divisor * 5) {
|
|
286
|
+
$result: $result + 1;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
$result: $result * $factor * $sign;
|
|
290
|
+
$dividend-unit: unit($dividend);
|
|
291
|
+
$divisor-unit: unit($divisor);
|
|
292
|
+
$unit-map: (
|
|
293
|
+
"px": 1px,
|
|
294
|
+
"rem": 1rem,
|
|
295
|
+
"em": 1em,
|
|
296
|
+
"%": 1%
|
|
297
|
+
);
|
|
298
|
+
@if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
|
|
299
|
+
$result: $result * map-get($unit-map, $dividend-unit);
|
|
300
|
+
}
|
|
301
|
+
@return $result;
|
|
302
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Toggles
|
|
2
|
+
//
|
|
3
|
+
// Used in conjunction with global variables to enable certain theme features.
|
|
4
|
+
|
|
5
|
+
// Vendor
|
|
6
|
+
@import "vendor/rfs";
|
|
7
|
+
|
|
8
|
+
// Deprecate
|
|
9
|
+
@import "mixins/deprecate";
|
|
10
|
+
|
|
11
|
+
// Helpers
|
|
12
|
+
@import "mixins/breakpoints";
|
|
13
|
+
@import "mixins/color-mode";
|
|
14
|
+
@import "mixins/color-scheme";
|
|
15
|
+
@import "mixins/image";
|
|
16
|
+
@import "mixins/resize";
|
|
17
|
+
@import "mixins/visually-hidden";
|
|
18
|
+
@import "mixins/reset-text";
|
|
19
|
+
@import "mixins/text-truncate";
|
|
20
|
+
|
|
21
|
+
// Utilities
|
|
22
|
+
@import "mixins/utilities";
|
|
23
|
+
|
|
24
|
+
// Components
|
|
25
|
+
@import "mixins/backdrop";
|
|
26
|
+
@import "mixins/buttons";
|
|
27
|
+
@import "mixins/caret";
|
|
28
|
+
@import "mixins/pagination";
|
|
29
|
+
@import "mixins/lists";
|
|
30
|
+
@import "mixins/forms";
|
|
31
|
+
@import "mixins/table-variants";
|
|
32
|
+
|
|
33
|
+
// Skins
|
|
34
|
+
@import "mixins/border-radius";
|
|
35
|
+
@import "mixins/box-shadow";
|
|
36
|
+
@import "mixins/gradients";
|
|
37
|
+
@import "mixins/transition";
|
|
38
|
+
|
|
39
|
+
// Layout
|
|
40
|
+
@import "mixins/clearfix";
|
|
41
|
+
@import "mixins/container";
|
|
42
|
+
@import "mixins/grid";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@include deprecate("`alert-variant()`", "v5.3.0", "v6.0.0");
|
|
2
|
+
|
|
3
|
+
// scss-docs-start alert-variant-mixin
|
|
4
|
+
@mixin alert-variant($background, $border, $color) {
|
|
5
|
+
--#{$prefix}alert-color: #{$color};
|
|
6
|
+
--#{$prefix}alert-bg: #{$background};
|
|
7
|
+
--#{$prefix}alert-border-color: #{$border};
|
|
8
|
+
--#{$prefix}alert-link-color: #{shade-color($color, 20%)};
|
|
9
|
+
|
|
10
|
+
@if $enable-gradients {
|
|
11
|
+
background-image: var(--#{$prefix}gradient);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.alert-link {
|
|
15
|
+
color: var(--#{$prefix}alert-link-color);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
// scss-docs-end alert-variant-mixin
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Shared between modals and offcanvases
|
|
2
|
+
@mixin overlay-backdrop($zindex, $backdrop-bg, $backdrop-opacity) {
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
z-index: $zindex;
|
|
7
|
+
width: 100vw;
|
|
8
|
+
height: 100vh;
|
|
9
|
+
background-color: $backdrop-bg;
|
|
10
|
+
|
|
11
|
+
// Fade for backdrop
|
|
12
|
+
&.fade { opacity: 0; }
|
|
13
|
+
&.show { opacity: $backdrop-opacity; }
|
|
14
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// stylelint-disable property-disallowed-list
|
|
2
|
+
// Single side border-radius
|
|
3
|
+
|
|
4
|
+
// Helper function to replace negative values with 0
|
|
5
|
+
@function valid-radius($radius) {
|
|
6
|
+
$return: ();
|
|
7
|
+
@each $value in $radius {
|
|
8
|
+
@if type-of($value) == number {
|
|
9
|
+
$return: append($return, max($value, 0));
|
|
10
|
+
} @else {
|
|
11
|
+
$return: append($return, $value);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@return $return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// scss-docs-start border-radius-mixins
|
|
18
|
+
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
|
19
|
+
@if $enable-rounded {
|
|
20
|
+
border-radius: valid-radius($radius);
|
|
21
|
+
}
|
|
22
|
+
@else if $fallback-border-radius != false {
|
|
23
|
+
border-radius: $fallback-border-radius;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin border-top-radius($radius: $border-radius) {
|
|
28
|
+
@if $enable-rounded {
|
|
29
|
+
border-top-left-radius: valid-radius($radius);
|
|
30
|
+
border-top-right-radius: valid-radius($radius);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@mixin border-end-radius($radius: $border-radius) {
|
|
35
|
+
@if $enable-rounded {
|
|
36
|
+
border-top-right-radius: valid-radius($radius);
|
|
37
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
@mixin border-bottom-radius($radius: $border-radius) {
|
|
42
|
+
@if $enable-rounded {
|
|
43
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
44
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@mixin border-start-radius($radius: $border-radius) {
|
|
49
|
+
@if $enable-rounded {
|
|
50
|
+
border-top-left-radius: valid-radius($radius);
|
|
51
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin border-top-start-radius($radius: $border-radius) {
|
|
56
|
+
@if $enable-rounded {
|
|
57
|
+
border-top-left-radius: valid-radius($radius);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@mixin border-top-end-radius($radius: $border-radius) {
|
|
62
|
+
@if $enable-rounded {
|
|
63
|
+
border-top-right-radius: valid-radius($radius);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@mixin border-bottom-end-radius($radius: $border-radius) {
|
|
68
|
+
@if $enable-rounded {
|
|
69
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@mixin border-bottom-start-radius($radius: $border-radius) {
|
|
74
|
+
@if $enable-rounded {
|
|
75
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// scss-docs-end border-radius-mixins
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@mixin box-shadow($shadow...) {
|
|
2
|
+
@if $enable-shadows {
|
|
3
|
+
$result: ();
|
|
4
|
+
|
|
5
|
+
@each $value in $shadow {
|
|
6
|
+
@if $value != null {
|
|
7
|
+
$result: append($result, $value, "comma");
|
|
8
|
+
}
|
|
9
|
+
@if $value == none and length($shadow) > 1 {
|
|
10
|
+
@warn "The keyword 'none' must be used as a single argument.";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@if (length($result) > 0) {
|
|
15
|
+
box-shadow: $result;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Breakpoint viewport sizes and media queries.
|
|
2
|
+
//
|
|
3
|
+
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
|
|
4
|
+
//
|
|
5
|
+
// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px)
|
|
6
|
+
//
|
|
7
|
+
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
|
|
8
|
+
|
|
9
|
+
// Name of the next breakpoint, or null for the last breakpoint.
|
|
10
|
+
//
|
|
11
|
+
// >> breakpoint-next(sm)
|
|
12
|
+
// md
|
|
13
|
+
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
|
14
|
+
// md
|
|
15
|
+
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl xxl))
|
|
16
|
+
// md
|
|
17
|
+
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
|
|
18
|
+
$n: index($breakpoint-names, $name);
|
|
19
|
+
@if not $n {
|
|
20
|
+
@error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
|
|
21
|
+
}
|
|
22
|
+
@return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
|
26
|
+
//
|
|
27
|
+
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
|
28
|
+
// 576px
|
|
29
|
+
@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
|
|
30
|
+
$min: map-get($breakpoints, $name);
|
|
31
|
+
@return if($min != 0, $min, null);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Maximum breakpoint width.
|
|
35
|
+
// The maximum value is reduced by 0.02px to work around the limitations of
|
|
36
|
+
// `min-` and `max-` prefixes and viewports with fractional widths.
|
|
37
|
+
// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
|
|
38
|
+
// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
|
|
39
|
+
// See https://bugs.webkit.org/show_bug.cgi?id=178261
|
|
40
|
+
//
|
|
41
|
+
// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
|
42
|
+
// 767.98px
|
|
43
|
+
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
|
44
|
+
$max: map-get($breakpoints, $name);
|
|
45
|
+
@return if($max and $max > 0, $max - .02, null);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
|
49
|
+
// Useful for making responsive utilities.
|
|
50
|
+
//
|
|
51
|
+
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
|
52
|
+
// "" (Returns a blank string)
|
|
53
|
+
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
|
|
54
|
+
// "-sm"
|
|
55
|
+
@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
|
|
56
|
+
@return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
|
|
60
|
+
// Makes the @content apply to the given breakpoint and wider.
|
|
61
|
+
@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {
|
|
62
|
+
$min: breakpoint-min($name, $breakpoints);
|
|
63
|
+
@if $min {
|
|
64
|
+
@media (min-width: $min) {
|
|
65
|
+
@content;
|
|
66
|
+
}
|
|
67
|
+
} @else {
|
|
68
|
+
@content;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
|
|
73
|
+
// Makes the @content apply to the given breakpoint and narrower.
|
|
74
|
+
@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {
|
|
75
|
+
$max: breakpoint-max($name, $breakpoints);
|
|
76
|
+
@if $max {
|
|
77
|
+
@media (max-width: $max) {
|
|
78
|
+
@content;
|
|
79
|
+
}
|
|
80
|
+
} @else {
|
|
81
|
+
@content;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Media that spans multiple breakpoint widths.
|
|
86
|
+
// Makes the @content apply between the min and max breakpoints
|
|
87
|
+
@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
|
|
88
|
+
$min: breakpoint-min($lower, $breakpoints);
|
|
89
|
+
$max: breakpoint-max($upper, $breakpoints);
|
|
90
|
+
|
|
91
|
+
@if $min != null and $max != null {
|
|
92
|
+
@media (min-width: $min) and (max-width: $max) {
|
|
93
|
+
@content;
|
|
94
|
+
}
|
|
95
|
+
} @else if $max == null {
|
|
96
|
+
@include media-breakpoint-up($lower, $breakpoints) {
|
|
97
|
+
@content;
|
|
98
|
+
}
|
|
99
|
+
} @else if $min == null {
|
|
100
|
+
@include media-breakpoint-down($upper, $breakpoints) {
|
|
101
|
+
@content;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Media between the breakpoint's minimum and maximum widths.
|
|
107
|
+
// No minimum for the smallest breakpoint, and no maximum for the largest one.
|
|
108
|
+
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
|
109
|
+
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
|
|
110
|
+
$min: breakpoint-min($name, $breakpoints);
|
|
111
|
+
$next: breakpoint-next($name, $breakpoints);
|
|
112
|
+
$max: breakpoint-max($next, $breakpoints);
|
|
113
|
+
|
|
114
|
+
@if $min != null and $max != null {
|
|
115
|
+
@media (min-width: $min) and (max-width: $max) {
|
|
116
|
+
@content;
|
|
117
|
+
}
|
|
118
|
+
} @else if $max == null {
|
|
119
|
+
@include media-breakpoint-up($name, $breakpoints) {
|
|
120
|
+
@content;
|
|
121
|
+
}
|
|
122
|
+
} @else if $min == null {
|
|
123
|
+
@include media-breakpoint-down($next, $breakpoints) {
|
|
124
|
+
@content;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Button variants
|
|
2
|
+
//
|
|
3
|
+
// Easily pump out default styles, as well as :hover, :focus, :active,
|
|
4
|
+
// and disabled options for all buttons
|
|
5
|
+
|
|
6
|
+
// scss-docs-start btn-variant-mixin
|
|
7
|
+
@mixin button-variant(
|
|
8
|
+
$background,
|
|
9
|
+
$border,
|
|
10
|
+
$color: color-contrast($background),
|
|
11
|
+
$hover-background: if($color == $color-contrast-light, shade-color($background, $btn-hover-bg-shade-amount), tint-color($background, $btn-hover-bg-tint-amount)),
|
|
12
|
+
$hover-border: if($color == $color-contrast-light, shade-color($border, $btn-hover-border-shade-amount), tint-color($border, $btn-hover-border-tint-amount)),
|
|
13
|
+
$hover-color: color-contrast($hover-background),
|
|
14
|
+
$active-background: if($color == $color-contrast-light, shade-color($background, $btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
|
|
15
|
+
$active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
|
|
16
|
+
$active-color: color-contrast($active-background),
|
|
17
|
+
$disabled-background: $background,
|
|
18
|
+
$disabled-border: $border,
|
|
19
|
+
$disabled-color: color-contrast($disabled-background)
|
|
20
|
+
) {
|
|
21
|
+
--#{$prefix}btn-color: #{$color};
|
|
22
|
+
--#{$prefix}btn-bg: #{$background};
|
|
23
|
+
--#{$prefix}btn-border-color: #{$border};
|
|
24
|
+
--#{$prefix}btn-hover-color: #{$hover-color};
|
|
25
|
+
--#{$prefix}btn-hover-bg: #{$hover-background};
|
|
26
|
+
--#{$prefix}btn-hover-border-color: #{$hover-border};
|
|
27
|
+
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb(mix($color, $border, 15%))};
|
|
28
|
+
--#{$prefix}btn-active-color: #{$active-color};
|
|
29
|
+
--#{$prefix}btn-active-bg: #{$active-background};
|
|
30
|
+
--#{$prefix}btn-active-border-color: #{$active-border};
|
|
31
|
+
--#{$prefix}btn-active-shadow: #{$btn-active-box-shadow};
|
|
32
|
+
--#{$prefix}btn-disabled-color: #{$disabled-color};
|
|
33
|
+
--#{$prefix}btn-disabled-bg: #{$disabled-background};
|
|
34
|
+
--#{$prefix}btn-disabled-border-color: #{$disabled-border};
|
|
35
|
+
}
|
|
36
|
+
// scss-docs-end btn-variant-mixin
|
|
37
|
+
|
|
38
|
+
// scss-docs-start btn-outline-variant-mixin
|
|
39
|
+
@mixin button-outline-variant(
|
|
40
|
+
$color,
|
|
41
|
+
$color-hover: color-contrast($color),
|
|
42
|
+
$active-background: $color,
|
|
43
|
+
$active-border: $color,
|
|
44
|
+
$active-color: color-contrast($active-background)
|
|
45
|
+
) {
|
|
46
|
+
--#{$prefix}btn-color: #{$color};
|
|
47
|
+
--#{$prefix}btn-border-color: #{$color};
|
|
48
|
+
--#{$prefix}btn-hover-color: #{$color-hover};
|
|
49
|
+
--#{$prefix}btn-hover-bg: #{$active-background};
|
|
50
|
+
--#{$prefix}btn-hover-border-color: #{$active-border};
|
|
51
|
+
--#{$prefix}btn-focus-shadow-rgb: #{to-rgb($color)};
|
|
52
|
+
--#{$prefix}btn-active-color: #{$active-color};
|
|
53
|
+
--#{$prefix}btn-active-bg: #{$active-background};
|
|
54
|
+
--#{$prefix}btn-active-border-color: #{$active-border};
|
|
55
|
+
--#{$prefix}btn-active-shadow: #{$btn-active-box-shadow};
|
|
56
|
+
--#{$prefix}btn-disabled-color: #{$color};
|
|
57
|
+
--#{$prefix}btn-disabled-bg: transparent;
|
|
58
|
+
--#{$prefix}btn-disabled-border-color: #{$color};
|
|
59
|
+
--#{$prefix}gradient: none;
|
|
60
|
+
}
|
|
61
|
+
// scss-docs-end btn-outline-variant-mixin
|
|
62
|
+
|
|
63
|
+
// scss-docs-start btn-size-mixin
|
|
64
|
+
@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
|
|
65
|
+
--#{$prefix}btn-padding-y: #{$padding-y};
|
|
66
|
+
--#{$prefix}btn-padding-x: #{$padding-x};
|
|
67
|
+
@include rfs($font-size, --#{$prefix}btn-font-size);
|
|
68
|
+
--#{$prefix}btn-border-radius: #{$border-radius};
|
|
69
|
+
}
|
|
70
|
+
// scss-docs-end btn-size-mixin
|