mithril-materialized 2.0.0-beta.1 → 2.0.0-beta.11
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 +287 -308
- 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 +66 -21
- 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/datatable.d.ts +291 -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 +1825 -184
- package/dist/index.d.ts +14 -1
- package/dist/index.esm.js +4752 -2143
- package/dist/index.js +4776 -2142
- package/dist/index.min.css +8 -0
- package/dist/index.umd.js +4776 -2142
- package/dist/input-options.d.ts +1 -1
- package/dist/input.d.ts +9 -10
- 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/types.d.ts +226 -0
- package/dist/utilities.css +3204 -0
- package/dist/wizard.d.ts +58 -0
- package/package.json +20 -9
- package/sass/components/_breadcrumb.scss +248 -0
- package/sass/components/_buttons.scss +3 -3
- package/sass/components/_cards.scss +10 -3
- package/sass/components/_chips.scss +8 -8
- package/sass/components/_collapsible.scss +8 -8
- package/sass/components/_datatable.scss +417 -0
- 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 +13 -11
- 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/_range.scss +5 -5
- package/sass/components/forms/_select.scss +9 -9
- package/sass/components/forms/_switches.scss +6 -6
- package/sass/materialize.scss +8 -0
- package/dist/pickers.d.ts +0 -130
package/dist/autocomplete.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FactoryComponent } from 'mithril';
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { InputAttrs } from './input-options';
|
|
3
|
+
export interface AutoCompleteAttrs extends InputAttrs<string> {
|
|
4
4
|
/** The data object defining the autocomplete options */
|
|
5
5
|
data?: Record<string, string | null>;
|
|
6
6
|
/** Limit of how many options are shown. Default: Infinity */
|
|
@@ -11,4 +11,4 @@ export interface AutoCompleteAttributes extends InputAttributes<string> {
|
|
|
11
11
|
onAutocomplete?: (value: string) => void;
|
|
12
12
|
}
|
|
13
13
|
/** Component to auto complete your text input - Pure Mithril implementation */
|
|
14
|
-
export declare const Autocomplete: FactoryComponent<
|
|
14
|
+
export declare const Autocomplete: FactoryComponent<AutoCompleteAttrs>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
+
export interface BreadcrumbItemAttrs {
|
|
3
|
+
/** Text content of the breadcrumb item */
|
|
4
|
+
text?: string;
|
|
5
|
+
/** URL for the breadcrumb item */
|
|
6
|
+
href?: string;
|
|
7
|
+
/** Whether this item is the current/active item */
|
|
8
|
+
active?: boolean;
|
|
9
|
+
/** Click handler for the breadcrumb item */
|
|
10
|
+
onclick?: (e: Event) => void;
|
|
11
|
+
/** Icon name (material icons) */
|
|
12
|
+
icon?: string;
|
|
13
|
+
/** Custom class for the item */
|
|
14
|
+
className?: string;
|
|
15
|
+
/** Whether this item is disabled */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface BreadcrumbAttrs extends Attributes {
|
|
19
|
+
/** Array of breadcrumb items */
|
|
20
|
+
items: BreadcrumbItemAttrs[];
|
|
21
|
+
/** Custom separator between items */
|
|
22
|
+
separator?: string;
|
|
23
|
+
/** Custom class for the breadcrumb container */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** Whether to show icons */
|
|
26
|
+
showIcons?: boolean;
|
|
27
|
+
/** Maximum number of items to show before collapsing */
|
|
28
|
+
maxItems?: number;
|
|
29
|
+
/** Whether to show home icon for first item */
|
|
30
|
+
showHome?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Breadcrumb Component
|
|
34
|
+
* Displays a navigation path showing the user's location within a site hierarchy
|
|
35
|
+
*/
|
|
36
|
+
export declare const Breadcrumb: FactoryComponent<BreadcrumbAttrs>;
|
|
37
|
+
/**
|
|
38
|
+
* Simple Breadcrumb utility for common use cases
|
|
39
|
+
*/
|
|
40
|
+
export declare const createBreadcrumb: (path: string, basePath?: string) => BreadcrumbItemAttrs[];
|
|
41
|
+
/**
|
|
42
|
+
* Breadcrumb utilities
|
|
43
|
+
*/
|
|
44
|
+
export declare class BreadcrumbManager {
|
|
45
|
+
/**
|
|
46
|
+
* Create breadcrumb items from a route path
|
|
47
|
+
*/
|
|
48
|
+
static fromRoute(route: string, routeConfig?: Record<string, string>): BreadcrumbItemAttrs[];
|
|
49
|
+
/**
|
|
50
|
+
* Create breadcrumb items from a hierarchical object
|
|
51
|
+
*/
|
|
52
|
+
static fromHierarchy(hierarchy: any[], textKey?: string, pathKey?: string): BreadcrumbItemAttrs[];
|
|
53
|
+
}
|
package/dist/button.d.ts
CHANGED
|
@@ -1,40 +1,85 @@
|
|
|
1
1
|
import m, { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
-
|
|
2
|
+
import { MaterialPosition, IconClass, ButtonVariant } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* HTML attributes that can be passed to button elements
|
|
5
|
+
* @deprecated Use native HTML attributes directly instead
|
|
6
|
+
*/
|
|
7
|
+
export interface HtmlAttrs {
|
|
3
8
|
id?: string;
|
|
4
9
|
for?: string;
|
|
5
10
|
placeholder?: string;
|
|
6
11
|
autofocus?: boolean;
|
|
7
12
|
disabled?: boolean;
|
|
8
|
-
type?: 'submit' | 'button' | '
|
|
13
|
+
type?: 'submit' | 'button' | 'reset';
|
|
9
14
|
}
|
|
10
|
-
|
|
11
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Enhanced button attributes with improved TypeScript support
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* // Basic button
|
|
20
|
+
* m(Button, { label: 'Click me' })
|
|
21
|
+
*
|
|
22
|
+
* // Submit button with icon
|
|
23
|
+
* m(Button, {
|
|
24
|
+
* variant: { type: 'submit' },
|
|
25
|
+
* label: 'Save',
|
|
26
|
+
* iconName: 'save',
|
|
27
|
+
* iconClass: 'small left'
|
|
28
|
+
* })
|
|
29
|
+
*
|
|
30
|
+
* // Modal trigger button
|
|
31
|
+
* m(Button, {
|
|
32
|
+
* variant: { type: 'modal', modalId: 'my-modal' },
|
|
33
|
+
* label: 'Open Modal'
|
|
34
|
+
* })
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export interface ButtonAttrs extends Attributes {
|
|
38
|
+
/** Button label text (optional for icon-only buttons) */
|
|
12
39
|
label?: string;
|
|
13
|
-
/**
|
|
40
|
+
/** Material icon name - see https://materializecss.com/icons.html */
|
|
14
41
|
iconName?: string;
|
|
15
|
-
/** Optional icon class, e.g. tiny (1em), small (2em), medium (4em), large (6em), or 'tiny right' */
|
|
16
|
-
iconClass?: string;
|
|
17
42
|
/**
|
|
18
|
-
*
|
|
19
|
-
* @
|
|
43
|
+
* Icon size and position class
|
|
44
|
+
* @example 'small', 'medium left', 'large right'
|
|
45
|
+
*/
|
|
46
|
+
iconClass?: IconClass;
|
|
47
|
+
/**
|
|
48
|
+
* Button behavior variant - determines button type and behavior
|
|
49
|
+
* @example
|
|
50
|
+
* { type: 'button' } - Standard button
|
|
51
|
+
* { type: 'submit' } - Form submit button
|
|
52
|
+
* { type: 'modal', modalId: 'my-modal' } - Modal trigger
|
|
53
|
+
* { type: 'reset' } - Form reset button
|
|
54
|
+
*/
|
|
55
|
+
variant?: ButtonVariant;
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Use variant instead
|
|
58
|
+
* If the button is intended to open a modal, specify its modal id so we can trigger it
|
|
20
59
|
*/
|
|
21
60
|
modalId?: string;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated Use native HTML attributes directly instead
|
|
63
|
+
* Some additional HTML attributes that can be attached to the button
|
|
64
|
+
*/
|
|
65
|
+
attr?: HtmlAttrs;
|
|
66
|
+
/** Tooltip text to display on hover */
|
|
25
67
|
tooltip?: string;
|
|
26
|
-
/**
|
|
27
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Tooltip position
|
|
70
|
+
* @fixed typo: tooltipPostion -> tooltipPosition
|
|
71
|
+
*/
|
|
72
|
+
tooltipPosition?: MaterialPosition;
|
|
28
73
|
}
|
|
29
74
|
/**
|
|
30
75
|
* A factory to create new buttons.
|
|
31
76
|
*
|
|
32
77
|
* @example FlatButton = ButtonFactory('a.waves-effect.waves-teal.btn-flat');
|
|
33
78
|
*/
|
|
34
|
-
export declare const ButtonFactory: (element: string, defaultClassNames: string, type?: string) => FactoryComponent<
|
|
35
|
-
export declare const Button: m.FactoryComponent<
|
|
36
|
-
export declare const LargeButton: m.FactoryComponent<
|
|
37
|
-
export declare const SmallButton: m.FactoryComponent<
|
|
38
|
-
export declare const FlatButton: m.FactoryComponent<
|
|
39
|
-
export declare const RoundIconButton: m.FactoryComponent<
|
|
40
|
-
export declare const SubmitButton: m.FactoryComponent<
|
|
79
|
+
export declare const ButtonFactory: (element: string, defaultClassNames: string, type?: string) => FactoryComponent<ButtonAttrs>;
|
|
80
|
+
export declare const Button: m.FactoryComponent<ButtonAttrs>;
|
|
81
|
+
export declare const LargeButton: m.FactoryComponent<ButtonAttrs>;
|
|
82
|
+
export declare const SmallButton: m.FactoryComponent<ButtonAttrs>;
|
|
83
|
+
export declare const FlatButton: m.FactoryComponent<ButtonAttrs>;
|
|
84
|
+
export declare const RoundIconButton: m.FactoryComponent<ButtonAttrs>;
|
|
85
|
+
export declare const SubmitButton: m.FactoryComponent<ButtonAttrs>;
|
package/dist/carousel.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface CarouselOptions {
|
|
|
25
25
|
/** Don't wrap around and cycle through items */
|
|
26
26
|
noWrap?: boolean;
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface CarouselAttrs extends CarouselOptions, Attributes {
|
|
29
29
|
/** The list of images */
|
|
30
30
|
items: CarouselItem[];
|
|
31
31
|
/** Called when carousel item changes */
|
|
@@ -35,4 +35,4 @@ export interface CarouselAttributes extends CarouselOptions, Attributes {
|
|
|
35
35
|
* Materialize CSS Carousel component with dynamic positioning
|
|
36
36
|
* Port of the original MaterializeCSS carousel logic
|
|
37
37
|
*/
|
|
38
|
-
export declare const Carousel: FactoryComponent<
|
|
38
|
+
export declare const Carousel: FactoryComponent<CarouselAttrs>;
|
package/dist/chip.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface ChipData {
|
|
|
7
7
|
export interface AutocompleteOption extends ChipData {
|
|
8
8
|
value?: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface ChipsAttrs {
|
|
11
11
|
id?: string;
|
|
12
12
|
data?: ChipData[];
|
|
13
13
|
placeholder?: string;
|
|
@@ -28,4 +28,4 @@ export interface ChipsAttributes {
|
|
|
28
28
|
onChipDelete?: (chip: ChipData) => void;
|
|
29
29
|
onChipSelect?: (chip: ChipData) => void;
|
|
30
30
|
}
|
|
31
|
-
export declare const Chips: m.FactoryComponent<
|
|
31
|
+
export declare const Chips: m.FactoryComponent<ChipsAttrs>;
|
package/dist/code-block.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
-
export interface
|
|
2
|
+
export interface CodeBlockAttrs extends Attributes {
|
|
3
3
|
language?: string;
|
|
4
4
|
code: string | string[];
|
|
5
5
|
newRow?: boolean;
|
|
6
6
|
}
|
|
7
7
|
/** A simple code block without syntax high-lighting */
|
|
8
|
-
export declare const CodeBlock: FactoryComponent<
|
|
8
|
+
export declare const CodeBlock: FactoryComponent<CodeBlockAttrs>;
|
package/dist/collapsible.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface CollapsibleItem extends Attributes {
|
|
|
9
9
|
/** Add an material icon in front of the header. */
|
|
10
10
|
iconName?: string;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface CollapsibleAttrs extends Attributes {
|
|
13
13
|
/** The list of accordeon/collabsible items */
|
|
14
14
|
items: CollapsibleItem[];
|
|
15
15
|
/** If true, only one item can be expanded at a time (accordion mode) */
|
|
@@ -23,4 +23,4 @@ export declare const CollapsibleItem: FactoryComponent<CollapsibleItem & {
|
|
|
23
23
|
* Creates a collabsible or accordion component with pure CSS/Mithril implementation.
|
|
24
24
|
* No MaterializeCSS JavaScript dependencies.
|
|
25
25
|
*/
|
|
26
|
-
export declare const Collapsible: FactoryComponent<
|
|
26
|
+
export declare const Collapsible: FactoryComponent<CollapsibleAttrs>;
|
package/dist/collection.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface CollectionItem {
|
|
|
26
26
|
/** Any other virtual element properties, including attributes and event handlers. */
|
|
27
27
|
[property: string]: any;
|
|
28
28
|
}
|
|
29
|
-
export interface
|
|
29
|
+
export interface CollectionAttrs extends Attributes {
|
|
30
30
|
/** Optional header */
|
|
31
31
|
header?: string;
|
|
32
32
|
/** The list of items */
|
|
@@ -46,4 +46,4 @@ export declare const AnchorItem: FactoryComponent<{
|
|
|
46
46
|
* Creates a Collection of items, optionally containing links, headers, secondary content or avatars.
|
|
47
47
|
* @see https://materializecss.com/collections.html
|
|
48
48
|
*/
|
|
49
|
-
export declare const Collection: FactoryComponent<
|
|
49
|
+
export declare const Collection: FactoryComponent<CollectionAttrs>;
|