mirror of
https://github.com/unraid/api.git
synced 2026-05-07 23:51:40 -05:00
a1d02b486a
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new `DropdownMenu` component in user profiles with dynamic content rendering. - Added a new `Popover` component with interactive Storybook demos, improving component discoverability. - Added a new `DropdownMenuArrow` component to enhance dropdown visuals. - Implemented new CSS custom properties for charts, enhancing styling capabilities in light and dark themes. - Enhanced dropdown functionality by encapsulating dropdown logic in a new `UpcDropdownMenu` component. - Added a new `Select` component for improved user interaction within the `Sheet` component. - Introduced a new `SheetWithSelect` story to showcase selection functionality within the `Sheet` component. - Updated the `Sidebar` component to improve modal behavior and content positioning. - Enhanced `UserProfile` components with a new feedback function for better status indication. - **Style** - Refined layouts by replacing fixed widths with flexible, responsive designs. - Updated global styling with a refreshed chart color palette and expanded dark mode support. - **Refactor** - Migrated components to use a unified UI library, streamlining interactions and boosting consistency. - Improved type safety in `BrandLoading` component by utilizing a new type for variants and sizes. - Updated component imports and organization to enhance maintainability. - **Bug Fixes** - Removed unused promotional code and components, simplifying the codebase and improving performance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mdatelle <mike@datelle.net> Co-authored-by: Zack Spear <hi@zackspear.com> Co-authored-by: Eli Bosley <ekbosley@gmail.com>
94 lines
2.4 KiB
TypeScript
94 lines
2.4 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
import {
|
|
Select as SelectComponent,
|
|
SelectContent,
|
|
SelectGroup,
|
|
SelectItem,
|
|
SelectLabel,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
} from '../../../src/components/form/select';
|
|
|
|
const meta = {
|
|
title: 'Components/Form/Select',
|
|
component: SelectComponent,
|
|
} satisfies Meta<typeof SelectComponent>;
|
|
|
|
export default meta;
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Select: Story = {
|
|
render: (args) => ({
|
|
components: {
|
|
SelectComponent,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
SelectContent,
|
|
SelectGroup,
|
|
SelectLabel,
|
|
SelectItem,
|
|
},
|
|
setup() {
|
|
return { args };
|
|
},
|
|
template: `
|
|
<SelectComponent>
|
|
<SelectTrigger class="w-[180px]">
|
|
<SelectValue placeholder="Select a fruit" />
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectGroup>
|
|
<SelectLabel>Fruits</SelectLabel>
|
|
<SelectItem value="apple">Apple</SelectItem>
|
|
<SelectItem value="banana">Banana</SelectItem>
|
|
<SelectItem value="orange">Orange</SelectItem>
|
|
<SelectItem value="grape">Grape</SelectItem>
|
|
</SelectGroup>
|
|
</SelectContent>
|
|
</SelectComponent>
|
|
`,
|
|
}),
|
|
};
|
|
|
|
export const Grouped: Story = {
|
|
render: (args) => ({
|
|
components: {
|
|
SelectComponent,
|
|
SelectTrigger,
|
|
SelectValue,
|
|
SelectContent,
|
|
SelectGroup,
|
|
SelectLabel,
|
|
SelectItem,
|
|
},
|
|
setup() {
|
|
return { args };
|
|
},
|
|
template: `
|
|
<div>
|
|
<unraid-modals></unraid-modals>
|
|
<SelectComponent>
|
|
<SelectTrigger class="w-[180px]">
|
|
<SelectValue placeholder="Select a food" />
|
|
</SelectTrigger>
|
|
<SelectContent>
|
|
<SelectGroup>
|
|
<SelectLabel>Fruits</SelectLabel>
|
|
<SelectItem value="apple">Apple</SelectItem>
|
|
<SelectItem value="banana">Banana</SelectItem>
|
|
<SelectItem value="grape">Grape</SelectItem>
|
|
</SelectGroup>
|
|
<SelectGroup>
|
|
<SelectLabel>Vegetables</SelectLabel>
|
|
<SelectItem value="carrot">Carrot</SelectItem>
|
|
<SelectItem value="potato">Potato</SelectItem>
|
|
<SelectItem value="celery">Celery</SelectItem>
|
|
</SelectGroup>
|
|
</SelectContent>
|
|
</SelectComponent>
|
|
</div>
|
|
`,
|
|
}),
|
|
};
|