@jsenv/navi 0.22.0 → 0.22.2
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 +179 -180
- package/dist/jsenv_navi.js.map +39 -48
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -2107,7 +2107,7 @@ const createActionProxyFromSignal = (
|
|
|
2107
2107
|
};
|
|
2108
2108
|
};
|
|
2109
2109
|
|
|
2110
|
-
const nameSignal = signal();
|
|
2110
|
+
const nameSignal = signal(action.name);
|
|
2111
2111
|
const callSourceSignal = signal();
|
|
2112
2112
|
let actionProxy;
|
|
2113
2113
|
{
|
|
@@ -20008,121 +20008,6 @@ const isSameKey = (browserEventKey, key) => {
|
|
|
20008
20008
|
return false;
|
|
20009
20009
|
};
|
|
20010
20010
|
|
|
20011
|
-
installImportMetaCssBuild(import.meta);const css$7 = /* css */`
|
|
20012
|
-
.navi_text_aligner_anchor {
|
|
20013
|
-
vertical-align: baseline;
|
|
20014
|
-
user-select: none;
|
|
20015
|
-
overflow: hidden;
|
|
20016
|
-
}
|
|
20017
|
-
`;
|
|
20018
|
-
|
|
20019
|
-
/**
|
|
20020
|
-
* Positions children vertically relative to the surrounding text, correcting for font-size differences.
|
|
20021
|
-
*
|
|
20022
|
-
* Place this component around any inline element whose font-size differs from the surrounding text.
|
|
20023
|
-
* It renders an invisible anchor that inherits the surrounding text's font metrics, then shifts
|
|
20024
|
-
* the child so that its visual position matches the requested `align` value — regardless of
|
|
20025
|
-
* font-size, display type (inline, inline-block, inline-flex…), or the active `vertical-align`.
|
|
20026
|
-
*
|
|
20027
|
-
* @param {"center"|"baseline"|"start"|"end"} [align="baseline"]
|
|
20028
|
-
* - `"center"` — child is vertically centered on the surrounding text's ink bounds
|
|
20029
|
-
* - `"baseline"` — no correction applied; child sits wherever the browser places it (default)
|
|
20030
|
-
* - `"start"` — child top aligns with the surrounding text's ink top
|
|
20031
|
-
* - `"end"` — child bottom aligns with the surrounding text's ink bottom
|
|
20032
|
-
* @param {import("ignore:preact").RefObject} childRef — ref on the child element to reposition
|
|
20033
|
-
*/
|
|
20034
|
-
const SurroundingTextAligner = ({
|
|
20035
|
-
children,
|
|
20036
|
-
align = "baseline",
|
|
20037
|
-
childRef
|
|
20038
|
-
}) => {
|
|
20039
|
-
import.meta.css = [css$7, "@jsenv/navi/src/text/surrounding_text_aligner.jsx"];
|
|
20040
|
-
const anchorRef = useRef();
|
|
20041
|
-
useLayoutEffect(() => {
|
|
20042
|
-
const anchorEl = anchorRef.current;
|
|
20043
|
-
const childEl = childRef.current;
|
|
20044
|
-
if (!anchorEl || !childEl) {
|
|
20045
|
-
return;
|
|
20046
|
-
}
|
|
20047
|
-
const topOffset = computeTopOffset({
|
|
20048
|
-
anchorEl,
|
|
20049
|
-
childEl,
|
|
20050
|
-
align
|
|
20051
|
-
});
|
|
20052
|
-
if (topOffset) {
|
|
20053
|
-
childEl.style.position = "relative";
|
|
20054
|
-
childEl.style.top = `${topOffset}px`;
|
|
20055
|
-
} else {
|
|
20056
|
-
childEl.style.position = "";
|
|
20057
|
-
childEl.style.top = "";
|
|
20058
|
-
}
|
|
20059
|
-
});
|
|
20060
|
-
return jsxs(Fragment, {
|
|
20061
|
-
children: [children, jsx("span", {
|
|
20062
|
-
ref: anchorRef,
|
|
20063
|
-
className: "navi_text_aligner_anchor",
|
|
20064
|
-
children: "\u200B"
|
|
20065
|
-
})]
|
|
20066
|
-
});
|
|
20067
|
-
};
|
|
20068
|
-
const computeTopOffset = ({
|
|
20069
|
-
anchorEl,
|
|
20070
|
-
childEl,
|
|
20071
|
-
align
|
|
20072
|
-
}) => {
|
|
20073
|
-
if (align === "baseline") {
|
|
20074
|
-
return 0;
|
|
20075
|
-
}
|
|
20076
|
-
// Only correct when the anchor lives in an inline formatting context.
|
|
20077
|
-
// If the parent is a flex/grid container, inline layout rules don't apply
|
|
20078
|
-
// and our font-metrics model is invalid.
|
|
20079
|
-
const parentDisplay = getComputedStyle(anchorEl.parentElement).display;
|
|
20080
|
-
if (parentDisplay !== "inline" && parentDisplay !== "inline-block" && parentDisplay !== "block") {
|
|
20081
|
-
return 0;
|
|
20082
|
-
}
|
|
20083
|
-
const anchorStyle = getComputedStyle(anchorEl);
|
|
20084
|
-
const anchorMetrics = measureFontAscDesc("M", anchorStyle);
|
|
20085
|
-
const [anchorABA, anchorABD] = anchorMetrics.actual;
|
|
20086
|
-
const anchorActH = anchorABA + anchorABD;
|
|
20087
|
-
const [, anchorFBBD] = anchorMetrics.font;
|
|
20088
|
-
|
|
20089
|
-
// Estimate the baseline Y from the anchor's bounding rect.
|
|
20090
|
-
// For an inline span, the font cell bottom is always at the element's bottom edge
|
|
20091
|
-
// (regardless of vertical-align), so baseline = rect.bottom - fontBoundingBoxDescent.
|
|
20092
|
-
const anchorRect = anchorEl.getBoundingClientRect();
|
|
20093
|
-
const baselineY = anchorRect.bottom - anchorFBBD;
|
|
20094
|
-
const anchorInkTopY = baselineY - anchorABA;
|
|
20095
|
-
|
|
20096
|
-
// Measure the child's current rect, then subtract any previously applied top correction
|
|
20097
|
-
// to recover its natural position — avoiding a style reset + reflow.
|
|
20098
|
-
const childRect = childEl.getBoundingClientRect();
|
|
20099
|
-
const childH = childRect.height;
|
|
20100
|
-
const previousTop = parseFloat(childEl.style.top) || 0;
|
|
20101
|
-
const childNaturalTop = childRect.top - previousTop;
|
|
20102
|
-
|
|
20103
|
-
// Compute desired child top Y based on align intention.
|
|
20104
|
-
let desiredChildTopY = 0;
|
|
20105
|
-
if (align === "center") {
|
|
20106
|
-
const anchorInkCenterY = anchorInkTopY + anchorActH / 2;
|
|
20107
|
-
desiredChildTopY = anchorInkCenterY - childH / 2;
|
|
20108
|
-
} else if (align === "start") {
|
|
20109
|
-
desiredChildTopY = anchorInkTopY;
|
|
20110
|
-
} else if (align === "end") {
|
|
20111
|
-
desiredChildTopY = anchorInkTopY + anchorActH - childH;
|
|
20112
|
-
}
|
|
20113
|
-
return desiredChildTopY - childNaturalTop;
|
|
20114
|
-
};
|
|
20115
|
-
const canvas = document.createElement("canvas");
|
|
20116
|
-
const measureFontAscDesc = (text, computedStyle) => {
|
|
20117
|
-
const ctx = canvas.getContext("2d");
|
|
20118
|
-
ctx.font = `${computedStyle.fontWeight} ${computedStyle.fontSize} ${computedStyle.fontFamily}`;
|
|
20119
|
-
const metrics = ctx.measureText(text);
|
|
20120
|
-
return {
|
|
20121
|
-
actual: [metrics.actualBoundingBoxAscent, metrics.actualBoundingBoxDescent],
|
|
20122
|
-
font: [metrics.fontBoundingBoxAscent, metrics.fontBoundingBoxDescent]
|
|
20123
|
-
};
|
|
20124
|
-
};
|
|
20125
|
-
|
|
20126
20011
|
const useInitialTextSelection = (ref, textSelection) => {
|
|
20127
20012
|
const deps = [];
|
|
20128
20013
|
if (Array.isArray(textSelection)) {
|
|
@@ -20223,7 +20108,7 @@ const selectByTextStrings = (element, range, startText, endText) => {
|
|
|
20223
20108
|
};
|
|
20224
20109
|
|
|
20225
20110
|
installImportMetaCssBuild(import.meta);/* eslint-disable jsenv/no-unknown-params */
|
|
20226
|
-
const css$
|
|
20111
|
+
const css$8 = /* css */`
|
|
20227
20112
|
@layer navi {
|
|
20228
20113
|
.navi_text {
|
|
20229
20114
|
&[data-skeleton] {
|
|
@@ -20532,7 +20417,7 @@ const shouldInjectSpacingBetween = (left, right) => {
|
|
|
20532
20417
|
};
|
|
20533
20418
|
const OverflowPinnedElementContext = createContext(null);
|
|
20534
20419
|
const Text = props => {
|
|
20535
|
-
import.meta.css = [css$
|
|
20420
|
+
import.meta.css = [css$8, "@jsenv/navi/src/text/text.jsx"];
|
|
20536
20421
|
if (props.loading || props.skeleton) {
|
|
20537
20422
|
return jsx(TextSkeleton, {
|
|
20538
20423
|
...props
|
|
@@ -20728,11 +20613,140 @@ const TextBasic = ({
|
|
|
20728
20613
|
});
|
|
20729
20614
|
};
|
|
20730
20615
|
|
|
20731
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
20616
|
+
installImportMetaCssBuild(import.meta);const css$7 = /* css */`
|
|
20617
|
+
.navi_text_anchor {
|
|
20618
|
+
vertical-align: baseline;
|
|
20619
|
+
user-select: none;
|
|
20620
|
+
overflow: hidden;
|
|
20621
|
+
}
|
|
20622
|
+
`;
|
|
20623
|
+
|
|
20624
|
+
/**
|
|
20625
|
+
* Positions children vertically relative to the surrounding text, correcting for font-size differences.
|
|
20626
|
+
*
|
|
20627
|
+
* Place this component around any inline element whose font-size differs from the surrounding text.
|
|
20628
|
+
* It renders an invisible anchor that inherits the surrounding text's font metrics, then shifts
|
|
20629
|
+
* the child so that its visual position matches the requested `textAnchor` value — regardless of
|
|
20630
|
+
* font-size, display type (inline, inline-block, inline-flex…), or the active `vertical-align`.
|
|
20631
|
+
*
|
|
20632
|
+
* @param {"line-top"|"char-top"|"center"|"char-bottom"|"line-bottom"} [textAnchor="char-bottom"]
|
|
20633
|
+
* - `"line-top"` — child top aligns with the top of the surrounding line box
|
|
20634
|
+
* - `"char-top"` — child top aligns with the top of visible characters (ink ascent)
|
|
20635
|
+
* - `"center"` — child is vertically centered on the surrounding line box
|
|
20636
|
+
* - `"char-bottom"` — child bottom aligns to the text baseline (no correction, browser default)
|
|
20637
|
+
* - `"line-bottom"` — child bottom aligns with the bottom of the surrounding line box
|
|
20638
|
+
* @param {{ size?: number, verticalAlign?: string }} [lineLayout]
|
|
20639
|
+
* Describes the surrounding line context. Used as layout-effect dependencies so the correction
|
|
20640
|
+
* reruns when the surrounding text's font-size or vertical-align changes.
|
|
20641
|
+
* @param {import("ignore:preact").RefObject} childRef — ref on the child element to reposition
|
|
20642
|
+
*/
|
|
20643
|
+
const TextAnchor = ({
|
|
20644
|
+
children,
|
|
20645
|
+
textAnchor = "char-bottom",
|
|
20646
|
+
childRef,
|
|
20647
|
+
lineLayout,
|
|
20648
|
+
size
|
|
20649
|
+
}) => {
|
|
20650
|
+
import.meta.css = [css$7, "@jsenv/navi/src/text/text_anchor.jsx"];
|
|
20651
|
+
const anchorRef = useRef();
|
|
20652
|
+
useLayoutEffect(() => {
|
|
20653
|
+
const anchorEl = anchorRef.current;
|
|
20654
|
+
const childEl = childRef.current;
|
|
20655
|
+
if (!anchorEl || !childEl) {
|
|
20656
|
+
return;
|
|
20657
|
+
}
|
|
20658
|
+
const topOffset = computeTopOffset({
|
|
20659
|
+
anchorEl,
|
|
20660
|
+
childEl,
|
|
20661
|
+
textAnchor
|
|
20662
|
+
});
|
|
20663
|
+
if (topOffset) {
|
|
20664
|
+
// position:relative + top shifts the element visually.
|
|
20665
|
+
// marginTop: -topOffset makes the layout box follow the visual position, so any container
|
|
20666
|
+
// (button, link, box…) computes its own padding/border/height based on the real final position
|
|
20667
|
+
// rather than the original unshifted one. This means a badge inside a button will symmetrically
|
|
20668
|
+
// expand the button height instead of overflowing or being clipped.
|
|
20669
|
+
// marginBottom: topOffset compensates the marginTop so the line height stays unchanged —
|
|
20670
|
+
// the shift is purely a repositioning, not an inflation of the line.
|
|
20671
|
+
childEl.style.position = "relative";
|
|
20672
|
+
childEl.style.top = `${topOffset}px`;
|
|
20673
|
+
childEl.style.marginTop = `${-topOffset}px`;
|
|
20674
|
+
childEl.style.marginBottom = `${topOffset}px`;
|
|
20675
|
+
} else {
|
|
20676
|
+
childEl.style.position = "";
|
|
20677
|
+
childEl.style.top = "";
|
|
20678
|
+
childEl.style.marginTop = "";
|
|
20679
|
+
childEl.style.marginBottom = "";
|
|
20680
|
+
}
|
|
20681
|
+
}, [size, textAnchor, lineLayout?.size, lineLayout?.verticalAlign]);
|
|
20682
|
+
return jsxs(Fragment, {
|
|
20683
|
+
children: [children, jsx("span", {
|
|
20684
|
+
ref: anchorRef,
|
|
20685
|
+
className: "navi_text_anchor",
|
|
20686
|
+
children: "\u200B"
|
|
20687
|
+
})]
|
|
20688
|
+
});
|
|
20689
|
+
};
|
|
20690
|
+
const computeTopOffset = ({
|
|
20691
|
+
anchorEl,
|
|
20692
|
+
childEl,
|
|
20693
|
+
textAnchor
|
|
20694
|
+
}) => {
|
|
20695
|
+
if (textAnchor === "char-bottom") {
|
|
20696
|
+
// Align child's bottom with the char's bottom = the baseline.
|
|
20697
|
+
// The CSS spec says an inline-block with no text content has its baseline at its bottom margin edge.
|
|
20698
|
+
// So the browser's default placement already puts the child's bottom at the line's baseline.
|
|
20699
|
+
// No correction needed.
|
|
20700
|
+
return 0;
|
|
20701
|
+
}
|
|
20702
|
+
// Only correct when the anchor lives in an inline formatting context.
|
|
20703
|
+
// If the parent is a flex/grid container, inline layout rules don't apply
|
|
20704
|
+
// and our font-metrics model is invalid.
|
|
20705
|
+
const parentDisplay = getComputedStyle(anchorEl.parentElement).display;
|
|
20706
|
+
if (parentDisplay !== "inline" && parentDisplay !== "inline-block" && parentDisplay !== "block") {
|
|
20707
|
+
return 0;
|
|
20708
|
+
}
|
|
20709
|
+
|
|
20710
|
+
// The anchor's rendered rect corresponds to the surrounding text's line box:
|
|
20711
|
+
// top and bottom are the visual bounds of the line (including line-height).
|
|
20712
|
+
const anchorRect = anchorEl.getBoundingClientRect();
|
|
20713
|
+
|
|
20714
|
+
// Measure the child's current rect, then subtract any previously applied top correction
|
|
20715
|
+
// to recover its natural position — avoiding a style reset + reflow.
|
|
20716
|
+
const childRect = childEl.getBoundingClientRect();
|
|
20717
|
+
const childH = childRect.height;
|
|
20718
|
+
const previousTop = parseFloat(childEl.style.top) || 0;
|
|
20719
|
+
const childNaturalTop = childRect.top - previousTop;
|
|
20720
|
+
|
|
20721
|
+
// Compute desired child top Y based on textAnchor intention.
|
|
20722
|
+
let desiredChildTopY = 0;
|
|
20723
|
+
if (textAnchor === "line-top") {
|
|
20724
|
+
desiredChildTopY = anchorRect.top;
|
|
20725
|
+
} else if (textAnchor === "char-top") {
|
|
20726
|
+
const anchorStyle = getComputedStyle(anchorEl);
|
|
20727
|
+
const ctx = charTopCanvas.getContext("2d");
|
|
20728
|
+
ctx.font = `${anchorStyle.fontWeight} ${anchorStyle.fontSize} ${anchorStyle.fontFamily}`;
|
|
20729
|
+
const m = ctx.measureText("M");
|
|
20730
|
+
const baselineY = anchorRect.bottom - m.fontBoundingBoxDescent;
|
|
20731
|
+
desiredChildTopY = baselineY - m.actualBoundingBoxAscent;
|
|
20732
|
+
} else if (textAnchor === "center") {
|
|
20733
|
+
const anchorCenterY = (anchorRect.top + anchorRect.bottom) / 2;
|
|
20734
|
+
desiredChildTopY = anchorCenterY - childH / 2;
|
|
20735
|
+
} else if (textAnchor === "char-bottom") {
|
|
20736
|
+
// Already handled above (early return 0), but guard here for completeness.
|
|
20737
|
+
return 0;
|
|
20738
|
+
} else if (textAnchor === "line-bottom") {
|
|
20739
|
+
desiredChildTopY = anchorRect.bottom - childH;
|
|
20740
|
+
}
|
|
20741
|
+
return desiredChildTopY - childNaturalTop;
|
|
20742
|
+
};
|
|
20743
|
+
const charTopCanvas = document.createElement("canvas");
|
|
20744
|
+
|
|
20745
|
+
installImportMetaCssBuild(import.meta);const css$6 = /* css */`
|
|
20732
20746
|
@layer navi {
|
|
20733
20747
|
/* Ensure data attributes from box.jsx can win to update display */
|
|
20734
20748
|
.navi_icon {
|
|
20735
|
-
display: inline-
|
|
20749
|
+
display: inline-flex;
|
|
20736
20750
|
box-sizing: border-box;
|
|
20737
20751
|
max-width: 100%;
|
|
20738
20752
|
max-height: 100%;
|
|
@@ -20743,12 +20757,14 @@ installImportMetaCssBuild(import.meta);const css$5 = /* css */`
|
|
|
20743
20757
|
white-space: nowrap;
|
|
20744
20758
|
vertical-align: inherit;
|
|
20745
20759
|
|
|
20746
|
-
&[data-flow-inline] {
|
|
20747
|
-
width: 1em;
|
|
20748
|
-
height: 1em;
|
|
20749
|
-
}
|
|
20750
20760
|
&[data-icon-char] {
|
|
20761
|
+
aspect-ratio: 1/1;
|
|
20762
|
+
min-width: 0;
|
|
20763
|
+
height: 1em;
|
|
20764
|
+
max-height: 1em;
|
|
20751
20765
|
flex-grow: 0 !important;
|
|
20766
|
+
align-items: center;
|
|
20767
|
+
justify-content: center;
|
|
20752
20768
|
|
|
20753
20769
|
svg,
|
|
20754
20770
|
img {
|
|
@@ -20759,32 +20775,15 @@ installImportMetaCssBuild(import.meta);const css$5 = /* css */`
|
|
|
20759
20775
|
overflow: visible;
|
|
20760
20776
|
}
|
|
20761
20777
|
}
|
|
20778
|
+
&[data-flow-inline] {
|
|
20779
|
+
width: 1em;
|
|
20780
|
+
height: 1em;
|
|
20781
|
+
}
|
|
20762
20782
|
&[data-interactive] {
|
|
20763
20783
|
cursor: pointer;
|
|
20764
20784
|
}
|
|
20765
20785
|
}
|
|
20766
20786
|
|
|
20767
|
-
.navi_icon_char_slot {
|
|
20768
|
-
opacity: 0;
|
|
20769
|
-
cursor: default;
|
|
20770
|
-
user-select: none;
|
|
20771
|
-
}
|
|
20772
|
-
.navi_text.navi_icon_foreground {
|
|
20773
|
-
position: absolute;
|
|
20774
|
-
inset: 0;
|
|
20775
|
-
display: inline-flex;
|
|
20776
|
-
|
|
20777
|
-
& > .navi_text {
|
|
20778
|
-
display: flex;
|
|
20779
|
-
aspect-ratio: 1 / 1;
|
|
20780
|
-
min-width: 0;
|
|
20781
|
-
height: 100%;
|
|
20782
|
-
max-height: 1em;
|
|
20783
|
-
align-items: center;
|
|
20784
|
-
justify-content: center;
|
|
20785
|
-
}
|
|
20786
|
-
}
|
|
20787
|
-
|
|
20788
20787
|
.navi_icon > svg,
|
|
20789
20788
|
.navi_icon > img {
|
|
20790
20789
|
width: 100%;
|
|
@@ -20810,16 +20809,13 @@ installImportMetaCssBuild(import.meta);const css$5 = /* css */`
|
|
|
20810
20809
|
const Icon = ({
|
|
20811
20810
|
href,
|
|
20812
20811
|
children,
|
|
20813
|
-
charWidth = 1,
|
|
20814
|
-
// 0 (zéro) is the real char width
|
|
20815
|
-
// but 2 zéros gives too big icons
|
|
20816
|
-
// while 1 "W" gives a nice result
|
|
20817
|
-
baseChar = "W",
|
|
20818
20812
|
decorative,
|
|
20819
20813
|
onClick,
|
|
20814
|
+
textAnchor = "center",
|
|
20815
|
+
lineLayout,
|
|
20820
20816
|
...props
|
|
20821
20817
|
}) => {
|
|
20822
|
-
import.meta.css = [css$
|
|
20818
|
+
import.meta.css = [css$6, "@jsenv/navi/src/text/icon.jsx"];
|
|
20823
20819
|
const innerChildren = href ? jsx("svg", {
|
|
20824
20820
|
width: "100%",
|
|
20825
20821
|
height: "100%",
|
|
@@ -20876,10 +20872,11 @@ const Icon = ({
|
|
|
20876
20872
|
children: innerChildren
|
|
20877
20873
|
});
|
|
20878
20874
|
}
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
|
|
20875
|
+
return jsx(TextAnchor, {
|
|
20876
|
+
textAnchor: textAnchor,
|
|
20877
|
+
lineLayout: lineLayout,
|
|
20882
20878
|
childRef: textRef,
|
|
20879
|
+
size: props.size,
|
|
20883
20880
|
children: jsxs(Text, {
|
|
20884
20881
|
...props,
|
|
20885
20882
|
...ariaProps,
|
|
@@ -20892,14 +20889,9 @@ const Icon = ({
|
|
|
20892
20889
|
onClick: onClick,
|
|
20893
20890
|
ref: textRef,
|
|
20894
20891
|
children: [jsx("span", {
|
|
20895
|
-
|
|
20896
|
-
|
|
20897
|
-
|
|
20898
|
-
}), jsx(Text, {
|
|
20899
|
-
className: "navi_icon_foreground",
|
|
20900
|
-
spacing: "pre",
|
|
20901
|
-
children: innerChildren
|
|
20902
|
-
})]
|
|
20892
|
+
style: "user-select:none",
|
|
20893
|
+
children: "\u200B"
|
|
20894
|
+
}), innerChildren]
|
|
20903
20895
|
})
|
|
20904
20896
|
});
|
|
20905
20897
|
};
|
|
@@ -21425,7 +21417,7 @@ const useUIState = (uiStateController) => {
|
|
|
21425
21417
|
return trackedUIState;
|
|
21426
21418
|
};
|
|
21427
21419
|
|
|
21428
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
21420
|
+
installImportMetaCssBuild(import.meta);const css$5 = /* css */`
|
|
21429
21421
|
@layer navi {
|
|
21430
21422
|
.navi_button {
|
|
21431
21423
|
--button-outline-width: 1px;
|
|
@@ -21502,7 +21494,6 @@ installImportMetaCssBuild(import.meta);const css$4 = /* css */`
|
|
|
21502
21494
|
box-sizing: border-box;
|
|
21503
21495
|
aspect-ratio: inherit;
|
|
21504
21496
|
padding: 0;
|
|
21505
|
-
vertical-align: middle;
|
|
21506
21497
|
background: none;
|
|
21507
21498
|
border: none;
|
|
21508
21499
|
border-radius: var(--x-button-border-radius);
|
|
@@ -21677,7 +21668,7 @@ installImportMetaCssBuild(import.meta);const css$4 = /* css */`
|
|
|
21677
21668
|
}
|
|
21678
21669
|
`;
|
|
21679
21670
|
const Button = props => {
|
|
21680
|
-
import.meta.css = [css$
|
|
21671
|
+
import.meta.css = [css$5, "@jsenv/navi/src/field/button.jsx"];
|
|
21681
21672
|
return renderActionableComponent(props, {
|
|
21682
21673
|
Basic: ButtonBasic,
|
|
21683
21674
|
WithAction: ButtonWithAction,
|
|
@@ -22242,7 +22233,7 @@ const useDimColorWhen = (elementRef, shouldDim) => {
|
|
|
22242
22233
|
};
|
|
22243
22234
|
|
|
22244
22235
|
installImportMetaCssBuild(import.meta);/* eslint-disable jsenv/no-unknown-params */
|
|
22245
|
-
const css$
|
|
22236
|
+
const css$4 = /* css */`
|
|
22246
22237
|
@layer navi {
|
|
22247
22238
|
.navi_link {
|
|
22248
22239
|
--link-border-radius: unset;
|
|
@@ -22563,7 +22554,7 @@ Object.assign(PSEUDO_CLASSES, {
|
|
|
22563
22554
|
}
|
|
22564
22555
|
});
|
|
22565
22556
|
const Link = props => {
|
|
22566
|
-
import.meta.css = [css$
|
|
22557
|
+
import.meta.css = [css$4, "@jsenv/navi/src/nav/link/link.jsx"];
|
|
22567
22558
|
return renderActionableComponent(props, {
|
|
22568
22559
|
Basic: LinkBasic,
|
|
22569
22560
|
WithAction: LinkWithAction
|
|
@@ -22825,7 +22816,7 @@ installImportMetaCssBuild(import.meta);/**
|
|
|
22825
22816
|
* TabList component with support for horizontal and vertical layouts
|
|
22826
22817
|
* https://dribbble.com/search/tabs
|
|
22827
22818
|
*/
|
|
22828
|
-
const css$
|
|
22819
|
+
const css$3 = /* css */`
|
|
22829
22820
|
@layer navi {
|
|
22830
22821
|
.navi_nav {
|
|
22831
22822
|
--nav-border: none;
|
|
@@ -22862,6 +22853,8 @@ const css$2 = /* css */`
|
|
|
22862
22853
|
/* overflow-y: hidden; */
|
|
22863
22854
|
|
|
22864
22855
|
.navi_link {
|
|
22856
|
+
user-select: none;
|
|
22857
|
+
|
|
22865
22858
|
--x-nav-child-border-radius: calc(
|
|
22866
22859
|
var(--nav-border-radius) - var(--nav-padding)
|
|
22867
22860
|
);
|
|
@@ -22959,7 +22952,7 @@ const Nav = ({
|
|
|
22959
22952
|
panelBorderConnection,
|
|
22960
22953
|
...props
|
|
22961
22954
|
}) => {
|
|
22962
|
-
import.meta.css = [css$
|
|
22955
|
+
import.meta.css = [css$3, "@jsenv/navi/src/nav/link/nav.jsx"];
|
|
22963
22956
|
children = toChildArray(children);
|
|
22964
22957
|
return jsx(Box, {
|
|
22965
22958
|
as: "nav",
|
|
@@ -24848,7 +24841,7 @@ const InputRadioWithAction = () => {
|
|
|
24848
24841
|
throw new Error(`<Input type="radio" /> with an action make no sense. Use <RadioList action={something} /> instead`);
|
|
24849
24842
|
};
|
|
24850
24843
|
|
|
24851
|
-
installImportMetaCssBuild(import.meta);
|
|
24844
|
+
installImportMetaCssBuild(import.meta);const css$2 = /* css */`
|
|
24852
24845
|
@layer navi {
|
|
24853
24846
|
.navi_input_range {
|
|
24854
24847
|
--border-radius: 6px;
|
|
@@ -25055,8 +25048,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
25055
25048
|
.navi_input_range[data-callout] {
|
|
25056
25049
|
/* What can we do? */
|
|
25057
25050
|
}
|
|
25058
|
-
|
|
25051
|
+
`;
|
|
25059
25052
|
const InputRange = props => {
|
|
25053
|
+
import.meta.css = [css$2, "@jsenv/navi/src/field/input_range.jsx"];
|
|
25060
25054
|
const uiStateController = useUIStateController(props, "input");
|
|
25061
25055
|
const uiState = useUIState(uiStateController);
|
|
25062
25056
|
const input = renderActionableComponent(props, {
|
|
@@ -26545,10 +26539,10 @@ const RadioListBasic = props => {
|
|
|
26545
26539
|
const innerDisabled = disabled || contextDisabled;
|
|
26546
26540
|
return jsx(Box, {
|
|
26547
26541
|
"data-action": rest["data-action"],
|
|
26548
|
-
|
|
26542
|
+
flex: "y",
|
|
26549
26543
|
...rest,
|
|
26550
26544
|
baseClassName: "navi_radio_list",
|
|
26551
|
-
"data-radio-list":
|
|
26545
|
+
"data-radio-list": "",
|
|
26552
26546
|
onresetuistate: e => {
|
|
26553
26547
|
uiStateController.resetUIState(e);
|
|
26554
26548
|
},
|
|
@@ -30663,6 +30657,8 @@ const BadgeCount = ({
|
|
|
30663
30657
|
integer,
|
|
30664
30658
|
lang,
|
|
30665
30659
|
loading,
|
|
30660
|
+
textAnchor = "center",
|
|
30661
|
+
lineLayout,
|
|
30666
30662
|
...props
|
|
30667
30663
|
}) => {
|
|
30668
30664
|
import.meta.css = [css, "@jsenv/navi/src/text/badge_count.jsx"];
|
|
@@ -30685,9 +30681,11 @@ const BadgeCount = ({
|
|
|
30685
30681
|
circle = false;
|
|
30686
30682
|
}
|
|
30687
30683
|
if (circle) {
|
|
30688
|
-
return jsx(
|
|
30689
|
-
|
|
30684
|
+
return jsx(TextAnchor, {
|
|
30685
|
+
textAnchor: textAnchor,
|
|
30686
|
+
lineLayout: lineLayout,
|
|
30690
30687
|
childRef: ref,
|
|
30688
|
+
size: props.size,
|
|
30691
30689
|
children: jsxs(BadgeCountCircle, {
|
|
30692
30690
|
...props,
|
|
30693
30691
|
loading: loading,
|
|
@@ -30701,9 +30699,11 @@ const BadgeCount = ({
|
|
|
30701
30699
|
const valueFormatted = typeof valueDisplayed === "number" ? formatNumber(valueDisplayed, {
|
|
30702
30700
|
lang
|
|
30703
30701
|
}) : valueDisplayed;
|
|
30704
|
-
return jsx(
|
|
30705
|
-
|
|
30702
|
+
return jsx(TextAnchor, {
|
|
30703
|
+
textAnchor: textAnchor,
|
|
30704
|
+
lineLayout: lineLayout,
|
|
30706
30705
|
childRef: ref,
|
|
30706
|
+
size: props.size,
|
|
30707
30707
|
children: jsxs(BadgeCountEllipse, {
|
|
30708
30708
|
...props,
|
|
30709
30709
|
loading: loading,
|
|
@@ -31642,10 +31642,9 @@ const getMeterLevel = (value, min, max, low, high, optimum) => {
|
|
|
31642
31642
|
|
|
31643
31643
|
const Paragraph = props => {
|
|
31644
31644
|
return jsx(Text, {
|
|
31645
|
-
marginTop: "
|
|
31645
|
+
marginTop: "m",
|
|
31646
31646
|
...props,
|
|
31647
|
-
as: "p"
|
|
31648
|
-
...props
|
|
31647
|
+
as: "p"
|
|
31649
31648
|
});
|
|
31650
31649
|
};
|
|
31651
31650
|
|