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.
Files changed (64) 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 +1451 -144
  18. package/dist/index.d.ts +12 -1
  19. package/dist/index.esm.js +4590 -2612
  20. package/dist/index.js +4610 -2611
  21. package/dist/index.min.css +8 -0
  22. package/dist/index.umd.js +4610 -2611
  23. package/dist/input-options.d.ts +1 -1
  24. package/dist/input.d.ts +9 -9
  25. package/dist/label.d.ts +2 -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 -2
  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 +13 -5
  46. package/sass/components/_breadcrumb.scss +248 -0
  47. package/sass/components/_buttons.scss +3 -3
  48. package/sass/components/_collapsible.scss +8 -8
  49. package/sass/components/_datepicker.scss +45 -14
  50. package/sass/components/_file-upload.scss +228 -0
  51. package/sass/components/_global.scss +7 -5
  52. package/sass/components/_modal.scss +5 -2
  53. package/sass/components/_navbar.scss +13 -5
  54. package/sass/components/_sidenav.scss +164 -7
  55. package/sass/components/_tabs.scss +5 -4
  56. package/sass/components/_theme-switcher.scss +120 -0
  57. package/sass/components/_theme-variables.scss +187 -0
  58. package/sass/components/_timepicker.scss +179 -87
  59. package/sass/components/_wizard.scss +416 -0
  60. package/sass/components/forms/_input-fields.scss +34 -12
  61. package/sass/components/forms/_radio-buttons.scss +10 -10
  62. package/sass/components/forms/_switches.scss +6 -6
  63. package/sass/materialize.scss +7 -0
  64. package/dist/pickers.d.ts +0 -130
@@ -1,6 +1,6 @@
1
1
  import { FactoryComponent } from 'mithril';
2
- import { InputAttributes } from './input-options';
3
- export interface AutoCompleteAttributes extends InputAttributes<string> {
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<AutoCompleteAttributes>;
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 HtmlAttributes {
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 ButtonAttributes extends Attributes {
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?: HtmlAttributes;
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<ButtonAttributes>;
35
- export declare const Button: m.FactoryComponent<ButtonAttributes>;
36
- export declare const LargeButton: m.FactoryComponent<ButtonAttributes>;
37
- export declare const SmallButton: m.FactoryComponent<ButtonAttributes>;
38
- export declare const FlatButton: m.FactoryComponent<ButtonAttributes>;
39
- export declare const RoundIconButton: m.FactoryComponent<ButtonAttributes>;
40
- export declare const SubmitButton: m.FactoryComponent<ButtonAttributes>;
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>;
@@ -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 CarouselAttributes extends CarouselOptions, Attributes {
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<CarouselAttributes>;
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 ChipsAttributes {
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<ChipsAttributes>;
31
+ export declare const Chips: m.FactoryComponent<ChipsAttrs>;
@@ -1,8 +1,8 @@
1
1
  import { FactoryComponent, Attributes } from 'mithril';
2
- export interface CodeBlockAttributes extends Attributes {
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<CodeBlockAttributes>;
8
+ export declare const CodeBlock: FactoryComponent<CodeBlockAttrs>;
@@ -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 CollapsibleAttributes extends Attributes {
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<CollapsibleAttributes>;
26
+ export declare const Collapsible: FactoryComponent<CollapsibleAttrs>;
@@ -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 CollectionAttributes extends Attributes {
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<CollectionAttributes>;
49
+ export declare const Collection: FactoryComponent<CollectionAttrs>;