lew-ui 2.1.13 → 2.2.1

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 (107) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +49 -53
  3. package/dist/components/avatar/src/LewAvatar.vue.d.ts +0 -11
  4. package/dist/components/avatar/src/props.d.ts +0 -5
  5. package/dist/components/backtop/src/LewBackTop.vue.d.ts +6 -4
  6. package/dist/components/badge/src/LewBadge.vue.d.ts +6 -4
  7. package/dist/components/breadcrumb/src/LewBreadcrumb.vue.d.ts +6 -2
  8. package/dist/components/breadcrumb/src/props.d.ts +1 -1
  9. package/dist/components/button/src/LewButton.vue.d.ts +7 -5
  10. package/dist/components/cascader/src/LewCascader.vue.d.ts +8 -6
  11. package/dist/components/checkbox/src/LewCheckbox.vue.d.ts +4 -4
  12. package/dist/components/collapse/index.d.ts +4 -0
  13. package/dist/components/collapse/src/LewCollapse.vue.d.ts +38 -0
  14. package/dist/components/collapse/src/LewCollapseItem.vue.d.ts +68 -0
  15. package/dist/components/collapse/src/props.d.ts +52 -0
  16. package/dist/components/date-picker/index.d.ts +0 -2
  17. package/dist/components/date-picker/src/LewDate.vue.d.ts +3 -3
  18. package/dist/components/date-picker/src/LewDatePicker.vue.d.ts +13 -2
  19. package/dist/components/date-picker/src/props.d.ts +6 -69
  20. package/dist/components/date-range-picker/index.d.ts +3 -0
  21. package/dist/components/{date-picker → date-range-picker}/src/LewDateRange.vue.d.ts +2 -2
  22. package/dist/components/{date-picker → date-range-picker}/src/LewDateRangePicker.vue.d.ts +7 -5
  23. package/dist/components/date-range-picker/src/props.d.ts +75 -0
  24. package/dist/components/drawer/src/LewDrawer.vue.d.ts +16 -14
  25. package/dist/components/drawer/src/props.d.ts +3 -3
  26. package/dist/components/dropdown/src/LewDropdown.vue.d.ts +9 -42
  27. package/dist/components/dropdown/src/props.d.ts +2 -16
  28. package/dist/components/empty/src/LewEmpty.vue.d.ts +23 -1
  29. package/dist/components/empty/src/props.d.ts +10 -0
  30. package/dist/components/flex/src/LewFlex.vue.d.ts +6 -4
  31. package/dist/components/form/index.d.ts +1 -0
  32. package/dist/components/form/src/LewForm.vue.d.ts +67 -7
  33. package/dist/components/form/src/LewFormItem.vue.d.ts +189 -0
  34. package/dist/components/form/src/LewGetLabelWidth.vue.d.ts +22 -0
  35. package/dist/components/form/src/RequiredIcon.vue.d.ts +14 -0
  36. package/dist/components/form/src/props.d.ts +107 -7
  37. package/dist/components/image/index.d.ts +2 -0
  38. package/dist/components/image/src/LewImage.vue.d.ts +124 -0
  39. package/dist/components/image/src/props.d.ts +55 -0
  40. package/dist/components/index.d.ts +7 -0
  41. package/dist/components/input/src/LewInput.vue.d.ts +12 -12
  42. package/dist/components/input/src/props.d.ts +3 -3
  43. package/dist/components/input-number/index.d.ts +2 -0
  44. package/dist/components/input-number/src/LewInputNumber.vue.d.ts +150 -0
  45. package/dist/components/input-number/src/props.d.ts +67 -0
  46. package/dist/components/input-tag/src/LewInputTag.vue.d.ts +2 -2
  47. package/dist/components/mark/src/LewMark.vue.d.ts +15 -9
  48. package/dist/components/mark/src/props.d.ts +1 -1
  49. package/dist/components/menu/src/props.d.ts +1 -1
  50. package/dist/components/menu-tree/src/props.d.ts +1 -1
  51. package/dist/components/modal/src/LewModal.vue.d.ts +34 -10
  52. package/dist/components/modal/src/props.d.ts +11 -1
  53. package/dist/components/pagination/src/LewPagination.vue.d.ts +15 -13
  54. package/dist/components/pagination/src/props.d.ts +2 -2
  55. package/dist/components/popok/src/LewPopok.vue.d.ts +9 -7
  56. package/dist/components/popok/src/props.d.ts +1 -1
  57. package/dist/components/popover/src/LewPopover.vue.d.ts +12 -10
  58. package/dist/components/popover/src/props.d.ts +1 -1
  59. package/dist/components/radio/src/LewRadio.vue.d.ts +1 -1
  60. package/dist/components/radio/src/LewRadioGroup.vue.d.ts +2 -2
  61. package/dist/components/result/src/LewResult.vue.d.ts +6 -4
  62. package/dist/components/select/src/LewSelect.vue.d.ts +14 -12
  63. package/dist/components/select-multiple/src/LewSelectMultiple.vue.d.ts +14 -12
  64. package/dist/components/slider/index.d.ts +2 -0
  65. package/dist/components/slider/src/LewSlider.vue.d.ts +8 -0
  66. package/dist/components/slider/src/props.d.ts +4 -0
  67. package/dist/components/slider-range/index.d.ts +2 -0
  68. package/dist/components/slider-range/src/LewSliderRange.vue.d.ts +8 -0
  69. package/dist/components/slider-range/src/props.d.ts +4 -0
  70. package/dist/components/steps/src/LewSteps.vue.d.ts +2 -2
  71. package/dist/components/switch/src/LewSwitch.vue.d.ts +5 -5
  72. package/dist/components/switch/src/props.d.ts +1 -1
  73. package/dist/components/table/src/LewTable.vue.d.ts +16 -14
  74. package/dist/components/tabs/src/LewTabs.vue.d.ts +3 -3
  75. package/dist/components/tag/src/LewTag.vue.d.ts +8 -6
  76. package/dist/components/text-trim/src/LewTextTrim.vue.d.ts +3 -3
  77. package/dist/components/text-trim/src/props.d.ts +1 -1
  78. package/dist/components/textarea/src/LewTextarea.vue.d.ts +2 -2
  79. package/dist/components/title/src/LewTitle.vue.d.ts +6 -4
  80. package/dist/components/tree/src/LewTree.vue.d.ts +13 -11
  81. package/dist/components/tree-select/src/LewTreeSelect.vue.d.ts +13 -11
  82. package/dist/components/tree-select/src/props.d.ts +1 -1
  83. package/dist/components/upload/index.d.ts +2 -0
  84. package/dist/components/upload/src/LewUpload.vue.d.ts +123 -0
  85. package/dist/components/upload/src/props.d.ts +69 -0
  86. package/dist/directives/context-menu/index.d.ts +2 -0
  87. package/dist/directives/context-menu/src/LewContextMenu.vue.d.ts +22 -0
  88. package/dist/directives/context-menu/src/index.d.ts +24 -0
  89. package/dist/directives/dialog/index.d.ts +1 -2
  90. package/dist/directives/dialog/src/LewDialog.vue.d.ts +7 -7
  91. package/dist/directives/dialog/src/index.d.ts +10 -2
  92. package/dist/directives/dialog/src/props.d.ts +1 -1
  93. package/dist/directives/index.d.ts +1 -0
  94. package/dist/directives/loading/index.d.ts +1 -1
  95. package/dist/directives/loading/src/index.d.ts +1 -2
  96. package/dist/directives/notification/index.d.ts +0 -1
  97. package/dist/directives/notification/src/index.d.ts +16 -2
  98. package/dist/directives/tooltip/index.d.ts +1 -1
  99. package/dist/directives/tooltip/src/index.d.ts +1 -2
  100. package/dist/hooks/index.d.ts +0 -1
  101. package/dist/index.d.ts +1 -1
  102. package/dist/index.mjs +5654 -3562
  103. package/dist/index.umd.js +16 -16
  104. package/dist/style.css +1 -1
  105. package/dist/utils/index.d.ts +8 -2
  106. package/package.json +7 -6
  107. package/dist/hooks/src/useLewTo.d.ts +0 -3
@@ -0,0 +1,69 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ import { FormSize } from '../../..';
3
+
4
+ export type UploadStatus = 'success' | 'fail' | 'uploading' | 'pending' | 'complete' | 'wrong_type' | 'wrong_size';
5
+ export type UploadFileItem = {
6
+ id: string;
7
+ name?: string;
8
+ url?: string;
9
+ status?: UploadStatus;
10
+ percent?: number;
11
+ file?: File;
12
+ size?: number;
13
+ type?: string;
14
+ lastModifiedDate?: any;
15
+ lastModified?: any;
16
+ };
17
+ export declare const uploadProps: {
18
+ size: {
19
+ type: PropType<FormSize>;
20
+ default: string;
21
+ description: string;
22
+ };
23
+ accept: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ description: string;
27
+ };
28
+ maxFileSize: {
29
+ type: NumberConstructor;
30
+ default: number;
31
+ description: string;
32
+ };
33
+ disabled: {
34
+ type: BooleanConstructor;
35
+ default: boolean;
36
+ description: string;
37
+ };
38
+ readonly: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ description: string;
42
+ };
43
+ tips: {
44
+ type: StringConstructor;
45
+ default: string;
46
+ description: string;
47
+ };
48
+ multiple: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ description: string;
52
+ };
53
+ limit: {
54
+ type: NumberConstructor;
55
+ default: number;
56
+ description: string;
57
+ };
58
+ listType: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ description: string;
62
+ };
63
+ uploadHelper: {
64
+ type: FunctionConstructor;
65
+ default: string;
66
+ description: string;
67
+ };
68
+ };
69
+ export type UploadProps = ExtractPropTypes<typeof uploadProps>;
@@ -0,0 +1,2 @@
1
+ export { default as LewContextMenu } from './src/LewContextMenu.vue';
2
+ export * from './src';
@@ -0,0 +1,22 @@
1
+ import { ContextMenus } from './index';
2
+
3
+ declare const _default: import('vue').DefineComponent<{
4
+ options: {
5
+ type: PropType<ContextMenus[]>;
6
+ default: never[];
7
+ description: string;
8
+ };
9
+ }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ select: (...args: any[]) => void;
11
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
12
+ options: {
13
+ type: PropType<ContextMenus[]>;
14
+ default: never[];
15
+ description: string;
16
+ };
17
+ }>> & {
18
+ onSelect?: ((...args: any[]) => any) | undefined;
19
+ }, {
20
+ options: ContextMenus[];
21
+ }, {}>;
22
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import { App } from 'vue';
2
+
3
+ export declare const initLewContextMenu: () => void;
4
+ export declare const LewVContextMenu: {
5
+ install(app: App): void;
6
+ };
7
+ export interface ContextMenus {
8
+ label?: string;
9
+ value?: string;
10
+ type?: string;
11
+ icon?: string;
12
+ children?: ContextMenus[];
13
+ disabled?: boolean;
14
+ level?: number;
15
+ isDividerLine?: false;
16
+ [key: string]: any;
17
+ }
18
+ export declare const contextMenuProps: {
19
+ options: {
20
+ type: PropType<ContextMenus[]>;
21
+ default: never[];
22
+ description: string;
23
+ };
24
+ };
@@ -1,2 +1 @@
1
- export * from './src/props';
2
- export { default as LewDialog } from './src';
1
+ export * from './src';
@@ -1,4 +1,8 @@
1
- declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
1
+ declare function __VLS_template(): {
2
+ title?(_: {}): any;
3
+ content?(_: {}): any;
4
+ };
5
+ declare const __VLS_component: import('vue').DefineComponent<{
2
6
  type: {
3
7
  type: globalThis.PropType<import('../../..').ButtonColor>;
4
8
  default: string;
@@ -45,7 +49,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
45
49
  description: string;
46
50
  };
47
51
  }, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
48
- show: (...args: any[]) => void;
49
52
  close: (...args: any[]) => void;
50
53
  }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
51
54
  type: {
@@ -94,7 +97,6 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
94
97
  description: string;
95
98
  };
96
99
  }>> & {
97
- onShow?: ((...args: any[]) => any) | undefined;
98
100
  onClose?: ((...args: any[]) => any) | undefined;
99
101
  }, {
100
102
  type: import('../../..').ButtonColor;
@@ -106,10 +108,8 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
106
108
  layout: string;
107
109
  okText: string;
108
110
  cancelText: string;
109
- }, {}>, {
110
- title?(_: {}): any;
111
- content?(_: {}): any;
112
- }>;
111
+ }, {}>;
112
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
113
113
  export default _default;
114
114
  type __VLS_WithTemplateSlots<T, S> = T & {
115
115
  new (): {
@@ -9,7 +9,7 @@ type Options = {
9
9
  closeOnClickOverlay?: boolean;
10
10
  closeByEsc?: boolean;
11
11
  };
12
- declare const _default: {
12
+ export declare const LewDialog: {
13
13
  name: string;
14
14
  warning: (options: Options) => void;
15
15
  info: (options: Options) => void;
@@ -17,4 +17,12 @@ declare const _default: {
17
17
  success: (options: Options) => void;
18
18
  error: (options: Options) => void;
19
19
  };
20
- export default _default;
20
+ export type LewDialog = {
21
+ name: string;
22
+ warning: (options: Options) => void;
23
+ info: (options: Options) => void;
24
+ normal: (options: Options) => void;
25
+ success: (options: Options) => void;
26
+ error: (options: Options) => void;
27
+ };
28
+ export * from './props';
@@ -1,5 +1,5 @@
1
- import { ButtonColor } from '../../..';
2
1
  import { ExtractPropTypes, PropType } from 'vue';
2
+ import { ButtonColor } from '../../..';
3
3
 
4
4
  export declare const dialogProps: {
5
5
  type: {
@@ -4,3 +4,4 @@ export * from './tooltip';
4
4
  export * from './backtop';
5
5
  export * from './notification';
6
6
  export * from './loading';
7
+ export * from './context-menu';
@@ -1 +1 @@
1
- export { default as LewLoading } from './src';
1
+ export * from './src';
@@ -1,6 +1,5 @@
1
1
  import { App as Application } from 'vue';
2
2
 
3
- declare const _default: {
3
+ export declare const LewLoading: {
4
4
  install(app: Application): void;
5
5
  };
6
- export default _default;
@@ -1,2 +1 @@
1
- export { default as LewNotification } from './src';
2
1
  export * from './src';
@@ -13,5 +13,19 @@ export interface NotificationInstance {
13
13
  success: NotificationFn;
14
14
  error: NotificationFn;
15
15
  }
16
- declare const _default: NotificationInstance;
17
- export default _default;
16
+ export declare const LewNotification: {
17
+ name: string;
18
+ warning: ({ title, content, delay }: NotificationParamsTyped) => void;
19
+ info: ({ title, content, delay }: NotificationParamsTyped) => void;
20
+ normal: ({ title, content, delay }: NotificationParamsTyped) => void;
21
+ success: ({ title, content, delay }: NotificationParamsTyped) => void;
22
+ error: ({ title, content, delay }: NotificationParamsTyped) => void;
23
+ };
24
+ export type LewNotification = {
25
+ name: string;
26
+ warning: NotificationFn;
27
+ info: NotificationFn;
28
+ normal: NotificationFn;
29
+ success: NotificationFn;
30
+ error: NotificationFn;
31
+ };
@@ -1 +1 @@
1
- export { default as LewTooltip } from './src';
1
+ export * from './src';
@@ -1,6 +1,5 @@
1
1
  import { App as Application } from 'vue';
2
2
 
3
- declare const _default: {
3
+ export declare const LewTooltip: {
4
4
  install(app: Application): void;
5
5
  };
6
- export default _default;
@@ -1,3 +1,2 @@
1
1
  export { useDOMCreate } from './src/useDOMCreate';
2
- export { useLewTo } from './src/useLewTo';
3
2
  export { useEventListener } from './src/useEventListener';
package/dist/index.d.ts CHANGED
@@ -4,6 +4,6 @@ export * from './components';
4
4
  export * from './directives';
5
5
  export * from './utils';
6
6
  declare const _default: {
7
- install: (Vue: App<any>) => void;
7
+ install: (Vue: App) => void;
8
8
  };
9
9
  export default _default;