@v1nt1248/3nclient-lib 0.3.9 → 0.3.11
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.
- package/README.md +3 -2
- package/dist/components/ui3n-autocomplete/types.d.ts +100 -0
- package/dist/components/ui3n-badge/types.d.ts +14 -0
- package/dist/components/ui3n-badge/ui3n-badge.vue.d.ts +2 -4
- package/dist/components/ui3n-breadcrumbs/types.d.ts +50 -0
- package/dist/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue.d.ts +2 -4
- package/dist/components/ui3n-button/types.d.ts +21 -0
- package/dist/components/ui3n-button/ui3n-button.vue.d.ts +2 -4
- package/dist/components/ui3n-checkbox/types.d.ts +44 -0
- package/dist/components/ui3n-chip/types.d.ts +49 -0
- package/dist/components/ui3n-dialog/types.d.ts +103 -0
- package/dist/components/ui3n-drop-files/types.d.ts +31 -0
- package/dist/components/ui3n-editable/types.d.ts +102 -0
- package/dist/components/ui3n-emoji/types.d.ts +13 -0
- package/dist/components/ui3n-icon/types.d.ts +10 -0
- package/dist/components/ui3n-input/types.d.ts +85 -0
- package/dist/components/ui3n-input-file/types.d.ts +29 -0
- package/dist/components/ui3n-list/types.d.ts +35 -0
- package/dist/components/ui3n-menu/types.d.ts +89 -0
- package/dist/components/ui3n-notification/types.d.ts +28 -0
- package/dist/components/ui3n-progress/types.d.ts +49 -0
- package/dist/components/ui3n-radio-group/types.d.ts +78 -0
- package/dist/components/ui3n-selector/types.d.ts +95 -0
- package/dist/components/ui3n-slider/types.d.ts +51 -0
- package/dist/components/ui3n-step-line-bar/types.d.ts +12 -0
- package/dist/components/ui3n-switch/types.d.ts +31 -0
- package/dist/components/ui3n-table/types.d.ts +198 -0
- package/dist/components/ui3n-tabs/types.d.ts +38 -0
- package/dist/components/ui3n-text/types.d.ts +56 -0
- package/dist/components/ui3n-tooltip/types.d.ts +69 -0
- package/dist/components/ui3n-virtual-scroll/types.d.ts +18 -0
- package/dist/constants/general.d.ts +0 -1
- package/dist/constants/plugins-keys.d.ts +0 -2
- package/dist/index.d.ts +0 -8
- package/dist/plugins/index.d.ts +1 -4
- package/dist/style.css +1 -1
- package/dist/ui3n-components.js +5521 -5527
- package/dist/ui3n-plugins.d.ts +3 -11
- package/dist/ui3n-plugins.js +338 -366
- package/dist/ui3n-utils.js +422 -439
- package/dist/utils/copy-to-clipboard.d.ts +1 -0
- package/dist/utils/execute-function.d.ts +29 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/remove-whitespace-in-string.d.ts +1 -0
- package/dist/utils/ui/get-element-color.d.ts +1 -1
- package/package.json +25 -22
- package/src/components/ui3n-autocomplete/types.ts +100 -0
- package/src/components/ui3n-badge/types.ts +16 -0
- package/src/components/ui3n-badge/ui3n-badge-simple.vue +10 -9
- package/src/components/ui3n-badge/ui3n-badge.vue +37 -36
- package/src/components/ui3n-breadcrumbs/types.ts +51 -0
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +69 -69
- package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +7 -8
- package/src/components/ui3n-button/types.ts +23 -0
- package/src/components/ui3n-button/ui3n-button.vue +27 -29
- package/src/components/ui3n-checkbox/types.ts +44 -0
- package/src/components/ui3n-checkbox/ui3n-checkbox.vue +16 -23
- package/src/components/ui3n-chip/types.ts +51 -0
- package/src/components/ui3n-dialog/types.ts +103 -0
- package/src/components/ui3n-drop-files/types.ts +31 -0
- package/src/components/ui3n-editable/types.ts +102 -0
- package/src/components/ui3n-editable/useContentEditable.ts +4 -2
- package/src/components/ui3n-emoji/types.ts +13 -0
- package/src/components/ui3n-icon/types.ts +10 -0
- package/src/components/ui3n-input/types.ts +85 -0
- package/src/components/ui3n-input-file/types.ts +29 -0
- package/src/components/ui3n-list/types.ts +35 -0
- package/src/components/ui3n-menu/types.ts +89 -0
- package/src/components/ui3n-notification/types.ts +28 -0
- package/src/components/ui3n-progress/types.ts +49 -0
- package/src/components/ui3n-radio-group/types.ts +78 -0
- package/src/components/ui3n-selector/types.ts +96 -1
- package/src/components/ui3n-slider/types.ts +51 -0
- package/src/components/ui3n-step-line-bar/types.ts +12 -0
- package/src/components/ui3n-switch/types.ts +31 -0
- package/src/components/ui3n-table/types.ts +204 -0
- package/src/components/ui3n-tabs/types.ts +38 -0
- package/src/components/ui3n-text/types.ts +56 -0
- package/src/components/ui3n-tooltip/types.ts +69 -0
- package/src/components/ui3n-virtual-scroll/types.ts +18 -0
- package/dist/plugins/i18n/i18n.d.ts +0 -9
- package/dist/plugins/i18n/store-i18n.d.ts +0 -7
- package/dist/plugins/i18n/types.d.ts +0 -9
package/README.md
CHANGED
|
@@ -47,13 +47,11 @@ You can run the project as `pnpm dev` or `npm run dev`.
|
|
|
47
47
|
- Ui3nLongPress
|
|
48
48
|
|
|
49
49
|
### Plugins [`@v1nt1248/3nclient-lib/plugins`]
|
|
50
|
-
- i18n
|
|
51
50
|
- dialogs
|
|
52
51
|
- notifications
|
|
53
52
|
- vue-bus
|
|
54
53
|
|
|
55
54
|
### Store plugins [`@v1nt1248/3nclient-lib/plugins`]
|
|
56
|
-
- store-i18n
|
|
57
55
|
- store-dialogs
|
|
58
56
|
- store-notifications
|
|
59
57
|
- store-vue-bus
|
|
@@ -70,6 +68,9 @@ You can run the project as `pnpm dev` or `npm run dev`.
|
|
|
70
68
|
- round
|
|
71
69
|
- getRandomId
|
|
72
70
|
- textareaMaxRows
|
|
71
|
+
- copyToClipboard
|
|
72
|
+
- executeFunc
|
|
73
|
+
- removeWhitespaceInString
|
|
73
74
|
- selection [UI]
|
|
74
75
|
- markSearch [UI]
|
|
75
76
|
- html2text [UI]
|
|
@@ -1,46 +1,146 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Base autocomplete option interface
|
|
4
|
+
*/
|
|
2
5
|
export interface Ui3nAutocompleteOptionBase {
|
|
6
|
+
/**
|
|
7
|
+
* Option ID
|
|
8
|
+
*/
|
|
3
9
|
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* Option name
|
|
12
|
+
*/
|
|
4
13
|
name?: string;
|
|
5
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Autocomplete value type
|
|
17
|
+
*/
|
|
6
18
|
export type Ui3nAutocompleteValue<T extends Ui3nAutocompleteOptionBase> = {
|
|
7
19
|
[Property in keyof T]: T[Property];
|
|
8
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* Autocomplete component properties
|
|
23
|
+
*/
|
|
9
24
|
export interface Ui3nAutocompleteProps<T extends Ui3nAutocompleteOptionBase> {
|
|
25
|
+
/**
|
|
26
|
+
* Whether to show chips
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
10
29
|
chips?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Whether to clear input on select
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
11
34
|
clearOnSelect?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Custom filter function
|
|
37
|
+
*/
|
|
12
38
|
customFilter?: (value: T, query: string) => boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Whether autocomplete is disabled
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
13
43
|
disabled?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Filter keys
|
|
46
|
+
*/
|
|
14
47
|
filterKeys?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* Whether to hide selected items
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
15
52
|
hideSelected?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Items to display
|
|
55
|
+
*/
|
|
16
56
|
items: T[];
|
|
57
|
+
/**
|
|
58
|
+
* Property to use as title
|
|
59
|
+
*/
|
|
17
60
|
itemTitle?: keyof T;
|
|
61
|
+
/**
|
|
62
|
+
* Property to use as value
|
|
63
|
+
*/
|
|
18
64
|
itemValue?: keyof T;
|
|
65
|
+
/**
|
|
66
|
+
* Current autocomplete value
|
|
67
|
+
*/
|
|
19
68
|
modelValue: T[] | Array<T[keyof T]>;
|
|
69
|
+
/**
|
|
70
|
+
* Whether to allow adding new values
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
20
73
|
addNewValue?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* New value validator function
|
|
76
|
+
*/
|
|
21
77
|
newValueValidator?: (value: string) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to allow multiple selection
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
22
82
|
multiple?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Text to show when no data
|
|
85
|
+
*/
|
|
23
86
|
noDataText?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Placeholder text
|
|
89
|
+
*/
|
|
24
90
|
placeholder?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Whether to return the whole object or just the value
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
25
95
|
returnObject?: boolean;
|
|
26
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Autocomplete component emits
|
|
99
|
+
*/
|
|
27
100
|
export interface Ui3nAutocompleteEmits<T extends Ui3nAutocompleteOptionBase> {
|
|
101
|
+
/**
|
|
102
|
+
* Emitted when model value updates
|
|
103
|
+
*/
|
|
28
104
|
(event: 'update:modelValue', value: T[] | Array<T[keyof T]>): void;
|
|
105
|
+
/**
|
|
106
|
+
* Emitted when search value updates
|
|
107
|
+
*/
|
|
29
108
|
(event: 'update:search', value: string): void;
|
|
109
|
+
/**
|
|
110
|
+
* Emitted when focused state updates
|
|
111
|
+
*/
|
|
30
112
|
(event: 'update:focused', value: boolean): void;
|
|
113
|
+
/**
|
|
114
|
+
* Emitted when new value validation status updates
|
|
115
|
+
*/
|
|
31
116
|
(event: 'valid:new-value', value: boolean): void;
|
|
32
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Autocomplete component slots
|
|
120
|
+
*/
|
|
33
121
|
export interface Ui3nAutocompleteSlots<T extends Ui3nAutocompleteOptionBase> {
|
|
122
|
+
/**
|
|
123
|
+
* Item slot
|
|
124
|
+
*/
|
|
34
125
|
item: (props: {
|
|
35
126
|
item: T;
|
|
36
127
|
index: number;
|
|
37
128
|
query?: string;
|
|
38
129
|
}) => VNode;
|
|
130
|
+
/**
|
|
131
|
+
* Chip slot
|
|
132
|
+
*/
|
|
39
133
|
chip: (props: {
|
|
40
134
|
item: T | T[keyof T];
|
|
41
135
|
index: number;
|
|
42
136
|
}) => VNode;
|
|
137
|
+
/**
|
|
138
|
+
* No data text slot
|
|
139
|
+
*/
|
|
43
140
|
noDataText: () => VNode;
|
|
141
|
+
/**
|
|
142
|
+
* Selection slot
|
|
143
|
+
*/
|
|
44
144
|
selection: (props: {
|
|
45
145
|
value: T[] | Array<T[keyof T]>;
|
|
46
146
|
}) => VNode;
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
1
2
|
export interface Ui3nBadgeSimpleProps {
|
|
3
|
+
/** For simple display as a circle */
|
|
2
4
|
dot?: boolean;
|
|
5
|
+
/** Text displayed inside the circle */
|
|
3
6
|
value?: string | number;
|
|
7
|
+
/** Background color */
|
|
4
8
|
color?: string;
|
|
9
|
+
/** Text color */
|
|
5
10
|
textColor?: string;
|
|
6
11
|
}
|
|
7
12
|
export interface Ui3nBadgeProps {
|
|
13
|
+
/** For simple display as a circle */
|
|
8
14
|
dot?: boolean;
|
|
15
|
+
/** Text displayed inside the circle */
|
|
9
16
|
value?: string | number;
|
|
17
|
+
/** Background color */
|
|
10
18
|
color?: string;
|
|
19
|
+
/** Text color */
|
|
11
20
|
textColor?: string;
|
|
21
|
+
/** Positioning of the circle */
|
|
12
22
|
position?: 'right-top' | 'right-bottom' | 'left-top' | 'left-bottom';
|
|
13
23
|
}
|
|
24
|
+
export interface Ui3nBadgeSlots {
|
|
25
|
+
/** Default slot */
|
|
26
|
+
default: () => VNode;
|
|
27
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Ui3nBadgeProps } from './types';
|
|
1
|
+
import { Ui3nBadgeProps, Ui3nBadgeSlots } from './types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
|
-
slots:
|
|
5
|
-
default?(_: {}): any;
|
|
6
|
-
};
|
|
4
|
+
slots: Readonly<Ui3nBadgeSlots> & Ui3nBadgeSlots;
|
|
7
5
|
refs: {};
|
|
8
6
|
rootEl: any;
|
|
9
7
|
};
|
|
@@ -1,17 +1,67 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Breadcrumb component properties
|
|
4
|
+
*/
|
|
2
5
|
export interface Ui3nBreadcrumbProps {
|
|
6
|
+
/**
|
|
7
|
+
* Separator between breadcrumbs
|
|
8
|
+
* @default '/'
|
|
9
|
+
*/
|
|
3
10
|
separator?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the breadcrumb is active
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
4
15
|
isActive?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the breadcrumb is disabled
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
5
20
|
disabled?: boolean;
|
|
6
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Breadcrumb component emits
|
|
24
|
+
*/
|
|
7
25
|
export interface Ui3nBreadcrumbEmits {
|
|
26
|
+
/**
|
|
27
|
+
* Called when the breadcrumb is clicked
|
|
28
|
+
*/
|
|
8
29
|
(ev: 'click', value: Event): void;
|
|
9
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Breadcrumb component slots
|
|
33
|
+
*/
|
|
10
34
|
export interface Ui3nBreadcrumbSlots {
|
|
35
|
+
/**
|
|
36
|
+
* Separator slot
|
|
37
|
+
*/
|
|
11
38
|
separator: () => VNode;
|
|
39
|
+
/**
|
|
40
|
+
* Default slot
|
|
41
|
+
*/
|
|
12
42
|
default: () => VNode;
|
|
13
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Breadcrumbs component properties
|
|
46
|
+
*/
|
|
14
47
|
export interface Ui3nBreadcrumbsProps {
|
|
48
|
+
/**
|
|
49
|
+
* Separator between breadcrumbs
|
|
50
|
+
* @default '/'
|
|
51
|
+
*/
|
|
15
52
|
separator?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Whether the breadcrumbs are disabled
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
16
57
|
disabled?: boolean;
|
|
17
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Breadcrumbs component slots
|
|
61
|
+
*/
|
|
62
|
+
export interface Ui3nBreadcrumbsSlots {
|
|
63
|
+
/**
|
|
64
|
+
* Default slot
|
|
65
|
+
*/
|
|
66
|
+
default: () => VNode;
|
|
67
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Ui3nBreadcrumbsProps } from './types';
|
|
1
|
+
import { Ui3nBreadcrumbsProps, Ui3nBreadcrumbsSlots } from './types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
|
-
slots:
|
|
5
|
-
default?(_: {}): any;
|
|
6
|
-
};
|
|
4
|
+
slots: Readonly<Ui3nBreadcrumbsSlots> & Ui3nBreadcrumbsSlots;
|
|
7
5
|
refs: {};
|
|
8
6
|
rootEl: HTMLDivElement;
|
|
9
7
|
};
|
|
@@ -1,21 +1,42 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
1
2
|
export interface Ui3nButtonProps {
|
|
3
|
+
/** Button type */
|
|
2
4
|
type?: 'primary' | 'secondary' | 'tertiary' | 'icon' | 'custom';
|
|
5
|
+
/** Button size */
|
|
3
6
|
size?: 'regular' | 'small';
|
|
7
|
+
/** Whether to stretch the button to the full width of the parent block */
|
|
4
8
|
block?: boolean;
|
|
9
|
+
/** Button text color */
|
|
5
10
|
textColor?: string;
|
|
11
|
+
/** Button background color */
|
|
6
12
|
color?: string;
|
|
13
|
+
/** Add a raised effect to the button */
|
|
7
14
|
elevation?: boolean;
|
|
15
|
+
/** The icon displayed on the button */
|
|
8
16
|
icon?: string;
|
|
17
|
+
/** Button icon size */
|
|
9
18
|
iconSize?: string | number;
|
|
19
|
+
/** Button icon color */
|
|
10
20
|
iconColor?: string;
|
|
21
|
+
/** Button icon position */
|
|
11
22
|
iconPosition?: 'left' | 'right';
|
|
23
|
+
/** Put component in disabled mode */
|
|
12
24
|
disabled?: boolean;
|
|
13
25
|
}
|
|
14
26
|
export interface Ui3nButtonEmits {
|
|
27
|
+
/** Called when the component is initialized */
|
|
15
28
|
(ev: 'init', value: HTMLButtonElement): void;
|
|
29
|
+
/** Called when the button is clicked */
|
|
16
30
|
(ev: 'click', value: Event): void;
|
|
31
|
+
/** Called when the Enter key is pressed */
|
|
17
32
|
(ev: 'enter', value: HTMLButtonElement): void;
|
|
33
|
+
/** Called when the button has focus */
|
|
18
34
|
(ev: 'focus', value: Event): void;
|
|
35
|
+
/** Called when the button loses focus. */
|
|
19
36
|
(ev: 'blur', value: Event): void;
|
|
20
37
|
}
|
|
21
38
|
export type Ui3nButtonEventName = 'init' | 'click' | 'enter' | 'focus' | 'blur';
|
|
39
|
+
export interface Ui3nButtonSlots {
|
|
40
|
+
/** Default slot */
|
|
41
|
+
default: () => VNode;
|
|
42
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { Ui3nButtonProps } from './types';
|
|
1
|
+
import { Ui3nButtonProps, Ui3nButtonSlots } from './types';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
|
-
slots:
|
|
5
|
-
default?(_: {}): any;
|
|
6
|
-
};
|
|
4
|
+
slots: Readonly<Ui3nButtonSlots> & Ui3nButtonSlots;
|
|
7
5
|
refs: {
|
|
8
6
|
buttonEl: HTMLButtonElement;
|
|
9
7
|
};
|
|
@@ -1,18 +1,62 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Checkbox value type
|
|
4
|
+
*/
|
|
2
5
|
export type Ui3nCheckboxValue = boolean | string | number;
|
|
6
|
+
/**
|
|
7
|
+
* Checkbox component properties
|
|
8
|
+
*/
|
|
3
9
|
export interface Ui3nCheckboxProps {
|
|
10
|
+
/**
|
|
11
|
+
* Current checkbox value
|
|
12
|
+
*/
|
|
4
13
|
modelValue: Ui3nCheckboxValue;
|
|
14
|
+
/**
|
|
15
|
+
* Value when checkbox is checked
|
|
16
|
+
*/
|
|
5
17
|
checkedValue?: Ui3nCheckboxValue;
|
|
18
|
+
/**
|
|
19
|
+
* Value when checkbox is unchecked
|
|
20
|
+
*/
|
|
6
21
|
uncheckedValue?: Ui3nCheckboxValue;
|
|
22
|
+
/**
|
|
23
|
+
* Checkbox size
|
|
24
|
+
*/
|
|
7
25
|
size?: number | string;
|
|
26
|
+
/**
|
|
27
|
+
* Checkbox color
|
|
28
|
+
*/
|
|
8
29
|
color?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Whether checkbox is in indeterminate state
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
9
34
|
indeterminate?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether checkbox is disabled
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
10
39
|
disabled?: boolean;
|
|
11
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Checkbox component events
|
|
43
|
+
*/
|
|
12
44
|
export interface Ui3nCheckboxEmits {
|
|
45
|
+
/**
|
|
46
|
+
* Emitted when checkbox value changes
|
|
47
|
+
*/
|
|
13
48
|
(ev: 'change', value: Ui3nCheckboxValue): void;
|
|
49
|
+
/**
|
|
50
|
+
* Emitted when model value updates
|
|
51
|
+
*/
|
|
14
52
|
(ev: 'update:modelValue', value: Ui3nCheckboxValue): void;
|
|
15
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Checkbox component slots
|
|
56
|
+
*/
|
|
16
57
|
export interface Ui3nCheckboxSlots {
|
|
58
|
+
/**
|
|
59
|
+
* Default slot
|
|
60
|
+
*/
|
|
17
61
|
default: () => VNode;
|
|
18
62
|
}
|
|
@@ -1,22 +1,71 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Chip component properties
|
|
4
|
+
*/
|
|
2
5
|
export interface Ui3nChipProps {
|
|
6
|
+
/**
|
|
7
|
+
* Chip height
|
|
8
|
+
*/
|
|
3
9
|
height?: number | string;
|
|
10
|
+
/**
|
|
11
|
+
* Chip maximum width
|
|
12
|
+
*/
|
|
4
13
|
maxWidth?: number | string;
|
|
14
|
+
/**
|
|
15
|
+
* Chip plain style
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
5
18
|
plain?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Chip round shape
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
6
23
|
round?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Chip closeable
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
7
28
|
closeable?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Chip color
|
|
31
|
+
*/
|
|
8
32
|
color?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Text size
|
|
35
|
+
*/
|
|
9
36
|
textSize?: number | string;
|
|
37
|
+
/**
|
|
38
|
+
* Text color
|
|
39
|
+
*/
|
|
10
40
|
textColor?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Chip disabled state
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
11
45
|
disabled?: boolean;
|
|
12
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Chip component emits
|
|
49
|
+
*/
|
|
13
50
|
export interface Ui3nChipEmits {
|
|
51
|
+
/**
|
|
52
|
+
* Called when chip is closed
|
|
53
|
+
*/
|
|
14
54
|
(ev: 'close'): void;
|
|
15
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Chip component slots
|
|
58
|
+
*/
|
|
16
59
|
export interface Ui3nChipSlots {
|
|
60
|
+
/**
|
|
61
|
+
* Left slot
|
|
62
|
+
*/
|
|
17
63
|
left: (props: {
|
|
18
64
|
size: number;
|
|
19
65
|
color: string;
|
|
20
66
|
}) => VNode;
|
|
67
|
+
/**
|
|
68
|
+
* Default slot
|
|
69
|
+
*/
|
|
21
70
|
default: () => VNode;
|
|
22
71
|
}
|
|
@@ -1,40 +1,143 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
import { Ui3nIconField } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Dialog event base types
|
|
5
|
+
*/
|
|
3
6
|
export type Ui3nDialogEventBase = 'close' | 'confirm' | 'cancel' | 'click-overlay';
|
|
7
|
+
/**
|
|
8
|
+
* Dialog event types
|
|
9
|
+
*/
|
|
4
10
|
export type Ui3nDialogEvent<E extends string = never> = Ui3nDialogEventBase | E;
|
|
11
|
+
/**
|
|
12
|
+
* Dialog component properties
|
|
13
|
+
*/
|
|
5
14
|
export interface Ui3nDialogComponentProps<V> {
|
|
15
|
+
/**
|
|
16
|
+
* Dialog id
|
|
17
|
+
*/
|
|
6
18
|
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Dialog title
|
|
21
|
+
*/
|
|
7
22
|
title?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Dialog icon
|
|
25
|
+
*/
|
|
8
26
|
icon?: string | Ui3nIconField;
|
|
27
|
+
/**
|
|
28
|
+
* Dialog width
|
|
29
|
+
*/
|
|
9
30
|
width?: string | number;
|
|
31
|
+
/**
|
|
32
|
+
* Whether dialog is draggable
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
10
35
|
draggable?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether to hide close button
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
11
40
|
hideCloseButton?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* CSS classes for dialog
|
|
43
|
+
*/
|
|
12
44
|
cssClass?: string[];
|
|
45
|
+
/**
|
|
46
|
+
* CSS styles for dialog
|
|
47
|
+
*/
|
|
13
48
|
cssStyle?: Record<string, string>;
|
|
49
|
+
/**
|
|
50
|
+
* CSS classes for content
|
|
51
|
+
*/
|
|
14
52
|
contentCssClass?: string[];
|
|
53
|
+
/**
|
|
54
|
+
* CSS styles for content
|
|
55
|
+
*/
|
|
15
56
|
contentCssStyle?: Record<string, string>;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to show confirm button
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
16
61
|
confirmButton?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Whether to show cancel button
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
17
66
|
cancelButton?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Confirm button text
|
|
69
|
+
*/
|
|
18
70
|
confirmButtonText?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Cancel button text
|
|
73
|
+
*/
|
|
19
74
|
cancelButtonText?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Confirm button color
|
|
77
|
+
*/
|
|
20
78
|
confirmButtonColor?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Cancel button color
|
|
81
|
+
*/
|
|
21
82
|
cancelButtonColor?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Confirm button background
|
|
85
|
+
*/
|
|
22
86
|
confirmButtonBackground?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Cancel button background
|
|
89
|
+
*/
|
|
23
90
|
cancelButtonBackground?: string;
|
|
91
|
+
/**
|
|
92
|
+
* Whether to close on click overlay
|
|
93
|
+
* @default true
|
|
94
|
+
*/
|
|
24
95
|
closeOnClickOverlay?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Whether to close on ESC key
|
|
98
|
+
* @default true
|
|
99
|
+
*/
|
|
25
100
|
closeOnEsc?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Dialog data
|
|
103
|
+
*/
|
|
26
104
|
data?: V;
|
|
105
|
+
/**
|
|
106
|
+
* Whether dialog is valid
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
27
109
|
isValid?: boolean;
|
|
28
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Dialog component emits
|
|
113
|
+
*/
|
|
29
114
|
export interface Ui3nDialogComponentEmits<V, E extends string = never> {
|
|
115
|
+
/**
|
|
116
|
+
* Called when dialog action is performed
|
|
117
|
+
*/
|
|
30
118
|
(event: 'action', value: {
|
|
31
119
|
event: Ui3nDialogEvent<E>;
|
|
32
120
|
data?: V;
|
|
33
121
|
}): void;
|
|
34
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Dialog component slots
|
|
125
|
+
*/
|
|
35
126
|
export interface Ui3nDialogComponentSlots {
|
|
127
|
+
/**
|
|
128
|
+
* Header slot
|
|
129
|
+
*/
|
|
36
130
|
header?: () => VNode;
|
|
131
|
+
/**
|
|
132
|
+
* Body slot
|
|
133
|
+
*/
|
|
37
134
|
body: () => VNode;
|
|
135
|
+
/**
|
|
136
|
+
* Actions slot
|
|
137
|
+
*/
|
|
38
138
|
actions?: () => VNode;
|
|
139
|
+
/**
|
|
140
|
+
* Loading slot
|
|
141
|
+
*/
|
|
39
142
|
loading?: () => VNode;
|
|
40
143
|
}
|
|
@@ -1,14 +1,45 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Drop files component properties
|
|
4
|
+
*/
|
|
2
5
|
export interface Ui3nDropFilesProps {
|
|
6
|
+
/**
|
|
7
|
+
* Drop files title
|
|
8
|
+
*/
|
|
3
9
|
title?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Drop files text
|
|
12
|
+
*/
|
|
4
13
|
text?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Additional text
|
|
16
|
+
*/
|
|
5
17
|
additionalText?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether to permanently display the component
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
6
22
|
permanentDisplay?: boolean;
|
|
7
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Drop files component emits
|
|
26
|
+
*/
|
|
8
27
|
export interface Ui3nDropFilesEmits {
|
|
28
|
+
/**
|
|
29
|
+
* Called when files are selected
|
|
30
|
+
*/
|
|
9
31
|
(e: 'select', fileList: FileList): void;
|
|
10
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Drop files component slots
|
|
35
|
+
*/
|
|
11
36
|
export interface Ui3nDropFilesSlots {
|
|
37
|
+
/**
|
|
38
|
+
* Default slot
|
|
39
|
+
*/
|
|
12
40
|
default: () => VNode;
|
|
41
|
+
/**
|
|
42
|
+
* Additional text slot
|
|
43
|
+
*/
|
|
13
44
|
'additional-text': () => VNode;
|
|
14
45
|
}
|