The CLI's default style uses a very subtle ring-foreground/10 (10%-opacity ring) instead of a real border for Card, DialogContent, and SelectContent, which reads as invisible against our dark Hades theme. Swap to a real border-border + shadow, matching the original PrimeVue-era design's visible borders. Also: CardTitle/DialogTitle/AlertTitle referenced a `cn-font-heading` class that is never defined anywhere (dead weight from the CLI's default style template), so titles silently fell back to the body font instead of our --font-serif (Cinzel) heading font. Replaced with the real `font-serif` utility. Also drops another dead class, `cn-menu-translucent`, from SelectContent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
58 lines
2.2 KiB
Vue
58 lines
2.2 KiB
Vue
<script setup lang="ts">
|
|
import type { SelectContentEmits, SelectContentProps } from "reka-ui"
|
|
import type { HTMLAttributes } from "vue"
|
|
import { reactiveOmit } from "@vueuse/core"
|
|
import {
|
|
SelectContent,
|
|
SelectPortal,
|
|
SelectViewport,
|
|
useForwardPropsEmits,
|
|
} from "reka-ui"
|
|
import { cn } from "@/lib/utils"
|
|
import { SelectScrollDownButton, SelectScrollUpButton } from "."
|
|
|
|
defineOptions({
|
|
inheritAttrs: false,
|
|
})
|
|
|
|
const props = withDefaults(
|
|
defineProps<SelectContentProps & { class?: HTMLAttributes["class"] }>(),
|
|
{
|
|
position: "item-aligned",
|
|
align: "center",
|
|
},
|
|
)
|
|
const emits = defineEmits<SelectContentEmits>()
|
|
|
|
const delegatedProps = reactiveOmit(props, "class")
|
|
|
|
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
</script>
|
|
|
|
<template>
|
|
<SelectPortal>
|
|
<SelectContent
|
|
data-slot="select-content"
|
|
:data-align-trigger="position === 'item-aligned'"
|
|
v-bind="{ ...$attrs, ...forwarded }"
|
|
:class="cn(
|
|
'bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-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 border border-border min-w-36 rounded-lg shadow-md duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 relative z-50 max-h-(--reka-select-content-available-height) origin-(--reka-select-content-transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none',
|
|
position === 'popper'
|
|
&& 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
props.class,
|
|
)
|
|
"
|
|
>
|
|
<SelectScrollUpButton />
|
|
<SelectViewport
|
|
:data-position="position"
|
|
:class="cn(
|
|
'data-[position=popper]:h-(--reka-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--reka-select-trigger-width)',
|
|
)"
|
|
>
|
|
<slot />
|
|
</SelectViewport>
|
|
<SelectScrollDownButton />
|
|
</SelectContent>
|
|
</SelectPortal>
|
|
</template>
|