mithril-materialized 2.0.0-beta.9 → 2.0.0-rc.2

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 (43) hide show
  1. package/README.md +353 -10
  2. package/dist/advanced.css +6 -6
  3. package/dist/button.d.ts +56 -11
  4. package/dist/components.css +1674 -6
  5. package/dist/core.css +13 -13
  6. package/dist/datatable.d.ts +291 -0
  7. package/dist/datepicker.d.ts +12 -2
  8. package/dist/file-upload.d.ts +23 -0
  9. package/dist/floating-action-button.d.ts +1 -1
  10. package/dist/forms.css +344 -13
  11. package/dist/icon.d.ts +2 -2
  12. package/dist/image-list.d.ts +70 -0
  13. package/dist/index.css +1940 -20
  14. package/dist/index.d.ts +8 -0
  15. package/dist/index.esm.js +2736 -659
  16. package/dist/index.js +2746 -658
  17. package/dist/index.min.css +2 -2
  18. package/dist/index.umd.js +2746 -658
  19. package/dist/input-options.d.ts +18 -4
  20. package/dist/input.d.ts +0 -1
  21. package/dist/masonry.d.ts +17 -0
  22. package/dist/material-icon.d.ts +3 -0
  23. package/dist/pickers.css +45 -0
  24. package/dist/range-slider.d.ts +42 -0
  25. package/dist/theme-switcher.d.ts +23 -0
  26. package/dist/timeline.d.ts +43 -0
  27. package/dist/treeview.d.ts +39 -0
  28. package/dist/types.d.ts +226 -0
  29. package/dist/utilities.css +16 -9
  30. package/package.json +12 -9
  31. package/sass/components/_cards.scss +10 -3
  32. package/sass/components/_datatable.scss +417 -0
  33. package/sass/components/_datepicker.scss +57 -0
  34. package/sass/components/_global.scss +6 -6
  35. package/sass/components/_image-list.scss +421 -0
  36. package/sass/components/_masonry.scss +241 -0
  37. package/sass/components/_timeline.scss +452 -0
  38. package/sass/components/_treeview.scss +353 -0
  39. package/sass/components/forms/_forms.scss +1 -1
  40. package/sass/components/forms/_range-enhanced.scss +406 -0
  41. package/sass/components/forms/_range.scss +5 -5
  42. package/sass/components/forms/_select.scss +1 -1
  43. package/sass/materialize.scss +6 -0
@@ -0,0 +1,406 @@
1
+ @use "../variables";
2
+ @use "../global";
3
+
4
+ /* Enhanced Range Sliders
5
+ ========================================================================== */
6
+
7
+ .range-slider {
8
+ &.vertical {
9
+ -webkit-appearance: none;
10
+ appearance: none;
11
+ writing-mode: vertical-lr;
12
+ direction: rtl;
13
+ width: 6px;
14
+ transform: none;
15
+
16
+ &::-webkit-slider-runnable-track {
17
+ width: 6px;
18
+ height: 100%;
19
+ }
20
+
21
+ &::-webkit-slider-thumb {
22
+ -webkit-appearance: none;
23
+ width: variables.$range-height;
24
+ height: variables.$range-width;
25
+ margin-left: -4px;
26
+ margin-top: 0;
27
+ }
28
+
29
+ &::-moz-range-track {
30
+ width: 6px;
31
+ height: 100%;
32
+ }
33
+
34
+ &::-moz-range-thumb {
35
+ width: variables.$range-height;
36
+ height: variables.$range-width;
37
+ margin-left: -12px;
38
+ margin-top: 0;
39
+ }
40
+ }
41
+
42
+ &.disabled {
43
+ opacity: 0.6;
44
+ cursor: not-allowed;
45
+
46
+ &::-webkit-slider-thumb {
47
+ cursor: not-allowed;
48
+ }
49
+
50
+ &::-moz-range-thumb {
51
+ cursor: not-allowed;
52
+ }
53
+ }
54
+ }
55
+
56
+ .single-range-slider {
57
+ // Container styles
58
+ outline: none; // Remove default focus outline
59
+ // border-radius: 4px; // Slight rounding for focus indicator
60
+
61
+ &.horizontal {
62
+ height: 40px;
63
+ position: relative;
64
+ display: flex;
65
+ align-items: center;
66
+ }
67
+
68
+ &.vertical {
69
+ width: 40px;
70
+ position: relative;
71
+ display: flex;
72
+ flex-direction: column;
73
+ align-items: center;
74
+ height: 100%;
75
+ }
76
+
77
+ .track {
78
+ background-color: var(--mm-border-color, #c2c0c2);
79
+ border-radius: 2px;
80
+
81
+ &.horizontal {
82
+ position: absolute;
83
+ top: 25%;
84
+ left: 0;
85
+ transform: translateY(-50%);
86
+ width: 100%;
87
+ height: 4px;
88
+ }
89
+
90
+ &.vertical {
91
+ position: absolute;
92
+ bottom: 10px;
93
+ width: 4px;
94
+ height: 100%;
95
+ }
96
+ }
97
+
98
+ .range-progress {
99
+ background-color: var(--mm-primary-color, #26a69a);
100
+ border-radius: 2px;
101
+
102
+ &.horizontal {
103
+ position: absolute;
104
+ top: 25%;
105
+ transform: translateY(-50%);
106
+ height: 4px;
107
+ }
108
+
109
+ &.vertical {
110
+ position: absolute;
111
+ bottom: 10px;
112
+ width: 4px;
113
+ }
114
+ }
115
+
116
+ .thumb {
117
+ background-color: var(--mm-primary-color, #26a69a);
118
+ transition: transform 0.1s ease, box-shadow 0.1s ease;
119
+ width: 20px;
120
+ height: 20px;
121
+ border-radius: 50%;
122
+ cursor: pointer;
123
+ outline: none;
124
+
125
+ &.horizontal {
126
+ position: absolute;
127
+ transform: translateY(-50%);
128
+ }
129
+
130
+ &.vertical {
131
+ position: absolute;
132
+ }
133
+
134
+ &:hover {
135
+ box-shadow: 0 4px 8px rgba(0,0,0,0.3);
136
+ }
137
+
138
+ .value-tooltip {
139
+ position: absolute;
140
+ background: var(--mm-primary-color, #26a69a);
141
+ color: white;
142
+ padding: 4px 8px;
143
+ border-radius: 4px;
144
+ font-size: 12px;
145
+ white-space: nowrap;
146
+ min-width: 24px;
147
+ text-align: center;
148
+ pointer-events: none;
149
+ z-index: 20;
150
+
151
+ &.top {
152
+ bottom: 100%;
153
+ left: 50%;
154
+ transform: translateX(-50%);
155
+ margin-bottom: 8px;
156
+
157
+ &::after {
158
+ content: '';
159
+ position: absolute;
160
+ top: 100%;
161
+ left: 50%;
162
+ transform: translateX(-50%);
163
+ border: 4px solid transparent;
164
+ border-top-color: var(--mm-primary-color, #26a69a);
165
+ }
166
+ }
167
+
168
+ &.bottom {
169
+ top: 100%;
170
+ left: 50%;
171
+ transform: translateX(-50%);
172
+ margin-top: 8px;
173
+
174
+ &::after {
175
+ content: '';
176
+ position: absolute;
177
+ bottom: 100%;
178
+ left: 50%;
179
+ transform: translateX(-50%);
180
+ border: 4px solid transparent;
181
+ border-bottom-color: var(--mm-primary-color, #26a69a);
182
+ }
183
+ }
184
+
185
+ &.left {
186
+ right: 100%;
187
+ top: 50%;
188
+ transform: translateY(-50%);
189
+ margin-right: 8px;
190
+
191
+ &::after {
192
+ content: '';
193
+ position: absolute;
194
+ top: 50%;
195
+ left: 100%;
196
+ transform: translateY(-50%);
197
+ border: 4px solid transparent;
198
+ border-left-color: var(--mm-primary-color, #26a69a);
199
+ }
200
+ }
201
+
202
+ &.right {
203
+ left: 100%;
204
+ top: 50%;
205
+ transform: translateY(-50%);
206
+ margin-left: 8px;
207
+
208
+ &::after {
209
+ content: '';
210
+ position: absolute;
211
+ top: 50%;
212
+ right: 100%;
213
+ transform: translateY(-50%);
214
+ border: 4px solid transparent;
215
+ border-right-color: var(--mm-primary-color, #26a69a);
216
+ }
217
+ }
218
+ }
219
+ }
220
+
221
+ // Focus styling - show outline only on thumb when slider has focus
222
+ &:focus .thumb,
223
+ &:focus-visible .thumb {
224
+ box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0,0,0,0.2);
225
+ }
226
+
227
+ &:focus .thumb:hover,
228
+ &:focus-visible .thumb:hover {
229
+ box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0,0,0,0.3);
230
+ }
231
+ }
232
+
233
+ .double-range-slider {
234
+ // Container styles
235
+ outline: none; // Remove default focus outline
236
+ border-radius: 4px; // Slight rounding for focus indicator
237
+
238
+ &.horizontal {
239
+ height: 40px;
240
+ position: relative;
241
+ display: flex;
242
+ align-items: center;
243
+ }
244
+
245
+ &.vertical {
246
+ width: 40px;
247
+ position: relative;
248
+ display: flex;
249
+ flex-direction: column;
250
+ align-items: center;
251
+ }
252
+
253
+ .track {
254
+ background-color: var(--mm-border-color, #c2c0c2);
255
+ border-radius: 2px;
256
+
257
+ &.horizontal {
258
+ position: absolute;
259
+ top: 50%;
260
+ left: 0;
261
+ transform: translateY(-50%);
262
+ width: 100%;
263
+ height: 4px;
264
+ }
265
+
266
+ &.vertical {
267
+ position: absolute;
268
+ left: 50%;
269
+ top: 0;
270
+ transform: translateX(-50%);
271
+ width: 4px;
272
+ height: 100%;
273
+ }
274
+ }
275
+
276
+ .range {
277
+ background-color: var(--mm-primary-color, #26a69a);
278
+ border-radius: 2px;
279
+
280
+ &.horizontal {
281
+ position: absolute;
282
+ top: 50%;
283
+ transform: translateY(-50%);
284
+ height: 4px;
285
+ }
286
+
287
+ &.vertical {
288
+ position: absolute;
289
+ left: 50%;
290
+ transform: translateX(-50%);
291
+ width: 4px;
292
+ }
293
+ }
294
+
295
+ .thumb {
296
+ background-color: var(--mm-primary-color, #26a69a);
297
+ transition: transform 0.1s ease, box-shadow 0.1s ease;
298
+ width: 20px;
299
+ height: 20px;
300
+ border-radius: 50%;
301
+ cursor: pointer;
302
+ outline: none;
303
+
304
+ &.horizontal {
305
+ position: absolute;
306
+ top: 50%;
307
+ transform: translateY(-50%);
308
+ }
309
+
310
+ &.vertical {
311
+ position: absolute;
312
+ left: 50%;
313
+ transform: translateX(-50%);
314
+ }
315
+
316
+ &:hover {
317
+ box-shadow: 0 4px 8px rgba(0,0,0,0.3);
318
+ }
319
+
320
+ .value {
321
+ position: absolute;
322
+ background: var(--mm-primary-color, #26a69a);
323
+ color: white;
324
+ padding: 2px 6px;
325
+ border-radius: 4px;
326
+ font-size: 12px;
327
+ white-space: nowrap;
328
+ min-width: 24px;
329
+ text-align: center;
330
+ pointer-events: none;
331
+ z-index: 20;
332
+
333
+ &.horizontal {
334
+ top: -30px;
335
+ left: 50%;
336
+ transform: translateX(-50%);
337
+
338
+ &::after {
339
+ content: '';
340
+ position: absolute;
341
+ top: 100%;
342
+ left: 50%;
343
+ transform: translateX(-50%);
344
+ border: 4px solid transparent;
345
+ border-top-color: var(--mm-primary-color, #26a69a);
346
+ }
347
+ }
348
+
349
+ &.vertical {
350
+ top: 50%;
351
+ left: -35px;
352
+ transform: translateY(-50%);
353
+
354
+ &::after {
355
+ content: '';
356
+ position: absolute;
357
+ top: 50%;
358
+ left: 100%;
359
+ transform: translateY(-50%);
360
+ border: 4px solid transparent;
361
+ border-left-color: var(--mm-primary-color, #26a69a);
362
+ }
363
+ }
364
+ }
365
+ }
366
+
367
+ // Focus styling for individual thumbs (improved accessibility)
368
+ .thumb {
369
+ &:focus,
370
+ &:focus-visible {
371
+ box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0,0,0,0.2);
372
+ }
373
+
374
+ &:focus:hover,
375
+ &:focus-visible:hover {
376
+ box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0,0,0,0.3);
377
+ }
378
+ }
379
+
380
+ // Legacy focus styling for active thumb (fallback)
381
+ &:focus .thumb.min-thumb.active,
382
+ &:focus .thumb.max-thumb.active,
383
+ &:focus-visible .thumb.min-thumb.active,
384
+ &:focus-visible .thumb.max-thumb.active {
385
+ box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0,0,0,0.2);
386
+ }
387
+
388
+ &:focus .thumb.min-thumb.active:hover,
389
+ &:focus .thumb.max-thumb.active:hover,
390
+ &:focus-visible .thumb.min-thumb.active:hover,
391
+ &:focus-visible .thumb.max-thumb.active:hover {
392
+ box-shadow: 0 0 0 3px var(--mm-primary-color-alpha-30, rgba(38, 166, 154, 0.3)), 0 4px 8px rgba(0,0,0,0.3);
393
+ }
394
+ }
395
+
396
+ .range-field.vertical {
397
+ display: flex;
398
+ flex-direction: column;
399
+ align-items: center;
400
+ min-height: 100px;
401
+ padding-top: 20px;
402
+
403
+ .double-range-slider {
404
+ height: 100%;
405
+ }
406
+ }
@@ -66,7 +66,7 @@ input[type=range] + .thumb {
66
66
  // Shared
67
67
  @mixin range-track {
68
68
  height: variables.$track-height;
69
- background: #c2c0c2;
69
+ background: var(--mm-border-color, #c2c0c2);
70
70
  border: none;
71
71
  }
72
72
 
@@ -104,7 +104,7 @@ input[type=range]::-webkit-slider-thumb {
104
104
  // FireFox
105
105
  input[type=range] {
106
106
  /* fix for FF unable to apply focus style bug */
107
- border: 1px solid white;
107
+ border: 1px solid var(--mm-card-background, white);
108
108
 
109
109
  /*required for proper track sizing in FF*/
110
110
  }
@@ -124,7 +124,7 @@ input[type=range]::-moz-range-thumb {
124
124
 
125
125
  // hide the outline behind the border
126
126
  input[type=range]:-moz-focusring {
127
- outline: 1px solid #fff;
127
+ outline: 1px solid var(--mm-card-background, #fff);
128
128
  outline-offset: -1px;
129
129
  }
130
130
 
@@ -148,11 +148,11 @@ input[type=range]::-ms-track {
148
148
  }
149
149
 
150
150
  input[type=range]::-ms-fill-lower {
151
- background: #777;
151
+ background: var(--mm-text-secondary, #777);
152
152
  }
153
153
 
154
154
  input[type=range]::-ms-fill-upper {
155
- background: #ddd;
155
+ background: var(--mm-surface-color, #ddd);
156
156
  }
157
157
 
158
158
  input[type=range]::-ms-thumb {
@@ -128,7 +128,7 @@ select:disabled {
128
128
  }
129
129
 
130
130
  .select-wrapper i {
131
- color: variables.$select-disabled-color;
131
+ color: var(--mm-text-primary, rgba(0,0,0,.87))
132
132
  }
133
133
 
134
134
  .select-dropdown li.disabled,
@@ -33,6 +33,7 @@
33
33
  @use "components/chips";
34
34
  @use "components/materialbox";
35
35
  @use "components/forms/forms";
36
+ @use "components/forms/range-enhanced"; // Enhanced custom range sliders with vertical and double-thumb support
36
37
  @use "components/table_of_contents";
37
38
  @use "components/sidenav";
38
39
  @use "components/preloader";
@@ -46,3 +47,8 @@
46
47
  @use "components/file-upload";
47
48
  @use "components/breadcrumb";
48
49
  @use "components/wizard";
50
+ @use "components/datatable";
51
+ @use "components/treeview";
52
+ @use "components/timeline";
53
+ @use "components/masonry";
54
+ @use "components/image-list";