@babylonjs/shared-ui-components 5.28.0 → 5.29.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/colorPicker/colorComponentEntry.d.ts +18 -18
- package/colorPicker/colorComponentEntry.js +36 -36
- package/colorPicker/colorPicker.d.ts +43 -43
- package/colorPicker/colorPicker.js +136 -136
- package/colorPicker/hexColor.d.ts +20 -20
- package/colorPicker/hexColor.js +42 -42
- package/components/Button.d.ts +10 -10
- package/components/Button.js +6 -6
- package/components/Icon.d.ts +6 -6
- package/components/Icon.js +6 -6
- package/components/Label.d.ts +7 -7
- package/components/Label.js +6 -6
- package/components/MessageDialog.d.ts +7 -7
- package/components/MessageDialog.js +22 -22
- package/components/Toggle.d.ts +8 -8
- package/components/Toggle.js +15 -15
- package/components/bars/CommandBarComponent.d.ts +16 -16
- package/components/bars/CommandBarComponent.js +68 -68
- package/components/bars/CommandButtonComponent.d.ts +11 -11
- package/components/bars/CommandButtonComponent.js +6 -6
- package/components/bars/CommandDropdownComponent.d.ts +26 -26
- package/components/bars/CommandDropdownComponent.js +48 -48
- package/components/classNames.d.ts +2 -2
- package/components/classNames.js +18 -18
- package/components/colorPicker/ColorComponentEntry.d.ts +18 -18
- package/components/colorPicker/ColorComponentEntry.js +37 -37
- package/components/colorPicker/ColorPicker.d.ts +43 -43
- package/components/colorPicker/ColorPicker.js +137 -137
- package/components/colorPicker/HexColor.d.ts +20 -20
- package/components/colorPicker/HexColor.js +45 -45
- package/components/layout/DraggableIcon.d.ts +23 -0
- package/components/layout/DraggableIcon.js +18 -0
- package/components/layout/DraggableIcon.js.map +1 -0
- package/components/layout/FlexibleColumn.d.ts +17 -0
- package/components/layout/FlexibleColumn.js +12 -0
- package/components/layout/FlexibleColumn.js.map +1 -0
- package/components/layout/FlexibleDragHandler.d.ts +18 -0
- package/components/layout/FlexibleDragHandler.js +88 -0
- package/components/layout/FlexibleDragHandler.js.map +1 -0
- package/components/layout/FlexibleDropZone.d.ts +19 -0
- package/components/layout/FlexibleDropZone.js +12 -0
- package/components/layout/FlexibleDropZone.js.map +1 -0
- package/components/layout/FlexibleGridContainer.d.ts +10 -0
- package/components/layout/FlexibleGridContainer.js +23 -0
- package/components/layout/FlexibleGridContainer.js.map +1 -0
- package/components/layout/FlexibleGridLayout.d.ts +16 -0
- package/components/layout/FlexibleGridLayout.js +24 -0
- package/components/layout/FlexibleGridLayout.js.map +1 -0
- package/components/layout/FlexibleResizeBar.d.ts +40 -0
- package/components/layout/FlexibleResizeBar.js +21 -0
- package/components/layout/FlexibleResizeBar.js.map +1 -0
- package/components/layout/FlexibleTab.d.ts +34 -0
- package/components/layout/FlexibleTab.js +36 -0
- package/components/layout/FlexibleTab.js.map +1 -0
- package/components/layout/FlexibleTabsContainer.d.ts +28 -0
- package/components/layout/FlexibleTabsContainer.js +54 -0
- package/components/layout/FlexibleTabsContainer.js.map +1 -0
- package/components/layout/LayoutContext.d.ts +12 -0
- package/components/layout/LayoutContext.js +3 -0
- package/components/layout/LayoutContext.js.map +1 -0
- package/components/layout/types.d.ts +78 -0
- package/components/layout/types.js +13 -0
- package/components/layout/types.js.map +1 -0
- package/components/layout/utils.d.ts +25 -0
- package/components/layout/utils.js +68 -0
- package/components/layout/utils.js.map +1 -0
- package/components/lines/ColorLineComponent.d.ts +40 -40
- package/components/lines/ColorLineComponent.js +145 -145
- package/components/lines/ColorPickerLineComponent.d.ts +33 -33
- package/components/lines/ColorPickerLineComponent.js +61 -61
- package/components/lines/FileButtonLineComponent.d.ts +16 -16
- package/components/lines/FileButtonLineComponent.js +21 -21
- package/components/lines/NumericInputComponent.d.ts +31 -31
- package/components/lines/NumericInputComponent.js +86 -86
- package/lines/booleanLineComponent.d.ts +11 -11
- package/lines/booleanLineComponent.js +14 -14
- package/lines/buttonLineComponent.d.ts +12 -12
- package/lines/buttonLineComponent.js +10 -10
- package/lines/checkBoxLineComponent.d.ts +36 -36
- package/lines/checkBoxLineComponent.js +88 -88
- package/lines/color3LineComponent.d.ts +18 -18
- package/lines/color3LineComponent.js +9 -9
- package/lines/color4LineComponent.d.ts +18 -18
- package/lines/color4LineComponent.js +9 -9
- package/lines/colorLineComponent.d.ts +40 -40
- package/lines/colorLineComponent.js +144 -144
- package/lines/colorPickerComponent.d.ts +31 -31
- package/lines/colorPickerComponent.js +60 -60
- package/lines/draggableLineComponent.d.ts +9 -9
- package/lines/draggableLineComponent.js +12 -12
- package/lines/fileButtonLineComponent.d.ts +17 -17
- package/lines/fileButtonLineComponent.js +20 -20
- package/lines/fileMultipleButtonLineComponent.d.ts +17 -17
- package/lines/fileMultipleButtonLineComponent.js +20 -20
- package/lines/floatLineComponent.d.ts +50 -50
- package/lines/floatLineComponent.js +175 -175
- package/lines/hexLineComponent.d.ts +40 -40
- package/lines/hexLineComponent.js +121 -121
- package/lines/iSelectedLineContainer.d.ts +4 -4
- package/lines/iSelectedLineContainer.js +1 -1
- package/lines/iconButtonLineComponent.d.ts +11 -11
- package/lines/iconButtonLineComponent.js +10 -10
- package/lines/iconComponent.d.ts +9 -9
- package/lines/iconComponent.js +7 -7
- package/lines/indentedTextLineComponent.d.ts +16 -16
- package/lines/indentedTextLineComponent.js +26 -26
- package/lines/inputArrowsComponent.d.ts +13 -13
- package/lines/inputArrowsComponent.js +37 -37
- package/lines/lineContainerComponent.d.ts +19 -19
- package/lines/lineContainerComponent.js +49 -49
- package/lines/linkButtonComponent.d.ts +16 -16
- package/lines/linkButtonComponent.js +20 -20
- package/lines/matrixLineComponent.d.ts +36 -36
- package/lines/matrixLineComponent.js +102 -102
- package/lines/messageLineComponent.d.ts +12 -12
- package/lines/messageLineComponent.js +14 -14
- package/lines/numericInputComponent.d.ts +31 -31
- package/lines/numericInputComponent.js +85 -85
- package/lines/optionsLineComponent.d.ts +48 -48
- package/lines/optionsLineComponent.js +118 -118
- package/lines/popup.d.ts +4 -4
- package/lines/popup.js +67 -67
- package/lines/radioLineComponent.d.ts +21 -21
- package/lines/radioLineComponent.js +26 -26
- package/lines/sliderLineComponent.d.ts +37 -37
- package/lines/sliderLineComponent.js +89 -89
- package/lines/targetsProxy.d.ts +11 -11
- package/lines/targetsProxy.js +42 -42
- package/lines/textInputLineComponent.d.ts +47 -47
- package/lines/textInputLineComponent.js +154 -154
- package/lines/textLineComponent.d.ts +21 -21
- package/lines/textLineComponent.js +30 -30
- package/lines/unitButton.d.ts +8 -8
- package/lines/unitButton.js +7 -7
- package/lines/valueLineComponent.d.ts +15 -15
- package/lines/valueLineComponent.js +12 -12
- package/lines/vector2LineComponent.d.ts +36 -36
- package/lines/vector2LineComponent.js +63 -63
- package/lines/vector3LineComponent.d.ts +41 -41
- package/lines/vector3LineComponent.js +74 -74
- package/lines/vector4LineComponent.d.ts +42 -42
- package/lines/vector4LineComponent.js +81 -81
- package/nodeGraphSystem/displayLedger.d.ts +5 -5
- package/nodeGraphSystem/displayLedger.js +3 -3
- package/nodeGraphSystem/frameNodePort.d.ts +25 -25
- package/nodeGraphSystem/frameNodePort.js +59 -59
- package/nodeGraphSystem/graphCanvas.d.ts +111 -111
- package/nodeGraphSystem/graphCanvas.js +1131 -1131
- package/nodeGraphSystem/graphFrame.d.ts +153 -153
- package/nodeGraphSystem/graphFrame.js +1328 -1328
- package/nodeGraphSystem/graphNode.d.ts +79 -79
- package/nodeGraphSystem/graphNode.js +459 -459
- package/nodeGraphSystem/interfaces/displayManager.d.ts +13 -13
- package/nodeGraphSystem/interfaces/displayManager.js +1 -1
- package/nodeGraphSystem/interfaces/nodeContainer.d.ts +6 -6
- package/nodeGraphSystem/interfaces/nodeContainer.js +1 -1
- package/nodeGraphSystem/interfaces/nodeData.d.ts +15 -15
- package/nodeGraphSystem/interfaces/nodeData.js +1 -1
- package/nodeGraphSystem/interfaces/nodeLocationInfo.d.ts +26 -26
- package/nodeGraphSystem/interfaces/nodeLocationInfo.js +1 -1
- package/nodeGraphSystem/interfaces/portData.d.ts +28 -28
- package/nodeGraphSystem/interfaces/portData.js +7 -7
- package/nodeGraphSystem/interfaces/propertyComponentProps.d.ts +6 -6
- package/nodeGraphSystem/interfaces/propertyComponentProps.js +1 -1
- package/nodeGraphSystem/interfaces/selectionChangedOptions.d.ts +11 -11
- package/nodeGraphSystem/interfaces/selectionChangedOptions.js +1 -1
- package/nodeGraphSystem/nodeLink.d.ts +31 -31
- package/nodeGraphSystem/nodeLink.js +182 -182
- package/nodeGraphSystem/nodePort.d.ts +35 -35
- package/nodeGraphSystem/nodePort.js +128 -128
- package/nodeGraphSystem/propertyLedger.d.ts +8 -8
- package/nodeGraphSystem/propertyLedger.js +3 -3
- package/nodeGraphSystem/stateManager.d.ts +45 -45
- package/nodeGraphSystem/stateManager.js +18 -18
- package/nodeGraphSystem/tools.d.ts +5 -5
- package/nodeGraphSystem/tools.js +36 -36
- package/nodeGraphSystem/typeLedger.d.ts +8 -8
- package/nodeGraphSystem/typeLedger.js +2 -2
- package/nodeGraphSystem/types/framePortData.d.ts +7 -7
- package/nodeGraphSystem/types/framePortData.js +1 -1
- package/package.json +4 -3
- package/propertyChangedEvent.d.ts +7 -7
- package/propertyChangedEvent.js +2 -2
- package/stories/Button.stories.d.ts +10 -10
- package/stories/Button.stories.js +19 -19
- package/stories/Icon.stories.d.ts +9 -9
- package/stories/Icon.stories.js +16 -16
- package/stories/Label.stories.d.ts +8 -8
- package/stories/Label.stories.js +10 -10
- package/stories/MessageDialog.stories.d.ts +9 -9
- package/stories/MessageDialog.stories.js +19 -19
- package/stories/Toggle.stories.d.ts +9 -9
- package/stories/Toggle.stories.js +17 -17
- package/stories/bars/CommandBarComponent.stories.d.ts +11 -11
- package/stories/bars/CommandBarComponent.stories.js +12 -12
- package/stories/bars/CommandButtonComponent.stories.d.ts +6 -6
- package/stories/bars/CommandButtonComponent.stories.js +6 -6
- package/stories/colorPicker/ColorPicker.stories.d.ts +11 -11
- package/stories/colorPicker/ColorPicker.stories.js +4 -4
- package/stories/layout/FlexibleGridLayout.stories.d.ts +46 -0
- package/stories/layout/FlexibleGridLayout.stories.js +48 -0
- package/stories/layout/FlexibleGridLayout.stories.js.map +1 -0
- package/stories/lines/ColorLineComponent.stories.d.ts +21 -21
- package/stories/lines/ColorLineComponent.stories.js +9 -9
- package/stories/lines/ColorPickerLineComponent.stories.d.ts +14 -14
- package/stories/lines/ColorPickerLineComponent.stories.js +10 -10
- package/stories/lines/FileButtonLineComponent.stories.d.ts +6 -6
- package/stories/lines/FileButtonLineComponent.stories.js +5 -5
- package/stories/lines/NumericInputComponent.stories.d.ts +11 -11
- package/stories/lines/NumericInputComponent.stories.js +5 -5
- package/stringTools.d.ts +11 -11
- package/stringTools.js +88 -88
- package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.js +15 -15
- package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.js +14 -14
- package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.d.ts +17 -17
- package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.js +55 -55
- package/tabs/propertyGrids/gui/controlPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/controlPropertyGridComponent.js +12 -12
- package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.js +15 -15
- package/tabs/propertyGrids/gui/gridPropertyGridComponent.d.ts +17 -17
- package/tabs/propertyGrids/gui/gridPropertyGridComponent.js +38 -38
- package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.js +16 -16
- package/tabs/propertyGrids/gui/imagePropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/imagePropertyGridComponent.js +25 -25
- package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.js +17 -17
- package/tabs/propertyGrids/gui/linePropertyGridComponent.d.ts +16 -16
- package/tabs/propertyGrids/gui/linePropertyGridComponent.js +27 -27
- package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.js +17 -17
- package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.js +15 -15
- package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.js +15 -15
- package/tabs/propertyGrids/gui/sliderPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/sliderPropertyGridComponent.js +16 -16
- package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.js +14 -14
- package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.d.ts +15 -15
- package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.js +34 -34
- package/tabs/propertyGrids/lockObject.d.ts +9 -9
- package/tabs/propertyGrids/lockObject.js +11 -11
package/components/Icon.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
export declare type IconProps = {
|
3
|
-
color?: "dark" | "light";
|
4
|
-
icon: string;
|
5
|
-
};
|
6
|
-
export declare const Icon: React.FC<IconProps>;
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare type IconProps = {
|
3
|
+
color?: "dark" | "light";
|
4
|
+
icon: string;
|
5
|
+
};
|
6
|
+
export declare const Icon: React.FC<IconProps>;
|
package/components/Icon.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { ClassNames } from "./classNames.js";
|
3
|
-
import styles from "./Icon.modules.scss";
|
4
|
-
export const Icon = ({ color = "dark", icon }) => {
|
5
|
-
return _jsx("img", { src: icon, style: { width: "30px", height: "30px" }, className: ClassNames({ light: color === "light" }, styles) });
|
6
|
-
};
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { ClassNames } from "./classNames.js";
|
3
|
+
import styles from "./Icon.modules.scss";
|
4
|
+
export const Icon = ({ color = "dark", icon }) => {
|
5
|
+
return _jsx("img", { src: icon, style: { width: "30px", height: "30px" }, className: ClassNames({ light: color === "light" }, styles) });
|
6
|
+
};
|
7
7
|
//# sourceMappingURL=Icon.js.map
|
package/components/Label.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { ReactChild } from "react";
|
2
|
-
export declare type LabelProps = {
|
3
|
-
text: string;
|
4
|
-
children?: ReactChild;
|
5
|
-
color?: "dark" | "light";
|
6
|
-
};
|
7
|
-
export declare const Label: React.FC<LabelProps>;
|
1
|
+
import type { ReactChild } from "react";
|
2
|
+
export declare type LabelProps = {
|
3
|
+
text: string;
|
4
|
+
children?: ReactChild;
|
5
|
+
color?: "dark" | "light";
|
6
|
+
};
|
7
|
+
export declare const Label: React.FC<LabelProps>;
|
package/components/Label.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { ClassNames } from "./classNames.js";
|
3
|
-
import styles from "./Label.modules.scss";
|
4
|
-
export const Label = ({ text, children, color }) => {
|
5
|
-
return (_jsxs("label", { className: ClassNames({ label: true, light: color === "light", dark: color === "dark" }, styles), children: [_jsx("span", { children: text }), children] }));
|
6
|
-
};
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { ClassNames } from "./classNames.js";
|
3
|
+
import styles from "./Label.modules.scss";
|
4
|
+
export const Label = ({ text, children, color }) => {
|
5
|
+
return (_jsxs("label", { className: ClassNames({ label: true, light: color === "light", dark: color === "dark" }, styles), children: [_jsx("span", { children: text }), children] }));
|
6
|
+
};
|
7
7
|
//# sourceMappingURL=Label.js.map
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
export interface MessageDialogProps {
|
3
|
-
message: string;
|
4
|
-
isError: boolean;
|
5
|
-
onClose?: () => void;
|
6
|
-
}
|
7
|
-
export declare const MessageDialog: React.FC<MessageDialogProps>;
|
1
|
+
import * as React from "react";
|
2
|
+
export interface MessageDialogProps {
|
3
|
+
message: string;
|
4
|
+
isError: boolean;
|
5
|
+
onClose?: () => void;
|
6
|
+
}
|
7
|
+
export declare const MessageDialog: React.FC<MessageDialogProps>;
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { useState, useEffect } from "react";
|
3
|
-
import { ClassNames } from "./classNames.js";
|
4
|
-
import styles from "./MessageDialog.modules.scss";
|
5
|
-
export const MessageDialog = (props) => {
|
6
|
-
const [message, setMessage] = useState(props.message);
|
7
|
-
const [isError, setIsError] = useState(props.isError);
|
8
|
-
useEffect(() => {
|
9
|
-
setMessage(props.message);
|
10
|
-
setIsError(props.isError);
|
11
|
-
}, [props]);
|
12
|
-
const onClick = () => {
|
13
|
-
setMessage("");
|
14
|
-
if (props.onClose) {
|
15
|
-
props.onClose();
|
16
|
-
}
|
17
|
-
};
|
18
|
-
if (!message) {
|
19
|
-
return null;
|
20
|
-
}
|
21
|
-
return (_jsx("div", { className: styles["dialog-container"], children: _jsxs("div", { className: styles["dialog"], children: [_jsx("div", { className: styles["dialog-message"], children: message }), _jsx("div", { className: styles["dialog-buttons"], children: _jsx("div", { className: ClassNames({ "dialog-button-ok": true, error: isError }, styles), onClick: onClick, children: "OK" }) })] }) }));
|
22
|
-
};
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { useState, useEffect } from "react";
|
3
|
+
import { ClassNames } from "./classNames.js";
|
4
|
+
import styles from "./MessageDialog.modules.scss";
|
5
|
+
export const MessageDialog = (props) => {
|
6
|
+
const [message, setMessage] = useState(props.message);
|
7
|
+
const [isError, setIsError] = useState(props.isError);
|
8
|
+
useEffect(() => {
|
9
|
+
setMessage(props.message);
|
10
|
+
setIsError(props.isError);
|
11
|
+
}, [props]);
|
12
|
+
const onClick = () => {
|
13
|
+
setMessage("");
|
14
|
+
if (props.onClose) {
|
15
|
+
props.onClose();
|
16
|
+
}
|
17
|
+
};
|
18
|
+
if (!message) {
|
19
|
+
return null;
|
20
|
+
}
|
21
|
+
return (_jsx("div", { className: styles["dialog-container"], children: _jsxs("div", { className: styles["dialog"], children: [_jsx("div", { className: styles["dialog-message"], children: message }), _jsx("div", { className: styles["dialog-buttons"], children: _jsx("div", { className: ClassNames({ "dialog-button-ok": true, error: isError }, styles), onClick: onClick, children: "OK" }) })] }) }));
|
22
|
+
};
|
23
23
|
//# sourceMappingURL=MessageDialog.js.map
|
package/components/Toggle.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
export declare type ToggleProps = {
|
3
|
-
toggled: "on" | "mixed" | "off";
|
4
|
-
onToggle?: () => void;
|
5
|
-
padded?: boolean;
|
6
|
-
color?: "dark" | "light";
|
7
|
-
};
|
8
|
-
export declare const Toggle: React.FC<ToggleProps>;
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare type ToggleProps = {
|
3
|
+
toggled: "on" | "mixed" | "off";
|
4
|
+
onToggle?: () => void;
|
5
|
+
padded?: boolean;
|
6
|
+
color?: "dark" | "light";
|
7
|
+
};
|
8
|
+
export declare const Toggle: React.FC<ToggleProps>;
|
package/components/Toggle.js
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import styles from "./Toggle.modules.scss";
|
3
|
-
import { ClassNames } from "./classNames.js";
|
4
|
-
import toggleOnIcon_30px from "../imgs/toggleOnIcon_30px.svg";
|
5
|
-
import toggleMixedIcon_30px from "../imgs/toggleMixedIcon_30px.svg";
|
6
|
-
import toggleOffIcon_30px from "../imgs/toggleOffIcon_30px.svg";
|
7
|
-
import { Icon } from "./Icon.js";
|
8
|
-
const Icons = {
|
9
|
-
on: toggleOnIcon_30px,
|
10
|
-
mixed: toggleMixedIcon_30px,
|
11
|
-
off: toggleOffIcon_30px,
|
12
|
-
};
|
13
|
-
export const Toggle = ({ color = "dark", toggled = "off", padded = false, onToggle = () => { } }) => {
|
14
|
-
return (_jsxs("label", { className: ClassNames({ toggle: true, padded }, styles), children: [_jsx("input", { type: "checkbox", style: { display: "none" }, checked: toggled === "on", onChange: () => onToggle() }), _jsx(Icon, { icon: Icons[toggled], color: color })] }));
|
15
|
-
};
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import styles from "./Toggle.modules.scss";
|
3
|
+
import { ClassNames } from "./classNames.js";
|
4
|
+
import toggleOnIcon_30px from "../imgs/toggleOnIcon_30px.svg";
|
5
|
+
import toggleMixedIcon_30px from "../imgs/toggleMixedIcon_30px.svg";
|
6
|
+
import toggleOffIcon_30px from "../imgs/toggleOffIcon_30px.svg";
|
7
|
+
import { Icon } from "./Icon.js";
|
8
|
+
const Icons = {
|
9
|
+
on: toggleOnIcon_30px,
|
10
|
+
mixed: toggleMixedIcon_30px,
|
11
|
+
off: toggleOffIcon_30px,
|
12
|
+
};
|
13
|
+
export const Toggle = ({ color = "dark", toggled = "off", padded = false, onToggle = () => { } }) => {
|
14
|
+
return (_jsxs("label", { className: ClassNames({ toggle: true, padded }, styles), children: [_jsx("input", { type: "checkbox", style: { display: "none" }, checked: toggled === "on", onChange: () => onToggle() }), _jsx(Icon, { icon: Icons[toggled], color: color })] }));
|
15
|
+
};
|
16
16
|
//# sourceMappingURL=Toggle.js.map
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import type { FC } from "react";
|
2
|
-
export interface ICommandBarComponentProps {
|
3
|
-
onSaveButtonClicked?: () => void;
|
4
|
-
onSaveToSnippetButtonClicked?: () => void;
|
5
|
-
onLoadFromSnippetButtonClicked?: () => void;
|
6
|
-
onHelpButtonClicked?: () => void;
|
7
|
-
onGiveFeedbackButtonClicked?: () => void;
|
8
|
-
onSelectButtonClicked?: () => void;
|
9
|
-
onPanButtonClicked?: () => void;
|
10
|
-
onZoomButtonClicked?: () => void;
|
11
|
-
onFitButtonClicked?: () => void;
|
12
|
-
onArtboardColorChanged?: (newColor: string) => void;
|
13
|
-
artboardColor?: string;
|
14
|
-
artboardColorPickerColor?: string;
|
15
|
-
}
|
16
|
-
export declare const CommandBarComponent: FC<ICommandBarComponentProps>;
|
1
|
+
import type { FC } from "react";
|
2
|
+
export interface ICommandBarComponentProps {
|
3
|
+
onSaveButtonClicked?: () => void;
|
4
|
+
onSaveToSnippetButtonClicked?: () => void;
|
5
|
+
onLoadFromSnippetButtonClicked?: () => void;
|
6
|
+
onHelpButtonClicked?: () => void;
|
7
|
+
onGiveFeedbackButtonClicked?: () => void;
|
8
|
+
onSelectButtonClicked?: () => void;
|
9
|
+
onPanButtonClicked?: () => void;
|
10
|
+
onZoomButtonClicked?: () => void;
|
11
|
+
onFitButtonClicked?: () => void;
|
12
|
+
onArtboardColorChanged?: (newColor: string) => void;
|
13
|
+
artboardColor?: string;
|
14
|
+
artboardColorPickerColor?: string;
|
15
|
+
}
|
16
|
+
export declare const CommandBarComponent: FC<ICommandBarComponentProps>;
|
@@ -1,69 +1,69 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import { JoinClassNames } from "../classNames.js";
|
3
|
-
import { CommandButtonComponent } from "./CommandButtonComponent.js";
|
4
|
-
import { CommandDropdownComponent } from "./CommandDropdownComponent.js";
|
5
|
-
import hamburgerIcon from "../../imgs/hamburgerIcon.svg";
|
6
|
-
import pointerIcon from "../../imgs/pointerIcon.svg";
|
7
|
-
import handIcon from "../../imgs/handIcon.svg";
|
8
|
-
import zoomIcon from "../../imgs/zoomIcon.svg";
|
9
|
-
import logoIcon from "../../imgs/babylonLogo.svg";
|
10
|
-
import canvasFitIcon from "../../imgs/canvasFitIcon.svg";
|
11
|
-
import betaFlag from "../../imgs/betaFlag.svg";
|
12
|
-
import style from "./CommandBar.modules.scss";
|
13
|
-
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
14
|
-
import { ColorPickerLineComponent } from "../lines/ColorPickerLineComponent.js";
|
15
|
-
export const CommandBarComponent = (props) => {
|
16
|
-
return (_jsxs("div", { className: style.commandBar, children: [_jsxs("div", { className: style.commandsLeft, children: [_jsxs("div", { className: style.divider, children: [_jsx("img", { src: logoIcon, color: "white", className: "active", draggable: false }), _jsx(CommandDropdownComponent
|
17
|
-
//globalState={this.props.globalState}
|
18
|
-
, {
|
19
|
-
//globalState={this.props.globalState}
|
20
|
-
toRight: true, icon: hamburgerIcon, tooltip: "Options", items: [
|
21
|
-
{
|
22
|
-
label: "Save",
|
23
|
-
onClick: () => {
|
24
|
-
props.onSaveButtonClicked && props.onSaveButtonClicked();
|
25
|
-
},
|
26
|
-
},
|
27
|
-
{
|
28
|
-
label: "Load",
|
29
|
-
fileButton: true,
|
30
|
-
},
|
31
|
-
{
|
32
|
-
label: "Save to snippet",
|
33
|
-
onClick: () => {
|
34
|
-
props.onSaveToSnippetButtonClicked && props.onSaveToSnippetButtonClicked();
|
35
|
-
},
|
36
|
-
},
|
37
|
-
{
|
38
|
-
label: "Load from snippet",
|
39
|
-
onClick: () => {
|
40
|
-
props.onLoadFromSnippetButtonClicked && props.onLoadFromSnippetButtonClicked();
|
41
|
-
},
|
42
|
-
},
|
43
|
-
{
|
44
|
-
label: "Help",
|
45
|
-
onClick: () => {
|
46
|
-
props.onHelpButtonClicked && props.onHelpButtonClicked();
|
47
|
-
},
|
48
|
-
},
|
49
|
-
{
|
50
|
-
label: "Give feedback",
|
51
|
-
onClick: () => {
|
52
|
-
props.onGiveFeedbackButtonClicked && props.onGiveFeedbackButtonClicked();
|
53
|
-
},
|
54
|
-
},
|
55
|
-
] }), _jsx(CommandButtonComponent, { tooltip: "Select", icon: pointerIcon, shortcut: "S", isActive: false, onClick: () => {
|
56
|
-
props.onSelectButtonClicked && props.onSelectButtonClicked();
|
57
|
-
} }), _jsx(CommandButtonComponent, { tooltip: "Pan", icon: handIcon, shortcut: "P", isActive: false, onClick: () => {
|
58
|
-
props.onPanButtonClicked && props.onPanButtonClicked();
|
59
|
-
} }), _jsx(CommandButtonComponent, { tooltip: "Zoom", shortcut: "Z", icon: zoomIcon, isActive: false, onClick: () => {
|
60
|
-
props.onZoomButtonClicked && props.onZoomButtonClicked();
|
61
|
-
} })] }), _jsx("div", { className: style.divider, children: _jsx(CommandButtonComponent, { tooltip: "Fit to Window", shortcut: "F", icon: canvasFitIcon, isActive: false, onClick: () => {
|
62
|
-
props.onFitButtonClicked && props.onFitButtonClicked();
|
63
|
-
} }) }), _jsxs("div", { className: JoinClassNames(style, "divider", "padded"), children: [_jsx("div", { style: { paddingRight: "5px" }, children: "Artboard:" }), props.onArtboardColorChanged && (_jsx(ColorPickerLineComponent, { backgroundColor: props.artboardColorPickerColor || "#888888", value: props.artboardColor ? Color3.FromHexString(props.artboardColor) : new Color3(0, 0, 0), onColorChanged: (newColor) => {
|
64
|
-
if (props.onArtboardColorChanged) {
|
65
|
-
props.onArtboardColorChanged(newColor);
|
66
|
-
}
|
67
|
-
} }))] })] }), _jsx("div", { className: style.commandsRight, children: _jsx("img", { src: betaFlag, className: style.betaFlag, draggable: false }) })] }));
|
68
|
-
};
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { JoinClassNames } from "../classNames.js";
|
3
|
+
import { CommandButtonComponent } from "./CommandButtonComponent.js";
|
4
|
+
import { CommandDropdownComponent } from "./CommandDropdownComponent.js";
|
5
|
+
import hamburgerIcon from "../../imgs/hamburgerIcon.svg";
|
6
|
+
import pointerIcon from "../../imgs/pointerIcon.svg";
|
7
|
+
import handIcon from "../../imgs/handIcon.svg";
|
8
|
+
import zoomIcon from "../../imgs/zoomIcon.svg";
|
9
|
+
import logoIcon from "../../imgs/babylonLogo.svg";
|
10
|
+
import canvasFitIcon from "../../imgs/canvasFitIcon.svg";
|
11
|
+
import betaFlag from "../../imgs/betaFlag.svg";
|
12
|
+
import style from "./CommandBar.modules.scss";
|
13
|
+
import { Color3 } from "@babylonjs/core/Maths/math.color.js";
|
14
|
+
import { ColorPickerLineComponent } from "../lines/ColorPickerLineComponent.js";
|
15
|
+
export const CommandBarComponent = (props) => {
|
16
|
+
return (_jsxs("div", { className: style.commandBar, children: [_jsxs("div", { className: style.commandsLeft, children: [_jsxs("div", { className: style.divider, children: [_jsx("img", { src: logoIcon, color: "white", className: "active", draggable: false }), _jsx(CommandDropdownComponent
|
17
|
+
//globalState={this.props.globalState}
|
18
|
+
, {
|
19
|
+
//globalState={this.props.globalState}
|
20
|
+
toRight: true, icon: hamburgerIcon, tooltip: "Options", items: [
|
21
|
+
{
|
22
|
+
label: "Save",
|
23
|
+
onClick: () => {
|
24
|
+
props.onSaveButtonClicked && props.onSaveButtonClicked();
|
25
|
+
},
|
26
|
+
},
|
27
|
+
{
|
28
|
+
label: "Load",
|
29
|
+
fileButton: true,
|
30
|
+
},
|
31
|
+
{
|
32
|
+
label: "Save to snippet",
|
33
|
+
onClick: () => {
|
34
|
+
props.onSaveToSnippetButtonClicked && props.onSaveToSnippetButtonClicked();
|
35
|
+
},
|
36
|
+
},
|
37
|
+
{
|
38
|
+
label: "Load from snippet",
|
39
|
+
onClick: () => {
|
40
|
+
props.onLoadFromSnippetButtonClicked && props.onLoadFromSnippetButtonClicked();
|
41
|
+
},
|
42
|
+
},
|
43
|
+
{
|
44
|
+
label: "Help",
|
45
|
+
onClick: () => {
|
46
|
+
props.onHelpButtonClicked && props.onHelpButtonClicked();
|
47
|
+
},
|
48
|
+
},
|
49
|
+
{
|
50
|
+
label: "Give feedback",
|
51
|
+
onClick: () => {
|
52
|
+
props.onGiveFeedbackButtonClicked && props.onGiveFeedbackButtonClicked();
|
53
|
+
},
|
54
|
+
},
|
55
|
+
] }), _jsx(CommandButtonComponent, { tooltip: "Select", icon: pointerIcon, shortcut: "S", isActive: false, onClick: () => {
|
56
|
+
props.onSelectButtonClicked && props.onSelectButtonClicked();
|
57
|
+
} }), _jsx(CommandButtonComponent, { tooltip: "Pan", icon: handIcon, shortcut: "P", isActive: false, onClick: () => {
|
58
|
+
props.onPanButtonClicked && props.onPanButtonClicked();
|
59
|
+
} }), _jsx(CommandButtonComponent, { tooltip: "Zoom", shortcut: "Z", icon: zoomIcon, isActive: false, onClick: () => {
|
60
|
+
props.onZoomButtonClicked && props.onZoomButtonClicked();
|
61
|
+
} })] }), _jsx("div", { className: style.divider, children: _jsx(CommandButtonComponent, { tooltip: "Fit to Window", shortcut: "F", icon: canvasFitIcon, isActive: false, onClick: () => {
|
62
|
+
props.onFitButtonClicked && props.onFitButtonClicked();
|
63
|
+
} }) }), _jsxs("div", { className: JoinClassNames(style, "divider", "padded"), children: [_jsx("div", { style: { paddingRight: "5px" }, children: "Artboard:" }), props.onArtboardColorChanged && (_jsx(ColorPickerLineComponent, { backgroundColor: props.artboardColorPickerColor || "#888888", value: props.artboardColor ? Color3.FromHexString(props.artboardColor) : new Color3(0, 0, 0), onColorChanged: (newColor) => {
|
64
|
+
if (props.onArtboardColorChanged) {
|
65
|
+
props.onArtboardColorChanged(newColor);
|
66
|
+
}
|
67
|
+
} }))] })] }), _jsx("div", { className: style.commandsRight, children: _jsx("img", { src: betaFlag, className: style.betaFlag, draggable: false }) })] }));
|
68
|
+
};
|
69
69
|
//# sourceMappingURL=CommandBarComponent.js.map
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
export interface ICommandButtonComponentProps {
|
3
|
-
tooltip: string;
|
4
|
-
shortcut?: string;
|
5
|
-
icon: string;
|
6
|
-
iconLabel?: string;
|
7
|
-
isActive: boolean;
|
8
|
-
onClick: () => void;
|
9
|
-
disabled?: boolean;
|
10
|
-
}
|
11
|
-
export declare const CommandButtonComponent: React.FC<ICommandButtonComponentProps>;
|
1
|
+
import * as React from "react";
|
2
|
+
export interface ICommandButtonComponentProps {
|
3
|
+
tooltip: string;
|
4
|
+
shortcut?: string;
|
5
|
+
icon: string;
|
6
|
+
iconLabel?: string;
|
7
|
+
isActive: boolean;
|
8
|
+
onClick: () => void;
|
9
|
+
disabled?: boolean;
|
10
|
+
}
|
11
|
+
export declare const CommandButtonComponent: React.FC<ICommandButtonComponentProps>;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { ClassNames } from "../classNames.js";
|
3
|
-
import style from "./CommandButton.modules.scss";
|
4
|
-
export const CommandButtonComponent = (props) => {
|
5
|
-
return (_jsx("div", { className: ClassNames({ commandButton: true, active: props.isActive, disabled: props.disabled }, style), onClick: props.onClick, title: `${props.tooltip} ${props.shortcut ? " (" + props.shortcut + ")" : ""}`, children: _jsx("div", { className: ClassNames({ commandButtonIcon: true }, style), children: _jsx("img", { src: props.icon, title: props.iconLabel, alt: props.iconLabel, draggable: false }) }) }));
|
6
|
-
};
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { ClassNames } from "../classNames.js";
|
3
|
+
import style from "./CommandButton.modules.scss";
|
4
|
+
export const CommandButtonComponent = (props) => {
|
5
|
+
return (_jsx("div", { className: ClassNames({ commandButton: true, active: props.isActive, disabled: props.disabled }, style), onClick: props.onClick, title: `${props.tooltip} ${props.shortcut ? " (" + props.shortcut + ")" : ""}`, children: _jsx("div", { className: ClassNames({ commandButtonIcon: true }, style), children: _jsx("img", { src: props.icon, title: props.iconLabel, alt: props.iconLabel, draggable: false }) }) }));
|
6
|
+
};
|
7
7
|
//# sourceMappingURL=CommandButtonComponent.js.map
|
@@ -1,26 +1,26 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
interface ICommandDropdownComponentProps {
|
3
|
-
icon?: string;
|
4
|
-
tooltip: string;
|
5
|
-
defaultValue?: string;
|
6
|
-
items: {
|
7
|
-
label: string;
|
8
|
-
icon?: string;
|
9
|
-
fileButton?: boolean;
|
10
|
-
onClick?: () => void;
|
11
|
-
onCheck?: (value: boolean) => void;
|
12
|
-
storeKey?: string;
|
13
|
-
isActive?: boolean;
|
14
|
-
defaultValue?: boolean | string;
|
15
|
-
subItems?: string[];
|
16
|
-
}[];
|
17
|
-
toRight?: boolean;
|
18
|
-
}
|
19
|
-
export declare class CommandDropdownComponent extends React.Component<ICommandDropdownComponentProps, {
|
20
|
-
isExpanded: boolean;
|
21
|
-
activeState: string;
|
22
|
-
}> {
|
23
|
-
constructor(props: ICommandDropdownComponentProps);
|
24
|
-
render(): JSX.Element;
|
25
|
-
}
|
26
|
-
export {};
|
1
|
+
import * as React from "react";
|
2
|
+
interface ICommandDropdownComponentProps {
|
3
|
+
icon?: string;
|
4
|
+
tooltip: string;
|
5
|
+
defaultValue?: string;
|
6
|
+
items: {
|
7
|
+
label: string;
|
8
|
+
icon?: string;
|
9
|
+
fileButton?: boolean;
|
10
|
+
onClick?: () => void;
|
11
|
+
onCheck?: (value: boolean) => void;
|
12
|
+
storeKey?: string;
|
13
|
+
isActive?: boolean;
|
14
|
+
defaultValue?: boolean | string;
|
15
|
+
subItems?: string[];
|
16
|
+
}[];
|
17
|
+
toRight?: boolean;
|
18
|
+
}
|
19
|
+
export declare class CommandDropdownComponent extends React.Component<ICommandDropdownComponentProps, {
|
20
|
+
isExpanded: boolean;
|
21
|
+
activeState: string;
|
22
|
+
}> {
|
23
|
+
constructor(props: ICommandDropdownComponentProps);
|
24
|
+
render(): JSX.Element;
|
25
|
+
}
|
26
|
+
export {};
|
@@ -1,49 +1,49 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
-
import * as React from "react";
|
3
|
-
import { FileButtonLineComponent } from "../lines/FileButtonLineComponent.js";
|
4
|
-
import { JoinClassNames } from "../classNames.js";
|
5
|
-
import style from "./CommandDropdown.modules.scss";
|
6
|
-
export class CommandDropdownComponent extends React.Component {
|
7
|
-
constructor(props) {
|
8
|
-
super(props);
|
9
|
-
this.state = { isExpanded: false, activeState: "" };
|
10
|
-
}
|
11
|
-
render() {
|
12
|
-
return (_jsxs(_Fragment, { children: [this.state.isExpanded && (_jsx("div", { className: style.commandDropdownBlocker, onClick: () => {
|
13
|
-
this.setState({ isExpanded: false });
|
14
|
-
} })), _jsxs("div", { className: style.commandDropdownRoot, children: [_jsxs("div", { className: JoinClassNames(style, "commandDropdown", this.state.isExpanded ? "activated" : ""), title: this.props.tooltip, onClick: () => {
|
15
|
-
this.setState({ isExpanded: false });
|
16
|
-
const newState = !this.state.isExpanded;
|
17
|
-
const pgHost = document.getElementById("embed-host");
|
18
|
-
if (pgHost) {
|
19
|
-
pgHost.style.zIndex = newState ? "0" : "10";
|
20
|
-
}
|
21
|
-
this.setState({ isExpanded: newState });
|
22
|
-
}, children: [this.props.icon && (_jsx("div", { className: style.commandDropdownIcon, children: _jsx("img", { src: this.props.icon }) })), !this.props.icon && _jsx("div", { className: style.commandDropdownActive })] }), this.state.isExpanded && (_jsx("div", { className: JoinClassNames(style, "commandDropdownContent", this.props.toRight ? "toRight" : ""), children: this.props.items.map((m) => {
|
23
|
-
if (!m.fileButton) {
|
24
|
-
return (_jsxs("div", { className: JoinClassNames(style, "commandDropdownLabel", m.isActive ? "active" : ""), onClick: () => {
|
25
|
-
if (!m.onClick) {
|
26
|
-
this.forceUpdate();
|
27
|
-
return;
|
28
|
-
}
|
29
|
-
if (!m.subItems) {
|
30
|
-
m.onClick();
|
31
|
-
this.setState({ isExpanded: false, activeState: m.label });
|
32
|
-
}
|
33
|
-
}, title: m.label, children: [!m.icon && _jsx("div", { className: style.commandDropdownLabelText, children: (m.isActive ? "> " : "") + m.label }), m.icon && (_jsx("div", { className: style.commandDropdownIcon, children: _jsx("img", { src: m.icon }) })), m.onCheck && (_jsx("input", { type: "checkBox", className: style.commandDropdownLabelCheck, onChange: (evt) => {
|
34
|
-
this.forceUpdate();
|
35
|
-
m.onCheck(evt.target.checked);
|
36
|
-
}, checked: false })), m.subItems && _jsx("div", { className: style.commandDropdownArrow, children: ">" }), m.subItems && (_jsx("div", { className: style.subItems, children: m.subItems.map((s) => {
|
37
|
-
return (_jsx("div", { className: style.subItem, onClick: () => {
|
38
|
-
m.onClick();
|
39
|
-
this.setState({ isExpanded: false });
|
40
|
-
}, children: _jsx("div", { children: s }) }, s));
|
41
|
-
}) }))] }, m.label));
|
42
|
-
}
|
43
|
-
else {
|
44
|
-
return _jsx(FileButtonLineComponent, { label: "Load", onClick: (file) => console.log("file btn clicked"), accept: ".json" }, m.label);
|
45
|
-
}
|
46
|
-
}) }))] })] }));
|
47
|
-
}
|
48
|
-
}
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
2
|
+
import * as React from "react";
|
3
|
+
import { FileButtonLineComponent } from "../lines/FileButtonLineComponent.js";
|
4
|
+
import { JoinClassNames } from "../classNames.js";
|
5
|
+
import style from "./CommandDropdown.modules.scss";
|
6
|
+
export class CommandDropdownComponent extends React.Component {
|
7
|
+
constructor(props) {
|
8
|
+
super(props);
|
9
|
+
this.state = { isExpanded: false, activeState: "" };
|
10
|
+
}
|
11
|
+
render() {
|
12
|
+
return (_jsxs(_Fragment, { children: [this.state.isExpanded && (_jsx("div", { className: style.commandDropdownBlocker, onClick: () => {
|
13
|
+
this.setState({ isExpanded: false });
|
14
|
+
} })), _jsxs("div", { className: style.commandDropdownRoot, children: [_jsxs("div", { className: JoinClassNames(style, "commandDropdown", this.state.isExpanded ? "activated" : ""), title: this.props.tooltip, onClick: () => {
|
15
|
+
this.setState({ isExpanded: false });
|
16
|
+
const newState = !this.state.isExpanded;
|
17
|
+
const pgHost = document.getElementById("embed-host");
|
18
|
+
if (pgHost) {
|
19
|
+
pgHost.style.zIndex = newState ? "0" : "10";
|
20
|
+
}
|
21
|
+
this.setState({ isExpanded: newState });
|
22
|
+
}, children: [this.props.icon && (_jsx("div", { className: style.commandDropdownIcon, children: _jsx("img", { src: this.props.icon }) })), !this.props.icon && _jsx("div", { className: style.commandDropdownActive })] }), this.state.isExpanded && (_jsx("div", { className: JoinClassNames(style, "commandDropdownContent", this.props.toRight ? "toRight" : ""), children: this.props.items.map((m) => {
|
23
|
+
if (!m.fileButton) {
|
24
|
+
return (_jsxs("div", { className: JoinClassNames(style, "commandDropdownLabel", m.isActive ? "active" : ""), onClick: () => {
|
25
|
+
if (!m.onClick) {
|
26
|
+
this.forceUpdate();
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
if (!m.subItems) {
|
30
|
+
m.onClick();
|
31
|
+
this.setState({ isExpanded: false, activeState: m.label });
|
32
|
+
}
|
33
|
+
}, title: m.label, children: [!m.icon && _jsx("div", { className: style.commandDropdownLabelText, children: (m.isActive ? "> " : "") + m.label }), m.icon && (_jsx("div", { className: style.commandDropdownIcon, children: _jsx("img", { src: m.icon }) })), m.onCheck && (_jsx("input", { type: "checkBox", className: style.commandDropdownLabelCheck, onChange: (evt) => {
|
34
|
+
this.forceUpdate();
|
35
|
+
m.onCheck(evt.target.checked);
|
36
|
+
}, checked: false })), m.subItems && _jsx("div", { className: style.commandDropdownArrow, children: ">" }), m.subItems && (_jsx("div", { className: style.subItems, children: m.subItems.map((s) => {
|
37
|
+
return (_jsx("div", { className: style.subItem, onClick: () => {
|
38
|
+
m.onClick();
|
39
|
+
this.setState({ isExpanded: false });
|
40
|
+
}, children: _jsx("div", { children: s }) }, s));
|
41
|
+
}) }))] }, m.label));
|
42
|
+
}
|
43
|
+
else {
|
44
|
+
return _jsx(FileButtonLineComponent, { label: "Load", onClick: (file) => console.log("file btn clicked"), accept: ".json" }, m.label);
|
45
|
+
}
|
46
|
+
}) }))] })] }));
|
47
|
+
}
|
48
|
+
}
|
49
49
|
//# sourceMappingURL=CommandDropdownComponent.js.map
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export declare function ClassNames(names: any, styleObject: any): string;
|
2
|
-
export declare function JoinClassNames(styleObject: any, ...names: string[]): string;
|
1
|
+
export declare function ClassNames(names: any, styleObject: any): string;
|
2
|
+
export declare function JoinClassNames(styleObject: any, ...names: string[]): string;
|
package/components/classNames.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
export function ClassNames(names, styleObject) {
|
2
|
-
let string = "";
|
3
|
-
for (const name in names) {
|
4
|
-
if (names[name]) {
|
5
|
-
string += styleObject[name] + " ";
|
6
|
-
}
|
7
|
-
}
|
8
|
-
return string;
|
9
|
-
}
|
10
|
-
export function JoinClassNames(styleObject, ...names) {
|
11
|
-
let string = "";
|
12
|
-
for (const name of names) {
|
13
|
-
if (name && styleObject[name]) {
|
14
|
-
string += styleObject[name] + " ";
|
15
|
-
}
|
16
|
-
}
|
17
|
-
return string;
|
18
|
-
}
|
1
|
+
export function ClassNames(names, styleObject) {
|
2
|
+
let string = "";
|
3
|
+
for (const name in names) {
|
4
|
+
if (names[name]) {
|
5
|
+
string += styleObject[name] + " ";
|
6
|
+
}
|
7
|
+
}
|
8
|
+
return string;
|
9
|
+
}
|
10
|
+
export function JoinClassNames(styleObject, ...names) {
|
11
|
+
let string = "";
|
12
|
+
for (const name of names) {
|
13
|
+
if (name && styleObject[name]) {
|
14
|
+
string += styleObject[name] + " ";
|
15
|
+
}
|
16
|
+
}
|
17
|
+
return string;
|
18
|
+
}
|
19
19
|
//# sourceMappingURL=classNames.js.map
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import * as React from "react";
|
2
|
-
import type { LockObject } from "../../tabs/propertyGrids/lockObject";
|
3
|
-
export interface IColorComponentEntryProps {
|
4
|
-
value: number;
|
5
|
-
label: string;
|
6
|
-
max?: number;
|
7
|
-
min?: number;
|
8
|
-
onChange: (value: number) => void;
|
9
|
-
disabled?: boolean;
|
10
|
-
lockObject: LockObject;
|
11
|
-
}
|
12
|
-
export declare class ColorComponentEntry extends React.Component<IColorComponentEntryProps> {
|
13
|
-
constructor(props: IColorComponentEntryProps);
|
14
|
-
updateValue(valueString: string): void;
|
15
|
-
lock(): void;
|
16
|
-
unlock(): void;
|
17
|
-
render(): JSX.Element;
|
18
|
-
}
|
1
|
+
import * as React from "react";
|
2
|
+
import type { LockObject } from "../../tabs/propertyGrids/lockObject";
|
3
|
+
export interface IColorComponentEntryProps {
|
4
|
+
value: number;
|
5
|
+
label: string;
|
6
|
+
max?: number;
|
7
|
+
min?: number;
|
8
|
+
onChange: (value: number) => void;
|
9
|
+
disabled?: boolean;
|
10
|
+
lockObject: LockObject;
|
11
|
+
}
|
12
|
+
export declare class ColorComponentEntry extends React.Component<IColorComponentEntryProps> {
|
13
|
+
constructor(props: IColorComponentEntryProps);
|
14
|
+
updateValue(valueString: string): void;
|
15
|
+
lock(): void;
|
16
|
+
unlock(): void;
|
17
|
+
render(): JSX.Element;
|
18
|
+
}
|