@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.cjs CHANGED
@@ -6662,7 +6662,12 @@ function TimeCombobox({
6662
6662
  setDraft(formatTimeDisplay(value));
6663
6663
  }
6664
6664
  };
6665
- return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
6665
+ const handleListWheel = (e) => {
6666
+ e.currentTarget.scrollTop += e.deltaY;
6667
+ e.preventDefault();
6668
+ e.stopPropagation();
6669
+ };
6670
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, modal: true, children: [
6666
6671
  /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
6667
6672
  "button",
6668
6673
  {
@@ -6714,38 +6719,46 @@ function TimeCombobox({
6714
6719
  "aria-label": ariaLabel
6715
6720
  }
6716
6721
  ) }),
6717
- /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: listRef, className: "max-h-56 overflow-y-auto py-1", children: [
6718
- filtered.map((slot) => {
6719
- const selected = slot === value;
6720
- const label = formatTimeDisplay(slot);
6721
- const hint = durationFrom != null ? formatDurationHintClean(durationFrom, slot) : null;
6722
- return /* @__PURE__ */ jsxRuntime.jsxs(
6723
- "button",
6724
- {
6725
- ref: selected ? selectedRef : void 0,
6726
- type: "button",
6727
- className: cn(
6728
- "flex w-full items-center justify-between px-3 py-1.5 text-left text-sm tabular-nums hover:bg-accent",
6729
- selected && "bg-accent font-medium"
6730
- ),
6731
- onMouseDown: (e) => {
6732
- e.preventDefault();
6733
- },
6734
- onClick: () => {
6735
- onChange(slot);
6736
- setDraft(formatTimeDisplay(slot));
6737
- setOpen(false);
6738
- },
6739
- children: [
6740
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
6741
- hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: hint })
6742
- ]
6743
- },
6744
- slot
6745
- );
6746
- }),
6747
- filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-2 text-xs text-muted-foreground", children: "No matching times" })
6748
- ] })
6722
+ /* @__PURE__ */ jsxRuntime.jsxs(
6723
+ "div",
6724
+ {
6725
+ ref: listRef,
6726
+ className: "max-h-56 overflow-y-auto py-1",
6727
+ onWheel: handleListWheel,
6728
+ children: [
6729
+ filtered.map((slot) => {
6730
+ const selected = slot === value;
6731
+ const label = formatTimeDisplay(slot);
6732
+ const hint = durationFrom != null ? formatDurationHintClean(durationFrom, slot) : null;
6733
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6734
+ "button",
6735
+ {
6736
+ ref: selected ? selectedRef : void 0,
6737
+ type: "button",
6738
+ className: cn(
6739
+ "flex w-full items-center justify-between px-3 py-1.5 text-left text-sm tabular-nums hover:bg-accent",
6740
+ selected && "bg-accent font-medium"
6741
+ ),
6742
+ onMouseDown: (e) => {
6743
+ e.preventDefault();
6744
+ },
6745
+ onClick: () => {
6746
+ onChange(slot);
6747
+ setDraft(formatTimeDisplay(slot));
6748
+ setOpen(false);
6749
+ },
6750
+ children: [
6751
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
6752
+ hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2 text-xs text-muted-foreground", children: hint })
6753
+ ]
6754
+ },
6755
+ slot
6756
+ );
6757
+ }),
6758
+ filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 py-2 text-xs text-muted-foreground", children: "No matching times" })
6759
+ ]
6760
+ }
6761
+ )
6749
6762
  ]
6750
6763
  }
6751
6764
  )