sprintify-ui 0.5.12 → 0.6.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.
- package/dist/sprintify-ui.es.js +11590 -11401
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +9 -0
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +9 -0
- package/dist/types/src/components/BaseBelongsTo.vue.d.ts +9 -0
- package/dist/types/src/components/BaseBelongsToFetch.vue.d.ts +9 -0
- package/dist/types/src/components/BaseCharacterCounter.vue.d.ts +1 -1
- package/dist/types/src/components/BaseDropdown.vue.d.ts +12 -35
- package/dist/types/src/components/BaseDropdownAutocomplete.vue.d.ts +4 -14
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +9 -0
- package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +9 -0
- package/dist/types/src/components/BaseTooltip.vue.d.ts +28 -8
- package/dist/types/src/components/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/BaseAutocomplete.vue +27 -5
- package/src/components/BaseAutocompleteFetch.vue +5 -0
- package/src/components/BaseAvatar.vue +43 -40
- package/src/components/BaseBelongsTo.vue +5 -0
- package/src/components/BaseBelongsToFetch.vue +5 -0
- package/src/components/BaseDatePicker.vue +4 -4
- package/src/components/BaseDisplayRelativeTime.vue +21 -20
- package/src/components/BaseDropdown.stories.js +22 -65
- package/src/components/BaseDropdown.vue +37 -243
- package/src/components/BaseDropdownAutocomplete.vue +5 -30
- package/src/components/BaseInputLabel.vue +8 -14
- package/src/components/BaseTagAutocomplete.vue +19 -2
- package/src/components/BaseTagAutocompleteFetch.vue +5 -0
- package/src/components/BaseTooltip.stories.js +62 -0
- package/src/components/BaseTooltip.vue +33 -12
- package/src/components/index.ts +2 -2
- package/dist/types/src/components/BaseClickOutside.vue.d.ts +0 -28
- package/src/components/BaseClickOutside.vue +0 -37
|
@@ -75,6 +75,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
75
75
|
default: boolean;
|
|
76
76
|
type: BooleanConstructor;
|
|
77
77
|
};
|
|
78
|
+
focusOnMount: {
|
|
79
|
+
default: boolean;
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
};
|
|
78
82
|
/** Show an 'empty option', should use with showModelValue = true for better UX */
|
|
79
83
|
showEmptyOption: {
|
|
80
84
|
default: boolean;
|
|
@@ -171,6 +175,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
171
175
|
default: boolean;
|
|
172
176
|
type: BooleanConstructor;
|
|
173
177
|
};
|
|
178
|
+
focusOnMount: {
|
|
179
|
+
default: boolean;
|
|
180
|
+
type: BooleanConstructor;
|
|
181
|
+
};
|
|
174
182
|
/** Show an 'empty option', should use with showModelValue = true for better UX */
|
|
175
183
|
showEmptyOption: {
|
|
176
184
|
default: boolean;
|
|
@@ -208,6 +216,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
208
216
|
dropdownShow: "focus" | "always";
|
|
209
217
|
showModelValue: boolean;
|
|
210
218
|
visibleFocus: boolean;
|
|
219
|
+
focusOnMount: boolean;
|
|
211
220
|
showEmptyOption: boolean;
|
|
212
221
|
emptyOptionLabel: string;
|
|
213
222
|
}, {}>, {
|
|
@@ -61,6 +61,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
61
61
|
default: boolean;
|
|
62
62
|
type: BooleanConstructor;
|
|
63
63
|
};
|
|
64
|
+
focusOnMount: {
|
|
65
|
+
default: boolean;
|
|
66
|
+
type: BooleanConstructor;
|
|
67
|
+
};
|
|
64
68
|
showEmptyOption: {
|
|
65
69
|
default: boolean;
|
|
66
70
|
type: BooleanConstructor;
|
|
@@ -146,6 +150,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
146
150
|
default: boolean;
|
|
147
151
|
type: BooleanConstructor;
|
|
148
152
|
};
|
|
153
|
+
focusOnMount: {
|
|
154
|
+
default: boolean;
|
|
155
|
+
type: BooleanConstructor;
|
|
156
|
+
};
|
|
149
157
|
showEmptyOption: {
|
|
150
158
|
default: boolean;
|
|
151
159
|
type: BooleanConstructor;
|
|
@@ -177,6 +185,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
177
185
|
dropdownShow: "focus" | "always";
|
|
178
186
|
showModelValue: boolean;
|
|
179
187
|
visibleFocus: boolean;
|
|
188
|
+
focusOnMount: boolean;
|
|
180
189
|
showEmptyOption: boolean;
|
|
181
190
|
emptyOptionLabel: string;
|
|
182
191
|
queryKey: string;
|
|
@@ -57,6 +57,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
57
57
|
default: boolean;
|
|
58
58
|
type: BooleanConstructor;
|
|
59
59
|
};
|
|
60
|
+
focusOnMount: {
|
|
61
|
+
default: boolean;
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
};
|
|
60
64
|
showEmptyOption: {
|
|
61
65
|
default: boolean;
|
|
62
66
|
type: BooleanConstructor;
|
|
@@ -134,6 +138,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
134
138
|
default: boolean;
|
|
135
139
|
type: BooleanConstructor;
|
|
136
140
|
};
|
|
141
|
+
focusOnMount: {
|
|
142
|
+
default: boolean;
|
|
143
|
+
type: BooleanConstructor;
|
|
144
|
+
};
|
|
137
145
|
showEmptyOption: {
|
|
138
146
|
default: boolean;
|
|
139
147
|
type: BooleanConstructor;
|
|
@@ -161,6 +169,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
161
169
|
dropdownShow: "focus" | "always";
|
|
162
170
|
showModelValue: boolean;
|
|
163
171
|
visibleFocus: boolean;
|
|
172
|
+
focusOnMount: boolean;
|
|
164
173
|
showEmptyOption: boolean;
|
|
165
174
|
emptyOptionLabel: string;
|
|
166
175
|
primaryKey: string;
|
|
@@ -65,6 +65,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
65
65
|
default: boolean;
|
|
66
66
|
type: BooleanConstructor;
|
|
67
67
|
};
|
|
68
|
+
focusOnMount: {
|
|
69
|
+
default: boolean;
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
};
|
|
68
72
|
showEmptyOption: {
|
|
69
73
|
default: boolean;
|
|
70
74
|
type: BooleanConstructor;
|
|
@@ -150,6 +154,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
150
154
|
default: boolean;
|
|
151
155
|
type: BooleanConstructor;
|
|
152
156
|
};
|
|
157
|
+
focusOnMount: {
|
|
158
|
+
default: boolean;
|
|
159
|
+
type: BooleanConstructor;
|
|
160
|
+
};
|
|
153
161
|
showEmptyOption: {
|
|
154
162
|
default: boolean;
|
|
155
163
|
type: BooleanConstructor;
|
|
@@ -177,6 +185,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
177
185
|
dropdownShow: "focus" | "always";
|
|
178
186
|
showModelValue: boolean;
|
|
179
187
|
visibleFocus: boolean;
|
|
188
|
+
focusOnMount: boolean;
|
|
180
189
|
showEmptyOption: boolean;
|
|
181
190
|
emptyOptionLabel: string;
|
|
182
191
|
primaryKey: string;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/vue';
|
|
1
2
|
import { PropType } from 'vue';
|
|
2
|
-
declare function toggle(): void;
|
|
3
|
-
declare function open(): void;
|
|
4
|
-
declare function close(): void;
|
|
5
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
6
|
-
placement: {
|
|
7
|
-
type: PropType<"top-start" | "top-end" | "bottom-start" | "bottom-end">;
|
|
8
|
-
default(): string;
|
|
9
|
-
};
|
|
10
|
-
padding: {
|
|
11
|
-
default: number;
|
|
12
|
-
type: NumberConstructor;
|
|
13
|
-
};
|
|
14
4
|
animated: {
|
|
15
5
|
default: boolean;
|
|
16
6
|
type: BooleanConstructor;
|
|
@@ -19,22 +9,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
19
9
|
default: boolean;
|
|
20
10
|
type: BooleanConstructor;
|
|
21
11
|
};
|
|
22
|
-
}, {
|
|
23
|
-
open: typeof open;
|
|
24
|
-
close: typeof close;
|
|
25
|
-
toggle: typeof toggle;
|
|
26
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
27
|
-
close: (...args: any[]) => void;
|
|
28
|
-
open: (...args: any[]) => void;
|
|
29
|
-
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
12
|
placement: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
padding: {
|
|
35
|
-
default: number;
|
|
36
|
-
type: NumberConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
type: PropType<Placement>;
|
|
37
15
|
};
|
|
16
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
17
|
animated: {
|
|
39
18
|
default: boolean;
|
|
40
19
|
type: BooleanConstructor;
|
|
@@ -43,21 +22,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
43
22
|
default: boolean;
|
|
44
23
|
type: BooleanConstructor;
|
|
45
24
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
25
|
+
placement: {
|
|
26
|
+
default: string;
|
|
27
|
+
type: PropType<Placement>;
|
|
28
|
+
};
|
|
29
|
+
}>>, {
|
|
30
|
+
placement: Placement;
|
|
52
31
|
animated: boolean;
|
|
53
32
|
keepAlive: boolean;
|
|
54
33
|
}, {}>, {
|
|
55
34
|
button?(_: {}): any;
|
|
56
35
|
dropdown?(_: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
open: typeof open;
|
|
60
|
-
toggle: typeof toggle;
|
|
36
|
+
close: any;
|
|
37
|
+
opened: any;
|
|
61
38
|
}): any;
|
|
62
39
|
}>;
|
|
63
40
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { Option, SelectConfiguration } from '@/types';
|
|
3
|
+
import { Placement } from '@floating-ui/vue';
|
|
3
4
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
5
|
modelValue: {
|
|
5
6
|
type: PropType<Option | Option[] | null | undefined>;
|
|
@@ -38,19 +39,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
38
39
|
type: StringConstructor;
|
|
39
40
|
};
|
|
40
41
|
placement: {
|
|
41
|
-
type: PropType<
|
|
42
|
+
type: PropType<Placement>;
|
|
42
43
|
default: undefined;
|
|
43
44
|
};
|
|
44
|
-
padding: {
|
|
45
|
-
default: undefined;
|
|
46
|
-
type: NumberConstructor;
|
|
47
|
-
};
|
|
48
45
|
select: {
|
|
49
46
|
default: undefined;
|
|
50
47
|
type: PropType<SelectConfiguration | undefined>;
|
|
51
48
|
};
|
|
52
49
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
|
-
close: (...args: any[]) => void;
|
|
54
50
|
"update:model-value": (...args: any[]) => void;
|
|
55
51
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
56
52
|
modelValue: {
|
|
@@ -90,12 +86,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
90
86
|
type: StringConstructor;
|
|
91
87
|
};
|
|
92
88
|
placement: {
|
|
93
|
-
type: PropType<
|
|
94
|
-
default: undefined;
|
|
95
|
-
};
|
|
96
|
-
padding: {
|
|
89
|
+
type: PropType<Placement>;
|
|
97
90
|
default: undefined;
|
|
98
|
-
type: NumberConstructor;
|
|
99
91
|
};
|
|
100
92
|
select: {
|
|
101
93
|
default: undefined;
|
|
@@ -103,12 +95,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
103
95
|
};
|
|
104
96
|
}>> & {
|
|
105
97
|
"onUpdate:model-value"?: ((...args: any[]) => any) | undefined;
|
|
106
|
-
onClose?: ((...args: any[]) => any) | undefined;
|
|
107
98
|
}, {
|
|
108
99
|
required: boolean;
|
|
109
100
|
select: SelectConfiguration | undefined;
|
|
110
101
|
options: Option[] | undefined;
|
|
111
|
-
placement:
|
|
102
|
+
placement: Placement;
|
|
112
103
|
modelValue: Option | Option[] | null | undefined;
|
|
113
104
|
labelKey: string;
|
|
114
105
|
valueKey: string;
|
|
@@ -116,7 +107,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
116
107
|
multiple: boolean;
|
|
117
108
|
emptyOptionLabel: string;
|
|
118
109
|
url: string;
|
|
119
|
-
padding: number;
|
|
120
110
|
}, {}>, {
|
|
121
111
|
button?(_: {
|
|
122
112
|
newValue: any;
|
|
@@ -70,6 +70,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
70
70
|
default: string;
|
|
71
71
|
type: PropType<"focus" | "always">;
|
|
72
72
|
};
|
|
73
|
+
focusOnMount: {
|
|
74
|
+
default: boolean;
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
};
|
|
73
77
|
twContainer: {
|
|
74
78
|
default: string;
|
|
75
79
|
type: PropType<string | string[]>;
|
|
@@ -151,6 +155,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
151
155
|
default: string;
|
|
152
156
|
type: PropType<"focus" | "always">;
|
|
153
157
|
};
|
|
158
|
+
focusOnMount: {
|
|
159
|
+
default: boolean;
|
|
160
|
+
type: BooleanConstructor;
|
|
161
|
+
};
|
|
154
162
|
twContainer: {
|
|
155
163
|
default: string;
|
|
156
164
|
type: PropType<string | string[]>;
|
|
@@ -174,6 +182,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
174
182
|
loadingBottom: boolean;
|
|
175
183
|
size: "base" | "xs" | "sm";
|
|
176
184
|
dropdownShow: "focus" | "always";
|
|
185
|
+
focusOnMount: boolean;
|
|
177
186
|
twContainer: string | string[];
|
|
178
187
|
}, {}>, {
|
|
179
188
|
items?(_: {
|
|
@@ -41,6 +41,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
41
41
|
default: boolean;
|
|
42
42
|
type: BooleanConstructor;
|
|
43
43
|
};
|
|
44
|
+
focusOnMount: {
|
|
45
|
+
default: boolean;
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
};
|
|
44
48
|
}, {
|
|
45
49
|
focus: () => void | undefined;
|
|
46
50
|
blur: () => void | undefined;
|
|
@@ -93,6 +97,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
93
97
|
default: boolean;
|
|
94
98
|
type: BooleanConstructor;
|
|
95
99
|
};
|
|
100
|
+
focusOnMount: {
|
|
101
|
+
default: boolean;
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
};
|
|
96
104
|
}>> & {
|
|
97
105
|
onFocus?: ((...args: any[]) => any) | undefined;
|
|
98
106
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
@@ -104,6 +112,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
104
112
|
disabled: boolean;
|
|
105
113
|
hasError: boolean;
|
|
106
114
|
max: number;
|
|
115
|
+
focusOnMount: boolean;
|
|
107
116
|
queryKey: string;
|
|
108
117
|
}, {}>, {
|
|
109
118
|
items?(_: {
|
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
class: {
|
|
3
|
+
type: import("vue").PropType<string | string[] | null>;
|
|
4
|
+
default: null;
|
|
5
|
+
};
|
|
6
|
+
text: {
|
|
7
|
+
type: import("vue").PropType<string | null>;
|
|
8
|
+
default: null;
|
|
9
|
+
};
|
|
10
|
+
visible: {
|
|
11
|
+
type: import("vue").PropType<boolean>;
|
|
12
|
+
default: boolean;
|
|
6
13
|
};
|
|
7
14
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
15
|
+
class: {
|
|
16
|
+
type: import("vue").PropType<string | string[] | null>;
|
|
17
|
+
default: null;
|
|
18
|
+
};
|
|
19
|
+
text: {
|
|
20
|
+
type: import("vue").PropType<string | null>;
|
|
21
|
+
default: null;
|
|
22
|
+
};
|
|
23
|
+
visible: {
|
|
24
|
+
type: import("vue").PropType<boolean>;
|
|
25
|
+
default: boolean;
|
|
11
26
|
};
|
|
12
|
-
}>>, {
|
|
27
|
+
}>>, {
|
|
28
|
+
class: string | string[] | null;
|
|
29
|
+
text: string | null;
|
|
30
|
+
visible: boolean;
|
|
31
|
+
}, {}>, {
|
|
13
32
|
default?(_: {}): any;
|
|
33
|
+
tooltip?(_: {}): any;
|
|
14
34
|
}>;
|
|
15
35
|
export default _default;
|
|
16
36
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -18,7 +18,6 @@ import BaseButtonGroup from './BaseButtonGroup.vue';
|
|
|
18
18
|
import BaseCard from './BaseCard.vue';
|
|
19
19
|
import BaseCardRow from './BaseCardRow.vue';
|
|
20
20
|
import BaseCharacterCounter from './BaseCharacterCounter.vue';
|
|
21
|
-
import BaseClickOutside from './BaseClickOutside.vue';
|
|
22
21
|
import BaseClipboard from './BaseClipboard.vue';
|
|
23
22
|
import BaseCalendar from './BaseCalendar.vue';
|
|
24
23
|
import BaseColor from './BaseColor.vue';
|
|
@@ -90,9 +89,10 @@ import BaseTextarea from './BaseTextarea.vue';
|
|
|
90
89
|
import BaseTextareaAutoresize from './BaseTextareaAutoresize.vue';
|
|
91
90
|
import BaseTimeline from './BaseTimeline.vue';
|
|
92
91
|
import BaseTimelineItem from './BaseTimelineItem.vue';
|
|
92
|
+
import BaseTooltip from './BaseTooltip.vue';
|
|
93
93
|
import BaseUniqueCode from './BaseUniqueCode.vue';
|
|
94
94
|
import BaseLayoutStacked from './BaseLayoutStacked.vue';
|
|
95
95
|
import BaseLayoutStackedConfigurable from './BaseLayoutStackedConfigurable.vue';
|
|
96
96
|
import BaseLayoutSidebar from './BaseLayoutSidebar.vue';
|
|
97
97
|
import BaseLayoutSidebarConfigurable from './BaseLayoutSidebarConfigurable.vue';
|
|
98
|
-
export { BaseActionItem, BaseAddressForm, BaseAlert, BaseApp, BaseAppDialogs, BaseAppNotifications, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseAvatarGroup, BaseBadge, BaseBelongsTo, BaseBelongsToFetch, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, BaseCard, BaseCardRow, BaseCharacterCounter,
|
|
98
|
+
export { BaseActionItem, BaseAddressForm, BaseAlert, BaseApp, BaseAppDialogs, BaseAppNotifications, BaseAutocomplete, BaseAutocompleteFetch, BaseAvatar, BaseAvatarGroup, BaseBadge, BaseBelongsTo, BaseBelongsToFetch, BaseBoolean, BaseBreadcrumbs, BaseButton, BaseButtonGroup, BaseCard, BaseCardRow, BaseCharacterCounter, BaseClipboard, BaseCalendar, BaseColor, BaseContainer, BaseCounter, BaseCropper, BaseCropperModal, BaseDataIterator, BaseDataTable, BaseDatePicker, BaseDateSelect, BaseDescriptionList, BaseDescriptionListItem, BaseDialog, BaseDisplayRelativeTime, BaseDropdown, BaseDropdownAutocomplete, BaseEmptyState, BaseField, BaseFieldI18n, BaseFilePicker, BaseFilePickerCrop, BaseFileUploader, BaseForm, BaseGantt, BaseHasMany, BaseHeader, BaseIcon, BaseIconPicker, BaseInput, BaseInputLabel, BaseInputPercent, BaseLoadingCover, BaseMediaItem, BaseMediaLibrary, BaseMediaPreview, BaseMenu, BaseMenuItem, BaseModalCenter, BaseModalSide, BaseNavbar, BaseNavbarItem, BaseNavbarItemContent, BaseNavbarSideItem, BasePagination, BasePanel, BasePassword, BaseProgressCircle, BaseRadioGroup, BaseReadMore, BaseRichText, BaseSelect, BaseShortcut, BaseSideNavigation, BaseSideNavigationItem, BaseSkeleton, BaseStatistic, BaseStepper, BaseStepperItem, BaseSwitch, BaseSystemAlert, BaseTabs, BaseTabItem, BaseTagAutocomplete, BaseTagAutocompleteFetch, BaseTable, BaseTableColumn, BaseTextarea, BaseTextareaAutoresize, BaseTimeline, BaseTimelineItem, BaseTooltip, BaseUniqueCode, BaseLayoutStacked, BaseLayoutStackedConfigurable, BaseLayoutSidebar, BaseLayoutSidebarConfigurable, };
|
package/package.json
CHANGED
|
@@ -26,11 +26,10 @@
|
|
|
26
26
|
ref="inputElement"
|
|
27
27
|
:value="keywords"
|
|
28
28
|
type="text"
|
|
29
|
-
:placeholder="
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
class="relative w-full pr-9 disabled:cursor-not-allowed disabled:text-slate-300"
|
|
29
|
+
:placeholder="placeholder ? placeholder : t('sui.autocomplete_placeholder')"
|
|
30
|
+
class="relative w-full placeholder:text-slate-400 disabled:cursor-not-allowed disabled:text-slate-300"
|
|
33
31
|
:class="[
|
|
32
|
+
showDeleteButton ? 'pr-9' : '',
|
|
34
33
|
select ? '-left-px rounded-r' : 'rounded',
|
|
35
34
|
hasErrorInternal ? 'border-red-600' : 'border-slate-300',
|
|
36
35
|
inputSizeClass,
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
</div>
|
|
64
63
|
|
|
65
64
|
<div
|
|
66
|
-
v-if="
|
|
65
|
+
v-if="showDeleteButton"
|
|
67
66
|
class="absolute right-0 top-0 flex h-full items-center p-1"
|
|
68
67
|
>
|
|
69
68
|
<button
|
|
@@ -207,6 +206,10 @@ const props = defineProps({
|
|
|
207
206
|
default: true,
|
|
208
207
|
type: Boolean,
|
|
209
208
|
},
|
|
209
|
+
focusOnMount: {
|
|
210
|
+
default: false,
|
|
211
|
+
type: Boolean,
|
|
212
|
+
},
|
|
210
213
|
/** Show an 'empty option', should use with showModelValue = true for better UX */
|
|
211
214
|
showEmptyOption: {
|
|
212
215
|
default: false,
|
|
@@ -249,6 +252,20 @@ const hasOptions = useHasOptions(
|
|
|
249
252
|
computed(() => false)
|
|
250
253
|
);
|
|
251
254
|
|
|
255
|
+
let openOfFocusTimeout = 0;
|
|
256
|
+
|
|
257
|
+
onMounted(() => {
|
|
258
|
+
openOfFocusTimeout = setTimeout(() => {
|
|
259
|
+
if (props.focusOnMount) {
|
|
260
|
+
open();
|
|
261
|
+
}
|
|
262
|
+
}, 10)
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
onBeforeUnmount(() => {
|
|
266
|
+
clearTimeout(openOfFocusTimeout);
|
|
267
|
+
});
|
|
268
|
+
|
|
252
269
|
const drawer = ref<InstanceType<typeof BaseAutocompleteDrawer> | null>(null);
|
|
253
270
|
|
|
254
271
|
let timerId = 0;
|
|
@@ -321,6 +338,7 @@ useClickOutside(autocomplete, () => {
|
|
|
321
338
|
function open() {
|
|
322
339
|
clearInterval(timerId);
|
|
323
340
|
// Always focus as a safety
|
|
341
|
+
|
|
324
342
|
focus();
|
|
325
343
|
// Only emit open if value changes
|
|
326
344
|
if (!opened.value) {
|
|
@@ -513,6 +531,10 @@ const iconWrapClass = computed(() => {
|
|
|
513
531
|
return 'pl-2.5';
|
|
514
532
|
});
|
|
515
533
|
|
|
534
|
+
const showDeleteButton = computed(() => {
|
|
535
|
+
return normalizedModelValue.value && !props.disabled && props.showModelValue;
|
|
536
|
+
});
|
|
537
|
+
|
|
516
538
|
defineExpose({
|
|
517
539
|
focus,
|
|
518
540
|
blur,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:dropdown-show="dropdownShow"
|
|
18
18
|
:show-model-value="showModelValue"
|
|
19
19
|
:visible-focus="visibleFocus"
|
|
20
|
+
:focus-on-mount="focusOnMount"
|
|
20
21
|
:show-empty-option="showEmptyOption"
|
|
21
22
|
:empty-option-label="emptyOptionLabel"
|
|
22
23
|
:select="select"
|
|
@@ -144,6 +145,10 @@ const props = defineProps({
|
|
|
144
145
|
default: true,
|
|
145
146
|
type: Boolean,
|
|
146
147
|
},
|
|
148
|
+
focusOnMount: {
|
|
149
|
+
default: false,
|
|
150
|
+
type: Boolean,
|
|
151
|
+
},
|
|
147
152
|
showEmptyOption: {
|
|
148
153
|
default: false,
|
|
149
154
|
type: Boolean,
|
|
@@ -1,49 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
:to="to"
|
|
2
|
+
<BaseTooltip
|
|
3
|
+
:visible="tooltip"
|
|
4
|
+
:text="tooltipText"
|
|
6
5
|
:class="classInternal"
|
|
7
6
|
>
|
|
8
|
-
<
|
|
9
|
-
:
|
|
10
|
-
:
|
|
11
|
-
class="
|
|
7
|
+
<component
|
|
8
|
+
:is="to ? 'RouterLink' : 'div'"
|
|
9
|
+
:to="to"
|
|
10
|
+
class="flex items-center"
|
|
12
11
|
>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<BaseTooltip
|
|
34
|
-
v-if="tooltip"
|
|
35
|
-
:target="buttonRef"
|
|
36
|
-
>
|
|
37
|
-
<div>
|
|
38
|
-
<p class="text-xs font-medium leading-tight">
|
|
12
|
+
<img
|
|
13
|
+
:src="user.avatar_url"
|
|
14
|
+
:class="[sizeClass, detailsPosition == 'left' ? 'order-2' : 'order-1']"
|
|
15
|
+
class="shrink-0 block overflow-hidden rounded-full object-cover object-center"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
v-if="showDetails"
|
|
19
|
+
class="max-w-[120px] grow leading-tight"
|
|
20
|
+
:class="[
|
|
21
|
+
textSizeClass,
|
|
22
|
+
detailsPosition == 'left' ? 'order-1 text-right' : 'order-2 text-left',
|
|
23
|
+
]"
|
|
24
|
+
:style="{
|
|
25
|
+
marginLeft: detailsPosition == 'right' ? spacing : '0',
|
|
26
|
+
marginRight: detailsPosition == 'left' ? spacing : '0',
|
|
27
|
+
}"
|
|
28
|
+
>
|
|
29
|
+
<div class="truncate">
|
|
39
30
|
{{ user.full_name }}
|
|
40
|
-
</
|
|
41
|
-
<
|
|
31
|
+
</div>
|
|
32
|
+
<div class="truncate font-light opacity-50">
|
|
42
33
|
{{ user.email }}
|
|
43
|
-
</
|
|
34
|
+
</div>
|
|
44
35
|
</div>
|
|
45
|
-
</
|
|
46
|
-
</
|
|
36
|
+
</component>
|
|
37
|
+
</BaseTooltip>
|
|
47
38
|
</template>
|
|
48
39
|
|
|
49
40
|
<script lang="ts" setup>
|
|
@@ -97,7 +88,19 @@ const classInternal = computed(() => {
|
|
|
97
88
|
);
|
|
98
89
|
})
|
|
99
90
|
|
|
100
|
-
const
|
|
91
|
+
const tooltipText = computed(() => {
|
|
92
|
+
|
|
93
|
+
if (!props.tooltip) {
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return `<p class="font-medium leading-tight">
|
|
98
|
+
${props.user.full_name}
|
|
99
|
+
</p>
|
|
100
|
+
<p class="text-slate-500 leading-tight">
|
|
101
|
+
${props.user.email}
|
|
102
|
+
</p>`;
|
|
103
|
+
})
|
|
101
104
|
|
|
102
105
|
const sizeClass = computed((): string => {
|
|
103
106
|
const base = 'h-9 w-9';
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:show-empty-option="showEmptyOption"
|
|
18
18
|
:empty-option-label="emptyOptionLabel"
|
|
19
19
|
:visible-focus="visibleFocus"
|
|
20
|
+
:focus-on-mount="focusOnMount"
|
|
20
21
|
:select="select"
|
|
21
22
|
@update:model-value="onUpdate"
|
|
22
23
|
>
|
|
@@ -105,6 +106,10 @@ const props = defineProps({
|
|
|
105
106
|
default: true,
|
|
106
107
|
type: Boolean,
|
|
107
108
|
},
|
|
109
|
+
focusOnMount: {
|
|
110
|
+
default: false,
|
|
111
|
+
type: Boolean,
|
|
112
|
+
},
|
|
108
113
|
showEmptyOption: {
|
|
109
114
|
default: false,
|
|
110
115
|
type: Boolean,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:show-empty-option="showEmptyOption"
|
|
18
18
|
:empty-option-label="emptyOptionLabel"
|
|
19
19
|
:visible-focus="visibleFocus"
|
|
20
|
+
:focus-on-mount="focusOnMount"
|
|
20
21
|
:select="select"
|
|
21
22
|
@update:model-value="onUpdate"
|
|
22
23
|
>
|
|
@@ -115,6 +116,10 @@ const props = defineProps({
|
|
|
115
116
|
default: true,
|
|
116
117
|
type: Boolean,
|
|
117
118
|
},
|
|
119
|
+
focusOnMount: {
|
|
120
|
+
default: false,
|
|
121
|
+
type: Boolean,
|
|
122
|
+
},
|
|
118
123
|
showEmptyOption: {
|
|
119
124
|
default: false,
|
|
120
125
|
type: Boolean,
|
|
@@ -232,10 +232,10 @@ onMounted(() => {
|
|
|
232
232
|
init();
|
|
233
233
|
});
|
|
234
234
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
235
|
+
onUnmounted(() => {
|
|
236
|
+
// Cause weird animation problems when using with BaseDropdown
|
|
237
|
+
// We assume the calendar will self destroy when the component is unmounted
|
|
238
|
+
// picker?.destroy();
|
|
239
239
|
});
|
|
240
240
|
|
|
241
241
|
function init() {
|