@mapomodule/uikit 2.0.0-beta.1 → 2.0.0-beta.2
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/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +0 -17
- package/dist/module.d.mts +30 -2
- package/dist/module.d.ts +27 -2
- package/dist/module.d.ts.map +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +109 -13
- package/dist/runtime/assets/main.css +1 -0
- package/dist/runtime/components/MapoConfirmDialog.vue +33 -0
- package/dist/runtime/components/MapoConfirmDialog.vue.d.ts +4 -0
- package/dist/runtime/components/MapoConfirmDialog.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoDetail.vue +598 -0
- package/dist/runtime/components/MapoDetail.vue.d.ts +401 -0
- package/dist/runtime/components/MapoDetail.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue +126 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts +23 -0
- package/dist/runtime/components/MapoDetailLangSwitch.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoList.vue +191 -0
- package/dist/runtime/components/MapoList.vue.d.ts +111 -0
- package/dist/runtime/components/MapoList.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListActions.vue +112 -0
- package/dist/runtime/components/MapoListActions.vue.d.ts +33 -0
- package/dist/runtime/components/MapoListActions.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListFilters.vue +244 -0
- package/dist/runtime/components/MapoListFilters.vue.d.ts +38 -0
- package/dist/runtime/components/MapoListFilters.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListHead.vue +9 -0
- package/dist/runtime/components/MapoListHead.vue.d.ts +14 -0
- package/dist/runtime/components/MapoListHead.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListQuickEdit.vue +119 -0
- package/dist/runtime/components/MapoListQuickEdit.vue.d.ts +47 -0
- package/dist/runtime/components/MapoListQuickEdit.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListTable.vue +660 -0
- package/dist/runtime/components/MapoListTable.vue.d.ts +105 -0
- package/dist/runtime/components/MapoListTable.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoListTabs.vue +38 -0
- package/dist/runtime/components/MapoListTabs.vue.d.ts +26 -0
- package/dist/runtime/components/MapoListTabs.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoLogin.vue +193 -0
- package/dist/runtime/components/MapoLogin.vue.d.ts +22 -0
- package/dist/runtime/components/MapoLogin.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoLogoutButton.vue +25 -0
- package/dist/runtime/components/MapoLogoutButton.vue.d.ts +29 -0
- package/dist/runtime/components/MapoLogoutButton.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoRootComponents.vue +9 -0
- package/dist/runtime/components/MapoRootComponents.vue.d.ts +4 -0
- package/dist/runtime/components/MapoRootComponents.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebar.vue +87 -0
- package/dist/runtime/components/MapoSidebar.vue.d.ts +22 -0
- package/dist/runtime/components/MapoSidebar.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarList.vue +27 -0
- package/dist/runtime/components/MapoSidebarList.vue.d.ts +8 -0
- package/dist/runtime/components/MapoSidebarList.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarListItem.vue +74 -0
- package/dist/runtime/components/MapoSidebarListItem.vue.d.ts +9 -0
- package/dist/runtime/components/MapoSidebarListItem.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSidebarProfile.vue +51 -0
- package/dist/runtime/components/MapoSidebarProfile.vue.d.ts +10 -0
- package/dist/runtime/components/MapoSidebarProfile.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoSnackBar.vue +38 -0
- package/dist/runtime/components/MapoSnackBar.vue.d.ts +4 -0
- package/dist/runtime/components/MapoSnackBar.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoThemeToggle.vue +19 -0
- package/dist/runtime/components/MapoThemeToggle.vue.d.ts +4 -0
- package/dist/runtime/components/MapoThemeToggle.vue.d.ts.map +1 -0
- package/dist/runtime/components/MapoTopbar.vue +30 -0
- package/dist/runtime/components/MapoTopbar.vue.d.ts +15 -0
- package/dist/runtime/components/MapoTopbar.vue.d.ts.map +1 -0
- package/dist/runtime/layouts/default.vue +43 -0
- package/dist/runtime/layouts/default.vue.d.ts +20 -0
- package/dist/runtime/layouts/default.vue.d.ts.map +1 -0
- package/dist/runtime/layouts/empty.vue +9 -0
- package/dist/runtime/layouts/empty.vue.d.ts +14 -0
- package/dist/runtime/layouts/empty.vue.d.ts.map +1 -0
- package/dist/runtime/page-meta.nuxt.d.ts +45 -0
- package/dist/runtime/pages/index.vue +13 -0
- package/dist/runtime/pages/index.vue.d.ts +4 -0
- package/dist/runtime/pages/index.vue.d.ts.map +1 -0
- package/dist/runtime/pages/login.vue +7 -0
- package/dist/runtime/pages/login.vue.d.ts +4 -0
- package/dist/runtime/pages/login.vue.d.ts.map +1 -0
- package/dist/runtime/types/list.d.ts +59 -0
- package/dist/runtime/types/list.d.ts.map +1 -0
- package/dist/runtime/types/list.js +0 -0
- package/dist/types.d.mts +6 -10
- package/package.json +5 -5
- package/dist/index.d.cts +0 -2
- package/dist/module.d.cts +0 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, computed } from "vue";
|
|
3
|
+
import { useCanAccessRoute } from "@mapomodule/core/runtime/auth/useCanAccessRoute";
|
|
4
|
+
const { node, mini = false } = defineProps({
|
|
5
|
+
node: { type: Object, required: true },
|
|
6
|
+
mini: { type: Boolean, required: false }
|
|
7
|
+
});
|
|
8
|
+
const open = ref(false);
|
|
9
|
+
const hasChildren = computed(() => node.children.length > 0);
|
|
10
|
+
const canSee = computed(() => useCanAccessRoute(node.meta));
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<li v-if="canSee" class="list-none">
|
|
15
|
+
<!-- Parent item (has children) -->
|
|
16
|
+
<template v-if="hasChildren">
|
|
17
|
+
<UTooltip v-if="mini" :text="node.label" :side="'right'">
|
|
18
|
+
<button
|
|
19
|
+
class="flex w-full items-center justify-center rounded-md p-2 text-muted hover:text-default hover:bg-default/60 transition-colors"
|
|
20
|
+
@click="open = !open"
|
|
21
|
+
>
|
|
22
|
+
<UIcon :name="node.icon" class="size-4.5 shrink-0" />
|
|
23
|
+
</button>
|
|
24
|
+
</UTooltip>
|
|
25
|
+
<template v-else>
|
|
26
|
+
<button
|
|
27
|
+
class="flex w-full items-center gap-2.5 rounded-md px-2.5 py-1.5 text-sm text-muted hover:text-default hover:bg-default/60 transition-colors"
|
|
28
|
+
@click="open = !open"
|
|
29
|
+
>
|
|
30
|
+
<UIcon :name="node.icon" class="size-4.5 shrink-0" />
|
|
31
|
+
<span class="flex-1 truncate text-left font-medium">{{
|
|
32
|
+
node.label
|
|
33
|
+
}}</span>
|
|
34
|
+
<UIcon
|
|
35
|
+
:name="open ? 'i-lucide-chevron-down' : 'i-lucide-chevron-right'"
|
|
36
|
+
class="size-3.5 shrink-0 transition-transform"
|
|
37
|
+
/>
|
|
38
|
+
</button>
|
|
39
|
+
<ul
|
|
40
|
+
v-if="open"
|
|
41
|
+
class="ml-5 mt-0.5 space-y-0.5 border-l border-default/50 pl-2.5"
|
|
42
|
+
>
|
|
43
|
+
<MapoSidebarListItem
|
|
44
|
+
v-for="child in node.children"
|
|
45
|
+
:key="child.link"
|
|
46
|
+
:node="child"
|
|
47
|
+
/>
|
|
48
|
+
</ul>
|
|
49
|
+
</template>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<!-- Leaf item -->
|
|
53
|
+
<template v-else>
|
|
54
|
+
<UTooltip v-if="mini" :text="node.label" :side="'right'">
|
|
55
|
+
<NuxtLink
|
|
56
|
+
:to="node.link"
|
|
57
|
+
class="flex items-center justify-center rounded-md p-2 text-muted hover:text-default hover:bg-default/60 transition-colors"
|
|
58
|
+
active-class="bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary"
|
|
59
|
+
>
|
|
60
|
+
<UIcon :name="node.icon" class="size-4.5 shrink-0" />
|
|
61
|
+
</NuxtLink>
|
|
62
|
+
</UTooltip>
|
|
63
|
+
<NuxtLink
|
|
64
|
+
v-else
|
|
65
|
+
:to="node.link"
|
|
66
|
+
class="flex items-center gap-2.5 rounded-md px-2.5 py-1.5 text-sm text-muted hover:text-default hover:bg-default/60 transition-colors"
|
|
67
|
+
active-class="bg-primary/10 text-primary font-medium hover:bg-primary/15 hover:text-primary"
|
|
68
|
+
>
|
|
69
|
+
<UIcon :name="node.icon" class="size-4.5 shrink-0" />
|
|
70
|
+
<span class="truncate font-medium">{{ node.label }}</span>
|
|
71
|
+
</NuxtLink>
|
|
72
|
+
</template>
|
|
73
|
+
</li>
|
|
74
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MenuNode } from "@mapomodule/utils";
|
|
2
|
+
interface Props {
|
|
3
|
+
node: MenuNode;
|
|
4
|
+
mini?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
//# sourceMappingURL=MapoSidebarListItem.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoSidebarListItem.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoSidebarListItem.vue"],"names":[],"mappings":"AAoFA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,UAAU,KAAK;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAySD,QAAA,MAAM,YAAY,sRAEhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useAuthStore } from "@mapomodule/store/runtime/stores/auth";
|
|
3
|
+
import { useMapoAuth } from "@mapomodule/core/runtime/auth/useMapoAuth";
|
|
4
|
+
defineProps({
|
|
5
|
+
mini: { type: Boolean, required: false, default: false }
|
|
6
|
+
});
|
|
7
|
+
const auth = useAuthStore();
|
|
8
|
+
const { logout } = useMapoAuth();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<template v-if="auth.isAuthenticated">
|
|
13
|
+
<div
|
|
14
|
+
class="flex items-center gap-2.5 rounded-lg px-2 py-2 hover:bg-default/60 transition-colors cursor-default"
|
|
15
|
+
:class="mini ? 'justify-center' : ''"
|
|
16
|
+
>
|
|
17
|
+
<UTooltip v-if="mini" :text="auth.username ?? 'User'" side="right">
|
|
18
|
+
<UAvatar
|
|
19
|
+
:alt="auth.username ?? 'User'"
|
|
20
|
+
size="xs"
|
|
21
|
+
class="shrink-0 cursor-pointer"
|
|
22
|
+
@click="logout()"
|
|
23
|
+
/>
|
|
24
|
+
</UTooltip>
|
|
25
|
+
<template v-else>
|
|
26
|
+
<UAvatar :alt="auth.username ?? 'User'" size="xs" class="shrink-0" />
|
|
27
|
+
<span class="flex-1 text-xs truncate text-muted font-medium">{{
|
|
28
|
+
auth.username
|
|
29
|
+
}}</span>
|
|
30
|
+
<UButton
|
|
31
|
+
variant="ghost"
|
|
32
|
+
color="neutral"
|
|
33
|
+
icon="i-lucide-log-out"
|
|
34
|
+
size="xs"
|
|
35
|
+
aria-label="Logout"
|
|
36
|
+
@click="logout()"
|
|
37
|
+
/>
|
|
38
|
+
</template>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
<template v-else>
|
|
42
|
+
<NuxtLink
|
|
43
|
+
to="/login"
|
|
44
|
+
class="flex items-center gap-2.5 rounded-lg px-2 py-2 text-sm text-muted hover:bg-default/60 transition-colors"
|
|
45
|
+
:class="{ 'justify-center': mini }"
|
|
46
|
+
>
|
|
47
|
+
<UIcon name="i-lucide-log-in" class="size-4 shrink-0" />
|
|
48
|
+
<span v-if="!mini" class="text-xs font-medium">Sign in</span>
|
|
49
|
+
</NuxtLink>
|
|
50
|
+
</template>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** When true, renders a compact avatar-only version (sidebar mini mode). */
|
|
3
|
+
mini?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
mini: boolean;
|
|
7
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
//# sourceMappingURL=MapoSidebarProfile.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoSidebarProfile.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoSidebarProfile.vue"],"names":[],"mappings":"AA+DA,KAAK,WAAW,GAAG;IACf,4EAA4E;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAmNJ,QAAA,MAAM,YAAY;UApNP,OAAO;6EAuNhB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { watch } from "vue";
|
|
3
|
+
import { useSnackStore } from "@mapomodule/store/runtime/stores/snack";
|
|
4
|
+
import { useToast } from "@nuxt/ui/composables/useToast";
|
|
5
|
+
const snack = useSnackStore();
|
|
6
|
+
const toast = useToast();
|
|
7
|
+
const _shown = /* @__PURE__ */ new Set();
|
|
8
|
+
watch(
|
|
9
|
+
() => snack.messages,
|
|
10
|
+
(msgs) => {
|
|
11
|
+
if (msgs.length === 0) {
|
|
12
|
+
for (const id of _shown) toast.remove(String(id));
|
|
13
|
+
_shown.clear();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
for (const msg of msgs) {
|
|
17
|
+
if (_shown.has(msg.id)) continue;
|
|
18
|
+
_shown.add(msg.id);
|
|
19
|
+
toast.add({
|
|
20
|
+
id: String(msg.id),
|
|
21
|
+
title: msg.message,
|
|
22
|
+
color: msg.type,
|
|
23
|
+
duration: msg.duration,
|
|
24
|
+
// Nuxt UI v4 has no onClose callback: dismissal (user click or
|
|
25
|
+
// timeout) is signalled through the `update:open` emit.
|
|
26
|
+
"onUpdate:open": (open) => {
|
|
27
|
+
if (!open) snack.dismiss(msg.id);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{ deep: true }
|
|
33
|
+
);
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<!-- Nuxt UI v3: toasts are rendered by the global <Toaster> in ConfigProvider -->
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=MapoSnackBar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoSnackBar.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoSnackBar.vue"],"names":[],"mappings":"AAyFA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import { useColorMode } from "#imports";
|
|
4
|
+
const colorMode = useColorMode();
|
|
5
|
+
const isDark = computed(() => colorMode.value === "dark");
|
|
6
|
+
function toggle() {
|
|
7
|
+
colorMode.preference = isDark.value ? "light" : "dark";
|
|
8
|
+
}
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<UButton
|
|
13
|
+
:icon="isDark ? 'i-lucide-sun' : 'i-lucide-moon'"
|
|
14
|
+
variant="ghost"
|
|
15
|
+
color="neutral"
|
|
16
|
+
:aria-label="isDark ? 'Switch to light mode' : 'Switch to dark mode'"
|
|
17
|
+
@click="toggle"
|
|
18
|
+
/>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=MapoThemeToggle.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoThemeToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoThemeToggle.vue"],"names":[],"mappings":"AAmFA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useSidebarStore } from "@mapomodule/store/runtime/stores/sidebar";
|
|
3
|
+
defineSlots();
|
|
4
|
+
const sidebar = useSidebarStore();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<header
|
|
9
|
+
class="flex h-14 shrink-0 items-center gap-3 border-b border-muted bg-elevated/60 px-4 backdrop-blur-sm"
|
|
10
|
+
>
|
|
11
|
+
<UButton
|
|
12
|
+
v-if="!sidebar.drawer"
|
|
13
|
+
variant="ghost"
|
|
14
|
+
color="neutral"
|
|
15
|
+
icon="i-lucide-panel-left-open"
|
|
16
|
+
size="sm"
|
|
17
|
+
@click="sidebar.toggleDrawer()"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<slot name="left" />
|
|
21
|
+
|
|
22
|
+
<div class="flex-1">
|
|
23
|
+
<slot />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="flex items-center gap-1.5">
|
|
27
|
+
<slot name="right" />
|
|
28
|
+
</div>
|
|
29
|
+
</header>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
left(): void;
|
|
3
|
+
default(): void;
|
|
4
|
+
right(): void;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
7
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
11
|
+
new (): {
|
|
12
|
+
$slots: S;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=MapoTopbar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapoTopbar.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/components/MapoTopbar.vue"],"names":[],"mappings":"AAyCA,KAAK,WAAW,GAAG;IACjB,IAAI,IAAI,IAAI,CAAC;IACb,OAAO,IAAI,IAAI,CAAC;IAChB,KAAK,IAAI,IAAI,CAAC;CACf,CAAC;AAoFF,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
defineOptions({ name: "MapoDefaultLayout" });
|
|
3
|
+
defineSlots();
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div class="flex h-full overflow-hidden bg-default">
|
|
8
|
+
<MapoSidebar>
|
|
9
|
+
<template v-if="$slots['sidebar:logo']" #logo>
|
|
10
|
+
<slot name="sidebar:logo" />
|
|
11
|
+
</template>
|
|
12
|
+
<template v-if="$slots['sidebar:nav-top']" #nav-top>
|
|
13
|
+
<slot name="sidebar:nav-top" />
|
|
14
|
+
</template>
|
|
15
|
+
<template v-if="$slots['sidebar:nav-bottom']" #nav-bottom>
|
|
16
|
+
<slot name="sidebar:nav-bottom" />
|
|
17
|
+
</template>
|
|
18
|
+
<template v-if="$slots['sidebar:footer']" #footer>
|
|
19
|
+
<slot name="sidebar:footer" />
|
|
20
|
+
</template>
|
|
21
|
+
</MapoSidebar>
|
|
22
|
+
|
|
23
|
+
<div class="flex flex-1 flex-col min-w-0 overflow-hidden">
|
|
24
|
+
<MapoTopbar>
|
|
25
|
+
<template v-if="$slots['topbar:left']" #left>
|
|
26
|
+
<slot name="topbar:left" />
|
|
27
|
+
</template>
|
|
28
|
+
<template v-if="$slots['topbar']" #default>
|
|
29
|
+
<slot name="topbar" />
|
|
30
|
+
</template>
|
|
31
|
+
<template v-if="$slots['topbar:right']" #right>
|
|
32
|
+
<slot name="topbar:right" />
|
|
33
|
+
</template>
|
|
34
|
+
</MapoTopbar>
|
|
35
|
+
|
|
36
|
+
<main class="flex-1 overflow-y-auto">
|
|
37
|
+
<slot />
|
|
38
|
+
</main>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<MapoRootComponents />
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Slots = {
|
|
2
|
+
default(): void;
|
|
3
|
+
"sidebar:logo"(): void;
|
|
4
|
+
"sidebar:nav-top"(): void;
|
|
5
|
+
"sidebar:nav-bottom"(): void;
|
|
6
|
+
"sidebar:footer"(): void;
|
|
7
|
+
"topbar:left"(): void;
|
|
8
|
+
topbar(): void;
|
|
9
|
+
"topbar:right"(): void;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=default.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/layouts/default.vue"],"names":[],"mappings":"AA0DA,KAAK,WAAW,GAAG;IACjB,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,iBAAiB,IAAI,IAAI,CAAC;IAC1B,oBAAoB,IAAI,IAAI,CAAC;IAC7B,gBAAgB,IAAI,IAAI,CAAC;IACzB,aAAa,IAAI,IAAI,CAAC;IACtB,MAAM,IAAI,IAAI,CAAC;IACf,cAAc,IAAI,IAAI,CAAC;CACxB,CAAC;AAoIF,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=empty.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/layouts/empty.vue"],"names":[],"mappings":"AA6BA,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAG/C,QAAA,MAAM,UAAU,+QACd,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AACzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
declare module "#app" {
|
|
2
|
+
interface PageMeta {
|
|
3
|
+
/** Human-readable label shown in sidebar/navigation. Pages without a label are excluded from the menu. */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Icon name used in sidebar/navigation (e.g. 'i-lucide-user-check'). */
|
|
6
|
+
icon?: string;
|
|
7
|
+
/** Hide this page from automatic sidebar/navigation generation even if it has a label. */
|
|
8
|
+
hidden?: boolean;
|
|
9
|
+
/** Path of the parent route for nested menu grouping. */
|
|
10
|
+
parent?: string;
|
|
11
|
+
/** Pin this page to the sidebar footer instead of the main navigation list. */
|
|
12
|
+
sidebarFooter?: boolean;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module "vue-router" {
|
|
17
|
+
/**
|
|
18
|
+
* Route meta extension mirrored from Nuxt `PageMeta` so runtime route records
|
|
19
|
+
* keep the same navigation-related fields after compilation.
|
|
20
|
+
*/
|
|
21
|
+
interface RouteMeta {
|
|
22
|
+
/** Human-readable label shown in sidebar/navigation. */
|
|
23
|
+
label?: string;
|
|
24
|
+
/** Icon name used in sidebar/navigation (e.g. 'i-lucide-user-check'). */
|
|
25
|
+
icon?: string;
|
|
26
|
+
/** Hide this page from automatic sidebar/navigation generation. */
|
|
27
|
+
hidden?: boolean;
|
|
28
|
+
/** Path of the parent route for nested menu grouping. */
|
|
29
|
+
parent?: string;
|
|
30
|
+
/** Pin this page to the sidebar footer instead of the main navigation list. */
|
|
31
|
+
sidebarFooter?: boolean;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare global {
|
|
36
|
+
/**
|
|
37
|
+
* Nuxt compile-time macro used in page SFCs to define route metadata.
|
|
38
|
+
*
|
|
39
|
+
* This declaration provides package-local type support when Nuxt-generated
|
|
40
|
+
* `#imports` types are not available to the TypeScript language service.
|
|
41
|
+
*/
|
|
42
|
+
const definePageMeta: (meta: import("#app").PageMeta) => void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { version } from "../../../package.json";
|
|
3
|
+
definePageMeta({ layout: "mapo-default" });
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<template>
|
|
7
|
+
<div class="flex h-full items-center justify-center p-8">
|
|
8
|
+
<div class="space-y-4 rounded-lg border bg-white p-8 text-center shadow">
|
|
9
|
+
<h1 class="text-2xl font-bold">Mapo UI Kit</h1>
|
|
10
|
+
<p class="text-gray-600">Version {{ version }}</p>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/pages/index.vue"],"names":[],"mappings":"AAmEA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
4
|
+
//# sourceMappingURL=login.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"login.vue.d.ts","sourceRoot":"","sources":["../../../src/runtime/pages/login.vue"],"names":[],"mappings":"AAgCA,QAAA,MAAM,YAAY,+QAChB,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** Defines a single column in the list table. */
|
|
2
|
+
export interface ListColumn<T = Record<string, unknown>> {
|
|
3
|
+
/** Property name on the row object. Must be a key of `T`. */
|
|
4
|
+
key: keyof T & string;
|
|
5
|
+
label: string;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
/** CSS class applied to the `<td>` cell. */
|
|
8
|
+
class?: string;
|
|
9
|
+
}
|
|
10
|
+
/** A single selectable option inside a filter dropdown. */
|
|
11
|
+
export interface FilterChoice {
|
|
12
|
+
text: string;
|
|
13
|
+
value: unknown;
|
|
14
|
+
icon?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Describes a filter control rendered in the list filter bar. */
|
|
17
|
+
export interface FilterDescriptor {
|
|
18
|
+
/** Query parameter name sent to the backend (e.g. `"status"`, `"date_range"`). */
|
|
19
|
+
value: string;
|
|
20
|
+
/** Label displayed in the filter dropdown. */
|
|
21
|
+
text: string;
|
|
22
|
+
choices?: FilterChoice[];
|
|
23
|
+
datepicker?: boolean;
|
|
24
|
+
/** When `true`, multiple choices can be selected simultaneously (default: `false` → exclusive). */
|
|
25
|
+
multiple?: boolean;
|
|
26
|
+
/** Default value applied on mount (same format as `choice.value`; comma-separated for multi). */
|
|
27
|
+
defaultChoice?: string;
|
|
28
|
+
}
|
|
29
|
+
/** A filter descriptor with its current active selection state. */
|
|
30
|
+
export interface ActiveFilter extends FilterDescriptor {
|
|
31
|
+
active: FilterChoice[];
|
|
32
|
+
dates?: string[];
|
|
33
|
+
}
|
|
34
|
+
/** Context passed to a bulk action handler. */
|
|
35
|
+
export interface ActionContext<T = Record<string, unknown>> {
|
|
36
|
+
/** Selected row objects, or `null` when the "select all" mode is active. */
|
|
37
|
+
selection: T[] | null;
|
|
38
|
+
selectionQuery: URLSearchParams;
|
|
39
|
+
lookup: string;
|
|
40
|
+
}
|
|
41
|
+
/** Describes a bulk action available in the list actions toolbar. */
|
|
42
|
+
export interface ActionDescriptor<T = Record<string, unknown>> {
|
|
43
|
+
label: string;
|
|
44
|
+
handler: (ctx: ActionContext<T>) => Promise<unknown>;
|
|
45
|
+
permissions?: string | string[];
|
|
46
|
+
/** Action is available when individual rows are selected. Default: `true`. */
|
|
47
|
+
handleMultiple?: boolean;
|
|
48
|
+
/** Action is available when the "select all" mode is active. Default: `false`. */
|
|
49
|
+
handleAll?: boolean;
|
|
50
|
+
/** When true, Apply and confirm buttons are rendered with a destructive/error color. */
|
|
51
|
+
dangerous?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/** A single tab item used in the list tab bar to filter by a fixed value. */
|
|
54
|
+
export interface ListTabItem {
|
|
55
|
+
text: string;
|
|
56
|
+
value: string;
|
|
57
|
+
count?: number;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/runtime/types/list.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,MAAM,WAAW,UAAU,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrD,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,2DAA2D;AAC3D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iGAAiG;IACjG,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,mEAAmE;AACnE,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,+CAA+C;AAC/C,MAAM,WAAW,aAAa,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACxD,4EAA4E;IAC5E,SAAS,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,eAAe,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,qEAAqE;AACrE,MAAM,WAAW,gBAAgB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3D,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACrD,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAChC,8EAA8E;IAC9E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kFAAkF;IAClF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
|
File without changes
|
package/dist/types.d.mts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
interface RuntimeNuxtHooks extends ModuleRuntimeHooks {}
|
|
5
|
-
}
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
interface NuxtHooks extends ModuleHooks {}
|
|
9
|
-
interface RuntimeConfig extends ModuleRuntimeConfig {}
|
|
10
|
-
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
11
|
-
}
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
12
6
|
|
|
13
|
-
export
|
|
7
|
+
export { default } from './module.mjs'
|
|
8
|
+
|
|
9
|
+
export { type MapoUikitOptions } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapomodule/uikit",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.2",
|
|
4
4
|
"description": "Mapo UI components: Sidebar, Topbar, Login, SnackBar, ConfirmDialog, List, Detail, Media",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "nuxt-module-build build && vue-tsc -p tsconfig.build-types.json && node ../../../scripts/clean-empty-vue-dts.mjs dist",
|
|
42
42
|
"dev": "nuxt-module-build build --stub --watch",
|
|
43
|
-
"
|
|
43
|
+
"prepack": "pnpm build",
|
|
44
44
|
"dev:prepare": "nuxt-module-build build --stub",
|
|
45
45
|
"typecheck": "vue-tsc --noEmit",
|
|
46
46
|
"lint": "eslint src"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@mapomodule/form": "2.0.0-beta.
|
|
50
|
-
"@mapomodule/store": "2.0.0-beta.
|
|
49
|
+
"@mapomodule/form": "2.0.0-beta.2",
|
|
50
|
+
"@mapomodule/store": "2.0.0-beta.2",
|
|
51
51
|
"@mapomodule/utils": "2.0.0-beta.1",
|
|
52
|
-
"@mapomodule/core": "2.0.0-beta.
|
|
52
|
+
"@mapomodule/core": "2.0.0-beta.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@nuxt/ui": ">=4.0.0",
|
package/dist/index.d.cts
DELETED
package/dist/module.d.cts
DELETED