diff --git a/invokeai/frontend/web/src/common/components/InvControl/InvControl.tsx b/invokeai/frontend/web/src/common/components/InvControl/InvControl.tsx
index 499b1b25ae..2b451ae61f 100644
--- a/invokeai/frontend/web/src/common/components/InvControl/InvControl.tsx
+++ b/invokeai/frontend/web/src/common/components/InvControl/InvControl.tsx
@@ -6,7 +6,7 @@ import {
forwardRef,
} from '@chakra-ui/react';
import { InvControlGroupContext } from 'common/components/InvControl/InvControlGroup';
-import { memo, useContext } from 'react';
+import { memo, useContext, useMemo } from 'react';
import { InvLabel } from './InvLabel';
import type { InvControlProps } from './types';
@@ -18,9 +18,9 @@ export const InvControl = memo(
children,
helperText,
feature,
- orientation,
+ orientation: _orientation,
renderInfoPopoverInPortal = true,
- isDisabled,
+ isDisabled: _isDisabled,
labelProps,
label,
error,
@@ -29,15 +29,24 @@ export const InvControl = memo(
const ctx = useContext(InvControlGroupContext);
+ const orientation = useMemo(
+ () => _orientation ?? ctx.orientation,
+ [_orientation, ctx.orientation]
+ );
+
+ const isDisabled = useMemo(
+ () => _isDisabled ?? ctx.isDisabled,
+ [_isDisabled, ctx.isDisabled]
+ );
+
return (
-
+
{label && (
{error}}
);
-
- return (
-
- {label && (
-
- {label}
-
- )}
- {children}
-
- );
}
)
);
diff --git a/invokeai/frontend/web/src/common/components/InvControl/theme.ts b/invokeai/frontend/web/src/common/components/InvControl/theme.ts
index c1347e827a..344c75b038 100644
--- a/invokeai/frontend/web/src/common/components/InvControl/theme.ts
+++ b/invokeai/frontend/web/src/common/components/InvControl/theme.ts
@@ -13,29 +13,22 @@ const {
defineMultiStyleConfig: defineFormMultiStyleConfig,
} = createMultiStyleConfigHelpers(formParts.keys);
-const formBaseStyle = defineFormPartsStyle((props) => {
- return {
- container: {
+const formBaseStyle = defineFormPartsStyle((props) => ({
+ container: {
+ flexDirection: 'column',
+ alignItems: 'flex-start',
+ gap: 4,
+ h: 'unset',
+ '> .invcontrol-label-input-wrapper': {
display: 'flex',
flexDirection: props.orientation === 'vertical' ? 'column' : 'row',
alignItems: props.orientation === 'vertical' ? 'flex-start' : 'center',
gap: props.orientation === 'vertical' ? 2 : 4,
- },
- };
-});
-
-const withHelperText = defineFormPartsStyle(() => ({
- container: {
- flexDirection: 'column',
- gap: 0,
- h: 'unset',
- '> div': {
- display: 'flex',
- flexDirection: 'row',
- alignItems: 'center',
- gap: 4,
- h: 8,
+ minH: 8,
w: 'full',
+ _invalid: {
+ color: 'error.300',
+ },
},
},
helperText: {
@@ -48,9 +41,6 @@ const withHelperText = defineFormPartsStyle(() => ({
export const formTheme = defineFormMultiStyleConfig({
baseStyle: formBaseStyle,
- variants: {
- withHelperText,
- },
});
const formLabelBaseStyle = defineStyle(() => {
@@ -65,6 +55,8 @@ const formLabelBaseStyle = defineStyle(() => {
transitionDuration: 'normal',
whiteSpace: 'nowrap',
userSelect: 'none',
+ h: 'full',
+ alignItems: 'center',
_disabled: {
opacity: 0.4,
},
diff --git a/invokeai/frontend/web/src/common/components/InvEditable/theme.ts b/invokeai/frontend/web/src/common/components/InvEditable/theme.ts
index 241b939332..537a606919 100644
--- a/invokeai/frontend/web/src/common/components/InvEditable/theme.ts
+++ b/invokeai/frontend/web/src/common/components/InvEditable/theme.ts
@@ -8,17 +8,20 @@ const { definePartsStyle, defineMultiStyleConfig } =
createMultiStyleConfigHelpers(parts.keys);
const baseStylePreview = defineStyle({
- fontSize: 'md',
+ fontSize: 'sm',
borderRadius: 'md',
py: '1',
transitionProperty: 'common',
transitionDuration: 'normal',
color: 'base.100',
+ _invalid: {
+ color: 'error.300'
+ }
});
const baseStyleInput = defineStyle(() => ({
color: 'base.100',
- fontSize: 'md',
+ fontSize: 'sm',
borderRadius: 'md',
py: '1',
transitionProperty: 'common',
diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/EditableFieldTitle.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/EditableFieldTitle.tsx
index 0302ab968c..84f6cc9803 100644
--- a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/EditableFieldTitle.tsx
+++ b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/EditableFieldTitle.tsx
@@ -77,7 +77,11 @@ const EditableFieldTitle = forwardRef((props: Props, ref) => {
}
openDelay={HANDLE_TOOLTIP_OPEN_DELAY}
>
- {
gap={1}
h="full"
>
-
-
-
-
-
-
+
+
+
+
);
});
diff --git a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/InputField.tsx b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/InputField.tsx
index c15c7f0696..213253b167 100644
--- a/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/InputField.tsx
+++ b/invokeai/frontend/web/src/features/nodes/components/flow/nodes/Invocation/fields/InputField.tsx
@@ -79,38 +79,49 @@ const InputField = ({ nodeId, fieldName }: Props) => {
);
}
+ if (fieldTemplate.input === 'connection') {
+ return (
+
+
+
+
+
+
+
+ );
+ }
+
return (
{(ref) => (
-
-
-
+
)}