mithril-materialized 2.0.0-beta.2 → 2.0.0-beta.4

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 (67) hide show
  1. package/dist/advanced.css +1888 -0
  2. package/dist/autocomplete.d.ts +3 -3
  3. package/dist/breadcrumb.d.ts +53 -0
  4. package/dist/button.d.ts +10 -10
  5. package/dist/carousel.d.ts +2 -2
  6. package/dist/chip.d.ts +2 -2
  7. package/dist/code-block.d.ts +2 -2
  8. package/dist/collapsible.d.ts +2 -2
  9. package/dist/collection.d.ts +2 -2
  10. package/dist/components.css +2310 -0
  11. package/dist/core.css +3402 -0
  12. package/dist/datepicker.d.ts +66 -0
  13. package/dist/dropdown.d.ts +2 -2
  14. package/dist/file-upload.d.ts +34 -0
  15. package/dist/floating-action-button.d.ts +2 -2
  16. package/dist/forms.css +2284 -0
  17. package/dist/index.css +1483 -167
  18. package/dist/index.d.ts +12 -1
  19. package/dist/index.esm.js +3694 -1717
  20. package/dist/index.js +3714 -1716
  21. package/dist/index.min.css +8 -0
  22. package/dist/index.umd.js +3714 -1716
  23. package/dist/input-options.d.ts +1 -1
  24. package/dist/input.d.ts +9 -9
  25. package/dist/label.d.ts +4 -2
  26. package/dist/material-box.d.ts +2 -2
  27. package/dist/modal.d.ts +2 -2
  28. package/dist/option.d.ts +4 -4
  29. package/dist/pagination.d.ts +2 -2
  30. package/dist/parallax.d.ts +2 -2
  31. package/dist/pickers.css +487 -0
  32. package/dist/pushpin.d.ts +32 -0
  33. package/dist/radio.d.ts +4 -4
  34. package/dist/search-select.d.ts +2 -2
  35. package/dist/select.d.ts +2 -2
  36. package/dist/sidenav.d.ts +76 -0
  37. package/dist/switch.d.ts +2 -2
  38. package/dist/tabs.d.ts +2 -4
  39. package/dist/theme-switcher.d.ts +49 -0
  40. package/dist/timepicker.d.ts +42 -0
  41. package/dist/toast.d.ts +45 -0
  42. package/dist/tooltip.d.ts +59 -0
  43. package/dist/utilities.css +3197 -0
  44. package/dist/wizard.d.ts +58 -0
  45. package/package.json +16 -8
  46. package/sass/components/_breadcrumb.scss +248 -0
  47. package/sass/components/_buttons.scss +3 -3
  48. package/sass/components/_chips.scss +8 -8
  49. package/sass/components/_collapsible.scss +8 -8
  50. package/sass/components/_datepicker.scss +45 -14
  51. package/sass/components/_dropdown.scss +5 -5
  52. package/sass/components/_file-upload.scss +228 -0
  53. package/sass/components/_global.scss +7 -5
  54. package/sass/components/_modal.scss +5 -2
  55. package/sass/components/_navbar.scss +13 -5
  56. package/sass/components/_sidenav.scss +164 -7
  57. package/sass/components/_tabs.scss +5 -4
  58. package/sass/components/_theme-switcher.scss +120 -0
  59. package/sass/components/_theme-variables.scss +205 -0
  60. package/sass/components/_timepicker.scss +179 -87
  61. package/sass/components/_wizard.scss +416 -0
  62. package/sass/components/forms/_input-fields.scss +34 -12
  63. package/sass/components/forms/_radio-buttons.scss +10 -10
  64. package/sass/components/forms/_select.scss +8 -8
  65. package/sass/components/forms/_switches.scss +6 -6
  66. package/sass/materialize.scss +7 -0
  67. package/dist/pickers.d.ts +0 -130
package/dist/pickers.d.ts DELETED
@@ -1,130 +0,0 @@
1
- import { FactoryComponent } from 'mithril';
2
- import { InputAttributes } from './input-options';
3
- export interface DatePickerI18n {
4
- cancel?: string;
5
- clear?: string;
6
- done?: string;
7
- previousMonth?: string;
8
- nextMonth?: string;
9
- months?: string[];
10
- monthsShort?: string[];
11
- weekdays?: string[];
12
- weekdaysShort?: string[];
13
- weekdaysAbbrev?: string[];
14
- }
15
- export interface DatePickerOptions {
16
- /** Close when date is selected */
17
- autoClose?: boolean;
18
- /** The default output format for the input field value */
19
- format?: string;
20
- /** Custom parse function */
21
- parse?: (dateString: string, format: string) => Date | null;
22
- /** The initial date to view when first opened */
23
- defaultDate?: Date;
24
- /** Make the defaultDate the initial selected value */
25
- setDefaultDate?: boolean;
26
- /** Disable weekends */
27
- disableWeekends?: boolean;
28
- /** Custom function to disable specific days */
29
- disableDayFn?: (date: Date) => boolean;
30
- /** First day of week (0: Sunday, 1: Monday etc) */
31
- firstDay?: number;
32
- /** The earliest date that can be selected */
33
- minDate?: Date;
34
- /** The latest date that can be selected */
35
- maxDate?: Date;
36
- /** Number of years either side, or array of upper/lower range */
37
- yearRange?: number | number[];
38
- /** Show clear button */
39
- showClearBtn?: boolean;
40
- /** Internationalization */
41
- i18n?: DatePickerI18n;
42
- /** Callback when date is selected */
43
- onSelect?: (date: Date) => void;
44
- /** Callback when picker is opened */
45
- onOpen?: () => void;
46
- /** Callback when picker is closed */
47
- onClose?: () => void;
48
- }
49
- export interface DatePickerAttributes extends InputAttributes<string>, DatePickerOptions {
50
- /** Date format attribute (alternative to format property) */
51
- format?: string;
52
- /** Year range attribute (alternative to yearRange property) */
53
- yearrange?: string;
54
- /** Legacy: Date label (use label instead) */
55
- dateLabel?: string;
56
- /** Legacy: Display format (use format instead) */
57
- displayFormat?: string;
58
- }
59
- /**
60
- * Enhanced DatePicker component based on Materialize CSS datepicker
61
- */
62
- export declare const DatePicker: FactoryComponent<DatePickerAttributes>;
63
- export interface TimePickerI18n {
64
- /** Label for time field */
65
- timeLabel?: string;
66
- /** Helper text showing format */
67
- helperText?: string;
68
- /** Now button text */
69
- nowLabel?: string;
70
- /** Clear button text */
71
- clearLabel?: string;
72
- /** Close button text */
73
- closeLabel?: string;
74
- /** Icon for time input */
75
- iconName?: string;
76
- /** AM label for 12-hour format */
77
- amLabel?: string;
78
- /** PM label for 12-hour format */
79
- pmLabel?: string;
80
- /** Toggle 12h/24h button text */
81
- toggleFormatLabel?: string;
82
- }
83
- export interface TimePickerFormat {
84
- /** Use 12-hour format */
85
- twelveHour?: boolean;
86
- /** Allow user to toggle between 12h/24h format */
87
- allowFormatToggle?: boolean;
88
- }
89
- export interface TimePickerOptions extends TimePickerI18n, TimePickerFormat {
90
- /** Show clear button */
91
- showClearBtn?: boolean;
92
- /** Show now button */
93
- showNowBtn?: boolean;
94
- /** Use modal for time selection (default: true) */
95
- useModal?: boolean;
96
- /** Disabled state - prevents all interaction */
97
- disabled?: boolean;
98
- /** Readonly state - shows value but prevents editing */
99
- readonly?: boolean;
100
- /**
101
- * Default time to revert to when field is cleared (optional).
102
- * Note: Use initialValue (from InputOptions) to set the current/initial value of the field.
103
- * defaultTime is only used as a fallback when the user clears the field and you want to provide a default.
104
- */
105
- defaultTime?: string;
106
- /** Auto close picker after selection */
107
- autoClose?: boolean;
108
- /** Callback when time is selected */
109
- onSelect?: (hours: number, minutes: number) => void;
110
- /** Callback when picker is opened */
111
- onOpen?: () => void;
112
- /** Callback when picker is closed */
113
- onClose?: () => void;
114
- /** Input handler - fires on every change */
115
- oninput?: (value: string) => void;
116
- /** Change handler for the time value (24h format) - fires on blur/focus loss */
117
- onchange?: (value: string) => void;
118
- }
119
- export interface TimePickerAttributes extends InputAttributes<string>, TimePickerOptions {
120
- }
121
- /**
122
- * Enhanced TimePicker component with i18n support and improved functionality.
123
- *
124
- * Usage:
125
- * - Use `initialValue` to set the current/initial time value (24h format: "HH:MM")
126
- * - Use `defaultTime` only if you need a fallback when the field is cleared
127
- * - The component accepts and outputs 24-hour format strings ("HH:MM")
128
- * - Display format (12h/24h) is controlled by the `twelveHour` property
129
- */
130
- export declare const TimePicker: FactoryComponent<TimePickerAttributes>;