xmlui 0.9.20 → 0.9.21
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/{apiInterceptorWorker-BBls674G.mjs → apiInterceptorWorker-7aKQ2rBj.mjs} +1 -1
- package/dist/{index-CbU44pSb.mjs → index-B3CWFAxa.mjs} +1773 -2148
- package/dist/index.css +1862 -713
- package/dist/{lint-Cd70ckJ6.mjs → lint-EcgF-9Wr.mjs} +22 -46
- package/dist/scripts/src/components/ComponentProvider.js +0 -10
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +3 -1
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +10 -2
- package/dist/scripts/src/components/Form/FormContext.js +4 -0
- package/dist/scripts/src/components/Form/FormNative.js +6 -4
- package/dist/scripts/src/components/Form/formActions.js +2 -1
- package/dist/scripts/src/components/FormItem/FormItemNative.js +7 -0
- package/dist/scripts/src/components/Icon/MoonIcon.js +10 -0
- package/dist/scripts/src/components/Icon/StarsIcon.js +10 -0
- package/dist/scripts/src/components/IconProvider.js +4 -1
- package/dist/scripts/src/components/InspectButton/InspectButton.js +5 -3
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +1 -1
- package/dist/scripts/src/components-core/InspectorContext.js +4 -5
- package/dist/scripts/src/components-core/rendering/Container.js +1 -6
- package/dist/style.css +1837 -631
- package/dist/xmlui-metadata.mjs +1283 -1438
- package/dist/xmlui-metadata.umd.js +1282 -1437
- package/dist/xmlui-parser.mjs +17 -17
- package/dist/xmlui-standalone.umd.js +4012 -3257
- package/dist/xmlui.d.ts +1 -1
- package/dist/xmlui.mjs +1 -1
- package/package.json +2 -2
- package/dist/scripts/src/components/Alert/Alert.js +0 -61
- package/dist/scripts/src/components/Alert/AlertNative.js +0 -8
- package/dist/scripts/src/components/ButtonGroup/ButtonGroup.js +0 -55
- package/dist/scripts/src/components/ButtonGroup/ButtonGroupNative.js +0 -8
- package/dist/scripts/src/components/OffCanvas/OffCanvas.js +0 -57
- package/dist/scripts/src/components/OffCanvas/OffCanvasNative.js +0 -48
- package/dist/scripts/src/components/StateViewer/StateViewerNative.js +0 -19
- package/dist/scripts/src/components/SubNavPanel/SubNavPanel.js +0 -22
- package/dist/scripts/src/components/SubNavPanel/SubNavPanelNative.js +0 -9
package/dist/xmlui.d.ts
CHANGED
|
@@ -434,7 +434,7 @@ export declare const Button: default_2.ForwardRefExoticComponent<{
|
|
|
434
434
|
accessibilityProps?: any;
|
|
435
435
|
autoFocus?: boolean;
|
|
436
436
|
contextualLabel?: string;
|
|
437
|
-
} & Pick<default_2.HTMLAttributes<HTMLButtonElement>, "className" | "
|
|
437
|
+
} & Pick<default_2.HTMLAttributes<HTMLButtonElement>, "className" | "aria-disabled" | "aria-label" | "aria-controls" | "aria-expanded" | "onClick" | "onFocus" | "onBlur" | "tabIndex" | "onMouseEnter" | "onMouseLeave"> & default_2.RefAttributes<HTMLButtonElement>>;
|
|
438
438
|
|
|
439
439
|
declare type ButtonThemeColor = (typeof buttonThemeValues)[number];
|
|
440
440
|
|
package/dist/xmlui.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmlui",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.21",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start-test-bed": "cd src/testing/infrastructure && xmlui start",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"react-dropzone": "14.2.3",
|
|
80
80
|
"react-helmet-async": "1.3.0",
|
|
81
81
|
"react-hot-toast": "2.4.1",
|
|
82
|
-
"react-icons": "4.
|
|
82
|
+
"react-icons": "4.12.0",
|
|
83
83
|
"react-imask": "7.1.3",
|
|
84
84
|
"react-markdown": "^9.0.1",
|
|
85
85
|
"react-measure": "2.5.2",
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.alertComponentRenderer = exports.AlertMd = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const Alert_module_scss_1 = __importDefault(require("./Alert.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
-
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
-
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
-
const abstractions_1 = require("../../components/abstractions");
|
|
13
|
-
const AlertNative_1 = require("./AlertNative");
|
|
14
|
-
const COMP = "Alert";
|
|
15
|
-
// See reference implementation here: https://getbootstrap.com/docs/5.3/components/alerts/
|
|
16
|
-
exports.AlertMd = (0, ComponentDefs_1.createMetadata)({
|
|
17
|
-
status: "in progress",
|
|
18
|
-
description: `(**NOT IMPLEMENTED YET**) The \`${COMP}\` component is a panel used to display important ` +
|
|
19
|
-
`notifications or feedback to users. It helps convey different statuses or levels of urgency, ` +
|
|
20
|
-
`such as success, warning, error, and others.`,
|
|
21
|
-
props: {
|
|
22
|
-
statusColor: {
|
|
23
|
-
description: `The value of this optional property sets the string to provide a color scheme for the ${COMP}.`,
|
|
24
|
-
availableValues: abstractions_1.statusColorMd,
|
|
25
|
-
valueType: "string",
|
|
26
|
-
defaultValue: "primary",
|
|
27
|
-
},
|
|
28
|
-
dismissable: {
|
|
29
|
-
description: `This property's \`true\` value indicates if this alert is dismissable by the user. When the ` +
|
|
30
|
-
`user closes the ${COMP}, it gets hidden.`,
|
|
31
|
-
valueType: "boolean",
|
|
32
|
-
defaultValue: true,
|
|
33
|
-
},
|
|
34
|
-
autoDismissInMs: {
|
|
35
|
-
description: "Timeout for the alert to be dismissed",
|
|
36
|
-
valueType: "number",
|
|
37
|
-
},
|
|
38
|
-
showIcon: {
|
|
39
|
-
description: "Indicates if the alert should display an icon",
|
|
40
|
-
valueType: "boolean",
|
|
41
|
-
defaultValue: true,
|
|
42
|
-
},
|
|
43
|
-
icon: {
|
|
44
|
-
description: "Icon to be displayed in the alert",
|
|
45
|
-
valueType: "string",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
events: {},
|
|
49
|
-
apis: {
|
|
50
|
-
dismiss: (0, ComponentDefs_1.d)(`This method dismisses the ${COMP}. It triggers the \`didDismiss\` event with the argument set ` +
|
|
51
|
-
`to \`false\`.`),
|
|
52
|
-
},
|
|
53
|
-
themeVars: (0, themeVars_1.parseScssVar)(Alert_module_scss_1.default.themeVars),
|
|
54
|
-
defaultThemeVars: {
|
|
55
|
-
light: {},
|
|
56
|
-
dark: {},
|
|
57
|
-
},
|
|
58
|
-
});
|
|
59
|
-
exports.alertComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.AlertMd, ({ layoutCss }) => {
|
|
60
|
-
return (0, jsx_runtime_1.jsx)(AlertNative_1.Alert, {});
|
|
61
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Alert = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
exports.Alert = (0, react_1.forwardRef)(function Alert({ style }, forwardedRef) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: forwardedRef, style: Object.assign({ backgroundColor: "orange", color: "white", padding: 2 }, style), children: "Alert component is not implemented yet" }));
|
|
8
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.buttonGroupComponentRenderer = exports.ButtonGroupMd = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const ButtonGroup_module_scss_1 = __importDefault(require("./ButtonGroup.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
-
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
-
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
-
const abstractions_1 = require("../abstractions");
|
|
13
|
-
const metadata_helpers_1 = require("../metadata-helpers");
|
|
14
|
-
const ButtonGroupNative_1 = require("./ButtonGroupNative");
|
|
15
|
-
const COMP = "ButtonGroup";
|
|
16
|
-
// See reference implementation here: https://getbootstrap.com/docs/5.3/components/button-group/
|
|
17
|
-
// Use the same techinque for borders and radius as the Accordion component.
|
|
18
|
-
exports.ButtonGroupMd = (0, ComponentDefs_1.createMetadata)({
|
|
19
|
-
status: "in progress",
|
|
20
|
-
description: `(**NOT IMPLEMENTED YET**) The \`${COMP}\` component is a container that embeds buttons used ` +
|
|
21
|
-
`together for a particular reason. It provides a view that emphasizes this coherency.`,
|
|
22
|
-
props: {
|
|
23
|
-
themeColor: {
|
|
24
|
-
description: `This optional property specifies the default theme color for the buttons in the group. ` +
|
|
25
|
-
`Individual buttons may override this setting with their \`themeColor\` property.`,
|
|
26
|
-
availableValues: abstractions_1.buttonThemeMd,
|
|
27
|
-
valueType: "string",
|
|
28
|
-
defaultValue: "primary",
|
|
29
|
-
},
|
|
30
|
-
variant: {
|
|
31
|
-
description: `This optional property specifies the default variant for the buttons in the group. ` +
|
|
32
|
-
`Individual buttons may override this setting with their \`variant\` property.`,
|
|
33
|
-
availableValues: abstractions_1.buttonVariantMd,
|
|
34
|
-
valueType: "string",
|
|
35
|
-
defaultValue: "solid",
|
|
36
|
-
},
|
|
37
|
-
orientation: (0, metadata_helpers_1.dOrientation)("horizontal"),
|
|
38
|
-
buttonWidth: {
|
|
39
|
-
description: `When this optional property is set, all buttons within the group will have the ` +
|
|
40
|
-
`specified width. If it is empty, each button's width accommodates its content.`,
|
|
41
|
-
},
|
|
42
|
-
gap: {
|
|
43
|
-
description: `When this optional property is set, adjacent buttons will have the specified gap ` +
|
|
44
|
-
`between them. If this property is not set, the buttons will be merged into one group.`,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
themeVars: (0, themeVars_1.parseScssVar)(ButtonGroup_module_scss_1.default.themeVars),
|
|
48
|
-
defaultThemeVars: {
|
|
49
|
-
light: {},
|
|
50
|
-
dark: {},
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
exports.buttonGroupComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ButtonGroupMd, ({}) => {
|
|
54
|
-
return (0, jsx_runtime_1.jsx)(ButtonGroupNative_1.ButtonGroup, {});
|
|
55
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ButtonGroup = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
exports.ButtonGroup = (0, react_1.forwardRef)(function ButtonGroup({}, forwardedRef) {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: forwardedRef, style: { backgroundColor: "orangered", color: "white", padding: 2 }, children: "ButtonGroup component is not implemented yet" }));
|
|
8
|
-
});
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.offCanvasComponentRenderer = exports.OffCanvasMd = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const OffCanvas_module_scss_1 = __importDefault(require("./OffCanvas.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
-
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
-
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
-
const abstractions_1 = require("../abstractions");
|
|
13
|
-
const metadata_helpers_1 = require("../metadata-helpers");
|
|
14
|
-
const OffCanvasNative_1 = require("./OffCanvasNative");
|
|
15
|
-
const COMP = "OffCanvas";
|
|
16
|
-
// See reference implementation here: https://getbootstrap.com/docs/5.3/components/alerts/
|
|
17
|
-
exports.OffCanvasMd = (0, ComponentDefs_1.createMetadata)({
|
|
18
|
-
status: "in progress",
|
|
19
|
-
description: `(**NOT IMPLEMENTED YET**) The \`OffCanvas\` component is a hidden panel that slides into view ` +
|
|
20
|
-
`from the side of the screen. It helps display additional content or navigation without disrupting ` +
|
|
21
|
-
`the main interface.`,
|
|
22
|
-
props: {
|
|
23
|
-
title: (0, ComponentDefs_1.d)("This property sets the title of the component.", null, "string"),
|
|
24
|
-
isInitiallyOpen: (0, ComponentDefs_1.d)("This property indicates if the component is initially open.", null, "boolean", false),
|
|
25
|
-
enableBackdrop: (0, ComponentDefs_1.d)(`This property indicates if the backdrop is enabled when the component is displayed. When the ` +
|
|
26
|
-
`backdrop is not enabled, clicking outside \`OffCanvas\` will not close it.`, null, "boolean", true),
|
|
27
|
-
enableBodyScroll: (0, ComponentDefs_1.d)(`This property indicates if the body scroll is enabled when the component is displayed.`, null, "boolean", false),
|
|
28
|
-
noCloseOnBackdropClick: (0, ComponentDefs_1.d)(`When this property is set to \`true\`, the ${COMP} does not close when the user clicks on its backdrop.`, null, "boolean", false),
|
|
29
|
-
placement: (0, ComponentDefs_1.d)(`This property indicates the position where the ${COMP} should be docked to.`, abstractions_1.placementMd),
|
|
30
|
-
autoCloseInMs: (0, ComponentDefs_1.d)(`This property sets a timeout. When the timeout expires, the component gets hidden.`),
|
|
31
|
-
},
|
|
32
|
-
events: {
|
|
33
|
-
didOpen: (0, metadata_helpers_1.dDidOpen)(COMP),
|
|
34
|
-
didClose: (0, metadata_helpers_1.dDidClose)(COMP),
|
|
35
|
-
},
|
|
36
|
-
apis: {
|
|
37
|
-
open: (0, ComponentDefs_1.d)(`This method opens the component. It triggers the \`didOpen\` event with the argument ` +
|
|
38
|
-
`set to \`false\`.`),
|
|
39
|
-
close: (0, ComponentDefs_1.d)(`This method closes the component. It triggers the \`didClose\` event with the argument ` +
|
|
40
|
-
`set to \`false\`.`),
|
|
41
|
-
},
|
|
42
|
-
themeVars: (0, themeVars_1.parseScssVar)(OffCanvas_module_scss_1.default.themeVars),
|
|
43
|
-
defaultThemeVars: {
|
|
44
|
-
"width-OffCanvas": "600px",
|
|
45
|
-
"padding-OffCanvas": "$padding-tight",
|
|
46
|
-
"paddingVertical-OffCanvas": "$padding-tight",
|
|
47
|
-
"paddingHorizontal-OffCanvas": "$padding-normal",
|
|
48
|
-
"backgroundColor-OffCanvas": "$backgroundColor",
|
|
49
|
-
"boxShadow-horizontal-OffCanvas": "0 2px 10px rgba(0, 0, 0, 0.2)",
|
|
50
|
-
"boxShadow-vertical-OffCanvas": "0 2px 10px rgba(0, 0, 0, 0.2)",
|
|
51
|
-
light: {},
|
|
52
|
-
dark: {},
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
exports.offCanvasComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.OffCanvasMd, ({ node, extractValue, lookupEventHandler, renderChild, layoutCss }) => {
|
|
56
|
-
return ((0, jsx_runtime_1.jsx)(OffCanvasNative_1.OffCanvas, { style: layoutCss, title: extractValue(node.props.title), isInitiallyOpen: extractValue.asOptionalBoolean(node.props.isInitiallyOpen, false), placement: extractValue(node.props.placement), children: renderChild(node.children) }));
|
|
57
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.OffCanvas = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
10
|
-
const OffCanvas_module_scss_1 = __importDefault(require("./OffCanvas.module.scss"));
|
|
11
|
-
const OffCanvas = ({ title, isInitiallyOpen, onClose, placement = "right", showCloseButton = true, children, allowScroll = true, showBackdrop = false, style, }) => {
|
|
12
|
-
const [isOpen, setIsOpen] = (0, react_1.useState)(isInitiallyOpen);
|
|
13
|
-
const [place, setPlace] = (0, react_1.useState)(placement);
|
|
14
|
-
// Control body scrolling
|
|
15
|
-
(0, react_1.useEffect)(() => {
|
|
16
|
-
if (isOpen && !allowScroll) {
|
|
17
|
-
document.body.style.overflow = "hidden";
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
document.body.style.overflow = "";
|
|
21
|
-
}
|
|
22
|
-
// Cleanup when unmounted or isOpen changes
|
|
23
|
-
return () => {
|
|
24
|
-
document.body.style.overflow = "";
|
|
25
|
-
};
|
|
26
|
-
}, [isOpen, allowScroll]);
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showBackdrop && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(OffCanvas_module_scss_1.default.overlay, {
|
|
28
|
-
[OffCanvas_module_scss_1.default.overlayVisible]: isOpen,
|
|
29
|
-
}), onClick: onClose })), (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(OffCanvas_module_scss_1.default.offCanvas, {
|
|
30
|
-
[OffCanvas_module_scss_1.default.open]: isOpen,
|
|
31
|
-
[OffCanvas_module_scss_1.default.left]: place === "left",
|
|
32
|
-
[OffCanvas_module_scss_1.default.right]: place === "right",
|
|
33
|
-
[OffCanvas_module_scss_1.default.top]: place === "top",
|
|
34
|
-
[OffCanvas_module_scss_1.default.bottom]: place === "bottom",
|
|
35
|
-
}), style: style, children: [(0, jsx_runtime_1.jsxs)("header", { className: OffCanvas_module_scss_1.default.offCanvasHeader, children: [!!title && (0, jsx_runtime_1.jsx)("span", { className: OffCanvas_module_scss_1.default.offCanvasTitle, children: title }), (0, jsx_runtime_1.jsx)("div", { className: OffCanvas_module_scss_1.default.spacer }), showCloseButton && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [place !== "left" && ((0, jsx_runtime_1.jsx)("button", { className: OffCanvas_module_scss_1.default.button, onClick: () => {
|
|
36
|
-
setPlace("left");
|
|
37
|
-
}, children: "\u2190" })), place !== "right" && ((0, jsx_runtime_1.jsx)("button", { className: OffCanvas_module_scss_1.default.button, onClick: () => {
|
|
38
|
-
setPlace("right");
|
|
39
|
-
}, children: "\u2192" })), place !== "top" && ((0, jsx_runtime_1.jsx)("button", { className: OffCanvas_module_scss_1.default.button, onClick: () => {
|
|
40
|
-
setPlace("top");
|
|
41
|
-
}, children: "\u2191" })), place !== "bottom" && ((0, jsx_runtime_1.jsx)("button", { className: OffCanvas_module_scss_1.default.button, onClick: () => {
|
|
42
|
-
setPlace("bottom");
|
|
43
|
-
}, children: "\u2193" })), (0, jsx_runtime_1.jsx)("div", { className: OffCanvas_module_scss_1.default.offCanvasButtonSpace }), (0, jsx_runtime_1.jsx)("button", { className: OffCanvas_module_scss_1.default.button, onClick: () => {
|
|
44
|
-
setIsOpen(false);
|
|
45
|
-
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
46
|
-
}, children: "\u00D7" })] }))] }), children] })] }));
|
|
47
|
-
};
|
|
48
|
-
exports.OffCanvas = OffCanvas;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.StateViewer = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
9
|
-
const StateViewer_module_scss_1 = __importDefault(require("./StateViewer.module.scss"));
|
|
10
|
-
const StateViewer = ({ children, state, showBoundary = true, blink = true }) => {
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(StateViewer_module_scss_1.default.stateViewerContainer), style: { width: "inherit", height: "inherit" }, children: [children, (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(StateViewer_module_scss_1.default.overlay, {
|
|
12
|
-
[StateViewer_module_scss_1.default.showBoundary]: showBoundary,
|
|
13
|
-
}), children: (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(StateViewer_module_scss_1.default.marker, {
|
|
14
|
-
[StateViewer_module_scss_1.default.blink]: blink,
|
|
15
|
-
}), onClick: () => {
|
|
16
|
-
console.log(state);
|
|
17
|
-
} }) })] }));
|
|
18
|
-
};
|
|
19
|
-
exports.StateViewer = StateViewer;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.subNavPanelRenderer = exports.NavPanelMd = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const SubNavPanel_module_scss_1 = __importDefault(require("./SubNavPanel.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
-
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
-
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
-
const SubNavPanelNative_1 = require("./SubNavPanelNative");
|
|
13
|
-
const COMP = "SubNavPanel";
|
|
14
|
-
exports.NavPanelMd = (0, ComponentDefs_1.createMetadata)({
|
|
15
|
-
status: "experimental",
|
|
16
|
-
props: {},
|
|
17
|
-
themeVars: (0, themeVars_1.parseScssVar)(SubNavPanel_module_scss_1.default.themeVars),
|
|
18
|
-
defaultThemeVars: {},
|
|
19
|
-
});
|
|
20
|
-
exports.subNavPanelRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.NavPanelMd, ({ node, renderChild, layoutCss, layoutContext }) => {
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(SubNavPanelNative_1.SubNavPanel, { children: renderChild(node.children) }));
|
|
22
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SubNavPanel = SubNavPanel;
|
|
4
|
-
const react_dom_1 = require("react-dom");
|
|
5
|
-
const AppLayoutContext_1 = require("../App/AppLayoutContext");
|
|
6
|
-
function SubNavPanel(props) {
|
|
7
|
-
const { subNavPanelSlot } = (0, AppLayoutContext_1.useAppLayoutContext)();
|
|
8
|
-
return subNavPanelSlot ? (0, react_dom_1.createPortal)(props.children, subNavPanelSlot) : null;
|
|
9
|
-
}
|