mithril-materialized 3.17.5 → 3.17.6
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/README.md +4 -114
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/input-options.d.ts +2 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -2,20 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
A Mithril.js component library inspired by [materialize-css](https://materializecss.com) design principles, [available on npm](https://www.npmjs.com/package/mithril-materialized). This library provides you with ready-to-use Mithril components that follow Material Design guidelines, with **no external JavaScript dependencies**.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Documentation and releases
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **🔥 Zero External JS Dependencies**: No longer requires `materialize-css` JavaScript or `material-icons` fonts
|
|
12
|
-
- **📦 Smaller Bundle Size**: Reduced package size by eliminating external dependencies
|
|
13
|
-
- **⚡ Better Performance**: Direct implementations without jQuery or other heavy dependencies
|
|
14
|
-
- **🛠️ Enhanced Components**: Improved DatePicker with date ranges, week numbers, and TimePicker with configurable AM/PM/24h or inline style
|
|
15
|
-
- **🛠️ New Components**: DataTable, TreeView, Timeline, Masonry, RatingControl, ImageList, Wizard/Stepper, Breadcrumb
|
|
16
|
-
- **📱 Modern Architecture**: Factory components with proper TypeScript support
|
|
17
|
-
- **🎯 CSS-Only Styling**: Uses only CSS for styling - no JavaScript initialization needed
|
|
18
|
-
- **🎨 Custom SVG Icons**: Built-in MaterialIcon component with custom SVG icons (caret, close)
|
|
7
|
+
- Browse the interactive [component documentation and examples](https://erikvullings.github.io/mithril-materialized/#!/home).
|
|
8
|
+
- See the [changelog](https://github.com/erikvullings/mithril-materialized/blob/master/CHANGELOG.md) for version-specific changes.
|
|
9
|
+
- Report issues or contribute at the [GitHub repository](https://github.com/erikvullings/mithril-materialized).
|
|
19
10
|
|
|
20
11
|
### ✨ Key Features
|
|
21
12
|
|
|
@@ -302,91 +293,6 @@ See the [live documentation](https://erikvullings.github.io/mithril-materialized
|
|
|
302
293
|
|
|
303
294
|
> **Note**: The date range picker is now fully implemented with comprehensive validation and formatting support.
|
|
304
295
|
|
|
305
|
-
## 🗺️ Roadmap & Planned Improvements
|
|
306
|
-
|
|
307
|
-
### 🚀 Phase 1: Core Optimizations & New Components (In Progress)
|
|
308
|
-
|
|
309
|
-
**✅ Completed:**
|
|
310
|
-
|
|
311
|
-
- ✅ Modular CSS architecture with tree-shaking support
|
|
312
|
-
- ✅ Dark theme system with CSS custom properties
|
|
313
|
-
- ✅ File upload component with drag-and-drop
|
|
314
|
-
- ✅ Theme switching components (ThemeSwitcher, ThemeToggle)
|
|
315
|
-
- ✅ Sidenav component with responsive behavior
|
|
316
|
-
- ✅ Breadcrumb navigation component
|
|
317
|
-
- ✅ Wizard/Stepper component for multi-step forms
|
|
318
|
-
|
|
319
|
-
**✅ Recently Completed (v3.2.x):**
|
|
320
|
-
|
|
321
|
-
- ✅ **TextArea Height Alignment**: Fixed single-line `textarea` height to match TextInput components perfectly
|
|
322
|
-
- ✅ **Improved AutoResize Logic**: TextArea now only sets custom height for multi-line content, matching Materialize CSS reference behavior
|
|
323
|
-
- ✅ **Better Mithril Integration**: Hidden div for height measurement now properly managed within Mithril's render cycle
|
|
324
|
-
- ✅ DataTable component with sorting, filtering, and pagination
|
|
325
|
-
- ✅ TreeView component for hierarchical data with expand/collapse, selection, and VSCode-style connectors
|
|
326
|
-
- ✅ Enhanced TypeScript definitions with better JSDoc comments
|
|
327
|
-
- ✅ Performance optimizations and bundle size improvements
|
|
328
|
-
- ✅ Enhanced RangeInput with vertical orientation, double-thumb range selection, and smart tooltip display
|
|
329
|
-
- ✅ Advanced DatePicker with date range selection, constraints, and format support
|
|
330
|
-
- ✅ Layout components: Masonry (Pinterest-style grid), Timeline (vertical event display), ImageList (responsive galleries)
|
|
331
|
-
- ✅ RatingControl with configurable icons, min/max, tooltip/helpers, readonly and disabled mode
|
|
332
|
-
- ✅ Improved RangeInput components converted to proper Mithril components with better lifecycle management
|
|
333
|
-
- ✅ Enhanced accessibility with individual thumb slider elements and PageUp/PageDown keyboard support
|
|
334
|
-
|
|
335
|
-
### 🎯 Phase 2: Advanced Components & Features
|
|
336
|
-
|
|
337
|
-
**Data Display:**
|
|
338
|
-
|
|
339
|
-
- Card layouts with enhanced Material Design 3.0 styling
|
|
340
|
-
- Advanced tree operations (drag & drop, context menus)
|
|
341
|
-
|
|
342
|
-
**Input & Forms:**
|
|
343
|
-
|
|
344
|
-
- ✅ Advanced date range picker with validation and constraints
|
|
345
|
-
- Autocomplete with async data loading
|
|
346
|
-
|
|
347
|
-
**Navigation & Layout:**
|
|
348
|
-
|
|
349
|
-
- AppBar/Toolbar component with responsive behavior
|
|
350
|
-
- Bottom navigation component for mobile apps
|
|
351
|
-
- Drawer/Sidebar component with overlay and push modes
|
|
352
|
-
- Grid system enhancements with CSS Grid support
|
|
353
|
-
|
|
354
|
-
### 🔮 Phase 3: Modern Features & Integration
|
|
355
|
-
|
|
356
|
-
**Developer Experience:**
|
|
357
|
-
|
|
358
|
-
- Storybook integration for component documentation
|
|
359
|
-
- Figma design system integration
|
|
360
|
-
- CLI tools for component generation
|
|
361
|
-
- Better accessibility (ARIA) support throughout
|
|
362
|
-
|
|
363
|
-
**Performance & Optimization:**
|
|
364
|
-
|
|
365
|
-
- Virtual scrolling for large lists
|
|
366
|
-
- Lazy loading component utilities
|
|
367
|
-
- Bundle analyzer and optimization tools
|
|
368
|
-
- CSS-in-JS runtime support option
|
|
369
|
-
|
|
370
|
-
### 📊 Bundle Size Targets
|
|
371
|
-
|
|
372
|
-
**Current Status (v3.2.2):**
|
|
373
|
-
|
|
374
|
-
- Total: ~65KB gzipped (42KB JS + 23KB CSS)
|
|
375
|
-
- Modular CSS can reduce bundle by 30-50%
|
|
376
|
-
- Optimized component implementations reduce overhead
|
|
377
|
-
|
|
378
|
-
**Phase 1 Targets:**
|
|
379
|
-
|
|
380
|
-
- Core bundle: <40KB gzipped
|
|
381
|
-
- Modular approach: <25KB for typical apps
|
|
382
|
-
- Tree-shaking effectiveness: 60%+
|
|
383
|
-
|
|
384
|
-
**Long-term Goals:**
|
|
385
|
-
|
|
386
|
-
- Individual components: <2KB each
|
|
387
|
-
- Micro-bundle support for single components
|
|
388
|
-
- Zero-runtime CSS option for static sites
|
|
389
|
-
|
|
390
296
|
### 🤝 Contributing
|
|
391
297
|
|
|
392
298
|
We welcome contributions! Priority areas for community involvement:
|
|
@@ -397,22 +303,6 @@ We welcome contributions! Priority areas for community involvement:
|
|
|
397
303
|
|
|
398
304
|
See our [contributing guide](CONTRIBUTING.md) for detailed information.
|
|
399
305
|
|
|
400
|
-
### 📈 Performance Benchmarks
|
|
401
|
-
|
|
402
|
-
**Bundle Size Comparison:**
|
|
403
|
-
|
|
404
|
-
- mithril-materialized v3.2.2: ~65KB gzipped
|
|
405
|
-
- Material-UI: ~350KB gzipped
|
|
406
|
-
- Materialize CSS + jQuery: ~180KB gzipped
|
|
407
|
-
- Vuetify: ~250KB gzipped
|
|
408
|
-
|
|
409
|
-
**Runtime Performance:**
|
|
410
|
-
|
|
411
|
-
- Component initialization: <5ms average
|
|
412
|
-
- Theme switching: <10ms for full page
|
|
413
|
-
- File upload processing: Real-time without blocking
|
|
414
|
-
- TextArea auto-resize: <1ms per keystroke
|
|
415
|
-
|
|
416
306
|
### Button semantics
|
|
417
307
|
|
|
418
308
|
`Button`, `LargeButton`, `SmallButton`, and `FlatButton` render native `<button>` elements for actions. Use `href` when the component represents navigation; it then renders an `<a>` without a button `type`.
|
package/dist/index.esm.js
CHANGED
|
@@ -3781,7 +3781,7 @@ const InputField = (type, defaultClass = '') => () => {
|
|
|
3781
3781
|
},
|
|
3782
3782
|
view: ({ attrs }) => {
|
|
3783
3783
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
3784
|
-
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"]);
|
|
3784
|
+
const { className = 'col s12', dataError, dataSuccess, helperText, iconName, id = state.id, placeholder, isMandatory, label, maxLength, newRow, oninput, onchange, onkeydown, onkeypress, onkeyup, style, validate, canClear, hideSpinners } = attrs, params = __rest(attrs, ["className", "dataError", "dataSuccess", "helperText", "iconName", "id", "placeholder", "isMandatory", "label", "maxLength", "newRow", "oninput", "onchange", "onkeydown", "onkeypress", "onkeyup", "style", "validate", "canClear", "hideSpinners"]);
|
|
3785
3785
|
// const attributes = toAttrs(params);
|
|
3786
3786
|
const cn = [newRow ? 'clear' : '', defaultClass, className].filter(Boolean).join(' ').trim() || undefined;
|
|
3787
3787
|
// Special rendering for minmax range sliders
|
|
@@ -4009,7 +4009,7 @@ const InputField = (type, defaultClass = '') => () => {
|
|
|
4009
4009
|
onchange(getValue(state.inputElement));
|
|
4010
4010
|
}
|
|
4011
4011
|
} })),
|
|
4012
|
-
type === 'number' && !isNonInteractive
|
|
4012
|
+
type === 'number' && !isNonInteractive && !hideSpinners
|
|
4013
4013
|
? m('.number-input-controls', [
|
|
4014
4014
|
m('button.number-input-control.number-input-control-up[type=button]', {
|
|
4015
4015
|
'aria-label': `Increase ${label || 'value'}`,
|