mithril-materialized 3.17.1 → 3.17.3

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.js CHANGED
@@ -3782,7 +3782,7 @@ const InputField = (type, defaultClass = '') => () => {
3782
3782
  }
3783
3783
  },
3784
3784
  view: ({ attrs }) => {
3785
- var _a, _b, _c, _d, _e, _f;
3785
+ var _a, _b, _c, _d, _e, _f, _g;
3786
3786
  const { className = 'col s12', dataError, dataSuccess, helperText, iconName, id = state.id, placeholder, isMandatory, label, maxLength, newRow, oninput, onchange, onkeydown, onkeypress, onkeyup, style, validate, canClear } = attrs, params = __rest(attrs, ["className", "dataError", "dataSuccess", "helperText", "iconName", "id", "placeholder", "isMandatory", "label", "maxLength", "newRow", "oninput", "onchange", "onkeydown", "onkeypress", "onkeyup", "style", "validate", "canClear"]);
3787
3787
  // const attributes = toAttrs(params);
3788
3788
  const cn = [newRow ? 'clear' : '', defaultClass, className].filter(Boolean).join(' ').trim() || undefined;
@@ -4016,12 +4016,14 @@ const InputField = (type, defaultClass = '') => () => {
4016
4016
  m('button.number-input-control.number-input-control-up[type=button]', {
4017
4017
  'aria-label': `Increase ${label || 'value'}`,
4018
4018
  title: 'Increase value',
4019
+ tabindex: -1,
4019
4020
  onmousedown: (event) => event.preventDefault(),
4020
4021
  onclick: () => stepNumberInput('up'),
4021
4022
  }, m(MaterialIcon, { name: 'chevron', direction: 'up' })),
4022
4023
  m('button.number-input-control.number-input-control-down[type=button]', {
4023
4024
  'aria-label': `Decrease ${label || 'value'}`,
4024
4025
  title: 'Decrease value',
4026
+ tabindex: -1,
4025
4027
  onmousedown: (event) => event.preventDefault(),
4026
4028
  onclick: () => stepNumberInput('down'),
4027
4029
  }, m(MaterialIcon, { name: 'chevron' })),
@@ -4047,7 +4049,7 @@ const InputField = (type, defaultClass = '') => () => {
4047
4049
  initialValue: value !== undefined && value !== '',
4048
4050
  helperText,
4049
4051
  dataError: state.hasInteracted && !state.isValid ? dataError : undefined,
4050
- dataSuccess: state.hasInteracted && state.isValid ? dataSuccess : undefined,
4052
+ dataSuccess: state.hasInteracted && state.isValid && ((_g = state.inputElement) === null || _g === void 0 ? void 0 : _g.value) ? dataSuccess : undefined,
4051
4053
  }),
4052
4054
  maxLength && typeof value === 'string'
4053
4055
  ? m(CharacterCounter, {