barua-ui 0.9.2 → 0.11.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.
@@ -39,6 +39,20 @@
39
39
  border-block-end: 1px solid var(--b-hairline);
40
40
  }
41
41
  .b-marketing-nav__brand { font-weight: var(--b-weight-semibold); font-size: var(--b-text-subheadline); }
42
+ /* The confident bar. A 2.75rem strip of caption type is right above an
43
+ application, where the chrome should get out of the way; on a front page
44
+ it reads as a browser toolbar somebody forgot to style. --lg gives it the
45
+ height, the type size and the room that say this is the top of a company,
46
+ and the action on the right is a filled pill rather than a link. */
47
+ .b-marketing-nav--lg {
48
+ height: 4rem;
49
+ gap: var(--b-space-6);
50
+ padding-inline: clamp(var(--b-space-4), 3vw, var(--b-space-10));
51
+ font-size: var(--b-text-subheadline);
52
+ }
53
+ .b-marketing-nav--lg .b-marketing-nav__brand { font-size: var(--b-text-title3); }
54
+ .b-marketing-nav--lg .b-marketing-nav__links { gap: clamp(var(--b-space-4), 2.4vw, var(--b-space-8)); }
55
+ .b-marketing-nav--lg a { font-weight: var(--b-weight-medium); }
42
56
  .b-marketing-nav__links { display: flex; gap: var(--b-space-5); margin-inline: auto; }
43
57
  .b-marketing-nav a { color: var(--b-text-secondary); text-decoration: none; }
44
58
  .b-marketing-nav a:hover { color: var(--b-text); }
@@ -183,28 +197,54 @@
183
197
 
184
198
  /* ---- Marquee: a row that keeps moving ------------------------------------
185
199
  For a line of marks too long to stand still: logos, integrations, the
186
- names a product works with. The track holds the list TWICE and travels
187
- exactly half its width, which is what makes the loop seamless; with one
188
- copy it visibly snaps. It pauses under the pointer so a name can be read,
189
- and it stops entirely for anyone who asked for less motion, where it
190
- becomes an ordinary scrolling row instead. --b-marquee-time is the pace. */
200
+ names a product works with.
201
+
202
+ The track holds the list TWICE inside two .b-marquee__group elements and
203
+ travels exactly half its width, which puts group two where group one
204
+ started: that is what makes the loop seamless, and with one copy it
205
+ visibly snaps.
206
+
207
+ The groups exist because "twice" is not enough on its own. Half the track
208
+ is one group, so the loop is only seamless if a group is at least as wide
209
+ as the rail; seven short names in a 1280px row leave the second copy
210
+ ending early and a hole travelling along behind it. Each group is
211
+ therefore floored at the rail's own width and spaces its contents out to
212
+ fill it, so the belt is solid at any width with any number of names, and
213
+ when the list IS wider than the rail max-content wins and nothing changes.
214
+
215
+ It pauses under the pointer so a name can be read, and it stops entirely
216
+ for anyone who asked for less motion, where it becomes an ordinary
217
+ scrolling row instead. --b-marquee-time is the pace. */
191
218
  .b-marquee {
192
219
  overflow: hidden;
220
+ /* The floor a group measures itself against. */
221
+ container-type: inline-size;
193
222
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
194
223
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
195
224
  }
196
225
  .b-marquee__track {
197
226
  display: flex;
198
227
  align-items: center;
199
- gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
200
228
  width: max-content;
201
229
  animation: b-marquee var(--b-marquee-time, 40s) linear infinite;
202
230
  }
231
+ .b-marquee__group {
232
+ display: flex;
233
+ flex: none;
234
+ align-items: center;
235
+ justify-content: space-around;
236
+ gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
237
+ min-width: 100cqi;
238
+ /* Half the gap on each end, so the seam between the two groups is spaced
239
+ exactly like the gaps inside one. */
240
+ padding-inline: clamp(var(--b-space-3), 2.5vw, var(--b-space-6));
241
+ }
203
242
  .b-marquee:hover .b-marquee__track { animation-play-state: paused; }
204
243
  @keyframes b-marquee { to { translate: -50% 0; } }
205
244
  @media (prefers-reduced-motion: reduce) {
206
245
  .b-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
207
246
  .b-marquee__track { animation: none; }
247
+ .b-marquee__group { min-width: 0; }
208
248
  }
209
249
 
210
250
  /* ---- Quote card: a number, a sentence, and who said it -------------------
@@ -377,18 +417,187 @@
377
417
  .b-feature-row { grid-template-columns: 1fr 1fr; }
378
418
  .b-feature-row--flip > :first-child { order: 2; }
379
419
  }
420
+ /* Centred is right when the row is a picture beside prose, and wrong when it
421
+ is a headline beside a list of ten things: the headline drifts to the
422
+ middle of a tall column and stops looking like the title of what is next
423
+ to it. --top puts both columns on the same line. */
424
+ .b-feature-row--top { align-items: start; }
380
425
  .b-feature-row__title {
381
426
  font-size: clamp(1.5rem, 3vw, 2.25rem);
382
427
  font-weight: var(--b-weight-semibold);
383
428
  line-height: var(--b-leading-tight);
384
429
  letter-spacing: var(--b-tracking-tight);
385
430
  }
431
+ /* A feature row's headline at section scale. The base size is a subhead for
432
+ a row of three; when the row IS the chapter, it carries the chapter's
433
+ weight. */
434
+ .b-feature-row__title--lg {
435
+ font-size: clamp(2.25rem, 4.6vw, 3.5rem);
436
+ font-weight: var(--b-weight-bold);
437
+ line-height: 1.06;
438
+ }
386
439
  .b-feature-row__body {
387
440
  margin-block-start: var(--b-space-3);
388
441
  color: var(--b-text-secondary);
389
442
  line-height: var(--b-leading-body);
390
443
  }
391
444
 
445
+ /* ---- The marketing page's louder half ------------------------------------
446
+ Everything above this line is the quiet version of a product page. What
447
+ follows is the confident one: type that is large enough to be read across
448
+ a room, a ground that changes between chapters so the page has floors, and
449
+ an accent used at full strength instead of apologetically. A landing page
450
+ is not an application, and the restraint that makes a toolbar good makes a
451
+ front page forgettable. */
452
+
453
+ /* Highlight marker.
454
+ The one word in a headline that carries the sentence, on a block of
455
+ accent. It sits behind the letters rather than around them: a box-shadow
456
+ spread gives the marker its bleed without the inline padding that would
457
+ break the line's rhythm, and box-decoration-break keeps it whole when the
458
+ phrase wraps to a second line. */
459
+ .b-mark {
460
+ color: var(--b-text);
461
+ /* --b-color-accent-soft is a component's fill and reads as almost nothing
462
+ at headline size; a marker has to be visible from across the room. */
463
+ --b-mark-ground: color-mix(in srgb, var(--b-color-accent) 24%, var(--b-bg));
464
+ background: var(--b-mark-ground);
465
+ box-shadow: 0.24em 0 0 var(--b-mark-ground), -0.24em 0 0 var(--b-mark-ground);
466
+ -webkit-box-decoration-break: clone;
467
+ box-decoration-break: clone;
468
+ border-radius: 0.08em;
469
+ }
470
+
471
+ /* A chapter on a tinted ground.
472
+ Alternating white and a wash of the accent is what gives a long page
473
+ floors you can feel without a single rule or border. The wash is mixed
474
+ from the accent so it follows a brand colour, and it is deliberately
475
+ weaker than --b-color-accent-soft, which is a component's fill, not a
476
+ room's paint. */
477
+ .b-chapter--tint { background: color-mix(in srgb, var(--b-color-accent) 7%, var(--b-bg)); }
478
+
479
+ /* Showcase: the product on a panel, not on the page.
480
+ A screenshot dropped on white reads as a document. Inside a large rounded
481
+ panel of colour it reads as a product, because the panel gives it an edge
482
+ and a shadow to sit against, and the page gets one block of brand at the
483
+ point a visitor is deciding whether to keep reading. */
484
+ .b-showcase {
485
+ position: relative;
486
+ display: grid;
487
+ gap: var(--b-space-6);
488
+ padding: clamp(var(--b-space-6), 4vw, var(--b-space-10));
489
+ background: linear-gradient(135deg,
490
+ var(--b-color-accent),
491
+ color-mix(in srgb, var(--b-color-accent) 78%, var(--b-color-indigo, #4f46e5)));
492
+ border-radius: clamp(var(--b-radius-lg), 2.5vw, 2rem);
493
+ overflow: hidden;
494
+ }
495
+ /* The faint diamonds that stop a large flat panel from looking like a
496
+ rectangle of paint. Two rotated gradients, nothing to load. */
497
+ .b-showcase::before {
498
+ content: "";
499
+ position: absolute;
500
+ inset: -20%;
501
+ background:
502
+ linear-gradient(135deg, transparent 38%, rgba(255, 255, 255, 0.07) 38% 62%, transparent 62%),
503
+ linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.05) 40% 60%, transparent 60%);
504
+ background-size: 46% 46%, 62% 62%;
505
+ pointer-events: none;
506
+ }
507
+ .b-showcase > * { position: relative; }
508
+ .b-showcase__shot {
509
+ border-radius: var(--b-radius-lg);
510
+ box-shadow: var(--b-shadow-lg);
511
+ overflow: hidden;
512
+ }
513
+ .b-showcase__shot img { display: block; width: 100%; }
514
+ @media (min-width: 900px) {
515
+ /* Wide, the panel becomes a stage: the product takes the room and the card
516
+ overlaps its right edge, which is the whole reason the panel is bigger
517
+ than the picture it holds. */
518
+ .b-showcase { grid-template-columns: minmax(0, 1.55fr) minmax(16rem, 0.85fr); align-items: center; }
519
+ }
520
+
521
+ /* The card that floats on the showcase: three numbers and what they mean. */
522
+ .b-stat-card {
523
+ padding: clamp(var(--b-space-5), 2.5vw, var(--b-space-8));
524
+ background: var(--b-surface);
525
+ border-radius: var(--b-radius-lg);
526
+ box-shadow: var(--b-shadow-lg);
527
+ }
528
+ .b-stat-card__title {
529
+ font-size: clamp(1.6rem, 2.6vw, 2.25rem);
530
+ font-weight: var(--b-weight-bold);
531
+ line-height: 1.1;
532
+ letter-spacing: var(--b-tracking-tight);
533
+ }
534
+ .b-stat-card__rows { display: flex; flex-direction: column; margin-block-start: var(--b-space-5); }
535
+ .b-stat-card__row {
536
+ display: flex;
537
+ align-items: flex-start;
538
+ gap: var(--b-space-4);
539
+ padding-block: var(--b-space-4);
540
+ }
541
+ .b-stat-card__row + .b-stat-card__row { border-block-start: 1px solid var(--b-separator); }
542
+ .b-stat-card__figure {
543
+ display: block;
544
+ font-size: var(--b-text-title2);
545
+ font-weight: var(--b-weight-bold);
546
+ letter-spacing: var(--b-tracking-tight);
547
+ line-height: 1.1;
548
+ }
549
+ .b-stat-card__label { display: block; font-size: var(--b-text-footnote); color: var(--b-text-secondary); }
550
+
551
+ /* Logos on cards.
552
+ A bare row of wordmarks reads as text. On individual white plates they
553
+ read as the companies they stand for, which is the whole point of showing
554
+ them. Same wall, one modifier. */
555
+ .b-logo-wall--cards { gap: var(--b-space-4); }
556
+ .b-logo-wall--cards .b-logo-wall__logo {
557
+ height: auto;
558
+ padding: var(--b-space-4) var(--b-space-6);
559
+ font-size: var(--b-text-callout);
560
+ color: var(--b-text);
561
+ background: var(--b-surface);
562
+ border-radius: var(--b-radius-md);
563
+ box-shadow: var(--b-shadow-sm);
564
+ opacity: 1;
565
+ }
566
+
567
+ /* An accordion with no box around it.
568
+ The card version belongs in an application, where a group needs an edge to
569
+ separate it from the rest of the screen. On a marketing page the questions
570
+ are the only thing in their column, so the chrome is noise: hairlines
571
+ between rows, a circled mark on the right, and the open row lifted onto a
572
+ quiet fill so you can see where you are. */
573
+ .b-accordion--plain { background: none; border: 0; border-radius: 0; overflow: visible; }
574
+ .b-accordion--plain > .b-disclosure { border-block-end: 1px solid var(--b-separator); }
575
+ .b-accordion--plain > .b-disclosure + .b-disclosure { border-top: 0; }
576
+ .b-accordion--plain > .b-disclosure > summary {
577
+ padding-inline: 0;
578
+ padding-block: var(--b-space-5);
579
+ font-size: var(--b-text-callout);
580
+ font-weight: var(--b-weight-semibold);
581
+ align-items: flex-start;
582
+ }
583
+ .b-accordion--plain > .b-disclosure > summary:hover { background: none; color: var(--b-color-accent-text); }
584
+ .b-accordion--plain > .b-disclosure > summary::after {
585
+ content: "+";
586
+ display: grid;
587
+ place-items: center;
588
+ flex: none;
589
+ width: 1.75rem;
590
+ height: 1.75rem;
591
+ font-size: var(--b-text-callout);
592
+ font-weight: var(--b-weight-medium);
593
+ color: var(--b-color-accent-text);
594
+ border: 1px solid color-mix(in srgb, var(--b-color-accent) 40%, transparent);
595
+ border-radius: var(--b-radius-full);
596
+ rotate: none;
597
+ }
598
+ .b-accordion--plain > .b-disclosure[open] > summary::after { content: "\2212"; }
599
+ .b-accordion--plain > .b-disclosure > :not(summary) { padding-inline: 0; padding-block-end: var(--b-space-5); }
600
+
392
601
  /* ---- Bento: tiles of unequal weight, one grid ---------------------------- */
393
602
  .b-bento {
394
603
  display: grid;
@@ -397,7 +397,10 @@
397
397
  content: "";
398
398
  position: absolute;
399
399
  inset: 0;
400
- background: var(--b-img-placeholder) center / cover no-repeat;
400
+ /* The knob is set per instance; without a fallback an unset --b-img-placeholder
401
+ makes the whole shorthand invalid and the layer disappears rather than
402
+ degrading to a plain tint. */
403
+ background: var(--b-img-placeholder, linear-gradient(var(--b-fill-tertiary), var(--b-fill-tertiary))) center / cover no-repeat;
401
404
  /* Scaled up because a blur samples past the edges and would otherwise
402
405
  leave a soft border all the way round. */
403
406
  filter: blur(14px);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "barua-ui",
3
- "version": "0.9.2",
3
+ "version": "0.11.0",
4
4
  "description": "Barua UI — Apple-DNA design system (glass materials, Barua blue) as React components over pure CSS.",
5
5
  "license": "MIT",
6
6
  "type": "module",