@jsenv/navi 0.27.7 → 0.27.9
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
CHANGED
|
@@ -6506,13 +6506,13 @@ const DIMENSION_PROPS = {
|
|
|
6506
6506
|
if (!value || value === "0") {
|
|
6507
6507
|
return { flexShrink: 0 };
|
|
6508
6508
|
}
|
|
6509
|
-
return { flexShrink: 1 };
|
|
6509
|
+
return { flexShrink: 1, minWidth: 0 };
|
|
6510
6510
|
},
|
|
6511
6511
|
shrinkY: (value) => {
|
|
6512
6512
|
if (!value || value === "0") {
|
|
6513
6513
|
return { flexShrink: 0 };
|
|
6514
6514
|
}
|
|
6515
|
-
return { flexShrink: 1 };
|
|
6515
|
+
return { flexShrink: 1, minHeight: 0 };
|
|
6516
6516
|
},
|
|
6517
6517
|
|
|
6518
6518
|
scaleX: (value) => {
|
|
@@ -6725,7 +6725,10 @@ const VISUAL_PROPS = {
|
|
|
6725
6725
|
overflow: PASS_THROUGH,
|
|
6726
6726
|
overflowX: PASS_THROUGH,
|
|
6727
6727
|
overflowY: PASS_THROUGH,
|
|
6728
|
-
overflowEllipsis: () => {
|
|
6728
|
+
overflowEllipsis: (value) => {
|
|
6729
|
+
if (value === undefined || value === false) {
|
|
6730
|
+
return null;
|
|
6731
|
+
}
|
|
6729
6732
|
return {
|
|
6730
6733
|
overflow: "hidden",
|
|
6731
6734
|
textOverflow: "ellipsis",
|
|
@@ -12445,6 +12448,27 @@ const useUIStateController = (
|
|
|
12445
12448
|
value: newUIState,
|
|
12446
12449
|
});
|
|
12447
12450
|
}
|
|
12451
|
+
// When this controller is a real input that has a visible proxy
|
|
12452
|
+
// (linked via `navi-control-proxy-for`), mirror the new state to the
|
|
12453
|
+
// proxy DOM synchronously. Otherwise the proxy would only catch up
|
|
12454
|
+
// later through a React re-render — visible as e.g. two radios
|
|
12455
|
+
// appearing checked at once between the real input update and the
|
|
12456
|
+
// next render (radio_sibling_uncheck case).
|
|
12457
|
+
if (el && !controlProxyFor) {
|
|
12458
|
+
const proxyEl = findControlProxy(el);
|
|
12459
|
+
if (proxyEl) {
|
|
12460
|
+
const propValue = uiStateController.getPropFromState(newUIState);
|
|
12461
|
+
proxyEl[statePropName] = propValue;
|
|
12462
|
+
// Also notify the proxy's controller so it can stay in sync with
|
|
12463
|
+
// state changes that originate from the real input (e.g. radio_sibling_uncheck).
|
|
12464
|
+
// Without this the proxy only learns about deselection later via state_prop
|
|
12465
|
+
// (Preact re-render), too late for lastActionValueRef to be updated.
|
|
12466
|
+
dispatchInternalCustomEvent(proxyEl, "navi_ui_state_change", {
|
|
12467
|
+
event: e,
|
|
12468
|
+
value: newUIState,
|
|
12469
|
+
});
|
|
12470
|
+
}
|
|
12471
|
+
}
|
|
12448
12472
|
const internalBehavior = e.detail?.internalBehavior;
|
|
12449
12473
|
if (internalBehavior) {
|
|
12450
12474
|
return true;
|
|
@@ -23925,12 +23949,12 @@ const TextOverflow = ({
|
|
|
23925
23949
|
flex: true,
|
|
23926
23950
|
block: true,
|
|
23927
23951
|
as: "div",
|
|
23928
|
-
|
|
23929
|
-
pre: !noWrap
|
|
23952
|
+
pre: noWrap === undefined ? true : undefined
|
|
23930
23953
|
// For paragraph we prefer to keep lines and only hide unbreakable long sections
|
|
23931
23954
|
,
|
|
23932
23955
|
|
|
23933
|
-
preLine: rest.as === "p",
|
|
23956
|
+
preLine: rest.as === "p" ? true : undefined,
|
|
23957
|
+
noWrap: noWrap,
|
|
23934
23958
|
...rest,
|
|
23935
23959
|
overflowEllipsis: undefined,
|
|
23936
23960
|
"data-text-overflow": "",
|
|
@@ -33709,7 +33733,8 @@ const css$m = /* css */`
|
|
|
33709
33733
|
);
|
|
33710
33734
|
|
|
33711
33735
|
display: flex;
|
|
33712
|
-
width:
|
|
33736
|
+
min-width: 0;
|
|
33737
|
+
/* fit-content by default, but never wider than the parent */
|
|
33713
33738
|
max-width: 100%;
|
|
33714
33739
|
flex-direction: column;
|
|
33715
33740
|
background-color: var(--x-list-background-color);
|
|
@@ -33760,8 +33785,6 @@ const css$m = /* css */`
|
|
|
33760
33785
|
.navi_list {
|
|
33761
33786
|
display: flex;
|
|
33762
33787
|
box-sizing: border-box;
|
|
33763
|
-
width: max-content;
|
|
33764
|
-
min-width: 100%;
|
|
33765
33788
|
margin: 0;
|
|
33766
33789
|
padding: 0;
|
|
33767
33790
|
flex-direction: column;
|
|
@@ -33782,7 +33805,8 @@ const css$m = /* css */`
|
|
|
33782
33805
|
--x-list-item-font-weight: var(--list-item-font-weight);
|
|
33783
33806
|
|
|
33784
33807
|
box-sizing: border-box;
|
|
33785
|
-
min-width:
|
|
33808
|
+
min-width: 0;
|
|
33809
|
+
max-width: 100%;
|
|
33786
33810
|
padding: var(--list-item-padding);
|
|
33787
33811
|
color: var(--x-list-item-color);
|
|
33788
33812
|
font-weight: var(--x-list-item-font-weight);
|
|
@@ -33874,9 +33898,7 @@ const css$m = /* css */`
|
|
|
33874
33898
|
|
|
33875
33899
|
/* Hide groups that have no rendered items. */
|
|
33876
33900
|
.navi_list_item_group {
|
|
33877
|
-
|
|
33878
|
-
display: none;
|
|
33879
|
-
}
|
|
33901
|
+
min-width: 100%;
|
|
33880
33902
|
|
|
33881
33903
|
.navi_list_item_group_label {
|
|
33882
33904
|
position: sticky;
|
|
@@ -33896,8 +33918,12 @@ const css$m = /* css */`
|
|
|
33896
33918
|
}
|
|
33897
33919
|
}
|
|
33898
33920
|
.navi_list_item_group_list {
|
|
33921
|
+
display: flex;
|
|
33922
|
+
width: max-content;
|
|
33923
|
+
min-width: 100%;
|
|
33899
33924
|
margin: 0;
|
|
33900
33925
|
padding: 0;
|
|
33926
|
+
flex-direction: column;
|
|
33901
33927
|
list-style: none;
|
|
33902
33928
|
|
|
33903
33929
|
/* Items inside a group must account for the sticky group label height
|
|
@@ -33908,6 +33934,10 @@ const css$m = /* css */`
|
|
|
33908
33934
|
);
|
|
33909
33935
|
}
|
|
33910
33936
|
}
|
|
33937
|
+
|
|
33938
|
+
&[data-hidden-while-empty]:not(:has([navi-list-item-real])) {
|
|
33939
|
+
display: none;
|
|
33940
|
+
}
|
|
33911
33941
|
}
|
|
33912
33942
|
`;
|
|
33913
33943
|
|
|
@@ -34561,6 +34591,9 @@ const NoMatchFallback = ({
|
|
|
34561
34591
|
if (noMatchFallback === undefined) {
|
|
34562
34592
|
noMatchFallback = allHidden ? naviI18n("list.no_match") : naviI18n("list.no_match_rest_shown");
|
|
34563
34593
|
}
|
|
34594
|
+
if (!showMatchFallback) {
|
|
34595
|
+
return null;
|
|
34596
|
+
}
|
|
34564
34597
|
return jsx(ListItem, {
|
|
34565
34598
|
role: "presentation",
|
|
34566
34599
|
className: "navi_list_item navi_list_no_match_fallback",
|
|
@@ -34578,6 +34611,9 @@ const Fallback = ({
|
|
|
34578
34611
|
if (fallback === undefined) {
|
|
34579
34612
|
fallback = naviI18n("list.empty");
|
|
34580
34613
|
}
|
|
34614
|
+
if (!showFallback) {
|
|
34615
|
+
return null;
|
|
34616
|
+
}
|
|
34581
34617
|
return jsx(ListItem, {
|
|
34582
34618
|
role: "presentation",
|
|
34583
34619
|
className: "navi_list_item navi_list_fallback",
|
|
@@ -34593,6 +34629,9 @@ const TopFiller = ({
|
|
|
34593
34629
|
const virtualItemHeight = virtualItemHeightSignal.value;
|
|
34594
34630
|
const numberOfItemsAbove = renderWindowStart;
|
|
34595
34631
|
const heightToFillAbove = numberOfItemsAbove * virtualItemHeight;
|
|
34632
|
+
if (!heightToFillAbove) {
|
|
34633
|
+
return null;
|
|
34634
|
+
}
|
|
34596
34635
|
return jsx("li", {
|
|
34597
34636
|
className: "navi_list_virtual_filler"
|
|
34598
34637
|
// eslint-disable-next-line react/no-unknown-property
|
|
@@ -34614,6 +34653,9 @@ const BottomFiller = ({
|
|
|
34614
34653
|
const virtualItemHeight = virtualItemHeightSignal.value;
|
|
34615
34654
|
const numberOfItemsBelow = Math.max(visibleItemCount - renderWindowEnd, 0);
|
|
34616
34655
|
const heightToFillBelow = numberOfItemsBelow * virtualItemHeight;
|
|
34656
|
+
if (!heightToFillBelow) {
|
|
34657
|
+
return null;
|
|
34658
|
+
}
|
|
34617
34659
|
return jsx("li", {
|
|
34618
34660
|
className: "navi_list_virtual_filler"
|
|
34619
34661
|
// eslint-disable-next-line react/no-unknown-property
|
|
@@ -34962,6 +35004,10 @@ const css$l = /* css */`
|
|
|
34962
35004
|
outline-color: var(--list-item-outline-color);
|
|
34963
35005
|
outline-offset: var(--list-item-outline-offset);
|
|
34964
35006
|
|
|
35007
|
+
&[navi-selectable] {
|
|
35008
|
+
user-select: none;
|
|
35009
|
+
}
|
|
35010
|
+
|
|
34965
35011
|
&[data-interactive] {
|
|
34966
35012
|
cursor: pointer;
|
|
34967
35013
|
user-select: none;
|
|
@@ -35356,6 +35402,7 @@ const Selectable = props => {
|
|
|
35356
35402
|
},
|
|
35357
35403
|
"aria-selected": checked,
|
|
35358
35404
|
selected: checked,
|
|
35405
|
+
"navi-selectable": "",
|
|
35359
35406
|
children: jsxs(Field, {
|
|
35360
35407
|
as: selectableArea === "manual" ? "div" : undefined,
|
|
35361
35408
|
padding: "m",
|
|
@@ -35655,7 +35702,6 @@ installImportMetaCssBuild(import.meta);const css$k = /* css */`
|
|
|
35655
35702
|
font-size: var(--picker-font-size);
|
|
35656
35703
|
text-align: inherit;
|
|
35657
35704
|
text-overflow: ellipsis;
|
|
35658
|
-
white-space: nowrap;
|
|
35659
35705
|
background-color: var(--x-picker-background-color);
|
|
35660
35706
|
border-width: var(--picker-border-width);
|
|
35661
35707
|
border-style: solid;
|