@rovula/ui 0.0.33 → 0.0.34

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.
@@ -5,7 +5,10 @@ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.Dia
5
5
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
6
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
7
  declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
- declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
9
+ showCloseButton?: boolean | undefined;
10
+ closeButtonClassName?: string | undefined;
11
+ } & React.RefAttributes<HTMLDivElement>>;
9
12
  declare const DialogHeader: {
10
13
  ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
14
  displayName: string;
package/dist/index.d.ts CHANGED
@@ -370,7 +370,10 @@ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.Dia
370
370
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
371
371
  declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
372
372
  declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
373
- declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
373
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
374
+ showCloseButton?: boolean | undefined;
375
+ closeButtonClassName?: string | undefined;
376
+ } & React.RefAttributes<HTMLDivElement>>;
374
377
  declare const DialogHeader: {
375
378
  ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
376
379
  displayName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rovula/ui",
3
- "version": "0.0.33",
3
+ "version": "0.0.34",
4
4
  "main": "dist/cjs/bundle.js",
5
5
  "module": "dist/esm/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,7 +16,8 @@
16
16
  "storybook:serve-css": "npx tailwindcss -i ./src/theme/global.css -o ./dist/src/theme/global.css",
17
17
  "storybook": "storybook dev -p 6006",
18
18
  "build-storybook": "storybook build",
19
- "chromatic": "npx chromatic --project-token=chpt_cee098dd3b9b3ee"
19
+ "chromatic": "npx chromatic --project-token=chpt_cee098dd3b9b3ee",
20
+ "deploy-storybook": "npx wrangler pages deploy storybook-static --project-name=rovula-ui --branch=main"
20
21
  },
21
22
  "files": [
22
23
  "dist/**/*",
@@ -31,26 +31,47 @@ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
31
31
 
32
32
  const DialogContent = React.forwardRef<
33
33
  React.ElementRef<typeof DialogPrimitive.Content>,
34
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>
35
- >(({ className, children, ...props }, ref) => (
36
- <DialogPortal>
37
- <DialogOverlay />
38
- <DialogPrimitive.Content
39
- ref={ref}
40
- className={cn(
41
- "fixed text-base-popup-foreground left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-base-popup bg-base-popup p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-md",
42
- className
43
- )}
44
- {...props}
45
- >
46
- {children}
47
- <DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-primary data-[state=open]:text-primary-foreground">
48
- <XMarkIcon className="h-4 w-4" />
49
- <span className="sr-only">Close</span>
50
- </DialogPrimitive.Close>
51
- </DialogPrimitive.Content>
52
- </DialogPortal>
53
- ));
34
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
35
+ showCloseButton?: boolean;
36
+ closeButtonClassName?: string;
37
+ }
38
+ >(
39
+ (
40
+ {
41
+ className,
42
+ children,
43
+ showCloseButton = false,
44
+ closeButtonClassName,
45
+ ...props
46
+ },
47
+ ref
48
+ ) => (
49
+ <DialogPortal>
50
+ <DialogOverlay />
51
+ <DialogPrimitive.Content
52
+ ref={ref}
53
+ className={cn(
54
+ "fixed text-base-popup-foreground left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-base-popup bg-base-popup p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-md",
55
+ className
56
+ )}
57
+ {...props}
58
+ >
59
+ {children}
60
+ {showCloseButton && (
61
+ <DialogPrimitive.Close
62
+ className={cn(
63
+ "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-primary data-[state=open]:text-primary-foreground",
64
+ closeButtonClassName
65
+ )}
66
+ >
67
+ <XMarkIcon className="h-4 w-4" />
68
+ <span className="sr-only">Close</span>
69
+ </DialogPrimitive.Close>
70
+ )}
71
+ </DialogPrimitive.Content>
72
+ </DialogPortal>
73
+ )
74
+ );
54
75
  DialogContent.displayName = DialogPrimitive.Content.displayName;
55
76
 
56
77
  const DialogHeader = ({