@tac-ui/tokens 0.1.0 → 1.0.0
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/LICENSE +21 -0
- package/dist/{chunk-T3JFXTDW.mjs → chunk-7I7QJ2NP.mjs} +262 -273
- package/dist/chunk-GLCF64BD.mjs +15 -0
- package/dist/index.d.mts +174 -785
- package/dist/index.d.ts +174 -785
- package/dist/index.js +291 -314
- package/dist/index.mjs +30 -56
- package/dist/motion-DrXQxG6N.d.mts +668 -0
- package/dist/motion-DrXQxG6N.d.ts +668 -0
- package/dist/native/index.d.mts +31 -0
- package/dist/native/index.d.ts +31 -0
- package/dist/native/index.js +826 -0
- package/dist/native/index.mjs +142 -0
- package/dist/web/css-variables.d.mts +3 -2
- package/dist/web/css-variables.d.ts +3 -2
- package/dist/web/css-variables.js +220 -229
- package/dist/web/css-variables.mjs +2 -1
- package/native/package.json +5 -0
- package/package.json +20 -10
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { semanticTokens, chart, motion, elevation, radius, spacing, typography } from '../chunk-7I7QJ2NP.mjs';
|
|
2
|
+
export { component as componentTokens, motion as motionTokens, springConfigs, tacSpring } from '../chunk-7I7QJ2NP.mjs';
|
|
3
|
+
|
|
4
|
+
// src/native/shadows.ts
|
|
5
|
+
var nativeShadows = {
|
|
6
|
+
light: {
|
|
7
|
+
sm: {
|
|
8
|
+
shadowColor: "#000",
|
|
9
|
+
shadowOffset: { width: 0, height: 1 },
|
|
10
|
+
shadowOpacity: 0.04,
|
|
11
|
+
shadowRadius: 3,
|
|
12
|
+
elevation: 1
|
|
13
|
+
},
|
|
14
|
+
m: {
|
|
15
|
+
shadowColor: "#000",
|
|
16
|
+
shadowOffset: { width: 0, height: 4 },
|
|
17
|
+
shadowOpacity: 0.05,
|
|
18
|
+
shadowRadius: 12,
|
|
19
|
+
elevation: 3
|
|
20
|
+
},
|
|
21
|
+
lg: {
|
|
22
|
+
shadowColor: "#000",
|
|
23
|
+
shadowOffset: { width: 0, height: 8 },
|
|
24
|
+
shadowOpacity: 0.06,
|
|
25
|
+
shadowRadius: 24,
|
|
26
|
+
elevation: 6
|
|
27
|
+
},
|
|
28
|
+
xl: {
|
|
29
|
+
shadowColor: "#000",
|
|
30
|
+
shadowOffset: { width: 0, height: 16 },
|
|
31
|
+
shadowOpacity: 0.08,
|
|
32
|
+
shadowRadius: 40,
|
|
33
|
+
elevation: 9
|
|
34
|
+
},
|
|
35
|
+
glass: {
|
|
36
|
+
shadowColor: "#000",
|
|
37
|
+
shadowOffset: { width: 0, height: 8 },
|
|
38
|
+
shadowOpacity: 0.05,
|
|
39
|
+
shadowRadius: 32,
|
|
40
|
+
elevation: 4
|
|
41
|
+
},
|
|
42
|
+
glassLg: {
|
|
43
|
+
shadowColor: "#000",
|
|
44
|
+
shadowOffset: { width: 0, height: 12 },
|
|
45
|
+
shadowOpacity: 0.08,
|
|
46
|
+
shadowRadius: 48,
|
|
47
|
+
elevation: 6
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
dark: {
|
|
51
|
+
sm: {
|
|
52
|
+
shadowColor: "#000",
|
|
53
|
+
shadowOffset: { width: 0, height: 1 },
|
|
54
|
+
shadowOpacity: 0.2,
|
|
55
|
+
shadowRadius: 2,
|
|
56
|
+
elevation: 1
|
|
57
|
+
},
|
|
58
|
+
m: {
|
|
59
|
+
shadowColor: "#000",
|
|
60
|
+
shadowOffset: { width: 0, height: 4 },
|
|
61
|
+
shadowOpacity: 0.2,
|
|
62
|
+
shadowRadius: 12,
|
|
63
|
+
elevation: 3
|
|
64
|
+
},
|
|
65
|
+
lg: {
|
|
66
|
+
shadowColor: "#000",
|
|
67
|
+
shadowOffset: { width: 0, height: 8 },
|
|
68
|
+
shadowOpacity: 0.2,
|
|
69
|
+
shadowRadius: 24,
|
|
70
|
+
elevation: 6
|
|
71
|
+
},
|
|
72
|
+
xl: {
|
|
73
|
+
shadowColor: "#000",
|
|
74
|
+
shadowOffset: { width: 0, height: 12 },
|
|
75
|
+
shadowOpacity: 0.22,
|
|
76
|
+
shadowRadius: 32,
|
|
77
|
+
elevation: 9
|
|
78
|
+
},
|
|
79
|
+
glass: {
|
|
80
|
+
shadowColor: "#000",
|
|
81
|
+
shadowOffset: { width: 0, height: 2 },
|
|
82
|
+
shadowOpacity: 0.18,
|
|
83
|
+
shadowRadius: 12,
|
|
84
|
+
elevation: 3
|
|
85
|
+
},
|
|
86
|
+
glassLg: {
|
|
87
|
+
shadowColor: "#000",
|
|
88
|
+
shadowOffset: { width: 0, height: 4 },
|
|
89
|
+
shadowOpacity: 0.2,
|
|
90
|
+
shadowRadius: 20,
|
|
91
|
+
elevation: 5
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
// src/native/index.ts
|
|
97
|
+
function buildNativeTheme(mode) {
|
|
98
|
+
const colors = semanticTokens[mode];
|
|
99
|
+
const chartTokens = chart[mode];
|
|
100
|
+
return {
|
|
101
|
+
mode,
|
|
102
|
+
colors: { ...colors },
|
|
103
|
+
typography: {
|
|
104
|
+
fontFamily: typography.fontFamily,
|
|
105
|
+
display: typography.display,
|
|
106
|
+
heading: typography.heading,
|
|
107
|
+
body: typography.body,
|
|
108
|
+
caption: typography.caption,
|
|
109
|
+
fontWeight: typography.fontWeight
|
|
110
|
+
},
|
|
111
|
+
spacing: { ...spacing },
|
|
112
|
+
radius: { ...radius },
|
|
113
|
+
elevation: { ...elevation[mode] },
|
|
114
|
+
motion: {
|
|
115
|
+
duration: { ...motion.duration },
|
|
116
|
+
easing: {
|
|
117
|
+
standard: motion.easing.standard,
|
|
118
|
+
easeIn: motion.easing.easeIn,
|
|
119
|
+
easeOut: motion.easing.easeOut,
|
|
120
|
+
easeInOut: motion.easing.easeInOut,
|
|
121
|
+
bounce: motion.easing.bounce,
|
|
122
|
+
spring: motion.easing.spring,
|
|
123
|
+
elastic: motion.easing.elastic
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
chart: {
|
|
127
|
+
colors: [...chartTokens.colors],
|
|
128
|
+
grid: chartTokens.grid,
|
|
129
|
+
axis: chartTokens.axis,
|
|
130
|
+
label: chartTokens.label,
|
|
131
|
+
tooltipBg: chartTokens.tooltipBg,
|
|
132
|
+
lineWidth: chart.lineWidth,
|
|
133
|
+
dotSize: chart.dotSize,
|
|
134
|
+
barRadius: chart.barRadius,
|
|
135
|
+
areaOpacity: chart.areaOpacity
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
var lightTheme = buildNativeTheme("light");
|
|
140
|
+
var darkTheme = buildNativeTheme("dark");
|
|
141
|
+
|
|
142
|
+
export { buildNativeTheme, darkTheme, lightTheme, nativeShadows };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { ThemeMode } from '@tac-ui/shared';
|
|
2
|
+
|
|
2
3
|
declare function generateCSSVariables(mode: ThemeMode): Record<string, string>;
|
|
3
4
|
declare function generateCSSBlock(mode: ThemeMode): string;
|
|
4
5
|
/** Generates CSS @keyframes blocks from the motion.keyframes presets. */
|
|
5
6
|
declare function generateKeyframes(): string;
|
|
6
7
|
|
|
7
|
-
export {
|
|
8
|
+
export { generateCSSBlock, generateCSSVariables, generateKeyframes };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { ThemeMode } from '@tac-ui/shared';
|
|
2
|
+
|
|
2
3
|
declare function generateCSSVariables(mode: ThemeMode): Record<string, string>;
|
|
3
4
|
declare function generateCSSBlock(mode: ThemeMode): string;
|
|
4
5
|
/** Generates CSS @keyframes blocks from the motion.keyframes presets. */
|
|
5
6
|
declare function generateKeyframes(): string;
|
|
6
7
|
|
|
7
|
-
export {
|
|
8
|
+
export { generateCSSBlock, generateCSSVariables, generateKeyframes };
|