@vellira-ui/tokens 2.26.1 → 2.27.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.
Files changed (37) hide show
  1. package/dist/css/tokens.css +695 -329
  2. package/dist/dark/components/button.d.ts +263 -95
  3. package/dist/dark/components/button.d.ts.map +1 -1
  4. package/dist/dark/components/button.js +136 -151
  5. package/dist/dark/components/formField.d.ts +1 -1
  6. package/dist/dark/components/input.d.ts +3 -3
  7. package/dist/dark/semantic/icons.d.ts +1 -1
  8. package/dist/dark/semantic/status.d.ts +4 -4
  9. package/dist/dark/theme.d.ts +11 -11
  10. package/dist/generated/token-types.d.ts +4 -4
  11. package/dist/generated/token-types.d.ts.map +1 -1
  12. package/dist/generated/token-types.js +704 -216
  13. package/dist/highContrast/components/button.d.ts +264 -96
  14. package/dist/highContrast/components/button.d.ts.map +1 -1
  15. package/dist/highContrast/components/button.js +135 -150
  16. package/dist/highContrast/components/formField.d.ts +1 -1
  17. package/dist/highContrast/components/input.d.ts +3 -3
  18. package/dist/highContrast/semantic/action.d.ts +6 -6
  19. package/dist/highContrast/semantic/action.js +6 -6
  20. package/dist/highContrast/semantic/icons.d.ts +1 -1
  21. package/dist/highContrast/semantic/status.d.ts +5 -5
  22. package/dist/highContrast/theme.d.ts +11 -11
  23. package/dist/light/components/button.d.ts +264 -96
  24. package/dist/light/components/button.d.ts.map +1 -1
  25. package/dist/light/components/button.js +136 -151
  26. package/dist/light/components/formField.d.ts +2 -2
  27. package/dist/light/components/input.d.ts +3 -3
  28. package/dist/light/semantic/icons.d.ts +1 -1
  29. package/dist/light/semantic/status.d.ts +7 -7
  30. package/dist/light/semantic/status.js +3 -3
  31. package/dist/light/theme.d.ts +11 -11
  32. package/dist/primitives/colors.d.ts +11 -11
  33. package/dist/primitives/colors.js +11 -11
  34. package/dist/utils/createButtonPalette.d.ts +106 -0
  35. package/dist/utils/createButtonPalette.d.ts.map +1 -0
  36. package/dist/utils/createButtonPalette.js +72 -0
  37. package/package.json +1 -1
@@ -1,174 +1,159 @@
1
1
  import { colors } from '../../primitives/colors.js';
2
- import { action } from '../semantic/action.js';
2
+ import { createButtonPalette } from '../../utils/createButtonPalette.js';
3
3
  import { border } from '../semantic/border.js';
4
- import { status } from '../semantic/status.js';
5
4
  import { surface } from '../semantic/surface.js';
6
5
  import { text } from '../semantic/text.js';
7
- const transparent = {
8
- bg: 'transparent',
9
- border: 'transparent',
10
- };
11
- export const button = {
12
- primary: {
13
- solid: {
14
- default: action.primary.default,
15
- hover: action.primary.hover,
16
- pressed: action.primary.active,
6
+ const primary = createButtonPalette({
7
+ ring: colors.primary[400],
8
+ solid: {
9
+ default: {
10
+ bg: colors.primary[600],
11
+ fg: colors.primary[50],
12
+ border: colors.primary[600],
17
13
  },
18
- outline: {
19
- default: {
20
- bg: 'transparent',
21
- fg: colors.primary[300],
22
- border: colors.primary[500],
23
- },
24
- hover: {
25
- bg: surface.elevated,
26
- fg: colors.primary[200],
27
- border: colors.primary[400],
28
- },
29
- pressed: {
30
- bg: surface.active,
31
- fg: colors.primary[100],
32
- border: colors.primary[500],
33
- },
14
+ hover: {
15
+ bg: colors.primary[700],
16
+ fg: colors.primary[200],
17
+ border: colors.primary[700],
34
18
  },
35
- ghost: {
36
- default: {
37
- ...transparent,
38
- fg: colors.primary[300],
39
- },
40
- hover: {
41
- ...transparent,
42
- bg: surface.elevated,
43
- fg: colors.primary[200],
44
- },
45
- pressed: {
46
- ...transparent,
47
- bg: surface.active,
48
- fg: colors.primary[100],
49
- },
19
+ pressed: {
20
+ bg: colors.primary[800],
21
+ fg: colors.primary[300],
22
+ border: colors.primary[800],
50
23
  },
51
24
  },
52
- secondary: {
53
- solid: {
54
- default: action.secondary.default,
55
- hover: action.secondary.hover,
56
- pressed: action.secondary.active,
25
+ fg: colors.primary[400],
26
+ bg: colors.primary[950],
27
+ border: colors.primary[300],
28
+ hoverFg: colors.primary[400],
29
+ hoverBg: colors.primary[900],
30
+ hoverBorder: colors.primary[500],
31
+ pressedFg: colors.primary[500],
32
+ pressedBg: colors.primary[800],
33
+ pressedBorder: colors.primary[600],
34
+ });
35
+ const neutral = createButtonPalette({
36
+ ring: colors.vellira[400],
37
+ solid: {
38
+ default: {
39
+ bg: colors.vellira[200],
40
+ fg: colors.vellira[950],
41
+ border: colors.vellira[200],
57
42
  },
58
- outline: {
59
- default: {
60
- bg: 'transparent',
61
- fg: colors.secondary[300],
62
- border: colors.secondary[500],
63
- },
64
- hover: {
65
- bg: surface.elevated,
66
- fg: colors.secondary[200],
67
- border: colors.secondary[400],
68
- },
69
- pressed: {
70
- bg: surface.active,
71
- fg: colors.secondary[100],
72
- border: colors.secondary[500],
73
- },
43
+ hover: {
44
+ bg: colors.vellira[300],
45
+ fg: colors.vellira[900],
46
+ border: colors.vellira[300],
74
47
  },
75
- ghost: {
76
- default: {
77
- ...transparent,
78
- fg: colors.secondary[300],
79
- },
80
- hover: {
81
- ...transparent,
82
- bg: surface.elevated,
83
- fg: colors.secondary[200],
84
- },
85
- pressed: {
86
- ...transparent,
87
- bg: surface.active,
88
- fg: colors.secondary[100],
89
- },
48
+ pressed: {
49
+ bg: colors.vellira[400],
50
+ fg: colors.vellira[800],
51
+ border: colors.vellira[400],
90
52
  },
91
53
  },
92
- close: {
93
- solid: {
94
- default: action.close.default,
95
- hover: action.close.hover,
96
- pressed: action.close.active,
54
+ fg: colors.vellira[200],
55
+ bg: colors.vellira[800],
56
+ border: colors.vellira[300],
57
+ hoverFg: colors.vellira[300],
58
+ hoverBg: colors.vellira[700],
59
+ hoverBorder: colors.vellira[400],
60
+ pressedFg: colors.vellira[400],
61
+ pressedBg: colors.vellira[800],
62
+ pressedBorder: colors.vellira[500],
63
+ });
64
+ const success = createButtonPalette({
65
+ ring: colors.success[500],
66
+ solid: {
67
+ default: {
68
+ bg: colors.success[500],
69
+ fg: colors.success[950],
70
+ border: colors.success[500],
97
71
  },
98
- outline: {
99
- default: {
100
- bg: 'transparent',
101
- fg: colors.vellira[300],
102
- border: colors.vellira[500],
103
- },
104
- hover: {
105
- bg: surface.elevated,
106
- fg: colors.vellira[200],
107
- border: colors.vellira[400],
108
- },
109
- pressed: {
110
- bg: surface.active,
111
- fg: colors.vellira[100],
112
- border: colors.vellira[500],
113
- },
72
+ hover: {
73
+ bg: colors.success[600],
74
+ fg: colors.success[900],
75
+ border: colors.success[600],
114
76
  },
115
- ghost: {
116
- default: {
117
- ...transparent,
118
- fg: colors.vellira[300],
119
- },
120
- hover: {
121
- ...transparent,
122
- bg: surface.elevated,
123
- fg: colors.vellira[200],
124
- },
125
- pressed: {
126
- ...transparent,
127
- bg: surface.active,
128
- fg: colors.vellira[100],
129
- },
77
+ pressed: {
78
+ bg: colors.success[700],
79
+ fg: colors.success[800],
80
+ border: colors.success[700],
130
81
  },
131
82
  },
132
- danger: {
133
- solid: {
134
- default: action.danger.default,
135
- hover: action.danger.hover,
136
- pressed: action.danger.active,
83
+ fg: colors.success[400],
84
+ bg: colors.success[950],
85
+ border: colors.success[500],
86
+ hoverFg: colors.success[500],
87
+ hoverBg: colors.success[900],
88
+ hoverBorder: colors.success[600],
89
+ pressedFg: colors.success[600],
90
+ pressedBg: colors.success[800],
91
+ pressedBorder: colors.success[700],
92
+ });
93
+ const warning = createButtonPalette({
94
+ ring: colors.warning[500],
95
+ solid: {
96
+ default: {
97
+ bg: colors.warning[500],
98
+ fg: colors.warning[950],
99
+ border: colors.warning[500],
137
100
  },
138
- outline: {
139
- default: {
140
- bg: 'transparent',
141
- fg: status.error.fg,
142
- border: status.error.border,
143
- },
144
- hover: {
145
- bg: status.error.bg,
146
- fg: colors.error[300],
147
- border: colors.error[400],
148
- },
149
- pressed: {
150
- bg: surface.danger,
151
- fg: colors.error[200],
152
- border: colors.error[500],
153
- },
101
+ hover: {
102
+ bg: colors.warning[600],
103
+ fg: colors.warning[900],
104
+ border: colors.warning[600],
154
105
  },
155
- ghost: {
156
- default: {
157
- ...transparent,
158
- fg: status.error.fg,
159
- },
160
- hover: {
161
- ...transparent,
162
- bg: status.error.bg,
163
- fg: colors.error[300],
164
- },
165
- pressed: {
166
- ...transparent,
167
- bg: surface.danger,
168
- fg: colors.error[200],
169
- },
106
+ pressed: {
107
+ bg: colors.warning[700],
108
+ fg: colors.warning[800],
109
+ border: colors.warning[700],
170
110
  },
171
111
  },
112
+ fg: colors.warning[400],
113
+ bg: colors.warning[950],
114
+ border: colors.warning[500],
115
+ hoverFg: colors.warning[500],
116
+ hoverBg: colors.warning[900],
117
+ hoverBorder: colors.warning[600],
118
+ pressedFg: colors.warning[600],
119
+ pressedBg: colors.warning[800],
120
+ pressedBorder: colors.warning[700],
121
+ });
122
+ const danger = createButtonPalette({
123
+ ring: colors.error[500],
124
+ solid: {
125
+ default: {
126
+ bg: colors.error[700],
127
+ fg: colors.error[50],
128
+ border: colors.error[700],
129
+ },
130
+ hover: {
131
+ bg: colors.error[800],
132
+ fg: colors.error[200],
133
+ border: colors.error[800],
134
+ },
135
+ pressed: {
136
+ bg: colors.error[900],
137
+ fg: colors.error[300],
138
+ border: colors.error[900],
139
+ },
140
+ },
141
+ fg: colors.error[400],
142
+ bg: colors.error[950],
143
+ border: colors.error[500],
144
+ hoverFg: colors.error[500],
145
+ hoverBg: colors.error[900],
146
+ hoverBorder: colors.error[600],
147
+ pressedFg: colors.error[600],
148
+ pressedBg: colors.error[800],
149
+ pressedBorder: colors.error[700],
150
+ });
151
+ export const button = {
152
+ primary,
153
+ neutral,
154
+ success,
155
+ warning,
156
+ danger,
172
157
  disabled: {
173
158
  bg: surface.disabled,
174
159
  fg: text.disabled,
@@ -13,7 +13,7 @@ export declare const formField: {
13
13
  readonly fg: "#FB7185";
14
14
  };
15
15
  readonly success: {
16
- readonly fg: "#34D399";
16
+ readonly fg: "#2DD4BF";
17
17
  };
18
18
  readonly warning: {
19
19
  readonly fg: "#FBBF24";
@@ -33,8 +33,8 @@ export declare const input: {
33
33
  readonly ring: "#FB7185";
34
34
  };
35
35
  readonly success: {
36
- readonly border: "#34D399";
37
- readonly ring: "#34D399";
36
+ readonly border: "#2DD4BF";
37
+ readonly ring: "#2DD4BF";
38
38
  };
39
39
  readonly readOnly: {
40
40
  readonly bg: "#242034";
@@ -47,7 +47,7 @@ export declare const input: {
47
47
  readonly default: "#F4F1FB";
48
48
  readonly primary: "#B8A8FF";
49
49
  readonly secondary: "#E5E7EB";
50
- readonly success: "#34D399";
50
+ readonly success: "#2DD4BF";
51
51
  readonly danger: "#FB7185";
52
52
  readonly muted: "#958CB0";
53
53
  readonly inverse: "#000000";
@@ -7,7 +7,7 @@ export declare const icons: {
7
7
  readonly primary: "#B8A8FF";
8
8
  readonly brand: "#B8A8FF";
9
9
  readonly hover: "#D4CCFF";
10
- readonly success: "#34D399";
10
+ readonly success: "#2DD4BF";
11
11
  readonly danger: "#FB7185";
12
12
  readonly inverse: "#000000";
13
13
  };
@@ -1,10 +1,10 @@
1
1
  export declare const status: {
2
2
  readonly success: {
3
- readonly fg: "#34D399";
3
+ readonly fg: "#2DD4BF";
4
4
  readonly bg: "rgba(52, 211, 153, 0.14)";
5
- readonly border: "#34D399";
6
- readonly ring: "#6EE7B7";
7
- readonly strong: "#059669";
5
+ readonly border: "#2DD4BF";
6
+ readonly ring: "#5EEAD4";
7
+ readonly strong: "#0F9E94";
8
8
  };
9
9
  readonly error: {
10
10
  readonly fg: "#FB7185";
@@ -62,17 +62,17 @@ export declare const darkTheme: {
62
62
  readonly 950: "#071927";
63
63
  };
64
64
  readonly success: {
65
- readonly 50: "#ECFDF5";
66
- readonly 100: "#D1FAE5";
67
- readonly 200: "#A7F3D0";
68
- readonly 300: "#6EE7B7";
69
- readonly 400: "#34D399";
70
- readonly 500: "#10B981";
71
- readonly 600: "#059669";
72
- readonly 700: "#047857";
73
- readonly 800: "#065F46";
74
- readonly 900: "#064E3B";
75
- readonly 950: "#022C22";
65
+ readonly 50: "#F0FDFA";
66
+ readonly 100: "#CCFBF1";
67
+ readonly 200: "#99F6E4";
68
+ readonly 300: "#5EEAD4";
69
+ readonly 400: "#2DD4BF";
70
+ readonly 500: "#14B8A6";
71
+ readonly 600: "#0F9E94";
72
+ readonly 700: "#0F766E";
73
+ readonly 800: "#115E59";
74
+ readonly 900: "#134E4A";
75
+ readonly 950: "#042F2E";
76
76
  };
77
77
  readonly error: {
78
78
  readonly 50: "#FFF1F2";