@teammodlr/ui-kit 1.0.2

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 (129) hide show
  1. package/env.d.ts +1 -0
  2. package/lib/__storybook__/argTypes.d.ts +31 -0
  3. package/lib/__storybook__/createStory.d.ts +8 -0
  4. package/lib/__storybook__/index.d.ts +2 -0
  5. package/lib/components/avatar/Avatar.vue.d.ts +70 -0
  6. package/lib/components/avatargroup/AvatarGroup.vue.d.ts +34 -0
  7. package/lib/components/breadcrumb/Breadcrumb.vue.d.ts +25 -0
  8. package/lib/components/breadcrumbitem/BreadcrumbItem.vue.d.ts +18 -0
  9. package/lib/components/breadcrumbitem/index.d.ts +1 -0
  10. package/lib/components/button/Button.vue.d.ts +121 -0
  11. package/lib/components/buttongroup/ButtonGroup.vue.d.ts +29 -0
  12. package/lib/components/checkbox/Checkbox.vue.d.ts +97 -0
  13. package/lib/components/dropdown/Dropdown.vue.d.ts +114 -0
  14. package/lib/components/dropdown/DropdownItem.vue.d.ts +61 -0
  15. package/lib/components/dropdown/DropdownList.vue.d.ts +2 -0
  16. package/lib/components/dropdown/DropdownWrapper.vue.d.ts +2 -0
  17. package/lib/components/dropdown/hooks.d.ts +2 -0
  18. package/lib/components/form/Form.vue.d.ts +67 -0
  19. package/lib/components/image/Image.vue.d.ts +50 -0
  20. package/lib/components/index.d.ts +26 -0
  21. package/lib/components/input/Input.vue.d.ts +126 -0
  22. package/lib/components/link/Link.vue.d.ts +51 -0
  23. package/lib/components/messageprovider/Message.vue.d.ts +61 -0
  24. package/lib/components/messageprovider/MessageProvider.vue.d.ts +51 -0
  25. package/lib/components/messageprovider/types.d.ts +28 -0
  26. package/lib/components/messageprovider/useMessage.d.ts +2 -0
  27. package/lib/components/select/Select.vue.d.ts +180 -0
  28. package/lib/components/skeleton/Skeleton.vue.d.ts +39 -0
  29. package/lib/components/tab/Tab.vue.d.ts +41 -0
  30. package/lib/components/tab/TabGroup.vue.d.ts +43 -0
  31. package/lib/components/table/Table.vue.d.ts +63 -0
  32. package/lib/components/table/TableBody.vue.d.ts +2 -0
  33. package/lib/components/table/TableCell.vue.d.ts +2 -0
  34. package/lib/components/table/TableHead.vue.d.ts +20 -0
  35. package/lib/components/table/TableHeadRow.vue.d.ts +2 -0
  36. package/lib/components/table/TableRow.vue.d.ts +2 -0
  37. package/lib/components/table/types/index.d.ts +5 -0
  38. package/lib/components/tooltip/Tooltip.vue.d.ts +54 -0
  39. package/lib/components/virtualscroll/VirtualScroll.vue.d.ts +43 -0
  40. package/lib/composables/element.d.ts +2 -0
  41. package/lib/composables/useCachedUid.d.ts +13 -0
  42. package/lib/composables/useEventListener.d.ts +1 -0
  43. package/lib/composables/useInput.d.ts +36 -0
  44. package/lib/composables/useIsServer.d.ts +1 -0
  45. package/lib/composables/useMount.d.ts +13 -0
  46. package/lib/composables/usePopper.d.ts +31 -0
  47. package/lib/create.d.ts +9 -0
  48. package/lib/index.cjs.js +5 -0
  49. package/lib/index.d.ts +4 -0
  50. package/lib/index.es.js +3164 -0
  51. package/lib/install.d.ts +4 -0
  52. package/lib/nuxt.js +33 -0
  53. package/lib/nuxt.plugin.js +8 -0
  54. package/lib/style.css +1 -0
  55. package/lib/types/props.d.ts +2 -0
  56. package/package.json +75 -0
  57. package/src/__storybook__/argTypes.ts +42 -0
  58. package/src/__storybook__/createStory.ts +15 -0
  59. package/src/__storybook__/index.ts +2 -0
  60. package/src/components/avatar/Avatar.css +69 -0
  61. package/src/components/avatar/Avatar.vue +102 -0
  62. package/src/components/avatargroup/AvatarGroup.css +8 -0
  63. package/src/components/avatargroup/AvatarGroup.vue +32 -0
  64. package/src/components/breadcrumb/Breadcrumb.css +46 -0
  65. package/src/components/breadcrumb/Breadcrumb.vue +51 -0
  66. package/src/components/breadcrumbitem/BreadcrumbItem.vue +66 -0
  67. package/src/components/breadcrumbitem/index.ts +1 -0
  68. package/src/components/button/Button.css +378 -0
  69. package/src/components/button/Button.vue +108 -0
  70. package/src/components/buttongroup/ButtonGroup.vue +47 -0
  71. package/src/components/checkbox/Checkbox.css +185 -0
  72. package/src/components/checkbox/Checkbox.vue +140 -0
  73. package/src/components/dropdown/Dropdown.css +68 -0
  74. package/src/components/dropdown/Dropdown.vue +237 -0
  75. package/src/components/dropdown/DropdownItem.vue +118 -0
  76. package/src/components/dropdown/DropdownList.vue +20 -0
  77. package/src/components/dropdown/DropdownWrapper.vue +17 -0
  78. package/src/components/dropdown/hooks.ts +30 -0
  79. package/src/components/form/Form.vue +141 -0
  80. package/src/components/image/Image.vue +71 -0
  81. package/src/components/index.ts +27 -0
  82. package/src/components/input/Input.css +173 -0
  83. package/src/components/input/Input.vue +176 -0
  84. package/src/components/link/Link.css +147 -0
  85. package/src/components/link/Link.vue +54 -0
  86. package/src/components/messageprovider/Message.vue +76 -0
  87. package/src/components/messageprovider/MessageProvider.css +36 -0
  88. package/src/components/messageprovider/MessageProvider.vue +142 -0
  89. package/src/components/messageprovider/types.ts +39 -0
  90. package/src/components/messageprovider/useMessage.ts +12 -0
  91. package/src/components/select/Select.css +226 -0
  92. package/src/components/select/Select.vue +474 -0
  93. package/src/components/skeleton/Skeleton.css +73 -0
  94. package/src/components/skeleton/Skeleton.vue +47 -0
  95. package/src/components/tab/Tab.css +113 -0
  96. package/src/components/tab/Tab.vue +98 -0
  97. package/src/components/tab/TabGroup.vue +90 -0
  98. package/src/components/table/Table.css +45 -0
  99. package/src/components/table/Table.vue +108 -0
  100. package/src/components/table/TableBody.vue +13 -0
  101. package/src/components/table/TableCell.vue +13 -0
  102. package/src/components/table/TableHead.vue +22 -0
  103. package/src/components/table/TableHeadRow.vue +15 -0
  104. package/src/components/table/TableRow.vue +13 -0
  105. package/src/components/table/types/index.ts +5 -0
  106. package/src/components/tooltip/Tooltip.css +49 -0
  107. package/src/components/tooltip/Tooltip.vue +85 -0
  108. package/src/components/virtualscroll/VirtualScroll.css +13 -0
  109. package/src/components/virtualscroll/VirtualScroll.vue +61 -0
  110. package/src/composables/element.ts +13 -0
  111. package/src/composables/useCachedUid.ts +48 -0
  112. package/src/composables/useEventListener.ts +14 -0
  113. package/src/composables/useInput.ts +134 -0
  114. package/src/composables/useIsServer.ts +7 -0
  115. package/src/composables/useMount.ts +43 -0
  116. package/src/composables/usePopper.ts +194 -0
  117. package/src/create.ts +34 -0
  118. package/src/css/components.css +14 -0
  119. package/src/css/index.css +4 -0
  120. package/src/css/normalize.css +379 -0
  121. package/src/css/transitions.css +40 -0
  122. package/src/css/variables.css +80 -0
  123. package/src/exports/nuxt.js +33 -0
  124. package/src/exports/nuxt.plugin.js +8 -0
  125. package/src/index.ts +5 -0
  126. package/src/install.ts +8 -0
  127. package/src/shims-vue.d.ts +6 -0
  128. package/src/types/props.ts +3 -0
  129. package/volar.d.ts +16 -0
@@ -0,0 +1,67 @@
1
+ import type { PropType } from 'vue';
2
+ export type FormError = {
3
+ field: string;
4
+ message: string;
5
+ };
6
+ export type Form = {
7
+ name: string;
8
+ focus: () => void;
9
+ validate: () => boolean;
10
+ setError: (error: string) => void;
11
+ };
12
+ declare const _default: import("vue").DefineComponent<{
13
+ disabled: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ loading: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ errors: {
22
+ type: PropType<[FormError[], FormError]>;
23
+ default: () => never[];
24
+ };
25
+ autoValidate: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ autoFocus: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ }, {
34
+ submit: (e: Event) => void;
35
+ computedStyles: import("vue").ComputedRef<never[]>;
36
+ computedClasses: import("vue").ComputedRef<string[]>;
37
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "submit"[], "submit", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
+ disabled: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ loading: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ errors: {
47
+ type: PropType<[FormError[], FormError]>;
48
+ default: () => never[];
49
+ };
50
+ autoValidate: {
51
+ type: BooleanConstructor;
52
+ default: boolean;
53
+ };
54
+ autoFocus: {
55
+ type: BooleanConstructor;
56
+ default: boolean;
57
+ };
58
+ }>> & {
59
+ onSubmit?: ((...args: any[]) => any) | undefined;
60
+ }, {
61
+ disabled: boolean;
62
+ loading: boolean;
63
+ errors: [FormError[], FormError];
64
+ autoValidate: boolean;
65
+ autoFocus: boolean;
66
+ }>;
67
+ export default _default;
@@ -0,0 +1,50 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ src: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ scrSet: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ };
10
+ fit: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ alt: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ }, {
19
+ source: import("vue").Ref<string | undefined>;
20
+ computedClasses: import("vue").ComputedRef<{
21
+ "m-image": boolean;
22
+ }>;
23
+ computedStyles: import("vue").ComputedRef<{}>;
24
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ error: (e: Event) => true;
26
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
+ src: {
28
+ type: StringConstructor;
29
+ required: true;
30
+ };
31
+ scrSet: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ fit: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ alt: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ }>> & {
44
+ onError?: ((e: Event) => any) | undefined;
45
+ }, {
46
+ scrSet: string;
47
+ fit: string;
48
+ alt: string;
49
+ }>;
50
+ export default _default;
@@ -0,0 +1,26 @@
1
+ export { default as MButton } from './button/Button.vue';
2
+ export { default as MButtonGroup } from './buttongroup/ButtonGroup.vue';
3
+ export { default as MForm } from './form/Form.vue';
4
+ export { default as MInput } from './input/Input.vue';
5
+ export { default as MSelect } from './select/Select.vue';
6
+ export { default as MCheckbox } from './checkbox/Checkbox.vue';
7
+ export { default as MBreadcrumb } from './breadcrumb/Breadcrumb.vue';
8
+ export { default as MBreadcrumbItem } from './breadcrumbitem/BreadcrumbItem.vue';
9
+ export { default as MAvatar } from './avatar/Avatar.vue';
10
+ export { default as MAvatarGroup } from './avatargroup/AvatarGroup.vue';
11
+ export { default as MImage } from './image/Image.vue';
12
+ export { default as MSkeleton } from './skeleton/Skeleton.vue';
13
+ export { default as MLink } from './link/Link.vue';
14
+ export { default as MTooltip } from './tooltip/Tooltip.vue';
15
+ export { default as MTabGroup } from './tab/TabGroup.vue';
16
+ export { default as MTab } from './tab/Tab.vue';
17
+ export { default as MTable } from './table/Table.vue';
18
+ export { default as MTableBody } from './table/TableBody.vue';
19
+ export { default as MTableCell } from './table/TableCell.vue';
20
+ export { default as MTableHead } from './table/TableHead.vue';
21
+ export { default as MTableHeadRow } from './table/TableHeadRow.vue';
22
+ export { default as MTableRow } from './table/TableRow.vue';
23
+ export { default as MDropdown } from './dropdown/Dropdown.vue';
24
+ export { default as MDropdownWrapper } from './dropdown/DropdownWrapper.vue';
25
+ export { default as MDropdownList } from './dropdown/DropdownList.vue';
26
+ export { default as MDropdownItem } from './dropdown/DropdownItem.vue';
@@ -0,0 +1,126 @@
1
+ import type { PropType } from "vue";
2
+ import type { Size } from "@/types/props";
3
+ declare const _default: import("vue").DefineComponent<{
4
+ label: {
5
+ type: StringConstructor;
6
+ };
7
+ size: {
8
+ type: PropType<Size>;
9
+ default: string;
10
+ };
11
+ type: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ validator: (value: string) => boolean;
15
+ };
16
+ placeholder: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ loading: {
21
+ type: BooleanConstructor;
22
+ default: boolean;
23
+ };
24
+ readonly: {
25
+ type: BooleanConstructor;
26
+ default: boolean;
27
+ };
28
+ disabled: {
29
+ type: BooleanConstructor;
30
+ default: boolean;
31
+ };
32
+ help: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ modelValue: PropType<string | number | boolean | object | any[] | undefined>;
37
+ name: StringConstructor;
38
+ required: BooleanConstructor;
39
+ error: StringConstructor;
40
+ rules: {
41
+ readonly type: ArrayConstructor;
42
+ readonly default: () => never[];
43
+ };
44
+ }, {
45
+ id: Readonly<import("vue").Ref<string>>;
46
+ inputType: import("vue").ComputedRef<string>;
47
+ disabled: import("vue").ComputedRef<any>;
48
+ loading: import("vue").ComputedRef<any>;
49
+ readonly: import("vue").ComputedRef<boolean>;
50
+ inputComputedClasses: import("vue").ComputedRef<(string | {
51
+ 'm-input--disabled': any;
52
+ 'm-input--readonly': boolean;
53
+ 'm-input--focused': boolean;
54
+ 'm-input--error': any;
55
+ 'm-input--prefix': boolean;
56
+ 'm-input--suffix': boolean;
57
+ 'm-input--loading': boolean;
58
+ 'm-input--password': boolean;
59
+ })[]>;
60
+ wrapperComputedClasses: import("vue").ComputedRef<(string | {
61
+ 'm-form__input': boolean;
62
+ })[]>;
63
+ name: import("vue").Ref<string | undefined>;
64
+ hasPrefix: import("vue").ComputedRef<boolean>;
65
+ hasSuffix: import("vue").ComputedRef<boolean>;
66
+ inputError: import("vue").ComputedRef<any>;
67
+ onClear: () => void;
68
+ focus: () => void;
69
+ validate: (value: any) => boolean;
70
+ setError: (value: string) => void;
71
+ listeners: {};
72
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
73
+ label: {
74
+ type: StringConstructor;
75
+ };
76
+ size: {
77
+ type: PropType<Size>;
78
+ default: string;
79
+ };
80
+ type: {
81
+ type: StringConstructor;
82
+ default: string;
83
+ validator: (value: string) => boolean;
84
+ };
85
+ placeholder: {
86
+ type: StringConstructor;
87
+ default: string;
88
+ };
89
+ loading: {
90
+ type: BooleanConstructor;
91
+ default: boolean;
92
+ };
93
+ readonly: {
94
+ type: BooleanConstructor;
95
+ default: boolean;
96
+ };
97
+ disabled: {
98
+ type: BooleanConstructor;
99
+ default: boolean;
100
+ };
101
+ help: {
102
+ type: StringConstructor;
103
+ default: string;
104
+ };
105
+ modelValue: PropType<string | number | boolean | object | any[] | undefined>;
106
+ name: StringConstructor;
107
+ required: BooleanConstructor;
108
+ error: StringConstructor;
109
+ rules: {
110
+ readonly type: ArrayConstructor;
111
+ readonly default: () => never[];
112
+ };
113
+ }>> & {
114
+ [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
115
+ }, {
116
+ type: string;
117
+ required: boolean;
118
+ size: Size;
119
+ disabled: boolean;
120
+ loading: boolean;
121
+ readonly: boolean;
122
+ rules: unknown[];
123
+ placeholder: string;
124
+ help: string;
125
+ }>;
126
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import type { Color } from "@/types/props";
2
+ import { type PropType } from "vue";
3
+ declare const _default: import("vue").DefineComponent<{
4
+ color: {
5
+ type: PropType<Color>;
6
+ };
7
+ disabled: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ block: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ underline: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ to: (StringConstructor | ObjectConstructor)[];
20
+ }, {
21
+ computedClasses: import("vue").ComputedRef<(string | {
22
+ [x: string]: boolean | Color | undefined;
23
+ 'm-link--underline': boolean;
24
+ 'm-link--block': boolean;
25
+ 'm-link--disabled': boolean;
26
+ 'm-link--external': boolean;
27
+ })[]>;
28
+ tag: import("vue").ComputedRef<"a" | "router-link">;
29
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
30
+ color: {
31
+ type: PropType<Color>;
32
+ };
33
+ disabled: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ };
37
+ block: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
41
+ underline: {
42
+ type: BooleanConstructor;
43
+ default: boolean;
44
+ };
45
+ to: (StringConstructor | ObjectConstructor)[];
46
+ }>>, {
47
+ disabled: boolean;
48
+ block: boolean;
49
+ underline: boolean;
50
+ }>;
51
+ export default _default;
@@ -0,0 +1,61 @@
1
+ import type { PropType } from 'vue';
2
+ declare const _default: import("vue").DefineComponent<{
3
+ onInternalAfterLeave: PropType<(key: string) => void>;
4
+ internalKey: {
5
+ type: StringConstructor;
6
+ required: true;
7
+ };
8
+ content: {
9
+ type: StringConstructor[];
10
+ };
11
+ type: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ timeout: {
16
+ type: NumberConstructor;
17
+ default: number;
18
+ };
19
+ showClose: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ onClose: {
24
+ type: FunctionConstructor;
25
+ default: () => void;
26
+ };
27
+ }, {
28
+ show: import("vue").Ref<boolean>;
29
+ hide: () => void;
30
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
31
+ onInternalAfterLeave: PropType<(key: string) => void>;
32
+ internalKey: {
33
+ type: StringConstructor;
34
+ required: true;
35
+ };
36
+ content: {
37
+ type: StringConstructor[];
38
+ };
39
+ type: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ timeout: {
44
+ type: NumberConstructor;
45
+ default: number;
46
+ };
47
+ showClose: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ onClose: {
52
+ type: FunctionConstructor;
53
+ default: () => void;
54
+ };
55
+ }>>, {
56
+ type: string;
57
+ timeout: number;
58
+ showClose: boolean;
59
+ onClose: Function;
60
+ }>;
61
+ export default _default;
@@ -0,0 +1,51 @@
1
+ import type { MessageType, MessageReactive, MessageApiInjection } from './types';
2
+ import type { PropType } from 'vue';
3
+ export type MessageProviderInst = MessageApiInjection;
4
+ interface PrivateMessageRef extends MessageReactive {
5
+ key: string;
6
+ hide: () => void;
7
+ }
8
+ declare const _default: import("vue").DefineComponent<{
9
+ teleportTo: {
10
+ type: StringConstructor;
11
+ default: string;
12
+ };
13
+ placement: {
14
+ type: PropType<"top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
15
+ default: string;
16
+ };
17
+ timeout: {
18
+ type: NumberConstructor;
19
+ default: number;
20
+ };
21
+ }, {
22
+ messageRefs: import("vue").Ref<Record<string, PrivateMessageRef>>;
23
+ messageList: import("vue").Ref<{
24
+ key: string;
25
+ content: string;
26
+ timeout?: number | undefined;
27
+ closable?: boolean | undefined;
28
+ type: MessageType;
29
+ onClose?: (() => void) | undefined;
30
+ destroy: () => void;
31
+ }[]>;
32
+ onInternalAfterLeave: (key: string) => void;
33
+ } & MessageApiInjection, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
+ teleportTo: {
35
+ type: StringConstructor;
36
+ default: string;
37
+ };
38
+ placement: {
39
+ type: PropType<"top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right">;
40
+ default: string;
41
+ };
42
+ timeout: {
43
+ type: NumberConstructor;
44
+ default: number;
45
+ };
46
+ }>>, {
47
+ placement: "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
48
+ timeout: number;
49
+ teleportTo: string;
50
+ }>;
51
+ export default _default;
@@ -0,0 +1,28 @@
1
+ import type { VNodeChild } from 'vue';
2
+ export type ContentType = string;
3
+ export type MessageType = 'info' | 'success' | 'warning' | 'error' | 'loading' | 'default';
4
+ export type MessageRenderMessage = (props: any) => VNodeChild;
5
+ export interface MessageOptions {
6
+ type?: MessageType;
7
+ render?: MessageRenderMessage;
8
+ timeout?: number;
9
+ closable?: boolean;
10
+ onClose?: () => void;
11
+ }
12
+ export interface MessageReactive {
13
+ content: ContentType;
14
+ timeout?: number;
15
+ closable?: boolean;
16
+ type: MessageType;
17
+ onClose?: () => void;
18
+ destroy: () => void;
19
+ }
20
+ export interface MessageApiInjection {
21
+ create: (content: ContentType, options?: MessageOptions) => MessageReactive;
22
+ info: (content: ContentType, options?: MessageOptions) => MessageReactive;
23
+ success: (content: ContentType, options?: MessageOptions) => MessageReactive;
24
+ warning: (content: ContentType, options?: MessageOptions) => MessageReactive;
25
+ error: (content: ContentType, options?: MessageOptions) => MessageReactive;
26
+ loading: (content: ContentType, options?: MessageOptions) => MessageReactive;
27
+ destroyAll: () => void;
28
+ }
@@ -0,0 +1,2 @@
1
+ import type { MessageApiInjection } from './types';
2
+ export declare function useMessage(): MessageApiInjection;
@@ -0,0 +1,180 @@
1
+ import type { Size } from "@/types/props";
2
+ import { type PropType } from "vue";
3
+ declare const _default: import("vue").DefineComponent<{
4
+ label: {
5
+ type: StringConstructor;
6
+ };
7
+ placeholder: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ options: {
12
+ type: PropType<any[]>;
13
+ required: true;
14
+ };
15
+ searchable: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ multiple: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ size: {
24
+ type: PropType<Size>;
25
+ default: string;
26
+ };
27
+ help: {
28
+ type: StringConstructor;
29
+ default: string;
30
+ };
31
+ optionValue: {
32
+ type: StringConstructor;
33
+ default: string;
34
+ };
35
+ optionLabel: {
36
+ type: StringConstructor;
37
+ default: string;
38
+ };
39
+ transitionName: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ consistentWidth: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
47
+ disabled: {
48
+ type: BooleanConstructor;
49
+ default: boolean;
50
+ };
51
+ loading: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ modelValue: PropType<string | number | boolean | object | any[] | undefined>;
56
+ name: StringConstructor;
57
+ readonly: BooleanConstructor;
58
+ required: BooleanConstructor;
59
+ error: StringConstructor;
60
+ rules: {
61
+ readonly type: ArrayConstructor;
62
+ readonly default: () => never[];
63
+ };
64
+ }, {
65
+ container: import("vue").Ref<HTMLDivElement | undefined>;
66
+ optionsRef: import("vue").Ref<HTMLDivElement[] | undefined>;
67
+ searchRef: import("vue").Ref<HTMLDivElement | undefined>;
68
+ selectRef: import("vue").Ref<HTMLDivElement | undefined>;
69
+ popper: import("vue").Ref<HTMLElement | null | undefined>;
70
+ id: Readonly<import("vue").Ref<string>>;
71
+ open: import("vue").Ref<boolean>;
72
+ selected: import("vue").WritableComputedRef<any>;
73
+ computedOptions: import("vue").ComputedRef<{
74
+ value: any;
75
+ label: any;
76
+ active: boolean;
77
+ onClick: () => void;
78
+ }[]>;
79
+ selectedIndex: import("vue").Ref<number | undefined>;
80
+ search: import("vue").Ref<string>;
81
+ containerComputedClasses: import("vue").ComputedRef<(string | {
82
+ 'm-form__input': boolean;
83
+ })[]>;
84
+ selectComputedClasses: import("vue").ComputedRef<(string | {
85
+ [x: string]: any;
86
+ 'm-select--disabled': any;
87
+ 'm-select--focused': boolean;
88
+ 'm-select--multiple': boolean;
89
+ 'm-select--error': any;
90
+ })[]>;
91
+ computedConsistentWidth: import("vue").ComputedRef<{
92
+ width: string;
93
+ } | {
94
+ width?: undefined;
95
+ }>;
96
+ getSelectedLabel: (value: string | number | []) => any;
97
+ openSelect: () => void;
98
+ inputError: import("vue").ComputedRef<any>;
99
+ transitionName: import("vue").ComputedRef<string>;
100
+ listeners: {};
101
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, string[], string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
102
+ label: {
103
+ type: StringConstructor;
104
+ };
105
+ placeholder: {
106
+ type: StringConstructor;
107
+ default: string;
108
+ };
109
+ options: {
110
+ type: PropType<any[]>;
111
+ required: true;
112
+ };
113
+ searchable: {
114
+ type: BooleanConstructor;
115
+ default: boolean;
116
+ };
117
+ multiple: {
118
+ type: BooleanConstructor;
119
+ default: boolean;
120
+ };
121
+ size: {
122
+ type: PropType<Size>;
123
+ default: string;
124
+ };
125
+ help: {
126
+ type: StringConstructor;
127
+ default: string;
128
+ };
129
+ optionValue: {
130
+ type: StringConstructor;
131
+ default: string;
132
+ };
133
+ optionLabel: {
134
+ type: StringConstructor;
135
+ default: string;
136
+ };
137
+ transitionName: {
138
+ type: StringConstructor;
139
+ default: string;
140
+ };
141
+ consistentWidth: {
142
+ type: BooleanConstructor;
143
+ default: boolean;
144
+ };
145
+ disabled: {
146
+ type: BooleanConstructor;
147
+ default: boolean;
148
+ };
149
+ loading: {
150
+ type: BooleanConstructor;
151
+ default: boolean;
152
+ };
153
+ modelValue: PropType<string | number | boolean | object | any[] | undefined>;
154
+ name: StringConstructor;
155
+ readonly: BooleanConstructor;
156
+ required: BooleanConstructor;
157
+ error: StringConstructor;
158
+ rules: {
159
+ readonly type: ArrayConstructor;
160
+ readonly default: () => never[];
161
+ };
162
+ }>> & {
163
+ [x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
164
+ }, {
165
+ required: boolean;
166
+ size: Size;
167
+ disabled: boolean;
168
+ loading: boolean;
169
+ readonly: boolean;
170
+ rules: unknown[];
171
+ transitionName: string;
172
+ placeholder: string;
173
+ help: string;
174
+ searchable: boolean;
175
+ multiple: boolean;
176
+ optionValue: string;
177
+ optionLabel: string;
178
+ consistentWidth: boolean;
179
+ }>;
180
+ export default _default;
@@ -0,0 +1,39 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ tag: {
3
+ type: StringConstructor;
4
+ default: string;
5
+ };
6
+ variant: {
7
+ type: StringConstructor;
8
+ default: string;
9
+ validator: (value: string) => boolean;
10
+ };
11
+ animation: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ }, {
16
+ computedClasses: import("vue").ComputedRef<{
17
+ [x: string]: boolean;
18
+ "m-skeleton": boolean;
19
+ }>;
20
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
21
+ tag: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ };
25
+ variant: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ validator: (value: string) => boolean;
29
+ };
30
+ animation: {
31
+ type: StringConstructor;
32
+ default: string;
33
+ };
34
+ }>>, {
35
+ variant: string;
36
+ tag: string;
37
+ animation: string;
38
+ }>;
39
+ export default _default;