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.esm.js CHANGED
@@ -874,6 +874,14 @@ const iconPaths = {
874
874
  'M19 13H5v-2h14v2z', // minus
875
875
  'M0 0h24v24H0z', // background
876
876
  ],
877
+ light_mode: [
878
+ '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',
879
+ 'M0 0h24v24H0z', // background
880
+ ],
881
+ dark_mode: [
882
+ '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',
883
+ 'M0 0h24v24H0z', // background
884
+ ],
877
885
  };
878
886
  const MaterialIcon = () => {
879
887
  return {
@@ -7162,20 +7170,23 @@ const ThemeSwitcher = () => {
7162
7170
  showLabels && m('span.theme-switcher-label', labels.theme),
7163
7171
  m('.theme-switcher-buttons', [
7164
7172
  m('button.btn-flat', {
7173
+ type: 'button',
7165
7174
  class: theme === 'light' ? 'active' : '',
7166
7175
  onclick: () => handleThemeChange('light'),
7167
7176
  title: labels.lightTitle,
7168
- }, [m('i.material-icons', 'light_mode'), showLabels && m('span', labels.light)]),
7177
+ }, [m(MaterialIcon, { name: 'light_mode' }), showLabels && m('span', labels.light)]),
7169
7178
  m('button.btn-flat', {
7179
+ type: 'button',
7170
7180
  class: theme === 'auto' ? 'active' : '',
7171
7181
  onclick: () => handleThemeChange('auto'),
7172
7182
  title: labels.autoTitle,
7173
7183
  }, [m('i.material-icons', 'brightness_auto'), showLabels && m('span', labels.auto)]),
7174
7184
  m('button.btn-flat', {
7185
+ type: 'button',
7175
7186
  class: theme === 'dark' ? 'active' : '',
7176
7187
  onclick: () => handleThemeChange('dark'),
7177
7188
  title: labels.darkTitle,
7178
- }, [m('i.material-icons', 'dark_mode'), showLabels && m('span', labels.dark)]),
7189
+ }, [m(MaterialIcon, { name: 'dark_mode' }), showLabels && m('span', labels.dark)]),
7179
7190
  ]),
7180
7191
  ]);
7181
7192
  },
@@ -7196,16 +7207,16 @@ const ThemeToggle = () => {
7196
7207
  const currentTheme = ThemeManager.getEffectiveTheme();
7197
7208
  const labels = Object.assign(Object.assign({}, defaultI18n$1), attrs.i18n);
7198
7209
  return m('button.btn-flat.theme-toggle', {
7210
+ type: 'button',
7199
7211
  class: attrs.className || '',
7200
7212
  onclick: () => {
7201
7213
  ThemeManager.toggle();
7202
7214
  },
7203
7215
  title: currentTheme === 'light' ? labels.switchToDark : labels.switchToLight,
7204
- style: 'margin: 0; height: 64px; line-height: 64px; border-radius: 0; min-width: 64px; padding: 0;',
7205
7216
  }, [
7206
- m('i.material-icons', {
7207
- style: 'color: inherit; font-size: 24px;',
7208
- }, currentTheme === 'light' ? 'dark_mode' : 'light_mode'),
7217
+ m(MaterialIcon, {
7218
+ name: currentTheme === 'light' ? 'dark_mode' : 'light_mode',
7219
+ }),
7209
7220
  ]);
7210
7221
  },
7211
7222
  };
@@ -7749,7 +7760,6 @@ const Wizard = () => {
7749
7760
  }
7750
7761
  finally {
7751
7762
  state.isValidating = false;
7752
- m.redraw();
7753
7763
  }
7754
7764
  };
7755
7765
  const goToStep = async (stepIndex, attrs) => {
@@ -7781,8 +7791,6 @@ const Wizard = () => {
7781
7791
  if (onStepChange && oldStep !== stepIndex) {
7782
7792
  onStepChange(stepIndex, steps[stepIndex].id || `step-${stepIndex}`);
7783
7793
  }
7784
- // Force redraw to update UI
7785
- m.redraw();
7786
7794
  return true;
7787
7795
  };
7788
7796
  const nextStep = async (attrs) => {
package/dist/index.js CHANGED
@@ -876,6 +876,14 @@ const iconPaths = {
876
876
  'M19 13H5v-2h14v2z', // minus
877
877
  'M0 0h24v24H0z', // background
878
878
  ],
879
+ light_mode: [
880
+ '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',
881
+ 'M0 0h24v24H0z', // background
882
+ ],
883
+ dark_mode: [
884
+ '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',
885
+ 'M0 0h24v24H0z', // background
886
+ ],
879
887
  };
880
888
  const MaterialIcon = () => {
881
889
  return {
@@ -7164,20 +7172,23 @@ const ThemeSwitcher = () => {
7164
7172
  showLabels && m('span.theme-switcher-label', labels.theme),
7165
7173
  m('.theme-switcher-buttons', [
7166
7174
  m('button.btn-flat', {
7175
+ type: 'button',
7167
7176
  class: theme === 'light' ? 'active' : '',
7168
7177
  onclick: () => handleThemeChange('light'),
7169
7178
  title: labels.lightTitle,
7170
- }, [m('i.material-icons', 'light_mode'), showLabels && m('span', labels.light)]),
7179
+ }, [m(MaterialIcon, { name: 'light_mode' }), showLabels && m('span', labels.light)]),
7171
7180
  m('button.btn-flat', {
7181
+ type: 'button',
7172
7182
  class: theme === 'auto' ? 'active' : '',
7173
7183
  onclick: () => handleThemeChange('auto'),
7174
7184
  title: labels.autoTitle,
7175
7185
  }, [m('i.material-icons', 'brightness_auto'), showLabels && m('span', labels.auto)]),
7176
7186
  m('button.btn-flat', {
7187
+ type: 'button',
7177
7188
  class: theme === 'dark' ? 'active' : '',
7178
7189
  onclick: () => handleThemeChange('dark'),
7179
7190
  title: labels.darkTitle,
7180
- }, [m('i.material-icons', 'dark_mode'), showLabels && m('span', labels.dark)]),
7191
+ }, [m(MaterialIcon, { name: 'dark_mode' }), showLabels && m('span', labels.dark)]),
7181
7192
  ]),
7182
7193
  ]);
7183
7194
  },
@@ -7198,16 +7209,16 @@ const ThemeToggle = () => {
7198
7209
  const currentTheme = ThemeManager.getEffectiveTheme();
7199
7210
  const labels = Object.assign(Object.assign({}, defaultI18n$1), attrs.i18n);
7200
7211
  return m('button.btn-flat.theme-toggle', {
7212
+ type: 'button',
7201
7213
  class: attrs.className || '',
7202
7214
  onclick: () => {
7203
7215
  ThemeManager.toggle();
7204
7216
  },
7205
7217
  title: currentTheme === 'light' ? labels.switchToDark : labels.switchToLight,
7206
- style: 'margin: 0; height: 64px; line-height: 64px; border-radius: 0; min-width: 64px; padding: 0;',
7207
7218
  }, [
7208
- m('i.material-icons', {
7209
- style: 'color: inherit; font-size: 24px;',
7210
- }, currentTheme === 'light' ? 'dark_mode' : 'light_mode'),
7219
+ m(MaterialIcon, {
7220
+ name: currentTheme === 'light' ? 'dark_mode' : 'light_mode',
7221
+ }),
7211
7222
  ]);
7212
7223
  },
7213
7224
  };
@@ -7751,7 +7762,6 @@ const Wizard = () => {
7751
7762
  }
7752
7763
  finally {
7753
7764
  state.isValidating = false;
7754
- m.redraw();
7755
7765
  }
7756
7766
  };
7757
7767
  const goToStep = async (stepIndex, attrs) => {
@@ -7783,8 +7793,6 @@ const Wizard = () => {
7783
7793
  if (onStepChange && oldStep !== stepIndex) {
7784
7794
  onStepChange(stepIndex, steps[stepIndex].id || `step-${stepIndex}`);
7785
7795
  }
7786
- // Force redraw to update UI
7787
- m.redraw();
7788
7796
  return true;
7789
7797
  };
7790
7798
  const nextStep = async (attrs) => {