mithril-materialized 3.3.3 → 3.3.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.
package/dist/index.umd.js CHANGED
@@ -878,6 +878,14 @@
878
878
  'M19 13H5v-2h14v2z', // minus
879
879
  'M0 0h24v24H0z', // background
880
880
  ],
881
+ light_mode: [
882
+ 'M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.4 12.4a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41zm1.06-11a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.4a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z',
883
+ 'M0 0h24v24H0z', // background
884
+ ],
885
+ dark_mode: [
886
+ 'M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.39 5.39 0 0 1-4.4 2.26 5.4 5.4 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z',
887
+ 'M0 0h24v24H0z', // background
888
+ ],
881
889
  };
882
890
  const MaterialIcon = () => {
883
891
  return {
@@ -7166,20 +7174,23 @@
7166
7174
  showLabels && m('span.theme-switcher-label', labels.theme),
7167
7175
  m('.theme-switcher-buttons', [
7168
7176
  m('button.btn-flat', {
7177
+ type: 'button',
7169
7178
  class: theme === 'light' ? 'active' : '',
7170
7179
  onclick: () => handleThemeChange('light'),
7171
7180
  title: labels.lightTitle,
7172
- }, [m('i.material-icons', 'light_mode'), showLabels && m('span', labels.light)]),
7181
+ }, [m(MaterialIcon, { name: 'light_mode' }), showLabels && m('span', labels.light)]),
7173
7182
  m('button.btn-flat', {
7183
+ type: 'button',
7174
7184
  class: theme === 'auto' ? 'active' : '',
7175
7185
  onclick: () => handleThemeChange('auto'),
7176
7186
  title: labels.autoTitle,
7177
7187
  }, [m('i.material-icons', 'brightness_auto'), showLabels && m('span', labels.auto)]),
7178
7188
  m('button.btn-flat', {
7189
+ type: 'button',
7179
7190
  class: theme === 'dark' ? 'active' : '',
7180
7191
  onclick: () => handleThemeChange('dark'),
7181
7192
  title: labels.darkTitle,
7182
- }, [m('i.material-icons', 'dark_mode'), showLabels && m('span', labels.dark)]),
7193
+ }, [m(MaterialIcon, { name: 'dark_mode' }), showLabels && m('span', labels.dark)]),
7183
7194
  ]),
7184
7195
  ]);
7185
7196
  },
@@ -7200,16 +7211,16 @@
7200
7211
  const currentTheme = ThemeManager.getEffectiveTheme();
7201
7212
  const labels = Object.assign(Object.assign({}, defaultI18n$1), attrs.i18n);
7202
7213
  return m('button.btn-flat.theme-toggle', {
7214
+ type: 'button',
7203
7215
  class: attrs.className || '',
7204
7216
  onclick: () => {
7205
7217
  ThemeManager.toggle();
7206
7218
  },
7207
7219
  title: currentTheme === 'light' ? labels.switchToDark : labels.switchToLight,
7208
- style: 'margin: 0; height: 64px; line-height: 64px; border-radius: 0; min-width: 64px; padding: 0;',
7209
7220
  }, [
7210
- m('i.material-icons', {
7211
- style: 'color: inherit; font-size: 24px;',
7212
- }, currentTheme === 'light' ? 'dark_mode' : 'light_mode'),
7221
+ m(MaterialIcon, {
7222
+ name: currentTheme === 'light' ? 'dark_mode' : 'light_mode',
7223
+ }),
7213
7224
  ]);
7214
7225
  },
7215
7226
  };
@@ -7753,7 +7764,6 @@
7753
7764
  }
7754
7765
  finally {
7755
7766
  state.isValidating = false;
7756
- m.redraw();
7757
7767
  }
7758
7768
  };
7759
7769
  const goToStep = async (stepIndex, attrs) => {
@@ -7785,8 +7795,6 @@
7785
7795
  if (onStepChange && oldStep !== stepIndex) {
7786
7796
  onStepChange(stepIndex, steps[stepIndex].id || `step-${stepIndex}`);
7787
7797
  }
7788
- // Force redraw to update UI
7789
- m.redraw();
7790
7798
  return true;
7791
7799
  };
7792
7800
  const nextStep = async (attrs) => {
@@ -5,6 +5,8 @@ declare const iconPaths: {
5
5
  readonly chevron: readonly ["M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z", "M0 0h24v24H0z"];
6
6
  readonly expand: readonly ["M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", "M0 0h24v24H0z"];
7
7
  readonly collapse: readonly ["M19 13H5v-2h14v2z", "M0 0h24v24H0z"];
8
+ readonly light_mode: readonly ["M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.4 12.4a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41zm1.06-11a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.4a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z", "M0 0h24v24H0z"];
9
+ readonly dark_mode: readonly ["M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.39 5.39 0 0 1-4.4 2.26 5.4 5.4 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z", "M0 0h24v24H0z"];
8
10
  };
9
11
  type IconName = keyof typeof iconPaths;
10
12
  export interface MaterialIconAttrs extends Attributes {
package/dist/pickers.css CHANGED
@@ -30,15 +30,15 @@
30
30
  position: relative;
31
31
  overflow: visible;
32
32
  }
33
+ .datepicker-controls .select-wrapper input:focus {
34
+ border-bottom: none;
35
+ }
33
36
  .datepicker-controls .select-wrapper input {
34
37
  border-bottom: none;
35
38
  text-align: center;
36
39
  margin: 0;
37
40
  cursor: pointer;
38
41
  }
39
- .datepicker-controls .select-wrapper input:focus {
40
- border-bottom: none;
41
- }
42
42
  .datepicker-controls .select-wrapper .caret {
43
43
  position: absolute;
44
44
  right: 0;
@@ -177,10 +177,6 @@
177
177
  text-decoration: none;
178
178
  color: var(--mm-text-secondary, rgba(0, 0, 0, 0.54));
179
179
  }
180
- .datepicker-table td {
181
- border-radius: 50%;
182
- padding: 0;
183
- }
184
180
  .datepicker-table td.is-today {
185
181
  color: var(--mm-primary-color, #26a69a);
186
182
  }
@@ -225,6 +221,10 @@
225
221
  background-color: var(--mm-border-color, rgba(0, 0, 0, 0.02));
226
222
  border-right: 1px solid var(--mm-border-color, rgba(0, 0, 0, 0.05));
227
223
  }
224
+ .datepicker-table td {
225
+ border-radius: 50%;
226
+ padding: 0;
227
+ }
228
228
 
229
229
  .datepicker-day-button {
230
230
  background-color: transparent;
@@ -457,15 +457,15 @@
457
457
  transition: transform 350ms, opacity 350ms;
458
458
  }
459
459
 
460
- .timepicker-dial-out {
461
- opacity: 0;
462
- }
463
460
  .timepicker-dial-out.timepicker-hours {
464
461
  transform: scale(1.1, 1.1);
465
462
  }
466
463
  .timepicker-dial-out.timepicker-minutes {
467
464
  transform: scale(0.8, 0.8);
468
465
  }
466
+ .timepicker-dial-out {
467
+ opacity: 0;
468
+ }
469
469
 
470
470
  .timepicker-canvas {
471
471
  transition: opacity 175ms;
@@ -2194,6 +2194,11 @@ table span.badge {
2194
2194
  font-feature-settings: "liga";
2195
2195
  }
2196
2196
 
2197
+ .chip:focus {
2198
+ outline: none;
2199
+ background-color: var(--mm-primary-color, #26a69a);
2200
+ color: var(--mm-button-text, #fff);
2201
+ }
2197
2202
  .chip {
2198
2203
  display: inline-block;
2199
2204
  height: 32px;
@@ -2207,11 +2212,6 @@ table span.badge {
2207
2212
  margin-bottom: 5px;
2208
2213
  margin-right: 5px;
2209
2214
  }
2210
- .chip:focus {
2211
- outline: none;
2212
- background-color: var(--mm-primary-color, #26a69a);
2213
- color: var(--mm-button-text, #fff);
2214
- }
2215
2215
  .chip > img {
2216
2216
  float: left;
2217
2217
  margin: 0 8px 0 -12px;
@@ -2664,7 +2664,6 @@ td, th {
2664
2664
  border-spacing: 0;
2665
2665
  display: block;
2666
2666
  position: relative;
2667
- /* sort out borders */
2668
2667
  }
2669
2668
  table.responsive-table td:empty:before {
2670
2669
  content: " ";
@@ -2712,6 +2711,9 @@ td, th {
2712
2711
  border-bottom: none;
2713
2712
  padding: 0 10px;
2714
2713
  }
2714
+ table.responsive-table {
2715
+ /* sort out borders */
2716
+ }
2715
2717
  table.responsive-table thead {
2716
2718
  border: 0;
2717
2719
  border-right: 1px solid rgba(0, 0, 0, 0.12);
@@ -2996,9 +2998,6 @@ td, th {
2996
2998
  .card.large {
2997
2999
  height: 500px;
2998
3000
  }
2999
- .card.horizontal {
3000
- display: flex;
3001
- }
3002
3001
  .card.horizontal.small .card-image, .card.horizontal.medium .card-image, .card.horizontal.large .card-image {
3003
3002
  height: 100%;
3004
3003
  max-height: none;
@@ -3007,6 +3006,9 @@ td, th {
3007
3006
  .card.horizontal.small .card-image img, .card.horizontal.medium .card-image img, .card.horizontal.large .card-image img {
3008
3007
  height: 100%;
3009
3008
  }
3009
+ .card.horizontal {
3010
+ display: flex;
3011
+ }
3010
3012
  .card.horizontal .card-image {
3011
3013
  max-width: 50%;
3012
3014
  }
@@ -3070,15 +3072,15 @@ td, th {
3070
3072
  .card .card-content .card-title i {
3071
3073
  line-height: 32px;
3072
3074
  }
3075
+ .card .card-action:last-child {
3076
+ border-radius: 0 0 2px 2px;
3077
+ }
3073
3078
  .card .card-action {
3074
3079
  background-color: inherit;
3075
3080
  border-top: 1px solid rgba(160, 160, 160, 0.2);
3076
3081
  position: relative;
3077
3082
  padding: 16px 24px;
3078
3083
  }
3079
- .card .card-action:last-child {
3080
- border-radius: 0 0 2px 2px;
3081
- }
3082
3084
  .card .card-action a:not(.btn):not(.btn-large):not(.btn-floating) {
3083
3085
  color: #ffab40;
3084
3086
  margin-right: 24px;
@@ -3169,10 +3171,6 @@ td, th {
3169
3171
  }
3170
3172
  }
3171
3173
 
3172
- .pulse {
3173
- overflow: visible;
3174
- position: relative;
3175
- }
3176
3174
  .pulse::before {
3177
3175
  content: "";
3178
3176
  display: block;
@@ -3187,6 +3185,10 @@ td, th {
3187
3185
  animation: pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;
3188
3186
  z-index: -1;
3189
3187
  }
3188
+ .pulse {
3189
+ overflow: visible;
3190
+ position: relative;
3191
+ }
3190
3192
 
3191
3193
  @keyframes pulse-animation {
3192
3194
  0% {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mithril-materialized",
3
- "version": "3.3.3",
3
+ "version": "3.3.5",
4
4
  "description": "A materialize library for mithril.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -72,7 +72,7 @@
72
72
  "author": "Erik Vullings <erik.vullings@gmail.com> (http://www.tno.nl)",
73
73
  "license": "MIT",
74
74
  "dependencies": {
75
- "mithril": "^2.3.5"
75
+ "mithril": "^2.3.7"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@playwright/test": "^1.55.0",
@@ -86,13 +86,13 @@
86
86
  "concurrently": "^9.2.1",
87
87
  "express": "^5.1.0",
88
88
  "identity-obj-proxy": "^3.0.0",
89
- "jest": "^30.1.2",
89
+ "jest": "^30.1.3",
90
90
  "jest-environment-jsdom": "^30.1.2",
91
91
  "js-yaml": "^4.1.0",
92
92
  "rimraf": "^6.0.1",
93
- "rollup": "^4.50.0",
93
+ "rollup": "^4.50.1",
94
94
  "rollup-plugin-postcss": "^4.0.2",
95
- "sass": "^1.91.0",
95
+ "sass": "^1.92.1",
96
96
  "ts-jest": "^29.4.1",
97
97
  "tslib": "^2.8.1",
98
98
  "typedoc": "^0.28.12",