jsuites 6.4.2 → 6.4.3

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 (78) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +119 -119
  3. package/dist/jsuites.css +3424 -3424
  4. package/dist/jsuites.d.ts +10 -10
  5. package/dist/jsuites.js +22475 -22450
  6. package/dist/jsuites.webcomponents.js +501 -501
  7. package/dist/types/animation.d.ts +23 -23
  8. package/dist/types/calendar.d.ts +87 -87
  9. package/dist/types/color.d.ts +50 -50
  10. package/dist/types/contextmenu.d.ts +43 -43
  11. package/dist/types/dropdown.d.ts +177 -177
  12. package/dist/types/editor.d.ts +96 -96
  13. package/dist/types/floating.d.ts +23 -23
  14. package/dist/types/form.d.ts +57 -57
  15. package/dist/types/index.d.ts +59 -59
  16. package/dist/types/mask.d.ts +50 -50
  17. package/dist/types/modal.d.ts +35 -35
  18. package/dist/types/notification.d.ts +27 -27
  19. package/dist/types/picker.d.ts +45 -45
  20. package/dist/types/rating.d.ts +19 -19
  21. package/dist/types/search.d.ts +23 -23
  22. package/dist/types/slider.d.ts +31 -31
  23. package/dist/types/tabs.d.ts +79 -79
  24. package/dist/types/tags.d.ts +105 -105
  25. package/dist/types/toolbar.d.ts +70 -70
  26. package/dist/types/upload.d.ts +45 -45
  27. package/dist/types/validations.d.ts +39 -39
  28. package/package.json +4 -4
  29. package/react/calendar/index.d.ts +105 -105
  30. package/react/calendar/index.js +28 -28
  31. package/react/color/index.d.ts +84 -84
  32. package/react/color/index.js +28 -28
  33. package/react/contextmenu/index.d.ts +61 -61
  34. package/react/contextmenu/index.js +24 -24
  35. package/react/dropdown/index.d.ts +184 -184
  36. package/react/dropdown/index.js +25 -25
  37. package/react/editor/index.d.ts +114 -114
  38. package/react/editor/index.js +31 -31
  39. package/react/index.js +26 -26
  40. package/react/modal/index.d.ts +53 -53
  41. package/react/modal/index.js +30 -30
  42. package/react/picker/index.d.ts +64 -64
  43. package/react/picker/index.js +28 -28
  44. package/react/rating/index.d.ts +37 -37
  45. package/react/rating/index.js +28 -28
  46. package/react/slider/index.d.ts +49 -49
  47. package/react/slider/index.js +30 -30
  48. package/react/tabs/index.d.ts +97 -97
  49. package/react/tabs/index.js +29 -29
  50. package/react/tags/index.d.ts +121 -121
  51. package/react/tags/index.js +24 -24
  52. package/react/toolbar/index.d.ts +88 -88
  53. package/react/toolbar/index.js +24 -24
  54. package/vue/calendar/index.d.ts +105 -105
  55. package/vue/calendar/index.js +36 -36
  56. package/vue/color/index.d.ts +84 -84
  57. package/vue/color/index.js +36 -36
  58. package/vue/contextmenu/index.d.ts +61 -61
  59. package/vue/contextmenu/index.js +21 -21
  60. package/vue/dropdown/index.d.ts +184 -184
  61. package/vue/dropdown/index.js +25 -25
  62. package/vue/editor/index.d.ts +114 -114
  63. package/vue/editor/index.js +40 -40
  64. package/vue/index.js +40 -40
  65. package/vue/modal/index.d.ts +53 -53
  66. package/vue/modal/index.js +41 -41
  67. package/vue/picker/index.d.ts +64 -64
  68. package/vue/picker/index.js +36 -36
  69. package/vue/rating/index.d.ts +37 -37
  70. package/vue/rating/index.js +36 -36
  71. package/vue/slider/index.d.ts +49 -49
  72. package/vue/slider/index.js +33 -33
  73. package/vue/tabs/index.d.ts +97 -97
  74. package/vue/tabs/index.js +28 -28
  75. package/vue/tags/index.d.ts +121 -121
  76. package/vue/tags/index.js +21 -21
  77. package/vue/toolbar/index.d.ts +88 -88
  78. package/vue/toolbar/index.js +21 -21
@@ -1,114 +1,114 @@
1
- /**
2
- * Official Type definitions for LemonadeJS plugins
3
- * https://lemonadejs.net
4
- * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
- */
6
-
7
- declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
8
-
9
- interface Snippet {
10
- /** Image URL */
11
- image: string | string[];
12
- /** Title */
13
- title: string;
14
- /** Description */
15
- description: string;
16
- /** Domain */
17
- host: string;
18
- /** Link */
19
- url: string;
20
- }
21
-
22
- declare namespace Component {
23
- interface Options {
24
- /** Load data from a remove location */
25
- url?: string;
26
- /** Initial HTML string for the editor */
27
- value?: string;
28
- /** Snippet object */
29
- snippet?: Snippet;
30
- /** Show toolbar */
31
- toolbar?: boolean;
32
- /** Show the toolbar in the top of the editor. Default: false */
33
- toolbarOnTop?: boolean;
34
- /** Website URL parser is to read websites and images from cross domain */
35
- remoteParser?: string;
36
- /** Editor place holder */
37
- placeholder?: string;
38
- /** Filter the paste. Default true. */
39
- filterPaste?: boolean;
40
- /** Accept images or files to be dropped in the editor area. Default: true */
41
- dropZone?: boolean;
42
- /** Transform dropped images as snippet. Default: false */
43
- dropAsSnippet?: boolean;
44
- /** Accept images when the dropzone when active. Default: true */
45
- acceptImages?: boolean;
46
- /** Accept files when the dropzone when active. Default: false */
47
- acceptFiles?: boolean;
48
- /** Max file size in bytes. Default: 5000000 bytes */
49
- maxFileSize?: number | null;
50
- /** Allow image resizing. Default: true */
51
- allowImageResize?: boolean;
52
- /** Max height editor */
53
- maxHeight?: number | null;
54
- /** Default editor height */
55
- height?: number | null;
56
- /** Focus in the editor when initiated. Default: false */
57
- focus?: boolean;
58
- /** Onclick in the editor */
59
- onclick?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
60
- /** When the editor is focused */
61
- onfocus?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
62
- /** When blur */
63
- onblur?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
64
- /** When the editor is ready */
65
- onload?: (el: HTMLElement, obj: Editor, editor: HTMLElement) => void;
66
- /** When key up in the editor */
67
- onkeyup?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
68
- /** When key down in the editor */
69
- onkeydown?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
70
- /** When the value of the editor changes */
71
- onchange?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
72
- /** Editor extensions */
73
- extensions?: Record<string, Function>;
74
- }
75
-
76
- interface Instance {
77
- /** Dropped files or loaded via the input file */
78
- addFiles: (files: FileList[]) => void;
79
- /** Methods to add new images to the editor */
80
- addImage: (src: string | FileList[], asSnippet?: boolean) => void;
81
- /** Add a new PDF as a attachment */
82
- addPdf: (base64: string) => void;
83
- /** Add a snippet board in the editor */
84
- appendSnippet: (data: Snippet) => void;
85
- /** Destroy */
86
- destroy: () => void;
87
- /** Editor HTML container */
88
- el: HTMLElement;
89
- /** HTML input upload element */
90
- file: HTMLInputElement;
91
- /** Get the data from the editor */
92
- getData: (asJson?: boolean) => string | object;
93
- /** Get the files loaded to the editor */
94
- getFiles: () => string[];
95
- /** Get the innerText from the editor */
96
- getText: () => string;
97
- /** Editor configuration */
98
- options: Component.Options;
99
- /** Reset the editor value */
100
- reset: () => void;
101
- /** Load a file from a local computer to the editor */
102
- upload: () => void;
103
- /** Internal type */
104
- type: 'editor';
105
- }
106
- }
107
-
108
- interface Editor {
109
- (): any
110
- [key: string]: any
111
- }
112
-
113
- declare function Editor<Editor>(props: Component.Options): any;
114
- export default Editor;
1
+ /**
2
+ * Official Type definitions for LemonadeJS plugins
3
+ * https://lemonadejs.net
4
+ * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+ */
6
+
7
+ declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
8
+
9
+ interface Snippet {
10
+ /** Image URL */
11
+ image: string | string[];
12
+ /** Title */
13
+ title: string;
14
+ /** Description */
15
+ description: string;
16
+ /** Domain */
17
+ host: string;
18
+ /** Link */
19
+ url: string;
20
+ }
21
+
22
+ declare namespace Component {
23
+ interface Options {
24
+ /** Load data from a remove location */
25
+ url?: string;
26
+ /** Initial HTML string for the editor */
27
+ value?: string;
28
+ /** Snippet object */
29
+ snippet?: Snippet;
30
+ /** Show toolbar */
31
+ toolbar?: boolean;
32
+ /** Show the toolbar in the top of the editor. Default: false */
33
+ toolbarOnTop?: boolean;
34
+ /** Website URL parser is to read websites and images from cross domain */
35
+ remoteParser?: string;
36
+ /** Editor place holder */
37
+ placeholder?: string;
38
+ /** Filter the paste. Default true. */
39
+ filterPaste?: boolean;
40
+ /** Accept images or files to be dropped in the editor area. Default: true */
41
+ dropZone?: boolean;
42
+ /** Transform dropped images as snippet. Default: false */
43
+ dropAsSnippet?: boolean;
44
+ /** Accept images when the dropzone when active. Default: true */
45
+ acceptImages?: boolean;
46
+ /** Accept files when the dropzone when active. Default: false */
47
+ acceptFiles?: boolean;
48
+ /** Max file size in bytes. Default: 5000000 bytes */
49
+ maxFileSize?: number | null;
50
+ /** Allow image resizing. Default: true */
51
+ allowImageResize?: boolean;
52
+ /** Max height editor */
53
+ maxHeight?: number | null;
54
+ /** Default editor height */
55
+ height?: number | null;
56
+ /** Focus in the editor when initiated. Default: false */
57
+ focus?: boolean;
58
+ /** Onclick in the editor */
59
+ onclick?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
60
+ /** When the editor is focused */
61
+ onfocus?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
62
+ /** When blur */
63
+ onblur?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
64
+ /** When the editor is ready */
65
+ onload?: (el: HTMLElement, obj: Editor, editor: HTMLElement) => void;
66
+ /** When key up in the editor */
67
+ onkeyup?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
68
+ /** When key down in the editor */
69
+ onkeydown?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
70
+ /** When the value of the editor changes */
71
+ onchange?: (el: HTMLElement, obj: Editor, e: MouseEvent) => void;
72
+ /** Editor extensions */
73
+ extensions?: Record<string, Function>;
74
+ }
75
+
76
+ interface Instance {
77
+ /** Dropped files or loaded via the input file */
78
+ addFiles: (files: FileList[]) => void;
79
+ /** Methods to add new images to the editor */
80
+ addImage: (src: string | FileList[], asSnippet?: boolean) => void;
81
+ /** Add a new PDF as a attachment */
82
+ addPdf: (base64: string) => void;
83
+ /** Add a snippet board in the editor */
84
+ appendSnippet: (data: Snippet) => void;
85
+ /** Destroy */
86
+ destroy: () => void;
87
+ /** Editor HTML container */
88
+ el: HTMLElement;
89
+ /** HTML input upload element */
90
+ file: HTMLInputElement;
91
+ /** Get the data from the editor */
92
+ getData: (asJson?: boolean) => string | object;
93
+ /** Get the files loaded to the editor */
94
+ getFiles: () => string[];
95
+ /** Get the innerText from the editor */
96
+ getText: () => string;
97
+ /** Editor configuration */
98
+ options: Component.Options;
99
+ /** Reset the editor value */
100
+ reset: () => void;
101
+ /** Load a file from a local computer to the editor */
102
+ upload: () => void;
103
+ /** Internal type */
104
+ type: 'editor';
105
+ }
106
+ }
107
+
108
+ interface Editor {
109
+ (): any
110
+ [key: string]: any
111
+ }
112
+
113
+ declare function Editor<Editor>(props: Component.Options): any;
114
+ export default Editor;
@@ -1,32 +1,32 @@
1
- // @ts-nocheck
2
- import React, { useRef, useEffect } from "react";
3
- import jSuites from '../../dist/jsuites';
4
-
5
- // @ts-ignore
6
- export default React.forwardRef((props, mainReference) => {
7
- // Dom element
8
- const Ref = useRef(null);
9
-
10
- // Get the properties for the spreadsheet
11
- let options = { ...props };
12
-
13
- useEffect(() => {
14
- // @ts-ignore
15
- if (!Ref.current.innerHTML) {
16
- mainReference.current = jSuites.editor(Ref.current, options);
17
- }
18
- }, []);
19
-
20
- useEffect(() => {
21
- if (props.value) {
22
- mainReference.current.setData(props.value)
23
- }
24
- }, [props.value])
25
-
26
- let prop = {
27
- ref: Ref,
28
- style: { height: '100%', width: '100%' }
29
- };
30
-
31
- return React.createElement("div", prop);
1
+ // @ts-nocheck
2
+ import React, { useRef, useEffect } from "react";
3
+ import jSuites from '../../dist/jsuites';
4
+
5
+ // @ts-ignore
6
+ export default React.forwardRef((props, mainReference) => {
7
+ // Dom element
8
+ const Ref = useRef(null);
9
+
10
+ // Get the properties for the spreadsheet
11
+ let options = { ...props };
12
+
13
+ useEffect(() => {
14
+ // @ts-ignore
15
+ if (!Ref.current.innerHTML) {
16
+ mainReference.current = jSuites.editor(Ref.current, options);
17
+ }
18
+ }, []);
19
+
20
+ useEffect(() => {
21
+ if (props.value) {
22
+ mainReference.current.setData(props.value)
23
+ }
24
+ }, [props.value])
25
+
26
+ let prop = {
27
+ ref: Ref,
28
+ style: { height: '100%', width: '100%' }
29
+ };
30
+
31
+ return React.createElement("div", prop);
32
32
  })
package/react/index.js CHANGED
@@ -1,27 +1,27 @@
1
- import Calendar from './calendar';
2
- import Color from './color';
3
- import Contextmenu from './contextmenu';
4
- import Dropdown from './dropdown';
5
- import Modal from './modal';
6
- import Picker from './picker';
7
- import Rating from './rating';
8
- import Editor from './editor';
9
- import Slider from './slider';
10
- import Tags from './tags';
11
- import Tabs from './tabs';
12
- import Toolbar from './toolbar';
13
-
14
- export {
15
- Calendar,
16
- Color,
17
- Contextmenu,
18
- Dropdown,
19
- Modal,
20
- Picker,
21
- Rating,
22
- Editor,
23
- Slider,
24
- Tags,
25
- Tabs,
26
- Toolbar
1
+ import Calendar from './calendar';
2
+ import Color from './color';
3
+ import Contextmenu from './contextmenu';
4
+ import Dropdown from './dropdown';
5
+ import Modal from './modal';
6
+ import Picker from './picker';
7
+ import Rating from './rating';
8
+ import Editor from './editor';
9
+ import Slider from './slider';
10
+ import Tags from './tags';
11
+ import Tabs from './tabs';
12
+ import Toolbar from './toolbar';
13
+
14
+ export {
15
+ Calendar,
16
+ Color,
17
+ Contextmenu,
18
+ Dropdown,
19
+ Modal,
20
+ Picker,
21
+ Rating,
22
+ Editor,
23
+ Slider,
24
+ Tags,
25
+ Tabs,
26
+ Toolbar
27
27
  }
@@ -1,53 +1,53 @@
1
- /**
2
- * Official Type definitions for LemonadeJS plugins
3
- * https://lemonadejs.net
4
- * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
- */
6
-
7
- declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
8
- declare namespace Component {
9
- interface Options {
10
- /** Load the content of the modal from a remote URL */
11
- url?: string;
12
- /** When the modal is opened */
13
- onopen?: (el: HTMLElement, instance: Component.Instance) => void;
14
- /** When the modal is closed */
15
- onclose?: (el: HTMLElement, instance: Component.Instance) => void;
16
- /** When the modal is ready */
17
- onload?: (instance: Component.Instance) => void;
18
- /** Create a modal with state closed. Default: false */
19
- closed?: boolean;
20
- /** Modal width */
21
- width?: number;
22
- /** Modal height */
23
- height?: number;
24
- /** Modal title */
25
- title?: string;
26
- /** Modal padding */
27
- padding?: number;
28
- /** Show backdrop. Default: true */
29
- backdrop?: boolean;
30
- /** Show title icon. Material icon keyword */
31
- icon?: string;
32
- }
33
-
34
- interface Instance {
35
- /** Open the modal */
36
- open: () => void;
37
- /** Reset the modal position to the center */
38
- resetPosition: () => void;
39
- /** Modal is opened */
40
- isOpen: () => boolean;
41
- /** Close the modal */
42
- close: () => void;
43
- }
44
- }
45
-
46
-
47
- interface Modal {
48
- (): any
49
- [key: string]: any
50
- }
51
-
52
- declare function Modal<Modal>(props: Component.Options): any;
53
- export default Modal;
1
+ /**
2
+ * Official Type definitions for LemonadeJS plugins
3
+ * https://lemonadejs.net
4
+ * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+ */
6
+
7
+ declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
8
+ declare namespace Component {
9
+ interface Options {
10
+ /** Load the content of the modal from a remote URL */
11
+ url?: string;
12
+ /** When the modal is opened */
13
+ onopen?: (el: HTMLElement, instance: Component.Instance) => void;
14
+ /** When the modal is closed */
15
+ onclose?: (el: HTMLElement, instance: Component.Instance) => void;
16
+ /** When the modal is ready */
17
+ onload?: (instance: Component.Instance) => void;
18
+ /** Create a modal with state closed. Default: false */
19
+ closed?: boolean;
20
+ /** Modal width */
21
+ width?: number;
22
+ /** Modal height */
23
+ height?: number;
24
+ /** Modal title */
25
+ title?: string;
26
+ /** Modal padding */
27
+ padding?: number;
28
+ /** Show backdrop. Default: true */
29
+ backdrop?: boolean;
30
+ /** Show title icon. Material icon keyword */
31
+ icon?: string;
32
+ }
33
+
34
+ interface Instance {
35
+ /** Open the modal */
36
+ open: () => void;
37
+ /** Reset the modal position to the center */
38
+ resetPosition: () => void;
39
+ /** Modal is opened */
40
+ isOpen: () => boolean;
41
+ /** Close the modal */
42
+ close: () => void;
43
+ }
44
+ }
45
+
46
+
47
+ interface Modal {
48
+ (): any
49
+ [key: string]: any
50
+ }
51
+
52
+ declare function Modal<Modal>(props: Component.Options): any;
53
+ export default Modal;
@@ -1,31 +1,31 @@
1
- // @ts-nocheck
2
- import React, { useRef, useEffect } from "react";
3
- import jSuites from '../../dist/jsuites';
4
- import { renderToStaticMarkup } from 'react-dom/server';
5
-
6
- // @ts-ignore
7
- export default React.forwardRef((props, mainReference) => {
8
- // Dom element
9
- const Ref = useRef(null);
10
-
11
- const template = renderToStaticMarkup(props.children)
12
-
13
- // Get the properties for the spreadsheet
14
- let options = { ...props };
15
-
16
- useEffect(() => {
17
- // @ts-ignore
18
- if (!Ref.current.innerHTML) {
19
- Ref.current.innerHTML = template
20
-
21
- mainReference.current = jSuites.modal(Ref.current, options);
22
- }
23
- }, []);
24
-
25
- let prop = {
26
- ref: Ref,
27
- style: { height: '100%', width: '100%' }
28
- };
29
-
30
- return React.createElement("div", prop);
1
+ // @ts-nocheck
2
+ import React, { useRef, useEffect } from "react";
3
+ import jSuites from '../../dist/jsuites';
4
+ import { renderToStaticMarkup } from 'react-dom/server';
5
+
6
+ // @ts-ignore
7
+ export default React.forwardRef((props, mainReference) => {
8
+ // Dom element
9
+ const Ref = useRef(null);
10
+
11
+ const template = renderToStaticMarkup(props.children)
12
+
13
+ // Get the properties for the spreadsheet
14
+ let options = { ...props };
15
+
16
+ useEffect(() => {
17
+ // @ts-ignore
18
+ if (!Ref.current.innerHTML) {
19
+ Ref.current.innerHTML = template
20
+
21
+ mainReference.current = jSuites.modal(Ref.current, options);
22
+ }
23
+ }, []);
24
+
25
+ let prop = {
26
+ ref: Ref,
27
+ style: { height: '100%', width: '100%' }
28
+ };
29
+
30
+ return React.createElement("div", prop);
31
31
  })
@@ -1,64 +1,64 @@
1
- /**
2
- * Official Type definitions for LemonadeJS plugins
3
- * https://lemonadejs.net
4
- * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
- */
6
-
7
- declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
8
-
9
- declare namespace Component {
10
- interface Options {
11
- /** Data items */
12
- data?: Record<number, string>;
13
- /** Method for rendering the items */
14
- render?: (label: string, item: object) => string;
15
- /** Event when value is changed */
16
- onchange?: (el: HTMLElement, instance: Picker, reservedValue: string, value: string, index: number, e: MouseEvent) => void;
17
- /** Event when value is changed */
18
- onopen?: (el: HTMLElement, instance: Picker) => void;
19
- /** Event when value is changed */
20
- onclose?: (el: HTMLElement, instance: Picker) => void;
21
- /** Event when value is changed */
22
- onload?: (el: HTMLElement, instance: Picker) => void;
23
- /** Default width */
24
- width?: number;
25
- /** Show the header. Default: true */
26
- header?: boolean;
27
- /** Align right. Default: false */
28
- right?: boolean;
29
- /** Open picker from bottom to top direction. Default: false */
30
- bottom?: boolean;
31
- /** Replace the header value by an material icon keyword. Default: false */
32
- content?: boolean;
33
- /** Number elements per line. Default: null */
34
- columns?: number;
35
- /** Order elements in a grid. Default: null */
36
- grid?: number;
37
- /** Default height */
38
- height?: null;
39
- }
40
-
41
- interface Instance {
42
- /** Get the current selected value */
43
- getValue: () => void;
44
- /** Set the current value for the component */
45
- setValue: (v: number, event: MouseEvent | boolean) => void;
46
- /** Internal method. Get the label */
47
- getLabel: (v, item) => void;
48
- /** Internal method. Set the label */
49
- setLabel: (v) => void;
50
- /** Open the picker */
51
- open: () => void;
52
- /** Close the picker */
53
- close: () => void;
54
- }
55
- }
56
-
57
-
58
- interface Picker {
59
- (): any
60
- [key: string]: any
61
- }
62
-
63
- declare function Picker<Picker>(props: Component.Options): any;
64
- export default Picker;
1
+ /**
2
+ * Official Type definitions for LemonadeJS plugins
3
+ * https://lemonadejs.net
4
+ * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+ */
6
+
7
+ declare function Component(el: HTMLElement, options?: Component.Options): Component.Instance;
8
+
9
+ declare namespace Component {
10
+ interface Options {
11
+ /** Data items */
12
+ data?: Record<number, string>;
13
+ /** Method for rendering the items */
14
+ render?: (label: string, item: object) => string;
15
+ /** Event when value is changed */
16
+ onchange?: (el: HTMLElement, instance: Picker, reservedValue: string, value: string, index: number, e: MouseEvent) => void;
17
+ /** Event when value is changed */
18
+ onopen?: (el: HTMLElement, instance: Picker) => void;
19
+ /** Event when value is changed */
20
+ onclose?: (el: HTMLElement, instance: Picker) => void;
21
+ /** Event when value is changed */
22
+ onload?: (el: HTMLElement, instance: Picker) => void;
23
+ /** Default width */
24
+ width?: number;
25
+ /** Show the header. Default: true */
26
+ header?: boolean;
27
+ /** Align right. Default: false */
28
+ right?: boolean;
29
+ /** Open picker from bottom to top direction. Default: false */
30
+ bottom?: boolean;
31
+ /** Replace the header value by an material icon keyword. Default: false */
32
+ content?: boolean;
33
+ /** Number elements per line. Default: null */
34
+ columns?: number;
35
+ /** Order elements in a grid. Default: null */
36
+ grid?: number;
37
+ /** Default height */
38
+ height?: null;
39
+ }
40
+
41
+ interface Instance {
42
+ /** Get the current selected value */
43
+ getValue: () => void;
44
+ /** Set the current value for the component */
45
+ setValue: (v: number, event: MouseEvent | boolean) => void;
46
+ /** Internal method. Get the label */
47
+ getLabel: (v, item) => void;
48
+ /** Internal method. Set the label */
49
+ setLabel: (v) => void;
50
+ /** Open the picker */
51
+ open: () => void;
52
+ /** Close the picker */
53
+ close: () => void;
54
+ }
55
+ }
56
+
57
+
58
+ interface Picker {
59
+ (): any
60
+ [key: string]: any
61
+ }
62
+
63
+ declare function Picker<Picker>(props: Component.Options): any;
64
+ export default Picker;