framepexls-ui-lib 0.3.29 → 0.3.31
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/dist/Checkbox.d.mts +1 -1
- package/dist/Checkbox.d.ts +1 -1
- package/dist/MediaCard.d.mts +2 -1
- package/dist/MediaCard.d.ts +2 -1
- package/dist/MediaCard.js +29 -9
- package/dist/MediaCard.mjs +29 -9
- package/package.json +1 -1
package/dist/Checkbox.d.mts
CHANGED
|
@@ -11,7 +11,7 @@ type CheckboxProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
|
|
|
11
11
|
className?: string;
|
|
12
12
|
inputClassName?: string;
|
|
13
13
|
};
|
|
14
|
-
declare const Checkbox: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "
|
|
14
|
+
declare const Checkbox: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
|
15
15
|
label?: React__default.ReactNode;
|
|
16
16
|
description?: React__default.ReactNode;
|
|
17
17
|
error?: boolean;
|
package/dist/Checkbox.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ type CheckboxProps = Omit<React__default.InputHTMLAttributes<HTMLInputElement>,
|
|
|
11
11
|
className?: string;
|
|
12
12
|
inputClassName?: string;
|
|
13
13
|
};
|
|
14
|
-
declare const Checkbox: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "
|
|
14
|
+
declare const Checkbox: React__default.ForwardRefExoticComponent<Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> & {
|
|
15
15
|
label?: React__default.ReactNode;
|
|
16
16
|
description?: React__default.ReactNode;
|
|
17
17
|
error?: boolean;
|
package/dist/MediaCard.d.mts
CHANGED
|
@@ -5,11 +5,12 @@ type MediaCardProps = {
|
|
|
5
5
|
title: string;
|
|
6
6
|
subtitle?: string;
|
|
7
7
|
copyUrl?: string;
|
|
8
|
+
mimeType?: string | null;
|
|
8
9
|
onRename?: () => void;
|
|
9
10
|
onReplace?: () => void;
|
|
10
11
|
onDelete?: () => void;
|
|
11
12
|
className?: string;
|
|
12
13
|
};
|
|
13
|
-
declare function MediaCard({ imageUrl, title, subtitle, copyUrl, onRename, onReplace, onDelete, className, }: MediaCardProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function MediaCard({ imageUrl, title, subtitle, copyUrl, mimeType, onRename, onReplace, onDelete, className, }: MediaCardProps): react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
export { type MediaCardProps, MediaCard as default };
|
package/dist/MediaCard.d.ts
CHANGED
|
@@ -5,11 +5,12 @@ type MediaCardProps = {
|
|
|
5
5
|
title: string;
|
|
6
6
|
subtitle?: string;
|
|
7
7
|
copyUrl?: string;
|
|
8
|
+
mimeType?: string | null;
|
|
8
9
|
onRename?: () => void;
|
|
9
10
|
onReplace?: () => void;
|
|
10
11
|
onDelete?: () => void;
|
|
11
12
|
className?: string;
|
|
12
13
|
};
|
|
13
|
-
declare function MediaCard({ imageUrl, title, subtitle, copyUrl, onRename, onReplace, onDelete, className, }: MediaCardProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function MediaCard({ imageUrl, title, subtitle, copyUrl, mimeType, onRename, onReplace, onDelete, className, }: MediaCardProps): react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
export { type MediaCardProps, MediaCard as default };
|
package/dist/MediaCard.js
CHANGED
|
@@ -43,6 +43,7 @@ function MediaCard({
|
|
|
43
43
|
title,
|
|
44
44
|
subtitle,
|
|
45
45
|
copyUrl,
|
|
46
|
+
mimeType,
|
|
46
47
|
onRename,
|
|
47
48
|
onReplace,
|
|
48
49
|
onDelete,
|
|
@@ -69,16 +70,35 @@ function MediaCard({
|
|
|
69
70
|
].join(" "),
|
|
70
71
|
children: [
|
|
71
72
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "aspect-square w-full bg-slate-100 relative", children: [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
(() => {
|
|
74
|
+
const isVideo = mimeType && mimeType.startsWith("video/") || !!copyUrl && /\.(mp4|webm|ogg)(\?|$)/i.test(copyUrl);
|
|
75
|
+
if (imageUrl && !isVideo) {
|
|
76
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
+
import_image.default,
|
|
78
|
+
{
|
|
79
|
+
src: imageUrl,
|
|
80
|
+
alt: title,
|
|
81
|
+
fill: true,
|
|
82
|
+
sizes: "(min-width:1024px) 20vw, (min-width:768px) 25vw, (min-width:640px) 33vw, 50vw",
|
|
83
|
+
className: "object-cover transition-transform duration-200 will-change-transform group-hover:scale-105"
|
|
84
|
+
}
|
|
85
|
+
);
|
|
80
86
|
}
|
|
81
|
-
|
|
87
|
+
if (isVideo && copyUrl) {
|
|
88
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
|
+
"video",
|
|
90
|
+
{
|
|
91
|
+
src: copyUrl,
|
|
92
|
+
className: "h-full w-full object-cover",
|
|
93
|
+
muted: true,
|
|
94
|
+
playsInline: true,
|
|
95
|
+
loop: true,
|
|
96
|
+
preload: "metadata"
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-full" });
|
|
101
|
+
})(),
|
|
82
102
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-t from-black/30 to-transparent opacity-0 transition-opacity duration-200 group-hover:opacity-100" })
|
|
83
103
|
] }),
|
|
84
104
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-2 p-2", children: [
|
package/dist/MediaCard.mjs
CHANGED
|
@@ -10,6 +10,7 @@ function MediaCard({
|
|
|
10
10
|
title,
|
|
11
11
|
subtitle,
|
|
12
12
|
copyUrl,
|
|
13
|
+
mimeType,
|
|
13
14
|
onRename,
|
|
14
15
|
onReplace,
|
|
15
16
|
onDelete,
|
|
@@ -36,16 +37,35 @@ function MediaCard({
|
|
|
36
37
|
].join(" "),
|
|
37
38
|
children: [
|
|
38
39
|
/* @__PURE__ */ jsxs("div", { className: "aspect-square w-full bg-slate-100 relative", children: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
(() => {
|
|
41
|
+
const isVideo = mimeType && mimeType.startsWith("video/") || !!copyUrl && /\.(mp4|webm|ogg)(\?|$)/i.test(copyUrl);
|
|
42
|
+
if (imageUrl && !isVideo) {
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
Image,
|
|
45
|
+
{
|
|
46
|
+
src: imageUrl,
|
|
47
|
+
alt: title,
|
|
48
|
+
fill: true,
|
|
49
|
+
sizes: "(min-width:1024px) 20vw, (min-width:768px) 25vw, (min-width:640px) 33vw, 50vw",
|
|
50
|
+
className: "object-cover transition-transform duration-200 will-change-transform group-hover:scale-105"
|
|
51
|
+
}
|
|
52
|
+
);
|
|
47
53
|
}
|
|
48
|
-
|
|
54
|
+
if (isVideo && copyUrl) {
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
"video",
|
|
57
|
+
{
|
|
58
|
+
src: copyUrl,
|
|
59
|
+
className: "h-full w-full object-cover",
|
|
60
|
+
muted: true,
|
|
61
|
+
playsInline: true,
|
|
62
|
+
loop: true,
|
|
63
|
+
preload: "metadata"
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
return /* @__PURE__ */ jsx("div", { className: "h-full w-full" });
|
|
68
|
+
})(),
|
|
49
69
|
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-t from-black/30 to-transparent opacity-0 transition-opacity duration-200 group-hover:opacity-100" })
|
|
50
70
|
] }),
|
|
51
71
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 p-2", children: [
|