Skip to content

Commit c0f5b09

Browse files
author
mdatelle
committed
refactor: add all changes files from refactor
1 parent 2097357 commit c0f5b09

28 files changed

+357
-243
lines changed

pnpm-lock.yaml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unraid-ui/components.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
"$schema": "https://shadcn-vue.com/schema.json",
33
"style": "default",
44
"typescript": true,
5-
"tsConfigPath": "./tsconfig.json",
65
"tailwind": {
7-
"config": "./tailwind.config.ts",
8-
"css": "./src/styles/globals.css",
6+
"config": "tailwind.config.ts",
7+
"css": "src/styles/globals.css",
98
"baseColor": "neutral",
109
"cssVariables": true,
1110
"prefix": ""
1211
},
13-
"framework": "vite",
1412
"aliases": {
1513
"components": "@/components/common",
16-
"utils": "@/lib/utils"
17-
}
14+
"composables": "@/composables",
15+
"utils": "@/lib/utils",
16+
"lib": "@/lib"
17+
},
18+
"iconLibrary": "lucide"
1819
}

unraid-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"kebab-case": "^2.0.1",
5151
"lucide-vue-next": "^0.483.0",
5252
"radix-vue": "^1.9.13",
53-
"reka-ui": "^2.0.2",
53+
"reka-ui": "^2.1.0",
5454
"shadcn-vue": "^0.11.3",
5555
"tailwind-merge": "^2.6.0",
5656
"vue-sonner": "^1.3.0"

unraid-ui/src/components/brand/brand-loading.variants.ts

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
import { cva } from 'class-variance-authority';
22

3-
export const brandLoadingVariants = cva('inline-flex items-center justify-center w-full h-full aspect-[7/4]', {
4-
variants: {
5-
variant: {
6-
default: '',
7-
black: 'text-black fill-black',
8-
white: 'text-white fill-white',
3+
export const brandLoadingVariants = cva(
4+
'inline-flex items-center justify-center w-full h-full aspect-[7/4]',
5+
{
6+
variants: {
7+
variant: {
8+
default: '',
9+
black: 'text-black fill-black',
10+
white: 'text-white fill-white',
11+
},
12+
size: {
13+
sm: 'w-12',
14+
md: 'w-16',
15+
lg: 'w-20',
16+
full: 'w-full',
17+
custom: '',
18+
},
919
},
10-
size: {
11-
sm: 'w-12',
12-
md: 'w-16',
13-
lg: 'w-20',
14-
full: 'w-full',
20+
defaultVariants: {
21+
variant: 'default',
1522
},
16-
},
17-
defaultVariants: {
18-
variant: 'default',
19-
},
20-
});
23+
}
24+
);
2125

2226
export const markAnimations = {
2327
mark_2_4: 'animate-mark-2',

unraid-ui/src/components/common/dropdown-menu/DropdownMenu.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<script setup lang="ts">
22
import {
33
DropdownMenuRoot,
4+
useForwardPropsEmits,
45
type DropdownMenuRootEmits,
56
type DropdownMenuRootProps,
6-
useForwardPropsEmits,
7-
} from "radix-vue";
7+
} from 'reka-ui';
88
99
const props = defineProps<DropdownMenuRootProps>();
1010
const emits = defineEmits<DropdownMenuRootEmits>();
1111
12-
const forwarded = useForwardPropsEmits(props, emits);
12+
const forwarded = useForwardPropsEmits<DropdownMenuRootProps, 'update:open'>(props, emits);
1313
</script>
1414

1515
<template>

unraid-ui/src/components/common/dropdown-menu/DropdownMenuCheckboxItem.vue

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,34 @@
11
<script setup lang="ts">
2-
import { type HTMLAttributes, computed } from "vue";
2+
import { cn } from '@/lib/utils'
3+
import { Check } from 'lucide-vue-next'
34
import {
45
DropdownMenuCheckboxItem,
56
type DropdownMenuCheckboxItemEmits,
67
type DropdownMenuCheckboxItemProps,
78
DropdownMenuItemIndicator,
89
useForwardPropsEmits,
9-
} from "radix-vue";
10-
import { Check } from "lucide-vue-next";
11-
import { cn } from "@/lib/utils";
10+
} from 'reka-ui'
11+
import { computed, type HTMLAttributes } from 'vue'
1212
13-
const props = defineProps<
14-
DropdownMenuCheckboxItemProps & { class?: HTMLAttributes["class"] }
15-
>();
16-
const emits = defineEmits<DropdownMenuCheckboxItemEmits>();
13+
const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
14+
const emits = defineEmits<DropdownMenuCheckboxItemEmits>()
1715
1816
const delegatedProps = computed(() => {
19-
const { class: _, ...delegated } = props;
17+
const { class: _, ...delegated } = props
2018
21-
return delegated;
22-
});
19+
return delegated
20+
})
2321
24-
const forwarded = useForwardPropsEmits(delegatedProps, emits);
22+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
2523
</script>
2624

2725
<template>
2826
<DropdownMenuCheckboxItem
2927
v-bind="forwarded"
30-
:class="
31-
cn(
32-
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
33-
props.class
34-
)
35-
"
28+
:class=" cn(
29+
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
30+
props.class,
31+
)"
3632
>
3733
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
3834
<DropdownMenuItemIndicator>

unraid-ui/src/components/common/dropdown-menu/DropdownMenuContent.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
<script setup lang="ts">
2-
import { type HTMLAttributes, computed } from "vue";
2+
import { cn } from '@/lib/utils';
33
import {
44
DropdownMenuContent,
5-
type DropdownMenuContentEmits,
6-
type DropdownMenuContentProps,
75
DropdownMenuPortal,
86
useForwardPropsEmits,
9-
} from "radix-vue";
10-
import { cn } from "@/lib/utils";
7+
type DropdownMenuContentEmits,
8+
type DropdownMenuContentProps,
9+
} from 'reka-ui';
10+
import { computed, type HTMLAttributes } from 'vue';
1111
1212
const props = withDefaults(
13-
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes["class"] }>(),
13+
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(),
1414
{
1515
sideOffset: 4,
16-
class: undefined,
1716
}
1817
);
1918
const emits = defineEmits<DropdownMenuContentEmits>();
@@ -31,9 +30,10 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
3130
<DropdownMenuPortal>
3231
<DropdownMenuContent
3332
v-bind="forwarded"
33+
side="bottom"
3434
:class="
3535
cn(
36-
'z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
36+
'z-50 min-w-32 overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
3737
props.class
3838
)
3939
"

unraid-ui/src/components/common/dropdown-menu/DropdownMenuGroup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
2-
import { DropdownMenuGroup, type DropdownMenuGroupProps } from "radix-vue";
2+
import { DropdownMenuGroup, type DropdownMenuGroupProps } from 'reka-ui'
33
4-
const props = defineProps<DropdownMenuGroupProps>();
4+
const props = defineProps<DropdownMenuGroupProps>()
55
</script>
66

77
<template>

unraid-ui/src/components/common/dropdown-menu/DropdownMenuItem.vue

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
11
<script setup lang="ts">
2-
import { type HTMLAttributes, computed } from "vue";
3-
import {
4-
DropdownMenuItem,
5-
type DropdownMenuItemProps,
6-
useForwardProps,
7-
} from "radix-vue";
8-
import { cn } from "@/lib/utils";
2+
import { cn } from '@/lib/utils'
3+
import { DropdownMenuItem, type DropdownMenuItemProps, useForwardProps } from 'reka-ui'
4+
import { computed, type HTMLAttributes } from 'vue'
95
10-
const props = defineProps<
11-
DropdownMenuItemProps & { class?: HTMLAttributes["class"]; inset?: boolean }
12-
>();
6+
const props = defineProps<DropdownMenuItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
137
148
const delegatedProps = computed(() => {
15-
const { class: _, ...delegated } = props;
9+
const { class: _, ...delegated } = props
1610
17-
return delegated;
18-
});
11+
return delegated
12+
})
1913
20-
const forwardedProps = useForwardProps(delegatedProps);
14+
const forwardedProps = useForwardProps(delegatedProps)
2115
</script>
2216

2317
<template>
2418
<DropdownMenuItem
2519
v-bind="forwardedProps"
26-
:class="
27-
cn(
28-
'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',
29-
inset && 'pl-8',
30-
props.class
31-
)
32-
"
20+
:class="cn(
21+
'relative flex cursor-default select-none items-center rounded-sm gap-2 px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0',
22+
inset && 'pl-8',
23+
props.class,
24+
)"
3325
>
3426
<slot />
3527
</DropdownMenuItem>

unraid-ui/src/components/common/dropdown-menu/DropdownMenuLabel.vue

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,23 @@
11
<script setup lang="ts">
2-
import { type HTMLAttributes, computed } from "vue";
3-
import {
4-
DropdownMenuLabel,
5-
type DropdownMenuLabelProps,
6-
useForwardProps,
7-
} from "radix-vue";
8-
import { cn } from "@/lib/utils";
2+
import { cn } from '@/lib/utils'
3+
import { DropdownMenuLabel, type DropdownMenuLabelProps, useForwardProps } from 'reka-ui'
4+
import { computed, type HTMLAttributes } from 'vue'
95
10-
const props = defineProps<
11-
DropdownMenuLabelProps & { class?: HTMLAttributes["class"]; inset?: boolean }
12-
>();
6+
const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
137
148
const delegatedProps = computed(() => {
15-
const { class: _, ...delegated } = props;
9+
const { class: _, ...delegated } = props
1610
17-
return delegated;
18-
});
11+
return delegated
12+
})
1913
20-
const forwardedProps = useForwardProps(delegatedProps);
14+
const forwardedProps = useForwardProps(delegatedProps)
2115
</script>
2216

2317
<template>
2418
<DropdownMenuLabel
2519
v-bind="forwardedProps"
26-
:class="
27-
cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', props.class)
28-
"
20+
:class="cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', props.class)"
2921
>
3022
<slot />
3123
</DropdownMenuLabel>

0 commit comments

Comments
 (0)