mtrl 0.5.2 → 0.5.3

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 (69) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +1 -1
  3. package/dist/package.json +1 -1
  4. package/dist/styles.css +1 -1
  5. package/package.json +3 -2
  6. package/src/styles/abstract/_base.scss +2 -0
  7. package/src/styles/abstract/_config.scss +28 -0
  8. package/src/styles/abstract/_functions.scss +124 -0
  9. package/src/styles/abstract/_mixins.scss +401 -0
  10. package/src/styles/abstract/_theme.scss +269 -0
  11. package/src/styles/abstract/_variables.scss +338 -0
  12. package/src/styles/base/_reset.scss +86 -0
  13. package/src/styles/base/_typography.scss +155 -0
  14. package/src/styles/components/_badge.scss +183 -0
  15. package/src/styles/components/_bottom-app-bar.scss +103 -0
  16. package/src/styles/components/_button.scss +756 -0
  17. package/src/styles/components/_card.scss +401 -0
  18. package/src/styles/components/_carousel.scss +645 -0
  19. package/src/styles/components/_checkbox.scss +231 -0
  20. package/src/styles/components/_chips.scss +639 -0
  21. package/src/styles/components/_datepicker.scss +358 -0
  22. package/src/styles/components/_dialog.scss +259 -0
  23. package/src/styles/components/_divider.scss +57 -0
  24. package/src/styles/components/_extended-fab.scss +309 -0
  25. package/src/styles/components/_fab.scss +244 -0
  26. package/src/styles/components/_list.scss +774 -0
  27. package/src/styles/components/_menu.scss +245 -0
  28. package/src/styles/components/_navigation-mobile.scss +244 -0
  29. package/src/styles/components/_navigation-system.scss +151 -0
  30. package/src/styles/components/_navigation.scss +407 -0
  31. package/src/styles/components/_progress.scss +101 -0
  32. package/src/styles/components/_radios.scss +187 -0
  33. package/src/styles/components/_search.scss +306 -0
  34. package/src/styles/components/_segmented-button.scss +227 -0
  35. package/src/styles/components/_select.scss +274 -0
  36. package/src/styles/components/_sheet.scss +236 -0
  37. package/src/styles/components/_slider.scss +264 -0
  38. package/src/styles/components/_snackbar.scss +211 -0
  39. package/src/styles/components/_switch.scss +305 -0
  40. package/src/styles/components/_tabs.scss +421 -0
  41. package/src/styles/components/_textfield.scss +1024 -0
  42. package/src/styles/components/_timepicker.scss +451 -0
  43. package/src/styles/components/_tooltip.scss +241 -0
  44. package/src/styles/components/_top-app-bar.scss +225 -0
  45. package/src/styles/main.scss +129 -0
  46. package/src/styles/themes/_autumn.scss +105 -0
  47. package/src/styles/themes/_base-theme.scss +85 -0
  48. package/src/styles/themes/_baseline.scss +173 -0
  49. package/src/styles/themes/_bluekhaki.scss +125 -0
  50. package/src/styles/themes/_brownbeige.scss +125 -0
  51. package/src/styles/themes/_browngreen.scss +125 -0
  52. package/src/styles/themes/_forest.scss +77 -0
  53. package/src/styles/themes/_greenbeige.scss +125 -0
  54. package/src/styles/themes/_index.scss +19 -0
  55. package/src/styles/themes/_material.scss +125 -0
  56. package/src/styles/themes/_ocean.scss +77 -0
  57. package/src/styles/themes/_sageivory.scss +125 -0
  58. package/src/styles/themes/_spring.scss +77 -0
  59. package/src/styles/themes/_summer.scss +87 -0
  60. package/src/styles/themes/_sunset.scss +60 -0
  61. package/src/styles/themes/_tealcaramel.scss +125 -0
  62. package/src/styles/themes/_winter.scss +77 -0
  63. package/src/styles/utilities/_colors.scss +154 -0
  64. package/src/styles/utilities/_flexbox.scss +194 -0
  65. package/src/styles/utilities/_layout.scss +665 -0
  66. package/src/styles/utilities/_ripple.scss +79 -0
  67. package/src/styles/utilities/_spacing.scss +139 -0
  68. package/src/styles/utilities/_typography.scss +178 -0
  69. package/src/styles/utilities/_visibility.scss +142 -0
@@ -0,0 +1,79 @@
1
+ // src/components/ripple/_ripple.scss
2
+ @use '../../styles/abstract/base' as base;
3
+ @use '../../styles/abstract/variables' as v;
4
+ @use '../../styles/abstract/functions' as f;
5
+ @use '../../styles/abstract/mixins' as m;
6
+ @use '../../styles/abstract/theme' as t;
7
+
8
+ $component: '#{base.$prefix}-ripple';
9
+
10
+ .#{$component} {
11
+ // Ripple container
12
+ position: absolute;
13
+ top: 0;
14
+ left: 0;
15
+ right: 0;
16
+ bottom: 0;
17
+ overflow: hidden;
18
+ border-radius: inherit;
19
+ pointer-events: none;
20
+ z-index: 0;
21
+
22
+ &-wave {
23
+ position: absolute;
24
+ border-radius: 50%;
25
+
26
+ // Make the ripple more visible with these changes:
27
+ background-color: currentColor;
28
+ opacity: 0; // Start with 0 opacity
29
+ transform: scale(0); // Start slightly larger for better visibility
30
+ pointer-events: none;
31
+ will-change: transform, opacity;
32
+
33
+ // Animation
34
+ transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
35
+ opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
36
+
37
+ // Active ripple
38
+ &.active {
39
+ transform: scale(1);
40
+ opacity: v.state('hover-state-layer-opacity');
41
+ }
42
+
43
+ &.fade-out {
44
+ opacity: 0;
45
+ }
46
+ }
47
+ }
48
+
49
+ // Standalone utility for adding ripple to any element
50
+ [data-ripple] {
51
+ position: relative;
52
+ overflow: hidden;
53
+
54
+ &::after {
55
+ content: '';
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ right: 0;
60
+ bottom: 0;
61
+ z-index: 0;
62
+ pointer-events: none;
63
+ }
64
+
65
+ // Handle ripple color based on data attribute
66
+ &[data-ripple="light"]::after {
67
+ background-color: rgba(255, 255, 255, 0.3);
68
+ }
69
+
70
+ &[data-ripple="dark"]::after {
71
+ background-color: rgba(0, 0, 0, 0.1);
72
+ }
73
+
74
+ // Make content appear above ripple
75
+ > * {
76
+ position: relative;
77
+ z-index: 1;
78
+ }
79
+ }
@@ -0,0 +1,139 @@
1
+ // src/styles/utilities/_spacing.scss
2
+ @use '../abstract/base' as base;
3
+ @use 'sass:map';
4
+
5
+ $prefix: base.$prefix;
6
+
7
+ // Spacing scale
8
+ $spacing-scale: (
9
+ '0': 0,
10
+ '1': 4px,
11
+ '2': 8px,
12
+ '3': 12px,
13
+ '4': 16px,
14
+ '5': 20px,
15
+ '6': 24px,
16
+ '8': 32px,
17
+ '10': 40px,
18
+ '12': 48px,
19
+ '14': 56px,
20
+ '16': 64px,
21
+ '20': 80px,
22
+ '24': 96px,
23
+ '32': 128px,
24
+ 'auto': auto
25
+ );
26
+
27
+ // Generate spacing utilities
28
+ @each $key, $value in $spacing-scale {
29
+ // Margin utilities
30
+ .#{$prefix}-m-#{$key} {
31
+ margin: $value;
32
+ }
33
+
34
+ .#{$prefix}-mx-#{$key} {
35
+ margin-left: $value;
36
+ margin-right: $value;
37
+ }
38
+
39
+ .#{$prefix}-my-#{$key} {
40
+ margin-top: $value;
41
+ margin-bottom: $value;
42
+ }
43
+
44
+ .#{$prefix}-mt-#{$key} {
45
+ margin-top: $value;
46
+ }
47
+
48
+ .#{$prefix}-mb-#{$key} {
49
+ margin-bottom: $value;
50
+ }
51
+
52
+ .#{$prefix}-ml-#{$key} {
53
+ margin-left: $value;
54
+ }
55
+
56
+ .#{$prefix}-mr-#{$key} {
57
+ margin-right: $value;
58
+ }
59
+
60
+ // Padding utilities
61
+ .#{$prefix}-p-#{$key} {
62
+ padding: $value;
63
+ }
64
+
65
+ .#{$prefix}-px-#{$key} {
66
+ padding-left: $value;
67
+ padding-right: $value;
68
+ }
69
+
70
+ .#{$prefix}-py-#{$key} {
71
+ padding-top: $value;
72
+ padding-bottom: $value;
73
+ }
74
+
75
+ .#{$prefix}-pt-#{$key} {
76
+ padding-top: $value;
77
+ }
78
+
79
+ .#{$prefix}-pb-#{$key} {
80
+ padding-bottom: $value;
81
+ }
82
+
83
+ .#{$prefix}-pl-#{$key} {
84
+ padding-left: $value;
85
+ }
86
+
87
+ .#{$prefix}-pr-#{$key} {
88
+ padding-right: $value;
89
+ }
90
+ }
91
+
92
+ // Gap utilities
93
+ @each $key, $value in $spacing-scale {
94
+ .#{$prefix}-gap-#{$key} {
95
+ gap: $value;
96
+ }
97
+
98
+ .#{$prefix}-gap-x-#{$key} {
99
+ column-gap: $value;
100
+ }
101
+
102
+ .#{$prefix}-gap-y-#{$key} {
103
+ row-gap: $value;
104
+ }
105
+ }
106
+
107
+ // Responsive margin utilities for common breakpoints
108
+ @each $breakpoint in (sm, md, lg, xl) {
109
+ @media (min-width: map.get((
110
+ sm: 600px,
111
+ md: 960px,
112
+ lg: 1280px,
113
+ xl: 1920px
114
+ ), $breakpoint)) {
115
+ @each $key, $value in (
116
+ '0': 0,
117
+ '4': 16px,
118
+ '6': 24px,
119
+ '8': 32px,
120
+ '10': 40px,
121
+ '12': 48px,
122
+ 'auto': auto
123
+ ) {
124
+ .#{$prefix}-#{$breakpoint}:m-#{$key} {
125
+ margin: $value;
126
+ }
127
+
128
+ .#{$prefix}-#{$breakpoint}:mx-#{$key} {
129
+ margin-left: $value;
130
+ margin-right: $value;
131
+ }
132
+
133
+ .#{$prefix}-#{$breakpoint}:my-#{$key} {
134
+ margin-top: $value;
135
+ margin-bottom: $value;
136
+ }
137
+ }
138
+ }
139
+ }
@@ -0,0 +1,178 @@
1
+ // src/styles/utilities/_typography.scss
2
+ @use '../abstract/base' as base;
3
+ @use '../abstract/mixins' as m;
4
+
5
+ $prefix: base.$prefix;
6
+
7
+ // Font style utilities
8
+ .#{$prefix}-italic {
9
+ font-style: italic;
10
+ }
11
+
12
+ .#{$prefix}-not-italic {
13
+ font-style: normal;
14
+ }
15
+
16
+ // Letter spacing
17
+ .#{$prefix}-tracking-tighter {
18
+ letter-spacing: -0.05em;
19
+ }
20
+
21
+ .#{$prefix}-tracking-tight {
22
+ letter-spacing: -0.025em;
23
+ }
24
+
25
+ .#{$prefix}-tracking-normal {
26
+ letter-spacing: 0;
27
+ }
28
+
29
+ .#{$prefix}-tracking-wide {
30
+ letter-spacing: 0.025em;
31
+ }
32
+
33
+ .#{$prefix}-tracking-wider {
34
+ letter-spacing: 0.05em;
35
+ }
36
+
37
+ .#{$prefix}-tracking-widest {
38
+ letter-spacing: 0.1em;
39
+ }
40
+
41
+ // Line height
42
+ .#{$prefix}-leading-none {
43
+ line-height: 1;
44
+ }
45
+
46
+ .#{$prefix}-leading-tight {
47
+ line-height: 1.25;
48
+ }
49
+
50
+ .#{$prefix}-leading-snug {
51
+ line-height: 1.375;
52
+ }
53
+
54
+ .#{$prefix}-leading-normal {
55
+ line-height: 1.5;
56
+ }
57
+
58
+ .#{$prefix}-leading-relaxed {
59
+ line-height: 1.625;
60
+ }
61
+
62
+ .#{$prefix}-leading-loose {
63
+ line-height: 2;
64
+ }
65
+
66
+ // Text transform
67
+ .#{$prefix}-uppercase {
68
+ text-transform: uppercase;
69
+ }
70
+
71
+ .#{$prefix}-lowercase {
72
+ text-transform: lowercase;
73
+ }
74
+
75
+ .#{$prefix}-capitalize {
76
+ text-transform: capitalize;
77
+ }
78
+
79
+ .#{$prefix}-normal-case {
80
+ text-transform: none;
81
+ }
82
+
83
+ // Text decoration
84
+ .#{$prefix}-underline {
85
+ text-decoration: underline;
86
+ }
87
+
88
+ .#{$prefix}-line-through {
89
+ text-decoration: line-through;
90
+ }
91
+
92
+ .#{$prefix}-no-underline {
93
+ text-decoration: none;
94
+ }
95
+
96
+ // Font smoothing
97
+ .#{$prefix}-antialiased {
98
+ -webkit-font-smoothing: antialiased;
99
+ -moz-osx-font-smoothing: grayscale;
100
+ }
101
+
102
+ .#{$prefix}-subpixel-antialiased {
103
+ -webkit-font-smoothing: auto;
104
+ -moz-osx-font-smoothing: auto;
105
+ }
106
+
107
+ // Text overflow
108
+ .#{$prefix}-truncate {
109
+ @include m.truncate;
110
+ }
111
+
112
+ .#{$prefix}-overflow-ellipsis {
113
+ text-overflow: ellipsis;
114
+ }
115
+
116
+ .#{$prefix}-overflow-clip {
117
+ text-overflow: clip;
118
+ }
119
+
120
+ // Word break
121
+ .#{$prefix}-break-normal {
122
+ overflow-wrap: normal;
123
+ word-break: normal;
124
+ }
125
+
126
+ .#{$prefix}-break-words {
127
+ overflow-wrap: break-word;
128
+ }
129
+
130
+ .#{$prefix}-break-all {
131
+ word-break: break-all;
132
+ }
133
+
134
+ // Text columns for easier reading
135
+ .#{$prefix}-columns-1 {
136
+ column-count: 1;
137
+ }
138
+
139
+ .#{$prefix}-columns-2 {
140
+ column-count: 2;
141
+ }
142
+
143
+ .#{$prefix}-columns-3 {
144
+ column-count: 3;
145
+ }
146
+
147
+ .#{$prefix}-columns-gap-4 {
148
+ column-gap: 1rem;
149
+ }
150
+
151
+ .#{$prefix}-columns-gap-8 {
152
+ column-gap: 2rem;
153
+ }
154
+
155
+ // Text vertical alignment
156
+ .#{$prefix}-align-baseline {
157
+ vertical-align: baseline;
158
+ }
159
+
160
+ .#{$prefix}-align-top {
161
+ vertical-align: top;
162
+ }
163
+
164
+ .#{$prefix}-align-middle {
165
+ vertical-align: middle;
166
+ }
167
+
168
+ .#{$prefix}-align-bottom {
169
+ vertical-align: bottom;
170
+ }
171
+
172
+ .#{$prefix}-align-text-top {
173
+ vertical-align: text-top;
174
+ }
175
+
176
+ .#{$prefix}-align-text-bottom {
177
+ vertical-align: text-bottom;
178
+ }
@@ -0,0 +1,142 @@
1
+ // src/styles/utilities/_visibility.scss
2
+ @use '../abstract/base' as base;
3
+ @use '../abstract/mixins' as m;
4
+ @use 'sass:map';
5
+
6
+ $prefix: base.$prefix;
7
+
8
+ // Hide element but keep it accessible to screen readers
9
+ .#{$prefix}-sr-only {
10
+ @include m.visually-hidden;
11
+ }
12
+
13
+ // Standard display utilities
14
+ .#{$prefix}-block {
15
+ display: block;
16
+ }
17
+
18
+ .#{$prefix}-inline-block {
19
+ display: inline-block;
20
+ }
21
+
22
+ .#{$prefix}-inline {
23
+ display: inline;
24
+ }
25
+
26
+ .#{$prefix}-flex {
27
+ display: flex;
28
+ }
29
+
30
+ .#{$prefix}-inline-flex {
31
+ display: inline-flex;
32
+ }
33
+
34
+ .#{$prefix}-grid {
35
+ display: grid;
36
+ }
37
+
38
+ .#{$prefix}-inline-grid {
39
+ display: inline-grid;
40
+ }
41
+
42
+ .#{$prefix}-hidden {
43
+ display: none;
44
+ }
45
+
46
+ // Visibility
47
+ .#{$prefix}-visible {
48
+ visibility: visible;
49
+ }
50
+
51
+ .#{$prefix}-invisible {
52
+ visibility: hidden;
53
+ }
54
+
55
+ // Responsive visibility utilities
56
+ $breakpoints: (
57
+ 'sm': 600px,
58
+ 'md': 960px,
59
+ 'lg': 1280px,
60
+ 'xl': 1920px
61
+ );
62
+
63
+ @each $breakpoint, $value in $breakpoints {
64
+ // Hide on and above a breakpoint
65
+ .#{$prefix}-hide-#{$breakpoint}-up {
66
+ @media (min-width: $value) {
67
+ display: none !important;
68
+ }
69
+ }
70
+
71
+ // Hide below a breakpoint
72
+ .#{$prefix}-hide-#{$breakpoint}-down {
73
+ @media (max-width: $value - 1) {
74
+ display: none !important;
75
+ }
76
+ }
77
+
78
+ // Show only at and above a breakpoint
79
+ .#{$prefix}-show-#{$breakpoint}-up {
80
+ display: none !important;
81
+
82
+ @media (min-width: $value) {
83
+ display: block !important;
84
+ }
85
+ }
86
+
87
+ // Show only below a breakpoint
88
+ .#{$prefix}-show-#{$breakpoint}-down {
89
+ display: none !important;
90
+
91
+ @media (max-width: $value - 1) {
92
+ display: block !important;
93
+ }
94
+ }
95
+ }
96
+
97
+ // Print visibility
98
+ .#{$prefix}-print-only {
99
+ display: none !important;
100
+
101
+ @media print {
102
+ display: block !important;
103
+ }
104
+ }
105
+
106
+ .#{$prefix}-print-hidden {
107
+ @media print {
108
+ display: none !important;
109
+ }
110
+ }
111
+
112
+ // Positioning utilities
113
+ .#{$prefix}-relative {
114
+ position: relative;
115
+ }
116
+
117
+ .#{$prefix}-absolute {
118
+ position: absolute;
119
+ }
120
+
121
+ .#{$prefix}-fixed {
122
+ position: fixed;
123
+ }
124
+
125
+ .#{$prefix}-sticky {
126
+ position: sticky;
127
+ }
128
+
129
+ // Accessibility utilities
130
+ .#{$prefix}-focusable {
131
+ &:focus-visible {
132
+ outline: 2px solid var(--#{$prefix}-sys-color-primary);
133
+ outline-offset: 2px;
134
+ }
135
+ }
136
+
137
+ // Elevation utilities
138
+ @for $i from 0 through 5 {
139
+ .#{$prefix}-elevation-#{$i} {
140
+ @include m.elevation($i);
141
+ }
142
+ }