Merge pull request #925 from SuanmoSuanyangTechnology/feature/ui_zy

Feature/UI zy
This commit is contained in:
yingzhao
2026-04-17 11:59:37 +08:00
committed by GitHub
27 changed files with 769 additions and 547 deletions

View File

@@ -1,8 +1,8 @@
/*
* @Author: ZhaoYing
* @Date: 2026-02-04 17:20:52
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-02-04 17:20:52
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-16 11:46:39
*/
import { useEffect, useRef, useMemo } from 'react';
import { EditorView, basicSetup } from 'codemirror';
@@ -35,7 +35,7 @@ interface CodeMirrorEditorProps {
height?: string;
size?: 'default' | 'small';
placeholder?: string;
variant?: 'outlined' | 'borderless';
variant?: 'outlined' | 'borderless' | 'filled';
}
/**
@@ -156,7 +156,7 @@ const CodeMirrorEditor = ({
<div
ref={editorRef}
style={{ minHeight, fontSize, lineHeight }}
className={variant === 'borderless' ? '' : 'rb-border rb:rounded-[8px]'}
className={variant === 'outlined' ? 'rb-border rb:rounded-lg' : variant === 'filled' ? 'cm-editor-filled rb:rounded-lg' : ''}
/>
);
};

View File

@@ -1,5 +1,6 @@
.page-tabs:global(.ant-segmented) {
padding: 4px;
margin-left: 4px;
}
.page-tabs:global(.ant-segmented .ant-segmented-item-label) {
line-height: 24px;

View File

@@ -44,6 +44,7 @@ const RbSlider: FC<RbSliderProps> = ({
className = '',
prefix,
inputClassName,
disabled,
...rest
}) => {
const [curValue, setCurValue] = useState<SliderSingleProps['value']>(0)
@@ -83,6 +84,7 @@ const RbSlider: FC<RbSliderProps> = ({
max={max}
step={step}
value={curValue}
disabled={disabled}
onChange={handleSliderChange}
classNames={size === 'small' ? {
rail: 'rb:w-[calc(100%-6px)]!'
@@ -96,6 +98,7 @@ const RbSlider: FC<RbSliderProps> = ({
max={max}
step={step as number}
value={curValue}
disabled={disabled}
onChange={handleInputChange}
prefix={prefix}
className={`${inputClassName || '' } rb:w-20!`}

View File

@@ -337,7 +337,7 @@ const Menu: FC<{
onClick={goToSpace}
className="rb-border-t rb:pt-5! rb:pb-2.5! rb:absolute rb:bottom-2.5 rb:right-5 rb:left-5 rb:text-[13px] rb:text-[#5B6167] rb:hover:text-[#212332] rb:leading-4.5 rb:font-regular rb:text-center rb:mt-2.25 rb:cursor-pointer"
>
<div className="rb:cursor-pointer rb:size-4 rb:bg-cover rb:bg-[url('@/assets/images/logout.svg')]"></div>
<div className="rb:cursor-pointer rb:size-4 rb:bg-cover rb:bg-[url('@/assets/images/logout_grey.svg')]"></div>
{collapsed ? null : t('common.returnToSpace')}
</Flex>
}

View File

@@ -18,7 +18,7 @@ import { type FC, type ReactNode } from 'react'
/** Props interface for Tag component */
export interface TagProps {
/** Color theme for the tag */
color?: 'processing' | 'error' | 'success' | 'warning' | 'default',
color?: 'processing' | 'error' | 'success' | 'warning' | 'default' | 'purple' | 'dark',
/** Tag content */
children: ReactNode;
/** Additional CSS classes */
@@ -32,6 +32,8 @@ const colors = {
success: 'rb:text-[#369F21] rb:border-[rgba(54,159,33,0.25)] rb:bg-[rgba(54,159,33,0.06)]',
warning: 'rb:text-[#FF5D34] rb:border-[rgba(255,93,52,0.30)] rb:bg-[rgba(255,93,52,0.08)]',
default: 'rb:text-[#5B6167] rb:border-[rgba(91,97,103,0.30)] rb:bg-[rgba(91,97,103,0.08)]',
purple: 'rb:text-[#9C6FFF] rb:border-[rgba(156,111,255,0.25)] rb:bg-[rgba(156,111,255,0.06)]',
dark: 'rb:text-[#171719] rb:border-[rgba(23,23,25,0.25)] rb:bg-[rgba(23,23,25,0.06)]'
}
/** Custom tag component with color themes */