diff --git a/packages/ui/.storybook/main.ts b/packages/ui/.storybook/main.ts index 36dc3416a8..8a4944da35 100644 --- a/packages/ui/.storybook/main.ts +++ b/packages/ui/.storybook/main.ts @@ -1,4 +1,5 @@ import type { StorybookConfig } from '@storybook/react-vite' +import { resolve } from 'path' const config: StorybookConfig = { stories: ['../stories/components/**/*.stories.@(js|jsx|ts|tsx)'], @@ -6,10 +7,15 @@ const config: StorybookConfig = { framework: '@storybook/react-vite', viteFinal: async (config) => { const { mergeConfig } = await import('vite') - // 动态导入 @tailwindcss/vite 以避免 ESM/CJS 兼容性问题 const tailwindPlugin = (await import('@tailwindcss/vite')).default + console.log('aliasaliasaliasaliasalias', resolve('src/index.ts')) return mergeConfig(config, { - plugins: [tailwindPlugin()] + plugins: [tailwindPlugin()], + resolve: { + alias: { + '@cherrystudio/ui': resolve('src') + } + } }) } } diff --git a/packages/ui/src/components/primitives/button.tsx b/packages/ui/src/components/primitives/button.tsx index 14eff25723..698b4781f4 100644 --- a/packages/ui/src/components/primitives/button.tsx +++ b/packages/ui/src/components/primitives/button.tsx @@ -54,19 +54,17 @@ function Button({ }) { const Comp = asChild ? Slot : 'button' - // 根据按钮尺寸确定 spinner 大小 + // Determine spinner size based on button size const getSpinnerSize = () => { if (size === 'sm' || size === 'icon-sm') return 14 if (size === 'lg' || size === 'icon-lg') return 18 return 16 } - // 默认 loading icon - const defaultLoadingIcon = ( - - ) + // Default loading icon + const defaultLoadingIcon = - // 使用自定义 icon 或默认 icon + // Use custom icon or default icon const spinnerElement = loadingIcon ?? defaultLoadingIcon return ( @@ -75,8 +73,15 @@ function Button({ className={cn(buttonVariants({ variant, size, className }))} disabled={disabled || loading} {...props}> - {loading && spinnerElement} - {children} + {/* asChild mode does not support loading because Slot requires a single child element */} + {asChild ? ( + children + ) : ( + <> + {loading && spinnerElement} + {children} + + )} ) } diff --git a/packages/ui/stories/components/base/Button.stories.tsx b/packages/ui/stories/components/base/Button.stories.tsx deleted file mode 100644 index 2b65061868..0000000000 --- a/packages/ui/stories/components/base/Button.stories.tsx +++ /dev/null @@ -1,157 +0,0 @@ -import type { Meta, StoryObj } from '@storybook/react' - -import { Button } from '../../../src/components' - -const meta: Meta = { - title: 'Components/Primitives/Button', - component: Button, - parameters: { - layout: 'centered' - }, - tags: ['autodocs'], - argTypes: { - variant: { - control: { type: 'select' }, - options: ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'] - }, - size: { - control: { type: 'select' }, - options: ['default', 'sm', 'lg', 'icon', 'icon-sm', 'icon-lg'] - }, - disabled: { - control: { type: 'boolean' } - }, - asChild: { - control: { type: 'boolean' } - } - } -} - -export default meta -type Story = StoryObj - -// 基础按钮 -export const Default: Story = { - args: { - children: 'Button' - } -} - -// 不同变体 -export const Variants: Story = { - render: () => ( -
- - - - - - -
- ) -} - -// 不同尺寸 -export const Sizes: Story = { - render: () => ( -
- - - -
- ) -} - -// 图标按钮 -export const IconButtons: Story = { - render: () => ( -
- - - -
- ) -} - -// 状态 -export const States: Story = { - render: () => ( -
- - -
- ) -} - -// 带图标 -export const WithIcons: Story = { - render: () => ( -
- - - -
- ) -} - -// 全宽按钮 -export const FullWidth: Story = { - render: () => ( -
- -
- ) -} - -// 交互示例 -export const Interactive: Story = { - render: () => ( -
- - -
- ) -} - -// 组合示例 -export const Combinations: Story = { - render: () => ( -
-
- - - -
-
- - - -
-
- - - -
-
- ) -} diff --git a/packages/ui/stories/components/interactive/CodeEditor.stories.tsx b/packages/ui/stories/components/composites/CodeEditor.stories.tsx similarity index 96% rename from packages/ui/stories/components/interactive/CodeEditor.stories.tsx rename to packages/ui/stories/components/composites/CodeEditor.stories.tsx index 03be17e036..0954b0d6bb 100644 --- a/packages/ui/stories/components/interactive/CodeEditor.stories.tsx +++ b/packages/ui/stories/components/composites/CodeEditor.stories.tsx @@ -1,8 +1,8 @@ import type { Meta, StoryObj } from '@storybook/react-vite' import { action } from 'storybook/actions' -import type { LanguageConfig } from '../../../src/components/composites/CodeEditor' -import CodeEditor, { getCmThemeByName, getCmThemeNames } from '../../../src/components/composites/CodeEditor' +import type { LanguageConfig } from '../../../src/components' +import CodeEditor, { getCmThemeByName, getCmThemeNames } from '../../../src/components' // 示例语言配置 - 为 Storybook 提供更丰富的语言支持演示 const exampleLanguageConfig: LanguageConfig = { @@ -51,7 +51,7 @@ const exampleLanguageConfig: LanguageConfig = { } const meta: Meta = { - title: 'Interactive/CodeEditor', + title: 'Components/Composites/CodeEditor', component: CodeEditor, parameters: { layout: 'centered' }, tags: ['autodocs'], diff --git a/packages/ui/stories/components/display/Ellipsis.stories.tsx b/packages/ui/stories/components/composites/Ellipsis.stories.tsx similarity index 98% rename from packages/ui/stories/components/display/Ellipsis.stories.tsx rename to packages/ui/stories/components/composites/Ellipsis.stories.tsx index add2c98e06..c276826b96 100644 --- a/packages/ui/stories/components/display/Ellipsis.stories.tsx +++ b/packages/ui/stories/components/composites/Ellipsis.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react' -import Ellipsis from '../../../src/components/composites/Ellipsis' +import { Ellipsis } from '../../../src/components' const meta = { - title: 'Display/Ellipsis', + title: 'Components/Composites/Ellipsis', component: Ellipsis, parameters: { layout: 'centered', diff --git a/packages/ui/stories/components/display/ExpandableText.stories.tsx b/packages/ui/stories/components/composites/ExpandableText.stories.tsx similarity index 98% rename from packages/ui/stories/components/display/ExpandableText.stories.tsx rename to packages/ui/stories/components/composites/ExpandableText.stories.tsx index 2f02cec9f1..67d8adb6cf 100644 --- a/packages/ui/stories/components/display/ExpandableText.stories.tsx +++ b/packages/ui/stories/components/composites/ExpandableText.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react' -import ExpandableText from '../../../src/components/composites/ExpandableText' +import { ExpandableText } from '../../../src/components' const meta: Meta = { - title: 'Display/ExpandableText', + title: 'Components/Composites/ExpandableText', component: ExpandableText, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/layout/HorizontalScrollContainer.stories.tsx b/packages/ui/stories/components/composites/HorizontalScrollContainer.stories.tsx similarity index 97% rename from packages/ui/stories/components/layout/HorizontalScrollContainer.stories.tsx rename to packages/ui/stories/components/composites/HorizontalScrollContainer.stories.tsx index 5546365f3b..321f5d3379 100644 --- a/packages/ui/stories/components/layout/HorizontalScrollContainer.stories.tsx +++ b/packages/ui/stories/components/composites/HorizontalScrollContainer.stories.tsx @@ -1,10 +1,10 @@ import type { Meta, StoryObj } from '@storybook/react-vite' import { useState } from 'react' -import HorizontalScrollContainer from '../../../src/components/composites/HorizontalScrollContainer' +import { HorizontalScrollContainer } from '../../../src/components' const meta: Meta = { - title: 'Layout/HorizontalScrollContainer', + title: 'Components/Composites/HorizontalScrollContainer', component: HorizontalScrollContainer, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/display/ListItem.stories.tsx b/packages/ui/stories/components/composites/ListItem.stories.tsx similarity index 95% rename from packages/ui/stories/components/display/ListItem.stories.tsx rename to packages/ui/stories/components/composites/ListItem.stories.tsx index 71ceff3410..fa2fad13b5 100644 --- a/packages/ui/stories/components/display/ListItem.stories.tsx +++ b/packages/ui/stories/components/composites/ListItem.stories.tsx @@ -1,4 +1,3 @@ -import { Button } from '@heroui/react' import type { Meta, StoryObj } from '@storybook/react' import { ChevronRight, @@ -16,10 +15,10 @@ import { } from 'lucide-react' import { action } from 'storybook/actions' -import ListItem from '../../../src/components/composites/ListItem' +import { Button, ListItem } from '../../../src/components' const meta: Meta = { - title: 'Display/ListItem', + title: 'Components/Composites/ListItem', component: ListItem, parameters: { layout: 'centered', @@ -78,7 +77,7 @@ export const Default: Story = { args: { title: '默认列表项' }, - render: (args) => ( + render: (args: any) => (
@@ -92,7 +91,7 @@ export const WithIcon: Story = { title: '带图标的列表项', subtitle: '这是一个副标题' }, - render: (args) => ( + render: (args: any) => (
@@ -107,7 +106,7 @@ export const Active: Story = { subtitle: '当前选中项', active: true }, - render: (args) => ( + render: (args: any) => (
@@ -122,7 +121,7 @@ export const WithRightContent: Story = { subtitle: '右侧有附加信息', rightContent: }, - render: (args) => ( + render: (args: any) => (
@@ -195,7 +194,7 @@ export const DifferentRightContent: Story = { title="带按钮" subtitle="操作类型" rightContent={ - } @@ -212,10 +211,10 @@ export const DifferentRightContent: Story = { subtitle="复合操作" rightContent={
- -
diff --git a/packages/ui/stories/components/display/MaxContextCount.stories.tsx b/packages/ui/stories/components/composites/MaxContextCount.stories.tsx similarity index 95% rename from packages/ui/stories/components/display/MaxContextCount.stories.tsx rename to packages/ui/stories/components/composites/MaxContextCount.stories.tsx index 7713fe6631..e1bf06c11d 100644 --- a/packages/ui/stories/components/display/MaxContextCount.stories.tsx +++ b/packages/ui/stories/components/composites/MaxContextCount.stories.tsx @@ -1,19 +1,20 @@ import type { Meta, StoryObj } from '@storybook/react' -import MaxContextCount from '../../../src/components/composites/MaxContextCount' +import { MaxContextCount } from '../../../src/components' const meta: Meta = { - title: 'Display/MaxContextCount', + title: 'Components/Composites/MaxContextCount', component: MaxContextCount, parameters: { layout: 'centered', docs: { description: { - component: '一个用于显示最大上下文数量的组件。当数量达到100时显示无限符号,否则显示具体数字。' + component: + '⚠️ **已废弃** - 此组件使用频率仅为 1 次,不符合 UI 库提取标准(需 ≥3 次)。计划在未来版本中移除。此组件与业务逻辑耦合,不适合通用 UI 库。\n\n一个用于显示最大上下文数量的组件。当数量达到100时显示无限符号,否则显示具体数字。' } } }, - tags: ['autodocs'], + tags: ['autodocs', 'deprecated'], argTypes: { maxContext: { control: { type: 'number', min: 0, max: 100, step: 1 }, diff --git a/packages/ui/stories/components/layout/Scrollbar.stories.tsx b/packages/ui/stories/components/composites/Scrollbar.stories.tsx similarity index 98% rename from packages/ui/stories/components/layout/Scrollbar.stories.tsx rename to packages/ui/stories/components/composites/Scrollbar.stories.tsx index 46334333a7..57f8868b65 100644 --- a/packages/ui/stories/components/layout/Scrollbar.stories.tsx +++ b/packages/ui/stories/components/composites/Scrollbar.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react-vite' -import Scrollbar from '../../../src/components/composites/Scrollbar' +import { Scrollbar } from '../../../src/components' const meta: Meta = { - title: 'Layout/Scrollbar', + title: 'Components/Composites/Scrollbar', component: Scrollbar, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/interactive/Selector.stories.tsx b/packages/ui/stories/components/composites/Selector.stories.tsx similarity index 98% rename from packages/ui/stories/components/interactive/Selector.stories.tsx rename to packages/ui/stories/components/composites/Selector.stories.tsx index 6d853ddde0..6c4dc6cd2a 100644 --- a/packages/ui/stories/components/interactive/Selector.stories.tsx +++ b/packages/ui/stories/components/composites/Selector.stories.tsx @@ -1,10 +1,10 @@ import type { Meta } from '@storybook/react' import { useState } from 'react' -import Selector from '../../../src/components/primitives/Selector' +import { Selector } from '../../../src/components' const meta: Meta = { - title: 'Interactive/Selector', + title: 'Components/Composites/Selector', component: Selector, parameters: { layout: 'padded' diff --git a/packages/ui/stories/components/interactive/Sortable.stories.tsx b/packages/ui/stories/components/composites/Sortable.stories.tsx similarity index 97% rename from packages/ui/stories/components/interactive/Sortable.stories.tsx rename to packages/ui/stories/components/composites/Sortable.stories.tsx index 701616dcff..e3a1744ca8 100644 --- a/packages/ui/stories/components/interactive/Sortable.stories.tsx +++ b/packages/ui/stories/components/composites/Sortable.stories.tsx @@ -1,8 +1,8 @@ import type { Meta, StoryObj } from '@storybook/react-vite' -import clsx from 'clsx' +import { clsx } from 'clsx' import { useMemo, useState } from 'react' -import { Sortable } from '../../../src/components/composites/Sortable' +import { Sortable } from '../../../src/components' import { useDndReorder } from '../../../src/hooks' type ExampleItem = { id: number; label: string } @@ -13,7 +13,7 @@ const initialItems: ExampleItem[] = Array.from({ length: 18 }).map((_, i) => ({ })) const meta: Meta = { - title: 'Interactive/Sortable', + title: 'Components/Composites/Sortable', component: Sortable, parameters: { layout: 'padded', diff --git a/packages/ui/stories/components/display/ThinkingEffect.stories.tsx b/packages/ui/stories/components/composites/ThinkingEffect.stories.tsx similarity index 95% rename from packages/ui/stories/components/display/ThinkingEffect.stories.tsx rename to packages/ui/stories/components/composites/ThinkingEffect.stories.tsx index 89425d9be3..123a5962c1 100644 --- a/packages/ui/stories/components/display/ThinkingEffect.stories.tsx +++ b/packages/ui/stories/components/composites/ThinkingEffect.stories.tsx @@ -1,21 +1,22 @@ -import { Button } from '@heroui/react' +import { Button } from '../../../src/components' import type { Meta, StoryObj } from '@storybook/react' import { useEffect, useMemo, useState } from 'react' -import ThinkingEffect from '../../../src/components/composites/ThinkingEffect' +import { ThinkingEffect } from '../../../src/components' const meta: Meta = { - title: 'Display/ThinkingEffect', + title: 'Components/Composites/ThinkingEffect', component: ThinkingEffect, parameters: { layout: 'centered', docs: { description: { - component: '一个用于显示AI思考过程的动画组件,包含灯泡动画、思考内容滚动展示和展开收缩功能。' + component: + '⚠️ **已废弃** - 此组件使用频率仅为 1 次,不符合 UI 库提取标准(需 ≥3 次)。计划在未来版本中移除。此组件是 AI 思考特效,可能需要保留在主项目中而不是 UI 库。\n\n一个用于显示AI思考过程的动画组件,包含灯泡动画、思考内容滚动展示和展开收缩功能。' } } }, - tags: ['autodocs'], + tags: ['autodocs', 'deprecated'], argTypes: { isThinking: { control: { type: 'boolean' }, diff --git a/packages/ui/stories/components/icons/FileIcons.stories.tsx b/packages/ui/stories/components/icons/FileIcons.stories.tsx index 03a20e222c..e638448049 100644 --- a/packages/ui/stories/components/icons/FileIcons.stories.tsx +++ b/packages/ui/stories/components/icons/FileIcons.stories.tsx @@ -6,7 +6,7 @@ import { FilePngIcon, FileSvgIcon } from '../../../src/components/icons/FileIcon const FileIconsShowcase = () =>
const meta: Meta = { - title: 'Icons/FileIcons', + title: 'Components/Icons/FileIcons', component: FileIconsShowcase, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/icons/Icon.stories.tsx b/packages/ui/stories/components/icons/Icon.stories.tsx index 1628f1bd8d..e12a45c5a6 100644 --- a/packages/ui/stories/components/icons/Icon.stories.tsx +++ b/packages/ui/stories/components/icons/Icon.stories.tsx @@ -20,7 +20,7 @@ import { const IconShowcase = () =>
const meta: Meta = { - title: 'Icons/Icon', + title: 'Components/Icons/Icon', component: IconShowcase, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/icons/SvgSpinners180Ring.stories.tsx b/packages/ui/stories/components/icons/SvgSpinners180Ring.stories.tsx index 54f08ca5b8..8a13af9297 100644 --- a/packages/ui/stories/components/icons/SvgSpinners180Ring.stories.tsx +++ b/packages/ui/stories/components/icons/SvgSpinners180Ring.stories.tsx @@ -3,12 +3,18 @@ import type { Meta, StoryObj } from '@storybook/react' import SvgSpinners180Ring from '../../../src/components/icons/SvgSpinners180Ring' const meta: Meta = { - title: 'Icons/SvgSpinners180Ring', + title: 'Components/Icons/SvgSpinners180Ring', component: SvgSpinners180Ring, parameters: { - layout: 'centered' + layout: 'centered', + docs: { + description: { + component: + '⚠️ **已废弃** - 此组件使用频率为 0 次,不符合 UI 库提取标准(需 ≥3 次)。计划在未来版本中移除。虽然主项目中有本地副本,但完全未被导入使用。' + } + } }, - tags: ['autodocs'], + tags: ['autodocs', 'deprecated'], argTypes: { size: { description: '加载图标大小', diff --git a/packages/ui/stories/components/icons/ToolsCallingIcon.stories.tsx b/packages/ui/stories/components/icons/ToolsCallingIcon.stories.tsx index 9e4d34f77a..55536e90ba 100644 --- a/packages/ui/stories/components/icons/ToolsCallingIcon.stories.tsx +++ b/packages/ui/stories/components/icons/ToolsCallingIcon.stories.tsx @@ -3,12 +3,18 @@ import type { Meta, StoryObj } from '@storybook/react' import ToolsCallingIcon from '../../../src/components/icons/ToolsCallingIcon' const meta: Meta = { - title: 'Icons/ToolsCallingIcon', + title: 'Components/Icons/ToolsCallingIcon', component: ToolsCallingIcon, parameters: { - layout: 'centered' + layout: 'centered', + docs: { + description: { + component: + '⚠️ **已废弃** - 此组件使用频率仅为 1 次,不符合 UI 库提取标准(需 ≥3 次)。计划在未来版本中移除。建议直接使用 lucide-react 的 Wrench 图标。' + } + } }, - tags: ['autodocs'], + tags: ['autodocs', 'deprecated'], argTypes: { className: { description: '容器的自定义 CSS 类名', diff --git a/packages/ui/stories/components/primitives/Button.stories.tsx b/packages/ui/stories/components/primitives/Button.stories.tsx new file mode 100644 index 0000000000..a2254e2eae --- /dev/null +++ b/packages/ui/stories/components/primitives/Button.stories.tsx @@ -0,0 +1,345 @@ +import type { Meta, StoryObj } from '@storybook/react' +import { ChevronRight, Loader2, Mail } from 'lucide-react' + +import { Button } from '../../../src/components' + +const meta: Meta = { + title: 'Components/Primitives/Button', + component: Button, + parameters: { + layout: 'centered', + docs: { + description: { + component: 'Displays a button or a component that looks like a button. Based on shadcn/ui.' + } + } + }, + tags: ['autodocs'], + argTypes: { + variant: { + control: { type: 'select' }, + options: ['default', 'destructive', 'outline', 'secondary', 'ghost', 'link'], + description: 'The visual style variant of the button' + }, + size: { + control: { type: 'select' }, + options: ['default', 'sm', 'lg', 'icon', 'icon-sm', 'icon-lg'], + description: 'The size of the button' + }, + disabled: { + control: { type: 'boolean' }, + description: 'Whether the button is disabled' + }, + asChild: { + control: { type: 'boolean' }, + description: 'Render as a child element' + }, + className: { + control: { type: 'text' }, + description: 'Additional CSS classes' + } + } +} + +export default meta +type Story = StoryObj + +// Default +export const Default: Story = { + args: { + children: 'Button' + } +} + +// Variants +export const Secondary: Story = { + args: { + variant: 'secondary', + children: 'Secondary' + } +} + +export const Destructive: Story = { + args: { + variant: 'destructive', + children: 'Destructive' + } +} + +export const Outline: Story = { + args: { + variant: 'outline', + children: 'Outline' + } +} + +export const Ghost: Story = { + args: { + variant: 'ghost', + children: 'Ghost' + } +} + +export const Link: Story = { + args: { + variant: 'link', + children: 'Link' + } +} + +// All Variants +export const AllVariants: Story = { + render: () => ( +
+ + + + + + +
+ ) +} + +// Sizes +export const Small: Story = { + args: { + size: 'sm', + children: 'Small' + } +} + +export const Large: Story = { + args: { + size: 'lg', + children: 'Large' + } +} + +export const AllSizes: Story = { + render: () => ( +
+ + + +
+ ) +} + +// Icon Buttons +export const IconButton: Story = { + render: () => ( + + ) +} + +export const AllIconSizes: Story = { + render: () => ( +
+ + + +
+ ) +} + +// With Icon +export const WithIcon: Story = { + render: () => ( +
+ + + +
+ ) +} + +// Loading +export const Loading: Story = { + render: () => ( +
+ + +
+ ) +} + +// Rounded +export const Rounded: Story = { + render: () => ( +
+ + + +
+ ) +} + +// States +export const Disabled: Story = { + args: { + disabled: true, + children: 'Disabled' + } +} + +export const AllStates: Story = { + render: () => ( +
+ + + + +
+ ) +} + +// Full Width +export const FullWidth: Story = { + render: () => ( +
+ +
+ ) +} + +// As Child - Composition Pattern +// Note: asChild uses Radix UI's Slot component to merge Button's props +// with a single child element. The child must support prop spreading. +// Warning: asChild does NOT support loading prop (Slot requires single child) +export const AsChild: Story = { + render: () => ( +
+
+

Using asChild to render as an anchor tag:

+ +
+
+

Using asChild with link variant:

+ +
+
+

+ Note: The{' '} + asChild prop does not work with{' '} + loading because Radix Slot + requires a single child element. +

+
+
+ ) +} + +// Real World Examples +export const RealWorldExamples: Story = { + render: () => ( +
+ {/* Action Buttons */} +
+

Action Buttons

+
+ + + +
+
+ + {/* Icon Buttons */} +
+

Icon Buttons

+
+ + + +
+
+ + {/* Loading States */} +
+

Loading States

+
+ + +
+
+ + {/* With Icons */} +
+

Buttons with Icons

+
+ + +
+
+ + {/* Rounded Variants */} +
+

Rounded Buttons

+
+ + + +
+
+
+ ) +} diff --git a/packages/ui/stories/components/base/CopyButton.stories.tsx b/packages/ui/stories/components/primitives/CopyButton.stories.tsx similarity index 96% rename from packages/ui/stories/components/base/CopyButton.stories.tsx rename to packages/ui/stories/components/primitives/CopyButton.stories.tsx index db78b10c6a..afe82aedab 100644 --- a/packages/ui/stories/components/base/CopyButton.stories.tsx +++ b/packages/ui/stories/components/primitives/CopyButton.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react' -import CopyButton from '../../../src/components/primitives/copyButton' +import { CopyButton } from '../../../src/components' const meta: Meta = { - title: 'Base/CopyButton', + title: 'Components/Primitives/CopyButton', component: CopyButton, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/base/CustomTag.stories.tsx b/packages/ui/stories/components/primitives/CustomTag.stories.tsx similarity index 96% rename from packages/ui/stories/components/base/CustomTag.stories.tsx rename to packages/ui/stories/components/primitives/CustomTag.stories.tsx index 5e8bc1e6e0..3e5a3ea494 100644 --- a/packages/ui/stories/components/base/CustomTag.stories.tsx +++ b/packages/ui/stories/components/primitives/CustomTag.stories.tsx @@ -2,10 +2,10 @@ import type { Meta, StoryObj } from '@storybook/react-vite' import { AlertTriangleIcon, StarIcon } from 'lucide-react' import { action } from 'storybook/actions' -import CustomTag from '../../../src/components/primitives/customTag' +import { CustomTag } from '../../../src/components' const meta: Meta = { - title: 'Base/CustomTag', + title: 'Components/Primitives/CustomTag', component: CustomTag, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/base/DividerWithText.stories.tsx b/packages/ui/stories/components/primitives/DividerWithText.stories.tsx similarity index 98% rename from packages/ui/stories/components/base/DividerWithText.stories.tsx rename to packages/ui/stories/components/primitives/DividerWithText.stories.tsx index 915f10b0cc..9b62cda1b7 100644 --- a/packages/ui/stories/components/base/DividerWithText.stories.tsx +++ b/packages/ui/stories/components/primitives/DividerWithText.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react' -import DividerWithText from '../../../src/components/primitives/dividerWithText' +import { DividerWithText } from '../../../src/components' const meta: Meta = { - title: 'Base/DividerWithText', + title: 'Components/Primitives/DividerWithText', component: DividerWithText, parameters: { layout: 'padded' diff --git a/packages/ui/stories/components/base/EmojiAvatar.stories.tsx b/packages/ui/stories/components/primitives/EmojiAvatar.stories.tsx similarity index 97% rename from packages/ui/stories/components/base/EmojiAvatar.stories.tsx rename to packages/ui/stories/components/primitives/EmojiAvatar.stories.tsx index e1c2368214..c9eb542269 100644 --- a/packages/ui/stories/components/base/EmojiAvatar.stories.tsx +++ b/packages/ui/stories/components/primitives/EmojiAvatar.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react' -import EmojiAvatar from '../../../src/components/primitives/Avatar/EmojiAvatar' +import { EmojiAvatar } from '../../../src/components' const meta: Meta = { - title: 'Display/EmojiAvatar', + title: 'Components/Primitives/EmojiAvatar', component: EmojiAvatar, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/base/EmojiIcon.stories.tsx b/packages/ui/stories/components/primitives/EmojiIcon.stories.tsx similarity index 98% rename from packages/ui/stories/components/base/EmojiIcon.stories.tsx rename to packages/ui/stories/components/primitives/EmojiIcon.stories.tsx index d76d277f9d..7108e71349 100644 --- a/packages/ui/stories/components/base/EmojiIcon.stories.tsx +++ b/packages/ui/stories/components/primitives/EmojiIcon.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react' -import EmojiIcon from '../../../src/components/primitives/emojiIcon' +import { EmojiIcon } from '../../../src/components' const meta: Meta = { - title: 'Base/EmojiIcon', + title: 'Components/Primitives/EmojiIcon', component: EmojiIcon, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/base/ErrorBoundary.stories.tsx b/packages/ui/stories/components/primitives/ErrorBoundary.stories.tsx similarity index 97% rename from packages/ui/stories/components/base/ErrorBoundary.stories.tsx rename to packages/ui/stories/components/primitives/ErrorBoundary.stories.tsx index e40f62e3ae..65ecc15107 100644 --- a/packages/ui/stories/components/base/ErrorBoundary.stories.tsx +++ b/packages/ui/stories/components/primitives/ErrorBoundary.stories.tsx @@ -1,9 +1,9 @@ -import { Button } from '@heroui/react' +import { Button } from '../../../src/components' import type { Meta, StoryObj } from '@storybook/react' import { useState } from 'react' -import type { CustomFallbackProps } from '../../../src/components/primitives/ErrorBoundary' -import { ErrorBoundary } from '../../../src/components/primitives/ErrorBoundary' +import type { CustomFallbackProps } from '../../../src/components' +import { ErrorBoundary } from '../../../src/components' // 错误组件 - 用于触发错误 const ThrowErrorComponent = ({ shouldThrow = false, errorMessage = '这是一个模拟错误' }) => { @@ -36,7 +36,7 @@ const AsyncErrorComponent = () => { } const meta: Meta = { - title: 'Base/ErrorBoundary', + title: 'Components/Primitives/ErrorBoundary', component: ErrorBoundary, parameters: { layout: 'padded' diff --git a/packages/ui/stories/components/base/IndicatorLight.stories.tsx b/packages/ui/stories/components/primitives/IndicatorLight.stories.tsx similarity index 98% rename from packages/ui/stories/components/base/IndicatorLight.stories.tsx rename to packages/ui/stories/components/primitives/IndicatorLight.stories.tsx index dbb080ae6d..ab80ea61cb 100644 --- a/packages/ui/stories/components/base/IndicatorLight.stories.tsx +++ b/packages/ui/stories/components/primitives/IndicatorLight.stories.tsx @@ -1,9 +1,9 @@ import type { Meta, StoryObj } from '@storybook/react' -import IndicatorLight from '../../../src/components/primitives/indicatorLight' +import { IndicatorLight } from '../../../src/components' const meta: Meta = { - title: 'Base/IndicatorLight', + title: 'Components/Primitives/IndicatorLight', component: IndicatorLight, parameters: { layout: 'centered' diff --git a/packages/ui/stories/components/base/Spinner.stories.tsx b/packages/ui/stories/components/primitives/Spinner.stories.tsx similarity index 98% rename from packages/ui/stories/components/base/Spinner.stories.tsx rename to packages/ui/stories/components/primitives/Spinner.stories.tsx index 730f5e56bd..399e09fd98 100644 --- a/packages/ui/stories/components/base/Spinner.stories.tsx +++ b/packages/ui/stories/components/primitives/Spinner.stories.tsx @@ -1,11 +1,11 @@ -import { Button } from '@heroui/react' +import { Button } from '../../../src/components' import type { Meta, StoryObj } from '@storybook/react' import { useState } from 'react' -import Spinner from '../../../src/components/primitives/spinner' +import { Spinner } from '../../../src/components' const meta: Meta = { - title: 'Base/Spinner', + title: 'Components/Primitives/Spinner', component: Spinner, parameters: { layout: 'centered' diff --git a/packages/ui/stories/hero.ts b/packages/ui/stories/hero.ts deleted file mode 100644 index 8e847137e8..0000000000 --- a/packages/ui/stories/hero.ts +++ /dev/null @@ -1,3 +0,0 @@ -// hero.ts -import { heroui } from '@heroui/react' -export default heroui() diff --git a/packages/ui/stories/tailwind.css b/packages/ui/stories/tailwind.css index b3f097db26..5ea3861389 100644 --- a/packages/ui/stories/tailwind.css +++ b/packages/ui/stories/tailwind.css @@ -1,5 +1,6 @@ /* Storybook 专用的 Tailwind CSS 配置 */ @import 'tailwindcss'; +@import '../src/styles/theme.css'; /* 扫描组件文件 */ @source '../src/components/**/*.{js,ts,jsx,tsx}'; @@ -7,7 +8,5 @@ /* 扫描 stories 文件 */ @source './components/**/*.{js,ts,jsx,tsx}'; -/* HeroUI 组件样式 */ -@plugin './hero.ts'; -@source '../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}'; +/* Dark mode support */ @custom-variant dark (&:is(.dark *)); diff --git a/packages/ui/todocss.css b/packages/ui/todocss.css deleted file mode 100644 index 0f7ed153db..0000000000 --- a/packages/ui/todocss.css +++ /dev/null @@ -1,870 +0,0 @@ -:root { - /* Typography: Desktop mode */ - --Font_family--Heading: Inter; - --Font_weight--Regular: 400px; - --Font_size--Heading--2xl: 60px; - --Font_size--Heading--xl: 48px; - --Font_size--Heading--lg: 40px; - --Font_size--Heading--md: 32px; - --Font_size--Heading--sm: 24px; - --Font_size--Heading--xs: 20px; - --Line_height--Heading--xl: 80px; - --Line_height--Body--lg: 28px; - --Line_height--Body--md: 24px; - --Line_height--Body--sm: 24px; - --Line_height--Body--xs: 20px; - --Paragraph_spacing--Body--lg: 18px; - --Paragraph_spacing--Body--md: 16px; - --Paragraph_spacing--Body--sm: 14px; - --Paragraph_spacing--Body--xs: 12px; - --Line_height--Heading--lg: 60px; - --Line_height--Heading--md: 48px; - --Line_height--Heading--sm: 40px; - --Line_height--Heading--xs: 32px; - --Font_size--Body--lg: 18px; - --Font_size--Body--md: 16px; - --Font_size--Body--sm: 14px; - --Font_size--Body--xs: 12px; - --Font_weight--Italic: 400px; - --Font_weight--Medium: 500px; - --Font_weight--Bold: 700px; - --Font_family--Body: Inter; - --Paragraph_spacing--Heading--2xl: 60px; - --Paragraph_spacing--Heading--xl: 48px; - --Paragraph_spacing--Heading--lg: 40px; - --Paragraph_spacing--Heading--md: 32px; - --Paragraph_spacing--Heading--sm: 24px; - --Paragraph_spacing--Heading--xs: 20px; - --typography_components--h1--font-family: Inter; - --typography_components--h2--font-family: Inter; - --typography_components--h2--font-size: 30px; - --typography_components--h2--line-height: 36px; - --typography_components--h2--font-weight: 600; - --typography_components--h2--letter-spacing: -0.4000000059604645px; - --typography_components--h1--font-size: 36px; - --typography_components--h1--font-size-lg: 48px; - --typography_components--h1--line-height: 40px; - --typography_components--h1--font-weight: 800; - --typography_components--h1--letter-spacing: -0.4000000059604645px; - --typography_components--h3--font-family: Inter; - --typography_components--h3--font-size: 24px; - --typography_components--h3--line-height: 32px; - --typography_components--h3--font-weight: 600; - --typography_components--h3--letter-spacing: -0.4000000059604645px; - --typography_components--h4--font-family: Inter; - --typography_components--h4--font-size: 20px; - --typography_components--h4--line-height: 28px; - --typography_components--h4--font-weight: 600; - --typography_components--h4--letter-spacing: -0.4000000059604645px; - --typography_components--p--font-family: Inter; - --typography_components--p--font-size: 16px; - --typography_components--p--line-height: 28px; - --typography_components--p--font-weight: 400; - --typography_components--p--letter-spacing: 0px; - --typography_components--blockquote--font-family: Inter; - --typography_components--blockquote--font-size: 16px; - --typography_components--blockquote--line-height: 24px; - --typography_components--blockquote--letter-spacing: 0px; - --typography_components--blockquote--font-style: italic; - --typography_components--list--font-family: Inter; - --typography_components--list--font-size: 16px; - --typography_components--list--line-height: 28px; - --typography_components--list--letter-spacing: 0px; - --typography_components--inline_code--font-family: Menlo; - --typography_components--inline_code--font-size: 14px; - --typography_components--inline_code--line-height: 20px; - --typography_components--inline_code--font-weight: 600; - --typography_components--inline_code--letter-spacing: 0px; - --typography_components--lead--font-family: Inter; - --typography_components--lead--font-size: 20px; - --typography_components--lead--line-height: 28px; - --typography_components--lead--font-weight: 400; - --typography_components--lead--letter-spacing: 0px; - --typography_components--large--font-family: Inter; - --typography_components--large--font-size: 18px; - --typography_components--large--line-height: 28px; - --typography_components--large--font-weight: 600; - --typography_components--large--letter-spacing: 0px; - --typography_components--small--font-family: Inter; - --typography_components--small--font-size: 14px; - --typography_components--small--line-height: 14px; - --typography_components--small--font-weight: 500; - --typography_components--table--font-family: Inter; - --typography_components--table--font-size: 16px; - --typography_components--table--font-weight: 400; - --typography_components--table--font-weight-bold: 700; - --typography_components--table--letter-spacing: 0px; - - /* Spacing and sizing: Desktop */ - --Border_width--sm: 1px; - --Border_width--md: 2px; - --Border_width--lg: 3px; - --Radius--4xs: 4px; - --Radius--3xs: 8px; - --Radius--2xs: 12px; - --Radius--xs: 16px; - --Radius--sm: 24px; - --Radius--md: 32px; - --Radius--lg: 40px; - --Radius--xl: 48px; - --Radius--2xl: 56px; - --Radius--3xl: 64px; - --Radius--round: 999px; - --Spacing--5xs: 4px; - --Spacing--4xs: 8px; - --Spacing--3xs: 12px; - --Spacing--2xs: 16px; - --Spacing--xs: 24px; - --Spacing--sm: 32px; - --Spacing--md: 40px; - --Spacing--lg: 48px; - --Spacing--xl: 56px; - --Spacing--2xl: 64px; - --Spacing--3xl: 72px; - --Spacing--4xl: 80px; - --Spacing--5xl: 88px; - --Spacing--6xl: 96px; - --Spacing--7xl: 104px; - --Spacing--8xl: 112px; - --Sizing--5xs: 4px; - --Sizing--4xs: 8px; - --Sizing--3xs: 12px; - --Sizing--2xs: 16px; - --Sizing--xs: 24px; - --Sizing--sm: 32px; - --Sizing--md: 40px; - --Sizing--lg: 48px; - --Sizing--xl: 56px; - --Sizing--2xl: 64px; - --Sizing--3xl: 72px; - --Sizing--4xl: 80px; - --Sizing--5xl: 88px; - - /* Color: Light mode */ - --Opacity--Red--Red-100: var(--Primitive--Red--600); - --Opacity--Red--Red-80: hsla(0, 72%, 51%, 0.8); - --Opacity--Red--Red-60: hsla(0, 72%, 51%, 0.6); - --Opacity--Red--Red-40: hsla(0, 72%, 51%, 0.4); - --Opacity--Red--Red-20: hsla(0, 72%, 51%, 0.2); - --Opacity--Red--Red-10: hsla(0, 72%, 51%, 0.1); - --Opacity--Green--Green-100: var(--Primitive--Green--600); - --Opacity--Green--Green-80: hsla(142, 76%, 36%, 0.8); - --Opacity--Green--Green-60: hsla(142, 76%, 36%, 0.6); - --Opacity--Green--Green-40: hsla(142, 76%, 36%, 0.4); - --Opacity--Green--Green-20: hsla(142, 76%, 36%, 0.2); - --Opacity--Green--Green-10: hsla(142, 76%, 36%, 0.1); - --Opacity--Yellow--Yellow-100: var(--Primitive--Amber--400); - --Opacity--Yellow--Yellow-80: hsla(48, 96%, 53%, 0.8); - --Opacity--Yellow--Yellow-60: hsla(48, 96%, 53%, 0.6); - --Opacity--Yellow--Yellow-40: hsla(48, 96%, 53%, 0.4); - --Opacity--Yellow--Yellow-20: hsla(48, 96%, 53%, 0.2); - --Opacity--Yellow--Yellow-10: hsla(48, 96%, 53%, 0.1); - --Opacity--Violet--Violet-100: var(--Primitive--Violet--500); - --Opacity--Violet--Violet-80: hsla(258, 90%, 66%, 0.8); - --Opacity--Violet--Violet-60: hsla(258, 90%, 66%, 0.6); - --Opacity--Violet--Violet-40: hsla(258, 90%, 66%, 0.4); - --Opacity--Violet--Violet-20: hsla(258, 90%, 66%, 0.2); - --Opacity--Violet--Violet-10: hsla(258, 90%, 66%, 0.1); - --Opacity--Indigo--Indigo-100: var(--Primitive--Indigo--500); - --Opacity--Indigo--Indigo-80: hsla(239, 84%, 67%, 0.8); - --Opacity--Indigo--Indigo-60: hsla(239, 84%, 67%, 0.6); - --Opacity--Indigo--Indigo-40: hsla(239, 84%, 67%, 0.4); - --Opacity--Indigo--Indigo-20: hsla(239, 84%, 67%, 0.2); - --Opacity--Indigo--Indigo-10: hsla(239, 84%, 67%, 0.1); - --Opacity--Blue--Blue-100: var(--Primitive--Blue--500); - --Opacity--Blue--Blue-80: hsla(217, 91%, 60%, 0.8); - --Opacity--Blue--Blue-60: hsla(217, 91%, 60%, 0.6); - --Opacity--Blue--Blue-40: hsla(217, 91%, 60%, 0.4); - --Opacity--Blue--Blue-20: hsla(217, 91%, 60%, 0.2); - --Opacity--Blue--Blue-10: hsla(217, 91%, 60%, 0.1); - --Opacity--Grey--Grey-100: var(--Primitive--Gray--500); - --Opacity--Grey--Grey-80: hsla(220, 9%, 46%, 0.8); - --Opacity--Grey--Grey-60: hsla(220, 9%, 46%, 0.6); - --Opacity--Grey--Grey-40: hsla(220, 9%, 46%, 0.4); - --Opacity--Grey--Grey-20: hsla(220, 9%, 46%, 0.2); - --Opacity--Grey--Grey-10: hsla(220, 9%, 46%, 0.1); - --Opacity--White--White-100: var(--Primitive--White); - --Opacity--White--White-80: hsla(0, 0%, 100%, 0.8); - --Opacity--White--White-60: hsla(0, 0%, 100%, 0.6); - --Opacity--White--White-40: hsla(0, 0%, 100%, 0.4); - --Opacity--White--White-20: hsla(0, 0%, 100%, 0.2); - --Opacity--White--White-10: hsla(0, 0%, 100%, 0.1); - --Opacity--White--White-0: hsla(0, 0%, 100%, 0); - --Status--Error--colorErrorBg: var(--color--Red--50); - --Status--Error--colorErrorBgHover: var(--color--Red--100); - --Status--Error--colorErrorBorder: var(--color--Red--200); - --Status--Error--colorErrorBorderHover: var(--color--Red--300); - --Status--Error--colorErrorBase: var(--color--Red--500); - --Status--Error--colorErrorActive: var(--color--Red--600); - --Status--Error--colorErrorTextHover: var(--color--Red--700); - --Status--Error--colorErrorText: var(--color--Red--800); - --Status--Success--colorSuccessBg: var(--color--Green--50); - --Status--Success--colorSuccessBgHover: var(--color--Green--100); - --Status--Success--colorSuccessBase: var(--color--Green--500); - --Status--Success--colorSuccessTextHover: var(--color--Green--700); - --Status--Warning--colorWarningBg: var(--color--Yellow--50); - --Status--Warning--colorWarningBgHover: var(--color--Yellow--100); - --Status--Warning--colorWarningBase: var(--color--Yellow--500); - --Status--Warning--colorWarningActive: var(--color--Yellow--600); - --Status--Warning--colorWarningTextHover: var(--color--Yellow--700); - --Primitive--Black: hsla(0, 0%, 0%, 1); - --Primitive--White: hsla(0, 0%, 100%, 1); - --Brand--Base_Colors--Primary: var(--Primitive--Lime--500); - --Primitive--Neutral--50: hsla(0, 0%, 98%, 1); - --Primitive--Neutral--100: hsla(0, 0%, 96%, 1); - --Primitive--Neutral--200: hsla(0, 0%, 90%, 1); - --Primitive--Neutral--300: hsla(0, 0%, 83%, 1); - --Primitive--Neutral--400: hsla(0, 0%, 64%, 1); - --Primitive--Neutral--500: hsla(0, 0%, 45%, 1); - --Primitive--Neutral--600: hsla(215, 14%, 34%, 1); - --Primitive--Neutral--700: hsla(0, 0%, 25%, 1); - --Primitive--Neutral--800: hsla(0, 0%, 15%, 1); - --Primitive--Neutral--900: hsla(0, 0%, 9%, 1); - --Primitive--Neutral--950: hsla(0, 0%, 4%, 1); - --Primitive--Stone--50: hsla(60, 9%, 98%, 1); - --Primitive--Stone--100: hsla(60, 5%, 96%, 1); - --Primitive--Stone--200: hsla(20, 6%, 90%, 1); - --Primitive--Stone--300: hsla(24, 6%, 83%, 1); - --Primitive--Stone--400: hsla(24, 5%, 64%, 1); - --Primitive--Stone--500: hsla(25, 5%, 45%, 1); - --Primitive--Stone--600: hsla(33, 5%, 32%, 1); - --Primitive--Stone--700: hsla(30, 6%, 25%, 1); - --Primitive--Stone--800: hsla(12, 6%, 15%, 1); - --Primitive--Stone--900: hsla(24, 10%, 10%, 1); - --Primitive--Stone--950: hsla(20, 14%, 4%, 1); - --Primitive--Zinc--50: hsla(0, 0%, 98%, 1); - --Primitive--Zinc--100: hsla(240, 5%, 96%, 1); - --Primitive--Zinc--200: hsla(240, 6%, 90%, 1); - --Primitive--Zinc--300: hsla(240, 5%, 84%, 1); - --Primitive--Zinc--400: hsla(240, 5%, 65%, 1); - --Primitive--Zinc--500: hsla(240, 4%, 46%, 1); - --Primitive--Zinc--600: hsla(240, 5%, 34%, 1); - --Primitive--Zinc--700: hsla(240, 5%, 26%, 1); - --Primitive--Zinc--800: hsla(240, 4%, 16%, 1); - --Primitive--Zinc--900: hsla(240, 6%, 10%, 1); - --Primitive--Zinc--950: hsla(240, 10%, 4%, 1); - --Primitive--Slate--50: hsla(210, 40%, 98%, 1); - --Primitive--Slate--100: hsla(210, 40%, 96%, 1); - --Primitive--Slate--200: hsla(214, 32%, 91%, 1); - --Primitive--Slate--300: hsla(213, 27%, 84%, 1); - --Primitive--Slate--400: hsla(215, 20%, 65%, 1); - --Primitive--Slate--500: hsla(215, 16%, 47%, 1); - --Primitive--Slate--600: hsla(215, 19%, 35%, 1); - --Primitive--Slate--700: hsla(215, 25%, 27%, 1); - --Primitive--Slate--800: hsla(217, 33%, 17%, 1); - --Primitive--Slate--900: hsla(222, 47%, 11%, 1); - --Primitive--Slate--950: hsla(229, 84%, 5%, 1); - --Primitive--Gray--50: hsla(210, 20%, 98%, 1); - --Primitive--Gray--100: hsla(220, 14%, 96%, 1); - --Primitive--Gray--200: hsla(220, 13%, 91%, 1); - --Primitive--Gray--300: hsla(216, 12%, 84%, 1); - --Primitive--Gray--400: hsla(218, 11%, 65%, 1); - --Primitive--Gray--500: hsla(220, 9%, 46%, 1); - --Primitive--Gray--600: hsla(0, 0%, 32%, 1); - --Primitive--Gray--700: hsla(217, 19%, 27%, 1); - --Primitive--Gray--800: hsla(215, 28%, 17%, 1); - --Primitive--Gray--900: hsla(221, 39%, 11%, 1); - --Primitive--Gray--950: hsla(224, 71%, 4%, 1); - --Primitive--Red--50: hsla(0, 86%, 97%, 1); - --Primitive--Red--100: hsla(0, 93%, 94%, 1); - --Primitive--Red--200: hsla(0, 96%, 89%, 1); - --Primitive--Red--300: hsla(0, 94%, 82%, 1); - --Primitive--Red--400: hsla(0, 91%, 71%, 1); - --Primitive--Red--500: hsla(0, 84%, 60%, 1); - --Primitive--Red--600: hsla(0, 72%, 51%, 1); - --Primitive--Red--700: hsla(0, 74%, 42%, 1); - --Primitive--Red--800: hsla(0, 70%, 35%, 1); - --Primitive--Red--900: hsla(0, 63%, 31%, 1); - --Primitive--Red--950: hsla(0, 75%, 15%, 1); - --Primitive--Orange--50: hsla(33, 100%, 96%, 1); - --Primitive--Orange--100: hsla(34, 100%, 92%, 1); - --Primitive--Orange--200: hsla(32, 98%, 83%, 1); - --Primitive--Orange--300: hsla(31, 97%, 72%, 1); - --Primitive--Orange--400: hsla(27, 96%, 61%, 1); - --Primitive--Orange--500: hsla(25, 95%, 53%, 1); - --Primitive--Orange--600: hsla(21, 90%, 48%, 1); - --Primitive--Orange--700: hsla(17, 88%, 40%, 1); - --Primitive--Orange--800: hsla(15, 79%, 34%, 1); - --Primitive--Orange--900: hsla(15, 75%, 28%, 1); - --Primitive--Orange--950: hsla(13, 81%, 15%, 1); - --Primitive--Amber--50: hsla(48, 100%, 96%, 1); - --Primitive--Amber--100: hsla(48, 96%, 89%, 1); - --Primitive--Amber--200: hsla(48, 97%, 77%, 1); - --Primitive--Amber--300: hsla(46, 97%, 65%, 1); - --Primitive--Amber--400: hsla(43, 96%, 56%, 1); - --Primitive--Amber--500: hsla(38, 92%, 50%, 1); - --Primitive--Amber--600: hsla(32, 95%, 44%, 1); - --Primitive--Amber--700: hsla(26, 90%, 37%, 1); - --Primitive--Amber--800: hsla(23, 83%, 31%, 1); - --Primitive--Amber--900: hsla(22, 78%, 26%, 1); - --Primitive--Amber--950: hsla(21, 92%, 14%, 1); - --Primitive--Yellow--50: hsla(55, 92%, 95%, 1); - --Primitive--Yellow--100: hsla(55, 97%, 88%, 1); - --Primitive--Yellow--200: hsla(53, 98%, 77%, 1); - --Primitive--Yellow--300: hsla(50, 98%, 64%, 1); - --Primitive--Yellow--400: hsla(48, 96%, 53%, 1); - --Primitive--Yellow--500: hsla(45, 93%, 47%, 1); - --Primitive--Yellow--600: hsla(41, 96%, 40%, 1); - --Primitive--Yellow--700: hsla(35, 92%, 33%, 1); - --Primitive--Yellow--800: hsla(32, 81%, 29%, 1); - --Primitive--Yellow--900: hsla(28, 73%, 26%, 1); - --Primitive--Yellow--950: hsla(26, 83%, 14%, 1); - --Primitive--Lime--50: hsla(78, 92%, 95%, 1); - --Primitive--Lime--100: hsla(80, 89%, 89%, 1); - --Primitive--Lime--200: hsla(81, 88%, 80%, 1); - --Primitive--Lime--300: hsla(82, 85%, 67%, 1); - --Primitive--Lime--400: hsla(83, 78%, 55%, 1); - --Primitive--Lime--500: hsla(84, 81%, 44%, 1); - --Primitive--Lime--600: hsla(85, 85%, 35%, 1); - --Primitive--Lime--700: hsla(86, 78%, 27%, 1); - --Primitive--Lime--800: hsla(86, 69%, 23%, 1); - --Primitive--Lime--900: hsla(88, 61%, 20%, 1); - --Primitive--Lime--950: hsla(89, 80%, 10%, 1); - --Primitive--Green--50: hsla(138, 76%, 97%, 1); - --Primitive--Green--100: hsla(141, 84%, 93%, 1); - --Primitive--Green--200: hsla(141, 79%, 85%, 1); - --Primitive--Green--300: hsla(142, 77%, 73%, 1); - --Primitive--Green--400: hsla(142, 69%, 58%, 1); - --Primitive--Green--500: hsla(142, 71%, 45%, 1); - --Primitive--Green--600: hsla(142, 76%, 36%, 1); - --Primitive--Green--700: hsla(142, 72%, 29%, 1); - --Primitive--Green--800: hsla(143, 64%, 24%, 1); - --Primitive--Green--900: hsla(144, 61%, 20%, 1); - --Primitive--Green--950: hsla(145, 80%, 10%, 1); - --Primitive--Emerald--50: hsla(152, 81%, 96%, 1); - --Primitive--Emerald--100: hsla(149, 80%, 90%, 1); - --Primitive--Emerald--200: hsla(152, 76%, 80%, 1); - --Primitive--Emerald--300: hsla(156, 72%, 67%, 1); - --Primitive--Emerald--400: hsla(158, 64%, 52%, 1); - --Primitive--Emerald--500: hsla(160, 84%, 39%, 1); - --Primitive--Emerald--600: hsla(161, 94%, 30%, 1); - --Primitive--Emerald--700: hsla(163, 94%, 24%, 1); - --Primitive--Emerald--800: hsla(163, 88%, 20%, 1); - --Primitive--Emerald--900: hsla(164, 86%, 16%, 1); - --Primitive--Emerald--950: hsla(166, 91%, 9%, 1); - --Primitive--Teal--50: hsla(166, 76%, 97%, 1); - --Primitive--Teal--100: hsla(167, 85%, 89%, 1); - --Primitive--Teal--200: hsla(168, 84%, 78%, 1); - --Primitive--Teal--300: hsla(171, 77%, 64%, 1); - --Primitive--Teal--400: hsla(172, 66%, 50%, 1); - --Primitive--Teal--500: hsla(173, 80%, 40%, 1); - --Primitive--Teal--600: hsla(175, 84%, 32%, 1); - --Primitive--Teal--700: hsla(175, 77%, 26%, 1); - --Primitive--Teal--800: hsla(176, 69%, 22%, 1); - --Primitive--Teal--900: hsla(176, 61%, 19%, 1); - --Primitive--Teal--950: hsla(179, 84%, 10%, 1); - --Primitive--Cyan--50: hsla(183, 100%, 96%, 1); - --Primitive--Cyan--100: hsla(185, 96%, 90%, 1); - --Primitive--Cyan--200: hsla(186, 94%, 82%, 1); - --Primitive--Cyan--300: hsla(187, 92%, 69%, 1); - --Primitive--Cyan--400: hsla(188, 86%, 53%, 1); - --Primitive--Cyan--500: hsla(189, 94%, 43%, 1); - --Primitive--Cyan--600: hsla(192, 91%, 36%, 1); - --Primitive--Cyan--700: hsla(193, 82%, 31%, 1); - --Primitive--Cyan--800: hsla(194, 70%, 27%, 1); - --Primitive--Cyan--900: hsla(196, 64%, 24%, 1); - --Primitive--Cyan--950: hsla(197, 79%, 15%, 1); - --Primitive--Sky--50: hsla(204, 100%, 97%, 1); - --Primitive--Sky--100: hsla(204, 94%, 94%, 1); - --Primitive--Sky--200: hsla(201, 94%, 86%, 1); - --Primitive--Sky--300: hsla(199, 95%, 74%, 1); - --Primitive--Sky--400: hsla(198, 93%, 60%, 1); - --Primitive--Sky--500: hsla(199, 89%, 48%, 1); - --Primitive--Sky--600: hsla(200, 98%, 39%, 1); - --Primitive--Sky--700: hsla(201, 96%, 32%, 1); - --Primitive--Sky--800: hsla(201, 90%, 27%, 1); - --Primitive--Sky--900: hsla(202, 80%, 24%, 1); - --Primitive--Sky--950: hsla(204, 80%, 16%, 1); - --Primitive--Blue--50: hsla(214, 100%, 97%, 1); - --Primitive--Blue--100: hsla(214, 95%, 93%, 1); - --Primitive--Blue--200: hsla(213, 97%, 87%, 1); - --Primitive--Blue--300: hsla(212, 96%, 78%, 1); - --Primitive--Blue--400: hsla(213, 94%, 68%, 1); - --Primitive--Blue--500: hsla(217, 91%, 60%, 1); - --Primitive--Blue--600: hsla(221, 83%, 53%, 1); - --Primitive--Blue--700: hsla(224, 76%, 48%, 1); - --Primitive--Blue--800: hsla(226, 71%, 40%, 1); - --Primitive--Blue--900: hsla(224, 64%, 33%, 1); - --Primitive--Blue--950: hsla(226, 57%, 21%, 1); - --Primitive--Indigo--50: hsla(226, 100%, 97%, 1); - --Primitive--Indigo--100: hsla(226, 100%, 94%, 1); - --Primitive--Indigo--200: hsla(228, 96%, 89%, 1); - --Primitive--Indigo--300: hsla(230, 94%, 82%, 1); - --Primitive--Indigo--400: hsla(234, 89%, 74%, 1); - --Primitive--Indigo--500: hsla(239, 84%, 67%, 1); - --Primitive--Indigo--600: hsla(243, 75%, 59%, 1); - --Primitive--Indigo--700: hsla(245, 58%, 51%, 1); - --Primitive--Indigo--800: hsla(244, 55%, 41%, 1); - --Primitive--Indigo--900: hsla(242, 47%, 34%, 1); - --Primitive--Indigo--950: hsla(244, 47%, 20%, 1); - --Primitive--Violet--50: hsla(250, 100%, 98%, 1); - --Primitive--Violet--100: hsla(251, 91%, 95%, 1); - --Primitive--Violet--200: hsla(251, 95%, 92%, 1); - --Primitive--Violet--300: hsla(253, 95%, 85%, 1); - --Primitive--Violet--400: hsla(255, 92%, 76%, 1); - --Primitive--Violet--500: hsla(258, 90%, 66%, 1); - --Primitive--Violet--600: hsla(262, 83%, 58%, 1); - --Primitive--Violet--700: hsla(263, 70%, 50%, 1); - --Primitive--Violet--800: hsla(263, 69%, 42%, 1); - --Primitive--Violet--900: hsla(264, 67%, 35%, 1); - --Primitive--Violet--950: hsla(262, 78%, 23%, 1); - --Primitive--Purple--50: hsla(270, 100%, 98%, 1); - --Primitive--Purple--100: hsla(269, 100%, 95%, 1); - --Primitive--Purple--200: hsla(269, 100%, 92%, 1); - --Primitive--Purple--300: hsla(269, 97%, 85%, 1); - --Primitive--Purple--400: hsla(270, 95%, 75%, 1); - --Primitive--Purple--500: hsla(271, 91%, 65%, 1); - --Primitive--Purple--600: hsla(271, 81%, 56%, 1); - --Primitive--Purple--700: hsla(272, 72%, 47%, 1); - --Primitive--Purple--800: hsla(273, 67%, 39%, 1); - --Primitive--Purple--900: hsla(274, 66%, 32%, 1); - --Primitive--Purple--950: hsla(274, 87%, 21%, 1); - --Primitive--Fuchsia--50: hsla(289, 100%, 98%, 1); - --Primitive--Fuchsia--100: hsla(287, 100%, 95%, 1); - --Primitive--Fuchsia--200: hsla(288, 96%, 91%, 1); - --Primitive--Fuchsia--300: hsla(291, 93%, 83%, 1); - --Primitive--Fuchsia--400: hsla(292, 91%, 73%, 1); - --Primitive--Fuchsia--500: hsla(292, 84%, 61%, 1); - --Primitive--Fuchsia--600: hsla(293, 69%, 49%, 1); - --Primitive--Fuchsia--700: hsla(295, 72%, 40%, 1); - --Primitive--Fuchsia--800: hsla(295, 70%, 33%, 1); - --Primitive--Fuchsia--900: hsla(297, 64%, 28%, 1); - --Primitive--Fuchsia--950: hsla(297, 90%, 16%, 1); - --Primitive--Pink--50: hsla(327, 73%, 97%, 1); - --Primitive--Pink--100: hsla(326, 78%, 95%, 1); - --Primitive--Pink--200: hsla(326, 85%, 90%, 1); - --Primitive--Pink--300: hsla(327, 87%, 82%, 1); - --Primitive--Pink--400: hsla(329, 86%, 70%, 1); - --Primitive--Pink--500: hsla(330, 81%, 60%, 1); - --Primitive--Pink--600: hsla(333, 71%, 51%, 1); - --Primitive--Pink--700: hsla(335, 78%, 42%, 1); - --Primitive--Pink--800: hsla(336, 74%, 35%, 1); - --Primitive--Pink--900: hsla(336, 69%, 30%, 1); - --Primitive--Pink--950: hsla(336, 84%, 17%, 1); - --Primitive--Rose--50: hsla(356, 100%, 97%, 1); - --Primitive--Rose--100: hsla(356, 100%, 95%, 1); - --Primitive--Rose--200: hsla(353, 96%, 90%, 1); - --Primitive--Rose--300: hsla(353, 96%, 82%, 1); - --Primitive--Rose--400: hsla(351, 95%, 71%, 1); - --Primitive--Rose--500: hsla(350, 89%, 60%, 1); - --Primitive--Rose--600: hsla(347, 77%, 50%, 1); - --Primitive--Rose--700: hsla(345, 83%, 41%, 1); - --Primitive--Rose--800: hsla(343, 80%, 35%, 1); - --Primitive--Rose--900: hsla(342, 75%, 30%, 1); - --Primitive--Rose--950: hsla(343, 88%, 16%, 1); - --Brand--Base_Colors--Destructive: var(--Primitive--Red--500); - --Brand--Base_Colors--Success: var(--Primitive--Green--500); - --Brand--Base_Colors--Warning: var(--Primitive--Amber--500); - --Brand--Base_Colors--White: var(--Primitive--White); - --Brand--Base_Colors--Black: var(--Primitive--Black); - --Brand--Semantic_Colors--Background: var(--Primitive--Zinc--50); /*页面背景色:应用在整个页面的最底层。*/ - --Brand--Semantic_Colors--Background-subtle: hsla( - 0, - 0%, - 0%, - 0.02 - ); /*细微背景色:用于需要与主背景有微弱区分的区域,如代码块背景。*/ - --Brand--Semantic_Colors--Foreground: hsla(0, 0%, 0%, 0.9); /*主要前景/文字色:用于正文、标题等。*/ - --Brand--Semantic_Colors--Foreground-secondary: hsla(0, 0%, 0%, 0.6); /*次要前景/文字色:用于辅助性文本、描述。*/ - --Brand--Semantic_Colors--Foreground-muted: hsla(0, 0%, 0%, 0.4); /*静默前景/文字色:用于禁用状态的文字、占位符。*/ - --Brand--Semantic_Colors--Border: hsla(0, 0%, 0%, 0.1); /*默认边框色:用于卡片、输入框、分隔线。*/ - --Brand--Semantic_Colors--Border-hover: hsla(0, 0%, 0%, 0.2); /*激活边框色:用于元素被按下或激活时的边框。*/ - --Brand--Semantic_Colors--Border-active: hsla(0, 0%, 0%, 0.3); /*激活边框色:用于元素被按下或激活时的边框。*/ - --Brand--Semantic_Colors--Ring: hsla( - 84, - 81%, - 44%, - 0.4 - ); /*聚焦环颜色:用于输入框等元素在聚焦 (Focus) 状态下的外发光。*/ - --Brand--UI_Element_Colors--Modal--Backdrop: hsla(0, 0%, 0%, 0.4); - --Brand--UI_Element_Colors--Modal--Thumb: hsla(0, 0%, 0%, 0.2); - --Brand--UI_Element_Colors--Modal--Thumb_Hover: hsla(0, 0%, 0%, 0.3); - --Brand--UI_Element_Colors--Icon--Default: var(--Brand--Semantic_Colors--Foreground-secondary); - --Brand--UI_Element_Colors--Icon--Hover: var(--Brand--Semantic_Colors--Foreground); - --Brand--UI_Element_Colors--Input_Select--Background: var(--Brand--Base_Colors--White); - --Brand--UI_Element_Colors--Input_Select--Border: var(--Brand--Semantic_Colors--Border); - --Brand--UI_Element_Colors--Input_Select--Border_Hover: var(--Brand--Semantic_Colors--Border-hover); - --Brand--UI_Element_Colors--Input_Select--Border_Focus: var(--Brand--Base_Colors--Primary); - --Brand--UI_Element_Colors--Primary_Button--Background: var(--Brand--Base_Colors--Primary); - --Brand--UI_Element_Colors--Card_Container--Background: var(--Brand--Base_Colors--White); - --Brand--UI_Element_Colors--Card_Container--Border: var(--Brand--Semantic_Colors--Border); - --Brand--UI_Element_Colors--Ghost_Button--Background: hsla(0, 0%, 0%, 0); - --Brand--UI_Element_Colors--Ghost_Button--Text: var(--Brand--Semantic_Colors--Foreground); - --Brand--UI_Element_Colors--Ghost_Button--Background_Hover: hsla(0, 0%, 0%, 0.05); - --Brand--UI_Element_Colors--Ghost_Button--Background_Active: hsla(0, 0%, 0%, 0.1); - --Brand--UI_Element_Colors--Secondary_Button--Background: hsla(0, 0%, 0%, 0.05); - --Brand--UI_Element_Colors--Secondary_Button--Text: var(--Brand--Semantic_Colors--Foreground); - --Brand--UI_Element_Colors--Secondary_Button--Background_Hover: hsla(0, 0%, 0%, 0.85); - --Brand--UI_Element_Colors--Secondary_Button--Background_Active: hsla(0, 0%, 0%, 0.7); - --Brand--UI_Element_Colors--Secondary_Button--Border: var(--Brand--Semantic_Colors--Border); - --Brand--UI_Element_Colors--Primary_Button--Text: var(--Brand--Base_Colors--White); - --Brand--UI_Element_Colors--Primary_Button--Background_Hover: hsla(84, 81%, 44%, 0.85); - --Brand--UI_Element_Colors--Primary_Button--2nd_Background: hsla(84, 81%, 44%, 0.1); - --Brand--UI_Element_Colors--Primary_Button--3rd_Background: hsla(84, 81%, 44%, 0.05); - --Brand--UI_Element_Colors--Primary_Button--Background_Active: hsla(84, 81%, 44%, 0.7); - --Boolean: false; - - /* Color: Dark mode */ - --Opacity--Red--Red-100: var(--Primitive--Red--600); - --Opacity--Red--Red-80: hsla(0, 72%, 51%, 0.8); - --Opacity--Red--Red-60: hsla(0, 72%, 51%, 0.6); - --Opacity--Red--Red-40: hsla(0, 72%, 51%, 0.4); - --Opacity--Red--Red-20: hsla(0, 72%, 51%, 0.2); - --Opacity--Red--Red-10: hsla(0, 72%, 51%, 0.1); - --Opacity--Green--Green-100: var(--Primitive--Green--600); - --Opacity--Green--Green-80: hsla(142, 76%, 36%, 0.8); - --Opacity--Green--Green-60: hsla(142, 76%, 36%, 0.6); - --Opacity--Green--Green-40: hsla(142, 76%, 36%, 0.4); - --Opacity--Green--Green-20: hsla(142, 76%, 36%, 0.2); - --Opacity--Green--Green-10: hsla(142, 76%, 36%, 0.1); - --Opacity--Yellow--Yellow-100: var(--Primitive--Yellow--400); - --Opacity--Yellow--Yellow-80: hsla(48, 96%, 53%, 0.8); - --Opacity--Yellow--Yellow-60: hsla(48, 96%, 53%, 0.6); - --Opacity--Yellow--Yellow-40: hsla(48, 96%, 53%, 0.4); - --Opacity--Yellow--Yellow-20: hsla(48, 96%, 53%, 0.2); - --Opacity--Yellow--Yellow-10: hsla(48, 96%, 53%, 0.1); - --Opacity--Violet--Violet-100: var(--Primitive--Violet--500); - --Opacity--Violet--Violet-80: hsla(258, 90%, 66%, 0.8); - --Opacity--Violet--Violet-60: hsla(258, 90%, 66%, 0.6); - --Opacity--Violet--Violet-40: hsla(258, 90%, 66%, 0.4); - --Opacity--Violet--Violet-20: hsla(258, 90%, 66%, 0.2); - --Opacity--Violet--Violet-10: hsla(258, 90%, 66%, 0.1); - --Opacity--Indigo--Indigo-100: var(--Primitive--Indigo--500); - --Opacity--Indigo--Indigo-80: hsla(239, 84%, 67%, 0.8); - --Opacity--Indigo--Indigo-60: hsla(239, 84%, 67%, 0.6); - --Opacity--Indigo--Indigo-40: hsla(239, 84%, 67%, 0.4); - --Opacity--Indigo--Indigo-20: hsla(239, 84%, 67%, 0.2); - --Opacity--Indigo--Indigo-10: hsla(239, 84%, 67%, 0.1); - --Opacity--Blue--Blue-100: var(--Primitive--Blue--500); - --Opacity--Blue--Blue-80: hsla(217, 91%, 60%, 0.8); - --Opacity--Blue--Blue-60: hsla(217, 91%, 60%, 0.6); - --Opacity--Blue--Blue-40: hsla(217, 91%, 60%, 0.4); - --Opacity--Blue--Blue-20: hsla(217, 91%, 60%, 0.2); - --Opacity--Blue--Blue-10: hsla(217, 91%, 60%, 0.1); - --Opacity--Grey--Grey-100: var(--Primitive--Gray--500); - --Opacity--Grey--Grey-80: hsla(220, 9%, 46%, 0.8); - --Opacity--Grey--Grey-60: hsla(220, 9%, 46%, 0.6); - --Opacity--Grey--Grey-40: hsla(220, 9%, 46%, 0.4); - --Opacity--Grey--Grey-20: hsla(220, 9%, 46%, 0.2); - --Opacity--Grey--Grey-10: hsla(220, 9%, 46%, 0.1); - --Opacity--White--White-100: var(--Primitive--White); - --Opacity--White--White-80: hsla(0, 0%, 100%, 0.8); - --Opacity--White--White-60: hsla(0, 0%, 100%, 0.6); - --Opacity--White--White-40: hsla(0, 0%, 100%, 0.4); - --Opacity--White--White-20: hsla(0, 0%, 100%, 0.2); - --Opacity--White--White-10: hsla(0, 0%, 100%, 0.1); - --Opacity--White--White-0: hsla(0, 0%, 100%, 0); - --Status--Error--colorErrorBg: var(--color--Red--900); - --Status--Error--colorErrorBgHover: var(--color--Red--800); - --Status--Error--colorErrorBorder: var(--color--Red--700); - --Status--Error--colorErrorBorderHover: var(--color--Red--600); - --Status--Error--colorErrorBase: var(--color--Red--400); - --Status--Error--colorErrorActive: var(--color--Red--300); - --Status--Error--colorErrorTextHover: var(--color--Red--200); - --Status--Error--colorErrorText: var(--color--Red--100); - --Status--Success--colorSuccessBg: var(--color--Green--900); - --Status--Success--colorSuccessBgHover: var(--color--Green--800); - --Status--Success--colorSuccessBase: var(--color--Green--400); - --Status--Success--colorSuccessTextHover: var(--color--Green--200); - --Status--Warning--colorWarningBg: var(--color--Yellow--900); - --Status--Warning--colorWarningBgHover: var(--color--Yellow--800); - --Status--Warning--colorWarningBase: var(--color--Yellow--400); - --Status--Warning--colorWarningActive: var(--color--Yellow--300); - --Status--Warning--colorWarningTextHover: var(--color--Yellow--200); - --Primitive--Black: hsla(0, 0%, 0%, 1); - --Primitive--White: hsla(0, 0%, 100%, 1); - --Brand--Base_Colors--Primary: var(--Primitive--Lime--500); - --Primitive--Neutral--50: hsla(0, 0%, 98%, 1); - --Primitive--Neutral--100: hsla(0, 0%, 96%, 1); - --Primitive--Neutral--200: hsla(0, 0%, 90%, 1); - --Primitive--Neutral--300: hsla(0, 0%, 83%, 1); - --Primitive--Neutral--400: hsla(0, 0%, 64%, 1); - --Primitive--Neutral--500: hsla(0, 0%, 45%, 1); - --Primitive--Neutral--600: hsla(215, 14%, 34%, 1); - --Primitive--Neutral--700: hsla(0, 0%, 25%, 1); - --Primitive--Neutral--800: hsla(0, 0%, 15%, 1); - --Primitive--Neutral--900: hsla(0, 0%, 9%, 1); - --Primitive--Neutral--950: hsla(0, 0%, 4%, 1); - --Primitive--Stone--50: hsla(60, 9%, 98%, 1); - --Primitive--Stone--100: hsla(60, 5%, 96%, 1); - --Primitive--Stone--200: hsla(20, 6%, 90%, 1); - --Primitive--Stone--300: hsla(24, 6%, 83%, 1); - --Primitive--Stone--400: hsla(24, 5%, 64%, 1); - --Primitive--Stone--500: hsla(25, 5%, 45%, 1); - --Primitive--Stone--600: hsla(33, 5%, 32%, 1); - --Primitive--Stone--700: hsla(30, 6%, 25%, 1); - --Primitive--Stone--800: hsla(12, 6%, 15%, 1); - --Primitive--Stone--900: hsla(24, 10%, 10%, 1); - --Primitive--Stone--950: hsla(20, 14%, 4%, 1); - --Primitive--Zinc--50: hsla(0, 0%, 98%, 1); - --Primitive--Zinc--100: hsla(240, 5%, 96%, 1); - --Primitive--Zinc--200: hsla(240, 6%, 90%, 1); - --Primitive--Zinc--300: hsla(240, 5%, 84%, 1); - --Primitive--Zinc--400: hsla(240, 5%, 65%, 1); - --Primitive--Zinc--500: hsla(240, 4%, 46%, 1); - --Primitive--Zinc--600: hsla(240, 5%, 34%, 1); - --Primitive--Zinc--700: hsla(240, 5%, 26%, 1); - --Primitive--Zinc--800: hsla(240, 4%, 16%, 1); - --Primitive--Zinc--900: hsla(240, 6%, 10%, 1); - --Primitive--Zinc--950: hsla(240, 10%, 4%, 1); - --Primitive--Slate--50: hsla(210, 40%, 98%, 1); - --Primitive--Slate--100: hsla(210, 40%, 96%, 1); - --Primitive--Slate--200: hsla(214, 32%, 91%, 1); - --Primitive--Slate--300: hsla(213, 27%, 84%, 1); - --Primitive--Slate--400: hsla(215, 20%, 65%, 1); - --Primitive--Slate--500: hsla(215, 16%, 47%, 1); - --Primitive--Slate--600: hsla(215, 19%, 35%, 1); - --Primitive--Slate--700: hsla(215, 25%, 27%, 1); - --Primitive--Slate--800: hsla(217, 33%, 17%, 1); - --Primitive--Slate--900: hsla(222, 47%, 11%, 1); - --Primitive--Slate--950: hsla(229, 84%, 5%, 1); - --Primitive--Gray--50: hsla(210, 20%, 98%, 1); - --Primitive--Gray--100: hsla(220, 14%, 96%, 1); - --Primitive--Gray--200: hsla(220, 13%, 91%, 1); - --Primitive--Gray--300: hsla(216, 12%, 84%, 1); - --Primitive--Gray--400: hsla(218, 11%, 65%, 1); - --Primitive--Gray--500: hsla(220, 9%, 46%, 1); - --Primitive--Gray--600: hsla(0, 0%, 32%, 1); - --Primitive--Gray--700: hsla(217, 19%, 27%, 1); - --Primitive--Gray--800: hsla(215, 28%, 17%, 1); - --Primitive--Gray--900: hsla(221, 39%, 11%, 1); - --Primitive--Gray--950: hsla(224, 71%, 4%, 1); - --Primitive--Red--50: hsla(0, 86%, 97%, 1); - --Primitive--Red--100: hsla(0, 93%, 94%, 1); - --Primitive--Red--200: hsla(0, 96%, 89%, 1); - --Primitive--Red--300: hsla(0, 94%, 82%, 1); - --Primitive--Red--400: hsla(0, 91%, 71%, 1); - --Primitive--Red--500: hsla(0, 84%, 60%, 1); - --Primitive--Red--600: hsla(0, 72%, 51%, 1); - --Primitive--Red--700: hsla(0, 74%, 42%, 1); - --Primitive--Red--800: hsla(0, 70%, 35%, 1); - --Primitive--Red--900: hsla(0, 63%, 31%, 1); - --Primitive--Red--950: hsla(0, 75%, 15%, 1); - --Primitive--Orange--50: hsla(33, 100%, 96%, 1); - --Primitive--Orange--100: hsla(34, 100%, 92%, 1); - --Primitive--Orange--200: hsla(32, 98%, 83%, 1); - --Primitive--Orange--300: hsla(31, 97%, 72%, 1); - --Primitive--Orange--400: hsla(27, 96%, 61%, 1); - --Primitive--Orange--500: hsla(25, 95%, 53%, 1); - --Primitive--Orange--600: hsla(21, 90%, 48%, 1); - --Primitive--Orange--700: hsla(17, 88%, 40%, 1); - --Primitive--Orange--800: hsla(15, 79%, 34%, 1); - --Primitive--Orange--900: hsla(15, 75%, 28%, 1); - --Primitive--Orange--950: hsla(13, 81%, 15%, 1); - --Primitive--Amber--50: hsla(48, 100%, 96%, 1); - --Primitive--Amber--100: hsla(48, 96%, 89%, 1); - --Primitive--Amber--200: hsla(48, 97%, 77%, 1); - --Primitive--Amber--300: hsla(46, 97%, 65%, 1); - --Primitive--Amber--400: hsla(43, 96%, 56%, 1); - --Primitive--Amber--500: hsla(38, 92%, 50%, 1); - --Primitive--Amber--600: hsla(32, 95%, 44%, 1); - --Primitive--Amber--700: hsla(26, 90%, 37%, 1); - --Primitive--Amber--800: hsla(23, 83%, 31%, 1); - --Primitive--Amber--900: hsla(22, 78%, 26%, 1); - --Primitive--Amber--950: hsla(21, 92%, 14%, 1); - --Primitive--Yellow--50: hsla(55, 92%, 95%, 1); - --Primitive--Yellow--100: hsla(55, 97%, 88%, 1); - --Primitive--Yellow--200: hsla(53, 98%, 77%, 1); - --Primitive--Yellow--300: hsla(50, 98%, 64%, 1); - --Primitive--Yellow--400: hsla(48, 96%, 53%, 1); - --Primitive--Yellow--500: hsla(45, 93%, 47%, 1); - --Primitive--Yellow--600: hsla(41, 96%, 40%, 1); - --Primitive--Yellow--700: hsla(35, 92%, 33%, 1); - --Primitive--Yellow--800: hsla(32, 81%, 29%, 1); - --Primitive--Yellow--900: hsla(28, 73%, 26%, 1); - --Primitive--Yellow--950: hsla(26, 83%, 14%, 1); - --Primitive--Lime--50: hsla(78, 92%, 95%, 1); - --Primitive--Lime--100: hsla(80, 89%, 89%, 1); - --Primitive--Lime--200: hsla(81, 88%, 80%, 1); - --Primitive--Lime--300: hsla(82, 85%, 67%, 1); - --Primitive--Lime--400: hsla(83, 78%, 55%, 1); - --Primitive--Lime--500: hsla(84, 81%, 44%, 1); - --Primitive--Lime--600: hsla(85, 85%, 35%, 1); - --Primitive--Lime--700: hsla(86, 78%, 27%, 1); - --Primitive--Lime--800: hsla(86, 69%, 23%, 1); - --Primitive--Lime--900: hsla(88, 61%, 20%, 1); - --Primitive--Lime--950: hsla(89, 80%, 10%, 1); - --Primitive--Green--50: hsla(138, 76%, 97%, 1); - --Primitive--Green--100: hsla(141, 84%, 93%, 1); - --Primitive--Green--200: hsla(141, 79%, 85%, 1); - --Primitive--Green--300: hsla(142, 77%, 73%, 1); - --Primitive--Green--400: hsla(142, 69%, 58%, 1); - --Primitive--Green--500: hsla(142, 71%, 45%, 1); - --Primitive--Green--600: hsla(142, 76%, 36%, 1); - --Primitive--Green--700: hsla(142, 72%, 29%, 1); - --Primitive--Green--800: hsla(143, 64%, 24%, 1); - --Primitive--Green--900: hsla(144, 61%, 20%, 1); - --Primitive--Green--950: hsla(145, 80%, 10%, 1); - --Primitive--Emerald--50: hsla(152, 81%, 96%, 1); - --Primitive--Emerald--100: hsla(149, 80%, 90%, 1); - --Primitive--Emerald--200: hsla(152, 76%, 80%, 1); - --Primitive--Emerald--300: hsla(156, 72%, 67%, 1); - --Primitive--Emerald--400: hsla(158, 64%, 52%, 1); - --Primitive--Emerald--500: hsla(160, 84%, 39%, 1); - --Primitive--Emerald--600: hsla(161, 94%, 30%, 1); - --Primitive--Emerald--700: hsla(163, 94%, 24%, 1); - --Primitive--Emerald--800: hsla(163, 88%, 20%, 1); - --Primitive--Emerald--900: hsla(164, 86%, 16%, 1); - --Primitive--Emerald--950: hsla(166, 91%, 9%, 1); - --Primitive--Teal--50: hsla(166, 76%, 97%, 1); - --Primitive--Teal--100: hsla(167, 85%, 89%, 1); - --Primitive--Teal--200: hsla(168, 84%, 78%, 1); - --Primitive--Teal--300: hsla(171, 77%, 64%, 1); - --Primitive--Teal--400: hsla(172, 66%, 50%, 1); - --Primitive--Teal--500: hsla(173, 80%, 40%, 1); - --Primitive--Teal--600: hsla(175, 84%, 32%, 1); - --Primitive--Teal--700: hsla(175, 77%, 26%, 1); - --Primitive--Teal--800: hsla(176, 69%, 22%, 1); - --Primitive--Teal--900: hsla(176, 61%, 19%, 1); - --Primitive--Teal--950: hsla(179, 84%, 10%, 1); - --Primitive--Cyan--50: hsla(183, 100%, 96%, 1); - --Primitive--Cyan--100: hsla(185, 96%, 90%, 1); - --Primitive--Cyan--200: hsla(186, 94%, 82%, 1); - --Primitive--Cyan--300: hsla(187, 92%, 69%, 1); - --Primitive--Cyan--400: hsla(188, 86%, 53%, 1); - --Primitive--Cyan--500: hsla(189, 94%, 43%, 1); - --Primitive--Cyan--600: hsla(192, 91%, 36%, 1); - --Primitive--Cyan--700: hsla(193, 82%, 31%, 1); - --Primitive--Cyan--800: hsla(194, 70%, 27%, 1); - --Primitive--Cyan--900: hsla(196, 64%, 24%, 1); - --Primitive--Cyan--950: hsla(197, 79%, 15%, 1); - --Primitive--Sky--50: hsla(204, 100%, 97%, 1); - --Primitive--Sky--100: hsla(204, 94%, 94%, 1); - --Primitive--Sky--200: hsla(201, 94%, 86%, 1); - --Primitive--Sky--300: hsla(199, 95%, 74%, 1); - --Primitive--Sky--400: hsla(198, 93%, 60%, 1); - --Primitive--Sky--500: hsla(199, 89%, 48%, 1); - --Primitive--Sky--600: hsla(200, 98%, 39%, 1); - --Primitive--Sky--700: hsla(201, 96%, 32%, 1); - --Primitive--Sky--800: hsla(201, 90%, 27%, 1); - --Primitive--Sky--900: hsla(202, 80%, 24%, 1); - --Primitive--Sky--950: hsla(204, 80%, 16%, 1); - --Primitive--Blue--50: hsla(214, 100%, 97%, 1); - --Primitive--Blue--100: hsla(214, 95%, 93%, 1); - --Primitive--Blue--200: hsla(213, 97%, 87%, 1); - --Primitive--Blue--300: hsla(212, 96%, 78%, 1); - --Primitive--Blue--400: hsla(213, 94%, 68%, 1); - --Primitive--Blue--500: hsla(217, 91%, 60%, 1); - --Primitive--Blue--600: hsla(221, 83%, 53%, 1); - --Primitive--Blue--700: hsla(224, 76%, 48%, 1); - --Primitive--Blue--800: hsla(226, 71%, 40%, 1); - --Primitive--Blue--900: hsla(224, 64%, 33%, 1); - --Primitive--Blue--950: hsla(226, 57%, 21%, 1); - --Primitive--Indigo--50: hsla(226, 100%, 97%, 1); - --Primitive--Indigo--100: hsla(226, 100%, 94%, 1); - --Primitive--Indigo--200: hsla(228, 96%, 89%, 1); - --Primitive--Indigo--300: hsla(230, 94%, 82%, 1); - --Primitive--Indigo--400: hsla(234, 89%, 74%, 1); - --Primitive--Indigo--500: hsla(239, 84%, 67%, 1); - --Primitive--Indigo--600: hsla(243, 75%, 59%, 1); - --Primitive--Indigo--700: hsla(245, 58%, 51%, 1); - --Primitive--Indigo--800: hsla(244, 55%, 41%, 1); - --Primitive--Indigo--900: hsla(242, 47%, 34%, 1); - --Primitive--Indigo--950: hsla(244, 47%, 20%, 1); - --Primitive--Violet--50: hsla(250, 100%, 98%, 1); - --Primitive--Violet--100: hsla(251, 91%, 95%, 1); - --Primitive--Violet--200: hsla(251, 95%, 92%, 1); - --Primitive--Violet--300: hsla(253, 95%, 85%, 1); - --Primitive--Violet--400: hsla(255, 92%, 76%, 1); - --Primitive--Violet--500: hsla(258, 90%, 66%, 1); - --Primitive--Violet--600: hsla(262, 83%, 58%, 1); - --Primitive--Violet--700: hsla(263, 70%, 50%, 1); - --Primitive--Violet--800: hsla(263, 69%, 42%, 1); - --Primitive--Violet--900: hsla(264, 67%, 35%, 1); - --Primitive--Violet--950: hsla(262, 78%, 23%, 1); - --Primitive--Purple--50: hsla(270, 100%, 98%, 1); - --Primitive--Purple--100: hsla(269, 100%, 95%, 1); - --Primitive--Purple--200: hsla(269, 100%, 92%, 1); - --Primitive--Purple--300: hsla(269, 97%, 85%, 1); - --Primitive--Purple--400: hsla(270, 95%, 75%, 1); - --Primitive--Purple--500: hsla(271, 91%, 65%, 1); - --Primitive--Purple--600: hsla(271, 81%, 56%, 1); - --Primitive--Purple--700: hsla(272, 72%, 47%, 1); - --Primitive--Purple--800: hsla(273, 67%, 39%, 1); - --Primitive--Purple--900: hsla(274, 66%, 32%, 1); - --Primitive--Purple--950: hsla(274, 87%, 21%, 1); - --Primitive--Fuchsia--50: hsla(289, 100%, 98%, 1); - --Primitive--Fuchsia--100: hsla(287, 100%, 95%, 1); - --Primitive--Fuchsia--200: hsla(288, 96%, 91%, 1); - --Primitive--Fuchsia--300: hsla(291, 93%, 83%, 1); - --Primitive--Fuchsia--400: hsla(292, 91%, 73%, 1); - --Primitive--Fuchsia--500: hsla(292, 84%, 61%, 1); - --Primitive--Fuchsia--600: hsla(293, 69%, 49%, 1); - --Primitive--Fuchsia--700: hsla(295, 72%, 40%, 1); - --Primitive--Fuchsia--800: hsla(295, 70%, 33%, 1); - --Primitive--Fuchsia--900: hsla(297, 64%, 28%, 1); - --Primitive--Fuchsia--950: hsla(297, 90%, 16%, 1); - --Primitive--Pink--50: hsla(327, 73%, 97%, 1); - --Primitive--Pink--100: hsla(326, 78%, 95%, 1); - --Primitive--Pink--200: hsla(326, 85%, 90%, 1); - --Primitive--Pink--300: hsla(327, 87%, 82%, 1); - --Primitive--Pink--400: hsla(329, 86%, 70%, 1); - --Primitive--Pink--500: hsla(330, 81%, 60%, 1); - --Primitive--Pink--600: hsla(333, 71%, 51%, 1); - --Primitive--Pink--700: hsla(335, 78%, 42%, 1); - --Primitive--Pink--800: hsla(336, 74%, 35%, 1); - --Primitive--Pink--900: hsla(336, 69%, 30%, 1); - --Primitive--Pink--950: hsla(336, 84%, 17%, 1); - --Primitive--Rose--50: hsla(356, 100%, 97%, 1); - --Primitive--Rose--100: hsla(356, 100%, 95%, 1); - --Primitive--Rose--200: hsla(353, 96%, 90%, 1); - --Primitive--Rose--300: hsla(353, 96%, 82%, 1); - --Primitive--Rose--400: hsla(351, 95%, 71%, 1); - --Primitive--Rose--500: hsla(350, 89%, 60%, 1); - --Primitive--Rose--600: hsla(347, 77%, 50%, 1); - --Primitive--Rose--700: hsla(345, 83%, 41%, 1); - --Primitive--Rose--800: hsla(343, 80%, 35%, 1); - --Primitive--Rose--900: hsla(342, 75%, 30%, 1); - --Primitive--Rose--950: hsla(343, 88%, 16%, 1); - --Brand--Base_Colors--Destructive: var(--Primitive--Red--500); - --Brand--Base_Colors--Success: var(--Primitive--Green--500); - --Brand--Base_Colors--Warning: var(--Primitive--Amber--500); - --Brand--Base_Colors--White: var(--Primitive--White); - --Brand--Base_Colors--Black: var(--Primitive--Black); - --Brand--Semantic_Colors--Background: var(--Primitive--Zinc--900); /*页面背景色:应用在整个页面的最底层。*/ - --Brand--Semantic_Colors--Background-subtle: hsla( - 0, - 0%, - 100%, - 0.02 - ); /*细微背景色:用于需要与主背景有微弱区分的区域,如代码块背景。*/ - --Brand--Semantic_Colors--Foreground: hsla(0, 0%, 100%, 0.9); /*主要前景/文字色:用于正文、标题等。*/ - --Brand--Semantic_Colors--Foreground-secondary: hsla(0, 0%, 100%, 0.6); /*次要前景/文字色:用于辅助性文本、描述。*/ - --Brand--Semantic_Colors--Foreground-muted: hsla(0, 0%, 100%, 0.4); /*静默前景/文字色:用于禁用状态的文字、占位符。*/ - --Brand--Semantic_Colors--Border: hsla(0, 0%, 100%, 0.1); /*默认边框色:用于卡片、输入框、分隔线。*/ - --Brand--Semantic_Colors--Border-hover: hsla(0, 0%, 100%, 0.2); /*激活边框色:用于元素被按下或激活时的边框。*/ - --Brand--Semantic_Colors--Border-active: hsla(0, 0%, 100%, 0.3); /*激活边框色:用于元素被按下或激活时的边框。*/ - --Brand--Semantic_Colors--Ring: hsla( - 84, - 81%, - 44%, - 0.4 - ); /*聚焦环颜色:用于输入框等元素在聚焦 (Focus) 状态下的外发光。*/ - --Brand--UI_Element_Colors--Modal--Backdrop: hsla(0, 0%, 0%, 0.06); - --Brand--UI_Element_Colors--Modal--Thumb: hsla(0, 0%, 100%, 0.2); - --Brand--UI_Element_Colors--Modal--Thumb_Hover: hsla(0, 0%, 100%, 0.3); - --Brand--UI_Element_Colors--Icon--Default: var(--Brand--Semantic_Colors--Foreground-secondary); - --Brand--UI_Element_Colors--Icon--Hover: var(--Brand--Semantic_Colors--Foreground); - --Brand--UI_Element_Colors--Input_Select--Background: var(--Brand--Base_Colors--Black); - --Brand--UI_Element_Colors--Input_Select--Border: var(--Brand--Semantic_Colors--Border); - --Brand--UI_Element_Colors--Input_Select--Border_Hover: var(--Brand--Semantic_Colors--Border-hover); - --Brand--UI_Element_Colors--Input_Select--Border_Focus: var(--Brand--Base_Colors--Primary); - --Brand--UI_Element_Colors--Primary_Button--Background: var(--Brand--Base_Colors--Primary); - --Brand--UI_Element_Colors--Card_Container--Background: var(--Brand--Base_Colors--Black); - --Brand--UI_Element_Colors--Card_Container--Border: var(--Brand--Semantic_Colors--Border); - --Brand--UI_Element_Colors--Ghost_Button--Background: hsla(0, 0%, 100%, 0); - --Brand--UI_Element_Colors--Ghost_Button--Text: var(--Brand--Semantic_Colors--Foreground); - --Brand--UI_Element_Colors--Ghost_Button--Background_Hover: var(--Opacity--White--White-10); - --Brand--UI_Element_Colors--Ghost_Button--Background_Active: hsla(0, 0%, 100%, 0.15); - --Brand--UI_Element_Colors--Secondary_Button--Background: var(--Opacity--White--White-10); - --Brand--UI_Element_Colors--Secondary_Button--Text: var(--Brand--Semantic_Colors--Foreground); - --Brand--UI_Element_Colors--Secondary_Button--Background_Hover: var(--Opacity--White--White-20); - --Brand--UI_Element_Colors--Secondary_Button--Background_Active: hsla(0, 0%, 100%, 0.25); - --Brand--UI_Element_Colors--Secondary_Button--Border: var(--Brand--Semantic_Colors--Border); - --Brand--UI_Element_Colors--Primary_Button--Text: var(--Brand--Base_Colors--White); - --Brand--UI_Element_Colors--Primary_Button--Background_Hover: hsla(84, 81%, 44%, 0.85); - --Brand--UI_Element_Colors--Primary_Button--2nd_Background: hsla(84, 81%, 44%, 0.1); - --Brand--UI_Element_Colors--Primary_Button--3rd_Background: hsla(84, 81%, 44%, 0.05); - --Brand--UI_Element_Colors--Primary_Button--Background_Active: hsla(84, 81%, 44%, 0.7); - --Boolean: false; -} diff --git a/src/renderer/src/pages/home/Messages/Tools/ToolPermissionRequestCard.tsx b/src/renderer/src/pages/home/Messages/Tools/ToolPermissionRequestCard.tsx index 2e014cb745..ae8db5e005 100644 --- a/src/renderer/src/pages/home/Messages/Tools/ToolPermissionRequestCard.tsx +++ b/src/renderer/src/pages/home/Messages/Tools/ToolPermissionRequestCard.tsx @@ -149,7 +149,7 @@ export function ToolPermissionRequestCard({ toolResponse }: Props) {