@jsenv/navi 0.29.356 → 0.29.357

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.
@@ -6730,7 +6730,7 @@ const css$13 = /* css */ `
6730
6730
  * for free (`status`/`alert`); reach for this when the role is not enough to tell two
6731
6731
  * callouts apart.
6732
6732
  * @param {Function} [options.onClose] - Callback when callout is closed
6733
- * @param {boolean} [options.closeOnClickOutside] - Whether to close on outside clicks (defaults to true for "info" status)
6733
+ * @param {boolean} [options.closeByPressOutside] - Whether a press outside closes the callout (defaults to true for "info" status)
6734
6734
  * @param {boolean|number} [options.closeByScroll=false] - Dismiss the callout once the page has
6735
6735
  * scrolled under it. `true` uses a short distance, a number sets it in pixels
6736
6736
  * (`closeByScroll: 100` waits for 100px). Measured from where the scroll containers stood when
@@ -6798,15 +6798,15 @@ const openCallout = (
6798
6798
  status = "",
6799
6799
  testId,
6800
6800
  onClose,
6801
- closeOnClickOutside = status === "info",
6802
- closeOnFocusLeave = closeOnClickOutside,
6801
+ closeByPressOutside = status === "info",
6802
+ closeOnFocusLeave = closeByPressOutside,
6803
6803
  closeByScroll = false,
6804
+ closeButton = true,
6804
6805
  openingEvent,
6805
6806
  reopen = "toggle",
6806
6807
  showErrorStack,
6807
6808
  skipFocus = false,
6808
6809
  icon = true,
6809
- closeButton = true,
6810
6810
  debug = () => {},
6811
6811
  } = {},
6812
6812
  ) => {
@@ -6893,7 +6893,7 @@ const openCallout = (
6893
6893
  const clickOrSpaceOutside =
6894
6894
  reason === "click_outside" || reason === "space_outside";
6895
6895
  if (clickOrSpaceOutside) {
6896
- if (!closeOnClickOutside) {
6896
+ if (!closeByPressOutside) {
6897
6897
  return;
6898
6898
  }
6899
6899
  if (callout.status === "error") {
@@ -7024,9 +7024,9 @@ const openCallout = (
7024
7024
  updateStatus(options.status);
7025
7025
  }
7026
7026
 
7027
- if (Object.hasOwn(options, "closeOnClickOutside")) {
7028
- closeOnClickOutside = options.closeOnClickOutside;
7029
- if (closeOnClickOutside) {
7027
+ if (Object.hasOwn(options, "closeByPressOutside")) {
7028
+ closeByPressOutside = options.closeByPressOutside;
7029
+ if (closeByPressOutside) {
7030
7030
  closeOnFocusLeave = true;
7031
7031
  }
7032
7032
  }
@@ -7230,7 +7230,7 @@ const openCallout = (
7230
7230
  const openingDownEvent =
7231
7231
  findEvent(openingEvent, "mousedown") ||
7232
7232
  findEvent(openingEvent, "pointerdown");
7233
- if (closeOnClickOutside && openingEvent && openingDownEvent) {
7233
+ if (closeByPressOutside && openingEvent && openingDownEvent) {
7234
7234
  const upType =
7235
7235
  openingDownEvent.type === "pointerdown" ? "pointerup" : "mouseup";
7236
7236
  debug(
@@ -8384,7 +8384,7 @@ const createCalloutManager = (
8384
8384
  testId: tokenData.testId,
8385
8385
  icon: tokenData.icon,
8386
8386
  closeButton: tokenData.closeButton,
8387
- closeOnClickOutside: tokenData.status !== "error",
8387
+ closeByPressOutside: tokenData.status !== "error",
8388
8388
  closeByScroll: tokenData.closeByScroll,
8389
8389
  anchorElement,
8390
8390
  openingEvent: event,
@@ -12140,7 +12140,7 @@ defineInteractionDetector({
12140
12140
  // button to press, and what closes it is the hand going quiet.
12141
12141
  skipFocus: true,
12142
12142
  closeButton: false,
12143
- closeOnClickOutside: false,
12143
+ closeByPressOutside: false,
12144
12144
  closeOnFocusLeave: false,
12145
12145
  onClose: () => {
12146
12146
  hint = null;