@appcorp/shadcn 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/enhanced-dropzone.d.ts +2 -4
- package/components/enhanced-dropzone.js +1 -1
- package/components/image-resize-dialog.js +1 -1
- package/components/ui/area-chart-v1.d.ts +2 -4
- package/components/ui/area-chart-v1.js +1 -1
- package/components/ui/calendar.d.ts +1 -2
- package/components/ui/calendar.js +1 -1
- package/components/ui/carousel.d.ts +1 -5
- package/components/ui/carousel.js +1 -1
- package/components/ui/command.d.ts +1 -9
- package/components/ui/command.js +1 -1
- package/components/ui/input-otp.d.ts +1 -4
- package/components/ui/input-otp.js +1 -1
- package/components/ui/resizable.d.ts +1 -3
- package/components/ui/resizable.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type { EnhancedDropzoneProps };
|
|
4
|
-
export declare const EnhancedDropzone: React.FC<EnhancedDropzoneProps>;
|
|
1
|
+
export type { EnhancedDropzoneProps } from "./enhanced-dropzone-impl";
|
|
2
|
+
export { EnhancedDropzone } from "./enhanced-dropzone-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export{EnhancedDropzone}from"./enhanced-dropzone-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";"use client";import
|
|
1
|
+
"use strict";"use client";import t,{useCallback as u,useState as g}from"react";import v from"react-easy-crop";import{Dialog as y,DialogContent as z,DialogDescription as C,DialogFooter as D,DialogHeader as I,DialogTitle as x}from"./ui/dialog";import{Button as p}from"./ui/button";import{Slider as j}from"./ui/slider";async function N(c,e,n="cropped-image.jpg"){const a=await b(c),o=document.createElement("canvas"),l=o.getContext("2d");if(!l)throw new Error("No 2d context");return o.width=e.width,o.height=e.height,l.drawImage(a,e.x,e.y,e.width,e.height,0,0,e.width,e.height),new Promise((d,s)=>{o.toBlob(i=>{if(!i){s(new Error("Canvas is empty"));return}const m=new File([i],n,{type:"image/jpeg"});d(m)},"image/jpeg")})}function b(c){return new Promise((e,n)=>{const a=new Image;a.addEventListener("load",()=>e(a)),a.addEventListener("error",o=>n(o)),a.src=c})}export const ImageResizeDialog=({open:c,onClose:e,imageUrl:n,onCropComplete:a,fileName:o="cropped-image.jpg"})=>{const[l,d]=g({x:0,y:0}),[s,i]=g(1),[m,h]=g(null),w=u((r,f)=>{h(f)},[]),E=u(async()=>{if(m)try{const r=await N(n,m,o);a(r),e()}catch(r){console.error("Failed to crop image:",r)}},[m,n,o,a,e]);return t.createElement(y,{open:c,onOpenChange:e},t.createElement(z,{className:"max-w-3xl","data-slot":"image-resize-dialog","data-testid":"image-resize-dialog"},t.createElement(I,null,t.createElement(x,null,"Resize Image"),t.createElement(C,null,"Adjust the crop area to create a square image. Use the slider to zoom in or out.")),t.createElement("div",{className:"relative h-[400px] w-full bg-muted rounded-md overflow-hidden"},t.createElement(v,{image:n,crop:l,zoom:s,aspect:1,onCropChange:d,onCropComplete:w,onZoomChange:i})),t.createElement("div",{className:"space-y-2"},t.createElement("label",{className:"text-sm font-medium"},"Zoom"),t.createElement(j,{value:[s],onValueChange:r=>i(r[0]||1),min:1,max:3,step:.1,className:"w-full","data-testid":"zoom-slider"})),t.createElement(D,null,t.createElement(p,{variant:"outline",onClick:e,"data-testid":"cancel-button"},"Cancel"),t.createElement(p,{onClick:E,"data-testid":"save-button"},"Save"))))};
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type { AreaChartV1Props };
|
|
4
|
-
export declare const AreaChartV1: (props: AreaChartV1Props) => React.JSX.Element;
|
|
1
|
+
export type { AreaChartV1Props } from "./area-chart-v1-impl";
|
|
2
|
+
export { AreaChartV1 } from "./area-chart-v1-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export{AreaChartV1}from"./area-chart-v1-impl";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const CalendarDayButton: typeof import("./calendar-impl")["CalendarDayButton"];
|
|
1
|
+
export { Calendar, CalendarDayButton } from "./calendar-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export{Calendar,CalendarDayButton}from"./calendar-impl";
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
export type { CarouselApi } from "./carousel-impl";
|
|
2
|
-
export
|
|
3
|
-
export declare const CarouselContent: typeof import("./carousel-impl")["CarouselContent"];
|
|
4
|
-
export declare const CarouselItem: typeof import("./carousel-impl")["CarouselItem"];
|
|
5
|
-
export declare const CarouselPrevious: typeof import("./carousel-impl")["CarouselPrevious"];
|
|
6
|
-
export declare const CarouselNext: typeof import("./carousel-impl")["CarouselNext"];
|
|
2
|
+
export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, } from "./carousel-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export{Carousel,CarouselContent,CarouselItem,CarouselPrevious,CarouselNext}from"./carousel-impl";
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const CommandDialog: typeof import("./command-impl")["CommandDialog"];
|
|
3
|
-
export declare const CommandInput: typeof import("./command-impl")["CommandInput"];
|
|
4
|
-
export declare const CommandList: typeof import("./command-impl")["CommandList"];
|
|
5
|
-
export declare const CommandEmpty: typeof import("./command-impl")["CommandEmpty"];
|
|
6
|
-
export declare const CommandGroup: typeof import("./command-impl")["CommandGroup"];
|
|
7
|
-
export declare const CommandItem: typeof import("./command-impl")["CommandItem"];
|
|
8
|
-
export declare const CommandShortcut: typeof import("./command-impl")["CommandShortcut"];
|
|
9
|
-
export declare const CommandSeparator: typeof import("./command-impl")["CommandSeparator"];
|
|
1
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from "./command-impl";
|
package/components/ui/command.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export{Command,CommandDialog,CommandInput,CommandList,CommandEmpty,CommandGroup,CommandItem,CommandShortcut,CommandSeparator}from"./command-impl";
|
|
@@ -1,4 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const InputOTPGroup: typeof import("./input-otp-impl")["InputOTPGroup"];
|
|
3
|
-
export declare const InputOTPSlot: typeof import("./input-otp-impl")["InputOTPSlot"];
|
|
4
|
-
export declare const InputOTPSeparator: typeof import("./input-otp-impl")["InputOTPSeparator"];
|
|
1
|
+
export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, } from "./input-otp-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export{InputOTP,InputOTPGroup,InputOTPSlot,InputOTPSeparator}from"./input-otp-impl";
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare const ResizablePanel: typeof import("./resizable-impl")["ResizablePanel"];
|
|
3
|
-
export declare const ResizableHandle: typeof import("./resizable-impl")["ResizableHandle"];
|
|
1
|
+
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from "./resizable-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";export{ResizablePanelGroup,ResizablePanel,ResizableHandle}from"./resizable-impl";
|