@jsenv/navi 0.22.3 → 0.23.0
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 +360 -138
- package/dist/jsenv_navi.js.map +56 -52
- package/dist/jsenv_navi_side_effects.js +13 -4
- package/dist/jsenv_navi_side_effects.js.map +2 -2
- package/package.json +1 -1
package/dist/jsenv_navi.js
CHANGED
|
@@ -6166,12 +6166,12 @@ const withPropsClassName = (baseClassName, classNameFromProps) => {
|
|
|
6166
6166
|
const BoxFlowContext = createContext();
|
|
6167
6167
|
|
|
6168
6168
|
const normalizeSpacingStyle = (value, property = "padding") => {
|
|
6169
|
-
const
|
|
6170
|
-
return
|
|
6169
|
+
const cssValue = SIZE_MAP[value];
|
|
6170
|
+
return cssValue || stringifyStyle(value, property);
|
|
6171
6171
|
};
|
|
6172
6172
|
const normalizeTypoStyle = (value, property = "fontSize") => {
|
|
6173
|
-
const
|
|
6174
|
-
return
|
|
6173
|
+
const cssValue = TYPO_SIZE_MAP[value];
|
|
6174
|
+
return cssValue || stringifyStyle(value, property);
|
|
6175
6175
|
};
|
|
6176
6176
|
|
|
6177
6177
|
const PASS_THROUGH = { name: "pass_through" };
|
|
@@ -6450,6 +6450,7 @@ const POSITION_PROPS = {
|
|
|
6450
6450
|
relative: applyToCssPropWhenTruthy("position", "relative", "static"),
|
|
6451
6451
|
fixed: applyToCssPropWhenTruthy("position", "fixed", "static"),
|
|
6452
6452
|
sticky: applyToCssPropWhenTruthy("position", "sticky", "static"),
|
|
6453
|
+
zIndex: PASS_THROUGH,
|
|
6453
6454
|
left: (value) => {
|
|
6454
6455
|
return { left: value === true ? 0 : value };
|
|
6455
6456
|
},
|
|
@@ -6684,7 +6685,6 @@ const getVisualChildStylePropStrategy = (name) => {
|
|
|
6684
6685
|
};
|
|
6685
6686
|
|
|
6686
6687
|
const isStyleProp = (name) => STYLE_PROP_NAME_SET.has(name);
|
|
6687
|
-
const isCSSVar = (name) => name.startsWith("--");
|
|
6688
6688
|
|
|
6689
6689
|
const getStylePropGroup = (name) => {
|
|
6690
6690
|
if (FLOW_PROP_NAME_SET.has(name)) {
|
|
@@ -6756,39 +6756,32 @@ const prepareStyleValue = (
|
|
|
6756
6756
|
// Unified design scale using t-shirt sizes with rem units for accessibility.
|
|
6757
6757
|
// This scale is used for spacing to create visual harmony
|
|
6758
6758
|
// and consistent proportions throughout the design system.
|
|
6759
|
-
const
|
|
6760
|
-
xxs: "
|
|
6761
|
-
xs: "
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
xl: "
|
|
6766
|
-
xxl: "
|
|
6767
|
-
};
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6759
|
+
const SIZE_MAP = {
|
|
6760
|
+
xxs: "var(--navi-xxs)",
|
|
6761
|
+
xs: "var(--navi-xs)",
|
|
6762
|
+
s: "var(--navi-s)",
|
|
6763
|
+
m: "var(--navi-m)",
|
|
6764
|
+
l: "var(--navi-l)",
|
|
6765
|
+
xl: "var(--navi-xl)",
|
|
6766
|
+
xxl: "var(--navi-xxl)",
|
|
6767
|
+
};
|
|
6768
|
+
const TYPO_SIZE_MAP = {
|
|
6769
|
+
xxs: "var(--navi-typo-xxs)",
|
|
6770
|
+
xs: "var(--navi-typo-xs)",
|
|
6771
|
+
s: "var(--navi-typo-s)",
|
|
6772
|
+
m: "var(--navi-typo-m)",
|
|
6773
|
+
l: "var(--navi-typo-l)",
|
|
6774
|
+
xl: "var(--navi-typo-xl)",
|
|
6775
|
+
xxl: "var(--navi-typo-xxl)",
|
|
6776
|
+
};
|
|
6777
|
+
const sizeSpacingScaleKeys = new Set(Object.keys(SIZE_MAP));
|
|
6772
6778
|
const isSizeSpacingScaleKey = (key) => {
|
|
6773
6779
|
return sizeSpacingScaleKeys.has(key);
|
|
6774
6780
|
};
|
|
6775
6781
|
const resolveSpacingSize = (size, property = "padding") => {
|
|
6776
|
-
return stringifyStyle(
|
|
6782
|
+
return stringifyStyle(SIZE_MAP[size] || size, property);
|
|
6777
6783
|
};
|
|
6778
6784
|
|
|
6779
|
-
const sizeTypoScale = {
|
|
6780
|
-
xxs: "0.625rem", // 0.625 = 10px at 16px base (smaller than before for more range)
|
|
6781
|
-
xs: "0.75rem", // 0.75 = 12px at 16px base
|
|
6782
|
-
sm: "0.875rem", // 0.875 = 14px at 16px base
|
|
6783
|
-
md: "1rem", // 1 = 16px at 16px base (base font size)
|
|
6784
|
-
lg: "1.125rem", // 1.125 = 18px at 16px base
|
|
6785
|
-
xl: "1.25rem", // 1.25 = 20px at 16px base
|
|
6786
|
-
xxl: "1.5rem", // 1.5 = 24px at 16px base
|
|
6787
|
-
};
|
|
6788
|
-
sizeTypoScale.s = sizeTypoScale.sm;
|
|
6789
|
-
sizeTypoScale.m = sizeTypoScale.md;
|
|
6790
|
-
sizeTypoScale.l = sizeTypoScale.lg;
|
|
6791
|
-
|
|
6792
6785
|
const DEFAULT_DISPLAY_BY_TAG_NAME = {
|
|
6793
6786
|
"inline": new Set([
|
|
6794
6787
|
"a",
|
|
@@ -7785,7 +7778,7 @@ const Box = props => {
|
|
|
7785
7778
|
addStyle(value, name, styleContext, boxStylesTarget, context);
|
|
7786
7779
|
return;
|
|
7787
7780
|
}
|
|
7788
|
-
if (
|
|
7781
|
+
if (name.startsWith("--")) {
|
|
7789
7782
|
addStyle(value, name, styleContext, boxStylesTarget, context);
|
|
7790
7783
|
return;
|
|
7791
7784
|
}
|
|
@@ -20109,7 +20102,7 @@ const selectByTextStrings = (element, range, startText, endText) => {
|
|
|
20109
20102
|
};
|
|
20110
20103
|
|
|
20111
20104
|
installImportMetaCssBuild(import.meta);/* eslint-disable jsenv/no-unknown-params */
|
|
20112
|
-
const css$
|
|
20105
|
+
const css$u = /* css */`
|
|
20113
20106
|
@layer navi {
|
|
20114
20107
|
.navi_text {
|
|
20115
20108
|
&[data-skeleton] {
|
|
@@ -20348,9 +20341,9 @@ const applySpacingOnTextChildren = (children, spacing, defaultSpace) => {
|
|
|
20348
20341
|
if (spacing === REGULAR_SPACE || spacing === FAKE_SPACE) {
|
|
20349
20342
|
separator = defaultSpace;
|
|
20350
20343
|
} else if (typeof spacing === "string") {
|
|
20351
|
-
if (isSizeSpacingScaleKey(spacing) || hasCSSSizeUnit(spacing)) {
|
|
20344
|
+
if (isSizeSpacingScaleKey(spacing) || hasCSSSizeUnit(spacing) || spacing.startsWith("var(")) {
|
|
20352
20345
|
separator = jsx(CustomWidthSpace, {
|
|
20353
|
-
value:
|
|
20346
|
+
value: spacing,
|
|
20354
20347
|
useRealSpaceChar: useRealSpaceChar
|
|
20355
20348
|
});
|
|
20356
20349
|
} else {
|
|
@@ -20418,7 +20411,7 @@ const shouldInjectSpacingBetween = (left, right) => {
|
|
|
20418
20411
|
};
|
|
20419
20412
|
const OverflowPinnedElementContext = createContext(null);
|
|
20420
20413
|
const Text = props => {
|
|
20421
|
-
import.meta.css = [css$
|
|
20414
|
+
import.meta.css = [css$u, "@jsenv/navi/src/text/text.jsx"];
|
|
20422
20415
|
if (props.loading || props.skeleton) {
|
|
20423
20416
|
return jsx(TextSkeleton, {
|
|
20424
20417
|
...props
|
|
@@ -20614,7 +20607,7 @@ const TextBasic = ({
|
|
|
20614
20607
|
});
|
|
20615
20608
|
};
|
|
20616
20609
|
|
|
20617
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
20610
|
+
installImportMetaCssBuild(import.meta);const css$t = /* css */`
|
|
20618
20611
|
.navi_text_anchor {
|
|
20619
20612
|
vertical-align: baseline;
|
|
20620
20613
|
user-select: none;
|
|
@@ -20642,13 +20635,14 @@ installImportMetaCssBuild(import.meta);const css$7 = /* css */`
|
|
|
20642
20635
|
* @param {import("ignore:preact").RefObject} childRef — ref on the child element to reposition
|
|
20643
20636
|
*/
|
|
20644
20637
|
const TextAnchor = ({
|
|
20638
|
+
childRef,
|
|
20645
20639
|
children,
|
|
20646
20640
|
textAnchor = "char-bottom",
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20641
|
+
textKey,
|
|
20642
|
+
textSize,
|
|
20643
|
+
lineLayout
|
|
20650
20644
|
}) => {
|
|
20651
|
-
import.meta.css = [css$
|
|
20645
|
+
import.meta.css = [css$t, "@jsenv/navi/src/text/text_anchor.jsx"];
|
|
20652
20646
|
const anchorRef = useRef();
|
|
20653
20647
|
useLayoutEffect(() => {
|
|
20654
20648
|
const anchorEl = anchorRef.current;
|
|
@@ -20679,7 +20673,7 @@ const TextAnchor = ({
|
|
|
20679
20673
|
childEl.style.marginTop = "";
|
|
20680
20674
|
childEl.style.marginBottom = "";
|
|
20681
20675
|
}
|
|
20682
|
-
}, [
|
|
20676
|
+
}, [textAnchor, textKey, textSize, lineLayout?.size, lineLayout?.verticalAlign]);
|
|
20683
20677
|
return jsxs(Fragment, {
|
|
20684
20678
|
children: [children, jsx("span", {
|
|
20685
20679
|
ref: anchorRef,
|
|
@@ -20743,7 +20737,7 @@ const computeTopOffset = ({
|
|
|
20743
20737
|
};
|
|
20744
20738
|
const charTopCanvas = document.createElement("canvas");
|
|
20745
20739
|
|
|
20746
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
20740
|
+
installImportMetaCssBuild(import.meta);const css$s = /* css */`
|
|
20747
20741
|
@layer navi {
|
|
20748
20742
|
/* Ensure data attributes from box.jsx can win to update display */
|
|
20749
20743
|
.navi_icon {
|
|
@@ -20816,7 +20810,7 @@ const Icon = ({
|
|
|
20816
20810
|
lineLayout,
|
|
20817
20811
|
...props
|
|
20818
20812
|
}) => {
|
|
20819
|
-
import.meta.css = [css$
|
|
20813
|
+
import.meta.css = [css$s, "@jsenv/navi/src/text/icon.jsx"];
|
|
20820
20814
|
const innerChildren = href ? jsx("svg", {
|
|
20821
20815
|
width: "100%",
|
|
20822
20816
|
height: "100%",
|
|
@@ -20874,10 +20868,10 @@ const Icon = ({
|
|
|
20874
20868
|
});
|
|
20875
20869
|
}
|
|
20876
20870
|
return jsx(TextAnchor, {
|
|
20871
|
+
childRef: textRef,
|
|
20877
20872
|
textAnchor: textAnchor,
|
|
20873
|
+
textSize: props.size,
|
|
20878
20874
|
lineLayout: lineLayout,
|
|
20879
|
-
childRef: textRef,
|
|
20880
|
-
size: props.size,
|
|
20881
20875
|
children: jsxs(Text, {
|
|
20882
20876
|
...props,
|
|
20883
20877
|
...ariaProps,
|
|
@@ -21418,7 +21412,7 @@ const useUIState = (uiStateController) => {
|
|
|
21418
21412
|
return trackedUIState;
|
|
21419
21413
|
};
|
|
21420
21414
|
|
|
21421
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
21415
|
+
installImportMetaCssBuild(import.meta);const css$r = /* css */`
|
|
21422
21416
|
@layer navi {
|
|
21423
21417
|
.navi_button {
|
|
21424
21418
|
--button-outline-width: 1px;
|
|
@@ -21672,7 +21666,7 @@ installImportMetaCssBuild(import.meta);const css$5 = /* css */`
|
|
|
21672
21666
|
}
|
|
21673
21667
|
`;
|
|
21674
21668
|
const Button = props => {
|
|
21675
|
-
import.meta.css = [css$
|
|
21669
|
+
import.meta.css = [css$r, "@jsenv/navi/src/field/button.jsx"];
|
|
21676
21670
|
return renderActionableComponent(props, {
|
|
21677
21671
|
Basic: ButtonBasic,
|
|
21678
21672
|
WithAction: ButtonWithAction,
|
|
@@ -22237,7 +22231,7 @@ const useDimColorWhen = (elementRef, shouldDim) => {
|
|
|
22237
22231
|
};
|
|
22238
22232
|
|
|
22239
22233
|
installImportMetaCssBuild(import.meta);/* eslint-disable jsenv/no-unknown-params */
|
|
22240
|
-
const css$
|
|
22234
|
+
const css$q = /* css */`
|
|
22241
22235
|
@layer navi {
|
|
22242
22236
|
.navi_link {
|
|
22243
22237
|
--link-border-radius: unset;
|
|
@@ -22558,7 +22552,7 @@ Object.assign(PSEUDO_CLASSES, {
|
|
|
22558
22552
|
}
|
|
22559
22553
|
});
|
|
22560
22554
|
const Link = props => {
|
|
22561
|
-
import.meta.css = [css$
|
|
22555
|
+
import.meta.css = [css$q, "@jsenv/navi/src/nav/link/link.jsx"];
|
|
22562
22556
|
return renderActionableComponent(props, {
|
|
22563
22557
|
Basic: LinkBasic,
|
|
22564
22558
|
WithAction: LinkWithAction
|
|
@@ -22820,7 +22814,7 @@ installImportMetaCssBuild(import.meta);/**
|
|
|
22820
22814
|
* TabList component with support for horizontal and vertical layouts
|
|
22821
22815
|
* https://dribbble.com/search/tabs
|
|
22822
22816
|
*/
|
|
22823
|
-
const css$
|
|
22817
|
+
const css$p = /* css */`
|
|
22824
22818
|
@layer navi {
|
|
22825
22819
|
.navi_nav {
|
|
22826
22820
|
--nav-border: none;
|
|
@@ -22956,7 +22950,7 @@ const Nav = ({
|
|
|
22956
22950
|
panelBorderConnection,
|
|
22957
22951
|
...props
|
|
22958
22952
|
}) => {
|
|
22959
|
-
import.meta.css = [css$
|
|
22953
|
+
import.meta.css = [css$p, "@jsenv/navi/src/nav/link/nav.jsx"];
|
|
22960
22954
|
children = toChildArray(children);
|
|
22961
22955
|
return jsx(Box, {
|
|
22962
22956
|
as: "nav",
|
|
@@ -23004,7 +22998,7 @@ const useFocusGroup = (
|
|
|
23004
22998
|
|
|
23005
22999
|
installImportMetaCssBuild(import.meta);const rightArrowPath = "M680-480L360-160l-80-80 240-240-240-240 80-80 320 320z";
|
|
23006
23000
|
const downArrowPath = "M480-280L160-600l80-80 240 240 240-240 80 80-320 320z";
|
|
23007
|
-
|
|
23001
|
+
const css$o = /* css */`
|
|
23008
23002
|
.navi_summary_marker {
|
|
23009
23003
|
width: 1em;
|
|
23010
23004
|
height: 1em;
|
|
@@ -23084,11 +23078,12 @@ import.meta.css = [/* css */`
|
|
|
23084
23078
|
d: path("${rightArrowPath}");
|
|
23085
23079
|
}
|
|
23086
23080
|
}
|
|
23087
|
-
|
|
23081
|
+
`;
|
|
23088
23082
|
const SummaryMarker = ({
|
|
23089
23083
|
open,
|
|
23090
23084
|
loading
|
|
23091
23085
|
}) => {
|
|
23086
|
+
import.meta.css = [css$o, "@jsenv/navi/src/field/details/summary_marker.jsx"];
|
|
23092
23087
|
const showLoading = useDebounceTrue(loading, 300);
|
|
23093
23088
|
const mountedRef = useRef(false);
|
|
23094
23089
|
const prevOpenRef = useRef(open);
|
|
@@ -23142,7 +23137,7 @@ const SummaryMarker = ({
|
|
|
23142
23137
|
});
|
|
23143
23138
|
};
|
|
23144
23139
|
|
|
23145
|
-
installImportMetaCssBuild(import.meta);
|
|
23140
|
+
installImportMetaCssBuild(import.meta);const css$n = /* css */`
|
|
23146
23141
|
.navi_details {
|
|
23147
23142
|
position: relative;
|
|
23148
23143
|
z-index: 1;
|
|
@@ -23177,8 +23172,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
23177
23172
|
}
|
|
23178
23173
|
}
|
|
23179
23174
|
}
|
|
23180
|
-
|
|
23175
|
+
`;
|
|
23181
23176
|
const Details = props => {
|
|
23177
|
+
import.meta.css = [css$n, "@jsenv/navi/src/field/details/details.jsx"];
|
|
23182
23178
|
const {
|
|
23183
23179
|
value = "on",
|
|
23184
23180
|
persists
|
|
@@ -23493,7 +23489,7 @@ const fieldPropSet = new Set([
|
|
|
23493
23489
|
"data-testid",
|
|
23494
23490
|
]);
|
|
23495
23491
|
|
|
23496
|
-
installImportMetaCssBuild(import.meta);
|
|
23492
|
+
installImportMetaCssBuild(import.meta);const css$m = /* css */`
|
|
23497
23493
|
@layer navi {
|
|
23498
23494
|
label {
|
|
23499
23495
|
&[data-interactive] {
|
|
@@ -23507,7 +23503,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
23507
23503
|
}
|
|
23508
23504
|
}
|
|
23509
23505
|
}
|
|
23510
|
-
|
|
23506
|
+
`;
|
|
23511
23507
|
const ReportReadOnlyOnLabelContext = createContext();
|
|
23512
23508
|
const ReportDisabledOnLabelContext = createContext();
|
|
23513
23509
|
const ReportInteractiveOnLabelContext = createContext();
|
|
@@ -23525,6 +23521,7 @@ const reportDisabledToLabel = value => {
|
|
|
23525
23521
|
};
|
|
23526
23522
|
const LabelPseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":-navi-loading"];
|
|
23527
23523
|
const Label = props => {
|
|
23524
|
+
import.meta.css = [css$m, "@jsenv/navi/src/field/label.jsx"];
|
|
23528
23525
|
const {
|
|
23529
23526
|
readOnly,
|
|
23530
23527
|
disabled,
|
|
@@ -23558,7 +23555,7 @@ const Label = props => {
|
|
|
23558
23555
|
});
|
|
23559
23556
|
};
|
|
23560
23557
|
|
|
23561
|
-
installImportMetaCssBuild(import.meta);
|
|
23558
|
+
installImportMetaCssBuild(import.meta);const css$l = /* css */`
|
|
23562
23559
|
@layer navi {
|
|
23563
23560
|
.navi_checkbox {
|
|
23564
23561
|
--margin: 3px 3px 3px 4px;
|
|
@@ -23883,8 +23880,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
23883
23880
|
}
|
|
23884
23881
|
}
|
|
23885
23882
|
}
|
|
23886
|
-
|
|
23883
|
+
`;
|
|
23887
23884
|
const InputCheckbox = props => {
|
|
23885
|
+
import.meta.css = [css$l, "@jsenv/navi/src/field/input_checkbox.jsx"];
|
|
23888
23886
|
const {
|
|
23889
23887
|
value = "on"
|
|
23890
23888
|
} = props;
|
|
@@ -24153,15 +24151,8 @@ const InputCheckboxWithAction = props => {
|
|
|
24153
24151
|
});
|
|
24154
24152
|
};
|
|
24155
24153
|
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
@layer navi {
|
|
24159
|
-
.navi_checkbox_list {
|
|
24160
|
-
display: flex;
|
|
24161
|
-
flex-direction: column;
|
|
24162
|
-
}
|
|
24163
|
-
}
|
|
24164
|
-
`, "@jsenv/navi/src/field/checkbox_list.jsx"];
|
|
24154
|
+
// TOFIX: select in data then reset, it reset to red/blue instead of red/blue/green
|
|
24155
|
+
|
|
24165
24156
|
const CheckboxList = forwardRef((props, ref) => {
|
|
24166
24157
|
const uiStateController = useUIGroupStateController(props, "checkbox_list", {
|
|
24167
24158
|
childComponentType: "checkbox",
|
|
@@ -24205,15 +24196,13 @@ const CheckboxListBasic = forwardRef((props, ref) => {
|
|
|
24205
24196
|
const innerLoading = loading || contextLoading;
|
|
24206
24197
|
const innerReadOnly = readOnly || contextReadOnly || innerLoading || uiStateController.readOnly;
|
|
24207
24198
|
const innerDisabled = disabled || contextDisabled;
|
|
24208
|
-
return jsx(
|
|
24199
|
+
return jsx(Box, {
|
|
24200
|
+
flex: true,
|
|
24209
24201
|
...rest,
|
|
24210
24202
|
ref: innerRef,
|
|
24211
24203
|
name: name,
|
|
24212
|
-
|
|
24213
|
-
"data-checkbox-list":
|
|
24214
|
-
// eslint-disable-next-line react/no-unknown-property
|
|
24215
|
-
,
|
|
24216
|
-
|
|
24204
|
+
baseClassName: "navi_checkbox_list",
|
|
24205
|
+
"data-checkbox-list": "",
|
|
24217
24206
|
onresetuistate: e => {
|
|
24218
24207
|
uiStateController.resetUIState(e);
|
|
24219
24208
|
},
|
|
@@ -24307,7 +24296,7 @@ forwardRef((props, ref) => {
|
|
|
24307
24296
|
});
|
|
24308
24297
|
});
|
|
24309
24298
|
|
|
24310
|
-
installImportMetaCssBuild(import.meta);
|
|
24299
|
+
installImportMetaCssBuild(import.meta);const css$k = /* css */`
|
|
24311
24300
|
@layer navi {
|
|
24312
24301
|
.navi_radio {
|
|
24313
24302
|
--margin: 3px 3px 0 5px;
|
|
@@ -24598,8 +24587,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
24598
24587
|
}
|
|
24599
24588
|
}
|
|
24600
24589
|
}
|
|
24601
|
-
|
|
24590
|
+
`;
|
|
24602
24591
|
const InputRadio = props => {
|
|
24592
|
+
import.meta.css = [css$k, "@jsenv/navi/src/field/input_radio.jsx"];
|
|
24603
24593
|
const {
|
|
24604
24594
|
value = "on"
|
|
24605
24595
|
} = props;
|
|
@@ -24845,7 +24835,7 @@ const InputRadioWithAction = () => {
|
|
|
24845
24835
|
throw new Error(`<Input type="radio" /> with an action make no sense. Use <RadioList action={something} /> instead`);
|
|
24846
24836
|
};
|
|
24847
24837
|
|
|
24848
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
24838
|
+
installImportMetaCssBuild(import.meta);const css$j = /* css */`
|
|
24849
24839
|
@layer navi {
|
|
24850
24840
|
.navi_input_range {
|
|
24851
24841
|
--border-radius: 6px;
|
|
@@ -25054,7 +25044,7 @@ installImportMetaCssBuild(import.meta);const css$2 = /* css */`
|
|
|
25054
25044
|
}
|
|
25055
25045
|
`;
|
|
25056
25046
|
const InputRange = props => {
|
|
25057
|
-
import.meta.css = [css$
|
|
25047
|
+
import.meta.css = [css$j, "@jsenv/navi/src/field/input_range.jsx"];
|
|
25058
25048
|
const uiStateController = useUIStateController(props, "input");
|
|
25059
25049
|
const uiState = useUIState(uiStateController);
|
|
25060
25050
|
const input = renderActionableComponent(props, {
|
|
@@ -25341,7 +25331,7 @@ installImportMetaCssBuild(import.meta);/**
|
|
|
25341
25331
|
* - <InputCheckbox /> for type="checkbox"
|
|
25342
25332
|
* - <InputRadio /> for type="radio"
|
|
25343
25333
|
*/
|
|
25344
|
-
|
|
25334
|
+
const css$i = /* css */`
|
|
25345
25335
|
@layer navi {
|
|
25346
25336
|
.navi_input {
|
|
25347
25337
|
--border-radius: 2px;
|
|
@@ -25551,8 +25541,9 @@ import.meta.css = [/* css */`
|
|
|
25551
25541
|
/* Fortunately we can override it as follow */
|
|
25552
25542
|
-webkit-text-fill-color: var(--x-color) !important;
|
|
25553
25543
|
}
|
|
25554
|
-
|
|
25544
|
+
`;
|
|
25555
25545
|
const InputTextual = props => {
|
|
25546
|
+
import.meta.css = [css$i, "@jsenv/navi/src/field/input_textual.jsx"];
|
|
25556
25547
|
const uiStateController = useUIStateController(props, "input");
|
|
25557
25548
|
const uiState = useUIState(uiStateController);
|
|
25558
25549
|
const input = renderActionableComponent(props, {
|
|
@@ -25922,7 +25913,7 @@ installImportMetaCssBuild(import.meta);/**
|
|
|
25922
25913
|
* This means an editable thing MUST have a parent with position relative that wraps the content and the eventual editable input
|
|
25923
25914
|
*
|
|
25924
25915
|
*/
|
|
25925
|
-
|
|
25916
|
+
const css$h = /* css */`
|
|
25926
25917
|
.navi_editable_wrapper {
|
|
25927
25918
|
--inset-top: 0px;
|
|
25928
25919
|
--inset-right: 0px;
|
|
@@ -25947,7 +25938,7 @@ import.meta.css = [/* css */`
|
|
|
25947
25938
|
pointer-events: auto;
|
|
25948
25939
|
}
|
|
25949
25940
|
}
|
|
25950
|
-
|
|
25941
|
+
`;
|
|
25951
25942
|
const useEditionController = () => {
|
|
25952
25943
|
const [editing, editingSetter] = useState(null);
|
|
25953
25944
|
const startEditing = useCallback(event => {
|
|
@@ -25971,6 +25962,7 @@ const useEditionController = () => {
|
|
|
25971
25962
|
};
|
|
25972
25963
|
};
|
|
25973
25964
|
const Editable = props => {
|
|
25965
|
+
import.meta.css = [css$h, "@jsenv/navi/src/field/edition/editable.jsx"];
|
|
25974
25966
|
let {
|
|
25975
25967
|
children,
|
|
25976
25968
|
action,
|
|
@@ -26381,7 +26373,7 @@ const FormWithAction = props => {
|
|
|
26381
26373
|
// form.dispatchEvent(customEvent);
|
|
26382
26374
|
// };
|
|
26383
26375
|
|
|
26384
|
-
installImportMetaCssBuild(import.meta);
|
|
26376
|
+
installImportMetaCssBuild(import.meta);const css$g = /* css */`
|
|
26385
26377
|
.navi_group {
|
|
26386
26378
|
--border-width: 1px;
|
|
26387
26379
|
|
|
@@ -26470,7 +26462,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
26470
26462
|
}
|
|
26471
26463
|
}
|
|
26472
26464
|
}
|
|
26473
|
-
|
|
26465
|
+
`;
|
|
26474
26466
|
const Group = ({
|
|
26475
26467
|
children,
|
|
26476
26468
|
borderWidth = 1,
|
|
@@ -26478,6 +26470,7 @@ const Group = ({
|
|
|
26478
26470
|
vertical = row,
|
|
26479
26471
|
...props
|
|
26480
26472
|
}) => {
|
|
26473
|
+
import.meta.css = [css$g, "@jsenv/navi/src/field/group.jsx"];
|
|
26481
26474
|
if (typeof borderWidth === "string") {
|
|
26482
26475
|
borderWidth = parseFloat(borderWidth);
|
|
26483
26476
|
}
|
|
@@ -26495,7 +26488,6 @@ const Group = ({
|
|
|
26495
26488
|
});
|
|
26496
26489
|
};
|
|
26497
26490
|
|
|
26498
|
-
installImportMetaCssBuild(import.meta);import.meta.css = [/* css */``, "@jsenv/navi/src/field/radio_list.jsx"];
|
|
26499
26491
|
const RadioList = props => {
|
|
26500
26492
|
const uiStateController = useUIGroupStateController(props, "radio_list", {
|
|
26501
26493
|
childComponentType: "radio",
|
|
@@ -26677,12 +26669,13 @@ const useRefArray = (items, keyFromItem) => {
|
|
|
26677
26669
|
};
|
|
26678
26670
|
|
|
26679
26671
|
installImportMetaCssBuild(import.meta);const useNavState = () => {};
|
|
26680
|
-
|
|
26672
|
+
const css$f = /* css */`
|
|
26681
26673
|
.navi_select[data-readonly] {
|
|
26682
26674
|
pointer-events: none;
|
|
26683
26675
|
}
|
|
26684
|
-
|
|
26676
|
+
`;
|
|
26685
26677
|
const Select = forwardRef((props, ref) => {
|
|
26678
|
+
import.meta.css = [css$f, "@jsenv/navi/src/field/select.jsx"];
|
|
26686
26679
|
const select = renderActionableComponent(props, ref);
|
|
26687
26680
|
return select;
|
|
26688
26681
|
});
|
|
@@ -26986,7 +26979,7 @@ const Z_INDEX_DROP_PREVIEW = Z_INDEX_STICKY_CORNER + 1;
|
|
|
26986
26979
|
|
|
26987
26980
|
const Z_INDEX_TABLE_UI = Z_INDEX_STICKY_CORNER + 1;
|
|
26988
26981
|
|
|
26989
|
-
installImportMetaCssBuild(import.meta);
|
|
26982
|
+
installImportMetaCssBuild(import.meta);const css$e = /* css */`
|
|
26990
26983
|
.navi_table_drag_clone_container {
|
|
26991
26984
|
position: absolute;
|
|
26992
26985
|
top: var(--table-visual-top);
|
|
@@ -27105,7 +27098,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
27105
27098
|
width: 10px;
|
|
27106
27099
|
height: 10px;
|
|
27107
27100
|
}
|
|
27108
|
-
|
|
27101
|
+
`;
|
|
27109
27102
|
const TableDragContext = createContext();
|
|
27110
27103
|
const useTableDragContextValue = ({
|
|
27111
27104
|
tableDragCloneContainerRef,
|
|
@@ -27166,6 +27159,7 @@ const moveItem = (array, indexA, indexB) => {
|
|
|
27166
27159
|
return newArray;
|
|
27167
27160
|
};
|
|
27168
27161
|
const TableDragCloneContainer = forwardRef((props, ref) => {
|
|
27162
|
+
import.meta.css = [css$e, "@jsenv/navi/src/field/table/drag/table_drag.jsx"];
|
|
27169
27163
|
const {
|
|
27170
27164
|
tableId
|
|
27171
27165
|
} = props;
|
|
@@ -27650,7 +27644,7 @@ installImportMetaCssBuild(import.meta);const ROW_MIN_HEIGHT = 30;
|
|
|
27650
27644
|
const ROW_MAX_HEIGHT = 100;
|
|
27651
27645
|
const COLUMN_MIN_WIDTH = 50;
|
|
27652
27646
|
const COLUMN_MAX_WIDTH = 500;
|
|
27653
|
-
|
|
27647
|
+
const css$d = /* css */`
|
|
27654
27648
|
@layer navi {
|
|
27655
27649
|
.navi_table {
|
|
27656
27650
|
--table-resizer-handle-color: #063b7c;
|
|
@@ -27806,10 +27800,13 @@ import.meta.css = [/* css */`
|
|
|
27806
27800
|
.navi_table_row_resizer[data-grabbed] .navi_table_row_resizer_line {
|
|
27807
27801
|
opacity: 1;
|
|
27808
27802
|
}
|
|
27809
|
-
|
|
27803
|
+
`;
|
|
27810
27804
|
|
|
27811
27805
|
// Column resize components
|
|
27812
|
-
const TableColumnResizer =
|
|
27806
|
+
const TableColumnResizer = props => {
|
|
27807
|
+
import.meta.css = [css$d, "@jsenv/navi/src/field/table/resize/table_resize.jsx"];
|
|
27808
|
+
const defaultRef = useRef();
|
|
27809
|
+
const ref = props.ref || defaultRef;
|
|
27813
27810
|
return jsxs("div", {
|
|
27814
27811
|
ref: ref,
|
|
27815
27812
|
className: "navi_table_column_resizer",
|
|
@@ -27826,7 +27823,7 @@ const TableColumnResizer = forwardRef((props, ref) => {
|
|
|
27826
27823
|
className: "navi_table_column_resizer_line"
|
|
27827
27824
|
})]
|
|
27828
27825
|
});
|
|
27829
|
-
}
|
|
27826
|
+
};
|
|
27830
27827
|
const TableCellColumnResizeHandles = ({
|
|
27831
27828
|
columnIndex,
|
|
27832
27829
|
columnMinWidth,
|
|
@@ -28129,7 +28126,9 @@ const initResizeTableRowViaPointer = (pointerdownEvent, {
|
|
|
28129
28126
|
};
|
|
28130
28127
|
|
|
28131
28128
|
// Row resize components
|
|
28132
|
-
const TableRowResizer =
|
|
28129
|
+
const TableRowResizer = props => {
|
|
28130
|
+
const defaultRef = useRef();
|
|
28131
|
+
const ref = props.ref || defaultRef;
|
|
28133
28132
|
return jsxs("div", {
|
|
28134
28133
|
ref: ref,
|
|
28135
28134
|
className: "navi_table_row_resizer",
|
|
@@ -28146,7 +28145,7 @@ const TableRowResizer = forwardRef((props, ref) => {
|
|
|
28146
28145
|
className: "navi_table_row_resizer_line"
|
|
28147
28146
|
})]
|
|
28148
28147
|
});
|
|
28149
|
-
}
|
|
28148
|
+
};
|
|
28150
28149
|
const TableCellRowResizeHandles = ({
|
|
28151
28150
|
rowIndex,
|
|
28152
28151
|
rowMinHeight,
|
|
@@ -28272,7 +28271,7 @@ const findPreviousTableRow = currentRow => {
|
|
|
28272
28271
|
return currentIndex > 0 ? allRows[currentIndex - 1] : null;
|
|
28273
28272
|
};
|
|
28274
28273
|
|
|
28275
|
-
installImportMetaCssBuild(import.meta);
|
|
28274
|
+
installImportMetaCssBuild(import.meta);const css$c = /* css */`
|
|
28276
28275
|
@layer navi {
|
|
28277
28276
|
.navi_table {
|
|
28278
28277
|
--selection-border-color: var(--navi-selection-border-color, #0078d4);
|
|
@@ -28367,13 +28366,14 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
28367
28366
|
inset 0 -1px 0 0 var(--selection-border-color),
|
|
28368
28367
|
inset 1px 0 0 0 var(--selection-border-color);
|
|
28369
28368
|
}
|
|
28370
|
-
|
|
28369
|
+
`;
|
|
28371
28370
|
const useTableSelectionController = ({
|
|
28372
28371
|
tableRef,
|
|
28373
28372
|
selection,
|
|
28374
28373
|
onSelectionChange,
|
|
28375
28374
|
selectionColor
|
|
28376
28375
|
}) => {
|
|
28376
|
+
import.meta.css = [css$c, "@jsenv/navi/src/field/table/selection/table_selection.jsx"];
|
|
28377
28377
|
const selectionController = useSelectionController({
|
|
28378
28378
|
elementRef: tableRef,
|
|
28379
28379
|
layout: "grid",
|
|
@@ -28844,7 +28844,7 @@ const useTableStickyContextValue = ({
|
|
|
28844
28844
|
};
|
|
28845
28845
|
|
|
28846
28846
|
installImportMetaCssBuild(import.meta);// TODO: sticky left/top frontier should likely use "followPosition"
|
|
28847
|
-
|
|
28847
|
+
const css$b = /* css */`
|
|
28848
28848
|
@layer navi {
|
|
28849
28849
|
.navi_table {
|
|
28850
28850
|
--sticky-frontier-color: #c0c0c0;
|
|
@@ -29083,10 +29083,11 @@ import.meta.css = [/* css */`
|
|
|
29083
29083
|
inset -1px 0 0 0 var(--border-color),
|
|
29084
29084
|
inset 0 -1px 0 0 var(--border-color);
|
|
29085
29085
|
}
|
|
29086
|
-
|
|
29086
|
+
`;
|
|
29087
29087
|
const TableStickyFrontier = ({
|
|
29088
29088
|
tableRef
|
|
29089
29089
|
}) => {
|
|
29090
|
+
import.meta.css = [css$b, "@jsenv/navi/src/field/table/sticky/table_sticky.jsx"];
|
|
29090
29091
|
const stickyLeftFrontierGhostRef = useRef();
|
|
29091
29092
|
const stickyLeftFrontierPreviewRef = useRef();
|
|
29092
29093
|
const stickyTopFrontierGhostRef = useRef();
|
|
@@ -29305,7 +29306,220 @@ const initMoveStickyFrontierViaPointer = (pointerdownEvent, {
|
|
|
29305
29306
|
});
|
|
29306
29307
|
};
|
|
29307
29308
|
|
|
29308
|
-
|
|
29309
|
+
/*
|
|
29310
|
+
* Box-shadow border mapping template:
|
|
29311
|
+
*
|
|
29312
|
+
* box-shadow:
|
|
29313
|
+
* inset 0 1px 0 0 color, // Top border
|
|
29314
|
+
* inset 1px 0 0 0 color, // Left border
|
|
29315
|
+
* inset -1px 0 0 0 color, // Right border
|
|
29316
|
+
* inset 0 -1px 0 0 color; // Bottom border
|
|
29317
|
+
*/
|
|
29318
|
+
|
|
29319
|
+
const css$a = /* css */ `
|
|
29320
|
+
.navi_table_root {
|
|
29321
|
+
position: relative;
|
|
29322
|
+
max-width: var(--table-max-width, none);
|
|
29323
|
+
max-height: var(--table-max-height, none);
|
|
29324
|
+
}
|
|
29325
|
+
|
|
29326
|
+
.navi_table_container {
|
|
29327
|
+
--border-color: #e1e1e1;
|
|
29328
|
+
--focus-border-color: #0078d4;
|
|
29329
|
+
position: relative;
|
|
29330
|
+
}
|
|
29331
|
+
|
|
29332
|
+
.navi_table {
|
|
29333
|
+
border-radius: 2px;
|
|
29334
|
+
border-spacing: 0; /* Required for manual border collapse */
|
|
29335
|
+
}
|
|
29336
|
+
.navi_table_cell {
|
|
29337
|
+
text-overflow: ellipsis;
|
|
29338
|
+
white-space: nowrap;
|
|
29339
|
+
background-color: var(--background-color, transparent);
|
|
29340
|
+
overflow: hidden;
|
|
29341
|
+
}
|
|
29342
|
+
|
|
29343
|
+
.navi_table_cell[data-align-x="start"] {
|
|
29344
|
+
text-align: left;
|
|
29345
|
+
}
|
|
29346
|
+
.navi_table_cell[data-align-x="center"] {
|
|
29347
|
+
text-align: center;
|
|
29348
|
+
}
|
|
29349
|
+
.navi_table_cell[data-align-y="end"] {
|
|
29350
|
+
text-align: right;
|
|
29351
|
+
}
|
|
29352
|
+
.navi_table_cell[data-align-x="start"] {
|
|
29353
|
+
vertical-align: top;
|
|
29354
|
+
}
|
|
29355
|
+
.navi_table_cell[data-align-y="center"] {
|
|
29356
|
+
vertical-align: middle;
|
|
29357
|
+
}
|
|
29358
|
+
.navi_table_cell[data-align-y="end"] {
|
|
29359
|
+
vertical-align: bottom;
|
|
29360
|
+
}
|
|
29361
|
+
|
|
29362
|
+
/* Table borders using ::before pseudo-elements */
|
|
29363
|
+
/* Default: each cell draws all its own borders (no border-collapse) */
|
|
29364
|
+
.navi_table_cell {
|
|
29365
|
+
/* Required for pseudo-element positioning */
|
|
29366
|
+
position: relative;
|
|
29367
|
+
border: none; /* Remove default borders - we'll use pseudo-elements */
|
|
29368
|
+
}
|
|
29369
|
+
|
|
29370
|
+
.navi_table_cell::before {
|
|
29371
|
+
position: absolute;
|
|
29372
|
+
inset: 0;
|
|
29373
|
+
box-shadow:
|
|
29374
|
+
inset 0 1px 0 0 var(--border-color),
|
|
29375
|
+
inset 1px 0 0 0 var(--border-color),
|
|
29376
|
+
inset -1px 0 0 0 var(--border-color),
|
|
29377
|
+
inset 0 -1px 0 0 var(--border-color);
|
|
29378
|
+
pointer-events: none;
|
|
29379
|
+
content: "";
|
|
29380
|
+
}
|
|
29381
|
+
.navi_table_cell::after {
|
|
29382
|
+
position: absolute;
|
|
29383
|
+
/* Default: include bottom and right borders (owned by this cell) */
|
|
29384
|
+
inset: 0;
|
|
29385
|
+
pointer-events: none;
|
|
29386
|
+
content: "";
|
|
29387
|
+
}
|
|
29388
|
+
|
|
29389
|
+
/* padding */
|
|
29390
|
+
.navi_table_cell {
|
|
29391
|
+
--cell-padding-left: 12px;
|
|
29392
|
+
--cell-padding-right: 12px;
|
|
29393
|
+
|
|
29394
|
+
padding-top: 8px;
|
|
29395
|
+
padding-right: var(--cell-padding-right);
|
|
29396
|
+
padding-bottom: 8px;
|
|
29397
|
+
padding-left: var(--cell-padding-left);
|
|
29398
|
+
}
|
|
29399
|
+
.navi_table_cell[data-width-xxs] {
|
|
29400
|
+
padding-right: 0;
|
|
29401
|
+
padding-left: 0;
|
|
29402
|
+
}
|
|
29403
|
+
.navi_table_cell[data-height-xxs] {
|
|
29404
|
+
padding-top: 0;
|
|
29405
|
+
padding-bottom: 0;
|
|
29406
|
+
}
|
|
29407
|
+
.navi_table_cell[data-editing] input {
|
|
29408
|
+
padding-right: var(--cell-padding-right);
|
|
29409
|
+
padding-left: var(--cell-padding-left);
|
|
29410
|
+
}
|
|
29411
|
+
.navi_table [data-sticky-left-frontier] {
|
|
29412
|
+
/* padding-left: 12px; */
|
|
29413
|
+
/* 12 px + 5px of the sticky frontier */
|
|
29414
|
+
/* padding-right: 17px; */
|
|
29415
|
+
}
|
|
29416
|
+
|
|
29417
|
+
.navi_table_cell {
|
|
29418
|
+
user-select: none;
|
|
29419
|
+
}
|
|
29420
|
+
|
|
29421
|
+
/* Number column specific styling */
|
|
29422
|
+
.navi_row_number_cell {
|
|
29423
|
+
color: #666;
|
|
29424
|
+
font-weight: 500;
|
|
29425
|
+
text-align: center;
|
|
29426
|
+
background: #fafafa;
|
|
29427
|
+
user-select: none;
|
|
29428
|
+
}
|
|
29429
|
+
|
|
29430
|
+
.navi_table_cell_content_bold_clone {
|
|
29431
|
+
display: block; /* in-flow so it contributes to width */
|
|
29432
|
+
height: 0; /* zero height so it doesn't change layout height */
|
|
29433
|
+
font-weight: bold; /* force bold to compute max width */
|
|
29434
|
+
visibility: hidden; /* not visible */
|
|
29435
|
+
pointer-events: none; /* inert */
|
|
29436
|
+
overflow: hidden; /* avoid any accidental height */
|
|
29437
|
+
}
|
|
29438
|
+
|
|
29439
|
+
/* Border-collapse mode: each cell only owns specific borders to avoid doubling */
|
|
29440
|
+
|
|
29441
|
+
/* Base rule: all cells get right and bottom borders */
|
|
29442
|
+
.navi_table[data-border-collapse] .navi_table_cell::before {
|
|
29443
|
+
box-shadow:
|
|
29444
|
+
inset -1px 0 0 0 var(--border-color),
|
|
29445
|
+
inset 0 -1px 0 0 var(--border-color);
|
|
29446
|
+
}
|
|
29447
|
+
|
|
29448
|
+
/* Header cells (all th) get top border in addition to right and bottom */
|
|
29449
|
+
.navi_table[data-border-collapse] .navi_table_cell[data-first-row]::before {
|
|
29450
|
+
box-shadow:
|
|
29451
|
+
inset 0 1px 0 0 var(--border-color),
|
|
29452
|
+
inset -1px 0 0 0 var(--border-color),
|
|
29453
|
+
inset 0 -1px 0 0 var(--border-color);
|
|
29454
|
+
}
|
|
29455
|
+
|
|
29456
|
+
/* First column cells get left border in addition to right and bottom */
|
|
29457
|
+
.navi_table[data-border-collapse]
|
|
29458
|
+
.navi_table_cell[data-first-column]::before {
|
|
29459
|
+
box-shadow:
|
|
29460
|
+
inset 1px 0 0 0 var(--border-color),
|
|
29461
|
+
inset -1px 0 0 0 var(--border-color),
|
|
29462
|
+
inset 0 -1px 0 0 var(--border-color);
|
|
29463
|
+
}
|
|
29464
|
+
|
|
29465
|
+
/* Header first column gets all four borders */
|
|
29466
|
+
.navi_table[data-border-collapse]
|
|
29467
|
+
.navi_table_cell[data-first-row][data-first-column]::before {
|
|
29468
|
+
box-shadow:
|
|
29469
|
+
inset 0 1px 0 0 var(--border-color),
|
|
29470
|
+
inset 1px 0 0 0 var(--border-color),
|
|
29471
|
+
inset -1px 0 0 0 var(--border-color),
|
|
29472
|
+
inset 0 -1px 0 0 var(--border-color);
|
|
29473
|
+
}
|
|
29474
|
+
|
|
29475
|
+
/* Focus styles */
|
|
29476
|
+
.navi_table_cell[data-focus] {
|
|
29477
|
+
outline: none; /* Remove default outline */
|
|
29478
|
+
}
|
|
29479
|
+
|
|
29480
|
+
.navi_table_cell[data-focus]::after {
|
|
29481
|
+
box-shadow:
|
|
29482
|
+
inset 0 2px 0 0 var(--focus-border-color),
|
|
29483
|
+
inset -2px 0 0 0 var(--focus-border-color),
|
|
29484
|
+
inset 0 -2px 0 0 var(--focus-border-color),
|
|
29485
|
+
inset 2px 0 0 0 var(--focus-border-color) !important;
|
|
29486
|
+
}
|
|
29487
|
+
|
|
29488
|
+
.navi_table {
|
|
29489
|
+
font-size: 16px;
|
|
29490
|
+
font-family: Arial;
|
|
29491
|
+
|
|
29492
|
+
--editing-border-color: #a8c7fa;
|
|
29493
|
+
}
|
|
29494
|
+
|
|
29495
|
+
.navi_table_cell[data-editing] .navi_table_cell_content {
|
|
29496
|
+
outline: 2px solid #a8c7fa;
|
|
29497
|
+
outline-offset: 0px;
|
|
29498
|
+
}
|
|
29499
|
+
|
|
29500
|
+
.navi_table_cell[data-editing] input {
|
|
29501
|
+
display: inline-flex;
|
|
29502
|
+
width: 100%;
|
|
29503
|
+
height: 100%;
|
|
29504
|
+
flex-grow: 1;
|
|
29505
|
+
font-size: 16px;
|
|
29506
|
+
border: none;
|
|
29507
|
+
border-radius: 0; /* match table cell border-radius */
|
|
29508
|
+
}
|
|
29509
|
+
|
|
29510
|
+
.navi_table_cell[data-editing]
|
|
29511
|
+
input[type="number"]::-webkit-inner-spin-button {
|
|
29512
|
+
width: 14px;
|
|
29513
|
+
height: 30px;
|
|
29514
|
+
}
|
|
29515
|
+
|
|
29516
|
+
.navi_table_cell[data-editing] {
|
|
29517
|
+
z-index: ${Z_INDEX_EDITING};
|
|
29518
|
+
outline: 2px solid var(--editing-border-color);
|
|
29519
|
+
}
|
|
29520
|
+
`;
|
|
29521
|
+
|
|
29522
|
+
installImportMetaCssBuild(import.meta);const css$9 = /* css */`
|
|
29309
29523
|
.navi_table_ui {
|
|
29310
29524
|
position: fixed;
|
|
29311
29525
|
inset: 0;
|
|
@@ -29314,8 +29528,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
29314
29528
|
overflow: hidden; /* Ensure UI elements cannot impact scrollbars of the document */
|
|
29315
29529
|
/* background: rgba(0, 255, 0, 0.2); */
|
|
29316
29530
|
}
|
|
29317
|
-
|
|
29531
|
+
`;
|
|
29318
29532
|
const TableUI = forwardRef((props, ref) => {
|
|
29533
|
+
import.meta.css = [css$9, "@jsenv/navi/src/field/table/table_ui.jsx"];
|
|
29319
29534
|
const {
|
|
29320
29535
|
tableRef,
|
|
29321
29536
|
tableId,
|
|
@@ -29351,7 +29566,7 @@ const TableUI = forwardRef((props, ref) => {
|
|
|
29351
29566
|
}), document.body);
|
|
29352
29567
|
});
|
|
29353
29568
|
|
|
29354
|
-
|
|
29569
|
+
installImportMetaCssBuild(import.meta);/**
|
|
29355
29570
|
* Table Component with Custom Border and Selection System
|
|
29356
29571
|
*
|
|
29357
29572
|
* PROBLEM: We want to draw selected table cells with a clear visual perimeter
|
|
@@ -29402,7 +29617,6 @@ const TableUI = forwardRef((props, ref) => {
|
|
|
29402
29617
|
* - Delete a column (how?)
|
|
29403
29618
|
* - Update table column info (I guess a down arrow icon which opens a meny when clicked for instance)
|
|
29404
29619
|
*/
|
|
29405
|
-
|
|
29406
29620
|
const [useColumnTrackerProviders, useRegisterColumn, useColumnByIndex] = createIsolatedItemTracker();
|
|
29407
29621
|
const [useRowTrackerProvider, useRegisterRow, useRowByIndex] = createItemTracker();
|
|
29408
29622
|
const ColumnProducerProviderContext = createContext();
|
|
@@ -29414,6 +29628,7 @@ const RowIndexContext = createContext();
|
|
|
29414
29628
|
const TableSectionContext = createContext();
|
|
29415
29629
|
const useIsInTableHead = () => useContext(TableSectionContext) === "head";
|
|
29416
29630
|
const Table = props => {
|
|
29631
|
+
import.meta.css = [css$a, "@jsenv/navi/src/field/table/table.jsx"];
|
|
29417
29632
|
const tableDefaultRef = useRef();
|
|
29418
29633
|
const tableDefaultId = `table-${useId()}`;
|
|
29419
29634
|
const {
|
|
@@ -29896,6 +30111,7 @@ const TableCell = props => {
|
|
|
29896
30111
|
// we use [data-focus] so that the attribute can be copied
|
|
29897
30112
|
// to the dragged cell copies
|
|
29898
30113
|
,
|
|
30114
|
+
|
|
29899
30115
|
"data-focus": activeElement === ref.current ? "" : undefined,
|
|
29900
30116
|
"data-first-row": isFirstRow ? "" : undefined,
|
|
29901
30117
|
"data-first-column": isFirstColumn ? "" : undefined,
|
|
@@ -29983,6 +30199,7 @@ const RowNumberCol = ({
|
|
|
29983
30199
|
// minWidth={minWidth}
|
|
29984
30200
|
// maxWidth={maxWidth}
|
|
29985
30201
|
,
|
|
30202
|
+
|
|
29986
30203
|
immovable: immovable,
|
|
29987
30204
|
...rest
|
|
29988
30205
|
});
|
|
@@ -30305,7 +30522,7 @@ const KeyboardShortcutAriaElement = ({
|
|
|
30305
30522
|
});
|
|
30306
30523
|
};
|
|
30307
30524
|
|
|
30308
|
-
installImportMetaCssBuild(import.meta);
|
|
30525
|
+
installImportMetaCssBuild(import.meta);const css$8 = /* css */`
|
|
30309
30526
|
@layer navi {
|
|
30310
30527
|
.navi_clipboard_container {
|
|
30311
30528
|
--height: 1.5em;
|
|
@@ -30332,11 +30549,12 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
30332
30549
|
transform: translateY(-100%);
|
|
30333
30550
|
}
|
|
30334
30551
|
}
|
|
30335
|
-
|
|
30552
|
+
`;
|
|
30336
30553
|
const ButtonCopyToClipboard = ({
|
|
30337
30554
|
children,
|
|
30338
30555
|
...props
|
|
30339
30556
|
}) => {
|
|
30557
|
+
import.meta.css = [css$8, "@jsenv/navi/src/field/button_copy_to_clipboard.jsx"];
|
|
30340
30558
|
const [copied, setCopied] = useState(false);
|
|
30341
30559
|
const renderedRef = useRef();
|
|
30342
30560
|
useEffect(() => {
|
|
@@ -30346,7 +30564,7 @@ const ButtonCopyToClipboard = ({
|
|
|
30346
30564
|
};
|
|
30347
30565
|
}, []);
|
|
30348
30566
|
return jsxs(Box, {
|
|
30349
|
-
|
|
30567
|
+
className: "navi_clipboard_container",
|
|
30350
30568
|
...props,
|
|
30351
30569
|
children: [jsx(Box, {
|
|
30352
30570
|
className: "navi_copied_notif",
|
|
@@ -30355,11 +30573,11 @@ const ButtonCopyToClipboard = ({
|
|
|
30355
30573
|
children: "Copi\xE9 !"
|
|
30356
30574
|
}), jsx(Button, {
|
|
30357
30575
|
className: "navi_copy_button",
|
|
30358
|
-
|
|
30576
|
+
flex: "y",
|
|
30577
|
+
alignY: "center",
|
|
30359
30578
|
icon: true,
|
|
30360
30579
|
revealOnInteraction: true,
|
|
30361
30580
|
square: true,
|
|
30362
|
-
alignY: "center",
|
|
30363
30581
|
expandY: true,
|
|
30364
30582
|
borderRadius: "xs",
|
|
30365
30583
|
action: async () => {
|
|
@@ -30417,7 +30635,7 @@ const Address = ({
|
|
|
30417
30635
|
});
|
|
30418
30636
|
};
|
|
30419
30637
|
|
|
30420
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
30638
|
+
installImportMetaCssBuild(import.meta);const css$7 = /* css */`
|
|
30421
30639
|
@layer navi {
|
|
30422
30640
|
}
|
|
30423
30641
|
.navi_badge {
|
|
@@ -30462,7 +30680,7 @@ const Badge = ({
|
|
|
30462
30680
|
className,
|
|
30463
30681
|
...props
|
|
30464
30682
|
}) => {
|
|
30465
|
-
import.meta.css = [css$
|
|
30683
|
+
import.meta.css = [css$7, "@jsenv/navi/src/text/badge.jsx"];
|
|
30466
30684
|
const defaultRef = useRef();
|
|
30467
30685
|
const ref = props.ref || defaultRef;
|
|
30468
30686
|
useDarkBackgroundAttribute(ref);
|
|
@@ -30541,7 +30759,7 @@ const formatNumber = (value, { lang } = {}) => {
|
|
|
30541
30759
|
return new Intl.NumberFormat(lang).format(value);
|
|
30542
30760
|
};
|
|
30543
30761
|
|
|
30544
|
-
installImportMetaCssBuild(import.meta);const css = /* css */`
|
|
30762
|
+
installImportMetaCssBuild(import.meta);const css$6 = /* css */`
|
|
30545
30763
|
@layer navi {
|
|
30546
30764
|
}
|
|
30547
30765
|
.navi_text.navi_badge_count {
|
|
@@ -30665,7 +30883,7 @@ const BadgeCount = ({
|
|
|
30665
30883
|
lineLayout,
|
|
30666
30884
|
...props
|
|
30667
30885
|
}) => {
|
|
30668
|
-
import.meta.css = [css, "@jsenv/navi/src/text/badge_count.jsx"];
|
|
30886
|
+
import.meta.css = [css$6, "@jsenv/navi/src/text/badge_count.jsx"];
|
|
30669
30887
|
const defaultRef = useRef();
|
|
30670
30888
|
const ref = props.ref || defaultRef;
|
|
30671
30889
|
useDarkBackgroundAttribute(ref, [loading]);
|
|
@@ -30686,10 +30904,11 @@ const BadgeCount = ({
|
|
|
30686
30904
|
}
|
|
30687
30905
|
if (circle) {
|
|
30688
30906
|
return jsx(TextAnchor, {
|
|
30907
|
+
childRef: ref,
|
|
30689
30908
|
textAnchor: textAnchor,
|
|
30909
|
+
textSize: props.size,
|
|
30910
|
+
textKey: loading + valueDisplayed + hasOverflow,
|
|
30690
30911
|
lineLayout: lineLayout,
|
|
30691
|
-
childRef: ref,
|
|
30692
|
-
size: props.size,
|
|
30693
30912
|
children: jsxs(BadgeCountCircle, {
|
|
30694
30913
|
...props,
|
|
30695
30914
|
loading: loading,
|
|
@@ -30704,10 +30923,11 @@ const BadgeCount = ({
|
|
|
30704
30923
|
lang
|
|
30705
30924
|
}) : valueDisplayed;
|
|
30706
30925
|
return jsx(TextAnchor, {
|
|
30926
|
+
childRef: ref,
|
|
30707
30927
|
textAnchor: textAnchor,
|
|
30928
|
+
textSize: props.size,
|
|
30929
|
+
textKey: loading + valueFormatted + hasOverflow,
|
|
30708
30930
|
lineLayout: lineLayout,
|
|
30709
|
-
childRef: ref,
|
|
30710
|
-
size: props.size,
|
|
30711
30931
|
children: jsxs(BadgeCountEllipse, {
|
|
30712
30932
|
...props,
|
|
30713
30933
|
loading: loading,
|
|
@@ -30756,9 +30976,7 @@ const BadgeCountEllipse = ({
|
|
|
30756
30976
|
spacing: "pre",
|
|
30757
30977
|
children: loading ? jsx(Icon, {
|
|
30758
30978
|
children: jsx(LoadingDots, {})
|
|
30759
|
-
}) :
|
|
30760
|
-
children: children
|
|
30761
|
-
})
|
|
30979
|
+
}) : children
|
|
30762
30980
|
});
|
|
30763
30981
|
};
|
|
30764
30982
|
const BadgeCountCircle = ({
|
|
@@ -30786,11 +31004,9 @@ const BadgeCountCircle = ({
|
|
|
30786
31004
|
spacing: "pre",
|
|
30787
31005
|
children: loading ? jsx(Icon, {
|
|
30788
31006
|
children: jsx(LoadingDots, {})
|
|
30789
|
-
}) : jsx(
|
|
30790
|
-
|
|
30791
|
-
|
|
30792
|
-
children: children
|
|
30793
|
-
})
|
|
31007
|
+
}) : jsx("span", {
|
|
31008
|
+
className: "navi_badge_count_text",
|
|
31009
|
+
children: children
|
|
30794
31010
|
})
|
|
30795
31011
|
});
|
|
30796
31012
|
};
|
|
@@ -31196,7 +31412,7 @@ const interpolate = (template, values) => {
|
|
|
31196
31412
|
});
|
|
31197
31413
|
};
|
|
31198
31414
|
|
|
31199
|
-
installImportMetaCssBuild(import.meta);
|
|
31415
|
+
installImportMetaCssBuild(import.meta);const css$5 = /* css */`
|
|
31200
31416
|
@layer navi {
|
|
31201
31417
|
.navi_quantity {
|
|
31202
31418
|
--unit-color: color-mix(in srgb, currentColor 50%, white);
|
|
@@ -31252,7 +31468,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
31252
31468
|
}
|
|
31253
31469
|
}
|
|
31254
31470
|
}
|
|
31255
|
-
|
|
31471
|
+
`;
|
|
31256
31472
|
const QuantityIntl = createIntl();
|
|
31257
31473
|
const wellKnownUnitMap = new Map();
|
|
31258
31474
|
/**
|
|
@@ -31306,6 +31522,7 @@ const Quantity = ({
|
|
|
31306
31522
|
bold = true,
|
|
31307
31523
|
...props
|
|
31308
31524
|
}) => {
|
|
31525
|
+
import.meta.css = [css$5, "@jsenv/navi/src/text/quantity.jsx"];
|
|
31309
31526
|
const value = parseQuantityValue(children);
|
|
31310
31527
|
const valueRounded = integer && typeof value === "number" ? Math.round(value) : value;
|
|
31311
31528
|
const valueFormatted = typeof valueRounded === "number" ? formatNumber(valueRounded, {
|
|
@@ -31389,7 +31606,7 @@ const parseQuantityValue = children => {
|
|
|
31389
31606
|
return Number.isNaN(parsed) ? children : parsed;
|
|
31390
31607
|
};
|
|
31391
31608
|
|
|
31392
|
-
installImportMetaCssBuild(import.meta);
|
|
31609
|
+
installImportMetaCssBuild(import.meta);const css$4 = /* css */`
|
|
31393
31610
|
@layer navi {
|
|
31394
31611
|
.navi_meter {
|
|
31395
31612
|
--loader-color: var(--navi-loader-color);
|
|
@@ -31506,7 +31723,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
31506
31723
|
}
|
|
31507
31724
|
}
|
|
31508
31725
|
}
|
|
31509
|
-
|
|
31726
|
+
`;
|
|
31510
31727
|
const MeterStyleCSSVars = {
|
|
31511
31728
|
trackColor: "--track-color",
|
|
31512
31729
|
borderColor: "--border-color",
|
|
@@ -31545,6 +31762,7 @@ const Meter = ({
|
|
|
31545
31762
|
style,
|
|
31546
31763
|
...rest
|
|
31547
31764
|
}) => {
|
|
31765
|
+
import.meta.css = [css$4, "@jsenv/navi/src/text/meter.jsx"];
|
|
31548
31766
|
const defaultRef = useRef();
|
|
31549
31767
|
const ref = rest.ref || defaultRef;
|
|
31550
31768
|
value = Number(value);
|
|
@@ -31767,7 +31985,7 @@ const SVGMaskOverlay = ({
|
|
|
31767
31985
|
};
|
|
31768
31986
|
|
|
31769
31987
|
installImportMetaCssBuild(import.meta);// We HAVE TO put paddings around the dialog to ensure window resizing respects this space
|
|
31770
|
-
|
|
31988
|
+
const css$3 = /* css */`
|
|
31771
31989
|
@layer navi {
|
|
31772
31990
|
.navi_dialog_layout {
|
|
31773
31991
|
--layout-margin: 30px;
|
|
@@ -31825,7 +32043,7 @@ import.meta.css = [/* css */`
|
|
|
31825
32043
|
border-color: var(--layout-border-color);
|
|
31826
32044
|
border-radius: var(--layout-border-radius);
|
|
31827
32045
|
}
|
|
31828
|
-
|
|
32046
|
+
`;
|
|
31829
32047
|
const DialogLayoutStyleCSSVars = {
|
|
31830
32048
|
margin: "--layout-margin",
|
|
31831
32049
|
marginTop: "--layout-margin-top",
|
|
@@ -31851,6 +32069,7 @@ const DialogLayout = ({
|
|
|
31851
32069
|
alignY = "center",
|
|
31852
32070
|
...props
|
|
31853
32071
|
}) => {
|
|
32072
|
+
import.meta.css = [css$3, "@jsenv/navi/src/layout/dialog_layout.jsx"];
|
|
31854
32073
|
return jsx(Box, {
|
|
31855
32074
|
baseClassName: "navi_dialog_layout",
|
|
31856
32075
|
styleCSSVars: DialogLayoutStyleCSSVars,
|
|
@@ -31866,7 +32085,7 @@ const DialogLayout = ({
|
|
|
31866
32085
|
});
|
|
31867
32086
|
};
|
|
31868
32087
|
|
|
31869
|
-
installImportMetaCssBuild(import.meta);
|
|
32088
|
+
installImportMetaCssBuild(import.meta);const css$2 = /* css */`
|
|
31870
32089
|
@layer navi {
|
|
31871
32090
|
.navi_separator {
|
|
31872
32091
|
--size: 1px;
|
|
@@ -31898,7 +32117,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
31898
32117
|
vertical-align: bottom;
|
|
31899
32118
|
}
|
|
31900
32119
|
}
|
|
31901
|
-
|
|
32120
|
+
`;
|
|
31902
32121
|
const SeparatorStyleCSSVars = {
|
|
31903
32122
|
color: "--color"
|
|
31904
32123
|
};
|
|
@@ -31906,6 +32125,7 @@ const Separator = ({
|
|
|
31906
32125
|
vertical,
|
|
31907
32126
|
...props
|
|
31908
32127
|
}) => {
|
|
32128
|
+
import.meta.css = [css$2, "@jsenv/navi/src/layout/separator.jsx"];
|
|
31909
32129
|
return jsx(Box, {
|
|
31910
32130
|
as: vertical ? "span" : "hr",
|
|
31911
32131
|
...props,
|
|
@@ -31915,7 +32135,7 @@ const Separator = ({
|
|
|
31915
32135
|
});
|
|
31916
32136
|
};
|
|
31917
32137
|
|
|
31918
|
-
installImportMetaCssBuild(import.meta);
|
|
32138
|
+
installImportMetaCssBuild(import.meta);const css$1 = /* css */`
|
|
31919
32139
|
@layer navi {
|
|
31920
32140
|
.navi_viewport_layout {
|
|
31921
32141
|
--layout-padding: 40px;
|
|
@@ -31942,7 +32162,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
31942
32162
|
);
|
|
31943
32163
|
background: var(--layout-background);
|
|
31944
32164
|
}
|
|
31945
|
-
|
|
32165
|
+
`;
|
|
31946
32166
|
const ViewportLayoutStyleCSSVars = {
|
|
31947
32167
|
padding: "--layout-padding",
|
|
31948
32168
|
paddingTop: "--layout-padding-top",
|
|
@@ -31952,6 +32172,7 @@ const ViewportLayoutStyleCSSVars = {
|
|
|
31952
32172
|
background: "--layout-background"
|
|
31953
32173
|
};
|
|
31954
32174
|
const ViewportLayout = props => {
|
|
32175
|
+
import.meta.css = [css$1, "@jsenv/navi/src/layout/viewport_layout.jsx"];
|
|
31955
32176
|
return jsx(Box, {
|
|
31956
32177
|
row: true,
|
|
31957
32178
|
width: "100%",
|
|
@@ -31962,7 +32183,7 @@ const ViewportLayout = props => {
|
|
|
31962
32183
|
});
|
|
31963
32184
|
};
|
|
31964
32185
|
|
|
31965
|
-
installImportMetaCssBuild(import.meta);
|
|
32186
|
+
installImportMetaCssBuild(import.meta);const css = /* css */`
|
|
31966
32187
|
@layer navi {
|
|
31967
32188
|
.navi_side_panel {
|
|
31968
32189
|
--side-panel-width: 400px;
|
|
@@ -32059,7 +32280,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
32059
32280
|
transform: translateX(100%);
|
|
32060
32281
|
}
|
|
32061
32282
|
}
|
|
32062
|
-
|
|
32283
|
+
`;
|
|
32063
32284
|
const SidePanelCloseContext = createContext(null);
|
|
32064
32285
|
const useSidePanelClose = () => useContext(SidePanelCloseContext);
|
|
32065
32286
|
const SidePanelStyleCSSVars = {
|
|
@@ -32074,6 +32295,7 @@ const SidePanel = ({
|
|
|
32074
32295
|
width,
|
|
32075
32296
|
...rest
|
|
32076
32297
|
}) => {
|
|
32298
|
+
import.meta.css = [css, "@jsenv/navi/src/popover/side_panel.jsx"];
|
|
32077
32299
|
onClose = useStableCallback(onClose);
|
|
32078
32300
|
const panelDialogRef = useRef(null);
|
|
32079
32301
|
const [phase, setPhase] = useState(isOpen ? "open" : "closed");
|