From 524e4b8b956cc510356ae70ec8c0451dac2c30ff Mon Sep 17 00:00:00 2001 From: Rohid Date: Tue, 3 Oct 2023 19:02:31 +0600 Subject: [PATCH 1/5] fix(alert-dialog): update portal component (#1603) --- apps/www/registry/default/ui/alert-dialog.tsx | 12 ++---------- apps/www/registry/default/ui/dialog.tsx | 12 ++---------- apps/www/registry/new-york/ui/alert-dialog.tsx | 12 ++---------- apps/www/registry/new-york/ui/dialog.tsx | 12 ++---------- 4 files changed, 8 insertions(+), 40 deletions(-) diff --git a/apps/www/registry/default/ui/alert-dialog.tsx b/apps/www/registry/default/ui/alert-dialog.tsx index 35bcef95edc..a17294f2d7c 100644 --- a/apps/www/registry/default/ui/alert-dialog.tsx +++ b/apps/www/registry/default/ui/alert-dialog.tsx @@ -10,14 +10,6 @@ const AlertDialog = AlertDialogPrimitive.Root const AlertDialogTrigger = AlertDialogPrimitive.Trigger -const AlertDialogPortal = ({ - className, - ...props -}: AlertDialogPrimitive.AlertDialogPortalProps) => ( - -) -AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName - const AlertDialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -37,7 +29,7 @@ const AlertDialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( - + - + )) AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName diff --git a/apps/www/registry/default/ui/dialog.tsx b/apps/www/registry/default/ui/dialog.tsx index 2f337660022..0bc7d889bc3 100644 --- a/apps/www/registry/default/ui/dialog.tsx +++ b/apps/www/registry/default/ui/dialog.tsx @@ -10,14 +10,6 @@ const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger -const DialogPortal = ({ - className, - ...props -}: DialogPrimitive.DialogPortalProps) => ( - -) -DialogPortal.displayName = DialogPrimitive.Portal.displayName - const DialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -37,7 +29,7 @@ const DialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( - + Close - + )) DialogContent.displayName = DialogPrimitive.Content.displayName diff --git a/apps/www/registry/new-york/ui/alert-dialog.tsx b/apps/www/registry/new-york/ui/alert-dialog.tsx index 03e37132cd3..14f9ba3762a 100644 --- a/apps/www/registry/new-york/ui/alert-dialog.tsx +++ b/apps/www/registry/new-york/ui/alert-dialog.tsx @@ -10,14 +10,6 @@ const AlertDialog = AlertDialogPrimitive.Root const AlertDialogTrigger = AlertDialogPrimitive.Trigger -const AlertDialogPortal = ({ - className, - ...props -}: AlertDialogPrimitive.AlertDialogPortalProps) => ( - -) -AlertDialogPortal.displayName = AlertDialogPrimitive.Portal.displayName - const AlertDialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -37,7 +29,7 @@ const AlertDialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( - + - + )) AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName diff --git a/apps/www/registry/new-york/ui/dialog.tsx b/apps/www/registry/new-york/ui/dialog.tsx index 8cbe0d424e2..5e9bac9cfaa 100644 --- a/apps/www/registry/new-york/ui/dialog.tsx +++ b/apps/www/registry/new-york/ui/dialog.tsx @@ -10,14 +10,6 @@ const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger -const DialogPortal = ({ - className, - ...props -}: DialogPrimitive.DialogPortalProps) => ( - -) -DialogPortal.displayName = DialogPrimitive.Portal.displayName - const DialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -37,7 +29,7 @@ const DialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( - + Close - + )) DialogContent.displayName = DialogPrimitive.Content.displayName From 1536b7824e17cac007438270469fc57688d92b2c Mon Sep 17 00:00:00 2001 From: shadcn Date: Tue, 3 Oct 2023 17:12:40 +0400 Subject: [PATCH 2/5] feat: export portal and overlay for alert-dialog, dialog and sheet (#1660) --- apps/www/registry/default/ui/alert-dialog.tsx | 8 ++++++-- apps/www/registry/default/ui/dialog.tsx | 8 ++++++-- apps/www/registry/default/ui/sheet.tsx | 2 ++ apps/www/registry/new-york/ui/alert-dialog.tsx | 8 ++++++-- apps/www/registry/new-york/ui/dialog.tsx | 8 ++++++-- apps/www/registry/new-york/ui/sheet.tsx | 2 ++ 6 files changed, 28 insertions(+), 8 deletions(-) diff --git a/apps/www/registry/default/ui/alert-dialog.tsx b/apps/www/registry/default/ui/alert-dialog.tsx index a17294f2d7c..6831ce8c86c 100644 --- a/apps/www/registry/default/ui/alert-dialog.tsx +++ b/apps/www/registry/default/ui/alert-dialog.tsx @@ -10,6 +10,8 @@ const AlertDialog = AlertDialogPrimitive.Root const AlertDialogTrigger = AlertDialogPrimitive.Trigger +const AlertDialogPortal = AlertDialogPrimitive.Portal + const AlertDialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -29,7 +31,7 @@ const AlertDialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( - + - + )) AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName @@ -126,6 +128,8 @@ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName export { AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, diff --git a/apps/www/registry/default/ui/dialog.tsx b/apps/www/registry/default/ui/dialog.tsx index 0bc7d889bc3..47ce215739d 100644 --- a/apps/www/registry/default/ui/dialog.tsx +++ b/apps/www/registry/default/ui/dialog.tsx @@ -10,6 +10,8 @@ const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger +const DialogPortal = DialogPrimitive.Portal + const DialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -29,7 +31,7 @@ const DialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( - + Close - + )) DialogContent.displayName = DialogPrimitive.Content.displayName @@ -106,6 +108,8 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName export { Dialog, + DialogPortal, + DialogOverlay, DialogTrigger, DialogContent, DialogHeader, diff --git a/apps/www/registry/default/ui/sheet.tsx b/apps/www/registry/default/ui/sheet.tsx index 98cdd40d2a0..3e98e6fbece 100644 --- a/apps/www/registry/default/ui/sheet.tsx +++ b/apps/www/registry/default/ui/sheet.tsx @@ -134,6 +134,8 @@ SheetDescription.displayName = SheetPrimitive.Description.displayName export { Sheet, + SheetPortal, + SheetOverlay, SheetTrigger, SheetClose, SheetContent, diff --git a/apps/www/registry/new-york/ui/alert-dialog.tsx b/apps/www/registry/new-york/ui/alert-dialog.tsx index 14f9ba3762a..d338de2fb9a 100644 --- a/apps/www/registry/new-york/ui/alert-dialog.tsx +++ b/apps/www/registry/new-york/ui/alert-dialog.tsx @@ -10,6 +10,8 @@ const AlertDialog = AlertDialogPrimitive.Root const AlertDialogTrigger = AlertDialogPrimitive.Trigger +const AlertDialogPortal = AlertDialogPrimitive.Portal + const AlertDialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -29,7 +31,7 @@ const AlertDialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, ...props }, ref) => ( - + - + )) AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName @@ -126,6 +128,8 @@ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName export { AlertDialog, + AlertDialogPortal, + AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, diff --git a/apps/www/registry/new-york/ui/dialog.tsx b/apps/www/registry/new-york/ui/dialog.tsx index 5e9bac9cfaa..cf284e9d74c 100644 --- a/apps/www/registry/new-york/ui/dialog.tsx +++ b/apps/www/registry/new-york/ui/dialog.tsx @@ -10,6 +10,8 @@ const Dialog = DialogPrimitive.Root const DialogTrigger = DialogPrimitive.Trigger +const DialogPortal = DialogPrimitive.Portal + const DialogOverlay = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef @@ -29,7 +31,7 @@ const DialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, children, ...props }, ref) => ( - + Close - + )) DialogContent.displayName = DialogPrimitive.Content.displayName @@ -106,6 +108,8 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName export { Dialog, + DialogPortal, + DialogOverlay, DialogTrigger, DialogContent, DialogHeader, diff --git a/apps/www/registry/new-york/ui/sheet.tsx b/apps/www/registry/new-york/ui/sheet.tsx index 5f0b1b25c49..36e21b0cb66 100644 --- a/apps/www/registry/new-york/ui/sheet.tsx +++ b/apps/www/registry/new-york/ui/sheet.tsx @@ -134,6 +134,8 @@ SheetDescription.displayName = SheetPrimitive.Description.displayName export { Sheet, + SheetPortal, + SheetOverlay, SheetTrigger, SheetClose, SheetContent, From 617cdd0e77f319e7d41c805e528cdf252ef86143 Mon Sep 17 00:00:00 2001 From: Oguz Kazkayasi Date: Tue, 3 Oct 2023 16:38:10 +0300 Subject: [PATCH 3/5] docs(www): framework is changed to language at language search example (#1646) Co-authored-by: shadcn --- apps/www/registry/default/example/combobox-form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/www/registry/default/example/combobox-form.tsx b/apps/www/registry/default/example/combobox-form.tsx index c1a3ea94449..df6a0b0194e 100644 --- a/apps/www/registry/default/example/combobox-form.tsx +++ b/apps/www/registry/default/example/combobox-form.tsx @@ -95,8 +95,8 @@ export default function ComboboxForm() { - - No framework found. + + No language found. {languages.map((language) => ( Date: Tue, 3 Oct 2023 18:20:58 +0400 Subject: [PATCH 4/5] minify cli (#1662) * chore(shadcn-ui): minify build * chore: add changeset --- .changeset/sweet-plums-serve.md | 5 +++++ packages/cli/tsup.config.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/sweet-plums-serve.md diff --git a/.changeset/sweet-plums-serve.md b/.changeset/sweet-plums-serve.md new file mode 100644 index 00000000000..04c8d5152fb --- /dev/null +++ b/.changeset/sweet-plums-serve.md @@ -0,0 +1,5 @@ +--- +"shadcn-ui": patch +--- + +minify build diff --git a/packages/cli/tsup.config.ts b/packages/cli/tsup.config.ts index 2f8b5896aeb..5e496be82c2 100644 --- a/packages/cli/tsup.config.ts +++ b/packages/cli/tsup.config.ts @@ -6,6 +6,7 @@ export default defineConfig({ entry: ["src/index.ts"], format: ["esm"], sourcemap: true, + minify: true, target: "esnext", outDir: "dist", }) From c765635e1344d4d202c6bcc93773d9a6579dcdf3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 18:39:32 +0400 Subject: [PATCH 5/5] chore(release): version packages (#1663) Co-authored-by: github-actions[bot] --- .changeset/sweet-plums-serve.md | 5 ----- packages/cli/CHANGELOG.md | 6 ++++++ packages/cli/package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/sweet-plums-serve.md diff --git a/.changeset/sweet-plums-serve.md b/.changeset/sweet-plums-serve.md deleted file mode 100644 index 04c8d5152fb..00000000000 --- a/.changeset/sweet-plums-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"shadcn-ui": patch ---- - -minify build diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 5e36b64cac2..d7e170d207c 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,11 @@ # @shadcn/ui +## 0.4.1 + +### Patch Changes + +- [#1662](https://github.com/shadcn-ui/ui/pull/1662) [`95a9673`](https://github.com/shadcn-ui/ui/commit/95a9673b1ec6a1954d941d35624ad2cd93faccc4) Thanks [@shadcn](https://github.com/shadcn)! - minify build + ## 0.4.0 ### Minor Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index e956074de02..2c8330d1e3a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "shadcn-ui", - "version": "0.4.0", + "version": "0.4.1", "description": "Add components to your apps.", "publishConfig": { "access": "public"