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,33 @@
1
+ .loader {
2
+ width: 48px;
3
+ height: 48px;
4
+ border-radius: 50%;
5
+ position: relative;
6
+ animation: rotate 1s linear infinite
7
+ }
8
+
9
+ .loader::before , .loader::after {
10
+ content: "";
11
+ box-sizing: border-box;
12
+ position: absolute;
13
+ inset: 0px;
14
+ border-radius: 50%;
15
+ border: 5px solid #FFF;
16
+ animation: prixClipFix 2s linear infinite ;
17
+ }
18
+
19
+ .loader::after{
20
+ transform: rotate3d(90, 90, 0, 180deg );
21
+ border-color: #FF3D00;
22
+ }
23
+
24
+ @keyframes rotate {
25
+ 0% {transform: rotate(0deg)}
26
+ 100% {transform: rotate(360deg)}
27
+ }
28
+
29
+ @keyframes prixClipFix {
30
+ 0% {clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}
31
+ 50% {clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}
32
+ 75%, 100% {clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}
33
+ }
@@ -0,0 +1,33 @@
1
+ .loader {
2
+ width: 48px;
3
+ height: 48px;
4
+ border-radius: 50%;
5
+ position: relative;
6
+ animation: rotate 1s linear infinite
7
+ }
8
+
9
+ .loader::before , .loader::after {
10
+ content: "";
11
+ box-sizing: border-box;
12
+ position: absolute;
13
+ inset: 0px;
14
+ border-radius: 50%;
15
+ border: 5px solid #FFF;
16
+ animation: prixClipFix 2s linear infinite ;
17
+ }
18
+ .loader::after{
19
+ inset: 8px;
20
+ transform: rotate3d(90, 90, 0, 180deg );
21
+ border-color: #FF3D00;
22
+ }
23
+
24
+ @keyframes rotate {
25
+ 0% {transform: rotate(0deg)}
26
+ 100% {transform: rotate(360deg)}
27
+ }
28
+
29
+ @keyframes prixClipFix {
30
+ 0% {clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}
31
+ 50% {clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}
32
+ 75%, 100% {clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}
33
+ }
@@ -0,0 +1,34 @@
1
+ .loader {
2
+ width: 48px;
3
+ height: 48px;
4
+ border-radius: 50%;
5
+ position: relative;
6
+ animation: rotate 1s linear infinite
7
+ }
8
+ .loader::before , .loader::after {
9
+ content: "";
10
+ box-sizing: border-box;
11
+ position: absolute;
12
+ inset: 0px;
13
+ border-radius: 50%;
14
+ border: 5px solid #FFF;
15
+ animation: prixClipFix 2s linear infinite ;
16
+ }
17
+ .loader::after{
18
+ border-color: #FF3D00;
19
+ animation: prixClipFix 2s linear infinite , rotate 0.5s linear infinite reverse;
20
+ inset: 6px;
21
+ }
22
+
23
+ @keyframes rotate {
24
+ 0% {transform: rotate(0deg)}
25
+ 100% {transform: rotate(360deg)}
26
+ }
27
+
28
+ @keyframes prixClipFix {
29
+ 0% {clip-path:polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)}
30
+ 25% {clip-path:polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)}
31
+ 50% {clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)}
32
+ 75% {clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)}
33
+ 100% {clip-path:polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)}
34
+ }
@@ -0,0 +1,182 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Cursors Mixin Module
8
+ /// ===========================================================================
9
+ ///
10
+ /// This module provides a comprehensive set of mixins for managing cursor
11
+ /// styles in CSS. It includes utility mixins for common cursor types,
12
+ /// custom cursors with fallback options, animated cursors, and advanced
13
+ /// use cases involving state-based and responsive cursor handling.
14
+ ///
15
+ ///
16
+ /// @group Mouse
17
+ /// @author Scape Agency
18
+ /// @link https://move.gl
19
+ /// @since 0.1.0 initial release
20
+ /// @todo None
21
+ /// @see https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
22
+ /// @access public
23
+ ///
24
+ ////
25
+
26
+
27
+ // ============================================================================
28
+ // Use
29
+ // ============================================================================
30
+
31
+ @use "../variables" as *;
32
+ @use "../maps" as *;
33
+ @use "../mixins" as *;
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ ///
42
+ /// Mixin for applying a cursor style using predefined cursor types from the map.
43
+ ///
44
+ /// @mixin cursor_style
45
+ /// @param {String} $type ['default'] - The cursor style to apply.
46
+ /// @example scss - Usage
47
+ /// .element { @include cursor_style('pointer'); } // Applies pointer cursor
48
+ ///
49
+ @mixin cursor_style($type: "default") {
50
+ @if map-has-key($cursor_styles, $type) {
51
+ cursor: map-get($cursor_styles, $type);
52
+ } @else {
53
+ cursor: $type; // Fallback if type is not in map
54
+ }
55
+ }
56
+
57
+ ///
58
+ /// Mixin for custom cursor images with fallback options.
59
+ ///
60
+ /// @mixin cursor_custom
61
+ /// @param {String} $url - URL of the custom cursor image.
62
+ /// @param {String} $fallback ['pointer'] - Fallback cursor style.
63
+ /// @example scss - Usage
64
+ /// .element { @include cursor_custom('path/to/cursor.png', 'pointer'); }
65
+ ///
66
+ @mixin cursor_custom($url, $fallback: pointer) {
67
+ cursor: url($url), $fallback;
68
+ // cursor: url(#{$url}), #{$fallback};
69
+ }
70
+
71
+
72
+
73
+
74
+
75
+
76
+ // ============================================================================
77
+ // Utility Mixins for Common Cursor Styles
78
+ // ============================================================================
79
+
80
+ @mixin cursor_pointer { @include cursor_style('pointer'); }
81
+ @mixin cursor_text { @include cursor_style('text'); }
82
+ @mixin cursor_disabled { @include cursor_style('not-allowed'); }
83
+ @mixin cursor_move { @include cursor_style('move'); }
84
+ @mixin cursor_grab { @include cursor_style('grab'); }
85
+ @mixin cursor_grabbing { @include cursor_style('grabbing'); }
86
+ @mixin cursor_help { @include cursor_style('help'); }
87
+ @mixin cursor_wait { @include cursor_style('wait'); }
88
+ @mixin cursor_crosshair { @include cursor_style('crosshair'); }
89
+ @mixin cursor_zoom_in { @include cursor_style('zoom-in'); }
90
+ @mixin cursor_zoom_out { @include cursor_style('zoom-out'); }
91
+
92
+ // ============================================================================
93
+ // Advanced Mixins
94
+ // ============================================================================
95
+
96
+ ///
97
+ /// Mixin for hover and focus cursor effects.
98
+ ///
99
+ /// @mixin hover_focus_cursor
100
+ /// @param {String} $hover ['pointer'] - Cursor style on hover.
101
+ /// @param {String} $focus ['pointer'] - Cursor style on focus.
102
+ ///
103
+ @mixin hover_focus_cursor($hover: pointer, $focus: pointer) {
104
+ &:hover { cursor: $hover; }
105
+ &:focus {
106
+ cursor: $focus;
107
+ outline: none; // Customize focus styles as needed
108
+ }
109
+ }
110
+
111
+ ///
112
+ /// Mixin for responsive cursor handling based on device capability.
113
+ ///
114
+ /// @mixin cursor_responsive
115
+ /// @param {String} $desktop ['pointer'] - Cursor for desktop devices.
116
+ /// @param {String} $touch ['default'] - Cursor for touch devices.
117
+ ///
118
+ @mixin cursor_responsive($desktop: pointer, $touch: default) {
119
+ @media (pointer: fine) { cursor: $desktop; }
120
+ @media (pointer: coarse) { cursor: $touch; }
121
+ }
122
+
123
+ ///
124
+ /// Mixin for animated cursors using a series of images.
125
+ ///
126
+ /// @mixin cursor_animated
127
+ /// @param {List} $images - A list of image URLs for animation frames.
128
+ /// @param {Time} $interval ['0.5s'] - Interval between frames.
129
+ ///
130
+ @mixin cursor_animated($images, $interval: 0.5s) {
131
+ $animation-frames: ();
132
+ $index: 0;
133
+
134
+ @each $image in $images {
135
+ $index: $index + 1;
136
+ $percentage: percentage($index / length($images));
137
+ $animation-frames: append($animation-frames, ($percentage $image), comma);
138
+ }
139
+
140
+ @keyframes cursor-animation {
141
+ @each $frame in $animation-frames {
142
+ #{nth($frame, 1)} {
143
+ cursor: url(#{nth($frame, 2)}), auto;
144
+ }
145
+ }
146
+ }
147
+
148
+ animation: cursor-animation $interval infinite;
149
+ }
150
+
151
+ // ============================================================================
152
+ // Utility Class Generator for Common Cursors
153
+ // ============================================================================
154
+
155
+ // $cursors: ('pointer', 'text', 'wait', 'crosshair', 'not-allowed', 'zoom-in', 'grab', 'grabbing');
156
+
157
+ @each $cursor in $cursors {
158
+ .cursor-#{$cursor} {
159
+ @include cursor_style($cursor);
160
+ }
161
+ }
162
+
163
+ // ============================================================================
164
+ // Examples of Using Advanced Mixins
165
+ // ============================================================================
166
+
167
+ // /// Example: Advanced hover and focus with cursor change and background effect
168
+ // .interactive-element {
169
+ // @include hover_focus_cursor(pointer, pointer);
170
+ // &:hover { background-color: lighten($primaryColor, 5%); }
171
+ // &:focus { background-color: lighten($primaryColor, 10%); }
172
+ // }
173
+
174
+ // /// Example: Responsive cursor handling for different devices
175
+ // .button {
176
+ // @include cursor_responsive(pointer, default);
177
+ // }
178
+
179
+ // /// Example: Using animated cursor with a series of images
180
+ // .cursor-animated-element {
181
+ // @include cursor_animated(('image1.png', 'image2.png', 'image3.png'));
182
+ // }
File without changes
@@ -0,0 +1,258 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Pointers Mixin Module
8
+ /// ===========================================================================
9
+ ///
10
+ /// This module provides mixins for managing pointer events in CSS, allowing
11
+ /// for easy application of the `pointer-events` property with support for both
12
+ /// global and keyword values. These mixins are useful for managing user
13
+ /// interactions on various elements, including SVGs and standard HTML
14
+ /// elements. The module includes simplified mixins for frequently used
15
+ /// pointer-event states and utility mixins to handle hover styles based on
16
+ /// pointer-event settings.
17
+ ///
18
+ ///
19
+ /// @group Mouse
20
+ /// @author Scape Agency
21
+ /// @link https://move.gl
22
+ /// @since 0.1.0 initial release
23
+ /// @todo None
24
+ /// @access public
25
+ ///
26
+ ////
27
+
28
+
29
+
30
+
31
+ // ============================================================================
32
+ // Use
33
+ // ============================================================================
34
+
35
+ @use "../dev" as *;
36
+ @use "../variables" as *;
37
+ @use "../mixins" as *;
38
+
39
+
40
+ // ============================================================================
41
+ // Mixins
42
+ // ============================================================================
43
+
44
+ ///
45
+ /// Mixin for setting pointer-events property with support for both global and
46
+ /// keyword values. This mixin can be used to enable or disable pointer events
47
+ /// on an element.
48
+ ///
49
+ /// @name pointer_events
50
+ /// @param {String} $state ['auto'] - The desired pointer-events state (e.g., 'auto', 'none', 'inherit').
51
+ /// @example scss - Usage
52
+ /// .interactive-element { @include pointer_events(auto); } // Enable pointer events
53
+ /// .non-interactive-element { @include pointer_events(none); } // Disable pointer events
54
+ ///
55
+ @mixin pointer_events($state: auto) {
56
+ pointer-events: $state;
57
+ }
58
+
59
+
60
+
61
+ // ============================================================================
62
+ // Global Pointer Event Values
63
+ // ============================================================================
64
+
65
+ ///
66
+ /// Mixin for setting pointer-events to inherit from parent element.
67
+ ///
68
+ /// @name pointer_inherit
69
+ /// @example scss - Usage
70
+ /// .element { @include pointer_inherit; } // Inherits pointer-events from parent
71
+ ///
72
+ @mixin pointer_inherit {
73
+ @include pointer_events(inherit);
74
+ }
75
+
76
+ ///
77
+ /// Mixin for setting pointer-events to initial value.
78
+ ///
79
+ /// @name pointer_initial
80
+ /// @example scss - Usage
81
+ /// .element { @include pointer_initial; } // Sets pointer-events to initial
82
+ ///
83
+ @mixin pointer_initial {
84
+ @include pointer_events(initial);
85
+ }
86
+
87
+ ///
88
+ /// Mixin for setting pointer-events to revert.
89
+ ///
90
+ /// @name pointer_revert
91
+ /// @example scss - Usage
92
+ /// .element { @include pointer_revert; } // Reverts pointer-events to previous value
93
+ ///
94
+ @mixin pointer_revert {
95
+ @include pointer_events(revert);
96
+ }
97
+
98
+ ///
99
+ /// Mixin for setting pointer-events to revert-layer.
100
+ ///
101
+ /// @name pointer_revert-layer
102
+ /// @example scss - Usage
103
+ /// .element { @include pointer_revert-layer; } // Sets pointer-events to revert-layer
104
+ ///
105
+ @mixin pointer_revert-layer {
106
+ @include pointer_events(revert-layer);
107
+ }
108
+
109
+ ///
110
+ /// Mixin for setting pointer-events to unset.
111
+ ///
112
+ /// @name pointer_unset
113
+ /// @example scss - Usage
114
+ /// .element { @include pointer_unset; } // Sets pointer-events to unset
115
+ ///
116
+ @mixin pointer_unset {
117
+ @include pointer_events(unset);
118
+ }
119
+
120
+ // ============================================================================
121
+ // Keyword Pointer Event Values
122
+ // ============================================================================
123
+
124
+ ///
125
+ /// Mixin for setting pointer-events to auto, enabling all interactions.
126
+ ///
127
+ /// @name pointer_auto
128
+ /// @example scss - Usage
129
+ /// .element { @include pointer_auto; } // Enables pointer events
130
+ ///
131
+ @mixin pointer_auto {
132
+ @include pointer_events(auto);
133
+ }
134
+
135
+ ///
136
+ /// Mixin for setting pointer-events to none, disabling all interactions.
137
+ ///
138
+ /// @name pointer_none
139
+ /// @example scss - Usage
140
+ /// .element { @include pointer_none; } // Disables pointer events
141
+ ///
142
+ @mixin pointer_none {
143
+ @include pointer_events(none);
144
+ }
145
+
146
+ ///
147
+ /// Mixin for setting pointer-events to all (SVG Only).
148
+ ///
149
+ /// @name pointer_all
150
+ /// @example scss - Usage
151
+ /// .svg-element { @include pointer_all; } // Enables all pointer events on SVG
152
+ ///
153
+ @mixin pointer_all {
154
+ @include pointer_events(all);
155
+ }
156
+
157
+ // Additional SVG-specific pointer-events mixins
158
+
159
+ @mixin pointer_fill {
160
+ @include pointer_events(fill);
161
+ }
162
+
163
+ @mixin pointer_painted {
164
+ @include pointer_events(painted);
165
+ }
166
+
167
+ @mixin pointer_stroke {
168
+ @include pointer_events(stroke);
169
+ }
170
+
171
+ @mixin pointer_visible {
172
+ @include pointer_events(visible);
173
+ }
174
+
175
+ @mixin pointer_visible-fill {
176
+ @include pointer_events(visibleFill);
177
+ }
178
+
179
+ @mixin pointer_visible-painted {
180
+ @include pointer_events(visiblePainted);
181
+ }
182
+
183
+ @mixin pointer_visible-stroke {
184
+ @include pointer_events(visibleStroke);
185
+ }
186
+
187
+ // ============================================================================
188
+ // Utility Mixins
189
+ // ============================================================================
190
+
191
+ ///
192
+ /// Mixin for applying hover styles only when pointer events are enabled.
193
+ /// This ensures hover styles do not apply if the element is non-interactive.
194
+ ///
195
+ /// @name pointer_hover_check
196
+ /// @example scss - Usage
197
+ /// .interactive-element {
198
+ /// @include pointer_hover_check {
199
+ /// color: red;
200
+ /// }
201
+ /// }
202
+ ///
203
+ @mixin pointer_hover_check {
204
+ @if pointer-events != 'none' {
205
+ &:hover {
206
+ @content;
207
+ }
208
+ }
209
+ }
210
+
211
+ ///
212
+ /// Simplified mixin for commonly used global pointer-events values.
213
+ /// Accepts 'inherit', 'initial', 'revert', 'revert-layer', and 'unset'.
214
+ ///
215
+ /// @name pointer_global
216
+ /// @param {String} $value - The global value for pointer-events.
217
+ /// @example scss - Usage
218
+ /// .element { @include pointer_global(inherit); }
219
+ ///
220
+ @mixin pointer_global($value) {
221
+ @include pointer_events($value);
222
+ }
223
+
224
+ ///
225
+ /// Simplified mixin for commonly used keyword pointer-events values.
226
+ /// Accepts 'auto', 'none', 'all' and SVG-specific values.
227
+ ///
228
+ /// @name pointer_keyword
229
+ /// @param {String} $value - The keyword value for pointer-events.
230
+ /// @example scss - Usage
231
+ /// .element { @include pointer_keyword(auto); }
232
+ ///
233
+ @mixin pointer_keyword($value) {
234
+ @include pointer_events($value);
235
+ }
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+ // ============================================================================
244
+ // Predefined Classes for Common Use Cases
245
+ // ============================================================================
246
+
247
+ .interactive-element {
248
+ @include pointer_auto; // Enables pointer events
249
+ }
250
+
251
+ .non-interactive-element {
252
+ @include pointer_none; // Disables pointer events
253
+ }
254
+
255
+ .custom-element {
256
+ @include pointer_visible-painted; // Applies visiblePainted for SVG elements
257
+ }
258
+
File without changes
@@ -0,0 +1,104 @@
1
+ // ============================================================================
2
+ // Poster
3
+ // ============================================================================
4
+
5
+ ////
6
+ ///
7
+ /// Scroll Mixins
8
+ /// ===========================================================================
9
+ ///
10
+ /// This module provides mixins to enable smooth scrolling and scroll snapping
11
+ /// features for containers, enhancing user interaction and navigation within
12
+ /// scrollable elements.
13
+ ///
14
+ ///
15
+ ///
16
+ /// @group Mouse
17
+ /// @author Scape Agency
18
+ /// @link https://move.gl
19
+ /// @since 0.1.0 initial release
20
+ /// @todo None
21
+ /// @see https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
22
+ /// @access public
23
+ ///
24
+ ////
25
+
26
+
27
+ // ============================================================================
28
+ // Use
29
+ // ============================================================================
30
+
31
+ @use "../variables" as *;
32
+ @use "../mixins" as *;
33
+
34
+
35
+
36
+ // ============================================================================
37
+ // Mixins
38
+ // ============================================================================
39
+
40
+
41
+ ///
42
+ /// Mixin to enable smooth scrolling for a container.
43
+ /// Provides a smooth scroll behavior for elements that overflow.
44
+ ///
45
+ /// @mixin scroll_smooth
46
+ /// @param {Boolean} $enable [true] - Enables smooth scrolling if true, disables otherwise.
47
+ /// @param {Boolean} $touch_scrolling [true] - Enables WebKit touch scrolling if true.
48
+ ///
49
+ /// @example scss - Usage
50
+ /// .scrollable-container {
51
+ /// @include scroll_smooth(true, true);
52
+ /// }
53
+ ///
54
+ @mixin scroll_smooth(
55
+ $enable: true,
56
+ $touch_scrolling: true
57
+ ) {
58
+ @if $enable {
59
+ scroll-behavior: smooth;
60
+ } @else {
61
+ scroll-behavior: auto;
62
+ }
63
+
64
+ @if $touch_scrolling {
65
+ -webkit-overflow-scrolling: touch;
66
+ } @else {
67
+ -webkit-overflow-scrolling: auto;
68
+ }
69
+ }
70
+
71
+ ///
72
+ /// Mixin to set up scroll snapping for a container.
73
+ /// Configures scroll snapping for elements, useful for creating carousels or
74
+ /// step-by-step guides with smooth navigation between sections.
75
+ ///
76
+ /// @mixin scroll_snap
77
+ /// @param {String} $type [y mandatory] - The scroll snapping type ('x' or 'y', and 'mandatory' or 'proximity').
78
+ /// @param {String} $align [start] - Alignment of the snapped items (start, center, end, or none).
79
+ /// @param {String} $stop [normal] - Specifies the scroll-snap-stop behavior (normal, always).
80
+ ///
81
+ /// @example scss - Usage
82
+ /// .snap-container {
83
+ /// @include scroll_snap('x mandatory', 'center', 'always');
84
+ /// }
85
+ ///
86
+ @mixin scroll_snap(
87
+ $type: y mandatory,
88
+ $align: start,
89
+ $stop: normal
90
+ ) {
91
+ scroll-snap-type: $type;
92
+ scroll-snap-align: $align;
93
+ scroll-snap-stop: $stop;
94
+ }
95
+
96
+
97
+ /// Example usage
98
+ .scrollable-container {
99
+ @include scroll_smooth(); // Enables smooth scrolling with default settings
100
+ }
101
+
102
+ .snap-container {
103
+ @include scroll_snap(x mandatory, center); // Sets up horizontal snapping to center
104
+ }