@graftwork/tokens 1.1.1 → 1.2.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/CHANGELOG.md +14 -0
- package/dist/css/tailwind-theme.css +2 -0
- package/dist/css/tokens.css +7 -1
- package/dist/js/tokens.d.ts +2 -0
- package/dist/js/tokens.js +9 -3
- package/package.json +1 -1
- package/tokens/semantic/base.tokens.json +8 -4
- package/tokens/semantic/color.dark.tokens.json +13 -0
- package/tokens/semantic/color.high-contrast.tokens.json +13 -0
- package/tokens/semantic/color.light.tokens.json +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @graftwork/tokens
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#22](https://github.com/graftwork-studio/design-system/pull/22) [`0c0b6dc`](https://github.com/graftwork-studio/design-system/commit/0c0b6dcb927a3948d9565f30dbf34cf800010e3a) Thanks [@david-kenny](https://github.com/david-kenny)! - Body text is now 14px (0.875rem at the browser default). A new `font.size.body` token (`--gw-font-size-body`, Tailwind `text-body`) is applied to `body`, and Card and Table use it for their content. The `html` root stays at `100%`, so rem still follows the user's font setting, and `font.size.md` stays at 1rem for inputs, Select and Button so iOS Safari doesn't zoom in on focus.
|
|
8
|
+
|
|
9
|
+
- [#23](https://github.com/graftwork-studio/design-system/pull/23) [`cc952a7`](https://github.com/graftwork-studio/design-system/commit/cc952a705279e6ad295dde8f9c791132e1750c6f) Thanks [@david-kenny](https://github.com/david-kenny)! - Add 30 components from shadcn/ui, built on React Aria and styled with our tokens: Accordion, Alert, AlertDialog, Avatar, Badge, Breadcrumb, Checkbox, Collapsible, Combobox, Dialog, DropdownMenu, Empty, InputGroup, Kbd, Label, Pagination, Popover, Progress, RadioGroup, Separator, Sheet, Skeleton, Slider, Spinner, Switch, Tabs, Textarea, Toast, Toggle and Tooltip.
|
|
10
|
+
|
|
11
|
+
Toast uses React Aria's Toast (still marked unstable upstream) rather than Sonner: render `<Toaster />` once and call `toast({ title })`.
|
|
12
|
+
|
|
13
|
+
Tokens: new `color.overlay.scrim` (Tailwind `bg-overlay-scrim/60`) for the layer behind modals. Stylesheet: new `focus-ring-drawn` utility, which draws the focus ring on a part that shows its parent's focus.
|
|
14
|
+
|
|
15
|
+
- [#22](https://github.com/graftwork-studio/design-system/pull/22) [`0c0b6dc`](https://github.com/graftwork-studio/design-system/commit/0c0b6dcb927a3948d9565f30dbf34cf800010e3a) Thanks [@david-kenny](https://github.com/david-kenny)! - Switch the sans font from Noto Sans to Geist. `font.family.sans` is now `"Geist Variable", Geist, system-ui, sans-serif`, and `@graftwork/ui` loads it from `@fontsource-variable/geist` in place of `@fontsource-variable/noto-sans`.
|
|
16
|
+
|
|
3
17
|
## 1.1.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
--color-surface-raised: var(--gw-color-surface-raised);
|
|
17
17
|
--color-surface-subtle: var(--gw-color-surface-subtle);
|
|
18
18
|
--color-surface-overlay: var(--gw-color-surface-overlay);
|
|
19
|
+
--color-overlay-scrim: var(--gw-color-overlay-scrim);
|
|
19
20
|
--color-action-primary-bg: var(--gw-color-action-primary-bg);
|
|
20
21
|
--color-action-primary-bg-hover: var(--gw-color-action-primary-bg-hover);
|
|
21
22
|
--color-action-secondary-bg: var(--gw-color-action-secondary-bg);
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
--text-xs: var(--gw-font-size-xs);
|
|
63
64
|
--text-sm: var(--gw-font-size-sm);
|
|
64
65
|
--text-md: var(--gw-font-size-md);
|
|
66
|
+
--text-body: var(--gw-font-size-body);
|
|
65
67
|
--text-lg: var(--gw-font-size-lg);
|
|
66
68
|
--text-xl: var(--gw-font-size-xl);
|
|
67
69
|
--text-2xl: var(--gw-font-size-2xl);
|
package/dist/css/tokens.css
CHANGED
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
--gw-space-xl: 2rem;
|
|
19
19
|
--gw-space-2xl: 3rem;
|
|
20
20
|
--gw-space-3xl: 4rem;
|
|
21
|
-
--gw-font-family-sans: "
|
|
21
|
+
--gw-font-family-sans: "Geist Variable", Geist, system-ui, sans-serif;
|
|
22
22
|
--gw-font-family-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
23
23
|
--gw-font-size-xs: 0.75rem;
|
|
24
24
|
--gw-font-size-sm: 0.875rem;
|
|
25
25
|
--gw-font-size-md: 1rem;
|
|
26
|
+
--gw-font-size-body: 0.875rem;
|
|
26
27
|
--gw-font-size-lg: 1.125rem;
|
|
27
28
|
--gw-font-size-xl: 1.25rem;
|
|
28
29
|
--gw-font-size-2xl: 1.5rem;
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
--gw-color-surface-raised: #ffffff;
|
|
55
56
|
--gw-color-surface-subtle: #f4f4f4;
|
|
56
57
|
--gw-color-surface-overlay: #ffffff;
|
|
58
|
+
--gw-color-overlay-scrim: #0a0a0a;
|
|
57
59
|
--gw-color-action-primary-bg: #0458a1;
|
|
58
60
|
--gw-color-action-primary-bg-hover: #034580;
|
|
59
61
|
--gw-color-action-secondary-bg: #ffffff;
|
|
@@ -100,6 +102,7 @@
|
|
|
100
102
|
--gw-color-surface-raised: #171717;
|
|
101
103
|
--gw-color-surface-subtle: #1e1e1e;
|
|
102
104
|
--gw-color-surface-overlay: #171717;
|
|
105
|
+
--gw-color-overlay-scrim: #0a0a0a;
|
|
103
106
|
--gw-color-action-primary-bg: #5ca8fc;
|
|
104
107
|
--gw-color-action-primary-bg-hover: #93c5ff;
|
|
105
108
|
--gw-color-action-secondary-bg: #171717;
|
|
@@ -147,6 +150,7 @@
|
|
|
147
150
|
--gw-color-surface-raised: #ffffff;
|
|
148
151
|
--gw-color-surface-subtle: #fafafa;
|
|
149
152
|
--gw-color-surface-overlay: #ffffff;
|
|
153
|
+
--gw-color-overlay-scrim: #0a0a0a;
|
|
150
154
|
--gw-color-action-primary-bg: #003362;
|
|
151
155
|
--gw-color-action-primary-bg-hover: #002244;
|
|
152
156
|
--gw-color-action-secondary-bg: #ffffff;
|
|
@@ -193,6 +197,7 @@
|
|
|
193
197
|
--gw-color-surface-raised: #171717;
|
|
194
198
|
--gw-color-surface-subtle: #1e1e1e;
|
|
195
199
|
--gw-color-surface-overlay: #171717;
|
|
200
|
+
--gw-color-overlay-scrim: #0a0a0a;
|
|
196
201
|
--gw-color-action-primary-bg: #5ca8fc;
|
|
197
202
|
--gw-color-action-primary-bg-hover: #93c5ff;
|
|
198
203
|
--gw-color-action-secondary-bg: #171717;
|
|
@@ -237,6 +242,7 @@
|
|
|
237
242
|
--gw-color-surface-raised: #ffffff;
|
|
238
243
|
--gw-color-surface-subtle: #fafafa;
|
|
239
244
|
--gw-color-surface-overlay: #ffffff;
|
|
245
|
+
--gw-color-overlay-scrim: #0a0a0a;
|
|
240
246
|
--gw-color-action-primary-bg: #003362;
|
|
241
247
|
--gw-color-action-primary-bg-hover: #002244;
|
|
242
248
|
--gw-color-action-secondary-bg: #ffffff;
|
package/dist/js/tokens.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export type TokenName =
|
|
|
6
6
|
| "color.surface.raised"
|
|
7
7
|
| "color.surface.subtle"
|
|
8
8
|
| "color.surface.overlay"
|
|
9
|
+
| "color.overlay.scrim"
|
|
9
10
|
| "color.action.primary.bg"
|
|
10
11
|
| "color.action.primary.bg-hover"
|
|
11
12
|
| "color.action.secondary.bg"
|
|
@@ -61,6 +62,7 @@ export type TokenName =
|
|
|
61
62
|
| "font.size.xs"
|
|
62
63
|
| "font.size.sm"
|
|
63
64
|
| "font.size.md"
|
|
65
|
+
| "font.size.body"
|
|
64
66
|
| "font.size.lg"
|
|
65
67
|
| "font.size.xl"
|
|
66
68
|
| "font.size.2xl"
|
package/dist/js/tokens.js
CHANGED
|
@@ -7,6 +7,7 @@ export const tokens = {
|
|
|
7
7
|
"color.surface.raised": "#ffffff",
|
|
8
8
|
"color.surface.subtle": "#f4f4f4",
|
|
9
9
|
"color.surface.overlay": "#ffffff",
|
|
10
|
+
"color.overlay.scrim": "#0a0a0a",
|
|
10
11
|
"color.action.primary.bg": "#0458a1",
|
|
11
12
|
"color.action.primary.bg-hover": "#034580",
|
|
12
13
|
"color.action.secondary.bg": "#ffffff",
|
|
@@ -57,11 +58,12 @@ export const tokens = {
|
|
|
57
58
|
"space.xl": "2rem",
|
|
58
59
|
"space.2xl": "3rem",
|
|
59
60
|
"space.3xl": "4rem",
|
|
60
|
-
"font.family.sans": "\"
|
|
61
|
+
"font.family.sans": "\"Geist Variable\", Geist, system-ui, sans-serif",
|
|
61
62
|
"font.family.mono": "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
62
63
|
"font.size.xs": "0.75rem",
|
|
63
64
|
"font.size.sm": "0.875rem",
|
|
64
65
|
"font.size.md": "1rem",
|
|
66
|
+
"font.size.body": "0.875rem",
|
|
65
67
|
"font.size.lg": "1.125rem",
|
|
66
68
|
"font.size.xl": "1.25rem",
|
|
67
69
|
"font.size.2xl": "1.5rem",
|
|
@@ -95,6 +97,7 @@ export const tokens = {
|
|
|
95
97
|
"color.surface.raised": "#171717",
|
|
96
98
|
"color.surface.subtle": "#1e1e1e",
|
|
97
99
|
"color.surface.overlay": "#171717",
|
|
100
|
+
"color.overlay.scrim": "#0a0a0a",
|
|
98
101
|
"color.action.primary.bg": "#5ca8fc",
|
|
99
102
|
"color.action.primary.bg-hover": "#93c5ff",
|
|
100
103
|
"color.action.secondary.bg": "#171717",
|
|
@@ -145,11 +148,12 @@ export const tokens = {
|
|
|
145
148
|
"space.xl": "2rem",
|
|
146
149
|
"space.2xl": "3rem",
|
|
147
150
|
"space.3xl": "4rem",
|
|
148
|
-
"font.family.sans": "\"
|
|
151
|
+
"font.family.sans": "\"Geist Variable\", Geist, system-ui, sans-serif",
|
|
149
152
|
"font.family.mono": "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
150
153
|
"font.size.xs": "0.75rem",
|
|
151
154
|
"font.size.sm": "0.875rem",
|
|
152
155
|
"font.size.md": "1rem",
|
|
156
|
+
"font.size.body": "0.875rem",
|
|
153
157
|
"font.size.lg": "1.125rem",
|
|
154
158
|
"font.size.xl": "1.25rem",
|
|
155
159
|
"font.size.2xl": "1.5rem",
|
|
@@ -183,6 +187,7 @@ export const tokens = {
|
|
|
183
187
|
"color.surface.raised": "#ffffff",
|
|
184
188
|
"color.surface.subtle": "#fafafa",
|
|
185
189
|
"color.surface.overlay": "#ffffff",
|
|
190
|
+
"color.overlay.scrim": "#0a0a0a",
|
|
186
191
|
"color.action.primary.bg": "#003362",
|
|
187
192
|
"color.action.primary.bg-hover": "#002244",
|
|
188
193
|
"color.action.secondary.bg": "#ffffff",
|
|
@@ -233,11 +238,12 @@ export const tokens = {
|
|
|
233
238
|
"space.xl": "2rem",
|
|
234
239
|
"space.2xl": "3rem",
|
|
235
240
|
"space.3xl": "4rem",
|
|
236
|
-
"font.family.sans": "\"
|
|
241
|
+
"font.family.sans": "\"Geist Variable\", Geist, system-ui, sans-serif",
|
|
237
242
|
"font.family.mono": "ui-monospace, SFMono-Regular, Menlo, monospace",
|
|
238
243
|
"font.size.xs": "0.75rem",
|
|
239
244
|
"font.size.sm": "0.875rem",
|
|
240
245
|
"font.size.md": "1rem",
|
|
246
|
+
"font.size.body": "0.875rem",
|
|
241
247
|
"font.size.lg": "1.125rem",
|
|
242
248
|
"font.size.xl": "1.25rem",
|
|
243
249
|
"font.size.2xl": "1.5rem",
|
package/package.json
CHANGED
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"$type": "fontFamily",
|
|
56
56
|
"sans": {
|
|
57
57
|
"$value": [
|
|
58
|
-
"
|
|
59
|
-
"
|
|
58
|
+
"Geist Variable",
|
|
59
|
+
"Geist",
|
|
60
60
|
"system-ui",
|
|
61
61
|
"sans-serif"
|
|
62
62
|
],
|
|
63
|
-
"$description": "Loaded from @fontsource-variable/
|
|
63
|
+
"$description": "Loaded from @fontsource-variable/geist. Never from Google's servers."
|
|
64
64
|
},
|
|
65
65
|
"mono": {
|
|
66
66
|
"$value": [
|
|
@@ -81,7 +81,11 @@
|
|
|
81
81
|
},
|
|
82
82
|
"md": {
|
|
83
83
|
"$value": "{font-size.100}",
|
|
84
|
-
"$description": "
|
|
84
|
+
"$description": "Form controls and buttons. Stays at 16px so iOS Safari doesn't zoom into inputs on focus."
|
|
85
|
+
},
|
|
86
|
+
"body": {
|
|
87
|
+
"$value": "{font-size.0875}",
|
|
88
|
+
"$description": "Body text: 14px at the browser default. Applied to body; the html root stays at 100% so rem follows the user's font setting."
|
|
85
89
|
},
|
|
86
90
|
"lg": {
|
|
87
91
|
"$value": "{font-size.1125}"
|
|
@@ -40,6 +40,19 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
+
"overlay": {
|
|
44
|
+
"$type": "color",
|
|
45
|
+
"$description": "Dark theme. overlay tokens.",
|
|
46
|
+
"scrim": {
|
|
47
|
+
"$value": "{color.neutral.950}",
|
|
48
|
+
"$description": "Behind modal dialogs and sheets. Use at reduced opacity, e.g. bg-overlay-scrim/60. Never text or a surface.",
|
|
49
|
+
"$extensions": {
|
|
50
|
+
"studio.graftwork": {
|
|
51
|
+
"role": "decorative"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
43
56
|
"action": {
|
|
44
57
|
"$type": "color",
|
|
45
58
|
"$description": "Dark theme. action tokens.",
|
|
@@ -40,6 +40,19 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
+
"overlay": {
|
|
44
|
+
"$type": "color",
|
|
45
|
+
"$description": "High-contrast theme. overlay tokens.",
|
|
46
|
+
"scrim": {
|
|
47
|
+
"$value": "{color.neutral.950}",
|
|
48
|
+
"$description": "Behind modal dialogs and sheets. Use at reduced opacity, e.g. bg-overlay-scrim/60. Never text or a surface.",
|
|
49
|
+
"$extensions": {
|
|
50
|
+
"studio.graftwork": {
|
|
51
|
+
"role": "decorative"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
43
56
|
"action": {
|
|
44
57
|
"$type": "color",
|
|
45
58
|
"$description": "High-contrast theme (light base). action tokens.",
|
|
@@ -40,6 +40,19 @@
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
+
"overlay": {
|
|
44
|
+
"$type": "color",
|
|
45
|
+
"$description": "Light theme. overlay tokens.",
|
|
46
|
+
"scrim": {
|
|
47
|
+
"$value": "{color.neutral.950}",
|
|
48
|
+
"$description": "Behind modal dialogs and sheets. Use at reduced opacity, e.g. bg-overlay-scrim/60. Never text or a surface.",
|
|
49
|
+
"$extensions": {
|
|
50
|
+
"studio.graftwork": {
|
|
51
|
+
"role": "decorative"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
43
56
|
"action": {
|
|
44
57
|
"$type": "color",
|
|
45
58
|
"$description": "Light theme. action tokens.",
|