@brightlocal/ui-components 2.26.0 → 3.0.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 +9 -2
- package/component-meta.json +4010 -255
- package/deprecations.json +189 -2
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +2 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +18 -18
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +11 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -28
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +15 -11
- package/dist/blocks/empty-state.cjs +1 -0
- package/dist/blocks/empty-state.d.ts +172 -0
- package/dist/blocks/empty-state.d.ts.map +1 -0
- package/dist/blocks/empty-state.js +155 -0
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +124 -108
- package/dist/blocks/progress-state.cjs +1 -0
- package/dist/blocks/progress-state.d.ts +121 -0
- package/dist/blocks/progress-state.d.ts.map +1 -0
- package/dist/blocks/progress-state.js +368 -0
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +297 -296
- package/dist/brand-illustration-motif.d.ts +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +44 -40
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +23 -23
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +37 -38
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +24 -2
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +57 -55
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +23 -2
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +94 -91
- package/dist/chart-empty.cjs +1 -0
- package/dist/chart-empty.d.ts +59 -0
- package/dist/chart-empty.d.ts.map +1 -0
- package/dist/chart-empty.js +29 -0
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +6 -1
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +183 -183
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +1 -1
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +47 -44
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +4 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +143 -141
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +74 -77
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +26 -29
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +182 -13
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +462 -314
- package/dist/description.cjs +1 -1
- package/dist/description.js +5 -5
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +20 -20
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +8 -11
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +17 -20
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +29 -25
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +58 -6
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +278 -194
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +56 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +32 -0
- package/dist/header.d.ts +13 -0
- package/dist/header.d.ts.map +1 -1
- package/dist/hooks/use-delayed-pending.cjs +1 -0
- package/dist/hooks/use-delayed-pending.d.ts +34 -0
- package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
- package/dist/hooks/use-delayed-pending.js +17 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +523 -494
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +25 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +9 -9
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.js +51 -51
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +25 -28
- package/dist/lib/block-illustration.cjs +1 -0
- package/dist/lib/block-illustration.d.ts +28 -0
- package/dist/lib/block-illustration.d.ts.map +1 -0
- package/dist/lib/block-illustration.js +21 -0
- package/dist/lib/empty-canvas.cjs +1 -0
- package/dist/lib/empty-canvas.d.ts +27 -0
- package/dist/lib/empty-canvas.d.ts.map +1 -0
- package/dist/lib/empty-canvas.js +62 -0
- package/dist/lib/motion.cjs +1 -1
- package/dist/lib/motion.js +10 -8
- package/dist/lib/optical-center.cjs +1 -0
- package/dist/lib/optical-center.d.ts +12 -0
- package/dist/lib/optical-center.d.ts.map +1 -0
- package/dist/lib/optical-center.js +11 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -5
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +8 -6
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +52 -20
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +87 -81
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +60 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +187 -164
- package/dist/media-empty.cjs +1 -0
- package/dist/media-empty.d.ts +72 -0
- package/dist/media-empty.d.ts.map +1 -0
- package/dist/media-empty.js +45 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +17 -20
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +7 -7
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +127 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +189 -98
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +37 -3
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +102 -64
- package/dist/route-progress.cjs +1 -0
- package/dist/route-progress.d.ts +103 -0
- package/dist/route-progress.d.ts.map +1 -0
- package/dist/route-progress.js +106 -0
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +19 -18
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +8 -8
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +35 -2
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +103 -66
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +38 -3
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +43 -20
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +32 -36
- package/dist/spinner.cjs +1 -0
- package/dist/spinner.d.ts +57 -0
- package/dist/spinner.d.ts.map +1 -0
- package/dist/spinner.js +35 -0
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.d.ts.map +1 -1
- package/dist/stepper.js +23 -22
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +36 -29
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.d.ts +10 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +8 -8
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +8 -8
- package/dist/typography-heading.cjs +1 -0
- package/dist/typography-heading.d.ts +116 -0
- package/dist/typography-heading.d.ts.map +1 -0
- package/dist/typography-heading.js +84 -0
- package/dist/typography-text.cjs +1 -0
- package/dist/typography-text.d.ts +113 -0
- package/dist/typography-text.d.ts.map +1 -0
- package/dist/typography-text.js +81 -0
- package/dist/typography.d.ts +13 -0
- package/dist/typography.d.ts.map +1 -1
- package/package.json +42 -2
- package/src/blocks/empty-state.tsx +424 -0
- package/src/blocks/input-list.tsx +66 -36
- package/src/blocks/progress-state.tsx +542 -0
- package/src/blocks/sidebar.tsx +46 -40
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +27 -13
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +8 -4
- package/src/components/breadcrumb.tsx +9 -4
- package/src/components/button.tsx +5 -8
- package/src/components/calendar.tsx +5 -6
- package/src/components/callout.tsx +48 -15
- package/src/components/card.tsx +52 -17
- package/src/components/chart-empty.tsx +116 -0
- package/src/components/chart.tsx +43 -17
- package/src/components/chip.tsx +9 -6
- package/src/components/combobox.tsx +21 -12
- package/src/components/command.tsx +9 -10
- package/src/components/context-menu.tsx +6 -9
- package/src/components/data-table.tsx +405 -31
- package/src/components/description.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -5
- package/src/components/dropdown-menu.tsx +8 -11
- package/src/components/field.tsx +8 -4
- package/src/components/global-layout.tsx +264 -65
- package/src/components/grid.tsx +130 -0
- package/src/components/header.tsx +13 -0
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +1 -1
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +10 -13
- package/src/components/link.tsx +39 -5
- package/src/components/list.tsx +18 -14
- package/src/components/map.tsx +101 -5
- package/src/components/media-empty.tsx +156 -0
- package/src/components/menubar.tsx +7 -10
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/pagination.tsx +279 -1
- package/src/components/progress.tsx +120 -11
- package/src/components/route-progress.tsx +354 -0
- package/src/components/select.tsx +5 -4
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +89 -7
- package/src/components/skeleton.tsx +78 -7
- package/src/components/sonner.tsx +5 -14
- package/src/components/spinner.tsx +94 -0
- package/src/components/stepper.tsx +6 -7
- package/src/components/table.tsx +11 -4
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +10 -0
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/components/typography-heading.tsx +229 -0
- package/src/components/typography-text.tsx +225 -0
- package/src/components/typography.tsx +13 -0
- package/src/hooks/use-delayed-pending.ts +60 -0
- package/src/index.ts +12 -0
- package/src/lib/block-illustration.tsx +88 -0
- package/src/lib/empty-canvas.tsx +128 -0
- package/src/lib/optical-center.tsx +45 -0
- package/src/lib/utils.ts +26 -0
|
@@ -195,7 +195,7 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
195
195
|
className={cn(
|
|
196
196
|
[
|
|
197
197
|
"relative flex cursor-default items-center gap-2 self-stretch select-none",
|
|
198
|
-
"rounded-sm px-2 py-1.5
|
|
198
|
+
"text-label rounded-sm px-2 py-1.5 outline-hidden",
|
|
199
199
|
// Text truncation for child text elements
|
|
200
200
|
"[&>span]:overflow-hidden [&>span]:text-ellipsis [&>span]:whitespace-nowrap",
|
|
201
201
|
"focus:bg-accent focus:text-accent-foreground",
|
|
@@ -263,7 +263,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
|
|
263
263
|
className={cn(
|
|
264
264
|
[
|
|
265
265
|
"relative flex cursor-default items-center gap-2 select-none",
|
|
266
|
-
"rounded-sm py-1.5 pr-2 pl-8
|
|
266
|
+
"text-label rounded-sm py-1.5 pr-2 pl-8 outline-hidden",
|
|
267
267
|
"focus:bg-accent focus:text-accent-foreground",
|
|
268
268
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
269
269
|
// Icon styling
|
|
@@ -335,7 +335,7 @@ const DropdownMenuRadioItem = React.forwardRef<
|
|
|
335
335
|
className={cn(
|
|
336
336
|
[
|
|
337
337
|
"relative flex cursor-default items-center gap-2 select-none",
|
|
338
|
-
"rounded-sm py-1.5 pr-2 pl-8
|
|
338
|
+
"text-label rounded-sm py-1.5 pr-2 pl-8 outline-hidden",
|
|
339
339
|
"focus:bg-accent focus:text-accent-foreground",
|
|
340
340
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
341
341
|
// Icon styling
|
|
@@ -387,10 +387,7 @@ const DropdownMenuLabel = React.forwardRef<
|
|
|
387
387
|
<DropdownMenuPrimitive.Label
|
|
388
388
|
ref={ref}
|
|
389
389
|
className={cn(
|
|
390
|
-
[
|
|
391
|
-
"px-2 py-1.5 text-sm leading-normal font-semibold",
|
|
392
|
-
"data-[inset]:pl-8",
|
|
393
|
-
],
|
|
390
|
+
["text-label-sm px-2 py-1.5", "data-[inset]:pl-8"],
|
|
394
391
|
className
|
|
395
392
|
)}
|
|
396
393
|
data-hook={dataHook}
|
|
@@ -432,7 +429,7 @@ function DropdownMenuShortcut({
|
|
|
432
429
|
return (
|
|
433
430
|
<span
|
|
434
431
|
className={cn(
|
|
435
|
-
["text-popover-foreground
|
|
432
|
+
["text-popover-foreground text-body-xs ml-auto opacity-60"],
|
|
436
433
|
className
|
|
437
434
|
)}
|
|
438
435
|
data-slot="dropdown-menu-shortcut"
|
|
@@ -500,7 +497,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|
|
500
497
|
className={cn(
|
|
501
498
|
[
|
|
502
499
|
"flex cursor-default items-center gap-2 select-none",
|
|
503
|
-
"rounded-sm px-2 py-1.5
|
|
500
|
+
"text-label rounded-sm px-2 py-1.5 outline-hidden",
|
|
504
501
|
"focus:bg-accent focus:text-accent-foreground",
|
|
505
502
|
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
506
503
|
"data-[inset]:pl-8",
|
|
@@ -634,11 +631,11 @@ const DropdownMenuTriggerAvatar = React.forwardRef<
|
|
|
634
631
|
>
|
|
635
632
|
{avatar}
|
|
636
633
|
<div className="flex min-w-0 flex-1 flex-col items-start">
|
|
637
|
-
<span className="w-full overflow-hidden text-
|
|
634
|
+
<span className="text-heading-compact w-full overflow-hidden text-ellipsis whitespace-nowrap">
|
|
638
635
|
{title}
|
|
639
636
|
</span>
|
|
640
637
|
{description && (
|
|
641
|
-
<span className="text-muted-foreground w-full overflow-hidden text-
|
|
638
|
+
<span className="text-muted-foreground text-body-xs w-full overflow-hidden text-ellipsis whitespace-nowrap">
|
|
642
639
|
{description}
|
|
643
640
|
</span>
|
|
644
641
|
)}
|
package/src/components/field.tsx
CHANGED
|
@@ -49,9 +49,9 @@ function FieldLegend({
|
|
|
49
49
|
return (
|
|
50
50
|
<legend
|
|
51
51
|
className={cn(
|
|
52
|
-
"mb-3
|
|
53
|
-
"data-[variant=legend]:text-
|
|
54
|
-
"data-[variant=label]:text-
|
|
52
|
+
"mb-3",
|
|
53
|
+
"data-[variant=legend]:text-heading-subsection",
|
|
54
|
+
"data-[variant=label]:text-label",
|
|
55
55
|
srOnly && "sr-only",
|
|
56
56
|
className
|
|
57
57
|
)}
|
|
@@ -98,6 +98,9 @@ const fieldVariants = cva(
|
|
|
98
98
|
"grid grid-cols-[auto_1fr] items-center gap-x-2",
|
|
99
99
|
"[&>[data-slot=field-description]]:col-start-2 [&>[data-slot=field-error]]:col-start-2",
|
|
100
100
|
"has-[>[data-slot=field-content]]:items-start",
|
|
101
|
+
// Top-aligned rows: a 16px control centres on the label's first line
|
|
102
|
+
// (text-label is 20px), never on the content box's top edge.
|
|
103
|
+
"has-[>[data-slot=field-content]]:[&>[role=radio]]:mt-0.5",
|
|
101
104
|
// sr-only label leaves grid flow — collapse to a single column
|
|
102
105
|
"has-[>.sr-only[data-slot=field-label]]:grid-cols-[1fr]",
|
|
103
106
|
"[&:has(>.sr-only[data-slot=field-label])>[data-slot=field-description]]:col-start-1",
|
|
@@ -107,6 +110,7 @@ const fieldVariants = cva(
|
|
|
107
110
|
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:grid @md/field-group:grid-cols-[auto_1fr] @md/field-group:items-center @md/field-group:[&>*]:w-auto",
|
|
108
111
|
"@md/field-group:[&>[data-slot=field-description]]:col-start-2 @md/field-group:[&>[data-slot=field-error]]:col-start-2",
|
|
109
112
|
"@md/field-group:has-[>[data-slot=field-content]]:items-start",
|
|
113
|
+
"@md/field-group:has-[>[data-slot=field-content]]:[&>[role=radio]]:mt-0.5",
|
|
110
114
|
// sr-only label leaves grid flow — collapse to a single column
|
|
111
115
|
"@md/field-group:has-[>.sr-only[data-slot=field-label]]:grid-cols-[1fr]",
|
|
112
116
|
"@md/field-group:[&:has(>.sr-only[data-slot=field-label])>[data-slot=field-description]]:col-start-1",
|
|
@@ -399,7 +403,7 @@ function FieldError({
|
|
|
399
403
|
}
|
|
400
404
|
|
|
401
405
|
const baseStyles = cn(
|
|
402
|
-
"text-
|
|
406
|
+
"text-body-sm text-destructive-foreground",
|
|
403
407
|
"mt-2",
|
|
404
408
|
"group-has-[[data-orientation=horizontal]]/field:text-balance",
|
|
405
409
|
"last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5",
|
|
@@ -2,10 +2,11 @@ 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";
|
|
8
|
-
import {
|
|
9
|
+
import { TypographyText } from "./typography-text";
|
|
9
10
|
|
|
10
11
|
interface GlobalLayoutProps extends React.ComponentProps<"div"> {
|
|
11
12
|
/**
|
|
@@ -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.
|
|
25
|
-
*
|
|
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 = "
|
|
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="
|
|
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
|
-
|
|
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:
|
|
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:
|
|
111
|
-
height: "
|
|
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
|
-
"
|
|
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
|
|
@@ -222,27 +245,46 @@ const GlobalLayoutBackLink = React.forwardRef<
|
|
|
222
245
|
|
|
223
246
|
GlobalLayoutBackLink.displayName = "GlobalLayoutBackLink";
|
|
224
247
|
|
|
225
|
-
|
|
248
|
+
// The deprecated native `color` presentation attribute is omitted: the
|
|
249
|
+
// subtitle's colour is the type scale's muted role, not a free-form value.
|
|
250
|
+
interface GlobalLayoutSubtitleProps extends Omit<
|
|
251
|
+
React.ComponentProps<"p">,
|
|
252
|
+
"color"
|
|
253
|
+
> {
|
|
226
254
|
/**
|
|
227
255
|
* Data hook for automated testing
|
|
228
256
|
* @default "content-header-subtitle"
|
|
229
257
|
*/
|
|
230
258
|
dataHook?: string;
|
|
259
|
+
/**
|
|
260
|
+
* Render the subtitle as its own child element (Radix Slot) while keeping
|
|
261
|
+
* the muted description typography — use it for rich description rows
|
|
262
|
+
* (icons, rating, a status Badge) that need their own flex layout.
|
|
263
|
+
*/
|
|
264
|
+
asChild?: boolean;
|
|
231
265
|
}
|
|
232
266
|
|
|
233
267
|
/**
|
|
234
268
|
* Muted description text for the page header. Place it as a direct child of
|
|
235
269
|
* `GlobalLayoutContentHeader` — the header positions it below the title row.
|
|
270
|
+
* For rich descriptions, pass `asChild` with your own flex row as the child.
|
|
271
|
+
*
|
|
272
|
+
* Sits on the semantic type scale's `text-body-sm` (Inter · Figma 500 · 14/20,
|
|
273
|
+
* rendering one CSS weight lighter per the DS-305 offset) with the muted
|
|
274
|
+
* colour role — de-emphasis is colour-only, never a lighter weight.
|
|
236
275
|
*/
|
|
237
276
|
const GlobalLayoutSubtitle = React.forwardRef<
|
|
238
277
|
HTMLParagraphElement,
|
|
239
278
|
GlobalLayoutSubtitleProps
|
|
240
|
-
>(({ dataHook, ...props }, ref) => {
|
|
279
|
+
>(({ dataHook, asChild, ...props }, ref) => {
|
|
241
280
|
return (
|
|
242
|
-
<
|
|
281
|
+
<TypographyText
|
|
243
282
|
ref={ref}
|
|
283
|
+
asChild={asChild}
|
|
284
|
+
color="muted"
|
|
244
285
|
data-slot="content-header-subtitle"
|
|
245
286
|
dataHook={dataHook ?? "content-header-subtitle"}
|
|
287
|
+
variant="body-sm"
|
|
246
288
|
{...props}
|
|
247
289
|
/>
|
|
248
290
|
);
|
|
@@ -250,6 +292,44 @@ const GlobalLayoutSubtitle = React.forwardRef<
|
|
|
250
292
|
|
|
251
293
|
GlobalLayoutSubtitle.displayName = "GlobalLayoutSubtitle";
|
|
252
294
|
|
|
295
|
+
interface GlobalLayoutImageProps extends React.ComponentProps<"div"> {
|
|
296
|
+
/**
|
|
297
|
+
* Data hook for automated testing
|
|
298
|
+
* @default "content-header-image"
|
|
299
|
+
*/
|
|
300
|
+
dataHook?: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Thumbnail frame for the page header (the Figma Page Header "Show Image"
|
|
305
|
+
* slot). Place it as a direct child of `GlobalLayoutContentHeader` — the
|
|
306
|
+
* header positions it before the breadcrumb + title column. Pass your own
|
|
307
|
+
* `img` (or `Avatar`) as the child; it is cropped to a rounded 3:2 frame,
|
|
308
|
+
* 48px tall by default (size via `className`, e.g. `h-21` for the 84px
|
|
309
|
+
* variant).
|
|
310
|
+
*/
|
|
311
|
+
const GlobalLayoutImage = React.forwardRef<
|
|
312
|
+
HTMLDivElement,
|
|
313
|
+
GlobalLayoutImageProps
|
|
314
|
+
>(({ className, dataHook, children, ...props }, ref) => {
|
|
315
|
+
return (
|
|
316
|
+
<div
|
|
317
|
+
ref={ref}
|
|
318
|
+
className={cn(
|
|
319
|
+
"aspect-[3/2] h-12 shrink-0 overflow-hidden rounded-md [&_img]:size-full [&_img]:object-cover",
|
|
320
|
+
className
|
|
321
|
+
)}
|
|
322
|
+
data-hook={dataHook ?? "content-header-image"}
|
|
323
|
+
data-slot="content-header-image"
|
|
324
|
+
{...props}
|
|
325
|
+
>
|
|
326
|
+
{children}
|
|
327
|
+
</div>
|
|
328
|
+
);
|
|
329
|
+
});
|
|
330
|
+
|
|
331
|
+
GlobalLayoutImage.displayName = "GlobalLayoutImage";
|
|
332
|
+
|
|
253
333
|
interface GlobalLayoutContentHeaderProps extends React.ComponentProps<"header"> {
|
|
254
334
|
/**
|
|
255
335
|
* Data hook for automated testing (required)
|
|
@@ -265,6 +345,28 @@ interface GlobalLayoutContentHeaderProps extends React.ComponentProps<"header">
|
|
|
265
345
|
trackingLabel?: string;
|
|
266
346
|
}
|
|
267
347
|
|
|
348
|
+
/**
|
|
349
|
+
* Page header for the content area. Slots direct children (back link, image,
|
|
350
|
+
* breadcrumb, subtitle, actions) around the title row per the Figma Page
|
|
351
|
+
* Header design.
|
|
352
|
+
*
|
|
353
|
+
* The consumer-supplied page title must be `TypographyHeading level={1}
|
|
354
|
+
* variant="page"` so it sits on the semantic type scale's
|
|
355
|
+
* `text-heading-page` (DS-714) — never a hand-styled heading. Exactly one
|
|
356
|
+
* page title per screen: a second title is a section (`variant="section"`,
|
|
357
|
+
* `text-heading-section`).
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* <GlobalLayoutContentHeader dataHook="page-header">
|
|
361
|
+
* <TypographyHeading level={1} variant="page" dataHook="page-title">
|
|
362
|
+
* All Locations
|
|
363
|
+
* </TypographyHeading>
|
|
364
|
+
* <GlobalLayoutContentActions dataHook="header-actions">
|
|
365
|
+
* <Button dataHook="add-location">Add Location</Button>
|
|
366
|
+
* </GlobalLayoutContentActions>
|
|
367
|
+
* <GlobalLayoutSubtitle>Manage your business locations.</GlobalLayoutSubtitle>
|
|
368
|
+
* </GlobalLayoutContentHeader>
|
|
369
|
+
*/
|
|
268
370
|
const GlobalLayoutContentHeader = React.forwardRef<
|
|
269
371
|
HTMLElement,
|
|
270
372
|
GlobalLayoutContentHeaderProps
|
|
@@ -273,37 +375,86 @@ const GlobalLayoutContentHeader = React.forwardRef<
|
|
|
273
375
|
{ className, dataHook, trackingEl, trackingLabel, children, ...props },
|
|
274
376
|
ref
|
|
275
377
|
) => {
|
|
276
|
-
// Slot the back link and subtitle out of the flat children
|
|
277
|
-
// header can lay them out per the design: back link before a
|
|
278
|
-
// title row + subtitle.
|
|
279
|
-
// fragments or other elements).
|
|
378
|
+
// Slot the back link, breadcrumb, and subtitle out of the flat children
|
|
379
|
+
// so the header can lay them out per the design: back link before a
|
|
380
|
+
// column of breadcrumb + title row + subtitle. All must be direct
|
|
381
|
+
// children (not wrapped in fragments or other elements).
|
|
280
382
|
const backLinks: React.ReactNode[] = [];
|
|
383
|
+
const images: React.ReactNode[] = [];
|
|
384
|
+
const breadcrumbs: React.ReactNode[] = [];
|
|
281
385
|
const subtitles: React.ReactNode[] = [];
|
|
386
|
+
const actions: React.ReactNode[] = [];
|
|
282
387
|
const titleChildren: React.ReactNode[] = [];
|
|
283
388
|
|
|
284
389
|
React.Children.forEach(children, (child) => {
|
|
285
390
|
if (React.isValidElement(child) && child.type === GlobalLayoutBackLink) {
|
|
286
391
|
backLinks.push(child);
|
|
392
|
+
} else if (
|
|
393
|
+
React.isValidElement(child) &&
|
|
394
|
+
child.type === GlobalLayoutImage
|
|
395
|
+
) {
|
|
396
|
+
images.push(child);
|
|
397
|
+
} else if (React.isValidElement(child) && child.type === Breadcrumb) {
|
|
398
|
+
breadcrumbs.push(child);
|
|
287
399
|
} else if (
|
|
288
400
|
React.isValidElement(child) &&
|
|
289
401
|
child.type === GlobalLayoutSubtitle
|
|
290
402
|
) {
|
|
291
403
|
subtitles.push(child);
|
|
404
|
+
} else if (
|
|
405
|
+
React.isValidElement(child) &&
|
|
406
|
+
child.type === GlobalLayoutContentActions
|
|
407
|
+
) {
|
|
408
|
+
actions.push(child);
|
|
292
409
|
} else {
|
|
293
410
|
titleChildren.push(child);
|
|
294
411
|
}
|
|
295
412
|
});
|
|
296
413
|
|
|
297
|
-
// Without a back link
|
|
298
|
-
// structure — children are laid out
|
|
299
|
-
|
|
414
|
+
// Without a back link, image, breadcrumb, subtitle, or actions the
|
|
415
|
+
// header keeps its original flat structure — children are laid out
|
|
416
|
+
// directly by the header row.
|
|
417
|
+
if (
|
|
418
|
+
backLinks.length === 0 &&
|
|
419
|
+
images.length === 0 &&
|
|
420
|
+
breadcrumbs.length === 0 &&
|
|
421
|
+
subtitles.length === 0 &&
|
|
422
|
+
actions.length === 0
|
|
423
|
+
) {
|
|
300
424
|
return (
|
|
425
|
+
<div
|
|
426
|
+
className={cn("w-full", CONTENT_REGION_PX)}
|
|
427
|
+
data-slot="content-header-region"
|
|
428
|
+
>
|
|
429
|
+
<Header
|
|
430
|
+
ref={ref}
|
|
431
|
+
className={cn(
|
|
432
|
+
"mx-auto w-full flex-wrap justify-between gap-4 max-md:flex-col max-md:items-start",
|
|
433
|
+
className
|
|
434
|
+
)}
|
|
435
|
+
data-slot="content-header"
|
|
436
|
+
dataHook={dataHook}
|
|
437
|
+
style={{ maxWidth: "var(--ds-breakpoint-lg)" }}
|
|
438
|
+
trackingEl={trackingEl}
|
|
439
|
+
trackingLabel={trackingLabel}
|
|
440
|
+
{...props}
|
|
441
|
+
>
|
|
442
|
+
{children}
|
|
443
|
+
</Header>
|
|
444
|
+
</div>
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
return (
|
|
449
|
+
<div
|
|
450
|
+
className={cn("w-full", CONTENT_REGION_PX)}
|
|
451
|
+
data-slot="content-header-region"
|
|
452
|
+
>
|
|
301
453
|
<Header
|
|
302
454
|
ref={ref}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
)}
|
|
455
|
+
// gap-4 matches the Figma Header Row spacing between the back
|
|
456
|
+
// link / image and the text column.
|
|
457
|
+
className={cn("mx-auto w-full items-start gap-4", className)}
|
|
307
458
|
data-slot="content-header"
|
|
308
459
|
dataHook={dataHook}
|
|
309
460
|
style={{ maxWidth: "var(--ds-breakpoint-lg)" }}
|
|
@@ -311,42 +462,58 @@ const GlobalLayoutContentHeader = React.forwardRef<
|
|
|
311
462
|
trackingLabel={trackingLabel}
|
|
312
463
|
{...props}
|
|
313
464
|
>
|
|
314
|
-
{
|
|
315
|
-
|
|
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
|
-
>
|
|
465
|
+
{backLinks}
|
|
466
|
+
{images}
|
|
335
467
|
<div
|
|
336
|
-
className="flex w-
|
|
337
|
-
data-slot="content-header-
|
|
468
|
+
className="flex min-w-0 flex-1 flex-col gap-2"
|
|
469
|
+
data-slot="content-header-body"
|
|
338
470
|
>
|
|
339
|
-
{
|
|
471
|
+
{breadcrumbs}
|
|
472
|
+
{actions.length > 0 ? (
|
|
473
|
+
// With a slotted GlobalLayoutContentActions the header follows
|
|
474
|
+
// the Figma Page Header structure: a text block (title +
|
|
475
|
+
// description) with the actions beside it — and below it on
|
|
476
|
+
// mobile, so the action lands under the description.
|
|
477
|
+
<div
|
|
478
|
+
className="flex w-full flex-wrap items-start justify-between gap-4 max-md:flex-col"
|
|
479
|
+
data-slot="content-header-title"
|
|
480
|
+
>
|
|
481
|
+
<div
|
|
482
|
+
className="flex min-w-0 flex-1 flex-col gap-2"
|
|
483
|
+
data-slot="content-header-text"
|
|
484
|
+
>
|
|
485
|
+
{titleChildren}
|
|
486
|
+
{subtitles}
|
|
487
|
+
</div>
|
|
488
|
+
<GlobalLayoutHeaderSlotContext.Provider value={true}>
|
|
489
|
+
{actions}
|
|
490
|
+
</GlobalLayoutHeaderSlotContext.Provider>
|
|
491
|
+
</div>
|
|
492
|
+
) : (
|
|
493
|
+
<>
|
|
494
|
+
<div
|
|
495
|
+
className="flex w-full flex-wrap items-center justify-between gap-4 max-md:flex-col max-md:items-start"
|
|
496
|
+
data-slot="content-header-title"
|
|
497
|
+
>
|
|
498
|
+
{titleChildren}
|
|
499
|
+
</div>
|
|
500
|
+
{subtitles}
|
|
501
|
+
</>
|
|
502
|
+
)}
|
|
340
503
|
</div>
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
</Header>
|
|
504
|
+
</Header>
|
|
505
|
+
</div>
|
|
344
506
|
);
|
|
345
507
|
}
|
|
346
508
|
);
|
|
347
509
|
|
|
348
510
|
GlobalLayoutContentHeader.displayName = "GlobalLayoutContentHeader";
|
|
349
511
|
|
|
512
|
+
// True while rendering inside GlobalLayoutContentHeader's actions slot —
|
|
513
|
+
// GlobalLayoutContentActions switches from its standalone desktop-row
|
|
514
|
+
// styling to an inline title-row group.
|
|
515
|
+
const GlobalLayoutHeaderSlotContext = React.createContext(false);
|
|
516
|
+
|
|
350
517
|
interface GlobalLayoutContentActionsProps extends React.ComponentProps<"div"> {
|
|
351
518
|
/**
|
|
352
519
|
* Data hook for automated testing (required)
|
|
@@ -370,23 +537,41 @@ const GlobalLayoutContentActions = React.forwardRef<
|
|
|
370
537
|
{ className, dataHook, trackingEl, trackingLabel, children, ...props },
|
|
371
538
|
ref
|
|
372
539
|
) => {
|
|
373
|
-
|
|
540
|
+
// Slotted inside GlobalLayoutContentHeader the actions render inline in
|
|
541
|
+
// the title row on every breakpoint; standalone they keep the legacy
|
|
542
|
+
// desktop-only full-width row, wrapped in a padded full-width region.
|
|
543
|
+
const inHeader = React.useContext(GlobalLayoutHeaderSlotContext);
|
|
544
|
+
|
|
545
|
+
const actionsRow = (
|
|
374
546
|
<div
|
|
375
547
|
ref={ref}
|
|
376
548
|
className={cn(
|
|
377
|
-
|
|
549
|
+
inHeader
|
|
550
|
+
? "flex shrink-0 items-center gap-2"
|
|
551
|
+
: "mx-auto hidden w-full items-center justify-end gap-2 lg:flex",
|
|
378
552
|
className
|
|
379
553
|
)}
|
|
380
554
|
data-hook={dataHook}
|
|
381
555
|
data-slot="content-actions"
|
|
382
556
|
data-tracking-el={trackingEl}
|
|
383
557
|
data-tracking-label={trackingLabel}
|
|
384
|
-
style={{ maxWidth: "var(--ds-breakpoint-lg)" }}
|
|
558
|
+
style={inHeader ? undefined : { maxWidth: "var(--ds-breakpoint-lg)" }}
|
|
385
559
|
{...props}
|
|
386
560
|
>
|
|
387
561
|
{children}
|
|
388
562
|
</div>
|
|
389
563
|
);
|
|
564
|
+
|
|
565
|
+
if (inHeader) return actionsRow;
|
|
566
|
+
|
|
567
|
+
return (
|
|
568
|
+
<div
|
|
569
|
+
className={cn("w-full", CONTENT_REGION_PX)}
|
|
570
|
+
data-slot="content-actions-region"
|
|
571
|
+
>
|
|
572
|
+
{actionsRow}
|
|
573
|
+
</div>
|
|
574
|
+
);
|
|
390
575
|
}
|
|
391
576
|
);
|
|
392
577
|
|
|
@@ -417,16 +602,21 @@ const GlobalLayoutContentBody = React.forwardRef<
|
|
|
417
602
|
) => {
|
|
418
603
|
return (
|
|
419
604
|
<div
|
|
420
|
-
|
|
421
|
-
|
|
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}
|
|
605
|
+
className={cn("flex w-full flex-1 flex-col", CONTENT_REGION_PX)}
|
|
606
|
+
data-slot="content-body-region"
|
|
428
607
|
>
|
|
429
|
-
|
|
608
|
+
<div
|
|
609
|
+
ref={ref}
|
|
610
|
+
className={cn("mx-auto flex w-full flex-1 flex-col gap-6", className)}
|
|
611
|
+
data-hook={dataHook}
|
|
612
|
+
data-slot="content-body"
|
|
613
|
+
data-tracking-el={trackingEl}
|
|
614
|
+
data-tracking-label={trackingLabel}
|
|
615
|
+
style={{ maxWidth: "var(--content-max-width)" }}
|
|
616
|
+
{...props}
|
|
617
|
+
>
|
|
618
|
+
{children}
|
|
619
|
+
</div>
|
|
430
620
|
</div>
|
|
431
621
|
);
|
|
432
622
|
}
|
|
@@ -474,8 +664,15 @@ const GlobalLayoutMobileHeader = React.forwardRef<
|
|
|
474
664
|
<div
|
|
475
665
|
ref={ref}
|
|
476
666
|
aria-label={ariaLabel ?? "Mobile navigation"}
|
|
667
|
+
// Carries the same region padding as the header/body regions so the
|
|
668
|
+
// trigger and logo align with the page header below (the bar only
|
|
669
|
+
// renders below lg). Vertical rhythm per the Figma Bar: 24px above
|
|
670
|
+
// the trigger, 8px below.
|
|
477
671
|
className={cn(
|
|
478
|
-
|
|
672
|
+
// The 2px negative margin pulls a slotted SidebarTrigger's box
|
|
673
|
+
// left by its icon inset so the burger glyph — not the invisible
|
|
674
|
+
// button box — sits on the content edge.
|
|
675
|
+
"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
676
|
className
|
|
480
677
|
)}
|
|
481
678
|
data-hook={dataHook}
|
|
@@ -501,6 +698,7 @@ export {
|
|
|
501
698
|
GlobalLayoutContentHeader,
|
|
502
699
|
GlobalLayoutBackLink,
|
|
503
700
|
GlobalLayoutSubtitle,
|
|
701
|
+
GlobalLayoutImage,
|
|
504
702
|
GlobalLayoutContentBody,
|
|
505
703
|
GlobalLayoutMobileHeader,
|
|
506
704
|
};
|
|
@@ -513,6 +711,7 @@ export type {
|
|
|
513
711
|
GlobalLayoutContentHeaderProps,
|
|
514
712
|
GlobalLayoutBackLinkProps,
|
|
515
713
|
GlobalLayoutSubtitleProps,
|
|
714
|
+
GlobalLayoutImageProps,
|
|
516
715
|
GlobalLayoutContentBodyProps,
|
|
517
716
|
GlobalLayoutMobileHeaderProps,
|
|
518
717
|
};
|