framepexls-ui-lib 0.3.32 → 0.3.33
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/MediaTile.js +25 -3
- package/dist/MediaTile.mjs +25 -3
- package/package.json +1 -1
package/dist/MediaTile.js
CHANGED
|
@@ -65,7 +65,7 @@ function MediaTile({
|
|
|
65
65
|
};
|
|
66
66
|
const btnSize = menuSize === "lg" ? "h-11 w-11" : menuSize === "sm" ? "h-8 w-8" : "h-9 w-9";
|
|
67
67
|
const iconSize = menuSize === "lg" ? "h-7 w-7" : menuSize === "sm" ? "h-5 w-5" : "h-6 w-6";
|
|
68
|
-
const
|
|
68
|
+
const hasMenuActions = Boolean(copyUrl || onRename || onReplace || onDelete);
|
|
69
69
|
if (loading) {
|
|
70
70
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
71
71
|
"div",
|
|
@@ -94,7 +94,29 @@ function MediaTile({
|
|
|
94
94
|
className != null ? className : ""
|
|
95
95
|
].join(" "),
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
97
|
+
onPreview ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
98
|
+
import_Button.default,
|
|
99
|
+
{
|
|
100
|
+
unstyled: true,
|
|
101
|
+
type: "button",
|
|
102
|
+
onClick: onPreview,
|
|
103
|
+
className: "aspect-square w-full bg-slate-100 relative text-left",
|
|
104
|
+
children: [
|
|
105
|
+
imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
106
|
+
import_image.default,
|
|
107
|
+
{
|
|
108
|
+
src: imageUrl,
|
|
109
|
+
alt: title,
|
|
110
|
+
fill: true,
|
|
111
|
+
sizes: "(min-width:1024px) 20vw, (min-width:768px) 25vw, (min-width:640px) 33vw, 50vw",
|
|
112
|
+
className: "object-cover transition-transform duration-200 will-change-transform group-hover:scale-105",
|
|
113
|
+
unoptimized: Boolean(isPrivateImage)
|
|
114
|
+
}
|
|
115
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-full" }),
|
|
116
|
+
/* @__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" })
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "aspect-square w-full bg-slate-100 relative text-left", children: [
|
|
98
120
|
imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
121
|
import_image.default,
|
|
100
122
|
{
|
|
@@ -113,7 +135,7 @@ function MediaTile({
|
|
|
113
135
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "truncate text-sm font-medium", children: title }),
|
|
114
136
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-xs text-slate-500 dark:text-slate-400", children: subtitle })
|
|
115
137
|
] }),
|
|
116
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Dropdown.default, { children: [
|
|
138
|
+
hasMenuActions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Dropdown.default, { children: [
|
|
117
139
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dropdown.default.Trigger, { "aria-label": "Acciones", className: [btnSize, "p-0 !gap-0"].join(" "), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { viewBox: "0 0 24 24", className: iconSize, fill: "currentColor", children: [
|
|
118
140
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "5", r: "2" }),
|
|
119
141
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "2" }),
|
package/dist/MediaTile.mjs
CHANGED
|
@@ -32,7 +32,7 @@ function MediaTile({
|
|
|
32
32
|
};
|
|
33
33
|
const btnSize = menuSize === "lg" ? "h-11 w-11" : menuSize === "sm" ? "h-8 w-8" : "h-9 w-9";
|
|
34
34
|
const iconSize = menuSize === "lg" ? "h-7 w-7" : menuSize === "sm" ? "h-5 w-5" : "h-6 w-6";
|
|
35
|
-
const
|
|
35
|
+
const hasMenuActions = Boolean(copyUrl || onRename || onReplace || onDelete);
|
|
36
36
|
if (loading) {
|
|
37
37
|
return /* @__PURE__ */ jsxs(
|
|
38
38
|
"div",
|
|
@@ -61,7 +61,29 @@ function MediaTile({
|
|
|
61
61
|
className != null ? className : ""
|
|
62
62
|
].join(" "),
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */ jsxs(
|
|
64
|
+
onPreview ? /* @__PURE__ */ jsxs(
|
|
65
|
+
Button,
|
|
66
|
+
{
|
|
67
|
+
unstyled: true,
|
|
68
|
+
type: "button",
|
|
69
|
+
onClick: onPreview,
|
|
70
|
+
className: "aspect-square w-full bg-slate-100 relative text-left",
|
|
71
|
+
children: [
|
|
72
|
+
imageUrl ? /* @__PURE__ */ jsx(
|
|
73
|
+
Image,
|
|
74
|
+
{
|
|
75
|
+
src: imageUrl,
|
|
76
|
+
alt: title,
|
|
77
|
+
fill: true,
|
|
78
|
+
sizes: "(min-width:1024px) 20vw, (min-width:768px) 25vw, (min-width:640px) 33vw, 50vw",
|
|
79
|
+
className: "object-cover transition-transform duration-200 will-change-transform group-hover:scale-105",
|
|
80
|
+
unoptimized: Boolean(isPrivateImage)
|
|
81
|
+
}
|
|
82
|
+
) : /* @__PURE__ */ jsx("div", { className: "h-full w-full" }),
|
|
83
|
+
/* @__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" })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
) : /* @__PURE__ */ jsxs("div", { className: "aspect-square w-full bg-slate-100 relative text-left", children: [
|
|
65
87
|
imageUrl ? /* @__PURE__ */ jsx(
|
|
66
88
|
Image,
|
|
67
89
|
{
|
|
@@ -80,7 +102,7 @@ function MediaTile({
|
|
|
80
102
|
/* @__PURE__ */ jsx("div", { className: "truncate text-sm font-medium", children: title }),
|
|
81
103
|
subtitle && /* @__PURE__ */ jsx("div", { className: "text-xs text-slate-500 dark:text-slate-400", children: subtitle })
|
|
82
104
|
] }),
|
|
83
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxs(Dropdown, { children: [
|
|
105
|
+
hasMenuActions && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxs(Dropdown, { children: [
|
|
84
106
|
/* @__PURE__ */ jsx(Dropdown.Trigger, { "aria-label": "Acciones", className: [btnSize, "p-0 !gap-0"].join(" "), children: /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", className: iconSize, fill: "currentColor", children: [
|
|
85
107
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "5", r: "2" }),
|
|
86
108
|
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" }),
|