@herca/r-kit 0.0.37 → 0.0.39

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/clients.cjs CHANGED
@@ -8795,7 +8795,7 @@ var ZoomController = ({
8795
8795
  children: /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Icon_default, { name: "search-minus-fill" })
8796
8796
  }
8797
8797
  ),
8798
- /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Button, { color: "secondary", onClick: onDownload, children: [
8798
+ /* @__PURE__ */ (0, import_jsx_runtime301.jsxs)(Button, { color: "secondary", onClick: onDownload, type: "button", children: [
8799
8799
  /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(Icon_default, { name: "download" }),
8800
8800
  /* @__PURE__ */ (0, import_jsx_runtime301.jsx)(
8801
8801
  Text,
@@ -9059,7 +9059,9 @@ var InputFile = (0, import_react291.forwardRef)(
9059
9059
  }
9060
9060
  URL.revokeObjectURL(files[replaceIndex].preview);
9061
9061
  const newFileItem = {
9062
+ id: crypto.randomUUID(),
9062
9063
  file: selected,
9064
+ customName: selected.name,
9063
9065
  preview: URL.createObjectURL(selected)
9064
9066
  };
9065
9067
  const newFiles = [...files];
@@ -9153,8 +9155,10 @@ var InputFile = (0, import_react291.forwardRef)(
9153
9155
  })
9154
9156
  }));
9155
9157
  (0, import_react291.useEffect)(() => {
9156
- return () => files.forEach((f) => URL.revokeObjectURL(f.preview));
9157
- }, [files]);
9158
+ return () => {
9159
+ files.forEach((f) => URL.revokeObjectURL(f.preview));
9160
+ };
9161
+ }, []);
9158
9162
  const isDefault = variant === "primary" || variant === "secondary" || variant === "gray";
9159
9163
  const isSized = variant === "medium" || variant === "large";
9160
9164
  return /* @__PURE__ */ (0, import_jsx_runtime303.jsxs)("div", { className: "flex flex-col gap-6", children: [
@@ -10403,7 +10407,8 @@ function EventBar({
10403
10407
  segment,
10404
10408
  showTooltip = true,
10405
10409
  onClick,
10406
- isMouseEventOnChildren = false
10410
+ isMouseEventOnChildren = false,
10411
+ level = 0
10407
10412
  }) {
10408
10413
  const [hovered, setHovered] = (0, import_react295.useState)(false);
10409
10414
  const [pos, setPos] = (0, import_react295.useState)({ x: 0, y: 0 });
@@ -10447,6 +10452,7 @@ function EventBar({
10447
10452
  onClick && "cursor-pointer"
10448
10453
  ),
10449
10454
  style: {
10455
+ gridRowStart: level + 1,
10450
10456
  gridColumn: `${segment.startCol + 1} / span ${segment.span}`,
10451
10457
  backgroundColor: bg_color_map[segment?.event?.color ?? "info"] ?? "#F1FDFF"
10452
10458
  },
@@ -10483,8 +10489,12 @@ function EventBar({
10483
10489
  children: segment?.event?.tooltip?.title ?? segment.event.title
10484
10490
  }
10485
10491
  ),
10486
- Boolean(segment.event.subtitle) && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(Text, { variant: "t3", className: "text-nowrap text-gray-700", children: segment?.event?.tooltip?.subtitle ?? segment.event.subtitle }),
10487
- Boolean(segment.event.label) && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { className: "mt-1 flex items-center gap-1", children: [
10492
+ Boolean(
10493
+ segment?.event?.tooltip?.subtitle ?? segment.event.subtitle
10494
+ ) && /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(Text, { variant: "t3", className: "text-nowrap text-gray-700", children: segment?.event?.tooltip?.subtitle ?? segment.event.subtitle }),
10495
+ Boolean(
10496
+ segment?.event?.tooltip?.label ?? segment.event.label
10497
+ ) && /* @__PURE__ */ (0, import_jsx_runtime311.jsxs)("div", { className: "mt-1 flex items-center gap-1", children: [
10488
10498
  /* @__PURE__ */ (0, import_jsx_runtime311.jsx)(
10489
10499
  "div",
10490
10500
  {
@@ -10659,6 +10669,7 @@ function CalendarGrid({
10659
10669
  EventBar,
10660
10670
  {
10661
10671
  segment: seg,
10672
+ level: segmentLevels.get(seg) ?? 0,
10662
10673
  showTooltip: showCalendarTooltip,
10663
10674
  onClick: () => onEventClick?.(seg.event)
10664
10675
  },
@@ -10691,6 +10702,7 @@ function CalendarGrid({
10691
10702
  EventBar,
10692
10703
  {
10693
10704
  segment: seg,
10705
+ level: segmentLevels.get(seg) ?? 0,
10694
10706
  isMouseEventOnChildren: true,
10695
10707
  showTooltip: showCalendarTooltip,
10696
10708
  onClick: () => onEventClick?.(seg.event)