@jsenv/navi 0.22.4 → 0.23.1
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 +346 -121
- package/dist/jsenv_navi.js.map +52 -51
- 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;
|
|
@@ -20649,7 +20642,7 @@ const TextAnchor = ({
|
|
|
20649
20642
|
textSize,
|
|
20650
20643
|
lineLayout
|
|
20651
20644
|
}) => {
|
|
20652
|
-
import.meta.css = [css$
|
|
20645
|
+
import.meta.css = [css$t, "@jsenv/navi/src/text/text_anchor.jsx"];
|
|
20653
20646
|
const anchorRef = useRef();
|
|
20654
20647
|
useLayoutEffect(() => {
|
|
20655
20648
|
const anchorEl = anchorRef.current;
|
|
@@ -20744,7 +20737,7 @@ const computeTopOffset = ({
|
|
|
20744
20737
|
};
|
|
20745
20738
|
const charTopCanvas = document.createElement("canvas");
|
|
20746
20739
|
|
|
20747
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
20740
|
+
installImportMetaCssBuild(import.meta);const css$s = /* css */`
|
|
20748
20741
|
@layer navi {
|
|
20749
20742
|
/* Ensure data attributes from box.jsx can win to update display */
|
|
20750
20743
|
.navi_icon {
|
|
@@ -20817,7 +20810,7 @@ const Icon = ({
|
|
|
20817
20810
|
lineLayout,
|
|
20818
20811
|
...props
|
|
20819
20812
|
}) => {
|
|
20820
|
-
import.meta.css = [css$
|
|
20813
|
+
import.meta.css = [css$s, "@jsenv/navi/src/text/icon.jsx"];
|
|
20821
20814
|
const innerChildren = href ? jsx("svg", {
|
|
20822
20815
|
width: "100%",
|
|
20823
20816
|
height: "100%",
|
|
@@ -21419,7 +21412,7 @@ const useUIState = (uiStateController) => {
|
|
|
21419
21412
|
return trackedUIState;
|
|
21420
21413
|
};
|
|
21421
21414
|
|
|
21422
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
21415
|
+
installImportMetaCssBuild(import.meta);const css$r = /* css */`
|
|
21423
21416
|
@layer navi {
|
|
21424
21417
|
.navi_button {
|
|
21425
21418
|
--button-outline-width: 1px;
|
|
@@ -21673,7 +21666,7 @@ installImportMetaCssBuild(import.meta);const css$5 = /* css */`
|
|
|
21673
21666
|
}
|
|
21674
21667
|
`;
|
|
21675
21668
|
const Button = props => {
|
|
21676
|
-
import.meta.css = [css$
|
|
21669
|
+
import.meta.css = [css$r, "@jsenv/navi/src/field/button.jsx"];
|
|
21677
21670
|
return renderActionableComponent(props, {
|
|
21678
21671
|
Basic: ButtonBasic,
|
|
21679
21672
|
WithAction: ButtonWithAction,
|
|
@@ -22238,7 +22231,7 @@ const useDimColorWhen = (elementRef, shouldDim) => {
|
|
|
22238
22231
|
};
|
|
22239
22232
|
|
|
22240
22233
|
installImportMetaCssBuild(import.meta);/* eslint-disable jsenv/no-unknown-params */
|
|
22241
|
-
const css$
|
|
22234
|
+
const css$q = /* css */`
|
|
22242
22235
|
@layer navi {
|
|
22243
22236
|
.navi_link {
|
|
22244
22237
|
--link-border-radius: unset;
|
|
@@ -22559,7 +22552,7 @@ Object.assign(PSEUDO_CLASSES, {
|
|
|
22559
22552
|
}
|
|
22560
22553
|
});
|
|
22561
22554
|
const Link = props => {
|
|
22562
|
-
import.meta.css = [css$
|
|
22555
|
+
import.meta.css = [css$q, "@jsenv/navi/src/nav/link/link.jsx"];
|
|
22563
22556
|
return renderActionableComponent(props, {
|
|
22564
22557
|
Basic: LinkBasic,
|
|
22565
22558
|
WithAction: LinkWithAction
|
|
@@ -22821,7 +22814,7 @@ installImportMetaCssBuild(import.meta);/**
|
|
|
22821
22814
|
* TabList component with support for horizontal and vertical layouts
|
|
22822
22815
|
* https://dribbble.com/search/tabs
|
|
22823
22816
|
*/
|
|
22824
|
-
const css$
|
|
22817
|
+
const css$p = /* css */`
|
|
22825
22818
|
@layer navi {
|
|
22826
22819
|
.navi_nav {
|
|
22827
22820
|
--nav-border: none;
|
|
@@ -22957,7 +22950,7 @@ const Nav = ({
|
|
|
22957
22950
|
panelBorderConnection,
|
|
22958
22951
|
...props
|
|
22959
22952
|
}) => {
|
|
22960
|
-
import.meta.css = [css$
|
|
22953
|
+
import.meta.css = [css$p, "@jsenv/navi/src/nav/link/nav.jsx"];
|
|
22961
22954
|
children = toChildArray(children);
|
|
22962
22955
|
return jsx(Box, {
|
|
22963
22956
|
as: "nav",
|
|
@@ -23005,7 +22998,7 @@ const useFocusGroup = (
|
|
|
23005
22998
|
|
|
23006
22999
|
installImportMetaCssBuild(import.meta);const rightArrowPath = "M680-480L360-160l-80-80 240-240-240-240 80-80 320 320z";
|
|
23007
23000
|
const downArrowPath = "M480-280L160-600l80-80 240 240 240-240 80 80-320 320z";
|
|
23008
|
-
|
|
23001
|
+
const css$o = /* css */`
|
|
23009
23002
|
.navi_summary_marker {
|
|
23010
23003
|
width: 1em;
|
|
23011
23004
|
height: 1em;
|
|
@@ -23085,11 +23078,12 @@ import.meta.css = [/* css */`
|
|
|
23085
23078
|
d: path("${rightArrowPath}");
|
|
23086
23079
|
}
|
|
23087
23080
|
}
|
|
23088
|
-
|
|
23081
|
+
`;
|
|
23089
23082
|
const SummaryMarker = ({
|
|
23090
23083
|
open,
|
|
23091
23084
|
loading
|
|
23092
23085
|
}) => {
|
|
23086
|
+
import.meta.css = [css$o, "@jsenv/navi/src/field/details/summary_marker.jsx"];
|
|
23093
23087
|
const showLoading = useDebounceTrue(loading, 300);
|
|
23094
23088
|
const mountedRef = useRef(false);
|
|
23095
23089
|
const prevOpenRef = useRef(open);
|
|
@@ -23143,7 +23137,7 @@ const SummaryMarker = ({
|
|
|
23143
23137
|
});
|
|
23144
23138
|
};
|
|
23145
23139
|
|
|
23146
|
-
installImportMetaCssBuild(import.meta);
|
|
23140
|
+
installImportMetaCssBuild(import.meta);const css$n = /* css */`
|
|
23147
23141
|
.navi_details {
|
|
23148
23142
|
position: relative;
|
|
23149
23143
|
z-index: 1;
|
|
@@ -23178,8 +23172,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
23178
23172
|
}
|
|
23179
23173
|
}
|
|
23180
23174
|
}
|
|
23181
|
-
|
|
23175
|
+
`;
|
|
23182
23176
|
const Details = props => {
|
|
23177
|
+
import.meta.css = [css$n, "@jsenv/navi/src/field/details/details.jsx"];
|
|
23183
23178
|
const {
|
|
23184
23179
|
value = "on",
|
|
23185
23180
|
persists
|
|
@@ -23494,7 +23489,7 @@ const fieldPropSet = new Set([
|
|
|
23494
23489
|
"data-testid",
|
|
23495
23490
|
]);
|
|
23496
23491
|
|
|
23497
|
-
installImportMetaCssBuild(import.meta);
|
|
23492
|
+
installImportMetaCssBuild(import.meta);const css$m = /* css */`
|
|
23498
23493
|
@layer navi {
|
|
23499
23494
|
label {
|
|
23500
23495
|
&[data-interactive] {
|
|
@@ -23508,7 +23503,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
23508
23503
|
}
|
|
23509
23504
|
}
|
|
23510
23505
|
}
|
|
23511
|
-
|
|
23506
|
+
`;
|
|
23512
23507
|
const ReportReadOnlyOnLabelContext = createContext();
|
|
23513
23508
|
const ReportDisabledOnLabelContext = createContext();
|
|
23514
23509
|
const ReportInteractiveOnLabelContext = createContext();
|
|
@@ -23526,6 +23521,7 @@ const reportDisabledToLabel = value => {
|
|
|
23526
23521
|
};
|
|
23527
23522
|
const LabelPseudoClasses = [":hover", ":active", ":focus", ":focus-visible", ":read-only", ":disabled", ":-navi-loading"];
|
|
23528
23523
|
const Label = props => {
|
|
23524
|
+
import.meta.css = [css$m, "@jsenv/navi/src/field/label.jsx"];
|
|
23529
23525
|
const {
|
|
23530
23526
|
readOnly,
|
|
23531
23527
|
disabled,
|
|
@@ -23559,7 +23555,7 @@ const Label = props => {
|
|
|
23559
23555
|
});
|
|
23560
23556
|
};
|
|
23561
23557
|
|
|
23562
|
-
installImportMetaCssBuild(import.meta);
|
|
23558
|
+
installImportMetaCssBuild(import.meta);const css$l = /* css */`
|
|
23563
23559
|
@layer navi {
|
|
23564
23560
|
.navi_checkbox {
|
|
23565
23561
|
--margin: 3px 3px 3px 4px;
|
|
@@ -23884,8 +23880,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
23884
23880
|
}
|
|
23885
23881
|
}
|
|
23886
23882
|
}
|
|
23887
|
-
|
|
23883
|
+
`;
|
|
23888
23884
|
const InputCheckbox = props => {
|
|
23885
|
+
import.meta.css = [css$l, "@jsenv/navi/src/field/input_checkbox.jsx"];
|
|
23889
23886
|
const {
|
|
23890
23887
|
value = "on"
|
|
23891
23888
|
} = props;
|
|
@@ -24154,15 +24151,8 @@ const InputCheckboxWithAction = props => {
|
|
|
24154
24151
|
});
|
|
24155
24152
|
};
|
|
24156
24153
|
|
|
24157
|
-
|
|
24158
|
-
|
|
24159
|
-
@layer navi {
|
|
24160
|
-
.navi_checkbox_list {
|
|
24161
|
-
display: flex;
|
|
24162
|
-
flex-direction: column;
|
|
24163
|
-
}
|
|
24164
|
-
}
|
|
24165
|
-
`, "@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
|
+
|
|
24166
24156
|
const CheckboxList = forwardRef((props, ref) => {
|
|
24167
24157
|
const uiStateController = useUIGroupStateController(props, "checkbox_list", {
|
|
24168
24158
|
childComponentType: "checkbox",
|
|
@@ -24206,15 +24196,13 @@ const CheckboxListBasic = forwardRef((props, ref) => {
|
|
|
24206
24196
|
const innerLoading = loading || contextLoading;
|
|
24207
24197
|
const innerReadOnly = readOnly || contextReadOnly || innerLoading || uiStateController.readOnly;
|
|
24208
24198
|
const innerDisabled = disabled || contextDisabled;
|
|
24209
|
-
return jsx(
|
|
24199
|
+
return jsx(Box, {
|
|
24200
|
+
flex: true,
|
|
24210
24201
|
...rest,
|
|
24211
24202
|
ref: innerRef,
|
|
24212
24203
|
name: name,
|
|
24213
|
-
|
|
24214
|
-
"data-checkbox-list":
|
|
24215
|
-
// eslint-disable-next-line react/no-unknown-property
|
|
24216
|
-
,
|
|
24217
|
-
|
|
24204
|
+
baseClassName: "navi_checkbox_list",
|
|
24205
|
+
"data-checkbox-list": "",
|
|
24218
24206
|
onresetuistate: e => {
|
|
24219
24207
|
uiStateController.resetUIState(e);
|
|
24220
24208
|
},
|
|
@@ -24308,7 +24296,7 @@ forwardRef((props, ref) => {
|
|
|
24308
24296
|
});
|
|
24309
24297
|
});
|
|
24310
24298
|
|
|
24311
|
-
installImportMetaCssBuild(import.meta);
|
|
24299
|
+
installImportMetaCssBuild(import.meta);const css$k = /* css */`
|
|
24312
24300
|
@layer navi {
|
|
24313
24301
|
.navi_radio {
|
|
24314
24302
|
--margin: 3px 3px 0 5px;
|
|
@@ -24599,8 +24587,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
24599
24587
|
}
|
|
24600
24588
|
}
|
|
24601
24589
|
}
|
|
24602
|
-
|
|
24590
|
+
`;
|
|
24603
24591
|
const InputRadio = props => {
|
|
24592
|
+
import.meta.css = [css$k, "@jsenv/navi/src/field/input_radio.jsx"];
|
|
24604
24593
|
const {
|
|
24605
24594
|
value = "on"
|
|
24606
24595
|
} = props;
|
|
@@ -24846,7 +24835,7 @@ const InputRadioWithAction = () => {
|
|
|
24846
24835
|
throw new Error(`<Input type="radio" /> with an action make no sense. Use <RadioList action={something} /> instead`);
|
|
24847
24836
|
};
|
|
24848
24837
|
|
|
24849
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
24838
|
+
installImportMetaCssBuild(import.meta);const css$j = /* css */`
|
|
24850
24839
|
@layer navi {
|
|
24851
24840
|
.navi_input_range {
|
|
24852
24841
|
--border-radius: 6px;
|
|
@@ -25055,7 +25044,7 @@ installImportMetaCssBuild(import.meta);const css$2 = /* css */`
|
|
|
25055
25044
|
}
|
|
25056
25045
|
`;
|
|
25057
25046
|
const InputRange = props => {
|
|
25058
|
-
import.meta.css = [css$
|
|
25047
|
+
import.meta.css = [css$j, "@jsenv/navi/src/field/input_range.jsx"];
|
|
25059
25048
|
const uiStateController = useUIStateController(props, "input");
|
|
25060
25049
|
const uiState = useUIState(uiStateController);
|
|
25061
25050
|
const input = renderActionableComponent(props, {
|
|
@@ -25342,7 +25331,7 @@ installImportMetaCssBuild(import.meta);/**
|
|
|
25342
25331
|
* - <InputCheckbox /> for type="checkbox"
|
|
25343
25332
|
* - <InputRadio /> for type="radio"
|
|
25344
25333
|
*/
|
|
25345
|
-
|
|
25334
|
+
const css$i = /* css */`
|
|
25346
25335
|
@layer navi {
|
|
25347
25336
|
.navi_input {
|
|
25348
25337
|
--border-radius: 2px;
|
|
@@ -25552,8 +25541,9 @@ import.meta.css = [/* css */`
|
|
|
25552
25541
|
/* Fortunately we can override it as follow */
|
|
25553
25542
|
-webkit-text-fill-color: var(--x-color) !important;
|
|
25554
25543
|
}
|
|
25555
|
-
|
|
25544
|
+
`;
|
|
25556
25545
|
const InputTextual = props => {
|
|
25546
|
+
import.meta.css = [css$i, "@jsenv/navi/src/field/input_textual.jsx"];
|
|
25557
25547
|
const uiStateController = useUIStateController(props, "input");
|
|
25558
25548
|
const uiState = useUIState(uiStateController);
|
|
25559
25549
|
const input = renderActionableComponent(props, {
|
|
@@ -25923,7 +25913,7 @@ installImportMetaCssBuild(import.meta);/**
|
|
|
25923
25913
|
* This means an editable thing MUST have a parent with position relative that wraps the content and the eventual editable input
|
|
25924
25914
|
*
|
|
25925
25915
|
*/
|
|
25926
|
-
|
|
25916
|
+
const css$h = /* css */`
|
|
25927
25917
|
.navi_editable_wrapper {
|
|
25928
25918
|
--inset-top: 0px;
|
|
25929
25919
|
--inset-right: 0px;
|
|
@@ -25948,7 +25938,7 @@ import.meta.css = [/* css */`
|
|
|
25948
25938
|
pointer-events: auto;
|
|
25949
25939
|
}
|
|
25950
25940
|
}
|
|
25951
|
-
|
|
25941
|
+
`;
|
|
25952
25942
|
const useEditionController = () => {
|
|
25953
25943
|
const [editing, editingSetter] = useState(null);
|
|
25954
25944
|
const startEditing = useCallback(event => {
|
|
@@ -25972,6 +25962,7 @@ const useEditionController = () => {
|
|
|
25972
25962
|
};
|
|
25973
25963
|
};
|
|
25974
25964
|
const Editable = props => {
|
|
25965
|
+
import.meta.css = [css$h, "@jsenv/navi/src/field/edition/editable.jsx"];
|
|
25975
25966
|
let {
|
|
25976
25967
|
children,
|
|
25977
25968
|
action,
|
|
@@ -26382,7 +26373,7 @@ const FormWithAction = props => {
|
|
|
26382
26373
|
// form.dispatchEvent(customEvent);
|
|
26383
26374
|
// };
|
|
26384
26375
|
|
|
26385
|
-
installImportMetaCssBuild(import.meta);
|
|
26376
|
+
installImportMetaCssBuild(import.meta);const css$g = /* css */`
|
|
26386
26377
|
.navi_group {
|
|
26387
26378
|
--border-width: 1px;
|
|
26388
26379
|
|
|
@@ -26471,7 +26462,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
26471
26462
|
}
|
|
26472
26463
|
}
|
|
26473
26464
|
}
|
|
26474
|
-
|
|
26465
|
+
`;
|
|
26475
26466
|
const Group = ({
|
|
26476
26467
|
children,
|
|
26477
26468
|
borderWidth = 1,
|
|
@@ -26479,6 +26470,7 @@ const Group = ({
|
|
|
26479
26470
|
vertical = row,
|
|
26480
26471
|
...props
|
|
26481
26472
|
}) => {
|
|
26473
|
+
import.meta.css = [css$g, "@jsenv/navi/src/field/group.jsx"];
|
|
26482
26474
|
if (typeof borderWidth === "string") {
|
|
26483
26475
|
borderWidth = parseFloat(borderWidth);
|
|
26484
26476
|
}
|
|
@@ -26496,7 +26488,6 @@ const Group = ({
|
|
|
26496
26488
|
});
|
|
26497
26489
|
};
|
|
26498
26490
|
|
|
26499
|
-
installImportMetaCssBuild(import.meta);import.meta.css = [/* css */``, "@jsenv/navi/src/field/radio_list.jsx"];
|
|
26500
26491
|
const RadioList = props => {
|
|
26501
26492
|
const uiStateController = useUIGroupStateController(props, "radio_list", {
|
|
26502
26493
|
childComponentType: "radio",
|
|
@@ -26678,12 +26669,13 @@ const useRefArray = (items, keyFromItem) => {
|
|
|
26678
26669
|
};
|
|
26679
26670
|
|
|
26680
26671
|
installImportMetaCssBuild(import.meta);const useNavState = () => {};
|
|
26681
|
-
|
|
26672
|
+
const css$f = /* css */`
|
|
26682
26673
|
.navi_select[data-readonly] {
|
|
26683
26674
|
pointer-events: none;
|
|
26684
26675
|
}
|
|
26685
|
-
|
|
26676
|
+
`;
|
|
26686
26677
|
const Select = forwardRef((props, ref) => {
|
|
26678
|
+
import.meta.css = [css$f, "@jsenv/navi/src/field/select.jsx"];
|
|
26687
26679
|
const select = renderActionableComponent(props, ref);
|
|
26688
26680
|
return select;
|
|
26689
26681
|
});
|
|
@@ -26987,7 +26979,7 @@ const Z_INDEX_DROP_PREVIEW = Z_INDEX_STICKY_CORNER + 1;
|
|
|
26987
26979
|
|
|
26988
26980
|
const Z_INDEX_TABLE_UI = Z_INDEX_STICKY_CORNER + 1;
|
|
26989
26981
|
|
|
26990
|
-
installImportMetaCssBuild(import.meta);
|
|
26982
|
+
installImportMetaCssBuild(import.meta);const css$e = /* css */`
|
|
26991
26983
|
.navi_table_drag_clone_container {
|
|
26992
26984
|
position: absolute;
|
|
26993
26985
|
top: var(--table-visual-top);
|
|
@@ -27106,7 +27098,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
27106
27098
|
width: 10px;
|
|
27107
27099
|
height: 10px;
|
|
27108
27100
|
}
|
|
27109
|
-
|
|
27101
|
+
`;
|
|
27110
27102
|
const TableDragContext = createContext();
|
|
27111
27103
|
const useTableDragContextValue = ({
|
|
27112
27104
|
tableDragCloneContainerRef,
|
|
@@ -27167,6 +27159,7 @@ const moveItem = (array, indexA, indexB) => {
|
|
|
27167
27159
|
return newArray;
|
|
27168
27160
|
};
|
|
27169
27161
|
const TableDragCloneContainer = forwardRef((props, ref) => {
|
|
27162
|
+
import.meta.css = [css$e, "@jsenv/navi/src/field/table/drag/table_drag.jsx"];
|
|
27170
27163
|
const {
|
|
27171
27164
|
tableId
|
|
27172
27165
|
} = props;
|
|
@@ -27651,7 +27644,7 @@ installImportMetaCssBuild(import.meta);const ROW_MIN_HEIGHT = 30;
|
|
|
27651
27644
|
const ROW_MAX_HEIGHT = 100;
|
|
27652
27645
|
const COLUMN_MIN_WIDTH = 50;
|
|
27653
27646
|
const COLUMN_MAX_WIDTH = 500;
|
|
27654
|
-
|
|
27647
|
+
const css$d = /* css */`
|
|
27655
27648
|
@layer navi {
|
|
27656
27649
|
.navi_table {
|
|
27657
27650
|
--table-resizer-handle-color: #063b7c;
|
|
@@ -27807,10 +27800,13 @@ import.meta.css = [/* css */`
|
|
|
27807
27800
|
.navi_table_row_resizer[data-grabbed] .navi_table_row_resizer_line {
|
|
27808
27801
|
opacity: 1;
|
|
27809
27802
|
}
|
|
27810
|
-
|
|
27803
|
+
`;
|
|
27811
27804
|
|
|
27812
27805
|
// Column resize components
|
|
27813
|
-
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;
|
|
27814
27810
|
return jsxs("div", {
|
|
27815
27811
|
ref: ref,
|
|
27816
27812
|
className: "navi_table_column_resizer",
|
|
@@ -27827,7 +27823,7 @@ const TableColumnResizer = forwardRef((props, ref) => {
|
|
|
27827
27823
|
className: "navi_table_column_resizer_line"
|
|
27828
27824
|
})]
|
|
27829
27825
|
});
|
|
27830
|
-
}
|
|
27826
|
+
};
|
|
27831
27827
|
const TableCellColumnResizeHandles = ({
|
|
27832
27828
|
columnIndex,
|
|
27833
27829
|
columnMinWidth,
|
|
@@ -28130,7 +28126,9 @@ const initResizeTableRowViaPointer = (pointerdownEvent, {
|
|
|
28130
28126
|
};
|
|
28131
28127
|
|
|
28132
28128
|
// Row resize components
|
|
28133
|
-
const TableRowResizer =
|
|
28129
|
+
const TableRowResizer = props => {
|
|
28130
|
+
const defaultRef = useRef();
|
|
28131
|
+
const ref = props.ref || defaultRef;
|
|
28134
28132
|
return jsxs("div", {
|
|
28135
28133
|
ref: ref,
|
|
28136
28134
|
className: "navi_table_row_resizer",
|
|
@@ -28147,7 +28145,7 @@ const TableRowResizer = forwardRef((props, ref) => {
|
|
|
28147
28145
|
className: "navi_table_row_resizer_line"
|
|
28148
28146
|
})]
|
|
28149
28147
|
});
|
|
28150
|
-
}
|
|
28148
|
+
};
|
|
28151
28149
|
const TableCellRowResizeHandles = ({
|
|
28152
28150
|
rowIndex,
|
|
28153
28151
|
rowMinHeight,
|
|
@@ -28273,7 +28271,7 @@ const findPreviousTableRow = currentRow => {
|
|
|
28273
28271
|
return currentIndex > 0 ? allRows[currentIndex - 1] : null;
|
|
28274
28272
|
};
|
|
28275
28273
|
|
|
28276
|
-
installImportMetaCssBuild(import.meta);
|
|
28274
|
+
installImportMetaCssBuild(import.meta);const css$c = /* css */`
|
|
28277
28275
|
@layer navi {
|
|
28278
28276
|
.navi_table {
|
|
28279
28277
|
--selection-border-color: var(--navi-selection-border-color, #0078d4);
|
|
@@ -28368,13 +28366,14 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
28368
28366
|
inset 0 -1px 0 0 var(--selection-border-color),
|
|
28369
28367
|
inset 1px 0 0 0 var(--selection-border-color);
|
|
28370
28368
|
}
|
|
28371
|
-
|
|
28369
|
+
`;
|
|
28372
28370
|
const useTableSelectionController = ({
|
|
28373
28371
|
tableRef,
|
|
28374
28372
|
selection,
|
|
28375
28373
|
onSelectionChange,
|
|
28376
28374
|
selectionColor
|
|
28377
28375
|
}) => {
|
|
28376
|
+
import.meta.css = [css$c, "@jsenv/navi/src/field/table/selection/table_selection.jsx"];
|
|
28378
28377
|
const selectionController = useSelectionController({
|
|
28379
28378
|
elementRef: tableRef,
|
|
28380
28379
|
layout: "grid",
|
|
@@ -28845,7 +28844,7 @@ const useTableStickyContextValue = ({
|
|
|
28845
28844
|
};
|
|
28846
28845
|
|
|
28847
28846
|
installImportMetaCssBuild(import.meta);// TODO: sticky left/top frontier should likely use "followPosition"
|
|
28848
|
-
|
|
28847
|
+
const css$b = /* css */`
|
|
28849
28848
|
@layer navi {
|
|
28850
28849
|
.navi_table {
|
|
28851
28850
|
--sticky-frontier-color: #c0c0c0;
|
|
@@ -29084,10 +29083,11 @@ import.meta.css = [/* css */`
|
|
|
29084
29083
|
inset -1px 0 0 0 var(--border-color),
|
|
29085
29084
|
inset 0 -1px 0 0 var(--border-color);
|
|
29086
29085
|
}
|
|
29087
|
-
|
|
29086
|
+
`;
|
|
29088
29087
|
const TableStickyFrontier = ({
|
|
29089
29088
|
tableRef
|
|
29090
29089
|
}) => {
|
|
29090
|
+
import.meta.css = [css$b, "@jsenv/navi/src/field/table/sticky/table_sticky.jsx"];
|
|
29091
29091
|
const stickyLeftFrontierGhostRef = useRef();
|
|
29092
29092
|
const stickyLeftFrontierPreviewRef = useRef();
|
|
29093
29093
|
const stickyTopFrontierGhostRef = useRef();
|
|
@@ -29306,7 +29306,220 @@ const initMoveStickyFrontierViaPointer = (pointerdownEvent, {
|
|
|
29306
29306
|
});
|
|
29307
29307
|
};
|
|
29308
29308
|
|
|
29309
|
-
|
|
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 */`
|
|
29310
29523
|
.navi_table_ui {
|
|
29311
29524
|
position: fixed;
|
|
29312
29525
|
inset: 0;
|
|
@@ -29315,8 +29528,9 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
29315
29528
|
overflow: hidden; /* Ensure UI elements cannot impact scrollbars of the document */
|
|
29316
29529
|
/* background: rgba(0, 255, 0, 0.2); */
|
|
29317
29530
|
}
|
|
29318
|
-
|
|
29531
|
+
`;
|
|
29319
29532
|
const TableUI = forwardRef((props, ref) => {
|
|
29533
|
+
import.meta.css = [css$9, "@jsenv/navi/src/field/table/table_ui.jsx"];
|
|
29320
29534
|
const {
|
|
29321
29535
|
tableRef,
|
|
29322
29536
|
tableId,
|
|
@@ -29352,7 +29566,7 @@ const TableUI = forwardRef((props, ref) => {
|
|
|
29352
29566
|
}), document.body);
|
|
29353
29567
|
});
|
|
29354
29568
|
|
|
29355
|
-
|
|
29569
|
+
installImportMetaCssBuild(import.meta);/**
|
|
29356
29570
|
* Table Component with Custom Border and Selection System
|
|
29357
29571
|
*
|
|
29358
29572
|
* PROBLEM: We want to draw selected table cells with a clear visual perimeter
|
|
@@ -29403,7 +29617,6 @@ const TableUI = forwardRef((props, ref) => {
|
|
|
29403
29617
|
* - Delete a column (how?)
|
|
29404
29618
|
* - Update table column info (I guess a down arrow icon which opens a meny when clicked for instance)
|
|
29405
29619
|
*/
|
|
29406
|
-
|
|
29407
29620
|
const [useColumnTrackerProviders, useRegisterColumn, useColumnByIndex] = createIsolatedItemTracker();
|
|
29408
29621
|
const [useRowTrackerProvider, useRegisterRow, useRowByIndex] = createItemTracker();
|
|
29409
29622
|
const ColumnProducerProviderContext = createContext();
|
|
@@ -29415,6 +29628,7 @@ const RowIndexContext = createContext();
|
|
|
29415
29628
|
const TableSectionContext = createContext();
|
|
29416
29629
|
const useIsInTableHead = () => useContext(TableSectionContext) === "head";
|
|
29417
29630
|
const Table = props => {
|
|
29631
|
+
import.meta.css = [css$a, "@jsenv/navi/src/field/table/table.jsx"];
|
|
29418
29632
|
const tableDefaultRef = useRef();
|
|
29419
29633
|
const tableDefaultId = `table-${useId()}`;
|
|
29420
29634
|
const {
|
|
@@ -29897,6 +30111,7 @@ const TableCell = props => {
|
|
|
29897
30111
|
// we use [data-focus] so that the attribute can be copied
|
|
29898
30112
|
// to the dragged cell copies
|
|
29899
30113
|
,
|
|
30114
|
+
|
|
29900
30115
|
"data-focus": activeElement === ref.current ? "" : undefined,
|
|
29901
30116
|
"data-first-row": isFirstRow ? "" : undefined,
|
|
29902
30117
|
"data-first-column": isFirstColumn ? "" : undefined,
|
|
@@ -29984,6 +30199,7 @@ const RowNumberCol = ({
|
|
|
29984
30199
|
// minWidth={minWidth}
|
|
29985
30200
|
// maxWidth={maxWidth}
|
|
29986
30201
|
,
|
|
30202
|
+
|
|
29987
30203
|
immovable: immovable,
|
|
29988
30204
|
...rest
|
|
29989
30205
|
});
|
|
@@ -30306,7 +30522,7 @@ const KeyboardShortcutAriaElement = ({
|
|
|
30306
30522
|
});
|
|
30307
30523
|
};
|
|
30308
30524
|
|
|
30309
|
-
installImportMetaCssBuild(import.meta);
|
|
30525
|
+
installImportMetaCssBuild(import.meta);const css$8 = /* css */`
|
|
30310
30526
|
@layer navi {
|
|
30311
30527
|
.navi_clipboard_container {
|
|
30312
30528
|
--height: 1.5em;
|
|
@@ -30333,11 +30549,12 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
30333
30549
|
transform: translateY(-100%);
|
|
30334
30550
|
}
|
|
30335
30551
|
}
|
|
30336
|
-
|
|
30552
|
+
`;
|
|
30337
30553
|
const ButtonCopyToClipboard = ({
|
|
30338
30554
|
children,
|
|
30339
30555
|
...props
|
|
30340
30556
|
}) => {
|
|
30557
|
+
import.meta.css = [css$8, "@jsenv/navi/src/field/button_copy_to_clipboard.jsx"];
|
|
30341
30558
|
const [copied, setCopied] = useState(false);
|
|
30342
30559
|
const renderedRef = useRef();
|
|
30343
30560
|
useEffect(() => {
|
|
@@ -30347,7 +30564,7 @@ const ButtonCopyToClipboard = ({
|
|
|
30347
30564
|
};
|
|
30348
30565
|
}, []);
|
|
30349
30566
|
return jsxs(Box, {
|
|
30350
|
-
|
|
30567
|
+
className: "navi_clipboard_container",
|
|
30351
30568
|
...props,
|
|
30352
30569
|
children: [jsx(Box, {
|
|
30353
30570
|
className: "navi_copied_notif",
|
|
@@ -30356,11 +30573,11 @@ const ButtonCopyToClipboard = ({
|
|
|
30356
30573
|
children: "Copi\xE9 !"
|
|
30357
30574
|
}), jsx(Button, {
|
|
30358
30575
|
className: "navi_copy_button",
|
|
30359
|
-
|
|
30576
|
+
flex: "y",
|
|
30577
|
+
alignY: "center",
|
|
30360
30578
|
icon: true,
|
|
30361
30579
|
revealOnInteraction: true,
|
|
30362
30580
|
square: true,
|
|
30363
|
-
alignY: "center",
|
|
30364
30581
|
expandY: true,
|
|
30365
30582
|
borderRadius: "xs",
|
|
30366
30583
|
action: async () => {
|
|
@@ -30418,7 +30635,7 @@ const Address = ({
|
|
|
30418
30635
|
});
|
|
30419
30636
|
};
|
|
30420
30637
|
|
|
30421
|
-
installImportMetaCssBuild(import.meta);const css$
|
|
30638
|
+
installImportMetaCssBuild(import.meta);const css$7 = /* css */`
|
|
30422
30639
|
@layer navi {
|
|
30423
30640
|
}
|
|
30424
30641
|
.navi_badge {
|
|
@@ -30463,7 +30680,7 @@ const Badge = ({
|
|
|
30463
30680
|
className,
|
|
30464
30681
|
...props
|
|
30465
30682
|
}) => {
|
|
30466
|
-
import.meta.css = [css$
|
|
30683
|
+
import.meta.css = [css$7, "@jsenv/navi/src/text/badge.jsx"];
|
|
30467
30684
|
const defaultRef = useRef();
|
|
30468
30685
|
const ref = props.ref || defaultRef;
|
|
30469
30686
|
useDarkBackgroundAttribute(ref);
|
|
@@ -30542,7 +30759,7 @@ const formatNumber = (value, { lang } = {}) => {
|
|
|
30542
30759
|
return new Intl.NumberFormat(lang).format(value);
|
|
30543
30760
|
};
|
|
30544
30761
|
|
|
30545
|
-
installImportMetaCssBuild(import.meta);const css = /* css */`
|
|
30762
|
+
installImportMetaCssBuild(import.meta);const css$6 = /* css */`
|
|
30546
30763
|
@layer navi {
|
|
30547
30764
|
}
|
|
30548
30765
|
.navi_text.navi_badge_count {
|
|
@@ -30666,7 +30883,7 @@ const BadgeCount = ({
|
|
|
30666
30883
|
lineLayout,
|
|
30667
30884
|
...props
|
|
30668
30885
|
}) => {
|
|
30669
|
-
import.meta.css = [css, "@jsenv/navi/src/text/badge_count.jsx"];
|
|
30886
|
+
import.meta.css = [css$6, "@jsenv/navi/src/text/badge_count.jsx"];
|
|
30670
30887
|
const defaultRef = useRef();
|
|
30671
30888
|
const ref = props.ref || defaultRef;
|
|
30672
30889
|
useDarkBackgroundAttribute(ref, [loading]);
|
|
@@ -30954,7 +31171,9 @@ const CodeBlock = ({
|
|
|
30954
31171
|
};
|
|
30955
31172
|
}
|
|
30956
31173
|
}
|
|
30957
|
-
customElements.
|
|
31174
|
+
if (!customElements.get("clipboard-copy")) {
|
|
31175
|
+
customElements.define("clipboard-copy", ClipboardCopy);
|
|
31176
|
+
}
|
|
30958
31177
|
const addToClipboard = async text => {
|
|
30959
31178
|
const type = "text/plain";
|
|
30960
31179
|
const clipboardItemData = {
|
|
@@ -31195,7 +31414,7 @@ const interpolate = (template, values) => {
|
|
|
31195
31414
|
});
|
|
31196
31415
|
};
|
|
31197
31416
|
|
|
31198
|
-
installImportMetaCssBuild(import.meta);
|
|
31417
|
+
installImportMetaCssBuild(import.meta);const css$5 = /* css */`
|
|
31199
31418
|
@layer navi {
|
|
31200
31419
|
.navi_quantity {
|
|
31201
31420
|
--unit-color: color-mix(in srgb, currentColor 50%, white);
|
|
@@ -31251,7 +31470,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
31251
31470
|
}
|
|
31252
31471
|
}
|
|
31253
31472
|
}
|
|
31254
|
-
|
|
31473
|
+
`;
|
|
31255
31474
|
const QuantityIntl = createIntl();
|
|
31256
31475
|
const wellKnownUnitMap = new Map();
|
|
31257
31476
|
/**
|
|
@@ -31305,6 +31524,7 @@ const Quantity = ({
|
|
|
31305
31524
|
bold = true,
|
|
31306
31525
|
...props
|
|
31307
31526
|
}) => {
|
|
31527
|
+
import.meta.css = [css$5, "@jsenv/navi/src/text/quantity.jsx"];
|
|
31308
31528
|
const value = parseQuantityValue(children);
|
|
31309
31529
|
const valueRounded = integer && typeof value === "number" ? Math.round(value) : value;
|
|
31310
31530
|
const valueFormatted = typeof valueRounded === "number" ? formatNumber(valueRounded, {
|
|
@@ -31388,7 +31608,7 @@ const parseQuantityValue = children => {
|
|
|
31388
31608
|
return Number.isNaN(parsed) ? children : parsed;
|
|
31389
31609
|
};
|
|
31390
31610
|
|
|
31391
|
-
installImportMetaCssBuild(import.meta);
|
|
31611
|
+
installImportMetaCssBuild(import.meta);const css$4 = /* css */`
|
|
31392
31612
|
@layer navi {
|
|
31393
31613
|
.navi_meter {
|
|
31394
31614
|
--loader-color: var(--navi-loader-color);
|
|
@@ -31505,7 +31725,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
31505
31725
|
}
|
|
31506
31726
|
}
|
|
31507
31727
|
}
|
|
31508
|
-
|
|
31728
|
+
`;
|
|
31509
31729
|
const MeterStyleCSSVars = {
|
|
31510
31730
|
trackColor: "--track-color",
|
|
31511
31731
|
borderColor: "--border-color",
|
|
@@ -31544,6 +31764,7 @@ const Meter = ({
|
|
|
31544
31764
|
style,
|
|
31545
31765
|
...rest
|
|
31546
31766
|
}) => {
|
|
31767
|
+
import.meta.css = [css$4, "@jsenv/navi/src/text/meter.jsx"];
|
|
31547
31768
|
const defaultRef = useRef();
|
|
31548
31769
|
const ref = rest.ref || defaultRef;
|
|
31549
31770
|
value = Number(value);
|
|
@@ -31766,7 +31987,7 @@ const SVGMaskOverlay = ({
|
|
|
31766
31987
|
};
|
|
31767
31988
|
|
|
31768
31989
|
installImportMetaCssBuild(import.meta);// We HAVE TO put paddings around the dialog to ensure window resizing respects this space
|
|
31769
|
-
|
|
31990
|
+
const css$3 = /* css */`
|
|
31770
31991
|
@layer navi {
|
|
31771
31992
|
.navi_dialog_layout {
|
|
31772
31993
|
--layout-margin: 30px;
|
|
@@ -31824,7 +32045,7 @@ import.meta.css = [/* css */`
|
|
|
31824
32045
|
border-color: var(--layout-border-color);
|
|
31825
32046
|
border-radius: var(--layout-border-radius);
|
|
31826
32047
|
}
|
|
31827
|
-
|
|
32048
|
+
`;
|
|
31828
32049
|
const DialogLayoutStyleCSSVars = {
|
|
31829
32050
|
margin: "--layout-margin",
|
|
31830
32051
|
marginTop: "--layout-margin-top",
|
|
@@ -31850,6 +32071,7 @@ const DialogLayout = ({
|
|
|
31850
32071
|
alignY = "center",
|
|
31851
32072
|
...props
|
|
31852
32073
|
}) => {
|
|
32074
|
+
import.meta.css = [css$3, "@jsenv/navi/src/layout/dialog_layout.jsx"];
|
|
31853
32075
|
return jsx(Box, {
|
|
31854
32076
|
baseClassName: "navi_dialog_layout",
|
|
31855
32077
|
styleCSSVars: DialogLayoutStyleCSSVars,
|
|
@@ -31865,7 +32087,7 @@ const DialogLayout = ({
|
|
|
31865
32087
|
});
|
|
31866
32088
|
};
|
|
31867
32089
|
|
|
31868
|
-
installImportMetaCssBuild(import.meta);
|
|
32090
|
+
installImportMetaCssBuild(import.meta);const css$2 = /* css */`
|
|
31869
32091
|
@layer navi {
|
|
31870
32092
|
.navi_separator {
|
|
31871
32093
|
--size: 1px;
|
|
@@ -31897,7 +32119,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
31897
32119
|
vertical-align: bottom;
|
|
31898
32120
|
}
|
|
31899
32121
|
}
|
|
31900
|
-
|
|
32122
|
+
`;
|
|
31901
32123
|
const SeparatorStyleCSSVars = {
|
|
31902
32124
|
color: "--color"
|
|
31903
32125
|
};
|
|
@@ -31905,6 +32127,7 @@ const Separator = ({
|
|
|
31905
32127
|
vertical,
|
|
31906
32128
|
...props
|
|
31907
32129
|
}) => {
|
|
32130
|
+
import.meta.css = [css$2, "@jsenv/navi/src/layout/separator.jsx"];
|
|
31908
32131
|
return jsx(Box, {
|
|
31909
32132
|
as: vertical ? "span" : "hr",
|
|
31910
32133
|
...props,
|
|
@@ -31914,7 +32137,7 @@ const Separator = ({
|
|
|
31914
32137
|
});
|
|
31915
32138
|
};
|
|
31916
32139
|
|
|
31917
|
-
installImportMetaCssBuild(import.meta);
|
|
32140
|
+
installImportMetaCssBuild(import.meta);const css$1 = /* css */`
|
|
31918
32141
|
@layer navi {
|
|
31919
32142
|
.navi_viewport_layout {
|
|
31920
32143
|
--layout-padding: 40px;
|
|
@@ -31941,7 +32164,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
31941
32164
|
);
|
|
31942
32165
|
background: var(--layout-background);
|
|
31943
32166
|
}
|
|
31944
|
-
|
|
32167
|
+
`;
|
|
31945
32168
|
const ViewportLayoutStyleCSSVars = {
|
|
31946
32169
|
padding: "--layout-padding",
|
|
31947
32170
|
paddingTop: "--layout-padding-top",
|
|
@@ -31951,6 +32174,7 @@ const ViewportLayoutStyleCSSVars = {
|
|
|
31951
32174
|
background: "--layout-background"
|
|
31952
32175
|
};
|
|
31953
32176
|
const ViewportLayout = props => {
|
|
32177
|
+
import.meta.css = [css$1, "@jsenv/navi/src/layout/viewport_layout.jsx"];
|
|
31954
32178
|
return jsx(Box, {
|
|
31955
32179
|
row: true,
|
|
31956
32180
|
width: "100%",
|
|
@@ -31961,7 +32185,7 @@ const ViewportLayout = props => {
|
|
|
31961
32185
|
});
|
|
31962
32186
|
};
|
|
31963
32187
|
|
|
31964
|
-
installImportMetaCssBuild(import.meta);
|
|
32188
|
+
installImportMetaCssBuild(import.meta);const css = /* css */`
|
|
31965
32189
|
@layer navi {
|
|
31966
32190
|
.navi_side_panel {
|
|
31967
32191
|
--side-panel-width: 400px;
|
|
@@ -32058,7 +32282,7 @@ installImportMetaCssBuild(import.meta);import.meta.css = [/* css */`
|
|
|
32058
32282
|
transform: translateX(100%);
|
|
32059
32283
|
}
|
|
32060
32284
|
}
|
|
32061
|
-
|
|
32285
|
+
`;
|
|
32062
32286
|
const SidePanelCloseContext = createContext(null);
|
|
32063
32287
|
const useSidePanelClose = () => useContext(SidePanelCloseContext);
|
|
32064
32288
|
const SidePanelStyleCSSVars = {
|
|
@@ -32073,6 +32297,7 @@ const SidePanel = ({
|
|
|
32073
32297
|
width,
|
|
32074
32298
|
...rest
|
|
32075
32299
|
}) => {
|
|
32300
|
+
import.meta.css = [css, "@jsenv/navi/src/popover/side_panel.jsx"];
|
|
32076
32301
|
onClose = useStableCallback(onClose);
|
|
32077
32302
|
const panelDialogRef = useRef(null);
|
|
32078
32303
|
const [phase, setPhase] = useState(isOpen ? "open" : "closed");
|