@universe-platform/ui 0.1.0-beta.78 → 0.1.0-beta.79
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/globals.css +18 -3
- package/dist/index.js +14 -12
- package/dist/index.mjs +14 -12
- package/package.json +1 -1
package/dist/globals.css
CHANGED
|
@@ -348,9 +348,15 @@
|
|
|
348
348
|
.start-0 {
|
|
349
349
|
inset-inline-start: calc(var(--spacing) * 0);
|
|
350
350
|
}
|
|
351
|
+
.-end-1 {
|
|
352
|
+
inset-inline-end: calc(var(--spacing) * -1);
|
|
353
|
+
}
|
|
351
354
|
.end-0 {
|
|
352
355
|
inset-inline-end: calc(var(--spacing) * 0);
|
|
353
356
|
}
|
|
357
|
+
.-top-1 {
|
|
358
|
+
top: calc(var(--spacing) * -1);
|
|
359
|
+
}
|
|
354
360
|
.-top-1\.5 {
|
|
355
361
|
top: calc(var(--spacing) * -1.5);
|
|
356
362
|
}
|
|
@@ -840,9 +846,6 @@
|
|
|
840
846
|
.max-w-\[180px\] {
|
|
841
847
|
max-width: 180px;
|
|
842
848
|
}
|
|
843
|
-
.max-w-\[calc\(100\%-28px\)\] {
|
|
844
|
-
max-width: calc(100% - 28px);
|
|
845
|
-
}
|
|
846
849
|
.max-w-full {
|
|
847
850
|
max-width: 100%;
|
|
848
851
|
}
|
|
@@ -2504,6 +2507,13 @@
|
|
|
2504
2507
|
}
|
|
2505
2508
|
}
|
|
2506
2509
|
}
|
|
2510
|
+
.group-hover\/file\:opacity-100 {
|
|
2511
|
+
&:is(:where(.group\/file):hover *) {
|
|
2512
|
+
@media (hover: hover) {
|
|
2513
|
+
opacity: 100%;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
}
|
|
2507
2517
|
.group-hover\/tag\:opacity-100 {
|
|
2508
2518
|
&:is(:where(.group\/tag):hover *) {
|
|
2509
2519
|
@media (hover: hover) {
|
|
@@ -3320,6 +3330,11 @@
|
|
|
3320
3330
|
flex-direction: row;
|
|
3321
3331
|
}
|
|
3322
3332
|
}
|
|
3333
|
+
.pointer-coarse\:opacity-100 {
|
|
3334
|
+
@media (pointer: coarse) {
|
|
3335
|
+
opacity: 100%;
|
|
3336
|
+
}
|
|
3337
|
+
}
|
|
3323
3338
|
.\[\&_\*\]\:\!whitespace-normal {
|
|
3324
3339
|
& * {
|
|
3325
3340
|
white-space: normal !important;
|
package/dist/index.js
CHANGED
|
@@ -2459,15 +2459,15 @@ function DrivePickerCell({
|
|
|
2459
2459
|
title: "Upload File",
|
|
2460
2460
|
children: [
|
|
2461
2461
|
isLoading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.Loader2, { className: "w-3.5 h-3.5 shrink-0 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.Upload, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
2462
|
-
!iconOnly && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate", children: isUploading ? uploadingCount > 1 ? `Uploading (${uploadingCount})...` : "Uploading..." : isOpening ? "Loading..." : "Upload
|
|
2462
|
+
!iconOnly && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate", children: isUploading ? uploadingCount > 1 ? `Uploading (${uploadingCount})...` : "Uploading..." : isOpening ? "Loading..." : "Upload" })
|
|
2463
2463
|
]
|
|
2464
2464
|
}
|
|
2465
2465
|
);
|
|
2466
2466
|
};
|
|
2467
2467
|
const fixedLabel = String((_b = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.fixedLabel) != null ? _b : "").trim();
|
|
2468
|
-
const labelFor = (file, idx) => fixedLabel ? fileList.length > 1 ? `${fixedLabel} ${idx + 1}` : fixedLabel :
|
|
2468
|
+
const labelFor = (file, idx) => fixedLabel ? fileList.length > 1 ? `${fixedLabel} ${idx + 1}` : fixedLabel : "";
|
|
2469
2469
|
if (fileList.length > 0) {
|
|
2470
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex flex-wrap items-center w-full py-1 px-2 gap-1.5", children: [
|
|
2470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "relative group/drive flex flex-wrap items-center w-full py-1 px-2 gap-1.5", children: [
|
|
2471
2471
|
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2472
2472
|
"input",
|
|
2473
2473
|
{
|
|
@@ -2481,18 +2481,18 @@ function DrivePickerCell({
|
|
|
2481
2481
|
"aria-label": "Upload files to Google Drive"
|
|
2482
2482
|
}
|
|
2483
2483
|
),
|
|
2484
|
-
fileList.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center
|
|
2484
|
+
fileList.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "relative group/file flex items-center max-w-full", children: [
|
|
2485
2485
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
2486
2486
|
"a",
|
|
2487
2487
|
{
|
|
2488
2488
|
href: file.fileUrl || file.url,
|
|
2489
2489
|
target: "_blank",
|
|
2490
2490
|
rel: "noopener noreferrer",
|
|
2491
|
-
className: `inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium text-blue-700 bg-blue-50 hover:bg-blue-100 transition-colors truncate
|
|
2491
|
+
className: `inline-flex items-center gap-1.5 ${fixedLabel ? "px-2" : "px-1.5"} py-1 rounded-md text-xs font-medium text-blue-700 bg-blue-50 hover:bg-blue-100 transition-colors truncate max-w-full`,
|
|
2492
2492
|
title: fixedLabel ? labelFor(file, idx) : file.fileName || "Open file",
|
|
2493
2493
|
children: [
|
|
2494
2494
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.FileText, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
2495
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate", children: labelFor(file, idx) })
|
|
2495
|
+
fixedLabel && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate", children: labelFor(file, idx) })
|
|
2496
2496
|
]
|
|
2497
2497
|
}
|
|
2498
2498
|
),
|
|
@@ -2500,14 +2500,16 @@ function DrivePickerCell({
|
|
|
2500
2500
|
"button",
|
|
2501
2501
|
{
|
|
2502
2502
|
type: "button",
|
|
2503
|
-
onClick: () =>
|
|
2504
|
-
|
|
2503
|
+
onClick: (e) => {
|
|
2504
|
+
e.stopPropagation();
|
|
2505
|
+
handleRemoveFile(idx);
|
|
2506
|
+
},
|
|
2507
|
+
className: "absolute -top-1 -end-1 z-10 inline-flex items-center justify-center w-4 h-4 rounded-full bg-white border border-slate-200 shadow-sm text-slate-400 hover:text-rose-500 hover:bg-rose-50 opacity-0 group-hover/file:opacity-100 focus:opacity-100 pointer-coarse:opacity-100 transition-opacity",
|
|
2505
2508
|
title: "Remove file",
|
|
2506
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.X, { className: "w-
|
|
2509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.X, { className: "w-2.5 h-2.5 shrink-0" })
|
|
2507
2510
|
}
|
|
2508
2511
|
)
|
|
2509
|
-
] }, file.fileId || idx))
|
|
2510
|
-
renderUploadButton(true)
|
|
2512
|
+
] }, file.fileId || idx))
|
|
2511
2513
|
] });
|
|
2512
2514
|
}
|
|
2513
2515
|
if (readOnly) {
|
|
@@ -2527,7 +2529,7 @@ function DrivePickerCell({
|
|
|
2527
2529
|
"aria-label": "Upload files to Google Drive"
|
|
2528
2530
|
}
|
|
2529
2531
|
),
|
|
2530
|
-
renderUploadButton(
|
|
2532
|
+
renderUploadButton(true)
|
|
2531
2533
|
] });
|
|
2532
2534
|
}
|
|
2533
2535
|
|
package/dist/index.mjs
CHANGED
|
@@ -2244,15 +2244,15 @@ function DrivePickerCell({
|
|
|
2244
2244
|
title: "Upload File",
|
|
2245
2245
|
children: [
|
|
2246
2246
|
isLoading ? /* @__PURE__ */ jsx2(Loader2, { className: "w-3.5 h-3.5 shrink-0 animate-spin" }) : /* @__PURE__ */ jsx2(Upload, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
2247
|
-
!iconOnly && /* @__PURE__ */ jsx2("span", { className: "truncate", children: isUploading ? uploadingCount > 1 ? `Uploading (${uploadingCount})...` : "Uploading..." : isOpening ? "Loading..." : "Upload
|
|
2247
|
+
!iconOnly && /* @__PURE__ */ jsx2("span", { className: "truncate", children: isUploading ? uploadingCount > 1 ? `Uploading (${uploadingCount})...` : "Uploading..." : isOpening ? "Loading..." : "Upload" })
|
|
2248
2248
|
]
|
|
2249
2249
|
}
|
|
2250
2250
|
);
|
|
2251
2251
|
};
|
|
2252
2252
|
const fixedLabel = String((_b = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.fixedLabel) != null ? _b : "").trim();
|
|
2253
|
-
const labelFor = (file, idx) => fixedLabel ? fileList.length > 1 ? `${fixedLabel} ${idx + 1}` : fixedLabel :
|
|
2253
|
+
const labelFor = (file, idx) => fixedLabel ? fileList.length > 1 ? `${fixedLabel} ${idx + 1}` : fixedLabel : "";
|
|
2254
2254
|
if (fileList.length > 0) {
|
|
2255
|
-
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-wrap items-center w-full py-1 px-2 gap-1.5", children: [
|
|
2255
|
+
return /* @__PURE__ */ jsxs2("div", { className: "relative group/drive flex flex-wrap items-center w-full py-1 px-2 gap-1.5", children: [
|
|
2256
2256
|
!readOnly && /* @__PURE__ */ jsx2(
|
|
2257
2257
|
"input",
|
|
2258
2258
|
{
|
|
@@ -2266,18 +2266,18 @@ function DrivePickerCell({
|
|
|
2266
2266
|
"aria-label": "Upload files to Google Drive"
|
|
2267
2267
|
}
|
|
2268
2268
|
),
|
|
2269
|
-
fileList.map((file, idx) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center
|
|
2269
|
+
fileList.map((file, idx) => /* @__PURE__ */ jsxs2("div", { className: "relative group/file flex items-center max-w-full", children: [
|
|
2270
2270
|
/* @__PURE__ */ jsxs2(
|
|
2271
2271
|
"a",
|
|
2272
2272
|
{
|
|
2273
2273
|
href: file.fileUrl || file.url,
|
|
2274
2274
|
target: "_blank",
|
|
2275
2275
|
rel: "noopener noreferrer",
|
|
2276
|
-
className: `inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium text-blue-700 bg-blue-50 hover:bg-blue-100 transition-colors truncate
|
|
2276
|
+
className: `inline-flex items-center gap-1.5 ${fixedLabel ? "px-2" : "px-1.5"} py-1 rounded-md text-xs font-medium text-blue-700 bg-blue-50 hover:bg-blue-100 transition-colors truncate max-w-full`,
|
|
2277
2277
|
title: fixedLabel ? labelFor(file, idx) : file.fileName || "Open file",
|
|
2278
2278
|
children: [
|
|
2279
2279
|
/* @__PURE__ */ jsx2(FileText, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
2280
|
-
/* @__PURE__ */ jsx2("span", { className: "truncate", children: labelFor(file, idx) })
|
|
2280
|
+
fixedLabel && /* @__PURE__ */ jsx2("span", { className: "truncate", children: labelFor(file, idx) })
|
|
2281
2281
|
]
|
|
2282
2282
|
}
|
|
2283
2283
|
),
|
|
@@ -2285,14 +2285,16 @@ function DrivePickerCell({
|
|
|
2285
2285
|
"button",
|
|
2286
2286
|
{
|
|
2287
2287
|
type: "button",
|
|
2288
|
-
onClick: () =>
|
|
2289
|
-
|
|
2288
|
+
onClick: (e) => {
|
|
2289
|
+
e.stopPropagation();
|
|
2290
|
+
handleRemoveFile(idx);
|
|
2291
|
+
},
|
|
2292
|
+
className: "absolute -top-1 -end-1 z-10 inline-flex items-center justify-center w-4 h-4 rounded-full bg-white border border-slate-200 shadow-sm text-slate-400 hover:text-rose-500 hover:bg-rose-50 opacity-0 group-hover/file:opacity-100 focus:opacity-100 pointer-coarse:opacity-100 transition-opacity",
|
|
2290
2293
|
title: "Remove file",
|
|
2291
|
-
children: /* @__PURE__ */ jsx2(X2, { className: "w-
|
|
2294
|
+
children: /* @__PURE__ */ jsx2(X2, { className: "w-2.5 h-2.5 shrink-0" })
|
|
2292
2295
|
}
|
|
2293
2296
|
)
|
|
2294
|
-
] }, file.fileId || idx))
|
|
2295
|
-
renderUploadButton(true)
|
|
2297
|
+
] }, file.fileId || idx))
|
|
2296
2298
|
] });
|
|
2297
2299
|
}
|
|
2298
2300
|
if (readOnly) {
|
|
@@ -2312,7 +2314,7 @@ function DrivePickerCell({
|
|
|
2312
2314
|
"aria-label": "Upload files to Google Drive"
|
|
2313
2315
|
}
|
|
2314
2316
|
),
|
|
2315
|
-
renderUploadButton(
|
|
2317
|
+
renderUploadButton(true)
|
|
2316
2318
|
] });
|
|
2317
2319
|
}
|
|
2318
2320
|
|