Skip to content

Commit

Permalink
chore: lint and enable Volar hybrid mode (unovue#419)
Browse files Browse the repository at this point in the history
* chore: update deps

* feat: enable Volar hybrid mode

* chore: lint

* chore: build registry
  • Loading branch information
sadeghbarati authored Mar 20, 2024
1 parent 24fc8f7 commit d34c620
Show file tree
Hide file tree
Showing 215 changed files with 2,618 additions and 1,235 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"vue.server.hybridMode": true,
"eslint.experimental.useFlatConfig": true,
"prettier.enable": false,
"editor.formatOnSave": false,
Expand Down
2 changes: 1 addition & 1 deletion apps/www/.vitepress/theme/components/Logo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
</script>

<template>
<a href="/" class="mr-4 md:mr-2 xl:mr-6 flex items-center lg:space-x1 xl:space-x-2">
<a href="/" class="mr-4 md:mr-2 lg:mr-6 flex items-center lg:space-x1 xl:space-x-2">
<svg class="h-6 w-6" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_102_1338)">
<path d="M208 128L128 208" stroke="#41B883" stroke-width="16" stroke-linecap="round" stroke-linejoin="round" />
Expand Down
2 changes: 1 addition & 1 deletion apps/www/.vitepress/theme/components/StyleSwitcher.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { type SelectTriggerProps } from 'radix-vue'
import type { SelectTriggerProps } from 'radix-vue'
import { useConfigStore } from '@/stores/config'
import { cn } from '@/lib/utils'
Expand Down
3 changes: 1 addition & 2 deletions apps/www/.vitepress/theme/components/TabMarkdown.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<script setup lang="ts">
import { useSlots } from 'vue'
import { TabsContent, TabsTrigger } from '@/lib/registry/default/ui/tabs'
import { TabsContent } from '@/lib/registry/default/ui/tabs'
withDefaults(defineProps<{
title?: string
Expand Down
2 changes: 1 addition & 1 deletion apps/www/.vitepress/theme/components/TabsMarkdown.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed, useSlots } from 'vue'
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/lib/registry/default/ui/tabs'
import { Tabs, TabsList, TabsTrigger } from '@/lib/registry/default/ui/tabs'
const slots = useSlots()
Expand Down
1 change: 0 additions & 1 deletion apps/www/.vitepress/theme/layout/DocsLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { docsConfig } from '../config/docs'
import TableOfContentVue from '../components/TableOfContent.vue'
import EditLink from '../components/EditLink.vue'
import { ScrollArea } from '@/lib/registry/default/ui/scroll-area'
import { Badge } from '@/lib/registry/default/ui/badge'
import RadixIconsCode from '~icons/radix-icons/code'
import RadixIconsExternalLink from '~icons/radix-icons/external-link'
import ChevronRightIcon from '~icons/lucide/chevron-right'
Expand Down
2 changes: 1 addition & 1 deletion apps/www/.vitepress/theme/layout/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ watch(() => $route.path, (n) => {
<Logo />

<nav
class="flex items-center space-x-6 text-sm font-medium"
class="flex items-center max-lg:space-x-4 space-x-6 text-sm font-medium"
>
<a
v-for="route in docsConfig.mainNav"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/__registry__/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
> Files inside this directory is autogenerated by `./scripts/build-registry.ts`. **Do not edit them manually.**
> Files inside this directory is autogenerated by `./scripts/build-registry.ts`. **Do not edit them manually.**
20 changes: 10 additions & 10 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
"@formkit/auto-animate": "^0.8.1",
"@radix-icons/vue": "^1.0.0",
"@stackblitz/sdk": "^1.9.0",
"@tanstack/vue-table": "^8.13.2",
"@tanstack/vue-table": "^8.14.0",
"@unovis/ts": "^1.3.5",
"@unovis/vue": "^1.3.5",
"@vee-validate/zod": "^4.12.6",
"@vueuse/core": "^10.9.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"codesandbox": "^2.2.3",
"date-fns": "^3.4.0",
"date-fns": "^3.6.0",
"embla-carousel": "^8.0.0",
"embla-carousel-autoplay": "^8.0.0",
"embla-carousel-vue": "^8.0.0",
"lucide-vue-next": "^0.350.0",
"lucide-vue-next": "^0.359.0",
"magic-string": "^0.30.8",
"radix-vue": "^1.5.2",
"radix-vue": "^1.5.3",
"tailwindcss-animate": "^1.0.7",
"v-calendar": "^3.1.2",
"vaul-vue": "^0.1.0",
Expand All @@ -48,9 +48,9 @@
"@iconify-json/tabler": "^1.1.106",
"@iconify/json": "^2.2.189",
"@iconify/vue": "^4.1.1",
"@shikijs/transformers": "^1.1.7",
"@shikijs/transformers": "^1.2.0",
"@types/lodash.template": "^4.5.3",
"@types/node": "^20.11.27",
"@types/node": "^20.11.30",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue/compiler-core": "^3.4.21",
Expand All @@ -61,14 +61,14 @@
"oxc-parser": "^0.8.0",
"pathe": "^1.1.2",
"rimraf": "^5.0.5",
"shiki": "^1.1.7",
"tailwind-merge": "^2.2.1",
"shiki": "^1.2.0",
"tailwind-merge": "^2.2.2",
"tailwindcss": "^3.4.1",
"tsx": "^4.7.1",
"typescript": "^5.4.2",
"unplugin-icons": "^0.18.5",
"vite": "^5.1.6",
"vite": "^5.2.2",
"vitepress": "^1.0.0-rc.45",
"vue-tsc": "^2.0.6"
"vue-tsc": "^2.0.7"
}
}
4 changes: 2 additions & 2 deletions apps/www/src/content/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Where is your global CSS file? › › src/index.css
Do you want to use CSS variables for colors? › no / yes
Where is your tailwind.config.js located? › tailwind.config.js
Configure the import alias for components: › @/components
Configure the import alias for utils: › @/lib/utils
Configure the import alias for utils: › @/lib/utils
```

### Options
Expand Down Expand Up @@ -101,4 +101,4 @@ Arguments:
Options:
-c, --cwd <cwd> the working directory. (default: the current directory)
-h, --help display help for command
```
```
4 changes: 0 additions & 4 deletions apps/www/src/content/docs/components-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ This is used to generate the default color palette for your components. **This c
}
```


### tailwind.cssVariables

You can choose between using CSS variables or Tailwind CSS utility classes for theming.
Expand All @@ -109,15 +108,13 @@ For more information, see the [theming docs](/docs/theming).

**This cannot be changed after initialization.** To switch between CSS variables and utility classes, you'll have to delete and re-install your components.


## aliases

The CLI uses these values and the `paths` config from your `tsconfig.json` or `jsconfig.json` file to place generated components in the correct location.

Path aliases have to be set up in your `tsconfig.json` or `jsconfig.json` file.

> A fallback to `tsconfig.app.json` if no `paths` were found in `tsconfig.json`
<Callout class="mt-6">

Expand All @@ -126,7 +123,6 @@ Path aliases have to be set up in your `tsconfig.json` or `jsconfig.json` file.

</Callout>


### aliases.utils

Import alias for your utility functions.
Expand Down
10 changes: 3 additions & 7 deletions apps/www/src/content/docs/components/accordion.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
---
title: Accordion
description: A vertically stacked set of interactive headings that each reveal a section of content.
source: apps/www/src/lib/registry/default/ui/accordion
description: A vertically stacked set of interactive headings that each reveal a section of content.
source: apps/www/src/lib/registry/default/ui/accordion
primitive: https://www.radix-vue.com/components/accordion.html
---


<ComponentPreview name="AccordionDemo" class="sm:max-w-[70%]" />

## Installation


<Steps>

Expand Down Expand Up @@ -46,9 +44,8 @@ module.exports = {
},
}
```

</Steps>


## Usage

Expand All @@ -68,4 +65,3 @@ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/
</Accordion>
</template>
```

13 changes: 5 additions & 8 deletions apps/www/src/content/docs/components/alert-dialog.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
---
title: Alert Dialog
description: A modal dialog that interrupts the user with important content and expects a response.
source: apps/www/src/lib/registry/default/ui/alert-dialog
source: apps/www/src/lib/registry/default/ui/alert-dialog
primitive: https://www.radix-vue.com/components/alert-dialog.html
---



<ComponentPreview name="AlertDialogDemo" />

## Installation

## Installation

```bash
npx shadcn-vue@latest add alert-dialog
```

## Usage

```vue
Expand Down Expand Up @@ -51,4 +48,4 @@ import {
</AlertDialogContent>
</AlertDialog>
</template>
```
```
13 changes: 4 additions & 9 deletions apps/www/src/content/docs/components/alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ title: Alert
description: Displays a callout for user attention.
---


<ComponentPreview name="AlertDemo" />
<ComponentPreview name="AlertDemo" />

## Installation


```bash
npx shadcn-vue@latest add alert
```

## Usage

```vue
Expand All @@ -34,11 +32,8 @@ import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert'

### Default

<ComponentPreview name="AlertDemo" />

<ComponentPreview name="AlertDemo" />

### Destructive

<ComponentPreview name="AlertDestructiveDemo" />


<ComponentPreview name="AlertDestructiveDemo" />
5 changes: 2 additions & 3 deletions apps/www/src/content/docs/components/aspect-ratio.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
title: Aspect Ratio
description: Displays content within a desired ratio.
source: apps/www/src/lib/registry/default/ui/aspect-ratio
source: apps/www/src/lib/registry/default/ui/aspect-ratio
primitive: https://www.radix-vue.com/components/aspect-ratio.html
---


<ComponentPreview name="AspectRatioDemo" />

## Installation
Expand Down Expand Up @@ -51,4 +50,4 @@ import { AspectRatio } from '@/components/ui/aspect-ratio'
</AspectRatio>
</div>
</template>
```
```
11 changes: 4 additions & 7 deletions apps/www/src/content/docs/components/avatar.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
---
title: Avatar
description: An image element with a fallback for representing the user.
source: apps/www/src/lib/registry/default/ui/avatar
source: apps/www/src/lib/registry/default/ui/avatar
primitive: https://www.radix-vue.com/components/avatar.html
---


<ComponentPreview name="AvatarDemo" />

<ComponentPreview name="AvatarDemo" />

## Installation


```bash
npx shadcn-vue@latest add avatar
```
```

## Usage

Expand All @@ -29,4 +26,4 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
<AvatarFallback>CN</AvatarFallback>
</Avatar>
</template>
```
```
9 changes: 3 additions & 6 deletions apps/www/src/content/docs/components/badge.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ title: Badge
description: Displays a badge or a component that looks like a badge.
---


<ComponentPreview name="BadgeDemo" />
<ComponentPreview name="BadgeDemo" />

## Installation

Expand Down Expand Up @@ -80,13 +79,11 @@ import { Badge } from '@/components/ui/badge'
</template>
```


## Examples

### Default

<ComponentPreview name="BadgeDemo" />

<ComponentPreview name="BadgeDemo" />

### Secondary

Expand All @@ -98,4 +95,4 @@ import { Badge } from '@/components/ui/badge'

### Destructive

<ComponentPreview name="BadgeDestructiveDemo" />
<ComponentPreview name="BadgeDestructiveDemo" />
11 changes: 3 additions & 8 deletions apps/www/src/content/docs/components/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ title: Button
description: Displays a button or a component that looks like a button.
---


<ComponentPreview name="ButtonDemo" />
<ComponentPreview name="ButtonDemo" />

## Installation

Expand Down Expand Up @@ -94,24 +93,20 @@ import { Button } from '@/components/ui/button'
</template>
```


## Examples

### Primary

<ComponentPreview name="ButtonDemo" />

<ComponentPreview name="ButtonDemo" />

### Secondary

<ComponentPreview name="ButtonSecondaryDemo" />


### Destructive

<ComponentPreview name="ButtonDestructiveDemo" />


### Outline

<ComponentPreview name="ButtonOutlineDemo" />
Expand All @@ -138,4 +133,4 @@ import { Button } from '@/components/ui/button'

### As Child

<ComponentPreview name="ButtonAsChildDemo" />
<ComponentPreview name="ButtonAsChildDemo" />
Loading

0 comments on commit d34c620

Please sign in to comment.