mithril-materialized 2.0.0-beta.1 → 2.0.0-beta.10
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 +286 -306
- package/dist/advanced.css +1888 -0
- package/dist/autocomplete.d.ts +3 -3
- package/dist/breadcrumb.d.ts +53 -0
- package/dist/button.d.ts +10 -10
- package/dist/carousel.d.ts +2 -2
- package/dist/chip.d.ts +2 -2
- package/dist/code-block.d.ts +2 -2
- package/dist/collapsible.d.ts +2 -2
- package/dist/collection.d.ts +2 -2
- package/dist/components.css +2310 -0
- package/dist/core.css +3402 -0
- package/dist/datepicker.d.ts +66 -0
- package/dist/dropdown.d.ts +2 -2
- package/dist/file-upload.d.ts +34 -0
- package/dist/floating-action-button.d.ts +2 -2
- package/dist/forms.css +2284 -0
- package/dist/index.css +1483 -167
- package/dist/index.d.ts +12 -1
- package/dist/index.esm.js +3694 -1717
- package/dist/index.js +3714 -1716
- package/dist/index.min.css +8 -0
- package/dist/index.umd.js +3714 -1716
- package/dist/input-options.d.ts +1 -1
- package/dist/input.d.ts +9 -9
- package/dist/label.d.ts +4 -2
- package/dist/material-box.d.ts +2 -2
- package/dist/modal.d.ts +2 -2
- package/dist/option.d.ts +4 -4
- package/dist/pagination.d.ts +2 -2
- package/dist/parallax.d.ts +2 -2
- package/dist/pickers.css +487 -0
- package/dist/pushpin.d.ts +32 -0
- package/dist/radio.d.ts +4 -4
- package/dist/search-select.d.ts +2 -2
- package/dist/select.d.ts +2 -2
- package/dist/sidenav.d.ts +76 -0
- package/dist/switch.d.ts +2 -2
- package/dist/tabs.d.ts +2 -4
- package/dist/theme-switcher.d.ts +49 -0
- package/dist/timepicker.d.ts +42 -0
- package/dist/toast.d.ts +45 -0
- package/dist/tooltip.d.ts +59 -0
- package/dist/utilities.css +3197 -0
- package/dist/wizard.d.ts +58 -0
- package/package.json +16 -8
- package/sass/components/_breadcrumb.scss +248 -0
- package/sass/components/_buttons.scss +3 -3
- package/sass/components/_chips.scss +8 -8
- package/sass/components/_collapsible.scss +8 -8
- package/sass/components/_datepicker.scss +45 -14
- package/sass/components/_dropdown.scss +5 -5
- package/sass/components/_file-upload.scss +228 -0
- package/sass/components/_global.scss +7 -5
- package/sass/components/_modal.scss +5 -2
- package/sass/components/_navbar.scss +13 -5
- package/sass/components/_sidenav.scss +164 -7
- package/sass/components/_tabs.scss +5 -4
- package/sass/components/_theme-switcher.scss +120 -0
- package/sass/components/_theme-variables.scss +205 -0
- package/sass/components/_timepicker.scss +179 -87
- package/sass/components/_wizard.scss +416 -0
- package/sass/components/forms/_input-fields.scss +34 -12
- package/sass/components/forms/_radio-buttons.scss +10 -10
- package/sass/components/forms/_select.scss +8 -8
- package/sass/components/forms/_switches.scss +6 -6
- package/sass/materialize.scss +7 -0
- package/dist/pickers.d.ts +0 -130
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { FactoryComponent } from 'mithril';
|
|
2
|
+
import { InputAttrs } 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
|
+
/** Show week numbers */
|
|
41
|
+
showWeekNumbers?: boolean;
|
|
42
|
+
/** Week numbering system: 'iso' (ISO 8601) or 'local' (local convention) */
|
|
43
|
+
weekNumbering?: 'iso' | 'local';
|
|
44
|
+
/** Internationalization */
|
|
45
|
+
i18n?: DatePickerI18n;
|
|
46
|
+
/** Callback when date is selected */
|
|
47
|
+
onSelect?: (date: Date) => void;
|
|
48
|
+
/** Callback when picker is opened */
|
|
49
|
+
onOpen?: () => void;
|
|
50
|
+
/** Callback when picker is closed */
|
|
51
|
+
onClose?: () => void;
|
|
52
|
+
}
|
|
53
|
+
export interface DatePickerAttrs extends InputAttrs<string>, DatePickerOptions {
|
|
54
|
+
/** Date format attribute (alternative to format property) */
|
|
55
|
+
format?: string;
|
|
56
|
+
/** Year range attribute (alternative to yearRange property) */
|
|
57
|
+
yearrange?: string;
|
|
58
|
+
/** Legacy: Date label (use label instead) */
|
|
59
|
+
dateLabel?: string;
|
|
60
|
+
/** Legacy: Display format (use format instead) */
|
|
61
|
+
displayFormat?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Enhanced DatePicker component based on Materialize CSS datepicker
|
|
65
|
+
*/
|
|
66
|
+
export declare const DatePicker: FactoryComponent<DatePickerAttrs>;
|
package/dist/dropdown.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface DropdownItem<T extends string | number> {
|
|
|
11
11
|
/** Add a divider */
|
|
12
12
|
divider?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export interface
|
|
14
|
+
export interface DropdownAttrs<T extends string | number> extends Attributes {
|
|
15
15
|
/**
|
|
16
16
|
* Optional id of the dropdown element
|
|
17
17
|
* @default 'dropdown'
|
|
@@ -42,4 +42,4 @@ export interface DropdownAttributes<T extends string | number> extends Attribute
|
|
|
42
42
|
helperText?: string;
|
|
43
43
|
}
|
|
44
44
|
/** Pure TypeScript Dropdown component - no Materialize dependencies */
|
|
45
|
-
export declare const Dropdown: <T extends string | number>() => Component<
|
|
45
|
+
export declare const Dropdown: <T extends string | number>() => Component<DropdownAttrs<T>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
+
export interface FileUploadAttrs extends Attributes {
|
|
3
|
+
/** Accept specific file types (e.g., "image/*", ".pdf,.doc") */
|
|
4
|
+
accept?: string;
|
|
5
|
+
/** Allow multiple file selection */
|
|
6
|
+
multiple?: boolean;
|
|
7
|
+
/** Maximum file size in bytes */
|
|
8
|
+
maxSize?: number;
|
|
9
|
+
/** Maximum number of files (for multiple uploads) */
|
|
10
|
+
maxFiles?: number;
|
|
11
|
+
/** Callback when files are selected/dropped */
|
|
12
|
+
onFilesSelected?: (files: File[]) => void;
|
|
13
|
+
/** Callback for upload progress (if implementing upload) */
|
|
14
|
+
onProgress?: (progress: number, file: File) => void;
|
|
15
|
+
/** Callback when files are removed */
|
|
16
|
+
onFileRemoved?: (file: File) => void;
|
|
17
|
+
/** Disable the upload area */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Custom label text */
|
|
20
|
+
label?: string;
|
|
21
|
+
/** Helper text */
|
|
22
|
+
helperText?: string;
|
|
23
|
+
/** Show file preview for images */
|
|
24
|
+
showPreview?: boolean;
|
|
25
|
+
/** Custom class */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** Validation error message */
|
|
28
|
+
error?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* File Upload Component with Drag and Drop
|
|
32
|
+
* Supports multiple files, file type validation, size limits, and image preview
|
|
33
|
+
*/
|
|
34
|
+
export declare const FileUpload: FactoryComponent<FileUploadAttrs>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FactoryComponent } from 'mithril';
|
|
2
|
-
export interface
|
|
2
|
+
export interface FloatingActionButtonAttrs {
|
|
3
3
|
/** Optional classes to add to the top element */
|
|
4
4
|
className?: string;
|
|
5
5
|
/** Optional style to add to the top element, e.g. for positioning it inline */
|
|
@@ -34,4 +34,4 @@ export interface FloatingActionButtonAttributes {
|
|
|
34
34
|
/**
|
|
35
35
|
* Floating Action Button
|
|
36
36
|
*/
|
|
37
|
-
export declare const FloatingActionButton: FactoryComponent<
|
|
37
|
+
export declare const FloatingActionButton: FactoryComponent<FloatingActionButtonAttrs>;
|