@oneplatformdev/ui 0.0.1-beta.88 → 0.0.1-beta.89
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/Dialog/Dialog.d.ts +3 -1
- package/Dialog/Dialog.mjs +25 -25
- package/Dropzone/Dropzone.d.ts +1 -5
- package/Dropzone/Dropzone.types.d.ts +4 -0
- package/package.json +1 -1
package/Dialog/Dialog.d.ts
CHANGED
@@ -5,7 +5,9 @@ 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"> &
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
9
|
+
showCloseButton?: boolean;
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
9
11
|
declare const DialogHeader: {
|
10
12
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
11
13
|
displayName: string;
|
package/Dialog/Dialog.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
2
2
|
import * as l from "react";
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
4
|
-
import { X as
|
4
|
+
import { X as m } from "lucide-react";
|
5
5
|
import { cn as i } from "@oneplatformdev/utils";
|
6
|
-
const
|
6
|
+
const h = e.Root, w = e.Trigger, f = e.Portal, v = e.Close, n = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
7
7
|
e.Overlay,
|
8
8
|
{
|
9
9
|
ref: s,
|
@@ -15,12 +15,12 @@ const b = e.Root, h = e.Trigger, m = e.Portal, w = e.Close, n = l.forwardRef(({
|
|
15
15
|
}
|
16
16
|
));
|
17
17
|
n.displayName = e.Overlay.displayName;
|
18
|
-
const
|
18
|
+
const p = l.forwardRef(({ className: a, children: t, showCloseButton: s = !0, ...r }, c) => /* @__PURE__ */ d(f, { children: [
|
19
19
|
/* @__PURE__ */ o(n, {}),
|
20
20
|
/* @__PURE__ */ d(
|
21
21
|
e.Content,
|
22
22
|
{
|
23
|
-
ref:
|
23
|
+
ref: c,
|
24
24
|
className: i(
|
25
25
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg",
|
26
26
|
"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-lg",
|
@@ -28,19 +28,19 @@ const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__
|
|
28
28
|
"bg-[#FCFCFC] border border-[#E8E9EB] rounded-[16px]",
|
29
29
|
a
|
30
30
|
),
|
31
|
-
...
|
31
|
+
...r,
|
32
32
|
children: [
|
33
33
|
t,
|
34
|
-
/* @__PURE__ */ d(e.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-accent data-[state=open]:text-muted-foreground", children: [
|
35
|
-
/* @__PURE__ */ o(
|
34
|
+
s && /* @__PURE__ */ d(e.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-accent data-[state=open]:text-muted-foreground w-10 aspect-square", children: [
|
35
|
+
/* @__PURE__ */ o(m, { className: "h-4 w-4" }),
|
36
36
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
37
37
|
] })
|
38
38
|
]
|
39
39
|
}
|
40
40
|
)
|
41
41
|
] }));
|
42
|
-
|
43
|
-
const
|
42
|
+
p.displayName = e.Content.displayName;
|
43
|
+
const g = ({
|
44
44
|
className: a,
|
45
45
|
...t
|
46
46
|
}) => /* @__PURE__ */ o(
|
@@ -53,8 +53,8 @@ const p = ({
|
|
53
53
|
...t
|
54
54
|
}
|
55
55
|
);
|
56
|
-
|
57
|
-
const
|
56
|
+
g.displayName = "DialogHeader";
|
57
|
+
const u = ({
|
58
58
|
className: a,
|
59
59
|
...t
|
60
60
|
}) => /* @__PURE__ */ o(
|
@@ -67,8 +67,8 @@ const g = ({
|
|
67
67
|
...t
|
68
68
|
}
|
69
69
|
);
|
70
|
-
|
71
|
-
const
|
70
|
+
u.displayName = "DialogFooter";
|
71
|
+
const x = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
72
72
|
e.Title,
|
73
73
|
{
|
74
74
|
ref: s,
|
@@ -79,8 +79,8 @@ const u = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
79
79
|
...t
|
80
80
|
}
|
81
81
|
));
|
82
|
-
|
83
|
-
const
|
82
|
+
x.displayName = e.Title.displayName;
|
83
|
+
const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
84
84
|
e.Description,
|
85
85
|
{
|
86
86
|
ref: s,
|
@@ -88,16 +88,16 @@ const x = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
88
88
|
...t
|
89
89
|
}
|
90
90
|
));
|
91
|
-
|
91
|
+
y.displayName = e.Description.displayName;
|
92
92
|
export {
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
93
|
+
h as Dialog,
|
94
|
+
v as DialogClose,
|
95
|
+
p as DialogContent,
|
96
|
+
y as DialogDescription,
|
97
|
+
u as DialogFooter,
|
98
|
+
g as DialogHeader,
|
99
99
|
n as DialogOverlay,
|
100
|
-
|
101
|
-
|
102
|
-
|
100
|
+
f as DialogPortal,
|
101
|
+
x as DialogTitle,
|
102
|
+
w as DialogTrigger
|
103
103
|
};
|
package/Dropzone/Dropzone.d.ts
CHANGED
@@ -1,9 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import { Dispatch, SetStateAction } from 'react';
|
1
|
+
import { DropzoneControl, DropzoneProps } from './Dropzone.types';
|
3
2
|
|
4
|
-
export interface DropzoneControl {
|
5
|
-
setItems: Dispatch<SetStateAction<DropzoneValueItem[]>>;
|
6
|
-
}
|
7
3
|
/**
|
8
4
|
* Dropzone component - A drag-and-drop file upload area with image previews, error handling, and localization.
|
9
5
|
*
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
1
2
|
import { FileRejection } from 'react-dropzone';
|
2
3
|
|
3
4
|
export type DropzoneValueItem = File | string;
|
@@ -36,3 +37,6 @@ export interface DropzoneStyles {
|
|
36
37
|
}
|
37
38
|
export declare const DEFAULT_FILE_TYPES: string[];
|
38
39
|
export declare const DEFAULT_IMAGES_TYPES: string[];
|
40
|
+
export interface DropzoneControl {
|
41
|
+
setItems: Dispatch<SetStateAction<DropzoneValueItem[]>>;
|
42
|
+
}
|