Files
api/unraid-ui
renovate[bot] f7f40d7906 fix(deps): update all non-major dependencies (#1278)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@graphql-codegen/typescript-resolvers](https://redirect.github.com/dotansimha/graphql-code-generator)
([source](https://redirect.github.com/dotansimha/graphql-code-generator/tree/HEAD/packages/plugins/typescript/resolvers))
| [`4.4.4` ->
`4.5.0`](https://renovatebot.com/diffs/npm/@graphql-codegen%2ftypescript-resolvers/4.4.4/4.5.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@graphql-codegen%2ftypescript-resolvers/4.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@graphql-codegen%2ftypescript-resolvers/4.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@graphql-codegen%2ftypescript-resolvers/4.4.4/4.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@graphql-codegen%2ftypescript-resolvers/4.4.4/4.5.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [lucide-vue-next](https://lucide.dev)
([source](https://redirect.github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-vue-next))
| [`^0.483.0` ->
`^0.487.0`](https://renovatebot.com/diffs/npm/lucide-vue-next/0.483.0/0.487.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/lucide-vue-next/0.487.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/lucide-vue-next/0.487.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/lucide-vue-next/0.483.0/0.487.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/lucide-vue-next/0.483.0/0.487.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pnpm](https://pnpm.io)
([source](https://redirect.github.com/pnpm/pnpm/tree/HEAD/pnpm)) |
[`10.6.5` ->
`10.7.1`](https://renovatebot.com/diffs/npm/pnpm/10.6.5/10.7.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/10.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/pnpm/10.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/pnpm/10.6.5/10.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/10.6.5/10.7.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[vuetify-nuxt-module](https://redirect.github.com/vuetifyjs/nuxt-module)
| [`0.18.4` ->
`0.18.5`](https://renovatebot.com/diffs/npm/vuetify-nuxt-module/0.18.4/0.18.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/vuetify-nuxt-module/0.18.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/vuetify-nuxt-module/0.18.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/vuetify-nuxt-module/0.18.4/0.18.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vuetify-nuxt-module/0.18.4/0.18.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>dotansimha/graphql-code-generator
(@&#8203;graphql-codegen/typescript-resolvers)</summary>

###
[`v4.5.0`](https://redirect.github.com/dotansimha/graphql-code-generator/blob/HEAD/packages/plugins/typescript/resolvers/CHANGELOG.md#450)

[Compare
Source](https://redirect.github.com/dotansimha/graphql-code-generator/compare/@graphql-codegen/typescript-resolvers@4.4.4...@graphql-codegen/typescript-resolvers@4.5.0)

##### Minor Changes

-
[#&#8203;10315](https://redirect.github.com/dotansimha/graphql-code-generator/pull/10315)
[`f6909d1`](f6909d1797)
Thanks [@&#8203;eddeee888](https://redirect.github.com/eddeee888)! -
Implement semanticNonNull custom directive

##### Patch Changes

- Updated dependencies
\[[`f6909d1`](f6909d1797)]:
-
[@&#8203;graphql-codegen/visitor-plugin-common](https://redirect.github.com/graphql-codegen/visitor-plugin-common)[@&#8203;5](https://redirect.github.com/5).8.0
-
[@&#8203;graphql-codegen/typescript](https://redirect.github.com/graphql-codegen/typescript)[@&#8203;4](https://redirect.github.com/4).1.6

</details>

<details>
<summary>lucide-icons/lucide (lucide-vue-next)</summary>

###
[`v0.487.0`](https://redirect.github.com/lucide-icons/lucide/releases/tag/0.487.0):
Version 0.487.0

[Compare
Source](https://redirect.github.com/lucide-icons/lucide/compare/0.486.0...0.487.0)

#### What's Changed

- feat(icons): added `spline-pointer` icon by
[@&#8203;Kaleidosium](https://redirect.github.com/Kaleidosium) in
[https://github.com/lucide-icons/lucide/pull/2932](https://redirect.github.com/lucide-icons/lucide/pull/2932)

#### New Contributors

- [@&#8203;Kaleidosium](https://redirect.github.com/Kaleidosium) made
their first contribution in
[https://github.com/lucide-icons/lucide/pull/2932](https://redirect.github.com/lucide-icons/lucide/pull/2932)

**Full Changelog**:
https://github.com/lucide-icons/lucide/compare/0.486.0...0.487.0

###
[`v0.486.0`](https://redirect.github.com/lucide-icons/lucide/releases/tag/0.486.0):
Version 0.486.0

[Compare
Source](https://redirect.github.com/lucide-icons/lucide/compare/0.485.0...0.486.0)

#### What's Changed

-
feat([@&#8203;lucide/astro](https://redirect.github.com/lucide/astro)):
add lucide package for Astro by
[@&#8203;MoustaphaDev](https://redirect.github.com/MoustaphaDev) in
[https://github.com/lucide-icons/lucide/pull/2665](https://redirect.github.com/lucide-icons/lucide/pull/2665)

#### New Contributors

- [@&#8203;MoustaphaDev](https://redirect.github.com/MoustaphaDev) made
their first contribution in
[https://github.com/lucide-icons/lucide/pull/2665](https://redirect.github.com/lucide-icons/lucide/pull/2665)

**Full Changelog**:
https://github.com/lucide-icons/lucide/compare/0.485.0...0.486.0

###
[`v0.485.0`](https://redirect.github.com/lucide-icons/lucide/releases/tag/0.485.0):
Version 0.485.0

[Compare
Source](https://redirect.github.com/lucide-icons/lucide/compare/0.484.0...0.485.0)

#### What's Changed

- feat(icons): added `banknote-arrow-down` icon by
[@&#8203;joffx](https://redirect.github.com/joffx) in
[https://github.com/lucide-icons/lucide/pull/2948](https://redirect.github.com/lucide-icons/lucide/pull/2948)
- feat(icons): added `banknote-x` icon by
[@&#8203;joffx](https://redirect.github.com/joffx) in
[https://github.com/lucide-icons/lucide/pull/2949](https://redirect.github.com/lucide-icons/lucide/pull/2949)

**Full Changelog**:
https://github.com/lucide-icons/lucide/compare/0.484.0...0.485.0

###
[`v0.484.0`](https://redirect.github.com/lucide-icons/lucide/releases/tag/0.484.0):
Version 0.484.0

[Compare
Source](https://redirect.github.com/lucide-icons/lucide/compare/0.483.0...0.484.0)

#### What's Changed

- build(deps): bump tj-actions/changed-files from 41 to 46 in
/.github/workflows by
[@&#8203;dependabot](https://redirect.github.com/dependabot) in
[https://github.com/lucide-icons/lucide/pull/2920](https://redirect.github.com/lucide-icons/lucide/pull/2920)
- fix(packages): consistent icon name class by
[@&#8203;danteissaias](https://redirect.github.com/danteissaias) in
[https://github.com/lucide-icons/lucide/pull/2878](https://redirect.github.com/lucide-icons/lucide/pull/2878)
- feat(ci): add `x.com` to brand filter by
[@&#8203;jguddas](https://redirect.github.com/jguddas) in
[https://github.com/lucide-icons/lucide/pull/2939](https://redirect.github.com/lucide-icons/lucide/pull/2939)
- fix(icons): arcified candy & candy-off by
[@&#8203;karsa-mistmere](https://redirect.github.com/karsa-mistmere) in
[https://github.com/lucide-icons/lucide/pull/2944](https://redirect.github.com/lucide-icons/lucide/pull/2944)

#### New Contributors

- [@&#8203;danteissaias](https://redirect.github.com/danteissaias) made
their first contribution in
[https://github.com/lucide-icons/lucide/pull/2878](https://redirect.github.com/lucide-icons/lucide/pull/2878)

**Full Changelog**:
https://github.com/lucide-icons/lucide/compare/0.483.0...0.484.0

</details>

<details>
<summary>pnpm/pnpm (pnpm)</summary>

###
[`v10.7.1`](https://redirect.github.com/pnpm/pnpm/releases/tag/v10.7.1):
pnpm 10.7.1

[Compare
Source](https://redirect.github.com/pnpm/pnpm/compare/v10.7.0...v10.7.1)

#### Patch Changes

- `pnpm config set` should convert the settings to their correct type
before adding them to `pnpm-workspace.yaml`
[#&#8203;9355](https://redirect.github.com/pnpm/pnpm/issues/9355).
- `pnpm config get` should read auth related settings via npm CLI
[#&#8203;9345](https://redirect.github.com/pnpm/pnpm/issues/9345).
- Replace leading `~/` in a path in `.npmrc` with the home directory
[#&#8203;9217](https://redirect.github.com/pnpm/pnpm/issues/9217).

#### Platinum Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
<a href="https://bit.dev/?utm_source=pnpm&utm_medium=release_notes"
target="_blank"><img src="https://pnpm.io/img/users/bit.svg" width="80"
alt="Bit"></a>
      </td>
      <td align="center" valign="middle">
<a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes"
target="_blank"><img src="https://pnpm.io/img/users/sanity.svg"
width="180" alt="Bit"></a>
      </td>
      <td align="center" valign="middle">
<a href="https://syntax.fm/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/syntaxfm.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/syntaxfm_light.svg" />
<img src="https://pnpm.io/img/users/syntaxfm.svg" width="90"
alt="Syntax" />
          </picture>
        </a>
      </td>
    </tr>
  </tbody>
</table>

#### Gold Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
<a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/discord.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/discord_light.svg" />
<img src="https://pnpm.io/img/users/discord.svg" width="220"
alt="Discord" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://uscreen.de/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/uscreen.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/uscreen_light.svg" />
<img src="https://pnpm.io/img/users/uscreen.svg" width="180"
alt="u|screen" />
          </picture>
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
<a
href="https://www.jetbrains.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/jetbrains.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/jetbrains.svg" />
<img src="https://pnpm.io/img/users/jetbrains.svg" width="180"
alt="JetBrains" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/nx.svg?0" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/nx_light.svg?0" />
<img src="https://pnpm.io/img/users/nx.svg" width="70" alt="Nx" />
          </picture>
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
<a
href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/coderabbit.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
<img src="https://pnpm.io/img/users/coderabbit.svg" width="220"
alt="CodeRabbit" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a href="https://route4me.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
<img src="https://pnpm.io/img/users/route4me.svg" width="220"
alt="Route4Me" />
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
<a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/workleap.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/workleap_light.svg" />
<img src="https://pnpm.io/img/users/workleap.svg" width="190"
alt="Workleap" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
<a
href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes"
target="_blank">
          <picture>
<source media="(prefers-color-scheme: light)"
srcset="https://pnpm.io/img/users/stackblitz.svg" />
<source media="(prefers-color-scheme: dark)"
srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
<img src="https://pnpm.io/img/users/stackblitz.svg" width="190"
alt="Stackblitz" />
          </picture>
        </a>
      </td>
    </tr>
  </tbody>
</table>

###
[`v10.7.0`](https://redirect.github.com/pnpm/pnpm/blob/HEAD/pnpm/CHANGELOG.md#1070)

[Compare
Source](https://redirect.github.com/pnpm/pnpm/compare/v10.6.5...v10.7.0)

##### Minor Changes

- `pnpm config get` and `list` also show settings set in
`pnpm-workspace.yaml` files
[#&#8203;9316](https://redirect.github.com/pnpm/pnpm/pull/9316).

- It should be possible to use env variables in `pnpm-workspace.yaml`
setting names and value.

- Add an ability to patch dependencies by version ranges. Exact versions
override version ranges, which in turn override name-only patches.
Version range `*` is the same as name-only, except that patch
application failure will not be ignored.

    For example:

    ```yaml
    patchedDependencies:
      foo: patches/foo-1.patch
      foo@^2.0.0: patches/foo-2.patch
      foo@2.1.0: patches/foo-3.patch
    ```

The above configuration would apply `patches/foo-3.patch` to
`foo@2.1.0`, `patches/foo-2.patch` to all `foo` versions which satisfy
`^2.0.0` except `2.1.0`, and `patches/foo-1.patch` to the remaining
`foo` versions.

    > \[!WARNING]
> The version ranges should not overlap. If you want to specialize a sub
range, make sure to exclude it from the other keys. For example:
    >
    > ```yaml
    > # pnpm-workspace.yaml
    > patchedDependencies:
    >   # the specialized sub range
    >   'foo@2.2.0-2.8.0': patches/foo.2.2.0-2.8.0.patch
    >   # the more general patch, excluding the sub range above
    >   'foo@>=2.0.0 <2.2.0 || >2.8.0': 'patches/foo.gte2.patch
    > ```
    >
> In most cases, however, it's sufficient to just define an exact
version to override the range.

- `pnpm config set --location=project` saves the setting to a
`pnpm-workspace.yaml` file if no `.npmrc` file is present in the
directory
[#&#8203;9316](https://redirect.github.com/pnpm/pnpm/pull/9316).

- Rename `pnpm.allowNonAppliedPatches` to `pnpm.allowUnusedPatches`. The
old name is still supported but it would print a deprecation warning
message.

- Add `pnpm.ignorePatchFailures` to manage whether pnpm would ignore
patch application failures.

If `ignorePatchFailures` is not set, pnpm would throw an error when
patches with exact versions or version ranges fail to apply, and it
would ignore failures from name-only patches.

If `ignorePatchFailures` is explicitly set to `false`, pnpm would throw
an error when any type of patch fails to apply.

If `ignorePatchFailures` is explicitly set to `true`, pnpm would print a
warning when any type of patch fails to apply.

##### Patch Changes

- Remove dependency paths from audit output to prevent out-of-memory
errors
[#&#8203;9280](https://redirect.github.com/pnpm/pnpm/issues/9280).

</details>

<details>
<summary>vuetifyjs/nuxt-module (vuetify-nuxt-module)</summary>

###
[`v0.18.5`](https://redirect.github.com/vuetifyjs/nuxt-module/releases/tag/v0.18.5)

[Compare
Source](https://redirect.github.com/vuetifyjs/nuxt-module/compare/v0.18.4...v0.18.5)

#####    🐞 Bug Fixes

- **styles**: Resolve new scss component styles  -  by
[@&#8203;userquin](https://redirect.github.com/userquin) in
[https://github.com/vuetifyjs/nuxt-module/issues/305](https://redirect.github.com/vuetifyjs/nuxt-module/issues/305)
[<samp>(82139)</samp>](https://redirect.github.com/vuetifyjs/nuxt-module/commit/8213962)

#####     [View changes on
GitHub](https://redirect.github.com/vuetifyjs/nuxt-module/compare/v0.18.4...v0.18.5)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/unraid/api).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-02 09:40:11 -04:00
..
2025-03-04 15:18:04 -05:00

Unraid UI

A Vue 3 component library providing a set of reusable, accessible UI components for Unraid development.

Features

  • Built with Vue 3 and TypeScript
  • 🎭 Storybook documentation
  • Tested components
  • 🎪 Built on top of TailwindCSS and Shadcn/UI

Installation

Make sure you have the peer dependencies installed:

npm install vue@^3.3.0 tailwindcss@^3.0.0

Setup

1. Add CSS

Import the component library styles in your main entry file:

import '@unraid/ui/style.css';

2. Configure TailwindCSS

Create a tailwind.config.ts file with the following configuration:

import tailwindConfig from '@unraid/ui/tailwind.config.ts';
import type { Config } from 'tailwindcss';

export default {
  presets: [tailwindConfig],
  content: [
    // ... your content paths
    './components/**/*.{js,vue,ts}',
    './layouts/**/*.vue',
    './pages/**/*.vue',
  ],
  theme: {
    extend: {
      // your theme extensions
    },
  },
} satisfies Partial<Config>;

This configuration:

  • Uses the Unraid UI library's Tailwind config as a preset
  • Properly types your configuration with TypeScript
  • Allows you to extend the base theme while maintaining all Unraid UI defaults

Usage

<script setup lang="ts">
import { Button } from '@unraid/ui';
</script>

<template>
  <Button variant="primary"> Click me </Button>
</template>

Development

Local Development

Install dependencies:

npm install

Start Storybook development server:

npm run storybook

This will start Storybook at http://localhost:6006

Building

npm run build

Testing

Run tests:

npm run test

Run tests with UI:

npm run test:ui

Generate coverage report:

npm run coverage

Type Checking

npm run typecheck

Scripts

  • dev: Start development server
  • build: Build for production
  • preview: Preview production build
  • test: Run tests
  • test:ui: Run tests with UI
  • coverage: Generate test coverage
  • clean: Remove build artifacts
  • typecheck: Run type checking
  • storybook: Start Storybook development server
  • build-storybook: Build Storybook for production

License

Component Development

Installing Shadcn Components

  1. Install a new component using the Shadcn CLI:
npx shadcn-vue@latest add [component-name]
  1. The component will be installed in the root components folder. Move it to the appropriate subfolder based on its type:

    • Form components → src/components/form/
    • Layout components → src/components/layout/
    • Common components → src/components/common/
    • Brand components → src/components/brand/
  2. Update any imports in your codebase to reflect the new component location.

Component Variants Pattern

We use the class-variance-authority (CVA) package to manage component variants. Each component that supports variants should follow this pattern:

  1. Create a variants file (e.g., button.variants.ts):
import { cva } from 'class-variance-authority';

export const buttonVariants = cva('base-classes-here', {
  variants: {
    variant: {
      primary: 'variant-specific-classes',
      secondary: 'variant-specific-classes',
      // ... other variants
    },
    size: {
      sm: 'size-specific-classes',
      md: 'size-specific-classes',
      lg: 'size-specific-classes',
    },
  },
  defaultVariants: {
    variant: 'primary',
    size: 'md',
  },
});
  1. Use the variants in your component (e.g., Button.vue):
<script setup lang="ts">



import { computed } from "vue";
import { buttonVariants } from "./button.variants";
import { cn } from "@/lib/utils";

export interface ButtonProps {
  variant?: "primary" | "secondary" | /* other variants */;
  size?: "sm" | "md" | "lg";
  class?: string;
}

const props = withDefaults(defineProps<ButtonProps>(), {
  variant: "primary",
  size: "md",
});

const buttonClass = computed(() => {
  return cn(
    buttonVariants({ variant: props.variant, size: props.size }),
    props.class
  );
});
</script>

<template>
  <button :class="buttonClass">
    <slot />
  </button>
</template>

Storybook Development

We use Storybook for component development and documentation. To start the Storybook development server:

npm run storybook

This will start Storybook at http://localhost:6006

When creating stories for your components:

  1. Place story files in the stories directory
  2. Name your story files as ComponentName.stories.ts
  3. Include examples of all variants and states
  4. Add documentation using JSDoc comments

Example story file:

import type { Meta, StoryObj } from '@storybook/vue3';
import { Button } from '../src/components/common/button';

const meta = {
  title: 'Components/Button',
  component: Button,
  tags: ['autodocs'],
  argTypes: {
    variant: {
      control: 'select',
      options: ['primary', 'secondary', 'outline'],
    },
    size: {
      control: 'select',
      options: ['sm', 'md', 'lg'],
    },
  },
} satisfies Meta<typeof Button>;

export default meta;
type Story = StoryObj<typeof meta>;

export const Primary: Story = {
  args: {
    variant: 'primary',
    size: 'md',
  },
};

export const Secondary: Story = {
  args: {
    variant: 'secondary',
    size: 'md',
  },
};