From f0fface575fd8799fffa9b0848a359759c061e95 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Wed, 6 Sep 2023 14:23:35 +0100 Subject: [PATCH] feat: add missing new-york style components --- .../lib/registry/new-york/ui/alert/Alert.vue | 17 +++++++++++ .../new-york/ui/alert/AlertDescription.vue | 13 +++++++++ .../registry/new-york/ui/alert/AlertTitle.vue | 9 ++++++ .../lib/registry/new-york/ui/alert/index.ts | 21 ++++++++++++++ .../new-york/ui/checkbox/Checkbox.vue | 24 +++++++++++++++ .../registry/new-york/ui/checkbox/index.ts | 1 + .../new-york/ui/radio-group/RadioGroup.vue | 12 ++++++++ .../ui/radio-group/RadioGroupItem.vue | 29 +++++++++++++++++++ .../registry/new-york/ui/radio-group/index.ts | 2 ++ 9 files changed, 128 insertions(+) create mode 100644 apps/www/src/lib/registry/new-york/ui/alert/Alert.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/alert/AlertDescription.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/alert/AlertTitle.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/alert/index.ts create mode 100644 apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/checkbox/index.ts create mode 100644 apps/www/src/lib/registry/new-york/ui/radio-group/RadioGroup.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/radio-group/RadioGroupItem.vue create mode 100644 apps/www/src/lib/registry/new-york/ui/radio-group/index.ts diff --git a/apps/www/src/lib/registry/new-york/ui/alert/Alert.vue b/apps/www/src/lib/registry/new-york/ui/alert/Alert.vue new file mode 100644 index 00000000..b95d5c89 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/alert/Alert.vue @@ -0,0 +1,17 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/alert/AlertDescription.vue b/apps/www/src/lib/registry/new-york/ui/alert/AlertDescription.vue new file mode 100644 index 00000000..a539b631 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/alert/AlertDescription.vue @@ -0,0 +1,13 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/alert/AlertTitle.vue b/apps/www/src/lib/registry/new-york/ui/alert/AlertTitle.vue new file mode 100644 index 00000000..c5dd22c2 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/alert/AlertTitle.vue @@ -0,0 +1,9 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/alert/index.ts b/apps/www/src/lib/registry/new-york/ui/alert/index.ts new file mode 100644 index 00000000..499ee68a --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/alert/index.ts @@ -0,0 +1,21 @@ +import { cva } from 'class-variance-authority' + +export { default as Alert } from './Alert.vue' +export { default as AlertTitle } from './AlertTitle.vue' +export { default as AlertDescription } from './AlertDescription.vue' + +export const alertVariants = cva( + 'relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7', + { + variants: { + variant: { + default: 'bg-background text-foreground', + destructive: + 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive', + }, + }, + defaultVariants: { + variant: 'default', + }, + }, +) diff --git a/apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue b/apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue new file mode 100644 index 00000000..321b3c88 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/checkbox/Checkbox.vue @@ -0,0 +1,24 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/checkbox/index.ts b/apps/www/src/lib/registry/new-york/ui/checkbox/index.ts new file mode 100644 index 00000000..8c28c286 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/checkbox/index.ts @@ -0,0 +1 @@ +export { default as Checkbox } from './Checkbox.vue' diff --git a/apps/www/src/lib/registry/new-york/ui/radio-group/RadioGroup.vue b/apps/www/src/lib/registry/new-york/ui/radio-group/RadioGroup.vue new file mode 100644 index 00000000..1eff3f58 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/radio-group/RadioGroup.vue @@ -0,0 +1,12 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/radio-group/RadioGroupItem.vue b/apps/www/src/lib/registry/new-york/ui/radio-group/RadioGroupItem.vue new file mode 100644 index 00000000..153d720e --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/radio-group/RadioGroupItem.vue @@ -0,0 +1,29 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/ui/radio-group/index.ts b/apps/www/src/lib/registry/new-york/ui/radio-group/index.ts new file mode 100644 index 00000000..fa1da9c2 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/ui/radio-group/index.ts @@ -0,0 +1,2 @@ +export { default as RadioGroup } from './RadioGroup.vue' +export { default as RadioGroupItem } from './RadioGroupItem.vue'