Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.
TypeScript ai-artartificial-intelligencegenerative-artimage-generationimg2imginpaintinglatent-diffusionlinuxmacosoutpaintingstable-diffusiontxt2imgwindows
refactor(ui): adopt shared controls
joshistoast89d80a258d11
diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardSelect.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardSelect.tsxindex 81ce62da5a..8fa2f7ccae 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardSelect.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryBoardSelect.tsx@@ -505,7 +505,8 @@ const BoardRow = ({return (<Menu.Itemref={setNodeRef}- bg={isOver ? 'accent.subtle' : undefined}+ // DropZone tokens without the DropZone component: an outline (not a border) so the drop affordance never shifts menu layout.+ bg={isOver ? 'accent.muted' : undefined}css={hoverCss}outline={canDropImages ? '1px dashed' : undefined}outlineColor={canDropImages ? 'accent.solid' : undefined}diff --git a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsxindex 354d32a48e..9b942ba735 100644--- a/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx+++ b/invokeai/frontend/webv2/src/features/gallery/ui/GalleryImageGrid.tsx@@ -5,7 +5,7 @@ import { Badge, Box, Flex, ProgressCircle, ScrollArea, Skeleton, Spinner, Text }import { useDraggable } from '@dnd-kit/core';import { CSS } from '@dnd-kit/utilities';import { useQueueItemProgress, useQueueItemProgressImage } from '@features/queue/react';-import { IconButton } from '@platform/ui';+import { DropZone, IconButton } from '@platform/ui';import { StreamingImageFrame } from '@platform/ui/streaming-image/StreamingImageFrame';import { progressImageToStreamingSource } from '@platform/ui/streaming-image/streamingImageSource';import { StarIcon, UploadIcon } from 'lucide-react';@@ -493,26 +493,24 @@ export const GalleryImageGrid = ({ layout }: { layout: 'stacked' | 'wide' }) =></ScrollArea.Root>)}{isDropActive && (- <Flex- align="center"- bg="bg.muted/80"- borderColor="accent.solid"- borderStyle="dashed"- borderWidth="2px"- direction="column"+ <DropZone+ alignItems="center"+ display="flex"+ flexDirection="column"gap="2"inset="0"- justify="center"+ isOver+ justifyContent="center"pointerEvents="none"position="absolute"- rounded="md"+ variant="overlay"zIndex="1"><UploadIcon size="20" /><Text fontSize="xs" fontWeight="600">{t('widgets.gallery.dropImagesToUploadToBoard', { name: selectedBoardName })}</Text>- </Flex>+ </DropZone>)}<ImageContextMenuactions={imageActions}diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsxindex 3c13a34f95..baca2d16b9 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/fields/WorkflowFieldInput.tsx@@ -1,11 +1,11 @@import type { ModelConfig, ModelTaxonomyType } from '@features/models/react';import type { FieldInputTemplate } from '@features/workflow/contracts';-import { HStack, Input, NativeSelect, Switch, Text } from '@chakra-ui/react';+import { createListCollection, HStack, Input, Switch, Text } from '@chakra-ui/react';import { galleryDestinations, type GalleryBoard, type GeneratedImageContract } from '@features/gallery';import { SCHEDULER_OPTIONS } from '@features/generation/settings';import { useWorkflowProjectSelector } from '@features/workflow/ui/WorkflowUiContext';-import { Button, Combobox, ResizableTextarea } from '@platform/ui';+import { Button, Combobox, ResizableTextarea, Select } from '@platform/ui';import { lazy, Suspense, useCallback, useEffect, useMemo, useState, type ChangeEvent } from 'react';const ModelSelect = lazy(() => import('@features/models/react').then((module) => ({ default: module.ModelSelect })));@@ -144,6 +144,8 @@ const BooleanInput = ({ id, invalid, onChange, template, value }: WorkflowFieldI);};+const SELECT_VALUE_TEXT_PROPS = { placeholder: 'Select…' };+const SelectInput = ({id,invalid,@@ -159,31 +161,36 @@ const SelectInput = ({title: string;value: unknown;}) => {- const selectedValue = typeof value === 'string' ? value : '';- const onSelectChange = useCallback(- (event: ChangeEvent<HTMLSelectElement>) => onChange(event.currentTarget.value),+ const collection = useMemo(() => createListCollection({ items: options }), [options]);+ const selectedValue = useMemo(+ () => (typeof value === 'string' && options.some((option) => option.value === value) ? [value] : []),+ [options, value]+ );+ const selectIds = useMemo(() => (id ? { trigger: `${id}-select` } : undefined), [id]);+ const onSelectValueChange = useCallback(+ ({ value: next }: { value: string[] }) => {+ const nextValue = next[0];++ if (nextValue !== undefined) {+ onChange(nextValue);+ }+ },[onChange]);return (- <NativeSelect.Root className="nodrag" invalid={invalid} size="xs" w="full">- <NativeSelect.Field- aria-label={title}- id={id ? `${id}-select` : undefined}- value={selectedValue}- onChange={onSelectChange}- >- {typeof value !== 'string' || !options.some((option) => option.value === value) ? (- <option value="">Select…</option>- ) : null}- {options.map((option) => (- <option key={option.value} value={option.value}>- {option.label}- </option>- ))}- </NativeSelect.Field>- <NativeSelect.Indicator />- </NativeSelect.Root>+ <Select+ aria-label={title}+ className="nodrag"+ collection={collection}+ ids={selectIds}+ invalid={invalid}+ size="xs"+ value={selectedValue}+ valueTextProps={SELECT_VALUE_TEXT_PROPS}+ w="full"+ onValueChange={onSelectValueChange}+ />);};diff --git a/invokeai/frontend/webv2/src/features/workflow/ui/linear/FormBuilderTab.tsx b/invokeai/frontend/webv2/src/features/workflow/ui/linear/FormBuilderTab.tsxindex f9586d7266..8ae630c327 100644--- a/invokeai/frontend/webv2/src/features/workflow/ui/linear/FormBuilderTab.tsx+++ b/invokeai/frontend/webv2/src/features/workflow/ui/linear/FormBuilderTab.tsx@@ -15,7 +15,7 @@ import { FieldDescriptionPopover } from '@features/workflow/ui/fields/FieldDescrimport { useProjectGraphCommands } from '@features/workflow/ui/useProjectGraphCommands';import { useWorkflowHostCommands } from '@features/workflow/ui/WorkflowUiContext';import { getFormChildren, getResolvedWorkflowEdges, getWorkflowFieldInvalidReason } from '@features/workflow/utility';-import { Button, IconButton } from '@platform/ui';+import { Button, DropZone, IconButton } from '@platform/ui';import {Columns2Icon,CrosshairIcon,@@ -200,17 +200,13 @@ const ContainerDropZone = ({ container, isEmpty }: { container: ContainerFormEle}return (- <Box+ <DropZonealignSelf="stretch"- borderColor={isActive ? 'accent.solid' : 'border.subtle'}- borderStyle="dashed"- borderWidth="1px"- color="fg.subtle"flex={isEmpty ? '1' : undefined}fontSize="2xs"+ isOver={isActive}px="2"py="1.5"- rounded="md"textAlign="center"onDragLeave={() => setIsActive(false)}onDragOver={(event: DragEvent<HTMLDivElement>) => {@@ -237,7 +233,7 @@ const ContainerDropZone = ({ container, isEmpty }: { container: ContainerFormEle}}>{canDrop ? 'Drop here' : 'Empty container — drag elements here'}- </Box>+ </DropZone>);};diff --git a/invokeai/frontend/webv2/src/workbench/settings/SettingsDialog.tsx b/invokeai/frontend/webv2/src/workbench/settings/SettingsDialog.tsxindex cc7ebb5d75..1a0241137f 100644--- a/invokeai/frontend/webv2/src/workbench/settings/SettingsDialog.tsx+++ b/invokeai/frontend/webv2/src/workbench/settings/SettingsDialog.tsx@@ -8,11 +8,11 @@ import {Box,chakra,Checkbox,+ createListCollection,Dialog,Flex,HStack,Icon,- NativeSelect,Portal,SimpleGrid,Stack,@@ -22,7 +22,7 @@ import {useSlotRecipe,} from '@chakra-ui/react';import { WORKBENCH_LANGUAGE_OPTIONS } from '@platform/i18n/languages';-import { Button, CloseButton, IconButton, ConfirmDialog, Tabs, Tooltip } from '@platform/ui';+import { Button, CloseButton, IconButton, ConfirmDialog, Select, Tabs, Tooltip } from '@platform/ui';import { themeCardRecipe } from '@theme/recipes';import { previewSwatches, THEMES, type ThemeDefinition } from '@theme/system';import { registerHotkeyModalLayer } from '@workbench/hotkeys';@@ -272,7 +272,8 @@ const SettingsTabs = () => {borderColor="border.subtle"borderRightWidth="1px"flexShrink={0}- p="2"+ p="1"+ gap="0.5"w={SETTINGS_TAB_LIST_WIDTH}>{tabs.map((tab) => (@@ -346,15 +347,10 @@ const AppearanceSection = () => {<SettingSelectdescription={t('settings.languageDescription')}label={t('settings.language')}+ options={WORKBENCH_LANGUAGE_OPTIONS}value={language}onChange={updateLanguage}- >- {WORKBENCH_LANGUAGE_OPTIONS.map((option) => (- <option key={option.value} value={option.value}>- {option.label}- </option>- ))}- </SettingSelect>+ /><SettingTogglechecked={reduceMotion}description="Disable transitions and animations across the workbench."@@ -565,12 +561,10 @@ const WorkflowSection = () => {<SettingSelectdescription="How connections between nodes are drawn in the editor."label="Connection style"+ options={WORKFLOW_EDGE_STYLE_OPTIONS}value={workflowEdgeStyle}onChange={updateWorkflowEdgeStyle}- >- <option value="curved">Curved</option>- <option value="square">Square</option>- </SettingSelect>+ /><SettingTogglechecked={workflowSnapToGrid}description="Snap nodes to the grid while dragging. When off, hold Ctrl to snap temporarily."@@ -604,12 +598,10 @@ const QueueSection = () => {<SettingSelectdescription="Show jobs from only the active project, or all queue jobs visible to you."label="Show jobs from"+ options={QUEUE_JOBS_SCOPE_OPTIONS}value={queueJobsScope}onChange={updateQueueJobsScope}- >- <option value="active-project">Active project</option>- <option value="all">All</option>- </SettingSelect>+ /></SettingsSection>);};@@ -655,15 +647,10 @@ const DeveloperSection = () => {<SettingSelectdescription="Minimum log level recorded in the Diagnostics widget."label="Log level"+ options={DEVELOPER_LOG_LEVEL_OPTIONS}value={developerLogLevel}onChange={updateDeveloperLogLevel}- >- {DEVELOPER_LOG_LEVELS.map((value) => (- <option key={value} value={value}>- {formatSettingLabel(value)}- </option>- ))}- </SettingSelect>+ /><SettingTogglechecked={developerPerformanceTimingsEnabled}description="Record performance measurements such as workflow editor timing and project serialization costs."@@ -820,22 +807,30 @@ const SettingToggle = ({};const SettingSelect = ({- children,comingSoon,description,label,onChange,+ options,value,}: {- children: ReactNode;comingSoon?: boolean;description?: string;label: string;onChange: (value: string) => void;+ options: readonly { label: string; value: string }[];value: string;}) => {- const handleChange = useCallback(- (event: { currentTarget: { value: string } }) => onChange(event.currentTarget.value),+ const collection = useMemo(() => createListCollection({ items: options }), [options]);+ const selectedValue = useMemo(() => [value], [value]);+ const handleValueChange = useCallback(+ ({ value: next }: { value: string[] }) => {+ const nextValue = next[0];++ if (nextValue !== undefined) {+ onChange(nextValue);+ }+ },[onChange]);@@ -858,12 +853,16 @@ const SettingSelect = ({</Field.HelperText>)}</Stack>- <NativeSelect.Root flexShrink={0} maxW={SELECT_MAX_WIDTH} size="sm" w="full">- <NativeSelect.Field value={value} onChange={handleChange}>- {children}- </NativeSelect.Field>- <NativeSelect.Indicator />- </NativeSelect.Root>+ <Select+ collection={collection}+ disabled={comingSoon}+ flexShrink={0}+ maxW={SELECT_MAX_WIDTH}+ size="sm"+ value={selectedValue}+ w="full"+ onValueChange={handleValueChange}+ /></Field.Root>);};@@ -873,3 +872,18 @@ const formatSettingLabel = (value: string): string =>.split('-').map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(' ');++const WORKFLOW_EDGE_STYLE_OPTIONS = [+ { label: 'Curved', value: 'curved' },+ { label: 'Square', value: 'square' },+];++const QUEUE_JOBS_SCOPE_OPTIONS = [+ { label: 'Active project', value: 'active-project' },+ { label: 'All', value: 'all' },+];++const DEVELOPER_LOG_LEVEL_OPTIONS = DEVELOPER_LOG_LEVELS.map((value) => ({+ label: formatSettingLabel(value),+ value,+}));diff --git a/invokeai/frontend/webv2/src/workbench/widget-frame/WidgetRegionDropOverlay.tsx b/invokeai/frontend/webv2/src/workbench/widget-frame/WidgetRegionDropOverlay.tsxindex b3ef3c0bff..ee99ba63bf 100644--- a/invokeai/frontend/webv2/src/workbench/widget-frame/WidgetRegionDropOverlay.tsx+++ b/invokeai/frontend/webv2/src/workbench/widget-frame/WidgetRegionDropOverlay.tsx@@ -1,6 +1,8 @@import type { WidgetRegionDropState } from '@workbench/widgetDnd';-import { Box } from '@chakra-ui/react';+import { DropZone, type DropZoneProps } from '@platform/ui';++const DISALLOWED_STYLES: DropZoneProps = { bg: 'bg.muted', borderColor: 'border.subtle' };export const WidgetRegionDropOverlay = ({dropState,@@ -9,21 +11,17 @@ export const WidgetRegionDropOverlay = ({dropState: WidgetRegionDropState;isOver: boolean;}) => (- <Box- bg={dropState.isAllowed ? (isOver ? 'accent.subtle' : 'transparent') : 'bg.muted'}- borderColor={dropState.isAllowed ? 'accent.solid' : 'border.subtle'}- borderStyle="dashed"- borderWidth="2px"+ <DropZonebottom="0"+ isOver={dropState.isAllowed && isOver}left="0"opacity={dropState.isAllowed ? 0.96 : 0.5}pointerEvents="none"position="absolute"right="0"- rounded="sm"- shadow={dropState.isAllowed && isOver ? '0 0 0 1px {colors.accent.solid}' : undefined}top="0"- transition="background var(--wb-motion-duration-fast) ease, border-color var(--wb-motion-duration-fast) ease, opacity var(--wb-motion-duration-fast) ease, box-shadow var(--wb-motion-duration-fast) ease"+ variant="overlay"zIndex="2"+ {...(dropState.isAllowed ? undefined : DISALLOWED_STYLES)}/>);diff --git a/invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasImageDropZone.tsx b/invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasImageDropZone.tsxindex dfe16ec31f..190da1327b 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasImageDropZone.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/canvas/CanvasImageDropZone.tsx@@ -1,5 +1,6 @@-import { Flex, GridItem, Text } from '@chakra-ui/react';+import { GridItem, Text } from '@chakra-ui/react';import { useDroppable } from '@dnd-kit/core';+import { DropZone } from '@platform/ui';import { useTranslation } from 'react-i18next';import type { CanvasImageDropData } from './canvasImageDnd';@@ -23,24 +24,20 @@ export const CanvasImageDropZone = ({ colSpan, data, id, labelKey, row }: Canvasreturn (<GridItem ref={setNodeRef} colSpan={colSpan} gridRow={row} position="relative">- <Flex+ <DropZonealignItems="center"- bg={isOver ? 'accent.subtle' : 'bg.muted'}- borderColor={isOver ? 'accent.solid' : 'border.emphasized'}- borderStyle="dashed"- borderWidth="2px"+ display="flex"inset="0.5"+ isOver={isOver}justifyContent="center"opacity={isOver ? 0.98 : 0.88}position="absolute"- rounded="md"- shadow={isOver ? '0 0 0 1px {colors.accent.solid}' : undefined}- transition="background var(--wb-motion-duration-fast) ease, border-color var(--wb-motion-duration-fast) ease, opacity var(--wb-motion-duration-fast) ease, box-shadow var(--wb-motion-duration-fast) ease"+ variant="overlay"><Text color="fg" fontSize="sm" fontWeight="700" textAlign="center">{t(labelKey)}</Text>- </Flex>+ </DropZone></GridItem>);};diff --git a/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-options/SamOptions.tsx b/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-options/SamOptions.tsxindex 46bac515a6..7d71c137e4 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-options/SamOptions.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/canvas/tool-options/SamOptions.tsx@@ -2,13 +2,13 @@import type { ChangeEvent } from 'react';import {+ createListCollection,Flex,Group,HStack,IconButton,Input,Menu,- NativeSelect,Popover,Portal,Stack,@@ -16,7 +16,7 @@ import {Text,VisuallyHidden,} from '@chakra-ui/react';-import { Button, MenuContent, Tooltip } from '@platform/ui';+import { Button, MenuContent, Select, Tooltip } from '@platform/ui';import {getCanvasOperations,isSamDocumentInputValid,@@ -30,6 +30,7 @@ import {import { CanvasFloatingBar, CanvasFloatingBarDivider } from '@workbench/widgets/canvas/CanvasFloatingBar';import { useSamSession } from '@workbench/widgets/canvas/engineStoreHooks';import { ChevronDownIcon, SettingsIcon } from 'lucide-react';+import { useMemo } from 'react';import { useTranslation } from 'react-i18next';import type { CanvasOperationUIEngine } from './operationUIEngine';@@ -345,6 +346,17 @@ export const SamSettingsPopover = ({onToggle(key: 'applyPolygonRefinement' | 'autoProcess' | 'isolatedPreview', value: boolean): void;}) => {const { t } = useTranslation();+ const modelValue = useMemo(() => [session.model], [session.model]);+ const modelCollection = useMemo(+ () =>+ createListCollection({+ items: [+ { label: t('widgets.layers.selectObject.modelSam2Large'), value: 'segment-anything-2-large' },+ { label: t('widgets.layers.selectObject.modelHuge'), value: 'segment-anything-huge' },+ ] as const,+ }),+ [t]+ );return (<Popover.Root lazyMount positioning={SAM_UPWARD_POSITIONING} unmountOnExit><Popover.Trigger asChild>@@ -363,19 +375,20 @@ export const SamSettingsPopover = ({<Text asChild fontSize="xs" fontWeight="semibold"><label htmlFor="sam-model">{t('widgets.layers.selectObject.model')}</label></Text>- <NativeSelect.Root disabled={isProcessing || !eligibility.canEditInputs} size="xs">- <NativeSelect.Field- id="sam-model"- value={session.model}- onChange={(event) => onModelChange(event.currentTarget.value as SamModel)}- >- <option value="segment-anything-2-large">- {t('widgets.layers.selectObject.modelSam2Large')}- </option>- <option value="segment-anything-huge">{t('widgets.layers.selectObject.modelHuge')}</option>- </NativeSelect.Field>- <NativeSelect.Indicator />- </NativeSelect.Root>+ <Select+ collection={modelCollection}+ disabled={isProcessing || !eligibility.canEditInputs}+ ids={{ trigger: 'sam-model' }}+ size="xs"+ value={modelValue}+ onValueChange={({ value }) => {+ const model = value[0];++ if (model === 'segment-anything-2-large' || model === 'segment-anything-huge') {+ onModelChange(model);+ }+ }}+ /></Stack><SamSettingsSwitchchecked={session.applyPolygonRefinement}diff --git a/invokeai/frontend/webv2/src/workbench/widgets/layers/RegionalGuidanceSettings.tsx b/invokeai/frontend/webv2/src/workbench/widgets/layers/RegionalGuidanceSettings.tsxindex a8f2eac695..c97ca3bc38 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/layers/RegionalGuidanceSettings.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/layers/RegionalGuidanceSettings.tsx@@ -17,7 +17,7 @@ import { galleryImages, galleryTransfers } from '@features/gallery';import { isGalleryImageDragData } from '@features/gallery/utility';import { FluxReduxControls, PROMPT_ATTENTION_TARGET_PROPS, PromptTextarea } from '@features/generation/components';import { useModelsSelector } from '@features/models';-import { Button, ColorPicker, Field, Select, Slider } from '@platform/ui';+import { Button, ColorPicker, DropZone, Field, Select, Slider } from '@platform/ui';import { useCanvasProjectMutationDispatch } from '@workbench/useCanvasProjectMutationDispatch';import { useActiveProjectSelector, useWorkbenchCommands } from '@workbench/WorkbenchContext';import { ImageIcon, PlusIcon, XIcon } from 'lucide-react';@@ -621,17 +621,14 @@ const ReferenceImageRow = ({</HStack><HStack align="flex-start" gap="2">- <Box- bg={isOver ? 'accent.muted' : undefined}- borderColor={isOver ? 'accent.solid' : 'border.emphasized'}+ <DropZone+ ref={setNodeRef}borderStyle={image ? 'solid' : 'dashed'}- borderWidth="1px"flexShrink="0"h="16"+ isOver={isOver}overflow="hidden"position="relative"- ref={setNodeRef}- rounded="md"w="16"><Box@@ -667,7 +664,7 @@ const ReferenceImageRow = ({<XIcon /></IconButton>) : null}- </Box>+ </DropZone><Text color="fg.muted" flex="1" fontSize="2xs" minW="0">{t('widgets.layers.regionalGuidance.referenceImageHelp')}</Text>diff --git a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewCompareDropZone.tsx b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewCompareDropZone.tsxindex 6acd1131ec..ab32fa4568 100644--- a/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewCompareDropZone.tsx+++ b/invokeai/frontend/webv2/src/workbench/widgets/preview/PreviewCompareDropZone.tsx@@ -1,6 +1,7 @@-import { Badge, Flex } from '@chakra-ui/react';+import { Badge } from '@chakra-ui/react';import { useDndContext, useDroppable } from '@dnd-kit/core';import { isGalleryImageDragData } from '@features/gallery/utility';+import { DropZone } from '@platform/ui';import { useTranslation } from 'react-i18next';import { PREVIEW_COMPARE_DROP_DATA, PREVIEW_COMPARE_DROP_ID } from './previewCompareDnd';@@ -20,26 +21,22 @@ export const PreviewCompareDropZone = () => {}return (- <Flex+ <DropZoneref={setNodeRef}- align="center"- bg={isOver ? 'bg.subtle' : 'transparent'}- borderColor={isOver ? 'border.emphasized' : 'border.subtle'}- borderStyle="dashed"- borderWidth="1px"+ alignItems="center"+ display="flex"inset="1"- justify="center"+ isOver={isOver}+ justifyContent="center"opacity={isOver ? 1 : 0.85}position="absolute"rounded="lg"- transitionDuration="var(--wb-motion-duration-fast)"- transitionProperty="opacity, background-color, border-color"- transitionTimingFunction="ease"+ variant="overlay"zIndex="2"><Badge size="xs" variant="subtle">{t('widgets.preview.dropToCompare')}</Badge>- </Flex>+ </DropZone>);};