@nuxt/ui 2.10.0 → 2.11.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/README.md +11 -0
- package/dist/module.d.mts +387 -104
- package/dist/module.d.ts +387 -104
- package/dist/module.json +1 -1
- package/dist/module.mjs +16 -7
- package/dist/runtime/components/data/Table.vue +3 -3
- package/dist/runtime/components/data/Table.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Accordion.vue +2 -2
- package/dist/runtime/components/elements/Accordion.vue.d.ts +7 -7
- package/dist/runtime/components/elements/Alert.vue +13 -12
- package/dist/runtime/components/elements/Alert.vue.d.ts +12 -11
- package/dist/runtime/components/elements/Avatar.vue +2 -2
- package/dist/runtime/components/elements/Avatar.vue.d.ts +11 -10
- package/dist/runtime/components/elements/AvatarGroup.d.ts +11 -10
- package/dist/runtime/components/elements/AvatarGroup.mjs +2 -2
- package/dist/runtime/components/elements/Badge.vue +6 -4
- package/dist/runtime/components/elements/Badge.vue.d.ts +11 -11
- package/dist/runtime/components/elements/Button.vue +16 -12
- package/dist/runtime/components/elements/Button.vue.d.ts +13 -12
- package/dist/runtime/components/elements/ButtonGroup.d.ts +12 -11
- package/dist/runtime/components/elements/ButtonGroup.mjs +8 -34
- package/dist/runtime/components/elements/Chip.vue +85 -0
- package/dist/runtime/components/elements/Chip.vue.d.ts +90 -0
- package/dist/runtime/components/elements/Dropdown.vue +35 -21
- package/dist/runtime/components/elements/Dropdown.vue.d.ts +13 -7
- package/dist/runtime/components/elements/Icon.vue +16 -2
- package/dist/runtime/components/elements/Icon.vue.d.ts +14 -2
- package/dist/runtime/components/elements/Kbd.vue +2 -2
- package/dist/runtime/components/elements/Kbd.vue.d.ts +12 -11
- package/dist/runtime/components/elements/Link.vue +2 -5
- package/dist/runtime/components/elements/Meter.vue +2 -2
- package/dist/runtime/components/elements/Meter.vue.d.ts +9 -9
- package/dist/runtime/components/elements/MeterGroup.d.ts +10 -10
- package/dist/runtime/components/elements/MeterGroup.mjs +8 -21
- package/dist/runtime/components/elements/Progress.vue +6 -95
- package/dist/runtime/components/elements/Progress.vue.d.ts +123 -1
- package/dist/runtime/components/forms/Checkbox.vue +8 -10
- package/dist/runtime/components/forms/Checkbox.vue.d.ts +10 -10
- package/dist/runtime/components/forms/Form.vue +1 -1
- package/dist/runtime/components/forms/FormGroup.vue +9 -5
- package/dist/runtime/components/forms/FormGroup.vue.d.ts +21 -11
- package/dist/runtime/components/forms/Input.vue +43 -12
- package/dist/runtime/components/forms/Input.vue.d.ts +38 -15
- package/dist/runtime/components/forms/Radio.vue +18 -12
- package/dist/runtime/components/forms/Radio.vue.d.ts +11 -10
- package/dist/runtime/components/forms/RadioGroup.vue +3 -3
- package/dist/runtime/components/forms/RadioGroup.vue.d.ts +13 -13
- package/dist/runtime/components/forms/Range.vue +5 -5
- package/dist/runtime/components/forms/Range.vue.d.ts +11 -10
- package/dist/runtime/components/forms/Select.vue +12 -9
- package/dist/runtime/components/forms/Select.vue.d.ts +15 -14
- package/dist/runtime/components/forms/SelectMenu.vue +42 -25
- package/dist/runtime/components/forms/SelectMenu.vue.d.ts +28 -19
- package/dist/runtime/components/forms/Textarea.vue +36 -6
- package/dist/runtime/components/forms/Textarea.vue.d.ts +37 -14
- package/dist/runtime/components/forms/Toggle.vue +25 -7
- package/dist/runtime/components/forms/Toggle.vue.d.ts +20 -7
- package/dist/runtime/components/layout/Card.vue +2 -2
- package/dist/runtime/components/layout/Card.vue.d.ts +7 -7
- package/dist/runtime/components/layout/Container.vue +2 -2
- package/dist/runtime/components/layout/Container.vue.d.ts +7 -7
- package/dist/runtime/components/layout/Divider.vue +3 -8
- package/dist/runtime/components/layout/Divider.vue.d.ts +9 -9
- package/dist/runtime/components/layout/Skeleton.vue +2 -2
- package/dist/runtime/components/layout/Skeleton.vue.d.ts +7 -7
- package/dist/runtime/components/navigation/Breadcrumb.vue +78 -0
- package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +50 -0
- package/dist/runtime/components/navigation/CommandPalette.vue +50 -37
- package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +15 -8
- package/dist/runtime/components/navigation/CommandPaletteGroup.vue +1 -3
- package/dist/runtime/components/navigation/Pagination.vue +7 -7
- package/dist/runtime/components/navigation/Pagination.vue.d.ts +11 -11
- package/dist/runtime/components/navigation/Tabs.vue +8 -5
- package/dist/runtime/components/navigation/Tabs.vue.d.ts +10 -10
- package/dist/runtime/components/navigation/VerticalNavigation.vue +2 -2
- package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/ContextMenu.vue +4 -3
- package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Modal.vue +3 -6
- package/dist/runtime/components/overlays/Modal.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Notification.vue +30 -31
- package/dist/runtime/components/overlays/Notification.vue.d.ts +10 -9
- package/dist/runtime/components/overlays/Notifications.vue +18 -16
- package/dist/runtime/components/overlays/Notifications.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Popover.vue +14 -4
- package/dist/runtime/components/overlays/Popover.vue.d.ts +20 -9
- package/dist/runtime/components/overlays/Slideover.vue +6 -6
- package/dist/runtime/components/overlays/Slideover.vue.d.ts +7 -7
- package/dist/runtime/components/overlays/Tooltip.vue +6 -5
- package/dist/runtime/components/overlays/Tooltip.vue.d.ts +7 -7
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -1
- package/dist/runtime/composables/defineShortcuts.mjs +8 -4
- package/dist/runtime/composables/useButtonGroup.d.ts +20 -0
- package/dist/runtime/composables/useButtonGroup.mjs +52 -0
- package/dist/runtime/composables/useFormGroup.d.ts +2 -0
- package/dist/runtime/composables/useFormGroup.mjs +3 -2
- package/dist/runtime/composables/useShortcuts.d.ts +2 -2
- package/dist/runtime/composables/useUI.d.ts +3 -3
- package/dist/runtime/types/alert.d.ts +7 -0
- package/dist/runtime/types/avatar.d.ts +3 -1
- package/dist/runtime/types/badge.d.ts +5 -4
- package/dist/runtime/types/breadcrumb.d.ts +9 -0
- package/dist/runtime/types/button.d.ts +5 -4
- package/dist/runtime/types/chip.d.ts +11 -0
- package/dist/runtime/types/dropdown.d.ts +2 -2
- package/dist/runtime/types/form-group.d.ts +5 -0
- package/dist/runtime/types/form.d.ts +3 -2
- package/dist/runtime/types/index.d.ts +10 -0
- package/dist/runtime/types/input.d.ts +8 -0
- package/dist/runtime/types/kbd.d.ts +5 -0
- package/dist/runtime/types/popper.d.ts +2 -0
- package/dist/runtime/types/range.d.ts +5 -0
- package/dist/runtime/types/select.d.ts +8 -0
- package/dist/runtime/types/textarea.d.ts +8 -0
- package/dist/runtime/types/toggle.d.ts +5 -0
- package/dist/runtime/types/utils.d.ts +24 -7
- package/dist/runtime/ui.config/data/table.d.ts +60 -0
- package/dist/runtime/ui.config/data/table.mjs +59 -0
- package/dist/runtime/ui.config/elements/accordion.d.ts +21 -0
- package/dist/runtime/ui.config/elements/accordion.mjs +20 -0
- package/dist/runtime/ui.config/elements/alert.d.ts +41 -0
- package/dist/runtime/ui.config/elements/alert.mjs +40 -0
- package/dist/runtime/ui.config/elements/avatar.d.ts +60 -0
- package/dist/runtime/ui.config/elements/avatar.mjs +59 -0
- package/dist/runtime/ui.config/elements/avatarGroup.d.ts +6 -0
- package/dist/runtime/ui.config/elements/avatarGroup.mjs +5 -0
- package/dist/runtime/ui.config/elements/badge.d.ts +34 -0
- package/dist/runtime/ui.config/elements/badge.mjs +33 -0
- package/dist/runtime/ui.config/elements/button.d.ts +81 -0
- package/dist/runtime/ui.config/elements/button.mjs +80 -0
- package/dist/runtime/ui.config/elements/buttonGroup.d.ts +101 -0
- package/dist/runtime/ui.config/elements/buttonGroup.mjs +19 -0
- package/dist/runtime/ui.config/elements/chip.d.ts +35 -0
- package/dist/runtime/ui.config/elements/chip.mjs +34 -0
- package/dist/runtime/ui.config/elements/dropdown.d.ts +55 -0
- package/dist/runtime/ui.config/elements/dropdown.mjs +53 -0
- package/dist/runtime/ui.config/elements/kbd.d.ts +17 -0
- package/dist/runtime/ui.config/elements/kbd.mjs +16 -0
- package/dist/runtime/ui.config/elements/meter.d.ts +77 -0
- package/dist/runtime/ui.config/elements/meter.mjs +76 -0
- package/dist/runtime/ui.config/elements/meterGroup.d.ts +52 -0
- package/dist/runtime/ui.config/elements/meterGroup.mjs +24 -0
- package/dist/runtime/ui.config/elements/progress.d.ts +75 -0
- package/dist/runtime/ui.config/elements/progress.mjs +74 -0
- package/dist/runtime/ui.config/forms/checkbox.d.ts +19 -0
- package/dist/runtime/ui.config/forms/checkbox.mjs +18 -0
- package/dist/runtime/ui.config/forms/formGroup.d.ts +25 -0
- package/dist/runtime/ui.config/forms/formGroup.mjs +25 -0
- package/dist/runtime/ui.config/forms/input.d.ts +107 -0
- package/dist/runtime/ui.config/forms/input.mjs +106 -0
- package/dist/runtime/ui.config/forms/radio.d.ts +18 -0
- package/dist/runtime/ui.config/forms/radio.mjs +17 -0
- package/dist/runtime/ui.config/forms/radioGroup.d.ts +8 -0
- package/dist/runtime/ui.config/forms/radioGroup.mjs +7 -0
- package/dist/runtime/ui.config/forms/range.d.ts +64 -0
- package/dist/runtime/ui.config/forms/range.mjs +63 -0
- package/dist/runtime/ui.config/forms/select.d.ts +108 -0
- package/dist/runtime/ui.config/forms/select.mjs +13 -0
- package/dist/runtime/ui.config/forms/selectMenu.d.ts +68 -0
- package/dist/runtime/ui.config/forms/selectMenu.mjs +66 -0
- package/dist/runtime/ui.config/forms/textarea.d.ts +106 -0
- package/dist/runtime/ui.config/forms/textarea.mjs +10 -0
- package/dist/runtime/ui.config/forms/toggle.d.ts +61 -0
- package/dist/runtime/ui.config/forms/toggle.mjs +60 -0
- package/dist/runtime/ui.config/index.d.ts +40 -0
- package/dist/runtime/ui.config/index.mjs +40 -0
- package/dist/runtime/ui.config/layout/card.d.ts +24 -0
- package/dist/runtime/ui.config/layout/card.mjs +23 -0
- package/dist/runtime/ui.config/layout/container.d.ts +6 -0
- package/dist/runtime/ui.config/layout/container.mjs +5 -0
- package/dist/runtime/ui.config/layout/divider.d.ts +35 -0
- package/dist/runtime/ui.config/layout/divider.mjs +34 -0
- package/dist/runtime/ui.config/layout/skeleton.d.ts +6 -0
- package/dist/runtime/ui.config/layout/skeleton.mjs +5 -0
- package/dist/runtime/ui.config/navigation/breadcrumb.d.ts +20 -0
- package/dist/runtime/ui.config/navigation/breadcrumb.mjs +19 -0
- package/dist/runtime/ui.config/navigation/commandPalette.d.ts +72 -0
- package/dist/runtime/ui.config/navigation/commandPalette.mjs +71 -0
- package/dist/runtime/ui.config/navigation/pagination.d.ts +35 -0
- package/dist/runtime/ui.config/navigation/pagination.mjs +34 -0
- package/dist/runtime/ui.config/navigation/tabs.d.ts +34 -0
- package/dist/runtime/ui.config/navigation/tabs.mjs +33 -0
- package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +28 -0
- package/dist/runtime/ui.config/navigation/verticalNavigation.mjs +27 -0
- package/dist/runtime/ui.config/overlays/contextMenu.d.ts +31 -0
- package/dist/runtime/ui.config/overlays/contextMenu.mjs +25 -0
- package/dist/runtime/ui.config/overlays/modal.d.ts +36 -0
- package/dist/runtime/ui.config/overlays/modal.mjs +37 -0
- package/dist/runtime/ui.config/overlays/notification.d.ts +50 -0
- package/dist/runtime/ui.config/overlays/notification.mjs +50 -0
- package/dist/runtime/ui.config/overlays/notifications.d.ts +7 -0
- package/dist/runtime/ui.config/overlays/notifications.mjs +6 -0
- package/dist/runtime/ui.config/overlays/popover.d.ts +43 -0
- package/dist/runtime/ui.config/overlays/popover.mjs +37 -0
- package/dist/runtime/ui.config/overlays/slideover.d.ts +32 -0
- package/dist/runtime/ui.config/overlays/slideover.mjs +33 -0
- package/dist/runtime/ui.config/overlays/tooltip.d.ts +33 -0
- package/dist/runtime/ui.config/overlays/tooltip.mjs +27 -0
- package/dist/runtime/ui.config/popper.d.ts +8 -0
- package/dist/runtime/ui.config/popper.mjs +8 -0
- package/dist/runtime/ui.css +1 -13
- package/dist/runtime/utils/index.d.ts +5 -0
- package/dist/runtime/utils/index.mjs +7 -3
- package/dist/types.d.mts +3 -2
- package/dist/types.d.ts +3 -2
- package/package.json +32 -21
- package/dist/runtime/ui.config.d.ts +0 -1470
- package/dist/runtime/ui.config.mjs +0 -1273
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
<HComboboxInput
|
|
15
15
|
ref="comboboxInput"
|
|
16
16
|
:value="query"
|
|
17
|
-
:class="[ui.input.base, ui.input.size, ui.input.height, ui.input.padding, icon && ui.input.icon.padding]"
|
|
17
|
+
:class="[ui.input.base, ui.input.size, ui.input.height, ui.input.padding, icon && ui.input.icon.padding, closeButton && ui.input.closeButton.padding]"
|
|
18
18
|
:placeholder="placeholder"
|
|
19
19
|
:aria-label="placeholder"
|
|
20
20
|
autocomplete="off"
|
|
21
21
|
@change="query = $event.target.value"
|
|
22
22
|
/>
|
|
23
23
|
|
|
24
|
-
<UButton v-if="closeButton" aria-label="Close" v-bind="{ ...ui.default.closeButton, ...closeButton }" :class="ui.input.closeButton" @click="onClear" />
|
|
24
|
+
<UButton v-if="closeButton" aria-label="Close" v-bind="{ ...(ui.default.closeButton || {}), ...closeButton }" :class="ui.input.closeButton.base" @click="onClear" />
|
|
25
25
|
</div>
|
|
26
26
|
|
|
27
27
|
<HComboboxOptions
|
|
@@ -165,11 +165,11 @@ export default defineComponent({
|
|
|
165
165
|
},
|
|
166
166
|
class: {
|
|
167
167
|
type: [String, Object, Array],
|
|
168
|
-
default:
|
|
168
|
+
default: () => ""
|
|
169
169
|
},
|
|
170
170
|
ui: {
|
|
171
171
|
type: Object,
|
|
172
|
-
default:
|
|
172
|
+
default: () => ({})
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
175
|
emits: ["update:modelValue", "close"],
|
|
@@ -181,7 +181,7 @@ export default defineComponent({
|
|
|
181
181
|
const isLoading = ref(false);
|
|
182
182
|
onMounted(() => {
|
|
183
183
|
if (props.autoselect) {
|
|
184
|
-
|
|
184
|
+
activateNextOption();
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
onMounted(() => {
|
|
@@ -205,44 +205,53 @@ export default defineComponent({
|
|
|
205
205
|
const commands2 = [];
|
|
206
206
|
for (const group of props.groups) {
|
|
207
207
|
if (!group.search) {
|
|
208
|
-
commands2.push(...group.commands
|
|
208
|
+
commands2.push(...group.commands?.map((command) => ({ ...command, group: group.key })) || []);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
return commands2;
|
|
212
212
|
});
|
|
213
213
|
const searchResults = ref({});
|
|
214
214
|
const { results } = useFuse(query, commands, options);
|
|
215
|
+
function getGroupWithCommands(group, commands2) {
|
|
216
|
+
if (!group) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (group.filter && typeof group.filter === "function") {
|
|
220
|
+
commands2 = group.filter(query.value, commands2);
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
...group,
|
|
224
|
+
commands: commands2.slice(0, options.value.resultLimit)
|
|
225
|
+
};
|
|
226
|
+
}
|
|
215
227
|
const groups = computed(() => {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
for (const command of results.value) {
|
|
219
|
-
groupedCommands[command.item.group] ||= [];
|
|
220
|
-
groupedCommands[command.item.group].push(command);
|
|
228
|
+
if (!results.value) {
|
|
229
|
+
return [];
|
|
221
230
|
}
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
return {
|
|
227
|
-
...item,
|
|
228
|
-
...data
|
|
229
|
-
};
|
|
230
|
-
});
|
|
231
|
-
if (group.filter && typeof group.filter === "function") {
|
|
232
|
-
commands2 = group.filter(query.value, commands2);
|
|
231
|
+
const groupedCommands = results.value.reduce((acc, command) => {
|
|
232
|
+
const { item, ...data } = command;
|
|
233
|
+
if (!item.group) {
|
|
234
|
+
return acc;
|
|
233
235
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
groups2.push({ ...group, commands: commands2.slice(0, options.value.resultLimit) });
|
|
236
|
+
acc[item.group] ||= [];
|
|
237
|
+
acc[item.group].push({ ...item, ...data });
|
|
238
|
+
return acc;
|
|
239
|
+
}, {});
|
|
240
|
+
const groups2 = Object.entries(groupedCommands).map(([key, commands2]) => {
|
|
241
|
+
const group = props.groups.find((group2) => group2.key === key);
|
|
242
|
+
if (!group) {
|
|
243
|
+
return null;
|
|
243
244
|
}
|
|
244
|
-
|
|
245
|
-
|
|
245
|
+
return getGroupWithCommands(group, commands2);
|
|
246
|
+
}).filter(Boolean);
|
|
247
|
+
const searchGroups = props.groups.filter((group) => !!group.search && searchResults.value[group.key]?.length).map((group) => {
|
|
248
|
+
const commands2 = searchResults.value[group.key] || [];
|
|
249
|
+
return getGroupWithCommands(group, [...commands2]);
|
|
250
|
+
});
|
|
251
|
+
return [
|
|
252
|
+
...groups2,
|
|
253
|
+
...searchGroups
|
|
254
|
+
];
|
|
246
255
|
});
|
|
247
256
|
const debouncedSearch = useDebounceFn(async () => {
|
|
248
257
|
const searchableGroups = props.groups.filter((group) => !!group.search);
|
|
@@ -254,12 +263,11 @@ export default defineComponent({
|
|
|
254
263
|
searchResults.value[group.key] = await group.search(query.value);
|
|
255
264
|
}));
|
|
256
265
|
isLoading.value = false;
|
|
266
|
+
activateFirstOption();
|
|
257
267
|
}, props.debounce);
|
|
258
268
|
watch(query, () => {
|
|
259
269
|
debouncedSearch();
|
|
260
|
-
|
|
261
|
-
comboboxInput.value?.$el.dispatchEvent(new KeyboardEvent("keydown", { key: "PageUp" }));
|
|
262
|
-
}, 0);
|
|
270
|
+
activateFirstOption();
|
|
263
271
|
});
|
|
264
272
|
const iconName = computed(() => {
|
|
265
273
|
if ((props.loading || isLoading.value) && props.loadingIcon) {
|
|
@@ -271,11 +279,16 @@ export default defineComponent({
|
|
|
271
279
|
return twJoin(
|
|
272
280
|
ui.value.input.icon.base,
|
|
273
281
|
ui.value.input.icon.size,
|
|
274
|
-
(props.loading || isLoading.value) && props.loadingIcon &&
|
|
282
|
+
(props.loading || isLoading.value) && props.loadingIcon && ui.value.input.icon.loading
|
|
275
283
|
);
|
|
276
284
|
});
|
|
277
285
|
const emptyState = computed(() => ({ ...ui.value.default.emptyState, ...props.emptyState }));
|
|
278
286
|
function activateFirstOption() {
|
|
287
|
+
setTimeout(() => {
|
|
288
|
+
comboboxInput.value?.$el.dispatchEvent(new KeyboardEvent("keydown", { key: "PageUp" }));
|
|
289
|
+
}, 0);
|
|
290
|
+
}
|
|
291
|
+
function activateNextOption() {
|
|
279
292
|
setTimeout(() => {
|
|
280
293
|
comboboxInput.value?.$el.dispatchEvent(new KeyboardEvent("keydown", { key: "ArrowDown" }));
|
|
281
294
|
}, 0);
|
|
@@ -84,18 +84,25 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
84
|
};
|
|
85
85
|
class: {
|
|
86
86
|
type: PropType<any>;
|
|
87
|
-
default:
|
|
87
|
+
default: () => string;
|
|
88
88
|
};
|
|
89
89
|
ui: {
|
|
90
|
-
type: PropType<
|
|
91
|
-
default:
|
|
90
|
+
type: PropType<any>;
|
|
91
|
+
default: () => {};
|
|
92
92
|
};
|
|
93
93
|
}, {
|
|
94
94
|
ui: ComputedRef<any>;
|
|
95
95
|
attrs: ComputedRef<Pick<{
|
|
96
96
|
[x: string]: unknown;
|
|
97
97
|
}, string>>;
|
|
98
|
-
groups: ComputedRef<Group
|
|
98
|
+
groups: ComputedRef<(Group | {
|
|
99
|
+
commands: Command[];
|
|
100
|
+
key: string;
|
|
101
|
+
active?: string | undefined;
|
|
102
|
+
inactive?: string | undefined;
|
|
103
|
+
search?: Function | undefined;
|
|
104
|
+
filter?: Function | undefined;
|
|
105
|
+
} | undefined)[]>;
|
|
99
106
|
comboboxInput: import("vue").Ref<ComponentPublicInstance<HTMLInputElement> | undefined>;
|
|
100
107
|
query: import("vue").Ref<string>;
|
|
101
108
|
iconName: ComputedRef<string | undefined>;
|
|
@@ -186,19 +193,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
186
193
|
};
|
|
187
194
|
class: {
|
|
188
195
|
type: PropType<any>;
|
|
189
|
-
default:
|
|
196
|
+
default: () => string;
|
|
190
197
|
};
|
|
191
198
|
ui: {
|
|
192
|
-
type: PropType<
|
|
193
|
-
default:
|
|
199
|
+
type: PropType<any>;
|
|
200
|
+
default: () => {};
|
|
194
201
|
};
|
|
195
202
|
}>> & {
|
|
196
203
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
197
204
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
198
205
|
}, {
|
|
206
|
+
ui: any;
|
|
199
207
|
icon: string;
|
|
200
208
|
closeButton: Button;
|
|
201
|
-
ui: Partial<any>;
|
|
202
209
|
class: any;
|
|
203
210
|
modelValue: string | number | unknown[] | Record<string, any>;
|
|
204
211
|
by: string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
:size="size"
|
|
7
7
|
:disabled="!canGoFirstOrPrev"
|
|
8
8
|
:class="[ui.base, ui.rounded]"
|
|
9
|
-
v-bind="{ ...ui.default.firstButton, ...firstButton }"
|
|
9
|
+
v-bind="{ ...(ui.default.firstButton || {}), ...firstButton }"
|
|
10
10
|
:ui="{ rounded: '' }"
|
|
11
11
|
aria-label="First"
|
|
12
12
|
@click="onClickFirst"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
:size="size"
|
|
20
20
|
:disabled="!canGoFirstOrPrev"
|
|
21
21
|
:class="[ui.base, ui.rounded]"
|
|
22
|
-
v-bind="{ ...ui.default.prevButton, ...prevButton }"
|
|
22
|
+
v-bind="{ ...(ui.default.prevButton || {}), ...prevButton }"
|
|
23
23
|
:ui="{ rounded: '' }"
|
|
24
24
|
aria-label="Prev"
|
|
25
25
|
@click="onClickPrev"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
:key="`${page}-${index}`"
|
|
32
32
|
:size="size"
|
|
33
33
|
:label="`${page}`"
|
|
34
|
-
v-bind="page === currentPage ? { ...ui.default.activeButton, ...activeButton } : { ...ui.default.inactiveButton, ...inactiveButton }"
|
|
34
|
+
v-bind="page === currentPage ? { ...(ui.default.activeButton || {}), ...activeButton } : { ...(ui.default.inactiveButton || {}), ...inactiveButton }"
|
|
35
35
|
:class="[{ 'pointer-events-none': typeof page === 'string', 'z-[1]': page === currentPage }, ui.base, ui.rounded]"
|
|
36
36
|
:ui="{ rounded: '' }"
|
|
37
37
|
@click="() => onClickPage(page)"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
:size="size"
|
|
44
44
|
:disabled="!canGoLastOrNext"
|
|
45
45
|
:class="[ui.base, ui.rounded]"
|
|
46
|
-
v-bind="{ ...ui.default.nextButton, ...nextButton }"
|
|
46
|
+
v-bind="{ ...(ui.default.nextButton || {}), ...nextButton }"
|
|
47
47
|
:ui="{ rounded: '' }"
|
|
48
48
|
aria-label="Next"
|
|
49
49
|
@click="onClickNext"
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
:size="size"
|
|
57
57
|
:disabled="!canGoLastOrNext"
|
|
58
58
|
:class="[ui.base, ui.rounded]"
|
|
59
|
-
v-bind="{ ...ui.default.lastButton, ...lastButton }"
|
|
59
|
+
v-bind="{ ...(ui.default.lastButton || {}), ...lastButton }"
|
|
60
60
|
:ui="{ rounded: '' }"
|
|
61
61
|
aria-label="Last"
|
|
62
62
|
@click="onClickLast"
|
|
@@ -144,11 +144,11 @@ export default defineComponent({
|
|
|
144
144
|
},
|
|
145
145
|
class: {
|
|
146
146
|
type: [String, Object, Array],
|
|
147
|
-
default:
|
|
147
|
+
default: () => ""
|
|
148
148
|
},
|
|
149
149
|
ui: {
|
|
150
150
|
type: Object,
|
|
151
|
-
default:
|
|
151
|
+
default: () => ({})
|
|
152
152
|
}
|
|
153
153
|
},
|
|
154
154
|
emits: ["update:modelValue"],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropType } from 'vue';
|
|
2
|
-
import type { Button } from '../../types';
|
|
2
|
+
import type { Button, ButtonSize } from '../../types';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
modelValue: {
|
|
5
5
|
type: NumberConstructor;
|
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
validate(value: any): boolean;
|
|
20
20
|
};
|
|
21
21
|
size: {
|
|
22
|
-
type: PropType<
|
|
22
|
+
type: PropType<ButtonSize>;
|
|
23
23
|
default: () => any;
|
|
24
24
|
validator(value: string): boolean;
|
|
25
25
|
};
|
|
@@ -61,11 +61,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
};
|
|
62
62
|
class: {
|
|
63
63
|
type: PropType<any>;
|
|
64
|
-
default:
|
|
64
|
+
default: () => "";
|
|
65
65
|
};
|
|
66
66
|
ui: {
|
|
67
|
-
type: PropType<
|
|
68
|
-
default:
|
|
67
|
+
type: PropType<any>;
|
|
68
|
+
default: () => {};
|
|
69
69
|
};
|
|
70
70
|
}, {
|
|
71
71
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -101,7 +101,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
101
101
|
validate(value: any): boolean;
|
|
102
102
|
};
|
|
103
103
|
size: {
|
|
104
|
-
type: PropType<
|
|
104
|
+
type: PropType<ButtonSize>;
|
|
105
105
|
default: () => any;
|
|
106
106
|
validator(value: string): boolean;
|
|
107
107
|
};
|
|
@@ -143,18 +143,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
143
143
|
};
|
|
144
144
|
class: {
|
|
145
145
|
type: PropType<any>;
|
|
146
|
-
default:
|
|
146
|
+
default: () => "";
|
|
147
147
|
};
|
|
148
148
|
ui: {
|
|
149
|
-
type: PropType<
|
|
150
|
-
default:
|
|
149
|
+
type: PropType<any>;
|
|
150
|
+
default: () => {};
|
|
151
151
|
};
|
|
152
152
|
}>> & {
|
|
153
153
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
154
154
|
}, {
|
|
155
|
-
|
|
155
|
+
size: ButtonSize;
|
|
156
|
+
ui: any;
|
|
156
157
|
class: any;
|
|
157
|
-
size: string | number | symbol;
|
|
158
158
|
max: number;
|
|
159
159
|
divider: string;
|
|
160
160
|
pageCount: number;
|
|
@@ -86,11 +86,11 @@ export default defineComponent({
|
|
|
86
86
|
},
|
|
87
87
|
class: {
|
|
88
88
|
type: [String, Object, Array],
|
|
89
|
-
default:
|
|
89
|
+
default: () => ""
|
|
90
90
|
},
|
|
91
91
|
ui: {
|
|
92
92
|
type: Object,
|
|
93
|
-
default:
|
|
93
|
+
default: () => ({})
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
emits: ["update:modelValue", "change"],
|
|
@@ -105,6 +105,9 @@ export default defineComponent({
|
|
|
105
105
|
if (!tab) {
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
+
if (!markerRef.value) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
108
111
|
markerRef.value.style.top = `${tab.offsetTop}px`;
|
|
109
112
|
markerRef.value.style.left = `${tab.offsetLeft}px`;
|
|
110
113
|
markerRef.value.style.width = `${tab.offsetWidth}px`;
|
|
@@ -114,16 +117,16 @@ export default defineComponent({
|
|
|
114
117
|
selectedIndex.value = index;
|
|
115
118
|
emit("change", index);
|
|
116
119
|
if (props.modelValue !== void 0) {
|
|
117
|
-
emit("update:modelValue",
|
|
120
|
+
emit("update:modelValue", selectedIndex.value);
|
|
118
121
|
}
|
|
119
|
-
calcMarkerSize(
|
|
122
|
+
calcMarkerSize(selectedIndex.value);
|
|
120
123
|
}
|
|
121
124
|
useResizeObserver(listRef, () => {
|
|
122
125
|
calcMarkerSize(selectedIndex.value);
|
|
123
126
|
});
|
|
124
127
|
watch(() => props.modelValue, (value) => {
|
|
125
128
|
selectedIndex.value = value;
|
|
126
|
-
calcMarkerSize(value);
|
|
129
|
+
calcMarkerSize(selectedIndex.value);
|
|
127
130
|
});
|
|
128
131
|
onMounted(() => calcMarkerSize(selectedIndex.value));
|
|
129
132
|
return {
|
|
@@ -20,11 +20,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
};
|
|
21
21
|
class: {
|
|
22
22
|
type: PropType<any>;
|
|
23
|
-
default:
|
|
23
|
+
default: () => string;
|
|
24
24
|
};
|
|
25
25
|
ui: {
|
|
26
|
-
type: PropType<
|
|
27
|
-
default:
|
|
26
|
+
type: PropType<any>;
|
|
27
|
+
default: () => {};
|
|
28
28
|
};
|
|
29
29
|
}, {
|
|
30
30
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -34,8 +34,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
listRef: import("vue").Ref<HTMLElement | undefined>;
|
|
35
35
|
itemRefs: import("vue").Ref<HTMLElement[]>;
|
|
36
36
|
markerRef: import("vue").Ref<HTMLElement | undefined>;
|
|
37
|
-
selectedIndex: import("vue").Ref<number>;
|
|
38
|
-
onChange: (index:
|
|
37
|
+
selectedIndex: import("vue").Ref<number | undefined>;
|
|
38
|
+
onChange: (index: number) => void;
|
|
39
39
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
40
40
|
modelValue: {
|
|
41
41
|
type: NumberConstructor;
|
|
@@ -56,21 +56,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
56
|
};
|
|
57
57
|
class: {
|
|
58
58
|
type: PropType<any>;
|
|
59
|
-
default:
|
|
59
|
+
default: () => string;
|
|
60
60
|
};
|
|
61
61
|
ui: {
|
|
62
|
-
type: PropType<
|
|
63
|
-
default:
|
|
62
|
+
type: PropType<any>;
|
|
63
|
+
default: () => {};
|
|
64
64
|
};
|
|
65
65
|
}>> & {
|
|
66
66
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
67
67
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
68
68
|
}, {
|
|
69
|
-
|
|
69
|
+
orientation: "horizontal" | "vertical";
|
|
70
|
+
ui: any;
|
|
70
71
|
class: any;
|
|
71
72
|
modelValue: number;
|
|
72
73
|
items: TabItem[];
|
|
73
|
-
orientation: "horizontal" | "vertical";
|
|
74
74
|
defaultIndex: number;
|
|
75
75
|
}, {}>;
|
|
76
76
|
export default _default;
|
|
@@ -8,11 +8,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
8
|
};
|
|
9
9
|
class: {
|
|
10
10
|
type: PropType<any>;
|
|
11
|
-
default:
|
|
11
|
+
default: () => string;
|
|
12
12
|
};
|
|
13
13
|
ui: {
|
|
14
|
-
type: PropType<
|
|
15
|
-
default:
|
|
14
|
+
type: PropType<any>;
|
|
15
|
+
default: () => {};
|
|
16
16
|
};
|
|
17
17
|
}, {
|
|
18
18
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -27,14 +27,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
27
|
};
|
|
28
28
|
class: {
|
|
29
29
|
type: PropType<any>;
|
|
30
|
-
default:
|
|
30
|
+
default: () => string;
|
|
31
31
|
};
|
|
32
32
|
ui: {
|
|
33
|
-
type: PropType<
|
|
34
|
-
default:
|
|
33
|
+
type: PropType<any>;
|
|
34
|
+
default: () => {};
|
|
35
35
|
};
|
|
36
36
|
}>>, {
|
|
37
|
-
ui:
|
|
37
|
+
ui: any;
|
|
38
38
|
class: any;
|
|
39
39
|
links: VerticalNavigationLink[];
|
|
40
40
|
}, {}>;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
<div v-if="isOpen" ref="container" :class="wrapperClass" v-bind="attrs">
|
|
3
3
|
<Transition appear v-bind="ui.transition">
|
|
4
4
|
<div>
|
|
5
|
-
<div v-if="popper.arrow" data-popper-arrow :class="
|
|
5
|
+
<div v-if="popper.arrow" data-popper-arrow :class="Object.values(ui.arrow)" />
|
|
6
|
+
|
|
6
7
|
<div :class="[ui.base, ui.ring, ui.rounded, ui.shadow, ui.background]">
|
|
7
8
|
<slot />
|
|
8
9
|
</div>
|
|
@@ -39,11 +40,11 @@ export default defineComponent({
|
|
|
39
40
|
},
|
|
40
41
|
class: {
|
|
41
42
|
type: [String, Object, Array],
|
|
42
|
-
default:
|
|
43
|
+
default: () => ""
|
|
43
44
|
},
|
|
44
45
|
ui: {
|
|
45
46
|
type: Object,
|
|
46
|
-
default:
|
|
47
|
+
default: () => ({})
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
50
|
emits: ["update:modelValue", "close"],
|
|
@@ -15,11 +15,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
15
15
|
};
|
|
16
16
|
class: {
|
|
17
17
|
type: PropType<any>;
|
|
18
|
-
default:
|
|
18
|
+
default: () => string;
|
|
19
19
|
};
|
|
20
20
|
ui: {
|
|
21
|
-
type: PropType<
|
|
22
|
-
default:
|
|
21
|
+
type: PropType<any>;
|
|
22
|
+
default: () => {};
|
|
23
23
|
};
|
|
24
24
|
}, {
|
|
25
25
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -45,17 +45,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
};
|
|
46
46
|
class: {
|
|
47
47
|
type: PropType<any>;
|
|
48
|
-
default:
|
|
48
|
+
default: () => string;
|
|
49
49
|
};
|
|
50
50
|
ui: {
|
|
51
|
-
type: PropType<
|
|
52
|
-
default:
|
|
51
|
+
type: PropType<any>;
|
|
52
|
+
default: () => {};
|
|
53
53
|
};
|
|
54
54
|
}>> & {
|
|
55
55
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
56
56
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
57
57
|
}, {
|
|
58
|
-
ui:
|
|
58
|
+
ui: any;
|
|
59
59
|
popper: PopperOptions;
|
|
60
60
|
class: any;
|
|
61
61
|
modelValue: boolean;
|
|
@@ -14,10 +14,7 @@
|
|
|
14
14
|
ui.background,
|
|
15
15
|
ui.ring,
|
|
16
16
|
ui.shadow,
|
|
17
|
-
fullscreen ?
|
|
18
|
-
fullscreen ? 'h-screen' : ui.height,
|
|
19
|
-
fullscreen ? 'rounded-none' : ui.rounded,
|
|
20
|
-
fullscreen ? 'm-0' : ui.margin
|
|
17
|
+
fullscreen ? ui.fullscreen : [ui.width, ui.height, ui.rounded, ui.margin],
|
|
21
18
|
]"
|
|
22
19
|
>
|
|
23
20
|
<slot />
|
|
@@ -72,11 +69,11 @@ export default defineComponent({
|
|
|
72
69
|
},
|
|
73
70
|
class: {
|
|
74
71
|
type: [String, Object, Array],
|
|
75
|
-
default:
|
|
72
|
+
default: () => ""
|
|
76
73
|
},
|
|
77
74
|
ui: {
|
|
78
75
|
type: Object,
|
|
79
|
-
default:
|
|
76
|
+
default: () => ({})
|
|
80
77
|
}
|
|
81
78
|
},
|
|
82
79
|
emits: ["update:modelValue", "close"],
|
|
@@ -26,11 +26,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
26
|
};
|
|
27
27
|
class: {
|
|
28
28
|
type: PropType<any>;
|
|
29
|
-
default:
|
|
29
|
+
default: () => string;
|
|
30
30
|
};
|
|
31
31
|
ui: {
|
|
32
|
-
type: PropType<
|
|
33
|
-
default:
|
|
32
|
+
type: PropType<any>;
|
|
33
|
+
default: () => {};
|
|
34
34
|
};
|
|
35
35
|
}, {
|
|
36
36
|
ui: import("vue").ComputedRef<any>;
|
|
@@ -67,17 +67,17 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
67
67
|
};
|
|
68
68
|
class: {
|
|
69
69
|
type: PropType<any>;
|
|
70
|
-
default:
|
|
70
|
+
default: () => string;
|
|
71
71
|
};
|
|
72
72
|
ui: {
|
|
73
|
-
type: PropType<
|
|
74
|
-
default:
|
|
73
|
+
type: PropType<any>;
|
|
74
|
+
default: () => {};
|
|
75
75
|
};
|
|
76
76
|
}>> & {
|
|
77
77
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
78
78
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
79
79
|
}, {
|
|
80
|
-
ui:
|
|
80
|
+
ui: any;
|
|
81
81
|
class: any;
|
|
82
82
|
modelValue: boolean;
|
|
83
83
|
appear: boolean;
|