@universe-platform/ui 0.1.0-beta.77 → 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 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
@@ -2152,6 +2152,7 @@ function DrivePickerCell({
2152
2152
  readOnly = false,
2153
2153
  onUpload
2154
2154
  }) {
2155
+ var _a, _b;
2155
2156
  const [isOpening, setIsOpening] = (0, import_react3.useState)(false);
2156
2157
  const [isUploading, setIsUploading] = (0, import_react3.useState)(false);
2157
2158
  const [uploadingCount, setUploadingCount] = (0, import_react3.useState)(0);
@@ -2172,8 +2173,8 @@ function DrivePickerCell({
2172
2173
  }, [value]);
2173
2174
  (0, import_react3.useEffect)(() => {
2174
2175
  const handleMessage = (event) => {
2175
- var _a, _b, _c;
2176
- if (((_a = event.data) == null ? void 0 : _a.type) === "DRIVE_UPLOAD_SUCCESS" && ((_b = event.data) == null ? void 0 : _b.payload) && ((_c = event.data) == null ? void 0 : _c.cellContextId) === cellContextId) {
2176
+ var _a2, _b2, _c;
2177
+ if (((_a2 = event.data) == null ? void 0 : _a2.type) === "DRIVE_UPLOAD_SUCCESS" && ((_b2 = event.data) == null ? void 0 : _b2.payload) && ((_c = event.data) == null ? void 0 : _c.cellContextId) === cellContextId) {
2177
2178
  const incoming = Array.isArray(event.data.payload) ? event.data.payload : [event.data.payload];
2178
2179
  const normalized = incoming.map((item, idx) => ({
2179
2180
  fileId: item.fileId || item.id || `file-${Date.now()}-${idx}`,
@@ -2209,10 +2210,10 @@ function DrivePickerCell({
2209
2210
  const customResult = await onUpload(files);
2210
2211
  if (Array.isArray(customResult) && customResult.length > 0) {
2211
2212
  const newFiles = customResult.map((res, idx) => {
2212
- var _a;
2213
+ var _a2;
2213
2214
  return {
2214
2215
  fileId: res.fileId || res.id || `file-${Date.now()}-${idx}`,
2215
- fileName: res.fileName || res.name || ((_a = files[idx]) == null ? void 0 : _a.name) || "Unnamed file",
2216
+ fileName: res.fileName || res.name || ((_a2 = files[idx]) == null ? void 0 : _a2.name) || "Unnamed file",
2216
2217
  fileUrl: res.fileUrl || res.url || res.link || "",
2217
2218
  url: res.url || res.fileUrl || res.link || ""
2218
2219
  };
@@ -2404,8 +2405,8 @@ function DrivePickerCell({
2404
2405
  await new Promise((resolve) => {
2405
2406
  let timer = null;
2406
2407
  const handlePopupMessage = (event) => {
2407
- var _a, _b;
2408
- if (((_a = event.data) == null ? void 0 : _a.type) === "DRIVE_UPLOAD_SUCCESS" && ((_b = event.data) == null ? void 0 : _b.cellContextId) === cellContextId) {
2408
+ var _a2, _b2;
2409
+ if (((_a2 = event.data) == null ? void 0 : _a2.type) === "DRIVE_UPLOAD_SUCCESS" && ((_b2 = event.data) == null ? void 0 : _b2.cellContextId) === cellContextId) {
2409
2410
  window.removeEventListener("message", handlePopupMessage);
2410
2411
  if (timer) clearInterval(timer);
2411
2412
  resolve();
@@ -2458,13 +2459,15 @@ function DrivePickerCell({
2458
2459
  title: "Upload File",
2459
2460
  children: [
2460
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" }),
2461
- !iconOnly && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate", children: isUploading ? uploadingCount > 1 ? `Uploading (${uploadingCount})...` : "Uploading..." : isOpening ? "Loading..." : "Upload File" })
2462
+ !iconOnly && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate", children: isUploading ? uploadingCount > 1 ? `Uploading (${uploadingCount})...` : "Uploading..." : isOpening ? "Loading..." : "Upload" })
2462
2463
  ]
2463
2464
  }
2464
2465
  );
2465
2466
  };
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 : "";
2466
2469
  if (fileList.length > 0) {
2467
- 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: [
2468
2471
  !readOnly && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
2469
2472
  "input",
2470
2473
  {
@@ -2478,18 +2481,18 @@ function DrivePickerCell({
2478
2481
  "aria-label": "Upload files to Google Drive"
2479
2482
  }
2480
2483
  ),
2481
- fileList.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex items-center gap-1 max-w-full", children: [
2484
+ fileList.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "relative group/file flex items-center max-w-full", children: [
2482
2485
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
2483
2486
  "a",
2484
2487
  {
2485
2488
  href: file.fileUrl || file.url,
2486
2489
  target: "_blank",
2487
2490
  rel: "noopener noreferrer",
2488
- 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 ${readOnly ? "max-w-full" : "max-w-[calc(100%-28px)]"}`,
2489
- title: file.fileName || "Open file",
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
+ title: fixedLabel ? labelFor(file, idx) : file.fileName || "Open file",
2490
2493
  children: [
2491
2494
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.FileText, { className: "w-3.5 h-3.5 shrink-0" }),
2492
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate", children: file.fileName || "Unnamed file" })
2495
+ fixedLabel && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate", children: labelFor(file, idx) })
2493
2496
  ]
2494
2497
  }
2495
2498
  ),
@@ -2497,14 +2500,16 @@ function DrivePickerCell({
2497
2500
  "button",
2498
2501
  {
2499
2502
  type: "button",
2500
- onClick: () => handleRemoveFile(idx),
2501
- className: "shrink-0 inline-flex items-center justify-center w-6 h-6 rounded hover:bg-rose-100 text-slate-400 hover:text-rose-500 transition-colors",
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",
2502
2508
  title: "Remove file",
2503
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.X, { className: "w-3.5 h-3.5 shrink-0" })
2509
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react2.X, { className: "w-2.5 h-2.5 shrink-0" })
2504
2510
  }
2505
2511
  )
2506
- ] }, file.fileId || idx)),
2507
- renderUploadButton(true)
2512
+ ] }, file.fileId || idx))
2508
2513
  ] });
2509
2514
  }
2510
2515
  if (readOnly) {
@@ -2524,7 +2529,7 @@ function DrivePickerCell({
2524
2529
  "aria-label": "Upload files to Google Drive"
2525
2530
  }
2526
2531
  ),
2527
- renderUploadButton(false)
2532
+ renderUploadButton(true)
2528
2533
  ] });
2529
2534
  }
2530
2535
 
@@ -3684,12 +3689,11 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3684
3689
  const handleSaveAndClose = (0, import_react7.useCallback)(() => {
3685
3690
  const rawUrl = draftUrlRef.current.trim();
3686
3691
  const rawLabel = draftLabelRef.current.trim();
3687
- if (!rawUrl) {
3692
+ if (!rawUrl && !rawLabel) {
3688
3693
  onChange(null);
3689
3694
  } else {
3690
- const resolved = resolveProtocol(rawUrl);
3691
3695
  onChange({
3692
- url: resolved,
3696
+ url: rawUrl ? resolveProtocol(rawUrl) : "",
3693
3697
  label: rawLabel
3694
3698
  });
3695
3699
  }
@@ -3737,6 +3741,9 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3737
3741
  };
3738
3742
  if (readOnly) {
3739
3743
  if (!currentLink.url) {
3744
+ if (fixedLabel || currentLink.label) {
3745
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "px-2 py-1 flex items-center h-full text-slate-600 text-sm truncate", children: fixedLabel || currentLink.label });
3746
+ }
3740
3747
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "px-2 py-1 flex items-center h-full text-slate-400 text-xs italic", children: "-" });
3741
3748
  }
3742
3749
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
@@ -3804,9 +3811,9 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3804
3811
  ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3805
3812
  "span",
3806
3813
  {
3807
- className: "text-slate-400 italic text-sm flex-1 cursor-pointer select-none",
3814
+ className: fixedLabel || currentLink.label ? "text-slate-600 text-sm flex-1 cursor-pointer select-none truncate" : "text-slate-400 italic text-sm flex-1 cursor-pointer select-none",
3808
3815
  onClick: handleOpen,
3809
- children: "\u05E8\u05D9\u05E7"
3816
+ children: fixedLabel || currentLink.label || "\u05E8\u05D9\u05E7"
3810
3817
  }
3811
3818
  ),
3812
3819
  renderTooltip(displayLabel),
@@ -3856,7 +3863,7 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3856
3863
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
3857
3864
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { className: "block text-xs font-medium text-slate-700 mb-1", children: [
3858
3865
  "\u05DB\u05EA\u05D5\u05D1\u05EA URL ",
3859
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-rose-500", children: "*" })
3866
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-slate-400 font-normal", children: "(\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)" })
3860
3867
  ] }),
3861
3868
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3862
3869
  "input",
@@ -3901,7 +3908,7 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3901
3908
  ] })
3902
3909
  ] }),
3903
3910
  /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center justify-between pt-2 border-t border-slate-100", children: [
3904
- currentLink.url ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3911
+ currentLink.url || currentLink.label ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3905
3912
  "button",
3906
3913
  {
3907
3914
  type: "button",
@@ -5368,10 +5375,13 @@ var CELL_RENDERERS = {
5368
5375
  LINK: ({ value, column }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LinkPickerCell, { value, onChange: () => {
5369
5376
  }, column, readOnly: true }),
5370
5377
  BOOLEAN: ({ value }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex items-center justify-center w-full h-full p-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("input", { type: "checkbox", checked: !!value, readOnly: true, className: "w-4 h-4 rounded border-slate-300 text-brand" }) }),
5371
- GOOGLE_DRIVE_FILE: ({ value }) => {
5378
+ GOOGLE_DRIVE_FILE: ({ value, column }) => {
5379
+ var _a, _b;
5372
5380
  const files = Array.isArray(value) ? value : value ? [value] : [];
5373
5381
  if (files.length === 0) return null;
5374
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-0.5 py-1 px-2 h-full justify-center", children: files.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-sm truncate", title: file.fileName || file.name || "", children: file.fileName || file.name || "" }, file.fileId || idx)) });
5382
+ const fixedLabel = String((_b = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.fixedLabel) != null ? _b : "").trim();
5383
+ const labelFor = (file, idx) => fixedLabel ? files.length > 1 ? `${fixedLabel} ${idx + 1}` : fixedLabel : file.fileName || file.name || "";
5384
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "flex flex-col gap-0.5 py-1 px-2 h-full justify-center", children: files.map((file, idx) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-sm truncate", title: labelFor(file, idx), children: labelFor(file, idx) }, file.fileId || idx)) });
5375
5385
  },
5376
5386
  RELATION: ({ value, column, context }) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(RelationPickerCell, { value, column, context, readOnly: true, onChange: () => {
5377
5387
  } }),
package/dist/index.mjs CHANGED
@@ -1937,6 +1937,7 @@ function DrivePickerCell({
1937
1937
  readOnly = false,
1938
1938
  onUpload
1939
1939
  }) {
1940
+ var _a, _b;
1940
1941
  const [isOpening, setIsOpening] = useState2(false);
1941
1942
  const [isUploading, setIsUploading] = useState2(false);
1942
1943
  const [uploadingCount, setUploadingCount] = useState2(0);
@@ -1957,8 +1958,8 @@ function DrivePickerCell({
1957
1958
  }, [value]);
1958
1959
  useEffect(() => {
1959
1960
  const handleMessage = (event) => {
1960
- var _a, _b, _c;
1961
- if (((_a = event.data) == null ? void 0 : _a.type) === "DRIVE_UPLOAD_SUCCESS" && ((_b = event.data) == null ? void 0 : _b.payload) && ((_c = event.data) == null ? void 0 : _c.cellContextId) === cellContextId) {
1961
+ var _a2, _b2, _c;
1962
+ if (((_a2 = event.data) == null ? void 0 : _a2.type) === "DRIVE_UPLOAD_SUCCESS" && ((_b2 = event.data) == null ? void 0 : _b2.payload) && ((_c = event.data) == null ? void 0 : _c.cellContextId) === cellContextId) {
1962
1963
  const incoming = Array.isArray(event.data.payload) ? event.data.payload : [event.data.payload];
1963
1964
  const normalized = incoming.map((item, idx) => ({
1964
1965
  fileId: item.fileId || item.id || `file-${Date.now()}-${idx}`,
@@ -1994,10 +1995,10 @@ function DrivePickerCell({
1994
1995
  const customResult = await onUpload(files);
1995
1996
  if (Array.isArray(customResult) && customResult.length > 0) {
1996
1997
  const newFiles = customResult.map((res, idx) => {
1997
- var _a;
1998
+ var _a2;
1998
1999
  return {
1999
2000
  fileId: res.fileId || res.id || `file-${Date.now()}-${idx}`,
2000
- fileName: res.fileName || res.name || ((_a = files[idx]) == null ? void 0 : _a.name) || "Unnamed file",
2001
+ fileName: res.fileName || res.name || ((_a2 = files[idx]) == null ? void 0 : _a2.name) || "Unnamed file",
2001
2002
  fileUrl: res.fileUrl || res.url || res.link || "",
2002
2003
  url: res.url || res.fileUrl || res.link || ""
2003
2004
  };
@@ -2189,8 +2190,8 @@ function DrivePickerCell({
2189
2190
  await new Promise((resolve) => {
2190
2191
  let timer = null;
2191
2192
  const handlePopupMessage = (event) => {
2192
- var _a, _b;
2193
- if (((_a = event.data) == null ? void 0 : _a.type) === "DRIVE_UPLOAD_SUCCESS" && ((_b = event.data) == null ? void 0 : _b.cellContextId) === cellContextId) {
2193
+ var _a2, _b2;
2194
+ if (((_a2 = event.data) == null ? void 0 : _a2.type) === "DRIVE_UPLOAD_SUCCESS" && ((_b2 = event.data) == null ? void 0 : _b2.cellContextId) === cellContextId) {
2194
2195
  window.removeEventListener("message", handlePopupMessage);
2195
2196
  if (timer) clearInterval(timer);
2196
2197
  resolve();
@@ -2243,13 +2244,15 @@ function DrivePickerCell({
2243
2244
  title: "Upload File",
2244
2245
  children: [
2245
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" }),
2246
- !iconOnly && /* @__PURE__ */ jsx2("span", { className: "truncate", children: isUploading ? uploadingCount > 1 ? `Uploading (${uploadingCount})...` : "Uploading..." : isOpening ? "Loading..." : "Upload File" })
2247
+ !iconOnly && /* @__PURE__ */ jsx2("span", { className: "truncate", children: isUploading ? uploadingCount > 1 ? `Uploading (${uploadingCount})...` : "Uploading..." : isOpening ? "Loading..." : "Upload" })
2247
2248
  ]
2248
2249
  }
2249
2250
  );
2250
2251
  };
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 : "";
2251
2254
  if (fileList.length > 0) {
2252
- 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: [
2253
2256
  !readOnly && /* @__PURE__ */ jsx2(
2254
2257
  "input",
2255
2258
  {
@@ -2263,18 +2266,18 @@ function DrivePickerCell({
2263
2266
  "aria-label": "Upload files to Google Drive"
2264
2267
  }
2265
2268
  ),
2266
- fileList.map((file, idx) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1 max-w-full", children: [
2269
+ fileList.map((file, idx) => /* @__PURE__ */ jsxs2("div", { className: "relative group/file flex items-center max-w-full", children: [
2267
2270
  /* @__PURE__ */ jsxs2(
2268
2271
  "a",
2269
2272
  {
2270
2273
  href: file.fileUrl || file.url,
2271
2274
  target: "_blank",
2272
2275
  rel: "noopener noreferrer",
2273
- 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 ${readOnly ? "max-w-full" : "max-w-[calc(100%-28px)]"}`,
2274
- title: file.fileName || "Open file",
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
+ title: fixedLabel ? labelFor(file, idx) : file.fileName || "Open file",
2275
2278
  children: [
2276
2279
  /* @__PURE__ */ jsx2(FileText, { className: "w-3.5 h-3.5 shrink-0" }),
2277
- /* @__PURE__ */ jsx2("span", { className: "truncate", children: file.fileName || "Unnamed file" })
2280
+ fixedLabel && /* @__PURE__ */ jsx2("span", { className: "truncate", children: labelFor(file, idx) })
2278
2281
  ]
2279
2282
  }
2280
2283
  ),
@@ -2282,14 +2285,16 @@ function DrivePickerCell({
2282
2285
  "button",
2283
2286
  {
2284
2287
  type: "button",
2285
- onClick: () => handleRemoveFile(idx),
2286
- className: "shrink-0 inline-flex items-center justify-center w-6 h-6 rounded hover:bg-rose-100 text-slate-400 hover:text-rose-500 transition-colors",
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",
2287
2293
  title: "Remove file",
2288
- children: /* @__PURE__ */ jsx2(X2, { className: "w-3.5 h-3.5 shrink-0" })
2294
+ children: /* @__PURE__ */ jsx2(X2, { className: "w-2.5 h-2.5 shrink-0" })
2289
2295
  }
2290
2296
  )
2291
- ] }, file.fileId || idx)),
2292
- renderUploadButton(true)
2297
+ ] }, file.fileId || idx))
2293
2298
  ] });
2294
2299
  }
2295
2300
  if (readOnly) {
@@ -2309,7 +2314,7 @@ function DrivePickerCell({
2309
2314
  "aria-label": "Upload files to Google Drive"
2310
2315
  }
2311
2316
  ),
2312
- renderUploadButton(false)
2317
+ renderUploadButton(true)
2313
2318
  ] });
2314
2319
  }
2315
2320
 
@@ -3469,12 +3474,11 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3469
3474
  const handleSaveAndClose = useCallback5(() => {
3470
3475
  const rawUrl = draftUrlRef.current.trim();
3471
3476
  const rawLabel = draftLabelRef.current.trim();
3472
- if (!rawUrl) {
3477
+ if (!rawUrl && !rawLabel) {
3473
3478
  onChange(null);
3474
3479
  } else {
3475
- const resolved = resolveProtocol(rawUrl);
3476
3480
  onChange({
3477
- url: resolved,
3481
+ url: rawUrl ? resolveProtocol(rawUrl) : "",
3478
3482
  label: rawLabel
3479
3483
  });
3480
3484
  }
@@ -3522,6 +3526,9 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3522
3526
  };
3523
3527
  if (readOnly) {
3524
3528
  if (!currentLink.url) {
3529
+ if (fixedLabel || currentLink.label) {
3530
+ return /* @__PURE__ */ jsx6("span", { className: "px-2 py-1 flex items-center h-full text-slate-600 text-sm truncate", children: fixedLabel || currentLink.label });
3531
+ }
3525
3532
  return /* @__PURE__ */ jsx6("span", { className: "px-2 py-1 flex items-center h-full text-slate-400 text-xs italic", children: "-" });
3526
3533
  }
3527
3534
  return /* @__PURE__ */ jsxs6(
@@ -3589,9 +3596,9 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3589
3596
  ) : /* @__PURE__ */ jsx6(
3590
3597
  "span",
3591
3598
  {
3592
- className: "text-slate-400 italic text-sm flex-1 cursor-pointer select-none",
3599
+ className: fixedLabel || currentLink.label ? "text-slate-600 text-sm flex-1 cursor-pointer select-none truncate" : "text-slate-400 italic text-sm flex-1 cursor-pointer select-none",
3593
3600
  onClick: handleOpen,
3594
- children: "\u05E8\u05D9\u05E7"
3601
+ children: fixedLabel || currentLink.label || "\u05E8\u05D9\u05E7"
3595
3602
  }
3596
3603
  ),
3597
3604
  renderTooltip(displayLabel),
@@ -3641,7 +3648,7 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3641
3648
  /* @__PURE__ */ jsxs6("div", { children: [
3642
3649
  /* @__PURE__ */ jsxs6("label", { className: "block text-xs font-medium text-slate-700 mb-1", children: [
3643
3650
  "\u05DB\u05EA\u05D5\u05D1\u05EA URL ",
3644
- /* @__PURE__ */ jsx6("span", { className: "text-rose-500", children: "*" })
3651
+ /* @__PURE__ */ jsx6("span", { className: "text-slate-400 font-normal", children: "(\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)" })
3645
3652
  ] }),
3646
3653
  /* @__PURE__ */ jsx6(
3647
3654
  "input",
@@ -3686,7 +3693,7 @@ function LinkPickerCell({ value, onChange, column, readOnly = false }) {
3686
3693
  ] })
3687
3694
  ] }),
3688
3695
  /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between pt-2 border-t border-slate-100", children: [
3689
- currentLink.url ? /* @__PURE__ */ jsxs6(
3696
+ currentLink.url || currentLink.label ? /* @__PURE__ */ jsxs6(
3690
3697
  "button",
3691
3698
  {
3692
3699
  type: "button",
@@ -5153,10 +5160,13 @@ var CELL_RENDERERS = {
5153
5160
  LINK: ({ value, column }) => /* @__PURE__ */ jsx12(LinkPickerCell, { value, onChange: () => {
5154
5161
  }, column, readOnly: true }),
5155
5162
  BOOLEAN: ({ value }) => /* @__PURE__ */ jsx12("div", { className: "flex items-center justify-center w-full h-full p-2", children: /* @__PURE__ */ jsx12("input", { type: "checkbox", checked: !!value, readOnly: true, className: "w-4 h-4 rounded border-slate-300 text-brand" }) }),
5156
- GOOGLE_DRIVE_FILE: ({ value }) => {
5163
+ GOOGLE_DRIVE_FILE: ({ value, column }) => {
5164
+ var _a, _b;
5157
5165
  const files = Array.isArray(value) ? value : value ? [value] : [];
5158
5166
  if (files.length === 0) return null;
5159
- return /* @__PURE__ */ jsx12("div", { className: "flex flex-col gap-0.5 py-1 px-2 h-full justify-center", children: files.map((file, idx) => /* @__PURE__ */ jsx12("span", { className: "text-sm truncate", title: file.fileName || file.name || "", children: file.fileName || file.name || "" }, file.fileId || idx)) });
5167
+ const fixedLabel = String((_b = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.fixedLabel) != null ? _b : "").trim();
5168
+ const labelFor = (file, idx) => fixedLabel ? files.length > 1 ? `${fixedLabel} ${idx + 1}` : fixedLabel : file.fileName || file.name || "";
5169
+ return /* @__PURE__ */ jsx12("div", { className: "flex flex-col gap-0.5 py-1 px-2 h-full justify-center", children: files.map((file, idx) => /* @__PURE__ */ jsx12("span", { className: "text-sm truncate", title: labelFor(file, idx), children: labelFor(file, idx) }, file.fileId || idx)) });
5160
5170
  },
5161
5171
  RELATION: ({ value, column, context }) => /* @__PURE__ */ jsx12(RelationPickerCell, { value, column, context, readOnly: true, onChange: () => {
5162
5172
  } }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@universe-platform/ui",
3
- "version": "0.1.0-beta.77",
3
+ "version": "0.1.0-beta.79",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",