refactor: unified cn utils (#29916)

Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
This commit is contained in:
Stephen Zhou
2025-12-19 12:08:34 +08:00
committed by GitHub
parent 80f11471ae
commit a26881cb24
815 changed files with 1064 additions and 1227 deletions

View File

@@ -8,7 +8,7 @@ import PureSelect from '@/app/components/base/select/pure'
import Tooltip from '@/app/components/base/tooltip'
import { useRenderI18nObject } from '@/hooks/use-i18n'
import { useTriggerPluginDynamicOptions } from '@/service/use-triggers'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { RiExternalLinkLine } from '@remixicon/react'
import type { AnyFieldApi } from '@tanstack/react-form'
import { useStore } from '@tanstack/react-form'

View File

@@ -26,7 +26,7 @@ import {
import type {
BaseFieldProps,
} from '.'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import {
useGetFormValues,
useGetValidators,

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { useFieldContext } from '../..'
import Checkbox from '../../../checkbox'

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { useFieldContext } from '../..'
import type { CustomSelectProps, Option } from '../../../select/custom'
import CustomSelect from '../../../select/custom'

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import type { LabelProps } from '../label'
import { useFieldContext } from '../..'
import Label from '../label'

View File

@@ -2,7 +2,7 @@ import React from 'react'
import { useFieldContext } from '../..'
import type { LabelProps } from '../label'
import Label from '../label'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import type { FileUploaderInAttachmentWrapperProps } from '../../../file-uploader/file-uploader-in-attachment'
import FileUploaderInAttachmentWrapper from '../../../file-uploader/file-uploader-in-attachment'
import type { FileEntity } from '../../../file-uploader/types'

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { useFieldContext } from '../../..'
import type { CustomSelectProps } from '../../../../select/custom'
import CustomSelect from '../../../../select/custom'

View File

@@ -1,6 +1,6 @@
import React from 'react'
import Badge from '@/app/components/base/badge'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { RiArrowDownSLine } from '@remixicon/react'
import { useTranslation } from 'react-i18next'
import type { FileTypeSelectOption } from './types'

View File

@@ -2,7 +2,7 @@ import {
memo,
} from 'react'
import PromptEditor from '@/app/components/base/prompt-editor'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import Placeholder from './placeholder'
type MixedVariableTextInputProps = {

View File

@@ -2,7 +2,7 @@ import React from 'react'
import { useFieldContext } from '../..'
import type { LabelProps } from '../label'
import Label from '../label'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import type { InputNumberProps } from '../../../input-number'
import { InputNumber } from '../../../input-number'

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import type { LabelProps } from '../label'
import { useFieldContext } from '../..'
import Label from '../label'

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { useFieldContext } from '../..'
import type { LabelProps } from '../label'
import Label from '../label'

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import { useFieldContext } from '../..'
import type { Option, PureSelectProps } from '../../../select/pure'
import PureSelect from '../../../select/pure'

View File

@@ -2,7 +2,7 @@ import React from 'react'
import { useFieldContext } from '../..'
import type { LabelProps } from '../label'
import Label from '../label'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import type { TextareaProps } from '../../../textarea'
import Textarea from '../../../textarea'

View File

@@ -3,7 +3,7 @@ import { useFieldContext } from '../..'
import Input, { type InputProps } from '../../../input'
import type { LabelProps } from '../label'
import Label from '../label'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
type TextFieldProps = {
label: string

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import type { LabelProps } from '../label'
import { useFieldContext } from '../..'
import Label from '../label'

View File

@@ -1,7 +1,7 @@
import type { ChangeEvent } from 'react'
import { useCallback, useState } from 'react'
import { RiEditLine } from '@remixicon/react'
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import SegmentedControl from '@/app/components/base/segmented-control'
import { VariableX } from '@/app/components/base/icons/src/vender/workflow'
import Input from '@/app/components/base/input'

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import VarReferencePicker from '@/app/components/workflow/nodes/_base/components/variable/var-reference-picker'
import type { LabelProps } from '../label'
import Label from '../label'

View File

@@ -1,4 +1,4 @@
import cn from '@/utils/classnames'
import { cn } from '@/utils/classnames'
import Tooltip from '../../tooltip'
import { useTranslation } from 'react-i18next'