mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 09:44:06 +00:00
feat(ui): add shadcn-vue Select components (#8205)
## Summary Adds shadcn-vue Select components built on Reka UI primitives with design system styling. ## Changes **New Components** (`src/components/ui/select/`): - `Select.vue` - Root wrapper using `SelectRoot` from Reka UI - `SelectTrigger.vue` - Styled trigger with chevron icon - `SelectContent.vue` - Dropdown content with scroll buttons, z-index 3000 for PrimeVue dialog compatibility - `SelectItem.vue` - Individual option with check icon - `SelectGroup.vue`, `SelectLabel.vue`, `SelectSeparator.vue` - Grouping support - `SelectScrollUpButton.vue`, `SelectScrollDownButton.vue` - Overflow navigation - `SelectValue.vue` - Placeholder/value display **Styling**: - Uses design tokens (`bg-secondary-background`, `text-muted-foreground`, `border-border-default`) - Iconify icons via `icon-[lucide--*]` classes - Smooth transitions and focus states **Documentation**: - Comprehensive Storybook stories covering all variants - `AGENTS.md` with component creation guidelines ## Testing - [x] Storybook stories work correctly - [x] Components build without errors ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8205-feat-ui-add-shadcn-vue-Select-components-2ef6d73d365081fd994ddb1123c063e7) by [Unito](https://www.unito.io) --------- Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
27
src/components/ui/select/SelectScrollUpButton.vue
Normal file
27
src/components/ui/select/SelectScrollUpButton.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
import type { SelectScrollUpButtonProps } from 'reka-ui'
|
||||
import { SelectScrollUpButton } from 'reka-ui'
|
||||
import type { HTMLAttributes } from 'vue'
|
||||
|
||||
import { cn } from '@/utils/tailwindUtil'
|
||||
|
||||
const { class: className, ...restProps } = defineProps<
|
||||
SelectScrollUpButtonProps & { class?: HTMLAttributes['class'] }
|
||||
>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<SelectScrollUpButton
|
||||
v-bind="restProps"
|
||||
:class="
|
||||
cn(
|
||||
'flex cursor-default items-center justify-center py-1 text-muted-foreground',
|
||||
className
|
||||
)
|
||||
"
|
||||
>
|
||||
<slot>
|
||||
<i class="icon-[lucide--chevron-up]" />
|
||||
</slot>
|
||||
</SelectScrollUpButton>
|
||||
</template>
|
||||
Reference in New Issue
Block a user