@oneplatformdev/ui 0.0.1-beta.88 → 0.0.1-beta.90
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/Accordion/Accordion.d.ts +3 -1
- package/Accordion/Accordion.mjs +15 -15
- 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/Accordion/Accordion.d.ts
CHANGED
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
2
2
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
3
3
|
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
4
4
|
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
5
|
-
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> &
|
5
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
6
|
+
showChevron?: boolean;
|
7
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
6
8
|
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
7
9
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
package/Accordion/Accordion.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { jsx as a, jsxs as
|
1
|
+
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
2
2
|
import * as s from "react";
|
3
3
|
import * as e from "@radix-ui/react-accordion";
|
4
|
-
import { ChevronDown as
|
4
|
+
import { ChevronDown as l } from "lucide-react";
|
5
5
|
import { cn as c } from "@oneplatformdev/utils";
|
6
|
-
const
|
6
|
+
const w = e.Root, f = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ */ a(
|
7
7
|
e.Item,
|
8
8
|
{
|
9
9
|
ref: r,
|
@@ -11,11 +11,11 @@ const u = e.Root, l = s.forwardRef(({ className: t, ...o }, r) => /* @__PURE__ *
|
|
11
11
|
...o
|
12
12
|
}
|
13
13
|
));
|
14
|
-
|
15
|
-
const
|
14
|
+
f.displayName = "AccordionItem";
|
15
|
+
const p = s.forwardRef(({ className: t, children: o, showChevron: r = !0, ...i }, d) => /* @__PURE__ */ a(e.Header, { className: "flex", children: /* @__PURE__ */ m(
|
16
16
|
e.Trigger,
|
17
17
|
{
|
18
|
-
ref:
|
18
|
+
ref: d,
|
19
19
|
className: c(
|
20
20
|
"flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",
|
21
21
|
t
|
@@ -23,15 +23,15 @@ const f = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__
|
|
23
23
|
onKeyDown: (n) => {
|
24
24
|
n.key === " " && n.target === n.currentTarget && n.preventDefault();
|
25
25
|
},
|
26
|
-
...
|
26
|
+
...i,
|
27
27
|
children: [
|
28
28
|
o,
|
29
|
-
/* @__PURE__ */ a(
|
29
|
+
r && /* @__PURE__ */ a(l, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
30
30
|
]
|
31
31
|
}
|
32
32
|
) }));
|
33
|
-
|
34
|
-
const
|
33
|
+
p.displayName = e.Trigger.displayName;
|
34
|
+
const N = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__ */ a(
|
35
35
|
e.Content,
|
36
36
|
{
|
37
37
|
ref: i,
|
@@ -40,10 +40,10 @@ const p = s.forwardRef(({ className: t, children: o, ...r }, i) => /* @__PURE__
|
|
40
40
|
children: /* @__PURE__ */ a("div", { className: c("pb-4 pt-0", t), children: o })
|
41
41
|
}
|
42
42
|
));
|
43
|
-
|
43
|
+
N.displayName = e.Content.displayName;
|
44
44
|
export {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
45
|
+
w as Accordion,
|
46
|
+
N as AccordionContent,
|
47
|
+
f as AccordionItem,
|
48
|
+
p as AccordionTrigger
|
49
49
|
};
|
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
|
+
}
|