reifyui 0.7.1 → 0.7.3
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/index.cjs +47 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -41
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FileCard.jsx +20 -26
- package/src/sheet/SheetGrid.jsx +3 -2
- package/styles/file.css +13 -14
- package/styles/sheet.css +11 -6
package/dist/index.js
CHANGED
|
@@ -2336,7 +2336,7 @@ function SheetGrid({
|
|
|
2336
2336
|
}
|
|
2337
2337
|
return cls;
|
|
2338
2338
|
};
|
|
2339
|
-
const numW = Math.max(
|
|
2339
|
+
const numW = Math.max(48, 30 + String(rows.length || 1).length * 9);
|
|
2340
2340
|
const numStyle = { width: numW, minWidth: numW, maxWidth: numW };
|
|
2341
2341
|
const rowHeight = (row) => sizeDraft.row && sizeDraft.row[row.id] || row.height || void 0;
|
|
2342
2342
|
useEffect8(() => {
|
|
@@ -2926,7 +2926,6 @@ function FileTypeIcon({ name, size = 36 }) {
|
|
|
2926
2926
|
}
|
|
2927
2927
|
|
|
2928
2928
|
// src/components/FileCard.jsx
|
|
2929
|
-
import { Fragment as Fragment9 } from "react";
|
|
2930
2929
|
import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2931
2930
|
function subtitle(name, origin, bytes) {
|
|
2932
2931
|
const parts = [(extOf(name) || "file").toUpperCase()];
|
|
@@ -2940,15 +2939,7 @@ function bytesLabel2(n) {
|
|
|
2940
2939
|
if (n < 1048576) return `${Math.round(n / 1024)} KB`;
|
|
2941
2940
|
return `${(n / 1048576).toFixed(1)} MB`;
|
|
2942
2941
|
}
|
|
2943
|
-
function FileCard({
|
|
2944
|
-
name,
|
|
2945
|
-
origin,
|
|
2946
|
-
bytes,
|
|
2947
|
-
onPreview,
|
|
2948
|
-
onDownload,
|
|
2949
|
-
compact = false,
|
|
2950
|
-
className = ""
|
|
2951
|
-
}) {
|
|
2942
|
+
function FileCard({ name, origin = "output", bytes, onPreview, onDownload, className = "" }) {
|
|
2952
2943
|
const open = onPreview ? (e) => {
|
|
2953
2944
|
e.stopPropagation();
|
|
2954
2945
|
onPreview();
|
|
@@ -2956,7 +2947,7 @@ function FileCard({
|
|
|
2956
2947
|
return /* @__PURE__ */ jsxs13(
|
|
2957
2948
|
"div",
|
|
2958
2949
|
{
|
|
2959
|
-
className: "uic-filecard" + (
|
|
2950
|
+
className: "uic-filecard" + (open ? " is-clickable" : "") + (className ? " " + className : ""),
|
|
2960
2951
|
onClick: open,
|
|
2961
2952
|
role: open ? "button" : void 0,
|
|
2962
2953
|
tabIndex: open ? 0 : void 0,
|
|
@@ -2968,38 +2959,26 @@ function FileCard({
|
|
|
2968
2959
|
} : void 0,
|
|
2969
2960
|
title: name,
|
|
2970
2961
|
children: [
|
|
2971
|
-
/* @__PURE__ */ jsx15("span", { className: "uic-filecard-ic", children: /* @__PURE__ */ jsx15(FileTypeIcon, { name, size:
|
|
2962
|
+
/* @__PURE__ */ jsx15("span", { className: "uic-filecard-ic", children: /* @__PURE__ */ jsx15(FileTypeIcon, { name, size: 32 }) }),
|
|
2972
2963
|
/* @__PURE__ */ jsxs13("span", { className: "uic-filecard-meta", children: [
|
|
2973
2964
|
/* @__PURE__ */ jsx15("span", { className: "uic-filecard-name", children: name }),
|
|
2974
|
-
|
|
2965
|
+
/* @__PURE__ */ jsx15("span", { className: "uic-filecard-sub", children: subtitle(name, origin, bytes) })
|
|
2975
2966
|
] }),
|
|
2976
|
-
/* @__PURE__ */
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
onPreview && /* @__PURE__ */ jsx15(
|
|
2992
|
-
"button",
|
|
2993
|
-
{
|
|
2994
|
-
type: "button",
|
|
2995
|
-
className: "uic-filecard-btn",
|
|
2996
|
-
"aria-label": `Preview ${name}`,
|
|
2997
|
-
title: "Preview",
|
|
2998
|
-
onClick: open,
|
|
2999
|
-
children: /* @__PURE__ */ jsx15(IcEye, {})
|
|
3000
|
-
}
|
|
3001
|
-
)
|
|
3002
|
-
] })
|
|
2967
|
+
onDownload && /* @__PURE__ */ jsx15(
|
|
2968
|
+
"button",
|
|
2969
|
+
{
|
|
2970
|
+
type: "button",
|
|
2971
|
+
className: "uic-filecard-dl",
|
|
2972
|
+
"aria-label": `Download ${name}`,
|
|
2973
|
+
title: "Download",
|
|
2974
|
+
onClick: (e) => {
|
|
2975
|
+
e.stopPropagation();
|
|
2976
|
+
onDownload();
|
|
2977
|
+
},
|
|
2978
|
+
children: /* @__PURE__ */ jsx15(IcDownload, { size: 18 })
|
|
2979
|
+
}
|
|
2980
|
+
),
|
|
2981
|
+
onPreview && /* @__PURE__ */ jsx15("button", { type: "button", className: "uic-filecard-open", "aria-label": `Preview ${name}`, onClick: open, children: "Preview" })
|
|
3003
2982
|
]
|
|
3004
2983
|
}
|
|
3005
2984
|
);
|