@jsenv/navi 0.14.7 → 0.14.8
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 +37 -23
- package/dist/jsenv_navi.js.map +7 -9
- package/package.json +2 -2
package/dist/jsenv_navi.js
CHANGED
|
@@ -5863,9 +5863,9 @@ const Box = props => {
|
|
|
5863
5863
|
};
|
|
5864
5864
|
let boxPseudoNamedStyles = PSEUDO_NAMED_STYLES_DEFAULT;
|
|
5865
5865
|
const shouldForwardAllToChild = visualSelector && pseudoStateSelector;
|
|
5866
|
-
const addStyle = (value, name, stylesTarget, context) => {
|
|
5866
|
+
const addStyle = (value, name, styleContext, stylesTarget, context) => {
|
|
5867
5867
|
styleDeps.push(value); // impact box style -> add to deps
|
|
5868
|
-
const cssVar = styleCSSVars[name];
|
|
5868
|
+
const cssVar = styleContext.styleCSSVars[name];
|
|
5869
5869
|
const mergedValue = prepareStyleValue(stylesTarget[name], value, name, context);
|
|
5870
5870
|
if (cssVar) {
|
|
5871
5871
|
stylesTarget[cssVar] = mergedValue;
|
|
@@ -5874,20 +5874,20 @@ const Box = props => {
|
|
|
5874
5874
|
stylesTarget[name] = mergedValue;
|
|
5875
5875
|
return false;
|
|
5876
5876
|
};
|
|
5877
|
-
const addStyleMaybeForwarding = (value, name, stylesTarget, context, visualChildPropStrategy) => {
|
|
5877
|
+
const addStyleMaybeForwarding = (value, name, styleContext, stylesTarget, context, visualChildPropStrategy) => {
|
|
5878
5878
|
if (!visualChildPropStrategy) {
|
|
5879
|
-
addStyle(value, name, stylesTarget, context);
|
|
5879
|
+
addStyle(value, name, styleContext, stylesTarget, context);
|
|
5880
5880
|
return false;
|
|
5881
5881
|
}
|
|
5882
5882
|
const cssVar = styleCSSVars[name];
|
|
5883
5883
|
if (cssVar) {
|
|
5884
5884
|
// css var wins over visual child handling
|
|
5885
|
-
addStyle(value, name, stylesTarget, context);
|
|
5885
|
+
addStyle(value, name, styleContext, stylesTarget, context);
|
|
5886
5886
|
return false;
|
|
5887
5887
|
}
|
|
5888
5888
|
if (visualChildPropStrategy === "copy") {
|
|
5889
5889
|
// we stylyze ourself + forward prop to the child
|
|
5890
|
-
addStyle(value, name, stylesTarget, context);
|
|
5890
|
+
addStyle(value, name, styleContext, stylesTarget, context);
|
|
5891
5891
|
}
|
|
5892
5892
|
return true;
|
|
5893
5893
|
};
|
|
@@ -5895,7 +5895,7 @@ const Box = props => {
|
|
|
5895
5895
|
const context = styleOrigin === "base_style" ? "js" : "css";
|
|
5896
5896
|
const isCss = styleOrigin === "base_style" || styleOrigin === "style";
|
|
5897
5897
|
if (isCss) {
|
|
5898
|
-
addStyle(value, name, boxStylesTarget, context);
|
|
5898
|
+
addStyle(value, name, styleContext, boxStylesTarget, context);
|
|
5899
5899
|
return;
|
|
5900
5900
|
}
|
|
5901
5901
|
const isPseudoStyle = styleOrigin === "pseudo_style";
|
|
@@ -5921,7 +5921,7 @@ const Box = props => {
|
|
|
5921
5921
|
if (
|
|
5922
5922
|
// prop name === css style name
|
|
5923
5923
|
!getStyle) {
|
|
5924
|
-
const needForwarding = addStyleMaybeForwarding(value, name, boxStylesTarget, context, visualChildPropStrategy);
|
|
5924
|
+
const needForwarding = addStyleMaybeForwarding(value, name, styleContext, boxStylesTarget, context, visualChildPropStrategy);
|
|
5925
5925
|
if (needForwarding) {
|
|
5926
5926
|
if (isPseudoStyle) ; else {
|
|
5927
5927
|
childForwardedProps[name] = value;
|
|
@@ -5936,7 +5936,7 @@ const Box = props => {
|
|
|
5936
5936
|
let needForwarding = false;
|
|
5937
5937
|
for (const styleName of Object.keys(cssValues)) {
|
|
5938
5938
|
const cssValue = cssValues[styleName];
|
|
5939
|
-
needForwarding = addStyleMaybeForwarding(cssValue, styleName, boxStylesTarget, context, visualChildPropStrategy);
|
|
5939
|
+
needForwarding = addStyleMaybeForwarding(cssValue, styleName, styleContext, boxStylesTarget, context, visualChildPropStrategy);
|
|
5940
5940
|
}
|
|
5941
5941
|
if (needForwarding) {
|
|
5942
5942
|
if (isPseudoStyle) ; else {
|
|
@@ -16782,8 +16782,8 @@ const RouteLink = ({
|
|
|
16782
16782
|
};
|
|
16783
16783
|
|
|
16784
16784
|
installImportMetaCss(import.meta);Object.assign(PSEUDO_CLASSES, {
|
|
16785
|
-
":-navi-selected": {
|
|
16786
|
-
attribute: "data-selected"
|
|
16785
|
+
":-navi-tab-selected": {
|
|
16786
|
+
attribute: "data-tab-selected"
|
|
16787
16787
|
}
|
|
16788
16788
|
});
|
|
16789
16789
|
import.meta.css = /* css */`
|
|
@@ -16808,8 +16808,8 @@ import.meta.css = /* css */`
|
|
|
16808
16808
|
.navi_tablist {
|
|
16809
16809
|
display: flex;
|
|
16810
16810
|
line-height: 2em;
|
|
16811
|
-
overflow-x: auto;
|
|
16812
|
-
overflow-y: hidden;
|
|
16811
|
+
/* overflow-x: auto; */
|
|
16812
|
+
/* overflow-y: hidden; */
|
|
16813
16813
|
|
|
16814
16814
|
&[data-tab-indicator-position="start"] {
|
|
16815
16815
|
.navi_tab {
|
|
@@ -16847,7 +16847,18 @@ import.meta.css = /* css */`
|
|
|
16847
16847
|
}
|
|
16848
16848
|
|
|
16849
16849
|
.navi_tab {
|
|
16850
|
-
--x-tab-background: var(
|
|
16850
|
+
--x-tab-background: var(
|
|
16851
|
+
--tab-background-color,
|
|
16852
|
+
var(--tab-background)
|
|
16853
|
+
);
|
|
16854
|
+
--x-tab-background-hover: var(
|
|
16855
|
+
--tab-background-color-hover,
|
|
16856
|
+
var(--tab-background-color, var(--tab-background-hover))
|
|
16857
|
+
);
|
|
16858
|
+
--x-tab-background-selected: var(
|
|
16859
|
+
--tab-background-color-selected,
|
|
16860
|
+
var(--tab-background-selected)
|
|
16861
|
+
);
|
|
16851
16862
|
--x-tab-color: var(--tab-color);
|
|
16852
16863
|
|
|
16853
16864
|
display: flex;
|
|
@@ -16898,12 +16909,12 @@ import.meta.css = /* css */`
|
|
|
16898
16909
|
}
|
|
16899
16910
|
/* Hover */
|
|
16900
16911
|
&:hover {
|
|
16901
|
-
--x-tab-background: var(--tab-background-hover);
|
|
16912
|
+
--x-tab-background: var(--x-tab-background-hover);
|
|
16902
16913
|
--x-tab-color: var(--tab-color-hover);
|
|
16903
16914
|
}
|
|
16904
16915
|
/* Selected */
|
|
16905
|
-
&[data-selected] {
|
|
16906
|
-
--x-tab-background: var(--tab-background-selected);
|
|
16916
|
+
&[data-tab-selected] {
|
|
16917
|
+
--x-tab-background: var(--x-tab-background-selected);
|
|
16907
16918
|
--x-tab-color: var(--tab-color-selected);
|
|
16908
16919
|
font-weight: bold;
|
|
16909
16920
|
|
|
@@ -16917,8 +16928,8 @@ import.meta.css = /* css */`
|
|
|
16917
16928
|
|
|
16918
16929
|
/* Vertical layout */
|
|
16919
16930
|
&[data-vertical] {
|
|
16920
|
-
overflow-x: hidden;
|
|
16921
|
-
overflow-y: auto;
|
|
16931
|
+
/* overflow-x: hidden; */
|
|
16932
|
+
/* overflow-y: auto; */
|
|
16922
16933
|
|
|
16923
16934
|
> ul {
|
|
16924
16935
|
flex-direction: column;
|
|
@@ -17059,17 +17070,20 @@ const TabList = ({
|
|
|
17059
17070
|
};
|
|
17060
17071
|
const TAB_STYLE_CSS_VARS = {
|
|
17061
17072
|
"background": "--tab-background",
|
|
17073
|
+
"backgroundColor": "--tab-background-color",
|
|
17062
17074
|
"color": "--tab-color",
|
|
17063
17075
|
":hover": {
|
|
17064
17076
|
background: "--tab-background-hover",
|
|
17077
|
+
backgroundColor: "--tab-background-color-hover",
|
|
17065
17078
|
color: "--tab-color-hover"
|
|
17066
17079
|
},
|
|
17067
|
-
":-navi-selected": {
|
|
17068
|
-
background: "--tab-
|
|
17080
|
+
":-navi-tab-selected": {
|
|
17081
|
+
background: "--tab-background-selected",
|
|
17082
|
+
backgroundColor: "--tab-background-color-selected",
|
|
17069
17083
|
color: "--tab-color-selected"
|
|
17070
17084
|
}
|
|
17071
17085
|
};
|
|
17072
|
-
const TAB_PSEUDO_CLASSES = [":hover", ":-navi-selected"];
|
|
17086
|
+
const TAB_PSEUDO_CLASSES = [":hover", ":-navi-tab-selected"];
|
|
17073
17087
|
const TAB_PSEUDO_ELEMENTS = ["::-navi-indicator"];
|
|
17074
17088
|
const Tab = props => {
|
|
17075
17089
|
if (props.route) {
|
|
@@ -17140,7 +17154,7 @@ const TabBasic = ({
|
|
|
17140
17154
|
pseudoClasses: TAB_PSEUDO_CLASSES,
|
|
17141
17155
|
pseudoElements: TAB_PSEUDO_ELEMENTS,
|
|
17142
17156
|
basePseudoState: {
|
|
17143
|
-
":-navi-selected": selected
|
|
17157
|
+
":-navi-tab-selected": selected
|
|
17144
17158
|
},
|
|
17145
17159
|
selfAlignX: tabListAlignX,
|
|
17146
17160
|
"data-align-x": tabListAlignX,
|