@magmonium/one 0.0.3 → 0.0.5
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/package.json +9 -2
- package/sass/_date-picker.sass +147 -0
- package/sass/_index.sass +34 -0
- package/sass/_input-date.sass +25 -0
- package/sass/_m-components.sass +110 -0
- package/sass/_menu.sass +132 -0
- package/sass/_reset.sass +186 -0
- package/sass/animations/_index.sass +13 -0
- package/sass/animations/_registry.sass +51 -0
- package/sass/animations/background/_energy.sass +91 -0
- package/sass/animations/background/_gradient.sass +104 -0
- package/sass/animations/background/_index.sass +9 -0
- package/sass/animations/background/_nature.sass +110 -0
- package/sass/animations/background/_new-effects.sass +292 -0
- package/sass/animations/background/_particle.sass +122 -0
- package/sass/animations/background/_tech.sass +124 -0
- package/sass/functions/_functions.sass +107 -0
- package/sass/mixins/_backdrops.sass +230 -0
- package/sass/mixins/_backgrounds.sass +214 -0
- package/sass/mixins/_borders.sass +93 -0
- package/sass/mixins/_breakpoints.sass +68 -0
- package/sass/mixins/_button.sass +46 -0
- package/sass/mixins/_checkbox.sass +128 -0
- package/sass/mixins/_colors.sass +121 -0
- package/sass/mixins/_control.sass +13 -0
- package/sass/mixins/_device.sass +22 -0
- package/sass/mixins/_display.sass +210 -0
- package/sass/mixins/_flex.sass +104 -0
- package/sass/mixins/_form.sass +68 -0
- package/sass/mixins/_grid.sass +273 -0
- package/sass/mixins/_header.sass +71 -0
- package/sass/mixins/_index.sass +29 -0
- package/sass/mixins/_input.sass +132 -0
- package/sass/mixins/_interactive.sass +19 -0
- package/sass/mixins/_label.sass +25 -0
- package/sass/mixins/_layout.sass +251 -0
- package/sass/mixins/_links.sass +85 -0
- package/sass/mixins/_lists.sass +377 -0
- package/sass/mixins/_overflow.sass +121 -0
- package/sass/mixins/_position.sass +181 -0
- package/sass/mixins/_radio.sass +205 -0
- package/sass/mixins/_sizing.sass +181 -0
- package/sass/mixins/_spacing.sass +59 -0
- package/sass/mixins/_text.sass +159 -0
- package/sass/mixins/_toggle.sass +240 -0
- package/sass/mixins/_typography.sass +6 -0
- package/sass/mixins/_utilities.sass +70 -0
- package/sass/utilities/_backdrops.sass +228 -0
- package/sass/utilities/_backgrounds.sass +285 -0
- package/sass/utilities/_borders.sass +138 -0
- package/sass/utilities/_colors.sass +166 -0
- package/sass/utilities/_display.sass +308 -0
- package/sass/utilities/_flex.sass +91 -0
- package/sass/utilities/_grid.sass +502 -0
- package/sass/utilities/_index.sass +17 -0
- package/sass/utilities/_input.sass +14 -0
- package/sass/utilities/_links.sass +136 -0
- package/sass/utilities/_lists.sass +4 -0
- package/sass/utilities/_popup.sass +73 -0
- package/sass/utilities/_position.sass +88 -0
- package/sass/utilities/_sizing.sass +277 -0
- package/sass/utilities/_spacing.sass +121 -0
- package/sass/utilities/_text.sass +207 -0
- package/sass/variables/_animations.sass +5 -0
- package/sass/variables/_borders.sass +25 -0
- package/sass/variables/_colors.sass +93 -0
- package/sass/variables/_index.sass +6 -0
- package/sass/variables/_number.sass +1 -0
- package/sass/variables/_spacing.sass +28 -0
- package/sass/variables/_typography.sass +40 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
@use "sass:math"
|
|
2
|
+
|
|
3
|
+
// Background utilities and mixins
|
|
4
|
+
|
|
5
|
+
// Basic background mixins
|
|
6
|
+
@mixin background($value)
|
|
7
|
+
background: $value
|
|
8
|
+
|
|
9
|
+
@mixin background-color($value)
|
|
10
|
+
background-color: $value
|
|
11
|
+
|
|
12
|
+
@mixin bg($value)
|
|
13
|
+
background-color: $value
|
|
14
|
+
|
|
15
|
+
// Common background colors
|
|
16
|
+
@mixin bg-primary
|
|
17
|
+
background-color: var(--bg-primary, #ffffff)
|
|
18
|
+
|
|
19
|
+
@mixin bg-secondary
|
|
20
|
+
background-color: var(--bg-secondary, #f8f9fa)
|
|
21
|
+
|
|
22
|
+
@mixin bg-surface
|
|
23
|
+
background-color: var(--bg-surface, #ffffff)
|
|
24
|
+
|
|
25
|
+
@mixin bg-overlay
|
|
26
|
+
background-color: var(--bg-overlay, rgba(0, 0, 0, 0.5))
|
|
27
|
+
|
|
28
|
+
@mixin bg-success
|
|
29
|
+
background-color: var(--color-success, #28a745)
|
|
30
|
+
|
|
31
|
+
@mixin bg-warning
|
|
32
|
+
background-color: var(--color-warning, #ffc107)
|
|
33
|
+
|
|
34
|
+
@mixin bg-error
|
|
35
|
+
background-color: var(--color-error, #dc3545)
|
|
36
|
+
|
|
37
|
+
@mixin bg-info
|
|
38
|
+
background-color: var(--color-info, #17a2b8)
|
|
39
|
+
|
|
40
|
+
@mixin bg-danger
|
|
41
|
+
background-color: var(--color-danger, #dc3545)
|
|
42
|
+
|
|
43
|
+
// Brand background colors
|
|
44
|
+
@mixin bg-brand-primary
|
|
45
|
+
background-color: var(--brand-primary, #007bff)
|
|
46
|
+
|
|
47
|
+
@mixin bg-brand-secondary
|
|
48
|
+
background-color: var(--brand-secondary, #6c757d)
|
|
49
|
+
|
|
50
|
+
// Gray scale backgrounds
|
|
51
|
+
@mixin bg-transparent
|
|
52
|
+
background-color: transparent
|
|
53
|
+
|
|
54
|
+
@mixin bg-black
|
|
55
|
+
background-color: #000000
|
|
56
|
+
|
|
57
|
+
@mixin bg-white
|
|
58
|
+
background-color: #ffffff
|
|
59
|
+
|
|
60
|
+
@mixin bg-gray-100
|
|
61
|
+
background-color: #f8f9fa
|
|
62
|
+
|
|
63
|
+
@mixin bg-gray-200
|
|
64
|
+
background-color: #e9ecef
|
|
65
|
+
|
|
66
|
+
@mixin bg-gray-300
|
|
67
|
+
background-color: #dee2e6
|
|
68
|
+
|
|
69
|
+
@mixin bg-gray-400
|
|
70
|
+
background-color: #ced4da
|
|
71
|
+
|
|
72
|
+
@mixin bg-gray-500
|
|
73
|
+
background-color: #adb5bd
|
|
74
|
+
|
|
75
|
+
@mixin bg-gray-600
|
|
76
|
+
background-color: #6c757d
|
|
77
|
+
|
|
78
|
+
@mixin bg-gray-700
|
|
79
|
+
background-color: #495057
|
|
80
|
+
|
|
81
|
+
@mixin bg-gray-800
|
|
82
|
+
background-color: #343a40
|
|
83
|
+
|
|
84
|
+
@mixin bg-gray-900
|
|
85
|
+
background-color: #212529
|
|
86
|
+
|
|
87
|
+
// Background images
|
|
88
|
+
@mixin bg-image($url)
|
|
89
|
+
background-image: url($url)
|
|
90
|
+
|
|
91
|
+
@mixin bg-gradient-horizontal($start-color, $end-color)
|
|
92
|
+
background: linear-gradient(to right, $start-color, $end-color)
|
|
93
|
+
|
|
94
|
+
@mixin bg-gradient-vertical($start-color, $end-color)
|
|
95
|
+
background: linear-gradient(to bottom, $start-color, $end-color)
|
|
96
|
+
|
|
97
|
+
@mixin bg-gradient-diagonal($start-color, $end-color)
|
|
98
|
+
background: linear-gradient(45deg, $start-color, $end-color)
|
|
99
|
+
|
|
100
|
+
@mixin bg-gradient-radial($center-color, $edge-color)
|
|
101
|
+
background: radial-gradient(circle, $center-color, $edge-color)
|
|
102
|
+
|
|
103
|
+
// Background properties
|
|
104
|
+
@mixin bg-cover
|
|
105
|
+
background-size: cover
|
|
106
|
+
background-repeat: no-repeat
|
|
107
|
+
background-position: center
|
|
108
|
+
|
|
109
|
+
@mixin bg-contain
|
|
110
|
+
background-size: contain
|
|
111
|
+
background-repeat: no-repeat
|
|
112
|
+
background-position: center
|
|
113
|
+
|
|
114
|
+
@mixin bg-repeat
|
|
115
|
+
background-repeat: repeat
|
|
116
|
+
|
|
117
|
+
@mixin bg-no-repeat
|
|
118
|
+
background-repeat: no-repeat
|
|
119
|
+
|
|
120
|
+
@mixin bg-repeat-x
|
|
121
|
+
background-repeat: repeat-x
|
|
122
|
+
|
|
123
|
+
@mixin bg-repeat-y
|
|
124
|
+
background-repeat: repeat-y
|
|
125
|
+
|
|
126
|
+
// Background position
|
|
127
|
+
@mixin bg-position($value)
|
|
128
|
+
background-position: $value
|
|
129
|
+
|
|
130
|
+
@mixin bg-position-center
|
|
131
|
+
background-position: center
|
|
132
|
+
|
|
133
|
+
@mixin bg-position-top
|
|
134
|
+
background-position: top
|
|
135
|
+
|
|
136
|
+
@mixin bg-position-bottom
|
|
137
|
+
background-position: bottom
|
|
138
|
+
|
|
139
|
+
@mixin bg-position-left
|
|
140
|
+
background-position: left
|
|
141
|
+
|
|
142
|
+
@mixin bg-position-right
|
|
143
|
+
background-position: right
|
|
144
|
+
|
|
145
|
+
// Background size
|
|
146
|
+
@mixin bg-size($value)
|
|
147
|
+
background-size: $value
|
|
148
|
+
|
|
149
|
+
@mixin bg-auto
|
|
150
|
+
background-size: auto
|
|
151
|
+
|
|
152
|
+
// Background attachment
|
|
153
|
+
@mixin bg-fixed
|
|
154
|
+
background-attachment: fixed
|
|
155
|
+
|
|
156
|
+
@mixin bg-local
|
|
157
|
+
background-attachment: local
|
|
158
|
+
|
|
159
|
+
@mixin bg-scroll
|
|
160
|
+
background-attachment: scroll
|
|
161
|
+
|
|
162
|
+
// Use ThemeStore CSS vars (--m-background, --m-frame, etc.) for theme-adaptive backgrounds
|
|
163
|
+
@mixin bg-theme-adaptive($bg)
|
|
164
|
+
background-color: $bg
|
|
165
|
+
|
|
166
|
+
// Background with opacity
|
|
167
|
+
@mixin bg-opacity($color, $opacity)
|
|
168
|
+
background-color: rgba($color, $opacity)
|
|
169
|
+
|
|
170
|
+
// Modern background with color-mix
|
|
171
|
+
@mixin bg-mix($color1, $color2, $percentage: 50%)
|
|
172
|
+
background-color: color-mix(in srgb, #{$color1} #{$percentage}%, #{$color2} #{100 - $percentage}%)
|
|
173
|
+
|
|
174
|
+
// Background transitions
|
|
175
|
+
@mixin bg-transition($duration: 0.3s)
|
|
176
|
+
transition: background-color $duration ease-in-out, background-image $duration ease-in-out
|
|
177
|
+
|
|
178
|
+
// Pattern backgrounds
|
|
179
|
+
@mixin bg-stripes($color1, $color2, $size: 10px)
|
|
180
|
+
background: repeating-linear-gradient(45deg, $color1, $color1 $size, $color2 $size, $color2 #{$size * 2})
|
|
181
|
+
|
|
182
|
+
@mixin bg-dots($color, $size: 2px, $spacing: 20px)
|
|
183
|
+
background-image: radial-gradient(circle at center, $color $size, transparent $size)
|
|
184
|
+
background-size: $spacing $spacing
|
|
185
|
+
|
|
186
|
+
@mixin bg-checkerboard($color1: #ffffff, $color2: #f0f0f0, $size: 20px)
|
|
187
|
+
background-image: linear-gradient(45deg, $color1 25%, transparent 25%), linear-gradient(-45deg, $color1 25%, transparent 25%), linear-gradient(45deg, transparent 75%, $color1 75%), linear-gradient(-45deg, transparent 75%, $color1 75%)
|
|
188
|
+
background-size: $size $size
|
|
189
|
+
background-position: 0 0, 0 #{math.div($size, 2)}, #{math.div($size, 2)} #{math.div(-$size, 2)}, #{math.div(-$size, 2)} 0px
|
|
190
|
+
background-color: $color2
|
|
191
|
+
|
|
192
|
+
// Glass morphism effect
|
|
193
|
+
@mixin bg-glass($blur: 10px, $opacity: 0.1)
|
|
194
|
+
background-color: rgba(255, 255, 255, $opacity)
|
|
195
|
+
backdrop-filter: blur($blur)
|
|
196
|
+
-webkit-backdrop-filter: blur($blur)
|
|
197
|
+
|
|
198
|
+
// Print backgrounds
|
|
199
|
+
@mixin bg-print-safe
|
|
200
|
+
@media print
|
|
201
|
+
background: none !important
|
|
202
|
+
background-color: transparent !important
|
|
203
|
+
|
|
204
|
+
// Background clip
|
|
205
|
+
@mixin bg-clip-text
|
|
206
|
+
background-clip: text
|
|
207
|
+
-webkit-background-clip: text
|
|
208
|
+
color: transparent
|
|
209
|
+
|
|
210
|
+
@mixin bg-clip-padding
|
|
211
|
+
background-clip: padding-box
|
|
212
|
+
|
|
213
|
+
@mixin bg-clip-border
|
|
214
|
+
background-clip: border-box
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@use "sass:map"
|
|
2
|
+
// Border Mixins - Simple mixins for internal use
|
|
3
|
+
@use '../variables/borders' as *
|
|
4
|
+
|
|
5
|
+
// Base border mixin - applies border width with solid style and border-color
|
|
6
|
+
@mixin border($size)
|
|
7
|
+
@if map.has-key($border-widths, $size)
|
|
8
|
+
border: map.get($border-widths, $size) solid $default-border-color
|
|
9
|
+
@else
|
|
10
|
+
border: $size solid $default-border-color
|
|
11
|
+
|
|
12
|
+
// Directional border mixins
|
|
13
|
+
@mixin border-x($size)
|
|
14
|
+
@include border-left($size)
|
|
15
|
+
@include border-right($size)
|
|
16
|
+
|
|
17
|
+
@mixin border-y($size)
|
|
18
|
+
@include border-top($size)
|
|
19
|
+
@include border-bottom($size)
|
|
20
|
+
|
|
21
|
+
@mixin border-top($size)
|
|
22
|
+
@if map.has-key($border-widths, $size)
|
|
23
|
+
border-top: map.get($border-widths, $size) solid $default-border-color
|
|
24
|
+
@else
|
|
25
|
+
border-top: $size solid $default-border-color
|
|
26
|
+
|
|
27
|
+
@mixin border-right($size)
|
|
28
|
+
@if map.has-key($border-widths, $size)
|
|
29
|
+
border-right: map.get($border-widths, $size) solid $default-border-color
|
|
30
|
+
@else
|
|
31
|
+
border-right: $size solid $default-border-color
|
|
32
|
+
|
|
33
|
+
@mixin border-bottom($size)
|
|
34
|
+
@if map.has-key($border-widths, $size)
|
|
35
|
+
border-bottom: map.get($border-widths, $size) solid $default-border-color
|
|
36
|
+
@else
|
|
37
|
+
border-bottom: $size solid $default-border-color
|
|
38
|
+
|
|
39
|
+
@mixin border-left($size)
|
|
40
|
+
@if map.has-key($border-widths, $size)
|
|
41
|
+
border-left: map.get($border-widths, $size) solid $default-border-color
|
|
42
|
+
@else
|
|
43
|
+
border-left: $size solid $default-border-color
|
|
44
|
+
|
|
45
|
+
// Border radius mixins
|
|
46
|
+
@mixin border-radius($size)
|
|
47
|
+
@if map.has-key($border-radius-sizes, $size)
|
|
48
|
+
border-radius: map.get($border-radius-sizes, $size)
|
|
49
|
+
@else
|
|
50
|
+
border-radius: $size
|
|
51
|
+
|
|
52
|
+
@mixin border-radius-top($size)
|
|
53
|
+
@if map.has-key($border-radius-sizes, $size)
|
|
54
|
+
$value: map.get($border-radius-sizes, $size)
|
|
55
|
+
border-top-left-radius: $value
|
|
56
|
+
border-top-right-radius: $value
|
|
57
|
+
@else
|
|
58
|
+
border-top-left-radius: $size
|
|
59
|
+
border-top-right-radius: $size
|
|
60
|
+
|
|
61
|
+
@mixin border-radius-bottom($size)
|
|
62
|
+
@if map.has-key($border-radius-sizes, $size)
|
|
63
|
+
$value: map.get($border-radius-sizes, $size)
|
|
64
|
+
border-bottom-left-radius: $value
|
|
65
|
+
border-bottom-right-radius: $value
|
|
66
|
+
@else
|
|
67
|
+
border-bottom-left-radius: $size
|
|
68
|
+
border-bottom-right-radius: $size
|
|
69
|
+
|
|
70
|
+
@mixin border-radius-left($size)
|
|
71
|
+
@if map.has-key($border-radius-sizes, $size)
|
|
72
|
+
$value: map.get($border-radius-sizes, $size)
|
|
73
|
+
border-top-left-radius: $value
|
|
74
|
+
border-bottom-left-radius: $value
|
|
75
|
+
@else
|
|
76
|
+
border-top-left-radius: $size
|
|
77
|
+
border-bottom-left-radius: $size
|
|
78
|
+
|
|
79
|
+
@mixin border-radius-right($size)
|
|
80
|
+
@if map.has-key($border-radius-sizes, $size)
|
|
81
|
+
$value: map.get($border-radius-sizes, $size)
|
|
82
|
+
border-top-right-radius: $value
|
|
83
|
+
border-bottom-right-radius: $value
|
|
84
|
+
@else
|
|
85
|
+
border-top-right-radius: $size
|
|
86
|
+
border-bottom-right-radius: $size
|
|
87
|
+
|
|
88
|
+
// Convenience mixins
|
|
89
|
+
@mixin no-border
|
|
90
|
+
border: none
|
|
91
|
+
|
|
92
|
+
@mixin border-reset
|
|
93
|
+
@include no-border
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use "sass:map"
|
|
2
|
+
// Breakpoint Mixins
|
|
3
|
+
@use '../variables/spacing' as *
|
|
4
|
+
|
|
5
|
+
// Media Query Mixins
|
|
6
|
+
@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints)
|
|
7
|
+
$min: map.get($breakpoints, $name)
|
|
8
|
+
@if $min
|
|
9
|
+
@media (min-width: $min)
|
|
10
|
+
@content
|
|
11
|
+
@else
|
|
12
|
+
@content
|
|
13
|
+
|
|
14
|
+
@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints)
|
|
15
|
+
$max: map.get($breakpoints, $name)
|
|
16
|
+
@if $max
|
|
17
|
+
@media (max-width: $max - 0.02)
|
|
18
|
+
@content
|
|
19
|
+
@else
|
|
20
|
+
@content
|
|
21
|
+
|
|
22
|
+
@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints)
|
|
23
|
+
$min: map.get($breakpoints, $lower)
|
|
24
|
+
$max: map.get($breakpoints, $upper)
|
|
25
|
+
|
|
26
|
+
@if $min != null and $max != null
|
|
27
|
+
@media (min-width: $min) and (max-width: $max - 0.02)
|
|
28
|
+
@content
|
|
29
|
+
@else if $max == null
|
|
30
|
+
@include media-breakpoint-up($lower, $breakpoints)
|
|
31
|
+
@content
|
|
32
|
+
@else if $min == null
|
|
33
|
+
@include media-breakpoint-down($upper, $breakpoints)
|
|
34
|
+
@content
|
|
35
|
+
|
|
36
|
+
// Container Query Mixins — resolve against nearest `m-section` container,
|
|
37
|
+
// not the viewport. Grid responsiveness keys off section width (see ADR 0001).
|
|
38
|
+
@mixin container-breakpoint-up($name, $breakpoints: $grid-breakpoints)
|
|
39
|
+
$min: map.get($breakpoints, $name)
|
|
40
|
+
@if $min
|
|
41
|
+
// #{} required: SASS does not evaluate vars in @container preludes like it does @media
|
|
42
|
+
@container mag-grid (min-width: #{$min})
|
|
43
|
+
@content
|
|
44
|
+
@else
|
|
45
|
+
@content
|
|
46
|
+
|
|
47
|
+
@mixin container-breakpoint-down($name, $breakpoints: $grid-breakpoints)
|
|
48
|
+
$max: map.get($breakpoints, $name)
|
|
49
|
+
@if $max
|
|
50
|
+
@container mag-grid (max-width: #{$max - 0.02})
|
|
51
|
+
@content
|
|
52
|
+
@else
|
|
53
|
+
@content
|
|
54
|
+
|
|
55
|
+
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints)
|
|
56
|
+
$min: map.get($breakpoints, $name)
|
|
57
|
+
$next: map.get($breakpoints, $name)
|
|
58
|
+
$max: map.get($breakpoints, $next)
|
|
59
|
+
|
|
60
|
+
@if $min != null and $max != null
|
|
61
|
+
@media (min-width: $min) and (max-width: $max - 0.02)
|
|
62
|
+
@content
|
|
63
|
+
@else if $max == null
|
|
64
|
+
@include media-breakpoint-up($name, $breakpoints)
|
|
65
|
+
@content
|
|
66
|
+
@else if $min == null
|
|
67
|
+
@include media-breakpoint-down($next, $breakpoints)
|
|
68
|
+
@content
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@use 'control' as *
|
|
2
|
+
@use 'interactive' as *
|
|
3
|
+
|
|
4
|
+
// Global basic reset mixin for native button elements in the monorepo
|
|
5
|
+
=button-reset
|
|
6
|
+
appearance: none
|
|
7
|
+
display: inline-flex
|
|
8
|
+
align-items: center
|
|
9
|
+
justify-content: center
|
|
10
|
+
font-family: inherit
|
|
11
|
+
font-size: inherit
|
|
12
|
+
text-decoration: none
|
|
13
|
+
cursor: pointer
|
|
14
|
+
border: none
|
|
15
|
+
background: none
|
|
16
|
+
padding: 0
|
|
17
|
+
margin: 0
|
|
18
|
+
outline: none
|
|
19
|
+
box-sizing: border-box
|
|
20
|
+
user-select: none
|
|
21
|
+
color: inherit
|
|
22
|
+
position: relative
|
|
23
|
+
|
|
24
|
+
&:disabled,
|
|
25
|
+
&[aria-disabled="true"]
|
|
26
|
+
opacity: 0.4
|
|
27
|
+
cursor: not-allowed
|
|
28
|
+
pointer-events: none
|
|
29
|
+
filter: grayscale(75%)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
// Shared button base mixin - combines control dimensions and interactive behavior
|
|
33
|
+
=button-base($size, $color)
|
|
34
|
+
+control-dims($size)
|
|
35
|
+
+control-interactive($color)
|
|
36
|
+
height: auto
|
|
37
|
+
min-height: 0
|
|
38
|
+
padding: calc(#{$size} * 0.625) calc(#{$size} * 1.25)
|
|
39
|
+
gap: calc(#{$size} * 0.375)
|
|
40
|
+
border-style: solid
|
|
41
|
+
display: inline-flex
|
|
42
|
+
align-items: center
|
|
43
|
+
justify-content: center
|
|
44
|
+
box-sizing: border-box
|
|
45
|
+
font-family: inherit
|
|
46
|
+
cursor: pointer
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@use 'flex' as flex
|
|
2
|
+
@use '../functions/functions' as f
|
|
3
|
+
|
|
4
|
+
// Base mixin using only the 4 required CSS variables
|
|
5
|
+
=checkbox-container-base
|
|
6
|
+
display: inline-flex
|
|
7
|
+
align-items: center
|
|
8
|
+
$size: 1em
|
|
9
|
+
gap: #{f.derive-control-gap($size)}
|
|
10
|
+
cursor: pointer
|
|
11
|
+
user-select: none
|
|
12
|
+
position: relative
|
|
13
|
+
padding: 2px // Prevent shadow clipping
|
|
14
|
+
|
|
15
|
+
input[type="checkbox"]
|
|
16
|
+
appearance: none
|
|
17
|
+
-webkit-appearance: none
|
|
18
|
+
-moz-appearance: none
|
|
19
|
+
position: relative
|
|
20
|
+
width: #{$size}
|
|
21
|
+
height: #{$size}
|
|
22
|
+
background-color: rgba(var(--m-checkbox-bg-rgb, 255, 255, 255), 0.1)
|
|
23
|
+
backdrop-filter: blur(8px)
|
|
24
|
+
border-radius: #{f.derive-control-radius($size)}
|
|
25
|
+
border: #{f.derive-control-border($size)} solid color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 70%, transparent 30%)
|
|
26
|
+
cursor: pointer
|
|
27
|
+
outline: none
|
|
28
|
+
box-sizing: border-box
|
|
29
|
+
flex-shrink: 0
|
|
30
|
+
margin: 2px
|
|
31
|
+
box-shadow: 0 0 0 1px color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 15%, transparent 85%), 0 2px 12px -3px rgba(0, 0, 0, 0.1)
|
|
32
|
+
transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease, transform 0.2s ease
|
|
33
|
+
will-change: background-color, box-shadow
|
|
34
|
+
|
|
35
|
+
// Checkmark (checked indicator)
|
|
36
|
+
&::after
|
|
37
|
+
content: ''
|
|
38
|
+
position: absolute
|
|
39
|
+
top: 50%
|
|
40
|
+
left: 50%
|
|
41
|
+
transform: translate(-50%, -50%) scale(0) rotate(-45deg)
|
|
42
|
+
width: calc(1em * 0.5)
|
|
43
|
+
height: calc(1em * 0.25)
|
|
44
|
+
border-left: calc(1em * 0.12) solid var(--m-checkbox-input-color, #4169e1)
|
|
45
|
+
border-bottom: calc(1em * 0.12) solid var(--m-checkbox-input-color, #4169e1)
|
|
46
|
+
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease
|
|
47
|
+
will-change: transform
|
|
48
|
+
box-shadow: 0 calc(1em / 10) calc(1em / 6) rgba(0, 0, 0, 0.2), 0 calc(1em / 20) calc(1em / 12) rgba(0, 0, 0, 0.1)
|
|
49
|
+
|
|
50
|
+
label, .m-label, .label
|
|
51
|
+
font-size: calc(1em * 0.8)
|
|
52
|
+
line-height: 1.2
|
|
53
|
+
cursor: pointer
|
|
54
|
+
margin: 0
|
|
55
|
+
color: color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 70%, black 30%)
|
|
56
|
+
transition: color 0.2s ease, font-weight 0.15s ease
|
|
57
|
+
|
|
58
|
+
// Interactive states using only the 4 variables
|
|
59
|
+
=checkbox-container-states
|
|
60
|
+
input[type="checkbox"]
|
|
61
|
+
// Hover state
|
|
62
|
+
&:hover:not(:disabled)
|
|
63
|
+
border-color: color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 80%, transparent 20%)
|
|
64
|
+
transform: translateY(-1px)
|
|
65
|
+
box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.15), 0 0 0 1px color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 25%, transparent 75%)
|
|
66
|
+
|
|
67
|
+
// Focus state
|
|
68
|
+
&:focus
|
|
69
|
+
box-shadow: 0 0 0 calc(1em / 5) color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 25%, transparent 75%), 0 2px 12px -3px rgba(0, 0, 0, 0.1)
|
|
70
|
+
outline: none
|
|
71
|
+
|
|
72
|
+
// Active/pressed state
|
|
73
|
+
&:active:not(:disabled)
|
|
74
|
+
&::after
|
|
75
|
+
transform: translate(-50%, -50%) scale(0.85) rotate(-45deg)
|
|
76
|
+
|
|
77
|
+
// Checked state
|
|
78
|
+
&:checked
|
|
79
|
+
border-color: var(--m-checkbox-input-color, #4169e1)
|
|
80
|
+
background-color: var(--m-checkbox-input-color, #4169e1)
|
|
81
|
+
box-shadow: 0 4px 15px -3px color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 40%, transparent 60%)
|
|
82
|
+
transform: scale(1.05)
|
|
83
|
+
|
|
84
|
+
&::after
|
|
85
|
+
transform: translate(-50%, -60%) scale(1) rotate(-45deg)
|
|
86
|
+
border-color: white
|
|
87
|
+
|
|
88
|
+
&:hover:not(:disabled)
|
|
89
|
+
background-color: color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 90%, black 10%)
|
|
90
|
+
border-color: color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 90%, black 10%)
|
|
91
|
+
|
|
92
|
+
&:active:not(:disabled)
|
|
93
|
+
&::after
|
|
94
|
+
transform: translate(-50%, -60%) scale(0.85) rotate(-45deg)
|
|
95
|
+
|
|
96
|
+
&:focus
|
|
97
|
+
box-shadow: 0 0 0 calc(1em / 5) color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 25%, transparent 75%)
|
|
98
|
+
|
|
99
|
+
// Label changes when checked
|
|
100
|
+
+ label
|
|
101
|
+
color: var(--m-checkbox-input-color, #4169e1)
|
|
102
|
+
|
|
103
|
+
// Indeterminate state
|
|
104
|
+
&:indeterminate
|
|
105
|
+
border-color: var(--m-checkbox-input-color, #4169e1)
|
|
106
|
+
background-color: var(--m-checkbox-input-color, #4169e1)
|
|
107
|
+
|
|
108
|
+
&::after
|
|
109
|
+
transform: translate(-50%, -50%) scale(1) rotate(0deg)
|
|
110
|
+
width: calc(1em * 0.5)
|
|
111
|
+
height: 0
|
|
112
|
+
border-left: none
|
|
113
|
+
border-bottom: calc(1em * 0.12) solid white
|
|
114
|
+
|
|
115
|
+
// Disabled state
|
|
116
|
+
&:disabled
|
|
117
|
+
opacity: 0.5
|
|
118
|
+
cursor: not-allowed
|
|
119
|
+
border-color: color-mix(in srgb, var(--m-checkbox-input-color, #4169e1) 20%, transparent 80%)
|
|
120
|
+
|
|
121
|
+
+ label
|
|
122
|
+
opacity: 0.5
|
|
123
|
+
cursor: not-allowed
|
|
124
|
+
|
|
125
|
+
&:checked
|
|
126
|
+
&::after
|
|
127
|
+
opacity: 0.5
|
|
128
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// Color utilities and mixins
|
|
2
|
+
|
|
3
|
+
// Text color mixins
|
|
4
|
+
@mixin color($value)
|
|
5
|
+
color: $value
|
|
6
|
+
|
|
7
|
+
@mixin text-color($value)
|
|
8
|
+
color: $value
|
|
9
|
+
|
|
10
|
+
// Note: Basic text styling mixins have been moved to mixins/_text.sass
|
|
11
|
+
// The following are color-only mixins
|
|
12
|
+
|
|
13
|
+
@mixin text-success
|
|
14
|
+
color: var(--color-success, #28a745)
|
|
15
|
+
|
|
16
|
+
@mixin text-warning
|
|
17
|
+
color: var(--color-warning, #ffc107)
|
|
18
|
+
|
|
19
|
+
@mixin text-error
|
|
20
|
+
color: var(--color-error, #dc3545)
|
|
21
|
+
|
|
22
|
+
@mixin text-info
|
|
23
|
+
color: var(--color-info, #17a2b8)
|
|
24
|
+
|
|
25
|
+
@mixin text-danger
|
|
26
|
+
color: var(--color-danger, #dc3545)
|
|
27
|
+
|
|
28
|
+
// Brand colors
|
|
29
|
+
@mixin text-brand-primary
|
|
30
|
+
color: var(--brand-primary, #007bff)
|
|
31
|
+
|
|
32
|
+
@mixin text-brand-secondary
|
|
33
|
+
color: var(--brand-secondary, #6c757d)
|
|
34
|
+
|
|
35
|
+
// Semantic colors
|
|
36
|
+
@mixin text-link
|
|
37
|
+
color: var(--link-color, #007bff)
|
|
38
|
+
|
|
39
|
+
&:hover
|
|
40
|
+
color: var(--link-hover-color, #0056b3)
|
|
41
|
+
|
|
42
|
+
@mixin text-link-visited
|
|
43
|
+
color: var(--link-visited-color, #663399)
|
|
44
|
+
|
|
45
|
+
// Gray scale colors
|
|
46
|
+
@mixin text-black
|
|
47
|
+
color: #000000
|
|
48
|
+
|
|
49
|
+
@mixin text-white
|
|
50
|
+
color: #ffffff
|
|
51
|
+
|
|
52
|
+
@mixin text-gray-100
|
|
53
|
+
color: #f8f9fa
|
|
54
|
+
|
|
55
|
+
@mixin text-gray-200
|
|
56
|
+
color: #e9ecef
|
|
57
|
+
|
|
58
|
+
@mixin text-gray-300
|
|
59
|
+
color: #dee2e6
|
|
60
|
+
|
|
61
|
+
@mixin text-gray-400
|
|
62
|
+
color: #ced4da
|
|
63
|
+
|
|
64
|
+
@mixin text-gray-500
|
|
65
|
+
color: #adb5bd
|
|
66
|
+
|
|
67
|
+
@mixin text-gray-600
|
|
68
|
+
color: #6c757d
|
|
69
|
+
|
|
70
|
+
@mixin text-gray-700
|
|
71
|
+
color: #495057
|
|
72
|
+
|
|
73
|
+
@mixin text-gray-800
|
|
74
|
+
color: #343a40
|
|
75
|
+
|
|
76
|
+
@mixin text-gray-900
|
|
77
|
+
color: #212529
|
|
78
|
+
|
|
79
|
+
// Theme-aware colors
|
|
80
|
+
@mixin text-on-light
|
|
81
|
+
color: var(--text-on-light, #333333)
|
|
82
|
+
|
|
83
|
+
@mixin text-on-dark
|
|
84
|
+
color: var(--text-on-dark, #ffffff)
|
|
85
|
+
|
|
86
|
+
// Opacity variations
|
|
87
|
+
@mixin text-opacity($opacity: 0.8)
|
|
88
|
+
opacity: $opacity
|
|
89
|
+
|
|
90
|
+
@mixin text-transparent
|
|
91
|
+
color: transparent
|
|
92
|
+
|
|
93
|
+
// Color transitions
|
|
94
|
+
@mixin color-transition($duration: 0.3s)
|
|
95
|
+
transition: color $duration ease-in-out
|
|
96
|
+
|
|
97
|
+
// High contrast colors for accessibility
|
|
98
|
+
@mixin text-high-contrast
|
|
99
|
+
color: #000000
|
|
100
|
+
background-color: #ffffff
|
|
101
|
+
|
|
102
|
+
@mixin text-high-contrast-inverse
|
|
103
|
+
color: #ffffff
|
|
104
|
+
background-color: #000000
|
|
105
|
+
|
|
106
|
+
// Print colors
|
|
107
|
+
@mixin text-print-only
|
|
108
|
+
@media print
|
|
109
|
+
color: #000000 !important
|
|
110
|
+
|
|
111
|
+
// Color utilities with CSS variables
|
|
112
|
+
@mixin text-css-var($variable)
|
|
113
|
+
color: var(#{$variable})
|
|
114
|
+
|
|
115
|
+
// Dynamic color mixing (modern browsers)
|
|
116
|
+
@mixin text-mix($color1, $color2, $percentage: 50%)
|
|
117
|
+
color: color-mix(in srgb, #{$color1} #{$percentage}%, #{$color2} #{100 - $percentage}%)
|
|
118
|
+
|
|
119
|
+
// Use ThemeStore CSS vars (--m-*) for theme-adaptive colors instead of this mixin
|
|
120
|
+
@mixin text-theme-adaptive($color)
|
|
121
|
+
color: $color
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@use '../functions/functions' as f
|
|
2
|
+
|
|
3
|
+
// Control dimensions mixin - shared geometry for all control components
|
|
4
|
+
// Uses CSS var --input-size when available, falls back to $size
|
|
5
|
+
// Note: We use CSS calc() directly with the var to avoid SASS function evaluation issues
|
|
6
|
+
=control-dims($size: 1em)
|
|
7
|
+
height: calc(var(--input-size, #{$size}) * 2)
|
|
8
|
+
min-height: calc(var(--input-size, #{$size}) * 2)
|
|
9
|
+
border-width: max(1px, calc(var(--input-size, #{$size}) * 0.0625))
|
|
10
|
+
border-radius: calc(var(--input-size, #{$size}) * 0.4)
|
|
11
|
+
padding: calc(var(--input-size, #{$size}) * 0.5) calc(var(--input-size, #{$size}) * 0.5)
|
|
12
|
+
gap: calc(var(--input-size, #{$size}) * 0.375)
|
|
13
|
+
font-size: var(--input-size, #{$size})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use '../variables/spacing' as *
|
|
2
|
+
|
|
3
|
+
// Responsive mixins
|
|
4
|
+
@mixin tablet
|
|
5
|
+
@media (min-width: #{$tablet-width}) and (max-width: #{$desktop-width - 1px})
|
|
6
|
+
@content
|
|
7
|
+
|
|
8
|
+
@mixin desktop
|
|
9
|
+
@media (min-width: #{$desktop-width})
|
|
10
|
+
@content
|
|
11
|
+
|
|
12
|
+
@mixin mobile
|
|
13
|
+
@media (max-width: #{$tablet-width - 1px})
|
|
14
|
+
@content
|
|
15
|
+
|
|
16
|
+
@mixin tablet-and-desktop
|
|
17
|
+
@media (min-width: #{$tablet-width - 1px})
|
|
18
|
+
@content
|
|
19
|
+
|
|
20
|
+
@mixin mobile-and-tablet
|
|
21
|
+
@media (max-width: #{$tablet-width})
|
|
22
|
+
@content
|