mithril-materialized 3.8.0 → 3.10.0
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/dist/badge.d.ts +129 -0
- package/dist/circular-progress.d.ts +43 -0
- package/dist/components.css +227 -0
- package/dist/index.css +702 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +277 -1
- package/dist/index.js +279 -0
- package/dist/index.min.css +1 -1
- package/dist/index.umd.js +279 -0
- package/dist/linear-progress.d.ts +40 -0
- package/package.json +1 -1
- package/sass/components/_badge-component.scss +203 -0
- package/sass/components/_circular-progress.scss +220 -0
- package/sass/components/_linear-progress.scss +183 -0
- package/sass/materialize.scss +4 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use "variables";
|
|
3
|
+
@use "color-variables";
|
|
4
|
+
|
|
5
|
+
/* CircularProgress Component
|
|
6
|
+
========================================================================== */
|
|
7
|
+
|
|
8
|
+
// CircularProgress component variables
|
|
9
|
+
$circular-progress-size-small: 36px !default;
|
|
10
|
+
$circular-progress-size-medium: 50px !default;
|
|
11
|
+
$circular-progress-size-large: 64px !default;
|
|
12
|
+
$circular-progress-stroke-width: 3px !default;
|
|
13
|
+
$circular-progress-default-color: var(--mm-primary-color, variables.$primary-color) !default;
|
|
14
|
+
$circular-progress-track-opacity: 0.2 !default;
|
|
15
|
+
|
|
16
|
+
// Label font sizes
|
|
17
|
+
$circular-progress-label-small: 10px !default;
|
|
18
|
+
$circular-progress-label-medium: 12px !default;
|
|
19
|
+
$circular-progress-label-large: 14px !default;
|
|
20
|
+
|
|
21
|
+
.circular-progress {
|
|
22
|
+
position: relative;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
color: $circular-progress-default-color;
|
|
27
|
+
|
|
28
|
+
// Size variants
|
|
29
|
+
&--small {
|
|
30
|
+
width: $circular-progress-size-small;
|
|
31
|
+
height: $circular-progress-size-small;
|
|
32
|
+
|
|
33
|
+
.circular-progress__label {
|
|
34
|
+
font-size: $circular-progress-label-small;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--medium {
|
|
39
|
+
width: $circular-progress-size-medium;
|
|
40
|
+
height: $circular-progress-size-medium;
|
|
41
|
+
|
|
42
|
+
.circular-progress__label {
|
|
43
|
+
font-size: $circular-progress-label-medium;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&--large {
|
|
48
|
+
width: $circular-progress-size-large;
|
|
49
|
+
height: $circular-progress-size-large;
|
|
50
|
+
|
|
51
|
+
.circular-progress__label {
|
|
52
|
+
font-size: $circular-progress-label-large;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.circular-progress__svg {
|
|
58
|
+
width: 100%;
|
|
59
|
+
height: 100%;
|
|
60
|
+
transform: rotate(-90deg);
|
|
61
|
+
transform-origin: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.circular-progress__circle {
|
|
65
|
+
transition: stroke-dashoffset 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
66
|
+
|
|
67
|
+
&--track {
|
|
68
|
+
opacity: $circular-progress-track-opacity;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--indicator {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.circular-progress__label {
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: 50%;
|
|
79
|
+
left: 50%;
|
|
80
|
+
transform: translate(-50%, -50%);
|
|
81
|
+
font-weight: 500;
|
|
82
|
+
text-align: center;
|
|
83
|
+
line-height: 1;
|
|
84
|
+
color: currentColor;
|
|
85
|
+
user-select: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Indeterminate mode animation
|
|
89
|
+
.circular-progress--indeterminate {
|
|
90
|
+
.circular-progress__svg {
|
|
91
|
+
animation: circular-rotate 2s linear infinite;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.circular-progress__circle--indicator {
|
|
95
|
+
stroke-dasharray: 80, 200;
|
|
96
|
+
stroke-dashoffset: 0;
|
|
97
|
+
animation: circular-dash 1.5s ease-in-out infinite;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Determinate mode
|
|
102
|
+
.circular-progress--determinate {
|
|
103
|
+
.circular-progress__circle--indicator {
|
|
104
|
+
transition: stroke-dashoffset 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Color variants using Materialize colors
|
|
109
|
+
.circular-progress--red { color: color-variables.color("red", "base"); }
|
|
110
|
+
.circular-progress--pink { color: color-variables.color("pink", "base"); }
|
|
111
|
+
.circular-progress--purple { color: color-variables.color("purple", "base"); }
|
|
112
|
+
.circular-progress--deep-purple { color: color-variables.color("deep-purple", "base"); }
|
|
113
|
+
.circular-progress--indigo { color: color-variables.color("indigo", "base"); }
|
|
114
|
+
.circular-progress--blue { color: color-variables.color("blue", "base"); }
|
|
115
|
+
.circular-progress--light-blue { color: color-variables.color("light-blue", "base"); }
|
|
116
|
+
.circular-progress--cyan { color: color-variables.color("cyan", "base"); }
|
|
117
|
+
.circular-progress--teal { color: color-variables.color("teal", "base"); }
|
|
118
|
+
.circular-progress--green { color: color-variables.color("green", "base"); }
|
|
119
|
+
.circular-progress--light-green { color: color-variables.color("light-green", "base"); }
|
|
120
|
+
.circular-progress--lime { color: color-variables.color("lime", "base"); }
|
|
121
|
+
.circular-progress--yellow { color: color-variables.color("yellow", "base"); }
|
|
122
|
+
.circular-progress--amber { color: color-variables.color("amber", "base"); }
|
|
123
|
+
.circular-progress--orange { color: color-variables.color("orange", "base"); }
|
|
124
|
+
.circular-progress--deep-orange { color: color-variables.color("deep-orange", "base"); }
|
|
125
|
+
.circular-progress--brown { color: color-variables.color("brown", "base"); }
|
|
126
|
+
.circular-progress--grey { color: color-variables.color("grey", "base"); }
|
|
127
|
+
.circular-progress--blue-grey { color: color-variables.color("blue-grey", "base"); }
|
|
128
|
+
|
|
129
|
+
// Color intensity modifiers
|
|
130
|
+
.circular-progress--lighten-5 { filter: brightness(1.4); }
|
|
131
|
+
.circular-progress--lighten-4 { filter: brightness(1.3); }
|
|
132
|
+
.circular-progress--lighten-3 { filter: brightness(1.2); }
|
|
133
|
+
.circular-progress--lighten-2 { filter: brightness(1.1); }
|
|
134
|
+
.circular-progress--lighten-1 { filter: brightness(1.05); }
|
|
135
|
+
.circular-progress--darken-1 { filter: brightness(0.95); }
|
|
136
|
+
.circular-progress--darken-2 { filter: brightness(0.9); }
|
|
137
|
+
.circular-progress--darken-3 { filter: brightness(0.8); }
|
|
138
|
+
.circular-progress--darken-4 { filter: brightness(0.7); }
|
|
139
|
+
|
|
140
|
+
// Animations
|
|
141
|
+
@keyframes circular-rotate {
|
|
142
|
+
0% {
|
|
143
|
+
transform: rotate(-90deg);
|
|
144
|
+
}
|
|
145
|
+
100% {
|
|
146
|
+
transform: rotate(270deg);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@keyframes circular-dash {
|
|
151
|
+
0% {
|
|
152
|
+
stroke-dasharray: 1, 200;
|
|
153
|
+
stroke-dashoffset: 0;
|
|
154
|
+
}
|
|
155
|
+
50% {
|
|
156
|
+
stroke-dasharray: 100, 200;
|
|
157
|
+
stroke-dashoffset: -15;
|
|
158
|
+
}
|
|
159
|
+
100% {
|
|
160
|
+
stroke-dasharray: 100, 200;
|
|
161
|
+
stroke-dashoffset: -125;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Dark theme support
|
|
166
|
+
[data-theme="dark"] {
|
|
167
|
+
.circular-progress {
|
|
168
|
+
.circular-progress__circle--track {
|
|
169
|
+
opacity: 0.15;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
// RTL support
|
|
175
|
+
[dir="rtl"] {
|
|
176
|
+
.circular-progress__svg {
|
|
177
|
+
transform: rotate(90deg);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.circular-progress--indeterminate .circular-progress__svg {
|
|
181
|
+
animation: circular-rotate-rtl 2s linear infinite;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@keyframes circular-rotate-rtl {
|
|
185
|
+
0% {
|
|
186
|
+
transform: rotate(90deg);
|
|
187
|
+
}
|
|
188
|
+
100% {
|
|
189
|
+
transform: rotate(-270deg);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// Reduced motion support
|
|
195
|
+
@media (prefers-reduced-motion: reduce) {
|
|
196
|
+
.circular-progress__circle,
|
|
197
|
+
.circular-progress__svg {
|
|
198
|
+
transition: none !important;
|
|
199
|
+
animation: none !important;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.circular-progress--indeterminate {
|
|
203
|
+
.circular-progress__svg {
|
|
204
|
+
animation: none;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.circular-progress__circle--indicator {
|
|
208
|
+
animation: none;
|
|
209
|
+
stroke-dasharray: 100, 200;
|
|
210
|
+
stroke-dashoffset: -50;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// High contrast mode support
|
|
216
|
+
@media (prefers-contrast: high) {
|
|
217
|
+
.circular-progress__circle--track {
|
|
218
|
+
opacity: 0.4;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use "variables";
|
|
3
|
+
@use "color-variables";
|
|
4
|
+
|
|
5
|
+
/* LinearProgress Component
|
|
6
|
+
========================================================================== */
|
|
7
|
+
|
|
8
|
+
// LinearProgress component variables
|
|
9
|
+
$linear-progress-height-small: 4px !default;
|
|
10
|
+
$linear-progress-height-medium: 8px !default;
|
|
11
|
+
$linear-progress-height-large: 12px !default;
|
|
12
|
+
$linear-progress-default-color: var(--mm-primary-color, variables.$primary-color) !default;
|
|
13
|
+
$linear-progress-track-bg: rgba(0, 0, 0, 0.1) !default;
|
|
14
|
+
$linear-progress-track-bg-dark: rgba(255, 255, 255, 0.15) !default;
|
|
15
|
+
$linear-progress-border-radius: 2px !default;
|
|
16
|
+
$linear-progress-gap: 12px !default;
|
|
17
|
+
|
|
18
|
+
// Label font size
|
|
19
|
+
$linear-progress-label-font-size: 0.875rem !default;
|
|
20
|
+
|
|
21
|
+
.linear-progress {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: $linear-progress-gap;
|
|
25
|
+
width: 100%;
|
|
26
|
+
color: $linear-progress-default-color;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.linear-progress__track {
|
|
30
|
+
position: relative;
|
|
31
|
+
flex: 1;
|
|
32
|
+
background-color: $linear-progress-track-bg;
|
|
33
|
+
border-radius: $linear-progress-border-radius;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
|
|
36
|
+
// Size variants
|
|
37
|
+
&--small {
|
|
38
|
+
height: $linear-progress-height-small;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--medium {
|
|
42
|
+
height: $linear-progress-height-medium;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&--large {
|
|
46
|
+
height: $linear-progress-height-large;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.linear-progress__bar {
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: 0;
|
|
53
|
+
left: 0;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
background-color: currentColor;
|
|
56
|
+
transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
57
|
+
border-radius: $linear-progress-border-radius;
|
|
58
|
+
|
|
59
|
+
// Indeterminate mode animation
|
|
60
|
+
&--indeterminate {
|
|
61
|
+
width: 30%;
|
|
62
|
+
animation: linear-indeterminate 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.linear-progress__label {
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
font-size: $linear-progress-label-font-size;
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
white-space: nowrap;
|
|
71
|
+
color: currentColor;
|
|
72
|
+
user-select: none;
|
|
73
|
+
min-width: 40px;
|
|
74
|
+
text-align: right;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Color variants using Materialize colors
|
|
78
|
+
.linear-progress--red { color: color-variables.color("red", "base"); }
|
|
79
|
+
.linear-progress--pink { color: color-variables.color("pink", "base"); }
|
|
80
|
+
.linear-progress--purple { color: color-variables.color("purple", "base"); }
|
|
81
|
+
.linear-progress--deep-purple { color: color-variables.color("deep-purple", "base"); }
|
|
82
|
+
.linear-progress--indigo { color: color-variables.color("indigo", "base"); }
|
|
83
|
+
.linear-progress--blue { color: color-variables.color("blue", "base"); }
|
|
84
|
+
.linear-progress--light-blue { color: color-variables.color("light-blue", "base"); }
|
|
85
|
+
.linear-progress--cyan { color: color-variables.color("cyan", "base"); }
|
|
86
|
+
.linear-progress--teal { color: color-variables.color("teal", "base"); }
|
|
87
|
+
.linear-progress--green { color: color-variables.color("green", "base"); }
|
|
88
|
+
.linear-progress--light-green { color: color-variables.color("light-green", "base"); }
|
|
89
|
+
.linear-progress--lime { color: color-variables.color("lime", "base"); }
|
|
90
|
+
.linear-progress--yellow { color: color-variables.color("yellow", "base"); }
|
|
91
|
+
.linear-progress--amber { color: color-variables.color("amber", "base"); }
|
|
92
|
+
.linear-progress--orange { color: color-variables.color("orange", "base"); }
|
|
93
|
+
.linear-progress--deep-orange { color: color-variables.color("deep-orange", "base"); }
|
|
94
|
+
.linear-progress--brown { color: color-variables.color("brown", "base"); }
|
|
95
|
+
.linear-progress--grey { color: color-variables.color("grey", "base"); }
|
|
96
|
+
.linear-progress--blue-grey { color: color-variables.color("blue-grey", "base"); }
|
|
97
|
+
|
|
98
|
+
// Color intensity modifiers
|
|
99
|
+
.linear-progress--lighten-5 { filter: brightness(1.4); }
|
|
100
|
+
.linear-progress--lighten-4 { filter: brightness(1.3); }
|
|
101
|
+
.linear-progress--lighten-3 { filter: brightness(1.2); }
|
|
102
|
+
.linear-progress--lighten-2 { filter: brightness(1.1); }
|
|
103
|
+
.linear-progress--lighten-1 { filter: brightness(1.05); }
|
|
104
|
+
.linear-progress--darken-1 { filter: brightness(0.95); }
|
|
105
|
+
.linear-progress--darken-2 { filter: brightness(0.9); }
|
|
106
|
+
.linear-progress--darken-3 { filter: brightness(0.8); }
|
|
107
|
+
.linear-progress--darken-4 { filter: brightness(0.7); }
|
|
108
|
+
|
|
109
|
+
// Indeterminate animation
|
|
110
|
+
@keyframes linear-indeterminate {
|
|
111
|
+
0% {
|
|
112
|
+
left: -35%;
|
|
113
|
+
right: 100%;
|
|
114
|
+
}
|
|
115
|
+
60% {
|
|
116
|
+
left: 100%;
|
|
117
|
+
right: -90%;
|
|
118
|
+
}
|
|
119
|
+
100% {
|
|
120
|
+
left: 100%;
|
|
121
|
+
right: -90%;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Dark theme support
|
|
126
|
+
[data-theme="dark"] {
|
|
127
|
+
.linear-progress__track {
|
|
128
|
+
background-color: $linear-progress-track-bg-dark;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// RTL support
|
|
133
|
+
[dir="rtl"] {
|
|
134
|
+
.linear-progress__label {
|
|
135
|
+
text-align: left;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.linear-progress__bar--indeterminate {
|
|
139
|
+
animation: linear-indeterminate-rtl 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@keyframes linear-indeterminate-rtl {
|
|
143
|
+
0% {
|
|
144
|
+
right: -35%;
|
|
145
|
+
left: 100%;
|
|
146
|
+
}
|
|
147
|
+
60% {
|
|
148
|
+
right: 100%;
|
|
149
|
+
left: -90%;
|
|
150
|
+
}
|
|
151
|
+
100% {
|
|
152
|
+
right: 100%;
|
|
153
|
+
left: -90%;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Reduced motion support
|
|
159
|
+
@media (prefers-reduced-motion: reduce) {
|
|
160
|
+
.linear-progress__bar {
|
|
161
|
+
transition: none !important;
|
|
162
|
+
animation: none !important;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.linear-progress__bar--indeterminate {
|
|
166
|
+
animation: none;
|
|
167
|
+
width: 100%;
|
|
168
|
+
left: 0;
|
|
169
|
+
opacity: 0.5;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// High contrast mode support
|
|
174
|
+
@media (prefers-contrast: high) {
|
|
175
|
+
.linear-progress__track {
|
|
176
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
177
|
+
border: 1px solid currentColor;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
[data-theme="dark"] .linear-progress__track {
|
|
181
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
182
|
+
}
|
|
183
|
+
}
|