abckit 0.0.10 → 0.0.12
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.d.mts +16 -1
- package/dist/module.mjs +5 -5
- package/dist/runtime/components/app/AppBreadcrumbs.vue +1 -2
- package/dist/runtime/components/app/AppHeader.vue +2 -2
- package/dist/runtime/components/app/AppNavMain.d.vue.ts +1 -2
- package/dist/runtime/components/app/AppNavMain.vue +4 -4
- package/dist/runtime/components/app/AppNavMain.vue.d.ts +1 -2
- package/dist/runtime/components/ui/accordion/AccordionTrigger.vue +3 -2
- package/dist/runtime/components/ui/auto-form/AutoFormFieldArray.vue +3 -3
- package/dist/runtime/components/ui/auto-form/AutoFormFieldDate.vue +2 -2
- package/dist/runtime/components/ui/auto-form/AutoFormFieldFile.vue +2 -2
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbEllipsis.vue +2 -2
- package/dist/runtime/components/ui/breadcrumb/BreadcrumbSeparator.vue +2 -2
- package/dist/runtime/components/ui/calendar/CalendarNextButton.vue +2 -2
- package/dist/runtime/components/ui/calendar/CalendarPrevButton.vue +2 -2
- package/dist/runtime/components/ui/carousel/CarouselNext.vue +2 -2
- package/dist/runtime/components/ui/carousel/CarouselPrevious.vue +2 -2
- package/dist/runtime/components/ui/checkbox/Checkbox.vue +2 -2
- package/dist/runtime/components/ui/combobox/ComboboxInput.vue +2 -2
- package/dist/runtime/components/ui/command/CommandInput.vue +2 -2
- package/dist/runtime/components/ui/context-menu/ContextMenuCheckboxItem.vue +2 -2
- package/dist/runtime/components/ui/context-menu/ContextMenuRadioItem.vue +2 -2
- package/dist/runtime/components/ui/context-menu/ContextMenuSubTrigger.vue +2 -2
- package/dist/runtime/components/ui/dialog/DialogContent.vue +2 -2
- package/dist/runtime/components/ui/dialog/DialogScrollContent.vue +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +2 -2
- package/dist/runtime/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +2 -2
- package/dist/runtime/components/ui/file/FileEmptyState.vue +3 -3
- package/dist/runtime/components/ui/file/FileGrid.vue +10 -10
- package/dist/runtime/components/ui/file/FileTable.vue +16 -17
- package/dist/runtime/components/ui/input-otp/InputOTPSeparator.vue +2 -2
- package/dist/runtime/components/ui/menubar/MenubarCheckboxItem.vue +2 -2
- package/dist/runtime/components/ui/menubar/MenubarRadioItem.vue +2 -2
- package/dist/runtime/components/ui/menubar/MenubarSubTrigger.vue +2 -2
- package/dist/runtime/components/ui/native-select/NativeSelect.vue +3 -2
- package/dist/runtime/components/ui/navigation-menu/NavigationMenuTrigger.vue +3 -2
- package/dist/runtime/components/ui/number-field/NumberFieldDecrement.vue +2 -2
- package/dist/runtime/components/ui/number-field/NumberFieldIncrement.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationEllipsis.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationFirst.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationLast.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationNext.vue +2 -2
- package/dist/runtime/components/ui/pagination/PaginationPrevious.vue +2 -2
- package/dist/runtime/components/ui/pin-input/PinInputSeparator.vue +2 -2
- package/dist/runtime/components/ui/radio-group/RadioGroupItem.vue +2 -2
- package/dist/runtime/components/ui/range-calendar/RangeCalendarNextButton.vue +2 -2
- package/dist/runtime/components/ui/range-calendar/RangeCalendarPrevButton.vue +2 -2
- package/dist/runtime/components/ui/resizable/ResizableHandle.vue +2 -2
- package/dist/runtime/components/ui/select/SelectItem.vue +2 -2
- package/dist/runtime/components/ui/select/SelectScrollDownButton.vue +2 -2
- package/dist/runtime/components/ui/select/SelectScrollUpButton.vue +2 -2
- package/dist/runtime/components/ui/select/SelectTrigger.vue +2 -2
- package/dist/runtime/components/ui/sheet/InnerSheetContent.vue +2 -2
- package/dist/runtime/components/ui/sheet/SheetContent.vue +2 -2
- package/dist/runtime/components/ui/sidebar/SidebarTrigger.vue +2 -2
- package/dist/runtime/components/ui/sonner/Sonner.vue +7 -7
- package/dist/runtime/components/ui/spinner/Spinner.vue +3 -2
- package/dist/runtime/components/ui/storage/StorageActionBar.vue +3 -4
- package/dist/runtime/components/ui/storage/StorageEmptyState.vue +3 -4
- package/dist/runtime/components/ui/storage/StorageGrid.vue +10 -11
- package/dist/runtime/components/ui/storage/StorageSelectionBar.vue +3 -3
- package/dist/runtime/components/ui/storage/StorageTable.vue +10 -11
- package/dist/runtime/components/ui/storage/StorageUploadZone.vue +5 -4
- package/dist/runtime/components/ui/tags-input/TagsInputItemDelete.vue +2 -2
- package/dist/runtime/composables/useAuth.d.ts +982 -1813
- package/dist/runtime/composables/useAuth.js +27 -9
- package/dist/runtime/shared/constants/r2.js +12 -6
- package/dist/runtime/types/nitro-graphql-client.d.ts +0 -1
- package/dist/types.d.mts +1 -1
- package/package.json +13 -14
package/dist/module.d.mts
CHANGED
|
@@ -27,12 +27,24 @@ interface SetupConfig {
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
interface AuthClientOptions {
|
|
31
|
+
/**
|
|
32
|
+
* Base URL for Better Auth client
|
|
33
|
+
* Required for Capacitor/mobile apps where the default URL is not http/https
|
|
34
|
+
* @example 'https://api.example.com'
|
|
35
|
+
*/
|
|
36
|
+
baseURL?: string;
|
|
37
|
+
}
|
|
30
38
|
interface ModuleOptions {
|
|
31
39
|
/**
|
|
32
40
|
* Enable Sentry user tracking in useAuth composable
|
|
33
41
|
* @default false
|
|
34
42
|
*/
|
|
35
43
|
sentry?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Better Auth client configuration
|
|
46
|
+
*/
|
|
47
|
+
auth?: AuthClientOptions;
|
|
36
48
|
}
|
|
37
49
|
declare module 'nuxt/schema' {
|
|
38
50
|
interface AppConfig extends BreadcrumbsConfig, SetupConfig {
|
|
@@ -77,10 +89,13 @@ declare module 'nuxt/schema' {
|
|
|
77
89
|
};
|
|
78
90
|
abckit: {
|
|
79
91
|
sentry: boolean;
|
|
92
|
+
auth: {
|
|
93
|
+
baseURL?: string;
|
|
94
|
+
};
|
|
80
95
|
};
|
|
81
96
|
}
|
|
82
97
|
}
|
|
83
98
|
declare const _default: nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
84
99
|
|
|
85
100
|
export { _default as default };
|
|
86
|
-
export type { BreadcrumbsConfig, ModuleOptions, SetupConfig };
|
|
101
|
+
export type { AuthClientOptions, BreadcrumbsConfig, ModuleOptions, SetupConfig };
|
package/dist/module.mjs
CHANGED
|
@@ -27,11 +27,12 @@ const module$1 = defineNuxtModule({
|
|
|
27
27
|
}),
|
|
28
28
|
async setup(options, nuxt) {
|
|
29
29
|
const { resolve } = createResolver(import.meta.url);
|
|
30
|
-
nuxt.options.runtimeConfig.public =
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
nuxt.options.runtimeConfig.public.abckit = {
|
|
31
|
+
sentry: nuxt.options.runtimeConfig.public.abckit?.sentry ?? options.sentry ?? false,
|
|
32
|
+
auth: {
|
|
33
|
+
baseURL: nuxt.options.runtimeConfig.public.abckit?.auth?.baseURL ?? options.auth?.baseURL
|
|
33
34
|
}
|
|
34
|
-
}
|
|
35
|
+
};
|
|
35
36
|
nuxt.options.runtimeConfig.dragonfly = defu(nuxt.options.runtimeConfig.dragonfly, {
|
|
36
37
|
host: "dragonfly",
|
|
37
38
|
port: Number.parseInt("6379", 10),
|
|
@@ -212,7 +213,6 @@ export {}
|
|
|
212
213
|
excludeSet.add("zod");
|
|
213
214
|
excludeSet.add("date-fns");
|
|
214
215
|
excludeSet.add("date-fns/locale");
|
|
215
|
-
excludeSet.add("lucide-vue-next");
|
|
216
216
|
excludeSet.add("class-variance-authority");
|
|
217
217
|
excludeSet.add("reka-ui");
|
|
218
218
|
excludeSet.add("clsx");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { useAppConfig
|
|
2
|
+
import { useAppConfig } from "#app";
|
|
3
3
|
import { NuxtLink } from "#components";
|
|
4
4
|
import { useBreadcrumbItems } from "abckit/composables/useBreadcrumbItems";
|
|
5
5
|
import {
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
BreadcrumbSeparator
|
|
12
12
|
} from "abckit/shadcn/breadcrumb";
|
|
13
13
|
import { computed } from "vue";
|
|
14
|
-
const route = useRoute();
|
|
15
14
|
const appConfig = useAppConfig();
|
|
16
15
|
const breadcrumbConfig = computed(() => appConfig.breadcrumbs || {});
|
|
17
16
|
const baseUrl = computed(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { Icon } from "#components";
|
|
2
3
|
import { SidebarMenuButton, useSidebar } from "abckit/shadcn/sidebar";
|
|
3
|
-
import { Shield } from "lucide-vue-next";
|
|
4
4
|
const props = defineProps({
|
|
5
5
|
tenant: { type: Object, required: false }
|
|
6
6
|
});
|
|
@@ -13,7 +13,7 @@ const { state } = useSidebar();
|
|
|
13
13
|
class="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
|
|
14
14
|
>
|
|
15
15
|
<div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground">
|
|
16
|
-
<
|
|
16
|
+
<Icon name="lucide:shield" class="h-4 w-4" />
|
|
17
17
|
</div>
|
|
18
18
|
<div
|
|
19
19
|
v-show="state !== 'collapsed'"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { Icon } from "#components";
|
|
2
3
|
import {
|
|
3
4
|
Collapsible,
|
|
4
5
|
CollapsibleContent,
|
|
@@ -14,7 +15,6 @@ import {
|
|
|
14
15
|
SidebarMenuSubButton,
|
|
15
16
|
SidebarMenuSubItem
|
|
16
17
|
} from "abckit/shadcn/sidebar";
|
|
17
|
-
import { ChevronRight } from "lucide-vue-next";
|
|
18
18
|
defineProps({
|
|
19
19
|
items: { type: Array, required: true },
|
|
20
20
|
label: { type: String, required: false }
|
|
@@ -38,7 +38,7 @@ defineProps({
|
|
|
38
38
|
<template v-if="!item.items">
|
|
39
39
|
<SidebarMenuButton as-child :tooltip="item.title">
|
|
40
40
|
<NuxtLink :to="item.url">
|
|
41
|
-
<
|
|
41
|
+
<Icon v-if="item.icon" :name="item.icon" />
|
|
42
42
|
<span>{{ item.title }}</span>
|
|
43
43
|
</NuxtLink>
|
|
44
44
|
</SidebarMenuButton>
|
|
@@ -46,9 +46,9 @@ defineProps({
|
|
|
46
46
|
<template v-else>
|
|
47
47
|
<CollapsibleTrigger as-child>
|
|
48
48
|
<SidebarMenuButton :tooltip="item.title">
|
|
49
|
-
<
|
|
49
|
+
<Icon v-if="item.icon" :name="item.icon" />
|
|
50
50
|
<span>{{ item.title }}</span>
|
|
51
|
-
<
|
|
51
|
+
<Icon name="lucide:chevron-right" class="ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" />
|
|
52
52
|
</SidebarMenuButton>
|
|
53
53
|
</CollapsibleTrigger>
|
|
54
54
|
<CollapsibleContent>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
AccordionHeader,
|
|
6
6
|
AccordionTrigger
|
|
@@ -28,7 +28,8 @@ const delegatedProps = reactiveOmit(props, "class");
|
|
|
28
28
|
>
|
|
29
29
|
<slot />
|
|
30
30
|
<slot name="icon">
|
|
31
|
-
<
|
|
31
|
+
<Icon
|
|
32
|
+
name="lucide:chevron-down"
|
|
32
33
|
class="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"
|
|
33
34
|
/>
|
|
34
35
|
</slot>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { Button } from "abckit/shadcn/button";
|
|
3
3
|
import { FormItem, FormMessage } from "abckit/shadcn/form";
|
|
4
|
-
import {
|
|
4
|
+
import { Icon } from "#components";
|
|
5
5
|
import { FieldArray, FieldContextKey, useField } from "vee-validate";
|
|
6
6
|
import { computed, provide } from "vue";
|
|
7
7
|
import * as z from "zod";
|
|
@@ -95,7 +95,7 @@ function getEmptyValueForZodType(schema) {
|
|
|
95
95
|
class="h-8 w-8 p-0 text-destructive hover:text-destructive"
|
|
96
96
|
@click="remove(index)"
|
|
97
97
|
>
|
|
98
|
-
<
|
|
98
|
+
<Icon name="lucide:trash" class="size-3.5" />
|
|
99
99
|
</Button>
|
|
100
100
|
</div>
|
|
101
101
|
|
|
@@ -116,7 +116,7 @@ function getEmptyValueForZodType(schema) {
|
|
|
116
116
|
:disabled="disabled"
|
|
117
117
|
@click="push(getEmptyValueForZodType(itemShape?.schema))"
|
|
118
118
|
>
|
|
119
|
-
<
|
|
119
|
+
<Icon name="lucide:plus" class="size-4" />
|
|
120
120
|
{{ `Add ${beautifyObjectName(fieldName.replace(/s$/, ""))}` }}
|
|
121
121
|
</Button>
|
|
122
122
|
</div>
|
|
@@ -5,7 +5,7 @@ import { Calendar } from "abckit/shadcn/calendar";
|
|
|
5
5
|
import { FormControl, FormDescription, FormField, FormItem, FormMessage } from "abckit/shadcn/form";
|
|
6
6
|
import { Popover, PopoverContent, PopoverTrigger } from "abckit/shadcn/popover";
|
|
7
7
|
import { DateFormatter, getLocalTimeZone } from "@internationalized/date";
|
|
8
|
-
import {
|
|
8
|
+
import { Icon } from "#components";
|
|
9
9
|
import AutoFormLabel from "./AutoFormLabel.vue";
|
|
10
10
|
import { beautifyObjectName, maybeBooleanishToBoolean } from "./utils";
|
|
11
11
|
defineProps({
|
|
@@ -38,7 +38,7 @@ const df = new DateFormatter("en-US", {
|
|
|
38
38
|
!slotProps.componentField.modelValue && 'text-muted-foreground'
|
|
39
39
|
)"
|
|
40
40
|
>
|
|
41
|
-
<
|
|
41
|
+
<Icon name="lucide:calendar" class="mr-2 h-4 w-4" />
|
|
42
42
|
{{ slotProps.componentField.modelValue ? df.format(slotProps.componentField.modelValue.toDate(getLocalTimeZone())) : "Pick a date" }}
|
|
43
43
|
</Button>
|
|
44
44
|
</PopoverTrigger>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Button } from "abckit/shadcn/button";
|
|
3
3
|
import { FormControl, FormDescription, FormField, FormItem, FormMessage } from "abckit/shadcn/form";
|
|
4
4
|
import { Input } from "abckit/shadcn/input";
|
|
5
|
-
import {
|
|
5
|
+
import { Icon } from "#components";
|
|
6
6
|
import { ref } from "vue";
|
|
7
7
|
import AutoFormLabel from "./AutoFormLabel.vue";
|
|
8
8
|
import { beautifyObjectName } from "./utils";
|
|
@@ -63,7 +63,7 @@ async function parseFileAsString(file) {
|
|
|
63
63
|
slotProps.componentField.onInput(void 0);
|
|
64
64
|
}"
|
|
65
65
|
>
|
|
66
|
-
<
|
|
66
|
+
<Icon name="lucide:trash" />
|
|
67
67
|
</Button>
|
|
68
68
|
</div>
|
|
69
69
|
</slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "#components";
|
|
3
3
|
import { cn } from "abckit/utils";
|
|
4
4
|
const props = defineProps({
|
|
5
5
|
class: { type: null, required: false }
|
|
@@ -14,7 +14,7 @@ const props = defineProps({
|
|
|
14
14
|
:class="cn('flex size-9 items-center justify-center', props.class)"
|
|
15
15
|
>
|
|
16
16
|
<slot>
|
|
17
|
-
<
|
|
17
|
+
<Icon name="lucide:more-horizontal" class="size-4" />
|
|
18
18
|
</slot>
|
|
19
19
|
<span class="sr-only">More</span>
|
|
20
20
|
</span>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "#components";
|
|
3
3
|
import { cn } from "abckit/utils";
|
|
4
4
|
const props = defineProps({
|
|
5
5
|
class: { type: null, required: false }
|
|
@@ -14,7 +14,7 @@ const props = defineProps({
|
|
|
14
14
|
:class="cn('[&>svg]:size-3.5', props.class)"
|
|
15
15
|
>
|
|
16
16
|
<slot>
|
|
17
|
-
<
|
|
17
|
+
<Icon name="lucide:chevron-right" />
|
|
18
18
|
</slot>
|
|
19
19
|
</li>
|
|
20
20
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import { CalendarNext, useForwardProps } from "reka-ui";
|
|
5
5
|
import { cn } from "abckit/utils";
|
|
6
6
|
import { buttonVariants } from "abckit/shadcn/button";
|
|
@@ -25,7 +25,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
25
25
|
v-bind="forwardedProps"
|
|
26
26
|
>
|
|
27
27
|
<slot>
|
|
28
|
-
<
|
|
28
|
+
<Icon name="lucide:chevron-right" class="size-4" />
|
|
29
29
|
</slot>
|
|
30
30
|
</CalendarNext>
|
|
31
31
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import { CalendarPrev, useForwardProps } from "reka-ui";
|
|
5
5
|
import { cn } from "abckit/utils";
|
|
6
6
|
import { buttonVariants } from "abckit/shadcn/button";
|
|
@@ -25,7 +25,7 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
25
25
|
v-bind="forwardedProps"
|
|
26
26
|
>
|
|
27
27
|
<slot>
|
|
28
|
-
<
|
|
28
|
+
<Icon name="lucide:chevron-left" class="size-4" />
|
|
29
29
|
</slot>
|
|
30
30
|
</CalendarPrev>
|
|
31
31
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "#components";
|
|
3
3
|
import { cn } from "abckit/utils";
|
|
4
4
|
import { Button } from "abckit/shadcn/button";
|
|
5
5
|
import { useCarousel } from "./useCarousel";
|
|
@@ -25,7 +25,7 @@ const { orientation, canScrollNext, scrollNext } = useCarousel();
|
|
|
25
25
|
@click="scrollNext"
|
|
26
26
|
>
|
|
27
27
|
<slot>
|
|
28
|
-
<
|
|
28
|
+
<Icon name="lucide:arrow-right" />
|
|
29
29
|
<span class="sr-only">Next Slide</span>
|
|
30
30
|
</slot>
|
|
31
31
|
</Button>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "#components";
|
|
3
3
|
import { cn } from "abckit/utils";
|
|
4
4
|
import { Button } from "abckit/shadcn/button";
|
|
5
5
|
import { useCarousel } from "./useCarousel";
|
|
@@ -25,7 +25,7 @@ const { orientation, canScrollPrev, scrollPrev } = useCarousel();
|
|
|
25
25
|
@click="scrollPrev"
|
|
26
26
|
>
|
|
27
27
|
<slot>
|
|
28
|
-
<
|
|
28
|
+
<Icon name="lucide:arrow-left" />
|
|
29
29
|
<span class="sr-only">Previous Slide</span>
|
|
30
30
|
</slot>
|
|
31
31
|
</Button>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from "reka-ui";
|
|
5
5
|
import { cn } from "abckit/utils";
|
|
6
6
|
const props = defineProps({
|
|
@@ -37,7 +37,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
37
37
|
class="grid place-content-center text-current transition-none"
|
|
38
38
|
>
|
|
39
39
|
<slot v-bind="slotProps">
|
|
40
|
-
<
|
|
40
|
+
<Icon name="lucide:check" class="size-3.5" />
|
|
41
41
|
</slot>
|
|
42
42
|
</CheckboxIndicator>
|
|
43
43
|
</CheckboxRoot>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import { ComboboxInput, useForwardPropsEmits } from "reka-ui";
|
|
5
5
|
import { cn } from "abckit/utils";
|
|
6
6
|
defineOptions({
|
|
@@ -25,7 +25,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
25
25
|
data-slot="command-input-wrapper"
|
|
26
26
|
class="flex h-9 items-center gap-2 border-b px-3"
|
|
27
27
|
>
|
|
28
|
-
<
|
|
28
|
+
<Icon name="lucide:search" class="size-4 shrink-0 opacity-50" />
|
|
29
29
|
<ComboboxInput
|
|
30
30
|
data-slot="command-input"
|
|
31
31
|
:class="cn(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import { ListboxFilter, useForwardProps } from "reka-ui";
|
|
5
5
|
import { cn } from "abckit/utils";
|
|
6
6
|
import { useCommand } from ".";
|
|
@@ -25,7 +25,7 @@ const { filterState } = useCommand();
|
|
|
25
25
|
data-slot="command-input-wrapper"
|
|
26
26
|
class="flex h-9 items-center gap-2 border-b px-3"
|
|
27
27
|
>
|
|
28
|
-
<
|
|
28
|
+
<Icon name="lucide:search" class="size-4 shrink-0 opacity-50" />
|
|
29
29
|
<ListboxFilter
|
|
30
30
|
v-bind="{ ...forwardedProps, ...$attrs }"
|
|
31
31
|
v-model="filterState.search"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
ContextMenuCheckboxItem,
|
|
6
6
|
ContextMenuItemIndicator,
|
|
@@ -32,7 +32,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
32
32
|
<span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
33
33
|
<ContextMenuItemIndicator>
|
|
34
34
|
<slot name="indicator-icon">
|
|
35
|
-
<
|
|
35
|
+
<Icon name="lucide:check" class="size-4" />
|
|
36
36
|
</slot>
|
|
37
37
|
</ContextMenuItemIndicator>
|
|
38
38
|
</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
ContextMenuItemIndicator,
|
|
6
6
|
ContextMenuRadioItem,
|
|
@@ -32,7 +32,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
32
32
|
<span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
33
33
|
<ContextMenuItemIndicator>
|
|
34
34
|
<slot name="indicator-icon">
|
|
35
|
-
<
|
|
35
|
+
<Icon name="lucide:circle" class="size-2 fill-current" />
|
|
36
36
|
</slot>
|
|
37
37
|
</ContextMenuItemIndicator>
|
|
38
38
|
</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
ContextMenuSubTrigger,
|
|
6
6
|
useForwardProps
|
|
@@ -29,6 +29,6 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
29
29
|
)"
|
|
30
30
|
>
|
|
31
31
|
<slot />
|
|
32
|
-
<
|
|
32
|
+
<Icon name="lucide:chevron-right" class="ml-auto" />
|
|
33
33
|
</ContextMenuSubTrigger>
|
|
34
34
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
DialogClose,
|
|
6
6
|
DialogContent,
|
|
@@ -45,7 +45,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
45
45
|
data-slot="dialog-close"
|
|
46
46
|
class="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
47
47
|
>
|
|
48
|
-
<
|
|
48
|
+
<Icon name="lucide:x" />
|
|
49
49
|
<span class="sr-only">Close</span>
|
|
50
50
|
</DialogClose>
|
|
51
51
|
</DialogContent>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
DialogClose,
|
|
6
6
|
DialogContent,
|
|
@@ -50,7 +50,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
50
50
|
<DialogClose
|
|
51
51
|
class="absolute top-4 right-4 p-0.5 transition-colors rounded-md hover:bg-secondary"
|
|
52
52
|
>
|
|
53
|
-
<
|
|
53
|
+
<Icon name="lucide:x" class="w-4 h-4" />
|
|
54
54
|
<span class="sr-only">Close</span>
|
|
55
55
|
</DialogClose>
|
|
56
56
|
</DialogContent>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
DropdownMenuCheckboxItem,
|
|
6
6
|
DropdownMenuItemIndicator,
|
|
@@ -32,7 +32,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
32
32
|
<span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
33
33
|
<DropdownMenuItemIndicator>
|
|
34
34
|
<slot name="indicator-icon">
|
|
35
|
-
<
|
|
35
|
+
<Icon name="lucide:check" class="size-4" />
|
|
36
36
|
</slot>
|
|
37
37
|
</DropdownMenuItemIndicator>
|
|
38
38
|
</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
DropdownMenuItemIndicator,
|
|
6
6
|
DropdownMenuRadioItem,
|
|
@@ -32,7 +32,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
32
32
|
<span class="pointer-events-none absolute left-2 flex size-3.5 items-center justify-center">
|
|
33
33
|
<DropdownMenuItemIndicator>
|
|
34
34
|
<slot name="indicator-icon">
|
|
35
|
-
<
|
|
35
|
+
<Icon name="lucide:circle" class="size-2 fill-current" />
|
|
36
36
|
</slot>
|
|
37
37
|
</DropdownMenuItemIndicator>
|
|
38
38
|
</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reactiveOmit } from "@vueuse/core";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from "#components";
|
|
4
4
|
import {
|
|
5
5
|
DropdownMenuSubTrigger,
|
|
6
6
|
useForwardProps
|
|
@@ -28,6 +28,6 @@ const forwardedProps = useForwardProps(delegatedProps);
|
|
|
28
28
|
)"
|
|
29
29
|
>
|
|
30
30
|
<slot />
|
|
31
|
-
<
|
|
31
|
+
<Icon name="lucide:chevron-right" class="ml-auto size-4" />
|
|
32
32
|
</DropdownMenuSubTrigger>
|
|
33
33
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { Icon } from "#components";
|
|
3
3
|
const props = defineProps({
|
|
4
4
|
searchQuery: { type: String, required: false, default: "" },
|
|
5
5
|
isTrash: { type: Boolean, required: false, default: false },
|
|
@@ -22,7 +22,7 @@ function handleUploadClick() {
|
|
|
22
22
|
class="relative rounded-full bg-muted p-8 mb-4 cursor-pointer transition-transform hover:scale-105"
|
|
23
23
|
@click="handleUploadClick"
|
|
24
24
|
>
|
|
25
|
-
<
|
|
25
|
+
<Icon name="lucide:cloud" class="h-16 w-16 text-muted-foreground" />
|
|
26
26
|
<input
|
|
27
27
|
v-if="!onUploadClick"
|
|
28
28
|
type="file"
|
|
@@ -32,7 +32,7 @@ function handleUploadClick() {
|
|
|
32
32
|
/>
|
|
33
33
|
</div>
|
|
34
34
|
<div v-else-if="!searchQuery" class="rounded-full bg-muted p-8 mb-4">
|
|
35
|
-
<
|
|
35
|
+
<Icon name="lucide:trash-2" class="h-16 w-16 text-muted-foreground" />
|
|
36
36
|
</div>
|
|
37
37
|
<div v-else class="rounded-full bg-muted p-8 mb-4">
|
|
38
38
|
<Icon name="lucide:search-x" class="h-16 w-16 text-muted-foreground" />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { Cloud, FileText, Film, Folder, Image } from "lucide-vue-next";
|
|
3
2
|
import { bytesToSize } from "abckit/shared/constants/r2";
|
|
4
3
|
import { AppImage } from "abckit/components/app";
|
|
4
|
+
import { Icon } from "#components";
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
files: { type: Array, required: true },
|
|
7
7
|
selectedFiles: { type: Set, required: false },
|
|
@@ -11,13 +11,13 @@ const props = defineProps({
|
|
|
11
11
|
});
|
|
12
12
|
const emit = defineEmits(["select", "folderClick"]);
|
|
13
13
|
const FILE_TYPE_ICONS = {
|
|
14
|
-
IMAGE:
|
|
15
|
-
VIDEO:
|
|
16
|
-
AUDIO:
|
|
17
|
-
DOCUMENT:
|
|
18
|
-
ARCHIVE:
|
|
19
|
-
OTHER:
|
|
20
|
-
FOLDER:
|
|
14
|
+
IMAGE: "lucide:image",
|
|
15
|
+
VIDEO: "lucide:film",
|
|
16
|
+
AUDIO: "lucide:file-text",
|
|
17
|
+
DOCUMENT: "lucide:file-text",
|
|
18
|
+
ARCHIVE: "lucide:cloud",
|
|
19
|
+
OTHER: "lucide:cloud",
|
|
20
|
+
FOLDER: "lucide:folder"
|
|
21
21
|
};
|
|
22
22
|
function getFileIcon(file) {
|
|
23
23
|
if (file.isFolder)
|
|
@@ -70,8 +70,8 @@ function isSelected(fileId) {
|
|
|
70
70
|
fallback=""
|
|
71
71
|
/>
|
|
72
72
|
<div v-else class="flex h-full items-center justify-center">
|
|
73
|
-
<
|
|
74
|
-
:
|
|
73
|
+
<Icon
|
|
74
|
+
:name="getFileIcon(file)"
|
|
75
75
|
class="h-12 w-12 text-muted-foreground"
|
|
76
76
|
/>
|
|
77
77
|
</div>
|