barua-ui 0.8.1 → 0.9.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/css/components/content.css +8 -0
- package/css/components/marketing.css +126 -0
- package/css/tokens.css +7 -2
- package/dist/index.cjs +42 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -117,6 +117,14 @@
|
|
|
117
117
|
.b-card--flush .b-card__body { padding: 0; }
|
|
118
118
|
.b-card--flush .b-list { border: none; border-radius: 0; box-shadow: none; }
|
|
119
119
|
|
|
120
|
+
/* A card in a grid already stretches to the row's height; its body does not,
|
|
121
|
+
so a stack inside stops where its content stops and the button at the end
|
|
122
|
+
lands wherever the copy above happened to finish. Three prices with three
|
|
123
|
+
different feature lists gave three different buttons. --fill hands the
|
|
124
|
+
height down, so a .b-spacer inside pins the last row to the floor. */
|
|
125
|
+
.b-card--fill { display: flex; flex-direction: column; }
|
|
126
|
+
.b-card--fill > .b-card__body { flex: 1 1 auto; }
|
|
127
|
+
|
|
120
128
|
.b-card__art {
|
|
121
129
|
width: 4rem;
|
|
122
130
|
height: 4rem;
|
|
@@ -81,6 +81,10 @@
|
|
|
81
81
|
justify-content: center;
|
|
82
82
|
margin-block-start: var(--b-space-6);
|
|
83
83
|
}
|
|
84
|
+
/* What a chapter shows under its words: a rail of cards, a grid, a picture.
|
|
85
|
+
Same standoff as the actions row, so a chapter with cards and a chapter
|
|
86
|
+
with buttons breathe alike. */
|
|
87
|
+
.b-chapter__media { margin-block-start: var(--b-space-8); text-align: start; }
|
|
84
88
|
.b-chapter--start .b-chapter__actions { justify-content: flex-start; }
|
|
85
89
|
.b-feature-row .b-chapter__actions { justify-content: flex-start; margin-block-start: var(--b-space-5); }
|
|
86
90
|
|
|
@@ -166,6 +170,128 @@
|
|
|
166
170
|
.b-rating__stars .b-icon { width: 0.95rem; height: 0.95rem; fill: currentColor; }
|
|
167
171
|
.b-rating__stars .is-empty { color: var(--b-fill); }
|
|
168
172
|
|
|
173
|
+
/* ---- Marquee: a row that keeps moving ------------------------------------
|
|
174
|
+
For a line of marks too long to stand still: logos, integrations, the
|
|
175
|
+
names a product works with. The track holds the list TWICE and travels
|
|
176
|
+
exactly half its width, which is what makes the loop seamless; with one
|
|
177
|
+
copy it visibly snaps. It pauses under the pointer so a name can be read,
|
|
178
|
+
and it stops entirely for anyone who asked for less motion, where it
|
|
179
|
+
becomes an ordinary scrolling row instead. --b-marquee-time is the pace. */
|
|
180
|
+
.b-marquee {
|
|
181
|
+
overflow: hidden;
|
|
182
|
+
-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
|
|
183
|
+
mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
|
|
184
|
+
}
|
|
185
|
+
.b-marquee__track {
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
|
|
189
|
+
width: max-content;
|
|
190
|
+
animation: b-marquee var(--b-marquee-time, 40s) linear infinite;
|
|
191
|
+
}
|
|
192
|
+
.b-marquee:hover .b-marquee__track { animation-play-state: paused; }
|
|
193
|
+
@keyframes b-marquee { to { translate: -50% 0; } }
|
|
194
|
+
@media (prefers-reduced-motion: reduce) {
|
|
195
|
+
.b-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
|
|
196
|
+
.b-marquee__track { animation: none; }
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* ---- Quote card: a number, a sentence, and who said it -------------------
|
|
200
|
+
The shape a case study takes on a product page. The figure leads because
|
|
201
|
+
it is what gets remembered, the sentence earns it, and the name is what
|
|
202
|
+
makes either believable. On the accent by default, because this is the
|
|
203
|
+
one card on the page that is meant to interrupt. */
|
|
204
|
+
.b-quote-card {
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
gap: var(--b-space-6);
|
|
208
|
+
padding: clamp(var(--b-space-6), 4vw, var(--b-space-10));
|
|
209
|
+
color: var(--b-color-on-accent);
|
|
210
|
+
background: var(--b-color-accent);
|
|
211
|
+
border-radius: var(--b-radius-2xl);
|
|
212
|
+
color-scheme: dark;
|
|
213
|
+
}
|
|
214
|
+
.b-quote-card__head {
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-wrap: wrap;
|
|
217
|
+
align-items: baseline;
|
|
218
|
+
justify-content: space-between;
|
|
219
|
+
gap: var(--b-space-4);
|
|
220
|
+
}
|
|
221
|
+
.b-quote-card__stat {
|
|
222
|
+
font-size: clamp(2.5rem, 6vw, 4rem);
|
|
223
|
+
font-weight: var(--b-weight-bold);
|
|
224
|
+
letter-spacing: var(--b-tracking-tight);
|
|
225
|
+
line-height: 1;
|
|
226
|
+
}
|
|
227
|
+
.b-quote-card__stat-label { font-size: var(--b-text-footnote); opacity: 0.75; }
|
|
228
|
+
.b-quote-card__quote {
|
|
229
|
+
/* The base layer gives every blockquote a quieter ink and a rule, which is
|
|
230
|
+
right in prose and wrong here: on the accent it renders as dark text on
|
|
231
|
+
a saturated field. The card owns its own colour, so the quote takes it. */
|
|
232
|
+
margin: 0;
|
|
233
|
+
padding: 0;
|
|
234
|
+
border: 0;
|
|
235
|
+
color: inherit;
|
|
236
|
+
font-size: clamp(1.125rem, 2vw, 1.5rem);
|
|
237
|
+
line-height: var(--b-leading-snug);
|
|
238
|
+
text-wrap: pretty;
|
|
239
|
+
}
|
|
240
|
+
.b-quote-card__name { font-weight: var(--b-weight-semibold); }
|
|
241
|
+
.b-quote-card__role { font-size: var(--b-text-footnote); opacity: 0.75; }
|
|
242
|
+
|
|
243
|
+
/* ---- Resource card: something to go and read ----------------------------
|
|
244
|
+
A picture, what kind of thing it is, and enough of the first line to
|
|
245
|
+
decide. The whole card is the link, and the plate stands in when there is
|
|
246
|
+
no picture, so a row of three never has a hole in it. */
|
|
247
|
+
.b-resource-card {
|
|
248
|
+
display: flex;
|
|
249
|
+
flex-direction: column;
|
|
250
|
+
overflow: hidden;
|
|
251
|
+
color: inherit;
|
|
252
|
+
text-decoration: none;
|
|
253
|
+
background: var(--b-surface);
|
|
254
|
+
border: 1px solid var(--b-separator);
|
|
255
|
+
border-radius: var(--b-radius-xl);
|
|
256
|
+
transition: translate var(--b-duration-normal) var(--b-ease-out), box-shadow var(--b-duration-normal);
|
|
257
|
+
}
|
|
258
|
+
.b-resource-card:hover { text-decoration: none; }
|
|
259
|
+
@media (hover: hover) {
|
|
260
|
+
.b-resource-card:hover { translate: 0 -2px; box-shadow: var(--b-elevation-3); }
|
|
261
|
+
}
|
|
262
|
+
.b-resource-card__poster {
|
|
263
|
+
position: relative;
|
|
264
|
+
aspect-ratio: 16 / 9;
|
|
265
|
+
display: grid;
|
|
266
|
+
place-items: center;
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
background: color-mix(in srgb, var(--b-color-accent) 14%, var(--b-fill-tertiary));
|
|
269
|
+
}
|
|
270
|
+
/* A picture fills the plate. A glyph is not a picture: stretched to the same
|
|
271
|
+
rule it became a two-hundred-pixel sparkle, which is how a stand-in ends up
|
|
272
|
+
louder than the thing it stands in for. It keeps a glyph's size and the
|
|
273
|
+
plate's quieter ink instead. */
|
|
274
|
+
.b-resource-card__poster > img { width: 100%; height: 100%; object-fit: cover; }
|
|
275
|
+
.b-resource-card__poster > svg,
|
|
276
|
+
.b-resource-card__poster > :not(img):not(.b-resource-card__type) svg {
|
|
277
|
+
width: var(--b-space-12);
|
|
278
|
+
height: var(--b-space-12);
|
|
279
|
+
color: color-mix(in srgb, var(--b-color-accent) 55%, var(--b-text-tertiary));
|
|
280
|
+
}
|
|
281
|
+
.b-resource-card__type {
|
|
282
|
+
position: absolute;
|
|
283
|
+
inset-block-start: var(--b-space-3);
|
|
284
|
+
inset-inline-start: var(--b-space-3);
|
|
285
|
+
}
|
|
286
|
+
.b-resource-card__body {
|
|
287
|
+
display: flex;
|
|
288
|
+
flex-direction: column;
|
|
289
|
+
gap: var(--b-space-2);
|
|
290
|
+
padding: var(--b-space-4);
|
|
291
|
+
}
|
|
292
|
+
.b-resource-card__title { font-weight: var(--b-weight-semibold); line-height: var(--b-leading-snug); }
|
|
293
|
+
.b-resource-card__excerpt { font-size: var(--b-text-footnote); color: var(--b-text-secondary); }
|
|
294
|
+
|
|
169
295
|
/* ---- Logo wall: the companies already here ------------------------------- */
|
|
170
296
|
/* A quiet row, evenly spaced, every mark the same height whatever its
|
|
171
297
|
proportions — which is the only way a wall of logos looks deliberate
|
package/css/tokens.css
CHANGED
|
@@ -11,8 +11,13 @@
|
|
|
11
11
|
declaration sits on, so re-declaring them here is what lets a subtree be
|
|
12
12
|
light inside a dark page — a marketing page in a dark product, a preview
|
|
13
13
|
pane, a customer's site. Without it, data-theme on anything but the root
|
|
14
|
-
only changed color-scheme and the tokens stayed as the root resolved them.
|
|
15
|
-
|
|
14
|
+
only changed color-scheme and the tokens stayed as the root resolved them.
|
|
15
|
+
|
|
16
|
+
.b-chapter--dark is in the list for the same reason: a chapter that inverts
|
|
17
|
+
IS a themed subtree, and flipping its color-scheme alone left every token
|
|
18
|
+
inside still resolved against the page it sits in, so the dark band came
|
|
19
|
+
out light. Naming it here keeps one copy of the token block. */
|
|
20
|
+
:root, [data-theme], .b-chapter--dark {
|
|
16
21
|
color-scheme: light dark;
|
|
17
22
|
|
|
18
23
|
/* ------------------------------------------------------------------ *
|
package/dist/index.cjs
CHANGED
|
@@ -194,6 +194,8 @@ __export(index_exports, {
|
|
|
194
194
|
MarketingNav: () => MarketingNav,
|
|
195
195
|
MarketingNavBrand: () => MarketingNavBrand,
|
|
196
196
|
MarketingNavLinks: () => MarketingNavLinks,
|
|
197
|
+
Marquee: () => Marquee,
|
|
198
|
+
MarqueeTrack: () => MarqueeTrack,
|
|
197
199
|
MediaPlaceholder: () => MediaPlaceholder,
|
|
198
200
|
Menu: () => Menu,
|
|
199
201
|
MenuBar: () => MenuBar,
|
|
@@ -224,6 +226,13 @@ __export(index_exports, {
|
|
|
224
226
|
Progress: () => Progress,
|
|
225
227
|
PromoBand: () => PromoBand,
|
|
226
228
|
Quote: () => Quote,
|
|
229
|
+
QuoteCard: () => QuoteCard,
|
|
230
|
+
QuoteCardHead: () => QuoteCardHead,
|
|
231
|
+
QuoteCardName: () => QuoteCardName,
|
|
232
|
+
QuoteCardQuote: () => QuoteCardQuote,
|
|
233
|
+
QuoteCardRole: () => QuoteCardRole,
|
|
234
|
+
QuoteCardStat: () => QuoteCardStat,
|
|
235
|
+
QuoteCardStatLabel: () => QuoteCardStatLabel,
|
|
227
236
|
RadarChart: () => RadarChart,
|
|
228
237
|
Radio: () => Radio,
|
|
229
238
|
Rail: () => Rail,
|
|
@@ -233,6 +242,11 @@ __export(index_exports, {
|
|
|
233
242
|
RatingStars: () => RatingStars,
|
|
234
243
|
Resizable: () => Resizable,
|
|
235
244
|
ResizeHandle: () => ResizeHandle,
|
|
245
|
+
ResourceCard: () => ResourceCard,
|
|
246
|
+
ResourceCardBody: () => ResourceCardBody,
|
|
247
|
+
ResourceCardExcerpt: () => ResourceCardExcerpt,
|
|
248
|
+
ResourceCardPoster: () => ResourceCardPoster,
|
|
249
|
+
ResourceCardTitle: () => ResourceCardTitle,
|
|
236
250
|
Result: () => Result,
|
|
237
251
|
Reveal: () => Reveal,
|
|
238
252
|
SafeArea: () => SafeArea,
|
|
@@ -2301,6 +2315,20 @@ var Rating = block("p", "b-rating", "Rating");
|
|
|
2301
2315
|
var RatingStars = block("span", "b-rating__stars", "RatingStars");
|
|
2302
2316
|
var LogoWall = block("div", "b-logo-wall", "LogoWall");
|
|
2303
2317
|
var LogoWallLogo = block("span", "b-logo-wall__logo", "LogoWallLogo");
|
|
2318
|
+
var Marquee = block("div", "b-marquee", "Marquee");
|
|
2319
|
+
var MarqueeTrack = block("div", "b-marquee__track", "MarqueeTrack");
|
|
2320
|
+
var QuoteCard = block("article", "b-quote-card", "QuoteCard");
|
|
2321
|
+
var QuoteCardHead = block("div", "b-quote-card__head", "QuoteCardHead");
|
|
2322
|
+
var QuoteCardStat = block("p", "b-quote-card__stat", "QuoteCardStat");
|
|
2323
|
+
var QuoteCardStatLabel = block("p", "b-quote-card__stat-label", "QuoteCardStatLabel");
|
|
2324
|
+
var QuoteCardQuote = block("blockquote", "b-quote-card__quote", "QuoteCardQuote");
|
|
2325
|
+
var QuoteCardName = block("p", "b-quote-card__name", "QuoteCardName");
|
|
2326
|
+
var QuoteCardRole = block("p", "b-quote-card__role", "QuoteCardRole");
|
|
2327
|
+
var ResourceCard = block("a", "b-resource-card", "ResourceCard");
|
|
2328
|
+
var ResourceCardPoster = block("div", "b-resource-card__poster", "ResourceCardPoster");
|
|
2329
|
+
var ResourceCardBody = block("div", "b-resource-card__body", "ResourceCardBody");
|
|
2330
|
+
var ResourceCardTitle = block("p", "b-resource-card__title", "ResourceCardTitle");
|
|
2331
|
+
var ResourceCardExcerpt = block("p", "b-resource-card__excerpt", "ResourceCardExcerpt");
|
|
2304
2332
|
|
|
2305
2333
|
// src/system.tsx
|
|
2306
2334
|
var import_react17 = require("react");
|
|
@@ -3099,6 +3127,8 @@ function usePersistedState(key, initial) {
|
|
|
3099
3127
|
MarketingNav,
|
|
3100
3128
|
MarketingNavBrand,
|
|
3101
3129
|
MarketingNavLinks,
|
|
3130
|
+
Marquee,
|
|
3131
|
+
MarqueeTrack,
|
|
3102
3132
|
MediaPlaceholder,
|
|
3103
3133
|
Menu,
|
|
3104
3134
|
MenuBar,
|
|
@@ -3129,6 +3159,13 @@ function usePersistedState(key, initial) {
|
|
|
3129
3159
|
Progress,
|
|
3130
3160
|
PromoBand,
|
|
3131
3161
|
Quote,
|
|
3162
|
+
QuoteCard,
|
|
3163
|
+
QuoteCardHead,
|
|
3164
|
+
QuoteCardName,
|
|
3165
|
+
QuoteCardQuote,
|
|
3166
|
+
QuoteCardRole,
|
|
3167
|
+
QuoteCardStat,
|
|
3168
|
+
QuoteCardStatLabel,
|
|
3132
3169
|
RadarChart,
|
|
3133
3170
|
Radio,
|
|
3134
3171
|
Rail,
|
|
@@ -3138,6 +3175,11 @@ function usePersistedState(key, initial) {
|
|
|
3138
3175
|
RatingStars,
|
|
3139
3176
|
Resizable,
|
|
3140
3177
|
ResizeHandle,
|
|
3178
|
+
ResourceCard,
|
|
3179
|
+
ResourceCardBody,
|
|
3180
|
+
ResourceCardExcerpt,
|
|
3181
|
+
ResourceCardPoster,
|
|
3182
|
+
ResourceCardTitle,
|
|
3141
3183
|
Result,
|
|
3142
3184
|
Reveal,
|
|
3143
3185
|
SafeArea,
|