@wandelbots/wandelbots-js-react-components 1.3.0 → 1.3.2
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/README.md +0 -29
- package/package.json +60 -43
- package/src/components/3d-viewport/CoordinateSystemTransform.tsx +44 -0
- package/src/components/3d-viewport/PresetEnvironment.tsx +78 -0
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +54 -0
- package/src/components/LoadingButton.stories.tsx +61 -0
- package/src/components/LoadingButton.tsx +19 -0
- package/src/components/LoadingCover.tsx +75 -0
- package/src/components/ThemeSelect.tsx +49 -0
- package/src/components/VelocitySlider.stories.tsx +32 -0
- package/src/components/VelocitySlider.tsx +52 -0
- package/src/components/jogging/JoggingCartesianAxisControl.stories.tsx +41 -0
- package/src/components/jogging/JoggingCartesianAxisControl.tsx +127 -0
- package/src/components/jogging/JoggingCartesianTab.tsx +265 -0
- package/src/components/jogging/JoggingCartesianValues.tsx +45 -0
- package/src/components/jogging/JoggingFreedriveTab.tsx +9 -0
- package/src/components/jogging/JoggingJointLimitDetector.tsx +51 -0
- package/src/components/jogging/JoggingJointRotationControl.stories.tsx +38 -0
- package/src/components/jogging/JoggingJointRotationControl.tsx +197 -0
- package/src/components/jogging/JoggingJointTab.tsx +93 -0
- package/src/components/jogging/JoggingJointValues.tsx +45 -0
- package/src/components/jogging/JoggingOptions.tsx +96 -0
- package/src/components/jogging/JoggingPanel.stories.tsx +26 -0
- package/src/components/jogging/JoggingPanel.tsx +148 -0
- package/src/components/jogging/JoggingStore.tsx +294 -0
- package/src/components/jogging/JoggingVelocitySlider.tsx +56 -0
- package/src/components/robots/ABB_1200_07_7.tsx +123 -0
- package/src/components/robots/AxisConfig.ts +3 -0
- package/src/components/robots/DHRobot.tsx +129 -0
- package/src/components/robots/FANUC_ARC_Mate_100iD.tsx +187 -0
- package/src/components/robots/FANUC_ARC_Mate_120iD.tsx +187 -0
- package/src/components/robots/FANUC_CRX10iA.tsx +167 -0
- package/src/components/robots/FANUC_CRX25iA.tsx +167 -0
- package/src/components/robots/FANUC_CRX25iAL.tsx +178 -0
- package/src/components/robots/KUKA_KR210_R2700.tsx +291 -0
- package/src/components/robots/KUKA_KR270_R2700.tsx +244 -0
- package/src/components/robots/RobotAnimator.tsx +83 -0
- package/src/components/robots/SupportedRobot.tsx +131 -0
- package/src/components/robots/UniversalRobots_UR10.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR10e.tsx +275 -0
- package/src/components/robots/UniversalRobots_UR3.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR3e.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR5.tsx +111 -0
- package/src/components/robots/UniversalRobots_UR5e.tsx +280 -0
- package/src/components/robots/Yaskawa_AR1440.tsx +152 -0
- package/src/components/robots/Yaskawa_AR1730.tsx +165 -0
- package/src/components/robots/Yaskawa_AR2010.tsx +159 -0
- package/src/components/robots/Yaskawa_AR3120.tsx +160 -0
- package/src/components/robots/Yaskawa_AR900.tsx +121 -0
- package/src/components/utils/converters.ts +23 -0
- package/src/components/utils/errorHandling.ts +30 -0
- package/src/components/utils/hooks.tsx +54 -0
- package/src/components/utils/robotTreeQuery.ts +27 -0
- package/src/components/wandelscript-editor/WandelscriptEditor.stories.tsx +45 -0
- package/src/components/wandelscript-editor/WandelscriptEditor.tsx +114 -0
- package/src/components/wandelscript-editor/wandelscript.tmLanguage.ts +62 -0
- package/src/declarations.d.ts +10 -0
- package/src/i18n/config.ts +27 -0
- package/src/i18n/locales/de/translations.json +12 -0
- package/src/i18n/locales/en/translations.json +12 -0
- package/src/icons/arrowForwardFilled.tsx +7 -0
- package/src/icons/axis-x.svg +3 -0
- package/src/icons/axis-y.svg +3 -0
- package/src/icons/axis-z.svg +3 -0
- package/src/icons/expandFilled.tsx +11 -0
- package/src/icons/home.tsx +12 -0
- package/src/icons/infoOutlined.tsx +10 -0
- package/src/icons/jogging.svg +3 -0
- package/src/icons/robot.svg +3 -0
- package/src/icons/robot.tsx +14 -0
- package/src/icons/rotation.svg +4 -0
- package/src/icons/wbLogo.tsx +21 -0
- package/src/index.ts +7 -0
- package/src/themes/color.tsx +74 -0
- package/src/themes/theme.ts +150 -0
- package/src/themes/wbTheme.stories.tsx +64 -0
- package/src/themes/wbTheme.ts +186 -0
- package/dist/cjs/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -2
- package/dist/cjs/index.js +0 -5875
- package/dist/cjs/types/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -10
- package/dist/cjs/types/components/3d-viewport/PresetEnvironment.d.ts +0 -6
- package/dist/cjs/types/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -6
- package/dist/cjs/types/components/robots/ABB_1200_07_7.d.ts +0 -2
- package/dist/cjs/types/components/robots/AxisConfig.d.ts +0 -2
- package/dist/cjs/types/components/robots/DHRobot.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX10iA.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX25iA.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX25iAL.d.ts +0 -2
- package/dist/cjs/types/components/robots/KUKA_KR210_R2700.d.ts +0 -2
- package/dist/cjs/types/components/robots/KUKA_KR270_R2700.d.ts +0 -2
- package/dist/cjs/types/components/robots/RobotAnimator.d.ts +0 -11
- package/dist/cjs/types/components/robots/SupportedRobot.d.ts +0 -14
- package/dist/cjs/types/components/robots/UniversalRobots_UR10.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR10e.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR3.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR3e.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR5.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR5e.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR1440.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR1730.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR2010.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR3120.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR900.d.ts +0 -2
- package/dist/cjs/types/components/utils/hooks.d.ts +0 -21
- package/dist/cjs/types/components/utils/robotTreeQuery.d.ts +0 -5
- package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -12
- package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +0 -5
- package/dist/cjs/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -44
- package/dist/cjs/types/icons/arrowForwardFilled.d.ts +0 -1
- package/dist/cjs/types/icons/expandFilled.d.ts +0 -1
- package/dist/cjs/types/icons/home.d.ts +0 -1
- package/dist/cjs/types/icons/infoOutlined.d.ts +0 -1
- package/dist/cjs/types/icons/robot.d.ts +0 -1
- package/dist/cjs/types/icons/wbLogo.d.ts +0 -6
- package/dist/cjs/types/index.d.ts +0 -4
- package/dist/cjs/types/themes/color.d.ts +0 -9
- package/dist/cjs/types/themes/theme.d.ts +0 -143
- package/dist/cjs/types/themes/wbTheme.d.ts +0 -1
- package/dist/cjs/types/themes/wbTheme.stories.d.ts +0 -6
- package/dist/esm/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -2
- package/dist/esm/index.js +0 -5852
- package/dist/esm/types/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -10
- package/dist/esm/types/components/3d-viewport/PresetEnvironment.d.ts +0 -6
- package/dist/esm/types/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -6
- package/dist/esm/types/components/robots/ABB_1200_07_7.d.ts +0 -2
- package/dist/esm/types/components/robots/AxisConfig.d.ts +0 -2
- package/dist/esm/types/components/robots/DHRobot.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX10iA.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX25iA.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX25iAL.d.ts +0 -2
- package/dist/esm/types/components/robots/KUKA_KR210_R2700.d.ts +0 -2
- package/dist/esm/types/components/robots/KUKA_KR270_R2700.d.ts +0 -2
- package/dist/esm/types/components/robots/RobotAnimator.d.ts +0 -11
- package/dist/esm/types/components/robots/SupportedRobot.d.ts +0 -14
- package/dist/esm/types/components/robots/UniversalRobots_UR10.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR10e.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR3.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR3e.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR5.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR5e.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR1440.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR1730.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR2010.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR3120.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR900.d.ts +0 -2
- package/dist/esm/types/components/utils/hooks.d.ts +0 -21
- package/dist/esm/types/components/utils/robotTreeQuery.d.ts +0 -5
- package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -12
- package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +0 -5
- package/dist/esm/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -44
- package/dist/esm/types/icons/arrowForwardFilled.d.ts +0 -1
- package/dist/esm/types/icons/expandFilled.d.ts +0 -1
- package/dist/esm/types/icons/home.d.ts +0 -1
- package/dist/esm/types/icons/index.d.ts +0 -6
- package/dist/esm/types/icons/infoOutlined.d.ts +0 -1
- package/dist/esm/types/icons/robot.d.ts +0 -1
- package/dist/esm/types/icons/wbLogo.d.ts +0 -6
- package/dist/esm/types/index.d.ts +0 -4
- package/dist/esm/types/themes/color.d.ts +0 -9
- package/dist/esm/types/themes/theme.d.ts +0 -143
- package/dist/esm/types/themes/wbTheme.d.ts +0 -1
- package/dist/esm/types/themes/wbTheme.stories.d.ts +0 -6
- package/dist/index.d.ts +0 -33
- /package/{dist/cjs/types/icons/index.d.ts → src/icons/index.ts} +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import Editor, { useMonaco, type Monaco } from "@monaco-editor/react"
|
|
2
|
+
import React, { useEffect } from "react"
|
|
3
|
+
import { createHighlighter, type BundledTheme } from "shiki"
|
|
4
|
+
import { shikiToMonaco } from "@shikijs/monaco"
|
|
5
|
+
|
|
6
|
+
import wandelscriptTextmateGrammar from "./wandelscript.tmLanguage"
|
|
7
|
+
import { useTheme } from "@mui/material"
|
|
8
|
+
import { editor } from "monaco-editor"
|
|
9
|
+
|
|
10
|
+
type WandelscriptEditorProps = {
|
|
11
|
+
/** The current Wandelscript content of the code editor (controlled component) */
|
|
12
|
+
code?: string
|
|
13
|
+
/** What to do when the user edits the code */
|
|
14
|
+
onChange?: (code: string|undefined, ev: editor.IModelContentChangedEvent) => void
|
|
15
|
+
/** Callback to further configure monaco on startup if needed */
|
|
16
|
+
monacoSetup?: (monaco: Monaco) => void
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const shikiTheme: BundledTheme = "dark-plus"
|
|
20
|
+
|
|
21
|
+
/** A Monaco (VSCode-style) embedded code editor with Wandelscript syntax highlighting */
|
|
22
|
+
export const WandelscriptEditor = (props: WandelscriptEditorProps) => {
|
|
23
|
+
const monaco = useMonaco()
|
|
24
|
+
const theme = useTheme()
|
|
25
|
+
|
|
26
|
+
async function setupEditor(monaco: Monaco) {
|
|
27
|
+
// Register and configure the Wandelscript language
|
|
28
|
+
monaco.languages.register({ id: "wandelscript" })
|
|
29
|
+
|
|
30
|
+
monaco.languages.setLanguageConfiguration("wandelscript", {
|
|
31
|
+
comments: {
|
|
32
|
+
lineComment: "#",
|
|
33
|
+
},
|
|
34
|
+
brackets: [
|
|
35
|
+
["(", ")"],
|
|
36
|
+
["[", "]"],
|
|
37
|
+
],
|
|
38
|
+
autoClosingPairs: [
|
|
39
|
+
{ open: "[", close: "]" },
|
|
40
|
+
{ open: "(", close: ")" },
|
|
41
|
+
],
|
|
42
|
+
surroundingPairs: [
|
|
43
|
+
{ open: "[", close: "]" },
|
|
44
|
+
{ open: "(", close: ")" },
|
|
45
|
+
],
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
// Monaco doesn't support TextMate grammar config directly, so we
|
|
49
|
+
// use Shiki as an intermediary
|
|
50
|
+
|
|
51
|
+
const highlighter = await createHighlighter({
|
|
52
|
+
// Our textmate grammar doesn't quite conform to the expected type
|
|
53
|
+
// here; I'm not sure what the missing properties mean exactly
|
|
54
|
+
langs: [wandelscriptTextmateGrammar as any],
|
|
55
|
+
themes: [shikiTheme],
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
shikiToMonaco(highlighter, monaco)
|
|
59
|
+
|
|
60
|
+
// Override the generated shiki theme to use shiki syntax highlighting
|
|
61
|
+
// but vscode colors
|
|
62
|
+
monaco.editor.defineTheme(shikiTheme, {
|
|
63
|
+
base: theme.palette.mode === "dark" ? "vs-dark" : "vs",
|
|
64
|
+
inherit: true,
|
|
65
|
+
rules: [],
|
|
66
|
+
colors: {
|
|
67
|
+
// "editor.background": colors.backgroundDefault,
|
|
68
|
+
// "editorLineNumber.foreground": "#797979",
|
|
69
|
+
// "editorLineNumber.activeForeground": "#e9e9e9",
|
|
70
|
+
},
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
if (props.monacoSetup) {
|
|
74
|
+
props.monacoSetup(monaco)
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
// Define some custom keybindings
|
|
79
|
+
// monaco.editor.addCommand({
|
|
80
|
+
// id: "save",
|
|
81
|
+
// run: () => props.onSave ? props.onSave(monaco.editor.getModels()[0]!.getValue()) : null,
|
|
82
|
+
// })
|
|
83
|
+
|
|
84
|
+
// monaco.editor.addKeybindingRule({
|
|
85
|
+
// keybinding: monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS,
|
|
86
|
+
// command: "save",
|
|
87
|
+
// })
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
if (monaco) {
|
|
92
|
+
setupEditor(monaco)
|
|
93
|
+
}
|
|
94
|
+
}, [monaco])
|
|
95
|
+
|
|
96
|
+
if (!monaco) {
|
|
97
|
+
return null
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return (
|
|
101
|
+
<Editor
|
|
102
|
+
value={props.code}
|
|
103
|
+
onChange={props.onChange}
|
|
104
|
+
defaultLanguage="wandelscript"
|
|
105
|
+
theme={shikiTheme}
|
|
106
|
+
options={{
|
|
107
|
+
minimap: { enabled: false },
|
|
108
|
+
wordWrap: "on",
|
|
109
|
+
automaticLayout: true,
|
|
110
|
+
// ...props.monacoOptions,
|
|
111
|
+
}}
|
|
112
|
+
/>
|
|
113
|
+
)
|
|
114
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
$schema:
|
|
3
|
+
"https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
4
|
+
name: "wandelscript",
|
|
5
|
+
patterns: [
|
|
6
|
+
{
|
|
7
|
+
include: "#keywords",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
include: "#strings",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
include: "#comments",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
include: "#functions",
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
repository: {
|
|
20
|
+
keywords: {
|
|
21
|
+
patterns: [
|
|
22
|
+
{
|
|
23
|
+
name: "keyword.control.flow.wandelscript",
|
|
24
|
+
match:
|
|
25
|
+
"\\b(move|via|to|interrupt|def|False|True|for|if|else|elif|while|return|switch|activate|deactivate|print)\\b",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
strings: {
|
|
30
|
+
name: "string.quoted.double.wandelscript",
|
|
31
|
+
begin: '"',
|
|
32
|
+
end: '"',
|
|
33
|
+
patterns: [
|
|
34
|
+
{
|
|
35
|
+
name: "constant.character.escape.wandelscript",
|
|
36
|
+
match: "\\\\.",
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
comments: {
|
|
41
|
+
patterns: [
|
|
42
|
+
{
|
|
43
|
+
begin: "#",
|
|
44
|
+
beginCaptures: {
|
|
45
|
+
"0": { name: "punctuation.definition.comment.wandelscript" },
|
|
46
|
+
},
|
|
47
|
+
end: "$",
|
|
48
|
+
name: "comment.line.number-sign.wandelscript",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
functions: {
|
|
53
|
+
patterns: [
|
|
54
|
+
{
|
|
55
|
+
match: "[a-zA-Z_-]+\\(",
|
|
56
|
+
name: "entity.name.function.wandelscript",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
scopeName: "source.wandelscript",
|
|
62
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare module "*.glb" {
|
|
2
|
+
const content: string
|
|
3
|
+
export default content
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// Type for svg imports handled by vite config
|
|
7
|
+
declare module "*.svg" {
|
|
8
|
+
const content: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
9
|
+
export default content;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import deJSON from "./locales/de/translations.json"
|
|
2
|
+
import enJSON from "./locales/en/translations.json"
|
|
3
|
+
import i18next from "i18next"
|
|
4
|
+
import type { i18n } from "i18next"
|
|
5
|
+
import LanguageDetector from "i18next-browser-languagedetector"
|
|
6
|
+
import { initReactI18next } from "react-i18next"
|
|
7
|
+
|
|
8
|
+
const i18n: i18n = i18next.createInstance()
|
|
9
|
+
|
|
10
|
+
i18n
|
|
11
|
+
.use(LanguageDetector)
|
|
12
|
+
.use(initReactI18next)
|
|
13
|
+
.init({
|
|
14
|
+
supportedLngs: ["en", "de"],
|
|
15
|
+
resources: {
|
|
16
|
+
en: {
|
|
17
|
+
translations: enJSON,
|
|
18
|
+
},
|
|
19
|
+
de: {
|
|
20
|
+
translations: deJSON,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
ns: ["translations"],
|
|
24
|
+
defaultNS: "translations",
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
export default i18n
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
|
|
3
|
+
"Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
|
|
4
|
+
"Jogging.Velocity.lb": "Geschwindigkeit",
|
|
5
|
+
"General.degree.variable": "{{amount}}°",
|
|
6
|
+
"General.mm.variable": "{{amount}}mm",
|
|
7
|
+
"Jogging.Cartesian.MotionType.lb": "Bewegungstyp",
|
|
8
|
+
"Jogging.Cartesian.Translation.bt": "Translation",
|
|
9
|
+
"Jogging.Cartesian.Rotation.bt": "Rotation",
|
|
10
|
+
"Jogging.Joints.JointValues.lb": "Gelenkwerte",
|
|
11
|
+
"Jogging.Increment.Continuous.dd": "Fortlaufend"
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Jogging.Cartesian.Translation.velocityMmPerSec.lb": "{{amount}} mm/s",
|
|
3
|
+
"Jogging.Cartesian.Rotation.velocityDegPerSec.lb": "{{amount}}°/s",
|
|
4
|
+
"Jogging.Velocity.lb": "Velocity",
|
|
5
|
+
"General.degree.variable": "{{amount}}°",
|
|
6
|
+
"General.mm.variable": "{{amount}}mm",
|
|
7
|
+
"Jogging.Cartesian.MotionType.lb": "Motion type",
|
|
8
|
+
"Jogging.Cartesian.Translation.bt": "Translation",
|
|
9
|
+
"Jogging.Cartesian.Rotation.bt": "Rotation",
|
|
10
|
+
"Jogging.Joints.JointValues.lb": "Joint values",
|
|
11
|
+
"Jogging.Increment.Continuous.dd": "Continuous"
|
|
12
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="19" height="10" viewBox="0 0 19 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.13114 0.312406C5.48225 0.663519 5.48225 1.23278 5.13114 1.5839L3.06975 3.64528H15.5109L13.4496 1.58402C13.0985 1.2329 13.0985 0.66364 13.4496 0.312527C13.8007 -0.0385848 14.37 -0.0385848 14.7211 0.312527L18.3174 3.90884C18.6685 4.25996 18.6685 4.82922 18.3174 5.18033L14.7211 8.77665C14.37 9.12776 13.8007 9.12776 13.4496 8.77665C13.0985 8.42554 13.0985 7.85627 13.4496 7.50516L15.5113 5.44344H3.06954L5.13114 7.50504C5.48225 7.85615 5.48225 8.42542 5.13114 8.77653C4.78003 9.12764 4.21076 9.12764 3.85965 8.77653L0.263334 5.18021C-0.087778 4.8291 -0.087778 4.25983 0.263334 3.90872L3.85965 0.312406C4.21076 -0.0387058 4.78003 -0.0387058 5.13114 0.312406Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="19" height="10" viewBox="0 0 19 10" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.13114 0.312406C5.48225 0.663519 5.48225 1.23278 5.13114 1.5839L3.06975 3.64528H15.5109L13.4496 1.58402C13.0985 1.2329 13.0985 0.66364 13.4496 0.312527C13.8007 -0.0385848 14.37 -0.0385848 14.7211 0.312527L18.3174 3.90884C18.6685 4.25996 18.6685 4.82922 18.3174 5.18033L14.7211 8.77665C14.37 9.12776 13.8007 9.12776 13.4496 8.77665C13.0985 8.42554 13.0985 7.85627 13.4496 7.50516L15.5113 5.44344H3.06954L5.13114 7.50504C5.48225 7.85615 5.48225 8.42542 5.13114 8.77653C4.78003 9.12764 4.21076 9.12764 3.85965 8.77653L0.263334 5.18021C-0.087778 4.8291 -0.087778 4.25983 0.263334 3.90872L3.85965 0.312406C4.21076 -0.0387058 4.78003 -0.0387058 5.13114 0.312406Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="10" height="19" viewBox="0 0 10 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M9.52182 14.8114C9.87293 14.4603 9.87293 13.8911 9.52182 13.54C9.17071 13.1888 8.60144 13.1888 8.25033 13.54L6.18885 15.6014L6.18885 3.15999L8.25033 5.22147C8.60144 5.57258 9.17071 5.57258 9.52182 5.22147C9.87293 4.87036 9.87293 4.30109 9.52182 3.94998L5.9255 0.353666C5.57439 0.00255379 5.00513 0.00255378 4.65401 0.353666L1.0577 3.94998C0.706587 4.30109 0.706587 4.87036 1.0577 5.22147C1.40881 5.57258 1.97808 5.57258 2.32919 5.22147L4.3907 3.15996L4.3907 15.6015L2.32919 13.54C1.97808 13.1888 1.40881 13.1888 1.0577 13.54C0.706588 13.8911 0.706588 14.4603 1.0577 14.8114L4.65402 18.4078C5.00513 18.7589 5.57439 18.7589 5.92551 18.4078L9.52182 14.8114Z" fill="white"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function ExpandFilledIcon() {
|
|
2
|
+
return (
|
|
3
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<path
|
|
5
|
+
d="M16.59 8.29492L12 12.8749L7.41 8.29492L6 9.70492L12 15.7049L18 9.70492L16.59 8.29492Z"
|
|
6
|
+
fill="white"
|
|
7
|
+
fill-opacity="0.8"
|
|
8
|
+
/>
|
|
9
|
+
</svg>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export function HomeIcon() {
|
|
2
|
+
return (
|
|
3
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<path
|
|
5
|
+
fill-rule="evenodd"
|
|
6
|
+
clip-rule="evenodd"
|
|
7
|
+
d="M5 22C3.34315 22 2 20.6569 2 19V11.9225C2 10.7074 2.55236 9.55811 3.50122 8.79902L12 2L20.4988 8.79902C21.4476 9.55811 22 10.7074 22 11.9225V19C22 20.6569 20.6569 22 19 22H5ZM20.5 11.9225V19C20.5 19.8284 19.8284 20.5 19 20.5H16V14C16 12.8954 15.1046 12 14 12H10C8.89543 12 8 12.8954 8 14V20.5H5C4.17157 20.5 3.5 19.8284 3.5 19V11.9225C3.5 11.163 3.84522 10.4448 4.43826 9.97033L12 3.92094L19.5617 9.97033C20.1548 10.4448 20.5 11.163 20.5 11.9225Z"
|
|
8
|
+
fill="white"
|
|
9
|
+
/>
|
|
10
|
+
</svg>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function InfoOutlinedIcon() {
|
|
2
|
+
return (
|
|
3
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<path
|
|
5
|
+
d="M11 7H13V9H11V7ZM11 11H13V17H11V11ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20Z"
|
|
6
|
+
fill="white"
|
|
7
|
+
/>
|
|
8
|
+
</svg>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.9991 0.999878L15.4045 4.40529L14.1795 5.6303L12.8653 4.31611V8.16493H11.1329V4.31611L9.88895 5.56007L8.66394 4.33506L11.9991 0.999878ZM11.1329 15.6649H12.8653V19.684L14.1795 18.3699L15.4045 19.5949L11.9991 23.0003L8.59371 19.5949L9.81872 18.3699L11.1329 19.684V15.6649ZM4.31583 11.1337H8.16412V12.8662H4.31583L5.63003 14.1803L4.40502 15.4054L0.999603 11.9999L4.40502 8.59452L5.63003 9.81953L4.31583 11.1337ZM19.6838 12.8662H15.6641V11.1337H19.6838L18.3696 9.81953L19.5946 8.59452L23 11.9999L19.5946 15.4054L18.3696 14.1803L19.6838 12.8662Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.3587 14.2499V15.4937V17.1848H8.04982H12.298H13.9891V15.4937V13.663L10.1958 9.86972L9 8.67391L9.85854 7.81537L10.1958 7.47811L11.0543 6.61956L11.6194 7.18463L12.2502 7.81537L12.8152 8.38043L14.011 7.18463L14.5542 6.64146L15.75 5.44565L14.5542 4.24984L12.2502 1.94581L11.0543 0.75L9.85854 1.94581L3.44581 8.35854L2.25 9.55435L3.44581 10.7502L6.35862 13.663V14.2499H6.3587ZM8.04982 14.2499V15.4937H12.298V14.3635L7.80419 9.86972L6.60839 8.67391L7.80419 7.47811L9.85854 5.42376L9.86612 5.41618L9.32295 4.87301L4.64161 9.55435L7.5545 12.4672L8.04982 12.9626V13.076H10.1738L11.3478 14.2499H8.04982ZM11.0543 4.22795L10.7599 4.52241L10.2167 3.97924L11.0543 3.14161L13.3584 5.44565L12.8152 5.98882L12.2502 5.42376L11.0543 4.22795Z" fill="#38C6F4"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
export function RobotIcon() {
|
|
4
|
+
return (
|
|
5
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
6
|
+
<path
|
|
7
|
+
fill-rule="evenodd"
|
|
8
|
+
clip-rule="evenodd"
|
|
9
|
+
d="M8.47826 18.9999V21.2219V22.913H10.1694H16.961H18.6522V21.2219V18.2174L13.1958 12.761L12 11.5652L13.1958 10.3694L13.5433 10.0219L14.7391 8.82609L15.8911 9.9781L15.9349 10.0219L17.087 11.1739L18.2828 9.9781L19.8042 8.45668L21 7.26087L19.8042 6.06506L15.9349 2.19581L14.7391 1L13.5433 2.19581L4.19581 11.5433L3 12.7391L4.19581 13.9349L8.47817 18.2173V18.9999H8.47826ZM10.1694 18.9999V21.2219H16.961V18.9179L10.8042 12.761L9.60839 11.5652L10.8042 10.3694L13.5433 7.63028L13.5534 7.62018L12.032 6.09875L5.39161 12.7391L9.67407 17.0216L10.0872 17.4347H13.5651L15.1303 18.9999H10.1694ZM18.6084 7.26087L17.093 8.7763L13.2237 4.90705L14.7391 3.39161L18.6084 7.26087Z"
|
|
10
|
+
fill="white"
|
|
11
|
+
/>
|
|
12
|
+
</svg>
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M18.5 12C18.5 8.68629 15.8137 6 12.5 6C9.18629 6 6.5 8.68629 6.5 12C6.5 15.3137 9.18629 18 12.5 18" stroke="white" stroke-width="1.5" stroke-linecap="round" fill="none"/>
|
|
3
|
+
<path d="M16.5 11L18.5 13.5L20.5 11" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
</svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type WBLogoProps = {
|
|
2
|
+
width?: number;
|
|
3
|
+
fillColor?: string;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
export function WBLogoIcon({ width = 21, fillColor = "white" }: WBLogoProps) {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width={`${width}`}
|
|
10
|
+
height={`${1.19 * width}`}
|
|
11
|
+
viewBox="0 0 21 25"
|
|
12
|
+
fill={fillColor}
|
|
13
|
+
style={{ transition: "fill 2s ease" }}
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
>
|
|
16
|
+
<path d="M0 8.25553V14.2168L17.0228 4.47097L14.4197 0L0 8.25553Z" />
|
|
17
|
+
<path d="M9.70299 11.6758L0 17.2112V23.1846L9.70299 17.6492V11.6758Z" />
|
|
18
|
+
<path d="M11.8886 19.4131L2.22571 24.993H15.5035V19.4131H11.8886Z" />
|
|
19
|
+
</svg>
|
|
20
|
+
);
|
|
21
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./components/robots/SupportedRobot"
|
|
2
|
+
export * from "./components/robots/AxisConfig"
|
|
3
|
+
export * from "./components/3d-viewport/PresetEnvironment"
|
|
4
|
+
export * from "./components/3d-viewport/SafetyZonesRenderer"
|
|
5
|
+
export * from "./components/jogging/JoggingCartesianAxisControl"
|
|
6
|
+
export * from "./components/jogging/JoggingJointRotationControl"
|
|
7
|
+
export * from "./components/jogging/JoggingPanel"
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { ReactNode, useEffect, useState } from "react";
|
|
2
|
+
|
|
3
|
+
export function ColorSection(props: { name: string; children: ReactNode }) {
|
|
4
|
+
return (
|
|
5
|
+
<>
|
|
6
|
+
<h2>{props.name}</h2>
|
|
7
|
+
<div
|
|
8
|
+
style={{
|
|
9
|
+
display: "grid",
|
|
10
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
|
|
11
|
+
gap: "20px",
|
|
12
|
+
}}
|
|
13
|
+
>
|
|
14
|
+
{props.children}
|
|
15
|
+
</div>
|
|
16
|
+
</>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function Color({ name, color }: { name: string; color: string }) {
|
|
21
|
+
const [showCopied, setShowCopied] = useState(false);
|
|
22
|
+
|
|
23
|
+
function handleClick(value: string) {
|
|
24
|
+
if (!navigator.clipboard) {
|
|
25
|
+
console.error("can't send value to clipboard");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
navigator.clipboard.writeText(value);
|
|
29
|
+
setShowCopied(true);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
if (showCopied) {
|
|
34
|
+
setTimeout(() => {
|
|
35
|
+
setShowCopied(false);
|
|
36
|
+
}, 2000);
|
|
37
|
+
}
|
|
38
|
+
}, [showCopied]);
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<li
|
|
42
|
+
onClick={() => handleClick(color)}
|
|
43
|
+
style={{
|
|
44
|
+
borderRadius: "5px",
|
|
45
|
+
border: "1px solid lightgray",
|
|
46
|
+
padding: "5px",
|
|
47
|
+
listStyleType: "none",
|
|
48
|
+
width: "200px",
|
|
49
|
+
}}
|
|
50
|
+
>
|
|
51
|
+
<span
|
|
52
|
+
style={{
|
|
53
|
+
backgroundColor: color,
|
|
54
|
+
display: "block",
|
|
55
|
+
height: "4em",
|
|
56
|
+
marginBottom: "0.3em",
|
|
57
|
+
borderRadius: "5px",
|
|
58
|
+
// border: "1px solid lightgray",
|
|
59
|
+
}}
|
|
60
|
+
/>
|
|
61
|
+
<span>{name}</span>
|
|
62
|
+
<br />
|
|
63
|
+
<span
|
|
64
|
+
style={{
|
|
65
|
+
color: "gray",
|
|
66
|
+
fontSize: "0.9em",
|
|
67
|
+
fontFamily: "monospace",
|
|
68
|
+
}}
|
|
69
|
+
>
|
|
70
|
+
{showCopied ? "Copied ✔︎" : color}
|
|
71
|
+
</span>
|
|
72
|
+
</li>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { ThemeOptions } from '@mui/material/styles';
|
|
2
|
+
import { wbTheme } from './wbTheme';
|
|
3
|
+
|
|
4
|
+
// TODO: Is all of this theme name foo actually necessary?
|
|
5
|
+
|
|
6
|
+
type ThemeName = 'wandelbots'
|
|
7
|
+
|
|
8
|
+
export const allThemes = {
|
|
9
|
+
wb: wbTheme,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface NamedThemeOptions extends ThemeOptions {
|
|
13
|
+
name: ThemeName
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare module '@mui/material/styles' {
|
|
17
|
+
interface Theme {
|
|
18
|
+
backgrounds: {
|
|
19
|
+
light1: string,
|
|
20
|
+
light2: string,
|
|
21
|
+
medium: string,
|
|
22
|
+
dark1: string,
|
|
23
|
+
dark2: string,
|
|
24
|
+
}
|
|
25
|
+
buttonPrimary: {
|
|
26
|
+
background: string;
|
|
27
|
+
text: string;
|
|
28
|
+
}
|
|
29
|
+
buttonSecondary: {
|
|
30
|
+
background: string;
|
|
31
|
+
text: string;
|
|
32
|
+
}
|
|
33
|
+
buttonBack: {
|
|
34
|
+
background: string;
|
|
35
|
+
text: string;
|
|
36
|
+
}
|
|
37
|
+
inputField: {
|
|
38
|
+
background: string;
|
|
39
|
+
text: string;
|
|
40
|
+
unitBackground: string;
|
|
41
|
+
unitText: string;
|
|
42
|
+
}
|
|
43
|
+
sidebar: {
|
|
44
|
+
background: string;
|
|
45
|
+
backgroundSelected: string;
|
|
46
|
+
selected: string;
|
|
47
|
+
}
|
|
48
|
+
actionPanel: {
|
|
49
|
+
background: string;
|
|
50
|
+
backgroundSelected: string;
|
|
51
|
+
text: string;
|
|
52
|
+
}
|
|
53
|
+
controlPanel: {
|
|
54
|
+
background: string;
|
|
55
|
+
text: string;
|
|
56
|
+
}
|
|
57
|
+
listItem: {
|
|
58
|
+
background: string;
|
|
59
|
+
backgroundSelected: string;
|
|
60
|
+
textTitle: string;
|
|
61
|
+
textTitleSelected: string;
|
|
62
|
+
textDesc: string;
|
|
63
|
+
textDescSelected: string;
|
|
64
|
+
}
|
|
65
|
+
breadcrumb: {
|
|
66
|
+
background: string;
|
|
67
|
+
text: string
|
|
68
|
+
textSelected: string;
|
|
69
|
+
}
|
|
70
|
+
axes: {
|
|
71
|
+
x: string;
|
|
72
|
+
y: string;
|
|
73
|
+
z: string;
|
|
74
|
+
};
|
|
75
|
+
viewport: {
|
|
76
|
+
background: string;
|
|
77
|
+
controlBackground: string;
|
|
78
|
+
};
|
|
79
|
+
tabIcon: {
|
|
80
|
+
color: string;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
interface ThemeOptions {
|
|
85
|
+
backgrounds?: {
|
|
86
|
+
light1?: string,
|
|
87
|
+
light2?: string,
|
|
88
|
+
medium?: string,
|
|
89
|
+
dark1?: string,
|
|
90
|
+
dark2?: string,
|
|
91
|
+
}
|
|
92
|
+
buttonPrimary?: {
|
|
93
|
+
background?: string;
|
|
94
|
+
text?: string;
|
|
95
|
+
}
|
|
96
|
+
buttonSecondary?: {
|
|
97
|
+
background?: string;
|
|
98
|
+
text?: string;
|
|
99
|
+
}
|
|
100
|
+
buttonBack?: {
|
|
101
|
+
background?: string;
|
|
102
|
+
text?: string;
|
|
103
|
+
}
|
|
104
|
+
inputField?: {
|
|
105
|
+
background?: string;
|
|
106
|
+
text?: string;
|
|
107
|
+
unitBackground?: string;
|
|
108
|
+
unitText?: string;
|
|
109
|
+
}
|
|
110
|
+
sidebar?: {
|
|
111
|
+
background?: string;
|
|
112
|
+
backgroundSelected?: string;
|
|
113
|
+
selected?: string;
|
|
114
|
+
}
|
|
115
|
+
actionPanel?: {
|
|
116
|
+
background?: string;
|
|
117
|
+
backgroundSelected?: string;
|
|
118
|
+
text?: string;
|
|
119
|
+
}
|
|
120
|
+
controlPanel?: {
|
|
121
|
+
background?: string;
|
|
122
|
+
text?: string;
|
|
123
|
+
}
|
|
124
|
+
listItem?: {
|
|
125
|
+
background?: string;
|
|
126
|
+
backgroundSelected?: string;
|
|
127
|
+
textTitle?: string;
|
|
128
|
+
textTitleSelected?: string;
|
|
129
|
+
textDesc?: string;
|
|
130
|
+
textDescSelected?: string;
|
|
131
|
+
}
|
|
132
|
+
breadcrumb?: {
|
|
133
|
+
background?: string;
|
|
134
|
+
text?: string
|
|
135
|
+
textSelected?: string;
|
|
136
|
+
}
|
|
137
|
+
axes?: {
|
|
138
|
+
x?: string;
|
|
139
|
+
y?: string;
|
|
140
|
+
z?: string;
|
|
141
|
+
};
|
|
142
|
+
viewport?: {
|
|
143
|
+
background?: string;
|
|
144
|
+
controlBackground?: string;
|
|
145
|
+
};
|
|
146
|
+
tabIcon?: {
|
|
147
|
+
color?: string;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { wbTheme } from "./wbTheme";
|
|
2
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { Color, ColorSection } from "./color";
|
|
4
|
+
|
|
5
|
+
const ColorPalette = () => {
|
|
6
|
+
return (
|
|
7
|
+
<div
|
|
8
|
+
style={{
|
|
9
|
+
fontFamily: "sans-serif",
|
|
10
|
+
}}
|
|
11
|
+
>
|
|
12
|
+
<ColorSection name="Palette">
|
|
13
|
+
<Color name="Primary" color={wbTheme.palette.primary.main} />
|
|
14
|
+
<Color name="Secondary" color={wbTheme.palette.secondary.main} />
|
|
15
|
+
<Color name="Background" color={wbTheme.palette.background.default} />
|
|
16
|
+
</ColorSection>
|
|
17
|
+
<ColorSection name="Text">
|
|
18
|
+
<Color name="Primary" color={wbTheme.palette.text.primary} />
|
|
19
|
+
<Color name="Secondary" color={wbTheme.palette.text.secondary} />
|
|
20
|
+
</ColorSection>
|
|
21
|
+
<ColorSection name="Button">
|
|
22
|
+
<Color
|
|
23
|
+
name="Primary Background"
|
|
24
|
+
color={wbTheme.buttonPrimary.background}
|
|
25
|
+
/>
|
|
26
|
+
<Color name="Primary Text" color={wbTheme.buttonPrimary.text} />
|
|
27
|
+
<Color
|
|
28
|
+
name="Secondary Background"
|
|
29
|
+
color={wbTheme.buttonSecondary.background}
|
|
30
|
+
/>
|
|
31
|
+
<Color name="Secondary Text" color={wbTheme.buttonSecondary.text} />
|
|
32
|
+
<Color name="Back Background" color={wbTheme.buttonBack.background} />
|
|
33
|
+
<Color name="Back Text" color={wbTheme.buttonBack.text} />
|
|
34
|
+
</ColorSection>
|
|
35
|
+
<ColorSection name="Input Field">
|
|
36
|
+
<Color name="Background" color={wbTheme.inputField.background} />
|
|
37
|
+
<Color name="Text" color={wbTheme.inputField.text} />
|
|
38
|
+
<Color
|
|
39
|
+
name="Unit Background"
|
|
40
|
+
color={wbTheme.inputField.unitBackground}
|
|
41
|
+
/>
|
|
42
|
+
<Color name="Unit Text" color={wbTheme.inputField.unitText} />
|
|
43
|
+
</ColorSection>
|
|
44
|
+
<ColorSection name="Sidebar">
|
|
45
|
+
<Color name="Background" color={wbTheme.sidebar.background} />
|
|
46
|
+
<Color
|
|
47
|
+
name="Background Selected"
|
|
48
|
+
color={wbTheme.sidebar.backgroundSelected}
|
|
49
|
+
/>
|
|
50
|
+
<Color name="Selected" color={wbTheme.sidebar.selected} />
|
|
51
|
+
</ColorSection>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const meta: Meta<typeof ColorPalette> = {
|
|
57
|
+
component: ColorPalette,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default meta;
|
|
61
|
+
|
|
62
|
+
type Story = StoryObj<typeof ColorPalette>;
|
|
63
|
+
|
|
64
|
+
export const colorPalette: Story = {};
|