paket-ui 0.1.0 → 0.1.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/module.json +1 -1
- package/dist/module.mjs +7 -0
- package/dist/runtime/assets/main.css +1 -1
- package/dist/runtime/components/app.d.vue.ts +13 -0
- package/dist/runtime/components/app.vue +10 -0
- package/dist/runtime/components/app.vue.d.ts +13 -0
- package/dist/runtime/components/badge/index.js +1 -1
- package/dist/runtime/components/breadcrumb/Breadcrumb.d.vue.ts +11 -0
- package/dist/runtime/components/breadcrumb/Breadcrumb.vue +35 -0
- package/dist/runtime/components/breadcrumb/Breadcrumb.vue.d.ts +11 -0
- package/dist/runtime/components/button/Button.d.vue.ts +5 -3
- package/dist/runtime/components/button/Button.vue +3 -1
- package/dist/runtime/components/button/Button.vue.d.ts +5 -3
- package/dist/runtime/components/button/variant.d.ts +7 -1
- package/dist/runtime/components/button/variant.js +8 -2
- package/dist/runtime/components/chat/Reply.d.vue.ts +1 -1
- package/dist/runtime/components/chat/Reply.vue +2 -2
- package/dist/runtime/components/chat/Reply.vue.d.ts +1 -1
- package/dist/runtime/components/chip/Chip.vue +1 -1
- package/dist/runtime/components/combobox/Combobox.d.vue.ts +1 -1
- package/dist/runtime/components/combobox/Combobox.vue.d.ts +1 -1
- package/dist/runtime/components/dialog/DialogConfirmationSingle.d.vue.ts +2 -2
- package/dist/runtime/components/dialog/DialogConfirmationSingle.vue.d.ts +2 -2
- package/dist/runtime/components/divider/Divider.vue +3 -3
- package/dist/runtime/components/editor/Editor.vue +1 -1
- package/dist/runtime/components/editor/EditorBar.vue +2 -2
- package/dist/runtime/components/file/AddFile.vue +1 -1
- package/dist/runtime/components/file/InputMultiple.vue +1 -1
- package/dist/runtime/components/file/ViewFile.vue +1 -1
- package/dist/runtime/components/input/InputField.d.vue.ts +2 -2
- package/dist/runtime/components/input/InputField.vue.d.ts +2 -2
- package/dist/runtime/components/input/InputFieldPassword.d.vue.ts +3 -3
- package/dist/runtime/components/input/InputFieldPassword.vue.d.ts +3 -3
- package/dist/runtime/components/input/InputFileDropable.vue +1 -1
- package/dist/runtime/components/input/InputOtp.vue +1 -1
- package/dist/runtime/components/loading/LoadingIndicator.vue +1 -1
- package/dist/runtime/components/navbar/Navbar.d.vue.ts +13 -0
- package/dist/runtime/components/navbar/Navbar.vue +56 -0
- package/dist/runtime/components/navbar/Navbar.vue.d.ts +13 -0
- package/dist/runtime/components/navbar/NavbarMenus.d.vue.ts +19 -0
- package/dist/runtime/components/navbar/NavbarMenus.vue +34 -0
- package/dist/runtime/components/navbar/NavbarMenus.vue.d.ts +19 -0
- package/dist/runtime/components/navbar/NavbarSearch.d.vue.ts +18 -0
- package/dist/runtime/components/navbar/NavbarSearch.vue +78 -0
- package/dist/runtime/components/navbar/NavbarSearch.vue.d.ts +18 -0
- package/dist/runtime/components/navbar/NavbarSearchInput.d.vue.ts +133 -0
- package/dist/runtime/components/navbar/NavbarSearchInput.vue +54 -0
- package/dist/runtime/components/navbar/NavbarSearchInput.vue.d.ts +133 -0
- package/dist/runtime/components/navbar/NavbarSearchResults.d.vue.ts +11 -0
- package/dist/runtime/components/navbar/NavbarSearchResults.vue +34 -0
- package/dist/runtime/components/navbar/NavbarSearchResults.vue.d.ts +11 -0
- package/dist/runtime/components/page/Dashboard.d.vue.ts +18 -0
- package/dist/runtime/components/page/Dashboard.vue +31 -0
- package/dist/runtime/components/page/Dashboard.vue.d.ts +18 -0
- package/dist/runtime/components/page/PageHeader.d.vue.ts +26 -0
- package/dist/runtime/components/page/PageHeader.vue +60 -0
- package/dist/runtime/components/page/PageHeader.vue.d.ts +26 -0
- package/dist/runtime/components/player/Video.vue +5 -1
- package/dist/runtime/components/radio/Courier.vue +2 -2
- package/dist/runtime/components/radio/RadioCourierBadge.vue +1 -1
- package/dist/runtime/components/range-picker/RangePicker.vue +1 -1
- package/dist/runtime/components/select/Select.vue +1 -1
- package/dist/runtime/components/select/SelectWithInput.vue +1 -1
- package/dist/runtime/components/sidebar/Sidebar.d.vue.ts +26 -0
- package/dist/runtime/components/sidebar/Sidebar.vue +68 -0
- package/dist/runtime/components/sidebar/Sidebar.vue.d.ts +26 -0
- package/dist/runtime/components/sidebar/SidebarChild.d.vue.ts +8 -0
- package/dist/runtime/components/sidebar/SidebarChild.vue +64 -0
- package/dist/runtime/components/sidebar/SidebarChild.vue.d.ts +8 -0
- package/dist/runtime/components/sidebar/SidebarCollapse.d.vue.ts +6 -0
- package/dist/runtime/components/sidebar/SidebarCollapse.vue +31 -0
- package/dist/runtime/components/sidebar/SidebarCollapse.vue.d.ts +6 -0
- package/dist/runtime/components/sidebar/SidebarMenu.d.vue.ts +16 -0
- package/dist/runtime/components/sidebar/SidebarMenu.vue +20 -0
- package/dist/runtime/components/sidebar/SidebarMenu.vue.d.ts +16 -0
- package/dist/runtime/components/sidebar/SidebarParent.d.vue.ts +7 -0
- package/dist/runtime/components/sidebar/SidebarParent.vue +182 -0
- package/dist/runtime/components/sidebar/SidebarParent.vue.d.ts +7 -0
- package/dist/runtime/components/toast/ToastCard.vue +1 -1
- package/dist/runtime/components/toast/ToastContainer.vue +1 -1
- package/dist/runtime/composables/useDevice.d.ts +4 -0
- package/dist/runtime/composables/useDevice.js +10 -0
- package/dist/runtime/composables/useSidebar.d.ts +8 -0
- package/dist/runtime/composables/useSidebar.js +30 -0
- package/dist/runtime/lib/utils.d.ts +3 -5
- package/dist/runtime/lib/utils.js +5 -15
- package/dist/runtime/plugin.d.ts +15 -0
- package/dist/runtime/plugin.js +84 -2
- package/dist/runtime/types/navigation.d.ts +20 -0
- package/dist/runtime/types/navigation.js +0 -0
- package/package.json +2 -2
- package/dist/runtime/components/icon/KAFavicon.d.vue.ts +0 -3
- package/dist/runtime/components/icon/KAFavicon.vue +0 -45
- package/dist/runtime/components/icon/KAFavicon.vue.d.ts +0 -3
- package/dist/runtime/components/icon/KALogo.d.vue.ts +0 -3
- package/dist/runtime/components/icon/KALogo.vue +0 -102
- package/dist/runtime/components/icon/KALogo.vue.d.ts +0 -3
- package/dist/runtime/components/icon/KALogoMono.d.vue.ts +0 -3
- package/dist/runtime/components/icon/KALogoMono.vue +0 -70
- package/dist/runtime/components/icon/KALogoMono.vue.d.ts +0 -3
- package/dist/runtime/plugins/toast.client.d.ts +0 -17
- package/dist/runtime/plugins/toast.client.js +0 -85
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
|
+
import useSidebar from "../../composables/useSidebar";
|
|
4
|
+
const { collapsed, collapsedMobile } = useSidebar();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div
|
|
9
|
+
:class="
|
|
10
|
+
cn(
|
|
11
|
+
'bg-layer h-navbar fixed z-60 top-0 left-0 right-0 py-1.5 transform lg:grid px-2 lg:py-0 lg:pr-2.5 lg:pl-0',
|
|
12
|
+
{
|
|
13
|
+
'lg:left-14': collapsed && !collapsedMobile,
|
|
14
|
+
'lg:left-64': !collapsed && !collapsedMobile,
|
|
15
|
+
'w-full': collapsedMobile
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
"
|
|
19
|
+
>
|
|
20
|
+
<div class="container mx-auto grid">
|
|
21
|
+
<slot />
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div
|
|
25
|
+
class="hidden lg:block pointer-events-none lg:fixed top-navbar right-0 h-4 z-5"
|
|
26
|
+
:class="{
|
|
27
|
+
'lg:left-14': collapsed && !collapsedMobile,
|
|
28
|
+
'lg:left-64': !collapsed && !collapsedMobile,
|
|
29
|
+
'w-full': collapsedMobile
|
|
30
|
+
}"
|
|
31
|
+
>
|
|
32
|
+
<span
|
|
33
|
+
class="bg-surface-container-high absolute top-0 right-0 left-3.5 pointer-events-none h-px"
|
|
34
|
+
></span>
|
|
35
|
+
<svg
|
|
36
|
+
class="absolute top-0 left-0 rotate-180 text-layer"
|
|
37
|
+
width="16"
|
|
38
|
+
height="16"
|
|
39
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
40
|
+
>
|
|
41
|
+
<!-- Red filled area -->
|
|
42
|
+
<path
|
|
43
|
+
d="M 16 0 L 16 16 L 0 16 A 16 16 0 0 0 16 0 Z"
|
|
44
|
+
fill="currentColor"
|
|
45
|
+
/>
|
|
46
|
+
<!-- Border ONLY on the curve -->
|
|
47
|
+
<path
|
|
48
|
+
d="M 16 0 A 16 16 0 0 1 0 16"
|
|
49
|
+
fill="none"
|
|
50
|
+
class="text-surface-container-high"
|
|
51
|
+
stroke="currentColor"
|
|
52
|
+
stroke-width="1"
|
|
53
|
+
/>
|
|
54
|
+
</svg>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare var __VLS_13: {
|
|
2
|
+
collapsed: boolean;
|
|
3
|
+
}, __VLS_15: {}, __VLS_17: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
logo?: (props: typeof __VLS_13) => any;
|
|
6
|
+
} & {
|
|
7
|
+
search?: (props: typeof __VLS_15) => any;
|
|
8
|
+
} & {
|
|
9
|
+
shortcuts?: (props: typeof __VLS_17) => any;
|
|
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
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="grid grid-cols-4 lg:flex lg:justify-between lg:gap-10 items-center"
|
|
4
|
+
>
|
|
5
|
+
<Button
|
|
6
|
+
class="p-0 lg:hidden inline-flex border-none w-12 h-12 justify-center items-center"
|
|
7
|
+
:icon="
|
|
8
|
+
collapsedMobile ? 'material-symbols:close' : 'material-symbols:menu'
|
|
9
|
+
"
|
|
10
|
+
variant="outline"
|
|
11
|
+
@click="toggle()"
|
|
12
|
+
/>
|
|
13
|
+
|
|
14
|
+
<Link
|
|
15
|
+
:to="'/'"
|
|
16
|
+
class="col-span-2 flex justify-center items-center h-full lg:hidden"
|
|
17
|
+
>
|
|
18
|
+
<slot name="logo" :collapsed="collapsed && !collapsedMobile" />
|
|
19
|
+
</Link>
|
|
20
|
+
|
|
21
|
+
<slot name="search" />
|
|
22
|
+
|
|
23
|
+
<div class="flex justify-end items-center gap-2.5">
|
|
24
|
+
<slot name="shortcuts" />
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import Button from "../button/Button.vue";
|
|
31
|
+
import useSidebar from "../../composables/useSidebar";
|
|
32
|
+
import Link from "../link/Link.vue";
|
|
33
|
+
const { collapsed, collapsedMobile, toggle } = useSidebar();
|
|
34
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare var __VLS_13: {
|
|
2
|
+
collapsed: boolean;
|
|
3
|
+
}, __VLS_15: {}, __VLS_17: {};
|
|
4
|
+
type __VLS_Slots = {} & {
|
|
5
|
+
logo?: (props: typeof __VLS_13) => any;
|
|
6
|
+
} & {
|
|
7
|
+
search?: (props: typeof __VLS_15) => any;
|
|
8
|
+
} & {
|
|
9
|
+
shortcuts?: (props: typeof __VLS_17) => any;
|
|
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
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NavigationMenu } from '../../types/navigation.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
menus: NavigationMenu[];
|
|
4
|
+
filter?: (menu: NavigationMenu) => NavigationMenu | undefined;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_35: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
results?: (props: typeof __VLS_35) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Transition v-if="isOpen" name="page" appear>
|
|
3
|
+
<div class="fixed z-10 h-screen black-opacity"></div>
|
|
4
|
+
</Transition>
|
|
5
|
+
|
|
6
|
+
<ComboboxRoot
|
|
7
|
+
ref="search-container"
|
|
8
|
+
v-model:open="isOpen"
|
|
9
|
+
class="hidden relative lg:grid lg:grow z-20"
|
|
10
|
+
:ignore-filter="true"
|
|
11
|
+
reset-model-value-on-clear
|
|
12
|
+
>
|
|
13
|
+
<NavbarSearchInput ref="search" v-model:keyword="keyword" />
|
|
14
|
+
|
|
15
|
+
<ComboboxContent
|
|
16
|
+
class="absolute top-full w-full mt-2 bg-background dark:bg-surface-container border border-outline-variant text-onSurface rounded-lg p-4 max-h-72 overflow-auto navbarSearchItem"
|
|
17
|
+
>
|
|
18
|
+
<template v-if="keyword.length">
|
|
19
|
+
<NavbarSearchResults
|
|
20
|
+
v-if="searchedMenus.length > 0 && keyword.length > 0"
|
|
21
|
+
:menus="searchedMenus"
|
|
22
|
+
@on-select="handleEscKeyDown"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<slot name="results" />
|
|
26
|
+
</template>
|
|
27
|
+
</ComboboxContent>
|
|
28
|
+
</ComboboxRoot>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup>
|
|
32
|
+
import { useMagicKeys, whenever } from "@vueuse/core";
|
|
33
|
+
import { ComboboxContent, ComboboxRoot } from "reka-ui";
|
|
34
|
+
import { computed, ref, useTemplateRef } from "vue";
|
|
35
|
+
import NavbarSearchInput from "./NavbarSearchInput.vue";
|
|
36
|
+
import NavbarSearchResults from "./NavbarSearchResults.vue";
|
|
37
|
+
const props = defineProps({
|
|
38
|
+
menus: { type: Array, required: true },
|
|
39
|
+
filter: { type: Function, required: false }
|
|
40
|
+
});
|
|
41
|
+
const keyword = ref("");
|
|
42
|
+
const isOpen = ref(false);
|
|
43
|
+
const isFocusField = ref(false);
|
|
44
|
+
const search = useTemplateRef("search");
|
|
45
|
+
const { ctrl_k, meta_k } = useMagicKeys({
|
|
46
|
+
passive: false,
|
|
47
|
+
onEventFired: (e) => {
|
|
48
|
+
if ((e.ctrlKey || e.metaKey) && (e.key === "k" || e.key === "K") && e.type === "keydown") {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
whenever(
|
|
54
|
+
() => ctrl_k?.value || meta_k?.value || false,
|
|
55
|
+
() => isFocusField.value = true
|
|
56
|
+
);
|
|
57
|
+
const searchedMenus = computed(() => {
|
|
58
|
+
const kw = keyword.value.toLowerCase().replace(/[^a-z0-9]/gi, "");
|
|
59
|
+
return props.menus.flatMap((menu) => {
|
|
60
|
+
const subMenus = (menu.submenus ?? []).map((item) => ({
|
|
61
|
+
...item,
|
|
62
|
+
icon: menu.icon
|
|
63
|
+
}));
|
|
64
|
+
return [menu, ...subMenus];
|
|
65
|
+
}).filter((menu) => props.filter ? props.filter(menu) : menu).filter((menu) => {
|
|
66
|
+
if (menu.path === "") return;
|
|
67
|
+
const title = menu.title.toLowerCase().replace(/[^a-z0-9]/gi, "");
|
|
68
|
+
const desc = menu.description?.toLowerCase() ?? "".replace(/[^a-z0-9]/gi, "");
|
|
69
|
+
const path = menu.path?.toLowerCase();
|
|
70
|
+
return title.includes(kw) || desc.includes(kw) || path?.includes(kw);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
const handleEscKeyDown = () => {
|
|
74
|
+
keyword.value = "";
|
|
75
|
+
isOpen.value = false;
|
|
76
|
+
search.value?.inputRef?.$el.blur();
|
|
77
|
+
};
|
|
78
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { NavigationMenu } from '../../types/navigation.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
menus: NavigationMenu[];
|
|
4
|
+
filter?: (menu: NavigationMenu) => NavigationMenu | undefined;
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_35: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
results?: (props: typeof __VLS_35) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
focus?: boolean;
|
|
3
|
+
keyword: string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
6
|
+
inputRef: import("vue").Ref<({
|
|
7
|
+
$: import("vue").ComponentInternalInstance;
|
|
8
|
+
$data: {};
|
|
9
|
+
$props: {
|
|
10
|
+
readonly displayValue?: ((val: any) => string) | undefined;
|
|
11
|
+
readonly modelValue?: string | undefined;
|
|
12
|
+
readonly autoFocus?: boolean | undefined;
|
|
13
|
+
readonly disabled?: boolean | undefined;
|
|
14
|
+
readonly asChild?: boolean | undefined;
|
|
15
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
16
|
+
readonly "onUpdate:modelValue"?: ((args_0: string) => any) | undefined | undefined;
|
|
17
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
18
|
+
$attrs: {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
$refs: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
$slots: Readonly<{
|
|
25
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
28
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
29
|
+
$host: Element | null;
|
|
30
|
+
$emit: (event: "update:modelValue", args_0: string) => void;
|
|
31
|
+
$el: any;
|
|
32
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
|
|
33
|
+
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
"update:modelValue": (args_0: string) => any;
|
|
36
|
+
}, string, {
|
|
37
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
38
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
39
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
40
|
+
created?: (() => void) | (() => void)[];
|
|
41
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
42
|
+
mounted?: (() => void) | (() => void)[];
|
|
43
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
44
|
+
updated?: (() => void) | (() => void)[];
|
|
45
|
+
activated?: (() => void) | (() => void)[];
|
|
46
|
+
deactivated?: (() => void) | (() => void)[];
|
|
47
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
48
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
49
|
+
destroyed?: (() => void) | (() => void)[];
|
|
50
|
+
unmounted?: (() => void) | (() => void)[];
|
|
51
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
52
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
53
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
54
|
+
};
|
|
55
|
+
$forceUpdate: () => void;
|
|
56
|
+
$nextTick: typeof import("vue").nextTick;
|
|
57
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
58
|
+
} & Readonly<{
|
|
59
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
60
|
+
}> & Omit<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
|
|
61
|
+
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
62
|
+
}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
63
|
+
$slots: {
|
|
64
|
+
default?: (props: {}) => any;
|
|
65
|
+
};
|
|
66
|
+
}) | null, ({
|
|
67
|
+
$: import("vue").ComponentInternalInstance;
|
|
68
|
+
$data: {};
|
|
69
|
+
$props: {
|
|
70
|
+
readonly displayValue?: ((val: any) => string) | undefined;
|
|
71
|
+
readonly modelValue?: string | undefined;
|
|
72
|
+
readonly autoFocus?: boolean | undefined;
|
|
73
|
+
readonly disabled?: boolean | undefined;
|
|
74
|
+
readonly asChild?: boolean | undefined;
|
|
75
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
76
|
+
readonly "onUpdate:modelValue"?: ((args_0: string) => any) | undefined | undefined;
|
|
77
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
78
|
+
$attrs: {
|
|
79
|
+
[x: string]: unknown;
|
|
80
|
+
};
|
|
81
|
+
$refs: {
|
|
82
|
+
[x: string]: unknown;
|
|
83
|
+
};
|
|
84
|
+
$slots: Readonly<{
|
|
85
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
88
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
89
|
+
$host: Element | null;
|
|
90
|
+
$emit: (event: "update:modelValue", args_0: string) => void;
|
|
91
|
+
$el: any;
|
|
92
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
|
|
93
|
+
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
94
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
95
|
+
"update:modelValue": (args_0: string) => any;
|
|
96
|
+
}, string, {
|
|
97
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
98
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
99
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
100
|
+
created?: (() => void) | (() => void)[];
|
|
101
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
102
|
+
mounted?: (() => void) | (() => void)[];
|
|
103
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
104
|
+
updated?: (() => void) | (() => void)[];
|
|
105
|
+
activated?: (() => void) | (() => void)[];
|
|
106
|
+
deactivated?: (() => void) | (() => void)[];
|
|
107
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
108
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
109
|
+
destroyed?: (() => void) | (() => void)[];
|
|
110
|
+
unmounted?: (() => void) | (() => void)[];
|
|
111
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
112
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
113
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
114
|
+
};
|
|
115
|
+
$forceUpdate: () => void;
|
|
116
|
+
$nextTick: typeof import("vue").nextTick;
|
|
117
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
118
|
+
} & Readonly<{
|
|
119
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
120
|
+
}> & Omit<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
|
|
121
|
+
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
122
|
+
}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
123
|
+
$slots: {
|
|
124
|
+
default?: (props: {}) => any;
|
|
125
|
+
};
|
|
126
|
+
}) | null>;
|
|
127
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
128
|
+
"update:keyword": (payload: string) => any;
|
|
129
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
130
|
+
"onUpdate:keyword"?: ((payload: string) => any) | undefined;
|
|
131
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
132
|
+
declare const _default: typeof __VLS_export;
|
|
133
|
+
export default _default;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="h-10 relative transform">
|
|
3
|
+
<ComboboxInput
|
|
4
|
+
id="home-search-text-field"
|
|
5
|
+
ref="inputRef"
|
|
6
|
+
v-model.trim="keyword"
|
|
7
|
+
type="text"
|
|
8
|
+
aria-autocomplete="none"
|
|
9
|
+
autocomplete="off"
|
|
10
|
+
placeholder="Cari resi, order ID, atau menu yang ingin diakses..."
|
|
11
|
+
class="w-full focus:outline-none border rounded-xl bg-layer-inner border-surface-container-high focus:ring-1 focus:ring-primary focus:border-primary text-sm h-full pr-3.5 pl-10 placeholder-outline text-on-surface"
|
|
12
|
+
@keydown.enter.prevent
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<Icon
|
|
16
|
+
name="i-material-symbols-search"
|
|
17
|
+
size="20px"
|
|
18
|
+
class="absolute left-2 top-1/2 transform -translate-y-1/2 text-outline"
|
|
19
|
+
/>
|
|
20
|
+
|
|
21
|
+
<div
|
|
22
|
+
class="absolute right-2.5 top-1/2 transform -translate-y-1/2 flex font-medium justify-center items-center text-outline rounded text-xs"
|
|
23
|
+
:class="{
|
|
24
|
+
'pr-2': keyword.length
|
|
25
|
+
}"
|
|
26
|
+
>
|
|
27
|
+
<Icon
|
|
28
|
+
v-if="keyword.length"
|
|
29
|
+
name="i-material-symbols-close-rounded"
|
|
30
|
+
size="14px"
|
|
31
|
+
@click.prevent="keyword = ''"
|
|
32
|
+
/>
|
|
33
|
+
<span v-else>{{ isAppleDevice ? "\u2318" : "Ctrl" }} + K</span>
|
|
34
|
+
</div>
|
|
35
|
+
</section>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<script setup>
|
|
39
|
+
import { ref } from "vue";
|
|
40
|
+
import { useVModel } from "@vueuse/core";
|
|
41
|
+
import { ComboboxInput } from "reka-ui";
|
|
42
|
+
import useDevice from "../../composables/useDevice";
|
|
43
|
+
const props = defineProps({
|
|
44
|
+
focus: { type: Boolean, required: false },
|
|
45
|
+
keyword: { type: String, required: true }
|
|
46
|
+
});
|
|
47
|
+
const emits = defineEmits(["update:keyword"]);
|
|
48
|
+
const inputRef = ref(null);
|
|
49
|
+
const keyword = useVModel(props, "keyword", emits);
|
|
50
|
+
const { isAppleDevice } = useDevice();
|
|
51
|
+
defineExpose({
|
|
52
|
+
inputRef
|
|
53
|
+
});
|
|
54
|
+
</script>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
focus?: boolean;
|
|
3
|
+
keyword: string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
6
|
+
inputRef: import("vue").Ref<({
|
|
7
|
+
$: import("vue").ComponentInternalInstance;
|
|
8
|
+
$data: {};
|
|
9
|
+
$props: {
|
|
10
|
+
readonly displayValue?: ((val: any) => string) | undefined;
|
|
11
|
+
readonly modelValue?: string | undefined;
|
|
12
|
+
readonly autoFocus?: boolean | undefined;
|
|
13
|
+
readonly disabled?: boolean | undefined;
|
|
14
|
+
readonly asChild?: boolean | undefined;
|
|
15
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
16
|
+
readonly "onUpdate:modelValue"?: ((args_0: string) => any) | undefined | undefined;
|
|
17
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
18
|
+
$attrs: {
|
|
19
|
+
[x: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
$refs: {
|
|
22
|
+
[x: string]: unknown;
|
|
23
|
+
};
|
|
24
|
+
$slots: Readonly<{
|
|
25
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
28
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
29
|
+
$host: Element | null;
|
|
30
|
+
$emit: (event: "update:modelValue", args_0: string) => void;
|
|
31
|
+
$el: any;
|
|
32
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
|
|
33
|
+
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
"update:modelValue": (args_0: string) => any;
|
|
36
|
+
}, string, {
|
|
37
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
38
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
39
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
40
|
+
created?: (() => void) | (() => void)[];
|
|
41
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
42
|
+
mounted?: (() => void) | (() => void)[];
|
|
43
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
44
|
+
updated?: (() => void) | (() => void)[];
|
|
45
|
+
activated?: (() => void) | (() => void)[];
|
|
46
|
+
deactivated?: (() => void) | (() => void)[];
|
|
47
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
48
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
49
|
+
destroyed?: (() => void) | (() => void)[];
|
|
50
|
+
unmounted?: (() => void) | (() => void)[];
|
|
51
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
52
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
53
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
54
|
+
};
|
|
55
|
+
$forceUpdate: () => void;
|
|
56
|
+
$nextTick: typeof import("vue").nextTick;
|
|
57
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
58
|
+
} & Readonly<{
|
|
59
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
60
|
+
}> & Omit<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
|
|
61
|
+
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
62
|
+
}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
63
|
+
$slots: {
|
|
64
|
+
default?: (props: {}) => any;
|
|
65
|
+
};
|
|
66
|
+
}) | null, ({
|
|
67
|
+
$: import("vue").ComponentInternalInstance;
|
|
68
|
+
$data: {};
|
|
69
|
+
$props: {
|
|
70
|
+
readonly displayValue?: ((val: any) => string) | undefined;
|
|
71
|
+
readonly modelValue?: string | undefined;
|
|
72
|
+
readonly autoFocus?: boolean | undefined;
|
|
73
|
+
readonly disabled?: boolean | undefined;
|
|
74
|
+
readonly asChild?: boolean | undefined;
|
|
75
|
+
readonly as?: (import("reka-ui").AsTag | import("vue").Component) | undefined;
|
|
76
|
+
readonly "onUpdate:modelValue"?: ((args_0: string) => any) | undefined | undefined;
|
|
77
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
78
|
+
$attrs: {
|
|
79
|
+
[x: string]: unknown;
|
|
80
|
+
};
|
|
81
|
+
$refs: {
|
|
82
|
+
[x: string]: unknown;
|
|
83
|
+
};
|
|
84
|
+
$slots: Readonly<{
|
|
85
|
+
[name: string]: import("vue").Slot<any> | undefined;
|
|
86
|
+
}>;
|
|
87
|
+
$root: import("vue").ComponentPublicInstance | null;
|
|
88
|
+
$parent: import("vue").ComponentPublicInstance | null;
|
|
89
|
+
$host: Element | null;
|
|
90
|
+
$emit: (event: "update:modelValue", args_0: string) => void;
|
|
91
|
+
$el: any;
|
|
92
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
|
|
93
|
+
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
94
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
95
|
+
"update:modelValue": (args_0: string) => any;
|
|
96
|
+
}, string, {
|
|
97
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
98
|
+
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & {
|
|
99
|
+
beforeCreate?: (() => void) | (() => void)[];
|
|
100
|
+
created?: (() => void) | (() => void)[];
|
|
101
|
+
beforeMount?: (() => void) | (() => void)[];
|
|
102
|
+
mounted?: (() => void) | (() => void)[];
|
|
103
|
+
beforeUpdate?: (() => void) | (() => void)[];
|
|
104
|
+
updated?: (() => void) | (() => void)[];
|
|
105
|
+
activated?: (() => void) | (() => void)[];
|
|
106
|
+
deactivated?: (() => void) | (() => void)[];
|
|
107
|
+
beforeDestroy?: (() => void) | (() => void)[];
|
|
108
|
+
beforeUnmount?: (() => void) | (() => void)[];
|
|
109
|
+
destroyed?: (() => void) | (() => void)[];
|
|
110
|
+
unmounted?: (() => void) | (() => void)[];
|
|
111
|
+
renderTracked?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
112
|
+
renderTriggered?: ((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[];
|
|
113
|
+
errorCaptured?: ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance | null, info: string) => boolean | void)[];
|
|
114
|
+
};
|
|
115
|
+
$forceUpdate: () => void;
|
|
116
|
+
$nextTick: typeof import("vue").nextTick;
|
|
117
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import("@vue/reactivity").OnCleanup]) => any : (...args: [any, any, import("@vue/reactivity").OnCleanup]) => any, options?: import("vue").WatchOptions): import("vue").WatchStopHandle;
|
|
118
|
+
} & Readonly<{
|
|
119
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
120
|
+
}> & Omit<Readonly<import("reka-ui").ComboboxInputProps> & Readonly<{
|
|
121
|
+
"onUpdate:modelValue"?: ((args_0: string) => any) | undefined;
|
|
122
|
+
}>, "as"> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {} & {
|
|
123
|
+
$slots: {
|
|
124
|
+
default?: (props: {}) => any;
|
|
125
|
+
};
|
|
126
|
+
}) | null>;
|
|
127
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
128
|
+
"update:keyword": (payload: string) => any;
|
|
129
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
130
|
+
"onUpdate:keyword"?: ((payload: string) => any) | undefined;
|
|
131
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
132
|
+
declare const _default: typeof __VLS_export;
|
|
133
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { NavigationMenu } from '../../types/navigation.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
menus: NavigationMenu[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
onSelect: () => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onOnSelect?: (() => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ComboboxGroup, ComboboxItem, ComboboxLabel } from "reka-ui";
|
|
3
|
+
import { navigateTo } from "#imports";
|
|
4
|
+
defineProps({
|
|
5
|
+
menus: { type: Array, required: true }
|
|
6
|
+
});
|
|
7
|
+
const emits = defineEmits(["onSelect"]);
|
|
8
|
+
const handleSelect = (ev, value) => {
|
|
9
|
+
ev.preventDefault();
|
|
10
|
+
emits("onSelect");
|
|
11
|
+
navigateTo(value);
|
|
12
|
+
};
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<ComboboxGroup>
|
|
17
|
+
<ComboboxLabel class="font-medium mb-3"> Akses Cepat </ComboboxLabel>
|
|
18
|
+
<ComboboxItem
|
|
19
|
+
v-for="(menu, index) in menus"
|
|
20
|
+
:key="index"
|
|
21
|
+
:value="menu.title"
|
|
22
|
+
class="flex gap-3 p-3 cursor-pointer rounded-lg relative text-sm font-semibold data-highlighted:bg-surface-container-high"
|
|
23
|
+
@select="(ev) => handleSelect(ev, menu.path)"
|
|
24
|
+
>
|
|
25
|
+
<Icon :name="menu.icon?.DEFAULT ?? ''" size="24px" />
|
|
26
|
+
<div>
|
|
27
|
+
<div class="flex items-center gap-2">
|
|
28
|
+
<span>{{ menu.title }}</span>
|
|
29
|
+
</div>
|
|
30
|
+
<p class="text-onSurfaceVariant font-normal">{{ menu.description }}</p>
|
|
31
|
+
</div>
|
|
32
|
+
</ComboboxItem>
|
|
33
|
+
</ComboboxGroup>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { NavigationMenu } from '../../types/navigation.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
menus: NavigationMenu[];
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
6
|
+
onSelect: () => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onOnSelect?: (() => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|