@tangle-network/brand 1.30.0 → 1.31.1
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/README.md +4 -2
- package/bin/tangle-drift.mjs +4 -3
- package/dist/index.d.ts +111 -111
- package/dist/index.js +111 -111
- package/package.json +1 -1
- package/src/accent-scopes.stories.tsx +54 -0
- package/src/palette.generated.ts +111 -111
- package/src/styles/accent-on-tint.test.ts +4 -1
- package/src/styles/legacy-light.css +1228 -940
- package/src/styles/named-themes.css +431 -584
- package/src/styles/surface-ladder.test.ts +9 -24
- package/src/styles/system.css +52 -52
- package/src/styles/theme-scopes.ts +15 -16
- package/src/styles/tokens.css +450 -859
- package/src/styles/tokens.test.ts +74 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.31.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1986f4e: Generate canonical and named palettes, ink tiers, status colours and accent roles from shared theme inputs. Preserve public token names and mode boundaries while giving named themes their own raised planes and wells.
|
|
8
|
+
|
|
9
|
+
## 1.31.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 36a423d: Per-user accent scopes. `data-accent="violet" | "orange" | "teal" | "blue" | "pink" | "brown" | "cyan" | "lime"` on `<html>` or any theme boundary rebinds the four indigo roles (fill, mark, line, ink) and the ring to that category's hue, in both modes and inside every named theme; buttons, focus, selection, interaction states, wells, gradients and the chart accent follow, while planes, body ink and status stay the theme's. `gen-ladders.mjs` solves each hue's roles (`--tone-<hue>-{fill,ring,mark,line,ink}`): the fill carries white at 4.5:1, the ink clears 4.5:1 on the page, the card and every selected tint, the line and the focus border clear 3:1. No picker ships; a product sets the attribute.
|
|
14
|
+
|
|
15
|
+
`tangle-drift`'s `settings_layout` counts a settings page as composed when it binds the shared frame with `bindSettingsNav` from `@tangle-network/ui/presentation`, as a server-rendered host does, as well as when it imports `@tangle-network/agent-app/settings-react`.
|
|
16
|
+
|
|
3
17
|
## 1.30.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -60,6 +60,7 @@ For finer control, use the exported filenames:
|
|
|
60
60
|
| `.dark[data-theme="intelligence"]` | Existing dark-only product surface; `.light` keeps the identity and uses canonical light |
|
|
61
61
|
| `[data-theme="hospitality"]` + `.dark[data-theme="hospitality"]` | Hospitality's sage-and-forest product theme in both modes. Set it on the document root. Without `.dark` it is a complete light scope, including before hydration; `.dark` selects the dark baseline and its dark ladder. Status tones stay canonical |
|
|
62
62
|
| `.dark[data-theme="website"]` + `[data-theme="website"]` | The public site's indigo-night planes and indigo-paper light. Set `class="dark" data-theme="website"` on the document root; a section with `data-theme="website"` and no `.dark` is a complete light island. Accent, status, category and syntax tones stay canonical |
|
|
63
|
+
| `data-accent="violet"`, `"orange"`, `"teal"`, `"blue"`, `"pink"`, `"brown"`, `"cyan"` or `"lime"` | A per-user accent. Set it on `<html>` or any theme boundary, in either mode and inside any named theme. It rebinds the four indigo roles (`--hsl-primary` fill, `--brand-primary` mark, `--brand-cool` line, `--accent-text` ink) and `--hsl-ring` to that category's `--tone-<hue>-*` values, and everything the spine derives from them follows: buttons, focus, selection, interaction states, wells, gradients, chart accent. Planes, body ink and status stay the theme's. Generated by `scripts/gen-ladders.mjs`; no picker ships, the product stores and sets the attribute |
|
|
63
64
|
|
|
64
65
|
Set one coherent mode on each boundary; do not author contradictory `.light`/`.dark`/named-mode markers. Named light variants keep their existing palettes; `tangle-light` is not silently retuned to the neutral base light palette. Each known boundary receives a complete baseline before named overrides, so nested scopes do not inherit opposite-mode syntax, status or already-resolved HSL aliases.
|
|
65
66
|
|
|
@@ -86,9 +87,10 @@ Choose this **instead of** `styles`, `tokens.css` and `named-themes.css`; do not
|
|
|
86
87
|
|
|
87
88
|
This export is the shared migration boundary, **not a claim that Agent App has already migrated** and not a replacement for that package's entire stylesheet. Its component-specific variables, neutral-ramp API, keyframes and structural rules remain consumer-owned until a separate, explicit migration reconciles them. Remove duplicate shared palette declarations in that migration rather than placing competing global token systems on the same page.
|
|
88
89
|
|
|
89
|
-
The
|
|
90
|
+
The palette inputs live in `scripts/palette.mjs`; `scripts/palette-template.css` owns selectors, public names, aliases and non-colour styling. `gen-ladders.mjs` generates both canonical stylesheets, every named theme and all accent scopes. Never edit generated CSS by hand. Regenerate the palette before its compatibility projection:
|
|
90
91
|
|
|
91
92
|
```sh
|
|
93
|
+
pnpm --filter @tangle-network/brand gen:ladders
|
|
92
94
|
pnpm --filter @tangle-network/brand gen:compat
|
|
93
95
|
pnpm --filter @tangle-network/brand check:compat
|
|
94
96
|
```
|
|
@@ -121,7 +123,7 @@ import { Logo, TangleKnot } from "@tangle-network/brand";
|
|
|
121
123
|
|
|
122
124
|
Renderers that cannot read CSS variables (PDF, canvas, WebGL, email, the `theme-color` meta) import `palettes` from `@tangle-network/brand`: resolved hex values for `light`, `dark`, `websiteLight` and `websiteDark`, generated from the stylesheets by `pnpm gen:palette`. Pages styled with CSS keep using the variables.
|
|
123
125
|
|
|
124
|
-
The
|
|
126
|
+
The palette table specifies canvas hue, chroma, plane lightnesses and accent hue per theme. The generator derives neutral ink tiers from contrast targets, status inks and washes from their semantic hues, and category/accent roles from the shared hue table. Dark planes rise in OKLCH lightness; light alternates paper and wells. Named themes resolve their own sidebar, raised planes and wells. Ink remains neutral so the chosen accent signals interaction. `tokens.test.ts`, `surface-ladder.test.ts` and the generator's contrast guards protect the hierarchy and legibility. Size and colour values belong to the executable inputs rather than a second table here.
|
|
125
127
|
|
|
126
128
|
Chrome radii are 6/8/10/12px in both base modes; the composer has its own 26px role. Role radii are one ramp: `--radius-tag` 4, `--radius-control` 8, `--radius-card` 12, `--radius-container` 16, and `--radius-pill` for every chip; `--radius-chip`, `--radius-field` and `--radius-panel` are older names of control, card and container. Every shadow is drawn in `--shadow-color`, HSL channels that are black in dark and `220 40% 8%` in light; a named theme retints its shadows by setting that one token. Inter (variable, then static) leads body and display stacks, with Geist fallbacks; Geist Mono leads code with JetBrains Mono and system fallbacks. Runtime font/radius registrations retain their public override names; tests keep Tailwind registration defaults aligned with the canonical declarations.
|
|
127
129
|
|
package/bin/tangle-drift.mjs
CHANGED
|
@@ -143,11 +143,12 @@ export const RULE_PATTERNS = {
|
|
|
143
143
|
*/
|
|
144
144
|
export const PAGE_PATTERNS = {
|
|
145
145
|
// A settings page drawn locally. agent-app's settings-react owns the settings composition: the
|
|
146
|
-
// section nav, frame, rows and save behaviour.
|
|
146
|
+
// section nav, frame, rows and save behaviour. A server-rendered host binds the same frame with
|
|
147
|
+
// ui's bindSettingsNav.
|
|
147
148
|
settings_layout: {
|
|
148
149
|
name: "settings",
|
|
149
|
-
composes: String.raw`(?:\bfrom|\bimport)\s*\(?\s*["']@tangle-network/agent-app/settings-react(?:/[^"']*)?["']`,
|
|
150
|
-
reason: "imports nothing from @tangle-network/agent-app/settings-react",
|
|
150
|
+
composes: String.raw`(?:\bfrom|\bimport)\s*\(?\s*["']@tangle-network/agent-app/settings-react(?:/[^"']*)?["']|\bimport\s*\{[^}]*\bbindSettingsNav\b[^}]*\}\s*from\s*["']@tangle-network/ui/presentation["']`,
|
|
151
|
+
reason: "imports nothing from @tangle-network/agent-app/settings-react, nor bindSettingsNav from @tangle-network/ui/presentation",
|
|
151
152
|
},
|
|
152
153
|
};
|
|
153
154
|
const PAGE_DIR = /(?:^|\/)(?:routes|pages|views)\//i;
|
package/dist/index.d.ts
CHANGED
|
@@ -51,136 +51,136 @@ interface BrandPalette {
|
|
|
51
51
|
/** Resolved palettes for the canonical light and dark themes and the website named theme. */
|
|
52
52
|
export declare const palettes: {
|
|
53
53
|
readonly light: {
|
|
54
|
-
readonly canvas: "#
|
|
54
|
+
readonly canvas: "#eceef4";
|
|
55
55
|
readonly card: "#ffffff";
|
|
56
|
-
readonly well: "#
|
|
57
|
-
readonly nested: "#
|
|
56
|
+
readonly well: "#f4f5fb";
|
|
57
|
+
readonly nested: "#edeff5";
|
|
58
58
|
readonly overlay: "#ffffff";
|
|
59
59
|
readonly deepest: "#ffffff";
|
|
60
|
-
readonly hairline: "#
|
|
61
|
-
readonly ink: "#
|
|
62
|
-
readonly inkSecondary: "#
|
|
63
|
-
readonly inkMuted: "#
|
|
64
|
-
readonly accent: "#
|
|
65
|
-
readonly accentHover: "#
|
|
60
|
+
readonly hairline: "#c7c9ce";
|
|
61
|
+
readonly ink: "#3f3f3f";
|
|
62
|
+
readonly inkSecondary: "#505050";
|
|
63
|
+
readonly inkMuted: "#5d5d5d";
|
|
64
|
+
readonly accent: "#5f53cc";
|
|
65
|
+
readonly accentHover: "#6f64d1";
|
|
66
66
|
readonly onAccent: "#ffffff";
|
|
67
|
-
readonly accentText: "#
|
|
68
|
-
readonly danger: "#
|
|
69
|
-
readonly successBg: "#
|
|
70
|
-
readonly successBorder: "#
|
|
71
|
-
readonly successText: "#
|
|
72
|
-
readonly warningBg: "#
|
|
73
|
-
readonly warningBorder: "#
|
|
74
|
-
readonly warningText: "#
|
|
75
|
-
readonly dangerBg: "#
|
|
76
|
-
readonly dangerBorder: "#
|
|
77
|
-
readonly dangerText: "#
|
|
78
|
-
readonly infoBg: "#
|
|
79
|
-
readonly infoBorder: "#
|
|
80
|
-
readonly infoText: "#
|
|
81
|
-
readonly brandVibrant: "#
|
|
82
|
-
readonly brandCool: "#
|
|
83
|
-
readonly brandGlow: "#
|
|
84
|
-
readonly brandPurple: "#
|
|
67
|
+
readonly accentText: "#3822f6";
|
|
68
|
+
readonly danger: "#b01919";
|
|
69
|
+
readonly successBg: "#f1f6f4";
|
|
70
|
+
readonly successBorder: "#afcbc0";
|
|
71
|
+
readonly successText: "#166745";
|
|
72
|
+
readonly warningBg: "#f7f5f1";
|
|
73
|
+
readonly warningBorder: "#d1c5b0";
|
|
74
|
+
readonly warningText: "#775519";
|
|
75
|
+
readonly dangerBg: "#faf1f1";
|
|
76
|
+
readonly dangerBorder: "#e4b0b0";
|
|
77
|
+
readonly dangerText: "#b01919";
|
|
78
|
+
readonly infoBg: "#f1f5f8";
|
|
79
|
+
readonly infoBorder: "#b1c8d6";
|
|
80
|
+
readonly infoText: "#1c6085";
|
|
81
|
+
readonly brandVibrant: "#6457db";
|
|
82
|
+
readonly brandCool: "#8073f4";
|
|
83
|
+
readonly brandGlow: "#3822f6";
|
|
84
|
+
readonly brandPurple: "#7e6ff9";
|
|
85
85
|
};
|
|
86
86
|
readonly dark: {
|
|
87
|
-
readonly canvas: "#
|
|
87
|
+
readonly canvas: "#0b0a13";
|
|
88
88
|
readonly card: "#191826";
|
|
89
|
-
readonly well: "#
|
|
90
|
-
readonly nested: "#
|
|
91
|
-
readonly overlay: "#
|
|
89
|
+
readonly well: "#12111d";
|
|
90
|
+
readonly nested: "#242335";
|
|
91
|
+
readonly overlay: "#302f45";
|
|
92
92
|
readonly deepest: "#040408";
|
|
93
|
-
readonly hairline: "#
|
|
94
|
-
readonly ink: "#
|
|
95
|
-
readonly inkSecondary: "#
|
|
96
|
-
readonly inkMuted: "#
|
|
97
|
-
readonly accent: "#
|
|
98
|
-
readonly accentHover: "#
|
|
93
|
+
readonly hairline: "#37354d";
|
|
94
|
+
readonly ink: "#d7d7d7";
|
|
95
|
+
readonly inkSecondary: "#bdbdbd";
|
|
96
|
+
readonly inkMuted: "#ababab";
|
|
97
|
+
readonly accent: "#5f53cc";
|
|
98
|
+
readonly accentHover: "#6f64d1";
|
|
99
99
|
readonly onAccent: "#ffffff";
|
|
100
|
-
readonly accentText: "#
|
|
101
|
-
readonly danger: "#
|
|
102
|
-
readonly successBg: "#
|
|
103
|
-
readonly successBorder: "#
|
|
104
|
-
readonly successText: "#
|
|
105
|
-
readonly warningBg: "#
|
|
106
|
-
readonly warningBorder: "#
|
|
107
|
-
readonly warningText: "#
|
|
108
|
-
readonly dangerBg: "#
|
|
109
|
-
readonly dangerBorder: "#
|
|
110
|
-
readonly dangerText: "#
|
|
111
|
-
readonly infoBg: "#
|
|
112
|
-
readonly infoBorder: "#
|
|
113
|
-
readonly infoText: "#
|
|
114
|
-
readonly brandVibrant: "#
|
|
115
|
-
readonly brandCool: "#
|
|
116
|
-
readonly brandGlow: "#
|
|
117
|
-
readonly brandPurple: "#
|
|
100
|
+
readonly accentText: "#ccc7fd";
|
|
101
|
+
readonly danger: "#f9d6d6";
|
|
102
|
+
readonly successBg: "#21342c";
|
|
103
|
+
readonly successBorder: "#496b5d";
|
|
104
|
+
readonly successText: "#a6eccf";
|
|
105
|
+
readonly warningBg: "#362f22";
|
|
106
|
+
readonly warningBorder: "#6e634f";
|
|
107
|
+
readonly warningText: "#f0dcb8";
|
|
108
|
+
readonly dangerBg: "#412a2a";
|
|
109
|
+
readonly dangerBorder: "#785e5e";
|
|
110
|
+
readonly dangerText: "#f9d6d6";
|
|
111
|
+
readonly infoBg: "#243239";
|
|
112
|
+
readonly infoBorder: "#546771";
|
|
113
|
+
readonly infoText: "#c4e2f3";
|
|
114
|
+
readonly brandVibrant: "#8c83e5";
|
|
115
|
+
readonly brandCool: "#8073f4";
|
|
116
|
+
readonly brandGlow: "#ccc7fd";
|
|
117
|
+
readonly brandPurple: "#dedbfe";
|
|
118
118
|
};
|
|
119
119
|
readonly websiteLight: {
|
|
120
|
-
readonly canvas: "#
|
|
120
|
+
readonly canvas: "#efeff8";
|
|
121
121
|
readonly card: "#ffffff";
|
|
122
|
-
readonly well: "#
|
|
123
|
-
readonly nested: "#
|
|
122
|
+
readonly well: "#f7f7ff";
|
|
123
|
+
readonly nested: "#eeeef7";
|
|
124
124
|
readonly overlay: "#ffffff";
|
|
125
125
|
readonly deepest: "#ffffff";
|
|
126
|
-
readonly hairline: "#
|
|
127
|
-
readonly ink: "#
|
|
128
|
-
readonly inkSecondary: "#
|
|
129
|
-
readonly inkMuted: "#
|
|
130
|
-
readonly accent: "#
|
|
131
|
-
readonly accentHover: "#
|
|
126
|
+
readonly hairline: "#d0d0d9";
|
|
127
|
+
readonly ink: "#3f3f3f";
|
|
128
|
+
readonly inkSecondary: "#515151";
|
|
129
|
+
readonly inkMuted: "#5d5d5d";
|
|
130
|
+
readonly accent: "#5f53cc";
|
|
131
|
+
readonly accentHover: "#6f64d1";
|
|
132
132
|
readonly onAccent: "#ffffff";
|
|
133
|
-
readonly accentText: "#
|
|
134
|
-
readonly danger: "#
|
|
135
|
-
readonly successBg: "#
|
|
136
|
-
readonly successBorder: "#
|
|
137
|
-
readonly successText: "#
|
|
138
|
-
readonly warningBg: "#
|
|
139
|
-
readonly warningBorder: "#
|
|
140
|
-
readonly warningText: "#
|
|
141
|
-
readonly dangerBg: "#
|
|
142
|
-
readonly dangerBorder: "#
|
|
143
|
-
readonly dangerText: "#
|
|
144
|
-
readonly infoBg: "#
|
|
145
|
-
readonly infoBorder: "#
|
|
146
|
-
readonly infoText: "#
|
|
147
|
-
readonly brandVibrant: "#
|
|
148
|
-
readonly brandCool: "#
|
|
149
|
-
readonly brandGlow: "#
|
|
150
|
-
readonly brandPurple: "#
|
|
133
|
+
readonly accentText: "#3822f6";
|
|
134
|
+
readonly danger: "#b01919";
|
|
135
|
+
readonly successBg: "#f1f6f4";
|
|
136
|
+
readonly successBorder: "#afcbc0";
|
|
137
|
+
readonly successText: "#166745";
|
|
138
|
+
readonly warningBg: "#f7f5f1";
|
|
139
|
+
readonly warningBorder: "#d1c5b0";
|
|
140
|
+
readonly warningText: "#775519";
|
|
141
|
+
readonly dangerBg: "#faf1f1";
|
|
142
|
+
readonly dangerBorder: "#e4b0b0";
|
|
143
|
+
readonly dangerText: "#b01919";
|
|
144
|
+
readonly infoBg: "#f1f5f8";
|
|
145
|
+
readonly infoBorder: "#b1c8d6";
|
|
146
|
+
readonly infoText: "#1c6085";
|
|
147
|
+
readonly brandVibrant: "#6457db";
|
|
148
|
+
readonly brandCool: "#8073f4";
|
|
149
|
+
readonly brandGlow: "#3822f6";
|
|
150
|
+
readonly brandPurple: "#7e6ff9";
|
|
151
151
|
};
|
|
152
152
|
readonly websiteDark: {
|
|
153
153
|
readonly canvas: "#0c0b1d";
|
|
154
|
-
readonly card: "#
|
|
155
|
-
readonly well: "#
|
|
156
|
-
readonly nested: "#
|
|
157
|
-
readonly overlay: "#
|
|
158
|
-
readonly deepest: "#
|
|
159
|
-
readonly hairline: "#
|
|
160
|
-
readonly ink: "#
|
|
161
|
-
readonly inkSecondary: "#
|
|
162
|
-
readonly inkMuted: "#
|
|
163
|
-
readonly accent: "#
|
|
164
|
-
readonly accentHover: "#
|
|
154
|
+
readonly card: "#201e3e";
|
|
155
|
+
readonly well: "#16142d";
|
|
156
|
+
readonly nested: "#2b294f";
|
|
157
|
+
readonly overlay: "#363462";
|
|
158
|
+
readonly deepest: "#04040e";
|
|
159
|
+
readonly hairline: "#403d72";
|
|
160
|
+
readonly ink: "#e4e4e4";
|
|
161
|
+
readonly inkSecondary: "#c8c8c8";
|
|
162
|
+
readonly inkMuted: "#b6b6b6";
|
|
163
|
+
readonly accent: "#5f53cc";
|
|
164
|
+
readonly accentHover: "#6f64d1";
|
|
165
165
|
readonly onAccent: "#ffffff";
|
|
166
|
-
readonly accentText: "#
|
|
167
|
-
readonly danger: "#
|
|
168
|
-
readonly successBg: "#
|
|
169
|
-
readonly successBorder: "#
|
|
170
|
-
readonly successText: "#
|
|
171
|
-
readonly warningBg: "#
|
|
172
|
-
readonly warningBorder: "#
|
|
173
|
-
readonly warningText: "#
|
|
174
|
-
readonly dangerBg: "#
|
|
175
|
-
readonly dangerBorder: "#
|
|
176
|
-
readonly dangerText: "#
|
|
177
|
-
readonly infoBg: "#
|
|
178
|
-
readonly infoBorder: "#
|
|
179
|
-
readonly infoText: "#
|
|
180
|
-
readonly brandVibrant: "#
|
|
181
|
-
readonly brandCool: "#
|
|
182
|
-
readonly brandGlow: "#
|
|
183
|
-
readonly brandPurple: "#
|
|
166
|
+
readonly accentText: "#ccc7fd";
|
|
167
|
+
readonly danger: "#f9d6d6";
|
|
168
|
+
readonly successBg: "#21342c";
|
|
169
|
+
readonly successBorder: "#496b5d";
|
|
170
|
+
readonly successText: "#a6eccf";
|
|
171
|
+
readonly warningBg: "#362f22";
|
|
172
|
+
readonly warningBorder: "#6e634f";
|
|
173
|
+
readonly warningText: "#f0dcb8";
|
|
174
|
+
readonly dangerBg: "#412a2a";
|
|
175
|
+
readonly dangerBorder: "#785e5e";
|
|
176
|
+
readonly dangerText: "#f9d6d6";
|
|
177
|
+
readonly infoBg: "#243239";
|
|
178
|
+
readonly infoBorder: "#546771";
|
|
179
|
+
readonly infoText: "#c4e2f3";
|
|
180
|
+
readonly brandVibrant: "#8c83e5";
|
|
181
|
+
readonly brandCool: "#8073f4";
|
|
182
|
+
readonly brandGlow: "#ccc7fd";
|
|
183
|
+
readonly brandPurple: "#dedbfe";
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
186
|
export { type BrandPalette, type LogoProps, type TangleKnotProps, knot, knotGradientIds, knotSvg };
|
package/dist/index.js
CHANGED
|
@@ -92,136 +92,136 @@ function Logo({ size = "md", variant = "full", suffix = null, className }) {
|
|
|
92
92
|
/** Resolved palettes for the canonical light and dark themes and the website named theme. */
|
|
93
93
|
const palettes = {
|
|
94
94
|
light: {
|
|
95
|
-
canvas: "#
|
|
95
|
+
canvas: "#eceef4",
|
|
96
96
|
card: "#ffffff",
|
|
97
|
-
well: "#
|
|
98
|
-
nested: "#
|
|
97
|
+
well: "#f4f5fb",
|
|
98
|
+
nested: "#edeff5",
|
|
99
99
|
overlay: "#ffffff",
|
|
100
100
|
deepest: "#ffffff",
|
|
101
|
-
hairline: "#
|
|
102
|
-
ink: "#
|
|
103
|
-
inkSecondary: "#
|
|
104
|
-
inkMuted: "#
|
|
105
|
-
accent: "#
|
|
106
|
-
accentHover: "#
|
|
101
|
+
hairline: "#c7c9ce",
|
|
102
|
+
ink: "#3f3f3f",
|
|
103
|
+
inkSecondary: "#505050",
|
|
104
|
+
inkMuted: "#5d5d5d",
|
|
105
|
+
accent: "#5f53cc",
|
|
106
|
+
accentHover: "#6f64d1",
|
|
107
107
|
onAccent: "#ffffff",
|
|
108
|
-
accentText: "#
|
|
109
|
-
danger: "#
|
|
110
|
-
successBg: "#
|
|
111
|
-
successBorder: "#
|
|
112
|
-
successText: "#
|
|
113
|
-
warningBg: "#
|
|
114
|
-
warningBorder: "#
|
|
115
|
-
warningText: "#
|
|
116
|
-
dangerBg: "#
|
|
117
|
-
dangerBorder: "#
|
|
118
|
-
dangerText: "#
|
|
119
|
-
infoBg: "#
|
|
120
|
-
infoBorder: "#
|
|
121
|
-
infoText: "#
|
|
122
|
-
brandVibrant: "#
|
|
123
|
-
brandCool: "#
|
|
124
|
-
brandGlow: "#
|
|
125
|
-
brandPurple: "#
|
|
108
|
+
accentText: "#3822f6",
|
|
109
|
+
danger: "#b01919",
|
|
110
|
+
successBg: "#f1f6f4",
|
|
111
|
+
successBorder: "#afcbc0",
|
|
112
|
+
successText: "#166745",
|
|
113
|
+
warningBg: "#f7f5f1",
|
|
114
|
+
warningBorder: "#d1c5b0",
|
|
115
|
+
warningText: "#775519",
|
|
116
|
+
dangerBg: "#faf1f1",
|
|
117
|
+
dangerBorder: "#e4b0b0",
|
|
118
|
+
dangerText: "#b01919",
|
|
119
|
+
infoBg: "#f1f5f8",
|
|
120
|
+
infoBorder: "#b1c8d6",
|
|
121
|
+
infoText: "#1c6085",
|
|
122
|
+
brandVibrant: "#6457db",
|
|
123
|
+
brandCool: "#8073f4",
|
|
124
|
+
brandGlow: "#3822f6",
|
|
125
|
+
brandPurple: "#7e6ff9"
|
|
126
126
|
},
|
|
127
127
|
dark: {
|
|
128
|
-
canvas: "#
|
|
128
|
+
canvas: "#0b0a13",
|
|
129
129
|
card: "#191826",
|
|
130
|
-
well: "#
|
|
131
|
-
nested: "#
|
|
132
|
-
overlay: "#
|
|
130
|
+
well: "#12111d",
|
|
131
|
+
nested: "#242335",
|
|
132
|
+
overlay: "#302f45",
|
|
133
133
|
deepest: "#040408",
|
|
134
|
-
hairline: "#
|
|
135
|
-
ink: "#
|
|
136
|
-
inkSecondary: "#
|
|
137
|
-
inkMuted: "#
|
|
138
|
-
accent: "#
|
|
139
|
-
accentHover: "#
|
|
134
|
+
hairline: "#37354d",
|
|
135
|
+
ink: "#d7d7d7",
|
|
136
|
+
inkSecondary: "#bdbdbd",
|
|
137
|
+
inkMuted: "#ababab",
|
|
138
|
+
accent: "#5f53cc",
|
|
139
|
+
accentHover: "#6f64d1",
|
|
140
140
|
onAccent: "#ffffff",
|
|
141
|
-
accentText: "#
|
|
142
|
-
danger: "#
|
|
143
|
-
successBg: "#
|
|
144
|
-
successBorder: "#
|
|
145
|
-
successText: "#
|
|
146
|
-
warningBg: "#
|
|
147
|
-
warningBorder: "#
|
|
148
|
-
warningText: "#
|
|
149
|
-
dangerBg: "#
|
|
150
|
-
dangerBorder: "#
|
|
151
|
-
dangerText: "#
|
|
152
|
-
infoBg: "#
|
|
153
|
-
infoBorder: "#
|
|
154
|
-
infoText: "#
|
|
155
|
-
brandVibrant: "#
|
|
156
|
-
brandCool: "#
|
|
157
|
-
brandGlow: "#
|
|
158
|
-
brandPurple: "#
|
|
141
|
+
accentText: "#ccc7fd",
|
|
142
|
+
danger: "#f9d6d6",
|
|
143
|
+
successBg: "#21342c",
|
|
144
|
+
successBorder: "#496b5d",
|
|
145
|
+
successText: "#a6eccf",
|
|
146
|
+
warningBg: "#362f22",
|
|
147
|
+
warningBorder: "#6e634f",
|
|
148
|
+
warningText: "#f0dcb8",
|
|
149
|
+
dangerBg: "#412a2a",
|
|
150
|
+
dangerBorder: "#785e5e",
|
|
151
|
+
dangerText: "#f9d6d6",
|
|
152
|
+
infoBg: "#243239",
|
|
153
|
+
infoBorder: "#546771",
|
|
154
|
+
infoText: "#c4e2f3",
|
|
155
|
+
brandVibrant: "#8c83e5",
|
|
156
|
+
brandCool: "#8073f4",
|
|
157
|
+
brandGlow: "#ccc7fd",
|
|
158
|
+
brandPurple: "#dedbfe"
|
|
159
159
|
},
|
|
160
160
|
websiteLight: {
|
|
161
|
-
canvas: "#
|
|
161
|
+
canvas: "#efeff8",
|
|
162
162
|
card: "#ffffff",
|
|
163
|
-
well: "#
|
|
164
|
-
nested: "#
|
|
163
|
+
well: "#f7f7ff",
|
|
164
|
+
nested: "#eeeef7",
|
|
165
165
|
overlay: "#ffffff",
|
|
166
166
|
deepest: "#ffffff",
|
|
167
|
-
hairline: "#
|
|
168
|
-
ink: "#
|
|
169
|
-
inkSecondary: "#
|
|
170
|
-
inkMuted: "#
|
|
171
|
-
accent: "#
|
|
172
|
-
accentHover: "#
|
|
167
|
+
hairline: "#d0d0d9",
|
|
168
|
+
ink: "#3f3f3f",
|
|
169
|
+
inkSecondary: "#515151",
|
|
170
|
+
inkMuted: "#5d5d5d",
|
|
171
|
+
accent: "#5f53cc",
|
|
172
|
+
accentHover: "#6f64d1",
|
|
173
173
|
onAccent: "#ffffff",
|
|
174
|
-
accentText: "#
|
|
175
|
-
danger: "#
|
|
176
|
-
successBg: "#
|
|
177
|
-
successBorder: "#
|
|
178
|
-
successText: "#
|
|
179
|
-
warningBg: "#
|
|
180
|
-
warningBorder: "#
|
|
181
|
-
warningText: "#
|
|
182
|
-
dangerBg: "#
|
|
183
|
-
dangerBorder: "#
|
|
184
|
-
dangerText: "#
|
|
185
|
-
infoBg: "#
|
|
186
|
-
infoBorder: "#
|
|
187
|
-
infoText: "#
|
|
188
|
-
brandVibrant: "#
|
|
189
|
-
brandCool: "#
|
|
190
|
-
brandGlow: "#
|
|
191
|
-
brandPurple: "#
|
|
174
|
+
accentText: "#3822f6",
|
|
175
|
+
danger: "#b01919",
|
|
176
|
+
successBg: "#f1f6f4",
|
|
177
|
+
successBorder: "#afcbc0",
|
|
178
|
+
successText: "#166745",
|
|
179
|
+
warningBg: "#f7f5f1",
|
|
180
|
+
warningBorder: "#d1c5b0",
|
|
181
|
+
warningText: "#775519",
|
|
182
|
+
dangerBg: "#faf1f1",
|
|
183
|
+
dangerBorder: "#e4b0b0",
|
|
184
|
+
dangerText: "#b01919",
|
|
185
|
+
infoBg: "#f1f5f8",
|
|
186
|
+
infoBorder: "#b1c8d6",
|
|
187
|
+
infoText: "#1c6085",
|
|
188
|
+
brandVibrant: "#6457db",
|
|
189
|
+
brandCool: "#8073f4",
|
|
190
|
+
brandGlow: "#3822f6",
|
|
191
|
+
brandPurple: "#7e6ff9"
|
|
192
192
|
},
|
|
193
193
|
websiteDark: {
|
|
194
194
|
canvas: "#0c0b1d",
|
|
195
|
-
card: "#
|
|
196
|
-
well: "#
|
|
197
|
-
nested: "#
|
|
198
|
-
overlay: "#
|
|
199
|
-
deepest: "#
|
|
200
|
-
hairline: "#
|
|
201
|
-
ink: "#
|
|
202
|
-
inkSecondary: "#
|
|
203
|
-
inkMuted: "#
|
|
204
|
-
accent: "#
|
|
205
|
-
accentHover: "#
|
|
195
|
+
card: "#201e3e",
|
|
196
|
+
well: "#16142d",
|
|
197
|
+
nested: "#2b294f",
|
|
198
|
+
overlay: "#363462",
|
|
199
|
+
deepest: "#04040e",
|
|
200
|
+
hairline: "#403d72",
|
|
201
|
+
ink: "#e4e4e4",
|
|
202
|
+
inkSecondary: "#c8c8c8",
|
|
203
|
+
inkMuted: "#b6b6b6",
|
|
204
|
+
accent: "#5f53cc",
|
|
205
|
+
accentHover: "#6f64d1",
|
|
206
206
|
onAccent: "#ffffff",
|
|
207
|
-
accentText: "#
|
|
208
|
-
danger: "#
|
|
209
|
-
successBg: "#
|
|
210
|
-
successBorder: "#
|
|
211
|
-
successText: "#
|
|
212
|
-
warningBg: "#
|
|
213
|
-
warningBorder: "#
|
|
214
|
-
warningText: "#
|
|
215
|
-
dangerBg: "#
|
|
216
|
-
dangerBorder: "#
|
|
217
|
-
dangerText: "#
|
|
218
|
-
infoBg: "#
|
|
219
|
-
infoBorder: "#
|
|
220
|
-
infoText: "#
|
|
221
|
-
brandVibrant: "#
|
|
222
|
-
brandCool: "#
|
|
223
|
-
brandGlow: "#
|
|
224
|
-
brandPurple: "#
|
|
207
|
+
accentText: "#ccc7fd",
|
|
208
|
+
danger: "#f9d6d6",
|
|
209
|
+
successBg: "#21342c",
|
|
210
|
+
successBorder: "#496b5d",
|
|
211
|
+
successText: "#a6eccf",
|
|
212
|
+
warningBg: "#362f22",
|
|
213
|
+
warningBorder: "#6e634f",
|
|
214
|
+
warningText: "#f0dcb8",
|
|
215
|
+
dangerBg: "#412a2a",
|
|
216
|
+
dangerBorder: "#785e5e",
|
|
217
|
+
dangerText: "#f9d6d6",
|
|
218
|
+
infoBg: "#243239",
|
|
219
|
+
infoBorder: "#546771",
|
|
220
|
+
infoText: "#c4e2f3",
|
|
221
|
+
brandVibrant: "#8c83e5",
|
|
222
|
+
brandCool: "#8073f4",
|
|
223
|
+
brandGlow: "#ccc7fd",
|
|
224
|
+
brandPurple: "#dedbfe"
|
|
225
225
|
}
|
|
226
226
|
};
|
|
227
227
|
export { Logo, TangleKnot, knot, knotGradientIds, knotSvg, palettes };
|
package/package.json
CHANGED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
// Each data-accent scope inside an explicit .dark and .light boundary and two
|
|
4
|
+
// named themes: fill, ink, focus border, selection, mark and line follow the
|
|
5
|
+
// hue while the card, body ink and status stay the theme's.
|
|
6
|
+
const HUES = ["violet", "orange", "teal", "blue", "pink", "brown", "cyan", "lime"] as const;
|
|
7
|
+
|
|
8
|
+
function Island({ accent, theme, label }: { accent?: string; theme?: string; label: string }) {
|
|
9
|
+
return (
|
|
10
|
+
<section data-accent={accent} data-theme={theme} className="rounded-[var(--radius-card)] border border-border bg-card p-3 text-foreground">
|
|
11
|
+
<p className="mb-2 text-xs text-muted-foreground">{label}</p>
|
|
12
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
13
|
+
<button type="button" className="h-8 rounded-[var(--radius-control)] bg-primary px-3 text-sm font-medium text-primary-foreground">
|
|
14
|
+
Run
|
|
15
|
+
</button>
|
|
16
|
+
<span className="text-sm font-medium text-[var(--accent-text)]">Accent ink</span>
|
|
17
|
+
<span className="h-8 w-14 rounded-[var(--radius-control)] border border-[var(--focus-border)] shadow-[0_0_0_3px_var(--focus-halo)]" />
|
|
18
|
+
<span className="rounded-[var(--radius-pill)] bg-[var(--bg-selection)] px-2 py-0.5 text-xs">Selected</span>
|
|
19
|
+
<span className="size-4 rounded-full bg-[var(--brand-primary)]" />
|
|
20
|
+
<span className="w-8 border-t-2 border-[var(--brand-cool)]" />
|
|
21
|
+
<span className="text-xs text-[var(--surface-success-text)]">Done</span>
|
|
22
|
+
</div>
|
|
23
|
+
</section>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function Mode({ mode }: { mode: "dark" | "light" }) {
|
|
28
|
+
return (
|
|
29
|
+
<div className={`${mode} bg-background p-4`} data-mode={mode}>
|
|
30
|
+
<div className="grid gap-3 sm:grid-cols-3">
|
|
31
|
+
<Island label="indigo (no accent)" />
|
|
32
|
+
{HUES.map((hue) => (
|
|
33
|
+
<Island key={hue} accent={hue} label={hue} />
|
|
34
|
+
))}
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const meta: Meta = { title: "Brand/Accent scopes", parameters: { layout: "fullscreen" } };
|
|
41
|
+
export default meta;
|
|
42
|
+
|
|
43
|
+
export const AllHues: StoryObj = {
|
|
44
|
+
render: () => (
|
|
45
|
+
<div>
|
|
46
|
+
<Mode mode="dark" />
|
|
47
|
+
<Mode mode="light" />
|
|
48
|
+
<div className="grid gap-3 p-4 sm:grid-cols-2">
|
|
49
|
+
<Island theme="aubergine" accent="pink" label="pink inside aubergine" />
|
|
50
|
+
<Island theme="super-light" accent="teal" label="teal inside super-light" />
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
),
|
|
54
|
+
};
|