@quidgest/ui 0.13.2 → 0.14.0
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/manifest/components.json +4 -0
- package/dist/ui.css +77 -0
- package/dist/ui.esm.js +1134 -912
- package/dist/ui.js +6 -6
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +96 -87
- package/dist/ui.scss +86 -4
- package/esm/components/QBadge/QBadge.d.ts +10 -35
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +19 -22
- package/esm/components/QBadge/index.d.ts +3 -139
- package/esm/components/QBadge/index.d.ts.map +1 -1
- package/esm/components/QBadge/types.d.ts +30 -0
- package/esm/components/QBadge/types.d.ts.map +1 -0
- package/esm/components/QBadge/types.js +8 -0
- package/esm/components/QButton/QButton.d.ts +8 -50
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/index.d.ts +3 -197
- package/esm/components/QButton/index.d.ts.map +1 -1
- package/esm/components/QButton/types.d.ts +47 -0
- package/esm/components/QButton/types.d.ts.map +1 -0
- package/esm/components/QButtonGroup/QButtonGroup.d.ts +7 -21
- package/esm/components/QButtonGroup/QButtonGroup.d.ts.map +1 -1
- package/esm/components/QButtonGroup/index.d.ts +3 -79
- package/esm/components/QButtonGroup/index.d.ts.map +1 -1
- package/esm/components/QButtonGroup/types.d.ts +19 -0
- package/esm/components/QButtonGroup/types.d.ts.map +1 -0
- package/esm/components/QButtonToggle/QButtonToggle.d.ts +6 -33
- package/esm/components/QButtonToggle/QButtonToggle.d.ts.map +1 -1
- package/esm/components/QButtonToggle/index.d.ts +3 -115
- package/esm/components/QButtonToggle/index.d.ts.map +1 -1
- package/esm/components/QButtonToggle/types.d.ts +32 -0
- package/esm/components/QButtonToggle/types.d.ts.map +1 -0
- package/esm/components/QCombobox/QCombobox.d.ts +266 -144
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +52 -62
- package/esm/components/QCombobox/index.d.ts +3 -1075
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QCombobox/types.d.ts +92 -0
- package/esm/components/QCombobox/types.d.ts.map +1 -0
- package/esm/components/QCombobox/types.js +14 -0
- package/esm/components/QDialog/QDialog.d.ts +18 -93
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +45 -61
- package/esm/components/QDialog/index.d.ts +3 -267
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +82 -0
- package/esm/components/QDialog/types.d.ts.map +1 -0
- package/esm/components/QDialog/types.js +23 -0
- package/esm/components/QField/QField.d.ts +15 -47
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/index.d.ts +3 -168
- package/esm/components/QField/index.d.ts.map +1 -1
- package/esm/components/QField/types.d.ts +37 -0
- package/esm/components/QField/types.d.ts.map +1 -0
- package/esm/components/QIcon/InlineSvg.d.ts.map +1 -1
- package/esm/components/QIcon/InlineSvg.js +6 -13
- package/esm/components/QIcon/QIcon.d.ts +3 -19
- package/esm/components/QIcon/QIcon.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.vue.js +2 -2
- package/esm/components/QIcon/QIconFont.d.ts +2 -22
- package/esm/components/QIcon/QIconFont.d.ts.map +1 -1
- package/esm/components/QIcon/QIconFont.vue.js +9 -9
- package/esm/components/QIcon/QIconImg.d.ts +3 -27
- package/esm/components/QIcon/QIconImg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconImg.vue.js +3 -3
- package/esm/components/QIcon/QIconSvg.d.ts +4 -36
- package/esm/components/QIcon/QIconSvg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconSvg.vue.js +9 -9
- package/esm/components/QIcon/index.d.ts +9 -156
- package/esm/components/QIcon/index.d.ts.map +1 -1
- package/esm/components/QIcon/types.d.ts +40 -0
- package/esm/components/QIcon/types.d.ts.map +1 -0
- package/esm/components/QInputGroup/QInputGroup.d.ts +12 -42
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/index.d.ts +3 -153
- package/esm/components/QInputGroup/index.d.ts.map +1 -1
- package/esm/components/QInputGroup/types.d.ts +35 -0
- package/esm/components/QInputGroup/types.d.ts.map +1 -0
- package/esm/components/QLineLoader/QLineLoader.d.ts +2 -6
- package/esm/components/QLineLoader/QLineLoader.d.ts.map +1 -1
- package/esm/components/QLineLoader/index.d.ts +3 -13
- package/esm/components/QLineLoader/index.d.ts.map +1 -1
- package/esm/components/QLineLoader/types.d.ts +7 -0
- package/esm/components/QLineLoader/types.d.ts.map +1 -0
- package/esm/components/QList/QList.d.ts +11 -52
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QListItem.d.ts +10 -53
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +22 -28
- package/esm/components/QList/QListItemGroup.d.ts +7 -13
- package/esm/components/QList/QListItemGroup.d.ts.map +1 -1
- package/esm/components/QList/index.d.ts +7 -452
- package/esm/components/QList/index.d.ts.map +1 -1
- package/esm/components/QList/types.d.ts +102 -0
- package/esm/components/QList/types.d.ts.map +1 -0
- package/esm/components/QList/types.js +11 -0
- package/esm/components/QOverlay/QOverlay.d.ts +33 -118
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +1 -2
- package/esm/components/QOverlay/index.d.ts +3 -339
- package/esm/components/QOverlay/index.d.ts.map +1 -1
- package/esm/components/QOverlay/types.d.ts +88 -0
- package/esm/components/QOverlay/types.d.ts.map +1 -0
- package/esm/components/QPopover/QPopover.d.ts +17 -58
- package/esm/components/QPopover/QPopover.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.vue.js +25 -24
- package/esm/components/QPopover/index.d.ts +3 -180
- package/esm/components/QPopover/index.d.ts.map +1 -1
- package/esm/components/QPopover/types.d.ts +44 -0
- package/esm/components/QPopover/types.d.ts.map +1 -0
- package/esm/components/QPropertyList/QPropertyList.d.ts +70 -0
- package/esm/components/QPropertyList/QPropertyList.d.ts.map +1 -0
- package/esm/components/QPropertyList/QPropertyList.vue.js +146 -0
- package/esm/components/QPropertyList/QPropertyList.vue2.js +4 -0
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts +48 -0
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts.map +1 -0
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +72 -0
- package/esm/components/QPropertyList/QPropertyListGroup.vue2.js +4 -0
- package/esm/components/QPropertyList/QPropertyListPanel.d.ts +53 -0
- package/esm/components/QPropertyList/QPropertyListPanel.d.ts.map +1 -0
- package/esm/components/QPropertyList/QPropertyListPanel.vue.js +45 -0
- package/esm/components/QPropertyList/QPropertyListPanel.vue2.js +4 -0
- package/esm/components/QPropertyList/QPropertyListRow.d.ts +29 -0
- package/esm/components/QPropertyList/QPropertyListRow.d.ts.map +1 -0
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +64 -0
- package/esm/components/QPropertyList/QPropertyListRow.vue2.js +4 -0
- package/esm/components/QPropertyList/index.d.ts +13 -0
- package/esm/components/QPropertyList/index.d.ts.map +1 -0
- package/esm/components/QPropertyList/index.js +12 -0
- package/esm/components/QPropertyList/types.d.ts +101 -0
- package/esm/components/QPropertyList/types.d.ts.map +1 -0
- package/esm/components/QPropertyList/types.js +14 -0
- package/esm/components/QSelect/QSelect.d.ts +25 -102
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +80 -91
- package/esm/components/QSelect/index.d.ts +3 -369
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSelect/types.d.ts +80 -0
- package/esm/components/QSelect/types.d.ts.map +1 -0
- package/esm/components/QSelect/types.js +14 -0
- package/esm/components/QSkeletonLoader/QSkeletonLoader.d.ts +2 -14
- package/esm/components/QSkeletonLoader/QSkeletonLoader.d.ts.map +1 -1
- package/esm/components/QSkeletonLoader/index.d.ts +3 -31
- package/esm/components/QSkeletonLoader/index.d.ts.map +1 -1
- package/esm/components/QSkeletonLoader/types.d.ts +15 -0
- package/esm/components/QSkeletonLoader/types.d.ts.map +1 -0
- package/esm/components/QSpinnerLoader/QSpinnerLoader.d.ts +2 -10
- package/esm/components/QSpinnerLoader/QSpinnerLoader.d.ts.map +1 -1
- package/esm/components/QSpinnerLoader/QSpinnerLoader.vue.js +6 -6
- package/esm/components/QSpinnerLoader/index.d.ts +3 -22
- package/esm/components/QSpinnerLoader/index.d.ts.map +1 -1
- package/esm/components/QSpinnerLoader/types.d.ts +11 -0
- package/esm/components/QSpinnerLoader/types.d.ts.map +1 -0
- package/esm/components/QTextField/QTextField.d.ts +13 -61
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/index.d.ts +3 -229
- package/esm/components/QTextField/index.d.ts.map +1 -1
- package/esm/components/QTextField/types.d.ts +51 -0
- package/esm/components/QTextField/types.d.ts.map +1 -0
- package/esm/components/QThemeProvider/QThemeProvider.d.ts +6 -8
- package/esm/components/QThemeProvider/QThemeProvider.d.ts.map +1 -1
- package/esm/components/QThemeProvider/index.d.ts +3 -37
- package/esm/components/QThemeProvider/index.d.ts.map +1 -1
- package/esm/components/QThemeProvider/types.d.ts +7 -0
- package/esm/components/QThemeProvider/types.d.ts.map +1 -0
- package/esm/components/QTooltip/QTooltip.d.ts +30 -94
- package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
- package/esm/components/QTooltip/index.d.ts +3 -279
- package/esm/components/QTooltip/index.d.ts.map +1 -1
- package/esm/components/QTooltip/types.d.ts +67 -0
- package/esm/components/QTooltip/types.d.ts.map +1 -0
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +42 -37
- package/esm/composables/defaults.js +3 -6
- package/esm/index.d.ts +4 -0
- package/esm/utils/color.js +1 -2
- package/esm/utils/setupPropsProxy.js +2 -4
- package/package.json +35 -36
|
@@ -1,86 +1,19 @@
|
|
|
1
|
-
import { QFieldSize } from '../QField';
|
|
2
|
-
import { Icon } from '../QIcon';
|
|
3
|
-
import { QListItemGroupProps, QListItemProps } from '../QList';
|
|
4
1
|
import { Primitive } from '../../types/primitive';
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Whether the value of the component can be cleared.
|
|
17
|
-
*/
|
|
18
|
-
clearable?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Whether the select is readonly.
|
|
21
|
-
*/
|
|
22
|
-
readonly?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Whether the select is disabled.
|
|
25
|
-
*/
|
|
26
|
-
disabled?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* If set to true, an asterisk (*) is displayed
|
|
29
|
-
* to indicate that the field is required.
|
|
30
|
-
*/
|
|
31
|
-
required?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Whether the items of the list are being loaded.
|
|
34
|
-
*/
|
|
35
|
-
loading?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* The list of available items for selection.
|
|
38
|
-
*/
|
|
39
|
-
items: (Omit<QListItemProps, 'value' | 'label'> & {
|
|
40
|
-
[key: string]: any;
|
|
41
|
-
})[];
|
|
42
|
-
/**
|
|
43
|
-
* The item groups used for organizing the available items.
|
|
44
|
-
*/
|
|
45
|
-
groups?: (QListItemGroupProps & {
|
|
46
|
-
id: string;
|
|
47
|
-
})[];
|
|
48
|
-
/**
|
|
49
|
-
* Property on each item that contains its value.
|
|
50
|
-
*/
|
|
51
|
-
itemValue?: string;
|
|
52
|
-
/**
|
|
53
|
-
* Property on each item that contains its title.
|
|
54
|
-
*/
|
|
55
|
-
itemLabel?: string;
|
|
56
|
-
/**
|
|
57
|
-
* The value to be used in comparisons,
|
|
58
|
-
* used to check if the field has a selected item.
|
|
59
|
-
*/
|
|
60
|
-
emptyValue?: Primitive;
|
|
61
|
-
/**
|
|
62
|
-
* The size category of the input.
|
|
63
|
-
*/
|
|
64
|
-
size?: QFieldSize;
|
|
65
|
-
/**
|
|
66
|
-
* Custom set of classes to apply to the component.
|
|
67
|
-
*/
|
|
68
|
-
class?: string | unknown[];
|
|
69
|
-
/**
|
|
70
|
-
* The internal elements of the component
|
|
71
|
-
*/
|
|
72
|
-
internals?: Internals;
|
|
73
|
-
};
|
|
74
|
-
declare const DEFAULT_TEXTS: Record<string, string>;
|
|
75
|
-
declare const DEFAULT_ICONS: Record<string, Icon>;
|
|
76
|
-
type Internals = {
|
|
77
|
-
icons: typeof DEFAULT_ICONS;
|
|
78
|
-
texts: typeof DEFAULT_TEXTS;
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
prepend?(_: {}): any;
|
|
5
|
+
append?(_: {}): any;
|
|
6
|
+
extras?(_: {}): any;
|
|
7
|
+
"body.prepend"?(_: {}): any;
|
|
8
|
+
item?(_: {
|
|
9
|
+
item: import('../QList/types').Item;
|
|
10
|
+
}): any;
|
|
11
|
+
"body.append"?(_: {}): any;
|
|
79
12
|
};
|
|
80
|
-
declare const
|
|
13
|
+
declare const __VLS_component: import('vue').DefineComponent<{
|
|
81
14
|
modelValue: import('vue').PropType<any>;
|
|
82
15
|
size: {
|
|
83
|
-
type: import('vue').PropType<QFieldSize>;
|
|
16
|
+
type: import('vue').PropType<import('../QField').QFieldSize>;
|
|
84
17
|
default: undefined;
|
|
85
18
|
};
|
|
86
19
|
class: {
|
|
@@ -101,20 +34,20 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
101
34
|
type: import('vue').PropType<boolean>;
|
|
102
35
|
};
|
|
103
36
|
internals: {
|
|
104
|
-
type: import('vue').PropType<Internals>;
|
|
37
|
+
type: import('vue').PropType<import('./types').Internals>;
|
|
105
38
|
default: () => {
|
|
106
|
-
icons: Record<string, Icon>;
|
|
39
|
+
icons: Record<string, import('../QIcon').Icon>;
|
|
107
40
|
texts: Record<string, string>;
|
|
108
41
|
};
|
|
109
42
|
};
|
|
110
43
|
items: {
|
|
111
|
-
type: import('vue').PropType<(Omit<QListItemProps, "label" | "value"> & {
|
|
44
|
+
type: import('vue').PropType<(Omit<import('../QList').QListItemProps, "label" | "value"> & {
|
|
112
45
|
[key: string]: any;
|
|
113
46
|
})[]>;
|
|
114
47
|
required: true;
|
|
115
48
|
};
|
|
116
49
|
groups: {
|
|
117
|
-
type: import('vue').PropType<(QListItemGroupProps & {
|
|
50
|
+
type: import('vue').PropType<(import('../QList').QListItemGroupProps & {
|
|
118
51
|
id: string;
|
|
119
52
|
})[]>;
|
|
120
53
|
default: () => never[];
|
|
@@ -149,7 +82,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
149
82
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
150
83
|
modelValue: import('vue').PropType<any>;
|
|
151
84
|
size: {
|
|
152
|
-
type: import('vue').PropType<QFieldSize>;
|
|
85
|
+
type: import('vue').PropType<import('../QField').QFieldSize>;
|
|
153
86
|
default: undefined;
|
|
154
87
|
};
|
|
155
88
|
class: {
|
|
@@ -170,20 +103,20 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
170
103
|
type: import('vue').PropType<boolean>;
|
|
171
104
|
};
|
|
172
105
|
internals: {
|
|
173
|
-
type: import('vue').PropType<Internals>;
|
|
106
|
+
type: import('vue').PropType<import('./types').Internals>;
|
|
174
107
|
default: () => {
|
|
175
|
-
icons: Record<string, Icon>;
|
|
108
|
+
icons: Record<string, import('../QIcon').Icon>;
|
|
176
109
|
texts: Record<string, string>;
|
|
177
110
|
};
|
|
178
111
|
};
|
|
179
112
|
items: {
|
|
180
|
-
type: import('vue').PropType<(Omit<QListItemProps, "label" | "value"> & {
|
|
113
|
+
type: import('vue').PropType<(Omit<import('../QList').QListItemProps, "label" | "value"> & {
|
|
181
114
|
[key: string]: any;
|
|
182
115
|
})[]>;
|
|
183
116
|
required: true;
|
|
184
117
|
};
|
|
185
118
|
groups: {
|
|
186
|
-
type: import('vue').PropType<(QListItemGroupProps & {
|
|
119
|
+
type: import('vue').PropType<(import('../QList').QListItemGroupProps & {
|
|
187
120
|
id: string;
|
|
188
121
|
})[]>;
|
|
189
122
|
default: () => never[];
|
|
@@ -216,29 +149,19 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
216
149
|
onShow?: (() => any) | undefined;
|
|
217
150
|
onHide?: (() => any) | undefined;
|
|
218
151
|
}, {
|
|
219
|
-
size: QFieldSize;
|
|
152
|
+
size: import('../QField').QFieldSize;
|
|
220
153
|
class: string | unknown[];
|
|
221
154
|
label: string;
|
|
222
|
-
internals: Internals;
|
|
223
|
-
groups: (QListItemGroupProps & {
|
|
155
|
+
internals: import('./types').Internals;
|
|
156
|
+
groups: (import('../QList').QListItemGroupProps & {
|
|
224
157
|
id: string;
|
|
225
158
|
})[];
|
|
226
159
|
itemValue: string;
|
|
227
160
|
itemLabel: string;
|
|
228
161
|
id: string;
|
|
229
162
|
emptyValue: Primitive;
|
|
230
|
-
}, {}
|
|
231
|
-
|
|
232
|
-
append?(_: {}): any;
|
|
233
|
-
extras?(_: {}): any;
|
|
234
|
-
"body.prepend"?(_: {}): any;
|
|
235
|
-
item?(_: {
|
|
236
|
-
item: Omit<QListItemProps, "label" | "value"> & {
|
|
237
|
-
[key: string]: any;
|
|
238
|
-
};
|
|
239
|
-
}): any;
|
|
240
|
-
"body.append"?(_: {}): any;
|
|
241
|
-
}>;
|
|
163
|
+
}, {}>;
|
|
164
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
242
165
|
export default _default;
|
|
243
166
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
244
167
|
new (): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/QSelect.vue"],"names":[],"mappings":"AAwHA;
|
|
1
|
+
{"version":3,"file":"QSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QSelect/QSelect.vue"],"names":[],"mappings":"AAwHA;AAYC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAqNnD,iBAAS,cAAc;qBAqVO,GAAG;oBACJ,GAAG;oBACH,GAAG;4BACK,GAAG;;;QACZ,GAAG;2BACM,GAAG;EAGvC;AAkCD,QAAA,MAAM,eAAe;gBArYT,OAAO,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkZ8J,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAlZ7L,OAAO,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkZ8J,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAHvM,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAUxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import { defineComponent as J, mergeModels as R, useModel as Y, ref as
|
|
1
|
+
import { defineComponent as J, mergeModels as R, useModel as Y, ref as f, computed as k, watch as Z, nextTick as ee, openBlock as t, createElementBlock as m, Fragment as D, createVNode as p, unref as n, normalizeClass as le, withModifiers as F, createSlots as ae, withCtx as i, renderSlot as u, createBlock as g, normalizeProps as S, guardReactiveProps as M, createCommentVNode as h, toDisplayString as O, createTextVNode as oe, mergeProps as te, createElementVNode as ne } from "vue";
|
|
2
2
|
import { QButton as U } from "../QButton/index.js";
|
|
3
3
|
import { QField as ie } from "../QField/index.js";
|
|
4
|
-
import { QIcon as
|
|
4
|
+
import { QIcon as x } from "../QIcon/index.js";
|
|
5
5
|
import { QList as se } from "../QList/index.js";
|
|
6
6
|
import { QOverlay as de } from "../QOverlay/index.js";
|
|
7
7
|
import { QSpinnerLoader as re } from "../QSpinnerLoader/index.js";
|
|
8
|
-
|
|
8
|
+
import { DEFAULT_ICONS as ue, DEFAULT_TEXTS as ce } from "./types.js";
|
|
9
|
+
const fe = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "q-select__value"
|
|
11
|
-
},
|
|
12
|
+
}, me = {
|
|
12
13
|
key: 1,
|
|
13
14
|
class: "q-select__placeholder"
|
|
14
|
-
},
|
|
15
|
+
}, pe = ["data-key"], ve = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "q-select__loader"
|
|
17
|
-
},
|
|
18
|
-
placeholder: "Choose..."
|
|
19
|
-
}, ve = {
|
|
20
|
-
chevron: {
|
|
21
|
-
icon: "chevron-down"
|
|
22
|
-
},
|
|
23
|
-
clear: {
|
|
24
|
-
icon: "close"
|
|
25
|
-
}
|
|
26
|
-
}, Ve = /* @__PURE__ */ J({
|
|
18
|
+
}, qe = /* @__PURE__ */ J({
|
|
27
19
|
__name: "QSelect",
|
|
28
20
|
props: /* @__PURE__ */ R({
|
|
29
21
|
id: { default: void 0 },
|
|
@@ -40,7 +32,7 @@ const ue = {
|
|
|
40
32
|
emptyValue: { type: [String, Number, Boolean, Symbol], default: void 0 },
|
|
41
33
|
size: { default: void 0 },
|
|
42
34
|
class: { default: "" },
|
|
43
|
-
internals: { default: () => ({ icons:
|
|
35
|
+
internals: { default: () => ({ icons: ue, texts: ce }) }
|
|
44
36
|
}, {
|
|
45
37
|
modelValue: {
|
|
46
38
|
type: [String, Number, Boolean, Symbol]
|
|
@@ -48,83 +40,83 @@ const ue = {
|
|
|
48
40
|
modelModifiers: {}
|
|
49
41
|
}),
|
|
50
42
|
emits: /* @__PURE__ */ R(["before-show", "before-hide", "show", "hide"], ["update:modelValue"]),
|
|
51
|
-
setup(
|
|
52
|
-
const l =
|
|
43
|
+
setup(B, { emit: A }) {
|
|
44
|
+
const l = B, v = A, y = Y(B, "modelValue"), o = f(!1), _ = f(""), b = f(null), w = f(null), V = f(null), P = k(() => s.value === void 0), s = k(
|
|
53
45
|
() => {
|
|
54
46
|
var e;
|
|
55
|
-
return (e = l.items) == null ? void 0 : e.find((
|
|
47
|
+
return (e = l.items) == null ? void 0 : e.find((a) => a[l.itemValue] === y.value);
|
|
56
48
|
}
|
|
57
49
|
), K = k(
|
|
58
|
-
() =>
|
|
50
|
+
() => s.value ? s.value[l.itemLabel] : ""
|
|
59
51
|
), q = k(
|
|
60
52
|
() => l.clearable && !l.readonly && !l.disabled && !l.loading
|
|
61
53
|
);
|
|
62
|
-
function
|
|
63
|
-
|
|
54
|
+
function C(e) {
|
|
55
|
+
y.value = e, L();
|
|
64
56
|
}
|
|
65
57
|
function E() {
|
|
66
|
-
q.value && (
|
|
58
|
+
q.value && (C(l.emptyValue), I());
|
|
67
59
|
}
|
|
68
60
|
function H(e) {
|
|
69
|
-
var
|
|
70
|
-
!((
|
|
61
|
+
var a, d, c;
|
|
62
|
+
!((a = V.value) != null && a.contains(e.relatedTarget)) && !((c = (d = b.value) == null ? void 0 : d.fieldRef) != null && c.contains(e.relatedTarget)) && L();
|
|
71
63
|
}
|
|
72
64
|
function W() {
|
|
73
|
-
|
|
65
|
+
o.value || (v("before-show"), o.value = !0);
|
|
74
66
|
}
|
|
75
67
|
function L() {
|
|
76
|
-
|
|
68
|
+
o.value && (v("before-hide"), o.value = !1);
|
|
77
69
|
}
|
|
78
70
|
function T() {
|
|
79
|
-
l.readonly || l.disabled || (
|
|
71
|
+
l.readonly || l.disabled || (o.value ? L() : W());
|
|
80
72
|
}
|
|
81
73
|
let $;
|
|
82
74
|
function z(e) {
|
|
83
75
|
if (!(!e.key || l.readonly || l.disabled)) {
|
|
84
|
-
if (window.clearTimeout($), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(e.key) && (e.preventDefault(), e.stopPropagation()), ["Enter", " "].includes(e.key) && (
|
|
85
|
-
|
|
86
|
-
for (let
|
|
87
|
-
if (l.items[
|
|
88
|
-
G(
|
|
76
|
+
if (window.clearTimeout($), ["Enter", " ", "ArrowDown", "ArrowUp", "Home", "End"].includes(e.key) && (e.preventDefault(), e.stopPropagation()), ["Enter", " "].includes(e.key) && (o.value = !0), ["Escape", "Tab"].includes(e.key) && (o.value ? o.value = !1 : q.value && e.key === "Escape" && E()), e.key === "Delete" && l.clearable && E(), /^[a-z]$/i.test(e.key)) {
|
|
77
|
+
_.value += e.key.toLowerCase();
|
|
78
|
+
for (let a = 0; a < l.items.length; a++)
|
|
79
|
+
if (l.items[a][l.itemLabel].toLowerCase().startsWith(_.value)) {
|
|
80
|
+
G(a);
|
|
89
81
|
break;
|
|
90
82
|
}
|
|
91
83
|
}
|
|
92
84
|
$ = window.setTimeout(function() {
|
|
93
|
-
|
|
85
|
+
_.value = "";
|
|
94
86
|
}, 500);
|
|
95
87
|
}
|
|
96
88
|
}
|
|
97
89
|
function X() {
|
|
98
90
|
var e;
|
|
99
|
-
l.loading ? (e = V.value) == null || e.focus() : N(),
|
|
91
|
+
l.loading ? (e = V.value) == null || e.focus() : N(), v("show");
|
|
100
92
|
}
|
|
101
93
|
function j() {
|
|
102
|
-
I(),
|
|
94
|
+
I(), v("hide");
|
|
103
95
|
}
|
|
104
96
|
function I() {
|
|
105
|
-
var e,
|
|
106
|
-
(
|
|
97
|
+
var e, a;
|
|
98
|
+
(a = (e = b.value) == null ? void 0 : e.fieldRef) == null || a.focus();
|
|
107
99
|
}
|
|
108
100
|
function N() {
|
|
109
101
|
var e;
|
|
110
|
-
(e =
|
|
102
|
+
(e = w.value) == null || e.$el.focus();
|
|
111
103
|
}
|
|
112
104
|
function G(e) {
|
|
113
|
-
var
|
|
114
|
-
(
|
|
105
|
+
var a;
|
|
106
|
+
(a = w.value) == null || a.focusItem(e);
|
|
115
107
|
}
|
|
116
108
|
return Z(
|
|
117
109
|
() => l.loading,
|
|
118
110
|
(e) => {
|
|
119
|
-
!e &&
|
|
111
|
+
!e && o.value && ee(N);
|
|
120
112
|
}
|
|
121
|
-
), (e,
|
|
122
|
-
var
|
|
123
|
-
return t(),
|
|
113
|
+
), (e, a) => {
|
|
114
|
+
var d, c;
|
|
115
|
+
return t(), m(
|
|
124
116
|
D,
|
|
125
117
|
null,
|
|
126
118
|
[
|
|
127
|
-
|
|
119
|
+
p(n(ie), {
|
|
128
120
|
id: l.id,
|
|
129
121
|
label: l.label,
|
|
130
122
|
required: l.required,
|
|
@@ -137,22 +129,22 @@ const ue = {
|
|
|
137
129
|
{
|
|
138
130
|
"q-select--readonly": l.readonly,
|
|
139
131
|
"q-select--disabled": l.disabled,
|
|
140
|
-
"q-select--expanded":
|
|
132
|
+
"q-select--expanded": o.value
|
|
141
133
|
},
|
|
142
134
|
l.class
|
|
143
135
|
]),
|
|
144
136
|
readonly: l.readonly,
|
|
145
137
|
disabled: l.disabled,
|
|
146
138
|
"data-loading": l.loading,
|
|
147
|
-
"aria-expanded":
|
|
139
|
+
"aria-expanded": o.value,
|
|
148
140
|
"aria-haspopup": "listbox",
|
|
149
141
|
size: l.size,
|
|
150
142
|
onClick: T,
|
|
151
143
|
onKeydown: F(z, ["stop"])
|
|
152
|
-
},
|
|
153
|
-
append:
|
|
144
|
+
}, ae({
|
|
145
|
+
append: i(() => [
|
|
154
146
|
u(e.$slots, "append"),
|
|
155
|
-
q.value &&
|
|
147
|
+
q.value && y.value ? (t(), g(n(U), {
|
|
156
148
|
key: 0,
|
|
157
149
|
class: "q-select__clear",
|
|
158
150
|
"b-style": "plain",
|
|
@@ -160,10 +152,10 @@ const ue = {
|
|
|
160
152
|
tabindex: "-1",
|
|
161
153
|
onClick: E
|
|
162
154
|
}, {
|
|
163
|
-
default:
|
|
164
|
-
|
|
165
|
-
n(
|
|
166
|
-
|
|
155
|
+
default: i(() => [
|
|
156
|
+
p(
|
|
157
|
+
n(x),
|
|
158
|
+
S(M(l.internals.icons.clear)),
|
|
167
159
|
null,
|
|
168
160
|
16
|
|
169
161
|
/* FULL_PROPS */
|
|
@@ -181,10 +173,10 @@ const ue = {
|
|
|
181
173
|
disabled: l.disabled,
|
|
182
174
|
onClick: T
|
|
183
175
|
}, {
|
|
184
|
-
default:
|
|
185
|
-
|
|
186
|
-
n(
|
|
187
|
-
|
|
176
|
+
default: i(() => [
|
|
177
|
+
p(
|
|
178
|
+
n(x),
|
|
179
|
+
S(M(l.internals.icons.chevron)),
|
|
188
180
|
null,
|
|
189
181
|
16
|
|
190
182
|
/* FULL_PROPS */
|
|
@@ -194,13 +186,13 @@ const ue = {
|
|
|
194
186
|
/* STABLE */
|
|
195
187
|
}, 8, ["disabled"]))
|
|
196
188
|
]),
|
|
197
|
-
default:
|
|
198
|
-
P.value ? (t(),
|
|
199
|
-
!l.readonly && !l.disabled ? (t(),
|
|
189
|
+
default: i(() => [
|
|
190
|
+
P.value ? (t(), m("span", me, [
|
|
191
|
+
!l.readonly && !l.disabled ? (t(), m(
|
|
200
192
|
D,
|
|
201
193
|
{ key: 0 },
|
|
202
194
|
[
|
|
203
|
-
|
|
195
|
+
oe(
|
|
204
196
|
O(e.internals.texts.placeholder),
|
|
205
197
|
1
|
|
206
198
|
/* TEXT */
|
|
@@ -209,9 +201,9 @@ const ue = {
|
|
|
209
201
|
64
|
|
210
202
|
/* STABLE_FRAGMENT */
|
|
211
203
|
)) : h("v-if", !0)
|
|
212
|
-
])) : (t(),
|
|
204
|
+
])) : (t(), m(
|
|
213
205
|
"span",
|
|
214
|
-
|
|
206
|
+
fe,
|
|
215
207
|
O(K.value),
|
|
216
208
|
1
|
|
217
209
|
/* TEXT */
|
|
@@ -220,15 +212,15 @@ const ue = {
|
|
|
220
212
|
_: 2
|
|
221
213
|
/* DYNAMIC */
|
|
222
214
|
}, [
|
|
223
|
-
(
|
|
215
|
+
(d = s.value) != null && d.icon || e.$slots.prepend ? {
|
|
224
216
|
name: "prepend",
|
|
225
|
-
fn:
|
|
226
|
-
var
|
|
217
|
+
fn: i(() => {
|
|
218
|
+
var r, Q;
|
|
227
219
|
return [
|
|
228
220
|
u(e.$slots, "prepend"),
|
|
229
|
-
(
|
|
230
|
-
n(
|
|
231
|
-
|
|
221
|
+
(r = s.value) != null && r.icon ? (t(), g(
|
|
222
|
+
n(x),
|
|
223
|
+
S(te({ key: 0 }, (Q = s.value) == null ? void 0 : Q.icon)),
|
|
232
224
|
null,
|
|
233
225
|
16
|
|
234
226
|
/* FULL_PROPS */
|
|
@@ -239,26 +231,26 @@ const ue = {
|
|
|
239
231
|
} : void 0,
|
|
240
232
|
e.$slots.extras ? {
|
|
241
233
|
name: "extras",
|
|
242
|
-
fn:
|
|
234
|
+
fn: i(() => [
|
|
243
235
|
u(e.$slots, "extras")
|
|
244
236
|
]),
|
|
245
237
|
key: "1"
|
|
246
238
|
} : void 0
|
|
247
239
|
]), 1032, ["id", "label", "required", "tabindex", "class", "readonly", "disabled", "data-loading", "aria-expanded", "size"]),
|
|
248
|
-
|
|
249
|
-
modelValue:
|
|
250
|
-
"onUpdate:modelValue":
|
|
240
|
+
p(n(de), {
|
|
241
|
+
modelValue: o.value,
|
|
242
|
+
"onUpdate:modelValue": a[0] || (a[0] = (r) => o.value = r),
|
|
251
243
|
spy: "",
|
|
252
244
|
trigger: "manual",
|
|
253
245
|
placement: "bottom-start",
|
|
254
246
|
width: "anchor",
|
|
255
247
|
"scroll-lock": "",
|
|
256
|
-
anchor: (
|
|
248
|
+
anchor: (c = b.value) == null ? void 0 : c.$el,
|
|
257
249
|
offset: 2,
|
|
258
250
|
onEnter: X,
|
|
259
251
|
onLeave: j
|
|
260
252
|
}, {
|
|
261
|
-
default:
|
|
253
|
+
default: i(() => [
|
|
262
254
|
ne("div", {
|
|
263
255
|
ref_key: "contentRef",
|
|
264
256
|
ref: V,
|
|
@@ -270,32 +262,29 @@ const ue = {
|
|
|
270
262
|
onKeydown: F(z, ["stop"])
|
|
271
263
|
}, [
|
|
272
264
|
u(e.$slots, "body.prepend"),
|
|
273
|
-
l.loading ? (t(),
|
|
274
|
-
|
|
265
|
+
l.loading ? (t(), m("div", ve, [
|
|
266
|
+
p(n(re), { size: 24 })
|
|
275
267
|
])) : (t(), g(n(se), {
|
|
276
268
|
key: 1,
|
|
277
269
|
ref_key: "listRef",
|
|
278
|
-
ref:
|
|
270
|
+
ref: w,
|
|
279
271
|
class: "q-select__items",
|
|
280
272
|
selectable: "",
|
|
281
|
-
|
|
282
|
-
"onUpdate:modelValue": [
|
|
283
|
-
o[0] || (o[0] = (i) => c.value = i),
|
|
284
|
-
B
|
|
285
|
-
],
|
|
273
|
+
"model-value": y.value,
|
|
286
274
|
items: l.items,
|
|
287
275
|
groups: e.groups,
|
|
288
276
|
"item-label": l.itemLabel,
|
|
289
|
-
"item-value": l.itemValue
|
|
277
|
+
"item-value": l.itemValue,
|
|
278
|
+
"onUpdate:modelValue": C
|
|
290
279
|
}, {
|
|
291
|
-
item:
|
|
292
|
-
u(e.$slots, "item", { item:
|
|
280
|
+
item: i(({ item: r }) => [
|
|
281
|
+
u(e.$slots, "item", { item: r })
|
|
293
282
|
]),
|
|
294
283
|
_: 3
|
|
295
284
|
/* FORWARDED */
|
|
296
|
-
}, 8, ["
|
|
285
|
+
}, 8, ["model-value", "items", "groups", "item-label", "item-value"])),
|
|
297
286
|
u(e.$slots, "body.append")
|
|
298
|
-
], 40,
|
|
287
|
+
], 40, pe)
|
|
299
288
|
]),
|
|
300
289
|
_: 3
|
|
301
290
|
/* FORWARDED */
|
|
@@ -308,5 +297,5 @@ const ue = {
|
|
|
308
297
|
}
|
|
309
298
|
});
|
|
310
299
|
export {
|
|
311
|
-
|
|
300
|
+
qe as default
|
|
312
301
|
};
|