mithril-materialized 1.1.6 → 1.2.0

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="materialize-css" />
2
1
  import { FactoryComponent, Attributes } from 'mithril';
3
2
  export interface IMaterialBox extends Partial<M.MaterialboxOptions>, Attributes {
4
3
  /** Source image path */
package/dist/modal.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="materialize-css" />
2
1
  import { FactoryComponent, Vnode, Attributes } from 'mithril';
3
2
  export interface IMaterialModal extends Attributes {
4
3
  id: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="materialize-css" />
2
1
  import { FactoryComponent, Attributes } from 'mithril';
3
2
  export interface IParallax extends Partial<M.ParallaxOptions>, Attributes {
4
3
  /** Image source */
package/dist/pickers.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- /// <reference types="materialize-css" />
2
- /// <reference types="materialize-css" />
3
1
  import { FactoryComponent } from 'mithril';
4
2
  import { IInputOptions } from './input-options';
5
3
  /** Component to pick a date */
@@ -0,0 +1,30 @@
1
+ import { Component } from 'mithril';
2
+ export interface Option<T> {
3
+ id: T;
4
+ label?: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface SearchSelectAttrs<T> {
8
+ options?: Option<T>[];
9
+ /** Initial value */
10
+ initialValue?: T[];
11
+ onchange?: (selectedOptions: T[]) => void;
12
+ className?: string;
13
+ label?: string;
14
+ placeholder?: string;
15
+ /** Max height of the dropdown menu, default '25rem' */
16
+ maxHeight?: string;
17
+ }
18
+ interface SearchSelectState<T> {
19
+ isOpen: boolean;
20
+ selectedOptions: Option<T>[];
21
+ searchTerm: string;
22
+ options: Option<T>[];
23
+ inputRef: HTMLElement | null;
24
+ dropdownRef: HTMLElement | null;
25
+ }
26
+ /**
27
+ * Mithril Factory Component for Multi-Select Dropdown with search
28
+ */
29
+ export declare const SearchSelect: <T extends string | number>() => Component<SearchSelectAttrs<T>, SearchSelectState<T>>;
30
+ export {};
package/dist/select.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="materialize-css" />
2
1
  import { Attributes, Component } from 'mithril';
3
2
  import { IInputOption } from './option';
4
3
  export interface ISelectOptions<T extends string | number> extends Attributes, Partial<M.FormSelectOptions> {
package/dist/tabs.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="materialize-css" />
2
1
  import { Vnode, FactoryComponent, Attributes } from 'mithril';
3
2
  /**
4
3
  * Link or anchor target may take 4 values:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mithril-materialized",
3
- "version": "1.1.6",
3
+ "version": "1.2.0",
4
4
  "description": "A materialize library for mithril.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -35,16 +35,16 @@
35
35
  "license": "MIT",
36
36
  "dependencies": {
37
37
  "materialize-css": "^1.0.0",
38
- "mithril": "^2.2.2"
38
+ "mithril": "^2.2.9"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/materialize-css": "^1.0.14",
42
- "@types/mithril": "^2.2.6",
42
+ "@types/mithril": "^2.2.7",
43
43
  "js-yaml": "^4.1.0",
44
44
  "microbundle": "^0.15.1",
45
- "rimraf": "^5.0.7",
46
- "tslib": "^2.6.3",
47
- "typedoc": "^0.25.13",
48
- "typescript": "^5.4.5"
45
+ "rimraf": "^6.0.1",
46
+ "tslib": "^2.8.1",
47
+ "typedoc": "^0.26.11",
48
+ "typescript": "^5.6.3"
49
49
  }
50
50
  }