@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.
Files changed (70) hide show
  1. package/package.json +9 -2
  2. package/sass/_date-picker.sass +147 -0
  3. package/sass/_index.sass +34 -0
  4. package/sass/_input-date.sass +25 -0
  5. package/sass/_m-components.sass +110 -0
  6. package/sass/_menu.sass +132 -0
  7. package/sass/_reset.sass +186 -0
  8. package/sass/animations/_index.sass +13 -0
  9. package/sass/animations/_registry.sass +51 -0
  10. package/sass/animations/background/_energy.sass +91 -0
  11. package/sass/animations/background/_gradient.sass +104 -0
  12. package/sass/animations/background/_index.sass +9 -0
  13. package/sass/animations/background/_nature.sass +110 -0
  14. package/sass/animations/background/_new-effects.sass +292 -0
  15. package/sass/animations/background/_particle.sass +122 -0
  16. package/sass/animations/background/_tech.sass +124 -0
  17. package/sass/functions/_functions.sass +107 -0
  18. package/sass/mixins/_backdrops.sass +230 -0
  19. package/sass/mixins/_backgrounds.sass +214 -0
  20. package/sass/mixins/_borders.sass +93 -0
  21. package/sass/mixins/_breakpoints.sass +68 -0
  22. package/sass/mixins/_button.sass +46 -0
  23. package/sass/mixins/_checkbox.sass +128 -0
  24. package/sass/mixins/_colors.sass +121 -0
  25. package/sass/mixins/_control.sass +13 -0
  26. package/sass/mixins/_device.sass +22 -0
  27. package/sass/mixins/_display.sass +210 -0
  28. package/sass/mixins/_flex.sass +104 -0
  29. package/sass/mixins/_form.sass +68 -0
  30. package/sass/mixins/_grid.sass +273 -0
  31. package/sass/mixins/_header.sass +71 -0
  32. package/sass/mixins/_index.sass +29 -0
  33. package/sass/mixins/_input.sass +132 -0
  34. package/sass/mixins/_interactive.sass +19 -0
  35. package/sass/mixins/_label.sass +25 -0
  36. package/sass/mixins/_layout.sass +251 -0
  37. package/sass/mixins/_links.sass +85 -0
  38. package/sass/mixins/_lists.sass +377 -0
  39. package/sass/mixins/_overflow.sass +121 -0
  40. package/sass/mixins/_position.sass +181 -0
  41. package/sass/mixins/_radio.sass +205 -0
  42. package/sass/mixins/_sizing.sass +181 -0
  43. package/sass/mixins/_spacing.sass +59 -0
  44. package/sass/mixins/_text.sass +159 -0
  45. package/sass/mixins/_toggle.sass +240 -0
  46. package/sass/mixins/_typography.sass +6 -0
  47. package/sass/mixins/_utilities.sass +70 -0
  48. package/sass/utilities/_backdrops.sass +228 -0
  49. package/sass/utilities/_backgrounds.sass +285 -0
  50. package/sass/utilities/_borders.sass +138 -0
  51. package/sass/utilities/_colors.sass +166 -0
  52. package/sass/utilities/_display.sass +308 -0
  53. package/sass/utilities/_flex.sass +91 -0
  54. package/sass/utilities/_grid.sass +502 -0
  55. package/sass/utilities/_index.sass +17 -0
  56. package/sass/utilities/_input.sass +14 -0
  57. package/sass/utilities/_links.sass +136 -0
  58. package/sass/utilities/_lists.sass +4 -0
  59. package/sass/utilities/_popup.sass +73 -0
  60. package/sass/utilities/_position.sass +88 -0
  61. package/sass/utilities/_sizing.sass +277 -0
  62. package/sass/utilities/_spacing.sass +121 -0
  63. package/sass/utilities/_text.sass +207 -0
  64. package/sass/variables/_animations.sass +5 -0
  65. package/sass/variables/_borders.sass +25 -0
  66. package/sass/variables/_colors.sass +93 -0
  67. package/sass/variables/_index.sass +6 -0
  68. package/sass/variables/_number.sass +1 -0
  69. package/sass/variables/_spacing.sass +28 -0
  70. package/sass/variables/_typography.sass +40 -0
@@ -0,0 +1,205 @@
1
+ @use 'flex' as flex
2
+ @use 'sass:map'
3
+ @use '../functions/functions' as f
4
+
5
+ // ============================================
6
+ // Configuration & Variables
7
+ // ============================================
8
+
9
+ // Default CSS custom properties (can be overridden)
10
+ $radio-defaults: (size: 1em, color: #4169e1, color-contrast: #ffffff, color-opposite: #e1b941)
11
+
12
+ // ============================================
13
+ // Base Radio Container
14
+ // ============================================
15
+
16
+ @mixin radio-container-base
17
+ display: inline-flex
18
+ align-items: center
19
+ $size: 1em
20
+ gap: #{f.derive-control-gap($size)}
21
+ cursor: pointer
22
+ user-select: none
23
+ position: relative
24
+
25
+ input[type="radio"]
26
+ // Reset default styles
27
+ appearance: none
28
+ -webkit-appearance: none
29
+ -moz-appearance: none
30
+ margin: 0
31
+ padding: 0
32
+
33
+ // Positioning & dimensions
34
+ position: relative
35
+ width: #{$size}
36
+ height: #{$size}
37
+ flex-shrink: 0
38
+ box-sizing: border-box
39
+
40
+ // Styling
41
+ background-color: transparent
42
+ border-radius: 50%
43
+ border: #{f.derive-control-border($size)} solid color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 40%, transparent 60%)
44
+ cursor: pointer
45
+ outline: none
46
+
47
+ // Transitions
48
+ 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
49
+ will-change: background-color, box-shadow, border-color
50
+
51
+ // Inner dot (checked indicator)
52
+ &::after
53
+ content: ''
54
+ position: absolute
55
+ top: 50%
56
+ left: 50%
57
+ transform: translate(-50%, -50%) scale(0)
58
+ width: calc(#{$size} * 0.5)
59
+ height: calc(#{$size} * 0.5)
60
+ background-color: var(--m-input-wrapper-color, #{map.get($radio-defaults, color)})
61
+ border-radius: 50%
62
+ transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s ease
63
+ will-change: transform
64
+
65
+ label
66
+ font-size: calc(#{$size} * 0.8)
67
+ line-height: 1.2
68
+ cursor: pointer
69
+ margin: 0
70
+ color: color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 70%, black 30%)
71
+ transition: color 0.2s ease, font-weight 0.15s ease
72
+
73
+ // ============================================
74
+ // Interactive States
75
+ // ============================================
76
+
77
+ @mixin radio-container-states
78
+ $size: 1em
79
+ input[type="radio"]
80
+ // Hover state (not disabled)
81
+ &:hover:not(:disabled)
82
+ border-color: color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 60%, transparent 40%)
83
+
84
+ // Focus state (accessibility)
85
+ &:focus
86
+ box-shadow: 0 0 0 calc(#{$size} * 0.2) color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 20%, transparent 80%)
87
+ outline: none
88
+
89
+ // Active/pressed state (not disabled)
90
+ &:active:not(:disabled)::after
91
+ transform: translate(-50%, -50%) scale(0.85)
92
+
93
+ // Checked state
94
+ &:checked
95
+ border-color: var(--m-input-wrapper-color, #{map.get($radio-defaults, color)})
96
+
97
+ &::after
98
+ transform: translate(-50%, -50%) scale(1)
99
+
100
+ // Hover when checked
101
+ &:hover:not(:disabled)
102
+ border-color: color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 90%, black 10%)
103
+
104
+ &::after
105
+ background-color: color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 90%, black 10%)
106
+
107
+ // Active when checked
108
+ &:active:not(:disabled)::after
109
+ transform: translate(-50%, -50%) scale(0.85)
110
+
111
+ // Focus when checked
112
+ &:focus
113
+ box-shadow: 0 0 0 calc(#{$size} * 0.2) color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 25%, transparent 75%)
114
+
115
+ // Label styling when checked
116
+ + label
117
+ color: var(--m-input-wrapper-color, #{map.get($radio-defaults, color)})
118
+
119
+ // Disabled state
120
+ &:disabled
121
+ opacity: 0.5
122
+ cursor: not-allowed
123
+ border-color: color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 20%, transparent 80%)
124
+
125
+ + label
126
+ opacity: 0.5
127
+ cursor: not-allowed
128
+
129
+ &:checked::after
130
+ opacity: 0.5
131
+
132
+ // ============================================
133
+ // Complete Radio Container
134
+ // ============================================
135
+
136
+ @mixin radio-container
137
+ @include radio-container-base
138
+ @include radio-container-states
139
+
140
+ // ============================================
141
+ // Label Position Variants
142
+ // ============================================
143
+
144
+ @mixin radio-container-label-left
145
+ flex-direction: row-reverse
146
+
147
+ @mixin radio-container-label-right
148
+ flex-direction: row
149
+
150
+ @mixin radio-container-label-top
151
+ flex-direction: column-reverse
152
+ align-items: flex-start
153
+
154
+ @mixin radio-container-label-bottom
155
+ flex-direction: column
156
+ align-items: flex-start
157
+
158
+ // ============================================
159
+ // Radio with Icons/Text Inside
160
+ // ============================================
161
+
162
+ @mixin radio-container-with-icons
163
+ $size: 1em
164
+ input[type="radio"]
165
+ // Icon before (unchecked state)
166
+ &::before
167
+ content: attr(data-icon-off)
168
+ position: absolute
169
+ top: 50%
170
+ left: 50%
171
+ transform: translate(-50%, -50%)
172
+ font-size: calc(#{$size} * 0.4)
173
+ color: color-mix(in srgb, var(--m-input-wrapper-color, #{map.get($radio-defaults, color)}) 60%, black 40%)
174
+ opacity: 0.7
175
+ transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease, font-size 0.2s ease
176
+ z-index: 1
177
+ pointer-events: none
178
+
179
+ // Hide the dot when using icons
180
+ &::after
181
+ z-index: 2
182
+ width: 0
183
+ height: 0
184
+ box-shadow: none
185
+
186
+ // Icon when checked
187
+ &:checked::before
188
+ content: attr(data-icon-on)
189
+ opacity: 1
190
+ color: var(--m-input-wrapper-color, #{map.get($radio-defaults, color)})
191
+ font-size: calc(#{$size} * 0.6)
192
+
193
+ // Icon hover state
194
+ &:hover:not(:disabled)::before
195
+ opacity: 0.9
196
+
197
+ // ============================================
198
+ // Radio with Opposite Color Dot
199
+ // ============================================
200
+
201
+ @mixin radio-container-opposite-dot
202
+ $size: 1em
203
+ input[type="radio"]:checked::after
204
+ background-color: var(--m-input-wrapper-color-opposite, #{map.get($radio-defaults, color-opposite)})
205
+ box-shadow: 0 calc(#{$size} * 0.1) calc(#{$size} * 0.167) color-mix(in srgb, var(--m-input-wrapper-color-opposite, #{map.get($radio-defaults, color-opposite)}) 30%, black 70%), 0 calc(#{$size} * 0.05) calc(#{$size} * 0.083) rgba(0, 0, 0, 0.1)
@@ -0,0 +1,181 @@
1
+ // Sizing utilities and mixins for width and height
2
+
3
+ // Width mixins
4
+ @mixin width($value)
5
+ width: $value
6
+
7
+ @mixin min-width($value)
8
+ min-width: $value
9
+
10
+ @mixin max-width($value)
11
+ max-width: $value
12
+
13
+ @mixin width-zero
14
+ width: 0%
15
+
16
+ @mixin width-full
17
+ width: 100%
18
+
19
+ @mixin width-half
20
+ width: 50%
21
+
22
+ @mixin width-quarter
23
+ width: 25%
24
+
25
+ @mixin width-three-quarters
26
+ width: 75%
27
+
28
+ @mixin width-auto
29
+ width: auto
30
+
31
+ @mixin width-fit
32
+ width: fit-content
33
+
34
+ @mixin width-min
35
+ width: min-content
36
+
37
+ @mixin width-max
38
+ width: max-content
39
+
40
+ // Viewport width mixins (using Container Query units for better isolation in remote components)
41
+ @mixin width-vw($value)
42
+ width: #{$value}cqw
43
+
44
+ @mixin width-100vw
45
+ width: 100cqw
46
+
47
+ @mixin width-50vw
48
+ width: 50cqw
49
+
50
+ @mixin width-33vw
51
+ width: 33.333cqw
52
+
53
+ @mixin width-66vw
54
+ width: 66.666cqw
55
+
56
+ @mixin width-75vw
57
+ width: 75cqw
58
+
59
+ @mixin width-25vw
60
+ width: 25cqw
61
+
62
+ // Height mixins
63
+ @mixin height($value)
64
+ height: $value
65
+
66
+ @mixin min-height($value)
67
+ min-height: $value
68
+
69
+ @mixin max-height($value)
70
+ max-height: $value
71
+
72
+ @mixin height-full
73
+ height: 100%
74
+
75
+ @mixin height-half
76
+ height: 50%
77
+
78
+ @mixin height-quarter
79
+ height: 25%
80
+
81
+ @mixin height-three-quarters
82
+ height: 75%
83
+
84
+ @mixin height-auto
85
+ height: auto
86
+
87
+ @mixin height-fit
88
+ height: fit-content
89
+
90
+ @mixin height-min
91
+ height: min-content
92
+
93
+ @mixin height-max
94
+ height: max-content
95
+
96
+ // Viewport height mixins (using Container Query units for better isolation in remote components)
97
+ @mixin height-vh($value)
98
+ height: #{$value}cqh
99
+
100
+ @mixin height-100vh
101
+ height: 100cqh
102
+
103
+ @mixin height-50vh
104
+ height: 50cqh
105
+
106
+ @mixin height-33vh
107
+ height: 33.333cqh
108
+
109
+ @mixin height-66vh
110
+ height: 66.666cqh
111
+
112
+ @mixin height-75vh
113
+ height: 75cqh
114
+
115
+ @mixin height-25vh
116
+ height: 25cqh
117
+
118
+ // Dynamic viewport height mixins (for mobile browsers)
119
+ @mixin height-100dvh
120
+ height: 100cqh
121
+
122
+ @mixin height-100lvh
123
+ height: 100cqh
124
+
125
+ @mixin height-100svh
126
+ height: 100cqh
127
+
128
+ // Combined width and height mixins
129
+ @mixin size($width, $height: $width)
130
+ width: $width
131
+ height: $height
132
+
133
+ @mixin size-full
134
+ width: 100%
135
+ height: 100%
136
+
137
+ @mixin size-viewport
138
+ width: 100cqw
139
+ height: 100cqh
140
+
141
+ @mixin size-square($size)
142
+ width: $size
143
+ height: $size
144
+
145
+ // Note: Aspect ratio mixins have been moved to mixins/_layout.sass for comprehensive responsive behavior
146
+
147
+ // Container query sizing
148
+ @mixin width-cqw($value)
149
+ width: #{$value}cqw
150
+
151
+ @mixin height-cqh($value)
152
+ height: #{$value}cqh
153
+
154
+ @mixin width-100cqw
155
+ width: 100cqw
156
+
157
+ @mixin height-100cqh
158
+ height: 100cqh
159
+
160
+ // Responsive sizing helpers
161
+ @mixin responsive-size($mobile-width: 100%, $mobile-height: auto, $desktop-width: auto, $desktop-height: auto)
162
+ width: $mobile-width
163
+ height: $mobile-height
164
+
165
+ @media (min-width: 769px)
166
+ width: $desktop-width
167
+ height: $desktop-height
168
+
169
+ // Common sizing patterns
170
+ @mixin full-screen
171
+ width: 100cqw
172
+ height: 100cqh
173
+
174
+ @mixin full-container
175
+ width: 100%
176
+ height: 100%
177
+
178
+ @mixin center-size($width, $height: $width)
179
+ width: $width
180
+ height: $height
181
+ margin: 0 auto
@@ -0,0 +1,59 @@
1
+ @use "sass:map"
2
+ // Spacing Mixins - Efficient padding and margin utilities
3
+ @use '../variables/spacing' as *
4
+
5
+ // Base spacing mixin - applies to any CSS property
6
+ @mixin spacing($property, $size)
7
+ @if map.has-key($spacers, $size)
8
+ #{$property}: map.get($spacers, $size)
9
+ @else
10
+ #{$property}: $size
11
+
12
+ // Directional spacing mixins
13
+ @mixin spacing-x($property, $size)
14
+ @include spacing(#{$property}-left, $size)
15
+ @include spacing(#{$property}-right, $size)
16
+
17
+ @mixin spacing-y($property, $size)
18
+ @include spacing(#{$property}-top, $size)
19
+ @include spacing(#{$property}-bottom, $size)
20
+
21
+ @mixin spacing-all($property, $size)
22
+ @include spacing($property, $size)
23
+
24
+ @mixin spacing-directional($property, $top, $right: $top, $bottom: $top, $left: $right)
25
+ @include spacing(#{$property}-top, $top)
26
+ @include spacing(#{$property}-right, $right)
27
+ @include spacing(#{$property}-bottom, $bottom)
28
+ @include spacing(#{$property}-left, $left)
29
+
30
+ // Convenience mixins for common use cases
31
+ @mixin margin-x($size)
32
+ @include spacing-x(margin, $size)
33
+
34
+ @mixin margin-y($size)
35
+ @include spacing-y(margin, $size)
36
+
37
+ @mixin margin-all($size)
38
+ @include spacing-all(margin, $size)
39
+
40
+ @mixin padding-x($size)
41
+ @include spacing-x(padding, $size)
42
+
43
+ @mixin padding-y($size)
44
+ @include spacing-y(padding, $size)
45
+
46
+ @mixin padding-all($size)
47
+ @include spacing-all(padding, $size)
48
+
49
+ // Advanced spacing mixins
50
+ @mixin margin-auto
51
+ margin-left: auto
52
+ margin-right: auto
53
+
54
+ @mixin no-spacing
55
+ margin: 0
56
+ padding: 0
57
+
58
+ @mixin spacing-reset
59
+ @include no-spacing
@@ -0,0 +1,159 @@
1
+ // Enhanced Text Mixins - Typography utilities
2
+ @use '../variables/typography' as *
3
+ @use '../variables/colors' as *
4
+ @use '../variables/spacing' as *
5
+
6
+ // Base text mixin - foundation for all text styling
7
+ @mixin text-base($size: $font-size-base, $weight: $font-weight-base, $line-height: $line-height-base)
8
+ font-size: inherit
9
+ font-weight: $weight
10
+ line-height: $line-height
11
+ font-family: $font-family-base
12
+
13
+ // Text variants - predefined text styles
14
+ @mixin text-body
15
+ @include text-base($font-size-base, $font-weight-normal, $line-height-base)
16
+ color: $text
17
+
18
+ @mixin text-lead
19
+ @include text-base($font-size-lg, $font-weight-normal, $line-height-sm)
20
+ color: $text
21
+
22
+ @mixin text-small
23
+ @include text-base($font-size-sm, $font-weight-normal, $line-height-base)
24
+ color: $text-secondary
25
+
26
+ @mixin text-muted
27
+ @include text-base($font-size-base, $font-weight-normal, $line-height-base)
28
+ color: $text-tertiary
29
+
30
+ @mixin text-caption
31
+ @include text-base($font-size-sm, $font-weight-normal, $line-height-sm)
32
+ color: $text-quaternary
33
+
34
+ // Responsive text sizing
35
+ @mixin text-responsive($mobile-size, $desktop-size, $breakpoint: 768px)
36
+ font-size: $mobile-size
37
+
38
+ @media (min-width: $breakpoint)
39
+ font-size: $desktop-size
40
+
41
+ // Text truncation utilities
42
+ @mixin text-truncate
43
+ overflow: hidden
44
+ text-overflow: ellipsis
45
+ white-space: nowrap
46
+
47
+ @mixin text-truncate-lines($lines: 2)
48
+ display: -webkit-box
49
+ -webkit-line-clamp: $lines
50
+ -webkit-box-orient: vertical
51
+ overflow: hidden
52
+ text-overflow: ellipsis
53
+
54
+ // Text overflow with custom indicator
55
+ @mixin text-fade-out($height: 1.5em)
56
+ position: relative
57
+ max-height: $height
58
+ overflow: hidden
59
+
60
+ &::after
61
+ content: ''
62
+ position: absolute
63
+ bottom: 0
64
+ right: 0
65
+ width: 3em
66
+ height: 1.2em
67
+ background: linear-gradient(to right, transparent, $background 70%)
68
+ pointer-events: none
69
+
70
+ // Text alignment utilities
71
+ @mixin text-align($alignment)
72
+ text-align: $alignment
73
+
74
+ @mixin text-center
75
+ @include text-align(center)
76
+
77
+ @mixin text-left
78
+ @include text-align(left)
79
+
80
+ @mixin text-right
81
+ @include text-align(right)
82
+
83
+ @mixin text-justify
84
+ @include text-align(justify)
85
+
86
+ // Text transform utilities
87
+ @mixin text-transform($transform)
88
+ text-transform: $transform
89
+
90
+ @mixin text-uppercase
91
+ @include text-transform(uppercase)
92
+
93
+ @mixin text-lowercase
94
+ @include text-transform(lowercase)
95
+
96
+ @mixin text-capitalize
97
+ @include text-transform(capitalize)
98
+
99
+ // Text spacing utilities
100
+ @mixin text-spacing($letter-spacing: 0, $word-spacing: 0)
101
+ letter-spacing: $letter-spacing
102
+ word-spacing: $word-spacing
103
+
104
+ @mixin text-tracked
105
+ @include text-spacing(0.05em)
106
+
107
+ @mixin text-tight
108
+ @include text-spacing(-0.025em)
109
+
110
+ // Text selection styling
111
+ @mixin text-selection($background: $highlight, $color: $text)
112
+ &::selection
113
+ background: $background
114
+ color: $color
115
+
116
+ &::-moz-selection
117
+ background: $background
118
+ color: $color
119
+
120
+ // Text with icon integration
121
+ @mixin text-with-icon($position: 'left', $gap: 0.5rem)
122
+ display: inline-flex
123
+ align-items: center
124
+ gap: $gap
125
+
126
+ .text-icon
127
+ @if $position == 'left'
128
+ order: -1
129
+ @else if $position == 'right'
130
+ order: 1
131
+
132
+ display: inline-flex
133
+ align-items: center
134
+
135
+ // Text emphasis utilities
136
+ @mixin text-emphasis($color: $mm, $weight: $font-weight-semibold)
137
+ color: $color
138
+ font-weight: $weight
139
+
140
+ @mixin text-highlight($background: $highlight, $padding: 0.125em 0.25em)
141
+ background: $background
142
+ padding: $padding
143
+ border-radius: 2px
144
+
145
+ // Code text styling
146
+ @mixin text-code
147
+ font-family: $font-family-code
148
+ font-size: 0.875em
149
+ background: $frame
150
+ padding: 0.125em 0.25em
151
+ border-radius: 3px
152
+ border: 1px solid $border
153
+
154
+ // Text with background for readability
155
+ @mixin text-overlay($background: rgba(0, 0, 0, 0.7), $color: white)
156
+ background: $background
157
+ color: $color
158
+ padding: 0.5rem 1rem
159
+ border-radius: 4px