mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-21 16:01:35 +08:00
Merge branch 'v2' of github.com:CherryHQ/cherry-studio into v2
This commit is contained in:
commit
dae10cf673
@ -22,8 +22,7 @@ const comboboxTriggerVariants = cva(
|
|||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
state: {
|
state: {
|
||||||
default:
|
default: 'border-input aria-expanded:border-success aria-expanded:ring-2 aria-expanded:ring-success/20',
|
||||||
'border-input bg-background aria-expanded:border-success aria-expanded:ring-2 aria-expanded:ring-success/20',
|
|
||||||
error:
|
error:
|
||||||
'border-destructive ring-2 ring-destructive/20 aria-expanded:border-destructive aria-expanded:ring-destructive/20',
|
'border-destructive ring-2 ring-destructive/20 aria-expanded:border-destructive aria-expanded:ring-destructive/20',
|
||||||
disabled: 'opacity-50 cursor-not-allowed pointer-events-none'
|
disabled: 'opacity-50 cursor-not-allowed pointer-events-none'
|
||||||
@ -255,7 +254,7 @@ export function Combobox({
|
|||||||
size={size}
|
size={size}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
style={{ width: triggerWidth }}
|
style={{ width: triggerWidth }}
|
||||||
className={cn(comboboxTriggerVariants({ state, size }), className)}
|
className={cn(comboboxTriggerVariants({ state, size }), 'bg-white', className)}
|
||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
aria-invalid={error}>
|
aria-invalid={error}>
|
||||||
{renderTriggerContent()}
|
{renderTriggerContent()}
|
||||||
|
|||||||
@ -1,23 +1,23 @@
|
|||||||
/**
|
/**
|
||||||
* CherryStudio Styles - npm 包入口
|
* CherryStudio Styles - npm Package Entry Point
|
||||||
*
|
*
|
||||||
* 用途:仅导出 CSS 变量,不生成工具类,不覆盖用户主题
|
* Purpose: Export CSS variables only, without generating utility classes or overriding user themes
|
||||||
* 使用场景:
|
* Use Cases:
|
||||||
* - npm 用户想使用设计系统的变量,但不想覆盖 Tailwind 默认主题
|
* - npm users who want to use design system variables without overriding Tailwind's default theme
|
||||||
* - 可以通过 var(--cs-primary) 等方式使用
|
* - Can be used via var(--cs-primary) and similar patterns
|
||||||
* - 不会生成 bg-primary 等工具类(用户自己的 bg-primary 不受影响)
|
* - Does not generate utility classes like bg-primary (user's own bg-primary won't be affected)
|
||||||
*
|
*
|
||||||
* 示例:
|
* Example:
|
||||||
* ```css
|
* ```css
|
||||||
* @import '@cherrystudio/ui/styles/index.css';
|
* @import '@cherrystudio/ui/styles/index.css';
|
||||||
*
|
*
|
||||||
* .my-button {
|
* .my-button {
|
||||||
* background: var(--cs-primary); // 使用 CS 的品牌色
|
* background: var(--cs-primary); // Use CS brand color
|
||||||
* padding: var(--cs-size-md); // 使用 CS 的间距
|
* padding: var(--cs-size-md); // Use CS spacing
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* 如果想要完整的主题覆盖(生成 bg-primary 等类),请导入:
|
* For complete theme override (generating bg-primary classes), import:
|
||||||
* @import '@cherrystudio/ui/styles/theme.css';
|
* @import '@cherrystudio/ui/styles/theme.css';
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user