diff --git a/webapp/src/components/AutomationEditor/AutoInfoBox.css b/webapp/src/components/AutomationEditor/AutoInfoBox.css index 4869600..5c57cff 100644 --- a/webapp/src/components/AutomationEditor/AutoInfoBox.css +++ b/webapp/src/components/AutomationEditor/AutoInfoBox.css @@ -28,7 +28,7 @@ .automation-editor--info-box--tags { padding: 0.25em 0.75em 1em 0.75em; - border-color: var(--primary-accent); + border-color: var(--mui-grey-400); border-width: 1px; border-style: ridge; border-radius: 5px; diff --git a/webapp/src/components/AutomationEditor/index.css b/webapp/src/components/AutomationEditor/index.css index b412e4e..0074378 100644 --- a/webapp/src/components/AutomationEditor/index.css +++ b/webapp/src/components/AutomationEditor/index.css @@ -34,8 +34,8 @@ } .automation-editor--flow-wrapper.changed>.automation-editor--flow-wrapper--toolbar * { - border-color: var(--change); - color: var(--change) + border-color: var(--mui-success-light); + color: var(--mui-success-light) } @@ -47,12 +47,12 @@ } .automation-editor--flow-wrapper.changed>.automation-editor--flow-wrapper--flow { - border-color: var(--change); + border-color: var(--mui-success-light); } .automation-editor--flow-wrapper--flow { flex: 1; - border: 1px solid var(--secondary-accent); + border: 1px solid var(--mui-grey-700); margin: 0 0 0.5em 0; z-index: 1; } diff --git a/webapp/src/components/AutomationList/AutomationListBox.css b/webapp/src/components/AutomationList/AutomationListBox.css index 9cc0612..4c07559 100644 --- a/webapp/src/components/AutomationList/AutomationListBox.css +++ b/webapp/src/components/AutomationList/AutomationListBox.css @@ -25,15 +25,15 @@ padding-bottom: 0.5em; border-width: 1px; border-bottom-style: solid; - border-color: var(--primary-accent); + border-color: var(--mui-grey-400); } .automation-list-box--body--group.other { - border-color: var(--green); + border-color: var(--mui-success-main); } .automation-list-box--body--group.other>b { - color: var(--change); + color: var(--mui-success-light); } .automation-list-box--body--group>.automation-list-box--body--group { @@ -51,8 +51,8 @@ .automation-list-box--body--group>b:hover, .automation-list-box--body--group.selected>b { - background-color: var(--secondary-accent); - color: var(--secondary); + background-color: var(--mui-grey-700); + color: var(--mui-secondary-contrastText); } @@ -67,6 +67,6 @@ .automation-list-box--bottom>button { background-color: #070; - color: var(--primary-accent); + color: var(--mui-grey-400); padding: 0.5em 2em; } \ No newline at end of file diff --git a/webapp/src/components/AutomationList/AutomationListBoxGroup.css b/webapp/src/components/AutomationList/AutomationListBoxGroup.css index 759f2ca..2764080 100644 --- a/webapp/src/components/AutomationList/AutomationListBoxGroup.css +++ b/webapp/src/components/AutomationList/AutomationListBoxGroup.css @@ -1,18 +1,18 @@ .automation-list-box--body--item:hover, .automation-list-box--body--item.selected { - outline-color: var(--primary-accent); + outline-color: var(--mui-grey-400); outline-style: solid; outline-width: 1px; - background-color: var(--secondary); + background-color: var(--mui-secondary-contrastText); } .automation-list-box--body--item:hover>.automation-list-box--body--item--tags>span { - border-color: var(--primary); + border-color: var(--mui-common-black); } .automation-list-box--body--item--tags--add:hover { - border-color: var(--primary); - color: var(--primary-accent); - background-color: var(--secondary); + border-color: var(--mui-common-black); + color: var(--mui-grey-400); + background-color: var(--mui-secondary-contrastText); } .automation-list-box--body--item { @@ -42,9 +42,9 @@ } .automation-list-box--body--item--buttons .save { - color: var(--green-light) + color: var(--mui-success-light) } .automation-list-box--body--item--buttons .save:hover { - color: var(--green) + color: var(--mui-success-main) } \ No newline at end of file diff --git a/webapp/src/components/AutomationList/AutomationMetadataBox.css b/webapp/src/components/AutomationList/AutomationMetadataBox.css index 4f76f31..47844d9 100644 --- a/webapp/src/components/AutomationList/AutomationMetadataBox.css +++ b/webapp/src/components/AutomationList/AutomationMetadataBox.css @@ -27,7 +27,7 @@ } .automation-list-box--body--item--tags>span { - border-color: var(--primary-accent); + border-color: var(--mui-grey-400); border-style: solid; border-width: 1px; border-radius: 0.5em; @@ -63,7 +63,7 @@ padding: 0; min-width: 6em; max-width: 10em; - background-color: var(--primary); + background-color: var(--mui-common-black); } .automation-list-box--body--item--tags--item>.text .icon { @@ -74,10 +74,10 @@ } .automation-list-box--body--item--tags--item>.text .icon:hover { - background-color: var(--primary-accent); + background-color: var(--mui-grey-400); border-radius: 20px; } .automation-list-box--body--item--tags--item>.text .icon:hover svg { - fill: var(--primary); + fill: var(--mui-common-black); } \ No newline at end of file diff --git a/webapp/src/components/AutomationList/index.mobile.css b/webapp/src/components/AutomationList/index.mobile.css index eb76370..79e34d1 100644 --- a/webapp/src/components/AutomationList/index.mobile.css +++ b/webapp/src/components/AutomationList/index.mobile.css @@ -35,7 +35,7 @@ .automation-list--root.mobile .automation-editor--info-box--icon { left: 0.5em; bottom: 0em; - background-color: var(--primary); + background-color: var(--mui-common-black); transform: rotate(90deg); } diff --git a/webapp/src/components/ConditionEditor/ConditionNodeBase.css b/webapp/src/components/ConditionEditor/ConditionNodeBase.css index 6c1b332..f00732a 100644 --- a/webapp/src/components/ConditionEditor/ConditionNodeBase.css +++ b/webapp/src/components/ConditionEditor/ConditionNodeBase.css @@ -23,8 +23,8 @@ justify-content: center; min-height: calc(100% - 1px); max-height: calc(100% - 1px); - background-color: var(--secondary); - border-color: var(--secondary-accent); + background-color: var(--mui-secondary-contrastText); + border-color: var(--mui-grey-700); border-bottom-style: solid; border-width: 1px; } @@ -49,7 +49,7 @@ .condition-node-base.is-edited>.condition-node-base--body { max-height: calc(100%-2px-1em); max-width: calc(100vw-2px-1em); - border-color: var(--green); + border-color: var(--mui-success-main); border-style: solid; border-width: 1px; margin: 0.25em; @@ -62,5 +62,5 @@ justify-content: center; align-items: center; padding: 0.5em; - background-color: var(--secondary); + background-color: var(--mui-secondary-contrastText); } \ No newline at end of file diff --git a/webapp/src/components/ConditionEditor/ConditionNodeSettings.css b/webapp/src/components/ConditionEditor/ConditionNodeSettings.css index 81a65f0..3e630db 100644 --- a/webapp/src/components/ConditionEditor/ConditionNodeSettings.css +++ b/webapp/src/components/ConditionEditor/ConditionNodeSettings.css @@ -39,5 +39,5 @@ } .condition-node--settings .speed-dial--button:hover button { - background-color: var(--secondary-accent); + background-color: var(--mui-grey-700); } \ No newline at end of file diff --git a/webapp/src/components/DAGFlow/DAGErrorNode.css b/webapp/src/components/DAGFlow/DAGErrorNode.css index db64078..b5848b4 100644 --- a/webapp/src/components/DAGFlow/DAGErrorNode.css +++ b/webapp/src/components/DAGFlow/DAGErrorNode.css @@ -23,7 +23,7 @@ gap: 0.5em; /* shape */ - background-color: var(--error-dark); + background-color: var(--mui-error-dark); border-radius: 1em; height: 100%; max-height: 100%; @@ -34,18 +34,18 @@ border-top-style: solid; border-top-left-radius: 10px; border-top-right-radius: 10px; - border-top-color: var(--error); + border-top-color: var(--mui-error-main); } .dagnode-error--inner:hover { - background-color: var(--error-accent); + background-color: var(--mui-error-contrastText); cursor: default; } .dagnode-error--inner--edit-icon:hover { transform: rotate(180deg); cursor: pointer; - background-color: var(--error); + background-color: var(--mui-error-main); padding: 0.5em; border-radius: 10px; height: 0.25em; diff --git a/webapp/src/components/DAGFlow/DAGErrorNode.tsx b/webapp/src/components/DAGFlow/DAGErrorNode.tsx index 8c15602..e0807dd 100644 --- a/webapp/src/components/DAGFlow/DAGErrorNode.tsx +++ b/webapp/src/components/DAGFlow/DAGErrorNode.tsx @@ -1,34 +1,56 @@ import "./DAGErrorNode.css"; -import { Handle, Position } from 'react-flow-renderer'; -import { FC } from 'react'; -import { InfoIcon, PencilIcon } from 'components/Icons'; +import { Handle, Position } from "react-flow-renderer"; +import { FC } from "react"; +import { InfoIcon, PencilIcon } from "components/Icons"; export interface DAGErrorNodeProps { height: number; width: number; flipped: boolean; hasInput?: boolean; - error?: any, + error?: any; onEdit: () => void; } export const DAGErrorNode: FC = ({ - height, width, hasInput, error, onEdit, flipped + height, + width, + hasInput, + error, + onEdit, + flipped, }) => { // render - return <> - {hasInput && } - -
-
- - Invalid Node - + return ( + <> + {hasInput && ( + + )} + +
+
+ + Invalid Node + +
-
- -} + + ); +}; diff --git a/webapp/src/components/DAGFlow/DAGNode.css b/webapp/src/components/DAGFlow/DAGNode.css index 3362717..6c32f28 100644 --- a/webapp/src/components/DAGFlow/DAGNode.css +++ b/webapp/src/components/DAGFlow/DAGNode.css @@ -48,16 +48,16 @@ position: absolute; top: -1em; left: -1em; - background-color: var(--primary); - border-color: var(--primary-accent); + background-color: var(--mui-common-black); + border-color: var(--mui-grey-400); border-style: solid; border-width: 0.5px; border-radius: 20px; } .open>.dagnode--actions-btn, .dagnode--actions-btn:hover { - color: var(--primary); - background-color: var(--primary-accent); + color: var(--mui-common-black); + background-color: var(--mui-grey-400); border-radius: 20px; } diff --git a/webapp/src/components/Inputs/InputYaml.css b/webapp/src/components/Inputs/InputYaml.css index 974124f..7c2266f 100644 --- a/webapp/src/components/Inputs/InputYaml.css +++ b/webapp/src/components/Inputs/InputYaml.css @@ -33,7 +33,7 @@ position: absolute; left: 2em; top: 2.5em; - color: var(--primary-accent); + color: var(--mui-grey-400); } .input-yaml .MuiButtonBase-root.icon-button[type="button"].icon-button { diff --git a/webapp/src/components/Inputs/extras-SearchItem.stories.tsx b/webapp/src/components/Inputs/extras-SearchItem.stories.tsx index 4261519..2563b0d 100644 --- a/webapp/src/components/Inputs/extras-SearchItem.stories.tsx +++ b/webapp/src/components/Inputs/extras-SearchItem.stories.tsx @@ -17,7 +17,7 @@ const Template: ComponentStory = (args) => { style={{ width: "15em", height: "3em", - border: "1px solid var(--primary-accent)", + border: "1px solid var(--mui-grey-400)", }} > diff --git a/webapp/src/components/NodeEditor/OptionManager/index.tsx b/webapp/src/components/NodeEditor/OptionManager/index.tsx index 7a5df23..f828662 100644 --- a/webapp/src/components/NodeEditor/OptionManager/index.tsx +++ b/webapp/src/components/NodeEditor/OptionManager/index.tsx @@ -235,7 +235,7 @@ const computeInvalidYaml = ( node, isErrored: true, invalidManualYaml: ( -
    +
      {errors.map(({ message, path }, i) => (
    • {path}: {message} diff --git a/webapp/src/components/NodeEditor/index.css b/webapp/src/components/NodeEditor/index.css index 951beb6..5d0ebcc 100644 --- a/webapp/src/components/NodeEditor/index.css +++ b/webapp/src/components/NodeEditor/index.css @@ -9,24 +9,24 @@ } .node-editor--root.disabled { - background-color: var(--secondary); + background-color: var(--mui-secondary-contrastText); } .node-editor--root.disabled .enabled-flag { - color: var(--secondary-accent); + color: var(--mui-grey-700); } .node-editor--root.modded { - border: 1px solid var(--change); + border: 1px solid var(--mui-success-light); border-radius: 5px; } .node-editor--root.modded * { - border-color: var(--change); + border-color: var(--mui-success-light); } .node-editor--root.not-ready .node-editor--footer--save { - color: var(--error) + color: var(--mui-error-main) } .node-editor--body-title { @@ -67,7 +67,7 @@ min-width: 25vw; } -.node-editor--error { +.node-editor--mui-error-main { max-width: 30em; overflow: auto; max-height: 10em; @@ -78,7 +78,7 @@ margin: 0; } -.node-editor--error>li { +.node-editor--mui-error-main>li { text-align: left; } diff --git a/webapp/src/components/Page/index.css b/webapp/src/components/Page/index.css index c208851..d956ed1 100644 --- a/webapp/src/components/Page/index.css +++ b/webapp/src/components/Page/index.css @@ -11,8 +11,8 @@ /* font */ font-size: 16px; font-family: Tahoma, Geneva, sans-serif; - /* color : var(--primary-accent); */ + /* color : var(--mui-grey-400); */ /* background */ - /* background-color: var(--primary); */ + /* background-color: var(--mui-common-black); */ } \ No newline at end of file diff --git a/webapp/src/components/ServiceEditor/index.css b/webapp/src/components/ServiceEditor/index.css index 7d78c81..a6b0224 100644 --- a/webapp/src/components/ServiceEditor/index.css +++ b/webapp/src/components/ServiceEditor/index.css @@ -3,11 +3,11 @@ flex-direction: column; padding: 0.5em 0.25em; margin: 0.5em 0.25em; - border-color: var(--primary-accent); + border-color: var(--mui-grey-400); border-width: 1px; border-style: solid; border-radius: 5px; - background-color: var(--secondary); + background-color: var(--mui-secondary-contrastText); } .service-editor hr { diff --git a/webapp/src/components/SpeedDial/index.css b/webapp/src/components/SpeedDial/index.css index 87df20f..296166e 100644 --- a/webapp/src/components/SpeedDial/index.css +++ b/webapp/src/components/SpeedDial/index.css @@ -23,7 +23,7 @@ .speed-dial--list { position: absolute; - background: var(--secondary); + background: var(--mui-secondary-contrastText); z-index: 10; height: fit-content; padding: 0.1em; diff --git a/webapp/src/haService/services.stories.tsx b/webapp/src/haService/services.stories.tsx index 4548e69..43ab013 100644 --- a/webapp/src/haService/services.stories.tsx +++ b/webapp/src/haService/services.stories.tsx @@ -108,7 +108,7 @@ const Test: FC = () => { serviceEditElm = (
      > = C extends Context ? T : unknown; -export type ClassNamesOfStyle any> = Record, string>; +export type GetThemeType> = C extends Context + ? T + : unknown; +export type ClassNamesOfStyle any> = Record< + keyof ReturnType, + string +>; export type AppTheme = GetThemeType; -export const createAppUseStyles = < - Props extends {} = {}, - C extends string = string, - >(f: (theme: AppTheme) => Styles) => (props: Props): { - classes: Classes>, - theme: AppTheme, - } => { - const theme = useTheme(); - const useStyles = createUseStyles(f as any) - const classes = useStyles({ ...props, theme }) as Classes>; - return { classes, theme }; - } +export const createAppUseStyles = + ( + f: (theme: AppTheme) => Styles + ) => + ( + props: Props + ): { + classes: Classes>; + theme: AppTheme; + } => { + const theme = useTheme(); + const useStyles = createUseStyles(f as any); + const classes = useStyles({ ...props, theme }) as Classes< + keyof Styles + >; + return { classes, theme }; + };