@sequenceholdings/atlas-ui 1.0.0 → 1.0.1

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.d.ts CHANGED
@@ -1878,7 +1878,7 @@ declare interface MetricGridProps {
1878
1878
  className?: string;
1879
1879
  }
1880
1880
 
1881
- export declare function MultiSelect({ label, countLabel, options, selected, onChange, searchPlaceholder, emptyMessage, maxStackedIcons, hideWhenEmpty, className, }: MultiSelectProps): JSX.Element | null;
1881
+ export declare function MultiSelect({ label, countLabel, options, selected, onChange, searchPlaceholder, emptyMessage, maxStackedIcons, hideWhenEmpty, modal, className, }: MultiSelectProps): JSX.Element | null;
1882
1882
 
1883
1883
  /**
1884
1884
  * Fields shared by `MultiSelect` (trigger + popover) and the standalone
@@ -1995,6 +1995,27 @@ declare interface MultiSelectProps extends MultiSelectCoreProps {
1995
1995
  * that hasn't loaded yet).
1996
1996
  */
1997
1997
  hideWhenEmpty?: boolean;
1998
+ /**
1999
+ * Render the popover as a modal layer. Pass `true` when the MultiSelect
2000
+ * lives inside a Dialog.
2001
+ *
2002
+ * A Dialog scroll-locks the page with react-remove-scroll, allowing wheel
2003
+ * events only within the dialog's own content subtree. This popover portals
2004
+ * to the body, so it sits outside that subtree and the lock swallows every
2005
+ * wheel event over the option list — the list is a real scroll container
2006
+ * (`max-h-[300px] overflow-y-auto`) but cannot be scrolled, stranding every
2007
+ * option past the ~7th. Radix `Select` is unaffected because it implements
2008
+ * its own scrolling rather than relying on native overflow.
2009
+ *
2010
+ * Modal mode gives the popover its own scroll lock. react-remove-scroll
2011
+ * keeps a stack of locks with only the innermost active, so the popover's
2012
+ * lock supersedes the dialog's and allows wheel within the popover.
2013
+ *
2014
+ * Defaults to `false` because modal mode also traps focus and blocks outside
2015
+ * pointer events — in a filter toolbar that breaks clicking straight from one
2016
+ * open facet to the next, which is the dominant use of this component.
2017
+ */
2018
+ modal?: boolean;
1998
2019
  className?: string;
1999
2020
  }
2000
2021
 
package/dist/index.mjs CHANGED
@@ -9587,28 +9587,29 @@ function _y() {
9587
9587
  children: /* @__PURE__ */ O(Cn, { className: "size-icon-sm" })
9588
9588
  });
9589
9589
  }
9590
- function vy({ label: e, countLabel: t, options: n, selected: i, onChange: a, searchPlaceholder: o, emptyMessage: s = "No matches.", maxStackedIcons: c = 3, hideWhenEmpty: l = !0, className: u }) {
9591
- let [d, f] = E(!1), [p, m] = E(""), h = i.length > 0, g = t ?? e.toLowerCase(), _ = w(() => {
9590
+ function vy({ label: e, countLabel: t, options: n, selected: i, onChange: a, searchPlaceholder: o, emptyMessage: s = "No matches.", maxStackedIcons: c = 3, hideWhenEmpty: l = !0, modal: u = !1, className: d }) {
9591
+ let [f, p] = E(!1), [m, h] = E(""), g = i.length > 0, _ = t ?? e.toLowerCase(), v = w(() => {
9592
9592
  let e = new Set(i);
9593
9593
  return n.filter((t) => e.has(t.value));
9594
- }, [n, i]).slice(0, c), v = w(() => n.some((e) => e.icon != null), [n]);
9594
+ }, [n, i]).slice(0, c), y = w(() => n.some((e) => e.icon != null), [n]);
9595
9595
  return l && n.length === 0 ? null : /* @__PURE__ */ k(o_, {
9596
- open: d,
9596
+ open: f,
9597
9597
  onOpenChange: (e) => {
9598
- f(e), e || m("");
9598
+ p(e), e || h("");
9599
9599
  },
9600
+ modal: u,
9600
9601
  children: [/* @__PURE__ */ O(s_, {
9601
9602
  asChild: !0,
9602
9603
  children: /* @__PURE__ */ O("button", {
9603
9604
  type: "button",
9604
9605
  "data-slot": "multi-select-trigger",
9605
9606
  "aria-haspopup": "listbox",
9606
- "aria-expanded": d,
9607
- className: r("flex h-9 items-center gap-2 whitespace-nowrap rounded-field border border-input bg-field px-3 py-1 text-base md:text-sm", "ring-offset-background transition-colors", "focus:outline-none focus:ring-1 focus:ring-ring", "disabled:cursor-not-allowed disabled:opacity-50", h ? "text-foreground" : "text-muted-foreground hover:text-foreground", u),
9608
- children: h ? /* @__PURE__ */ k(D, { children: [
9609
- v && _.length > 0 && /* @__PURE__ */ O("span", {
9607
+ "aria-expanded": f,
9608
+ className: r("flex h-9 items-center gap-2 whitespace-nowrap rounded-field border border-input bg-field px-3 py-1 text-base md:text-sm", "ring-offset-background transition-colors", "focus:outline-none focus:ring-1 focus:ring-ring", "disabled:cursor-not-allowed disabled:opacity-50", g ? "text-foreground" : "text-muted-foreground hover:text-foreground", d),
9609
+ children: g ? /* @__PURE__ */ k(D, { children: [
9610
+ y && v.length > 0 && /* @__PURE__ */ O("span", {
9610
9611
  className: "flex shrink-0 flex-row-reverse -space-x-1.5 space-x-reverse",
9611
- children: [..._].reverse().map((e) => /* @__PURE__ */ O("span", {
9612
+ children: [...v].reverse().map((e) => /* @__PURE__ */ O("span", {
9612
9613
  className: "flex size-5 shrink-0 items-center justify-center rounded-full ring-2 ring-background",
9613
9614
  children: e.icon ?? /* @__PURE__ */ O(_y, {})
9614
9615
  }, e.value))
@@ -9621,7 +9622,7 @@ function vy({ label: e, countLabel: t, options: n, selected: i, onChange: a, sea
9621
9622
  children: i.length
9622
9623
  }),
9623
9624
  " ",
9624
- g
9625
+ _
9625
9626
  ]
9626
9627
  }),
9627
9628
  /* @__PURE__ */ O("span", {
@@ -9647,7 +9648,7 @@ function vy({ label: e, countLabel: t, options: n, selected: i, onChange: a, sea
9647
9648
  className: "min-w-0 truncate",
9648
9649
  children: e
9649
9650
  }), /* @__PURE__ */ O(ln, {
9650
- className: r("size-icon shrink-0 opacity-50 transition-transform", d && "rotate-180"),
9651
+ className: r("size-icon shrink-0 opacity-50 transition-transform", f && "rotate-180"),
9651
9652
  "aria-hidden": !0
9652
9653
  })] })
9653
9654
  })
@@ -9660,8 +9661,8 @@ function vy({ label: e, countLabel: t, options: n, selected: i, onChange: a, sea
9660
9661
  onChange: a,
9661
9662
  searchPlaceholder: o ?? e,
9662
9663
  emptyMessage: s,
9663
- query: p,
9664
- onQueryChange: m
9664
+ query: m,
9665
+ onQueryChange: h
9665
9666
  })
9666
9667
  })]
9667
9668
  });
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "publishConfig": {
10
10
  "access": "public"
11
11
  },
12
- "version": "1.0.0",
12
+ "version": "1.0.1",
13
13
  "description": "Atlas shared UI component library for Artifact Studio apps",
14
14
  "type": "module",
15
15
  "sideEffects": [