From ef4609abbf69ccf84e5b437646904d8df526fdb7 Mon Sep 17 00:00:00 2001 From: Nik Date: Fri, 3 Nov 2023 07:15:40 +0530 Subject: [PATCH] feat: add toast (#122) * feat: add toast * feat: add new york version * feat: add `VNode` type to toast description * docs: use `toast` in form demos * chore: run build registry * docs: update announcement component, menu label * refactor: change 'onUpdate:open' to 'onOpenChange' a more friendlier name --------- Co-authored-by: Nik Co-authored-by: Sadegh Barati Co-authored-by: zernonia --- .../theme/components/LandingPage.vue | 9 +- apps/www/.vitepress/theme/config/docs.ts | 15 +- apps/www/.vitepress/theme/config/site.ts | 6 + .../theme/layout/ExamplesLayout.vue | 9 +- .../.vitepress/theme/layout/MainLayout.vue | 5 +- apps/www/__registry__/index.ts | 122 ++++++++++--- apps/www/src/content/docs/components/toast.md | 93 ++++++++++ .../examples/forms/components/AccountForm.vue | 8 +- .../forms/components/AppearanceForm.vue | 7 +- .../examples/forms/components/DisplayForm.vue | 7 +- .../forms/components/NotificationsForm.vue | 7 +- .../examples/forms/components/ProfileForm.vue | 8 +- .../default/example/CheckboxFormMultiple.vue | 7 +- .../default/example/CheckboxFormSingle.vue | 7 +- .../registry/default/example/ComboboxForm.vue | 7 +- .../default/example/DatePickerForm.vue | 7 +- .../registry/default/example/InputForm.vue | 7 +- .../default/example/InputFormAutoAnimate.vue | 7 +- .../default/example/RadioGroupForm.vue | 7 +- .../registry/default/example/SelectForm.vue | 7 +- .../registry/default/example/SwitchForm.vue | 7 +- .../registry/default/example/TextareaForm.vue | 7 +- .../registry/default/example/ToastDemo.vue | 19 ++ .../default/example/ToastDestructive.vue | 27 +++ .../registry/default/example/ToastSimple.vue | 18 ++ .../default/example/ToastWithAction.vue | 26 +++ .../default/example/ToastWithTitle.vue | 19 ++ .../lib/registry/default/ui/switch/Switch.vue | 1 - .../lib/registry/default/ui/toast/Toast.vue | 32 ++++ .../registry/default/ui/toast/ToastAction.vue | 12 ++ .../registry/default/ui/toast/ToastClose.vue | 15 ++ .../default/ui/toast/ToastDescription.vue | 12 ++ .../default/ui/toast/ToastProvider.vue | 11 ++ .../registry/default/ui/toast/ToastTitle.vue | 12 ++ .../default/ui/toast/ToastViewport.vue | 10 ++ .../lib/registry/default/ui/toast/Toaster.vue | 30 ++++ .../lib/registry/default/ui/toast/index.ts | 27 +++ .../registry/default/ui/toast/use-toast.ts | 165 ++++++++++++++++++ .../new-york/example/CheckboxFormMultiple.vue | 7 +- .../new-york/example/CheckboxFormSingle.vue | 7 +- .../new-york/example/ComboboxForm.vue | 7 +- .../new-york/example/DatePickerForm.vue | 7 +- .../registry/new-york/example/InputForm.vue | 7 +- .../new-york/example/InputFormAutoAnimate.vue | 7 +- .../new-york/example/RadioGroupForm.vue | 7 +- .../registry/new-york/example/SelectForm.vue | 7 +- .../registry/new-york/example/SwitchForm.vue | 7 +- .../new-york/example/TextareaForm.vue | 7 +- .../registry/new-york/example/ToastDemo.vue | 19 ++ .../new-york/example/ToastDestructive.vue | 27 +++ .../registry/new-york/example/ToastSimple.vue | 18 ++ .../new-york/example/ToastWithAction.vue | 26 +++ .../new-york/example/ToastWithTitle.vue | 19 ++ .../lib/registry/new-york/ui/toast/Toast.vue | 32 ++++ .../new-york/ui/toast/ToastAction.vue | 12 ++ .../registry/new-york/ui/toast/ToastClose.vue | 15 ++ .../new-york/ui/toast/ToastDescription.vue | 12 ++ .../new-york/ui/toast/ToastProvider.vue | 11 ++ .../registry/new-york/ui/toast/ToastTitle.vue | 12 ++ .../new-york/ui/toast/ToastViewport.vue | 10 ++ .../registry/new-york/ui/toast/Toaster.vue | 30 ++++ .../lib/registry/new-york/ui/toast/index.ts | 27 +++ .../registry/new-york/ui/toast/use-toast.ts | 165 ++++++++++++++++++ apps/www/src/public/registry/index.json | 22 +++ .../registry/styles/default/switch.json | 2 +- .../public/registry/styles/default/toast.json | 47 ++++- .../registry/styles/new-york/toast.json | 47 ++++- 67 files changed, 1336 insertions(+), 89 deletions(-) create mode 100644 apps/www/src/content/docs/components/toast.md create mode 100644 apps/www/src/lib/registry/default/example/ToastDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ToastDestructive.vue create mode 100644 apps/www/src/lib/registry/default/example/ToastSimple.vue create mode 100644 apps/www/src/lib/registry/default/example/ToastWithAction.vue create mode 100644 apps/www/src/lib/registry/default/example/ToastWithTitle.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/Toast.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/ToastAction.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/ToastClose.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/ToastDescription.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/ToastProvider.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/ToastTitle.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/ToastViewport.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/Toaster.vue create mode 100644 apps/www/src/lib/registry/default/ui/toast/index.ts create mode 100644 apps/www/src/lib/registry/default/ui/toast/use-toast.ts create mode 100644 apps/www/src/lib/registry/new-york/example/ToastDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToastDestructive.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToastSimple.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToastWithAction.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToastWithTitle.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/Toast.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/ToastAction.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/ToastClose.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/ToastDescription.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/ToastProvider.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/ToastTitle.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/ToastViewport.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/Toaster.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/index.ts create mode 100644 apps/www/src/lib/registry/new-york/ui/toast/use-toast.ts diff --git a/apps/www/.vitepress/theme/components/LandingPage.vue b/apps/www/.vitepress/theme/components/LandingPage.vue index dd3db7ea..ea6bab61 100644 --- a/apps/www/.vitepress/theme/components/LandingPage.vue +++ b/apps/www/.vitepress/theme/components/LandingPage.vue @@ -3,6 +3,7 @@ import PageHeader from '../components/PageHeader.vue' import PageHeaderHeading from '../components/PageHeaderHeading.vue' import PageHeaderDescription from '../components/PageHeaderDescription.vue' import ExamplesNav from '../components/ExamplesNav.vue' +import { announcementConfig } from '../config/site' import ArrowRightIcon from '~icons/radix-icons/arrow-right' import GitHubIcon from '~icons/radix-icons/github-logo' @@ -16,12 +17,12 @@ import DashboardExample from '@/examples/dashboard/Example.vue' diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts index 0251b406..61fbc8ca 100644 --- a/apps/www/__registry__/index.ts +++ b/apps/www/__registry__/index.ts @@ -103,14 +103,14 @@ export const Index = { CheckboxFormMultiple: { name: 'CheckboxFormMultiple', type: 'components:example', - registryDependencies: ['button', 'form', 'checkbox'], + registryDependencies: ['button', 'form', 'checkbox', 'toast'], component: () => import('../src/lib/registry/default/example/CheckboxFormMultiple.vue').then(m => m.default), files: ['../src/lib/registry/default/example/CheckboxFormMultiple.vue'], }, CheckboxFormSingle: { name: 'CheckboxFormSingle', type: 'components:example', - registryDependencies: ['button', 'form', 'checkbox'], + registryDependencies: ['button', 'form', 'checkbox', 'toast'], component: () => import('../src/lib/registry/default/example/CheckboxFormSingle.vue').then(m => m.default), files: ['../src/lib/registry/default/example/CheckboxFormSingle.vue'], }, @@ -145,7 +145,7 @@ export const Index = { ComboboxForm: { name: 'ComboboxForm', type: 'components:example', - registryDependencies: ['utils', 'button', 'command', 'form', 'popover'], + registryDependencies: ['utils', 'button', 'command', 'form', 'popover', 'toast'], component: () => import('../src/lib/registry/default/example/ComboboxForm.vue').then(m => m.default), files: ['../src/lib/registry/default/example/ComboboxForm.vue'], }, @@ -194,7 +194,7 @@ export const Index = { DatePickerForm: { name: 'DatePickerForm', type: 'components:example', - registryDependencies: ['utils', 'button', 'calendar', 'form', 'popover'], + registryDependencies: ['utils', 'button', 'calendar', 'form', 'popover', 'toast'], component: () => import('../src/lib/registry/default/example/DatePickerForm.vue').then(m => m.default), files: ['../src/lib/registry/default/example/DatePickerForm.vue'], }, @@ -257,14 +257,14 @@ export const Index = { InputForm: { name: 'InputForm', type: 'components:example', - registryDependencies: ['button', 'form', 'input'], + registryDependencies: ['button', 'form', 'input', 'toast'], component: () => import('../src/lib/registry/default/example/InputForm.vue').then(m => m.default), files: ['../src/lib/registry/default/example/InputForm.vue'], }, InputFormAutoAnimate: { name: 'InputFormAutoAnimate', type: 'components:example', - registryDependencies: ['button', 'form', 'input'], + registryDependencies: ['button', 'form', 'input', 'toast'], component: () => import('../src/lib/registry/default/example/InputFormAutoAnimate.vue').then(m => m.default), files: ['../src/lib/registry/default/example/InputFormAutoAnimate.vue'], }, @@ -341,7 +341,7 @@ export const Index = { RadioGroupForm: { name: 'RadioGroupForm', type: 'components:example', - registryDependencies: ['button', 'form', 'radio-group'], + registryDependencies: ['button', 'form', 'radio-group', 'toast'], component: () => import('../src/lib/registry/default/example/RadioGroupForm.vue').then(m => m.default), files: ['../src/lib/registry/default/example/RadioGroupForm.vue'], }, @@ -362,7 +362,7 @@ export const Index = { SelectForm: { name: 'SelectForm', type: 'components:example', - registryDependencies: ['button', 'form', 'select'], + registryDependencies: ['button', 'form', 'select', 'toast'], component: () => import('../src/lib/registry/default/example/SelectForm.vue').then(m => m.default), files: ['../src/lib/registry/default/example/SelectForm.vue'], }, @@ -404,7 +404,7 @@ export const Index = { SwitchForm: { name: 'SwitchForm', type: 'components:example', - registryDependencies: ['button', 'form', 'switch'], + registryDependencies: ['button', 'form', 'switch', 'toast'], component: () => import('../src/lib/registry/default/example/SwitchForm.vue').then(m => m.default), files: ['../src/lib/registry/default/example/SwitchForm.vue'], }, @@ -439,7 +439,7 @@ export const Index = { TextareaForm: { name: 'TextareaForm', type: 'components:example', - registryDependencies: ['button', 'form', 'textarea'], + registryDependencies: ['button', 'form', 'textarea', 'toast'], component: () => import('../src/lib/registry/default/example/TextareaForm.vue').then(m => m.default), files: ['../src/lib/registry/default/example/TextareaForm.vue'], }, @@ -464,6 +464,41 @@ export const Index = { component: () => import('../src/lib/registry/default/example/TextareaWithText.vue').then(m => m.default), files: ['../src/lib/registry/default/example/TextareaWithText.vue'], }, + ToastDemo: { + name: 'ToastDemo', + type: 'components:example', + registryDependencies: ['button', 'use-toast'], + component: () => import('../src/lib/registry/default/example/ToastDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToastDemo.vue'], + }, + ToastDestructive: { + name: 'ToastDestructive', + type: 'components:example', + registryDependencies: ['button', 'use-toast', 'toast'], + component: () => import('../src/lib/registry/default/example/ToastDestructive.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToastDestructive.vue'], + }, + ToastSimple: { + name: 'ToastSimple', + type: 'components:example', + registryDependencies: ['button', 'use-toast'], + component: () => import('../src/lib/registry/default/example/ToastSimple.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToastSimple.vue'], + }, + ToastWithAction: { + name: 'ToastWithAction', + type: 'components:example', + registryDependencies: ['button', 'use-toast', 'toast'], + component: () => import('../src/lib/registry/default/example/ToastWithAction.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToastWithAction.vue'], + }, + ToastWithTitle: { + name: 'ToastWithTitle', + type: 'components:example', + registryDependencies: ['button', 'use-toast'], + component: () => import('../src/lib/registry/default/example/ToastWithTitle.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToastWithTitle.vue'], + }, ToggleDemo: { name: 'ToggleDemo', type: 'components:example', @@ -581,21 +616,21 @@ export const Index = { type: 'components:example', registryDependencies: ['button', 'card', 'themes', 'config'], component: () => import('../src/lib/registry/default/example/Cards/ActivityGoal.vue').then(m => m.default), - files: ['../src/lib/registry/default/example/ActivityGoal.vue'], + files: ['../src/lib/registry/default/example/Cards/ActivityGoal.vue'], }, DataTable: { name: 'DataTable', type: 'components:example', registryDependencies: ['button', 'checkbox', 'dropdown-menu', 'input', 'table', 'card', 'utils'], component: () => import('../src/lib/registry/default/example/Cards/DataTable.vue').then(m => m.default), - files: ['../src/lib/registry/default/example/DataTable.vue'], + files: ['../src/lib/registry/default/example/Cards/DataTable.vue'], }, Metric: { name: 'Metric', type: 'components:example', registryDependencies: ['card', 'config'], component: () => import('../src/lib/registry/default/example/Cards/Metric.vue').then(m => m.default), - files: ['../src/lib/registry/default/example/Metric.vue'], + files: ['../src/lib/registry/default/example/Cards/Metric.vue'], }, }, 'new-york': { @@ -700,14 +735,14 @@ export const Index = { CheckboxFormMultiple: { name: 'CheckboxFormMultiple', type: 'components:example', - registryDependencies: ['button', 'form', 'checkbox'], + registryDependencies: ['button', 'form', 'checkbox', 'toast'], component: () => import('../src/lib/registry/new-york/example/CheckboxFormMultiple.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/CheckboxFormMultiple.vue'], }, CheckboxFormSingle: { name: 'CheckboxFormSingle', type: 'components:example', - registryDependencies: ['button', 'form', 'checkbox'], + registryDependencies: ['button', 'form', 'checkbox', 'toast'], component: () => import('../src/lib/registry/new-york/example/CheckboxFormSingle.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/CheckboxFormSingle.vue'], }, @@ -742,7 +777,7 @@ export const Index = { ComboboxForm: { name: 'ComboboxForm', type: 'components:example', - registryDependencies: ['utils', 'button', 'command', 'form', 'popover'], + registryDependencies: ['utils', 'button', 'command', 'form', 'popover', 'toast'], component: () => import('../src/lib/registry/new-york/example/ComboboxForm.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/ComboboxForm.vue'], }, @@ -791,7 +826,7 @@ export const Index = { DatePickerForm: { name: 'DatePickerForm', type: 'components:example', - registryDependencies: ['utils', 'button', 'calendar', 'form', 'popover'], + registryDependencies: ['utils', 'button', 'calendar', 'form', 'popover', 'toast'], component: () => import('../src/lib/registry/new-york/example/DatePickerForm.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/DatePickerForm.vue'], }, @@ -854,14 +889,14 @@ export const Index = { InputForm: { name: 'InputForm', type: 'components:example', - registryDependencies: ['button', 'form', 'input'], + registryDependencies: ['button', 'form', 'input', 'toast'], component: () => import('../src/lib/registry/new-york/example/InputForm.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/InputForm.vue'], }, InputFormAutoAnimate: { name: 'InputFormAutoAnimate', type: 'components:example', - registryDependencies: ['button', 'form', 'input'], + registryDependencies: ['button', 'form', 'input', 'toast'], component: () => import('../src/lib/registry/new-york/example/InputFormAutoAnimate.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/InputFormAutoAnimate.vue'], }, @@ -938,7 +973,7 @@ export const Index = { RadioGroupForm: { name: 'RadioGroupForm', type: 'components:example', - registryDependencies: ['button', 'form', 'radio-group'], + registryDependencies: ['button', 'form', 'radio-group', 'toast'], component: () => import('../src/lib/registry/new-york/example/RadioGroupForm.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/RadioGroupForm.vue'], }, @@ -959,7 +994,7 @@ export const Index = { SelectForm: { name: 'SelectForm', type: 'components:example', - registryDependencies: ['button', 'form', 'select'], + registryDependencies: ['button', 'form', 'select', 'toast'], component: () => import('../src/lib/registry/new-york/example/SelectForm.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/SelectForm.vue'], }, @@ -1001,7 +1036,7 @@ export const Index = { SwitchForm: { name: 'SwitchForm', type: 'components:example', - registryDependencies: ['button', 'form', 'switch'], + registryDependencies: ['button', 'form', 'switch', 'toast'], component: () => import('../src/lib/registry/new-york/example/SwitchForm.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/SwitchForm.vue'], }, @@ -1036,7 +1071,7 @@ export const Index = { TextareaForm: { name: 'TextareaForm', type: 'components:example', - registryDependencies: ['button', 'form', 'textarea'], + registryDependencies: ['button', 'form', 'textarea', 'toast'], component: () => import('../src/lib/registry/new-york/example/TextareaForm.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/TextareaForm.vue'], }, @@ -1061,6 +1096,41 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/TextareaWithText.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/TextareaWithText.vue'], }, + ToastDemo: { + name: 'ToastDemo', + type: 'components:example', + registryDependencies: ['button', 'use-toast'], + component: () => import('../src/lib/registry/new-york/example/ToastDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToastDemo.vue'], + }, + ToastDestructive: { + name: 'ToastDestructive', + type: 'components:example', + registryDependencies: ['button', 'use-toast', 'toast'], + component: () => import('../src/lib/registry/new-york/example/ToastDestructive.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToastDestructive.vue'], + }, + ToastSimple: { + name: 'ToastSimple', + type: 'components:example', + registryDependencies: ['button', 'use-toast'], + component: () => import('../src/lib/registry/new-york/example/ToastSimple.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToastSimple.vue'], + }, + ToastWithAction: { + name: 'ToastWithAction', + type: 'components:example', + registryDependencies: ['button', 'use-toast', 'toast'], + component: () => import('../src/lib/registry/new-york/example/ToastWithAction.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToastWithAction.vue'], + }, + ToastWithTitle: { + name: 'ToastWithTitle', + type: 'components:example', + registryDependencies: ['button', 'use-toast'], + component: () => import('../src/lib/registry/new-york/example/ToastWithTitle.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToastWithTitle.vue'], + }, ToggleDemo: { name: 'ToggleDemo', type: 'components:example', @@ -1178,21 +1248,21 @@ export const Index = { type: 'components:example', registryDependencies: ['button', 'card', 'themes', 'config'], component: () => import('../src/lib/registry/new-york/example/Cards/ActivityGoal.vue').then(m => m.default), - files: ['../src/lib/registry/new-york/example/ActivityGoal.vue'], + files: ['../src/lib/registry/new-york/example/Cards/ActivityGoal.vue'], }, DataTable: { name: 'DataTable', type: 'components:example', registryDependencies: ['button', 'checkbox', 'dropdown-menu', 'input', 'table', 'card', 'utils'], component: () => import('../src/lib/registry/new-york/example/Cards/DataTable.vue').then(m => m.default), - files: ['../src/lib/registry/new-york/example/DataTable.vue'], + files: ['../src/lib/registry/new-york/example/Cards/DataTable.vue'], }, Metric: { name: 'Metric', type: 'components:example', registryDependencies: ['card', 'config'], component: () => import('../src/lib/registry/new-york/example/Cards/Metric.vue').then(m => m.default), - files: ['../src/lib/registry/new-york/example/Metric.vue'], + files: ['../src/lib/registry/new-york/example/Cards/Metric.vue'], }, }, } diff --git a/apps/www/src/content/docs/components/toast.md b/apps/www/src/content/docs/components/toast.md new file mode 100644 index 00000000..fcba11d6 --- /dev/null +++ b/apps/www/src/content/docs/components/toast.md @@ -0,0 +1,93 @@ +--- +title: Toast +description: A succinct message that is displayed temporarily. +source: apps/www/src/lib/registry/default/ui/toast +primitive: https://www.radix-vue.com/components/toast.html +--- + + + + +## Installation + + + + +### Run the following command + +```bash +npx shadcn-vue@latest add toast +``` + +### Add the Toaster component + +Add the following `Toaster` component to your `App.vue` file: + +```vue title="App.vue" {2,6} + + + +``` + + + + +## Usage + +The `useToast` hook returns a `toast` function that you can use to display a toast. + +```tsx +import { useToast } from '@/components/ui/toast/use-toast' +``` + +```vue + + + +``` + + + +To display multiple toasts at the same time, you can update the `TOAST_LIMIT` in `use-toast.ts`. + + + +## Examples + +### Simple + + + +### With Title + + + +### With Action + + + +### Destructive + +Use `toast({ variant: "destructive" })` to display a destructive toast. + + diff --git a/apps/www/src/examples/forms/components/AccountForm.vue b/apps/www/src/examples/forms/components/AccountForm.vue index 43d21c13..d2e92a39 100644 --- a/apps/www/src/examples/forms/components/AccountForm.vue +++ b/apps/www/src/examples/forms/components/AccountForm.vue @@ -1,5 +1,5 @@ diff --git a/apps/www/src/examples/forms/components/AppearanceForm.vue b/apps/www/src/examples/forms/components/AppearanceForm.vue index 9b58d9c1..363a424f 100644 --- a/apps/www/src/examples/forms/components/AppearanceForm.vue +++ b/apps/www/src/examples/forms/components/AppearanceForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/examples/forms/components/DisplayForm.vue b/apps/www/src/examples/forms/components/DisplayForm.vue index ea74a654..cf4c49a7 100644 --- a/apps/www/src/examples/forms/components/DisplayForm.vue +++ b/apps/www/src/examples/forms/components/DisplayForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/examples/forms/components/NotificationsForm.vue b/apps/www/src/examples/forms/components/NotificationsForm.vue index f1eb20ca..62fefdc4 100644 --- a/apps/www/src/examples/forms/components/NotificationsForm.vue +++ b/apps/www/src/examples/forms/components/NotificationsForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/examples/forms/components/ProfileForm.vue b/apps/www/src/examples/forms/components/ProfileForm.vue index e53df428..916a78f4 100644 --- a/apps/www/src/examples/forms/components/ProfileForm.vue +++ b/apps/www/src/examples/forms/components/ProfileForm.vue @@ -1,5 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/CheckboxFormMultiple.vue b/apps/www/src/lib/registry/default/example/CheckboxFormMultiple.vue index 81cd6fe1..cba68c1d 100644 --- a/apps/www/src/lib/registry/default/example/CheckboxFormMultiple.vue +++ b/apps/www/src/lib/registry/default/example/CheckboxFormMultiple.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/CheckboxFormSingle.vue b/apps/www/src/lib/registry/default/example/CheckboxFormSingle.vue index 4982b6a2..4cb8453a 100644 --- a/apps/www/src/lib/registry/default/example/CheckboxFormSingle.vue +++ b/apps/www/src/lib/registry/default/example/CheckboxFormSingle.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/ComboboxForm.vue b/apps/www/src/lib/registry/default/example/ComboboxForm.vue index d4981802..5ab4b6bb 100644 --- a/apps/www/src/lib/registry/default/example/ComboboxForm.vue +++ b/apps/www/src/lib/registry/default/example/ComboboxForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/DatePickerForm.vue b/apps/www/src/lib/registry/default/example/DatePickerForm.vue index b57292a3..9d6e79a5 100644 --- a/apps/www/src/lib/registry/default/example/DatePickerForm.vue +++ b/apps/www/src/lib/registry/default/example/DatePickerForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/InputForm.vue b/apps/www/src/lib/registry/default/example/InputForm.vue index 65e138bf..b03dedef 100644 --- a/apps/www/src/lib/registry/default/example/InputForm.vue +++ b/apps/www/src/lib/registry/default/example/InputForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/InputFormAutoAnimate.vue b/apps/www/src/lib/registry/default/example/InputFormAutoAnimate.vue index d75b37d6..682ffdc7 100644 --- a/apps/www/src/lib/registry/default/example/InputFormAutoAnimate.vue +++ b/apps/www/src/lib/registry/default/example/InputFormAutoAnimate.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/RadioGroupForm.vue b/apps/www/src/lib/registry/default/example/RadioGroupForm.vue index 967950f6..adc5f273 100644 --- a/apps/www/src/lib/registry/default/example/RadioGroupForm.vue +++ b/apps/www/src/lib/registry/default/example/RadioGroupForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/SelectForm.vue b/apps/www/src/lib/registry/default/example/SelectForm.vue index 991a4274..a46653ab 100644 --- a/apps/www/src/lib/registry/default/example/SelectForm.vue +++ b/apps/www/src/lib/registry/default/example/SelectForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/SwitchForm.vue b/apps/www/src/lib/registry/default/example/SwitchForm.vue index 9c9f4bcd..ea5e4c38 100644 --- a/apps/www/src/lib/registry/default/example/SwitchForm.vue +++ b/apps/www/src/lib/registry/default/example/SwitchForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/TextareaForm.vue b/apps/www/src/lib/registry/default/example/TextareaForm.vue index 8befc0ee..e6f9dece 100644 --- a/apps/www/src/lib/registry/default/example/TextareaForm.vue +++ b/apps/www/src/lib/registry/default/example/TextareaForm.vue @@ -1,4 +1,5 @@ diff --git a/apps/www/src/lib/registry/default/example/ToastDemo.vue b/apps/www/src/lib/registry/default/example/ToastDemo.vue new file mode 100644 index 00000000..abb8cbb7 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ToastDemo.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ToastDestructive.vue b/apps/www/src/lib/registry/default/example/ToastDestructive.vue new file mode 100644 index 00000000..0cf00554 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ToastDestructive.vue @@ -0,0 +1,27 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ToastSimple.vue b/apps/www/src/lib/registry/default/example/ToastSimple.vue new file mode 100644 index 00000000..2310017e --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ToastSimple.vue @@ -0,0 +1,18 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ToastWithAction.vue b/apps/www/src/lib/registry/default/example/ToastWithAction.vue new file mode 100644 index 00000000..03f7640a --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ToastWithAction.vue @@ -0,0 +1,26 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ToastWithTitle.vue b/apps/www/src/lib/registry/default/example/ToastWithTitle.vue new file mode 100644 index 00000000..800bf9e3 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ToastWithTitle.vue @@ -0,0 +1,19 @@ + + + diff --git a/apps/www/src/lib/registry/default/ui/switch/Switch.vue b/apps/www/src/lib/registry/default/ui/switch/Switch.vue index 5de798cc..25dd554f 100644 --- a/apps/www/src/lib/registry/default/ui/switch/Switch.vue +++ b/apps/www/src/lib/registry/default/ui/switch/Switch.vue @@ -12,7 +12,6 @@ const props = defineProps() const emits = defineEmits() const forwarded = useForwardPropsEmits(props, emits) -console.log(props, forwarded)