mithril-materialized 2.0.0-beta.5 → 2.0.0-beta.7

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 (37) hide show
  1. package/dist/advanced.css +1888 -0
  2. package/dist/breadcrumb.d.ts +53 -0
  3. package/dist/components.css +2310 -0
  4. package/dist/core.css +3402 -0
  5. package/dist/file-upload.d.ts +34 -0
  6. package/dist/forms.css +2284 -0
  7. package/dist/index.css +1262 -83
  8. package/dist/index.d.ts +5 -0
  9. package/dist/index.esm.js +874 -33
  10. package/dist/index.js +885 -32
  11. package/dist/index.min.css +2 -2
  12. package/dist/index.umd.js +885 -32
  13. package/dist/pickers.css +487 -0
  14. package/dist/sidenav.d.ts +76 -0
  15. package/dist/tabs.d.ts +0 -2
  16. package/dist/theme-switcher.d.ts +49 -0
  17. package/dist/utilities.css +3197 -0
  18. package/dist/wizard.d.ts +58 -0
  19. package/package.json +11 -5
  20. package/sass/components/_breadcrumb.scss +248 -0
  21. package/sass/components/_buttons.scss +3 -3
  22. package/sass/components/_collapsible.scss +8 -8
  23. package/sass/components/_datepicker.scss +17 -15
  24. package/sass/components/_file-upload.scss +228 -0
  25. package/sass/components/_global.scss +7 -5
  26. package/sass/components/_modal.scss +5 -2
  27. package/sass/components/_navbar.scss +13 -5
  28. package/sass/components/_sidenav.scss +164 -7
  29. package/sass/components/_tabs.scss +5 -4
  30. package/sass/components/_theme-switcher.scss +120 -0
  31. package/sass/components/_theme-variables.scss +187 -0
  32. package/sass/components/_timepicker.scss +5 -5
  33. package/sass/components/_wizard.scss +416 -0
  34. package/sass/components/forms/_input-fields.scss +34 -12
  35. package/sass/components/forms/_radio-buttons.scss +10 -10
  36. package/sass/components/forms/_switches.scss +6 -6
  37. package/sass/materialize.scss +7 -0
@@ -0,0 +1,187 @@
1
+ // Theme Variables using CSS Custom Properties
2
+ // This enables runtime theme switching including dark mode
3
+
4
+ :root {
5
+ // Light theme (default)
6
+ --mm-primary-color: #26a69a;
7
+ --mm-primary-color-light: #80cbc4;
8
+ --mm-primary-color-dark: #00695c;
9
+
10
+ --mm-secondary-color: #ff6f00;
11
+ --mm-secondary-color-light: #ffa726;
12
+ --mm-secondary-color-dark: #ef6c00;
13
+
14
+ // Background colors
15
+ --mm-background-color: #ffffff;
16
+ --mm-surface-color: #ffffff;
17
+ --mm-card-background: #ffffff;
18
+
19
+ // Text colors
20
+ --mm-text-primary: rgba(0, 0, 0, 0.87);
21
+ --mm-text-secondary: rgba(0, 0, 0, 0.6);
22
+ --mm-text-disabled: rgba(0, 0, 0, 0.38);
23
+ --mm-text-hint: rgba(0, 0, 0, 0.38);
24
+
25
+ // Border and divider colors
26
+ --mm-border-color: rgba(0, 0, 0, 0.12);
27
+ --mm-divider-color: rgba(0, 0, 0, 0.12);
28
+
29
+ // Input colors
30
+ --mm-input-background: #ffffff;
31
+ --mm-input-border: rgba(0, 0, 0, 0.42);
32
+ --mm-input-border-focus: var(--mm-primary-color);
33
+ --mm-input-text: var(--mm-text-primary);
34
+
35
+ // Button colors
36
+ --mm-button-background: var(--mm-primary-color);
37
+ --mm-button-text: #ffffff;
38
+ --mm-button-flat-text: var(--mm-primary-color);
39
+
40
+ // Navigation colors
41
+ --mm-nav-background: var(--mm-primary-color);
42
+ --mm-nav-text: #ffffff;
43
+ --mm-nav-active-text: #ffffff;
44
+
45
+ // Modal and overlay colors
46
+ --mm-modal-background: #ffffff;
47
+ --mm-overlay-background: rgba(0, 0, 0, 0.5);
48
+
49
+ // Shadow colors
50
+ --mm-shadow-color: rgba(0, 0, 0, 0.16);
51
+ --mm-shadow-umbra: rgba(0, 0, 0, 0.2);
52
+ --mm-shadow-penumbra: rgba(0, 0, 0, 0.14);
53
+ --mm-shadow-ambient: rgba(0, 0, 0, 0.12);
54
+
55
+ // Switch colors
56
+ --mm-switch-checked-track: rgba(38, 166, 154, 0.3);
57
+ --mm-switch-checked-thumb: #26a69a;
58
+ --mm-switch-unchecked-track: rgba(0, 0, 0, 0.6);
59
+ --mm-switch-unchecked-thumb: #f5f5f5;
60
+ --mm-switch-disabled-track: rgba(0, 0, 0, 0.12);
61
+ --mm-switch-disabled-thumb: #bdbdbd;
62
+ }
63
+
64
+ // Apply theme variables to body and main containers
65
+ body {
66
+ background-color: var(--mm-background-color);
67
+ color: var(--mm-text-primary);
68
+ transition: background-color 0.3s ease, color 0.3s ease;
69
+ }
70
+
71
+ .container, .main {
72
+ color: var(--mm-text-primary);
73
+ }
74
+
75
+ // Dark theme
76
+ [data-theme="dark"] {
77
+ --mm-primary-color: #80cbc4;
78
+ --mm-primary-color-light: #b2dfdb;
79
+ --mm-primary-color-dark: #4db6ac;
80
+
81
+ --mm-secondary-color: #ffa726;
82
+ --mm-secondary-color-light: #ffcc02;
83
+ --mm-secondary-color-dark: #ff8f00;
84
+
85
+ // Background colors
86
+ --mm-background-color: #121212;
87
+ --mm-surface-color: #1e1e1e;
88
+ --mm-card-background: #2d2d2d;
89
+
90
+ // Text colors
91
+ --mm-text-primary: rgba(255, 255, 255, 0.87);
92
+ --mm-text-secondary: rgba(255, 255, 255, 0.6);
93
+ --mm-text-disabled: rgba(255, 255, 255, 0.38);
94
+ --mm-text-hint: rgba(255, 255, 255, 0.38);
95
+
96
+ // Border and divider colors
97
+ --mm-border-color: rgba(255, 255, 255, 0.12);
98
+ --mm-divider-color: rgba(255, 255, 255, 0.12);
99
+
100
+ // Input colors
101
+ --mm-input-background: #2d2d2d;
102
+ --mm-input-border: rgba(255, 255, 255, 0.42);
103
+ --mm-input-border-focus: var(--mm-primary-color);
104
+ --mm-input-text: var(--mm-text-primary);
105
+
106
+ // Button colors
107
+ --mm-button-background: var(--mm-primary-color);
108
+ --mm-button-text: #000000;
109
+ --mm-button-flat-text: var(--mm-primary-color);
110
+
111
+ // Navigation colors
112
+ --mm-nav-background: #1e1e1e;
113
+ --mm-nav-text: #ffffff;
114
+ --mm-nav-active-text: #000000;
115
+
116
+ // Modal and overlay colors
117
+ --mm-modal-background: #2d2d2d;
118
+ --mm-overlay-background: rgba(0, 0, 0, 0.8);
119
+
120
+ // Shadow colors
121
+ --mm-shadow-color: rgba(0, 0, 0, 0.5);
122
+ --mm-shadow-umbra: rgba(0, 0, 0, 0.5);
123
+ --mm-shadow-penumbra: rgba(0, 0, 0, 0.36);
124
+ --mm-shadow-ambient: rgba(0, 0, 0, 0.3);
125
+
126
+ // Switch colors (dark theme)
127
+ --mm-switch-checked-track: rgba(128, 203, 196, 0.3);
128
+ --mm-switch-checked-thumb: #80cbc4;
129
+ --mm-switch-unchecked-track: rgba(255, 255, 255, 0.6);
130
+ --mm-switch-unchecked-thumb: #616161;
131
+ --mm-switch-disabled-track: rgba(255, 255, 255, 0.12);
132
+ --mm-switch-disabled-thumb: #424242;
133
+ }
134
+
135
+ // Auto dark mode based on user preference
136
+ @media (prefers-color-scheme: dark) {
137
+ :root:not([data-theme]) {
138
+ --mm-primary-color: #80cbc4;
139
+ --mm-primary-color-light: #b2dfdb;
140
+ --mm-primary-color-dark: #4db6ac;
141
+
142
+ --mm-secondary-color: #ffa726;
143
+ --mm-secondary-color-light: #ffcc02;
144
+ --mm-secondary-color-dark: #ff8f00;
145
+
146
+ --mm-background-color: #121212;
147
+ --mm-surface-color: #1e1e1e;
148
+ --mm-card-background: #2d2d2d;
149
+
150
+ --mm-text-primary: rgba(255, 255, 255, 0.87);
151
+ --mm-text-secondary: rgba(255, 255, 255, 0.6);
152
+ --mm-text-disabled: rgba(255, 255, 255, 0.38);
153
+ --mm-text-hint: rgba(255, 255, 255, 0.38);
154
+
155
+ --mm-border-color: rgba(255, 255, 255, 0.12);
156
+ --mm-divider-color: rgba(255, 255, 255, 0.12);
157
+
158
+ --mm-input-background: #2d2d2d;
159
+ --mm-input-border: rgba(255, 255, 255, 0.42);
160
+ --mm-input-border-focus: var(--mm-primary-color);
161
+ --mm-input-text: var(--mm-text-primary);
162
+
163
+ --mm-button-background: var(--mm-primary-color);
164
+ --mm-button-text: #000000;
165
+ --mm-button-flat-text: var(--mm-primary-color);
166
+
167
+ --mm-nav-background: #1e1e1e;
168
+ --mm-nav-text: #ffffff;
169
+ --mm-nav-active-text: #000000;
170
+
171
+ --mm-modal-background: #2d2d2d;
172
+ --mm-overlay-background: rgba(0, 0, 0, 0.8);
173
+
174
+ --mm-shadow-color: rgba(0, 0, 0, 0.5);
175
+ --mm-shadow-umbra: rgba(0, 0, 0, 0.5);
176
+ --mm-shadow-penumbra: rgba(0, 0, 0, 0.36);
177
+ --mm-shadow-ambient: rgba(0, 0, 0, 0.3);
178
+
179
+ // Switch colors (auto dark theme)
180
+ --mm-switch-checked-track: rgba(128, 203, 196, 0.3);
181
+ --mm-switch-checked-thumb: #80cbc4;
182
+ --mm-switch-unchecked-track: rgba(255, 255, 255, 0.6);
183
+ --mm-switch-unchecked-thumb: #616161;
184
+ --mm-switch-disabled-track: rgba(255, 255, 255, 0.12);
185
+ --mm-switch-disabled-thumb: #424242;
186
+ }
187
+ }
@@ -35,7 +35,7 @@
35
35
  gap: 8px;
36
36
  margin-top: 8px;
37
37
  padding: 12px;
38
- background-color: #f5f5f5;
38
+ background-color: var(--mm-border-color, #f5f5f5);
39
39
  border-radius: 4px;
40
40
  font-size: 14px;
41
41
 
@@ -48,13 +48,13 @@
48
48
  width: 50px;
49
49
  text-align: center;
50
50
  padding: 4px;
51
- border: 1px solid #ccc;
51
+ border: 1px solid var(--mm-border-color, #ccc);
52
52
  border-radius: 4px;
53
53
  }
54
54
 
55
55
  select {
56
56
  padding: 4px;
57
- border: 1px solid #ccc;
57
+ border: 1px solid var(--mm-border-color, #ccc);
58
58
  border-radius: 4px;
59
59
  margin-left: 4px;
60
60
  }
@@ -63,7 +63,7 @@
63
63
  input[type="time"] {
64
64
  font-size: 16px;
65
65
  padding: 4px 8px;
66
- border: 1px solid #ccc;
66
+ border: 1px solid var(--mm-border-color, #ccc);
67
67
  border-radius: 4px;
68
68
  min-width: 120px;
69
69
  }
@@ -71,7 +71,7 @@
71
71
  .btn-flat {
72
72
  padding: 4px 8px;
73
73
  font-size: 11px;
74
- background-color: #e0e0e0;
74
+ background-color: var(--mm-border-color, #e0e0e0);
75
75
  border-radius: 4px;
76
76
  min-width: auto;
77
77
  }
@@ -0,0 +1,416 @@
1
+ // Wizard/Stepper Component Styles
2
+
3
+ .wizard {
4
+ display: flex;
5
+ flex-direction: column;
6
+ width: 100%;
7
+
8
+ &.horizontal {
9
+ .wizard-steps {
10
+ display: flex;
11
+ align-items: flex-start;
12
+ justify-content: space-between;
13
+ position: relative;
14
+ }
15
+
16
+ .wizard-step {
17
+ display: flex;
18
+ flex-direction: column;
19
+ align-items: center;
20
+ text-align: center;
21
+ flex: 1;
22
+ position: relative;
23
+
24
+ &:not(:last-child) {
25
+ margin-right: 2rem;
26
+ }
27
+ }
28
+
29
+ .wizard-step-content {
30
+ margin-top: 0.75rem;
31
+ max-width: 200px;
32
+ }
33
+
34
+ .wizard-step-connector {
35
+ position: absolute;
36
+ top: 20px;
37
+ left: calc(50% + 20px);
38
+ width: calc(100% - 40px);
39
+ height: 2px;
40
+ background: var(--mm-border-color, rgba(0, 0, 0, 0.12));
41
+ z-index: 1;
42
+ }
43
+ }
44
+
45
+ &.vertical {
46
+ .wizard-steps {
47
+ display: flex;
48
+ flex-direction: column;
49
+ }
50
+
51
+ .wizard-step {
52
+ display: flex;
53
+ align-items: flex-start;
54
+ text-align: left;
55
+ position: relative;
56
+ padding-bottom: 2rem;
57
+
58
+ &:last-child {
59
+ padding-bottom: 0;
60
+ }
61
+ }
62
+
63
+ .wizard-step-content {
64
+ margin-left: 1rem;
65
+ flex: 1;
66
+ }
67
+
68
+ .wizard-step-connector {
69
+ position: absolute;
70
+ top: 40px;
71
+ left: 19px;
72
+ bottom: -2rem;
73
+ width: 2px;
74
+ background: var(--mm-border-color, rgba(0, 0, 0, 0.12));
75
+ z-index: 1;
76
+ }
77
+ }
78
+ }
79
+
80
+ .wizard-header {
81
+ margin-bottom: 2rem;
82
+ }
83
+
84
+ .wizard-step {
85
+ cursor: pointer;
86
+ transition: opacity 0.2s ease;
87
+
88
+ &.disabled {
89
+ opacity: 0.6;
90
+ cursor: not-allowed;
91
+ }
92
+
93
+ &:hover:not(.disabled) {
94
+ .wizard-step-indicator {
95
+ box-shadow: 0 0 0 8px var(--mm-primary-color-light, rgba(38, 166, 154, 0.1));
96
+ }
97
+ }
98
+ }
99
+
100
+ .wizard-step-indicator {
101
+ width: 40px;
102
+ height: 40px;
103
+ border-radius: 50%;
104
+ display: flex;
105
+ align-items: center;
106
+ justify-content: center;
107
+ background: var(--mm-border-color, rgba(0, 0, 0, 0.12));
108
+ color: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
109
+ font-weight: 500;
110
+ font-size: 0.875rem;
111
+ transition: all 0.2s ease;
112
+ position: relative;
113
+ z-index: 2;
114
+
115
+ .material-icons {
116
+ font-size: 1.25rem;
117
+ }
118
+
119
+ .wizard-step-number {
120
+ font-weight: 600;
121
+ }
122
+ }
123
+
124
+ .wizard-step.active {
125
+ .wizard-step-indicator {
126
+ background: var(--mm-primary-color, #26a69a);
127
+ color: var(--mm-button-text, #ffffff);
128
+ }
129
+
130
+ .wizard-step-title {
131
+ color: var(--mm-text-primary, rgba(0, 0, 0, 0.87));
132
+ font-weight: 600;
133
+ }
134
+ }
135
+
136
+ .wizard-step.completed {
137
+ .wizard-step-indicator {
138
+ background: var(--mm-primary-color, #26a69a);
139
+ color: var(--mm-button-text, #ffffff);
140
+ }
141
+
142
+ .wizard-step-connector {
143
+ background: var(--mm-primary-color, #26a69a);
144
+ }
145
+ }
146
+
147
+ .wizard-step.error {
148
+ .wizard-step-indicator {
149
+ background: #f44336;
150
+ color: #ffffff;
151
+ }
152
+
153
+ .wizard-step-title {
154
+ color: #f44336;
155
+ }
156
+ }
157
+
158
+ .wizard-step-title {
159
+ font-size: 0.875rem;
160
+ font-weight: 500;
161
+ color: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
162
+ margin-bottom: 0.25rem;
163
+ line-height: 1.3;
164
+ }
165
+
166
+ .wizard-step-subtitle {
167
+ font-size: 0.75rem;
168
+ color: var(--mm-text-hint, rgba(0, 0, 0, 0.38));
169
+ line-height: 1.3;
170
+ margin-bottom: 0.25rem;
171
+ }
172
+
173
+ .wizard-step-optional {
174
+ font-size: 0.625rem;
175
+ color: var(--mm-text-hint, rgba(0, 0, 0, 0.38));
176
+ font-style: italic;
177
+ text-transform: uppercase;
178
+ letter-spacing: 0.5px;
179
+ }
180
+
181
+ .wizard-body {
182
+ flex: 1;
183
+ margin-bottom: 2rem;
184
+
185
+ // Ensure form elements have proper responsive layout
186
+ .input-field {
187
+ margin-bottom: 1.5rem;
188
+
189
+ input, textarea {
190
+ width: 100%;
191
+ box-sizing: border-box;
192
+ }
193
+
194
+ label {
195
+ color: var(--mm-text-secondary, rgba(0, 0, 0, 0.6));
196
+ transition: all 0.3s ease;
197
+
198
+ &.active {
199
+ color: var(--mm-primary-color, #26a69a);
200
+ transform: translateY(-14px) scale(0.8);
201
+ }
202
+ }
203
+ }
204
+
205
+ .row {
206
+ margin-bottom: 0;
207
+
208
+ .col {
209
+ padding: 0 0.75rem;
210
+
211
+ &:first-child {
212
+ padding-left: 0;
213
+ }
214
+
215
+ &:last-child {
216
+ padding-right: 0;
217
+ }
218
+ }
219
+ }
220
+ }
221
+
222
+ .wizard-step-panel {
223
+ animation: wizard-slide-in 0.3s ease;
224
+ }
225
+
226
+ @keyframes wizard-slide-in {
227
+ from {
228
+ opacity: 0;
229
+ transform: translateX(20px);
230
+ }
231
+ to {
232
+ opacity: 1;
233
+ transform: translateX(0);
234
+ }
235
+ }
236
+
237
+ .wizard-footer {
238
+ border-top: 1px solid var(--mm-border-color, rgba(0, 0, 0, 0.12));
239
+ padding-top: 1.5rem;
240
+ }
241
+
242
+ .wizard-navigation {
243
+ display: flex;
244
+ justify-content: space-between;
245
+ align-items: center;
246
+ gap: 1rem;
247
+
248
+ .wizard-btn-previous,
249
+ .wizard-btn-skip {
250
+ margin-right: auto;
251
+ }
252
+
253
+ .wizard-btn-next,
254
+ .wizard-btn-complete {
255
+ margin-left: auto;
256
+
257
+ .material-icons {
258
+ margin-right: 0.5rem;
259
+ animation: wizard-loading 1s infinite linear;
260
+ }
261
+ }
262
+ }
263
+
264
+ @keyframes wizard-loading {
265
+ from {
266
+ transform: rotate(0deg);
267
+ }
268
+ to {
269
+ transform: rotate(360deg);
270
+ }
271
+ }
272
+
273
+ // Compact variant
274
+ .wizard.compact {
275
+ .wizard-step-indicator {
276
+ width: 32px;
277
+ height: 32px;
278
+ font-size: 0.75rem;
279
+
280
+ .material-icons {
281
+ font-size: 1rem;
282
+ }
283
+ }
284
+
285
+ .wizard-step-title {
286
+ font-size: 0.75rem;
287
+ }
288
+
289
+ .wizard-step-subtitle {
290
+ font-size: 0.625rem;
291
+ }
292
+
293
+ .wizard-header {
294
+ margin-bottom: 1.5rem;
295
+ }
296
+
297
+ &.horizontal {
298
+ .wizard-step-connector {
299
+ top: 16px;
300
+ }
301
+ }
302
+
303
+ &.vertical {
304
+ .wizard-step-connector {
305
+ top: 32px;
306
+ left: 15px;
307
+ }
308
+ }
309
+ }
310
+
311
+ // Large variant
312
+ .wizard.large {
313
+ .wizard-step-indicator {
314
+ width: 48px;
315
+ height: 48px;
316
+ font-size: 1rem;
317
+
318
+ .material-icons {
319
+ font-size: 1.5rem;
320
+ }
321
+ }
322
+
323
+ .wizard-step-title {
324
+ font-size: 1rem;
325
+ }
326
+
327
+ .wizard-step-subtitle {
328
+ font-size: 0.875rem;
329
+ }
330
+
331
+ .wizard-header {
332
+ margin-bottom: 2.5rem;
333
+ }
334
+
335
+ &.horizontal {
336
+ .wizard-step-connector {
337
+ top: 24px;
338
+ }
339
+ }
340
+
341
+ &.vertical {
342
+ .wizard-step-connector {
343
+ top: 48px;
344
+ left: 23px;
345
+ }
346
+ }
347
+ }
348
+
349
+ // Responsive behavior
350
+ @media (max-width: 768px) {
351
+ .wizard.horizontal {
352
+ .wizard-steps {
353
+ flex-direction: column;
354
+ align-items: stretch;
355
+ }
356
+
357
+ .wizard-step {
358
+ flex-direction: row;
359
+ align-items: center;
360
+ text-align: left;
361
+ margin-right: 0;
362
+ margin-bottom: 1rem;
363
+
364
+ &:last-child {
365
+ margin-bottom: 0;
366
+ }
367
+ }
368
+
369
+ .wizard-step-content {
370
+ margin-top: 0;
371
+ margin-left: 1rem;
372
+ max-width: none;
373
+ }
374
+
375
+ .wizard-step-connector {
376
+ display: none;
377
+ }
378
+ }
379
+ }
380
+
381
+ // Dark theme adjustments
382
+ [data-theme="dark"] {
383
+ .wizard-step.error {
384
+ .wizard-step-title {
385
+ color: #f48fb1;
386
+ }
387
+
388
+ .wizard-step-indicator {
389
+ background: #f48fb1;
390
+ color: #000000;
391
+ }
392
+ }
393
+
394
+ .wizard-footer {
395
+ border-color: var(--mm-border-color, rgba(255, 255, 255, 0.12));
396
+ }
397
+ }
398
+
399
+ // Accessibility improvements
400
+ .wizard-step {
401
+ &:focus {
402
+ outline: 2px solid var(--mm-primary-color, #26a69a);
403
+ outline-offset: 2px;
404
+ border-radius: 4px;
405
+ }
406
+
407
+ &[aria-disabled="true"] {
408
+ pointer-events: none;
409
+ }
410
+ }
411
+
412
+ .wizard-step-indicator {
413
+ &[aria-current="step"] {
414
+ box-shadow: 0 0 0 4px var(--mm-primary-color-light, rgba(38, 166, 154, 0.2));
415
+ }
416
+ }