@jsenv/navi 0.12.23 → 0.12.25
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 +98 -37
- package/dist/jsenv_navi.js.map +20 -13
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -13829,6 +13829,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
13829
13829
|
.navi_icon {
|
|
13830
13830
|
display: inline-block;
|
|
13831
13831
|
box-sizing: border-box;
|
|
13832
|
+
max-width: 100%;
|
|
13833
|
+
max-height: 100%;
|
|
13832
13834
|
}
|
|
13833
13835
|
|
|
13834
13836
|
.navi_icon[data-interactive] {
|
|
@@ -13913,9 +13915,17 @@ const Icon = ({
|
|
|
13913
13915
|
if (width !== undefined || height !== undefined) {
|
|
13914
13916
|
box = true;
|
|
13915
13917
|
}
|
|
13918
|
+
const ariaProps = decorative ? {
|
|
13919
|
+
"aria-hidden": "true"
|
|
13920
|
+
} : {
|
|
13921
|
+
role,
|
|
13922
|
+
"aria-label": ariaLabel
|
|
13923
|
+
};
|
|
13916
13924
|
if (box) {
|
|
13917
13925
|
return jsx(Box, {
|
|
13918
13926
|
...props,
|
|
13927
|
+
...ariaProps,
|
|
13928
|
+
box: box,
|
|
13919
13929
|
baseClassName: "navi_icon",
|
|
13920
13930
|
"data-width": width,
|
|
13921
13931
|
"data-height": height,
|
|
@@ -13925,12 +13935,6 @@ const Icon = ({
|
|
|
13925
13935
|
});
|
|
13926
13936
|
}
|
|
13927
13937
|
const invisibleText = baseChar.repeat(charWidth);
|
|
13928
|
-
const ariaProps = decorative ? {
|
|
13929
|
-
"aria-hidden": "true"
|
|
13930
|
-
} : {
|
|
13931
|
-
role,
|
|
13932
|
-
"aria-label": ariaLabel
|
|
13933
|
-
};
|
|
13934
13938
|
return jsxs(Text, {
|
|
13935
13939
|
...props,
|
|
13936
13940
|
...ariaProps,
|
|
@@ -13983,6 +13987,8 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
13983
13987
|
text-decoration: var(--x-link-text-decoration);
|
|
13984
13988
|
vertical-align: middle;
|
|
13985
13989
|
border-radius: var(--link-border-radius);
|
|
13990
|
+
outline-width: 0;
|
|
13991
|
+
outline-style: solid;
|
|
13986
13992
|
outline-color: var(--link-outline-color);
|
|
13987
13993
|
cursor: var(--x-link-cursor);
|
|
13988
13994
|
}
|
|
@@ -13998,7 +14004,6 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
13998
14004
|
}
|
|
13999
14005
|
.navi_link[data-focus-visible] {
|
|
14000
14006
|
outline-width: 2px;
|
|
14001
|
-
outline-style: solid;
|
|
14002
14007
|
}
|
|
14003
14008
|
/* Visited */
|
|
14004
14009
|
.navi_link[data-visited] {
|
|
@@ -14046,20 +14051,20 @@ const LinkStyleCSSVars = {
|
|
|
14046
14051
|
color: "--link-color-active"
|
|
14047
14052
|
}
|
|
14048
14053
|
};
|
|
14049
|
-
const LinkPseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":visited", ":-navi-loading", ":-navi-internal
|
|
14054
|
+
const LinkPseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":visited", ":-navi-loading", ":-navi-link-internal", ":-navi-link-external", ":-navi-link-anchor", ":-navi-link-current"];
|
|
14050
14055
|
const LinkPseudoElements = ["::-navi-loader"];
|
|
14051
14056
|
Object.assign(PSEUDO_CLASSES, {
|
|
14052
|
-
":-navi-internal
|
|
14053
|
-
attribute: "data-internal
|
|
14057
|
+
":-navi-link-internal": {
|
|
14058
|
+
attribute: "data-link-internal"
|
|
14054
14059
|
},
|
|
14055
|
-
":-navi-external
|
|
14056
|
-
attribute: "data-external
|
|
14060
|
+
":-navi-link-external": {
|
|
14061
|
+
attribute: "data-link-external"
|
|
14057
14062
|
},
|
|
14058
|
-
":-navi-anchor
|
|
14059
|
-
attribute: "data-anchor
|
|
14063
|
+
":-navi-link-anchor": {
|
|
14064
|
+
attribute: "data-link-anchor"
|
|
14060
14065
|
},
|
|
14061
|
-
":-navi-current
|
|
14062
|
-
attribute: "data-current
|
|
14066
|
+
":-navi-link-current": {
|
|
14067
|
+
attribute: "data-link-current"
|
|
14063
14068
|
}
|
|
14064
14069
|
});
|
|
14065
14070
|
const Link = props => {
|
|
@@ -14162,10 +14167,10 @@ const LinkPlain = props => {
|
|
|
14162
14167
|
":disabled": disabled,
|
|
14163
14168
|
":visited": visited,
|
|
14164
14169
|
":-navi-loading": loading,
|
|
14165
|
-
":-navi-internal
|
|
14166
|
-
":-navi-external
|
|
14167
|
-
":-navi-anchor
|
|
14168
|
-
":-navi-current
|
|
14170
|
+
":-navi-link-internal": targetIsSameSite,
|
|
14171
|
+
":-navi-link-external": !targetIsSameSite,
|
|
14172
|
+
":-navi-link-anchor": targetIsAnchor,
|
|
14173
|
+
":-navi-link-current": targetIsCurrent
|
|
14169
14174
|
},
|
|
14170
14175
|
onClick: e => {
|
|
14171
14176
|
if (preventDefault) {
|
|
@@ -14191,7 +14196,7 @@ const LinkPlain = props => {
|
|
|
14191
14196
|
loading: loading,
|
|
14192
14197
|
color: "var(--link-loader-color)"
|
|
14193
14198
|
}), applySpacingOnTextChildren(children, spacing), innerIcon && jsx(Icon, {
|
|
14194
|
-
marginLeft: "xxs",
|
|
14199
|
+
marginLeft: children ? "xxs" : undefined,
|
|
14195
14200
|
children: innerIcon
|
|
14196
14201
|
})]
|
|
14197
14202
|
});
|
|
@@ -14361,7 +14366,7 @@ const RouteLink = ({
|
|
|
14361
14366
|
...rest,
|
|
14362
14367
|
href: url,
|
|
14363
14368
|
pseudoState: {
|
|
14364
|
-
":-navi-current
|
|
14369
|
+
":-navi-link-current": routeIsActive
|
|
14365
14370
|
},
|
|
14366
14371
|
children: children
|
|
14367
14372
|
});
|
|
@@ -22059,25 +22064,81 @@ const MessageBox = ({
|
|
|
22059
22064
|
});
|
|
22060
22065
|
};
|
|
22061
22066
|
|
|
22062
|
-
const
|
|
22063
|
-
|
|
22064
|
-
marginTop: "md",
|
|
22065
|
-
...props,
|
|
22066
|
-
as: "p",
|
|
22067
|
-
...props
|
|
22068
|
-
});
|
|
22069
|
-
};
|
|
22070
|
-
|
|
22067
|
+
const TitleLevelContext = createContext();
|
|
22068
|
+
const TitlePseudoClasses = [":hover"];
|
|
22071
22069
|
const Title = props => {
|
|
22072
22070
|
const messageBoxLevel = useContext(MessageBoxLevelContext);
|
|
22071
|
+
const innerAs = props.as || (messageBoxLevel ? "h4" : "h1");
|
|
22072
|
+
const titleLevel = parseInt(innerAs.slice(1));
|
|
22073
22073
|
const reportTitleToMessageBox = useContext(MessageBoxReportTitleChildContext);
|
|
22074
22074
|
reportTitleToMessageBox?.(true);
|
|
22075
|
+
return jsx(TitleLevelContext.Provider, {
|
|
22076
|
+
value: titleLevel,
|
|
22077
|
+
children: jsx(Text, {
|
|
22078
|
+
bold: true,
|
|
22079
|
+
className: withPropsClassName("navi_title"),
|
|
22080
|
+
as: messageBoxLevel ? "h4" : "h1",
|
|
22081
|
+
marginTop: messageBoxLevel ? "0" : undefined,
|
|
22082
|
+
marginBottom: messageBoxLevel ? "sm" : undefined,
|
|
22083
|
+
color: messageBoxLevel ? `var(--x-color)` : undefined,
|
|
22084
|
+
...props,
|
|
22085
|
+
pseudoClasses: TitlePseudoClasses,
|
|
22086
|
+
children: props.children
|
|
22087
|
+
})
|
|
22088
|
+
});
|
|
22089
|
+
};
|
|
22090
|
+
|
|
22091
|
+
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
22092
|
+
.navi_link_anchor[data-discrete] {
|
|
22093
|
+
position: absolute !important;
|
|
22094
|
+
top: 1em;
|
|
22095
|
+
left: -1em;
|
|
22096
|
+
width: 1em;
|
|
22097
|
+
height: 1em;
|
|
22098
|
+
font-size: 1em;
|
|
22099
|
+
opacity: 0;
|
|
22100
|
+
transform: translateY(-25%);
|
|
22101
|
+
}
|
|
22102
|
+
|
|
22103
|
+
.navi_title .navi_link_anchor {
|
|
22104
|
+
font-size: 0.7em;
|
|
22105
|
+
}
|
|
22106
|
+
|
|
22107
|
+
.navi_link.navi_link_anchor[data-visited] {
|
|
22108
|
+
/* We don't want to change the color of those links when they are visited */
|
|
22109
|
+
/* Here it makes no sense */
|
|
22110
|
+
--x-link-color: var(--link-color);
|
|
22111
|
+
}
|
|
22112
|
+
|
|
22113
|
+
.navi_link_anchor[data-discrete]:focus,
|
|
22114
|
+
.navi_link_anchor[data-discrete]:focus-visible,
|
|
22115
|
+
*:hover > .navi_link_anchor {
|
|
22116
|
+
opacity: 1;
|
|
22117
|
+
}
|
|
22118
|
+
/* The anchor link is displayed only on :hover */
|
|
22119
|
+
/* So we "need" a visual indicator when it's shown by focus */
|
|
22120
|
+
/* (even if it's focused by mouse aka not :focus-visible) */
|
|
22121
|
+
/* otherwise we might wonder why we see this UI element */
|
|
22122
|
+
.navi_link_anchor[data-discrete][data-focus] {
|
|
22123
|
+
outline-width: 2px;
|
|
22124
|
+
}
|
|
22125
|
+
`;
|
|
22126
|
+
const LinkAnchor = props => {
|
|
22127
|
+
const titleLevel = useContext(TitleLevelContext);
|
|
22128
|
+
return jsx(Link, {
|
|
22129
|
+
className: "navi_link_anchor",
|
|
22130
|
+
color: "inherit",
|
|
22131
|
+
id: props.href.slice(1),
|
|
22132
|
+
"data-discrete": props.discrete || titleLevel ? "" : undefined,
|
|
22133
|
+
...props
|
|
22134
|
+
});
|
|
22135
|
+
};
|
|
22136
|
+
|
|
22137
|
+
const Paragraph = props => {
|
|
22075
22138
|
return jsx(Text, {
|
|
22076
|
-
|
|
22077
|
-
|
|
22078
|
-
|
|
22079
|
-
marginBottom: messageBoxLevel ? "sm" : undefined,
|
|
22080
|
-
color: messageBoxLevel ? `var(--x-color)` : undefined,
|
|
22139
|
+
marginTop: "md",
|
|
22140
|
+
...props,
|
|
22141
|
+
as: "p",
|
|
22081
22142
|
...props
|
|
22082
22143
|
});
|
|
22083
22144
|
};
|
|
@@ -22399,5 +22460,5 @@ const UserSvg = () => jsx("svg", {
|
|
|
22399
22460
|
})
|
|
22400
22461
|
});
|
|
22401
22462
|
|
|
22402
|
-
export { ActionRenderer, ActiveKeyboardShortcuts, BadgeCount, Box, Button, Caption, CheckSvg, Checkbox, CheckboxList, Code, Col, Colgroup, Details, DialogLayout, Editable, ErrorBoundaryContext, ExclamationSvg, FontSizedSvg, Form, HeartSvg, HomeSvg, Icon, IconAndText, Image, Input, Label, Layout, Link, LinkAnchorSvg, LinkBlankTargetSvg, LinkWithIcon, MessageBox, Paragraph, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, SearchSvg, Select, SelectionContext, SettingsSvg, StarSvg, SummaryMarker, Svg, Tab, TabList, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, 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, useActiveRouteInfo, useCellsAndColumns, useDependenciesDiff, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, useUrlSearchParam, valueInLocalStorage };
|
|
22463
|
+
export { ActionRenderer, ActiveKeyboardShortcuts, BadgeCount, Box, Button, Caption, CheckSvg, Checkbox, CheckboxList, Code, Col, Colgroup, Details, DialogLayout, Editable, ErrorBoundaryContext, ExclamationSvg, FontSizedSvg, Form, HeartSvg, HomeSvg, Icon, IconAndText, Image, Input, Label, Layout, Link, LinkAnchor, LinkAnchorSvg, LinkBlankTargetSvg, LinkWithIcon, MessageBox, Paragraph, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, SearchSvg, Select, SelectionContext, SettingsSvg, StarSvg, SummaryMarker, Svg, Tab, TabList, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, UserSvg, ViewportLayout, 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, useActiveRouteInfo, useCellsAndColumns, useDependenciesDiff, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, useUrlSearchParam, valueInLocalStorage };
|
|
22403
22464
|
//# sourceMappingURL=jsenv_navi.js.map
|