@commmerce/tokens 0.0.0-stage → 1.0.0-rc.4
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.md +17 -0
- package/README.md +16 -2
- package/dist/fonts.css +2 -0
- package/dist/tokens.css +253 -0
- package/dist/tokens.d.ts +171 -0
- package/dist/tokens.js +88 -0
- package/dist/tokens.json +933 -0
- package/package.json +41 -4
package/LICENSE.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Commmerce UI Licence — DRAFT, NOT YET IN FORCE
|
|
2
|
+
|
|
3
|
+
> Draft for legal review. Do not publish packages until this is approved.
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2026 Outdo Inc. (Commmerce). All rights reserved.
|
|
6
|
+
|
|
7
|
+
1. **Grant.** You may install, use and include unmodified copies of the Commmerce UI packages
|
|
8
|
+
(`@commmerce/tokens`, `@commmerce/ui`, `@commmerce/ui-react`, `@commmerce/app-bridge`) in
|
|
9
|
+
software whose purpose is to run on, integrate with or extend a Commmerce platform, including
|
|
10
|
+
apps listed in, or privately installed through, the Commmerce app marketplace.
|
|
11
|
+
2. **Restrictions.** You may not use the packages, or the Commmerce name, logo or visual identity
|
|
12
|
+
they carry, to build a product that is not for use with a Commmerce platform, or one that
|
|
13
|
+
presents itself as made or endorsed by Commmerce. You may not redistribute the packages on their
|
|
14
|
+
own or as a competing design system.
|
|
15
|
+
3. **No warranty.** The packages are provided "as is", without warranty of any kind. Commmerce is
|
|
16
|
+
not liable for any claim or damages arising from their use.
|
|
17
|
+
4. **Termination.** This licence ends automatically if you breach it.
|
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @commmerce/tokens
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Commmerce design tokens: colours, typography, spacing, radii and shadows, each with a light and a dark value.
|
|
4
|
+
|
|
5
|
+
Docs: https://commmerce.com/blog/commmerceui/#foundations--tokens
|
|
6
|
+
|
|
7
|
+
```js
|
|
8
|
+
import '@commmerce/tokens/fonts.css'; // the Poppins typeface, from Google Fonts (or self-host it)
|
|
9
|
+
import '@commmerce/tokens/tokens.css'; // CSS variables: --cm-bg-surface, --cm-text-default, …
|
|
10
|
+
import { tokens } from '@commmerce/tokens'; // tokens.bgSurface === 'var(--cm-bg-surface)'
|
|
11
|
+
import data from '@commmerce/tokens/tokens.json'; // every token with its light and dark value and usage
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Themes: set `data-cm-theme="light" | "dark" | "auto"` on any element. Every text and icon colour pair used by
|
|
15
|
+
Commmerce UI components meets WCAG AA contrast in both themes.
|
|
16
|
+
|
|
17
|
+
Support: support@commmerce.com
|
package/dist/fonts.css
ADDED
package/dist/tokens.css
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/* @commmerce/tokens v1.0.0-rc.4 — generated, do not edit */
|
|
2
|
+
|
|
3
|
+
:root, [data-cm-theme] {
|
|
4
|
+
color-scheme: light;
|
|
5
|
+
--cm-bg-page: #f6f6f6;
|
|
6
|
+
--cm-bg-surface: #ffffff;
|
|
7
|
+
--cm-bg-flash-bar: #2e2a2a;
|
|
8
|
+
--cm-bg-dashboard: #000000;
|
|
9
|
+
--cm-bg-attention: #e5f2ff;
|
|
10
|
+
--cm-bg-information: #f1a953;
|
|
11
|
+
--cm-bg-success: #81bb47;
|
|
12
|
+
--cm-bg-critical: #fff0f0;
|
|
13
|
+
--cm-bg-tag: #f1f3fa;
|
|
14
|
+
--cm-bg-icon: #f7f7f7;
|
|
15
|
+
--cm-bg-hover: #f7f7f7;
|
|
16
|
+
--cm-bg-error-bar: #fff2f2;
|
|
17
|
+
--cm-bg-offer-card: #eef5ff;
|
|
18
|
+
--cm-bg-inset: #f9f9fc;
|
|
19
|
+
--cm-bg-input-filled: #f9f9f9;
|
|
20
|
+
--cm-icon-default: #8b8b8b;
|
|
21
|
+
--cm-icon-hover: #ffffff;
|
|
22
|
+
--cm-icon-selected: #000000;
|
|
23
|
+
--cm-icon-responsive-menu: #696969;
|
|
24
|
+
--cm-icon-success: #749e48;
|
|
25
|
+
--cm-icon-critical: #ff0000;
|
|
26
|
+
--cm-icon-rating: #ffc107;
|
|
27
|
+
--cm-text-default: #000000;
|
|
28
|
+
--cm-text-secondary: #9e9e9e;
|
|
29
|
+
--cm-text-tertiary: #707070;
|
|
30
|
+
--cm-text-information: #ad5500;
|
|
31
|
+
--cm-text-critical: #de0000;
|
|
32
|
+
--cm-text-success: #3c7c00;
|
|
33
|
+
--cm-text-attention: #2e6faf;
|
|
34
|
+
--cm-text-on-dark: #ffffff;
|
|
35
|
+
--cm-text-on-dark-secondary: #b5b5b5;
|
|
36
|
+
--cm-text-speciality: #008800;
|
|
37
|
+
--cm-text-counter: #3b68f9;
|
|
38
|
+
--cm-border-default: #d6d6d6;
|
|
39
|
+
--cm-border-strong: #000000;
|
|
40
|
+
--cm-border-input: #8b8b8b;
|
|
41
|
+
--cm-action-primary: #000000;
|
|
42
|
+
--cm-action-primary-hover: #707070;
|
|
43
|
+
--cm-action-primary-text: #ffffff;
|
|
44
|
+
--cm-action-disabled: #d6d6d6;
|
|
45
|
+
--cm-action-disabled-text: #707070;
|
|
46
|
+
--cm-text-speciality-on-dark: #1ec81a;
|
|
47
|
+
--cm-border-critical: #ff0000;
|
|
48
|
+
--cm-border-card: rgba(148, 148, 148, 0.3);
|
|
49
|
+
--cm-gray-1000: #000000;
|
|
50
|
+
--cm-gray-700: #707070;
|
|
51
|
+
--cm-gray-600: #8b8b8b;
|
|
52
|
+
--cm-gray-500: #9e9e9e;
|
|
53
|
+
--cm-gray-400: #c9c9c9;
|
|
54
|
+
--cm-gray-300: #d6d6d6;
|
|
55
|
+
--cm-gray-100: #f4f4f4;
|
|
56
|
+
--cm-gray-50: #f6f6f6;
|
|
57
|
+
--cm-gray-900: #1e1e1e;
|
|
58
|
+
--cm-gray-800: #414141;
|
|
59
|
+
--cm-bg-panel-header: #1b1b1b;
|
|
60
|
+
--cm-border-subtle: #f1f1f1;
|
|
61
|
+
--cm-toggle-on: #92cf8d;
|
|
62
|
+
--cm-toggle-off: #d5d5d5;
|
|
63
|
+
--cm-avatar-bg: #c4e5cd;
|
|
64
|
+
--cm-nav-active: #3b3b3b;
|
|
65
|
+
--cm-nav-divider: #333333;
|
|
66
|
+
--cm-nav-badge: #446beb;
|
|
67
|
+
--cm-thumb-bg: #e7e7e7;
|
|
68
|
+
--cm-overlay: rgba(0, 0, 0, 0.4);
|
|
69
|
+
--cm-bg-information-soft: rgba(241, 169, 83, 0.16);
|
|
70
|
+
--cm-bg-success-soft: rgba(129, 187, 71, 0.16);
|
|
71
|
+
--cm-bg-attention-soft: #e8ebf5;
|
|
72
|
+
--cm-space-10: 10px;
|
|
73
|
+
--cm-space-12: 12px;
|
|
74
|
+
--cm-space-15: 15px;
|
|
75
|
+
--cm-space-20: 20px;
|
|
76
|
+
--cm-space-22: 22px;
|
|
77
|
+
--cm-space-30: 30px;
|
|
78
|
+
--cm-radius-xs: 2px;
|
|
79
|
+
--cm-radius-sm: 4px;
|
|
80
|
+
--cm-radius-md: 6px;
|
|
81
|
+
--cm-radius-lg: 12px;
|
|
82
|
+
--cm-radius-full: 9999px;
|
|
83
|
+
--cm-border-1: 1px;
|
|
84
|
+
--cm-shadow-0: none;
|
|
85
|
+
--cm-shadow-100: 12px -12px 44px 0px rgba(160, 160, 160, 0.14);
|
|
86
|
+
--cm-tracking-caps: 0.16em;
|
|
87
|
+
--cm-font-sans: "Poppins", system-ui, sans-serif;
|
|
88
|
+
--cm-type-heading-lg-size: 26px;
|
|
89
|
+
--cm-type-heading-lg-line-height: 1.5;
|
|
90
|
+
--cm-type-heading-lg-weight: 600;
|
|
91
|
+
--cm-type-heading-sm-size: 20px;
|
|
92
|
+
--cm-type-heading-sm-line-height: 1.5;
|
|
93
|
+
--cm-type-heading-sm-weight: 500;
|
|
94
|
+
--cm-type-body-lg-size: 16px;
|
|
95
|
+
--cm-type-body-lg-line-height: 1.5;
|
|
96
|
+
--cm-type-body-lg-weight: 400;
|
|
97
|
+
--cm-type-body-md-size: 14px;
|
|
98
|
+
--cm-type-body-md-line-height: 1.5;
|
|
99
|
+
--cm-type-body-md-weight: 400;
|
|
100
|
+
--cm-type-body-sm-size: 12px;
|
|
101
|
+
--cm-type-body-sm-line-height: 1.5;
|
|
102
|
+
--cm-type-body-sm-weight: 400;
|
|
103
|
+
--cm-type-body-xs-size: 10px;
|
|
104
|
+
--cm-type-body-xs-line-height: 1.5;
|
|
105
|
+
--cm-type-body-xs-weight: 400;
|
|
106
|
+
--cm-type-label-size: 16px;
|
|
107
|
+
--cm-type-label-line-height: 1.5;
|
|
108
|
+
--cm-type-label-weight: 400;
|
|
109
|
+
--cm-type-heading-lg-resp-size: 24px;
|
|
110
|
+
--cm-type-heading-lg-resp-line-height: 1.5;
|
|
111
|
+
--cm-type-heading-lg-resp-weight: 600;
|
|
112
|
+
--cm-type-heading-sm-resp-size: 18px;
|
|
113
|
+
--cm-type-heading-sm-resp-line-height: 1.5;
|
|
114
|
+
--cm-type-heading-sm-resp-weight: 500;
|
|
115
|
+
--cm-type-body-lg-resp-size: 14px;
|
|
116
|
+
--cm-type-body-lg-resp-line-height: 1.5;
|
|
117
|
+
--cm-type-body-lg-resp-weight: 400;
|
|
118
|
+
--cm-type-body-md-resp-size: 12px;
|
|
119
|
+
--cm-type-body-md-resp-line-height: 1.5;
|
|
120
|
+
--cm-type-body-md-resp-weight: 400;
|
|
121
|
+
--cm-type-body-sm-resp-size: 10px;
|
|
122
|
+
--cm-type-body-sm-resp-line-height: 1.5;
|
|
123
|
+
--cm-type-body-sm-resp-weight: 400;
|
|
124
|
+
--cm-type-body-xs-resp-size: 10px;
|
|
125
|
+
--cm-type-body-xs-resp-line-height: 1.5;
|
|
126
|
+
--cm-type-body-xs-resp-weight: 400;
|
|
127
|
+
--cm-type-label-resp-size: 12px;
|
|
128
|
+
--cm-type-label-resp-line-height: 1.5;
|
|
129
|
+
--cm-type-label-resp-weight: 400;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[data-cm-theme="dark"] {
|
|
133
|
+
color-scheme: dark;
|
|
134
|
+
--cm-bg-page: #111111;
|
|
135
|
+
--cm-bg-surface: #1b1b1b;
|
|
136
|
+
--cm-bg-flash-bar: #2e2a2a;
|
|
137
|
+
--cm-bg-dashboard: #000000;
|
|
138
|
+
--cm-bg-attention: #132a40;
|
|
139
|
+
--cm-bg-information: #3a2a14;
|
|
140
|
+
--cm-bg-success: #1f2e12;
|
|
141
|
+
--cm-bg-critical: #3a1414;
|
|
142
|
+
--cm-bg-tag: #2a2d36;
|
|
143
|
+
--cm-bg-icon: #2a2a2a;
|
|
144
|
+
--cm-bg-hover: #2a2a2a;
|
|
145
|
+
--cm-bg-error-bar: #3a1414;
|
|
146
|
+
--cm-bg-offer-card: #132a40;
|
|
147
|
+
--cm-bg-inset: #1e1e1e;
|
|
148
|
+
--cm-bg-input-filled: #232323;
|
|
149
|
+
--cm-icon-default: #8b8b8b;
|
|
150
|
+
--cm-icon-hover: #ffffff;
|
|
151
|
+
--cm-icon-selected: #f4f4f4;
|
|
152
|
+
--cm-icon-responsive-menu: #9e9e9e;
|
|
153
|
+
--cm-icon-success: #81bb47;
|
|
154
|
+
--cm-icon-critical: #ff3c2e;
|
|
155
|
+
--cm-icon-rating: #ffc107;
|
|
156
|
+
--cm-text-default: #f4f4f4;
|
|
157
|
+
--cm-text-secondary: #707070;
|
|
158
|
+
--cm-text-tertiary: #9e9e9e;
|
|
159
|
+
--cm-text-information: #f1a953;
|
|
160
|
+
--cm-text-critical: #ff3c2e;
|
|
161
|
+
--cm-text-success: #81bb47;
|
|
162
|
+
--cm-text-attention: #5394d9;
|
|
163
|
+
--cm-text-on-dark: #ffffff;
|
|
164
|
+
--cm-text-on-dark-secondary: #b5b5b5;
|
|
165
|
+
--cm-text-speciality: #1ec81a;
|
|
166
|
+
--cm-text-counter: #4b7cff;
|
|
167
|
+
--cm-border-default: #333333;
|
|
168
|
+
--cm-border-strong: #f4f4f4;
|
|
169
|
+
--cm-border-input: #6f6f6f;
|
|
170
|
+
--cm-action-primary: #f4f4f4;
|
|
171
|
+
--cm-action-primary-hover: #c9c9c9;
|
|
172
|
+
--cm-action-primary-text: #000000;
|
|
173
|
+
--cm-action-disabled: #333333;
|
|
174
|
+
--cm-action-disabled-text: #8b8b8b;
|
|
175
|
+
--cm-text-speciality-on-dark: #1ec81a;
|
|
176
|
+
--cm-border-critical: #ff3c2e;
|
|
177
|
+
--cm-border-card: rgba(255, 255, 255, 0.12);
|
|
178
|
+
--cm-bg-panel-header: #000000;
|
|
179
|
+
--cm-border-subtle: #2a2a2a;
|
|
180
|
+
--cm-toggle-on: #92cf8d;
|
|
181
|
+
--cm-toggle-off: #4a4a4a;
|
|
182
|
+
--cm-avatar-bg: #2f4a37;
|
|
183
|
+
--cm-nav-active: #3b3b3b;
|
|
184
|
+
--cm-nav-divider: #333333;
|
|
185
|
+
--cm-nav-badge: #446beb;
|
|
186
|
+
--cm-thumb-bg: #2a2a2a;
|
|
187
|
+
--cm-overlay: rgba(0, 0, 0, 0.6);
|
|
188
|
+
--cm-bg-information-soft: rgba(241, 169, 83, 0.16);
|
|
189
|
+
--cm-bg-success-soft: rgba(129, 187, 71, 0.16);
|
|
190
|
+
--cm-bg-attention-soft: #232838;
|
|
191
|
+
}
|
|
192
|
+
@media (prefers-color-scheme: dark) {
|
|
193
|
+
[data-cm-theme="auto"] {
|
|
194
|
+
color-scheme: dark;
|
|
195
|
+
--cm-bg-page: #111111;
|
|
196
|
+
--cm-bg-surface: #1b1b1b;
|
|
197
|
+
--cm-bg-flash-bar: #2e2a2a;
|
|
198
|
+
--cm-bg-dashboard: #000000;
|
|
199
|
+
--cm-bg-attention: #132a40;
|
|
200
|
+
--cm-bg-information: #3a2a14;
|
|
201
|
+
--cm-bg-success: #1f2e12;
|
|
202
|
+
--cm-bg-critical: #3a1414;
|
|
203
|
+
--cm-bg-tag: #2a2d36;
|
|
204
|
+
--cm-bg-icon: #2a2a2a;
|
|
205
|
+
--cm-bg-hover: #2a2a2a;
|
|
206
|
+
--cm-bg-error-bar: #3a1414;
|
|
207
|
+
--cm-bg-offer-card: #132a40;
|
|
208
|
+
--cm-bg-inset: #1e1e1e;
|
|
209
|
+
--cm-bg-input-filled: #232323;
|
|
210
|
+
--cm-icon-default: #8b8b8b;
|
|
211
|
+
--cm-icon-hover: #ffffff;
|
|
212
|
+
--cm-icon-selected: #f4f4f4;
|
|
213
|
+
--cm-icon-responsive-menu: #9e9e9e;
|
|
214
|
+
--cm-icon-success: #81bb47;
|
|
215
|
+
--cm-icon-critical: #ff3c2e;
|
|
216
|
+
--cm-icon-rating: #ffc107;
|
|
217
|
+
--cm-text-default: #f4f4f4;
|
|
218
|
+
--cm-text-secondary: #707070;
|
|
219
|
+
--cm-text-tertiary: #9e9e9e;
|
|
220
|
+
--cm-text-information: #f1a953;
|
|
221
|
+
--cm-text-critical: #ff3c2e;
|
|
222
|
+
--cm-text-success: #81bb47;
|
|
223
|
+
--cm-text-attention: #5394d9;
|
|
224
|
+
--cm-text-on-dark: #ffffff;
|
|
225
|
+
--cm-text-on-dark-secondary: #b5b5b5;
|
|
226
|
+
--cm-text-speciality: #1ec81a;
|
|
227
|
+
--cm-text-counter: #4b7cff;
|
|
228
|
+
--cm-border-default: #333333;
|
|
229
|
+
--cm-border-strong: #f4f4f4;
|
|
230
|
+
--cm-border-input: #6f6f6f;
|
|
231
|
+
--cm-action-primary: #f4f4f4;
|
|
232
|
+
--cm-action-primary-hover: #c9c9c9;
|
|
233
|
+
--cm-action-primary-text: #000000;
|
|
234
|
+
--cm-action-disabled: #333333;
|
|
235
|
+
--cm-action-disabled-text: #8b8b8b;
|
|
236
|
+
--cm-text-speciality-on-dark: #1ec81a;
|
|
237
|
+
--cm-border-critical: #ff3c2e;
|
|
238
|
+
--cm-border-card: rgba(255, 255, 255, 0.12);
|
|
239
|
+
--cm-bg-panel-header: #000000;
|
|
240
|
+
--cm-border-subtle: #2a2a2a;
|
|
241
|
+
--cm-toggle-on: #92cf8d;
|
|
242
|
+
--cm-toggle-off: #4a4a4a;
|
|
243
|
+
--cm-avatar-bg: #2f4a37;
|
|
244
|
+
--cm-nav-active: #3b3b3b;
|
|
245
|
+
--cm-nav-divider: #333333;
|
|
246
|
+
--cm-nav-badge: #446beb;
|
|
247
|
+
--cm-thumb-bg: #2a2a2a;
|
|
248
|
+
--cm-overlay: rgba(0, 0, 0, 0.6);
|
|
249
|
+
--cm-bg-information-soft: rgba(241, 169, 83, 0.16);
|
|
250
|
+
--cm-bg-success-soft: rgba(129, 187, 71, 0.16);
|
|
251
|
+
--cm-bg-attention-soft: #232838;
|
|
252
|
+
}
|
|
253
|
+
}
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
// generated
|
|
2
|
+
export declare const tokens: {
|
|
3
|
+
/** Page background behind cards. Text: text-default, text-tertiary. */
|
|
4
|
+
readonly bgPage: string;
|
|
5
|
+
/** Cards, header bar, save bar, inputs (Figma: Header Bg). Dark: Figma panel-header #1B1B1B. */
|
|
6
|
+
readonly bgSurface: string;
|
|
7
|
+
/** Flash offer bar. Text on it: text-on-dark (14:1). */
|
|
8
|
+
readonly bgFlashBar: string;
|
|
9
|
+
/** Dashboard / side navigation background. Text on it: text-on-dark. */
|
|
10
|
+
readonly bgDashboard: string;
|
|
11
|
+
/** Attention banners and callouts (light blue). Pair with text-attention. */
|
|
12
|
+
readonly bgAttention: string;
|
|
13
|
+
/** Informational banners (Figma orange, unchanged). Text on it: text-default only (10.5:1). Dark: tinted fill, text-default. */
|
|
14
|
+
readonly bgInformation: string;
|
|
15
|
+
/** Success banners (Figma green, unchanged). Text on it: text-default only (9.1:1). Dark: tinted fill, text-default. */
|
|
16
|
+
readonly bgSuccess: string;
|
|
17
|
+
/** Critical / error banners. Pair with text-critical. */
|
|
18
|
+
readonly bgCritical: string;
|
|
19
|
+
/** Tag and chip fills. */
|
|
20
|
+
readonly bgTag: string;
|
|
21
|
+
/** Fill behind icon buttons (the 48px rounded header icons). */
|
|
22
|
+
readonly bgIcon: string;
|
|
23
|
+
/** Label bars, row hover, secondary button fill. The file's swatch draws #F6F6F6 but labels it #F7F7F7; the label is used. */
|
|
24
|
+
readonly bgHover: string;
|
|
25
|
+
/** Bottom error bar. */
|
|
26
|
+
readonly bgErrorBar: string;
|
|
27
|
+
/** Offer area on application cards. */
|
|
28
|
+
readonly bgOfferCard: string;
|
|
29
|
+
/** Inside-card panels and table bodies (Borders page: Inside Card Color). */
|
|
30
|
+
readonly bgInset: string;
|
|
31
|
+
/** Filled or read-only input fill (Errors & Highlight page). */
|
|
32
|
+
readonly bgInputFilled: string;
|
|
33
|
+
/** Default icon colour. gray-600 from the Figma black scale: 3.4:1 on white (Figma swatch #9E9E9E was 2.5:1, under the 3:1 needed for meaningful icons). */
|
|
34
|
+
readonly iconDefault: string;
|
|
35
|
+
/** Icon color on hover, over a dark fill. */
|
|
36
|
+
readonly iconHover: string;
|
|
37
|
+
/** Selected icon. */
|
|
38
|
+
readonly iconSelected: string;
|
|
39
|
+
/** Icons in the responsive menu. */
|
|
40
|
+
readonly iconResponsiveMenu: string;
|
|
41
|
+
/** Success icons. Figma #8FBE5F darkened to 3.1:1 on white; dark uses Figma success green. */
|
|
42
|
+
readonly iconSuccess: string;
|
|
43
|
+
/** Caution and critical icons (4:1 on white). */
|
|
44
|
+
readonly iconCritical: string;
|
|
45
|
+
/** Rating stars. */
|
|
46
|
+
readonly iconRating: string;
|
|
47
|
+
/** Primary text on bg-surface and bg-page (19:1 light, 15.7:1 dark). */
|
|
48
|
+
readonly textDefault: string;
|
|
49
|
+
/** Disabled text ONLY (WCAG exempts disabled controls). Never for placeholders or copy: use text-tertiary. */
|
|
50
|
+
readonly textSecondary: string;
|
|
51
|
+
/** Help text, hints, breadcrumbs, placeholders (4.6:1 on bg-page; 6.4:1 dark). */
|
|
52
|
+
readonly textTertiary: string;
|
|
53
|
+
/** Informational text. Figma #F18402 (2.3:1) darkened along its hue to 4.6:1 on its soft fill; dark uses Figma #F1A953. */
|
|
54
|
+
readonly textInformation: string;
|
|
55
|
+
/** Error messages. Figma #E50000 nudged to 4.6:1 on bg-critical. */
|
|
56
|
+
readonly textCritical: string;
|
|
57
|
+
/** Success text. Figma #61AD14 (2.5:1) darkened to 4.7:1 on its soft fill; dark uses Figma #81BB47. */
|
|
58
|
+
readonly textSuccess: string;
|
|
59
|
+
/** Attention text and links. Figma #3274B6 nudged to 4.6:1 on bg-attention. */
|
|
60
|
+
readonly textAttention: string;
|
|
61
|
+
/** Text on bg-dashboard, bg-flash-bar and primary buttons (the file's Basic text). */
|
|
62
|
+
readonly textOnDark: string;
|
|
63
|
+
/** Unselected items and secondary text on bg-dashboard and other dark grounds (side navigation). 10:1 on black, AA on nav-active. */
|
|
64
|
+
readonly textOnDarkSecondary: string;
|
|
65
|
+
/** Speciality highlights on light grounds. Figma #1EC81A (2.3:1) darkened to 4.6:1. On the flash bar use text-speciality-on-dark. */
|
|
66
|
+
readonly textSpeciality: string;
|
|
67
|
+
/** Counters and badges. Figma #3E6CFF nudged to 4.6:1. */
|
|
68
|
+
readonly textCounter: string;
|
|
69
|
+
/** Card and divider borders, 1px. Decorative only; form controls use border-input. */
|
|
70
|
+
readonly borderDefault: string;
|
|
71
|
+
/** Focused or highlighted input, secondary button, checkbox and radio outlines, focus rings. */
|
|
72
|
+
readonly borderStrong: string;
|
|
73
|
+
/** Outline of text fields, selects and other form controls (3.4:1 on white, 3.4:1 dark). gray-600 from the Figma black scale. */
|
|
74
|
+
readonly borderInput: string;
|
|
75
|
+
/** Primary button fill. Black is the brand; inverts in dark. */
|
|
76
|
+
readonly actionPrimary: string;
|
|
77
|
+
/** Primary button hover (Figma gray-700 / gray-400). Text stays action-primary-text (4.9:1 / 12.7:1). */
|
|
78
|
+
readonly actionPrimaryHover: string;
|
|
79
|
+
/** Label on action-primary. */
|
|
80
|
+
readonly actionPrimaryText: string;
|
|
81
|
+
/** Disabled button fill. */
|
|
82
|
+
readonly actionDisabled: string;
|
|
83
|
+
/** Disabled button label. */
|
|
84
|
+
readonly actionDisabledText: string;
|
|
85
|
+
/** Figma speciality green, for the flash offer bar and other dark grounds (6.3:1 on bg-flash-bar). */
|
|
86
|
+
readonly textSpecialityOnDark: string;
|
|
87
|
+
/** Input in error. */
|
|
88
|
+
readonly borderCritical: string;
|
|
89
|
+
/** Hairline around section cards (as drawn on component boards: #949494 at 30%). */
|
|
90
|
+
readonly borderCard: string;
|
|
91
|
+
/** Black scale step from the Typography & Colors board. Raw palette, not themed: prefer semantic tokens. */
|
|
92
|
+
readonly gray1000: string;
|
|
93
|
+
/** Black scale step from the Typography & Colors board. Raw palette, not themed: prefer semantic tokens. */
|
|
94
|
+
readonly gray700: string;
|
|
95
|
+
/** Black scale step from the Typography & Colors board. Raw palette, not themed: prefer semantic tokens. */
|
|
96
|
+
readonly gray600: string;
|
|
97
|
+
/** Black scale step from the Typography & Colors board. Raw palette, not themed: prefer semantic tokens. */
|
|
98
|
+
readonly gray500: string;
|
|
99
|
+
/** Black scale step from the Typography & Colors board. Raw palette, not themed: prefer semantic tokens. */
|
|
100
|
+
readonly gray400: string;
|
|
101
|
+
/** Black scale step from the Typography & Colors board. Raw palette, not themed: prefer semantic tokens. */
|
|
102
|
+
readonly gray300: string;
|
|
103
|
+
/** Black scale step from the Typography & Colors board. Raw palette, not themed: prefer semantic tokens. */
|
|
104
|
+
readonly gray100: string;
|
|
105
|
+
/** Black scale step from the Typography & Colors board. Raw palette, not themed: prefer semantic tokens. */
|
|
106
|
+
readonly gray50: string;
|
|
107
|
+
/** Dark tour banner on the Smart Tips card. */
|
|
108
|
+
readonly gray900: string;
|
|
109
|
+
/** Chip outline and list-row checkbox outline. */
|
|
110
|
+
readonly gray800: string;
|
|
111
|
+
/** Header strip of the filter and notification panels. Text: text-on-dark. */
|
|
112
|
+
readonly bgPanelHeader: string;
|
|
113
|
+
/** Hairline around grey fills: search box, table header, pagination arrows, header icon buttons. */
|
|
114
|
+
readonly borderSubtle: string;
|
|
115
|
+
/** Toggle track when on (List and Sub Tabs boards). */
|
|
116
|
+
readonly toggleOn: string;
|
|
117
|
+
/** Toggle track when off. */
|
|
118
|
+
readonly toggleOff: string;
|
|
119
|
+
/** Initial avatar circle in the header profile pill. */
|
|
120
|
+
readonly avatarBg: string;
|
|
121
|
+
/** Selected sub-item fill in the dark side navigation. */
|
|
122
|
+
readonly navActive: string;
|
|
123
|
+
/** Dividers inside the dark side navigation. */
|
|
124
|
+
readonly navDivider: string;
|
|
125
|
+
/** Count pill in the side navigation. Figma #4B74F8 nudged so white text reaches 4.6:1. */
|
|
126
|
+
readonly navBadge: string;
|
|
127
|
+
/** Placeholder behind product thumbnails. */
|
|
128
|
+
readonly thumbBg: string;
|
|
129
|
+
/** Scrim behind side popups and popups. */
|
|
130
|
+
readonly overlay: string;
|
|
131
|
+
/** Information status pill fill ("ORDER PLACED"). Text: text-information. */
|
|
132
|
+
readonly bgInformationSoft: string;
|
|
133
|
+
/** Success status pill fill ("ACCEPTED"). Text: text-success. */
|
|
134
|
+
readonly bgSuccessSoft: string;
|
|
135
|
+
/** Attention icon tile in notifications. */
|
|
136
|
+
readonly bgAttentionSoft: string;
|
|
137
|
+
/** Gap between cards; product image to name; tags and badges; mobile gap between buttons and mobile card padding. */
|
|
138
|
+
readonly space10: string;
|
|
139
|
+
/** Mobile input top and bottom spacing. */
|
|
140
|
+
readonly space12: string;
|
|
141
|
+
/** Gap between header icons on desktop; small button side padding; mobile header side padding. */
|
|
142
|
+
readonly space15: string;
|
|
143
|
+
/** Desktop gap between buttons, button to link, card padding, input top and bottom; mobile popup bottom. */
|
|
144
|
+
readonly space20: string;
|
|
145
|
+
/** Mobile gap between two input boxes. */
|
|
146
|
+
readonly space22: string;
|
|
147
|
+
/** Desktop gap between input boxes, between checkbox and radio rows, popup bottom; header side padding. */
|
|
148
|
+
readonly space30: string;
|
|
149
|
+
/** Checkboxes, black-bordered slots. */
|
|
150
|
+
readonly radiusXs: string;
|
|
151
|
+
/** Buttons and input boxes. */
|
|
152
|
+
readonly radiusSm: string;
|
|
153
|
+
/** Cards. */
|
|
154
|
+
readonly radiusMd: string;
|
|
155
|
+
/** 48px icon buttons in the header. */
|
|
156
|
+
readonly radiusLg: string;
|
|
157
|
+
/** Tags/chips and circular icon buttons. */
|
|
158
|
+
readonly radiusFull: string;
|
|
159
|
+
/** Every border and separator in the file is 1px. */
|
|
160
|
+
readonly border1: string;
|
|
161
|
+
/** Default: cards sit flat with a border-default line. */
|
|
162
|
+
readonly shadow0: string;
|
|
163
|
+
/** Raised surfaces: popups, side popups, dropdowns (#A0A0A0 at 14%, blur 44). */
|
|
164
|
+
readonly shadow100: string;
|
|
165
|
+
/** Uppercase labels and text actions (UPGRADE, REMOVE, badges). Figma: 2.24px at 14px, 1.6px at 10px, Medium weight. */
|
|
166
|
+
readonly trackingCaps: string;
|
|
167
|
+
/** */
|
|
168
|
+
readonly fontSans: string;
|
|
169
|
+
};
|
|
170
|
+
export declare const themes: ["light","dark"];
|
|
171
|
+
export default tokens;
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// generated
|
|
2
|
+
export const tokens = {
|
|
3
|
+
"bgPage": "var(--cm-bg-page)",
|
|
4
|
+
"bgSurface": "var(--cm-bg-surface)",
|
|
5
|
+
"bgFlashBar": "var(--cm-bg-flash-bar)",
|
|
6
|
+
"bgDashboard": "var(--cm-bg-dashboard)",
|
|
7
|
+
"bgAttention": "var(--cm-bg-attention)",
|
|
8
|
+
"bgInformation": "var(--cm-bg-information)",
|
|
9
|
+
"bgSuccess": "var(--cm-bg-success)",
|
|
10
|
+
"bgCritical": "var(--cm-bg-critical)",
|
|
11
|
+
"bgTag": "var(--cm-bg-tag)",
|
|
12
|
+
"bgIcon": "var(--cm-bg-icon)",
|
|
13
|
+
"bgHover": "var(--cm-bg-hover)",
|
|
14
|
+
"bgErrorBar": "var(--cm-bg-error-bar)",
|
|
15
|
+
"bgOfferCard": "var(--cm-bg-offer-card)",
|
|
16
|
+
"bgInset": "var(--cm-bg-inset)",
|
|
17
|
+
"bgInputFilled": "var(--cm-bg-input-filled)",
|
|
18
|
+
"iconDefault": "var(--cm-icon-default)",
|
|
19
|
+
"iconHover": "var(--cm-icon-hover)",
|
|
20
|
+
"iconSelected": "var(--cm-icon-selected)",
|
|
21
|
+
"iconResponsiveMenu": "var(--cm-icon-responsive-menu)",
|
|
22
|
+
"iconSuccess": "var(--cm-icon-success)",
|
|
23
|
+
"iconCritical": "var(--cm-icon-critical)",
|
|
24
|
+
"iconRating": "var(--cm-icon-rating)",
|
|
25
|
+
"textDefault": "var(--cm-text-default)",
|
|
26
|
+
"textSecondary": "var(--cm-text-secondary)",
|
|
27
|
+
"textTertiary": "var(--cm-text-tertiary)",
|
|
28
|
+
"textInformation": "var(--cm-text-information)",
|
|
29
|
+
"textCritical": "var(--cm-text-critical)",
|
|
30
|
+
"textSuccess": "var(--cm-text-success)",
|
|
31
|
+
"textAttention": "var(--cm-text-attention)",
|
|
32
|
+
"textOnDark": "var(--cm-text-on-dark)",
|
|
33
|
+
"textOnDarkSecondary": "var(--cm-text-on-dark-secondary)",
|
|
34
|
+
"textSpeciality": "var(--cm-text-speciality)",
|
|
35
|
+
"textCounter": "var(--cm-text-counter)",
|
|
36
|
+
"borderDefault": "var(--cm-border-default)",
|
|
37
|
+
"borderStrong": "var(--cm-border-strong)",
|
|
38
|
+
"borderInput": "var(--cm-border-input)",
|
|
39
|
+
"actionPrimary": "var(--cm-action-primary)",
|
|
40
|
+
"actionPrimaryHover": "var(--cm-action-primary-hover)",
|
|
41
|
+
"actionPrimaryText": "var(--cm-action-primary-text)",
|
|
42
|
+
"actionDisabled": "var(--cm-action-disabled)",
|
|
43
|
+
"actionDisabledText": "var(--cm-action-disabled-text)",
|
|
44
|
+
"textSpecialityOnDark": "var(--cm-text-speciality-on-dark)",
|
|
45
|
+
"borderCritical": "var(--cm-border-critical)",
|
|
46
|
+
"borderCard": "var(--cm-border-card)",
|
|
47
|
+
"gray1000": "var(--cm-gray-1000)",
|
|
48
|
+
"gray700": "var(--cm-gray-700)",
|
|
49
|
+
"gray600": "var(--cm-gray-600)",
|
|
50
|
+
"gray500": "var(--cm-gray-500)",
|
|
51
|
+
"gray400": "var(--cm-gray-400)",
|
|
52
|
+
"gray300": "var(--cm-gray-300)",
|
|
53
|
+
"gray100": "var(--cm-gray-100)",
|
|
54
|
+
"gray50": "var(--cm-gray-50)",
|
|
55
|
+
"gray900": "var(--cm-gray-900)",
|
|
56
|
+
"gray800": "var(--cm-gray-800)",
|
|
57
|
+
"bgPanelHeader": "var(--cm-bg-panel-header)",
|
|
58
|
+
"borderSubtle": "var(--cm-border-subtle)",
|
|
59
|
+
"toggleOn": "var(--cm-toggle-on)",
|
|
60
|
+
"toggleOff": "var(--cm-toggle-off)",
|
|
61
|
+
"avatarBg": "var(--cm-avatar-bg)",
|
|
62
|
+
"navActive": "var(--cm-nav-active)",
|
|
63
|
+
"navDivider": "var(--cm-nav-divider)",
|
|
64
|
+
"navBadge": "var(--cm-nav-badge)",
|
|
65
|
+
"thumbBg": "var(--cm-thumb-bg)",
|
|
66
|
+
"overlay": "var(--cm-overlay)",
|
|
67
|
+
"bgInformationSoft": "var(--cm-bg-information-soft)",
|
|
68
|
+
"bgSuccessSoft": "var(--cm-bg-success-soft)",
|
|
69
|
+
"bgAttentionSoft": "var(--cm-bg-attention-soft)",
|
|
70
|
+
"space10": "var(--cm-space-10)",
|
|
71
|
+
"space12": "var(--cm-space-12)",
|
|
72
|
+
"space15": "var(--cm-space-15)",
|
|
73
|
+
"space20": "var(--cm-space-20)",
|
|
74
|
+
"space22": "var(--cm-space-22)",
|
|
75
|
+
"space30": "var(--cm-space-30)",
|
|
76
|
+
"radiusXs": "var(--cm-radius-xs)",
|
|
77
|
+
"radiusSm": "var(--cm-radius-sm)",
|
|
78
|
+
"radiusMd": "var(--cm-radius-md)",
|
|
79
|
+
"radiusLg": "var(--cm-radius-lg)",
|
|
80
|
+
"radiusFull": "var(--cm-radius-full)",
|
|
81
|
+
"border1": "var(--cm-border-1)",
|
|
82
|
+
"shadow0": "var(--cm-shadow-0)",
|
|
83
|
+
"shadow100": "var(--cm-shadow-100)",
|
|
84
|
+
"trackingCaps": "var(--cm-tracking-caps)",
|
|
85
|
+
"fontSans": "var(--cm-font-sans)"
|
|
86
|
+
};
|
|
87
|
+
export const themes = ["light","dark"];
|
|
88
|
+
export default tokens;
|