@vellira-ui/tokens 2.39.4 → 2.40.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.
@@ -1,72 +1,256 @@
1
1
  export declare const tabs: {
2
- readonly list: {
3
- readonly border: "#E4DDF4";
2
+ readonly primary: {
3
+ readonly trigger: {
4
+ readonly default: {
5
+ readonly bg: "transparent";
6
+ readonly fg: string;
7
+ readonly border: "transparent";
8
+ };
9
+ readonly hover: {
10
+ readonly bg: string;
11
+ readonly fg: string;
12
+ readonly border: "transparent";
13
+ };
14
+ readonly active: {
15
+ readonly bg: string;
16
+ readonly fg: string;
17
+ readonly border: string;
18
+ };
19
+ };
20
+ readonly pills: {
21
+ readonly default: {
22
+ readonly bg: "transparent";
23
+ readonly fg: string;
24
+ readonly border: "transparent";
25
+ };
26
+ readonly hover: {
27
+ readonly bg: string;
28
+ readonly fg: string;
29
+ readonly border: "transparent";
30
+ };
31
+ readonly active: {
32
+ readonly bg: string;
33
+ readonly fg: string;
34
+ readonly border: string;
35
+ };
36
+ };
37
+ readonly segmented: {
38
+ readonly bg: string;
39
+ readonly active: {
40
+ readonly bg: string;
41
+ readonly fg: string;
42
+ readonly border: string;
43
+ };
44
+ };
45
+ readonly indicator: {
46
+ readonly bg: string;
47
+ readonly hoverBg: string;
48
+ };
49
+ readonly focusRing: string;
4
50
  };
5
- readonly trigger: {
6
- readonly default: {
7
- readonly bg: "transparent";
8
- readonly fg: "#6B6386";
9
- readonly border: "transparent";
10
- };
11
- readonly hover: {
12
- readonly bg: "transparent";
13
- readonly fg: "#402C9F";
14
- readonly border: "transparent";
15
- };
16
- readonly active: {
17
- readonly bg: "transparent";
18
- readonly fg: "#5037C8";
19
- readonly border: "#6346E8";
20
- };
21
- readonly focus: {
22
- readonly ring: {
23
- readonly color: "#5037C8";
24
- readonly width: "2px";
25
- readonly shadow: "0 0 8px rgba(99, 70, 232, 0.14)";
26
- readonly offset: "#FFFFFF";
27
- };
28
- };
29
- readonly disabled: {
30
- readonly bg: "transparent";
31
- readonly fg: "#958CB0";
32
- readonly border: "transparent";
51
+ readonly neutral: {
52
+ readonly trigger: {
53
+ readonly default: {
54
+ readonly bg: "transparent";
55
+ readonly fg: string;
56
+ readonly border: "transparent";
57
+ };
58
+ readonly hover: {
59
+ readonly bg: string;
60
+ readonly fg: string;
61
+ readonly border: "transparent";
62
+ };
63
+ readonly active: {
64
+ readonly bg: string;
65
+ readonly fg: string;
66
+ readonly border: string;
67
+ };
68
+ };
69
+ readonly pills: {
70
+ readonly default: {
71
+ readonly bg: "transparent";
72
+ readonly fg: string;
73
+ readonly border: "transparent";
74
+ };
75
+ readonly hover: {
76
+ readonly bg: string;
77
+ readonly fg: string;
78
+ readonly border: "transparent";
79
+ };
80
+ readonly active: {
81
+ readonly bg: string;
82
+ readonly fg: string;
83
+ readonly border: string;
84
+ };
85
+ };
86
+ readonly segmented: {
87
+ readonly bg: string;
88
+ readonly active: {
89
+ readonly bg: string;
90
+ readonly fg: string;
91
+ readonly border: string;
92
+ };
93
+ };
94
+ readonly indicator: {
95
+ readonly bg: string;
96
+ readonly hoverBg: string;
97
+ };
98
+ readonly focusRing: string;
99
+ };
100
+ readonly success: {
101
+ readonly trigger: {
102
+ readonly default: {
103
+ readonly bg: "transparent";
104
+ readonly fg: string;
105
+ readonly border: "transparent";
106
+ };
107
+ readonly hover: {
108
+ readonly bg: string;
109
+ readonly fg: string;
110
+ readonly border: "transparent";
111
+ };
112
+ readonly active: {
113
+ readonly bg: string;
114
+ readonly fg: string;
115
+ readonly border: string;
116
+ };
33
117
  };
118
+ readonly pills: {
119
+ readonly default: {
120
+ readonly bg: "transparent";
121
+ readonly fg: string;
122
+ readonly border: "transparent";
123
+ };
124
+ readonly hover: {
125
+ readonly bg: string;
126
+ readonly fg: string;
127
+ readonly border: "transparent";
128
+ };
129
+ readonly active: {
130
+ readonly bg: string;
131
+ readonly fg: string;
132
+ readonly border: string;
133
+ };
134
+ };
135
+ readonly segmented: {
136
+ readonly bg: string;
137
+ readonly active: {
138
+ readonly bg: string;
139
+ readonly fg: string;
140
+ readonly border: string;
141
+ };
142
+ };
143
+ readonly indicator: {
144
+ readonly bg: string;
145
+ readonly hoverBg: string;
146
+ };
147
+ readonly focusRing: string;
34
148
  };
35
- readonly pills: {
36
- readonly default: {
37
- readonly bg: "transparent";
38
- readonly fg: "#6B6386";
39
- readonly border: "transparent";
40
- };
41
- readonly hover: {
42
- readonly bg: "#F4F1FB";
43
- readonly fg: "#3D3754";
44
- readonly border: "transparent";
45
- };
46
- readonly active: {
47
- readonly bg: "#6346E8";
48
- readonly fg: "#FFFFFF";
49
- readonly border: "#6346E8";
50
- };
51
- readonly disabled: {
52
- readonly bg: "transparent";
53
- readonly fg: "#958CB0";
54
- readonly border: "transparent";
149
+ readonly warning: {
150
+ readonly trigger: {
151
+ readonly default: {
152
+ readonly bg: "transparent";
153
+ readonly fg: string;
154
+ readonly border: "transparent";
155
+ };
156
+ readonly hover: {
157
+ readonly bg: string;
158
+ readonly fg: string;
159
+ readonly border: "transparent";
160
+ };
161
+ readonly active: {
162
+ readonly bg: string;
163
+ readonly fg: string;
164
+ readonly border: string;
165
+ };
166
+ };
167
+ readonly pills: {
168
+ readonly default: {
169
+ readonly bg: "transparent";
170
+ readonly fg: string;
171
+ readonly border: "transparent";
172
+ };
173
+ readonly hover: {
174
+ readonly bg: string;
175
+ readonly fg: string;
176
+ readonly border: "transparent";
177
+ };
178
+ readonly active: {
179
+ readonly bg: string;
180
+ readonly fg: string;
181
+ readonly border: string;
182
+ };
55
183
  };
184
+ readonly segmented: {
185
+ readonly bg: string;
186
+ readonly active: {
187
+ readonly bg: string;
188
+ readonly fg: string;
189
+ readonly border: string;
190
+ };
191
+ };
192
+ readonly indicator: {
193
+ readonly bg: string;
194
+ readonly hoverBg: string;
195
+ };
196
+ readonly focusRing: string;
56
197
  };
57
- readonly indicator: {
58
- readonly default: {
59
- readonly bg: "#5037C8";
198
+ readonly danger: {
199
+ readonly trigger: {
200
+ readonly default: {
201
+ readonly bg: "transparent";
202
+ readonly fg: string;
203
+ readonly border: "transparent";
204
+ };
205
+ readonly hover: {
206
+ readonly bg: string;
207
+ readonly fg: string;
208
+ readonly border: "transparent";
209
+ };
210
+ readonly active: {
211
+ readonly bg: string;
212
+ readonly fg: string;
213
+ readonly border: string;
214
+ };
60
215
  };
61
- readonly hover: {
62
- readonly bg: "#5037C8";
216
+ readonly pills: {
217
+ readonly default: {
218
+ readonly bg: "transparent";
219
+ readonly fg: string;
220
+ readonly border: "transparent";
221
+ };
222
+ readonly hover: {
223
+ readonly bg: string;
224
+ readonly fg: string;
225
+ readonly border: "transparent";
226
+ };
227
+ readonly active: {
228
+ readonly bg: string;
229
+ readonly fg: string;
230
+ readonly border: string;
231
+ };
232
+ };
233
+ readonly segmented: {
234
+ readonly bg: string;
235
+ readonly active: {
236
+ readonly bg: string;
237
+ readonly fg: string;
238
+ readonly border: string;
239
+ };
63
240
  };
64
- readonly active: {
65
- readonly bg: "#6346E8";
241
+ readonly indicator: {
242
+ readonly bg: string;
243
+ readonly hoverBg: string;
66
244
  };
245
+ readonly focusRing: string;
246
+ };
247
+ readonly disabled: import("../../factories/createTabsTokens.js").TabsStateTokens;
248
+ readonly list: {
249
+ border: string;
250
+ segmentedBg: string;
67
251
  };
68
252
  readonly panel: {
69
- readonly fg: "#3D3754";
253
+ fg: string;
70
254
  };
71
255
  };
72
256
  //# sourceMappingURL=tabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/light/components/tabs.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EP,CAAC"}
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../src/light/components/tabs.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFf,CAAC"}
@@ -1,73 +1,99 @@
1
- import { action } from '../semantic/action.js';
1
+ import { createTabsPalette, createTabsTokens, } from '../../factories/createTabsTokens.js';
2
+ import { colors } from '../../primitives/colors.js';
3
+ import { withAlpha } from '../../utils/color.js';
2
4
  import { border } from '../semantic/border.js';
3
- import { control } from '../semantic/control.js';
4
5
  import { focus } from '../semantic/focus.js';
5
- import { navigation } from '../semantic/navigation.js';
6
6
  import { surface } from '../semantic/surface.js';
7
7
  import { text } from '../semantic/text.js';
8
- export const tabs = {
8
+ const defaults = {
9
+ triggerDefaultFg: text.secondary,
10
+ triggerHoverFg: text.primary,
11
+ triggerHoverBg: withAlpha(colors.vellira[900], 0.035),
12
+ triggerActiveBg: 'transparent',
13
+ segmentedBg: withAlpha(colors.vellira[900], 0.03),
14
+ focusRing: focus.ring.color,
15
+ };
16
+ export const tabs = createTabsTokens({
17
+ primary: createTabsPalette({
18
+ ...defaults,
19
+ triggerActiveFg: colors.primary[700],
20
+ triggerActiveBorder: colors.primary[600],
21
+ indicator: colors.primary[600],
22
+ indicatorHover: colors.primary[700],
23
+ segmentedActiveBg: surface.elevated,
24
+ segmentedActiveBorder: 'transparent',
25
+ segmentedActiveFg: colors.primary[800],
26
+ pillHoverBg: colors.primary[50],
27
+ pillActiveBg: colors.primary[100],
28
+ pillActiveBorder: colors.primary[300],
29
+ pillActiveFg: colors.primary[900],
30
+ }),
31
+ neutral: createTabsPalette({
32
+ ...defaults,
33
+ triggerActiveFg: colors.vellira[700],
34
+ triggerActiveBorder: colors.vellira[500],
35
+ indicator: colors.vellira[500],
36
+ indicatorHover: colors.vellira[600],
37
+ segmentedActiveBg: surface.elevated,
38
+ segmentedActiveBorder: 'transparent',
39
+ segmentedActiveFg: colors.vellira[800],
40
+ pillHoverBg: colors.vellira[100],
41
+ pillActiveBg: colors.vellira[150],
42
+ pillActiveBorder: colors.vellira[300],
43
+ pillActiveFg: colors.vellira[900],
44
+ }),
45
+ success: createTabsPalette({
46
+ ...defaults,
47
+ triggerActiveFg: colors.success[700],
48
+ triggerActiveBorder: colors.success[600],
49
+ indicator: colors.success[600],
50
+ indicatorHover: colors.success[700],
51
+ segmentedActiveBg: surface.elevated,
52
+ segmentedActiveBorder: 'transparent',
53
+ segmentedActiveFg: colors.success[800],
54
+ pillHoverBg: colors.success[50],
55
+ pillActiveBg: colors.success[100],
56
+ pillActiveBorder: colors.success[300],
57
+ pillActiveFg: colors.success[900],
58
+ }),
59
+ warning: createTabsPalette({
60
+ ...defaults,
61
+ triggerActiveFg: colors.warning[700],
62
+ triggerActiveBorder: colors.warning[600],
63
+ indicator: colors.warning[600],
64
+ indicatorHover: colors.warning[700],
65
+ segmentedActiveBg: surface.elevated,
66
+ segmentedActiveBorder: 'transparent',
67
+ segmentedActiveFg: colors.warning[800],
68
+ pillHoverBg: colors.warning[50],
69
+ pillActiveBg: colors.warning[100],
70
+ pillActiveBorder: colors.warning[300],
71
+ pillActiveFg: colors.warning[900],
72
+ }),
73
+ danger: createTabsPalette({
74
+ ...defaults,
75
+ triggerActiveFg: colors.error[700],
76
+ triggerActiveBorder: colors.error[600],
77
+ indicator: colors.error[600],
78
+ indicatorHover: colors.error[700],
79
+ segmentedActiveBg: surface.elevated,
80
+ segmentedActiveBorder: 'transparent',
81
+ segmentedActiveFg: colors.error[800],
82
+ pillHoverBg: colors.error[50],
83
+ pillActiveBg: colors.error[100],
84
+ pillActiveBorder: colors.error[300],
85
+ pillActiveFg: colors.error[900],
86
+ }),
87
+ disabled: {
88
+ bg: 'transparent',
89
+ fg: text.disabled,
90
+ border: 'transparent',
91
+ },
9
92
  list: {
10
93
  border: border.muted,
11
- },
12
- trigger: {
13
- default: {
14
- bg: 'transparent',
15
- fg: text.secondary,
16
- border: 'transparent',
17
- },
18
- hover: {
19
- bg: 'transparent',
20
- fg: navigation.tabHover.fg,
21
- border: 'transparent',
22
- },
23
- active: {
24
- bg: 'transparent',
25
- fg: text.interactive,
26
- border: action.primary.default.border,
27
- },
28
- focus: {
29
- ring: focus.ring,
30
- },
31
- disabled: {
32
- bg: 'transparent',
33
- fg: text.disabled,
34
- border: 'transparent',
35
- },
36
- },
37
- pills: {
38
- default: {
39
- bg: 'transparent',
40
- fg: text.secondary,
41
- border: 'transparent',
42
- },
43
- hover: {
44
- bg: surface.hover,
45
- fg: text.primary,
46
- border: 'transparent',
47
- },
48
- active: {
49
- bg: control.selected.default.bg,
50
- fg: control.selected.default.fg,
51
- border: control.selected.default.border,
52
- },
53
- disabled: {
54
- bg: 'transparent',
55
- fg: text.disabled,
56
- border: 'transparent',
57
- },
58
- },
59
- indicator: {
60
- default: {
61
- bg: text.interactive,
62
- },
63
- hover: {
64
- bg: action.primary.hover.bg,
65
- },
66
- active: {
67
- bg: action.primary.default.bg,
68
- },
94
+ segmentedBg: withAlpha(colors.vellira[900], 0.03),
69
95
  },
70
96
  panel: {
71
97
  fg: text.primary,
72
98
  },
73
- };
99
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellira-ui/tokens",
3
- "version": "2.39.4",
3
+ "version": "2.40.0",
4
4
  "description": "Design tokens for Vellira Design System",
5
5
  "author": "Roman Bakurov",
6
6
  "license": "MIT",