Chore: frontend infrastructure upgrade (#16420)

Co-authored-by: NFish <douxc512@gmail.com>
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
Co-authored-by: twwu <twwu@dify.ai>
Co-authored-by: jZonG <jzongcode@gmail.com>
This commit is contained in:
Joel
2025-03-21 17:41:03 +08:00
committed by GitHub
parent e61415223b
commit 7709d9df20
1435 changed files with 13372 additions and 11612 deletions

View File

@@ -93,7 +93,7 @@ export const EditSlice: FC<EditSliceProps> = (props) => {
ref={refs.setFloating}
style={floatingStyles}
{...getFloatingProps()}
className='p-1 rounded-lg bg-components-actionbar-bg shadow inline-flex items-center justify-center'
className='inline-flex items-center justify-center rounded-lg bg-components-actionbar-bg p-1 shadow'
onMouseEnter={() => setDelBtnHover(true)}
onMouseLeave={() => setDelBtnHover(false)}
>
@@ -105,7 +105,7 @@ export const EditSlice: FC<EditSliceProps> = (props) => {
}}
state={ActionButtonState.Destructive}
>
<RiDeleteBinLine className='w-4 h-4' />
<RiDeleteBinLine className='h-4 w-4' />
</ActionButton>
</span>
</FloatingFocusManager>}

View File

@@ -47,7 +47,7 @@ export const PreviewSlice: FC<PreviewSliceProps> = (props) => {
ref={refs.setFloating}
style={floatingStyles}
{...getFloatingProps()}
className='p-2 rounded-md bg-components-tooltip-bg shadow shadow-shadow-shadow-5 backdrop-blur-[5px] text-text-secondary leading-4 border-[0.5px] border-components-panel-border text-xs'
className='rounded-md border-[0.5px] border-components-panel-border bg-components-tooltip-bg p-2 text-xs leading-4 text-text-secondary shadow shadow-shadow-shadow-5 backdrop-blur-[5px]'
>
{tooltip}
</span>}

View File

@@ -1,22 +1,32 @@
import { type ComponentProps, type FC, forwardRef } from 'react'
import type { ComponentProps, FC } from 'react'
import classNames from '@/utils/classnames'
const baseStyle = 'py-[3px]'
export type SliceContainerProps = ComponentProps<'span'>
export const SliceContainer: FC<SliceContainerProps> = forwardRef((props, ref) => {
export const SliceContainer: FC<SliceContainerProps> = (
{
ref,
...props
},
) => {
const { className, ...rest } = props
return <span {...rest} ref={ref} className={classNames(
'group align-bottom mr-1 select-none text-sm',
className,
)} />
})
}
SliceContainer.displayName = 'SliceContainer'
export type SliceLabelProps = ComponentProps<'span'> & { labelInnerClassName?: string }
export const SliceLabel: FC<SliceLabelProps> = forwardRef((props, ref) => {
export const SliceLabel: FC<SliceLabelProps> = (
{
ref,
...props
},
) => {
const { className, children, labelInnerClassName, ...rest } = props
return <span {...rest} ref={ref} className={classNames(
baseStyle,
@@ -27,12 +37,17 @@ export const SliceLabel: FC<SliceLabelProps> = forwardRef((props, ref) => {
{children}
</span>
</span>
})
}
SliceLabel.displayName = 'SliceLabel'
export type SliceContentProps = ComponentProps<'span'>
export const SliceContent: FC<SliceContentProps> = forwardRef((props, ref) => {
export const SliceContent: FC<SliceContentProps> = (
{
ref,
...props
},
) => {
const { className, children, ...rest } = props
return <span {...rest} ref={ref} className={classNames(
baseStyle,
@@ -41,12 +56,17 @@ export const SliceContent: FC<SliceContentProps> = forwardRef((props, ref) => {
)}>
{children}
</span>
})
}
SliceContent.displayName = 'SliceContent'
export type SliceDividerProps = ComponentProps<'span'>
export const SliceDivider: FC<SliceDividerProps> = forwardRef((props, ref) => {
export const SliceDivider: FC<SliceDividerProps> = (
{
ref,
...props
},
) => {
const { className, ...rest } = props
return <span {...rest} ref={ref} className={classNames(
baseStyle,
@@ -56,5 +76,5 @@ export const SliceDivider: FC<SliceDividerProps> = forwardRef((props, ref) => {
{/* use a zero-width space to make the hover area bigger */}
&#8203;
</span>
})
}
SliceDivider.displayName = 'SliceDivider'