@jsenv/navi 0.11.7 → 0.11.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 +367 -104
- package/dist/jsenv_navi.js.map +31 -14
- package/package.json +2 -2
package/dist/jsenv_navi.js
CHANGED
|
@@ -8107,6 +8107,62 @@ const updateDocumentUrl = (value) => {
|
|
|
8107
8107
|
documentUrlSignal.value = value;
|
|
8108
8108
|
};
|
|
8109
8109
|
|
|
8110
|
+
const getLinkTargetInfo = (href) => {
|
|
8111
|
+
href = String(href);
|
|
8112
|
+
|
|
8113
|
+
if (!href || href.trim() === "") {
|
|
8114
|
+
return {
|
|
8115
|
+
targetIsEmpty: true,
|
|
8116
|
+
targetIsCurrent: false,
|
|
8117
|
+
targetIsAnchor: false,
|
|
8118
|
+
targetIsSameOrigin: true,
|
|
8119
|
+
targetIsSameSite: true,
|
|
8120
|
+
};
|
|
8121
|
+
}
|
|
8122
|
+
|
|
8123
|
+
const currentUrl = new URL(window.location.href);
|
|
8124
|
+
const targetUrl = new URL(href, window.location.href);
|
|
8125
|
+
|
|
8126
|
+
let targetIsCurrent = false;
|
|
8127
|
+
{
|
|
8128
|
+
targetIsCurrent = currentUrl.href === targetUrl.href;
|
|
8129
|
+
}
|
|
8130
|
+
let targetIsAnchor = false;
|
|
8131
|
+
{
|
|
8132
|
+
if (
|
|
8133
|
+
currentUrl.pathname === targetUrl.pathname &&
|
|
8134
|
+
currentUrl.search === targetUrl.search &&
|
|
8135
|
+
targetUrl.hash !== ""
|
|
8136
|
+
) {
|
|
8137
|
+
targetIsAnchor = true;
|
|
8138
|
+
}
|
|
8139
|
+
}
|
|
8140
|
+
let targetIsSameOrigin = false;
|
|
8141
|
+
{
|
|
8142
|
+
const currentOrigin = currentUrl.origin;
|
|
8143
|
+
const targetOrigin = targetUrl.origin;
|
|
8144
|
+
targetIsSameOrigin = currentOrigin === targetOrigin;
|
|
8145
|
+
}
|
|
8146
|
+
let targetIsSameSite = false;
|
|
8147
|
+
{
|
|
8148
|
+
const baseDomain = (hostname) => {
|
|
8149
|
+
const parts = hostname.split(".").slice(-2);
|
|
8150
|
+
return parts.join(".");
|
|
8151
|
+
};
|
|
8152
|
+
const currentDomain = baseDomain(currentUrl.hostname);
|
|
8153
|
+
const targetDomain = baseDomain(targetUrl.hostname);
|
|
8154
|
+
targetIsSameSite = currentDomain === targetDomain;
|
|
8155
|
+
}
|
|
8156
|
+
|
|
8157
|
+
return {
|
|
8158
|
+
targetIsEmpty: false,
|
|
8159
|
+
targetIsCurrent,
|
|
8160
|
+
targetIsAnchor,
|
|
8161
|
+
targetIsSameOrigin,
|
|
8162
|
+
targetIsSameSite,
|
|
8163
|
+
};
|
|
8164
|
+
};
|
|
8165
|
+
|
|
8110
8166
|
const setupBrowserIntegrationViaHistory = ({
|
|
8111
8167
|
applyActions,
|
|
8112
8168
|
applyRouting,
|
|
@@ -8226,20 +8282,18 @@ const setupBrowserIntegrationViaHistory = ({
|
|
|
8226
8282
|
if (!linkElement) {
|
|
8227
8283
|
return;
|
|
8228
8284
|
}
|
|
8229
|
-
const href = linkElement.href;
|
|
8230
|
-
if (!href || !href.startsWith(window.location.origin)) {
|
|
8231
|
-
return;
|
|
8232
|
-
}
|
|
8233
8285
|
if (linkElement.hasAttribute("data-readonly")) {
|
|
8234
8286
|
return;
|
|
8235
8287
|
}
|
|
8236
|
-
|
|
8237
|
-
const
|
|
8238
|
-
|
|
8288
|
+
const href = linkElement.href;
|
|
8289
|
+
const { targetIsEmpty, targetIsSameOrigin, targetIsAnchor } =
|
|
8290
|
+
getLinkTargetInfo(href);
|
|
8239
8291
|
if (
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8292
|
+
targetIsEmpty ||
|
|
8293
|
+
// Let link to other origins be handled by the browser
|
|
8294
|
+
!targetIsSameOrigin ||
|
|
8295
|
+
// Ignore anchor navigation (same page, different hash)
|
|
8296
|
+
targetIsAnchor
|
|
8243
8297
|
) {
|
|
8244
8298
|
return;
|
|
8245
8299
|
}
|
|
@@ -9748,14 +9802,24 @@ const FlexDirectionContext = createContext();
|
|
|
9748
9802
|
*/
|
|
9749
9803
|
const withPropsStyle = (
|
|
9750
9804
|
props,
|
|
9751
|
-
{
|
|
9805
|
+
{
|
|
9806
|
+
base,
|
|
9807
|
+
layout,
|
|
9808
|
+
spacing = layout,
|
|
9809
|
+
align = layout,
|
|
9810
|
+
size = layout,
|
|
9811
|
+
typo,
|
|
9812
|
+
visual = true,
|
|
9813
|
+
},
|
|
9752
9814
|
...remainingConfig
|
|
9753
9815
|
) => {
|
|
9754
9816
|
const flexDirection = useContext(FlexDirectionContext);
|
|
9755
9817
|
const {
|
|
9756
9818
|
// style from props
|
|
9757
9819
|
style,
|
|
9820
|
+
|
|
9758
9821
|
// layout props
|
|
9822
|
+
// layout/spacing
|
|
9759
9823
|
margin,
|
|
9760
9824
|
marginX,
|
|
9761
9825
|
marginY,
|
|
@@ -9770,11 +9834,16 @@ const withPropsStyle = (
|
|
|
9770
9834
|
paddingRight,
|
|
9771
9835
|
paddingTop,
|
|
9772
9836
|
paddingBottom,
|
|
9837
|
+
// layout/alignment
|
|
9773
9838
|
alignX,
|
|
9774
9839
|
alignY,
|
|
9840
|
+
// layout/size
|
|
9775
9841
|
expand,
|
|
9776
9842
|
expandX = expand,
|
|
9777
9843
|
expandY = expand,
|
|
9844
|
+
width,
|
|
9845
|
+
height,
|
|
9846
|
+
|
|
9778
9847
|
// typo props
|
|
9779
9848
|
textSize,
|
|
9780
9849
|
textBold,
|
|
@@ -9784,18 +9853,44 @@ const withPropsStyle = (
|
|
|
9784
9853
|
textUnderlineStyle,
|
|
9785
9854
|
textUnderlineColor,
|
|
9786
9855
|
textColor,
|
|
9856
|
+
textShadow,
|
|
9857
|
+
|
|
9858
|
+
// visual props
|
|
9859
|
+
boxShadow,
|
|
9860
|
+
background,
|
|
9861
|
+
backgroundColor,
|
|
9862
|
+
backgroundImage,
|
|
9863
|
+
border,
|
|
9864
|
+
borderWidth,
|
|
9865
|
+
borderRadius,
|
|
9866
|
+
borderColor,
|
|
9867
|
+
borderStyle,
|
|
9868
|
+
borderTop,
|
|
9869
|
+
borderLeft,
|
|
9870
|
+
borderRight,
|
|
9871
|
+
borderBottom,
|
|
9872
|
+
opacity,
|
|
9873
|
+
filter,
|
|
9874
|
+
|
|
9787
9875
|
// props not related to styling
|
|
9788
9876
|
...remainingProps
|
|
9789
9877
|
} = props;
|
|
9790
9878
|
|
|
9791
9879
|
const hasRemainingConfig = remainingConfig.length > 0;
|
|
9880
|
+
let propStyles;
|
|
9792
9881
|
let marginStyles;
|
|
9793
9882
|
let paddingStyles;
|
|
9794
9883
|
let alignmentStyles;
|
|
9795
|
-
let
|
|
9884
|
+
let sizeStyles;
|
|
9796
9885
|
let typoStyles;
|
|
9797
|
-
let
|
|
9886
|
+
let visualStyles;
|
|
9798
9887
|
|
|
9888
|
+
props_styles: {
|
|
9889
|
+
if (!style && !hasRemainingConfig) {
|
|
9890
|
+
break props_styles;
|
|
9891
|
+
}
|
|
9892
|
+
propStyles = style ? normalizeStyles(style, "css") : {};
|
|
9893
|
+
}
|
|
9799
9894
|
spacing_styles: {
|
|
9800
9895
|
if (!spacing && !hasRemainingConfig) {
|
|
9801
9896
|
break spacing_styles;
|
|
@@ -9803,54 +9898,57 @@ const withPropsStyle = (
|
|
|
9803
9898
|
{
|
|
9804
9899
|
marginStyles = {};
|
|
9805
9900
|
if (margin !== undefined) {
|
|
9806
|
-
marginStyles.margin =
|
|
9901
|
+
marginStyles.margin = sizeSpacingScale[margin] || margin;
|
|
9807
9902
|
}
|
|
9808
9903
|
if (marginLeft !== undefined) {
|
|
9809
|
-
marginStyles.marginLeft =
|
|
9904
|
+
marginStyles.marginLeft = sizeSpacingScale[marginLeft] || marginLeft;
|
|
9810
9905
|
} else if (marginX !== undefined) {
|
|
9811
|
-
marginStyles.marginLeft =
|
|
9906
|
+
marginStyles.marginLeft = sizeSpacingScale[marginX] || marginX;
|
|
9812
9907
|
}
|
|
9813
9908
|
if (marginRight !== undefined) {
|
|
9814
|
-
marginStyles.marginRight =
|
|
9909
|
+
marginStyles.marginRight = sizeSpacingScale[marginRight] || marginRight;
|
|
9815
9910
|
} else if (marginX !== undefined) {
|
|
9816
|
-
marginStyles.marginRight =
|
|
9911
|
+
marginStyles.marginRight = sizeSpacingScale[marginX] || marginX;
|
|
9817
9912
|
}
|
|
9818
9913
|
if (marginTop !== undefined) {
|
|
9819
|
-
marginStyles.marginTop =
|
|
9914
|
+
marginStyles.marginTop = sizeSpacingScale[marginTop] || marginTop;
|
|
9820
9915
|
} else if (marginY !== undefined) {
|
|
9821
|
-
marginStyles.marginTop =
|
|
9916
|
+
marginStyles.marginTop = sizeSpacingScale[marginY] || marginY;
|
|
9822
9917
|
}
|
|
9823
9918
|
if (marginBottom !== undefined) {
|
|
9824
|
-
marginStyles.marginBottom =
|
|
9919
|
+
marginStyles.marginBottom =
|
|
9920
|
+
sizeSpacingScale[marginBottom] || marginBottom;
|
|
9825
9921
|
} else if (marginY !== undefined) {
|
|
9826
|
-
marginStyles.marginBottom =
|
|
9922
|
+
marginStyles.marginBottom = sizeSpacingScale[marginY] || marginY;
|
|
9827
9923
|
}
|
|
9828
9924
|
}
|
|
9829
9925
|
{
|
|
9830
9926
|
paddingStyles = {};
|
|
9831
9927
|
if (padding !== undefined) {
|
|
9832
|
-
paddingStyles.padding =
|
|
9928
|
+
paddingStyles.padding = sizeSpacingScale[padding] || padding;
|
|
9833
9929
|
}
|
|
9834
9930
|
if (paddingLeft !== undefined) {
|
|
9835
|
-
paddingStyles.paddingLeft =
|
|
9931
|
+
paddingStyles.paddingLeft =
|
|
9932
|
+
sizeSpacingScale[paddingLeft] || paddingLeft;
|
|
9836
9933
|
} else if (paddingX !== undefined) {
|
|
9837
|
-
paddingStyles.paddingLeft =
|
|
9934
|
+
paddingStyles.paddingLeft = sizeSpacingScale[paddingX] || paddingX;
|
|
9838
9935
|
}
|
|
9839
9936
|
if (paddingRight !== undefined) {
|
|
9840
|
-
paddingStyles.paddingRight =
|
|
9937
|
+
paddingStyles.paddingRight =
|
|
9938
|
+
sizeSpacingScale[paddingRight] || paddingRight;
|
|
9841
9939
|
} else if (paddingX !== undefined) {
|
|
9842
|
-
paddingStyles.paddingRight =
|
|
9940
|
+
paddingStyles.paddingRight = sizeSpacingScale[paddingX] || paddingX;
|
|
9843
9941
|
}
|
|
9844
9942
|
if (paddingTop !== undefined) {
|
|
9845
|
-
paddingStyles.paddingTop =
|
|
9943
|
+
paddingStyles.paddingTop = sizeSpacingScale[paddingTop] || paddingTop;
|
|
9846
9944
|
} else if (paddingY !== undefined) {
|
|
9847
|
-
paddingStyles.paddingTop =
|
|
9945
|
+
paddingStyles.paddingTop = sizeSpacingScale[paddingY] || paddingY;
|
|
9848
9946
|
}
|
|
9849
9947
|
if (paddingBottom !== undefined) {
|
|
9850
9948
|
paddingStyles.paddingBottom =
|
|
9851
|
-
|
|
9949
|
+
sizeSpacingScale[paddingBottom] || paddingBottom;
|
|
9852
9950
|
} else if (paddingY !== undefined) {
|
|
9853
|
-
paddingStyles.paddingBottom =
|
|
9951
|
+
paddingStyles.paddingBottom = sizeSpacingScale[paddingY] || paddingY;
|
|
9854
9952
|
}
|
|
9855
9953
|
}
|
|
9856
9954
|
}
|
|
@@ -9921,28 +10019,32 @@ const withPropsStyle = (
|
|
|
9921
10019
|
}
|
|
9922
10020
|
}
|
|
9923
10021
|
}
|
|
9924
|
-
|
|
9925
|
-
if (!
|
|
9926
|
-
break
|
|
10022
|
+
size_styles: {
|
|
10023
|
+
if (!size && !hasRemainingConfig) {
|
|
10024
|
+
break size_styles;
|
|
9927
10025
|
}
|
|
9928
|
-
|
|
10026
|
+
sizeStyles = {};
|
|
9929
10027
|
if (expandX) {
|
|
9930
10028
|
if (flexDirection === "row") {
|
|
9931
|
-
|
|
10029
|
+
sizeStyles.flexGrow = 1; // Grow horizontally in row
|
|
9932
10030
|
} else if (flexDirection === "column") {
|
|
9933
|
-
|
|
10031
|
+
sizeStyles.width = "100%"; // Take full width in column
|
|
9934
10032
|
} else {
|
|
9935
|
-
|
|
10033
|
+
sizeStyles.width = "100%"; // Take full width outside flex
|
|
9936
10034
|
}
|
|
10035
|
+
} else if (width !== undefined) {
|
|
10036
|
+
sizeStyles.width = width;
|
|
9937
10037
|
}
|
|
9938
10038
|
if (expandY) {
|
|
9939
10039
|
if (flexDirection === "row") {
|
|
9940
|
-
|
|
10040
|
+
sizeStyles.height = "100%"; // Take full height in row
|
|
9941
10041
|
} else if (flexDirection === "column") {
|
|
9942
|
-
|
|
10042
|
+
sizeStyles.flexGrow = 1; // Grow vertically in column
|
|
9943
10043
|
} else {
|
|
9944
|
-
|
|
10044
|
+
sizeStyles.height = "100%"; // Take full height outside flex
|
|
9945
10045
|
}
|
|
10046
|
+
} else if (height !== undefined) {
|
|
10047
|
+
sizeStyles.height = height;
|
|
9946
10048
|
}
|
|
9947
10049
|
}
|
|
9948
10050
|
typo_styles: {
|
|
@@ -9954,7 +10056,7 @@ const withPropsStyle = (
|
|
|
9954
10056
|
if (textSize) {
|
|
9955
10057
|
const fontSize =
|
|
9956
10058
|
typeof textSize === "string"
|
|
9957
|
-
?
|
|
10059
|
+
? sizeTypoScale[textSize] || textSize
|
|
9958
10060
|
: textSize;
|
|
9959
10061
|
typoStyles.fontSize = fontSize;
|
|
9960
10062
|
}
|
|
@@ -9981,13 +10083,61 @@ const withPropsStyle = (
|
|
|
9981
10083
|
if (textUnderlineColor) {
|
|
9982
10084
|
typoStyles.textDecorationColor = textUnderlineColor;
|
|
9983
10085
|
}
|
|
10086
|
+
if (textShadow) {
|
|
10087
|
+
typoStyles.textShadow = textShadow;
|
|
10088
|
+
}
|
|
9984
10089
|
typoStyles.color = textColor;
|
|
9985
10090
|
}
|
|
9986
|
-
|
|
9987
|
-
if (!
|
|
9988
|
-
break
|
|
10091
|
+
visual_styles: {
|
|
10092
|
+
if (!visual && !hasRemainingConfig) {
|
|
10093
|
+
break visual_styles;
|
|
10094
|
+
}
|
|
10095
|
+
visualStyles = {};
|
|
10096
|
+
if (boxShadow !== undefined) {
|
|
10097
|
+
visualStyles.boxShadow = boxShadow;
|
|
10098
|
+
}
|
|
10099
|
+
if (background !== undefined) {
|
|
10100
|
+
visualStyles.background = background;
|
|
10101
|
+
}
|
|
10102
|
+
if (backgroundColor !== undefined) {
|
|
10103
|
+
visualStyles.backgroundColor = backgroundColor;
|
|
10104
|
+
}
|
|
10105
|
+
if (backgroundImage !== undefined) {
|
|
10106
|
+
visualStyles.backgroundImage = backgroundImage;
|
|
10107
|
+
}
|
|
10108
|
+
if (border !== undefined) {
|
|
10109
|
+
visualStyles.border = border;
|
|
10110
|
+
}
|
|
10111
|
+
if (borderTop !== undefined) {
|
|
10112
|
+
visualStyles.borderTop = borderTop;
|
|
10113
|
+
}
|
|
10114
|
+
if (borderLeft !== undefined) {
|
|
10115
|
+
visualStyles.borderLeft = borderLeft;
|
|
10116
|
+
}
|
|
10117
|
+
if (borderRight !== undefined) {
|
|
10118
|
+
visualStyles.borderRight = borderRight;
|
|
10119
|
+
}
|
|
10120
|
+
if (borderBottom !== undefined) {
|
|
10121
|
+
visualStyles.borderBottom = borderBottom;
|
|
10122
|
+
}
|
|
10123
|
+
if (borderWidth !== undefined) {
|
|
10124
|
+
visualStyles.borderWidth = borderWidth;
|
|
10125
|
+
}
|
|
10126
|
+
if (borderRadius !== undefined) {
|
|
10127
|
+
visualStyles.borderRadius = borderRadius;
|
|
10128
|
+
}
|
|
10129
|
+
if (borderColor !== undefined) {
|
|
10130
|
+
visualStyles.borderColor = borderColor;
|
|
10131
|
+
}
|
|
10132
|
+
if (borderStyle !== undefined) {
|
|
10133
|
+
visualStyles.borderStyle = borderStyle;
|
|
10134
|
+
}
|
|
10135
|
+
if (opacity !== undefined) {
|
|
10136
|
+
visualStyles.opacity = opacity;
|
|
10137
|
+
}
|
|
10138
|
+
if (filter !== undefined) {
|
|
10139
|
+
visualStyles.filter = filter;
|
|
9989
10140
|
}
|
|
9990
|
-
propStyles = style ? normalizeStyles(style, "css") : {};
|
|
9991
10141
|
}
|
|
9992
10142
|
|
|
9993
10143
|
const firstConfigStyle = {};
|
|
@@ -10000,12 +10150,15 @@ const withPropsStyle = (
|
|
|
10000
10150
|
if (align) {
|
|
10001
10151
|
Object.assign(firstConfigStyle, alignmentStyles);
|
|
10002
10152
|
}
|
|
10003
|
-
if (
|
|
10004
|
-
Object.assign(firstConfigStyle,
|
|
10153
|
+
if (size) {
|
|
10154
|
+
Object.assign(firstConfigStyle, sizeStyles);
|
|
10005
10155
|
}
|
|
10006
10156
|
if (typo) {
|
|
10007
10157
|
Object.assign(firstConfigStyle, typoStyles);
|
|
10008
10158
|
}
|
|
10159
|
+
if (visual) {
|
|
10160
|
+
Object.assign(firstConfigStyle, visualStyles);
|
|
10161
|
+
}
|
|
10009
10162
|
if (style) {
|
|
10010
10163
|
appendStyles(firstConfigStyle, propStyles, "css");
|
|
10011
10164
|
}
|
|
@@ -10024,12 +10177,15 @@ const withPropsStyle = (
|
|
|
10024
10177
|
if (config.align || config.layout) {
|
|
10025
10178
|
Object.assign(configStyle, alignmentStyles);
|
|
10026
10179
|
}
|
|
10027
|
-
if (config.
|
|
10028
|
-
Object.assign(configStyle,
|
|
10180
|
+
if (config.size || config.layout) {
|
|
10181
|
+
Object.assign(configStyle, sizeStyles);
|
|
10029
10182
|
}
|
|
10030
10183
|
if (config.typo) {
|
|
10031
10184
|
Object.assign(configStyle, typoStyles);
|
|
10032
10185
|
}
|
|
10186
|
+
if (config.visual || config.visual === undefined) {
|
|
10187
|
+
Object.assign(configStyle, visualStyles);
|
|
10188
|
+
}
|
|
10033
10189
|
if (config.style) {
|
|
10034
10190
|
appendStyles(configStyle, propStyles, "css");
|
|
10035
10191
|
}
|
|
@@ -10039,9 +10195,18 @@ const withPropsStyle = (
|
|
|
10039
10195
|
};
|
|
10040
10196
|
|
|
10041
10197
|
// Unified design scale using t-shirt sizes with rem units for accessibility.
|
|
10042
|
-
// This scale is used for
|
|
10198
|
+
// This scale is used for spacing to create visual harmony
|
|
10043
10199
|
// and consistent proportions throughout the design system.
|
|
10044
|
-
const
|
|
10200
|
+
const sizeSpacingScale = {
|
|
10201
|
+
xxs: "0.125rem", // 0.125 = 2px at 16px base
|
|
10202
|
+
xs: "0.25rem", // 0.25 = 4px at 16px base
|
|
10203
|
+
sm: "0.5rem", // 0.5 = 8px at 16px base
|
|
10204
|
+
md: "1rem", // 1 = 16px at 16px base (base font size)
|
|
10205
|
+
lg: "1.5rem", // 1.5 = 24px at 16px base
|
|
10206
|
+
xl: "2rem", // 2 = 32px at 16px base
|
|
10207
|
+
xxl: "3rem", // 3 = 48px at 16px base
|
|
10208
|
+
};
|
|
10209
|
+
const sizeTypoScale = {
|
|
10045
10210
|
xxs: "0.625rem", // 0.625 = 10px at 16px base (smaller than before for more range)
|
|
10046
10211
|
xs: "0.75rem", // 0.75 = 12px at 16px base
|
|
10047
10212
|
sm: "0.875rem", // 0.875 = 14px at 16px base
|
|
@@ -10051,12 +10216,6 @@ const tshirtSizeToCSSValues = {
|
|
|
10051
10216
|
xxl: "1.5rem", // 1.5 = 24px at 16px base
|
|
10052
10217
|
};
|
|
10053
10218
|
|
|
10054
|
-
// Typography and spacing use the same scale for consistent visual rhythm.
|
|
10055
|
-
// When text size is "lg", using "lg" spacing creates naturally proportioned layouts.
|
|
10056
|
-
// All values scale with user font preferences for better accessibility.
|
|
10057
|
-
const typoSizes = tshirtSizeToCSSValues;
|
|
10058
|
-
const spacingSizes = tshirtSizeToCSSValues;
|
|
10059
|
-
|
|
10060
10219
|
const DEBUG = {
|
|
10061
10220
|
registration: false,
|
|
10062
10221
|
// Element registration/unregistration
|
|
@@ -11343,6 +11502,59 @@ const createSelectionKeyboardShortcuts = (selectionController, {
|
|
|
11343
11502
|
}];
|
|
11344
11503
|
};
|
|
11345
11504
|
|
|
11505
|
+
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
11506
|
+
:root {
|
|
11507
|
+
--navi-icon-align-y: center;
|
|
11508
|
+
}
|
|
11509
|
+
|
|
11510
|
+
.navi_text {
|
|
11511
|
+
display: inline-flex;
|
|
11512
|
+
align-items: baseline;
|
|
11513
|
+
gap: 0.1em;
|
|
11514
|
+
}
|
|
11515
|
+
|
|
11516
|
+
.navi_icon {
|
|
11517
|
+
--align-y: var(--navi-icon-align-y, center);
|
|
11518
|
+
|
|
11519
|
+
display: inline-flex;
|
|
11520
|
+
width: 1em;
|
|
11521
|
+
height: 1em;
|
|
11522
|
+
flex-shrink: 0;
|
|
11523
|
+
align-self: var(--align-y);
|
|
11524
|
+
line-height: 1em;
|
|
11525
|
+
}
|
|
11526
|
+
`;
|
|
11527
|
+
const Text = ({
|
|
11528
|
+
children,
|
|
11529
|
+
...rest
|
|
11530
|
+
}) => {
|
|
11531
|
+
const [remainingProps, innerStyle] = withPropsStyle(rest, {
|
|
11532
|
+
layout: true,
|
|
11533
|
+
typo: true
|
|
11534
|
+
});
|
|
11535
|
+
return jsx("span", {
|
|
11536
|
+
...remainingProps,
|
|
11537
|
+
className: "navi_text",
|
|
11538
|
+
style: innerStyle,
|
|
11539
|
+
children: children
|
|
11540
|
+
});
|
|
11541
|
+
};
|
|
11542
|
+
const Icon = ({
|
|
11543
|
+
children,
|
|
11544
|
+
...rest
|
|
11545
|
+
}) => {
|
|
11546
|
+
const [remainingProps, innerStyle] = withPropsStyle(rest, {
|
|
11547
|
+
layout: true,
|
|
11548
|
+
typo: true
|
|
11549
|
+
});
|
|
11550
|
+
return jsx("span", {
|
|
11551
|
+
...remainingProps,
|
|
11552
|
+
className: "navi_icon",
|
|
11553
|
+
style: innerStyle,
|
|
11554
|
+
children: children
|
|
11555
|
+
});
|
|
11556
|
+
};
|
|
11557
|
+
|
|
11346
11558
|
// autoFocus does not work so we focus in a useLayoutEffect,
|
|
11347
11559
|
// see https://github.com/preactjs/preact/issues/1255
|
|
11348
11560
|
|
|
@@ -11439,6 +11651,9 @@ const useAutoFocus = (
|
|
|
11439
11651
|
|
|
11440
11652
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
11441
11653
|
.navi_link {
|
|
11654
|
+
position: relative;
|
|
11655
|
+
display: inline-flex;
|
|
11656
|
+
gap: 0.1em;
|
|
11442
11657
|
border-radius: 2px;
|
|
11443
11658
|
}
|
|
11444
11659
|
/* Focus */
|
|
@@ -11510,8 +11725,13 @@ const LinkPlain = forwardRef((props, ref) => {
|
|
|
11510
11725
|
onClick,
|
|
11511
11726
|
onKeyDown,
|
|
11512
11727
|
href,
|
|
11728
|
+
target,
|
|
11729
|
+
rel,
|
|
11513
11730
|
// visual
|
|
11514
11731
|
className,
|
|
11732
|
+
blankTargetIcon,
|
|
11733
|
+
anchorIcon,
|
|
11734
|
+
icon,
|
|
11515
11735
|
...rest
|
|
11516
11736
|
} = props;
|
|
11517
11737
|
const innerRef = useRef();
|
|
@@ -11526,18 +11746,43 @@ const LinkPlain = forwardRef((props, ref) => {
|
|
|
11526
11746
|
layout: true,
|
|
11527
11747
|
typo: true
|
|
11528
11748
|
});
|
|
11749
|
+
const {
|
|
11750
|
+
targetIsSameSite,
|
|
11751
|
+
targetIsAnchor,
|
|
11752
|
+
targetIsCurrent
|
|
11753
|
+
} = getLinkTargetInfo(href);
|
|
11754
|
+
const innerTarget = target === undefined ? targetIsSameSite ? "_self" : "_blank" : target;
|
|
11755
|
+
const innerRel = rel === undefined ? targetIsSameSite ? undefined : "noopener noreferrer" : rel;
|
|
11756
|
+
let innerIcon;
|
|
11757
|
+
if (icon === undefined) {
|
|
11758
|
+
const innerBlankTargetIcon = blankTargetIcon === undefined ? innerTarget === "_blank" : blankTargetIcon;
|
|
11759
|
+
const innerAnchorIcon = anchorIcon === undefined ? targetIsAnchor : anchorIcon;
|
|
11760
|
+
if (innerBlankTargetIcon) {
|
|
11761
|
+
innerIcon = innerBlankTargetIcon === true ? jsx(BlankTargetLinkSvg, {}) : innerBlankTargetIcon;
|
|
11762
|
+
} else if (innerAnchorIcon) {
|
|
11763
|
+
innerIcon = innerAnchorIcon === true ? jsx(AnchorLinkSvg, {}) : anchorIcon;
|
|
11764
|
+
}
|
|
11765
|
+
} else {
|
|
11766
|
+
innerIcon = icon;
|
|
11767
|
+
}
|
|
11529
11768
|
return jsx("a", {
|
|
11530
11769
|
...remainingProps,
|
|
11531
11770
|
ref: innerRef,
|
|
11532
|
-
href: href,
|
|
11533
11771
|
className: innerClassName,
|
|
11534
11772
|
style: innerStyle,
|
|
11773
|
+
href: href,
|
|
11774
|
+
rel: innerRel,
|
|
11775
|
+
target: innerTarget === "_self" ? undefined : target,
|
|
11535
11776
|
"aria-busy": loading,
|
|
11536
11777
|
inert: disabled,
|
|
11537
11778
|
"data-disabled": disabled ? "" : undefined,
|
|
11538
11779
|
"data-readonly": readOnly ? "" : undefined,
|
|
11539
11780
|
"data-active": active ? "" : undefined,
|
|
11540
11781
|
"data-visited": visited || isVisited ? "" : undefined,
|
|
11782
|
+
"data-external": targetIsSameSite ? undefined : "",
|
|
11783
|
+
"data-internal": targetIsSameSite ? "" : undefined,
|
|
11784
|
+
"data-anchor": targetIsAnchor ? "" : undefined,
|
|
11785
|
+
"data-current": targetIsCurrent ? "" : undefined,
|
|
11541
11786
|
onClick: e => {
|
|
11542
11787
|
closeValidationMessage(e.target, "click");
|
|
11543
11788
|
if (readOnly) {
|
|
@@ -11555,13 +11800,46 @@ const LinkPlain = forwardRef((props, ref) => {
|
|
|
11555
11800
|
}
|
|
11556
11801
|
onKeyDown?.(e);
|
|
11557
11802
|
},
|
|
11558
|
-
children:
|
|
11803
|
+
children: jsxs(LoaderBackground, {
|
|
11559
11804
|
loading: loading,
|
|
11560
11805
|
color: "light-dark(#355fcc, #3b82f6)",
|
|
11561
|
-
children: children
|
|
11806
|
+
children: [children, innerIcon && jsx(Icon, {
|
|
11807
|
+
children: innerIcon
|
|
11808
|
+
})]
|
|
11562
11809
|
})
|
|
11563
11810
|
});
|
|
11564
11811
|
});
|
|
11812
|
+
const BlankTargetLinkSvg = () => {
|
|
11813
|
+
return jsx("svg", {
|
|
11814
|
+
viewBox: "0 0 24 24",
|
|
11815
|
+
width: "100%",
|
|
11816
|
+
height: "100%",
|
|
11817
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11818
|
+
children: jsx("path", {
|
|
11819
|
+
d: "M10.0002 5H8.2002C7.08009 5 6.51962 5 6.0918 5.21799C5.71547 5.40973 5.40973 5.71547 5.21799 6.0918C5 6.51962 5 7.08009 5 8.2002V15.8002C5 16.9203 5 17.4801 5.21799 17.9079C5.40973 18.2842 5.71547 18.5905 6.0918 18.7822C6.5192 19 7.07899 19 8.19691 19H15.8031C16.921 19 17.48 19 17.9074 18.7822C18.2837 18.5905 18.5905 18.2839 18.7822 17.9076C19 17.4802 19 16.921 19 15.8031V14M20 9V4M20 4H15M20 4L13 11",
|
|
11820
|
+
stroke: "currentColor",
|
|
11821
|
+
fill: "none",
|
|
11822
|
+
"stroke-width": "2",
|
|
11823
|
+
"stroke-linecap": "round",
|
|
11824
|
+
"stroke-linejoin": "round"
|
|
11825
|
+
})
|
|
11826
|
+
});
|
|
11827
|
+
};
|
|
11828
|
+
const AnchorLinkSvg = () => {
|
|
11829
|
+
return jsxs("svg", {
|
|
11830
|
+
viewBox: "0 0 24 24",
|
|
11831
|
+
width: "100%",
|
|
11832
|
+
height: "100%",
|
|
11833
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
11834
|
+
children: [jsx("path", {
|
|
11835
|
+
d: "M13.2218 3.32234C15.3697 1.17445 18.8521 1.17445 21 3.32234C23.1479 5.47022 23.1479 8.95263 21 11.1005L17.4645 14.636C15.3166 16.7839 11.8342 16.7839 9.6863 14.636C9.48752 14.4373 9.30713 14.2271 9.14514 14.0075C8.90318 13.6796 8.97098 13.2301 9.25914 12.9419C9.73221 12.4688 10.5662 12.6561 11.0245 13.1435C11.0494 13.1699 11.0747 13.196 11.1005 13.2218C12.4673 14.5887 14.6834 14.5887 16.0503 13.2218L19.5858 9.6863C20.9526 8.31947 20.9526 6.10339 19.5858 4.73655C18.219 3.36972 16.0029 3.36972 14.636 4.73655L13.5754 5.79721C13.1849 6.18774 12.5517 6.18774 12.1612 5.79721C11.7706 5.40669 11.7706 4.77352 12.1612 4.383L13.2218 3.32234Z",
|
|
11836
|
+
fill: "currentColor"
|
|
11837
|
+
}), jsx("path", {
|
|
11838
|
+
d: "M6.85787 9.6863C8.90184 7.64233 12.2261 7.60094 14.3494 9.42268C14.7319 9.75083 14.7008 10.3287 14.3444 10.685C13.9253 11.1041 13.2317 11.0404 12.7416 10.707C11.398 9.79292 9.48593 9.88667 8.27209 11.1005L4.73655 14.636C3.36972 16.0029 3.36972 18.219 4.73655 19.5858C6.10339 20.9526 8.31947 20.9526 9.6863 19.5858L10.747 18.5251C11.1375 18.1346 11.7706 18.1346 12.1612 18.5251C12.5517 18.9157 12.5517 19.5488 12.1612 19.9394L11.1005 21C8.95263 23.1479 5.47022 23.1479 3.32234 21C1.17445 18.8521 1.17445 15.3697 3.32234 13.2218L6.85787 9.6863Z",
|
|
11839
|
+
fill: "currentColor"
|
|
11840
|
+
})]
|
|
11841
|
+
});
|
|
11842
|
+
};
|
|
11565
11843
|
const LinkWithSelection = forwardRef((props, ref) => {
|
|
11566
11844
|
const {
|
|
11567
11845
|
selection,
|
|
@@ -18971,54 +19249,19 @@ const Overflow = ({
|
|
|
18971
19249
|
});
|
|
18972
19250
|
};
|
|
18973
19251
|
|
|
18974
|
-
|
|
18975
|
-
:root {
|
|
18976
|
-
--navi-icon-align-y: center;
|
|
18977
|
-
}
|
|
18978
|
-
|
|
18979
|
-
.navi_text {
|
|
18980
|
-
display: inline-flex;
|
|
18981
|
-
align-items: baseline;
|
|
18982
|
-
gap: 0.1em;
|
|
18983
|
-
}
|
|
18984
|
-
|
|
18985
|
-
.navi_icon {
|
|
18986
|
-
--align-y: var(--navi-icon-align-y, center);
|
|
18987
|
-
|
|
18988
|
-
display: inline-flex;
|
|
18989
|
-
width: 1em;
|
|
18990
|
-
height: 1em;
|
|
18991
|
-
flex-shrink: 0;
|
|
18992
|
-
align-self: var(--align-y);
|
|
18993
|
-
line-height: 1em;
|
|
18994
|
-
}
|
|
18995
|
-
`;
|
|
18996
|
-
const Text = ({
|
|
18997
|
-
children,
|
|
18998
|
-
...rest
|
|
18999
|
-
}) => {
|
|
19000
|
-
const [remainingProps, innerStyle] = withPropsStyle(rest, {
|
|
19001
|
-
layout: true,
|
|
19002
|
-
typo: true
|
|
19003
|
-
});
|
|
19004
|
-
return jsx("span", {
|
|
19005
|
-
...remainingProps,
|
|
19006
|
-
className: "navi_text",
|
|
19007
|
-
style: innerStyle,
|
|
19008
|
-
children: children
|
|
19009
|
-
});
|
|
19010
|
-
};
|
|
19011
|
-
const Icon = ({
|
|
19252
|
+
const Paragraph = ({
|
|
19012
19253
|
children,
|
|
19013
19254
|
...rest
|
|
19014
19255
|
}) => {
|
|
19256
|
+
if (rest.marginTop === undefined) {
|
|
19257
|
+
rest.marginTop = "md";
|
|
19258
|
+
}
|
|
19015
19259
|
const [remainingProps, innerStyle] = withPropsStyle(rest, {
|
|
19016
19260
|
layout: true,
|
|
19017
19261
|
typo: true
|
|
19018
19262
|
});
|
|
19019
|
-
return jsx("
|
|
19263
|
+
return jsx("p", {
|
|
19020
19264
|
...remainingProps,
|
|
19021
|
-
className: "navi_icon",
|
|
19022
19265
|
style: innerStyle,
|
|
19023
19266
|
children: children
|
|
19024
19267
|
});
|
|
@@ -19056,6 +19299,26 @@ const TextAndCount = ({
|
|
|
19056
19299
|
});
|
|
19057
19300
|
};
|
|
19058
19301
|
|
|
19302
|
+
const Title = ({
|
|
19303
|
+
children,
|
|
19304
|
+
as = "h1",
|
|
19305
|
+
...rest
|
|
19306
|
+
}) => {
|
|
19307
|
+
if (rest.bold === undefined) {
|
|
19308
|
+
rest.bold = true;
|
|
19309
|
+
}
|
|
19310
|
+
const [remainingProps, innerStyle] = withPropsStyle(rest, {
|
|
19311
|
+
layout: true,
|
|
19312
|
+
typo: true
|
|
19313
|
+
});
|
|
19314
|
+
const HeadingTag = as;
|
|
19315
|
+
return jsx(HeadingTag, {
|
|
19316
|
+
...remainingProps,
|
|
19317
|
+
style: innerStyle,
|
|
19318
|
+
children: children
|
|
19319
|
+
});
|
|
19320
|
+
};
|
|
19321
|
+
|
|
19059
19322
|
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
19060
19323
|
.navi_flex_row {
|
|
19061
19324
|
display: flex;
|
|
@@ -19086,7 +19349,7 @@ const FlexRow = ({
|
|
|
19086
19349
|
justifyContent: alignX !== "start" ? alignX : undefined,
|
|
19087
19350
|
// Only set alignItems if it's not the default "stretch"
|
|
19088
19351
|
alignItems: alignY !== "stretch" ? alignY : undefined,
|
|
19089
|
-
gap
|
|
19352
|
+
gap: sizeSpacingScale[gap] || gap
|
|
19090
19353
|
},
|
|
19091
19354
|
layout: true
|
|
19092
19355
|
});
|
|
@@ -19113,7 +19376,7 @@ const FlexColumn = ({
|
|
|
19113
19376
|
alignItems: alignX !== "stretch" ? alignX : undefined,
|
|
19114
19377
|
// Only set justifyContent if it's not the default "start"
|
|
19115
19378
|
justifyContent: alignY !== "start" ? alignY : undefined,
|
|
19116
|
-
gap:
|
|
19379
|
+
gap: sizeSpacingScale[gap] || gap
|
|
19117
19380
|
}
|
|
19118
19381
|
});
|
|
19119
19382
|
return jsx("div", {
|
|
@@ -19244,5 +19507,5 @@ const useDependenciesDiff = (inputs) => {
|
|
|
19244
19507
|
return diffRef.current;
|
|
19245
19508
|
};
|
|
19246
19509
|
|
|
19247
|
-
export { ActionRenderer, ActiveKeyboardShortcuts, Button, Checkbox, CheckboxList, Col, Colgroup, Details, Editable, ErrorBoundaryContext, FlexColumn, FlexItem, FlexRow, FontSizedSvg, Form, Icon, IconAndText, Input, Label, Link, LinkWithIcon, Overflow, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, Select, SelectionContext, Spacing, SummaryMarker, Tab, TabList, Table, TableCell, Tbody, Text, TextAndCount, Thead, Tr, UITransition, actionIntegratedVia, addCustomMessage, createAction, createSelectionKeyboardShortcuts, createUniqueValueConstraint, enableDebugActions, enableDebugOnDocumentLoading, forwardActionRequested, goBack, goForward, goTo, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, openCallout, rawUrlPart, reload, removeCustomMessage, rerunActions, resource, setBaseUrl, setupRoutes, stopLoad, stringifyTableSelectionValue, updateActions, useActionData, useActionStatus, useCellsAndColumns, useDependenciesDiff, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, valueInLocalStorage };
|
|
19510
|
+
export { ActionRenderer, ActiveKeyboardShortcuts, Button, Checkbox, CheckboxList, Col, Colgroup, Details, Editable, ErrorBoundaryContext, FlexColumn, FlexItem, FlexRow, FontSizedSvg, Form, Icon, IconAndText, Input, Label, Link, LinkWithIcon, Overflow, Paragraph, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, Select, SelectionContext, Spacing, SummaryMarker, Tab, TabList, Table, TableCell, Tbody, Text, TextAndCount, Thead, Title, Tr, UITransition, actionIntegratedVia, addCustomMessage, createAction, createSelectionKeyboardShortcuts, createUniqueValueConstraint, enableDebugActions, enableDebugOnDocumentLoading, forwardActionRequested, goBack, goForward, goTo, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, openCallout, rawUrlPart, reload, removeCustomMessage, rerunActions, resource, setBaseUrl, setupRoutes, stopLoad, stringifyTableSelectionValue, updateActions, useActionData, useActionStatus, useCellsAndColumns, useDependenciesDiff, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, valueInLocalStorage };
|
|
19248
19511
|
//# sourceMappingURL=jsenv_navi.js.map
|