@xleddyl/443-components-vue 0.3.0 → 0.4.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/README.md +52 -25
- package/dist/components/core/FieldBoundary.vue +14 -0
- package/dist/components/core/FieldBoundary.vue.d.ts +15 -0
- package/dist/components/core/Form.vue +91 -12
- package/dist/components/core/Form.vue.d.ts +27 -2
- package/dist/components/core/FormAlerts.vue +30 -0
- package/dist/{internal/forms → components/core}/FormAlerts.vue.d.ts +4 -4
- package/dist/components/core/FormField.vue +18 -3
- package/dist/components/core/index.d.ts +2 -0
- package/dist/components/core/index.mjs +2 -0
- package/dist/components/data/FilterPills.vue +82 -37
- package/dist/components/data/FilterPills.vue.d.ts +46 -427
- package/dist/components/data/SelectionBar.vue +7 -4
- package/dist/components/data/Tree.vue +9 -4
- package/dist/components/data/Tree.vue.d.ts +4 -1
- package/dist/components/data/types.d.ts +7 -2
- package/dist/components/forms/CheckboxGroup.vue +2 -1
- package/dist/components/forms/FileInput.vue +98 -26
- package/dist/components/forms/FileInput.vue.d.ts +28 -10
- package/dist/components/forms/RadioGroup.vue +2 -1
- package/dist/components/forms/SegmentedControl.vue +2 -1
- package/dist/components/forms/types.d.ts +3 -0
- package/dist/components/layout/Accordion.vue.d.ts +4 -4
- package/dist/components/layout/AppShell.vue +1 -1
- package/dist/components/layout/AppShell.vue.d.ts +2 -2
- package/dist/components/layout/Tabs.vue +10 -1
- package/dist/components/layout/Tabs.vue.d.ts +4 -0
- package/dist/components/layout/types.d.ts +1 -0
- package/dist/components/overlays/CommandPalette.vue +10 -4
- package/dist/components/overlays/CommandPalette.vue.d.ts +273 -511
- package/dist/components/overlays/HoverCard.vue +1 -1
- package/dist/components/overlays/HoverCard.vue.d.ts +2 -2
- package/dist/components/overlays/Popover.vue +1 -1
- package/dist/components/overlays/Popover.vue.d.ts +2 -2
- package/dist/components/overlays/types.d.ts +7 -4
- package/dist/components/templates/DashboardLayout.vue +21 -18
- package/dist/components/templates/DashboardLayout.vue.d.ts +332 -565
- package/dist/components/templates/ListPage.vue +1 -1
- package/dist/components/templates/ListPage.vue.d.ts +3 -3
- package/dist/components/templates/types.d.ts +4 -4
- package/dist/composables/useField.d.ts +6 -1
- package/dist/composables/useField.mjs +40 -12
- package/dist/composables/useFieldBoundary.d.ts +1 -0
- package/dist/composables/useFieldBoundary.mjs +5 -1
- package/dist/composables/useFileDrop.d.ts +14 -1
- package/dist/composables/useFileDrop.mjs +21 -20
- package/dist/composables/useForm.d.ts +4 -0
- package/dist/composables/useForm.mjs +62 -22
- package/dist/editor/RichTextEditor.vue +2 -1
- package/dist/internal/core/ButtonElement.d.ts +2 -0
- package/dist/internal/core/ButtonElement.mjs +8 -0
- package/dist/internal/forms/files.d.ts +7 -0
- package/dist/internal/forms/files.mjs +24 -0
- package/dist/internal/keys.d.ts +2 -1
- package/dist/internal/keys.mjs +1 -0
- package/dist/locale/en.mjs +2 -0
- package/dist/locale/it.mjs +2 -0
- package/dist/locale/types.d.ts +2 -0
- package/dist/styles/core/button.css +1 -13
- package/dist/styles/data/avatar.css +1 -1
- package/dist/styles/data/filter-pills.css +0 -1
- package/dist/styles/data/pagination.css +0 -1
- package/dist/styles/data/selection-bar.css +4 -0
- package/dist/styles/data/stat.css +1 -6
- package/dist/styles/data/table.css +1 -3
- package/dist/styles/data/tag.css +1 -4
- package/dist/styles/data/tree.css +8 -2
- package/dist/styles/feedback/alert.css +0 -1
- package/dist/styles/feedback/empty-state.css +0 -1
- package/dist/styles/forms/color-input.css +1 -1
- package/dist/styles/forms/combobox.css +0 -1
- package/dist/styles/forms/date-picker.css +1 -1
- package/dist/styles/forms/file-input.css +9 -1
- package/dist/styles/forms/number-input.css +1 -1
- package/dist/styles/forms/password-input.css +1 -5
- package/dist/styles/forms/switch.css +0 -1
- package/dist/styles/layout/accordion.css +6 -1
- package/dist/styles/layout/card.css +1 -5
- package/dist/styles/layout/copy-button.css +2 -2
- package/dist/styles/layout/nav-link.css +1 -2
- package/dist/styles/layout/sidebar-nav.css +1 -1
- package/dist/styles/layout/sidebar.css +1 -1
- package/dist/styles/layout/tabs.css +22 -2
- package/dist/styles/layout/theme-switch.css +1 -3
- package/dist/styles/overlays/command.css +1 -1
- package/dist/styles/overlays/confirm.css +0 -1
- package/dist/styles/overlays/menu.css +2 -4
- package/dist/styles/overlays/toast.css +0 -1
- package/dist/styles/templates/auth-layout.css +0 -1
- package/dist/styles/templates/empty-page.css +3 -3
- package/dist/styles/templates/form-page.css +1 -1
- package/dist/styles/templates/page.css +1 -1
- package/dist/styles/templates/settings-modal.css +0 -1
- package/dist/styles/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/internal/forms/FormAlerts.vue +0 -25
- package/dist/internal/overlays/FieldBoundary.d.ts +0 -4
- package/dist/internal/overlays/FieldBoundary.mjs +0 -9
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
<script setup>
|
|
19
19
|
import { useTemplateRef } from "vue";
|
|
20
|
-
import FieldBoundary from "
|
|
20
|
+
import FieldBoundary from "../core/FieldBoundary.vue";
|
|
21
21
|
import { useHoverTrigger } from "../../internal/overlays/hover";
|
|
22
22
|
import { ARROW_OFFSET, syncOpenModel, useFloatingLayer } from "../../internal/floating/layer";
|
|
23
23
|
import { useSlotTrigger } from "../../internal/floating/trigger";
|
|
@@ -206,7 +206,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
206
206
|
is?: string | undefined | undefined;
|
|
207
207
|
exportparts?: string | undefined;
|
|
208
208
|
part?: string | undefined;
|
|
209
|
-
popover?: (import("
|
|
209
|
+
popover?: (import("../../index.ts").PopoverMode | "" | boolean) | undefined;
|
|
210
210
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
211
211
|
"update:open": (value: boolean) => any;
|
|
212
212
|
}, string, import("vue").PublicProps, Readonly<{
|
|
@@ -408,7 +408,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
408
408
|
is?: string | undefined | undefined;
|
|
409
409
|
exportparts?: string | undefined;
|
|
410
410
|
part?: string | undefined;
|
|
411
|
-
popover?: (import("
|
|
411
|
+
popover?: (import("../../index.ts").PopoverMode | "" | boolean) | undefined;
|
|
412
412
|
}> & Readonly<{
|
|
413
413
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
414
414
|
}>, {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
<script setup>
|
|
23
23
|
import { useId, useTemplateRef, watch } from "vue";
|
|
24
|
-
import FieldBoundary from "
|
|
24
|
+
import FieldBoundary from "../core/FieldBoundary.vue";
|
|
25
25
|
import { focusFirst } from "../../internal/overlays/focus";
|
|
26
26
|
import { ARROW_OFFSET, syncOpenModel, useFloatingLayer } from "../../internal/floating/layer";
|
|
27
27
|
import { setAttributes, useInvoker, useSlotTrigger } from "../../internal/floating/trigger";
|
|
@@ -209,7 +209,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
209
209
|
is?: string | undefined | undefined;
|
|
210
210
|
exportparts?: string | undefined;
|
|
211
211
|
part?: string | undefined;
|
|
212
|
-
popover?: (import("
|
|
212
|
+
popover?: (import("../../index.ts").PopoverMode | "" | boolean) | undefined;
|
|
213
213
|
}, {
|
|
214
214
|
show: () => void;
|
|
215
215
|
hide: () => void;
|
|
@@ -415,7 +415,7 @@ declare const __VLS_base: import("vue").DefineComponent<{
|
|
|
415
415
|
is?: string | undefined | undefined;
|
|
416
416
|
exportparts?: string | undefined;
|
|
417
417
|
part?: string | undefined;
|
|
418
|
-
popover?: (import("
|
|
418
|
+
popover?: (import("../../index.ts").PopoverMode | "" | boolean) | undefined;
|
|
419
419
|
}> & Readonly<{
|
|
420
420
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
421
421
|
}>, {
|
|
@@ -60,7 +60,7 @@ export interface MenuSeparator {
|
|
|
60
60
|
export type MenuItem = MenuActionItem | MenuCheckboxItem | MenuRadioItem;
|
|
61
61
|
export type MenuEntry = MenuItem | MenuLabel | MenuSeparator;
|
|
62
62
|
export type MenuItems = MenuEntry[] | MenuEntry[][];
|
|
63
|
-
export interface CommandItem {
|
|
63
|
+
export interface CommandItem<T = unknown> {
|
|
64
64
|
id: string;
|
|
65
65
|
label: string;
|
|
66
66
|
description?: string;
|
|
@@ -70,11 +70,14 @@ export interface CommandItem {
|
|
|
70
70
|
to?: LinkTarget;
|
|
71
71
|
href?: string;
|
|
72
72
|
disabled?: boolean;
|
|
73
|
-
|
|
73
|
+
data?: T;
|
|
74
|
+
onSelect?: (item: CommandItem<T>) => void;
|
|
74
75
|
}
|
|
75
|
-
export interface CommandGroup {
|
|
76
|
+
export interface CommandGroup<T = unknown> {
|
|
76
77
|
id: string;
|
|
77
78
|
label?: string;
|
|
78
79
|
description?: string;
|
|
79
|
-
items: CommandItem[];
|
|
80
|
+
items: CommandItem<T>[];
|
|
80
81
|
}
|
|
82
|
+
export type CommandSearch<T = unknown> = (query: string, signal: AbortSignal) => CommandGroup<T>[] | Promise<CommandGroup<T>[]>;
|
|
83
|
+
export type CommandEmptyText = string | ((query: string) => string);
|
|
@@ -45,12 +45,17 @@
|
|
|
45
45
|
:search="searchFunction"
|
|
46
46
|
:placeholder="searchProps?.placeholder ?? searchPlaceholderText"
|
|
47
47
|
>
|
|
48
|
-
<template
|
|
49
|
-
v-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
<template v-if="$slots['search-item']" #item="scope">
|
|
49
|
+
<slot name="search-item" v-bind="scope" />
|
|
50
|
+
</template>
|
|
51
|
+
<template v-if="$slots['search-empty']" #empty="scope">
|
|
52
|
+
<slot name="search-empty" v-bind="scope" />
|
|
53
|
+
</template>
|
|
54
|
+
<template v-if="$slots['search-group-label']" #group-label="scope">
|
|
55
|
+
<slot name="search-group-label" v-bind="scope" />
|
|
56
|
+
</template>
|
|
57
|
+
<template v-if="$slots['search-after-results']" #after-results="scope">
|
|
58
|
+
<slot name="search-after-results" v-bind="scope" />
|
|
54
59
|
</template>
|
|
55
60
|
</CommandPalette>
|
|
56
61
|
</slot>
|
|
@@ -138,6 +143,9 @@
|
|
|
138
143
|
:title="settingsTitleText"
|
|
139
144
|
:on-sign-out="onSignOut"
|
|
140
145
|
>
|
|
146
|
+
<template v-if="$slots['settings-account-fields']" #account-fields="scope">
|
|
147
|
+
<slot name="settings-account-fields" v-bind="scope" />
|
|
148
|
+
</template>
|
|
141
149
|
<template v-for="entry in settingsSlots" :key="entry.source" #[entry.target]="scope">
|
|
142
150
|
<slot :name="entry.source" v-bind="scope" />
|
|
143
151
|
</template>
|
|
@@ -147,7 +155,7 @@
|
|
|
147
155
|
</template>
|
|
148
156
|
|
|
149
157
|
<script setup>
|
|
150
|
-
import { computed, ref,
|
|
158
|
+
import { computed, ref, useTemplateRef } from "vue";
|
|
151
159
|
import { useLocale } from "../../composables/useLocale";
|
|
152
160
|
import { navCommands, toNavSections } from "../../internal/layout/navigation";
|
|
153
161
|
import { matchesSearch } from "../../internal/core/text";
|
|
@@ -200,6 +208,7 @@ const props = defineProps({
|
|
|
200
208
|
themeLabel: { type: String, required: false }
|
|
201
209
|
});
|
|
202
210
|
const emit = defineEmits(["accountSelect"]);
|
|
211
|
+
const slots = defineSlots();
|
|
203
212
|
const collapsed = defineModel("collapsed", { type: Boolean, ...{ default: false } });
|
|
204
213
|
const open = defineModel("open", { type: Boolean, ...{ default: false } });
|
|
205
214
|
const settingsOpen = defineModel("settingsOpen", { type: Boolean, ...{ default: false } });
|
|
@@ -212,7 +221,6 @@ const searchPlaceholderText = computed(
|
|
|
212
221
|
const navigationGroupLabel = computed(
|
|
213
222
|
() => props.searchNavigationLabel ?? t("dashboardLayout.pages")
|
|
214
223
|
);
|
|
215
|
-
const slots = useSlots();
|
|
216
224
|
const shell = useTemplateRef("shell");
|
|
217
225
|
const searchOpen = ref(false);
|
|
218
226
|
const hasDesktopTopbar = computed(
|
|
@@ -228,21 +236,16 @@ const hasSidebarFooter = computed(
|
|
|
228
236
|
const hasSettings = computed(
|
|
229
237
|
() => props.accountAction === "settings" && Boolean(props.account || props.settingsSections)
|
|
230
238
|
);
|
|
231
|
-
const
|
|
239
|
+
const SETTINGS_SLOT_PATTERN = /^settings-(section|actions)-./;
|
|
232
240
|
const settingsSlots = computed(
|
|
233
|
-
() => Object.keys(slots).filter((name) =>
|
|
241
|
+
() => Object.keys(slots).filter((name) => SETTINGS_SLOT_PATTERN.test(name)).map((name) => ({
|
|
234
242
|
source: name,
|
|
235
|
-
target: name.slice(
|
|
243
|
+
target: name.slice("settings-".length)
|
|
236
244
|
}))
|
|
237
245
|
);
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
() => Object.keys(slots).filter((name) => name.startsWith(SEARCH_SLOT_PREFIX)).map((name) => ({
|
|
241
|
-
source: name,
|
|
242
|
-
target: name.slice(SEARCH_SLOT_PREFIX.length)
|
|
243
|
-
}))
|
|
246
|
+
const navigationCommands = computed(
|
|
247
|
+
() => navCommands(toNavSections(props.navigation))
|
|
244
248
|
);
|
|
245
|
-
const navigationCommands = computed(() => navCommands(toNavSections(props.navigation)));
|
|
246
249
|
const searchFunction = computed(() => {
|
|
247
250
|
const search = props.search;
|
|
248
251
|
if (typeof search !== "function") return void 0;
|