mithril-materialized 2.0.0-beta.3 → 2.0.0-beta.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/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 +1451 -144
- package/dist/index.d.ts +12 -1
- package/dist/index.esm.js +4590 -2612
- package/dist/index.js +4610 -2611
- package/dist/index.min.css +8 -0
- package/dist/index.umd.js +4610 -2611
- package/dist/input-options.d.ts +1 -1
- package/dist/input.d.ts +9 -9
- package/dist/label.d.ts +2 -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 -2
- 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 +13 -5
- package/sass/components/_breadcrumb.scss +248 -0
- package/sass/components/_buttons.scss +3 -3
- package/sass/components/_collapsible.scss +8 -8
- package/sass/components/_datepicker.scss +45 -14
- 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 +187 -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/_switches.scss +6 -6
- package/sass/materialize.scss +7 -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,5 +1,5 @@
|
|
|
1
1
|
import m, { FactoryComponent, Attributes } from 'mithril';
|
|
2
|
-
export interface
|
|
2
|
+
export interface HtmlAttrs {
|
|
3
3
|
id?: string;
|
|
4
4
|
for?: string;
|
|
5
5
|
placeholder?: string;
|
|
@@ -7,7 +7,7 @@ export interface HtmlAttributes {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
type?: 'submit' | 'button' | 'text' | 'textarea' | 'number';
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface ButtonAttrs extends Attributes {
|
|
11
11
|
/** Optional (e.g. in case you only want to use an icon) button label */
|
|
12
12
|
label?: string;
|
|
13
13
|
/** Optional icon material-icons name, @see https://materializecss.com/icons.html */
|
|
@@ -20,7 +20,7 @@ export interface ButtonAttributes extends Attributes {
|
|
|
20
20
|
*/
|
|
21
21
|
modalId?: string;
|
|
22
22
|
/** Some additional HTML attributes that can be attached to the button */
|
|
23
|
-
attr?:
|
|
23
|
+
attr?: HtmlAttrs;
|
|
24
24
|
/** Optional text-based tooltip, @see https://materializecss.com/tooltips.html */
|
|
25
25
|
tooltip?: string;
|
|
26
26
|
/** Optional location for the tooltip */
|
|
@@ -31,10 +31,10 @@ export interface ButtonAttributes extends Attributes {
|
|
|
31
31
|
*
|
|
32
32
|
* @example FlatButton = ButtonFactory('a.waves-effect.waves-teal.btn-flat');
|
|
33
33
|
*/
|
|
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<
|
|
34
|
+
export declare const ButtonFactory: (element: string, defaultClassNames: string, type?: string) => FactoryComponent<ButtonAttrs>;
|
|
35
|
+
export declare const Button: m.FactoryComponent<ButtonAttrs>;
|
|
36
|
+
export declare const LargeButton: m.FactoryComponent<ButtonAttrs>;
|
|
37
|
+
export declare const SmallButton: m.FactoryComponent<ButtonAttrs>;
|
|
38
|
+
export declare const FlatButton: m.FactoryComponent<ButtonAttrs>;
|
|
39
|
+
export declare const RoundIconButton: m.FactoryComponent<ButtonAttrs>;
|
|
40
|
+
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>;
|