@jsenv/navi 0.27.1 → 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.
- package/dist/jsenv_navi.js +14 -6
- package/dist/jsenv_navi.js.map +6 -5
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -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
|
-
|
|
34701
|
-
|
|
34702
|
-
|
|
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
|
-
|
|
34731
|
+
outline-style: solid;
|
|
34726
34732
|
|
|
34727
34733
|
/* Selected must win over keyboard-pointed */
|
|
34728
34734
|
&[data-selected] {
|
|
@@ -35536,6 +35542,8 @@ const PickerDefaultUI = () => {
|
|
|
35536
35542
|
children: value
|
|
35537
35543
|
});
|
|
35538
35544
|
};
|
|
35545
|
+
Picker.Placeholder = PickerPlaceholder;
|
|
35546
|
+
Picker.Value = PickerValue;
|
|
35539
35547
|
Picker.UI = PickerDefaultUI;
|
|
35540
35548
|
Picker.UI.Date = PickerDateUI;
|
|
35541
35549
|
Picker.UI.Time = PickerTimeUI;
|