@rockshin/tao-ui 0.0.9 → 0.0.11
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.
- package/component-manifest.json +764 -0
- package/dist/components/breadcrumb/breadcrumb.css +4 -0
- package/dist/components/breadcrumb/breadcrumb.js +8 -6
- package/dist/components/checkbox/checkbox.js +4 -0
- package/dist/components/date-picker/calendar/calendar-grid.js +21 -17
- package/dist/components/date-picker/calendar/calendar-header.js +8 -0
- package/dist/components/date-picker/calendar/month-grid.js +1 -1
- package/dist/components/date-picker/calendar/time-panel.js +36 -41
- package/dist/components/date-picker/date-picker.css +30 -16
- package/dist/components/date-picker/date-picker.js +240 -223
- package/dist/components/date-picker/range-picker.js +25 -2
- package/dist/components/drawer/drawer.js +2 -0
- package/dist/components/dropdown/dropdown.js +2 -1
- package/dist/components/form-field/form.css +0 -4
- package/dist/components/form-section/form-section.js +2 -2
- package/dist/components/menu/menu-render.js +6 -3
- package/dist/components/modal/confirm-dialog.js +9 -1
- package/dist/components/modal/modal.js +2 -0
- package/dist/components/pagination/pagination.js +56 -64
- package/dist/components/scroll-area/scroll-area.css +3 -0
- package/dist/components/scroll-area/scroll-area.js +6 -2
- package/dist/components/select/mobile-select.css +4 -0
- package/dist/components/select/mobile-select.js +9 -4
- package/dist/components/select/select.js +6 -0
- package/dist/components/spinner/spinner.js +2 -1
- package/dist/components/splitter/splitter.js +165 -149
- package/dist/components/switch/switch.js +2 -0
- package/dist/components/table/table.css +14 -0
- package/dist/components/table/table.js +14 -14
- package/dist/components/tabs/tabs.js +84 -87
- package/dist/components/tag/tag.js +1 -0
- package/dist/components/textarea/textarea.css +21 -3
- package/dist/docs/component-doc.d.ts +28 -0
- package/dist/docs/component-doc.js +0 -0
- package/dist/docs/component-docs.d.ts +147 -0
- package/dist/docs/component-docs.js +70 -0
- package/dist/docs/components/breadcrumb.doc.d.ts +23 -0
- package/dist/docs/components/breadcrumb.doc.js +53 -0
- package/dist/docs/components/button.doc.d.ts +29 -0
- package/dist/docs/components/button.doc.js +62 -0
- package/dist/docs/components/checkbox.doc.d.ts +23 -0
- package/dist/docs/components/checkbox.doc.js +60 -0
- package/dist/docs/components/collapsible.doc.d.ts +18 -0
- package/dist/docs/components/collapsible.doc.js +39 -0
- package/dist/docs/components/context-menu.doc.d.ts +18 -0
- package/dist/docs/components/context-menu.doc.js +40 -0
- package/dist/docs/components/date-picker.doc.d.ts +18 -0
- package/dist/docs/components/date-picker.doc.js +43 -0
- package/dist/docs/components/drawer.doc.d.ts +18 -0
- package/dist/docs/components/drawer.doc.js +42 -0
- package/dist/docs/components/dropdown.doc.d.ts +18 -0
- package/dist/docs/components/dropdown.doc.js +42 -0
- package/dist/docs/components/form-actions.doc.d.ts +17 -0
- package/dist/docs/components/form-actions.doc.js +35 -0
- package/dist/docs/components/form-field.doc.d.ts +17 -0
- package/dist/docs/components/form-field.doc.js +39 -0
- package/dist/docs/components/form-layout.doc.d.ts +16 -0
- package/dist/docs/components/form-layout.doc.js +31 -0
- package/dist/docs/components/form-section.doc.d.ts +17 -0
- package/dist/docs/components/form-section.doc.js +38 -0
- package/dist/docs/components/headless-input-number.doc.d.ts +16 -0
- package/dist/docs/components/headless-input-number.doc.js +36 -0
- package/dist/docs/components/input-number.doc.d.ts +18 -0
- package/dist/docs/components/input-number.doc.js +41 -0
- package/dist/docs/components/input.doc.d.ts +17 -0
- package/dist/docs/components/input.doc.js +38 -0
- package/dist/docs/components/modal.doc.d.ts +18 -0
- package/dist/docs/components/modal.doc.js +43 -0
- package/dist/docs/components/pagination.doc.d.ts +17 -0
- package/dist/docs/components/pagination.doc.js +37 -0
- package/dist/docs/components/radio.doc.d.ts +18 -0
- package/dist/docs/components/radio.doc.js +43 -0
- package/dist/docs/components/range-picker.doc.d.ts +17 -0
- package/dist/docs/components/range-picker.doc.js +39 -0
- package/dist/docs/components/scroll-area.doc.d.ts +17 -0
- package/dist/docs/components/scroll-area.doc.js +36 -0
- package/dist/docs/components/select.doc.d.ts +18 -0
- package/dist/docs/components/select.doc.js +43 -0
- package/dist/docs/components/spinner.doc.d.ts +18 -0
- package/dist/docs/components/spinner.doc.js +36 -0
- package/dist/docs/components/splitter.doc.d.ts +17 -0
- package/dist/docs/components/splitter.doc.js +36 -0
- package/dist/docs/components/stack.doc.d.ts +16 -0
- package/dist/docs/components/stack.doc.js +31 -0
- package/dist/docs/components/switch.doc.d.ts +17 -0
- package/dist/docs/components/switch.doc.js +35 -0
- package/dist/docs/components/table.doc.d.ts +18 -0
- package/dist/docs/components/table.doc.js +46 -0
- package/dist/docs/components/tabs.doc.d.ts +18 -0
- package/dist/docs/components/tabs.doc.js +39 -0
- package/dist/docs/components/tag.doc.d.ts +18 -0
- package/dist/docs/components/tag.doc.js +41 -0
- package/dist/docs/components/tao-provider.doc.d.ts +22 -0
- package/dist/docs/components/tao-provider.doc.js +60 -0
- package/dist/docs/components/textarea.doc.d.ts +17 -0
- package/dist/docs/components/textarea.doc.js +35 -0
- package/dist/docs/index.d.ts +2 -0
- package/dist/docs/index.js +1 -0
- package/dist/index.d.ts +35 -33
- package/dist/index.js +2 -0
- package/dist/provider/tao-provider.js +93 -49
- package/dist/theme/theme.css +46 -46
- package/dist/theme/tokens.d.ts +4 -0
- package/dist/theme/tokens.js +108 -0
- package/llms.txt +402 -45
- package/package.json +4 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { createContext, useContext,
|
|
3
|
+
import { createContext, useContext, useRef } from "react";
|
|
4
4
|
const TaoConfigContext = /*#__PURE__*/ createContext({
|
|
5
5
|
size: 'medium',
|
|
6
6
|
disabled: false,
|
|
@@ -17,6 +17,7 @@ function TaoPortalScope(t0) {
|
|
|
17
17
|
let t1;
|
|
18
18
|
if ($[0] !== style || $[1] !== tokenStyle) {
|
|
19
19
|
t1 = {
|
|
20
|
+
display: "contents",
|
|
20
21
|
...tokenStyle,
|
|
21
22
|
...style
|
|
22
23
|
};
|
|
@@ -55,69 +56,112 @@ const TOKEN_TO_VAR_PX = {
|
|
|
55
56
|
lineWidth: '--tao-line-width'
|
|
56
57
|
};
|
|
57
58
|
function useStableTokenKey(token) {
|
|
58
|
-
const key =
|
|
59
|
+
const key = JSON.stringify(token ?? null);
|
|
59
60
|
const ref = useRef(key);
|
|
60
61
|
if (ref.current !== key) ref.current = key;
|
|
61
62
|
return ref.current;
|
|
62
63
|
}
|
|
63
|
-
function TaoProvider(
|
|
64
|
+
function TaoProvider(t0) {
|
|
65
|
+
const $ = c(20);
|
|
66
|
+
const { theme, size, disabled, variant, children } = t0;
|
|
64
67
|
const parentConfig = useContext(TaoConfigContext);
|
|
65
68
|
const inherit = theme?.inherit ?? true;
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
const token = theme?.token;
|
|
70
|
+
const tokenKey = useStableTokenKey(token);
|
|
71
|
+
let t1;
|
|
72
|
+
bb0: {
|
|
73
|
+
let t2;
|
|
74
|
+
if ($[0] !== tokenKey) {
|
|
75
|
+
t2 = JSON.parse(tokenKey);
|
|
76
|
+
$[0] = tokenKey;
|
|
77
|
+
$[1] = t2;
|
|
78
|
+
} else t2 = $[1];
|
|
79
|
+
const parsedToken = t2;
|
|
80
|
+
if (!parsedToken) {
|
|
81
|
+
t1 = void 0;
|
|
82
|
+
break bb0;
|
|
78
83
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
let vars;
|
|
85
|
+
if ($[2] !== parsedToken) {
|
|
86
|
+
vars = {};
|
|
87
|
+
for (const [key, varName] of Object.entries(TOKEN_TO_VAR)){
|
|
88
|
+
const val = parsedToken[key];
|
|
89
|
+
if (null != val) vars[varName] = String(val);
|
|
90
|
+
}
|
|
91
|
+
for (const [key_0, varName_0] of Object.entries(TOKEN_TO_VAR_PX)){
|
|
92
|
+
const val_0 = parsedToken[key_0];
|
|
93
|
+
if (null != val_0) vars[varName_0] = `${val_0}px`;
|
|
94
|
+
}
|
|
95
|
+
$[2] = parsedToken;
|
|
96
|
+
$[3] = vars;
|
|
97
|
+
} else vars = $[3];
|
|
98
|
+
t1 = vars;
|
|
99
|
+
}
|
|
100
|
+
const ownVars = t1;
|
|
101
|
+
let t2;
|
|
102
|
+
if ($[4] !== ownVars || $[5] !== parentConfig.tokenStyle) {
|
|
103
|
+
t2 = {
|
|
84
104
|
...parentConfig.tokenStyle,
|
|
85
105
|
...ownVars
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
106
|
+
};
|
|
107
|
+
$[4] = ownVars;
|
|
108
|
+
$[5] = parentConfig.tokenStyle;
|
|
109
|
+
$[6] = t2;
|
|
110
|
+
} else t2 = $[6];
|
|
111
|
+
const tokenStyle = t2;
|
|
112
|
+
const t3 = ownVars;
|
|
113
|
+
let t4;
|
|
114
|
+
if ($[7] !== t3) {
|
|
115
|
+
t4 = {
|
|
116
|
+
display: "contents",
|
|
117
|
+
...t3
|
|
118
|
+
};
|
|
119
|
+
$[7] = t3;
|
|
120
|
+
$[8] = t4;
|
|
121
|
+
} else t4 = $[8];
|
|
122
|
+
const divStyle = t4;
|
|
96
123
|
const parentSize = parentConfig.size;
|
|
97
124
|
const parentDisabled = parentConfig.disabled;
|
|
98
125
|
const parentVariant = parentConfig.variant;
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
126
|
+
const t5 = size ?? (inherit ? parentSize : "medium");
|
|
127
|
+
const t6 = disabled ?? (inherit ? parentDisabled : false);
|
|
128
|
+
const t7 = variant ?? (inherit ? parentVariant : "outlined");
|
|
129
|
+
let t8;
|
|
130
|
+
if ($[9] !== t5 || $[10] !== t6 || $[11] !== t7 || $[12] !== tokenStyle) {
|
|
131
|
+
t8 = {
|
|
132
|
+
size: t5,
|
|
133
|
+
disabled: t6,
|
|
134
|
+
variant: t7,
|
|
103
135
|
tokenStyle
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
])
|
|
114
|
-
|
|
115
|
-
value: config,
|
|
116
|
-
children: /*#__PURE__*/ jsx("div", {
|
|
136
|
+
};
|
|
137
|
+
$[9] = t5;
|
|
138
|
+
$[10] = t6;
|
|
139
|
+
$[11] = t7;
|
|
140
|
+
$[12] = tokenStyle;
|
|
141
|
+
$[13] = t8;
|
|
142
|
+
} else t8 = $[13];
|
|
143
|
+
const config = t8;
|
|
144
|
+
let t9;
|
|
145
|
+
if ($[14] !== children || $[15] !== divStyle) {
|
|
146
|
+
t9 = /*#__PURE__*/ jsx("div", {
|
|
117
147
|
style: divStyle,
|
|
118
148
|
"data-tao-provider": "",
|
|
119
149
|
children: children
|
|
120
|
-
})
|
|
121
|
-
|
|
150
|
+
});
|
|
151
|
+
$[14] = children;
|
|
152
|
+
$[15] = divStyle;
|
|
153
|
+
$[16] = t9;
|
|
154
|
+
} else t9 = $[16];
|
|
155
|
+
let t10;
|
|
156
|
+
if ($[17] !== config || $[18] !== t9) {
|
|
157
|
+
t10 = /*#__PURE__*/ jsx(TaoConfigContext.Provider, {
|
|
158
|
+
value: config,
|
|
159
|
+
children: t9
|
|
160
|
+
});
|
|
161
|
+
$[17] = config;
|
|
162
|
+
$[18] = t9;
|
|
163
|
+
$[19] = t10;
|
|
164
|
+
} else t10 = $[19];
|
|
165
|
+
return t10;
|
|
122
166
|
}
|
|
123
167
|
export { TaoPortalScope, TaoProvider, useTaoConfig };
|
package/dist/theme/theme.css
CHANGED
|
@@ -25,75 +25,75 @@
|
|
|
25
25
|
:root, [data-tao-provider] {
|
|
26
26
|
--tao-primary: var(--tao-color-primary);
|
|
27
27
|
--tao-primary-hover: color-mix(in oklch,
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
var(--tao-color-primary) 80%,
|
|
29
|
+
white);
|
|
30
30
|
--tao-primary-active: color-mix(in oklch,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
var(--tao-color-primary) 90%,
|
|
32
|
+
black);
|
|
33
33
|
--tao-primary-bg: color-mix(in oklch,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
var(--tao-color-primary) 8%,
|
|
35
|
+
var(--tao-color-bg-base));
|
|
36
36
|
--tao-primary-bg-hover: color-mix(in oklch,
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
var(--tao-color-primary) 12%,
|
|
38
|
+
var(--tao-color-bg-base));
|
|
39
39
|
--tao-primary-border: color-mix(in oklch,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
var(--tao-color-primary) 30%,
|
|
41
|
+
var(--tao-color-bg-base));
|
|
42
42
|
--tao-primary-fg: var(--tao-color-bg-base);
|
|
43
43
|
--tao-error: var(--tao-color-error);
|
|
44
44
|
--tao-error-hover: color-mix(in oklch, var(--tao-color-error) 80%, white);
|
|
45
45
|
--tao-error-active: color-mix(in oklch, var(--tao-color-error) 90%, black);
|
|
46
46
|
--tao-error-bg: color-mix(in oklch,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
var(--tao-color-error) 6%,
|
|
48
|
+
var(--tao-color-bg-base));
|
|
49
49
|
--tao-error-border: color-mix(in oklch,
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
var(--tao-color-error) 30%,
|
|
51
|
+
var(--tao-color-bg-base));
|
|
52
52
|
--tao-error-fg: var(--tao-color-bg-base);
|
|
53
53
|
--tao-success: var(--tao-color-success);
|
|
54
54
|
--tao-success-bg: color-mix(in oklch,
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
var(--tao-color-success) 6%,
|
|
56
|
+
var(--tao-color-bg-base));
|
|
57
57
|
--tao-success-border: color-mix(in oklch,
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
var(--tao-color-success) 30%,
|
|
59
|
+
var(--tao-color-bg-base));
|
|
60
60
|
--tao-warning: var(--tao-color-warning);
|
|
61
61
|
--tao-warning-bg: color-mix(in oklch,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
var(--tao-color-warning) 6%,
|
|
63
|
+
var(--tao-color-bg-base));
|
|
64
64
|
--tao-warning-border: color-mix(in oklch,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
var(--tao-color-warning) 30%,
|
|
66
|
+
var(--tao-color-bg-base));
|
|
67
67
|
--tao-color-text: var(--tao-color-text-base);
|
|
68
68
|
--tao-color-text-secondary: color-mix(in oklch,
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
var(--tao-color-text-base) 65%,
|
|
70
|
+
var(--tao-color-bg-base));
|
|
71
71
|
--tao-color-text-tertiary: color-mix(in oklch,
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
var(--tao-color-text-base) 45%,
|
|
73
|
+
var(--tao-color-bg-base));
|
|
74
74
|
--tao-color-text-quaternary: color-mix(in oklch,
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
var(--tao-color-text-base) 30%,
|
|
76
|
+
var(--tao-color-bg-base));
|
|
77
77
|
--tao-color-fill: color-mix(in oklch,
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
var(--tao-color-text-base) 15%,
|
|
79
|
+
var(--tao-color-bg-base));
|
|
80
80
|
--tao-color-fill-secondary: color-mix(in oklch,
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
var(--tao-color-text-base) 10%,
|
|
82
|
+
var(--tao-color-bg-base));
|
|
83
83
|
--tao-color-fill-tertiary: color-mix(in oklch,
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
var(--tao-color-text-base) 6%,
|
|
85
|
+
var(--tao-color-bg-base));
|
|
86
86
|
--tao-color-fill-quaternary: color-mix(in oklch,
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
var(--tao-color-text-base) 3%,
|
|
88
|
+
var(--tao-color-bg-base));
|
|
89
89
|
--tao-color-bg-layout: color-mix(in oklch,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
var(--tao-color-text-base) 4%,
|
|
91
|
+
var(--tao-color-bg-base));
|
|
92
92
|
--tao-color-bg-container: oklch(100% 0 0);
|
|
93
93
|
--tao-color-bg-elevated: oklch(100% 0 0);
|
|
94
94
|
--tao-color-border: color-mix(in oklch,
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
var(--tao-color-text-base) 12%,
|
|
96
|
+
var(--tao-color-bg-base));
|
|
97
97
|
--tao-color-border-secondary: #0000170b;
|
|
98
98
|
--tao-radius-xs: 2px;
|
|
99
99
|
--tao-radius-sm: calc(var(--tao-radius) - 2px);
|
|
@@ -133,14 +133,14 @@
|
|
|
133
133
|
--tao-box-shadow-secondary: 0 2px 8px oklch(0% 0 0 / .06), 0 0 1px oklch(0% 0 0 / .06);
|
|
134
134
|
--tao-box-shadow-tertiary: 0 1px 2px oklch(0% 0 0 / .04);
|
|
135
135
|
--tao-control-outline: color-mix(in oklch,
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
var(--tao-color-primary) 20%,
|
|
137
|
+
transparent);
|
|
138
138
|
--tao-color-error-outline: color-mix(in oklch,
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
var(--tao-color-error) 25%,
|
|
140
|
+
transparent);
|
|
141
141
|
--tao-color-warning-outline: color-mix(in oklch,
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
var(--tao-color-warning) 25%,
|
|
143
|
+
transparent);
|
|
144
144
|
--tao-color-text-placeholder: var(--tao-color-text-quaternary);
|
|
145
145
|
--tao-color-text-disabled: var(--tao-color-text-quaternary);
|
|
146
146
|
--tao-color-bg-disabled: var(--tao-color-fill-tertiary);
|
|
@@ -0,0 +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';
|
|
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"];
|
|
4
|
+
export declare const taoTokenVars: Record<TaoTokenName, string>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
function tokenVar(name) {
|
|
2
|
+
return `var(${name})`;
|
|
3
|
+
}
|
|
4
|
+
const taoTokenNames = [
|
|
5
|
+
'--tao-box-shadow',
|
|
6
|
+
'--tao-box-shadow-secondary',
|
|
7
|
+
'--tao-box-shadow-tertiary',
|
|
8
|
+
'--tao-box-shadow-xs',
|
|
9
|
+
'--tao-color-bg-base',
|
|
10
|
+
'--tao-color-bg-container',
|
|
11
|
+
'--tao-color-bg-disabled',
|
|
12
|
+
'--tao-color-bg-elevated',
|
|
13
|
+
'--tao-color-bg-layout',
|
|
14
|
+
'--tao-color-border',
|
|
15
|
+
'--tao-color-border-secondary',
|
|
16
|
+
'--tao-color-error',
|
|
17
|
+
'--tao-color-error-outline',
|
|
18
|
+
'--tao-color-fill',
|
|
19
|
+
'--tao-color-fill-quaternary',
|
|
20
|
+
'--tao-color-fill-secondary',
|
|
21
|
+
'--tao-color-fill-tertiary',
|
|
22
|
+
'--tao-color-primary',
|
|
23
|
+
'--tao-color-success',
|
|
24
|
+
'--tao-color-text',
|
|
25
|
+
'--tao-color-text-base',
|
|
26
|
+
'--tao-color-text-disabled',
|
|
27
|
+
'--tao-color-text-placeholder',
|
|
28
|
+
'--tao-color-text-quaternary',
|
|
29
|
+
'--tao-color-text-secondary',
|
|
30
|
+
'--tao-color-text-tertiary',
|
|
31
|
+
'--tao-color-warning',
|
|
32
|
+
'--tao-color-warning-outline',
|
|
33
|
+
'--tao-control-height',
|
|
34
|
+
'--tao-control-height-lg',
|
|
35
|
+
'--tao-control-height-sm',
|
|
36
|
+
'--tao-control-item-bg-active',
|
|
37
|
+
'--tao-control-item-bg-hover',
|
|
38
|
+
'--tao-control-outline',
|
|
39
|
+
'--tao-control-range-width',
|
|
40
|
+
'--tao-control-width',
|
|
41
|
+
'--tao-error',
|
|
42
|
+
'--tao-error-active',
|
|
43
|
+
'--tao-error-bg',
|
|
44
|
+
'--tao-error-border',
|
|
45
|
+
'--tao-error-fg',
|
|
46
|
+
'--tao-error-hover',
|
|
47
|
+
'--tao-font-family',
|
|
48
|
+
'--tao-font-family-code',
|
|
49
|
+
'--tao-font-size',
|
|
50
|
+
'--tao-font-size-base',
|
|
51
|
+
'--tao-font-size-lg',
|
|
52
|
+
'--tao-font-size-sm',
|
|
53
|
+
'--tao-font-size-xl',
|
|
54
|
+
'--tao-font-size-xs',
|
|
55
|
+
'--tao-font-weight-medium',
|
|
56
|
+
'--tao-font-weight-normal',
|
|
57
|
+
'--tao-font-weight-strong',
|
|
58
|
+
'--tao-line-height',
|
|
59
|
+
'--tao-line-height-lg',
|
|
60
|
+
'--tao-line-height-sm',
|
|
61
|
+
'--tao-line-width',
|
|
62
|
+
'--tao-motion-duration-fast',
|
|
63
|
+
'--tao-motion-duration-mid',
|
|
64
|
+
'--tao-motion-duration-slow',
|
|
65
|
+
'--tao-motion-ease-in-out',
|
|
66
|
+
'--tao-motion-ease-out',
|
|
67
|
+
'--tao-motion-ease-out-quint',
|
|
68
|
+
'--tao-motion-unit',
|
|
69
|
+
'--tao-opacity-loading',
|
|
70
|
+
'--tao-padding',
|
|
71
|
+
'--tao-padding-lg',
|
|
72
|
+
'--tao-padding-md',
|
|
73
|
+
'--tao-padding-sm',
|
|
74
|
+
'--tao-padding-xl',
|
|
75
|
+
'--tao-padding-xs',
|
|
76
|
+
'--tao-padding-xxs',
|
|
77
|
+
'--tao-primary',
|
|
78
|
+
'--tao-primary-active',
|
|
79
|
+
'--tao-primary-bg',
|
|
80
|
+
'--tao-primary-bg-hover',
|
|
81
|
+
'--tao-primary-border',
|
|
82
|
+
'--tao-primary-fg',
|
|
83
|
+
'--tao-primary-hover',
|
|
84
|
+
'--tao-radius',
|
|
85
|
+
'--tao-radius-2xl',
|
|
86
|
+
'--tao-radius-full',
|
|
87
|
+
'--tao-radius-lg',
|
|
88
|
+
'--tao-radius-md',
|
|
89
|
+
'--tao-radius-sm',
|
|
90
|
+
'--tao-radius-xl',
|
|
91
|
+
'--tao-radius-xs',
|
|
92
|
+
'--tao-ring-width',
|
|
93
|
+
'--tao-size-unit',
|
|
94
|
+
'--tao-success',
|
|
95
|
+
'--tao-success-bg',
|
|
96
|
+
'--tao-success-border',
|
|
97
|
+
'--tao-warning',
|
|
98
|
+
'--tao-warning-bg',
|
|
99
|
+
'--tao-warning-border',
|
|
100
|
+
'--tao-z-index-drawer',
|
|
101
|
+
'--tao-z-index-modal',
|
|
102
|
+
'--tao-z-index-popup'
|
|
103
|
+
];
|
|
104
|
+
const taoTokenVars = Object.fromEntries(taoTokenNames.map((name)=>[
|
|
105
|
+
name,
|
|
106
|
+
tokenVar(name)
|
|
107
|
+
]));
|
|
108
|
+
export { taoTokenNames, taoTokenVars, tokenVar };
|