@designa8/vibedesign-linear-internal-v1-b737 0.14.0 → 0.14.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/README.md +1 -1
- package/dist/index.cjs +20 -19
- package/dist/index.js +20 -19
- package/package.json +1 -1
- package/src/atoms/AnnouncementCard/AnnouncementCard.tsx +50 -44
- package/src/atoms/AnnouncementCard/preview.tsx +29 -2
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.14.
|
|
3
|
+
Complete design system generated by Atoms Design, version **0.14.1**.
|
|
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
|
@@ -310,23 +310,23 @@ Icon.displayName = "Icon";
|
|
|
310
310
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
311
311
|
var cn = (...parts) => parts.filter(Boolean).join(" ");
|
|
312
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 LEFT_FADE = "linear-gradient(to right, transparent
|
|
314
|
-
var GLOW = "radial-gradient(
|
|
313
|
+
var LEFT_FADE = "linear-gradient(to right, transparent 56%, color-mix(in srgb, black 18%, transparent) 66%, color-mix(in srgb, black 62%, transparent) 78%, black 90%)";
|
|
314
|
+
var GLOW = "radial-gradient(62% 54% at 100% -18%, var(--color-promo-glow) 0%, color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 48%, transparent 88%)";
|
|
315
315
|
var HILLS = [
|
|
316
316
|
{
|
|
317
|
-
id: "
|
|
318
|
-
shape: "radial-gradient(
|
|
319
|
-
fill: "linear-gradient(
|
|
317
|
+
id: "violet",
|
|
318
|
+
shape: "radial-gradient(48% 80% at 76% 122%, black 0 98.6%, transparent 100%)",
|
|
319
|
+
fill: "linear-gradient(188deg, var(--color-promo-hill-mid) 0%, var(--color-promo-hill-mid-deep) 88%)"
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
|
-
id: "
|
|
323
|
-
shape: "radial-gradient(
|
|
324
|
-
fill: "linear-gradient(
|
|
322
|
+
id: "indigo",
|
|
323
|
+
shape: "radial-gradient(32% 100% at 100% 130%, black 0 98.6%, transparent 100%)",
|
|
324
|
+
fill: "linear-gradient(190deg, var(--color-promo-hill-back) 0%, var(--color-promo-hill-back-deep) 90%)"
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
|
-
id: "
|
|
328
|
-
shape: "radial-gradient(
|
|
329
|
-
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep)
|
|
327
|
+
id: "cyan",
|
|
328
|
+
shape: "radial-gradient(38% 68% at 54% 136%, black 0 98.6%, transparent 100%)",
|
|
329
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep) 92%)"
|
|
330
330
|
}
|
|
331
331
|
];
|
|
332
332
|
var AnnouncementCard = React2.forwardRef(
|
|
@@ -347,17 +347,19 @@ var AnnouncementCard = React2.forwardRef(
|
|
|
347
347
|
"aria-label": subtitle ? `${eyebrow}: ${title} \u2014 ${subtitle}` : `${eyebrow}: ${title}`,
|
|
348
348
|
className: cn(
|
|
349
349
|
cardBase,
|
|
350
|
-
"items-center gap-
|
|
350
|
+
"items-center gap-md bg-canvas py-base pl-md pr-sm shadow-card",
|
|
351
351
|
"hover:-translate-y-px hover:shadow-md active:translate-y-0 motion-reduce:transition-none motion-reduce:hover:translate-y-0",
|
|
352
352
|
className
|
|
353
353
|
),
|
|
354
354
|
children: [
|
|
355
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
356
356
|
"span",
|
|
357
357
|
{
|
|
358
|
-
|
|
358
|
+
"aria-hidden": "true",
|
|
359
|
+
className: "pointer-events-none absolute inset-0 overflow-hidden",
|
|
359
360
|
style: { maskImage: LEFT_FADE, WebkitMaskImage: LEFT_FADE },
|
|
360
361
|
children: [
|
|
362
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "absolute inset-0", style: { backgroundImage: GLOW } }),
|
|
361
363
|
HILLS.map((hill) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
362
364
|
"span",
|
|
363
365
|
{
|
|
@@ -369,13 +371,12 @@ var AnnouncementCard = React2.forwardRef(
|
|
|
369
371
|
}
|
|
370
372
|
},
|
|
371
373
|
hill.id
|
|
372
|
-
))
|
|
373
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "absolute inset-0", style: { backgroundImage: GLOW } })
|
|
374
|
+
))
|
|
374
375
|
]
|
|
375
376
|
}
|
|
376
|
-
)
|
|
377
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "relative flex min-w-0 flex-1 flex-col gap-
|
|
378
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate text-body-md font-weight-heading-
|
|
377
|
+
),
|
|
378
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("span", { className: "relative flex min-w-0 flex-1 flex-col gap-xs", children: [
|
|
379
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate text-body-md font-weight-heading-md text-ink", children: title }),
|
|
379
380
|
subtitle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "truncate text-caption text-muted", children: subtitle })
|
|
380
381
|
] }),
|
|
381
382
|
icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
package/dist/index.js
CHANGED
|
@@ -164,23 +164,23 @@ Icon.displayName = "Icon";
|
|
|
164
164
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
165
165
|
var cn = (...parts) => parts.filter(Boolean).join(" ");
|
|
166
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 LEFT_FADE = "linear-gradient(to right, transparent
|
|
168
|
-
var GLOW = "radial-gradient(
|
|
167
|
+
var LEFT_FADE = "linear-gradient(to right, transparent 56%, color-mix(in srgb, black 18%, transparent) 66%, color-mix(in srgb, black 62%, transparent) 78%, black 90%)";
|
|
168
|
+
var GLOW = "radial-gradient(62% 54% at 100% -18%, var(--color-promo-glow) 0%, color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 48%, transparent 88%)";
|
|
169
169
|
var HILLS = [
|
|
170
170
|
{
|
|
171
|
-
id: "
|
|
172
|
-
shape: "radial-gradient(
|
|
173
|
-
fill: "linear-gradient(
|
|
171
|
+
id: "violet",
|
|
172
|
+
shape: "radial-gradient(48% 80% at 76% 122%, black 0 98.6%, transparent 100%)",
|
|
173
|
+
fill: "linear-gradient(188deg, var(--color-promo-hill-mid) 0%, var(--color-promo-hill-mid-deep) 88%)"
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
|
-
id: "
|
|
177
|
-
shape: "radial-gradient(
|
|
178
|
-
fill: "linear-gradient(
|
|
176
|
+
id: "indigo",
|
|
177
|
+
shape: "radial-gradient(32% 100% at 100% 130%, black 0 98.6%, transparent 100%)",
|
|
178
|
+
fill: "linear-gradient(190deg, var(--color-promo-hill-back) 0%, var(--color-promo-hill-back-deep) 90%)"
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
|
-
id: "
|
|
182
|
-
shape: "radial-gradient(
|
|
183
|
-
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep)
|
|
181
|
+
id: "cyan",
|
|
182
|
+
shape: "radial-gradient(38% 68% at 54% 136%, black 0 98.6%, transparent 100%)",
|
|
183
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep) 92%)"
|
|
184
184
|
}
|
|
185
185
|
];
|
|
186
186
|
var AnnouncementCard = React2.forwardRef(
|
|
@@ -201,17 +201,19 @@ var AnnouncementCard = React2.forwardRef(
|
|
|
201
201
|
"aria-label": subtitle ? `${eyebrow}: ${title} \u2014 ${subtitle}` : `${eyebrow}: ${title}`,
|
|
202
202
|
className: cn(
|
|
203
203
|
cardBase,
|
|
204
|
-
"items-center gap-
|
|
204
|
+
"items-center gap-md bg-canvas py-base pl-md pr-sm shadow-card",
|
|
205
205
|
"hover:-translate-y-px hover:shadow-md active:translate-y-0 motion-reduce:transition-none motion-reduce:hover:translate-y-0",
|
|
206
206
|
className
|
|
207
207
|
),
|
|
208
208
|
children: [
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ jsxs(
|
|
210
210
|
"span",
|
|
211
211
|
{
|
|
212
|
-
|
|
212
|
+
"aria-hidden": "true",
|
|
213
|
+
className: "pointer-events-none absolute inset-0 overflow-hidden",
|
|
213
214
|
style: { maskImage: LEFT_FADE, WebkitMaskImage: LEFT_FADE },
|
|
214
215
|
children: [
|
|
216
|
+
/* @__PURE__ */ jsx2("span", { className: "absolute inset-0", style: { backgroundImage: GLOW } }),
|
|
215
217
|
HILLS.map((hill) => /* @__PURE__ */ jsx2(
|
|
216
218
|
"span",
|
|
217
219
|
{
|
|
@@ -223,13 +225,12 @@ var AnnouncementCard = React2.forwardRef(
|
|
|
223
225
|
}
|
|
224
226
|
},
|
|
225
227
|
hill.id
|
|
226
|
-
))
|
|
227
|
-
/* @__PURE__ */ jsx2("span", { className: "absolute inset-0", style: { backgroundImage: GLOW } })
|
|
228
|
+
))
|
|
228
229
|
]
|
|
229
230
|
}
|
|
230
|
-
)
|
|
231
|
-
/* @__PURE__ */ jsxs("span", { className: "relative flex min-w-0 flex-1 flex-col gap-
|
|
232
|
-
/* @__PURE__ */ jsx2("span", { className: "truncate text-body-md font-weight-heading-
|
|
231
|
+
),
|
|
232
|
+
/* @__PURE__ */ jsxs("span", { className: "relative flex min-w-0 flex-1 flex-col gap-xs", children: [
|
|
233
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate text-body-md font-weight-heading-md text-ink", children: title }),
|
|
233
234
|
subtitle && /* @__PURE__ */ jsx2("span", { className: "truncate text-caption text-muted", children: subtitle })
|
|
234
235
|
] }),
|
|
235
236
|
icon && /* @__PURE__ */ jsx2(
|
package/package.json
CHANGED
|
@@ -35,49 +35,56 @@ const cardBase =
|
|
|
35
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
36
|
|
|
37
37
|
/**
|
|
38
|
-
* The illustration dissolves toward the copy:
|
|
39
|
-
*
|
|
38
|
+
* The illustration dissolves toward the copy: fully transparent across the copy
|
|
39
|
+
* column, then a long slow ramp. Nothing opaque appears before ~62% of the width, so
|
|
40
|
+
* the title and subtitle always read on plain white — on a narrow rail and on a wide
|
|
41
|
+
* card alike.
|
|
40
42
|
*/
|
|
41
43
|
const LEFT_FADE =
|
|
42
|
-
"linear-gradient(to right, transparent
|
|
44
|
+
"linear-gradient(to right, transparent 56%, color-mix(in srgb, black 18%, transparent) 66%, color-mix(in srgb, black 62%, transparent) 78%, black 90%)";
|
|
43
45
|
|
|
44
46
|
/**
|
|
45
|
-
* The warm corner wash
|
|
46
|
-
*
|
|
47
|
-
*
|
|
47
|
+
* The warm corner wash — peach at the top-right corner drifting through pink on its
|
|
48
|
+
* way down. Painted as the bottom layer, so the hills stay saturated and the wash
|
|
49
|
+
* only shows on the near-white field above their crests.
|
|
48
50
|
*/
|
|
49
51
|
const GLOW =
|
|
50
|
-
"radial-gradient(
|
|
52
|
+
"radial-gradient(62% 54% at 100% -18%, var(--color-promo-glow) 0%, color-mix(in srgb, var(--color-promo-glow-pink) 62%, transparent) 48%, transparent 88%)";
|
|
51
53
|
|
|
52
54
|
interface Hill {
|
|
53
55
|
id: string;
|
|
54
56
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* sweeps along the bottom-left like the reference.
|
|
57
|
+
* One very wide ellipse whose centre sits below the card, so only its gently
|
|
58
|
+
* curved crest falls inside and the flanks sink out of the bottom edge — a rolling
|
|
59
|
+
* hill, never a diagonal sweep. Each crest height is quoted in the layer comments.
|
|
59
60
|
*/
|
|
60
61
|
shape: string;
|
|
61
62
|
/** Vertical shading within the hill, so each layer falls off toward its base. */
|
|
62
63
|
fill: string;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
|
-
/**
|
|
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
|
+
*/
|
|
66
73
|
const HILLS: Hill[] = [
|
|
67
74
|
{
|
|
68
|
-
id: "
|
|
69
|
-
shape: "radial-gradient(
|
|
70
|
-
fill: "linear-gradient(
|
|
75
|
+
id: "violet",
|
|
76
|
+
shape: "radial-gradient(48% 80% at 76% 122%, black 0 98.6%, transparent 100%)",
|
|
77
|
+
fill: "linear-gradient(188deg, var(--color-promo-hill-mid) 0%, var(--color-promo-hill-mid-deep) 88%)",
|
|
71
78
|
},
|
|
72
79
|
{
|
|
73
|
-
id: "
|
|
74
|
-
shape: "radial-gradient(
|
|
75
|
-
fill: "linear-gradient(
|
|
80
|
+
id: "indigo",
|
|
81
|
+
shape: "radial-gradient(32% 100% at 100% 130%, black 0 98.6%, transparent 100%)",
|
|
82
|
+
fill: "linear-gradient(190deg, var(--color-promo-hill-back) 0%, var(--color-promo-hill-back-deep) 90%)",
|
|
76
83
|
},
|
|
77
84
|
{
|
|
78
|
-
id: "
|
|
79
|
-
shape: "radial-gradient(
|
|
80
|
-
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep)
|
|
85
|
+
id: "cyan",
|
|
86
|
+
shape: "radial-gradient(38% 68% at 54% 136%, black 0 98.6%, transparent 100%)",
|
|
87
|
+
fill: "linear-gradient(to bottom, var(--color-promo-hill-front) 0%, var(--color-promo-hill-front-deep) 92%)",
|
|
81
88
|
},
|
|
82
89
|
];
|
|
83
90
|
|
|
@@ -99,35 +106,34 @@ export const AnnouncementCard = React.forwardRef<HTMLAnchorElement, Announcement
|
|
|
99
106
|
aria-label={subtitle ? `${eyebrow}: ${title} — ${subtitle}` : `${eyebrow}: ${title}`}
|
|
100
107
|
className={cn(
|
|
101
108
|
cardBase,
|
|
102
|
-
"items-center gap-
|
|
109
|
+
"items-center gap-md bg-canvas py-base pl-md pr-sm shadow-card",
|
|
103
110
|
"hover:-translate-y-px hover:shadow-md active:translate-y-0 motion-reduce:transition-none motion-reduce:hover:translate-y-0",
|
|
104
111
|
className,
|
|
105
112
|
)}
|
|
106
113
|
>
|
|
107
|
-
{/* Decorative illustration only:
|
|
108
|
-
|
|
109
|
-
<span
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
</span>
|
|
114
|
+
{/* Decorative illustration only: one masked layer, so the hills and the glow
|
|
115
|
+
both dissolve well before they reach the copy. */}
|
|
116
|
+
<span
|
|
117
|
+
aria-hidden="true"
|
|
118
|
+
className="pointer-events-none absolute inset-0 overflow-hidden"
|
|
119
|
+
style={{ maskImage: LEFT_FADE, WebkitMaskImage: LEFT_FADE }}
|
|
120
|
+
>
|
|
121
|
+
<span className="absolute inset-0" style={{ backgroundImage: GLOW }} />
|
|
122
|
+
{HILLS.map((hill) => (
|
|
123
|
+
<span
|
|
124
|
+
key={hill.id}
|
|
125
|
+
className="absolute inset-0"
|
|
126
|
+
style={{
|
|
127
|
+
backgroundImage: hill.fill,
|
|
128
|
+
maskImage: hill.shape,
|
|
129
|
+
WebkitMaskImage: hill.shape,
|
|
130
|
+
}}
|
|
131
|
+
/>
|
|
132
|
+
))}
|
|
127
133
|
</span>
|
|
128
134
|
|
|
129
|
-
<span className="relative flex min-w-0 flex-1 flex-col gap-
|
|
130
|
-
<span className="truncate text-body-md font-weight-heading-
|
|
135
|
+
<span className="relative flex min-w-0 flex-1 flex-col gap-xs">
|
|
136
|
+
<span className="truncate text-body-md font-weight-heading-md text-ink">{title}</span>
|
|
131
137
|
{subtitle && <span className="truncate text-caption text-muted">{subtitle}</span>}
|
|
132
138
|
</span>
|
|
133
139
|
|
|
@@ -7,7 +7,35 @@ export default function Preview() {
|
|
|
7
7
|
return (
|
|
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
|
-
<p className="text-caption text-muted">
|
|
10
|
+
<p className="text-caption text-muted">
|
|
11
|
+
Promo in the rail — hills stay low and to the right, copy sits on clean white
|
|
12
|
+
</p>
|
|
13
|
+
{/* Rail frame only: fixed width so the card is judged at its real sidebar size. */}
|
|
14
|
+
<div className="space-y-sm" style={{ width: "256px" }}>
|
|
15
|
+
<AnnouncementCard
|
|
16
|
+
variant="promo"
|
|
17
|
+
eyebrow="Plan"
|
|
18
|
+
title="Upgrade to Pro"
|
|
19
|
+
subtitle="Unlock more features"
|
|
20
|
+
icon="crown"
|
|
21
|
+
href="#upgrade"
|
|
22
|
+
onClick={() => setClicks((n) => n + 1)}
|
|
23
|
+
/>
|
|
24
|
+
<AnnouncementCard
|
|
25
|
+
variant="promo"
|
|
26
|
+
eyebrow="Credits"
|
|
27
|
+
title="Add credits"
|
|
28
|
+
subtitle="Top up when you run low"
|
|
29
|
+
icon="zap"
|
|
30
|
+
href="#credits"
|
|
31
|
+
onClick={() => setClicks((n) => n + 1)}
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
<p className="text-caption text-muted">Click handled: {clicks}</p>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div className="space-y-sm">
|
|
38
|
+
<p className="text-caption text-muted">Promo at full width</p>
|
|
11
39
|
<AnnouncementCard
|
|
12
40
|
variant="promo"
|
|
13
41
|
eyebrow="Plan"
|
|
@@ -17,7 +45,6 @@ export default function Preview() {
|
|
|
17
45
|
href="#upgrade"
|
|
18
46
|
onClick={() => setClicks((n) => n + 1)}
|
|
19
47
|
/>
|
|
20
|
-
<p className="text-caption text-muted">Click handled: {clicks}</p>
|
|
21
48
|
</div>
|
|
22
49
|
|
|
23
50
|
<div className="space-y-sm">
|