From e5cecae352204d652d77989549a1f0b9eb8987bc Mon Sep 17 00:00:00 2001 From: Selemondev <106826371+selemondev@users.noreply.github.com> Date: Thu, 9 Nov 2023 02:42:01 -0800 Subject: [PATCH] docs: Improve the API reference of all the components (#152) * docs: improve the api reference of all the components * docs(app): #152 add new-york theme This pull request is intended to add the new-york theme for the newly created component examples. Closes: #152 * chore: build registry * chore: change usage of lucide icon in new-york --------- Co-authored-by: zernonia --- apps/www/__registry__/index.ts | 322 ++++++++++++++++++ apps/www/src/content/docs/components/alert.md | 15 +- apps/www/src/content/docs/components/badge.md | 22 +- .../www/src/content/docs/components/button.md | 48 ++- .../src/content/docs/components/calendar.md | 5 +- apps/www/src/content/docs/components/card.md | 8 +- .../src/content/docs/components/command.md | 103 +++++- .../www/src/content/docs/components/dialog.md | 40 +++ .../docs/components/navigation-menu.md | 25 +- .../content/docs/components/scroll-area.md | 9 +- apps/www/src/content/docs/components/sheet.md | 30 ++ apps/www/src/content/docs/components/table.md | 10 +- .../www/src/content/docs/components/toggle.md | 36 +- .../default/example/AlertDestructiveDemo.vue | 14 + .../default/example/BadgeDestructiveDemo.vue | 9 + .../default/example/BadgeOutlineDemo.vue | 9 + .../default/example/BadgeSecondaryDemo.vue | 9 + .../default/example/ButtonAsChildDemo.vue | 11 + .../default/example/ButtonDestructiveDemo.vue | 9 + .../default/example/ButtonGhostDemo.vue | 9 + .../default/example/ButtonIconDemo.vue | 10 + .../default/example/ButtonLinkDemo.vue | 9 + .../default/example/ButtonLoadingDemo.vue | 11 + .../default/example/ButtonOutlineDemo.vue | 9 + .../default/example/ButtonSecondaryDemo.vue | 9 + .../default/example/ButtonWithIconDemo.vue | 10 + .../registry/default/example/CardFormDemo.vue | 60 ++++ .../default/example/CommandDialogDemo.vue | 70 ++++ .../example/DialogCustomCloseButton.vue | 56 +++ .../default/example/RadioGroupForm.vue | 8 +- .../example/ScrollAreaHorizontalDemo.vue | 48 +++ .../registry/default/example/SelectForm.vue | 2 +- .../default/example/SheetSideDemo.vue | 57 ++++ .../default/example/TextareaWithText.vue | 2 +- .../default/example/ToggleDisabledDemo.vue | 11 + .../default/example/ToggleItalicDemo.vue | 11 + .../example/ToggleItalicWithTextDemo.vue | 12 + .../default/example/ToggleLargeDemo.vue | 11 + .../default/example/ToggleSmallDemo.vue | 11 + .../default/ui/command/CommandDialog.vue | 2 +- .../lib/registry/default/ui/toggle/Toggle.vue | 5 +- .../new-york/example/AlertDestructiveDemo.vue | 14 + .../new-york/example/BadgeDestructiveDemo.vue | 9 + .../new-york/example/BadgeOutlineDemo.vue | 9 + .../new-york/example/BadgeSecondaryDemo.vue | 9 + .../new-york/example/ButtonAsChildDemo.vue | 11 + .../example/ButtonDestructiveDemo.vue | 9 + .../new-york/example/ButtonGhostDemo.vue | 9 + .../new-york/example/ButtonIconDemo.vue | 10 + .../new-york/example/ButtonLinkDemo.vue | 9 + .../new-york/example/ButtonLoadingDemo.vue | 11 + .../new-york/example/ButtonOutlineDemo.vue | 9 + .../new-york/example/ButtonSecondaryDemo.vue | 9 + .../new-york/example/ButtonWithIconDemo.vue | 10 + .../new-york/example/CardFormDemo.vue | 60 ++++ .../new-york/example/CommandDialogDemo.vue | 70 ++++ .../example/DialogCustomCloseButton.vue | 57 ++++ .../new-york/example/RadioGroupForm.vue | 8 +- .../example/ScrollAreaHorizontalDemo.vue | 48 +++ .../registry/new-york/example/SelectForm.vue | 2 +- .../new-york/example/SheetSideDemo.vue | 57 ++++ .../new-york/example/TextareaWithText.vue | 2 +- .../new-york/example/ToggleDisabledDemo.vue | 11 + .../new-york/example/ToggleItalicDemo.vue | 11 + .../example/ToggleItalicWithTextDemo.vue | 12 + .../new-york/example/ToggleLargeDemo.vue | 11 + .../new-york/example/ToggleSmallDemo.vue | 11 + .../registry/new-york/ui/toast/ToastClose.vue | 4 +- .../registry/new-york/ui/toggle/Toggle.vue | 3 + .../registry/styles/default/command.json | 2 +- .../registry/styles/default/toggle.json | 2 +- .../registry/styles/new-york/toast.json | 2 +- .../registry/styles/new-york/toggle.json | 2 +- 73 files changed, 1633 insertions(+), 37 deletions(-) create mode 100644 apps/www/src/lib/registry/default/example/AlertDestructiveDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/BadgeDestructiveDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/BadgeOutlineDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/BadgeSecondaryDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonAsChildDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonDestructiveDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonGhostDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonIconDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonLinkDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonLoadingDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonOutlineDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonSecondaryDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ButtonWithIconDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/CardFormDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/CommandDialogDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/DialogCustomCloseButton.vue create mode 100644 apps/www/src/lib/registry/default/example/ScrollAreaHorizontalDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/SheetSideDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ToggleDisabledDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ToggleItalicDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ToggleItalicWithTextDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ToggleLargeDemo.vue create mode 100644 apps/www/src/lib/registry/default/example/ToggleSmallDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/AlertDestructiveDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/BadgeDestructiveDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/BadgeOutlineDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/BadgeSecondaryDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonAsChildDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonDestructiveDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonGhostDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonIconDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonLinkDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonLoadingDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonOutlineDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonSecondaryDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ButtonWithIconDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/CardFormDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/CommandDialogDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/DialogCustomCloseButton.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ScrollAreaHorizontalDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/SheetSideDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToggleDisabledDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToggleItalicDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToggleItalicWithTextDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToggleLargeDemo.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ToggleSmallDemo.vue diff --git a/apps/www/__registry__/index.ts b/apps/www/__registry__/index.ts index 61fbc8ca..b24d3ade 100644 --- a/apps/www/__registry__/index.ts +++ b/apps/www/__registry__/index.ts @@ -16,6 +16,13 @@ export const Index = { component: () => import('../src/lib/registry/default/example/AlertDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/AlertDemo.vue'], }, + AlertDestructiveDemo: { + name: 'AlertDestructiveDemo', + type: 'components:example', + registryDependencies: ['alert'], + component: () => import('../src/lib/registry/default/example/AlertDestructiveDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/AlertDestructiveDemo.vue'], + }, AlertDialogDemo: { name: 'AlertDialogDemo', type: 'components:example', @@ -44,6 +51,34 @@ export const Index = { component: () => import('../src/lib/registry/default/example/BadgeDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/BadgeDemo.vue'], }, + BadgeDestructiveDemo: { + name: 'BadgeDestructiveDemo', + type: 'components:example', + registryDependencies: ['badge'], + component: () => import('../src/lib/registry/default/example/BadgeDestructiveDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/BadgeDestructiveDemo.vue'], + }, + BadgeOutlineDemo: { + name: 'BadgeOutlineDemo', + type: 'components:example', + registryDependencies: ['badge'], + component: () => import('../src/lib/registry/default/example/BadgeOutlineDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/BadgeOutlineDemo.vue'], + }, + BadgeSecondaryDemo: { + name: 'BadgeSecondaryDemo', + type: 'components:example', + registryDependencies: ['badge'], + component: () => import('../src/lib/registry/default/example/BadgeSecondaryDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/BadgeSecondaryDemo.vue'], + }, + ButtonAsChildDemo: { + name: 'ButtonAsChildDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonAsChildDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonAsChildDemo.vue'], + }, ButtonDemo: { name: 'ButtonDemo', type: 'components:example', @@ -51,6 +86,62 @@ export const Index = { component: () => import('../src/lib/registry/default/example/ButtonDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/ButtonDemo.vue'], }, + ButtonDestructiveDemo: { + name: 'ButtonDestructiveDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonDestructiveDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonDestructiveDemo.vue'], + }, + ButtonGhostDemo: { + name: 'ButtonGhostDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonGhostDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonGhostDemo.vue'], + }, + ButtonIconDemo: { + name: 'ButtonIconDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonIconDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonIconDemo.vue'], + }, + ButtonLinkDemo: { + name: 'ButtonLinkDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonLinkDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonLinkDemo.vue'], + }, + ButtonLoadingDemo: { + name: 'ButtonLoadingDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonLoadingDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonLoadingDemo.vue'], + }, + ButtonOutlineDemo: { + name: 'ButtonOutlineDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonOutlineDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonOutlineDemo.vue'], + }, + ButtonSecondaryDemo: { + name: 'ButtonSecondaryDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonSecondaryDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonSecondaryDemo.vue'], + }, + ButtonWithIconDemo: { + name: 'ButtonWithIconDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/default/example/ButtonWithIconDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ButtonWithIconDemo.vue'], + }, CalendarDemo: { name: 'CalendarDemo', type: 'components:example', @@ -72,6 +163,13 @@ export const Index = { component: () => import('../src/lib/registry/default/example/CardDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/CardDemo.vue'], }, + CardFormDemo: { + name: 'CardFormDemo', + type: 'components:example', + registryDependencies: ['card', 'select', 'input', 'label', 'button'], + component: () => import('../src/lib/registry/default/example/CardFormDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/CardFormDemo.vue'], + }, CardStats: { name: 'CardStats', type: 'components:example', @@ -163,6 +261,13 @@ export const Index = { component: () => import('../src/lib/registry/default/example/CommandDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/CommandDemo.vue'], }, + CommandDialogDemo: { + name: 'CommandDialogDemo', + type: 'components:example', + registryDependencies: ['command'], + component: () => import('../src/lib/registry/default/example/CommandDialogDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/CommandDialogDemo.vue'], + }, ContextMenuDemo: { name: 'ContextMenuDemo', type: 'components:example', @@ -212,6 +317,13 @@ export const Index = { component: () => import('../src/lib/registry/default/example/DatePickerWithRange.vue').then(m => m.default), files: ['../src/lib/registry/default/example/DatePickerWithRange.vue'], }, + DialogCustomCloseButton: { + name: 'DialogCustomCloseButton', + type: 'components:example', + registryDependencies: ['button', 'dialog', 'input', 'label'], + component: () => import('../src/lib/registry/default/example/DialogCustomCloseButton.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/DialogCustomCloseButton.vue'], + }, DialogDemo: { name: 'DialogDemo', type: 'components:example', @@ -352,6 +464,13 @@ export const Index = { component: () => import('../src/lib/registry/default/example/ScrollAreaDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/ScrollAreaDemo.vue'], }, + ScrollAreaHorizontalDemo: { + name: 'ScrollAreaHorizontalDemo', + type: 'components:example', + registryDependencies: ['scroll-area'], + component: () => import('../src/lib/registry/default/example/ScrollAreaHorizontalDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ScrollAreaHorizontalDemo.vue'], + }, SelectDemo: { name: 'SelectDemo', type: 'components:example', @@ -380,6 +499,13 @@ export const Index = { component: () => import('../src/lib/registry/default/example/SheetDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/SheetDemo.vue'], }, + SheetSideDemo: { + name: 'SheetSideDemo', + type: 'components:example', + registryDependencies: ['button', 'input', 'label', 'sheet'], + component: () => import('../src/lib/registry/default/example/SheetSideDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/SheetSideDemo.vue'], + }, SkeletonDemo: { name: 'SkeletonDemo', type: 'components:example', @@ -506,6 +632,41 @@ export const Index = { component: () => import('../src/lib/registry/default/example/ToggleDemo.vue').then(m => m.default), files: ['../src/lib/registry/default/example/ToggleDemo.vue'], }, + ToggleDisabledDemo: { + name: 'ToggleDisabledDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/default/example/ToggleDisabledDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToggleDisabledDemo.vue'], + }, + ToggleItalicDemo: { + name: 'ToggleItalicDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/default/example/ToggleItalicDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToggleItalicDemo.vue'], + }, + ToggleItalicWithTextDemo: { + name: 'ToggleItalicWithTextDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/default/example/ToggleItalicWithTextDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToggleItalicWithTextDemo.vue'], + }, + ToggleLargeDemo: { + name: 'ToggleLargeDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/default/example/ToggleLargeDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToggleLargeDemo.vue'], + }, + ToggleSmallDemo: { + name: 'ToggleSmallDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/default/example/ToggleSmallDemo.vue').then(m => m.default), + files: ['../src/lib/registry/default/example/ToggleSmallDemo.vue'], + }, TooltipDemo: { name: 'TooltipDemo', type: 'components:example', @@ -648,6 +809,13 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/AlertDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/AlertDemo.vue'], }, + AlertDestructiveDemo: { + name: 'AlertDestructiveDemo', + type: 'components:example', + registryDependencies: ['alert'], + component: () => import('../src/lib/registry/new-york/example/AlertDestructiveDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/AlertDestructiveDemo.vue'], + }, AlertDialogDemo: { name: 'AlertDialogDemo', type: 'components:example', @@ -676,6 +844,34 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/BadgeDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/BadgeDemo.vue'], }, + BadgeDestructiveDemo: { + name: 'BadgeDestructiveDemo', + type: 'components:example', + registryDependencies: ['badge'], + component: () => import('../src/lib/registry/new-york/example/BadgeDestructiveDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/BadgeDestructiveDemo.vue'], + }, + BadgeOutlineDemo: { + name: 'BadgeOutlineDemo', + type: 'components:example', + registryDependencies: ['badge'], + component: () => import('../src/lib/registry/new-york/example/BadgeOutlineDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/BadgeOutlineDemo.vue'], + }, + BadgeSecondaryDemo: { + name: 'BadgeSecondaryDemo', + type: 'components:example', + registryDependencies: ['badge'], + component: () => import('../src/lib/registry/new-york/example/BadgeSecondaryDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/BadgeSecondaryDemo.vue'], + }, + ButtonAsChildDemo: { + name: 'ButtonAsChildDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonAsChildDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonAsChildDemo.vue'], + }, ButtonDemo: { name: 'ButtonDemo', type: 'components:example', @@ -683,6 +879,62 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/ButtonDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/ButtonDemo.vue'], }, + ButtonDestructiveDemo: { + name: 'ButtonDestructiveDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonDestructiveDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonDestructiveDemo.vue'], + }, + ButtonGhostDemo: { + name: 'ButtonGhostDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonGhostDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonGhostDemo.vue'], + }, + ButtonIconDemo: { + name: 'ButtonIconDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonIconDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonIconDemo.vue'], + }, + ButtonLinkDemo: { + name: 'ButtonLinkDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonLinkDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonLinkDemo.vue'], + }, + ButtonLoadingDemo: { + name: 'ButtonLoadingDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonLoadingDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonLoadingDemo.vue'], + }, + ButtonOutlineDemo: { + name: 'ButtonOutlineDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonOutlineDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonOutlineDemo.vue'], + }, + ButtonSecondaryDemo: { + name: 'ButtonSecondaryDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonSecondaryDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonSecondaryDemo.vue'], + }, + ButtonWithIconDemo: { + name: 'ButtonWithIconDemo', + type: 'components:example', + registryDependencies: ['button'], + component: () => import('../src/lib/registry/new-york/example/ButtonWithIconDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ButtonWithIconDemo.vue'], + }, CalendarDemo: { name: 'CalendarDemo', type: 'components:example', @@ -704,6 +956,13 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/CardDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/CardDemo.vue'], }, + CardFormDemo: { + name: 'CardFormDemo', + type: 'components:example', + registryDependencies: ['card', 'select', 'input', 'label', 'button'], + component: () => import('../src/lib/registry/new-york/example/CardFormDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/CardFormDemo.vue'], + }, CardStats: { name: 'CardStats', type: 'components:example', @@ -795,6 +1054,13 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/CommandDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/CommandDemo.vue'], }, + CommandDialogDemo: { + name: 'CommandDialogDemo', + type: 'components:example', + registryDependencies: ['command'], + component: () => import('../src/lib/registry/new-york/example/CommandDialogDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/CommandDialogDemo.vue'], + }, ContextMenuDemo: { name: 'ContextMenuDemo', type: 'components:example', @@ -844,6 +1110,13 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/DatePickerWithRange.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/DatePickerWithRange.vue'], }, + DialogCustomCloseButton: { + name: 'DialogCustomCloseButton', + type: 'components:example', + registryDependencies: ['button', 'dialog', 'input', 'label'], + component: () => import('../src/lib/registry/new-york/example/DialogCustomCloseButton.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/DialogCustomCloseButton.vue'], + }, DialogDemo: { name: 'DialogDemo', type: 'components:example', @@ -984,6 +1257,13 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/ScrollAreaDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/ScrollAreaDemo.vue'], }, + ScrollAreaHorizontalDemo: { + name: 'ScrollAreaHorizontalDemo', + type: 'components:example', + registryDependencies: ['scroll-area'], + component: () => import('../src/lib/registry/new-york/example/ScrollAreaHorizontalDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ScrollAreaHorizontalDemo.vue'], + }, SelectDemo: { name: 'SelectDemo', type: 'components:example', @@ -1012,6 +1292,13 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/SheetDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/SheetDemo.vue'], }, + SheetSideDemo: { + name: 'SheetSideDemo', + type: 'components:example', + registryDependencies: ['button', 'input', 'label', 'sheet'], + component: () => import('../src/lib/registry/new-york/example/SheetSideDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/SheetSideDemo.vue'], + }, SkeletonDemo: { name: 'SkeletonDemo', type: 'components:example', @@ -1138,6 +1425,41 @@ export const Index = { component: () => import('../src/lib/registry/new-york/example/ToggleDemo.vue').then(m => m.default), files: ['../src/lib/registry/new-york/example/ToggleDemo.vue'], }, + ToggleDisabledDemo: { + name: 'ToggleDisabledDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/new-york/example/ToggleDisabledDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToggleDisabledDemo.vue'], + }, + ToggleItalicDemo: { + name: 'ToggleItalicDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/new-york/example/ToggleItalicDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToggleItalicDemo.vue'], + }, + ToggleItalicWithTextDemo: { + name: 'ToggleItalicWithTextDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/new-york/example/ToggleItalicWithTextDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToggleItalicWithTextDemo.vue'], + }, + ToggleLargeDemo: { + name: 'ToggleLargeDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/new-york/example/ToggleLargeDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToggleLargeDemo.vue'], + }, + ToggleSmallDemo: { + name: 'ToggleSmallDemo', + type: 'components:example', + registryDependencies: ['toggle'], + component: () => import('../src/lib/registry/new-york/example/ToggleSmallDemo.vue').then(m => m.default), + files: ['../src/lib/registry/new-york/example/ToggleSmallDemo.vue'], + }, TooltipDemo: { name: 'TooltipDemo', type: 'components:example', diff --git a/apps/www/src/content/docs/components/alert.md b/apps/www/src/content/docs/components/alert.md index aeda3888..13d9d609 100644 --- a/apps/www/src/content/docs/components/alert.md +++ b/apps/www/src/content/docs/components/alert.md @@ -28,4 +28,17 @@ import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' -``` \ No newline at end of file +``` + +## Examples + +### Default + + + + +### Destructive + + + + diff --git a/apps/www/src/content/docs/components/badge.md b/apps/www/src/content/docs/components/badge.md index adb588cc..08b8b030 100644 --- a/apps/www/src/content/docs/components/badge.md +++ b/apps/www/src/content/docs/components/badge.md @@ -78,4 +78,24 @@ import { Badge } from '@/components/ui/badge' -``` \ No newline at end of file +``` + + +## Examples + +### Default + + + + +### Secondary + + + +### Outline + + + +### Destructive + + \ No newline at end of file diff --git a/apps/www/src/content/docs/components/button.md b/apps/www/src/content/docs/components/button.md index 3644921c..3fb5d55e 100644 --- a/apps/www/src/content/docs/components/button.md +++ b/apps/www/src/content/docs/components/button.md @@ -92,4 +92,50 @@ import { Button } from '@/components/ui/button' -``` \ No newline at end of file +``` + + +## Examples + +### Primary + + + + +### Secondary + + + + +### Destructive + + + + +### Outline + + + +### Ghost + + + +### Link + + + +### Icon + + + +### With Icon + + + +### Loading + + + +### As Child + + \ No newline at end of file diff --git a/apps/www/src/content/docs/components/calendar.md b/apps/www/src/content/docs/components/calendar.md index 130f63f3..82301a24 100644 --- a/apps/www/src/content/docs/components/calendar.md +++ b/apps/www/src/content/docs/components/calendar.md @@ -52,4 +52,7 @@ import { Calendar } from '@/components/ui/calendar' -``` \ No newline at end of file +``` + +See the [VCalendar](https://vcalendar.io/getting-started/installation.html) documentation for more information. + diff --git a/apps/www/src/content/docs/components/card.md b/apps/www/src/content/docs/components/card.md index 87c970da..512d1761 100644 --- a/apps/www/src/content/docs/components/card.md +++ b/apps/www/src/content/docs/components/card.md @@ -4,7 +4,7 @@ description: Displays a card with header, content, and footer. --- - + ## Installation @@ -42,4 +42,8 @@ import { -``` \ No newline at end of file +``` + +## Examples + + \ No newline at end of file diff --git a/apps/www/src/content/docs/components/command.md b/apps/www/src/content/docs/components/command.md index 9a8d9780..77ac9045 100644 --- a/apps/www/src/content/docs/components/command.md +++ b/apps/www/src/content/docs/components/command.md @@ -39,16 +39,105 @@ import { No results found. - Calendar - Search Emoji - Calculator + + Calendar + + + Search Emoji + + + Calculator + - Profile - Billing - Settings + + Profile + + + Billing + + + Settings + -``` \ No newline at end of file + +``` + +## Examples + +### Dialog + + + +To show the command menu in a dialog, use the `` component. + +```vue + + + +``` + +### Combobox + +You can use the `` component as a combobox. See the [Combobox](/docs/components/combobox) page for more information. \ No newline at end of file diff --git a/apps/www/src/content/docs/components/dialog.md b/apps/www/src/content/docs/components/dialog.md index 4346daf1..05abcbef 100644 --- a/apps/www/src/content/docs/components/dialog.md +++ b/apps/www/src/content/docs/components/dialog.md @@ -47,4 +47,44 @@ import { +``` + +## Examples + +### Custom close button + + + +## Notes + +To activate the `Dialog` component from within a `Context Menu` or `Dropdown Menu`, you must encase the `Context Menu` or `Dropdown Menu` component in the `Dialog` component. For more information, refer to the linked issue [here](https://github.com/radix-ui/primitives/issues/1836). + + +```js:line-numbers showLineNumber{14-25} + + + Right click + + Open + Download + + + Delete + + + + + + + Are you sure absolutely sure? + + This action cannot be undone. Are you sure you want to permanently + delete this file from our servers? + + + + + + + ``` \ No newline at end of file diff --git a/apps/www/src/content/docs/components/navigation-menu.md b/apps/www/src/content/docs/components/navigation-menu.md index 03043b05..16669984 100644 --- a/apps/www/src/content/docs/components/navigation-menu.md +++ b/apps/www/src/content/docs/components/navigation-menu.md @@ -41,4 +41,27 @@ import { -``` \ No newline at end of file +``` + +## Examples + +### Link Component + +When using the Nuxt.js component, you can use `navigationMenuTriggerStyle()` to apply the correct styles to the trigger. + +```ts +import { navigationMenuTriggerStyle } from '@/components/ui/navigation-menu' +``` + +```vue + +``` + diff --git a/apps/www/src/content/docs/components/scroll-area.md b/apps/www/src/content/docs/components/scroll-area.md index 1f7a4023..edac7a4c 100644 --- a/apps/www/src/content/docs/components/scroll-area.md +++ b/apps/www/src/content/docs/components/scroll-area.md @@ -30,4 +30,11 @@ import { ScrollArea } from '@/components/ui/scroll-area' started laughing, they couldn't stop. -``` \ No newline at end of file +``` + +## Examples + +### Horizontal Scrolling + + + diff --git a/apps/www/src/content/docs/components/sheet.md b/apps/www/src/content/docs/components/sheet.md index caa3ee91..6a30c502 100644 --- a/apps/www/src/content/docs/components/sheet.md +++ b/apps/www/src/content/docs/components/sheet.md @@ -42,4 +42,34 @@ import { +``` + +## Examples + +### Side + +Use the `side` property to `` to indicate the edge of the screen where the component will appear. The values can be `top`, `right`, `bottom` or `left`. + + + + +### Size + +You can adjust the size of the sheet using CSS classes: + +```vue:line-numbers showLineNumbers{4} + ``` \ No newline at end of file diff --git a/apps/www/src/content/docs/components/table.md b/apps/www/src/content/docs/components/table.md index e56d20c6..e0701b58 100644 --- a/apps/www/src/content/docs/components/table.md +++ b/apps/www/src/content/docs/components/table.md @@ -56,4 +56,12 @@ import { -``` \ No newline at end of file +``` + +## Data Table + +You can use the `` component to build more complex data tables. Combine it with [@tanstack/vue-table](https://tanstack.com/table/v8) to create tables with sorting, filtering and pagination. + +See the [Data Table](/docs/components/data-table) documentation for more information. + +You can also see an example of a data table in the [Tasks](/examples/tasks) demo. \ No newline at end of file diff --git a/apps/www/src/content/docs/components/toggle.md b/apps/www/src/content/docs/components/toggle.md index 45f70104..c720bb3e 100644 --- a/apps/www/src/content/docs/components/toggle.md +++ b/apps/www/src/content/docs/components/toggle.md @@ -48,4 +48,38 @@ import { Toggle } from '@/components/ui/toggle' -``` \ No newline at end of file +``` + +## Examples + +### Default + + + + +### Outline + + + + +### With Text + + + + +### Small + + + + +### Large + + + + +### Disabled + + + + + diff --git a/apps/www/src/lib/registry/default/example/AlertDestructiveDemo.vue b/apps/www/src/lib/registry/default/example/AlertDestructiveDemo.vue new file mode 100644 index 00000000..8766ec63 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/AlertDestructiveDemo.vue @@ -0,0 +1,14 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/BadgeDestructiveDemo.vue b/apps/www/src/lib/registry/default/example/BadgeDestructiveDemo.vue new file mode 100644 index 00000000..fa34886b --- /dev/null +++ b/apps/www/src/lib/registry/default/example/BadgeDestructiveDemo.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/BadgeOutlineDemo.vue b/apps/www/src/lib/registry/default/example/BadgeOutlineDemo.vue new file mode 100644 index 00000000..134e82c8 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/BadgeOutlineDemo.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/BadgeSecondaryDemo.vue b/apps/www/src/lib/registry/default/example/BadgeSecondaryDemo.vue new file mode 100644 index 00000000..9c6be8e9 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/BadgeSecondaryDemo.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonAsChildDemo.vue b/apps/www/src/lib/registry/default/example/ButtonAsChildDemo.vue new file mode 100644 index 00000000..0dfe5516 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonAsChildDemo.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonDestructiveDemo.vue b/apps/www/src/lib/registry/default/example/ButtonDestructiveDemo.vue new file mode 100644 index 00000000..e926c87a --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonDestructiveDemo.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonGhostDemo.vue b/apps/www/src/lib/registry/default/example/ButtonGhostDemo.vue new file mode 100644 index 00000000..a1d45498 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonGhostDemo.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonIconDemo.vue b/apps/www/src/lib/registry/default/example/ButtonIconDemo.vue new file mode 100644 index 00000000..2b4ce9a3 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonIconDemo.vue @@ -0,0 +1,10 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonLinkDemo.vue b/apps/www/src/lib/registry/default/example/ButtonLinkDemo.vue new file mode 100644 index 00000000..a805bf50 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonLinkDemo.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonLoadingDemo.vue b/apps/www/src/lib/registry/default/example/ButtonLoadingDemo.vue new file mode 100644 index 00000000..221e1403 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonLoadingDemo.vue @@ -0,0 +1,11 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonOutlineDemo.vue b/apps/www/src/lib/registry/default/example/ButtonOutlineDemo.vue new file mode 100644 index 00000000..bf4e6752 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonOutlineDemo.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonSecondaryDemo.vue b/apps/www/src/lib/registry/default/example/ButtonSecondaryDemo.vue new file mode 100644 index 00000000..7510dace --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonSecondaryDemo.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/ButtonWithIconDemo.vue b/apps/www/src/lib/registry/default/example/ButtonWithIconDemo.vue new file mode 100644 index 00000000..801e4ebe --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ButtonWithIconDemo.vue @@ -0,0 +1,10 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/CardFormDemo.vue b/apps/www/src/lib/registry/default/example/CardFormDemo.vue new file mode 100644 index 00000000..a176e8a3 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/CardFormDemo.vue @@ -0,0 +1,60 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/CommandDialogDemo.vue b/apps/www/src/lib/registry/default/example/CommandDialogDemo.vue new file mode 100644 index 00000000..9f18c79a --- /dev/null +++ b/apps/www/src/lib/registry/default/example/CommandDialogDemo.vue @@ -0,0 +1,70 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/DialogCustomCloseButton.vue b/apps/www/src/lib/registry/default/example/DialogCustomCloseButton.vue new file mode 100644 index 00000000..7ef4eef2 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/DialogCustomCloseButton.vue @@ -0,0 +1,56 @@ + + + diff --git a/apps/www/src/lib/registry/default/example/RadioGroupForm.vue b/apps/www/src/lib/registry/default/example/RadioGroupForm.vue index adc5f273..fca75855 100644 --- a/apps/www/src/lib/registry/default/example/RadioGroupForm.vue +++ b/apps/www/src/lib/registry/default/example/RadioGroupForm.vue @@ -34,7 +34,7 @@ const onSubmit = handleSubmit((values) => {