@algenium/blocks 1.20.0 → 1.21.0

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.js CHANGED
@@ -6629,7 +6629,12 @@ function TimeCombobox({
6629
6629
  setDraft(formatTimeDisplay(value));
6630
6630
  }
6631
6631
  };
6632
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
6632
+ const handleListWheel = (e) => {
6633
+ e.currentTarget.scrollTop += e.deltaY;
6634
+ e.preventDefault();
6635
+ e.stopPropagation();
6636
+ };
6637
+ return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, modal: true, children: [
6633
6638
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
6634
6639
  "button",
6635
6640
  {
@@ -6681,38 +6686,46 @@ function TimeCombobox({
6681
6686
  "aria-label": ariaLabel
6682
6687
  }
6683
6688
  ) }),
6684
- /* @__PURE__ */ jsxs("div", { ref: listRef, className: "max-h-56 overflow-y-auto py-1", children: [
6685
- filtered.map((slot) => {
6686
- const selected = slot === value;
6687
- const label = formatTimeDisplay(slot);
6688
- const hint = durationFrom != null ? formatDurationHintClean(durationFrom, slot) : null;
6689
- return /* @__PURE__ */ jsxs(
6690
- "button",
6691
- {
6692
- ref: selected ? selectedRef : void 0,
6693
- type: "button",
6694
- className: cn(
6695
- "flex w-full items-center justify-between px-3 py-1.5 text-left text-sm tabular-nums hover:bg-accent",
6696
- selected && "bg-accent font-medium"
6697
- ),
6698
- onMouseDown: (e) => {
6699
- e.preventDefault();
6700
- },
6701
- onClick: () => {
6702
- onChange(slot);
6703
- setDraft(formatTimeDisplay(slot));
6704
- setOpen(false);
6705
- },
6706
- children: [
6707
- /* @__PURE__ */ jsx("span", { children: label }),
6708
- hint && /* @__PURE__ */ jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: hint })
6709
- ]
6710
- },
6711
- slot
6712
- );
6713
- }),
6714
- filtered.length === 0 && /* @__PURE__ */ jsx("p", { className: "px-3 py-2 text-xs text-muted-foreground", children: "No matching times" })
6715
- ] })
6689
+ /* @__PURE__ */ jsxs(
6690
+ "div",
6691
+ {
6692
+ ref: listRef,
6693
+ className: "max-h-56 overflow-y-auto py-1",
6694
+ onWheel: handleListWheel,
6695
+ children: [
6696
+ filtered.map((slot) => {
6697
+ const selected = slot === value;
6698
+ const label = formatTimeDisplay(slot);
6699
+ const hint = durationFrom != null ? formatDurationHintClean(durationFrom, slot) : null;
6700
+ return /* @__PURE__ */ jsxs(
6701
+ "button",
6702
+ {
6703
+ ref: selected ? selectedRef : void 0,
6704
+ type: "button",
6705
+ className: cn(
6706
+ "flex w-full items-center justify-between px-3 py-1.5 text-left text-sm tabular-nums hover:bg-accent",
6707
+ selected && "bg-accent font-medium"
6708
+ ),
6709
+ onMouseDown: (e) => {
6710
+ e.preventDefault();
6711
+ },
6712
+ onClick: () => {
6713
+ onChange(slot);
6714
+ setDraft(formatTimeDisplay(slot));
6715
+ setOpen(false);
6716
+ },
6717
+ children: [
6718
+ /* @__PURE__ */ jsx("span", { children: label }),
6719
+ hint && /* @__PURE__ */ jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: hint })
6720
+ ]
6721
+ },
6722
+ slot
6723
+ );
6724
+ }),
6725
+ filtered.length === 0 && /* @__PURE__ */ jsx("p", { className: "px-3 py-2 text-xs text-muted-foreground", children: "No matching times" })
6726
+ ]
6727
+ }
6728
+ )
6716
6729
  ]
6717
6730
  }
6718
6731
  )