@nuvoui/core 0.3.1 → 1.1.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/dist/nuvoui.css +1 -0
- package/package.json +14 -7
- package/src/styles/base/_base.scss +26 -2
- package/src/styles/base/_reset.scss +5 -2
- package/src/styles/index.scss +6 -11
- package/src/styles/layouts/_container.scss +1 -0
- package/src/styles/layouts/_flex.scss +26 -7
- package/src/styles/layouts/_grid.scss +6 -8
- package/src/styles/mixins-map.scss +1175 -0
- package/src/styles/themes/_theme.scss +1 -2
- package/src/styles/utilities/_animations.scss +10 -64
- package/src/styles/utilities/_borders.scss +36 -0
- package/src/styles/utilities/_colors.scss +23 -19
- package/src/styles/utilities/_display.scss +13 -15
- package/src/styles/utilities/{_responsive.scss → _media-queries.scss} +16 -53
- package/src/styles/utilities/_opacity.scss +20 -0
- package/src/styles/utilities/_position.scss +49 -40
- package/src/styles/utilities/_shadows.scss +4 -5
- package/src/styles/utilities/_sizing.scss +73 -0
- package/src/styles/utilities/_spacing.scss +76 -63
- package/src/styles/utilities/_tooltips.scss +20 -33
- package/src/styles/utilities/_typography.scss +1 -0
- package/src/styles/utilities/_variables.scss +30 -23
- package/dist/dark.css +0 -1
- package/dist/index.css +0 -1
- package/dist/index.css.map +0 -1
- package/dist/index.html +0 -15
- package/dist/light.css +0 -1
- package/dist/main.css +0 -1
- package/dist/main.js +0 -1
- package/src/js/main.js +0 -1
- package/src/logo.png +0 -0
- package/src/logo.svg +0 -12
- package/src/styles/_global.scss +0 -3
- package/src/styles/components/_alert.scss +0 -0
- package/src/styles/components/_avatar.scss +0 -0
- package/src/styles/components/_badge.scss +0 -0
- package/src/styles/components/_breadcrumb.scss +0 -0
- package/src/styles/components/_button.scss +0 -247
- package/src/styles/components/_calendar.scss +0 -0
- package/src/styles/components/_card.scss +0 -0
- package/src/styles/components/_checkbox.scss +0 -23
- package/src/styles/components/_dropdown.scss +0 -0
- package/src/styles/components/_form.scss +0 -157
- package/src/styles/components/_modal.scss +0 -0
- package/src/styles/components/_navbar.scss +0 -141
- package/src/styles/components/_pagination.scss +0 -0
- package/src/styles/components/_progress.scss +0 -0
- package/src/styles/components/_radio.scss +0 -0
- package/src/styles/components/_sidebar.scss +0 -0
- package/src/styles/components/_table.scss +0 -0
- package/src/styles/components/_tabs.scss +0 -0
- package/src/styles/components/_tooltip.scss +0 -0
- package/src/styles/utilities/_hamburger.scss +0 -74
|
@@ -28,7 +28,6 @@ $opacity-levels: (
|
|
|
28
28
|
@each $name, $color in $colors {
|
|
29
29
|
// Base color
|
|
30
30
|
--#{$name}: #{$color};
|
|
31
|
-
--#{$name}-rgb: #{color.channel($color, 'red')}, #{color.channel($color, 'green')}, #{color.channel($color, 'blue')};
|
|
32
31
|
|
|
33
32
|
// Variations
|
|
34
33
|
@each $variant, $percentage in $color-variations {
|
|
@@ -98,7 +97,7 @@ $opacity-levels: (
|
|
|
98
97
|
// Tooltip
|
|
99
98
|
--tooltip-bg: var(--dark);
|
|
100
99
|
--tooltip-text: var(--light);
|
|
101
|
-
--tooltip-shadow-color:
|
|
100
|
+
--tooltip-shadow-color: rgb(0 0 0 / 40%);
|
|
102
101
|
--microtip-transition-duration: 0.518s;
|
|
103
102
|
--microtip-transition-delay: .2s;
|
|
104
103
|
--microtip-transition-easing: cubic-bezier(0.16, 1, 0.9, 1);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
$generated-keyframes: ();
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
@mixin
|
|
9
|
+
@mixin generate-bounce-keyframes($keyframeName, $x, $y) {
|
|
10
10
|
@if not list.index($generated-keyframes, $keyframeName) {
|
|
11
11
|
$generated-keyframes: list.append($generated-keyframes, $keyframeName) !global;
|
|
12
12
|
|
|
@@ -14,9 +14,11 @@ $generated-keyframes: ();
|
|
|
14
14
|
0% {
|
|
15
15
|
transform: translateX(-#{$x}) translateY(-#{$y});
|
|
16
16
|
}
|
|
17
|
+
|
|
17
18
|
50% {
|
|
18
19
|
transform: translateX(#{$x}) translateY(#{$y});
|
|
19
20
|
}
|
|
21
|
+
|
|
20
22
|
100% {
|
|
21
23
|
transform: translateX(-#{$x}) translateY(-#{$y});
|
|
22
24
|
}
|
|
@@ -32,9 +34,9 @@ $generated-keyframes: ();
|
|
|
32
34
|
timing: ease-in-out,
|
|
33
35
|
iteration: infinite
|
|
34
36
|
);
|
|
37
|
+
|
|
35
38
|
// Merge with defaults
|
|
36
39
|
$props: map.merge($defaults, $props);
|
|
37
|
-
|
|
38
40
|
$x: map.get($props, 'horizontal');
|
|
39
41
|
$y: map.get($props, 'vertical');
|
|
40
42
|
$duration: map.get($props, 'duration');
|
|
@@ -46,16 +48,15 @@ $generated-keyframes: ();
|
|
|
46
48
|
$y-unit: if($y, safe-unit-name(get-unit($y)), '-');
|
|
47
49
|
|
|
48
50
|
// Clean values (remove units)
|
|
49
|
-
$
|
|
50
|
-
$
|
|
51
|
-
|
|
52
|
-
$animationName: anim-bounce-#{$cleanX}#{$x-unit}-#{$cleanY}#{$y-unit};
|
|
51
|
+
$clean-x: if($x, strip-unit($x), 0);
|
|
52
|
+
$clean-y: if($y, strip-unit($y), 0);
|
|
53
|
+
$animation-name: anim-bounce-#{$clean-x}#{$x-unit}-#{$clean-y}#{$y-unit};
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
& {
|
|
56
|
-
animation: #{$
|
|
57
|
+
animation: #{$animation-name} $duration $easing $iteration;
|
|
57
58
|
}
|
|
58
|
-
@include
|
|
59
|
+
@include generate-bounce-keyframes($animation-name, $x, $y);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
|
|
@@ -71,64 +72,9 @@ $generated-keyframes: ();
|
|
|
71
72
|
.anim__fade-in-reveal {
|
|
72
73
|
scale: .2;
|
|
73
74
|
opacity: 0.7;
|
|
74
|
-
|
|
75
75
|
animation: fade-in-reveal linear forwards;
|
|
76
76
|
animation-timeline: view();
|
|
77
|
-
|
|
78
77
|
animation-range-start: cover;
|
|
79
78
|
animation-range-end: 550px;
|
|
80
|
-
|
|
81
|
-
// animation-range: enter;
|
|
82
|
-
// animation-range: exit;
|
|
83
79
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@keyframes fadeOutAndCollapse {
|
|
87
|
-
0% {
|
|
88
|
-
opacity: 1;
|
|
89
|
-
bottom: 0px;
|
|
90
|
-
height: auto;
|
|
91
|
-
}
|
|
92
|
-
50% {
|
|
93
|
-
bottom: -500px;
|
|
94
|
-
opacity: 0;
|
|
95
|
-
}
|
|
96
|
-
100% {
|
|
97
|
-
bottom: 100%;
|
|
98
|
-
opacity: 0;
|
|
99
|
-
height: 0;
|
|
100
|
-
overflow: hidden;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
// @keyframes moveVertical {
|
|
108
|
-
// 0% {
|
|
109
|
-
// transform: translateY(-5%);
|
|
110
|
-
// }
|
|
111
|
-
|
|
112
|
-
// 50% {
|
|
113
|
-
// transform: translateY(5%);
|
|
114
|
-
// }
|
|
115
|
-
|
|
116
|
-
// 100% {
|
|
117
|
-
// transform: translateY(-5%);
|
|
118
|
-
// }
|
|
119
|
-
// }
|
|
120
|
-
|
|
121
|
-
// @keyframes moveHorizontal {
|
|
122
|
-
// 0% {
|
|
123
|
-
// transform: translateX(-50%) translateY(-10%);
|
|
124
|
-
// }
|
|
125
|
-
|
|
126
|
-
// 50% {
|
|
127
|
-
// transform: translateX(50%) translateY(10%);
|
|
128
|
-
// }
|
|
129
|
-
|
|
130
|
-
// 100% {
|
|
131
|
-
// transform: translateX(-50%) translateY(-10%);
|
|
132
|
-
// }
|
|
133
|
-
// }
|
|
134
|
-
|
|
80
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// _spacing.scss
|
|
2
|
+
|
|
3
|
+
@use 'sass:math';
|
|
4
|
+
@use './variables' as *;
|
|
5
|
+
|
|
6
|
+
// todo: mixins mising and also finalize .b .bb or not to .b
|
|
7
|
+
@mixin border($val) { $val: if($val == 0, $val, $val + px); border-width: $val; }
|
|
8
|
+
@mixin rounded($val) { border-radius: $val; }
|
|
9
|
+
|
|
10
|
+
.border { @include border(1); }
|
|
11
|
+
.border-0 { @include border(0); }
|
|
12
|
+
|
|
13
|
+
@each $i in 0 1 2 4 8 {
|
|
14
|
+
.border-#{$i} { @include border($i); }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@each $color-name, $color-value in $colors {
|
|
18
|
+
.border-#{$color-name} { border-color: $color-value; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.rounded { @include rounded(0.25rem); }
|
|
22
|
+
.square { @include rounded(0) }
|
|
23
|
+
.pill { @include rounded(9999px); }
|
|
24
|
+
|
|
25
|
+
// Responsive Position Classes
|
|
26
|
+
@each $breakpoint, $width in $breakpoints {
|
|
27
|
+
@media (min-width: $width) {
|
|
28
|
+
|
|
29
|
+
@each $i in 0 1 2 4 8 {
|
|
30
|
+
.border-#{$i}\@#{$breakpoint} { @include border($i); }
|
|
31
|
+
}
|
|
32
|
+
@each $i in 0 2 3 4 5 10 15 20 25 {
|
|
33
|
+
.rounded-#{$i}\@#{$breakpoint} { @include border($i); }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
@use "sass:math";
|
|
2
2
|
@use 'sass:color';
|
|
3
3
|
@use 'sass:map';
|
|
4
|
+
@use 'sass:meta';
|
|
5
|
+
@use 'sass:list';
|
|
4
6
|
|
|
5
7
|
@use './variables' as *;
|
|
6
8
|
|
|
9
|
+
|
|
10
|
+
// todo: only functions and may be not needed
|
|
11
|
+
|
|
7
12
|
@each $color-name, $color-value in $colors {
|
|
8
13
|
.text-#{$color-name} { color: $color-value; }
|
|
9
14
|
.bg-#{$color-name} { background-color: $color-value; }
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
// Modern Color System
|
|
13
|
-
// _colors.scss
|
|
14
|
-
|
|
15
18
|
// Color Validation
|
|
16
19
|
@function is-valid-color($color) {
|
|
17
|
-
@return type-of($color) == 'color';
|
|
20
|
+
@return meta.type-of($color) == 'color';
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
// Modern Color Spaces
|
|
@@ -39,22 +42,22 @@
|
|
|
39
42
|
|
|
40
43
|
// Color Harmony Generation
|
|
41
44
|
@function complementary($color) {
|
|
42
|
-
@return adjust
|
|
45
|
+
@return color.adjust($color, 180);
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
@function triadic($color) {
|
|
46
49
|
@return (
|
|
47
50
|
$color,
|
|
48
|
-
adjust
|
|
49
|
-
adjust
|
|
51
|
+
color.adjust($color, 120),
|
|
52
|
+
color.adjust($color, 240)
|
|
50
53
|
);
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
@function split-complementary($color) {
|
|
54
57
|
@return (
|
|
55
58
|
$color,
|
|
56
|
-
adjust
|
|
57
|
-
adjust
|
|
59
|
+
color.adjust($color, 150),
|
|
60
|
+
color.adjust($color, 210)
|
|
58
61
|
);
|
|
59
62
|
}
|
|
60
63
|
|
|
@@ -74,7 +77,7 @@
|
|
|
74
77
|
@for $i from 0 through $steps {
|
|
75
78
|
$lightness: 95 - ($i * (90 / $steps));
|
|
76
79
|
$new-color: color.adjust($lch-color, $lightness: $lightness);
|
|
77
|
-
$scale: append($scale, $new-color);
|
|
80
|
+
$scale: list.append($scale, $new-color);
|
|
78
81
|
}
|
|
79
82
|
|
|
80
83
|
@return $scale;
|
|
@@ -88,13 +91,13 @@
|
|
|
88
91
|
|
|
89
92
|
// Luminance Calculation
|
|
90
93
|
@function luminance($color) {
|
|
91
|
-
$r: red($color) / 255;
|
|
92
|
-
$g: green($color) / 255;
|
|
93
|
-
$b: blue($color) / 255;
|
|
94
|
+
$r: color.red($color) / 255;
|
|
95
|
+
$g: color.green($color) / 255;
|
|
96
|
+
$b: color.blue($color) / 255;
|
|
94
97
|
|
|
95
|
-
$r: if($r <= 0.
|
|
96
|
-
$g: if($g <= 0.
|
|
97
|
-
$b: if($b <= 0.
|
|
98
|
+
$r: if($r <= 0.0393, $r / 12.92, pow(($r + 0.055) / 1.055, 2.4));
|
|
99
|
+
$g: if($g <= 0.0393, $g / 12.92, pow(($g + 0.055) / 1.055, 2.4));
|
|
100
|
+
$b: if($b <= 0.0393, $b / 12.92, pow(($b + 0.055) / 1.055, 2.4));
|
|
98
101
|
|
|
99
102
|
@return $r * 0.2126 + $g * 0.7152 + $b * 0.0722;
|
|
100
103
|
}
|
|
@@ -119,28 +122,29 @@
|
|
|
119
122
|
|
|
120
123
|
@media (prefers-contrast: more) {
|
|
121
124
|
$high-contrast: adjust-contrast($background, 20%);
|
|
125
|
+
|
|
122
126
|
background: $high-contrast;
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
129
|
|
|
126
130
|
// Filter Mixins
|
|
127
131
|
@mixin backdrop-filter($value) {
|
|
128
|
-
-webkit-backdrop-filter: $value;
|
|
129
132
|
backdrop-filter: $value;
|
|
130
133
|
}
|
|
131
134
|
|
|
132
135
|
@mixin filter($value) {
|
|
133
|
-
-webkit-filter: $value;
|
|
134
136
|
filter: $value;
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
// Glass Effect Utilities
|
|
138
140
|
.glass-effect {
|
|
139
141
|
@include backdrop-filter(blur(10px));
|
|
140
|
-
|
|
142
|
+
|
|
143
|
+
background-color: rgb(255 255 255 / 10%);
|
|
141
144
|
}
|
|
142
145
|
|
|
143
146
|
.frosted-glass {
|
|
144
147
|
@include backdrop-filter(blur(5px) saturate(180%));
|
|
145
|
-
|
|
148
|
+
|
|
149
|
+
background-color: rgb(255 255 255 / 80%);
|
|
146
150
|
}
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
|
-
@use 'sass:color';
|
|
3
|
-
@use 'sass:map';
|
|
4
1
|
|
|
5
2
|
@use './variables' as *;
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
@use './functions' as *;
|
|
8
4
|
|
|
9
5
|
// Display Mixins
|
|
10
6
|
@mixin d-none { display: none; }
|
|
11
7
|
@mixin d-block { display: block; }
|
|
12
8
|
@mixin d-inline { display: inline; }
|
|
13
9
|
@mixin d-inline-block { display: inline-block; }
|
|
14
|
-
@mixin d-
|
|
15
|
-
@mixin d-
|
|
16
|
-
@mixin d-
|
|
10
|
+
@mixin d-tbl { display: table; }
|
|
11
|
+
@mixin d-tbl-row { display: table-row; }
|
|
12
|
+
@mixin d-tbl-cell { display: table-cell; }
|
|
17
13
|
|
|
18
|
-
// Base Classes
|
|
14
|
+
// Base Classes
|
|
19
15
|
.hide { @include d-none; }
|
|
20
16
|
.block { @include d-block; }
|
|
21
17
|
.inline { @include d-inline; }
|
|
22
18
|
.inline-block { @include d-inline-block; }
|
|
19
|
+
|
|
23
20
|
.d {
|
|
24
|
-
&-
|
|
25
|
-
&-
|
|
26
|
-
&-
|
|
21
|
+
&-tbl { @include d-tbl; }
|
|
22
|
+
&-tbl-row { @include d-tbl-row; }
|
|
23
|
+
&-tbl-cell { @include d-tbl-cell; }
|
|
27
24
|
}
|
|
28
25
|
|
|
29
26
|
// Responsive Variants
|
|
@@ -33,10 +30,11 @@
|
|
|
33
30
|
.block\@#{$breakpoint} { @include d-block; }
|
|
34
31
|
.inline\@#{$breakpoint} { @include d-inline; }
|
|
35
32
|
.inline-block\@#{$breakpoint} { @include d-inline-block; }
|
|
33
|
+
|
|
36
34
|
.d {
|
|
37
|
-
&-
|
|
38
|
-
&-
|
|
39
|
-
&-
|
|
35
|
+
&-tbl\@#{$breakpoint} { @include d-tbl; }
|
|
36
|
+
&-tbl-row\@#{$breakpoint} { @include d-tbl-row; }
|
|
37
|
+
&-tbl-cell\@#{$breakpoint} { @include d-tbl-cell; }
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
}
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
@mixin media-between($lower, $upper) {
|
|
31
31
|
@if map.has-key($breakpoints, $lower) and map.has-key($breakpoints, $upper) {
|
|
32
|
-
@media screen and (min-width: map.get($breakpoints, $lower)) and
|
|
33
|
-
(max-width: (map.get($breakpoints, $upper) - 0.02px)) {
|
|
32
|
+
@media screen and (min-width: map.get($breakpoints, $lower)) and (max-width: (map.get($breakpoints, $upper) - 0.02px)) {
|
|
34
33
|
@content;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
@@ -43,13 +42,13 @@
|
|
|
43
42
|
$next-breakpoint: null;
|
|
44
43
|
|
|
45
44
|
@each $name, $width in $breakpoints {
|
|
46
|
-
@if $width > $min and ($next-breakpoint == null or $width < $next-breakpoint) {
|
|
45
|
+
@if $width > $min and (meta.type-of($next-breakpoint) == 'null' or $width < $next-breakpoint) {
|
|
47
46
|
$next-breakpoint: $width;
|
|
48
47
|
}
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
@if $next-breakpoint {
|
|
52
|
-
@media (min-width: $min) and (max-width: $next-breakpoint - 1) {
|
|
51
|
+
@media (min-width: $min) and (max-width: ($next-breakpoint - 1)) {
|
|
53
52
|
@content;
|
|
54
53
|
}
|
|
55
54
|
} @else {
|
|
@@ -81,13 +80,6 @@
|
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
82
|
|
|
84
|
-
// Retina displays
|
|
85
|
-
@mixin retina {
|
|
86
|
-
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
|
|
87
|
-
@content;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
83
|
// Modern feature detection
|
|
92
84
|
// Example: @include supports(display: grid) { }
|
|
93
85
|
@mixin supports($property) {
|
|
@@ -96,21 +88,11 @@
|
|
|
96
88
|
}
|
|
97
89
|
}
|
|
98
90
|
|
|
99
|
-
// Reduced motion preference
|
|
100
|
-
@mixin reduced-motion {
|
|
101
|
-
@media (prefers-reduced-motion: reduce) {
|
|
102
|
-
@content;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
91
|
|
|
106
|
-
// High contrast mode
|
|
107
|
-
@mixin high-contrast {
|
|
108
|
-
@media (forced-colors: active) {
|
|
109
|
-
@content;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
92
|
|
|
113
|
-
|
|
93
|
+
|
|
94
|
+
// Mixin: Dark Mode
|
|
95
|
+
// Applies styles when the user prefers a dark color scheme.
|
|
114
96
|
@mixin dark-mode {
|
|
115
97
|
@media (prefers-color-scheme: dark) {
|
|
116
98
|
@content;
|
|
@@ -130,32 +112,9 @@
|
|
|
130
112
|
}
|
|
131
113
|
}
|
|
132
114
|
|
|
133
|
-
// Modern hover capabilities
|
|
134
|
-
@mixin hover-device {
|
|
135
|
-
@media (hover: hover) and (pointer: fine) {
|
|
136
|
-
@content;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
115
|
// Modern aspect ratio
|
|
141
116
|
@mixin aspect-ratio($ratio) {
|
|
142
|
-
|
|
143
|
-
aspect-ratio: #{$ratio};
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
@supports not (aspect-ratio: #{$ratio}) {
|
|
147
|
-
&::before {
|
|
148
|
-
float: left;
|
|
149
|
-
padding-top: percentage(1 / $ratio);
|
|
150
|
-
content: '';
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&::after {
|
|
154
|
-
display: block;
|
|
155
|
-
content: '';
|
|
156
|
-
clear: both;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
117
|
+
aspect-ratio: #{$ratio};
|
|
159
118
|
}
|
|
160
119
|
|
|
161
120
|
// Dynamic viewport units (modern browsers)
|
|
@@ -174,11 +133,15 @@
|
|
|
174
133
|
#{$property}: env(safe-area-inset-#{$position});
|
|
175
134
|
}
|
|
176
135
|
|
|
177
|
-
|
|
178
|
-
@
|
|
179
|
-
|
|
180
|
-
transition: background-color 0.3s ease, color 0.3s ease;
|
|
136
|
+
@mixin reduced-motion {
|
|
137
|
+
@media (prefers-reduced-motion: reduce) {
|
|
138
|
+
@content;
|
|
181
139
|
}
|
|
182
140
|
}
|
|
183
141
|
|
|
184
|
-
|
|
142
|
+
// High contrast mode
|
|
143
|
+
@mixin high-contrast {
|
|
144
|
+
@media (forced-colors: active) {
|
|
145
|
+
@content;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// _spacing.scss
|
|
2
|
+
|
|
3
|
+
@use 'sass:math';
|
|
4
|
+
@use './variables' as *;
|
|
5
|
+
|
|
6
|
+
// Opacity Utilities
|
|
7
|
+
@each $i in $percentages {
|
|
8
|
+
.opacity-#{$i} { opacity: math.div($i, 100); }
|
|
9
|
+
.hover\:opacity-#{$i}:hover { opacity: math.div($i, 100); }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Responsive Variants for Opacity
|
|
13
|
+
@each $breakpoint, $width in $breakpoints {
|
|
14
|
+
@media (min-width: $width) {
|
|
15
|
+
@each $i in $percentages {
|
|
16
|
+
.opacity-#{$i}\@#{$breakpoint} { opacity: math.div($i, 100); }
|
|
17
|
+
.hover\:opacity-#{$i}\@#{$breakpoint}:hover { opacity: math.div($i, 100); }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,63 +1,66 @@
|
|
|
1
1
|
@use './variables' as *;
|
|
2
|
+
|
|
2
3
|
// Position Mixins
|
|
3
|
-
@mixin
|
|
4
|
+
@mixin static {
|
|
4
5
|
position: static;
|
|
5
6
|
}
|
|
6
7
|
|
|
7
|
-
@mixin
|
|
8
|
+
@mixin relative {
|
|
8
9
|
position: relative;
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
@mixin
|
|
12
|
+
@mixin absolute {
|
|
12
13
|
position: absolute;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
@mixin
|
|
16
|
+
@mixin fixed {
|
|
16
17
|
position: fixed;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@mixin
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin sticky {
|
|
20
21
|
position: sticky;
|
|
21
|
-
|
|
22
|
+
z-index: 999;
|
|
23
|
+
top: 0;
|
|
24
|
+
}
|
|
22
25
|
|
|
23
26
|
// Position Classes
|
|
24
|
-
.
|
|
25
|
-
@include
|
|
27
|
+
.static {
|
|
28
|
+
@include static;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
|
-
.
|
|
29
|
-
@include
|
|
31
|
+
.relative {
|
|
32
|
+
@include relative;
|
|
30
33
|
}
|
|
31
34
|
|
|
32
|
-
.
|
|
33
|
-
@include
|
|
35
|
+
.absolute {
|
|
36
|
+
@include absolute;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
|
-
.
|
|
37
|
-
@include
|
|
39
|
+
.fixed {
|
|
40
|
+
@include fixed;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
|
-
.
|
|
41
|
-
@include
|
|
43
|
+
.sticky {
|
|
44
|
+
@include sticky;
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
// Responsive Position Classes
|
|
45
48
|
@each $breakpoint, $width in $breakpoints {
|
|
46
49
|
@media (min-width: $width) {
|
|
47
|
-
.
|
|
48
|
-
@include
|
|
50
|
+
.static\@#{$breakpoint} {
|
|
51
|
+
@include static;
|
|
49
52
|
}
|
|
50
|
-
.
|
|
51
|
-
@include
|
|
53
|
+
.relative\@#{$breakpoint} {
|
|
54
|
+
@include relative;
|
|
52
55
|
}
|
|
53
|
-
.
|
|
54
|
-
@include
|
|
56
|
+
.absolute\@#{$breakpoint} {
|
|
57
|
+
@include absolute;
|
|
55
58
|
}
|
|
56
|
-
.
|
|
57
|
-
@include
|
|
59
|
+
.fixed\@#{$breakpoint} {
|
|
60
|
+
@include fixed;
|
|
58
61
|
}
|
|
59
|
-
.
|
|
60
|
-
@include
|
|
62
|
+
.sticky\@#{$breakpoint} {
|
|
63
|
+
@include sticky;
|
|
61
64
|
}
|
|
62
65
|
}
|
|
63
66
|
}
|
|
@@ -81,17 +84,23 @@
|
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
// Top, Right, Bottom, Left Classes
|
|
84
|
-
@
|
|
85
|
-
.top-#{$i} {
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
@each $i in $spacings {
|
|
88
|
+
.top-#{$i} {@include top($i);}
|
|
89
|
+
.right-#{$i} {@include right($i);}
|
|
90
|
+
.bottom-#{$i} {@include bottom($i);}
|
|
91
|
+
.left-#{$i} {@include left($i);}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
// Pixel widths based on spacing scale
|
|
96
|
+
@each $breakpoint, $width in $breakpoints {
|
|
97
|
+
@media (min-width: $width) {
|
|
98
|
+
// Generate utilities from spacing map
|
|
99
|
+
@each $i in $spacings {
|
|
100
|
+
.top-#{$i}\@#{$breakpoint} {height: if($i == 0, $i, $i + px);}
|
|
101
|
+
.right-#{$i}\@#{$breakpoint} {width: if($i == 0, $i, $i + px);}
|
|
102
|
+
.bottom-#{$i}\@#{$breakpoint} {min-width: if($i == 0, $i, $i + px);}
|
|
103
|
+
.left-#{$i}\@#{$breakpoint} {min-height: if($i == 0, $i, $i + px);}
|
|
104
|
+
}
|
|
96
105
|
}
|
|
97
106
|
}
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
// Shadow Variables
|
|
9
9
|
$shadow-colors: (
|
|
10
|
-
'default':
|
|
11
|
-
'dark':
|
|
12
|
-
'darker':
|
|
13
|
-
'darkest':
|
|
10
|
+
'default': rgb(0 0 0 / 10%),
|
|
11
|
+
'dark': rgb(0 0 0 / 20%),
|
|
12
|
+
'darker': rgb(0 0 0 / 35%),
|
|
13
|
+
'darkest': rgb(0 0 0 / 50%),
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
$shadow-sizes: (
|
|
@@ -60,7 +60,6 @@ $shadow-sizes: (
|
|
|
60
60
|
|
|
61
61
|
@mixin shadow($size: 'md', $color: 'default') {
|
|
62
62
|
$shadow: map.get($shadow-sizes, $size);
|
|
63
|
-
|
|
64
63
|
$shadow-color: map.get($shadow-colors, $color);
|
|
65
64
|
@include shadow-base(
|
|
66
65
|
map.get($shadow, 'x'),
|