move.gl 0.0.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.
Files changed (117) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +38 -0
  3. package/css/move.gl.css +2 -0
  4. package/css/move.gl.min.css +2 -0
  5. package/package.json +55 -0
  6. package/scss/classes/_animations.scss +576 -0
  7. package/scss/classes/_index.scss +0 -0
  8. package/scss/classes/_transforms.scss +124 -0
  9. package/scss/classes/keyboard.scss +18 -0
  10. package/scss/classes/screensaver.scss +15 -0
  11. package/scss/dev/_banner.scss +36 -0
  12. package/scss/dev/_debug.scss +18 -0
  13. package/scss/dev/_deprecation.scss +10 -0
  14. package/scss/dev/_index.scss +8 -0
  15. package/scss/dev/_modules.scss +24 -0
  16. package/scss/effects/_filter.scss +176 -0
  17. package/scss/effects/_index.scss +23 -0
  18. package/scss/effects/_opacity.scss +62 -0
  19. package/scss/effects/_shadow.scss +175 -0
  20. package/scss/functions/_index.scss +0 -0
  21. package/scss/functions/scenes/_bubble.scss +19 -0
  22. package/scss/functions/scenes/_index.scss +20 -0
  23. package/scss/index.scss +0 -0
  24. package/scss/keyframes/_beat.scss +26 -0
  25. package/scss/keyframes/_index.scss +0 -0
  26. package/scss/maps/_index.scss +0 -0
  27. package/scss/maps/_mouse.scss +96 -0
  28. package/scss/mixins/_accessibility.scss +70 -0
  29. package/scss/mixins/_boot.scss +51 -0
  30. package/scss/mixins/_hover.scss +51 -0
  31. package/scss/mixins/_index.scss +0 -0
  32. package/scss/mixins/_selection.scss +321 -0
  33. package/scss/mixins/_shape.scss +44 -0
  34. package/scss/mixins/_touch.scss +95 -0
  35. package/scss/mixins/animations/--hover.scss +107 -0
  36. package/scss/mixins/animations/_base.scss +337 -0
  37. package/scss/mixins/animations/_beat.scss +119 -0
  38. package/scss/mixins/animations/_blink.scss +151 -0
  39. package/scss/mixins/animations/_bounce.scss +192 -0
  40. package/scss/mixins/animations/_elastic.scss +65 -0
  41. package/scss/mixins/animations/_fade.scss +154 -0
  42. package/scss/mixins/animations/_flash.scss +177 -0
  43. package/scss/mixins/animations/_flip.scss +72 -0
  44. package/scss/mixins/animations/_float.scss +126 -0
  45. package/scss/mixins/animations/_glow.scss +179 -0
  46. package/scss/mixins/animations/_heartbeat.scss +175 -0
  47. package/scss/mixins/animations/_hinge.scss +119 -0
  48. package/scss/mixins/animations/_index.scss +37 -0
  49. package/scss/mixins/animations/_jello.scss +129 -0
  50. package/scss/mixins/animations/_jiggle.scss +163 -0
  51. package/scss/mixins/animations/_lightspeed.scss +130 -0
  52. package/scss/mixins/animations/_nod.scss +161 -0
  53. package/scss/mixins/animations/_pop.scss +150 -0
  54. package/scss/mixins/animations/_pulse.scss +213 -0
  55. package/scss/mixins/animations/_ripple.scss +169 -0
  56. package/scss/mixins/animations/_roll.scss +261 -0
  57. package/scss/mixins/animations/_rotate.scss +428 -0
  58. package/scss/mixins/animations/_rubber.scss +116 -0
  59. package/scss/mixins/animations/_scale.scss +113 -0
  60. package/scss/mixins/animations/_shake.scss +182 -0
  61. package/scss/mixins/animations/_slide.scss +294 -0
  62. package/scss/mixins/animations/_spin.scss +219 -0
  63. package/scss/mixins/animations/_sway.scss +167 -0
  64. package/scss/mixins/animations/_swing.scss +247 -0
  65. package/scss/mixins/animations/_tada.scss +233 -0
  66. package/scss/mixins/animations/_twist.scss +177 -0
  67. package/scss/mixins/animations/_wave.scss +166 -0
  68. package/scss/mixins/animations/_wobble.scss +254 -0
  69. package/scss/mixins/animations/_zoom.scss +166 -0
  70. package/scss/mixins/effects/_filter.scss +148 -0
  71. package/scss/mixins/effects/_index.scss +0 -0
  72. package/scss/mixins/effects/_shadow.scss +21 -0
  73. package/scss/mixins/loaders/_index.scss +0 -0
  74. package/scss/mixins/loaders/_progress.scss +174 -0
  75. package/scss/mixins/loaders/_spinner.scss +101 -0
  76. package/scss/mixins/loaders/circle_01.scss +22 -0
  77. package/scss/mixins/loaders/circle_02.scss +19 -0
  78. package/scss/mixins/loaders/circle_03.scss +29 -0
  79. package/scss/mixins/loaders/circle_inner_01.scss +33 -0
  80. package/scss/mixins/loaders/circle_inner_02.scss +33 -0
  81. package/scss/mixins/loaders/circle_inner_03.scss +34 -0
  82. package/scss/mixins/mouse/_cursor.scss +182 -0
  83. package/scss/mixins/mouse/_index.scss +0 -0
  84. package/scss/mixins/mouse/_pointer.scss +258 -0
  85. package/scss/mixins/scroll/_index.scss +0 -0
  86. package/scss/mixins/scroll/_scroll.scss +104 -0
  87. package/scss/mixins/scroll/_scrollbar.scss +249 -0
  88. package/scss/mixins/transforms/_flip.scss +76 -0
  89. package/scss/mixins/transforms/_index.scss +23 -0
  90. package/scss/mixins/transforms/_matrix.scss +1 -0
  91. package/scss/mixins/transforms/_perspective.scss +11 -0
  92. package/scss/mixins/transforms/_rotate.scss +101 -0
  93. package/scss/mixins/transforms/_scale.scss +11 -0
  94. package/scss/mixins/transforms/_skew.scss +13 -0
  95. package/scss/mixins/transforms/_translate.scss +13 -0
  96. package/scss/mixins/transitions/_index.scss +0 -0
  97. package/scss/mixins/transitions/_transition.scss +13 -0
  98. package/scss/variables/_animation.scss +91 -0
  99. package/scss/variables/_index.scss +0 -0
  100. package/ts/ARContent.ts +27 -0
  101. package/ts/ARInteraction.ts +34 -0
  102. package/ts/AdaptiveUI.ts +25 -0
  103. package/ts/ContentStreaming.ts +20 -0
  104. package/ts/Draggable.ts +71 -0
  105. package/ts/DynamicEnvironment.ts +60 -0
  106. package/ts/Gesture.ts +168 -0
  107. package/ts/ImmersiveAudio.ts +40 -0
  108. package/ts/InteractiveCanvas.ts +177 -0
  109. package/ts/InteractiveVideo.ts +29 -0
  110. package/ts/Keyboard.ts +162 -0
  111. package/ts/RealTimeCollaboration.ts +25 -0
  112. package/ts/Screensaver.ts +140 -0
  113. package/ts/SpatialNavigation.ts +38 -0
  114. package/ts/UserProfile.ts +27 -0
  115. package/ts/VRExperience.ts +58 -0
  116. package/ts/VideoOverlay.ts +116 -0
  117. package/ts/index.ts +0 -0
@@ -0,0 +1,124 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+ ///
9
+ /// Predefined class for horizontal flip.
10
+ /// Applies the horizontal flip mixin.
11
+ ///
12
+ .transform_flip_horizontal {
13
+ @include transform_flip_horizontal;
14
+ }
15
+
16
+ ///
17
+ /// Predefined class for vertical flip.
18
+ /// Applies the vertical flip mixin.
19
+ ///
20
+ .transform_flip_vertical {
21
+ @include transform_flip_vertical;
22
+ }
23
+
24
+ ///
25
+ /// Predefined class for both horizontal and vertical flips.
26
+ /// Applies the mixin that combines both transformations.
27
+ ///
28
+ .transform_flip_both {
29
+ @include transform_flip_both();
30
+ }
31
+
32
+ ///
33
+ /// Alternate combination class for both horizontal and vertical flips.
34
+ /// Combines the horizontal and vertical flip classes.
35
+ ///
36
+ .transform_flip_horizontal.transform_flip_vertical {
37
+ @include transform_flip_both(); // Ensures both flips are applied
38
+ }
39
+
40
+
41
+
42
+
43
+ ///
44
+ /// Predefined class for rotating elements by 90 degrees.
45
+ /// Applies the 90 degrees rotation mixin.
46
+ ///
47
+ .transform_rotate_90 {
48
+ @include transform_rotate(90deg);
49
+ }
50
+
51
+ ///
52
+ /// Predefined class for rotating elements by 180 degrees.
53
+ /// Applies the 180 degrees rotation mixin.
54
+ ///
55
+ .transform_rotate_180 {
56
+ @include transform_rotate(180deg);
57
+ }
58
+
59
+ ///
60
+ /// Predefined class for rotating elements by 270 degrees.
61
+ /// Applies the 270 degrees rotation mixin.
62
+ ///
63
+ .transform_rotate_270 {
64
+ @include transform_rotate(270deg);
65
+ }
66
+
67
+ ///
68
+ /// Predefined class for dynamic rotation using a CSS variable.
69
+ /// Allows rotation to be controlled via the CSS variable `--rotation-angle`.
70
+ ///
71
+ .transform_rotate_dynamic {
72
+ @include transform_rotate_dynamic();
73
+ }
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ $default-rotation: 0deg !default;
82
+ $rotation-90: 90deg !default;
83
+ $rotation-180: 180deg !default;
84
+ $rotation-270: 270deg !default;
85
+
86
+ $default-scale: 1 !default;
87
+ $scale-up: 1.2 !default;
88
+ $scale-down: 0.8 !default;
89
+
90
+ $default-translate: 0 !default;
91
+ $translate-x: 10px !default;
92
+ $translate-y: 10px !default;
93
+
94
+ $default-skew: 0deg !default;
95
+ $skew-x: 10deg !default;
96
+ $skew-y: 10deg !default;
97
+
98
+ ///
99
+ /// Predefined class for scaling elements up.
100
+ ///
101
+ .scale_up {
102
+ @include scale($scale-up);
103
+ }
104
+
105
+ ///
106
+ /// Predefined class for scaling elements down.
107
+ ///
108
+ .scale_down {
109
+ @include scale($scale-down);
110
+ }
111
+
112
+ ///
113
+ /// Predefined class for translating elements by predefined X and Y values.
114
+ ///
115
+ .translate_xy {
116
+ @include translate($translate-x, $translate-y);
117
+ }
118
+
119
+ ///
120
+ /// Predefined class for skewing elements by predefined X and Y angles.
121
+ ///
122
+ .skew_xy {
123
+ @include skew($skew-x, $skew-y);
124
+ }
@@ -0,0 +1,18 @@
1
+ #keyboard div {
2
+ display: inline-block;
3
+ margin: 5px;
4
+ width: 30px;
5
+ height: 30px;
6
+ background-color: #ddd;
7
+ text-align: center;
8
+ line-height: 30px;
9
+ user-select: none;
10
+ cursor: pointer;
11
+ }
12
+
13
+ input[type="text"] {
14
+ width: 300px;
15
+ margin: 10px;
16
+ padding: 5px;
17
+ font-size: 16px;
18
+ }
@@ -0,0 +1,15 @@
1
+ #screensaver {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ background: black;
8
+ z-index: 1000; /* Make sure it covers other content */
9
+ }
10
+
11
+ #screensaverVideo, #screensaverImage {
12
+ width: 100%;
13
+ height: 100%;
14
+ object-fit: cover; /* Ensure the content covers the full area */
15
+ }
@@ -0,0 +1,36 @@
1
+ // ============================================================================
2
+ // StyleScape | Development | Banner
3
+ // ============================================================================
4
+
5
+ @mixin banner(
6
+ $file,
7
+ $version: '1.0.0',
8
+ $author: 'Scape Agency',
9
+ $website: 'https://www.style.scape/',
10
+ $license: 'Apache 2.0 License',
11
+ $licenseUrl: 'https://github.com/scape-agency/stylescape/blob/main/LICENSE',
12
+ $description: 'Layout Engine',
13
+ $repository: 'https://github.com/scape-agency/stylescape/',
14
+ ) {
15
+ @at-root {
16
+ /*!
17
+ * ============================================================================
18
+ *
19
+ * Stylescape #{$file} v#{$version} (#{$website})
20
+ * Copyright (c) 2020-2024 #{$author} (https://www.scape.agency)
21
+ * All rights reserved under #{$license} terms.
22
+ *
23
+ * ============================================================================
24
+ *
25
+ * @description #{$description}
26
+ * @author #{$author} (https://www.scape.agency)
27
+ * @version v#{$version}
28
+ * @copyright 2020-2024 #{$author} (https://www.scape.agency)
29
+ * @website #{$website}
30
+ * @repository #{$repository}
31
+ * @license #{$license} (#{$licenseUrl})
32
+ *
33
+ * ============================================================================
34
+ */
35
+ }
36
+ }
@@ -0,0 +1,18 @@
1
+ // ============================================================================
2
+ // StyleScape | Development | Debug
3
+ // ============================================================================
4
+
5
+ // Debug Mixin
6
+ // A debug mixin to output property values directly into the DOM for quick
7
+ // debugging purposes, particularly useful during development.
8
+ @mixin debug($property, $value) {
9
+ &:after {
10
+ content: '#{$property}: #{$value}';
11
+ display: block;
12
+ background-color: yellow;
13
+ color: black;
14
+ font-size: 12px;
15
+ padding: 2px;
16
+ }
17
+ }
18
+
@@ -0,0 +1,10 @@
1
+ // ============================================================================
2
+ // StyleScape | Development | Deprecation
3
+ // ============================================================================
4
+
5
+ // Deprecation Warning Mixin
6
+ // This mixin can be used to mark deprecated mixins or styles, displaying a warning in the console during compilation.
7
+ @mixin deprecate($feature, $version, $alternative: null) {
8
+ @warn 'Deprecation Warning: #{$feature} will be removed in version #{$version}.' + if($alternative, ' Use #{$alternative} instead.', '');
9
+ }
10
+
@@ -0,0 +1,8 @@
1
+ // ============================================================================
2
+ // StyleScape | Management
3
+ // ============================================================================
4
+
5
+ @forward "banner";
6
+ @forward "modules";
7
+ @forward "debug";
8
+ @forward "deprecation";
@@ -0,0 +1,24 @@
1
+ // ============================================================================
2
+ // StyleScape | Development | Modules
3
+ // ============================================================================
4
+
5
+ @use "../../../../unit.gl/scss/index.scss" as *;
6
+ @use "../../../../hue.gl/scss/index.scss" as *;
7
+ // @use "../../../../icon.gl/scss/index.scss" as *;
8
+
9
+ @forward "../../../../unit.gl/scss/index.scss";
10
+ @forward "../../../../hue.gl/scss/index.scss";
11
+ // @forward "../../../../icon.gl/scss/index.scss";
12
+
13
+
14
+ // @include icon_face(
15
+ // "../../../node_modules/icon.gl/font/icongl",
16
+ // "icongl",
17
+ // "",
18
+ // // 600,
19
+ // // "normal",
20
+ // // "#{$icon_name} SemiBold",
21
+ // // "#{$icon_name}-SemiBold",
22
+ // "ttf",
23
+ // // "otf"
24
+ // );
@@ -0,0 +1,176 @@
1
+
2
+
3
+ // ============================================================================
4
+ // StyleScape | Effects | Filter
5
+ // ============================================================================
6
+
7
+ @use "../variables" as *;
8
+ @use "../mixins" as *;
9
+
10
+
11
+ $default-blur: 2px;
12
+ $hover-blur: 4px;
13
+
14
+
15
+ @mixin filter_blur {
16
+ backdrop-filter: blur(calc(#{$q} * 4));
17
+ -webkit-backdrop-filter: blur(calc(#{$q} * 4));
18
+ }
19
+
20
+
21
+
22
+ // Applying Filter Mixins
23
+ // You can apply these mixins to your elements to achieve the desired effects:
24
+
25
+
26
+ .image-blur {
27
+ @include filter_blur(4px);
28
+ }
29
+
30
+ .image-grayscale {
31
+ @include filter_grayscale(50%);
32
+ }
33
+
34
+ .image-brightness {
35
+ @include filter_brightness(150%);
36
+ }
37
+
38
+ .image-contrast {
39
+ @include filter_contrast(200%);
40
+ }
41
+
42
+ .image-sepia {
43
+ @include filter_sepia(60%);
44
+ }
45
+
46
+ // Combining multiple filter effects
47
+ .filter_combine {
48
+ @include combine-filters(brightness(130%), contrast(120%), sepia(30%));
49
+ }
50
+ // Advanced Usage with Dynamic Values
51
+ // SCSS variables and functions can be used to dynamically adjust filter values, which is particularly useful for themes or interactive elements:
52
+
53
+
54
+
55
+ .image-interactive {
56
+ @include blur($default-blur);
57
+
58
+ &:hover {
59
+ @include blur($hover-blur);
60
+ }
61
+ }
62
+
63
+ // Function to calculate contrast based on a light or dark theme
64
+ @function theme-contrast($theme) {
65
+ @if $theme == 'dark' {
66
+ @return 150%;
67
+ } @else {
68
+ @return 100%;
69
+ }
70
+ }
71
+
72
+ .image-theme {
73
+ $current-theme: 'dark'; // Example variable that might be dynamically set
74
+ @include contrast(theme-contrast($current-theme));
75
+ }
76
+ // Responsive Filters
77
+ // You can also use media queries within SCSS to apply different filters based on viewport sizes, enhancing responsive design:
78
+
79
+
80
+ .image-responsive {
81
+ @include grayscale(100%);
82
+
83
+ @media (min-width: 768px) {
84
+ @include grayscale(0%);
85
+ }
86
+ }
87
+
88
+
89
+
90
+ // Theming with Filter Effects
91
+ // You can define a set of filter effects for different themes (e.g., dark mode, light mode) using SCSS maps and loops. This approach allows you to switch filter effects based on the active theme dynamically.
92
+
93
+
94
+ // Define themes with specific filter values
95
+ $themes: (
96
+ light: (
97
+ brightness: 100%,
98
+ contrast: 90%
99
+ ),
100
+ dark: (
101
+ brightness: 80%,
102
+ contrast: 110%
103
+ )
104
+ );
105
+
106
+ // Apply theme-based filters using a mixin
107
+ @mixin apply-theme($theme-name) {
108
+ $theme: map-get($themes, $theme-name);
109
+ filter: brightness(map-get($theme, brightness)) contrast(map-get($theme, contrast));
110
+ }
111
+
112
+ .element {
113
+ // Example usage with a light theme
114
+ @include apply-theme(light);
115
+
116
+ &:hover {
117
+ // Darken on hover for the light theme
118
+ @include apply-theme(dark);
119
+ }
120
+ }
121
+ // Animated Filter Transitions
122
+ // SCSS can be used to create smooth transitions between filter states, adding a dynamic and interactive feel to your elements.
123
+
124
+
125
+ @mixin filter-transition($duration: 0.3s, $easing: ease) {
126
+ transition: filter $duration $easing;
127
+ }
128
+
129
+ .element-with-transition {
130
+ @include grayscale(0%);
131
+ @include filter-transition(0.5s, ease-in-out);
132
+
133
+ &:hover {
134
+ @include grayscale(100%);
135
+ }
136
+ }
137
+ // Generating Multiple Filter Classes with Loops
138
+ // SCSS loops can be incredibly powerful for generating a series of classes that apply varying levels of a specific filter effect, such as a range of blur or grayscale values.
139
+
140
+
141
+ // @for $i from 1 through 10 {
142
+ // .blur-#{$i} {
143
+ // filter: blur(#{$i}px);
144
+ // }
145
+
146
+ // .grayscale-#{$i * 10} {
147
+ // filter: grayscale(#{$i * 10}%);
148
+ // }
149
+ // }
150
+ // Custom Mixins for Complex Filter Combinations
151
+ // For more complex or commonly used combinations of filters, you can create custom mixins. This approach keeps your code DRY and makes complex filter applications more manageable.
152
+
153
+
154
+ @mixin artistic-effect($blur-radius, $saturate-level, $sepia-level) {
155
+ filter: blur($blur-radius) saturate($saturate-level) sepia($sepia-level);
156
+ }
157
+
158
+ .element-artistic {
159
+ @include artistic-effect(2px, 200%, 50%);
160
+ }
161
+ // Utilizing Functions for Dynamic Filter Values
162
+ // SCSS functions can calculate and return dynamic filter values based on certain conditions or inputs, offering a high degree of flexibility.
163
+
164
+
165
+ @function calculate-brightness($light-mode) {
166
+ @if $light-mode {
167
+ @return 120%;
168
+ } @else {
169
+ @return 80%;
170
+ }
171
+ }
172
+
173
+ .element-dynamic-brightness {
174
+ $is-light-mode: true; // Example condition
175
+ filter: brightness(calculate-brightness($is-light-mode));
176
+ }
@@ -0,0 +1,23 @@
1
+ // Copyright 2024 Scape Agency BV
2
+
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+
16
+ // ============================================================================
17
+ // StyleScape | Effects
18
+ // ============================================================================
19
+
20
+
21
+ @forward "opacity";
22
+ @forward "filter";
23
+ @forward "shadow";
@@ -0,0 +1,62 @@
1
+ // Copyright 2024 Scape Agency BV
2
+
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+
16
+ // ============================================================================
17
+ // StyleScape | Effects | Opacity
18
+ // ============================================================================
19
+
20
+ @use "../variables" as *;
21
+ @use "../mixins" as *;
22
+ // Base Opacity Mixin
23
+ // ----------------------------------------------------------------------------
24
+
25
+ @mixin set_opacity($opacity-level) {
26
+ opacity: $opacity-level !important;
27
+ visibility: if($opacity-level > 0, visible, hidden);
28
+ }
29
+
30
+
31
+ // Predefined Opacity Levels
32
+ // ----------------------------------------------------------------------------
33
+
34
+ .opacity_00 { @include set_opacity(0.0); }
35
+ .opacity_01 { @include set_opacity(0.1); }
36
+ .opacity_02 { @include set_opacity(0.2); }
37
+ .opacity_03 { @include set_opacity(0.3); }
38
+ .opacity_04 { @include set_opacity(0.4); }
39
+ .opacity_05 { @include set_opacity(0.5); }
40
+ .opacity_06 { @include set_opacity(0.6); }
41
+ .opacity_07 { @include set_opacity(0.7); }
42
+ .opacity_08 { @include set_opacity(0.8); }
43
+ .opacity_09 { @include set_opacity(0.9); }
44
+ .opacity_10 { @include set_opacity(1.0); }
45
+
46
+
47
+ // ----------------------------------------------------------------------------
48
+
49
+ $hover_opacity: 0.75;
50
+
51
+ // Opacity Transition Mixin
52
+ @mixin opacity_transition($duration: 0.3s, $hover_opacity: 0.75) {
53
+ transition: opacity $duration ease;
54
+ &:hover {
55
+ opacity: $hover_opacity;
56
+ }
57
+ }
58
+
59
+ // Example Usage of Opacity Transition
60
+ .opacity_hover {
61
+ @include opacity_transition(0.3s, 0.75);
62
+ }
@@ -0,0 +1,175 @@
1
+ // Copyright 2024 Scape Agency BV
2
+
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+
16
+ // ============================================================================
17
+ // StyleScape | Effects | Shadow
18
+ // ============================================================================
19
+ @use "../variables" as *;
20
+ @use "../mixins" as *;
21
+
22
+ // Base Shadow Mixin
23
+ // ----------------------------------------------------------------------------
24
+
25
+ @mixin box_shadow(
26
+ $offset_horizontal: 0,
27
+ $offset_vertical: 0,
28
+ $blur: 3px,
29
+ $spread: 0,
30
+ $color: rgba(0,0,0, .2)
31
+ ) {
32
+ box_shadow: $offset_horizontal $offset_vertical $blur $spread $color;
33
+ }
34
+
35
+
36
+ // Predefined Shadow Styles
37
+ // ----------------------------------------------------------------------------
38
+
39
+ .btn_shadow { @include box_shadow(0, 0, 6px, 0, rgba(0,0,0, .3)); }
40
+ .box_shadow_light { @include box_shadow(0, 0, 3px, 0, rgba(0,0,0, .1)); }
41
+ .box_shadow { @include box_shadow(0, 0, 3px, 0, rgba(0,0,0, .2)); }
42
+ .box_shadow_dark { @include box_shadow(0, 0, 4px, 0, rgba(0,0,0, .4)); }
43
+ .box_shadow_large { @include box_shadow(0, 0, 12px, 0, rgba(0,0,0, .1)); }
44
+
45
+
46
+ // Extended Shadow Styles
47
+ // ----------------------------------------------------------------------------
48
+
49
+ .box_shadow_intense { @include box_shadow(0, 2px, 4px, 0, rgba(0,0,0, .5)); }
50
+ .box_shadow_soft { @include box_shadow(0, 2px, 10px, 0, rgba(0,0,0, .05)); }
51
+ .box_shadow_colored { @include box_shadow(0, 0, 5px, 0, rgba(255,0,0, .2)); } /* Example with color */
52
+ .box_shadow_inset { @include box_shadow(inset 0 0 6px rgba(0,0,0, .3)); } /* Inset shadow */
53
+
54
+
55
+ // Directional Box Shadows
56
+ // ----------------------------------------------------------------------------
57
+
58
+ .drop_shadow_top { @include box_shadow(0, -4px, 2px, -2px, rgba(0,0,0,0.4)); }
59
+ .drop_shadow_right { @include box_shadow(4px, 0, 2px, -2px, rgba(0,0,0,0.4)); }
60
+ .drop_shadow_bottom { @include box_shadow(0, 4px, 2px, -2px, rgba(0,0,0,0.4)); }
61
+ .drop_shadow_left { @include box_shadow(-4px, 0, 2px, -2px, rgba(0,0,0,0.4)); }
62
+
63
+
64
+ // Emphasized Box Shadows
65
+ // ----------------------------------------------------------------------------
66
+
67
+ .emphasize_dark { @include box_shadow(0, 0, 5px, 2px, rgba(0,0,0,.35)); }
68
+ .emphasize_light { @include box_shadow(0, 0, 0, 10px, rgba(255,255,255,.25)); }
69
+ .emphasize_inset { @include box_shadow(inset 0, 0, 7px, 4px, rgba(255,255,255,.5)); }
70
+ .emphasize_border { @include box_shadow(inset 0, 0, 0, 7px, rgba(255,255,255,.5)); }
71
+
72
+
73
+ // Embossed Box Shadows
74
+ // ----------------------------------------------------------------------------
75
+
76
+ .embossed_light {
77
+ border: 1px solid rgba(0,0,0,0.1);
78
+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
79
+ }
80
+
81
+ .embossed_heavy {
82
+ border: 1px solid rgba(0,0,0,0.1);
83
+ box-shadow:
84
+ inset 0 2px 3px rgba(255,255,255,0.3),
85
+ inset 0 -2px 3px rgba(0,0,0,0.3),
86
+ 0 1px 1px rgba(255,255,255,0.9);
87
+ }
88
+
89
+
90
+ // Shadow Border Mixin:
91
+ // Add a shadow to mimic a border effect.
92
+ @mixin shadow-border($shadow: 0 0 5px rgba(0,0,0,0.3)) {
93
+ box-shadow: $shadow;
94
+ }
95
+
96
+ .border-shadow-effect {
97
+ @include shadow-border();
98
+ }
99
+
100
+
101
+
102
+ // Hover Shadow Animation:
103
+ // Adds a shadow effect on hover to make elements appear elevated.
104
+
105
+
106
+ // @mixin hover-shadow-animation($hover-shadow: 0 4px 8px rgba(0,0,0,0.2)) {
107
+ // transition: box-shadow 0.3s ease;
108
+ // &:hover {
109
+ // box-shadow: $hover-shadow;
110
+ // }
111
+ // }
112
+
113
+ // .btn-hover-shadow {
114
+ // @include hover-shadow-animation();
115
+ // }
116
+ // Shadow Transition Mixin:
117
+ // Smoothly transitions shadow effects on hover or focus.
118
+
119
+
120
+ // @mixin shadow-transition($default-shadow, $hover-shadow) {
121
+ // box-shadow: $default-shadow;
122
+ // transition: box-shadow 0.3s ease;
123
+ // &:hover, &:focus {
124
+ // box-shadow: $hover-shadow;
125
+ // }
126
+ // }
127
+
128
+ // .card-transition {
129
+ // @include shadow-transition(0 2px 4px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.2));
130
+ // }
131
+ // Multi-layered Shadow:
132
+ // Creates a more complex shadow by layering multiple shadows.
133
+
134
+
135
+ // @mixin multi-layered-shadow($shadows...) {
136
+ // box-shadow: $shadows;
137
+ // }
138
+
139
+ // .multi-shadow {
140
+ // @include multi-layered-shadow(0 1px 2px rgba(0,0,0,0.15), 0 2px 4px rgba(0,0,0,0.2));
141
+ // }
142
+ // Inset Shadow:
143
+ // Creates an inner shadow for a "cut-in" effect.
144
+
145
+
146
+ // @mixin inset-shadow($horizontal: 0, $vertical: 0, $blur: 3px, $spread: 0, $color: rgba(0,0,0,0.5)) {
147
+ // box-shadow: inset $horizontal $vertical $blur $spread $color;
148
+ // }
149
+
150
+ // .inset-shadow-box {
151
+ // @include inset-shadow(0, 0, 5px, 0, rgba(0,0,0,0.25));
152
+ // }
153
+ // Soft Edge Shadow:
154
+ // Generates a soft, diffuse shadow around an element.
155
+
156
+
157
+ // @mixin soft-edge-shadow($blur: 10px, $color: rgba(0,0,0,0.2)) {
158
+ // box-shadow: 0 0 $blur $color;
159
+ // }
160
+
161
+ // .soft-edge {
162
+ // @include soft-edge-shadow();
163
+ // }
164
+
165
+
166
+ // Neomorphic Shadow:
167
+ // Creates a shadow effect suitable for Neomorphism design.
168
+
169
+ // @mixin neomorphic-shadow($light-color: rgba(255, 255, 255, 0.7), $dark-color: rgba(0, 0, 0, 0.3)) {
170
+ // box-shadow: 5px 5px 10px $dark-color, -5px -5px 10px $light-color;
171
+ // }
172
+
173
+ // .neo-box {
174
+ // @include neomorphic-shadow();
175
+ // }