@rockshin/tao-ui 0.0.16 → 0.0.19

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.
@@ -4,9 +4,11 @@
4
4
  --tao-table-cell-bg: transparent;
5
5
  --tao-table-header-bg: transparent;
6
6
  --tao-table-header-color: var(--tao-color-text-secondary);
7
- --tao-table-row-hover-bg: #fafafa;
8
- --tao-table-row-selected-bg: oklch(0% 0 0 / .05);
9
- --tao-table-row-selected-hover-bg: oklch(0% 0 0 / .07);
7
+ --tao-table-row-hover-bg: var(--tao-color-fill-quaternary);
8
+ --tao-table-row-selected-bg: var(--tao-color-shadow-hint);
9
+ --tao-table-row-selected-hover-bg: color-mix(in oklch,
10
+ var(--tao-color-text-base) 7%,
11
+ transparent);
10
12
  --tao-table-border-color: var(--tao-color-border-secondary);
11
13
  --tao-table-frame-radius: var(--tao-radius-md);
12
14
  --tao-table-cell-padding-block: var(--tao-padding-sm);
@@ -26,7 +28,7 @@
26
28
  }
27
29
 
28
30
  [data-tao-table-wrapper][data-tao-variant="filled"], [data-tao-table-wrapper][data-tao-variant="outlined"] {
29
- --tao-table-header-bg: oklch(98.5% 0 0);
31
+ --tao-table-header-bg: var(--tao-color-fill-quaternary);
30
32
  --tao-table-row-selected-bg: var(--tao-primary-bg);
31
33
  --tao-table-row-selected-hover-bg: var(--tao-primary-bg-hover);
32
34
  }
@@ -289,8 +291,8 @@
289
291
 
290
292
  [data-tao-table-wrapper][data-tao-scroll-state="middle"] [data-tao-fixed="left"]:after, [data-tao-table-wrapper][data-tao-scroll-state="right"] [data-tao-fixed="left"]:after {
291
293
  content: "";
294
+ background: linear-gradient(to right, var(--tao-color-shadow-hint), transparent);
292
295
  pointer-events: none;
293
- background: linear-gradient(to right, oklch(0% 0 0 / .04), #0000);
294
296
  width: 6px;
295
297
  position: absolute;
296
298
  top: 0;
@@ -300,8 +302,8 @@
300
302
 
301
303
  [data-tao-table-wrapper][data-tao-scroll-state="middle"] [data-tao-fixed="right"]:before, [data-tao-table-wrapper][data-tao-scroll-state="left"] [data-tao-fixed="right"]:before {
302
304
  content: "";
305
+ background: linear-gradient(to left, var(--tao-color-shadow-hint), transparent);
303
306
  pointer-events: none;
304
- background: linear-gradient(to left, oklch(0% 0 0 / .04), #0000);
305
307
  width: 6px;
306
308
  position: absolute;
307
309
  top: 0;
@@ -142,14 +142,14 @@
142
142
 
143
143
  [data-tao-tag][data-tao-color="success"][data-tao-variant="solid"] {
144
144
  background: var(--tao-success);
145
- color: #fff;
145
+ color: var(--tao-color-text-light-solid);
146
146
  box-shadow: var(--tao-box-shadow-xs);
147
147
  border-color: #0000;
148
148
  }
149
149
 
150
150
  [data-tao-tag][data-tao-color="warning"][data-tao-variant="solid"] {
151
151
  background: var(--tao-warning);
152
- color: #fff;
152
+ color: var(--tao-color-text-light-solid);
153
153
  box-shadow: var(--tao-box-shadow-xs);
154
154
  border-color: #0000;
155
155
  }
package/dist/index.d.ts CHANGED
@@ -31,6 +31,6 @@ export { type ComponentDoc, type ComponentDocCategory, type ComponentDocProp, ty
31
31
  export { FormLayout, type FormLayoutProps, } from './layouts/form-layout/form-layout';
32
32
  export { Stack, type StackProps } from './layouts/stack/stack';
33
33
  export { type FormatOptions, HeadlessInputNumber, type HeadlessInputNumberProps, NumberInput, type NumberInputProps, type PadDecimalsOnBlur, type UseNumberInputOptions, type UseNumberInputReturn, useNumberInput, } from './number-input';
34
- export { TaoPortalScope, TaoProvider, type TaoProviderProps, type TaoSeedToken, type TaoSize, type TaoThemeConfig, type TaoVariant, useTaoConfig, } from './provider/tao-provider';
34
+ export { TaoPortalScope, TaoProvider, type TaoProviderProps, type TaoSeedToken, type TaoSize, type TaoThemeConfig, type TaoThemeMode, type TaoVariant, useTaoConfig, } from './provider/tao-provider';
35
35
  export { type TaoTokenName, taoTokenNames, taoTokenVars, tokenVar, } from './theme/tokens';
36
36
  export { cx, type SemanticClassNames, type SemanticStyles, } from './utils/semantic';
@@ -19,8 +19,19 @@ export interface TaoSeedToken {
19
19
  zIndexBase?: number;
20
20
  zIndexPopupBase?: number;
21
21
  }
22
+ export type TaoThemeMode = 'light' | 'dark';
22
23
  export interface TaoThemeConfig {
23
24
  token?: Partial<TaoSeedToken>;
25
+ /**
26
+ * 明暗模式。'dark' 在 provider 元素上输出 data-tao-theme="dark",
27
+ * 激活 theme.css 的 dark scope(纯 CSS 算法,无 JS runtime)。
28
+ * 嵌套 provider 未声明 mode 时继承父级;portal 浮层经 context 透传。
29
+ *
30
+ * 已知限制:dark 内显式 mode: 'light' 不会翻回亮色——CSS 自定义属性
31
+ * 无法"撤销"祖先的 seed 覆盖(antd 靠 JS 重算 token 实现,tao-ui 为
32
+ * 零 runtime 放弃此路径)。需要亮/暗混排时,把亮部移出 dark provider。
33
+ */
34
+ mode?: TaoThemeMode;
24
35
  inherit?: boolean;
25
36
  }
26
37
  export type TaoSize = 'small' | 'medium' | 'large';
@@ -29,6 +40,8 @@ interface TaoConfigContextValue {
29
40
  size: TaoSize;
30
41
  disabled: boolean;
31
42
  variant: TaoVariant;
43
+ /** Resolved 明暗模式,portal 浮层用它重建 data-tao-theme。 */
44
+ mode: TaoThemeMode;
32
45
  /**
33
46
  * Merged CSS custom-property overrides from this provider and all ancestors.
34
47
  * Carried through context so portaled layers (Modal/Drawer/Select dropdown…)
@@ -6,62 +6,76 @@ const TaoConfigContext = /*#__PURE__*/ createContext({
6
6
  size: 'medium',
7
7
  disabled: false,
8
8
  variant: 'outlined',
9
+ mode: 'light',
9
10
  tokenStyle: {}
10
11
  });
11
12
  function useTaoConfig() {
12
13
  return useContext(TaoConfigContext);
13
14
  }
14
15
  function TaoPortalScope(t0) {
15
- const $ = c(12);
16
+ const $ = c(16);
16
17
  const { children, style, asChild } = t0;
17
- const { tokenStyle } = useTaoConfig();
18
+ const { tokenStyle, mode } = useTaoConfig();
19
+ let t1;
20
+ if ($[0] !== mode) {
21
+ t1 = "light" === mode ? void 0 : {
22
+ "data-tao-theme": mode
23
+ };
24
+ $[0] = mode;
25
+ $[1] = t1;
26
+ } else t1 = $[1];
27
+ const themeAttr = t1;
18
28
  if (asChild) {
19
- let t1;
20
- if ($[0] !== style || $[1] !== tokenStyle) {
21
- t1 = {
29
+ let t2;
30
+ if ($[2] !== style || $[3] !== tokenStyle) {
31
+ t2 = {
22
32
  ...tokenStyle,
23
33
  ...style
24
34
  };
25
- $[0] = style;
26
- $[1] = tokenStyle;
27
- $[2] = t1;
28
- } else t1 = $[2];
29
- let t2;
30
- if ($[3] !== children || $[4] !== t1) {
31
- t2 = /*#__PURE__*/ jsx(Slot, {
35
+ $[2] = style;
36
+ $[3] = tokenStyle;
37
+ $[4] = t2;
38
+ } else t2 = $[4];
39
+ let t3;
40
+ if ($[5] !== children || $[6] !== t2 || $[7] !== themeAttr) {
41
+ t3 = /*#__PURE__*/ jsx(Slot, {
32
42
  "data-tao-provider": "",
33
- style: t1,
43
+ ...themeAttr,
44
+ style: t2,
34
45
  children: children
35
46
  });
36
- $[3] = children;
37
- $[4] = t1;
38
- $[5] = t2;
39
- } else t2 = $[5];
40
- return t2;
47
+ $[5] = children;
48
+ $[6] = t2;
49
+ $[7] = themeAttr;
50
+ $[8] = t3;
51
+ } else t3 = $[8];
52
+ return t3;
41
53
  }
42
- let t1;
43
- if ($[6] !== style || $[7] !== tokenStyle) {
44
- t1 = {
54
+ let t2;
55
+ if ($[9] !== style || $[10] !== tokenStyle) {
56
+ t2 = {
45
57
  display: "contents",
46
58
  ...tokenStyle,
47
59
  ...style
48
60
  };
49
- $[6] = style;
50
- $[7] = tokenStyle;
51
- $[8] = t1;
52
- } else t1 = $[8];
53
- let t2;
54
- if ($[9] !== children || $[10] !== t1) {
55
- t2 = /*#__PURE__*/ jsx("div", {
61
+ $[9] = style;
62
+ $[10] = tokenStyle;
63
+ $[11] = t2;
64
+ } else t2 = $[11];
65
+ let t3;
66
+ if ($[12] !== children || $[13] !== t2 || $[14] !== themeAttr) {
67
+ t3 = /*#__PURE__*/ jsx("div", {
56
68
  "data-tao-provider": "",
57
- style: t1,
69
+ ...themeAttr,
70
+ style: t2,
58
71
  children: children
59
72
  });
60
- $[9] = children;
61
- $[10] = t1;
62
- $[11] = t2;
63
- } else t2 = $[11];
64
- return t2;
73
+ $[12] = children;
74
+ $[13] = t2;
75
+ $[14] = themeAttr;
76
+ $[15] = t3;
77
+ } else t3 = $[15];
78
+ return t3;
65
79
  }
66
80
  const TOKEN_TO_VAR = {
67
81
  colorPrimary: '--tao-color-primary',
@@ -87,7 +101,7 @@ function useStableTokenKey(token) {
87
101
  return ref.current;
88
102
  }
89
103
  function TaoProvider(t0) {
90
- const $ = c(20);
104
+ const $ = c(22);
91
105
  const { theme, size, disabled, variant, children } = t0;
92
106
  const parentConfig = useContext(TaoConfigContext);
93
107
  const inherit = theme?.inherit ?? true;
@@ -148,45 +162,52 @@ function TaoProvider(t0) {
148
162
  const parentSize = parentConfig.size;
149
163
  const parentDisabled = parentConfig.disabled;
150
164
  const parentVariant = parentConfig.variant;
165
+ const parentMode = parentConfig.mode;
166
+ const mode = theme?.mode ?? (inherit ? parentMode : "light");
151
167
  const t5 = size ?? (inherit ? parentSize : "medium");
152
168
  const t6 = disabled ?? (inherit ? parentDisabled : false);
153
169
  const t7 = variant ?? (inherit ? parentVariant : "outlined");
154
170
  let t8;
155
- if ($[9] !== t5 || $[10] !== t6 || $[11] !== t7 || $[12] !== tokenStyle) {
171
+ if ($[9] !== mode || $[10] !== t5 || $[11] !== t6 || $[12] !== t7 || $[13] !== tokenStyle) {
156
172
  t8 = {
157
173
  size: t5,
158
174
  disabled: t6,
159
175
  variant: t7,
176
+ mode,
160
177
  tokenStyle
161
178
  };
162
- $[9] = t5;
163
- $[10] = t6;
164
- $[11] = t7;
165
- $[12] = tokenStyle;
166
- $[13] = t8;
167
- } else t8 = $[13];
179
+ $[9] = mode;
180
+ $[10] = t5;
181
+ $[11] = t6;
182
+ $[12] = t7;
183
+ $[13] = tokenStyle;
184
+ $[14] = t8;
185
+ } else t8 = $[14];
168
186
  const config = t8;
169
- let t9;
170
- if ($[14] !== children || $[15] !== divStyle) {
171
- t9 = /*#__PURE__*/ jsx("div", {
187
+ const t9 = "light" === mode ? void 0 : mode;
188
+ let t10;
189
+ if ($[15] !== children || $[16] !== divStyle || $[17] !== t9) {
190
+ t10 = /*#__PURE__*/ jsx("div", {
172
191
  style: divStyle,
173
192
  "data-tao-provider": "",
193
+ "data-tao-theme": t9,
174
194
  children: children
175
195
  });
176
- $[14] = children;
177
- $[15] = divStyle;
178
- $[16] = t9;
179
- } else t9 = $[16];
180
- let t10;
181
- if ($[17] !== config || $[18] !== t9) {
182
- t10 = /*#__PURE__*/ jsx(TaoConfigContext.Provider, {
196
+ $[15] = children;
197
+ $[16] = divStyle;
198
+ $[17] = t9;
199
+ $[18] = t10;
200
+ } else t10 = $[18];
201
+ let t11;
202
+ if ($[19] !== config || $[20] !== t10) {
203
+ t11 = /*#__PURE__*/ jsx(TaoConfigContext.Provider, {
183
204
  value: config,
184
- children: t9
205
+ children: t10
185
206
  });
186
- $[17] = config;
187
- $[18] = t9;
188
- $[19] = t10;
189
- } else t10 = $[19];
190
- return t10;
207
+ $[19] = config;
208
+ $[20] = t10;
209
+ $[21] = t11;
210
+ } else t11 = $[21];
211
+ return t11;
191
212
  }
192
213
  export { TaoPortalScope, TaoProvider, useTaoConfig };
@@ -6,6 +6,8 @@
6
6
  --tao-color-error: oklch(57% .19 25);
7
7
  --tao-color-bg-base: oklch(98.5% .004 70);
8
8
  --tao-color-text-base: oklch(15.5% .01 70);
9
+ --tao-color-bg-surface: oklch(100% 0 0);
10
+ --tao-color-text-light-solid: oklch(98.5% .004 70);
9
11
  --tao-radius: 10px;
10
12
  --tao-font-size: 14px;
11
13
  --tao-control-height: 32px;
@@ -14,15 +16,18 @@
14
16
  --tao-size-unit: 4px;
15
17
  --tao-line-width: 1px;
16
18
  --tao-ring-width: 3px;
17
- --tao-font-family: "Geist Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
18
- --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
19
+ --tao-font-family: "Geist Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
20
+ "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB",
21
+ "Microsoft YaHei", sans-serif;
22
+ --tao-font-family-code: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
23
+ "Liberation Mono", monospace;
19
24
  --tao-motion-unit: .1s;
20
25
  --tao-z-index-drawer: 1000;
21
26
  --tao-z-index-modal: 1000;
22
27
  --tao-z-index-popup: 1100;
23
28
  }
24
29
 
25
- :root, [data-tao-provider] {
30
+ :root, [data-tao-provider], [data-tao-theme] {
26
31
  --tao-primary: var(--tao-color-primary);
27
32
  --tao-primary-hover: color-mix(in oklch,
28
33
  var(--tao-color-primary) 80%,
@@ -49,7 +54,7 @@
49
54
  --tao-error-border: color-mix(in oklch,
50
55
  var(--tao-color-error) 30%,
51
56
  var(--tao-color-bg-base));
52
- --tao-error-fg: var(--tao-color-bg-base);
57
+ --tao-error-fg: var(--tao-color-text-light-solid);
53
58
  --tao-success: var(--tao-color-success);
54
59
  --tao-success-bg: color-mix(in oklch,
55
60
  var(--tao-color-success) 6%,
@@ -89,12 +94,16 @@
89
94
  --tao-color-bg-layout: color-mix(in oklch,
90
95
  var(--tao-color-text-base) 4%,
91
96
  var(--tao-color-bg-base));
92
- --tao-color-bg-container: oklch(100% 0 0);
93
- --tao-color-bg-elevated: oklch(100% 0 0);
97
+ --tao-color-bg-container: var(--tao-color-bg-surface);
98
+ --tao-color-bg-elevated: color-mix(in oklch,
99
+ var(--tao-color-bg-surface) 94%,
100
+ white);
94
101
  --tao-color-border: color-mix(in oklch,
95
102
  var(--tao-color-text-base) 12%,
96
103
  var(--tao-color-bg-base));
97
- --tao-color-border-secondary: #0000170b;
104
+ --tao-color-border-secondary: color-mix(in oklch,
105
+ var(--tao-color-text-base) 5%,
106
+ transparent);
98
107
  --tao-radius-xs: 2px;
99
108
  --tao-radius-sm: calc(var(--tao-radius) - 2px);
100
109
  --tao-radius-md: var(--tao-radius);
@@ -128,6 +137,7 @@
128
137
  --tao-motion-ease-out: cubic-bezier(.215, .61, .355, 1);
129
138
  --tao-motion-ease-in-out: cubic-bezier(.645, .045, .355, 1);
130
139
  --tao-motion-ease-out-quint: cubic-bezier(.23, 1, .32, 1);
140
+ --tao-motion-ease-out-expo: cubic-bezier(.16, 1, .3, 1);
131
141
  --tao-box-shadow-xs: 0 1px 2px 0 oklch(0% 0 0 / .05);
132
142
  --tao-box-shadow: 0 1px 2px oklch(0% 0 0 / .04), 0 0 1px oklch(0% 0 0 / .08);
133
143
  --tao-box-shadow-secondary: 0 2px 8px oklch(0% 0 0 / .06), 0 0 1px oklch(0% 0 0 / .06);
@@ -141,12 +151,42 @@
141
151
  --tao-color-warning-outline: color-mix(in oklch,
142
152
  var(--tao-color-warning) 25%,
143
153
  transparent);
144
- --tao-color-text-placeholder: var(--tao-color-text-quaternary);
154
+ --tao-color-text-placeholder: var(--tao-color-text-tertiary);
145
155
  --tao-color-text-disabled: var(--tao-color-text-quaternary);
146
156
  --tao-color-bg-disabled: var(--tao-color-fill-tertiary);
147
157
  --tao-control-item-bg-hover: var(--tao-color-fill-tertiary);
148
158
  --tao-control-item-bg-active: var(--tao-primary-bg);
149
159
  --tao-opacity-loading: .65;
160
+ --tao-color-bg-mask: oklch(0% 0 0 / .1);
161
+ --tao-color-shadow-hint: oklch(0% 0 0 / .05);
162
+ }
163
+
164
+ [data-tao-theme="dark"] {
165
+ --tao-color-bg-base: oklch(16.5% .005 70);
166
+ --tao-color-text-base: oklch(92.2% .005 70);
167
+ --tao-color-bg-surface: oklch(21% .005 70);
168
+ --tao-color-primary: oklch(92.2% .005 70);
169
+ --tao-primary-hover: color-mix(in oklch,
170
+ var(--tao-color-primary) 85%,
171
+ var(--tao-color-bg-base));
172
+ --tao-primary-active: color-mix(in oklch,
173
+ var(--tao-color-primary) 75%,
174
+ var(--tao-color-bg-base));
175
+ --tao-control-outline: color-mix(in oklch,
176
+ var(--tao-color-primary) 35%,
177
+ transparent);
178
+ --tao-color-error-outline: color-mix(in oklch,
179
+ var(--tao-color-error) 35%,
180
+ transparent);
181
+ --tao-color-warning-outline: color-mix(in oklch,
182
+ var(--tao-color-warning) 35%,
183
+ transparent);
184
+ --tao-box-shadow-xs: 0 1px 2px 0 oklch(0% 0 0 / .4);
185
+ --tao-box-shadow: 0 1px 2px oklch(0% 0 0 / .35), 0 0 1px oklch(0% 0 0 / .5);
186
+ --tao-box-shadow-secondary: 0 4px 12px oklch(0% 0 0 / .4), 0 0 1px oklch(0% 0 0 / .5);
187
+ --tao-box-shadow-tertiary: 0 1px 2px oklch(0% 0 0 / .35);
188
+ --tao-color-bg-mask: oklch(0% 0 0 / .55);
189
+ --tao-color-shadow-hint: oklch(0% 0 0 / .35);
150
190
  }
151
191
  }
152
192
 
@@ -1,4 +1,4 @@
1
- export type TaoTokenName = '--tao-box-shadow' | '--tao-box-shadow-secondary' | '--tao-box-shadow-tertiary' | '--tao-box-shadow-xs' | '--tao-color-bg-base' | '--tao-color-bg-container' | '--tao-color-bg-disabled' | '--tao-color-bg-elevated' | '--tao-color-bg-layout' | '--tao-color-border' | '--tao-color-border-secondary' | '--tao-color-error' | '--tao-color-error-outline' | '--tao-color-fill' | '--tao-color-fill-quaternary' | '--tao-color-fill-secondary' | '--tao-color-fill-tertiary' | '--tao-color-primary' | '--tao-color-success' | '--tao-color-text' | '--tao-color-text-base' | '--tao-color-text-disabled' | '--tao-color-text-placeholder' | '--tao-color-text-quaternary' | '--tao-color-text-secondary' | '--tao-color-text-tertiary' | '--tao-color-warning' | '--tao-color-warning-outline' | '--tao-control-height' | '--tao-control-height-lg' | '--tao-control-height-sm' | '--tao-control-item-bg-active' | '--tao-control-item-bg-hover' | '--tao-control-outline' | '--tao-control-range-width' | '--tao-control-width' | '--tao-error' | '--tao-error-active' | '--tao-error-bg' | '--tao-error-border' | '--tao-error-fg' | '--tao-error-hover' | '--tao-font-family' | '--tao-font-family-code' | '--tao-font-size' | '--tao-font-size-base' | '--tao-font-size-lg' | '--tao-font-size-sm' | '--tao-font-size-xl' | '--tao-font-size-xs' | '--tao-font-weight-medium' | '--tao-font-weight-normal' | '--tao-font-weight-strong' | '--tao-line-height' | '--tao-line-height-lg' | '--tao-line-height-sm' | '--tao-line-width' | '--tao-motion-duration-fast' | '--tao-motion-duration-mid' | '--tao-motion-duration-slow' | '--tao-motion-ease-in-out' | '--tao-motion-ease-out' | '--tao-motion-ease-out-quint' | '--tao-motion-unit' | '--tao-opacity-loading' | '--tao-padding' | '--tao-padding-lg' | '--tao-padding-md' | '--tao-padding-sm' | '--tao-padding-xl' | '--tao-padding-xs' | '--tao-padding-xxs' | '--tao-primary' | '--tao-primary-active' | '--tao-primary-bg' | '--tao-primary-bg-hover' | '--tao-primary-border' | '--tao-primary-fg' | '--tao-primary-hover' | '--tao-radius' | '--tao-radius-2xl' | '--tao-radius-full' | '--tao-radius-lg' | '--tao-radius-md' | '--tao-radius-sm' | '--tao-radius-xl' | '--tao-radius-xs' | '--tao-ring-width' | '--tao-size-unit' | '--tao-success' | '--tao-success-bg' | '--tao-success-border' | '--tao-warning' | '--tao-warning-bg' | '--tao-warning-border' | '--tao-z-index-drawer' | '--tao-z-index-modal' | '--tao-z-index-popup';
1
+ export type TaoTokenName = '--tao-box-shadow' | '--tao-box-shadow-secondary' | '--tao-box-shadow-tertiary' | '--tao-box-shadow-xs' | '--tao-color-bg-base' | '--tao-color-bg-container' | '--tao-color-bg-disabled' | '--tao-color-bg-elevated' | '--tao-color-bg-layout' | '--tao-color-bg-mask' | '--tao-color-bg-surface' | '--tao-color-border' | '--tao-color-border-secondary' | '--tao-color-error' | '--tao-color-error-outline' | '--tao-color-fill' | '--tao-color-fill-quaternary' | '--tao-color-fill-secondary' | '--tao-color-fill-tertiary' | '--tao-color-primary' | '--tao-color-shadow-hint' | '--tao-color-success' | '--tao-color-text' | '--tao-color-text-base' | '--tao-color-text-disabled' | '--tao-color-text-light-solid' | '--tao-color-text-placeholder' | '--tao-color-text-quaternary' | '--tao-color-text-secondary' | '--tao-color-text-tertiary' | '--tao-color-warning' | '--tao-color-warning-outline' | '--tao-control-height' | '--tao-control-height-lg' | '--tao-control-height-sm' | '--tao-control-item-bg-active' | '--tao-control-item-bg-hover' | '--tao-control-outline' | '--tao-control-range-width' | '--tao-control-width' | '--tao-error' | '--tao-error-active' | '--tao-error-bg' | '--tao-error-border' | '--tao-error-fg' | '--tao-error-hover' | '--tao-font-family' | '--tao-font-family-code' | '--tao-font-size' | '--tao-font-size-base' | '--tao-font-size-lg' | '--tao-font-size-sm' | '--tao-font-size-xl' | '--tao-font-size-xs' | '--tao-font-weight-medium' | '--tao-font-weight-normal' | '--tao-font-weight-strong' | '--tao-line-height' | '--tao-line-height-lg' | '--tao-line-height-sm' | '--tao-line-width' | '--tao-motion-duration-fast' | '--tao-motion-duration-mid' | '--tao-motion-duration-slow' | '--tao-motion-ease-in-out' | '--tao-motion-ease-out' | '--tao-motion-ease-out-expo' | '--tao-motion-ease-out-quint' | '--tao-motion-unit' | '--tao-opacity-loading' | '--tao-padding' | '--tao-padding-lg' | '--tao-padding-md' | '--tao-padding-sm' | '--tao-padding-xl' | '--tao-padding-xs' | '--tao-padding-xxs' | '--tao-primary' | '--tao-primary-active' | '--tao-primary-bg' | '--tao-primary-bg-hover' | '--tao-primary-border' | '--tao-primary-fg' | '--tao-primary-hover' | '--tao-radius' | '--tao-radius-2xl' | '--tao-radius-full' | '--tao-radius-lg' | '--tao-radius-md' | '--tao-radius-sm' | '--tao-radius-xl' | '--tao-radius-xs' | '--tao-ring-width' | '--tao-size-unit' | '--tao-success' | '--tao-success-bg' | '--tao-success-border' | '--tao-warning' | '--tao-warning-bg' | '--tao-warning-border' | '--tao-z-index-drawer' | '--tao-z-index-modal' | '--tao-z-index-popup';
2
2
  export declare function tokenVar(name: TaoTokenName | (string & {})): string;
3
- export declare const taoTokenNames: readonly ["--tao-box-shadow", "--tao-box-shadow-secondary", "--tao-box-shadow-tertiary", "--tao-box-shadow-xs", "--tao-color-bg-base", "--tao-color-bg-container", "--tao-color-bg-disabled", "--tao-color-bg-elevated", "--tao-color-bg-layout", "--tao-color-border", "--tao-color-border-secondary", "--tao-color-error", "--tao-color-error-outline", "--tao-color-fill", "--tao-color-fill-quaternary", "--tao-color-fill-secondary", "--tao-color-fill-tertiary", "--tao-color-primary", "--tao-color-success", "--tao-color-text", "--tao-color-text-base", "--tao-color-text-disabled", "--tao-color-text-placeholder", "--tao-color-text-quaternary", "--tao-color-text-secondary", "--tao-color-text-tertiary", "--tao-color-warning", "--tao-color-warning-outline", "--tao-control-height", "--tao-control-height-lg", "--tao-control-height-sm", "--tao-control-item-bg-active", "--tao-control-item-bg-hover", "--tao-control-outline", "--tao-control-range-width", "--tao-control-width", "--tao-error", "--tao-error-active", "--tao-error-bg", "--tao-error-border", "--tao-error-fg", "--tao-error-hover", "--tao-font-family", "--tao-font-family-code", "--tao-font-size", "--tao-font-size-base", "--tao-font-size-lg", "--tao-font-size-sm", "--tao-font-size-xl", "--tao-font-size-xs", "--tao-font-weight-medium", "--tao-font-weight-normal", "--tao-font-weight-strong", "--tao-line-height", "--tao-line-height-lg", "--tao-line-height-sm", "--tao-line-width", "--tao-motion-duration-fast", "--tao-motion-duration-mid", "--tao-motion-duration-slow", "--tao-motion-ease-in-out", "--tao-motion-ease-out", "--tao-motion-ease-out-quint", "--tao-motion-unit", "--tao-opacity-loading", "--tao-padding", "--tao-padding-lg", "--tao-padding-md", "--tao-padding-sm", "--tao-padding-xl", "--tao-padding-xs", "--tao-padding-xxs", "--tao-primary", "--tao-primary-active", "--tao-primary-bg", "--tao-primary-bg-hover", "--tao-primary-border", "--tao-primary-fg", "--tao-primary-hover", "--tao-radius", "--tao-radius-2xl", "--tao-radius-full", "--tao-radius-lg", "--tao-radius-md", "--tao-radius-sm", "--tao-radius-xl", "--tao-radius-xs", "--tao-ring-width", "--tao-size-unit", "--tao-success", "--tao-success-bg", "--tao-success-border", "--tao-warning", "--tao-warning-bg", "--tao-warning-border", "--tao-z-index-drawer", "--tao-z-index-modal", "--tao-z-index-popup"];
3
+ export declare const taoTokenNames: readonly ["--tao-box-shadow", "--tao-box-shadow-secondary", "--tao-box-shadow-tertiary", "--tao-box-shadow-xs", "--tao-color-bg-base", "--tao-color-bg-container", "--tao-color-bg-disabled", "--tao-color-bg-elevated", "--tao-color-bg-layout", "--tao-color-bg-mask", "--tao-color-bg-surface", "--tao-color-border", "--tao-color-border-secondary", "--tao-color-error", "--tao-color-error-outline", "--tao-color-fill", "--tao-color-fill-quaternary", "--tao-color-fill-secondary", "--tao-color-fill-tertiary", "--tao-color-primary", "--tao-color-shadow-hint", "--tao-color-success", "--tao-color-text", "--tao-color-text-base", "--tao-color-text-disabled", "--tao-color-text-light-solid", "--tao-color-text-placeholder", "--tao-color-text-quaternary", "--tao-color-text-secondary", "--tao-color-text-tertiary", "--tao-color-warning", "--tao-color-warning-outline", "--tao-control-height", "--tao-control-height-lg", "--tao-control-height-sm", "--tao-control-item-bg-active", "--tao-control-item-bg-hover", "--tao-control-outline", "--tao-control-range-width", "--tao-control-width", "--tao-error", "--tao-error-active", "--tao-error-bg", "--tao-error-border", "--tao-error-fg", "--tao-error-hover", "--tao-font-family", "--tao-font-family-code", "--tao-font-size", "--tao-font-size-base", "--tao-font-size-lg", "--tao-font-size-sm", "--tao-font-size-xl", "--tao-font-size-xs", "--tao-font-weight-medium", "--tao-font-weight-normal", "--tao-font-weight-strong", "--tao-line-height", "--tao-line-height-lg", "--tao-line-height-sm", "--tao-line-width", "--tao-motion-duration-fast", "--tao-motion-duration-mid", "--tao-motion-duration-slow", "--tao-motion-ease-in-out", "--tao-motion-ease-out", "--tao-motion-ease-out-expo", "--tao-motion-ease-out-quint", "--tao-motion-unit", "--tao-opacity-loading", "--tao-padding", "--tao-padding-lg", "--tao-padding-md", "--tao-padding-sm", "--tao-padding-xl", "--tao-padding-xs", "--tao-padding-xxs", "--tao-primary", "--tao-primary-active", "--tao-primary-bg", "--tao-primary-bg-hover", "--tao-primary-border", "--tao-primary-fg", "--tao-primary-hover", "--tao-radius", "--tao-radius-2xl", "--tao-radius-full", "--tao-radius-lg", "--tao-radius-md", "--tao-radius-sm", "--tao-radius-xl", "--tao-radius-xs", "--tao-ring-width", "--tao-size-unit", "--tao-success", "--tao-success-bg", "--tao-success-border", "--tao-warning", "--tao-warning-bg", "--tao-warning-border", "--tao-z-index-drawer", "--tao-z-index-modal", "--tao-z-index-popup"];
4
4
  export declare const taoTokenVars: Record<TaoTokenName, string>;
@@ -11,6 +11,8 @@ const taoTokenNames = [
11
11
  '--tao-color-bg-disabled',
12
12
  '--tao-color-bg-elevated',
13
13
  '--tao-color-bg-layout',
14
+ '--tao-color-bg-mask',
15
+ '--tao-color-bg-surface',
14
16
  '--tao-color-border',
15
17
  '--tao-color-border-secondary',
16
18
  '--tao-color-error',
@@ -20,10 +22,12 @@ const taoTokenNames = [
20
22
  '--tao-color-fill-secondary',
21
23
  '--tao-color-fill-tertiary',
22
24
  '--tao-color-primary',
25
+ '--tao-color-shadow-hint',
23
26
  '--tao-color-success',
24
27
  '--tao-color-text',
25
28
  '--tao-color-text-base',
26
29
  '--tao-color-text-disabled',
30
+ '--tao-color-text-light-solid',
27
31
  '--tao-color-text-placeholder',
28
32
  '--tao-color-text-quaternary',
29
33
  '--tao-color-text-secondary',
@@ -64,6 +68,7 @@ const taoTokenNames = [
64
68
  '--tao-motion-duration-slow',
65
69
  '--tao-motion-ease-in-out',
66
70
  '--tao-motion-ease-out',
71
+ '--tao-motion-ease-out-expo',
67
72
  '--tao-motion-ease-out-quint',
68
73
  '--tao-motion-unit',
69
74
  '--tao-opacity-loading',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rockshin/tao-ui",
3
- "version": "0.0.16",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "description": "A modern React 19 component library with semantic DOM customization and OKLCH-based theming.",
6
6
  "keywords": [
@@ -55,18 +55,20 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@biomejs/biome": "2.4.14",
58
+ "@fontsource/geist-mono": "^5.3.0",
59
+ "@fontsource/geist-sans": "^5.3.0",
58
60
  "@rsbuild/core": "^2.0.11",
59
61
  "@rsbuild/plugin-babel": "^1.2.1",
60
62
  "@rsbuild/plugin-react": "^2.0.1",
61
- "@rslib/core": "^0.23.1",
63
+ "@rslib/core": "^0.23.2",
62
64
  "@rspress/core": "^2.0.13",
63
65
  "@rspress/plugin-api-docgen": "^2.0.13",
64
66
  "@rspress/plugin-preview": "^2.0.13",
65
- "@rstest/adapter-rslib": "^0.10.3",
66
- "@rstest/core": "^0.10.3",
67
- "@storybook/addon-docs": "^10.3.6",
68
- "@storybook/addon-onboarding": "^10.3.6",
69
- "@storybook/react": "^10.3.6",
67
+ "@rstest/adapter-rslib": "^0.10.6",
68
+ "@rstest/core": "^0.10.6",
69
+ "@storybook/addon-docs": "^10.5.3",
70
+ "@storybook/addon-onboarding": "^10.5.3",
71
+ "@storybook/react": "^10.5.3",
70
72
  "@testing-library/jest-dom": "^6.9.1",
71
73
  "@testing-library/react": "^16.3.2",
72
74
  "@types/node": "^24.12.4",
@@ -77,7 +79,7 @@
77
79
  "react": "^19.2.6",
78
80
  "react-dom": "^19.2.6",
79
81
  "rsbuild-plugin-workspace-dev": "^1.0.0",
80
- "storybook": "^10.3.6",
82
+ "storybook": "^10.5.3",
81
83
  "storybook-addon-rslib": "^3.3.4",
82
84
  "storybook-react-rsbuild": "^3.3.4",
83
85
  "typescript": "^6.0.3"