@jsenv/navi 0.12.3 → 0.12.6
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
CHANGED
|
@@ -12512,15 +12512,23 @@ const CharSlot = ({
|
|
|
12512
12512
|
};
|
|
12513
12513
|
const Icon = ({
|
|
12514
12514
|
box,
|
|
12515
|
+
href,
|
|
12515
12516
|
children,
|
|
12516
12517
|
...props
|
|
12517
12518
|
}) => {
|
|
12519
|
+
const innerChildren = href ? jsx("svg", {
|
|
12520
|
+
width: "100%",
|
|
12521
|
+
height: "100%",
|
|
12522
|
+
children: jsx("use", {
|
|
12523
|
+
href: href
|
|
12524
|
+
})
|
|
12525
|
+
}) : children;
|
|
12518
12526
|
if (box) {
|
|
12519
12527
|
return jsx(Box, {
|
|
12520
12528
|
layoutInline: true,
|
|
12521
12529
|
layoutColumn: true,
|
|
12522
12530
|
...props,
|
|
12523
|
-
children:
|
|
12531
|
+
children: innerChildren
|
|
12524
12532
|
});
|
|
12525
12533
|
}
|
|
12526
12534
|
return jsx(CharSlot, {
|
|
@@ -12528,7 +12536,7 @@ const Icon = ({
|
|
|
12528
12536
|
...props,
|
|
12529
12537
|
children: jsx("span", {
|
|
12530
12538
|
className: "navi_icon",
|
|
12531
|
-
children:
|
|
12539
|
+
children: innerChildren
|
|
12532
12540
|
})
|
|
12533
12541
|
});
|
|
12534
12542
|
};
|
|
@@ -14820,8 +14828,6 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
14820
14828
|
--border-width: 1px;
|
|
14821
14829
|
--outline-width: 1px;
|
|
14822
14830
|
--outer-width: calc(var(--border-width) + var(--outline-width));
|
|
14823
|
-
--padding-x: 2px;
|
|
14824
|
-
--padding-y: 1px;
|
|
14825
14831
|
|
|
14826
14832
|
/* Default */
|
|
14827
14833
|
--outline-color: light-dark(#4476ff, #3b82f6);
|
|
@@ -14881,10 +14887,13 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
14881
14887
|
|
|
14882
14888
|
.navi_input .navi_native_input {
|
|
14883
14889
|
box-sizing: border-box;
|
|
14884
|
-
padding-top: var(--padding-top, var(--padding-y, var(--padding)));
|
|
14885
|
-
padding-right: var(--padding-right, var(--padding-x, var(--padding)));
|
|
14886
|
-
padding-bottom: var(
|
|
14887
|
-
|
|
14890
|
+
padding-top: var(--padding-top, var(--padding-y, var(--padding, 1px)));
|
|
14891
|
+
padding-right: var(--padding-right, var(--padding-x, var(--padding, 2px)));
|
|
14892
|
+
padding-bottom: var(
|
|
14893
|
+
--padding-bottom,
|
|
14894
|
+
var(--padding-y, var(--padding, 1px))
|
|
14895
|
+
);
|
|
14896
|
+
padding-left: var(--padding-left, var(--padding-x, var(--padding, 2px)));
|
|
14888
14897
|
color: var(--x-color);
|
|
14889
14898
|
background-color: var(--x-background-color);
|
|
14890
14899
|
border-width: var(--x-outer-width);
|
|
@@ -15423,8 +15432,6 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
15423
15432
|
--outline-width: 1px;
|
|
15424
15433
|
--border-width: 1px;
|
|
15425
15434
|
--border-radius: 2px;
|
|
15426
|
-
--padding-x: 6px;
|
|
15427
|
-
--padding-y: 1px;
|
|
15428
15435
|
/* default */
|
|
15429
15436
|
--outline-color: light-dark(#4476ff, #3b82f6);
|
|
15430
15437
|
--border-color: light-dark(#767676, #8e8e93);
|
|
@@ -15484,10 +15491,13 @@ installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
|
15484
15491
|
}
|
|
15485
15492
|
.navi_button_content {
|
|
15486
15493
|
position: relative;
|
|
15487
|
-
padding-top: var(--padding-top, var(--padding-y, var(--padding)));
|
|
15488
|
-
padding-right: var(--padding-right, var(--padding-x, var(--padding)));
|
|
15489
|
-
padding-bottom: var(
|
|
15490
|
-
|
|
15494
|
+
padding-top: var(--padding-top, var(--padding-y, var(--padding, 1px)));
|
|
15495
|
+
padding-right: var(--padding-right, var(--padding-x, var(--padding, 6px)));
|
|
15496
|
+
padding-bottom: var(
|
|
15497
|
+
--padding-bottom,
|
|
15498
|
+
var(--padding-y, var(--padding, 1px))
|
|
15499
|
+
);
|
|
15500
|
+
padding-left: var(--padding-left, var(--padding-x, var(--padding, 6px)));
|
|
15491
15501
|
color: var(--x-color);
|
|
15492
15502
|
background-color: var(--x-background-color);
|
|
15493
15503
|
border-width: var(--x-outer-width);
|
|
@@ -20291,8 +20301,143 @@ const Image = props => {
|
|
|
20291
20301
|
});
|
|
20292
20302
|
};
|
|
20293
20303
|
|
|
20304
|
+
const Code = ({
|
|
20305
|
+
contentSpacing = " ",
|
|
20306
|
+
children,
|
|
20307
|
+
...rest
|
|
20308
|
+
}) => {
|
|
20309
|
+
return jsx(Box, {
|
|
20310
|
+
...rest,
|
|
20311
|
+
as: "code",
|
|
20312
|
+
children: applyContentSpacingOnTextChildren(children, contentSpacing)
|
|
20313
|
+
});
|
|
20314
|
+
};
|
|
20315
|
+
|
|
20294
20316
|
const LinkWithIcon = () => {};
|
|
20295
20317
|
|
|
20318
|
+
installImportMetaCss(import.meta);import.meta.css = /* css */`
|
|
20319
|
+
@layer navi {
|
|
20320
|
+
.navi_message_box {
|
|
20321
|
+
--background-color-info: #eaf6fc;
|
|
20322
|
+
--color-info: #376cc2;
|
|
20323
|
+
--background-color-success: #ecf9ef;
|
|
20324
|
+
--color-success: #50c464;
|
|
20325
|
+
--background-color-warning: #fdf6e3;
|
|
20326
|
+
--color-warning: #f19c05;
|
|
20327
|
+
--background-color-error: #fcebed;
|
|
20328
|
+
--color-error: #eb364b;
|
|
20329
|
+
}
|
|
20330
|
+
}
|
|
20331
|
+
|
|
20332
|
+
.navi_message_box {
|
|
20333
|
+
--x-background-color: var(--background-color-info);
|
|
20334
|
+
--x-color: var(--color-info);
|
|
20335
|
+
/* color: var(--x-color); */
|
|
20336
|
+
background-color: var(--x-background-color);
|
|
20337
|
+
}
|
|
20338
|
+
|
|
20339
|
+
.navi_message_box[data-level="info"] {
|
|
20340
|
+
--x-background-color: var(--background-color-info);
|
|
20341
|
+
--x-color: var(--color-info);
|
|
20342
|
+
}
|
|
20343
|
+
.navi_message_box[data-level="success"] {
|
|
20344
|
+
--x-background-color: var(--background-color-success);
|
|
20345
|
+
--x-color: var(--color-success);
|
|
20346
|
+
}
|
|
20347
|
+
.navi_message_box[data-level="warning"] {
|
|
20348
|
+
--x-background-color: var(--background-color-warning);
|
|
20349
|
+
--x-color: var(--color-warning);
|
|
20350
|
+
}
|
|
20351
|
+
.navi_message_box[data-level="error"] {
|
|
20352
|
+
--x-background-color: var(--background-color-error);
|
|
20353
|
+
--x-color: var(--color-error);
|
|
20354
|
+
}
|
|
20355
|
+
|
|
20356
|
+
.navi_message_box[data-left-stripe] {
|
|
20357
|
+
border-left: 6px solid var(--x-color);
|
|
20358
|
+
border-top-left-radius: 6px;
|
|
20359
|
+
border-bottom-left-radius: 6px;
|
|
20360
|
+
}
|
|
20361
|
+
`;
|
|
20362
|
+
Object.assign(PSEUDO_CLASSES, {
|
|
20363
|
+
":-navi-info": {
|
|
20364
|
+
add: el => {
|
|
20365
|
+
el.setAttribute("data-level", "info");
|
|
20366
|
+
},
|
|
20367
|
+
remove: el => {
|
|
20368
|
+
if (el.getAttribute("data-level") === "info") {
|
|
20369
|
+
el.removeAttribute("data-level");
|
|
20370
|
+
}
|
|
20371
|
+
}
|
|
20372
|
+
},
|
|
20373
|
+
":-navi-success": {
|
|
20374
|
+
add: el => {
|
|
20375
|
+
el.setAttribute("data-level", "success");
|
|
20376
|
+
},
|
|
20377
|
+
remove: el => {
|
|
20378
|
+
if (el.getAttribute("data-level") === "success") {
|
|
20379
|
+
el.removeAttribute("data-level");
|
|
20380
|
+
}
|
|
20381
|
+
}
|
|
20382
|
+
},
|
|
20383
|
+
":-navi-warning": {
|
|
20384
|
+
add: el => {
|
|
20385
|
+
el.setAttribute("data-level", "warning");
|
|
20386
|
+
},
|
|
20387
|
+
remove: el => {
|
|
20388
|
+
if (el.getAttribute("data-level") === "warning") {
|
|
20389
|
+
el.removeAttribute("data-level");
|
|
20390
|
+
}
|
|
20391
|
+
}
|
|
20392
|
+
},
|
|
20393
|
+
":-navi-error": {
|
|
20394
|
+
add: el => {
|
|
20395
|
+
el.setAttribute("data-level", "error");
|
|
20396
|
+
},
|
|
20397
|
+
remove: el => {
|
|
20398
|
+
if (el.getAttribute("data-level") === "error") {
|
|
20399
|
+
el.removeAttribute("data-level");
|
|
20400
|
+
}
|
|
20401
|
+
}
|
|
20402
|
+
}
|
|
20403
|
+
});
|
|
20404
|
+
const MessageBoxPseudoClasses = [":-navi-info", ":-navi-success", ":-navi-warning", ":-navi-error"];
|
|
20405
|
+
const MessageBoxLevelContext = createContext();
|
|
20406
|
+
const MessageBoxReportTitleChildContext = createContext();
|
|
20407
|
+
const MessageBox = ({
|
|
20408
|
+
level = "info",
|
|
20409
|
+
padding = "sm",
|
|
20410
|
+
contentSpacing = " ",
|
|
20411
|
+
leftStripe,
|
|
20412
|
+
children,
|
|
20413
|
+
...rest
|
|
20414
|
+
}) => {
|
|
20415
|
+
const [hasTitleChild, setHasTitleChild] = useState(false);
|
|
20416
|
+
const innerLeftStripe = leftStripe === undefined ? hasTitleChild : leftStripe;
|
|
20417
|
+
return jsx(Box, {
|
|
20418
|
+
as: "div",
|
|
20419
|
+
role: level === "info" ? "status" : "alert",
|
|
20420
|
+
"data-left-stripe": innerLeftStripe ? "" : undefined,
|
|
20421
|
+
...rest,
|
|
20422
|
+
baseClassName: "navi_message_box",
|
|
20423
|
+
padding: padding,
|
|
20424
|
+
pseudoClasses: MessageBoxPseudoClasses,
|
|
20425
|
+
basePseudoState: {
|
|
20426
|
+
":-navi-info": level === "info",
|
|
20427
|
+
":-navi-success": level === "success",
|
|
20428
|
+
":-navi-warning": level === "warning",
|
|
20429
|
+
":-navi-error": level === "error"
|
|
20430
|
+
},
|
|
20431
|
+
children: jsx(MessageBoxLevelContext.Provider, {
|
|
20432
|
+
value: level,
|
|
20433
|
+
children: jsx(MessageBoxReportTitleChildContext.Provider, {
|
|
20434
|
+
value: setHasTitleChild,
|
|
20435
|
+
children: applyContentSpacingOnTextChildren(children, contentSpacing)
|
|
20436
|
+
})
|
|
20437
|
+
})
|
|
20438
|
+
});
|
|
20439
|
+
};
|
|
20440
|
+
|
|
20296
20441
|
const Svg = props => {
|
|
20297
20442
|
return jsx(Box, {
|
|
20298
20443
|
...props,
|
|
@@ -20301,16 +20446,29 @@ const Svg = props => {
|
|
|
20301
20446
|
};
|
|
20302
20447
|
|
|
20303
20448
|
const Title = ({
|
|
20304
|
-
as
|
|
20449
|
+
as,
|
|
20305
20450
|
bold = true,
|
|
20306
20451
|
contentSpacing = " ",
|
|
20452
|
+
color,
|
|
20307
20453
|
children,
|
|
20454
|
+
marginTop,
|
|
20455
|
+
marginBottom,
|
|
20308
20456
|
...rest
|
|
20309
20457
|
}) => {
|
|
20458
|
+
const messageBoxLevel = useContext(MessageBoxLevelContext);
|
|
20459
|
+
const reportTitleToMessageBox = useContext(MessageBoxReportTitleChildContext);
|
|
20460
|
+
const innerColor = color === undefined ? messageBoxLevel ? `var(--x-color)` : undefined : color;
|
|
20461
|
+
const innerAs = as === undefined ? messageBoxLevel ? "h4" : "h1" : as;
|
|
20462
|
+
reportTitleToMessageBox?.(true);
|
|
20463
|
+
const innerMarginTop = marginTop === undefined ? messageBoxLevel ? "0" : undefined : marginTop;
|
|
20464
|
+
const innerMarginBottom = marginBottom === undefined ? messageBoxLevel ? "8px" : undefined : marginBottom;
|
|
20310
20465
|
return jsx(Box, {
|
|
20311
20466
|
...rest,
|
|
20312
|
-
as:
|
|
20467
|
+
as: innerAs,
|
|
20313
20468
|
bold: bold,
|
|
20469
|
+
color: innerColor,
|
|
20470
|
+
marginTop: innerMarginTop,
|
|
20471
|
+
marginBottom: innerMarginBottom,
|
|
20314
20472
|
children: applyContentSpacingOnTextChildren(children, contentSpacing)
|
|
20315
20473
|
});
|
|
20316
20474
|
};
|
|
@@ -20392,5 +20550,5 @@ const useDependenciesDiff = (inputs) => {
|
|
|
20392
20550
|
return diffRef.current;
|
|
20393
20551
|
};
|
|
20394
20552
|
|
|
20395
|
-
export { ActionRenderer, ActiveKeyboardShortcuts, Box, Button, CharSlot, Checkbox, CheckboxList, Col, Colgroup, Count, Details, Editable, ErrorBoundaryContext, FontSizedSvg, Form, Icon, IconAndText, Image, Input, Label, Layout, Link, LinkWithIcon, Paragraph, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, Select, SelectionContext, SummaryMarker, Svg, Tab, TabList, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, actionIntegratedVia, addCustomMessage, createAction, createSelectionKeyboardShortcuts, createUniqueValueConstraint, enableDebugActions, enableDebugOnDocumentLoading, forwardActionRequested, goBack, goForward, goTo, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, openCallout, rawUrlPart, reload, removeCustomMessage, rerunActions, resource, setBaseUrl, setupRoutes, stopLoad, stringifyTableSelectionValue, updateActions, useActionData, useActionStatus, useCellsAndColumns, useDependenciesDiff, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, valueInLocalStorage };
|
|
20553
|
+
export { ActionRenderer, ActiveKeyboardShortcuts, Box, Button, CharSlot, Checkbox, CheckboxList, Code, Col, Colgroup, Count, Details, Editable, ErrorBoundaryContext, FontSizedSvg, Form, Icon, IconAndText, Image, Input, Label, Layout, Link, LinkWithIcon, MessageBox, Paragraph, Radio, RadioList, Route, RouteLink, Routes, RowNumberCol, RowNumberTableCell, SINGLE_SPACE_CONSTRAINT, SVGMaskOverlay, Select, SelectionContext, SummaryMarker, Svg, Tab, TabList, Table, TableCell, Tbody, Text, Thead, Title, Tr, UITransition, actionIntegratedVia, addCustomMessage, createAction, createSelectionKeyboardShortcuts, createUniqueValueConstraint, enableDebugActions, enableDebugOnDocumentLoading, forwardActionRequested, goBack, goForward, goTo, installCustomConstraintValidation, isCellSelected, isColumnSelected, isRowSelected, openCallout, rawUrlPart, reload, removeCustomMessage, rerunActions, resource, setBaseUrl, setupRoutes, stopLoad, stringifyTableSelectionValue, updateActions, useActionData, useActionStatus, useCellsAndColumns, useDependenciesDiff, useDocumentState, useDocumentUrl, useEditionController, useFocusGroup, useKeyboardShortcuts, useNavState, useRouteStatus, useRunOnMount, useSelectableElement, useSelectionController, useSignalSync, useStateArray, valueInLocalStorage };
|
|
20396
20554
|
//# sourceMappingURL=jsenv_navi.js.map
|