@facter/ds-core 1.12.0 → 1.13.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.mjs CHANGED
@@ -3358,6 +3358,12 @@ function CardSelect({
3358
3358
  setTimeout(() => searchRef.current?.focus(), 0);
3359
3359
  }
3360
3360
  }, [open, searchable]);
3361
+ const handleWheel = React10.useCallback((e) => {
3362
+ e.stopPropagation();
3363
+ const el = listRef.current;
3364
+ if (!el) return;
3365
+ el.scrollTop += e.deltaY;
3366
+ }, []);
3361
3367
  const handleScroll = React10.useCallback(() => {
3362
3368
  if (!onLoadMore || !hasMore || loading) return;
3363
3369
  const el = listRef.current;
@@ -3410,8 +3416,7 @@ function CardSelect({
3410
3416
  align: "start",
3411
3417
  className: "p-0 overflow-hidden",
3412
3418
  style: {
3413
- width: "var(--radix-popover-trigger-width)",
3414
- maxHeight: "var(--radix-popover-content-available-height)"
3419
+ width: "var(--radix-popover-trigger-width)"
3415
3420
  },
3416
3421
  children: [
3417
3422
  searchable && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-2 border-b border-border", children: [
@@ -3432,9 +3437,9 @@ function CardSelect({
3432
3437
  "div",
3433
3438
  {
3434
3439
  ref: listRef,
3435
- className: "overflow-y-auto overscroll-contain",
3436
- style: { maxHeight: searchable ? "calc(var(--radix-popover-content-available-height) - 45px)" : "var(--radix-popover-content-available-height)" },
3440
+ className: "overflow-y-auto overscroll-contain max-h-[300px]",
3437
3441
  onScroll: handleScroll,
3442
+ onWheel: handleWheel,
3438
3443
  children: /* @__PURE__ */ jsxs("div", { className: "divide-y divide-border/50 p-2", children: [
3439
3444
  filteredOptions.length === 0 && !loading ? /* @__PURE__ */ jsx("p", { className: "py-4 text-center text-sm text-muted-foreground", children: emptyText }) : filteredOptions.map((option) => {
3440
3445
  const isSelected = value === option.value;