@jsenv/navi 0.27.2 → 0.27.3

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.
@@ -32096,6 +32096,9 @@ const PickerCustom = props => {
32096
32096
  // (like enter that would try to request action of closest form otherwise for instance)
32097
32097
  if (e.key === "Enter") {
32098
32098
  e.stopPropagation();
32099
+ // preventDefault prevents the browser from synthesising a click on the
32100
+ // picker button when focus moves to it synchronously during enterEffect
32101
+ e.preventDefault();
32099
32102
  }
32100
32103
  }
32101
32104
  });
@@ -32132,6 +32135,7 @@ const PickerContentInsidePopover = props => {
32132
32135
  popoverMode = "nearby",
32133
32136
  popoverSpacing = popoverMode === "nearby" ? 5 : 0,
32134
32137
  viewportSpacing = 10,
32138
+ closeOnFocusOut = false,
32135
32139
  ...rest
32136
32140
  } = props;
32137
32141
  return jsx(Next, {
@@ -32139,6 +32143,9 @@ const PickerContentInsidePopover = props => {
32139
32143
  "navi-popover-mode": popoverMode,
32140
32144
  ...rest,
32141
32145
  onFocusOut: e => {
32146
+ if (!closeOnFocusOut) {
32147
+ return;
32148
+ }
32142
32149
  // Close when focus leaves the select entirely (not just moving between internal elements).
32143
32150
  // relatedTarget is the element receiving focus; if it's inside the select or the popover, keep open.
32144
32151
  const relatedTarget = e.relatedTarget;
@@ -34642,6 +34649,7 @@ const css$l = /* css */`
34642
34649
  --list-outline-color: var(--navi-focus-outline-color);
34643
34650
  --list-item-outline-color: var(--navi-focus-outline-color);
34644
34651
  --list-item-outline-width: 2px;
34652
+ --list-item-outline-offset: calc(-1 * var(--list-item-outline-width));
34645
34653
  /* Hover (mouse) */
34646
34654
  --list-item-color-hover: var(--list-item-color);
34647
34655
  --list-item-background-color-hover: light-dark(#f5f5f5, #2a2a2a);
@@ -34694,12 +34702,10 @@ const css$l = /* css */`
34694
34702
  }
34695
34703
 
34696
34704
  .navi_list_item {
34697
- --x-list-item-border-color: var(--x-list-item-background-color);
34698
-
34699
34705
  position: relative;
34700
- border-width: var(--list-item-outline-width);
34701
- border-style: solid;
34702
- border-color: var(--x-list-item-border-color);
34706
+ outline-width: var(--list-item-outline-width);
34707
+ outline-color: var(--list-item-outline-color);
34708
+ outline-offset: var(--list-item-outline-offset);
34703
34709
 
34704
34710
  &[data-interactive] {
34705
34711
  cursor: pointer;
@@ -34722,7 +34728,7 @@ const css$l = /* css */`
34722
34728
  --x-list-item-background-color: var(
34723
34729
  --list-item-background-color-keyboard-pointed
34724
34730
  );
34725
- --x-list-item-border-color: var(--list-item-outline-color);
34731
+ outline-style: solid;
34726
34732
 
34727
34733
  /* Selected must win over keyboard-pointed */
34728
34734
  &[data-selected] {