@brightlocal/ui-components 2.26.0 → 2.27.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.
Files changed (89) hide show
  1. package/README.md +4 -2
  2. package/component-meta.json +3761 -360
  3. package/dist/blocks/progress-screen.cjs +1 -0
  4. package/dist/blocks/progress-screen.d.ts +109 -0
  5. package/dist/blocks/progress-screen.d.ts.map +1 -0
  6. package/dist/blocks/progress-screen.js +339 -0
  7. package/dist/blocks/sidebar.cjs +1 -1
  8. package/dist/blocks/sidebar.d.ts.map +1 -1
  9. package/dist/blocks/sidebar.js +155 -153
  10. package/dist/brand-illustration-motif.d.ts +1 -1
  11. package/dist/breadcrumb.cjs +1 -1
  12. package/dist/breadcrumb.d.ts.map +1 -1
  13. package/dist/breadcrumb.js +44 -40
  14. package/dist/button.cjs +1 -1
  15. package/dist/button.d.ts.map +1 -1
  16. package/dist/button.js +28 -28
  17. package/dist/chip.cjs +1 -1
  18. package/dist/chip.d.ts +1 -1
  19. package/dist/chip.d.ts.map +1 -1
  20. package/dist/chip.js +42 -41
  21. package/dist/combobox.cjs +3 -3
  22. package/dist/combobox.d.ts +4 -2
  23. package/dist/combobox.d.ts.map +1 -1
  24. package/dist/combobox.js +161 -161
  25. package/dist/data-table.cjs +1 -1
  26. package/dist/data-table.d.ts +138 -3
  27. package/dist/data-table.d.ts.map +1 -1
  28. package/dist/data-table.js +455 -309
  29. package/dist/global-layout.cjs +1 -1
  30. package/dist/global-layout.d.ts +31 -5
  31. package/dist/global-layout.d.ts.map +1 -1
  32. package/dist/global-layout.js +276 -194
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.d.ts +3 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +462 -451
  37. package/dist/lib/motion.cjs +1 -1
  38. package/dist/lib/motion.js +10 -8
  39. package/dist/link.cjs +1 -1
  40. package/dist/link.d.ts +8 -6
  41. package/dist/link.d.ts.map +1 -1
  42. package/dist/link.js +52 -20
  43. package/dist/list.cjs +1 -1
  44. package/dist/list.js +65 -63
  45. package/dist/progress.cjs +1 -1
  46. package/dist/progress.d.ts +61 -3
  47. package/dist/progress.d.ts.map +1 -1
  48. package/dist/progress.js +142 -65
  49. package/dist/route-progress.cjs +1 -0
  50. package/dist/route-progress.d.ts +103 -0
  51. package/dist/route-progress.d.ts.map +1 -0
  52. package/dist/route-progress.js +106 -0
  53. package/dist/sheet.cjs +1 -1
  54. package/dist/sheet.d.ts +35 -2
  55. package/dist/sheet.d.ts.map +1 -1
  56. package/dist/sheet.js +102 -65
  57. package/dist/sonner.cjs +1 -1
  58. package/dist/sonner.d.ts.map +1 -1
  59. package/dist/sonner.js +11 -15
  60. package/dist/spinner.cjs +1 -0
  61. package/dist/spinner.d.ts +57 -0
  62. package/dist/spinner.d.ts.map +1 -0
  63. package/dist/spinner.js +35 -0
  64. package/dist/stepper.cjs +1 -1
  65. package/dist/stepper.d.ts.map +1 -1
  66. package/dist/stepper.js +26 -25
  67. package/dist/table.cjs +1 -1
  68. package/dist/table.d.ts +1 -1
  69. package/dist/table.d.ts.map +1 -1
  70. package/dist/table.js +6 -2
  71. package/package.json +14 -2
  72. package/src/blocks/progress-screen.tsx +481 -0
  73. package/src/blocks/sidebar.tsx +22 -15
  74. package/src/components/breadcrumb.tsx +9 -4
  75. package/src/components/button.tsx +2 -5
  76. package/src/components/chip.tsx +4 -3
  77. package/src/components/combobox.tsx +15 -8
  78. package/src/components/data-table.tsx +333 -14
  79. package/src/components/global-layout.tsx +228 -62
  80. package/src/components/link.tsx +39 -5
  81. package/src/components/list.tsx +5 -5
  82. package/src/components/progress.tsx +217 -30
  83. package/src/components/route-progress.tsx +354 -0
  84. package/src/components/sheet.tsx +87 -5
  85. package/src/components/sonner.tsx +3 -12
  86. package/src/components/spinner.tsx +94 -0
  87. package/src/components/stepper.tsx +3 -4
  88. package/src/components/table.tsx +6 -2
  89. package/src/index.ts +3 -0
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
 
3
3
  import { ArrowLeft } from "@brightlocal/icons";
4
4
  import { cn } from "@brightlocal/ui-components/lib/utils";
5
+ import { Breadcrumb } from "./breadcrumb";
5
6
  import { Header } from "./header";
6
7
  import { Link } from "./link";
7
8
  import { ScrollArea } from "./scroll-area";
@@ -21,8 +22,11 @@ interface GlobalLayoutProps extends React.ComponentProps<"div"> {
21
22
  */
22
23
  trackingLabel?: string;
23
24
  /**
24
- * Maximum width of the global container. Use `breakpoint` tokens from `@brightlocal/tokens/breakpoints`.
25
- * @default breakpoint.xl
25
+ * Maximum width of the global container. Unconstrained by default so the
26
+ * sidebar pins to the viewport edge and content centres in the remaining
27
+ * space; pass a `breakpoint` token from `@brightlocal/tokens/breakpoints`
28
+ * to cap the whole shell.
29
+ * @default "none"
26
30
  */
27
31
  maxWidth?: string | number;
28
32
  }
@@ -31,7 +35,7 @@ const GlobalLayout = React.forwardRef<HTMLDivElement, GlobalLayoutProps>(
31
35
  (
32
36
  {
33
37
  className,
34
- maxWidth = "var(--ds-breakpoint-xl)",
38
+ maxWidth = "none",
35
39
  dataHook,
36
40
  trackingEl,
37
41
  trackingLabel,
@@ -45,8 +49,11 @@ const GlobalLayout = React.forwardRef<HTMLDivElement, GlobalLayoutProps>(
45
49
 
46
50
  return (
47
51
  <ScrollArea
52
+ // The viewport's default 4px padding would inset the full-bleed
53
+ // sidebar from the viewport edge and make its 100dvh height
54
+ // overflow, so the page-level scroll region drops it.
48
55
  className={cn(
49
- "h-dvh w-full [&>[data-radix-scroll-area-viewport]>div]:block! [&>[data-radix-scroll-area-viewport]>div]:min-w-0!",
56
+ "h-dvh w-full [&>[data-radix-scroll-area-viewport]]:p-0! [&>[data-radix-scroll-area-viewport]>div]:block! [&>[data-radix-scroll-area-viewport]>div]:min-w-0!",
50
57
  className
51
58
  )}
52
59
  dataHook={`${dataHook}-scroll`}
@@ -54,7 +61,7 @@ const GlobalLayout = React.forwardRef<HTMLDivElement, GlobalLayoutProps>(
54
61
  >
55
62
  <div
56
63
  ref={ref}
57
- className="p-section-sm flex min-h-dvh w-full flex-col"
64
+ className="flex min-h-dvh w-full flex-col"
58
65
  data-hook={dataHook}
59
66
  data-slot="global-layout"
60
67
  data-tracking-el={trackingEl}
@@ -76,7 +83,9 @@ const GlobalLayout = React.forwardRef<HTMLDivElement, GlobalLayoutProps>(
76
83
 
77
84
  GlobalLayout.displayName = "GlobalLayout";
78
85
 
79
- const SIDEBAR_WIDTH = "224px";
86
+ // Sidebar rail width per DS-860 — matches the Figma binding to `width/w-72`
87
+ // so nav labels fit without truncation on small desktop screens.
88
+ const SIDEBAR_WIDTH = "288px";
80
89
 
81
90
  interface GlobalLayoutSidebarProps extends React.ComponentProps<"aside"> {
82
91
  /**
@@ -84,7 +93,7 @@ interface GlobalLayoutSidebarProps extends React.ComponentProps<"aside"> {
84
93
  */
85
94
  dataHook?: string;
86
95
  /**
87
- * Width of the sidebar (default: 224px)
96
+ * Width of the sidebar (default: 288px)
88
97
  */
89
98
  width?: string | number;
90
99
  }
@@ -107,8 +116,8 @@ const GlobalLayoutSidebar = React.forwardRef<
107
116
  {...props}
108
117
  style={{
109
118
  width: widthStyle,
110
- top: "var(--ds-section-padding-y-sm)",
111
- height: "calc(100dvh - 2 * var(--ds-section-padding-y-sm))",
119
+ top: 0,
120
+ height: "100dvh",
112
121
  ...props.style,
113
122
  }}
114
123
  >
@@ -151,8 +160,14 @@ const GlobalLayoutContent = React.forwardRef<
151
160
  return (
152
161
  <div
153
162
  ref={ref}
163
+ // Top padding is desktop-only: below lg the mobile header bar sits
164
+ // flush at the top edge and carries its own padding. No horizontal
165
+ // padding here — each region (header, actions, body) pads itself,
166
+ // so a full-width border or sticky treatment under the header stays
167
+ // possible (Figma: Page Header Region / Content Region are separate
168
+ // full-width regions).
154
169
  className={cn(
155
- "px-section-xs flex min-w-0 flex-1 flex-col gap-6",
170
+ "pb-section-sm lg:pt-section-sm flex min-w-0 flex-1 flex-col gap-6",
156
171
  className
157
172
  )}
158
173
  data-hook={dataHook}
@@ -170,6 +185,14 @@ const GlobalLayoutContent = React.forwardRef<
170
185
 
171
186
  GlobalLayoutContent.displayName = "GlobalLayoutContent";
172
187
 
188
+ // Horizontal padding for the full-width regions inside GlobalLayoutContent
189
+ // (header, actions, body): fixed 16px mobile / 24px tablet per the DS-860
190
+ // Figma breakpoint modes; from lg the responsive section-padding token takes
191
+ // over. Applied per region — not on GlobalLayoutContent — so region-level
192
+ // treatments (a border under the header, a future sticky header) can span
193
+ // the full width.
194
+ const CONTENT_REGION_PX = "px-4 md:px-6 lg:px-section-xs";
195
+
173
196
  interface GlobalLayoutBackLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
174
197
  /**
175
198
  * Data hook for automated testing
@@ -228,19 +251,27 @@ interface GlobalLayoutSubtitleProps extends React.ComponentProps<"p"> {
228
251
  * @default "content-header-subtitle"
229
252
  */
230
253
  dataHook?: string;
254
+ /**
255
+ * Render the subtitle as its own child element (Radix Slot) while keeping
256
+ * the muted description typography — use it for rich description rows
257
+ * (icons, rating, a status Badge) that need their own flex layout.
258
+ */
259
+ asChild?: boolean;
231
260
  }
232
261
 
233
262
  /**
234
263
  * Muted description text for the page header. Place it as a direct child of
235
264
  * `GlobalLayoutContentHeader` — the header positions it below the title row.
265
+ * For rich descriptions, pass `asChild` with your own flex row as the child.
236
266
  */
237
267
  const GlobalLayoutSubtitle = React.forwardRef<
238
268
  HTMLParagraphElement,
239
269
  GlobalLayoutSubtitleProps
240
- >(({ dataHook, ...props }, ref) => {
270
+ >(({ dataHook, asChild, ...props }, ref) => {
241
271
  return (
242
272
  <TypographyMuted
243
273
  ref={ref}
274
+ asChild={asChild}
244
275
  data-slot="content-header-subtitle"
245
276
  dataHook={dataHook ?? "content-header-subtitle"}
246
277
  {...props}
@@ -250,6 +281,44 @@ const GlobalLayoutSubtitle = React.forwardRef<
250
281
 
251
282
  GlobalLayoutSubtitle.displayName = "GlobalLayoutSubtitle";
252
283
 
284
+ interface GlobalLayoutImageProps extends React.ComponentProps<"div"> {
285
+ /**
286
+ * Data hook for automated testing
287
+ * @default "content-header-image"
288
+ */
289
+ dataHook?: string;
290
+ }
291
+
292
+ /**
293
+ * Thumbnail frame for the page header (the Figma Page Header "Show Image"
294
+ * slot). Place it as a direct child of `GlobalLayoutContentHeader` — the
295
+ * header positions it before the breadcrumb + title column. Pass your own
296
+ * `img` (or `Avatar`) as the child; it is cropped to a rounded 3:2 frame,
297
+ * 48px tall by default (size via `className`, e.g. `h-21` for the 84px
298
+ * variant).
299
+ */
300
+ const GlobalLayoutImage = React.forwardRef<
301
+ HTMLDivElement,
302
+ GlobalLayoutImageProps
303
+ >(({ className, dataHook, children, ...props }, ref) => {
304
+ return (
305
+ <div
306
+ ref={ref}
307
+ className={cn(
308
+ "aspect-[3/2] h-12 shrink-0 overflow-hidden rounded-md [&_img]:size-full [&_img]:object-cover",
309
+ className
310
+ )}
311
+ data-hook={dataHook ?? "content-header-image"}
312
+ data-slot="content-header-image"
313
+ {...props}
314
+ >
315
+ {children}
316
+ </div>
317
+ );
318
+ });
319
+
320
+ GlobalLayoutImage.displayName = "GlobalLayoutImage";
321
+
253
322
  interface GlobalLayoutContentHeaderProps extends React.ComponentProps<"header"> {
254
323
  /**
255
324
  * Data hook for automated testing (required)
@@ -273,37 +342,86 @@ const GlobalLayoutContentHeader = React.forwardRef<
273
342
  { className, dataHook, trackingEl, trackingLabel, children, ...props },
274
343
  ref
275
344
  ) => {
276
- // Slot the back link and subtitle out of the flat children so the
277
- // header can lay them out per the design: back link before a column of
278
- // title row + subtitle. Both must be direct children (not wrapped in
279
- // fragments or other elements).
345
+ // Slot the back link, breadcrumb, and subtitle out of the flat children
346
+ // so the header can lay them out per the design: back link before a
347
+ // column of breadcrumb + title row + subtitle. All must be direct
348
+ // children (not wrapped in fragments or other elements).
280
349
  const backLinks: React.ReactNode[] = [];
350
+ const images: React.ReactNode[] = [];
351
+ const breadcrumbs: React.ReactNode[] = [];
281
352
  const subtitles: React.ReactNode[] = [];
353
+ const actions: React.ReactNode[] = [];
282
354
  const titleChildren: React.ReactNode[] = [];
283
355
 
284
356
  React.Children.forEach(children, (child) => {
285
357
  if (React.isValidElement(child) && child.type === GlobalLayoutBackLink) {
286
358
  backLinks.push(child);
359
+ } else if (
360
+ React.isValidElement(child) &&
361
+ child.type === GlobalLayoutImage
362
+ ) {
363
+ images.push(child);
364
+ } else if (React.isValidElement(child) && child.type === Breadcrumb) {
365
+ breadcrumbs.push(child);
287
366
  } else if (
288
367
  React.isValidElement(child) &&
289
368
  child.type === GlobalLayoutSubtitle
290
369
  ) {
291
370
  subtitles.push(child);
371
+ } else if (
372
+ React.isValidElement(child) &&
373
+ child.type === GlobalLayoutContentActions
374
+ ) {
375
+ actions.push(child);
292
376
  } else {
293
377
  titleChildren.push(child);
294
378
  }
295
379
  });
296
380
 
297
- // Without a back link or subtitle the header keeps its original flat
298
- // structure — children are laid out directly by the header row.
299
- if (backLinks.length === 0 && subtitles.length === 0) {
381
+ // Without a back link, image, breadcrumb, subtitle, or actions the
382
+ // header keeps its original flat structure — children are laid out
383
+ // directly by the header row.
384
+ if (
385
+ backLinks.length === 0 &&
386
+ images.length === 0 &&
387
+ breadcrumbs.length === 0 &&
388
+ subtitles.length === 0 &&
389
+ actions.length === 0
390
+ ) {
300
391
  return (
392
+ <div
393
+ className={cn("w-full", CONTENT_REGION_PX)}
394
+ data-slot="content-header-region"
395
+ >
396
+ <Header
397
+ ref={ref}
398
+ className={cn(
399
+ "mx-auto w-full flex-wrap justify-between gap-4 max-md:flex-col max-md:items-start",
400
+ className
401
+ )}
402
+ data-slot="content-header"
403
+ dataHook={dataHook}
404
+ style={{ maxWidth: "var(--ds-breakpoint-lg)" }}
405
+ trackingEl={trackingEl}
406
+ trackingLabel={trackingLabel}
407
+ {...props}
408
+ >
409
+ {children}
410
+ </Header>
411
+ </div>
412
+ );
413
+ }
414
+
415
+ return (
416
+ <div
417
+ className={cn("w-full", CONTENT_REGION_PX)}
418
+ data-slot="content-header-region"
419
+ >
301
420
  <Header
302
421
  ref={ref}
303
- className={cn(
304
- "mx-auto w-full flex-wrap justify-between gap-4",
305
- className
306
- )}
422
+ // gap-4 matches the Figma Header Row spacing between the back
423
+ // link / image and the text column.
424
+ className={cn("mx-auto w-full items-start gap-4", className)}
307
425
  data-slot="content-header"
308
426
  dataHook={dataHook}
309
427
  style={{ maxWidth: "var(--ds-breakpoint-lg)" }}
@@ -311,42 +429,58 @@ const GlobalLayoutContentHeader = React.forwardRef<
311
429
  trackingLabel={trackingLabel}
312
430
  {...props}
313
431
  >
314
- {children}
315
- </Header>
316
- );
317
- }
318
-
319
- return (
320
- <Header
321
- ref={ref}
322
- className={cn("mx-auto w-full items-start", className)}
323
- data-slot="content-header"
324
- dataHook={dataHook}
325
- style={{ maxWidth: "var(--ds-breakpoint-lg)" }}
326
- trackingEl={trackingEl}
327
- trackingLabel={trackingLabel}
328
- {...props}
329
- >
330
- {backLinks}
331
- <div
332
- className="flex min-w-0 flex-1 flex-col gap-2"
333
- data-slot="content-header-body"
334
- >
432
+ {backLinks}
433
+ {images}
335
434
  <div
336
- className="flex w-full flex-wrap items-center justify-between gap-4"
337
- data-slot="content-header-title"
435
+ className="flex min-w-0 flex-1 flex-col gap-2"
436
+ data-slot="content-header-body"
338
437
  >
339
- {titleChildren}
438
+ {breadcrumbs}
439
+ {actions.length > 0 ? (
440
+ // With a slotted GlobalLayoutContentActions the header follows
441
+ // the Figma Page Header structure: a text block (title +
442
+ // description) with the actions beside it — and below it on
443
+ // mobile, so the action lands under the description.
444
+ <div
445
+ className="flex w-full flex-wrap items-start justify-between gap-4 max-md:flex-col"
446
+ data-slot="content-header-title"
447
+ >
448
+ <div
449
+ className="flex min-w-0 flex-1 flex-col gap-2"
450
+ data-slot="content-header-text"
451
+ >
452
+ {titleChildren}
453
+ {subtitles}
454
+ </div>
455
+ <GlobalLayoutHeaderSlotContext.Provider value={true}>
456
+ {actions}
457
+ </GlobalLayoutHeaderSlotContext.Provider>
458
+ </div>
459
+ ) : (
460
+ <>
461
+ <div
462
+ className="flex w-full flex-wrap items-center justify-between gap-4 max-md:flex-col max-md:items-start"
463
+ data-slot="content-header-title"
464
+ >
465
+ {titleChildren}
466
+ </div>
467
+ {subtitles}
468
+ </>
469
+ )}
340
470
  </div>
341
- {subtitles}
342
- </div>
343
- </Header>
471
+ </Header>
472
+ </div>
344
473
  );
345
474
  }
346
475
  );
347
476
 
348
477
  GlobalLayoutContentHeader.displayName = "GlobalLayoutContentHeader";
349
478
 
479
+ // True while rendering inside GlobalLayoutContentHeader's actions slot —
480
+ // GlobalLayoutContentActions switches from its standalone desktop-row
481
+ // styling to an inline title-row group.
482
+ const GlobalLayoutHeaderSlotContext = React.createContext(false);
483
+
350
484
  interface GlobalLayoutContentActionsProps extends React.ComponentProps<"div"> {
351
485
  /**
352
486
  * Data hook for automated testing (required)
@@ -370,23 +504,41 @@ const GlobalLayoutContentActions = React.forwardRef<
370
504
  { className, dataHook, trackingEl, trackingLabel, children, ...props },
371
505
  ref
372
506
  ) => {
373
- return (
507
+ // Slotted inside GlobalLayoutContentHeader the actions render inline in
508
+ // the title row on every breakpoint; standalone they keep the legacy
509
+ // desktop-only full-width row, wrapped in a padded full-width region.
510
+ const inHeader = React.useContext(GlobalLayoutHeaderSlotContext);
511
+
512
+ const actionsRow = (
374
513
  <div
375
514
  ref={ref}
376
515
  className={cn(
377
- "mx-auto hidden w-full items-center justify-end gap-2 lg:flex",
516
+ inHeader
517
+ ? "flex shrink-0 items-center gap-2"
518
+ : "mx-auto hidden w-full items-center justify-end gap-2 lg:flex",
378
519
  className
379
520
  )}
380
521
  data-hook={dataHook}
381
522
  data-slot="content-actions"
382
523
  data-tracking-el={trackingEl}
383
524
  data-tracking-label={trackingLabel}
384
- style={{ maxWidth: "var(--ds-breakpoint-lg)" }}
525
+ style={inHeader ? undefined : { maxWidth: "var(--ds-breakpoint-lg)" }}
385
526
  {...props}
386
527
  >
387
528
  {children}
388
529
  </div>
389
530
  );
531
+
532
+ if (inHeader) return actionsRow;
533
+
534
+ return (
535
+ <div
536
+ className={cn("w-full", CONTENT_REGION_PX)}
537
+ data-slot="content-actions-region"
538
+ >
539
+ {actionsRow}
540
+ </div>
541
+ );
390
542
  }
391
543
  );
392
544
 
@@ -417,16 +569,21 @@ const GlobalLayoutContentBody = React.forwardRef<
417
569
  ) => {
418
570
  return (
419
571
  <div
420
- ref={ref}
421
- className={cn("mx-auto flex w-full flex-1 flex-col gap-6", className)}
422
- data-hook={dataHook}
423
- data-slot="content-body"
424
- data-tracking-el={trackingEl}
425
- data-tracking-label={trackingLabel}
426
- style={{ maxWidth: "var(--content-max-width)" }}
427
- {...props}
572
+ className={cn("flex w-full flex-1 flex-col", CONTENT_REGION_PX)}
573
+ data-slot="content-body-region"
428
574
  >
429
- {children}
575
+ <div
576
+ ref={ref}
577
+ className={cn("mx-auto flex w-full flex-1 flex-col gap-6", className)}
578
+ data-hook={dataHook}
579
+ data-slot="content-body"
580
+ data-tracking-el={trackingEl}
581
+ data-tracking-label={trackingLabel}
582
+ style={{ maxWidth: "var(--content-max-width)" }}
583
+ {...props}
584
+ >
585
+ {children}
586
+ </div>
430
587
  </div>
431
588
  );
432
589
  }
@@ -474,8 +631,15 @@ const GlobalLayoutMobileHeader = React.forwardRef<
474
631
  <div
475
632
  ref={ref}
476
633
  aria-label={ariaLabel ?? "Mobile navigation"}
634
+ // Carries the same region padding as the header/body regions so the
635
+ // trigger and logo align with the page header below (the bar only
636
+ // renders below lg). Vertical rhythm per the Figma Bar: 24px above
637
+ // the trigger, 8px below.
477
638
  className={cn(
478
- "flex w-full items-center justify-start gap-2.5 py-2 lg:hidden",
639
+ // The 2px negative margin pulls a slotted SidebarTrigger's box
640
+ // left by its icon inset so the burger glyph — not the invisible
641
+ // button box — sits on the content edge.
642
+ "flex w-full items-center justify-start gap-2 px-4 pt-6 pb-2 md:px-6 lg:hidden [&_[data-slot=sidebar-trigger]]:-ml-0.5",
479
643
  className
480
644
  )}
481
645
  data-hook={dataHook}
@@ -501,6 +665,7 @@ export {
501
665
  GlobalLayoutContentHeader,
502
666
  GlobalLayoutBackLink,
503
667
  GlobalLayoutSubtitle,
668
+ GlobalLayoutImage,
504
669
  GlobalLayoutContentBody,
505
670
  GlobalLayoutMobileHeader,
506
671
  };
@@ -513,6 +678,7 @@ export type {
513
678
  GlobalLayoutContentHeaderProps,
514
679
  GlobalLayoutBackLinkProps,
515
680
  GlobalLayoutSubtitleProps,
681
+ GlobalLayoutImageProps,
516
682
  GlobalLayoutContentBodyProps,
517
683
  GlobalLayoutMobileHeaderProps,
518
684
  };
@@ -70,6 +70,38 @@ const linkVariants = cva(
70
70
  // Focus state
71
71
  "focus-visible:shadow-default",
72
72
  ],
73
+ // Inline link that reads as part of the surrounding sentence: no
74
+ // link colour of its own — `color: inherit` picks up whatever the
75
+ // parent text sets (muted body copy, alert foregrounds, ...).
76
+ // Because colour no longer distinguishes the link from the text
77
+ // around it, the underline is the only affordance and is therefore
78
+ // persistent (WCAG 1.4.1) — hover feedback comes from the underline
79
+ // strengthening, not from a colour change. Deliberately no `visited:`
80
+ // styling: a purple visited colour would break the "part of the
81
+ // sentence" goal. Plain `inline` display (not `inline-flex`) so the
82
+ // link wraps naturally across lines inside a paragraph.
83
+ inherit: [
84
+ "inline",
85
+ "cursor-pointer",
86
+ "outline-none",
87
+ "rounded-sm",
88
+ "text-inherit",
89
+ // Persistent underline; softened until hovered
90
+ "underline",
91
+ "underline-offset-4",
92
+ "decoration-current/60",
93
+ "hover:decoration-current",
94
+ // External icon sits in the text flow with the label
95
+ "[&_svg]:ml-1",
96
+ "[&_svg]:inline",
97
+ "[&_svg]:align-text-bottom",
98
+ // Transitions
99
+ "transition-[text-decoration-color]",
100
+ "duration-fast",
101
+ "ease-out",
102
+ // Focus state
103
+ "focus-visible:shadow-default",
104
+ ],
73
105
  // Button-styled, brand CTA (matches Button `primary`).
74
106
  primary: buttonStyledLink("primary"),
75
107
  // Button-styled, filled (maps to Button `secondary`).
@@ -103,11 +135,13 @@ export interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>
103
135
  */
104
136
  dataHook: string;
105
137
  /**
106
- * Visual style variant. `inline` renders a standard text link; `primary`
107
- * renders the brand CTA treatment (matches `Button variant="primary"`);
108
- * `filled`, `outline` and `ghost` render button-styled treatments for
109
- * inline actions and high-priority navigation; `icon` renders a circular
110
- * icon-only link (provide an `aria-label` since there is no text content).
138
+ * Visual style variant. `inline` renders a standard text link; `inherit`
139
+ * renders an always-underlined link that takes the surrounding text colour
140
+ * (for links inside body copy, alerts and muted text); `primary` renders
141
+ * the brand CTA treatment (matches `Button variant="primary"`); `filled`,
142
+ * `outline` and `ghost` render button-styled treatments for inline actions
143
+ * and high-priority navigation; `icon` renders a circular icon-only link
144
+ * (provide an `aria-label` since there is no text content).
111
145
  * @default "inline"
112
146
  */
113
147
  variant?: LinkVariant;
@@ -28,7 +28,7 @@ const itemVariants = cva(
28
28
  default: [],
29
29
  filled: ["bg-card"],
30
30
  outline: ["bg-background", "border", "border-border"],
31
- loading: ["flex-col", "gap-2", "px-0", "pt-0", "pb-3"],
31
+ loading: ["p-0"],
32
32
  },
33
33
  },
34
34
  defaultVariants: {
@@ -160,10 +160,10 @@ const Item = React.forwardRef<HTMLLIElement, ItemProps>(
160
160
  {...props}
161
161
  >
162
162
  {variant === "loading" ? (
163
- <>
164
- <Skeleton className="h-4 w-full" />
165
- <Skeleton className="h-4 w-full" />
166
- </>
163
+ /* One skeleton per data row, mirroring the filled row's footprint:
164
+ h-13 = py-2 × 2 + the size-9 actions slot that drives the row's
165
+ height, so nothing shifts when the content arrives. */
166
+ <Skeleton className="h-13 w-full rounded-lg" />
167
167
  ) : (
168
168
  children
169
169
  )}