@kingsoft-ai/design 0.1.19 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/dist/index.cjs +3150 -2478
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +7430 -6241
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/dist/types/DesignThemeProvider.d.ts +25 -20
  7. package/dist/types/button/Button.d.ts +4 -19
  8. package/dist/types/button/Button.style.d.ts +4 -35
  9. package/dist/types/button/IconButton.d.ts +4 -5
  10. package/dist/types/button/IconButton.style.d.ts +4 -7
  11. package/dist/types/button/styled-tokens.d.ts +582 -0
  12. package/dist/types/button/tokens.d.ts +1 -1
  13. package/dist/types/button/tokens.types.d.ts +190 -0
  14. package/dist/types/card/Card.d.ts +0 -6
  15. package/dist/types/card/Card.style.d.ts +4 -7
  16. package/dist/types/card/styled-tokens.d.ts +130 -0
  17. package/dist/types/card/tokens.d.ts +1 -1
  18. package/dist/types/card/tokens.types.d.ts +48 -0
  19. package/dist/types/checkbox/Checkbox.d.ts +0 -7
  20. package/dist/types/checkbox/Checkbox.style.d.ts +29 -7
  21. package/dist/types/checkbox/CheckboxButton.d.ts +0 -16
  22. package/dist/types/checkbox/CheckboxButton.style.d.ts +24 -12
  23. package/dist/types/checkbox/styled-tokens.d.ts +122 -0
  24. package/dist/types/checkbox/tokens.d.ts +1 -1
  25. package/dist/types/checkbox/tokens.types.d.ts +39 -0
  26. package/dist/types/collapse/Collapse.d.ts +2 -34
  27. package/dist/types/collapse/Collapse.style.d.ts +4 -43
  28. package/dist/types/collapse/styled-tokens.d.ts +77 -0
  29. package/dist/types/collapse/tokens.d.ts +1 -1
  30. package/dist/types/collapse/tokens.types.d.ts +28 -0
  31. package/dist/types/context/ThemeContext.d.ts +24 -0
  32. package/dist/types/context/index.d.ts +2 -0
  33. package/dist/types/floatButton/FloatButton.d.ts +0 -21
  34. package/dist/types/floatButton/FloatButton.style.d.ts +0 -31
  35. package/dist/types/floatButton/styled-tokens.d.ts +127 -0
  36. package/dist/types/floatButton/tokens.d.ts +1 -1
  37. package/dist/types/floatButton/tokens.types.d.ts +66 -0
  38. package/dist/types/index.d.ts +5 -4
  39. package/dist/types/input/Input.d.ts +4 -22
  40. package/dist/types/input/Input.style.d.ts +4 -48
  41. package/dist/types/input/styled-tokens.d.ts +147 -0
  42. package/dist/types/input/tokens.d.ts +1 -1
  43. package/dist/types/input/tokens.types.d.ts +46 -0
  44. package/dist/types/link/Link.d.ts +4 -0
  45. package/dist/types/link/Link.style.d.ts +4 -10
  46. package/dist/types/link/styled-tokens.d.ts +107 -0
  47. package/dist/types/link/tokens.d.ts +1 -1
  48. package/dist/types/link/tokens.types.d.ts +39 -0
  49. package/dist/types/menu/Menu.d.ts +0 -25
  50. package/dist/types/menu/Menu.style.d.ts +4 -43
  51. package/dist/types/menu/MenuItem.d.ts +0 -6
  52. package/dist/types/menu/styled-tokens.d.ts +217 -0
  53. package/dist/types/menu/tokens.d.ts +1 -1
  54. package/dist/types/menu/tokens.types.d.ts +79 -0
  55. package/dist/types/modal/Modal.d.ts +0 -8
  56. package/dist/types/modal/Modal.style.d.ts +4 -11
  57. package/dist/types/modal/styled-tokens.d.ts +370 -0
  58. package/dist/types/modal/tokens.d.ts +1 -1
  59. package/dist/types/modal/tokens.types.d.ts +107 -0
  60. package/dist/types/numberInput/NumberInput.d.ts +2 -22
  61. package/dist/types/numberInput/NumberInput.style.d.ts +4 -7
  62. package/dist/types/numberInput/styled-tokens.d.ts +192 -0
  63. package/dist/types/numberInput/tokens.d.ts +1 -1
  64. package/dist/types/numberInput/tokens.types.d.ts +65 -0
  65. package/dist/types/progress/Progress.d.ts +4 -27
  66. package/dist/types/progress/Progress.style.d.ts +4 -43
  67. package/dist/types/progress/styled-tokens.d.ts +137 -0
  68. package/dist/types/progress/tokens.d.ts +3 -0
  69. package/dist/types/progress/tokens.types.d.ts +52 -0
  70. package/dist/types/radio/Radio.d.ts +4 -0
  71. package/dist/types/radio/Radio.style.d.ts +9 -28
  72. package/dist/types/radio/styled-tokens.d.ts +122 -0
  73. package/dist/types/radio/tokens.d.ts +1 -1
  74. package/dist/types/radio/tokens.types.d.ts +41 -0
  75. package/dist/types/select/Select.style.d.ts +4 -7
  76. package/dist/types/select/styled-tokens.d.ts +237 -0
  77. package/dist/types/select/tokens.d.ts +1 -1
  78. package/dist/types/select/tokens.types.d.ts +72 -0
  79. package/dist/types/skeleton/Skeleton.style.d.ts +0 -25
  80. package/dist/types/skeleton/styled-tokens.d.ts +82 -0
  81. package/dist/types/skeleton/tokens.d.ts +1 -1
  82. package/dist/types/skeleton/tokens.types.d.ts +31 -0
  83. package/dist/types/slider/Slider.d.ts +74 -0
  84. package/dist/types/slider/Slider.style.d.ts +125 -0
  85. package/dist/types/slider/__tests__/Slider.test.d.ts +13 -0
  86. package/dist/types/slider/index.d.ts +2 -0
  87. package/dist/types/slider/styled-tokens.d.ts +252 -0
  88. package/dist/types/slider/tokens.d.ts +3 -0
  89. package/dist/types/slider/tokens.types.d.ts +121 -0
  90. package/dist/types/stepper/Stepper.d.ts +3 -0
  91. package/dist/types/stepper/Stepper.style.d.ts +4 -7
  92. package/dist/types/stepper/styled-tokens.d.ts +157 -0
  93. package/dist/types/stepper/tokens.d.ts +1 -1
  94. package/dist/types/stepper/tokens.types.d.ts +68 -0
  95. package/dist/types/switch/Switch.d.ts +4 -35
  96. package/dist/types/switch/Switch.style.d.ts +4 -56
  97. package/dist/types/switch/styled-tokens.d.ts +132 -0
  98. package/dist/types/switch/tokens.d.ts +1 -1
  99. package/dist/types/switch/tokens.types.d.ts +45 -0
  100. package/dist/types/table/Table.d.ts +2 -0
  101. package/dist/types/table/Table.style.d.ts +4 -7
  102. package/dist/types/table/styled-tokens.d.ts +182 -0
  103. package/dist/types/table/tokens.d.ts +3 -0
  104. package/dist/types/table/tokens.types.d.ts +43 -0
  105. package/dist/types/tag/Tag.d.ts +4 -36
  106. package/dist/types/tag/Tag.style.d.ts +5 -41
  107. package/dist/types/tag/styled-tokens.d.ts +140 -0
  108. package/dist/types/tag/tokens.d.ts +1 -1
  109. package/dist/types/tag/tokens.types.d.ts +76 -0
  110. package/dist/types/theme.d.ts +1 -2
  111. package/dist/types/tooltip/Tooltip.d.ts +0 -18
  112. package/dist/types/tooltip/Tooltip.style.d.ts +0 -19
  113. package/dist/types/tooltip/styled-tokens.d.ts +72 -0
  114. package/dist/types/tooltip/tokens.d.ts +1 -1
  115. package/dist/types/tooltip/tokens.types.d.ts +21 -0
  116. package/dist/types/transfer/Transfer.d.ts +0 -20
  117. package/dist/types/transfer/Transfer.style.d.ts +0 -10
  118. package/dist/types/transfer/styled-tokens.d.ts +252 -0
  119. package/dist/types/transfer/tokens.d.ts +1 -1
  120. package/dist/types/transfer/tokens.types.d.ts +79 -0
  121. package/dist/types/types/index.d.ts +64 -4
  122. package/dist/types/upload/Upload.d.ts +2 -21
  123. package/dist/types/upload/Upload.style.d.ts +4 -64
  124. package/dist/types/upload/styled-tokens.d.ts +227 -0
  125. package/dist/types/upload/tokens.d.ts +3 -0
  126. package/dist/types/upload/tokens.types.d.ts +66 -0
  127. package/dist/types/utils/index.d.ts +4 -0
  128. package/dist/types/utils/styled-token.d.ts +117 -0
  129. package/package.json +5 -4
  130. package/dist/styles.css +0 -1
@@ -1,12 +1,11 @@
1
1
  /**
2
- * Tag 标签样式
2
+ * Tag Styled Components
3
3
  *
4
- * 基于 CSS 变量的三层 Token 体系:
5
- * - Tier 1 (Global): 全局基础值 --ksd-colors-*, --ksd-spacing-*, etc.
6
- * - Tier 2 (Semantic): 语义化映射 --ksd-brand-*, --ksd-text-*, etc.
7
- * - Tier 3 (Component): 组件专用 Token --ksd-tag-*
4
+ * 使用 Styled Token System 实现样式:
5
+ * - JS Token 优先(来自 ThemeProvider,支持用户自定义)
6
+ * - CSS 变量作为 fallback(无 Provider 时的兜底)
8
7
  *
9
- * 无需 ThemeProvider,直接使用 CSS 变量
8
+ * 注意:颜色变体使用动态 CSS 变量命名,保持原有模式
10
9
  */
11
10
  export declare const tagVariants: readonly ["default", "checkable"];
12
11
  export declare const tagSizes: readonly ["sm", "md", "lg"];
@@ -14,15 +13,6 @@ export declare const tagColors: readonly ["default", "red", "orange", "yellow",
14
13
  export type TagVariant = (typeof tagVariants)[number];
15
14
  export type TagSize = (typeof tagSizes)[number];
16
15
  export type TagColor = (typeof tagColors)[number];
17
- /**
18
- * Tag 根元素
19
- *
20
- * 特性:
21
- * - 基于 CSS 变量,无需 ThemeProvider
22
- * - 支持多种颜色和变体
23
- * - 完整的交互状态(hover, active, disabled)
24
- * - 支持边框和无边框模式
25
- */
26
16
  export declare const TagRoot: import("@emotion/styled").StyledComponent<{
27
17
  theme?: import("@emotion/react").Theme;
28
18
  as?: React.ElementType;
@@ -35,46 +25,20 @@ export declare const TagRoot: import("@emotion/styled").StyledComponent<{
35
25
  closable: boolean;
36
26
  isDisabled: boolean;
37
27
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
38
- /**
39
- * Tag 内容容器
40
- *
41
- * 用于布局图标和文本
42
- */
43
28
  export declare const TagContent: import("@emotion/styled").StyledComponent<{
44
29
  theme?: import("@emotion/react").Theme;
45
30
  as?: React.ElementType;
46
31
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
47
- /**
48
- * 图标包装器
49
- *
50
- * 特性:
51
- * - 保持布局稳定
52
- * - 支持前置图标
53
- */
54
32
  export declare const IconWrapper: import("@emotion/styled").StyledComponent<{
55
33
  theme?: import("@emotion/react").Theme;
56
34
  as?: React.ElementType;
57
35
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
58
- /**
59
- * 关闭按钮
60
- *
61
- * 使用 span 而非 button,避免在 Select 等组件中嵌套 button 导致的 HTML 错误
62
- *
63
- * 特性:
64
- * - 独立的交互区域
65
- * - hover 时显示反馈
66
- */
67
36
  export declare const CloseButton: import("@emotion/styled").StyledComponent<{
68
37
  theme?: import("@emotion/react").Theme;
69
38
  as?: React.ElementType;
70
39
  } & {
71
40
  size: TagSize;
72
41
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
73
- /**
74
- * 添加按钮(New Tag)
75
- *
76
- * 专门用于添加新标签的按钮样式
77
- */
78
42
  export declare const AddButton: import("@emotion/styled").StyledComponent<{
79
43
  theme?: import("@emotion/react").Theme;
80
44
  as?: React.ElementType;
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Tag Styled Tokens
3
+ *
4
+ * 将 Tag 的 JS tokens 与 CSS 变量映射,实现:
5
+ * - 有 ThemeProvider 时:使用 JS token 值(可被用户自定义)
6
+ * - 无 ThemeProvider 时:fallback 到 CSS 变量(基础样式)
7
+ *
8
+ * 注意:Tag 组件有多种颜色变体,颜色相关的 token 使用 CSS 变量动态命名模式,
9
+ * 因此颜色 token 保持使用 CSS 变量方式。
10
+ */
11
+ /**
12
+ * Tag 组件的 Styled Tokens
13
+ */
14
+ export declare const $tag: {
15
+ readonly smHeight: (props: {
16
+ theme?: import("@kingsoft-ai/theme").Theme & {
17
+ _useCSSVariables?: boolean;
18
+ };
19
+ }) => string;
20
+ readonly smFontSize: (props: {
21
+ theme?: import("@kingsoft-ai/theme").Theme & {
22
+ _useCSSVariables?: boolean;
23
+ };
24
+ }) => string;
25
+ readonly smLineHeight: (props: {
26
+ theme?: import("@kingsoft-ai/theme").Theme & {
27
+ _useCSSVariables?: boolean;
28
+ };
29
+ }) => string;
30
+ readonly smPaddingInline: (props: {
31
+ theme?: import("@kingsoft-ai/theme").Theme & {
32
+ _useCSSVariables?: boolean;
33
+ };
34
+ }) => string;
35
+ readonly smGap: (props: {
36
+ theme?: import("@kingsoft-ai/theme").Theme & {
37
+ _useCSSVariables?: boolean;
38
+ };
39
+ }) => string;
40
+ readonly smIconSize: (props: {
41
+ theme?: import("@kingsoft-ai/theme").Theme & {
42
+ _useCSSVariables?: boolean;
43
+ };
44
+ }) => string;
45
+ readonly smCloseIconSize: (props: {
46
+ theme?: import("@kingsoft-ai/theme").Theme & {
47
+ _useCSSVariables?: boolean;
48
+ };
49
+ }) => string;
50
+ readonly mdHeight: (props: {
51
+ theme?: import("@kingsoft-ai/theme").Theme & {
52
+ _useCSSVariables?: boolean;
53
+ };
54
+ }) => string;
55
+ readonly mdFontSize: (props: {
56
+ theme?: import("@kingsoft-ai/theme").Theme & {
57
+ _useCSSVariables?: boolean;
58
+ };
59
+ }) => string;
60
+ readonly mdLineHeight: (props: {
61
+ theme?: import("@kingsoft-ai/theme").Theme & {
62
+ _useCSSVariables?: boolean;
63
+ };
64
+ }) => string;
65
+ readonly mdPaddingInline: (props: {
66
+ theme?: import("@kingsoft-ai/theme").Theme & {
67
+ _useCSSVariables?: boolean;
68
+ };
69
+ }) => string;
70
+ readonly mdGap: (props: {
71
+ theme?: import("@kingsoft-ai/theme").Theme & {
72
+ _useCSSVariables?: boolean;
73
+ };
74
+ }) => string;
75
+ readonly mdIconSize: (props: {
76
+ theme?: import("@kingsoft-ai/theme").Theme & {
77
+ _useCSSVariables?: boolean;
78
+ };
79
+ }) => string;
80
+ readonly mdCloseIconSize: (props: {
81
+ theme?: import("@kingsoft-ai/theme").Theme & {
82
+ _useCSSVariables?: boolean;
83
+ };
84
+ }) => string;
85
+ readonly lgHeight: (props: {
86
+ theme?: import("@kingsoft-ai/theme").Theme & {
87
+ _useCSSVariables?: boolean;
88
+ };
89
+ }) => string;
90
+ readonly lgFontSize: (props: {
91
+ theme?: import("@kingsoft-ai/theme").Theme & {
92
+ _useCSSVariables?: boolean;
93
+ };
94
+ }) => string;
95
+ readonly lgLineHeight: (props: {
96
+ theme?: import("@kingsoft-ai/theme").Theme & {
97
+ _useCSSVariables?: boolean;
98
+ };
99
+ }) => string;
100
+ readonly lgPaddingInline: (props: {
101
+ theme?: import("@kingsoft-ai/theme").Theme & {
102
+ _useCSSVariables?: boolean;
103
+ };
104
+ }) => string;
105
+ readonly lgGap: (props: {
106
+ theme?: import("@kingsoft-ai/theme").Theme & {
107
+ _useCSSVariables?: boolean;
108
+ };
109
+ }) => string;
110
+ readonly lgIconSize: (props: {
111
+ theme?: import("@kingsoft-ai/theme").Theme & {
112
+ _useCSSVariables?: boolean;
113
+ };
114
+ }) => string;
115
+ readonly lgCloseIconSize: (props: {
116
+ theme?: import("@kingsoft-ai/theme").Theme & {
117
+ _useCSSVariables?: boolean;
118
+ };
119
+ }) => string;
120
+ readonly fontWeight: (props: {
121
+ theme?: import("@kingsoft-ai/theme").Theme & {
122
+ _useCSSVariables?: boolean;
123
+ };
124
+ }) => string;
125
+ readonly borderRadius: (props: {
126
+ theme?: import("@kingsoft-ai/theme").Theme & {
127
+ _useCSSVariables?: boolean;
128
+ };
129
+ }) => string;
130
+ readonly transition: (props: {
131
+ theme?: import("@kingsoft-ai/theme").Theme & {
132
+ _useCSSVariables?: boolean;
133
+ };
134
+ }) => string;
135
+ readonly disabledOpacity: (props: {
136
+ theme?: import("@kingsoft-ai/theme").Theme & {
137
+ _useCSSVariables?: boolean;
138
+ };
139
+ }) => string;
140
+ };
@@ -1,3 +1,3 @@
1
1
  import { TokenGenerator } from '../types/theme-utils';
2
- import { TagTokens } from '../types/component-tokens.types';
2
+ import { TagTokens } from './tokens.types';
3
3
  export declare const getTagTokens: TokenGenerator<TagTokens>;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Tag 组件 Token 类型定义
3
+ */
4
+ export interface TagColorTokens {
5
+ background: {
6
+ default: string;
7
+ hover?: string;
8
+ active?: string;
9
+ checked?: string;
10
+ checkedHover?: string;
11
+ checkedActive?: string;
12
+ };
13
+ text: {
14
+ default: string;
15
+ checked?: string;
16
+ };
17
+ border: {
18
+ default: string;
19
+ hover?: string;
20
+ active?: string;
21
+ checked?: string;
22
+ checkedHover?: string;
23
+ checkedActive?: string;
24
+ };
25
+ }
26
+ export interface TagTokens {
27
+ colors: {
28
+ default: TagColorTokens;
29
+ red: TagColorTokens;
30
+ orange: TagColorTokens;
31
+ yellow: TagColorTokens;
32
+ green: TagColorTokens;
33
+ lavender: TagColorTokens;
34
+ lilac: TagColorTokens;
35
+ carmine: TagColorTokens;
36
+ rose: TagColorTokens;
37
+ mint: TagColorTokens;
38
+ olive: TagColorTokens;
39
+ blue: TagColorTokens;
40
+ };
41
+ size: {
42
+ sm: {
43
+ height: string;
44
+ fontSize: string;
45
+ lineHeight: string;
46
+ paddingInline: string;
47
+ gap: string;
48
+ iconSize: string;
49
+ closeIconSize: string;
50
+ };
51
+ md: {
52
+ height: string;
53
+ fontSize: string;
54
+ lineHeight: string;
55
+ paddingInline: string;
56
+ gap: string;
57
+ iconSize: string;
58
+ closeIconSize: string;
59
+ };
60
+ lg: {
61
+ height: string;
62
+ fontSize: string;
63
+ lineHeight: string;
64
+ paddingInline: string;
65
+ gap: string;
66
+ iconSize: string;
67
+ closeIconSize: string;
68
+ };
69
+ };
70
+ fontWeight: number;
71
+ borderRadius: string;
72
+ transition: string;
73
+ disabled: {
74
+ opacity: number;
75
+ };
76
+ }
@@ -1,6 +1,5 @@
1
1
  import { AppTheme, SemanticColors, SemanticSpacing, SemanticBorderRadius, SemanticTypography, SemanticShadows } from '@kingsoft-ai/theme';
2
- import { ThemeContext } from './types/theme-utils';
3
- import { ComponentTokens } from './types/component-tokens.types';
2
+ import { ThemeContext, ComponentTokens } from './types';
4
3
  export declare const createComponentTokens: (context: ThemeContext) => ComponentTokens;
5
4
  interface SemanticTheme {
6
5
  colors: SemanticColors;
@@ -1,16 +1,3 @@
1
- /**
2
- * Tooltip 文字提示组件
3
- *
4
- * 基于 react-aria 实现无障碍访问的提示组件
5
- * 支持 hover/focus 触发,自定义位置与延迟
6
- *
7
- * @example
8
- * ```tsx
9
- * <Tooltip content="提示内容">
10
- * <Button>悬停查看</Button>
11
- * </Tooltip>
12
- * ```
13
- */
14
1
  import { type ReactNode, type ReactElement, type CSSProperties } from 'react';
15
2
  import { type TooltipPlacement } from './Tooltip.style';
16
3
  export type { TooltipPlacement };
@@ -76,9 +63,4 @@ export type TooltipProps = {
76
63
  */
77
64
  style?: CSSProperties;
78
65
  };
79
- /**
80
- * Tooltip 文字提示组件
81
- *
82
- * 基于 React Aria 实现的无障碍提示组件
83
- */
84
66
  export declare const Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,30 +1,11 @@
1
- /**
2
- * Tooltip 组件样式
3
- *
4
- * 基于 CSS 变量的三层 Token 体系:
5
- * - Tier 1 (Global): 全局基础值 --ksd-colors-*, --ksd-spacing-*, etc.
6
- * - Tier 2 (Semantic): 语义化映射 --ksd-brand-*, --ksd-text-*, etc.
7
- * - Tier 3 (Component): 组件专用 Token --ksd-tooltip-*
8
- *
9
- * 无需 ThemeProvider,直接使用 CSS 变量
10
- */
11
1
  import type { Placement } from '@react-types/overlays';
12
- /**
13
- * Tooltip 位置类型
14
- */
15
2
  export type TooltipPlacement = Placement;
16
- /**
17
- * Tooltip 容器
18
- */
19
3
  export declare const TooltipContainer: import("@emotion/styled").StyledComponent<{
20
4
  theme?: import("@emotion/react").Theme;
21
5
  as?: React.ElementType;
22
6
  } & {
23
7
  placement?: Placement;
24
8
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
25
- /**
26
- * Tooltip 箭头
27
- */
28
9
  export declare const TooltipArrow: import("@emotion/styled").StyledComponent<{
29
10
  theme?: import("@emotion/react").Theme;
30
11
  as?: React.ElementType;
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Tooltip Styled Tokens
3
+ *
4
+ * 将 Tooltip 的 JS tokens 与 CSS 变量映射,实现:
5
+ * - 有 ThemeProvider 时:使用 JS token 值(可被用户自定义)
6
+ * - 无 ThemeProvider 时:fallback 到 CSS 变量(基础样式)
7
+ */
8
+ /**
9
+ * Tooltip 组件的 Styled Tokens
10
+ */
11
+ export declare const $tooltip: {
12
+ readonly background: (props: {
13
+ theme?: import("@kingsoft-ai/theme").Theme & {
14
+ _useCSSVariables?: boolean;
15
+ };
16
+ }) => string;
17
+ readonly color: (props: {
18
+ theme?: import("@kingsoft-ai/theme").Theme & {
19
+ _useCSSVariables?: boolean;
20
+ };
21
+ }) => string;
22
+ readonly borderRadius: (props: {
23
+ theme?: import("@kingsoft-ai/theme").Theme & {
24
+ _useCSSVariables?: boolean;
25
+ };
26
+ }) => string;
27
+ readonly boxShadow: (props: {
28
+ theme?: import("@kingsoft-ai/theme").Theme & {
29
+ _useCSSVariables?: boolean;
30
+ };
31
+ }) => string;
32
+ readonly padding: (props: {
33
+ theme?: import("@kingsoft-ai/theme").Theme & {
34
+ _useCSSVariables?: boolean;
35
+ };
36
+ }) => string;
37
+ readonly maxWidth: (props: {
38
+ theme?: import("@kingsoft-ai/theme").Theme & {
39
+ _useCSSVariables?: boolean;
40
+ };
41
+ }) => string;
42
+ readonly fontSize: (props: {
43
+ theme?: import("@kingsoft-ai/theme").Theme & {
44
+ _useCSSVariables?: boolean;
45
+ };
46
+ }) => string;
47
+ readonly lineHeight: (props: {
48
+ theme?: import("@kingsoft-ai/theme").Theme & {
49
+ _useCSSVariables?: boolean;
50
+ };
51
+ }) => string;
52
+ readonly arrowSize: (props: {
53
+ theme?: import("@kingsoft-ai/theme").Theme & {
54
+ _useCSSVariables?: boolean;
55
+ };
56
+ }) => string;
57
+ readonly animationDuration: (props: {
58
+ theme?: import("@kingsoft-ai/theme").Theme & {
59
+ _useCSSVariables?: boolean;
60
+ };
61
+ }) => string;
62
+ readonly animationEasing: (props: {
63
+ theme?: import("@kingsoft-ai/theme").Theme & {
64
+ _useCSSVariables?: boolean;
65
+ };
66
+ }) => string;
67
+ readonly zIndex: (props: {
68
+ theme?: import("@kingsoft-ai/theme").Theme & {
69
+ _useCSSVariables?: boolean;
70
+ };
71
+ }) => string;
72
+ };
@@ -7,5 +7,5 @@
7
7
  * - Tier 3 (Component): 组件专用 Token
8
8
  */
9
9
  import { TokenGenerator } from '../types/theme-utils';
10
- import { TooltipTokens } from '../types/component-tokens.types';
10
+ import { TooltipTokens } from './tokens.types';
11
11
  export declare const getTooltipTokens: TokenGenerator<TooltipTokens>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Tooltip 组件 Token 类型定义
3
+ */
4
+ export interface TooltipTokens {
5
+ background: string;
6
+ color: string;
7
+ borderRadius: string;
8
+ boxShadow: string;
9
+ padding: string;
10
+ maxWidth: string;
11
+ fontSize: string;
12
+ lineHeight: string;
13
+ arrow: {
14
+ size: string;
15
+ };
16
+ animation: {
17
+ duration: string;
18
+ easing: string;
19
+ };
20
+ zIndex: number;
21
+ }
@@ -1,23 +1,3 @@
1
- /**
2
- * Transfer 穿梭框组件
3
- *
4
- * 基于 react-aria 实现无障碍访问的穿梭框组件
5
- * 支持搜索、全选、自定义渲染等功能
6
- *
7
- * @example
8
- * ```tsx
9
- * const dataSource = [
10
- * { key: '1', title: '选项1', description: '描述1' },
11
- * { key: '2', title: '选项2' },
12
- * ];
13
- *
14
- * <Transfer
15
- * dataSource={dataSource}
16
- * targetKeys={['1']}
17
- * onChange={(keys) => console.log(keys)}
18
- * />
19
- * ```
20
- */
21
1
  import React from 'react';
22
2
  export interface TransferItem {
23
3
  /** 唯一标识 */
@@ -1,13 +1,3 @@
1
- /**
2
- * Transfer 样式组件
3
- *
4
- * 基于 CSS 变量的三层 Token 体系:
5
- * - Tier 1 (Global): 全局基础值 --ksd-colors-*, --ksd-spacing-*, etc.
6
- * - Tier 2 (Semantic): 语义化映射 --ksd-brand-*, --ksd-text-*, etc.
7
- * - Tier 3 (Component): 组件专用 Token --ksd-transfer-*
8
- *
9
- * 无需 ThemeProvider,直接使用 CSS 变量
10
- */
11
1
  export declare const TransferRoot: import("@emotion/styled").StyledComponent<{
12
2
  theme?: import("@emotion/react").Theme;
13
3
  as?: React.ElementType;