@v1nt1248/3nclient-lib 0.3.9 → 0.3.12
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
|
@@ -3,7 +3,7 @@ import debounce from 'lodash/debounce';
|
|
|
3
3
|
import sanitizeHtml from 'sanitize-html';
|
|
4
4
|
import { selectAll } from '@/utils';
|
|
5
5
|
import type { Nullable } from '@/types';
|
|
6
|
-
import type { Ui3nContentEditableEmits, Ui3nContentEditableProps } from '
|
|
6
|
+
import type { Ui3nContentEditableEmits, Ui3nContentEditableProps } from './types';
|
|
7
7
|
|
|
8
8
|
export function useContentEditable(props: Ui3nContentEditableProps, emits: Ui3nContentEditableEmits) {
|
|
9
9
|
const el = ref<Nullable<HTMLElement>>(null);
|
|
@@ -130,7 +130,9 @@ export function useContentEditable(props: Ui3nContentEditableProps, emits: Ui3nC
|
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
onMounted(() => {
|
|
133
|
-
|
|
133
|
+
if (el.value) {
|
|
134
|
+
emits('init', el.value);
|
|
135
|
+
}
|
|
134
136
|
});
|
|
135
137
|
|
|
136
138
|
watch(
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
export interface Ui3nEmojiProps {
|
|
2
|
+
/**
|
|
3
|
+
* Emoji to display
|
|
4
|
+
*/
|
|
2
5
|
emoji: string;
|
|
6
|
+
/**
|
|
7
|
+
* Emoji size
|
|
8
|
+
*/
|
|
3
9
|
size?: string | number;
|
|
10
|
+
/**
|
|
11
|
+
* Whether emoji is readonly
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
4
14
|
readonly?: boolean;
|
|
5
15
|
}
|
|
6
16
|
|
|
7
17
|
export interface Ui3nEmojiEmits {
|
|
18
|
+
/**
|
|
19
|
+
* Called when emoji is clicked
|
|
20
|
+
*/
|
|
8
21
|
(ev: 'click', value: Event): void;
|
|
9
22
|
}
|
|
@@ -1,15 +1,25 @@
|
|
|
1
1
|
export interface Ui3nIconProps {
|
|
2
|
+
/** Icon name */
|
|
2
3
|
icon: string;
|
|
4
|
+
/** Icon title */
|
|
3
5
|
title?: string;
|
|
6
|
+
/** Icon size */
|
|
4
7
|
size?: string | number;
|
|
8
|
+
/** Icon width */
|
|
5
9
|
width?: string | number;
|
|
10
|
+
/** Icon height */
|
|
6
11
|
height?: string | number;
|
|
12
|
+
/** Icon color */
|
|
7
13
|
color?: string;
|
|
14
|
+
/** Flip icon horizontally */
|
|
8
15
|
horizontalFlip?: boolean;
|
|
16
|
+
/** Flip icon vertically */
|
|
9
17
|
verticalFlip?: boolean;
|
|
18
|
+
/** Icon rotation in degrees */
|
|
10
19
|
rotate?: number;
|
|
11
20
|
}
|
|
12
21
|
|
|
13
22
|
export interface Ui3nIconEmits {
|
|
23
|
+
/** Called when the icon is clicked */
|
|
14
24
|
(ev: 'click', value: Event): void;
|
|
15
25
|
}
|
|
@@ -1,29 +1,105 @@
|
|
|
1
1
|
export interface Ui3nInputProps {
|
|
2
|
+
/**
|
|
3
|
+
* Input value
|
|
4
|
+
*/
|
|
2
5
|
modelValue: string;
|
|
6
|
+
/**
|
|
7
|
+
* Input label
|
|
8
|
+
*/
|
|
3
9
|
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Input type
|
|
12
|
+
* @default 'text'
|
|
13
|
+
*/
|
|
4
14
|
type?: 'text' | 'password';
|
|
15
|
+
/**
|
|
16
|
+
* Input placeholder
|
|
17
|
+
*/
|
|
5
18
|
placeholder?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Whether input is clearable
|
|
21
|
+
* @default false
|
|
22
|
+
*/
|
|
6
23
|
clearable?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether input is autofocus
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
7
28
|
autofocus?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Input icon
|
|
31
|
+
*/
|
|
8
32
|
icon?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Input icon color
|
|
35
|
+
*/
|
|
9
36
|
iconColor?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Validation rules
|
|
39
|
+
*/
|
|
10
40
|
rules?: Array<(v: unknown) => boolean | string>;
|
|
41
|
+
/**
|
|
42
|
+
* Whether to validate at startup
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
11
45
|
validateAtStartup?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to hide bottom space
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
12
50
|
hideBottomSpace?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Display state mode
|
|
53
|
+
*/
|
|
13
54
|
displayStateMode?: 'error' | 'success';
|
|
55
|
+
/**
|
|
56
|
+
* Whether to display state with icon
|
|
57
|
+
* @default false
|
|
58
|
+
*/
|
|
14
59
|
displayStateWithIcon?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Display state message
|
|
62
|
+
*/
|
|
15
63
|
displayStateMessage?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Whether input is disabled
|
|
66
|
+
* @default false
|
|
67
|
+
*/
|
|
16
68
|
disabled?: boolean;
|
|
17
69
|
}
|
|
18
70
|
|
|
19
71
|
export interface Ui3nInputEmits {
|
|
72
|
+
/**
|
|
73
|
+
* Called when input is initialized
|
|
74
|
+
*/
|
|
20
75
|
(event: 'init', value: HTMLInputElement): void;
|
|
76
|
+
/**
|
|
77
|
+
* Called when input value changes
|
|
78
|
+
*/
|
|
21
79
|
(event: 'input', value: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* Called when key is pressed
|
|
82
|
+
*/
|
|
22
83
|
(event: 'keydown', value: KeyboardEvent): void;
|
|
84
|
+
/**
|
|
85
|
+
* Called when input is focused
|
|
86
|
+
*/
|
|
23
87
|
(event: 'focus', value: Event): void;
|
|
88
|
+
/**
|
|
89
|
+
* Called when input loses focus
|
|
90
|
+
*/
|
|
24
91
|
(event: 'blur', value: Event): void;
|
|
92
|
+
/**
|
|
93
|
+
* Called when input is cleared
|
|
94
|
+
*/
|
|
25
95
|
(event: 'clear'): void;
|
|
96
|
+
/**
|
|
97
|
+
* Called when input value changes
|
|
98
|
+
*/
|
|
26
99
|
(event: 'change', value: string): void;
|
|
100
|
+
/**
|
|
101
|
+
* Called when Enter key is pressed
|
|
102
|
+
*/
|
|
27
103
|
(
|
|
28
104
|
event: 'enter',
|
|
29
105
|
value: {
|
|
@@ -34,7 +110,16 @@ export interface Ui3nInputEmits {
|
|
|
34
110
|
metaKey: boolean;
|
|
35
111
|
},
|
|
36
112
|
): void;
|
|
113
|
+
/**
|
|
114
|
+
* Called when Escape key is pressed
|
|
115
|
+
*/
|
|
37
116
|
(event: 'escape', value: Event): void;
|
|
117
|
+
/**
|
|
118
|
+
* Called when model value updates
|
|
119
|
+
*/
|
|
38
120
|
(event: 'update:modelValue', value: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* Called when validation status updates
|
|
123
|
+
*/
|
|
39
124
|
(event: 'update:valid', value: boolean): void;
|
|
40
125
|
}
|
|
@@ -1,14 +1,43 @@
|
|
|
1
1
|
export interface Ui3nInputFileProps {
|
|
2
|
+
/**
|
|
3
|
+
* Selected files
|
|
4
|
+
*/
|
|
2
5
|
modelValue?: File[] | FileList;
|
|
6
|
+
/**
|
|
7
|
+
* Button text
|
|
8
|
+
*/
|
|
3
9
|
buttonText?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether multiple files can be selected
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
4
14
|
multiple?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum number of files
|
|
17
|
+
*/
|
|
5
18
|
maxNumberOfFiles?: number | string;
|
|
19
|
+
/**
|
|
20
|
+
* Maximum file size in bytes
|
|
21
|
+
*/
|
|
6
22
|
maxFileSize?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Allowed file types
|
|
25
|
+
*/
|
|
7
26
|
allowedFileTypes?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Whether input is disabled
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
8
31
|
disabled?: boolean;
|
|
9
32
|
}
|
|
10
33
|
|
|
11
34
|
export interface Ui3nInputFileEmits {
|
|
35
|
+
/**
|
|
36
|
+
* Called when model value updates
|
|
37
|
+
*/
|
|
12
38
|
(event: 'update:modelValue', value: File[] | FileList): void;
|
|
39
|
+
/**
|
|
40
|
+
* Called when error occurs
|
|
41
|
+
*/
|
|
13
42
|
(event: 'error', value: string): void;
|
|
14
43
|
}
|
|
@@ -1,18 +1,53 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* List component properties
|
|
5
|
+
*/
|
|
3
6
|
export interface Ui3nListProps<T> {
|
|
7
|
+
/**
|
|
8
|
+
* List title
|
|
9
|
+
*/
|
|
4
10
|
title?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to stick to top
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
5
15
|
sticky?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* List items
|
|
18
|
+
*/
|
|
6
19
|
items: T[];
|
|
20
|
+
/**
|
|
21
|
+
* Key field for items
|
|
22
|
+
*/
|
|
7
23
|
keyField?: keyof T;
|
|
24
|
+
/**
|
|
25
|
+
* Whether list is disabled
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
8
28
|
disabled?: boolean;
|
|
9
29
|
}
|
|
10
30
|
|
|
31
|
+
/**
|
|
32
|
+
* List component emits
|
|
33
|
+
*/
|
|
11
34
|
export interface Ui3nListEmits<T> {
|
|
35
|
+
/**
|
|
36
|
+
* Emitted when item is selected
|
|
37
|
+
*/
|
|
12
38
|
(ev: 'select', value: { value: T; index: number }): void;
|
|
13
39
|
}
|
|
14
40
|
|
|
41
|
+
/**
|
|
42
|
+
* List component slots
|
|
43
|
+
*/
|
|
15
44
|
export interface Ui3nListSlots<T> {
|
|
45
|
+
/**
|
|
46
|
+
* Title slot
|
|
47
|
+
*/
|
|
16
48
|
title?: () => VNode;
|
|
49
|
+
/**
|
|
50
|
+
* Item slot
|
|
51
|
+
*/
|
|
17
52
|
item?: ({ item, index }: { item: T; index: number }) => VNode;
|
|
18
53
|
}
|
|
@@ -1,36 +1,125 @@
|
|
|
1
1
|
import type { Ref, VNode } from 'vue';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Menu component properties
|
|
5
|
+
*/
|
|
3
6
|
export interface Ui3nMenuProps {
|
|
7
|
+
/**
|
|
8
|
+
* Menu open state
|
|
9
|
+
*/
|
|
4
10
|
modelValue?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Trigger element
|
|
13
|
+
*/
|
|
5
14
|
triggerElement?: HTMLElement;
|
|
15
|
+
/**
|
|
16
|
+
* Position strategy
|
|
17
|
+
* @default 'absolute'
|
|
18
|
+
*/
|
|
6
19
|
positionStrategy?: 'absolute' | 'fixed';
|
|
20
|
+
/**
|
|
21
|
+
* Whether to update position automatically
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
7
24
|
positionAutoupdate?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether to allow flipping
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
8
29
|
allowFlip?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Offset X
|
|
32
|
+
* @default 0
|
|
33
|
+
*/
|
|
9
34
|
offsetX?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Offset Y
|
|
37
|
+
* @default 0
|
|
38
|
+
*/
|
|
10
39
|
offsetY?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Content border radius
|
|
42
|
+
*/
|
|
11
43
|
contentBorderRadius?: number | number[];
|
|
44
|
+
/**
|
|
45
|
+
* Content styles
|
|
46
|
+
*/
|
|
12
47
|
contentStyles?: Record<string, string>;
|
|
48
|
+
/**
|
|
49
|
+
* Z-index
|
|
50
|
+
*/
|
|
13
51
|
zIndex?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Whether to close on click
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
14
56
|
closeOnClick?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to close on click outside
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
15
61
|
closeOnClickOutside?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Whether menu is disabled
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
16
66
|
disabled?: boolean;
|
|
17
67
|
}
|
|
18
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Menu component emits
|
|
71
|
+
*/
|
|
19
72
|
export interface Ui3nMenuEmits {
|
|
73
|
+
/**
|
|
74
|
+
* Emitted when menu opens
|
|
75
|
+
*/
|
|
20
76
|
(ev: 'open'): void;
|
|
77
|
+
/**
|
|
78
|
+
* Emitted when menu is opened
|
|
79
|
+
*/
|
|
21
80
|
(ev: 'opened'): void;
|
|
81
|
+
/**
|
|
82
|
+
* Emitted when menu closes
|
|
83
|
+
*/
|
|
22
84
|
(ev: 'close'): void;
|
|
85
|
+
/**
|
|
86
|
+
* Emitted when menu is closed
|
|
87
|
+
*/
|
|
23
88
|
(ev: 'closed'): void;
|
|
89
|
+
/**
|
|
90
|
+
* Emitted when click outside
|
|
91
|
+
*/
|
|
24
92
|
(ev: 'click-outside'): void;
|
|
93
|
+
/**
|
|
94
|
+
* Emitted when model value updates
|
|
95
|
+
*/
|
|
25
96
|
(ev: 'update:modelValue', value: boolean): void;
|
|
26
97
|
}
|
|
27
98
|
|
|
99
|
+
/**
|
|
100
|
+
* Menu component slots
|
|
101
|
+
*/
|
|
28
102
|
export interface Ui3nMenuSlots {
|
|
103
|
+
/**
|
|
104
|
+
* Default slot
|
|
105
|
+
*/
|
|
29
106
|
default: () => VNode;
|
|
107
|
+
/**
|
|
108
|
+
* Menu slot
|
|
109
|
+
*/
|
|
30
110
|
menu?: () => VNode;
|
|
31
111
|
}
|
|
32
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Menu component expose
|
|
115
|
+
*/
|
|
33
116
|
export interface Ui3nMenuExpose {
|
|
117
|
+
/**
|
|
118
|
+
* Whether menu is positioned
|
|
119
|
+
*/
|
|
34
120
|
isPositioned: Readonly<Ref<boolean>>;
|
|
121
|
+
/**
|
|
122
|
+
* Update position
|
|
123
|
+
*/
|
|
35
124
|
update: () => void;
|
|
36
125
|
}
|
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
export interface Ui3nNotificationProps {
|
|
2
|
+
/**
|
|
3
|
+
* Notification ID
|
|
4
|
+
*/
|
|
2
5
|
id?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Notification type
|
|
8
|
+
*/
|
|
3
9
|
type?: 'success' | 'warning' | 'info' | 'error';
|
|
10
|
+
/**
|
|
11
|
+
* Notification content
|
|
12
|
+
*/
|
|
4
13
|
content: string;
|
|
14
|
+
/**
|
|
15
|
+
* Notification position
|
|
16
|
+
*/
|
|
5
17
|
position?: 'left' | 'center' | 'right';
|
|
18
|
+
/**
|
|
19
|
+
* Notification duration in milliseconds
|
|
20
|
+
*/
|
|
6
21
|
duration?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to display icon
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
7
26
|
withIcon?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Teleport target
|
|
29
|
+
*/
|
|
8
30
|
teleport?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Called when notification opens
|
|
33
|
+
*/
|
|
9
34
|
onOpen?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Called when notification closes
|
|
37
|
+
*/
|
|
10
38
|
onClose?: () => void;
|
|
11
39
|
}
|
|
@@ -1,18 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Circular progress component properties
|
|
3
|
+
*/
|
|
1
4
|
export interface Ui3nProgressCircularProps {
|
|
5
|
+
/**
|
|
6
|
+
* Progress value
|
|
7
|
+
*/
|
|
2
8
|
value?: number | string;
|
|
9
|
+
/**
|
|
10
|
+
* Progress size
|
|
11
|
+
*/
|
|
3
12
|
size?: number | string;
|
|
13
|
+
/**
|
|
14
|
+
* Progress width
|
|
15
|
+
*/
|
|
4
16
|
width?: number | string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to show text
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
5
21
|
withText?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Background color
|
|
24
|
+
*/
|
|
6
25
|
bgColor?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Progress color
|
|
28
|
+
*/
|
|
7
29
|
color?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Whether progress is indeterminate
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
8
34
|
indeterminate?: boolean;
|
|
9
35
|
}
|
|
10
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Linear progress component properties
|
|
39
|
+
*/
|
|
11
40
|
export interface Ui3nProgressLinearProps {
|
|
41
|
+
/**
|
|
42
|
+
* Progress value
|
|
43
|
+
*/
|
|
12
44
|
value?: number | string;
|
|
45
|
+
/**
|
|
46
|
+
* Progress height
|
|
47
|
+
*/
|
|
13
48
|
height?: number | string;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to show text
|
|
51
|
+
* @default false
|
|
52
|
+
*/
|
|
14
53
|
withText?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Background color
|
|
56
|
+
*/
|
|
15
57
|
bgColor?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Progress color
|
|
60
|
+
*/
|
|
16
61
|
color?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Whether progress is indeterminate
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
17
66
|
indeterminate?: boolean;
|
|
18
67
|
}
|
|
@@ -1,39 +1,117 @@
|
|
|
1
1
|
import { VNode } from 'vue';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Radio value type
|
|
5
|
+
*/
|
|
3
6
|
export type Ui3nRadioValue = boolean | string | number;
|
|
4
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Radio component properties
|
|
10
|
+
*/
|
|
5
11
|
export interface Ui3nRadioProps {
|
|
12
|
+
/**
|
|
13
|
+
* Current radio value
|
|
14
|
+
*/
|
|
6
15
|
modelValue?: Ui3nRadioValue;
|
|
16
|
+
/**
|
|
17
|
+
* Value when radio is checked
|
|
18
|
+
*/
|
|
7
19
|
checkedValue?: Ui3nRadioValue;
|
|
20
|
+
/**
|
|
21
|
+
* Value when radio is unchecked
|
|
22
|
+
*/
|
|
8
23
|
uncheckedValue?: Ui3nRadioValue;
|
|
24
|
+
/**
|
|
25
|
+
* Radio size
|
|
26
|
+
*/
|
|
9
27
|
size?: number | string;
|
|
28
|
+
/**
|
|
29
|
+
* Radio color
|
|
30
|
+
*/
|
|
10
31
|
color?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Whether radio is disabled
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
11
36
|
disabled?: boolean;
|
|
12
37
|
}
|
|
13
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Radio component emits
|
|
41
|
+
*/
|
|
14
42
|
export interface Ui3nRadioEmits {
|
|
43
|
+
/**
|
|
44
|
+
* Emitted when radio value changes
|
|
45
|
+
*/
|
|
15
46
|
(ev: 'change', value: Ui3nRadioValue): void;
|
|
47
|
+
/**
|
|
48
|
+
* Emitted when model value updates
|
|
49
|
+
*/
|
|
16
50
|
(ev: 'update:modelValue', value: Ui3nRadioValue): void;
|
|
17
51
|
}
|
|
18
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Radio component slots
|
|
55
|
+
*/
|
|
19
56
|
export interface Ui3nRadioSlots {
|
|
57
|
+
/**
|
|
58
|
+
* Checked icon slot
|
|
59
|
+
*/
|
|
20
60
|
checkedIcon: () => VNode;
|
|
61
|
+
/**
|
|
62
|
+
* Unchecked icon slot
|
|
63
|
+
*/
|
|
21
64
|
uncheckedIcon: () => VNode;
|
|
65
|
+
/**
|
|
66
|
+
* Default slot
|
|
67
|
+
*/
|
|
22
68
|
default: () => VNode;
|
|
23
69
|
}
|
|
24
70
|
|
|
71
|
+
/**
|
|
72
|
+
* Radio group component properties
|
|
73
|
+
*/
|
|
25
74
|
export interface Ui3nRadioGroupProps {
|
|
75
|
+
/**
|
|
76
|
+
* Radio group name
|
|
77
|
+
*/
|
|
26
78
|
name: string;
|
|
79
|
+
/**
|
|
80
|
+
* Current radio group value
|
|
81
|
+
*/
|
|
27
82
|
modelValue: Ui3nRadioValue;
|
|
83
|
+
/**
|
|
84
|
+
* Radio group direction
|
|
85
|
+
* @default 'vertical'
|
|
86
|
+
*/
|
|
28
87
|
direction?: 'horizontal' | 'vertical';
|
|
88
|
+
/**
|
|
89
|
+
* Whether radio group is disabled
|
|
90
|
+
* @default false
|
|
91
|
+
*/
|
|
29
92
|
disabled?: boolean;
|
|
30
93
|
}
|
|
31
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Radio group component emits
|
|
97
|
+
*/
|
|
32
98
|
export interface Ui3nRadioGroupEmits {
|
|
99
|
+
/**
|
|
100
|
+
* Emitted when radio group value changes
|
|
101
|
+
*/
|
|
33
102
|
(ev: 'change', value: Ui3nRadioValue): void;
|
|
103
|
+
/**
|
|
104
|
+
* Emitted when model value updates
|
|
105
|
+
*/
|
|
34
106
|
(ev: 'update:modelValue', value: Ui3nRadioValue): void;
|
|
35
107
|
}
|
|
36
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Radio group component slots
|
|
111
|
+
*/
|
|
37
112
|
export interface Ui3nRadioGroupSlots {
|
|
113
|
+
/**
|
|
114
|
+
* Default slot
|
|
115
|
+
*/
|
|
38
116
|
default: () => VNode;
|
|
39
117
|
}
|