⚠️ refactor (form): refactor label component for improved styling and responsiveness

This commit is contained in:
Abizrh
2025-08-14 16:33:19 +07:00
parent 0b59f48fdb
commit 878211bc7f
173 changed files with 324 additions and 381 deletions

No files matched your search

+14 -15
View File
@@ -2,7 +2,6 @@
RSSA - Front End RSSA - Front End
> [!IMPORTANT] > [!IMPORTANT]
> Read this following instructions before doing your job > Read this following instructions before doing your job
@@ -65,22 +64,22 @@ The basic development workflow follows these steps:
## Code Conventions ## Code Conventions
- Under the script setup block, putting things in group with the following order: - Under the script setup block, putting things in group with the following order:
- Imports → all dependencies, sorted by external, alias (~), and relative imports. - Imports → all dependencies, sorted by external, alias (~), and relative imports.
- Props & Emits → clearly define component inputs & outputs. - Props & Emits → clearly define component inputs & outputs.
- State & Computed → all ref, reactive, and computed variables grouped together. - State & Computed → all ref, reactive, and computed variables grouped together.
- Lifecycle Hooks → grouped by mounting → updating → unmounting order. - Lifecycle Hooks → grouped by mounting → updating → unmounting order.
- Functions → async first (fetching, API calls), then utility & event handlers. - Functions → async first (fetching, API calls), then utility & event handlers.
- Watchers → if needed, put them at the bottom. - Watchers → if needed, put them at the bottom.
- Template → keep clean and minimal logic, use methods/computed instead of inline JS. - Template → keep clean and minimal logic, use methods/computed instead of inline JS.
- Declaration Naming - Declaration Naming
- Uses PascalCase for `type` naming - Uses PascalCase for `type` naming
- Uses camelCase for `variable` and `const` naming - Uses camelCase for `variable` and `const` naming
- Underscore can be used to indicates that a variable has derived from an attribute of an object<br /> - Underscore can be used to indicates that a variable has derived from an attribute of an object<br />
for example: `person_name` indicates it is an attribute `name` from object `person` for example: `person_name` indicates it is an attribute `name` from object `person`
- Looping - Looping
- Uses `i`, `j`, `k` as variable for `for` looping index - Uses `i`, `j`, `k` as variable for `for` looping index
- Uses `item` as object instantition for `forEach` loop callback - Uses `item` as object instantition for `forEach` loop callback
- Uses `item` as object instantition for `v-for` loop callback in the template - Uses `item` as object instantition for `v-for` loop callback in the template
## Git Workflows ## Git Workflows
+26 -16
View File
@@ -13,22 +13,32 @@ import Label from '~/components/pub/form/label.vue'
</div> </div>
<div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl"> <div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
<div> <Block>
<Block> <FieldGroup :column="3">
<FieldGroup :column="2"> <Label>Nama</Label>
<Label>Nama</Label> <Field>
<Field name="name"> <Input type="text" name="name" />
<Input type="text" name="name" /> </Field>
</Field> </FieldGroup>
</FieldGroup> <FieldGroup :column="3">
<FieldGroup :column="2"> <Label>Nama</Label>
<Label>Nomor RM</Label> <Field>
<Field name="name"> <Input type="text" name="name" />
<Input type="text" name="name" /> </Field>
</Field> </FieldGroup>
</FieldGroup> <FieldGroup :column="3">
</Block> <Label>Nomor RM</Label>
</div> <Field>
<Input type="text" name="name" />
</Field>
</FieldGroup>
<FieldGroup>
<Label dynamic>Alamat</Label>
<Field>
<Input type="text" name="name" />
</Field>
</FieldGroup>
</Block>
</div> </div>
<div class="my-2 flex justify-end py-2"> <div class="my-2 flex justify-end py-2">
<PubNavFooterCsd /> <PubNavFooterCsd />
+2 -8
View File
@@ -1,11 +1,5 @@
import type { import type { Col, KeyLabel, RecComponent, RecStrFuncComponent, RecStrFuncUnknown, Th } from '../../pub/nav/types'
Col, import { defineAsyncComponent } from 'vue'
KeyLabel,
RecComponent,
RecStrFuncComponent,
RecStrFuncUnknown,
Th,
} from '~/components/pub/nav/types'
type SmallDetailDto = any type SmallDetailDto = any
+1 -1
View File
@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { cols, funcComponent, funcHtml, funcParsed, header, keys } from './list-cfg.ts' import { cols, funcComponent, funcHtml, funcParsed, header, keys } from './list-cfg'
defineProps<{ defineProps<{
data: any[] data: any[]
+14 -56
View File
@@ -16,71 +16,29 @@ const props = withDefaults(
}, },
) )
const classVal = computed(() => { const wrapperClass = computed(() => [
let val = '' 'w-full flex-shrink-0',
if (props.column === 2) val += 'column-2 ' props.column === 1 && props.side !== 'break' ? 'pe-4 md:w-1/1 ' : '',
else if (props.column === 3) val += 'column-3 ' props.column === 2 && props.side !== 'break' ? 'pe-4 md:w-1/2 ' : '',
else val += 'column-1 ' props.column === 3 && props.side !== 'break' ? 'pe-4 md:w-1/3' : '',
props.column === 2 && props.side === 'break' ? 'md:w-1/2' : '',
props.column === 3 && props.side === 'break' ? 'md:w-1/3' : '',
if (props.density === 'dense') val += 'density-dense ' props.density !== 'dense' ? 'mb-2 md:mb-2.5 xl:mb-3' : '',
if (props.side === 'break') val += 'side-break ' props.side !== 'break' ? 'md:flex' : '',
if (props.position === 'dynamic') val += 'position-dynamic ' props.position === 'dynamic' ? 'ps-4' : props.column > 1 ? 'pe-4' : '',
return (val + (props.class || '')).trim() props.class,
}) ])
</script> </script>
<template> <template>
<div <div :class="wrapperClass">
:class="[
column === 1 ? 'w-full' : column === 2 ? 'pe-4 md:w-1/2' : 'pe-4 md:w-1/3',
density === 'dense' ? '' : 'mb-2 md:mb-2.5 xl:mb-3',
side !== 'break' ? 'md:flex' : '',
position === 'dynamic' ? 'ps-4' : '',
props.class,
]"
>
<slot /> <slot />
</div> </div>
</template> </template>
<style scoped> <style scoped></style>
.column-1,
.column-2,
.column-3 {
@apply w-full flex-shrink-0;
}
.column-1:not(.density-dense):not(:last-child),
.column-2:not(.density-dense):not(:last-child),
.column-3:not(.density-dense):not(:last-child) {
@apply mb-2 md:mb-2.5 xl:mb-3;
}
.column-2:not(.position-dynamic),
.column-3:not(.position-dynamic) {
@apply pe-4;
}
.column-2:is(.position-dynamic),
.column-3:is(.position-dynamic) {
@apply ps-4;
}
.column-1:not(.side-break),
.column-2:not(.side-break),
.column-3:not(.side-break) {
@apply md:flex;
}
.column-2:not(.side-break) {
@apply md:w-1/2;
}
.column-3:not(.side-break) {
@apply md:w-1/3;
}
</style>
+27 -47
View File
@@ -4,69 +4,49 @@ const props = withDefaults(
size?: 'default' | 'narrow' | 'wide' size?: 'default' | 'narrow' | 'wide'
height?: 'default' | 'compact' height?: 'default' | 'compact'
position?: 'default' | 'dynamic' position?: 'default' | 'dynamic'
class?: string
}>(), }>(),
{ {
size: 'default', size: 'default',
height: 'default', height: 'default',
position: 'default', position: 'default',
class: '',
}, },
) )
const classVal = computed(() => { const sizeMap = {
let val = '' default: 'w-28 2xl:w-36',
narrow: 'w-24 2xl:w-28',
wide: 'w-44 2xl:w-48',
} as const
if (props.size === 'narrow') val += 'size-narrow ' const heightMap = {
else if (props.size === 'wide') val += 'size-wide ' default: 'pt-2 2xl:pt-2.5',
else val += 'size-default ' compact: 'leading-[14pt]',
} as const
if (props.height === 'compact') val += 'height-compact ' const positionWrapMap = {
else val += 'height-default ' default: 'pe-2 text-start',
dynamic: 'md:text-end',
} as const
if (props.position === 'dynamic') val += 'position-dynamic ' const positionChildMap = {
else val += 'position-default ' default: '',
dynamic: 'block pe-2.5',
} as const
return (val + (props.class || '')).trim() const wrapperClass = computed(() => [
}) 'block shrink-0',
sizeMap[props.size],
heightMap[props.height],
positionWrapMap[props.position],
])
const labelClass = computed(() => positionChildMap[props.position])
</script> </script>
<template> <template>
<div class="label" :class="classVal"> <div :class="wrapperClass">
<label> <label :class="labelClass">
<slot /> <slot />
</label> </label>
</div> </div>
</template> </template>
<style scoped>
.label {
@apply block flex-shrink-0 shrink-0;
}
.size-default {
@apply w-28 2xl:w-36;
}
.size-narrow {
@apply w-24 2xl:w-28;
}
.size-wide {
@apply w-44 2xl:w-48;
}
.height-default {
@apply pt-2 2xl:pt-2.5;
}
.height-compact {
line-height: 14pt;
}
.position-default {
@apply pe-2 text-start;
}
.position-dynamic > * {
@apply block pe-2.5 md:text-end;
}
</style>
+4 -1
View File
@@ -1,4 +1,5 @@
import type { ComponentType } from '@unovis/ts' // import type { ComponentType } from '@unovis/ts'
import type { Component } from 'vue'
export interface ListItemDto { export interface ListItemDto {
id: number id: number
@@ -6,6 +7,8 @@ export interface ListItemDto {
code: string code: string
} }
export type ComponentType = Component
export interface RecComponent { export interface RecComponent {
idx?: number idx?: number
rec: object rec: object
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { AccordionContentProps } from 'radix-vue' import type { AccordionContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { AccordionContent } from 'radix-vue' import { AccordionContent } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<AccordionContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<AccordionContentProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { AccordionItemProps } from 'radix-vue' import type { AccordionItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { AccordionItem, useForwardProps } from 'radix-vue' import { AccordionItem, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<AccordionItemProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<AccordionItemProps & { class?: HTMLAttributes['class'] }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { AccordionTriggerProps } from 'radix-vue' import type { AccordionTriggerProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ChevronDown } from 'lucide-vue-next' import { ChevronDown } from 'lucide-vue-next'
import { import {
AccordionHeader, AccordionHeader,
@@ -9,6 +8,7 @@ import {
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<AccordionTriggerProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<AccordionTriggerProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { AlertDialogActionProps } from 'radix-vue' import type { AlertDialogActionProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { AlertDialogAction } from 'radix-vue' import { AlertDialogAction } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
import { buttonVariants } from '../button' import { buttonVariants } from '../button'
const props = defineProps<AlertDialogActionProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<AlertDialogActionProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { AlertDialogCancelProps } from 'radix-vue' import type { AlertDialogCancelProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { AlertDialogCancel } from 'radix-vue' import { AlertDialogCancel } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
import { buttonVariants } from '../button' import { buttonVariants } from '../button'
const props = defineProps<AlertDialogCancelProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<AlertDialogCancelProps & { class?: HTMLAttributes['class'] }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { AlertDialogContentEmits, AlertDialogContentProps } from 'radix-vue' import type { AlertDialogContentEmits, AlertDialogContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
AlertDialogContent, AlertDialogContent,
@@ -10,6 +9,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<AlertDialogContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<AlertDialogContentProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<AlertDialogContentEmits>() const emits = defineEmits<AlertDialogContentEmits>()
@@ -1,12 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import type { AlertDialogDescriptionProps } from 'radix-vue' import type { AlertDialogDescriptionProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
AlertDialogDescription, AlertDialogDescription,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<AlertDialogDescriptionProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<AlertDialogDescriptionProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { AlertDialogTitleProps } from 'radix-vue' import type { AlertDialogTitleProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { AlertDialogTitle } from 'radix-vue' import { AlertDialogTitle } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<AlertDialogTitleProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<AlertDialogTitleProps & { class?: HTMLAttributes['class'] }>()
+1 -1
View File
@@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import type { AvatarVariants } from '.' import type { AvatarVariants } from '.'
import { cn } from '@/lib/utils'
import { AvatarRoot } from 'radix-vue' import { AvatarRoot } from 'radix-vue'
import { cn } from '@/lib/utils'
import { avatarVariant } from '.' import { avatarVariant } from '.'
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { MoreHorizontal } from 'lucide-vue-next' import { MoreHorizontal } from 'lucide-vue-next'
import { cn } from '@/lib/utils'
const props = defineProps<{ const props = defineProps<{
class?: HTMLAttributes['class'] class?: HTMLAttributes['class']
@@ -1,8 +1,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { PrimitiveProps } from 'radix-vue' import type { PrimitiveProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Primitive } from 'radix-vue' import { Primitive } from 'radix-vue'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<PrimitiveProps & { class?: HTMLAttributes['class'] }>(), { const props = withDefaults(defineProps<PrimitiveProps & { class?: HTMLAttributes['class'] }>(), {
as: 'a', as: 'a',
@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ChevronRight } from 'lucide-vue-next' import { ChevronRight } from 'lucide-vue-next'
import { cn } from '@/lib/utils'
const props = defineProps<{ const props = defineProps<{
class?: HTMLAttributes['class'] class?: HTMLAttributes['class']
+16 -16
View File
@@ -1,35 +1,35 @@
import type { VariantProps } from "class-variance-authority" import type { VariantProps } from 'class-variance-authority'
import { cva } from "class-variance-authority" import { cva } from 'class-variance-authority'
export { default as Button } from "./Button.vue" export { default as Button } from './Button.vue'
export const buttonVariants = cva( export const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=\'size-\'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
{ {
variants: { variants: {
variant: { variant: {
default: default:
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90", 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
destructive: destructive:
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60", 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
outline: outline:
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50", 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
secondary: secondary:
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80", 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
ghost: ghost:
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50", 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
link: "text-primary underline-offset-4 hover:underline", link: 'text-primary underline-offset-4 hover:underline',
}, },
size: { size: {
default: "h-9 px-4 py-2 has-[>svg]:px-3", default: 'h-9 px-4 py-2 has-[>svg]:px-3',
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5", sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
lg: "h-10 rounded-md px-6 has-[>svg]:px-4", lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
icon: "size-9", icon: 'size-9',
}, },
}, },
defaultVariants: { defaultVariants: {
variant: "default", variant: 'default',
size: "default", size: 'default',
}, },
}, },
) )
+1 -1
View File
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarRootEmits, CalendarRootProps } from 'radix-vue' import type { CalendarRootEmits, CalendarRootProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarRoot, useForwardPropsEmits } from 'radix-vue' import { CalendarRoot, useForwardPropsEmits } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from '.' import { CalendarCell, CalendarCellTrigger, CalendarGrid, CalendarGridBody, CalendarGridHead, CalendarGridRow, CalendarHeadCell, CalendarHeader, CalendarHeading, CalendarNextButton, CalendarPrevButton } from '.'
const props = defineProps<CalendarRootProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarRootProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarCellProps } from 'radix-vue' import type { CalendarCellProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarCell, useForwardProps } from 'radix-vue' import { CalendarCell, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<CalendarCellProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarCellProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarCellTriggerProps } from 'radix-vue' import type { CalendarCellTriggerProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarCellTrigger, useForwardProps } from 'radix-vue' import { CalendarCellTrigger, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
import { buttonVariants } from '../button' import { buttonVariants } from '../button'
const props = defineProps<CalendarCellTriggerProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarCellTriggerProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarGridProps } from 'radix-vue' import type { CalendarGridProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarGrid, useForwardProps } from 'radix-vue' import { CalendarGrid, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<CalendarGridProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarGridProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarGridRowProps } from 'radix-vue' import type { CalendarGridRowProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarGridRow, useForwardProps } from 'radix-vue' import { CalendarGridRow, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<CalendarGridRowProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarGridRowProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarHeadCellProps } from 'radix-vue' import type { CalendarHeadCellProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarHeadCell, useForwardProps } from 'radix-vue' import { CalendarHeadCell, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<CalendarHeadCellProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarHeadCellProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarHeaderProps } from 'radix-vue' import type { CalendarHeaderProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarHeader, useForwardProps } from 'radix-vue' import { CalendarHeader, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<CalendarHeaderProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarHeaderProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarHeadingProps } from 'radix-vue' import type { CalendarHeadingProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarHeading, useForwardProps } from 'radix-vue' import { CalendarHeading, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<CalendarHeadingProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarHeadingProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarNextProps } from 'radix-vue' import type { CalendarNextProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarNext, useForwardProps } from 'radix-vue' import { CalendarNext, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
import { buttonVariants } from '../button' import { buttonVariants } from '../button'
const props = defineProps<CalendarNextProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarNextProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { CalendarPrevProps } from 'radix-vue' import type { CalendarPrevProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CalendarPrev, useForwardProps } from 'radix-vue' import { CalendarPrev, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
import { buttonVariants } from '../button' import { buttonVariants } from '../button'
const props = defineProps<CalendarPrevProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CalendarPrevProps & { class?: HTMLAttributes['class'] }>()
@@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { WithClassAsProps } from './interface' import type { WithClassAsProps } from './interface'
import { cn } from '@/lib/utils'
import { ArrowRight } from 'lucide-vue-next' import { ArrowRight } from 'lucide-vue-next'
import { cn } from '@/lib/utils'
import { Button } from '../button' import { Button } from '../button'
import { useCarousel } from './useCarousel' import { useCarousel } from './useCarousel'
@@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { WithClassAsProps } from './interface' import type { WithClassAsProps } from './interface'
import { cn } from '@/lib/utils'
import { ArrowLeft } from 'lucide-vue-next' import { ArrowLeft } from 'lucide-vue-next'
import { cn } from '@/lib/utils'
import { Button } from '../button' import { Button } from '../button'
import { useCarousel } from './useCarousel' import { useCarousel } from './useCarousel'
@@ -34,7 +34,7 @@ const [useProvideCarousel, useInjectCarousel] = createInjectionState(
onMounted(() => { onMounted(() => {
if (!emblaApi.value) if (!emblaApi.value)
return { return }
emblaApi.value?.on('init', onSelect) emblaApi.value?.on('init', onSelect)
emblaApi.value?.on('reInit', onSelect) emblaApi.value?.on('reInit', onSelect)
@@ -51,7 +51,7 @@ function useCarousel() {
const carouselState = useInjectCarousel() const carouselState = useInjectCarousel()
if (!carouselState) if (!carouselState)
throw new Error('useCarousel must be used within a <Carousel />') { throw new Error('useCarousel must be used within a <Carousel />') }
return carouselState return carouselState
} }
@@ -2,11 +2,11 @@
import type { BulletLegendItemInterface } from '@unovis/ts' import type { BulletLegendItemInterface } from '@unovis/ts'
import type { Component } from 'vue' import type { Component } from 'vue'
import type { BaseChartProps } from '.' import type { BaseChartProps } from '.'
import { cn } from '@/lib/utils'
import { Area, Axis, CurveType, Line } from '@unovis/ts' import { Area, Axis, CurveType, Line } from '@unovis/ts'
import { VisArea, VisAxis, VisLine, VisXYContainer } from '@unovis/vue' import { VisArea, VisAxis, VisLine, VisXYContainer } from '@unovis/vue'
import { useMounted } from '@vueuse/core' import { useMounted } from '@vueuse/core'
import { computed, ref } from 'vue' import { computed, ref } from 'vue'
import { cn } from '@/lib/utils'
import { ChartCrosshair, ChartLegend, defaultColors } from '../chart' import { ChartCrosshair, ChartLegend, defaultColors } from '../chart'
const props = withDefaults(defineProps<BaseChartProps<T> & { const props = withDefaults(defineProps<BaseChartProps<T> & {
+1 -1
View File
@@ -2,11 +2,11 @@
import type { BulletLegendItemInterface } from '@unovis/ts' import type { BulletLegendItemInterface } from '@unovis/ts'
import type { Component } from 'vue' import type { Component } from 'vue'
import type { BaseChartProps } from '.' import type { BaseChartProps } from '.'
import { cn } from '@/lib/utils'
import { Axis, GroupedBar, StackedBar } from '@unovis/ts' import { Axis, GroupedBar, StackedBar } from '@unovis/ts'
import { VisAxis, VisGroupedBar, VisStackedBar, VisXYContainer } from '@unovis/vue' import { VisAxis, VisGroupedBar, VisStackedBar, VisXYContainer } from '@unovis/vue'
import { useMounted } from '@vueuse/core' import { useMounted } from '@vueuse/core'
import { computed, ref } from 'vue' import { computed, ref } from 'vue'
import { cn } from '@/lib/utils'
import { ChartCrosshair, ChartLegend, defaultColors } from '../chart' import { ChartCrosshair, ChartLegend, defaultColors } from '../chart'
const props = withDefaults(defineProps<BaseChartProps<T> & { const props = withDefaults(defineProps<BaseChartProps<T> & {
@@ -1,11 +1,11 @@
<script setup lang="ts" generic="T extends Record<string, any>"> <script setup lang="ts" generic="T extends Record<string, any>">
import type { Component } from 'vue' import type { Component } from 'vue'
import type { BaseChartProps } from '.' import type { BaseChartProps } from '.'
import { cn } from '@/lib/utils'
import { Donut } from '@unovis/ts' import { Donut } from '@unovis/ts'
import { VisDonut, VisSingleContainer } from '@unovis/vue' import { VisDonut, VisSingleContainer } from '@unovis/vue'
import { useMounted } from '@vueuse/core' import { useMounted } from '@vueuse/core'
import { computed, ref } from 'vue' import { computed, ref } from 'vue'
import { cn } from '@/lib/utils'
import { ChartSingleTooltip, defaultColors } from '../chart' import { ChartSingleTooltip, defaultColors } from '../chart'
const props = withDefaults(defineProps<Pick<BaseChartProps<T>, 'data' | 'colors' | 'index' | 'margin' | 'showLegend' | 'showTooltip' | 'filterOpacity'> & { const props = withDefaults(defineProps<Pick<BaseChartProps<T>, 'data' | 'colors' | 'index' | 'margin' | 'showLegend' | 'showTooltip' | 'filterOpacity'> & {
@@ -2,11 +2,11 @@
import type { BulletLegendItemInterface } from '@unovis/ts' import type { BulletLegendItemInterface } from '@unovis/ts'
import type { Component } from 'vue' import type { Component } from 'vue'
import type { BaseChartProps } from '.' import type { BaseChartProps } from '.'
import { cn } from '@/lib/utils'
import { Axis, CurveType, Line } from '@unovis/ts' import { Axis, CurveType, Line } from '@unovis/ts'
import { VisAxis, VisLine, VisXYContainer } from '@unovis/vue' import { VisAxis, VisLine, VisXYContainer } from '@unovis/vue'
import { useMounted } from '@vueuse/core' import { useMounted } from '@vueuse/core'
import { computed, ref } from 'vue' import { computed, ref } from 'vue'
import { cn } from '@/lib/utils'
import { ChartCrosshair, ChartLegend, defaultColors } from '../chart' import { ChartCrosshair, ChartLegend, defaultColors } from '../chart'
const props = withDefaults(defineProps<BaseChartProps<T> & { const props = withDefaults(defineProps<BaseChartProps<T> & {
+1 -1
View File
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { CheckboxRootEmits, CheckboxRootProps } from 'radix-vue' import type { CheckboxRootEmits, CheckboxRootProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'radix-vue' import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<CheckboxRootEmits>() const emits = defineEmits<CheckboxRootEmits>()
+1 -1
View File
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ComboboxRootEmits, ComboboxRootProps } from 'radix-vue' import type { ComboboxRootEmits, ComboboxRootProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ComboboxRoot, useForwardPropsEmits } from 'radix-vue' import { ComboboxRoot, useForwardPropsEmits } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<ComboboxRootProps & { class?: HTMLAttributes['class'] }>(), { const props = withDefaults(defineProps<ComboboxRootProps & { class?: HTMLAttributes['class'] }>(), {
open: true, open: true,
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ComboboxEmptyProps } from 'radix-vue' import type { ComboboxEmptyProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ComboboxEmpty } from 'radix-vue' import { ComboboxEmpty } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ComboboxEmptyProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<ComboboxEmptyProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ComboboxGroupProps } from 'radix-vue' import type { ComboboxGroupProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ComboboxGroup, ComboboxLabel } from 'radix-vue' import { ComboboxGroup, ComboboxLabel } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ComboboxGroupProps & { const props = defineProps<ComboboxGroupProps & {
class?: HTMLAttributes['class'] class?: HTMLAttributes['class']
@@ -1,10 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ComboboxInputProps } from 'radix-vue' import type { ComboboxInputProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Search } from 'lucide-vue-next' import { Search } from 'lucide-vue-next'
import { ComboboxInput, useForwardProps } from 'radix-vue' import { ComboboxInput, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
defineOptions({ defineOptions({
inheritAttrs: false, inheritAttrs: false,
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ComboboxItemEmits, ComboboxItemProps } from 'radix-vue' import type { ComboboxItemEmits, ComboboxItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ComboboxItem, useForwardPropsEmits } from 'radix-vue' import { ComboboxItem, useForwardPropsEmits } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ComboboxItemProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<ComboboxItemProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<ComboboxItemEmits>() const emits = defineEmits<ComboboxItemEmits>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ComboboxContentEmits, ComboboxContentProps } from 'radix-vue' import type { ComboboxContentEmits, ComboboxContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ComboboxContent, useForwardPropsEmits } from 'radix-vue' import { ComboboxContent, useForwardPropsEmits } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<ComboboxContentProps & { class?: HTMLAttributes['class'] }>(), { const props = withDefaults(defineProps<ComboboxContentProps & { class?: HTMLAttributes['class'] }>(), {
dismissable: false, dismissable: false,
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ComboboxSeparatorProps } from 'radix-vue' import type { ComboboxSeparatorProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ComboboxSeparator } from 'radix-vue' import { ComboboxSeparator } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ComboboxSeparatorProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<ComboboxSeparatorProps & { class?: HTMLAttributes['class'] }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ContextMenuCheckboxItemEmits, ContextMenuCheckboxItemProps } from 'radix-vue' import type { ContextMenuCheckboxItemEmits, ContextMenuCheckboxItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Check } from 'lucide-vue-next' import { Check } from 'lucide-vue-next'
import { import {
ContextMenuCheckboxItem, ContextMenuCheckboxItem,
@@ -10,6 +9,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ContextMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<ContextMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<ContextMenuCheckboxItemEmits>() const emits = defineEmits<ContextMenuCheckboxItemEmits>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ContextMenuContentEmits, ContextMenuContentProps } from 'radix-vue' import type { ContextMenuContentEmits, ContextMenuContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
ContextMenuContent, ContextMenuContent,
@@ -9,6 +8,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ContextMenuContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<ContextMenuContentProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<ContextMenuContentEmits>() const emits = defineEmits<ContextMenuContentEmits>()
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ContextMenuItemEmits, ContextMenuItemProps } from 'radix-vue' import type { ContextMenuItemEmits, ContextMenuItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
ContextMenuItem, ContextMenuItem,
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ContextMenuItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>() const props = defineProps<ContextMenuItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
const emits = defineEmits<ContextMenuItemEmits>() const emits = defineEmits<ContextMenuItemEmits>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ContextMenuLabelProps } from 'radix-vue' import type { ContextMenuLabelProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ContextMenuLabel } from 'radix-vue' import { ContextMenuLabel } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ContextMenuLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>() const props = defineProps<ContextMenuLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ContextMenuRadioItemEmits, ContextMenuRadioItemProps } from 'radix-vue' import type { ContextMenuRadioItemEmits, ContextMenuRadioItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Circle } from 'lucide-vue-next' import { Circle } from 'lucide-vue-next'
import { import {
ContextMenuItemIndicator, ContextMenuItemIndicator,
@@ -10,6 +9,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ContextMenuRadioItemProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<ContextMenuRadioItemProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<ContextMenuRadioItemEmits>() const emits = defineEmits<ContextMenuRadioItemEmits>()
@@ -1,12 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ContextMenuSeparatorProps } from 'radix-vue' import type { ContextMenuSeparatorProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
ContextMenuSeparator, ContextMenuSeparator,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ContextMenuSeparatorProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<ContextMenuSeparatorProps & { class?: HTMLAttributes['class'] }>()
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from 'radix-vue' import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
ContextMenuSubContent, ContextMenuSubContent,
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<DropdownMenuSubContentEmits>() const emits = defineEmits<DropdownMenuSubContentEmits>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { ContextMenuSubTriggerProps } from 'radix-vue' import type { ContextMenuSubTriggerProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ChevronRight } from 'lucide-vue-next' import { ChevronRight } from 'lucide-vue-next'
import { import {
ContextMenuSubTrigger, ContextMenuSubTrigger,
@@ -9,6 +8,7 @@ import {
useForwardProps, useForwardProps,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<ContextMenuSubTriggerProps & { class?: HTMLAttributes['class'], inset?: boolean }>() const props = defineProps<ContextMenuSubTriggerProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DialogContentEmits, DialogContentProps } from 'radix-vue' import type { DialogContentEmits, DialogContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { X } from 'lucide-vue-next' import { X } from 'lucide-vue-next'
import { import {
DialogClose, DialogClose,
@@ -12,6 +11,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DialogContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DialogContentProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<DialogContentEmits>() const emits = defineEmits<DialogContentEmits>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DialogDescriptionProps } from 'radix-vue' import type { DialogDescriptionProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { DialogDescription, useForwardProps } from 'radix-vue' import { DialogDescription, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes['class'] }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DialogContentEmits, DialogContentProps } from 'radix-vue' import type { DialogContentEmits, DialogContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { X } from 'lucide-vue-next' import { X } from 'lucide-vue-next'
import { import {
DialogClose, DialogClose,
@@ -12,6 +11,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DialogContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DialogContentProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<DialogContentEmits>() const emits = defineEmits<DialogContentEmits>()
+1 -1
View File
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DialogTitleProps } from 'radix-vue' import type { DialogTitleProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { DialogTitle, useForwardProps } from 'radix-vue' import { DialogTitle, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DialogTitleProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DialogTitleProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { DialogContentEmits, DialogContentProps } from 'radix-vue' import type { DialogContentEmits, DialogContentProps } from 'radix-vue'
import type { HtmlHTMLAttributes } from 'vue' import type { HtmlHTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { useForwardPropsEmits } from 'radix-vue' import { useForwardPropsEmits } from 'radix-vue'
import { DrawerContent, DrawerPortal } from 'vaul-vue' import { DrawerContent, DrawerPortal } from 'vaul-vue'
import { cn } from '@/lib/utils'
import DrawerOverlay from './DrawerOverlay.vue' import DrawerOverlay from './DrawerOverlay.vue'
const props = defineProps<DialogContentProps & { class?: HtmlHTMLAttributes['class'] }>() const props = defineProps<DialogContentProps & { class?: HtmlHTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { DrawerDescriptionProps } from 'vaul-vue' import type { DrawerDescriptionProps } from 'vaul-vue'
import type { HtmlHTMLAttributes } from 'vue' import type { HtmlHTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { DrawerDescription } from 'vaul-vue' import { DrawerDescription } from 'vaul-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DrawerDescriptionProps & { class?: HtmlHTMLAttributes['class'] }>() const props = defineProps<DrawerDescriptionProps & { class?: HtmlHTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { DialogOverlayProps } from 'radix-vue' import type { DialogOverlayProps } from 'radix-vue'
import type { HtmlHTMLAttributes } from 'vue' import type { HtmlHTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { DrawerOverlay } from 'vaul-vue' import { DrawerOverlay } from 'vaul-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DialogOverlayProps & { class?: HtmlHTMLAttributes['class'] }>() const props = defineProps<DialogOverlayProps & { class?: HtmlHTMLAttributes['class'] }>()
+1 -1
View File
@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { DrawerTitleProps } from 'vaul-vue' import type { DrawerTitleProps } from 'vaul-vue'
import type { HtmlHTMLAttributes } from 'vue' import type { HtmlHTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { DrawerTitle } from 'vaul-vue' import { DrawerTitle } from 'vaul-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DrawerTitleProps & { class?: HtmlHTMLAttributes['class'] }>() const props = defineProps<DrawerTitleProps & { class?: HtmlHTMLAttributes['class'] }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps } from 'radix-vue' import type { DropdownMenuCheckboxItemEmits, DropdownMenuCheckboxItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Check } from 'lucide-vue-next' import { Check } from 'lucide-vue-next'
import { import {
DropdownMenuCheckboxItem, DropdownMenuCheckboxItem,
@@ -10,6 +9,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DropdownMenuCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<DropdownMenuCheckboxItemEmits>() const emits = defineEmits<DropdownMenuCheckboxItemEmits>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuContentEmits, DropdownMenuContentProps } from 'radix-vue' import type { DropdownMenuContentEmits, DropdownMenuContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
DropdownMenuContent, DropdownMenuContent,
@@ -9,6 +8,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = withDefaults( const props = withDefaults(
defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(), defineProps<DropdownMenuContentProps & { class?: HTMLAttributes['class'] }>(),
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuItemProps } from 'radix-vue' import type { DropdownMenuItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { DropdownMenuItem, useForwardProps } from 'radix-vue' import { DropdownMenuItem, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DropdownMenuItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>() const props = defineProps<DropdownMenuItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuLabelProps } from 'radix-vue' import type { DropdownMenuLabelProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { DropdownMenuLabel, useForwardProps } from 'radix-vue' import { DropdownMenuLabel, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>() const props = defineProps<DropdownMenuLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuRadioItemEmits, DropdownMenuRadioItemProps } from 'radix-vue' import type { DropdownMenuRadioItemEmits, DropdownMenuRadioItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Circle } from 'lucide-vue-next' import { Circle } from 'lucide-vue-next'
import { import {
DropdownMenuItemIndicator, DropdownMenuItemIndicator,
@@ -10,6 +9,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DropdownMenuRadioItemProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DropdownMenuRadioItemProps & { class?: HTMLAttributes['class'] }>()
@@ -1,12 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuSeparatorProps } from 'radix-vue' import type { DropdownMenuSeparatorProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
DropdownMenuSeparator, DropdownMenuSeparator,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DropdownMenuSeparatorProps & { const props = defineProps<DropdownMenuSeparatorProps & {
class?: HTMLAttributes['class'] class?: HTMLAttributes['class']
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from 'radix-vue' import type { DropdownMenuSubContentEmits, DropdownMenuSubContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
DropdownMenuSubContent, DropdownMenuSubContent,
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DropdownMenuSubContentProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<DropdownMenuSubContentEmits>() const emits = defineEmits<DropdownMenuSubContentEmits>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { DropdownMenuSubTriggerProps } from 'radix-vue' import type { DropdownMenuSubTriggerProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { ChevronRight } from 'lucide-vue-next' import { ChevronRight } from 'lucide-vue-next'
import { import {
DropdownMenuSubTrigger, DropdownMenuSubTrigger,
@@ -9,6 +8,7 @@ import {
useForwardProps, useForwardProps,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<DropdownMenuSubTriggerProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<DropdownMenuSubTriggerProps & { class?: HTMLAttributes['class'] }>()
+1 -1
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { provide } from 'vue' import { provide } from 'vue'
import { cn } from '@/lib/utils'
import { FORM_ITEM_INJECTION_KEY } from './injectionKeys' import { FORM_ITEM_INJECTION_KEY } from './injectionKeys'
const props = defineProps<{ const props = defineProps<{
+2 -8
View File
@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import type { LabelProps } from 'radix-vue' import type { LabelProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { Label } from '@/components/ui/label' import { Label } from '@/components/pub/ui/label'
import { cn } from '@/lib/utils' import { cn } from '@/lib/utils'
import { useFormField } from './useFormField' import { useFormField } from './useFormField'
@@ -11,13 +11,7 @@ const { error, formItemId } = useFormField()
</script> </script>
<template> <template>
<Label <Label :class="cn(error && 'text-destructive', props.class)" :for="formItemId">
:class="cn(
error && 'text-destructive',
props.class,
)"
:for="formItemId"
>
<slot /> <slot />
</Label> </Label>
</template> </template>
+1 -1
View File
@@ -13,7 +13,7 @@ export function useFormField() {
} }
if (!fieldContext) if (!fieldContext)
throw new Error('useFormField should be used within <FormField>') { throw new Error('useFormField should be used within <FormField>') }
const { name } = fieldContext const { name } = fieldContext
const id = fieldItemContext const id = fieldItemContext
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { HoverCardContentProps } from 'radix-vue' import type { HoverCardContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
HoverCardContent, HoverCardContent,
@@ -9,6 +8,7 @@ import {
useForwardProps, useForwardProps,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = withDefaults( const props = withDefaults(
defineProps<HoverCardContentProps & { class?: HTMLAttributes['class'] }>(), defineProps<HoverCardContentProps & { class?: HTMLAttributes['class'] }>(),
+1 -1
View File
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { LabelProps } from 'radix-vue' import type { LabelProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Label } from 'radix-vue' import { Label } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<LabelProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<LabelProps & { class?: HTMLAttributes['class'] }>()
+1 -1
View File
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarRootEmits, MenubarRootProps } from 'radix-vue' import type { MenubarRootEmits, MenubarRootProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
MenubarRoot, MenubarRoot,
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarRootProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<MenubarRootProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<MenubarRootEmits>() const emits = defineEmits<MenubarRootEmits>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarCheckboxItemEmits, MenubarCheckboxItemProps } from 'radix-vue' import type { MenubarCheckboxItemEmits, MenubarCheckboxItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
MenubarCheckboxItem, MenubarCheckboxItem,
@@ -9,6 +8,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarCheckboxItemProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<MenubarCheckboxItemProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<MenubarCheckboxItemEmits>() const emits = defineEmits<MenubarCheckboxItemEmits>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarContentProps } from 'radix-vue' import type { MenubarContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
MenubarContent, MenubarContent,
@@ -9,6 +8,7 @@ import {
useForwardProps, useForwardProps,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = withDefaults( const props = withDefaults(
defineProps<MenubarContentProps & { class?: HTMLAttributes['class'] }>(), defineProps<MenubarContentProps & { class?: HTMLAttributes['class'] }>(),
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarItemEmits, MenubarItemProps } from 'radix-vue' import type { MenubarItemEmits, MenubarItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
MenubarItem, MenubarItem,
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>() const props = defineProps<MenubarItemProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
@@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarLabelProps } from 'radix-vue' import type { MenubarLabelProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { MenubarLabel } from 'radix-vue' import { MenubarLabel } from 'radix-vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>() const props = defineProps<MenubarLabelProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
</script> </script>
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarRadioItemEmits, MenubarRadioItemProps } from 'radix-vue' import type { MenubarRadioItemEmits, MenubarRadioItemProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
MenubarItemIndicator, MenubarItemIndicator,
MenubarRadioItem, MenubarRadioItem,
@@ -9,6 +8,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarRadioItemProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<MenubarRadioItemProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<MenubarRadioItemEmits>() const emits = defineEmits<MenubarRadioItemEmits>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarSeparatorProps } from 'radix-vue' import type { MenubarSeparatorProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { MenubarSeparator, useForwardProps } from 'radix-vue' import { MenubarSeparator, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarSeparatorProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<MenubarSeparatorProps & { class?: HTMLAttributes['class'] }>()
@@ -1,7 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarSubContentEmits, MenubarSubContentProps } from 'radix-vue' import type { MenubarSubContentEmits, MenubarSubContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
MenubarPortal, MenubarPortal,
MenubarSubContent, MenubarSubContent,
@@ -9,6 +8,7 @@ import {
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarSubContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<MenubarSubContentProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarSubTriggerProps } from 'radix-vue' import type { MenubarSubTriggerProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { MenubarSubTrigger, useForwardProps } from 'radix-vue' import { MenubarSubTrigger, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarSubTriggerProps & { class?: HTMLAttributes['class'], inset?: boolean }>() const props = defineProps<MenubarSubTriggerProps & { class?: HTMLAttributes['class'], inset?: boolean }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MenubarTriggerProps } from 'radix-vue' import type { MenubarTriggerProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { MenubarTrigger, useForwardProps } from 'radix-vue' import { MenubarTrigger, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<MenubarTriggerProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<MenubarTriggerProps & { class?: HTMLAttributes['class'] }>()
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NavigationMenuRootEmits, NavigationMenuRootProps } from 'radix-vue' import type { NavigationMenuRootEmits, NavigationMenuRootProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
NavigationMenuRoot, NavigationMenuRoot,
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
import NavigationMenuViewport from './NavigationMenuViewport.vue' import NavigationMenuViewport from './NavigationMenuViewport.vue'
const props = defineProps<NavigationMenuRootProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NavigationMenuRootProps & { class?: HTMLAttributes['class'] }>()
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NavigationMenuContentEmits, NavigationMenuContentProps } from 'radix-vue' import type { NavigationMenuContentEmits, NavigationMenuContentProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
NavigationMenuContent, NavigationMenuContent,
useForwardPropsEmits, useForwardPropsEmits,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<NavigationMenuContentProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NavigationMenuContentProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NavigationMenuIndicatorProps } from 'radix-vue' import type { NavigationMenuIndicatorProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { NavigationMenuIndicator, useForwardProps } from 'radix-vue' import { NavigationMenuIndicator, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<NavigationMenuIndicatorProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NavigationMenuIndicatorProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NavigationMenuListProps } from 'radix-vue' import type { NavigationMenuListProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { NavigationMenuList, useForwardProps } from 'radix-vue' import { NavigationMenuList, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<NavigationMenuListProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NavigationMenuListProps & { class?: HTMLAttributes['class'] }>()
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NavigationMenuTriggerProps } from 'radix-vue' import type { NavigationMenuTriggerProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
NavigationMenuTrigger, NavigationMenuTrigger,
useForwardProps, useForwardProps,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
import { navigationMenuTriggerStyle } from '.' import { navigationMenuTriggerStyle } from '.'
const props = defineProps<NavigationMenuTriggerProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NavigationMenuTriggerProps & { class?: HTMLAttributes['class'] }>()
@@ -1,13 +1,13 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NavigationMenuViewportProps } from 'radix-vue' import type { NavigationMenuViewportProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { import {
NavigationMenuViewport, NavigationMenuViewport,
useForwardProps, useForwardProps,
} from 'radix-vue' } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<NavigationMenuViewportProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NavigationMenuViewportProps & { class?: HTMLAttributes['class'] }>()
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NumberFieldRootEmits, NumberFieldRootProps } from 'radix-vue' import type { NumberFieldRootEmits, NumberFieldRootProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { NumberFieldRoot, useForwardPropsEmits } from 'radix-vue' import { NumberFieldRoot, useForwardPropsEmits } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<NumberFieldRootProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NumberFieldRootProps & { class?: HTMLAttributes['class'] }>()
const emits = defineEmits<NumberFieldRootEmits>() const emits = defineEmits<NumberFieldRootEmits>()
@@ -1,10 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NumberFieldDecrementProps } from 'radix-vue' import type { NumberFieldDecrementProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Minus } from 'lucide-vue-next' import { Minus } from 'lucide-vue-next'
import { NumberFieldDecrement, useForwardProps } from 'radix-vue' import { NumberFieldDecrement, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<NumberFieldDecrementProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NumberFieldDecrementProps & { class?: HTMLAttributes['class'] }>()
@@ -1,10 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { NumberFieldIncrementProps } from 'radix-vue' import type { NumberFieldIncrementProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { Plus } from 'lucide-vue-next' import { Plus } from 'lucide-vue-next'
import { NumberFieldIncrement, useForwardProps } from 'radix-vue' import { NumberFieldIncrement, useForwardProps } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<NumberFieldIncrementProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<NumberFieldIncrementProps & { class?: HTMLAttributes['class'] }>()
@@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { cn } from '@/lib/utils'
import { NumberFieldInput } from 'radix-vue' import { NumberFieldInput } from 'radix-vue'
import { cn } from '@/lib/utils'
</script> </script>
<template> <template>
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PaginationEllipsisProps } from 'radix-vue' import type { PaginationEllipsisProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { PaginationEllipsis } from 'radix-vue' import { PaginationEllipsis } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = defineProps<PaginationEllipsisProps & { class?: HTMLAttributes['class'] }>() const props = defineProps<PaginationEllipsisProps & { class?: HTMLAttributes['class'] }>()
@@ -1,12 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PaginationFirstProps } from 'radix-vue' import type { PaginationFirstProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import {
Button,
} from '@/components/ui/button'
import { cn } from '@/lib/utils'
import { PaginationFirst } from 'radix-vue' import { PaginationFirst } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { Button } from '@/components/pub/ui/button'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<PaginationFirstProps & { class?: HTMLAttributes['class'] }>(), { const props = withDefaults(defineProps<PaginationFirstProps & { class?: HTMLAttributes['class'] }>(), {
asChild: true, asChild: true,
@@ -21,7 +19,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationFirst v-bind="delegatedProps"> <PaginationFirst v-bind="delegatedProps">
<Button :class="cn('w-9 h-9 p-0', props.class)" variant="outline"> <Button :class="cn('h-9 w-9 p-0', props.class)" variant="outline">
<slot> <slot>
<Icon name="i-radix-icons-double-arrow-left" /> <Icon name="i-radix-icons-double-arrow-left" />
</slot> </slot>
@@ -1,12 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PaginationLastProps } from 'radix-vue' import type { PaginationLastProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import {
Button,
} from '@/components/ui/button'
import { cn } from '@/lib/utils'
import { PaginationLast } from 'radix-vue' import { PaginationLast } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { Button } from '@/components/pub/ui/button'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<PaginationLastProps & { class?: HTMLAttributes['class'] }>(), { const props = withDefaults(defineProps<PaginationLastProps & { class?: HTMLAttributes['class'] }>(), {
asChild: true, asChild: true,
@@ -21,7 +19,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationLast v-bind="delegatedProps"> <PaginationLast v-bind="delegatedProps">
<Button :class="cn('w-9 h-9 p-0', props.class)" variant="outline"> <Button :class="cn('h-9 w-9 p-0', props.class)" variant="outline">
<slot> <slot>
<Icon name="i-radix-icons-double-arrow-right" /> <Icon name="i-radix-icons-double-arrow-right" />
</slot> </slot>
@@ -1,12 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PaginationNextProps } from 'radix-vue' import type { PaginationNextProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import {
Button,
} from '@/components/ui/button'
import { cn } from '@/lib/utils'
import { PaginationNext } from 'radix-vue' import { PaginationNext } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { Button } from '@/components/pub/ui/button'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<PaginationNextProps & { class?: HTMLAttributes['class'] }>(), { const props = withDefaults(defineProps<PaginationNextProps & { class?: HTMLAttributes['class'] }>(), {
asChild: true, asChild: true,
@@ -21,7 +19,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationNext v-bind="delegatedProps"> <PaginationNext v-bind="delegatedProps">
<Button :class="cn('w-9 h-9 p-0', props.class)" variant="outline"> <Button :class="cn('h-9 w-9 p-0', props.class)" variant="outline">
<slot> <slot>
<Icon name="i-radix-icons-chevron-right" /> <Icon name="i-radix-icons-chevron-right" />
</slot> </slot>
@@ -1,12 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PaginationPrevProps } from 'radix-vue' import type { PaginationPrevProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import {
Button,
} from '@/components/ui/button'
import { cn } from '@/lib/utils'
import { PaginationPrev } from 'radix-vue' import { PaginationPrev } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { Button } from '@/components/pub/ui/button'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<PaginationPrevProps & { class?: HTMLAttributes['class'] }>(), { const props = withDefaults(defineProps<PaginationPrevProps & { class?: HTMLAttributes['class'] }>(), {
asChild: true, asChild: true,
@@ -21,7 +19,7 @@ const delegatedProps = computed(() => {
<template> <template>
<PaginationPrev v-bind="delegatedProps"> <PaginationPrev v-bind="delegatedProps">
<Button :class="cn('w-9 h-9 p-0', props.class)" variant="outline"> <Button :class="cn('h-9 w-9 p-0', props.class)" variant="outline">
<slot> <slot>
<Icon name="i-radix-icons-chevron-left" /> <Icon name="i-radix-icons-chevron-left" />
</slot> </slot>
+1 -1
View File
@@ -1,9 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PinInputRootEmits, PinInputRootProps } from 'radix-vue' import type { PinInputRootEmits, PinInputRootProps } from 'radix-vue'
import type { HTMLAttributes } from 'vue' import type { HTMLAttributes } from 'vue'
import { cn } from '@/lib/utils'
import { PinInputRoot, useForwardPropsEmits } from 'radix-vue' import { PinInputRoot, useForwardPropsEmits } from 'radix-vue'
import { computed } from 'vue' import { computed } from 'vue'
import { cn } from '@/lib/utils'
const props = withDefaults(defineProps<PinInputRootProps & { class?: HTMLAttributes['class'] }>(), { const props = withDefaults(defineProps<PinInputRootProps & { class?: HTMLAttributes['class'] }>(), {
modelValue: () => [], modelValue: () => [],
Loaded 100 of 173 files, more files were not shown because too many files have changed in this diff. Show more