@designa8/vibedesign-linear-internal-v1-b737 0.14.3 → 0.15.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/README.md +1 -1
- package/dist/index.cjs +49 -31
- package/dist/index.js +49 -31
- package/dist/styles.css +12 -22
- package/package.json +1 -1
- package/src/atoms/AnnouncementCard/AnnouncementCard.tsx +94 -50
- package/src/atoms/AnnouncementCard/preview.tsx +7 -3
- package/src/tokens.css +11 -10
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @designa8/vibedesign-linear-internal-v1-b737
|
|
2
2
|
|
|
3
|
-
Complete design system generated by Atoms Design, version **0.
|
|
3
|
+
Complete design system generated by Atoms Design, version **0.15.0**.
|
|
4
4
|
Tokens, atoms, molecules, organisms, and templates — import from the package root;
|
|
5
5
|
never hardcode visual values in consumer code.
|
|
6
6
|
|
package/dist/index.cjs
CHANGED
|
@@ -309,24 +309,35 @@ Icon.displayName = "Icon";
|
|
|
309
309
|
// virtual-pkg:src/atoms/AnnouncementCard/AnnouncementCard.tsx
|
|
310
310
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
311
311
|
var cn = (...parts) => parts.filter(Boolean).join(" ");
|
|
312
|
-
var cardBase = "group relative flex w-full cursor-pointer overflow-hidden rounded-xl border border-hairline transition duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
313
|
-
var
|
|
314
|
-
|
|
312
|
+
var cardBase = "group relative flex w-full cursor-pointer overflow-hidden rounded-xl border border-hairline shadow-card transition duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
313
|
+
var WASH = [
|
|
314
|
+
"linear-gradient(to right",
|
|
315
|
+
"transparent 0%",
|
|
316
|
+
"transparent 34%",
|
|
317
|
+
"color-mix(in srgb, var(--color-promo-glow) 30%, transparent) 48%",
|
|
318
|
+
"color-mix(in srgb, var(--color-promo-glow) 58%, transparent) 63%",
|
|
319
|
+
"color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 76%",
|
|
320
|
+
"color-mix(in srgb, var(--color-promo-violet) 84%, transparent) 88%",
|
|
321
|
+
"var(--color-promo-violet) 100%"
|
|
322
|
+
].join(", ") + ")";
|
|
323
|
+
var WARM_BLOOM = "radial-gradient(88% 150% at 60% -30%, color-mix(in srgb, var(--color-promo-glow) 96%, transparent) 0%, color-mix(in srgb, var(--color-promo-glow) 44%, transparent) 48%, transparent 80%)";
|
|
324
|
+
var CORNER = "radial-gradient(58% 88% at 100% -10%, var(--color-promo-glow-pink) 0%, var(--color-promo-glow-pink) 22%, color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 54%, transparent 86%)";
|
|
325
|
+
var HILL_LEFT_FADE = "linear-gradient(to right, transparent 18%, black 46%)";
|
|
315
326
|
var HILLS = [
|
|
316
327
|
{
|
|
317
328
|
id: "violet",
|
|
318
|
-
shape: "radial-gradient(
|
|
319
|
-
fill: "linear-gradient(
|
|
329
|
+
shape: "radial-gradient(44% 185% at 66% 230%, black 0 99%, transparent 100%)",
|
|
330
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-mid) 0%, var(--color-promo-hill-mid-deep) 100%)"
|
|
320
331
|
},
|
|
321
332
|
{
|
|
322
333
|
id: "indigo",
|
|
323
|
-
shape: "radial-gradient(
|
|
324
|
-
fill: "linear-gradient(
|
|
334
|
+
shape: "radial-gradient(36% 185% at 92% 250%, black 0 99%, transparent 100%)",
|
|
335
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-back) 0%, var(--color-promo-hill-back-deep) 100%)"
|
|
325
336
|
},
|
|
326
337
|
{
|
|
327
338
|
id: "cyan",
|
|
328
|
-
shape: "radial-gradient(
|
|
329
|
-
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep)
|
|
339
|
+
shape: "radial-gradient(32% 175% at 56% 230%, black 0 99%, transparent 100%)",
|
|
340
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep) 100%)"
|
|
330
341
|
}
|
|
331
342
|
];
|
|
332
343
|
var AnnouncementCard = React2.forwardRef(
|
|
@@ -349,20 +360,24 @@ var AnnouncementCard = React2.forwardRef(
|
|
|
349
360
|
cardBase,
|
|
350
361
|
// Flat in the flow: no lift, no shadow escalation, so the card can never
|
|
351
362
|
// ride up over the nav rows above it. Hover is a hairline emphasis only.
|
|
352
|
-
"items-center gap-
|
|
363
|
+
"min-h-[5rem] items-center gap-xs bg-canvas py-base pl-base pr-xs",
|
|
353
364
|
"hover:border-hairline-strong",
|
|
354
365
|
className
|
|
355
366
|
),
|
|
356
367
|
children: [
|
|
357
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
358
|
-
"span",
|
|
359
|
-
{
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
368
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0", children: [
|
|
369
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "absolute inset-0", style: { backgroundImage: WASH } }),
|
|
370
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "absolute inset-0", style: { backgroundImage: WARM_BLOOM } }),
|
|
371
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "absolute inset-0", style: { backgroundImage: CORNER } }),
|
|
372
|
+
HILLS.map((hill) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
373
|
+
"span",
|
|
374
|
+
{
|
|
375
|
+
className: "absolute inset-0",
|
|
376
|
+
style: {
|
|
377
|
+
maskImage: HILL_LEFT_FADE,
|
|
378
|
+
WebkitMaskImage: HILL_LEFT_FADE
|
|
379
|
+
},
|
|
380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
366
381
|
"span",
|
|
367
382
|
{
|
|
368
383
|
className: "absolute inset-0",
|
|
@@ -371,23 +386,26 @@ var AnnouncementCard = React2.forwardRef(
|
|
|
371
386
|
maskImage: hill.shape,
|
|
372
387
|
WebkitMaskImage: hill.shape
|
|
373
388
|
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
),
|
|
380
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "relative flex min-w-0 flex-1 flex-col gap-
|
|
381
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate text-
|
|
382
|
-
subtitle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate text-
|
|
389
|
+
}
|
|
390
|
+
)
|
|
391
|
+
},
|
|
392
|
+
hill.id
|
|
393
|
+
))
|
|
394
|
+
] }),
|
|
395
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "relative flex min-w-0 flex-1 flex-col gap-xxs", children: [
|
|
396
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate text-heading-sm font-weight-heading-md text-ink", children: title }),
|
|
397
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate text-body-sm text-ink opacity-70 dark:opacity-80", children: subtitle })
|
|
383
398
|
] }),
|
|
384
|
-
icon &&
|
|
399
|
+
icon && // The crown always lands on the saturated violet side, so it takes the
|
|
400
|
+
// dedicated `promo-crown` token (white) rather than the theme ink.
|
|
401
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
385
402
|
Icon,
|
|
386
403
|
{
|
|
387
404
|
name: icon,
|
|
388
|
-
size:
|
|
405
|
+
size: 24,
|
|
389
406
|
strokeWidth: 2,
|
|
390
|
-
className: "relative shrink-0
|
|
407
|
+
className: "relative shrink-0",
|
|
408
|
+
style: { color: "var(--color-promo-crown)" }
|
|
391
409
|
}
|
|
392
410
|
)
|
|
393
411
|
]
|
package/dist/index.js
CHANGED
|
@@ -163,24 +163,35 @@ Icon.displayName = "Icon";
|
|
|
163
163
|
// virtual-pkg:src/atoms/AnnouncementCard/AnnouncementCard.tsx
|
|
164
164
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
165
165
|
var cn = (...parts) => parts.filter(Boolean).join(" ");
|
|
166
|
-
var cardBase = "group relative flex w-full cursor-pointer overflow-hidden rounded-xl border border-hairline transition duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
167
|
-
var
|
|
168
|
-
|
|
166
|
+
var cardBase = "group relative flex w-full cursor-pointer overflow-hidden rounded-xl border border-hairline shadow-card transition duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
167
|
+
var WASH = [
|
|
168
|
+
"linear-gradient(to right",
|
|
169
|
+
"transparent 0%",
|
|
170
|
+
"transparent 34%",
|
|
171
|
+
"color-mix(in srgb, var(--color-promo-glow) 30%, transparent) 48%",
|
|
172
|
+
"color-mix(in srgb, var(--color-promo-glow) 58%, transparent) 63%",
|
|
173
|
+
"color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 76%",
|
|
174
|
+
"color-mix(in srgb, var(--color-promo-violet) 84%, transparent) 88%",
|
|
175
|
+
"var(--color-promo-violet) 100%"
|
|
176
|
+
].join(", ") + ")";
|
|
177
|
+
var WARM_BLOOM = "radial-gradient(88% 150% at 60% -30%, color-mix(in srgb, var(--color-promo-glow) 96%, transparent) 0%, color-mix(in srgb, var(--color-promo-glow) 44%, transparent) 48%, transparent 80%)";
|
|
178
|
+
var CORNER = "radial-gradient(58% 88% at 100% -10%, var(--color-promo-glow-pink) 0%, var(--color-promo-glow-pink) 22%, color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 54%, transparent 86%)";
|
|
179
|
+
var HILL_LEFT_FADE = "linear-gradient(to right, transparent 18%, black 46%)";
|
|
169
180
|
var HILLS = [
|
|
170
181
|
{
|
|
171
182
|
id: "violet",
|
|
172
|
-
shape: "radial-gradient(
|
|
173
|
-
fill: "linear-gradient(
|
|
183
|
+
shape: "radial-gradient(44% 185% at 66% 230%, black 0 99%, transparent 100%)",
|
|
184
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-mid) 0%, var(--color-promo-hill-mid-deep) 100%)"
|
|
174
185
|
},
|
|
175
186
|
{
|
|
176
187
|
id: "indigo",
|
|
177
|
-
shape: "radial-gradient(
|
|
178
|
-
fill: "linear-gradient(
|
|
188
|
+
shape: "radial-gradient(36% 185% at 92% 250%, black 0 99%, transparent 100%)",
|
|
189
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-back) 0%, var(--color-promo-hill-back-deep) 100%)"
|
|
179
190
|
},
|
|
180
191
|
{
|
|
181
192
|
id: "cyan",
|
|
182
|
-
shape: "radial-gradient(
|
|
183
|
-
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep)
|
|
193
|
+
shape: "radial-gradient(32% 175% at 56% 230%, black 0 99%, transparent 100%)",
|
|
194
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep) 100%)"
|
|
184
195
|
}
|
|
185
196
|
];
|
|
186
197
|
var AnnouncementCard = React2.forwardRef(
|
|
@@ -203,20 +214,24 @@ var AnnouncementCard = React2.forwardRef(
|
|
|
203
214
|
cardBase,
|
|
204
215
|
// Flat in the flow: no lift, no shadow escalation, so the card can never
|
|
205
216
|
// ride up over the nav rows above it. Hover is a hairline emphasis only.
|
|
206
|
-
"items-center gap-
|
|
217
|
+
"min-h-[5rem] items-center gap-xs bg-canvas py-base pl-base pr-xs",
|
|
207
218
|
"hover:border-hairline-strong",
|
|
208
219
|
className
|
|
209
220
|
),
|
|
210
221
|
children: [
|
|
211
|
-
/* @__PURE__ */ jsxs(
|
|
212
|
-
"span",
|
|
213
|
-
{
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
222
|
+
/* @__PURE__ */ jsxs("span", { "aria-hidden": "true", className: "pointer-events-none absolute inset-0", children: [
|
|
223
|
+
/* @__PURE__ */ jsx2("span", { className: "absolute inset-0", style: { backgroundImage: WASH } }),
|
|
224
|
+
/* @__PURE__ */ jsx2("span", { className: "absolute inset-0", style: { backgroundImage: WARM_BLOOM } }),
|
|
225
|
+
/* @__PURE__ */ jsx2("span", { className: "absolute inset-0", style: { backgroundImage: CORNER } }),
|
|
226
|
+
HILLS.map((hill) => /* @__PURE__ */ jsx2(
|
|
227
|
+
"span",
|
|
228
|
+
{
|
|
229
|
+
className: "absolute inset-0",
|
|
230
|
+
style: {
|
|
231
|
+
maskImage: HILL_LEFT_FADE,
|
|
232
|
+
WebkitMaskImage: HILL_LEFT_FADE
|
|
233
|
+
},
|
|
234
|
+
children: /* @__PURE__ */ jsx2(
|
|
220
235
|
"span",
|
|
221
236
|
{
|
|
222
237
|
className: "absolute inset-0",
|
|
@@ -225,23 +240,26 @@ var AnnouncementCard = React2.forwardRef(
|
|
|
225
240
|
maskImage: hill.shape,
|
|
226
241
|
WebkitMaskImage: hill.shape
|
|
227
242
|
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
),
|
|
234
|
-
/* @__PURE__ */ jsxs("span", { className: "relative flex min-w-0 flex-1 flex-col gap-
|
|
235
|
-
/* @__PURE__ */ jsx2("span", { className: "truncate text-
|
|
236
|
-
subtitle && /* @__PURE__ */ jsx2("span", { className: "truncate text-
|
|
243
|
+
}
|
|
244
|
+
)
|
|
245
|
+
},
|
|
246
|
+
hill.id
|
|
247
|
+
))
|
|
248
|
+
] }),
|
|
249
|
+
/* @__PURE__ */ jsxs("span", { className: "relative flex min-w-0 flex-1 flex-col gap-xxs", children: [
|
|
250
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate text-heading-sm font-weight-heading-md text-ink", children: title }),
|
|
251
|
+
subtitle && /* @__PURE__ */ jsx2("span", { className: "truncate text-body-sm text-ink opacity-70 dark:opacity-80", children: subtitle })
|
|
237
252
|
] }),
|
|
238
|
-
icon &&
|
|
253
|
+
icon && // The crown always lands on the saturated violet side, so it takes the
|
|
254
|
+
// dedicated `promo-crown` token (white) rather than the theme ink.
|
|
255
|
+
/* @__PURE__ */ jsx2(
|
|
239
256
|
Icon,
|
|
240
257
|
{
|
|
241
258
|
name: icon,
|
|
242
|
-
size:
|
|
259
|
+
size: 24,
|
|
243
260
|
strokeWidth: 2,
|
|
244
|
-
className: "relative shrink-0
|
|
261
|
+
className: "relative shrink-0",
|
|
262
|
+
style: { color: "var(--color-promo-crown)" }
|
|
245
263
|
}
|
|
246
264
|
)
|
|
247
265
|
]
|
package/dist/styles.css
CHANGED
|
@@ -63,14 +63,16 @@
|
|
|
63
63
|
--color-link-blue: #5E6AD2;
|
|
64
64
|
--color-focus-blue: #5E6AD2;
|
|
65
65
|
--color-scrim: #000000;
|
|
66
|
-
--color-promo-
|
|
67
|
-
--color-promo-
|
|
68
|
-
--color-promo-hill-front
|
|
69
|
-
--color-promo-hill-
|
|
70
|
-
--color-promo-hill-mid
|
|
71
|
-
--color-promo-hill-
|
|
72
|
-
--color-promo-hill-back
|
|
73
|
-
--color-promo-
|
|
66
|
+
--color-promo-violet: #7C3AED;
|
|
67
|
+
--color-promo-glow: #FFD0A6;
|
|
68
|
+
--color-promo-hill-front: #7DD3FC;
|
|
69
|
+
--color-promo-hill-front-deep: #3B82F6;
|
|
70
|
+
--color-promo-hill-mid: #A78BFA;
|
|
71
|
+
--color-promo-hill-mid-deep: #7C3AED;
|
|
72
|
+
--color-promo-hill-back: #6D28D9;
|
|
73
|
+
--color-promo-hill-back-deep: #4C1D95;
|
|
74
|
+
--color-promo-glow-pink: #EE7BC4;
|
|
75
|
+
--color-promo-crown: #FFFFFF;
|
|
74
76
|
--font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
75
77
|
--text-display-lg: 40px;
|
|
76
78
|
--text-display-lg--font-weight: 600;
|
|
@@ -1764,9 +1766,6 @@
|
|
|
1764
1766
|
.pl-lg {
|
|
1765
1767
|
padding-left: var(--spacing-lg);
|
|
1766
1768
|
}
|
|
1767
|
-
.pl-md {
|
|
1768
|
-
padding-left: var(--spacing-md);
|
|
1769
|
-
}
|
|
1770
1769
|
.pl-xl {
|
|
1771
1770
|
padding-left: var(--spacing-xl);
|
|
1772
1771
|
}
|
|
@@ -1900,12 +1899,6 @@
|
|
|
1900
1899
|
.text-ink {
|
|
1901
1900
|
color: var(--color-ink);
|
|
1902
1901
|
}
|
|
1903
|
-
.text-ink\/80 {
|
|
1904
|
-
color: color-mix(in srgb, #1B1C22 80%, transparent);
|
|
1905
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
1906
|
-
color: color-mix(in oklab, var(--color-ink) 80%, transparent);
|
|
1907
|
-
}
|
|
1908
|
-
}
|
|
1909
1902
|
.text-inverse-ink {
|
|
1910
1903
|
color: var(--color-inverse-ink);
|
|
1911
1904
|
}
|
|
@@ -3050,12 +3043,9 @@
|
|
|
3050
3043
|
background-color: var(--color-ink);
|
|
3051
3044
|
}
|
|
3052
3045
|
}
|
|
3053
|
-
.dark\:
|
|
3046
|
+
.dark\:opacity-80 {
|
|
3054
3047
|
&:where([data-theme="dark"], [data-theme="dark"] *) {
|
|
3055
|
-
|
|
3056
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
3057
|
-
color: color-mix(in oklab, var(--color-ink) 85%, transparent);
|
|
3058
|
-
}
|
|
3048
|
+
opacity: 80%;
|
|
3059
3049
|
}
|
|
3060
3050
|
}
|
|
3061
3051
|
|
package/package.json
CHANGED
|
@@ -10,12 +10,13 @@ export interface AnnouncementCardProps {
|
|
|
10
10
|
subtitle?: string;
|
|
11
11
|
/**
|
|
12
12
|
* `"default"` is the plain "what's new" card. `"promo"` is the upgrade card with
|
|
13
|
-
* the
|
|
13
|
+
* the full-bleed warm wash and the rolling-hills illustration.
|
|
14
14
|
*/
|
|
15
15
|
variant?: "default" | "promo";
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Glyph drawn over the illustration. Promo only. Tinted with the
|
|
18
|
+
* `colors.promo-crown` token, which stays white in both themes because it always
|
|
19
|
+
* sits on the saturated violet side of the card.
|
|
19
20
|
*/
|
|
20
21
|
icon?: IconName;
|
|
21
22
|
/** Destination. Used as the fallback when `onClick` is not supplied. */
|
|
@@ -32,59 +33,86 @@ const cn = (...parts: Array<string | false | null | undefined>) =>
|
|
|
32
33
|
parts.filter(Boolean).join(" ");
|
|
33
34
|
|
|
34
35
|
const cardBase =
|
|
35
|
-
"group relative flex w-full cursor-pointer overflow-hidden rounded-xl border border-hairline transition duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
36
|
+
"group relative flex w-full cursor-pointer overflow-hidden rounded-xl border border-hairline shadow-card transition duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-blue";
|
|
36
37
|
|
|
37
38
|
/**
|
|
38
|
-
* The
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
39
|
+
* The full-bleed horizontal wash. The left third stays clear so the copy keeps a
|
|
40
|
+
* near-white (near-black in dark mode) field to sit on; it then warms into peach
|
|
41
|
+
* across the middle, drifts through pink and lands on saturated violet over the
|
|
42
|
+
* right quarter — the top-right corner included.
|
|
42
43
|
*/
|
|
43
|
-
const
|
|
44
|
-
"linear-gradient(to right,
|
|
44
|
+
const WASH = [
|
|
45
|
+
"linear-gradient(to right",
|
|
46
|
+
"transparent 0%",
|
|
47
|
+
"transparent 34%",
|
|
48
|
+
"color-mix(in srgb, var(--color-promo-glow) 30%, transparent) 48%",
|
|
49
|
+
"color-mix(in srgb, var(--color-promo-glow) 58%, transparent) 63%",
|
|
50
|
+
"color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 76%",
|
|
51
|
+
"color-mix(in srgb, var(--color-promo-violet) 84%, transparent) 88%",
|
|
52
|
+
"var(--color-promo-violet) 100%",
|
|
53
|
+
].join(", ") + ")";
|
|
45
54
|
|
|
46
55
|
/**
|
|
47
|
-
* The warm
|
|
48
|
-
*
|
|
49
|
-
* only shows on the near-white field above their crests.
|
|
56
|
+
* The warm bloom fills the upper middle of the card, so the peach reads as a wide
|
|
57
|
+
* glow rather than a thin band.
|
|
50
58
|
*/
|
|
51
|
-
const
|
|
52
|
-
"radial-gradient(
|
|
59
|
+
const WARM_BLOOM =
|
|
60
|
+
"radial-gradient(88% 150% at 60% -30%, color-mix(in srgb, var(--color-promo-glow) 96%, transparent) 0%, color-mix(in srgb, var(--color-promo-glow) 44%, transparent) 48%, transparent 80%)";
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Pink holds the top-right corner before it hands over to violet lower down, so the
|
|
64
|
+
* corner reads pink-magenta rather than a flat violet slab.
|
|
65
|
+
*/
|
|
66
|
+
const CORNER =
|
|
67
|
+
"radial-gradient(58% 88% at 100% -10%, var(--color-promo-glow-pink) 0%, var(--color-promo-glow-pink) 22%, color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 54%, transparent 86%)";
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Shared left edge for every hill: each layer keeps a crisp crest and only softens
|
|
71
|
+
* here, where it dissolves into the white field behind the copy. Nesting this mask
|
|
72
|
+
* around the shape mask keeps the two from being unioned into one blob. It holds
|
|
73
|
+
* back until past the copy column, so the title and subtitle always read on clean
|
|
74
|
+
* card surface — on the narrow rail and on a wide card alike.
|
|
75
|
+
*/
|
|
76
|
+
const HILL_LEFT_FADE = "linear-gradient(to right, transparent 18%, black 46%)";
|
|
53
77
|
|
|
54
78
|
interface Hill {
|
|
55
79
|
id: string;
|
|
56
80
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
81
|
+
* Every hill is one very tall, wide ellipse whose centre sits far below the card,
|
|
82
|
+
* so only a shallow, gently curving crest falls inside — a rolling hill, never a
|
|
83
|
+
* circle and never a diagonal sweep.
|
|
84
|
+
*
|
|
85
|
+
* Reading the numbers: the centre sits at `cy`, the vertical radius is `H`, so the
|
|
86
|
+
* crest lands at `cy - H` as a share of the card measured from the top; `W` and
|
|
87
|
+
* `cx` decide how far the flanks reach across the bottom edge.
|
|
88
|
+
*
|
|
89
|
+
* Back to front, each crest about ten points apart so every layer stays visible:
|
|
90
|
+
* violet — crest ~45% up, peaking at 66% across, easing off toward the right edge;
|
|
91
|
+
* indigo — crest ~65% up (low), arriving around 58% across and running off the
|
|
92
|
+
* right edge to fill the bottom-right corner;
|
|
93
|
+
* cyan — the bright front hill: crest ~55% up just past mid-width, then falling
|
|
94
|
+
* back to the bottom around 86% so it overlaps the indigo layer.
|
|
60
95
|
*/
|
|
61
96
|
shape: string;
|
|
62
|
-
/** Vertical shading
|
|
97
|
+
/** Vertical shading inside the hill, so each layer deepens toward its base. */
|
|
63
98
|
fill: string;
|
|
64
99
|
}
|
|
65
100
|
|
|
66
|
-
/**
|
|
67
|
-
* Back to front, crests quoted as a share of the card height. The band occupies only
|
|
68
|
-
* the bottom ~55-60% and the top-right keeps its warm glow.
|
|
69
|
-
* violet: crest ~42%, peaking around three-quarters of the width — the main hill.
|
|
70
|
-
* indigo: crest ~30% at the far right, so the glyph sits on saturated violet.
|
|
71
|
-
* cyan: crest ~62%, drawn last, the bright front hill along the lower-left.
|
|
72
|
-
*/
|
|
73
101
|
const HILLS: Hill[] = [
|
|
74
102
|
{
|
|
75
103
|
id: "violet",
|
|
76
|
-
shape: "radial-gradient(
|
|
77
|
-
fill: "linear-gradient(
|
|
104
|
+
shape: "radial-gradient(44% 185% at 66% 230%, black 0 99%, transparent 100%)",
|
|
105
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-mid) 0%, var(--color-promo-hill-mid-deep) 100%)",
|
|
78
106
|
},
|
|
79
107
|
{
|
|
80
108
|
id: "indigo",
|
|
81
|
-
shape: "radial-gradient(
|
|
82
|
-
fill: "linear-gradient(
|
|
109
|
+
shape: "radial-gradient(36% 185% at 92% 250%, black 0 99%, transparent 100%)",
|
|
110
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-back) 0%, var(--color-promo-hill-back-deep) 100%)",
|
|
83
111
|
},
|
|
84
112
|
{
|
|
85
113
|
id: "cyan",
|
|
86
|
-
shape: "radial-gradient(
|
|
87
|
-
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep)
|
|
114
|
+
shape: "radial-gradient(32% 175% at 56% 230%, black 0 99%, transparent 100%)",
|
|
115
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep) 100%)",
|
|
88
116
|
},
|
|
89
117
|
];
|
|
90
118
|
|
|
@@ -108,47 +136,63 @@ export const AnnouncementCard = React.forwardRef<HTMLAnchorElement, Announcement
|
|
|
108
136
|
cardBase,
|
|
109
137
|
// Flat in the flow: no lift, no shadow escalation, so the card can never
|
|
110
138
|
// ride up over the nav rows above it. Hover is a hairline emphasis only.
|
|
111
|
-
"items-center gap-
|
|
139
|
+
"min-h-[5rem] items-center gap-xs bg-canvas py-base pl-base pr-xs",
|
|
112
140
|
"hover:border-hairline-strong",
|
|
113
141
|
className,
|
|
114
142
|
)}
|
|
115
143
|
>
|
|
116
|
-
{/* Decorative illustration only:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
className="
|
|
121
|
-
style={{ maskImage: LEFT_FADE, WebkitMaskImage: LEFT_FADE }}
|
|
122
|
-
>
|
|
123
|
-
<span className="absolute inset-0" style={{ backgroundImage: GLOW }} />
|
|
144
|
+
{/* Decorative illustration only: warm wash, upper bloom, corner, then the hills. */}
|
|
145
|
+
<span aria-hidden="true" className="pointer-events-none absolute inset-0">
|
|
146
|
+
<span className="absolute inset-0" style={{ backgroundImage: WASH }} />
|
|
147
|
+
<span className="absolute inset-0" style={{ backgroundImage: WARM_BLOOM }} />
|
|
148
|
+
<span className="absolute inset-0" style={{ backgroundImage: CORNER }} />
|
|
124
149
|
{HILLS.map((hill) => (
|
|
125
150
|
<span
|
|
126
151
|
key={hill.id}
|
|
127
152
|
className="absolute inset-0"
|
|
128
153
|
style={{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
WebkitMaskImage: hill.shape,
|
|
154
|
+
maskImage: HILL_LEFT_FADE,
|
|
155
|
+
WebkitMaskImage: HILL_LEFT_FADE,
|
|
132
156
|
}}
|
|
133
|
-
|
|
157
|
+
>
|
|
158
|
+
<span
|
|
159
|
+
className="absolute inset-0"
|
|
160
|
+
style={{
|
|
161
|
+
backgroundImage: hill.fill,
|
|
162
|
+
maskImage: hill.shape,
|
|
163
|
+
WebkitMaskImage: hill.shape,
|
|
164
|
+
}}
|
|
165
|
+
/>
|
|
166
|
+
</span>
|
|
134
167
|
))}
|
|
135
168
|
</span>
|
|
136
169
|
|
|
137
|
-
<span className="relative flex min-w-0 flex-1 flex-col gap-
|
|
170
|
+
<span className="relative flex min-w-0 flex-1 flex-col gap-xxs">
|
|
138
171
|
{/* Near-black on the light card, near-white on the dark one — `ink` flips
|
|
139
172
|
with the theme, so no `dark:` override is needed for the title. */}
|
|
140
|
-
<span className="truncate text-
|
|
173
|
+
<span className="truncate text-heading-sm font-weight-heading-md text-ink">
|
|
174
|
+
{title}
|
|
175
|
+
</span>
|
|
176
|
+
{/* Same `ink` as the title, knocked back with element opacity rather than a
|
|
177
|
+
muted color: 70% of ink still reads clearly dark in light mode, 80%
|
|
178
|
+
reads as soft white in dark mode. Never `text-muted` — that washes out
|
|
179
|
+
here. */}
|
|
141
180
|
{subtitle && (
|
|
142
|
-
<span className="truncate text-
|
|
181
|
+
<span className="truncate text-body-sm text-ink opacity-70 dark:opacity-80">
|
|
182
|
+
{subtitle}
|
|
183
|
+
</span>
|
|
143
184
|
)}
|
|
144
185
|
</span>
|
|
145
186
|
|
|
146
187
|
{icon && (
|
|
188
|
+
// The crown always lands on the saturated violet side, so it takes the
|
|
189
|
+
// dedicated `promo-crown` token (white) rather than the theme ink.
|
|
147
190
|
<Icon
|
|
148
191
|
name={icon}
|
|
149
|
-
size={
|
|
192
|
+
size={24}
|
|
150
193
|
strokeWidth={2}
|
|
151
|
-
className="relative shrink-0
|
|
194
|
+
className="relative shrink-0"
|
|
195
|
+
style={{ color: "var(--color-promo-crown)" }}
|
|
152
196
|
/>
|
|
153
197
|
)}
|
|
154
198
|
</a>
|
|
@@ -8,10 +8,14 @@ export default function Preview() {
|
|
|
8
8
|
<div className="w-full max-w-3xl mx-auto p-lg space-y-lg bg-canvas">
|
|
9
9
|
<div className="space-y-sm">
|
|
10
10
|
<p className="text-caption text-muted">
|
|
11
|
-
Promo in the rail —
|
|
11
|
+
Promo in the rail — full-bleed wash, hills overlapping on the right
|
|
12
12
|
</p>
|
|
13
|
-
{/* Rail frame only
|
|
14
|
-
|
|
13
|
+
{/* Rail frame only, so the card is judged at its real sidebar size:
|
|
14
|
+
a 224px card inside the 256px rail. */}
|
|
15
|
+
<div
|
|
16
|
+
className="space-y-sm rounded-lg border border-hairline-soft p-base"
|
|
17
|
+
style={{ width: "256px" }}
|
|
18
|
+
>
|
|
15
19
|
<AnnouncementCard
|
|
16
20
|
variant="promo"
|
|
17
21
|
eyebrow="Plan"
|
package/src/tokens.css
CHANGED
|
@@ -34,16 +34,17 @@
|
|
|
34
34
|
--color-link-blue: #5E6AD2;
|
|
35
35
|
--color-focus-blue: #5E6AD2;
|
|
36
36
|
--color-scrim: #000000;
|
|
37
|
-
--color-promo-sky: #
|
|
38
|
-
--color-promo-violet: #
|
|
39
|
-
--color-promo-glow: #
|
|
40
|
-
--color-promo-hill-front: #
|
|
41
|
-
--color-promo-hill-front-deep: #
|
|
42
|
-
--color-promo-hill-mid: #
|
|
43
|
-
--color-promo-hill-mid-deep: #
|
|
44
|
-
--color-promo-hill-back: #
|
|
45
|
-
--color-promo-hill-back-deep: #
|
|
46
|
-
--color-promo-glow-pink: #
|
|
37
|
+
--color-promo-sky: #7DD3FC;
|
|
38
|
+
--color-promo-violet: #7C3AED;
|
|
39
|
+
--color-promo-glow: #FFD0A6;
|
|
40
|
+
--color-promo-hill-front: #7DD3FC;
|
|
41
|
+
--color-promo-hill-front-deep: #3B82F6;
|
|
42
|
+
--color-promo-hill-mid: #A78BFA;
|
|
43
|
+
--color-promo-hill-mid-deep: #7C3AED;
|
|
44
|
+
--color-promo-hill-back: #6D28D9;
|
|
45
|
+
--color-promo-hill-back-deep: #4C1D95;
|
|
46
|
+
--color-promo-glow-pink: #EE7BC4;
|
|
47
|
+
--color-promo-crown: #FFFFFF;
|
|
47
48
|
--font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
48
49
|
--font-heading: var(--font-body);
|
|
49
50
|
--font-display-lg: var(--font-body);
|