@ngrok/mantle 0.82.1 → 0.83.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/dist/accordion.d.ts +7 -7
- package/dist/agent.json +3 -1
- package/dist/{alert-BWwNPOMI.d.ts → alert-B1HXfkYn.d.ts} +9 -7
- package/dist/{alert-vwFd7qdp.js → alert-BuG2qS5l.js} +1 -1
- package/dist/alert-center.d.ts +3 -3
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +18 -18
- package/dist/alert.d.ts +1 -1
- package/dist/alert.js +1 -1
- package/dist/anchor.d.ts +2 -2
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +67 -19
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +319 -0
- package/dist/avatar.js +1 -0
- package/dist/bar-chart.d.ts +73 -20
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +50 -17
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only.d.ts +3 -3
- package/dist/{button-C-gMbPso.d.ts → button-BIf69CSV.d.ts} +2 -2
- package/dist/button-BLDjW1u9.js +1 -0
- package/dist/{button-IlxHhjPK.js → button-CCkGqE1t.js} +1 -1
- package/dist/{button-C7vAl6lS.d.ts → button-DJ7AAgII.d.ts} +4 -6
- package/dist/{button-DARFK2KJ.d.ts → button-PoIujPMX.d.ts} +2 -2
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +15 -15
- package/dist/{chart-1cVjAcj8.d.ts → chart-0zcFJh4n.d.ts} +75 -22
- package/dist/chart-DBxT9BNl.js +2 -0
- package/dist/{choice-BNRQXszu.d.ts → choice-CVdQrs-m.d.ts} +118 -6
- package/dist/choice.d.ts +1 -1
- package/dist/{code-block-C9uaM9-V.js → code-block-CIE0F2fu.js} +1 -1
- package/dist/{code-block-B6OlZrSI.d.ts → code-block-CZWPrV4k.d.ts} +3 -3
- package/dist/code-block.d.ts +10 -7
- package/dist/code-block.js +2 -2
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/combobox.d.ts +8 -9
- package/dist/command.d.ts +668 -106
- package/dist/command.js +1 -1
- package/dist/data-table.d.ts +6 -6
- package/dist/data-table.js +1 -1
- package/dist/dialog-32Hq6w6P.js +1 -0
- package/dist/dialog-B6h1BCDL.d.ts +895 -0
- package/dist/dialog.d.ts +2 -805
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-BcALUQMp.d.ts +1 -0
- package/dist/{dropdown-menu-D6pMAY7I.d.ts → dropdown-menu-DZOfj6HB.d.ts} +1 -1
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/field.d.ts +5 -5
- package/dist/field.js +1 -1
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +16 -17
- package/dist/hooks.js +1 -1
- package/dist/icons-DEVx1oP9.js +1 -0
- package/dist/icons.d.ts +7 -6
- package/dist/icons.js +1 -1
- package/dist/{in-view-DDEGUKDR.d.ts → in-view-gxyc9Q1_.d.ts} +1 -1
- package/dist/{input-BuYDU6CF.d.ts → input-DpnC3Xgj.d.ts} +2 -2
- package/dist/input.d.ts +1 -1
- package/dist/kbd.d.ts +1 -1
- package/dist/line-chart.d.ts +60 -13
- package/dist/line-chart.js +1 -1
- package/dist/list-CwL23L_B.js +1 -0
- package/dist/list.d.ts +2 -2
- package/dist/list.js +1 -1
- package/dist/llms.txt +3 -1
- package/dist/mantle-dark-high-contrast.css +30 -17
- package/dist/mantle-dark.css +48 -13
- package/dist/mantle-light-high-contrast.css +33 -15
- package/dist/mantle.css +436 -26
- package/dist/media-object.d.ts +5 -1
- package/dist/multi-select.d.ts +7 -7
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +4 -4
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +2 -2
- package/dist/pagination.js +1 -1
- package/dist/progress.d.ts +4 -4
- package/dist/qr-code.d.ts +2 -2
- package/dist/sandbar.d.ts +471 -0
- package/dist/sandbar.js +1 -0
- package/dist/sandboxed-on-click.d.ts +4 -6
- package/dist/scatter-plot.d.ts +69 -24
- package/dist/scatter-plot.js +1 -1
- package/dist/{select-0z7HVS6r.d.ts → select-DVHmgih8.d.ts} +13 -7
- package/dist/select-LK9NX-vV.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +4 -4
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-B5UmkVRL.d.ts → separator-CNDs98Dv.d.ts} +2 -2
- package/dist/separator.d.ts +1 -1
- package/dist/{sheet-BxvTfPLM.js → sheet-BOSknSN9.js} +1 -1
- package/dist/sheet.d.ts +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +347 -366
- package/dist/sidebar.js +1 -1
- package/dist/slider.d.ts +1 -1
- package/dist/split-button.d.ts +12 -12
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +2 -1
- package/dist/{table-CGxJwtbL.js → table-C_Nm_RSV.js} +1 -1
- package/dist/{table-CZBYEmyK.d.ts → table-D51ZtV4U.d.ts} +18 -8
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +8 -13
- package/dist/tabs.js +1 -1
- package/dist/{theme-FbfjYiD3.d.ts → theme-6OxNhf6l.d.ts} +6 -6
- package/dist/theme-CVfq037P.js +1 -0
- package/dist/theme-switcher.d.ts +3 -3
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +86 -23
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +9 -9
- package/dist/toast.js +1 -1
- package/dist/{tooltip-mrpLz4DZ.d.ts → tooltip-DuXGxIse.d.ts} +6 -4
- package/dist/tooltip.d.ts +1 -1
- package/dist/use-breakpoint-Dqu12Szq.js +1 -0
- package/dist/use-callback-ref-IYti9y7x.js +1 -0
- package/dist/use-is-apple-platform-Cxwrb86L.js +1 -0
- package/dist/use-matches-media-query-Bd_GhhVd.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/package.json +5 -3
- package/dist/button-DvHMWAPl.js +0 -1
- package/dist/chart-B3pAvmkk.js +0 -2
- package/dist/dialog-DozL6n-F.js +0 -1
- package/dist/dropdown-menu-BbbQuae2.d.ts +0 -1
- package/dist/icons-Bb_zF2OV.js +0 -1
- package/dist/list-CJABVHwi.js +0 -1
- package/dist/platform-BVD3gpKD.js +0 -1
- package/dist/select-BReznXaw.js +0 -1
- package/dist/theme-BorfgnNh.js +0 -1
- package/dist/use-breakpoint-Wd7_5-Mu.js +0 -1
- package/dist/use-matches-media-query-CMSxHR9n.js +0 -1
package/dist/sidebar.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as WithAsChild
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
2
|
import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
|
|
3
|
-
import { n as IconButtonProps } from "./button-
|
|
4
|
-
import { n as Separator } from "./separator-
|
|
5
|
-
import { t as Tooltip } from "./tooltip-
|
|
3
|
+
import { n as IconButtonProps } from "./button-DJ7AAgII.js";
|
|
4
|
+
import { n as Separator } from "./separator-CNDs98Dv.js";
|
|
5
|
+
import { t as Tooltip } from "./tooltip-DuXGxIse.js";
|
|
6
6
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
7
7
|
//#region src/components/sidebar/sidebar.d.ts
|
|
8
8
|
/**
|
|
@@ -79,6 +79,12 @@ type SidebarState = {
|
|
|
79
79
|
* triggers.
|
|
80
80
|
*/
|
|
81
81
|
navId: string;
|
|
82
|
+
/**
|
|
83
|
+
* Whether this root owns the `⌘B` / `Ctrl+B` shortcut. `Sidebar.Trigger`
|
|
84
|
+
* reads it to decide whether its tooltip advertises the chord, so the hint
|
|
85
|
+
* can never name a binding that is not bound.
|
|
86
|
+
*/
|
|
87
|
+
keyboardShortcut: boolean;
|
|
82
88
|
};
|
|
83
89
|
/**
|
|
84
90
|
* Read the nearest `Sidebar.Root` state. Throws when called outside a
|
|
@@ -162,7 +168,7 @@ type SidebarRootProps = {
|
|
|
162
168
|
};
|
|
163
169
|
/**
|
|
164
170
|
* The state owner for a sidebar. Renders no DOM of its own (like
|
|
165
|
-
* `Tooltip.Root`) — it
|
|
171
|
+
* `Tooltip.Root`) — it carries the expanded/collapsed and mobile-sheet state
|
|
166
172
|
* to every part below it, so `Sidebar.Trigger` can live anywhere in the tree
|
|
167
173
|
* (for example inside an `AppLayout.Header`) without coupling the app shell
|
|
168
174
|
* to the sidebar.
|
|
@@ -208,9 +214,10 @@ type SidebarRootProps = {
|
|
|
208
214
|
* <DropdownMenu.Root>
|
|
209
215
|
* <DropdownMenu.Trigger asChild>
|
|
210
216
|
* <Sidebar.SwitcherTrigger>
|
|
211
|
-
* <
|
|
217
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
218
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
219
|
+
* </Avatar.Root>
|
|
212
220
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
213
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
214
221
|
* </Sidebar.SwitcherTrigger>
|
|
215
222
|
* </DropdownMenu.Trigger>
|
|
216
223
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -266,7 +273,7 @@ type SidebarNavProps = ComponentProps<"div"> & WithDataSlot;
|
|
|
266
273
|
* | Data Attribute | Value | Description |
|
|
267
274
|
* | --- | --- | --- |
|
|
268
275
|
* | `data-state` | `"expanded"` \| `"collapsed"` | On the desktop panel surface. Mirrors the root's expanded state and drives the width collapse to the icon rail; descendant parts style off it with `group-data-[state=collapsed]/sidebar-nav:`. |
|
|
269
|
-
* | `data-hydrated` | present after hydration | Presence-only, desktop panel surface. The CSS-side twin of the `isHydrated` gate: descendant collapse transitions are enabled only under `group-data-
|
|
276
|
+
* | `data-hydrated` | present after hydration | Presence-only, desktop panel surface. The CSS-side twin of the `isHydrated` gate: descendant collapse transitions are enabled only under `group-data-hydrated/sidebar-nav:`, so an SSR state correction snaps instead of animating on page load. |
|
|
270
277
|
* | `data-mobile` | present in the mobile sheet | Presence-only. Marks the `Sheet.Content` presentation used below the root's `mobileBreakpoint`. |
|
|
271
278
|
* | `data-state` | `"open"` \| `"closed"` | In the mobile sheet only, where the panel *is* the `Sheet`'s Radix dialog content element and Radix owns the attribute — the sheet's open/close animation state, not the desktop expanded state. Consumers style against it too. |
|
|
272
279
|
*
|
|
@@ -308,9 +315,10 @@ type SidebarNavProps = ComponentProps<"div"> & WithDataSlot;
|
|
|
308
315
|
* <DropdownMenu.Root>
|
|
309
316
|
* <DropdownMenu.Trigger asChild>
|
|
310
317
|
* <Sidebar.SwitcherTrigger>
|
|
311
|
-
* <
|
|
318
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
319
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
320
|
+
* </Avatar.Root>
|
|
312
321
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
313
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
314
322
|
* </Sidebar.SwitcherTrigger>
|
|
315
323
|
* </DropdownMenu.Trigger>
|
|
316
324
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -349,12 +357,24 @@ type SidebarTriggerProps = Omit<IconButtonProps, "appearance" | "asChild" | "chi
|
|
|
349
357
|
*/
|
|
350
358
|
intent?: IconButtonProps["intent"];
|
|
351
359
|
/**
|
|
352
|
-
* The accessible name for the trigger
|
|
353
|
-
*
|
|
360
|
+
* The accessible name for the trigger, and what its tooltip says. Visually
|
|
361
|
+
* hidden on the button itself but announced to assistive technology.
|
|
362
|
+
* Override it for localization.
|
|
354
363
|
*
|
|
355
364
|
* @default "Toggle Sidebar"
|
|
356
365
|
*/
|
|
357
366
|
label?: string;
|
|
367
|
+
/**
|
|
368
|
+
* The keyboard chord that also toggles the sidebar, rendered after the label
|
|
369
|
+
* in the tooltip — usually `<><MetaKey /><Kbd>B</Kbd></>`.
|
|
370
|
+
*
|
|
371
|
+
* Ignored under `Sidebar.Root keyboardShortcut={false}`, so the tooltip can
|
|
372
|
+
* never name a binding that is not bound. Passed rather than built in so the
|
|
373
|
+
* sidebar does not have to reach into another component for the platform
|
|
374
|
+
* modifier glyph — `aria-keyshortcuts` is stamped either way, which is also
|
|
375
|
+
* why the chips render `aria-hidden`.
|
|
376
|
+
*/
|
|
377
|
+
shortcut?: ReactNode;
|
|
358
378
|
};
|
|
359
379
|
/**
|
|
360
380
|
* The button that toggles the sidebar: the mobile sheet below the root's
|
|
@@ -364,11 +384,23 @@ type SidebarTriggerProps = Omit<IconButtonProps, "appearance" | "asChild" | "chi
|
|
|
364
384
|
* `AppLayout.Header`) — it must stay visible at every breakpoint where the
|
|
365
385
|
* sidebar can collapse, or users have no way to reopen it.
|
|
366
386
|
*
|
|
387
|
+
* The button is icon-only at every breakpoint, so it always renders a tooltip
|
|
388
|
+
* showing `label` (plus the optional `shortcut` chips). **That means it requires
|
|
389
|
+
* a `TooltipProvider` ancestor, like any `Tooltip.Root`, and throws without
|
|
390
|
+
* one** — mount a single provider at your app root, decoupled from the sidebar,
|
|
391
|
+
* so the app-wide delay and hover settings stay app-wide.
|
|
392
|
+
*
|
|
393
|
+
* It also stamps `aria-keyshortcuts` for the `⌘B` / `Ctrl+B` chord the root
|
|
394
|
+
* binds, resolved after hydration: the server cannot know the host, so the
|
|
395
|
+
* first paint is the non-Apple answer. Both the attribute and the chips are
|
|
396
|
+
* omitted under `Sidebar.Root keyboardShortcut={false}`.
|
|
397
|
+
*
|
|
367
398
|
* **Data attributes:**
|
|
368
399
|
*
|
|
369
400
|
* | Data Attribute | Value | Description |
|
|
370
401
|
* | --- | --- | --- |
|
|
371
402
|
* | `data-state` | `"expanded"` \| `"collapsed"` | Mirrors what the trigger toggles: the mobile sheet below the root's `mobileBreakpoint`, the desktop panel otherwise. Pairs with `aria-expanded`. |
|
|
403
|
+
* | `data-slot` | `"sidebar-trigger-tooltip"` | On the tooltip surface, not the button — the styling hook for the label-and-chord popup this part renders. |
|
|
372
404
|
* | `data-appearance` | `"ghost"` \| `"outlined"` | Read, not stamped: the underlying `IconButton` reflects its `appearance`, which this part defaults to `"ghost"`. |
|
|
373
405
|
* | `data-intent` | `"accent"` \| `"danger"` \| `"neutral"` | Read, not stamped: the underlying `IconButton` reflects its `intent`, which this part defaults to `"neutral"`. |
|
|
374
406
|
* | `data-size` | `"xs"` \| `"sm"` \| `"md"` \| `"lg"` \| `"xl"` | Read, not stamped: the underlying `IconButton` reflects its `size` and its own `"md"` default. |
|
|
@@ -411,9 +443,10 @@ type SidebarTriggerProps = Omit<IconButtonProps, "appearance" | "asChild" | "chi
|
|
|
411
443
|
* <DropdownMenu.Root>
|
|
412
444
|
* <DropdownMenu.Trigger asChild>
|
|
413
445
|
* <Sidebar.SwitcherTrigger>
|
|
414
|
-
* <
|
|
446
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
447
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
448
|
+
* </Avatar.Root>
|
|
415
449
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
416
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
417
450
|
* </Sidebar.SwitcherTrigger>
|
|
418
451
|
* </DropdownMenu.Trigger>
|
|
419
452
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -440,7 +473,7 @@ type SidebarTriggerProps = Omit<IconButtonProps, "appearance" | "asChild" | "chi
|
|
|
440
473
|
* </Sidebar.Root>
|
|
441
474
|
* ```
|
|
442
475
|
*/
|
|
443
|
-
declare const Trigger: ({ appearance, "data-slot": dataSlot, icon, intent, label, onClick, ...props }: SidebarTriggerProps) => import("react").JSX.Element;
|
|
476
|
+
declare const Trigger: ({ appearance, "data-slot": dataSlot, icon, intent, label, onClick, shortcut, ...props }: SidebarTriggerProps) => import("react").JSX.Element;
|
|
444
477
|
type SidebarHeaderProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
445
478
|
/**
|
|
446
479
|
* The top container of a `Sidebar.Nav`, pinned above the scrollable
|
|
@@ -497,9 +530,10 @@ type SidebarHeaderProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
|
497
530
|
* <DropdownMenu.Root>
|
|
498
531
|
* <DropdownMenu.Trigger asChild>
|
|
499
532
|
* <Sidebar.SwitcherTrigger>
|
|
500
|
-
* <
|
|
533
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
534
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
535
|
+
* </Avatar.Root>
|
|
501
536
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
502
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
503
537
|
* </Sidebar.SwitcherTrigger>
|
|
504
538
|
* </DropdownMenu.Trigger>
|
|
505
539
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -557,9 +591,10 @@ type SidebarBodyProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
|
557
591
|
* <DropdownMenu.Root>
|
|
558
592
|
* <DropdownMenu.Trigger asChild>
|
|
559
593
|
* <Sidebar.SwitcherTrigger>
|
|
560
|
-
* <
|
|
594
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
595
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
596
|
+
* </Avatar.Root>
|
|
561
597
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
562
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
563
598
|
* </Sidebar.SwitcherTrigger>
|
|
564
599
|
* </DropdownMenu.Trigger>
|
|
565
600
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -575,8 +610,8 @@ type SidebarFooterProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
|
575
610
|
/**
|
|
576
611
|
* The bottom container of a `Sidebar.Nav`, pinned below the scrollable
|
|
577
612
|
* `Sidebar.Body`. Typically holds cross-product items and the account/user
|
|
578
|
-
* switcher row (`Sidebar.SwitcherTrigger` with
|
|
579
|
-
*
|
|
613
|
+
* switcher row (`Sidebar.SwitcherTrigger` with an
|
|
614
|
+
* [Avatar](https://mantle.ngrok.com/components/data-display/avatar)).
|
|
580
615
|
*
|
|
581
616
|
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarfooter
|
|
582
617
|
*
|
|
@@ -616,9 +651,10 @@ type SidebarFooterProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
|
616
651
|
* <DropdownMenu.Root>
|
|
617
652
|
* <DropdownMenu.Trigger asChild>
|
|
618
653
|
* <Sidebar.SwitcherTrigger>
|
|
619
|
-
* <
|
|
654
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
655
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
656
|
+
* </Avatar.Root>
|
|
620
657
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
621
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
622
658
|
* </Sidebar.SwitcherTrigger>
|
|
623
659
|
* </DropdownMenu.Trigger>
|
|
624
660
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -675,9 +711,10 @@ type SidebarGroupProps = ComponentProps<"div"> & WithAsChild & WithDataSlot;
|
|
|
675
711
|
* <DropdownMenu.Root>
|
|
676
712
|
* <DropdownMenu.Trigger asChild>
|
|
677
713
|
* <Sidebar.SwitcherTrigger>
|
|
678
|
-
* <
|
|
714
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
715
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
716
|
+
* </Avatar.Root>
|
|
679
717
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
680
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
681
718
|
* </Sidebar.SwitcherTrigger>
|
|
682
719
|
* </DropdownMenu.Trigger>
|
|
683
720
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -735,9 +772,10 @@ type SidebarGroupLabelProps = ComponentProps<"div"> & WithAsChild & WithDataSlot
|
|
|
735
772
|
* <DropdownMenu.Root>
|
|
736
773
|
* <DropdownMenu.Trigger asChild>
|
|
737
774
|
* <Sidebar.SwitcherTrigger>
|
|
738
|
-
* <
|
|
775
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
776
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
777
|
+
* </Avatar.Root>
|
|
739
778
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
740
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
741
779
|
* </Sidebar.SwitcherTrigger>
|
|
742
780
|
* </DropdownMenu.Trigger>
|
|
743
781
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -793,9 +831,10 @@ type SidebarListProps = ComponentProps<"ul"> & WithAsChild & WithDataSlot;
|
|
|
793
831
|
* <DropdownMenu.Root>
|
|
794
832
|
* <DropdownMenu.Trigger asChild>
|
|
795
833
|
* <Sidebar.SwitcherTrigger>
|
|
796
|
-
* <
|
|
834
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
835
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
836
|
+
* </Avatar.Root>
|
|
797
837
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
798
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
799
838
|
* </Sidebar.SwitcherTrigger>
|
|
800
839
|
* </DropdownMenu.Trigger>
|
|
801
840
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -851,9 +890,10 @@ type SidebarItemProps = ComponentProps<"li"> & WithAsChild & WithDataSlot;
|
|
|
851
890
|
* <DropdownMenu.Root>
|
|
852
891
|
* <DropdownMenu.Trigger asChild>
|
|
853
892
|
* <Sidebar.SwitcherTrigger>
|
|
854
|
-
* <
|
|
893
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
894
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
895
|
+
* </Avatar.Root>
|
|
855
896
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
856
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
857
897
|
* </Sidebar.SwitcherTrigger>
|
|
858
898
|
* </DropdownMenu.Trigger>
|
|
859
899
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -952,9 +992,10 @@ type SidebarItemButtonProps = ComponentProps<"button"> & WithAsChild & WithDataS
|
|
|
952
992
|
* <DropdownMenu.Root>
|
|
953
993
|
* <DropdownMenu.Trigger asChild>
|
|
954
994
|
* <Sidebar.SwitcherTrigger>
|
|
955
|
-
* <
|
|
995
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
996
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
997
|
+
* </Avatar.Root>
|
|
956
998
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
957
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
958
999
|
* </Sidebar.SwitcherTrigger>
|
|
959
1000
|
* </DropdownMenu.Trigger>
|
|
960
1001
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -966,6 +1007,132 @@ type SidebarItemButtonProps = ComponentProps<"button"> & WithAsChild & WithDataS
|
|
|
966
1007
|
* ```
|
|
967
1008
|
*/
|
|
968
1009
|
declare const ItemButton: ({ asChild, children, className, current, "data-slot": dataSlot, type, ...props }: SidebarItemButtonProps) => import("react").JSX.Element;
|
|
1010
|
+
type SidebarSearchTriggerProps = ComponentProps<"button"> & WithDataSlot & ({
|
|
1011
|
+
/**
|
|
1012
|
+
* Compose the search row's styling onto your own element. Then the
|
|
1013
|
+
* row's entire content is yours — including any shortcut hint, which
|
|
1014
|
+
* `shortcut` cannot add to a cloned child.
|
|
1015
|
+
*/
|
|
1016
|
+
asChild: true;
|
|
1017
|
+
shortcut?: never;
|
|
1018
|
+
} | {
|
|
1019
|
+
/**
|
|
1020
|
+
* Compose the search row's styling onto your own element. Then the
|
|
1021
|
+
* row's entire content is yours — including any shortcut hint, which
|
|
1022
|
+
* `shortcut` cannot add to a cloned child.
|
|
1023
|
+
*/
|
|
1024
|
+
asChild?: false;
|
|
1025
|
+
/**
|
|
1026
|
+
* The keyboard hint for the chord that opens the same palette — usually
|
|
1027
|
+
* `<><MetaKey /><Kbd>K</Kbd></>`.
|
|
1028
|
+
*
|
|
1029
|
+
* Rendered pinned to the end of the row and **revealed only on hover or
|
|
1030
|
+
* keyboard focus**, so the row reads as a quiet navigation item at rest
|
|
1031
|
+
* and teaches the chord at the moment a user reaches for it. It is
|
|
1032
|
+
* `aria-hidden` and dropped outright in the collapsed rail: the chord is
|
|
1033
|
+
* announced by the `aria-keyshortcuts` that `Command.SearchTrigger`
|
|
1034
|
+
* adds, so repeating it here would announce it twice.
|
|
1035
|
+
*
|
|
1036
|
+
* Passed rather than built in, so the sidebar does not have to know
|
|
1037
|
+
* which chord your palette binds.
|
|
1038
|
+
*/
|
|
1039
|
+
shortcut?: ReactNode;
|
|
1040
|
+
});
|
|
1041
|
+
/**
|
|
1042
|
+
* The search row — the row that opens a search or command palette.
|
|
1043
|
+
*
|
|
1044
|
+
* Put it at the top of `Sidebar.Body`, above the first `Sidebar.Group`: it
|
|
1045
|
+
* needs no height change, and it lands in the same `px-3` gutter as the
|
|
1046
|
+
* navigation rows, so it shares their column in both panel states.
|
|
1047
|
+
*
|
|
1048
|
+
* `Sidebar.Header`, under the switcher, also works — the header's own `gap-2`
|
|
1049
|
+
* sets the spacing — at the cost of a taller header. That height is a fixed one
|
|
1050
|
+
* row so it can align with an `AppLayout.Header` toolbar, so a stack of two
|
|
1051
|
+
* needs `--sidebar-header-height` raised on a **common ancestor of both rows**
|
|
1052
|
+
* (`<AppLayout.Root className="[--sidebar-header-height:6rem]">`). Setting it on
|
|
1053
|
+
* `Sidebar.Nav` only looks right: custom properties inherit downward, so
|
|
1054
|
+
* `AppLayout.Header` would keep the `4.5rem` default and the two rows would stop
|
|
1055
|
+
* being center-aligned.
|
|
1056
|
+
*
|
|
1057
|
+
* It is deliberately a navigation row and not a text field. The row is the same
|
|
1058
|
+
* chrome as a `Sidebar.ItemButton` — same height, padding, radius, hover, and
|
|
1059
|
+
* the same 28px chip in the collapsed icon rail — because a search entry point
|
|
1060
|
+
* in a sidebar is one of the rows, not a form control wedged among them. The
|
|
1061
|
+
* `shortcut` hint appears on hover or focus and is otherwise invisible, which
|
|
1062
|
+
* keeps the resting panel quiet.
|
|
1063
|
+
*
|
|
1064
|
+
* A styled button only — it is not wired to any state. Compose it with
|
|
1065
|
+
* [`Command.SearchTrigger`](https://mantle.ngrok.com/components/navigation/command#commandsearchtrigger),
|
|
1066
|
+
* which supplies the dialog wiring, `aria-keyshortcuts`, and the behavior that
|
|
1067
|
+
* makes typing or pasting into the row open the palette with that text already
|
|
1068
|
+
* in the query. Wrap the pair in `Sidebar.Tooltip` so the row keeps a visible
|
|
1069
|
+
* label once the panel collapses.
|
|
1070
|
+
*
|
|
1071
|
+
* Like every row, the rail clips everything after the leading icon rather than
|
|
1072
|
+
* removing it, so the button keeps its accessible name as a chip.
|
|
1073
|
+
*
|
|
1074
|
+
* **Data attributes:**
|
|
1075
|
+
*
|
|
1076
|
+
* | Data Attribute | Value | Description |
|
|
1077
|
+
* | --- | --- | --- |
|
|
1078
|
+
* | `data-state` | `"open"` \| `"closed"` | **Read, not stamped** — supplied by the composing `Command.SearchTrigger` / `Dialog.Trigger`. The row stays highlighted while its palette is open. |
|
|
1079
|
+
*
|
|
1080
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarsearchtrigger
|
|
1081
|
+
*
|
|
1082
|
+
* @example
|
|
1083
|
+
* ```tsx
|
|
1084
|
+
* <Sidebar.Root>
|
|
1085
|
+
* <Sidebar.Nav aria-label="Main">
|
|
1086
|
+
* <Sidebar.Header>
|
|
1087
|
+
* <Sidebar.SwitcherTrigger>
|
|
1088
|
+
* <GlobeIcon />
|
|
1089
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
1090
|
+
* </Sidebar.SwitcherTrigger>
|
|
1091
|
+
* </Sidebar.Header>
|
|
1092
|
+
* <Sidebar.Body>
|
|
1093
|
+
* <Command.DialogRoot>
|
|
1094
|
+
* <Sidebar.Tooltip label="Search">
|
|
1095
|
+
* <Command.SearchTrigger>
|
|
1096
|
+
* <Sidebar.SearchTrigger
|
|
1097
|
+
* shortcut={
|
|
1098
|
+
* <>
|
|
1099
|
+
* <MetaKey />
|
|
1100
|
+
* <Kbd>K</Kbd>
|
|
1101
|
+
* </>
|
|
1102
|
+
* }
|
|
1103
|
+
* >
|
|
1104
|
+
* <MagnifyingGlassIcon />
|
|
1105
|
+
* <span className="min-w-0 flex-1 truncate">Search</span>
|
|
1106
|
+
* </Sidebar.SearchTrigger>
|
|
1107
|
+
* </Command.SearchTrigger>
|
|
1108
|
+
* </Sidebar.Tooltip>
|
|
1109
|
+
* <Command.DialogContent>
|
|
1110
|
+
* <Command.Input placeholder="Search endpoints, agents, and settings..." />
|
|
1111
|
+
* <Command.List>
|
|
1112
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
1113
|
+
* </Command.List>
|
|
1114
|
+
* </Command.DialogContent>
|
|
1115
|
+
* </Command.DialogRoot>
|
|
1116
|
+
* <Sidebar.Group>
|
|
1117
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
1118
|
+
* <Sidebar.List>
|
|
1119
|
+
* <Sidebar.Item>
|
|
1120
|
+
* <Sidebar.ItemButton asChild current>
|
|
1121
|
+
* <a href="/endpoints">
|
|
1122
|
+
* <GraphIcon />
|
|
1123
|
+
* Endpoints
|
|
1124
|
+
* </a>
|
|
1125
|
+
* </Sidebar.ItemButton>
|
|
1126
|
+
* </Sidebar.Item>
|
|
1127
|
+
* </Sidebar.List>
|
|
1128
|
+
* </Sidebar.Group>
|
|
1129
|
+
* </Sidebar.Body>
|
|
1130
|
+
* </Sidebar.Nav>
|
|
1131
|
+
* <Sidebar.Trigger />
|
|
1132
|
+
* </Sidebar.Root>
|
|
1133
|
+
* ```
|
|
1134
|
+
*/
|
|
1135
|
+
declare const SearchTrigger: ({ asChild, children, className, "data-slot": dataSlot, shortcut, type, ...props }: SidebarSearchTriggerProps) => import("react").JSX.Element;
|
|
969
1136
|
type SidebarSwitcherTriggerProps = ComponentProps<"button"> & WithAsChild & WithDataSlot;
|
|
970
1137
|
/**
|
|
971
1138
|
* The styled row for the sidebar's switchers: the app/product switcher in
|
|
@@ -1038,9 +1205,10 @@ type SidebarSwitcherTriggerProps = ComponentProps<"button"> & WithAsChild & With
|
|
|
1038
1205
|
* <DropdownMenu.Root>
|
|
1039
1206
|
* <DropdownMenu.Trigger asChild>
|
|
1040
1207
|
* <Sidebar.SwitcherTrigger>
|
|
1041
|
-
* <
|
|
1208
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1209
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1210
|
+
* </Avatar.Root>
|
|
1042
1211
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1043
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1044
1212
|
* </Sidebar.SwitcherTrigger>
|
|
1045
1213
|
* </DropdownMenu.Trigger>
|
|
1046
1214
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1073,6 +1241,18 @@ type SidebarTooltipProps = Omit<ComponentProps<typeof Tooltip.Content>, "childre
|
|
|
1073
1241
|
* visible one, so this is what a sighted pointer user reads.
|
|
1074
1242
|
*/
|
|
1075
1243
|
label: ReactNode;
|
|
1244
|
+
/**
|
|
1245
|
+
* The keyboard chord that reaches the same row, rendered after the label —
|
|
1246
|
+
* usually `<><MetaKey /><Kbd>K</Kbd></>`. The rail hides the row's own
|
|
1247
|
+
* shortcut hint along with its label, so the tooltip is where a pointer user
|
|
1248
|
+
* can still learn the chord. The chips are `aria-hidden`: a tooltip is wired
|
|
1249
|
+
* as its row's `aria-describedby`, and the chord is already announced by the
|
|
1250
|
+
* row's `aria-keyshortcuts`.
|
|
1251
|
+
*
|
|
1252
|
+
* Passed rather than built in, so the sidebar does not have to know which
|
|
1253
|
+
* chord the row's palette or action binds.
|
|
1254
|
+
*/
|
|
1255
|
+
shortcut?: ReactNode;
|
|
1076
1256
|
/**
|
|
1077
1257
|
* Which side of the row the tooltip opens on. The rail sits at the inline
|
|
1078
1258
|
* start of the viewport, so the default points the tooltip away from it.
|
|
@@ -1090,12 +1270,20 @@ type SidebarTooltipProps = Omit<ComponentProps<typeof Tooltip.Content>, "childre
|
|
|
1090
1270
|
* not removed), which serves screen-reader users but leaves a sighted pointer
|
|
1091
1271
|
* user with an unlabeled icon column. This restores the label for them without
|
|
1092
1272
|
* duplicating it for anyone else: expanded rows already read their own text, and
|
|
1093
|
-
* the mobile sheet shows full labels, so the
|
|
1094
|
-
*
|
|
1273
|
+
* the mobile sheet shows full labels, so the collapsed desktop rail is the only
|
|
1274
|
+
* state that shows a label at all.
|
|
1275
|
+
*
|
|
1276
|
+
* It opens the way any tooltip does — the pointer entering the row, or focus
|
|
1277
|
+
* reaching it — and the rail state vetoes it: the expanded panel and the mobile
|
|
1278
|
+
* sheet keep the row at `data-state="closed"` with no `aria-describedby`, and
|
|
1279
|
+
* toggling the rail dismisses whatever was showing, so collapsing the panel
|
|
1280
|
+
* cannot pop a label under a pointer that has already moved on.
|
|
1095
1281
|
*
|
|
1096
1282
|
* **Requires a `TooltipProvider` ancestor**, like any `Tooltip.Root` — mount one
|
|
1097
|
-
* at your app root. This part deliberately does not
|
|
1098
|
-
*
|
|
1283
|
+
* at your app root. This part deliberately does not mount its own, so the
|
|
1284
|
+
* app-wide tooltip delay stays app-wide rather than being overridden per row.
|
|
1285
|
+
* The one provider setting it does override is hoverable content: a rail label
|
|
1286
|
+
* holds nothing to hover into, so the pointer leaving the row closes it.
|
|
1099
1287
|
*
|
|
1100
1288
|
* It composes with a menu trigger: nest `DropdownMenu.Root >
|
|
1101
1289
|
* Sidebar.Tooltip > DropdownMenu.Trigger asChild > Sidebar.ItemButton` for a
|
|
@@ -1152,7 +1340,7 @@ type SidebarTooltipProps = Omit<ComponentProps<typeof Tooltip.Content>, "childre
|
|
|
1152
1340
|
* </TooltipProvider>
|
|
1153
1341
|
* ```
|
|
1154
1342
|
*/
|
|
1155
|
-
declare const SidebarTooltip: ({ children, "data-slot": dataSlot, label, side, ...props }: SidebarTooltipProps) => import("react").JSX.Element;
|
|
1343
|
+
declare const SidebarTooltip: ({ children, "data-slot": dataSlot, label, shortcut, side, ...props }: SidebarTooltipProps) => import("react").JSX.Element;
|
|
1156
1344
|
type SidebarSeparatorProps = ComponentProps<typeof Separator> & WithDataSlot;
|
|
1157
1345
|
/**
|
|
1158
1346
|
* An inset hairline between sidebar regions. Composes the mantle `Separator`,
|
|
@@ -1200,9 +1388,10 @@ type SidebarSeparatorProps = ComponentProps<typeof Separator> & WithDataSlot;
|
|
|
1200
1388
|
* <DropdownMenu.Root>
|
|
1201
1389
|
* <DropdownMenu.Trigger asChild>
|
|
1202
1390
|
* <Sidebar.SwitcherTrigger>
|
|
1203
|
-
* <
|
|
1391
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1392
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1393
|
+
* </Avatar.Root>
|
|
1204
1394
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1205
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1206
1395
|
* </Sidebar.SwitcherTrigger>
|
|
1207
1396
|
* </DropdownMenu.Trigger>
|
|
1208
1397
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1214,183 +1403,6 @@ type SidebarSeparatorProps = ComponentProps<typeof Separator> & WithDataSlot;
|
|
|
1214
1403
|
* ```
|
|
1215
1404
|
*/
|
|
1216
1405
|
declare const SidebarSeparator: ({ className, "data-slot": dataSlot, ...props }: SidebarSeparatorProps) => import("react").JSX.Element;
|
|
1217
|
-
/**
|
|
1218
|
-
* The props for `Sidebar.AccountAvatar`.
|
|
1219
|
-
*
|
|
1220
|
-
* `children` is valid only with `asChild`, where it is the element the avatar
|
|
1221
|
-
* renders as instead of its own `<div>` — pass an empty one, e.g. `<span />`
|
|
1222
|
-
* when the avatar sits inside a `<button>` (which may not contain a `<div>`).
|
|
1223
|
-
* The initials are derived from `accountName`, which a consumer cannot compute,
|
|
1224
|
-
* so they render *inside* that element in place of its own children.
|
|
1225
|
-
*/
|
|
1226
|
-
type SidebarAccountAvatarProps = Omit<ComponentProps<"div">, "children"> & SelfClosingWithAsChild & WithDataSlot & {
|
|
1227
|
-
/**
|
|
1228
|
-
* The account's stable identifier. Used to deterministically select a
|
|
1229
|
-
* background swatch from the design system's palette so the same account
|
|
1230
|
-
* always gets the same color.
|
|
1231
|
-
*/
|
|
1232
|
-
accountId: string | undefined;
|
|
1233
|
-
/**
|
|
1234
|
-
* The account's display name. The first one or two letters become the
|
|
1235
|
-
* avatar's initials. Falls back to `?` when the name is empty.
|
|
1236
|
-
*/
|
|
1237
|
-
accountName: string | undefined;
|
|
1238
|
-
};
|
|
1239
|
-
/**
|
|
1240
|
-
* A small rounded-square avatar that represents an account (workspace,
|
|
1241
|
-
* organization, etc.). The background color is derived deterministically from
|
|
1242
|
-
* the `accountId` so an account's swatch is stable across renders, sessions,
|
|
1243
|
-
* and devices.
|
|
1244
|
-
*
|
|
1245
|
-
* Accounts are rendered as squares to differentiate them visually from users,
|
|
1246
|
-
* which use a circular `Sidebar.UserAvatar`.
|
|
1247
|
-
*
|
|
1248
|
-
* Pass `asChild` with a single empty element to swap the `<div>` it renders —
|
|
1249
|
-
* a `<span />` inside a `<button>`, or a link. The initials are derived from
|
|
1250
|
-
* `accountName`, so they render inside the swapped element; anything that
|
|
1251
|
-
* element carried of its own is replaced.
|
|
1252
|
-
*
|
|
1253
|
-
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebaraccountavatar
|
|
1254
|
-
*
|
|
1255
|
-
* @example
|
|
1256
|
-
* ```tsx
|
|
1257
|
-
* <Sidebar.Root>
|
|
1258
|
-
* <Sidebar.Nav aria-label="Main">
|
|
1259
|
-
* <Sidebar.Header>
|
|
1260
|
-
* <DropdownMenu.Root>
|
|
1261
|
-
* <DropdownMenu.Trigger asChild>
|
|
1262
|
-
* <Sidebar.SwitcherTrigger>
|
|
1263
|
-
* <GlobeIcon />
|
|
1264
|
-
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
1265
|
-
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
1266
|
-
* </Sidebar.SwitcherTrigger>
|
|
1267
|
-
* </DropdownMenu.Trigger>
|
|
1268
|
-
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1269
|
-
* </DropdownMenu.Root>
|
|
1270
|
-
* </Sidebar.Header>
|
|
1271
|
-
* <Sidebar.Body>
|
|
1272
|
-
* <Sidebar.Group>
|
|
1273
|
-
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
1274
|
-
* <Sidebar.List>
|
|
1275
|
-
* <Sidebar.Item>
|
|
1276
|
-
* <Sidebar.ItemButton asChild current>
|
|
1277
|
-
* <a href="/endpoints">
|
|
1278
|
-
* <GraphIcon />
|
|
1279
|
-
* Endpoints
|
|
1280
|
-
* </a>
|
|
1281
|
-
* </Sidebar.ItemButton>
|
|
1282
|
-
* </Sidebar.Item>
|
|
1283
|
-
* </Sidebar.List>
|
|
1284
|
-
* </Sidebar.Group>
|
|
1285
|
-
* </Sidebar.Body>
|
|
1286
|
-
* <Sidebar.Footer>
|
|
1287
|
-
* <Sidebar.Separator />
|
|
1288
|
-
* <DropdownMenu.Root>
|
|
1289
|
-
* <DropdownMenu.Trigger asChild>
|
|
1290
|
-
* <Sidebar.SwitcherTrigger>
|
|
1291
|
-
* <Sidebar.AccountAvatar accountId="acc_123" accountName="Acme Corp" />
|
|
1292
|
-
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1293
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1294
|
-
* </Sidebar.SwitcherTrigger>
|
|
1295
|
-
* </DropdownMenu.Trigger>
|
|
1296
|
-
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1297
|
-
* </DropdownMenu.Root>
|
|
1298
|
-
* </Sidebar.Footer>
|
|
1299
|
-
* </Sidebar.Nav>
|
|
1300
|
-
* <Sidebar.Trigger />
|
|
1301
|
-
* </Sidebar.Root>
|
|
1302
|
-
* ```
|
|
1303
|
-
*/
|
|
1304
|
-
declare const AccountAvatar: ({ accountId, accountName, asChild, children, className, "data-slot": dataSlot, ...props }: SidebarAccountAvatarProps) => import("react").JSX.Element;
|
|
1305
|
-
/**
|
|
1306
|
-
* The props for `Sidebar.UserAvatar`.
|
|
1307
|
-
*
|
|
1308
|
-
* `children` is valid only with `asChild`, where it is the element the avatar
|
|
1309
|
-
* renders as instead of its own `<div>` — pass an empty one, e.g. `<span />`
|
|
1310
|
-
* when the avatar sits inside a `<button>` (which may not contain a `<div>`).
|
|
1311
|
-
* The avatar's visual (the `src` image, or the silhouette fallback) renders
|
|
1312
|
-
* *inside* that element in place of its own children.
|
|
1313
|
-
*/
|
|
1314
|
-
type SidebarUserAvatarProps = Omit<ComponentProps<"div">, "children"> & SelfClosingWithAsChild & WithDataSlot & {
|
|
1315
|
-
/**
|
|
1316
|
-
* Optional URL of the user's profile picture. When provided, the image is
|
|
1317
|
-
* rendered to fill the avatar with `object-cover`. When omitted (or while
|
|
1318
|
-
* loading), a neutral person silhouette is shown.
|
|
1319
|
-
*/
|
|
1320
|
-
src?: string;
|
|
1321
|
-
/**
|
|
1322
|
-
* Accessible label for the avatar. Used as the image's `alt` text and as
|
|
1323
|
-
* the container's `aria-label` when no image is rendered.
|
|
1324
|
-
*
|
|
1325
|
-
* @default "Your account"
|
|
1326
|
-
*/
|
|
1327
|
-
alt?: string;
|
|
1328
|
-
};
|
|
1329
|
-
/**
|
|
1330
|
-
* A circular avatar that represents the currently signed-in user. Renders the
|
|
1331
|
-
* user's profile picture when `src` is provided, otherwise falls back to a
|
|
1332
|
-
* neutral, theme-aware person silhouette.
|
|
1333
|
-
*
|
|
1334
|
-
* Users are rendered as circles to differentiate them visually from accounts,
|
|
1335
|
-
* which use a square `Sidebar.AccountAvatar`.
|
|
1336
|
-
*
|
|
1337
|
-
* Pass `asChild` with a single empty element to swap the `<div>` it renders —
|
|
1338
|
-
* a `<span />` inside a `<button>`, or a link. The image (or the silhouette
|
|
1339
|
-
* fallback) renders inside the swapped element; anything that element carried of
|
|
1340
|
-
* its own is replaced.
|
|
1341
|
-
*
|
|
1342
|
-
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebaruseravatar
|
|
1343
|
-
*
|
|
1344
|
-
* @example
|
|
1345
|
-
* ```tsx
|
|
1346
|
-
* <Sidebar.Root>
|
|
1347
|
-
* <Sidebar.Nav aria-label="Main">
|
|
1348
|
-
* <Sidebar.Header>
|
|
1349
|
-
* <DropdownMenu.Root>
|
|
1350
|
-
* <DropdownMenu.Trigger asChild>
|
|
1351
|
-
* <Sidebar.SwitcherTrigger>
|
|
1352
|
-
* <GlobeIcon />
|
|
1353
|
-
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
1354
|
-
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
1355
|
-
* </Sidebar.SwitcherTrigger>
|
|
1356
|
-
* </DropdownMenu.Trigger>
|
|
1357
|
-
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1358
|
-
* </DropdownMenu.Root>
|
|
1359
|
-
* </Sidebar.Header>
|
|
1360
|
-
* <Sidebar.Body>
|
|
1361
|
-
* <Sidebar.Group>
|
|
1362
|
-
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
1363
|
-
* <Sidebar.List>
|
|
1364
|
-
* <Sidebar.Item>
|
|
1365
|
-
* <Sidebar.ItemButton asChild current>
|
|
1366
|
-
* <a href="/endpoints">
|
|
1367
|
-
* <GraphIcon />
|
|
1368
|
-
* Endpoints
|
|
1369
|
-
* </a>
|
|
1370
|
-
* </Sidebar.ItemButton>
|
|
1371
|
-
* </Sidebar.Item>
|
|
1372
|
-
* </Sidebar.List>
|
|
1373
|
-
* </Sidebar.Group>
|
|
1374
|
-
* </Sidebar.Body>
|
|
1375
|
-
* <Sidebar.Footer>
|
|
1376
|
-
* <Sidebar.Separator />
|
|
1377
|
-
* <DropdownMenu.Root>
|
|
1378
|
-
* <DropdownMenu.Trigger asChild>
|
|
1379
|
-
* <Sidebar.SwitcherTrigger>
|
|
1380
|
-
* <Sidebar.AccountAvatar accountId="acc_123" accountName="Acme Corp" />
|
|
1381
|
-
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1382
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1383
|
-
* </Sidebar.SwitcherTrigger>
|
|
1384
|
-
* </DropdownMenu.Trigger>
|
|
1385
|
-
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
1386
|
-
* </DropdownMenu.Root>
|
|
1387
|
-
* </Sidebar.Footer>
|
|
1388
|
-
* </Sidebar.Nav>
|
|
1389
|
-
* <Sidebar.Trigger />
|
|
1390
|
-
* </Sidebar.Root>
|
|
1391
|
-
* ```
|
|
1392
|
-
*/
|
|
1393
|
-
declare const UserAvatar: ({ alt, asChild, children, className, "data-slot": dataSlot, src, ...props }: SidebarUserAvatarProps) => import("react").JSX.Element;
|
|
1394
1406
|
/**
|
|
1395
1407
|
* A composable, collapsible app-navigation sidebar. `Sidebar.Root` owns the
|
|
1396
1408
|
* state (no DOM); `Sidebar.Nav` renders the panel — inline on desktop,
|
|
@@ -1414,6 +1426,7 @@ declare const UserAvatar: ({ alt, asChild, children, className, "data-slot": dat
|
|
|
1414
1426
|
* │ ├── Sidebar.Header
|
|
1415
1427
|
* │ │ └── Sidebar.SwitcherTrigger
|
|
1416
1428
|
* │ ├── Sidebar.Body
|
|
1429
|
+
* │ │ ├── Sidebar.SearchTrigger
|
|
1417
1430
|
* │ │ └── Sidebar.Group
|
|
1418
1431
|
* │ │ ├── Sidebar.GroupLabel
|
|
1419
1432
|
* │ │ └── Sidebar.List
|
|
@@ -1424,8 +1437,6 @@ declare const UserAvatar: ({ alt, asChild, children, className, "data-slot": dat
|
|
|
1424
1437
|
* │ ├── Sidebar.ItemButton
|
|
1425
1438
|
* │ ├── Sidebar.Separator
|
|
1426
1439
|
* │ └── Sidebar.SwitcherTrigger
|
|
1427
|
-
* │ ├── Sidebar.AccountAvatar
|
|
1428
|
-
* │ └── Sidebar.UserAvatar
|
|
1429
1440
|
* └── Sidebar.Trigger
|
|
1430
1441
|
* ```
|
|
1431
1442
|
*
|
|
@@ -1465,9 +1476,10 @@ declare const UserAvatar: ({ alt, asChild, children, className, "data-slot": dat
|
|
|
1465
1476
|
* <DropdownMenu.Root>
|
|
1466
1477
|
* <DropdownMenu.Trigger asChild>
|
|
1467
1478
|
* <Sidebar.SwitcherTrigger>
|
|
1468
|
-
* <
|
|
1479
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1480
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1481
|
+
* </Avatar.Root>
|
|
1469
1482
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1470
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1471
1483
|
* </Sidebar.SwitcherTrigger>
|
|
1472
1484
|
* </DropdownMenu.Trigger>
|
|
1473
1485
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1480,7 +1492,7 @@ declare const UserAvatar: ({ alt, asChild, children, className, "data-slot": dat
|
|
|
1480
1492
|
*/
|
|
1481
1493
|
declare const Sidebar: {
|
|
1482
1494
|
/**
|
|
1483
|
-
* The state owner for a sidebar. Renders no DOM —
|
|
1495
|
+
* The state owner for a sidebar. Renders no DOM — carries expanded /
|
|
1484
1496
|
* mobile-sheet state to every part below it so the trigger can live in the
|
|
1485
1497
|
* app shell without coupling it to the sidebar.
|
|
1486
1498
|
*
|
|
@@ -1522,9 +1534,10 @@ declare const Sidebar: {
|
|
|
1522
1534
|
* <DropdownMenu.Root>
|
|
1523
1535
|
* <DropdownMenu.Trigger asChild>
|
|
1524
1536
|
* <Sidebar.SwitcherTrigger>
|
|
1525
|
-
* <
|
|
1537
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1538
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1539
|
+
* </Avatar.Root>
|
|
1526
1540
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1527
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1528
1541
|
* </Sidebar.SwitcherTrigger>
|
|
1529
1542
|
* </DropdownMenu.Trigger>
|
|
1530
1543
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1547,7 +1560,7 @@ declare const Sidebar: {
|
|
|
1547
1560
|
* | Data Attribute | Value | Description |
|
|
1548
1561
|
* | --- | --- | --- |
|
|
1549
1562
|
* | `data-state` | `"expanded"` \| `"collapsed"` | On the desktop panel surface. Mirrors the root's expanded state and drives the width collapse to the icon rail; descendant parts style off it with `group-data-[state=collapsed]/sidebar-nav:`. |
|
|
1550
|
-
* | `data-hydrated` | present after hydration | Presence-only, desktop panel surface. The CSS-side twin of the `isHydrated` gate: descendant collapse transitions are enabled only under `group-data-
|
|
1563
|
+
* | `data-hydrated` | present after hydration | Presence-only, desktop panel surface. The CSS-side twin of the `isHydrated` gate: descendant collapse transitions are enabled only under `group-data-hydrated/sidebar-nav:`, so an SSR state correction snaps instead of animating on page load. |
|
|
1551
1564
|
* | `data-mobile` | present in the mobile sheet | Presence-only. Marks the `Sheet.Content` presentation used below the root's `mobileBreakpoint`. |
|
|
1552
1565
|
* | `data-state` | `"open"` \| `"closed"` | In the mobile sheet only, where the panel *is* the `Sheet`'s Radix dialog content element and Radix owns the attribute — the sheet's open/close animation state, not the desktop expanded state. Consumers style against it too. |
|
|
1553
1566
|
*
|
|
@@ -1589,9 +1602,10 @@ declare const Sidebar: {
|
|
|
1589
1602
|
* <DropdownMenu.Root>
|
|
1590
1603
|
* <DropdownMenu.Trigger asChild>
|
|
1591
1604
|
* <Sidebar.SwitcherTrigger>
|
|
1592
|
-
* <
|
|
1605
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1606
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1607
|
+
* </Avatar.Root>
|
|
1593
1608
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1594
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1595
1609
|
* </Sidebar.SwitcherTrigger>
|
|
1596
1610
|
* </DropdownMenu.Trigger>
|
|
1597
1611
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1654,9 +1668,10 @@ declare const Sidebar: {
|
|
|
1654
1668
|
* <DropdownMenu.Root>
|
|
1655
1669
|
* <DropdownMenu.Trigger asChild>
|
|
1656
1670
|
* <Sidebar.SwitcherTrigger>
|
|
1657
|
-
* <
|
|
1671
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1672
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1673
|
+
* </Avatar.Root>
|
|
1658
1674
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1659
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1660
1675
|
* </Sidebar.SwitcherTrigger>
|
|
1661
1676
|
* </DropdownMenu.Trigger>
|
|
1662
1677
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1711,9 +1726,10 @@ declare const Sidebar: {
|
|
|
1711
1726
|
* <DropdownMenu.Root>
|
|
1712
1727
|
* <DropdownMenu.Trigger asChild>
|
|
1713
1728
|
* <Sidebar.SwitcherTrigger>
|
|
1714
|
-
* <
|
|
1729
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1730
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1731
|
+
* </Avatar.Root>
|
|
1715
1732
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1716
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1717
1733
|
* </Sidebar.SwitcherTrigger>
|
|
1718
1734
|
* </DropdownMenu.Trigger>
|
|
1719
1735
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1766,9 +1782,10 @@ declare const Sidebar: {
|
|
|
1766
1782
|
* <DropdownMenu.Root>
|
|
1767
1783
|
* <DropdownMenu.Trigger asChild>
|
|
1768
1784
|
* <Sidebar.SwitcherTrigger>
|
|
1769
|
-
* <
|
|
1785
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1786
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1787
|
+
* </Avatar.Root>
|
|
1770
1788
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1771
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1772
1789
|
* </Sidebar.SwitcherTrigger>
|
|
1773
1790
|
* </DropdownMenu.Trigger>
|
|
1774
1791
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1822,9 +1839,10 @@ declare const Sidebar: {
|
|
|
1822
1839
|
* <DropdownMenu.Root>
|
|
1823
1840
|
* <DropdownMenu.Trigger asChild>
|
|
1824
1841
|
* <Sidebar.SwitcherTrigger>
|
|
1825
|
-
* <
|
|
1842
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1843
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1844
|
+
* </Avatar.Root>
|
|
1826
1845
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1827
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1828
1846
|
* </Sidebar.SwitcherTrigger>
|
|
1829
1847
|
* </DropdownMenu.Trigger>
|
|
1830
1848
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1878,9 +1896,10 @@ declare const Sidebar: {
|
|
|
1878
1896
|
* <DropdownMenu.Root>
|
|
1879
1897
|
* <DropdownMenu.Trigger asChild>
|
|
1880
1898
|
* <Sidebar.SwitcherTrigger>
|
|
1881
|
-
* <
|
|
1899
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1900
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1901
|
+
* </Avatar.Root>
|
|
1882
1902
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1883
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1884
1903
|
* </Sidebar.SwitcherTrigger>
|
|
1885
1904
|
* </DropdownMenu.Trigger>
|
|
1886
1905
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1934,9 +1953,10 @@ declare const Sidebar: {
|
|
|
1934
1953
|
* <DropdownMenu.Root>
|
|
1935
1954
|
* <DropdownMenu.Trigger asChild>
|
|
1936
1955
|
* <Sidebar.SwitcherTrigger>
|
|
1937
|
-
* <
|
|
1956
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
1957
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
1958
|
+
* </Avatar.Root>
|
|
1938
1959
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1939
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1940
1960
|
* </Sidebar.SwitcherTrigger>
|
|
1941
1961
|
* </DropdownMenu.Trigger>
|
|
1942
1962
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -1989,9 +2009,10 @@ declare const Sidebar: {
|
|
|
1989
2009
|
* <DropdownMenu.Root>
|
|
1990
2010
|
* <DropdownMenu.Trigger asChild>
|
|
1991
2011
|
* <Sidebar.SwitcherTrigger>
|
|
1992
|
-
* <
|
|
2012
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
2013
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
2014
|
+
* </Avatar.Root>
|
|
1993
2015
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
1994
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
1995
2016
|
* </Sidebar.SwitcherTrigger>
|
|
1996
2017
|
* </DropdownMenu.Trigger>
|
|
1997
2018
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -2044,9 +2065,10 @@ declare const Sidebar: {
|
|
|
2044
2065
|
* <DropdownMenu.Root>
|
|
2045
2066
|
* <DropdownMenu.Trigger asChild>
|
|
2046
2067
|
* <Sidebar.SwitcherTrigger>
|
|
2047
|
-
* <
|
|
2068
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
2069
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
2070
|
+
* </Avatar.Root>
|
|
2048
2071
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
2049
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
2050
2072
|
* </Sidebar.SwitcherTrigger>
|
|
2051
2073
|
* </DropdownMenu.Trigger>
|
|
2052
2074
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -2108,9 +2130,10 @@ declare const Sidebar: {
|
|
|
2108
2130
|
* <DropdownMenu.Root>
|
|
2109
2131
|
* <DropdownMenu.Trigger asChild>
|
|
2110
2132
|
* <Sidebar.SwitcherTrigger>
|
|
2111
|
-
* <
|
|
2133
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
2134
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
2135
|
+
* </Avatar.Root>
|
|
2112
2136
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
2113
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
2114
2137
|
* </Sidebar.SwitcherTrigger>
|
|
2115
2138
|
* </DropdownMenu.Trigger>
|
|
2116
2139
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -2122,6 +2145,74 @@ declare const Sidebar: {
|
|
|
2122
2145
|
* ```
|
|
2123
2146
|
*/
|
|
2124
2147
|
readonly ItemButton: typeof ItemButton;
|
|
2148
|
+
/**
|
|
2149
|
+
* The search row for `Sidebar.Body`: an item-shaped row whose `shortcut` hint
|
|
2150
|
+
* appears on hover or focus, and the same chip as any other row in the
|
|
2151
|
+
* collapsed icon rail. Not state-wired — compose with
|
|
2152
|
+
* `Command.SearchTrigger`.
|
|
2153
|
+
*
|
|
2154
|
+
* **Data attributes:**
|
|
2155
|
+
*
|
|
2156
|
+
* | Data Attribute | Value | Description |
|
|
2157
|
+
* | --- | --- | --- |
|
|
2158
|
+
* | `data-state` | `"open"` \| `"closed"` | **Read, not stamped** — supplied by the composing `Command.SearchTrigger` / `Dialog.Trigger`. Style the row while its palette is open with `data-state-open:`. |
|
|
2159
|
+
*
|
|
2160
|
+
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebarsearchtrigger
|
|
2161
|
+
*
|
|
2162
|
+
* @example
|
|
2163
|
+
* ```tsx
|
|
2164
|
+
* <Sidebar.Root>
|
|
2165
|
+
* <Sidebar.Nav aria-label="Main">
|
|
2166
|
+
* <Sidebar.Header>
|
|
2167
|
+
* <Sidebar.SwitcherTrigger>
|
|
2168
|
+
* <GlobeIcon />
|
|
2169
|
+
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
2170
|
+
* </Sidebar.SwitcherTrigger>
|
|
2171
|
+
* </Sidebar.Header>
|
|
2172
|
+
* <Sidebar.Body>
|
|
2173
|
+
* <Command.DialogRoot>
|
|
2174
|
+
* <Sidebar.Tooltip label="Search">
|
|
2175
|
+
* <Command.SearchTrigger>
|
|
2176
|
+
* <Sidebar.SearchTrigger
|
|
2177
|
+
* shortcut={
|
|
2178
|
+
* <>
|
|
2179
|
+
* <MetaKey />
|
|
2180
|
+
* <Kbd>K</Kbd>
|
|
2181
|
+
* </>
|
|
2182
|
+
* }
|
|
2183
|
+
* >
|
|
2184
|
+
* <MagnifyingGlassIcon />
|
|
2185
|
+
* <span className="min-w-0 flex-1 truncate">Search</span>
|
|
2186
|
+
* </Sidebar.SearchTrigger>
|
|
2187
|
+
* </Command.SearchTrigger>
|
|
2188
|
+
* </Sidebar.Tooltip>
|
|
2189
|
+
* <Command.DialogContent>
|
|
2190
|
+
* <Command.Input placeholder="Search endpoints, agents, and settings..." />
|
|
2191
|
+
* <Command.List>
|
|
2192
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
2193
|
+
* </Command.List>
|
|
2194
|
+
* </Command.DialogContent>
|
|
2195
|
+
* </Command.DialogRoot>
|
|
2196
|
+
* <Sidebar.Group>
|
|
2197
|
+
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
2198
|
+
* <Sidebar.List>
|
|
2199
|
+
* <Sidebar.Item>
|
|
2200
|
+
* <Sidebar.ItemButton asChild current>
|
|
2201
|
+
* <a href="/endpoints">
|
|
2202
|
+
* <GraphIcon />
|
|
2203
|
+
* Endpoints
|
|
2204
|
+
* </a>
|
|
2205
|
+
* </Sidebar.ItemButton>
|
|
2206
|
+
* </Sidebar.Item>
|
|
2207
|
+
* </Sidebar.List>
|
|
2208
|
+
* </Sidebar.Group>
|
|
2209
|
+
* </Sidebar.Body>
|
|
2210
|
+
* </Sidebar.Nav>
|
|
2211
|
+
* <Sidebar.Trigger />
|
|
2212
|
+
* </Sidebar.Root>
|
|
2213
|
+
* ```
|
|
2214
|
+
*/
|
|
2215
|
+
readonly SearchTrigger: typeof SearchTrigger;
|
|
2125
2216
|
/**
|
|
2126
2217
|
* The styled switcher row for the header/footer. Not state-wired — compose
|
|
2127
2218
|
* with `DropdownMenu.Trigger asChild` or `Dialog.Trigger asChild`.
|
|
@@ -2170,9 +2261,10 @@ declare const Sidebar: {
|
|
|
2170
2261
|
* <DropdownMenu.Root>
|
|
2171
2262
|
* <DropdownMenu.Trigger asChild>
|
|
2172
2263
|
* <Sidebar.SwitcherTrigger>
|
|
2173
|
-
* <
|
|
2264
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
2265
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
2266
|
+
* </Avatar.Root>
|
|
2174
2267
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
2175
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
2176
2268
|
* </Sidebar.SwitcherTrigger>
|
|
2177
2269
|
* </DropdownMenu.Trigger>
|
|
2178
2270
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -2232,9 +2324,10 @@ declare const Sidebar: {
|
|
|
2232
2324
|
* <Sidebar.Tooltip label="Acme Corp">
|
|
2233
2325
|
* <DropdownMenu.Trigger asChild>
|
|
2234
2326
|
* <Sidebar.SwitcherTrigger>
|
|
2235
|
-
* <
|
|
2327
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
2328
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
2329
|
+
* </Avatar.Root>
|
|
2236
2330
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
2237
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
2238
2331
|
* </Sidebar.SwitcherTrigger>
|
|
2239
2332
|
* </DropdownMenu.Trigger>
|
|
2240
2333
|
* </Sidebar.Tooltip>
|
|
@@ -2290,9 +2383,10 @@ declare const Sidebar: {
|
|
|
2290
2383
|
* <DropdownMenu.Root>
|
|
2291
2384
|
* <DropdownMenu.Trigger asChild>
|
|
2292
2385
|
* <Sidebar.SwitcherTrigger>
|
|
2293
|
-
* <
|
|
2386
|
+
* <Avatar.Root appearance="square" colorSeed="acc_123">
|
|
2387
|
+
* <Avatar.Fallback name="Acme Corp" />
|
|
2388
|
+
* </Avatar.Root>
|
|
2294
2389
|
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
2295
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
2296
2390
|
* </Sidebar.SwitcherTrigger>
|
|
2297
2391
|
* </DropdownMenu.Trigger>
|
|
2298
2392
|
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
@@ -2304,119 +2398,6 @@ declare const Sidebar: {
|
|
|
2304
2398
|
* ```
|
|
2305
2399
|
*/
|
|
2306
2400
|
readonly Separator: typeof SidebarSeparator;
|
|
2307
|
-
/**
|
|
2308
|
-
* A rounded-square account avatar with deterministic, WCAG-compliant
|
|
2309
|
-
* swatch colors derived from the account id. `asChild` swaps its `<div>` for
|
|
2310
|
-
* a single empty element and renders the initials inside it.
|
|
2311
|
-
*
|
|
2312
|
-
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebaraccountavatar
|
|
2313
|
-
*
|
|
2314
|
-
* @example
|
|
2315
|
-
* ```tsx
|
|
2316
|
-
* <Sidebar.Root>
|
|
2317
|
-
* <Sidebar.Nav aria-label="Main">
|
|
2318
|
-
* <Sidebar.Header>
|
|
2319
|
-
* <DropdownMenu.Root>
|
|
2320
|
-
* <DropdownMenu.Trigger asChild>
|
|
2321
|
-
* <Sidebar.SwitcherTrigger>
|
|
2322
|
-
* <GlobeIcon />
|
|
2323
|
-
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
2324
|
-
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
2325
|
-
* </Sidebar.SwitcherTrigger>
|
|
2326
|
-
* </DropdownMenu.Trigger>
|
|
2327
|
-
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
2328
|
-
* </DropdownMenu.Root>
|
|
2329
|
-
* </Sidebar.Header>
|
|
2330
|
-
* <Sidebar.Body>
|
|
2331
|
-
* <Sidebar.Group>
|
|
2332
|
-
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
2333
|
-
* <Sidebar.List>
|
|
2334
|
-
* <Sidebar.Item>
|
|
2335
|
-
* <Sidebar.ItemButton asChild current>
|
|
2336
|
-
* <a href="/endpoints">
|
|
2337
|
-
* <GraphIcon />
|
|
2338
|
-
* Endpoints
|
|
2339
|
-
* </a>
|
|
2340
|
-
* </Sidebar.ItemButton>
|
|
2341
|
-
* </Sidebar.Item>
|
|
2342
|
-
* </Sidebar.List>
|
|
2343
|
-
* </Sidebar.Group>
|
|
2344
|
-
* </Sidebar.Body>
|
|
2345
|
-
* <Sidebar.Footer>
|
|
2346
|
-
* <Sidebar.Separator />
|
|
2347
|
-
* <DropdownMenu.Root>
|
|
2348
|
-
* <DropdownMenu.Trigger asChild>
|
|
2349
|
-
* <Sidebar.SwitcherTrigger>
|
|
2350
|
-
* <Sidebar.AccountAvatar accountId="acc_123" accountName="Acme Corp" />
|
|
2351
|
-
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
2352
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
2353
|
-
* </Sidebar.SwitcherTrigger>
|
|
2354
|
-
* </DropdownMenu.Trigger>
|
|
2355
|
-
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
2356
|
-
* </DropdownMenu.Root>
|
|
2357
|
-
* </Sidebar.Footer>
|
|
2358
|
-
* </Sidebar.Nav>
|
|
2359
|
-
* <Sidebar.Trigger />
|
|
2360
|
-
* </Sidebar.Root>
|
|
2361
|
-
* ```
|
|
2362
|
-
*/
|
|
2363
|
-
readonly AccountAvatar: typeof AccountAvatar;
|
|
2364
|
-
/**
|
|
2365
|
-
* A circular user avatar with a silhouette fallback. `asChild` swaps its
|
|
2366
|
-
* `<div>` for a single empty element and renders the image inside it.
|
|
2367
|
-
*
|
|
2368
|
-
* @see https://mantle.ngrok.com/components/navigation/sidebar#sidebaruseravatar
|
|
2369
|
-
*
|
|
2370
|
-
* @example
|
|
2371
|
-
* ```tsx
|
|
2372
|
-
* <Sidebar.Root>
|
|
2373
|
-
* <Sidebar.Nav aria-label="Main">
|
|
2374
|
-
* <Sidebar.Header>
|
|
2375
|
-
* <DropdownMenu.Root>
|
|
2376
|
-
* <DropdownMenu.Trigger asChild>
|
|
2377
|
-
* <Sidebar.SwitcherTrigger>
|
|
2378
|
-
* <GlobeIcon />
|
|
2379
|
-
* <span className="text-strong min-w-0 flex-1 truncate text-base">Universal Gateway</span>
|
|
2380
|
-
* <CaretDownIcon className="text-muted size-4 shrink-0" />
|
|
2381
|
-
* </Sidebar.SwitcherTrigger>
|
|
2382
|
-
* </DropdownMenu.Trigger>
|
|
2383
|
-
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
2384
|
-
* </DropdownMenu.Root>
|
|
2385
|
-
* </Sidebar.Header>
|
|
2386
|
-
* <Sidebar.Body>
|
|
2387
|
-
* <Sidebar.Group>
|
|
2388
|
-
* <Sidebar.GroupLabel>Traffic</Sidebar.GroupLabel>
|
|
2389
|
-
* <Sidebar.List>
|
|
2390
|
-
* <Sidebar.Item>
|
|
2391
|
-
* <Sidebar.ItemButton asChild current>
|
|
2392
|
-
* <a href="/endpoints">
|
|
2393
|
-
* <GraphIcon />
|
|
2394
|
-
* Endpoints
|
|
2395
|
-
* </a>
|
|
2396
|
-
* </Sidebar.ItemButton>
|
|
2397
|
-
* </Sidebar.Item>
|
|
2398
|
-
* </Sidebar.List>
|
|
2399
|
-
* </Sidebar.Group>
|
|
2400
|
-
* </Sidebar.Body>
|
|
2401
|
-
* <Sidebar.Footer>
|
|
2402
|
-
* <Sidebar.Separator />
|
|
2403
|
-
* <DropdownMenu.Root>
|
|
2404
|
-
* <DropdownMenu.Trigger asChild>
|
|
2405
|
-
* <Sidebar.SwitcherTrigger>
|
|
2406
|
-
* <Sidebar.AccountAvatar accountId="acc_123" accountName="Acme Corp" />
|
|
2407
|
-
* <span className="text-strong min-w-0 flex-1 truncate text-sm font-medium">Acme Corp</span>
|
|
2408
|
-
* <Sidebar.UserAvatar alt="Jane Doe" />
|
|
2409
|
-
* </Sidebar.SwitcherTrigger>
|
|
2410
|
-
* </DropdownMenu.Trigger>
|
|
2411
|
-
* <DropdownMenu.Content width="trigger" className="min-w-(--sidebar-row-width)">…</DropdownMenu.Content>
|
|
2412
|
-
* </DropdownMenu.Root>
|
|
2413
|
-
* </Sidebar.Footer>
|
|
2414
|
-
* </Sidebar.Nav>
|
|
2415
|
-
* <Sidebar.Trigger />
|
|
2416
|
-
* </Sidebar.Root>
|
|
2417
|
-
* ```
|
|
2418
|
-
*/
|
|
2419
|
-
readonly UserAvatar: typeof UserAvatar;
|
|
2420
2401
|
};
|
|
2421
2402
|
//#endregion
|
|
2422
2403
|
//#region src/components/sidebar/sidebar-state-cookie.d.ts
|