import type { Meta, StoryObj } from '@storybook/vue3-vite' import { ref } from 'vue' import { Select as NychSelect, SelectTrigger as NychSelectTrigger, SelectValue as NychSelectValue, SelectContent as NychSelectContent, SelectItem as NychSelectItem, } from '@nychthemeron/library' const meta = { title: 'Components/Select', component: NychSelect, parameters: { layout: 'centered', }, tags: ['autodocs'], } satisfies Meta export default meta type Story = StoryObj const RIVERS = ['Styx', 'Acheron', 'Cocytus', 'Phlegethon', 'Lethe'] export const Default: Story = { render: () => ({ components: { NychSelect, NychSelectTrigger, NychSelectValue, NychSelectContent, NychSelectItem }, setup() { const river = ref() return { river, RIVERS } }, template: ` {{ r }} `, }), } export const Selected: Story = { render: () => ({ components: { NychSelect, NychSelectTrigger, NychSelectValue, NychSelectContent, NychSelectItem }, setup() { const river = ref('Lethe') return { river, RIVERS } }, template: ` {{ r }} `, }), } export const Disabled: Story = { render: () => ({ components: { NychSelect, NychSelectTrigger, NychSelectValue, NychSelectContent, NychSelectItem }, template: ` {{ r }} `, }), } export const ObjectOptions: Story = { render: () => ({ components: { NychSelect, NychSelectTrigger, NychSelectValue, NychSelectContent, NychSelectItem }, setup() { const god = ref() const gods = [ { name: 'Apollo', domain: 'apollo' }, { name: 'Hades', domain: 'hades' }, { name: 'Hermes', domain: 'hermes' }, ] return { god, gods } }, template: ` {{ g.name }} `, }), }