@gravitee/graphene-core 3.23.1 → 3.24.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/USAGE_GUIDE.md +63 -9
- package/dist/composed/PageHeader/PageHeader.d.ts +58 -0
- package/dist/composed/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/composed/PageHeader/PageHeader.harness.d.ts +13 -0
- package/dist/composed/PageHeader/PageHeader.harness.d.ts.map +1 -0
- package/dist/composed/PageHeader/index.d.ts +3 -0
- package/dist/composed/PageHeader/index.d.ts.map +1 -0
- package/dist/composed/ThemeProvider/ThemeProvider.d.ts +2 -1
- package/dist/composed/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -5
- package/dist/styles/globals.css +1 -1
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +34 -2
- package/package.json +1 -1
- package/snippets/data-table-list-page.tsx +14 -13
package/USAGE_GUIDE.md
CHANGED
|
@@ -484,6 +484,56 @@ Follow these steps to apply the layout width system to an existing consumer modu
|
|
|
484
484
|
|
|
485
485
|
See `node_modules/@gravitee/graphene-core/snippets/data-table-list-page.tsx` and `creation-wizard-page.tsx` for complete examples.
|
|
486
486
|
|
|
487
|
+
### Page header
|
|
488
|
+
|
|
489
|
+
Render `PageHeader` once at the top of every routed page, as the first child of the page container. It renders the page's only `<h1>`, which inherits the `h1` style of the design system, an optional description, the page's actions on the right, and an optional row underneath for badges, metadata or tabs. Inside `AppLayout` it sits in the shell's `<main>`, so it adds no landmark of its own.
|
|
490
|
+
|
|
491
|
+
| Prop | Type | Required | Notes |
|
|
492
|
+
| --- | --- | --- | --- |
|
|
493
|
+
| `title` | `string` | Yes | Short noun phrase ("Webhooks", "API keys"). Never truncated: a long title wraps |
|
|
494
|
+
| `description` | `string` | No | One sentence, 14px muted text capped at 65ch |
|
|
495
|
+
| `actions` | `ReactNode` | No | The page's buttons, labelled verb + object ("Add webhook"). Content that renders nothing leaves no empty slot |
|
|
496
|
+
| `children` | `ReactNode` | No | Full-width row under the title and description: badges, metadata or tabs |
|
|
497
|
+
| `className` | `string` | No | Merged on the root `<header>` |
|
|
498
|
+
|
|
499
|
+
The page decides what the header shows. Gate the actions in the page and pass the result:
|
|
500
|
+
|
|
501
|
+
```tsx
|
|
502
|
+
import { Button, PageHeader } from '@gravitee/graphene-core';
|
|
503
|
+
import { PlusIcon } from '@gravitee/graphene-core/icons';
|
|
504
|
+
|
|
505
|
+
export function ApisPage() {
|
|
506
|
+
// Your module's permission check. Gamma modules use `useHasPermission` from `@gravitee/gamma-modules-sdk`.
|
|
507
|
+
const canCreate = useHasPermission({ anyOf: ['environment-api-c'] });
|
|
508
|
+
|
|
509
|
+
return (
|
|
510
|
+
<div className="flex flex-col gap-6">
|
|
511
|
+
<PageHeader
|
|
512
|
+
title="APIs"
|
|
513
|
+
description="Design, deploy and secure the APIs your gateways expose to consumers."
|
|
514
|
+
actions={
|
|
515
|
+
canCreate && (
|
|
516
|
+
<Button>
|
|
517
|
+
<PlusIcon />
|
|
518
|
+
Add API
|
|
519
|
+
</Button>
|
|
520
|
+
)
|
|
521
|
+
}
|
|
522
|
+
/>
|
|
523
|
+
<ApisTable />
|
|
524
|
+
</div>
|
|
525
|
+
);
|
|
526
|
+
}
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
The page owns the rhythm: `PageHeader` has no padding and no outer margin, and the page container's `flex flex-col gap-6` places it 24px above the content. Do not add a margin to the header.
|
|
530
|
+
|
|
531
|
+
**Do not:**
|
|
532
|
+
|
|
533
|
+
- Render a raw `<h1>`, or an `h2` styled by hand, as the page title: that is the drift `PageHeader` replaces.
|
|
534
|
+
- Put breadcrumbs inside the header: they belong to `ContentHeader`.
|
|
535
|
+
- Push business logic into the header (`canCreate`, `onCreate`): decide permissions, dialogs and which buttons show in the page, then pass the buttons as `actions`.
|
|
536
|
+
|
|
487
537
|
### Data table (entity list pages)
|
|
488
538
|
|
|
489
539
|
Use `DataTable` for any entity list — whether the data is fetched page-by-page from an API or loaded in full on the client. The component provides sorting, filtering, pagination, column visibility, row selection, and bulk actions through a composable slot API.
|
|
@@ -628,15 +678,18 @@ Pages with a primary "Add Entity" button in the header follow one rule: **the he
|
|
|
628
678
|
Both the header button and the empty state CTA trigger the same creation flow. No visual downgrade (both are primary variant buttons). No transition animation between states.
|
|
629
679
|
|
|
630
680
|
```tsx
|
|
631
|
-
<
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
</
|
|
681
|
+
<PageHeader
|
|
682
|
+
title="Entities"
|
|
683
|
+
description="Manage your entity catalog."
|
|
684
|
+
actions={
|
|
685
|
+
!isFirstUse && (
|
|
686
|
+
<Button size="sm">
|
|
687
|
+
<PlusIcon />
|
|
688
|
+
Add entity
|
|
689
|
+
</Button>
|
|
690
|
+
)
|
|
691
|
+
}
|
|
692
|
+
/>
|
|
640
693
|
```
|
|
641
694
|
|
|
642
695
|
#### Loading state
|
|
@@ -842,6 +895,7 @@ A few cases worth remembering:
|
|
|
842
895
|
- **`Table` returns a row sub-harness** — `tableHarness().getRow(matcher)` returns a `TableRowHarness` exposing `getCells`, `getCellText(header)`, `getCellElement(header)`. The cell element is the hook to scope another harness inside a specific row (see the **Tables** section below).
|
|
843
896
|
- **`DataTable` is composed but exported via `/testing`** — most harnesses are for base primitives, but `dataTableHarness` is exposed because it adds sorting, selection, empty/loading state on top of the inner `<Table>`. Its rows extend `TableRowHarness` with `isSelected`, `select`, `unselect`.
|
|
844
897
|
- **`PasswordInput` is composed but exported via `/testing`** — `passwordInputHarness` wraps the inner `<input>` and its reveal toggle so you don't have to know the internal `data-slot`. Adds `toggle()`, `isMasked()`, `isRevealed()`, `hasToggle()`, `getToggleLabel()`, `isToggleDisabled()` on top of the usual `type`/`getValue`/`isDisabled`.
|
|
898
|
+
- **`PageHeader` is composed and static, but exported via `/testing`**: `pageHeaderHarness` finds the header through its page `<h1>` (`name` matches the title) and exposes `getTitle`, `getDescription`, `hasActions`, `getActions` (a scope for `buttonHarness`) and `getContent`, so you don't have to know its internal `data-slot`s.
|
|
845
899
|
- **Static primitives have no harness** — `Badge`, `Card`, `Skeleton`, `Avatar`, `Spinner`, `Separator`, `Label`, `Kbd`, `Alert`, etc. carry no behavior to drive. Query them directly with RTL's `getByRole` / `getByText`.
|
|
846
900
|
|
|
847
901
|
### Async data — wait before attaching
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface PageHeaderProps {
|
|
3
|
+
/** Title of the screen, rendered as its only `<h1>`. A short noun phrase: "Webhooks", "API keys". */
|
|
4
|
+
readonly title: string;
|
|
5
|
+
/** One sentence under the title, in 14px muted text capped at a 65ch measure. */
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The page's buttons, on the title line at the right. The page decides which ones show:
|
|
9
|
+
* content that renders nothing (`canCreate && <Button />`, or a fragment of such parts)
|
|
10
|
+
* leaves no empty slot.
|
|
11
|
+
*/
|
|
12
|
+
readonly actions?: ReactNode;
|
|
13
|
+
/** Full-width row under the title and description, for badges, metadata or tabs. */
|
|
14
|
+
readonly children?: ReactNode;
|
|
15
|
+
readonly className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The header of a routed page: its title, an optional description, the page's actions and an
|
|
19
|
+
* optional row underneath. The title is the screen's `<h1>` and inherits the design system's `h1`
|
|
20
|
+
* style: the header does not restyle it. Render one per screen, first in the page container; the
|
|
21
|
+
* page owns the 24px gap to its content (`flex flex-col gap-6`).
|
|
22
|
+
*
|
|
23
|
+
* The header displays what it is given. Permissions, dialogs and how many buttons show stay in the
|
|
24
|
+
* page; breadcrumbs belong to `ContentHeader`.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* export function ApisPage() {
|
|
29
|
+
* // Your module's permission check. Gamma modules use `useHasPermission` from `@gravitee/gamma-modules-sdk`.
|
|
30
|
+
* const canCreate = useHasPermission({ anyOf: ['environment-api-c'] });
|
|
31
|
+
*
|
|
32
|
+
* return (
|
|
33
|
+
* <div className="flex flex-col gap-6">
|
|
34
|
+
* <PageHeader
|
|
35
|
+
* title="APIs"
|
|
36
|
+
* description="Design, deploy and secure the APIs your gateways expose to consumers."
|
|
37
|
+
* actions={
|
|
38
|
+
* canCreate && (
|
|
39
|
+
* <Button>
|
|
40
|
+
* <PlusIcon />
|
|
41
|
+
* Add API
|
|
42
|
+
* </Button>
|
|
43
|
+
* )
|
|
44
|
+
* }
|
|
45
|
+
* />
|
|
46
|
+
* <ApisTable />
|
|
47
|
+
* </div>
|
|
48
|
+
* );
|
|
49
|
+
* }
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
declare function PageHeader({ title, description, actions, children, className }: PageHeaderProps): import("react").JSX.Element;
|
|
53
|
+
declare namespace PageHeader {
|
|
54
|
+
var displayName: string;
|
|
55
|
+
}
|
|
56
|
+
export { PageHeader };
|
|
57
|
+
export type { PageHeaderProps };
|
|
58
|
+
//# sourceMappingURL=PageHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../src/composed/PageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,eAAe;IACvB,qGAAqG;IACrG,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iFAAiF;IACjF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,oFAAoF;IACpF,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,eAAe,+BA2BxF;kBA3BQ,UAAU;;;AA+BnB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HarnessQuery } from '../../testing/harnessQuery';
|
|
2
|
+
interface PageHeaderHarness {
|
|
3
|
+
readonly getElement: () => HTMLElement;
|
|
4
|
+
readonly getTitle: () => string;
|
|
5
|
+
readonly getDescription: () => string | null;
|
|
6
|
+
readonly hasActions: () => boolean;
|
|
7
|
+
readonly getActions: () => HTMLElement;
|
|
8
|
+
readonly getContent: () => HTMLElement | null;
|
|
9
|
+
}
|
|
10
|
+
declare function pageHeaderHarness(query?: HarnessQuery): PageHeaderHarness;
|
|
11
|
+
export { pageHeaderHarness };
|
|
12
|
+
export type { PageHeaderHarness };
|
|
13
|
+
//# sourceMappingURL=PageHeader.harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader.harness.d.ts","sourceRoot":"","sources":["../../../src/composed/PageHeader/PageHeader.harness.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,8CAA8C,CAAC;AAEtD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,WAAW,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,MAAM,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,OAAO,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,WAAW,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;CAC/C;AAUD,iBAAS,iBAAiB,CAAC,KAAK,GAAE,YAAiB,GAAG,iBAAiB,CAmDtE;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composed/PageHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
type ThemeMode = 'light' | 'dark' | 'system';
|
|
3
3
|
type ResolvedTheme = 'light' | 'dark';
|
|
4
|
+
declare const THEME_MODE_STORAGE_KEY = "graphene.theme.mode";
|
|
4
5
|
interface ThemeContextValue {
|
|
5
6
|
readonly mode: ThemeMode;
|
|
6
7
|
readonly setMode: (mode: ThemeMode) => void;
|
|
@@ -12,6 +13,6 @@ interface ThemeProviderProps {
|
|
|
12
13
|
}
|
|
13
14
|
declare function ThemeProvider({ children, defaultMode }: ThemeProviderProps): import("react").JSX.Element;
|
|
14
15
|
declare function useTheme(): ThemeContextValue;
|
|
15
|
-
export { ThemeProvider, useTheme };
|
|
16
|
+
export { THEME_MODE_STORAGE_KEY, ThemeProvider, useTheme };
|
|
16
17
|
export type { ResolvedTheme, ThemeContextValue, ThemeMode, ThemeProviderProps };
|
|
17
18
|
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/composed/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,C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aAAa,CAAC,EAAE,QAAQ,EAAE,WAAsB,EAAE,EAAE,kBAAkB,+BA4B9E;AAED,iBAAS,QAAQ,IAAI,iBAAiB,CAMrC;AAED,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export * from './composed/FileUpload';
|
|
|
65
65
|
export * from './composed/JsonSchemaForm';
|
|
66
66
|
export * from './composed/LayoutSlots';
|
|
67
67
|
export * from './composed/PageFocused';
|
|
68
|
+
export * from './composed/PageHeader';
|
|
68
69
|
export * from './composed/PasswordInput';
|
|
69
70
|
export * from './composed/SelectorDropdown';
|
|
70
71
|
export * from './composed/SidebarMode';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAG3F,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAA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C;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AAMvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,sBAAsB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,GAC7B,MAAM,0CAA0C,CAAC;AAClD,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -35270,8 +35270,40 @@ function NZ({ children: e, className: n }) {
|
|
|
35270
35270
|
}
|
|
35271
35271
|
NZ.displayName = "PageFocused";
|
|
35272
35272
|
//#endregion
|
|
35273
|
+
//#region src/composed/PageHeader/PageHeader.tsx
|
|
35274
|
+
function PZ({ title: e, description: n, actions: r, children: i, className: a }) {
|
|
35275
|
+
return /* @__PURE__ */ G("header", {
|
|
35276
|
+
"data-slot": "page-header",
|
|
35277
|
+
className: t("flex flex-col gap-3", a),
|
|
35278
|
+
children: [/* @__PURE__ */ G("div", {
|
|
35279
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
35280
|
+
children: [/* @__PURE__ */ G("div", {
|
|
35281
|
+
className: "min-w-0 space-y-1 wrap-anywhere",
|
|
35282
|
+
children: [/* @__PURE__ */ W("h1", {
|
|
35283
|
+
"data-slot": "page-header-title",
|
|
35284
|
+
className: "text-balance",
|
|
35285
|
+
children: e
|
|
35286
|
+
}), n ? /* @__PURE__ */ W("p", {
|
|
35287
|
+
"data-slot": "page-header-description",
|
|
35288
|
+
className: "max-w-prose text-sm text-muted-foreground",
|
|
35289
|
+
children: n
|
|
35290
|
+
}) : null]
|
|
35291
|
+
}), r ? /* @__PURE__ */ W("div", {
|
|
35292
|
+
"data-slot": "page-header-actions",
|
|
35293
|
+
className: "flex shrink-0 items-center gap-2 empty:hidden",
|
|
35294
|
+
children: r
|
|
35295
|
+
}) : null]
|
|
35296
|
+
}), i ? /* @__PURE__ */ W("div", {
|
|
35297
|
+
"data-slot": "page-header-content",
|
|
35298
|
+
className: "empty:hidden",
|
|
35299
|
+
children: i
|
|
35300
|
+
}) : null]
|
|
35301
|
+
});
|
|
35302
|
+
}
|
|
35303
|
+
PZ.displayName = "PageHeader";
|
|
35304
|
+
//#endregion
|
|
35273
35305
|
//#region src/composed/TopNavUser/TopNavUser.tsx
|
|
35274
|
-
var
|
|
35306
|
+
var FZ = [
|
|
35275
35307
|
{
|
|
35276
35308
|
value: "light",
|
|
35277
35309
|
label: "Light"
|
|
@@ -35285,7 +35317,7 @@ var PZ = [
|
|
|
35285
35317
|
label: "System"
|
|
35286
35318
|
}
|
|
35287
35319
|
];
|
|
35288
|
-
function
|
|
35320
|
+
function IZ({ name: e, email: n, avatarUrl: r, initials: i, className: a, onSignOut: o }) {
|
|
35289
35321
|
let s = i ?? e.slice(0, 2).toUpperCase(), { mode: c, setMode: l } = Te();
|
|
35290
35322
|
return /* @__PURE__ */ G(rL, { children: [/* @__PURE__ */ W(aL, {
|
|
35291
35323
|
asChild: !0,
|
|
@@ -35314,7 +35346,7 @@ function FZ({ name: e, email: n, avatarUrl: r, initials: i, className: a, onSign
|
|
|
35314
35346
|
/* @__PURE__ */ W(uL, {
|
|
35315
35347
|
value: c,
|
|
35316
35348
|
onValueChange: (e) => l(e),
|
|
35317
|
-
children:
|
|
35349
|
+
children: FZ.map((e) => /* @__PURE__ */ W(dL, {
|
|
35318
35350
|
value: e.value,
|
|
35319
35351
|
children: e.label
|
|
35320
35352
|
}, e.value))
|
|
@@ -35327,6 +35359,6 @@ function FZ({ name: e, email: n, avatarUrl: r, initials: i, className: a, onSign
|
|
|
35327
35359
|
]
|
|
35328
35360
|
})] });
|
|
35329
35361
|
}
|
|
35330
|
-
|
|
35362
|
+
IZ.displayName = "TopNavUser";
|
|
35331
35363
|
//#endregion
|
|
35332
|
-
export { jv as Accordion, Pv as AccordionContent, Mv as AccordionItem, Nv as AccordionTrigger, d as Alert, i as AlertAction, P as AlertDescription, f as AlertTitle, pW as AppContextBar, CW as AppLayout, EW as AppSidebar, uW as AppSwitcher, Fv as Avatar, Rv as AvatarBadge, Lv as AvatarFallback, zv as AvatarGroup, Bv as AvatarGroupCount, Iv as AvatarImage, Hv as Badge, wK as BadgeCell, Uv as Breadcrumb, Yv as BreadcrumbEllipsis, Gv as BreadcrumbItem, Kv as BreadcrumbLink, Wv as BreadcrumbList, qv as BreadcrumbPage, Jv as BreadcrumbSeparator, Zv as Button, $v as ButtonGroup, ty as ButtonGroupSeparator, ey as ButtonGroupText, mC as Calendar, hC as CalendarDayButton, gC as Card, bC as CardAction, xC as CardContent, yC as CardDescription, SC as CardFooter, _C as CardHeader, vC as CardTitle, CC as Checkbox, wC as Collapsible, EC as CollapsibleContent, TC as CollapsibleTrigger, WA as Combobox, ij as ComboboxChip, rj as ComboboxChips, aj as ComboboxChipsInput, ej as ComboboxCollection, YA as ComboboxContent, tj as ComboboxEmpty, QA as ComboboxGroup, JA as ComboboxInput, ZA as ComboboxItem, $A as ComboboxLabel, XA as ComboboxList, nj as ComboboxSeparator, KA as ComboboxTrigger, GA as ComboboxValue, vF as Command, yF as CommandDialog, SF as CommandEmpty, CF as CommandGroup, bF as CommandInput, TF as CommandItem, xF as CommandList, wF as CommandSeparator, EF as CommandShortcut, PW as ContentHeader, DF as ContextMenu, LF as ContextMenuCheckboxItem, NF as ContextMenuContent, kF as ContextMenuGroup, PF as ContextMenuItem, zF as ContextMenuLabel, AF as ContextMenuPortal, MF as ContextMenuRadioGroup, RF as ContextMenuRadioItem, BF as ContextMenuSeparator, VF as ContextMenuShortcut, jF as ContextMenuSub, IF as ContextMenuSubContent, FF as ContextMenuSubTrigger, OF as ContextMenuTrigger, OW as ContextSidebar, kW as ContextToggleButton, EK as CopyableCell, FW as CopyableText, OZ as DEFAULT_SLOTS, hK as DataTable, gK as DataTableColumnHeader, OK as DataTableEmptyState, cK as DataTablePagination, lK as DataTableViewOptions, CK as DateCell, Lq as DatePicker, Rq as DateRangePicker, Vq as DateTimePicker, Wq as DateTimeRangePicker, cF as Dialog, dF as DialogClose, pF as DialogContent, _F as DialogDescription, hF as DialogFooter, mF as DialogHeader, fF as DialogOverlay, uF as DialogPortal, gF as DialogTitle, lF as DialogTrigger, qI as Drawer, XI as DrawerClose, QI as DrawerContent, nL as DrawerDescription, eL as DrawerFooter, $I as DrawerHeader, ZI as DrawerOverlay, YI as DrawerPortal, tL as DrawerTitle, JI as DrawerTrigger, rL as DropdownMenu, lL as DropdownMenuCheckboxItem, oL as DropdownMenuContent, sL as DropdownMenuGroup, cL as DropdownMenuItem, fL as DropdownMenuLabel, iL as DropdownMenuPortal, uL as DropdownMenuRadioGroup, dL as DropdownMenuRadioItem, pL as DropdownMenuSeparator, mL as DropdownMenuShortcut, hL as DropdownMenuSub, _L as DropdownMenuSubContent, gL as DropdownMenuSubTrigger, aL as DropdownMenuTrigger, Kq as ElCheatSheetTrigger, vL as Empty, wL as EmptyContent, CL as EmptyDescription, yL as EmptyHeader, xL as EmptyMedia, SL as EmptyTitle, qq as FacetedFilter, M as Field, _ as FieldContent, v as FieldDescription, O as FieldError, T as FieldGroup, b as FieldLabel, y as FieldLegend, p as FieldSeparator, N as FieldSet, I as FieldTitle, Qq as FileUpload, vz as FileUploadInput, Zq as FileUploadItem, yz as HoverCard, xz as HoverCardContent, wz as HoverCardDescription, Sz as HoverCardHeader, Cz as HoverCardTitle, bz as HoverCardTrigger, FA as Input, IA as InputGroup, RA as InputGroupAddon, BA as InputGroupButton, HA as InputGroupInput, VA as InputGroupText, UA as InputGroupTextarea, Oz as Item, Pz as ItemActions, jz as ItemContent, Nz as ItemDescription, Iz as ItemFooter, Tz as ItemGroup, Fz as ItemHeader, Az as ItemMedia, Ez as ItemSeparator, Mz as ItemTitle, kY as JsonSchemaForm, Lz as Kbd, Rz as KbdGroup, h as Label, AZ as LayoutSlotsProvider, Vz as Logo, TK as MonoCell, NZ as PageFocused, Hz as Pagination, Uz as PaginationContent, Jz as PaginationEllipsis, Wz as PaginationItem, Gz as PaginationLink, qz as PaginationNext, Kz as PaginationPrevious, rY as PasswordInput, Yz as Popover, Qz as PopoverAnchor, Zz as PopoverContent, tB as PopoverDescription, $z as PopoverHeader, eB as PopoverTitle, Xz as PopoverTrigger, ft as PortalContainerProvider, nB as Progress, iB as Prose, aB as RadioGroup, oB as RadioGroupItem, nH as ResizableHandle, tH as ResizablePanel, eH as ResizablePanelGroup, rH as ScrollArea, iH as ScrollBar, aH as Select, lH as SelectContent, oH as SelectGroup, dH as SelectItem, uH as SelectLabel, mH as SelectScrollDownButton, pH as SelectScrollUpButton, fH as SelectSeparator, cH as SelectTrigger, sH as SelectValue, dW as SelectorDropdown, fW as SelectorTriggerButton, F as Separator, hH as Sheet, _H as SheetClose, bH as SheetContent, wH as SheetDescription, SH as SheetFooter, xH as SheetHeader, CH as SheetTitle, gH as SheetTrigger, UH as Sidebar, ZH as SidebarContent, YH as SidebarFooter, QH as SidebarGroup, eU as SidebarGroupAction, tU as SidebarGroupContent, $H as SidebarGroupLabel, JH as SidebarHeader, qH as SidebarInput, KH as SidebarInset, nU as SidebarMenu, oU as SidebarMenuAction, sU as SidebarMenuBadge, aU as SidebarMenuButton, rU as SidebarMenuItem, cU as SidebarMenuSkeleton, lU as SidebarMenuSub, dU as SidebarMenuSubButton, uU as SidebarMenuSubItem, xW as SidebarModeControl, yW as SidebarModeProvider, DW as SidebarNavigation, HH as SidebarProvider, GH as SidebarRail, XH as SidebarSeparator, WH as SidebarTrigger, jW as SidebarUpgradeFooter, n as Skeleton, UU as Spinner, WU as Switch, GU as Table, qU as TableBody, QU as TableCaption, ZU as TableCell, JU as TableFooter, XU as TableHead, KU as TableHeader, YU as TableRow, $U as Tabs, rW as TabsContent, tW as TabsList, nW as TabsTrigger, e as Textarea, Ee as ThemeProvider, HU as Toaster, aW as Toggle, sW as ToggleGroup, cW as ToggleGroupItem, EH as Tooltip, OH as TooltipContent, TH as TooltipProvider, DH as TooltipTrigger,
|
|
35364
|
+
export { jv as Accordion, Pv as AccordionContent, Mv as AccordionItem, Nv as AccordionTrigger, d as Alert, i as AlertAction, P as AlertDescription, f as AlertTitle, pW as AppContextBar, CW as AppLayout, EW as AppSidebar, uW as AppSwitcher, Fv as Avatar, Rv as AvatarBadge, Lv as AvatarFallback, zv as AvatarGroup, Bv as AvatarGroupCount, Iv as AvatarImage, Hv as Badge, wK as BadgeCell, Uv as Breadcrumb, Yv as BreadcrumbEllipsis, Gv as BreadcrumbItem, Kv as BreadcrumbLink, Wv as BreadcrumbList, qv as BreadcrumbPage, Jv as BreadcrumbSeparator, Zv as Button, $v as ButtonGroup, ty as ButtonGroupSeparator, ey as ButtonGroupText, mC as Calendar, hC as CalendarDayButton, gC as Card, bC as CardAction, xC as CardContent, yC as CardDescription, SC as CardFooter, _C as CardHeader, vC as CardTitle, CC as Checkbox, wC as Collapsible, EC as CollapsibleContent, TC as CollapsibleTrigger, WA as Combobox, ij as ComboboxChip, rj as ComboboxChips, aj as ComboboxChipsInput, ej as ComboboxCollection, YA as ComboboxContent, tj as ComboboxEmpty, QA as ComboboxGroup, JA as ComboboxInput, ZA as ComboboxItem, $A as ComboboxLabel, XA as ComboboxList, nj as ComboboxSeparator, KA as ComboboxTrigger, GA as ComboboxValue, vF as Command, yF as CommandDialog, SF as CommandEmpty, CF as CommandGroup, bF as CommandInput, TF as CommandItem, xF as CommandList, wF as CommandSeparator, EF as CommandShortcut, PW as ContentHeader, DF as ContextMenu, LF as ContextMenuCheckboxItem, NF as ContextMenuContent, kF as ContextMenuGroup, PF as ContextMenuItem, zF as ContextMenuLabel, AF as ContextMenuPortal, MF as ContextMenuRadioGroup, RF as ContextMenuRadioItem, BF as ContextMenuSeparator, VF as ContextMenuShortcut, jF as ContextMenuSub, IF as ContextMenuSubContent, FF as ContextMenuSubTrigger, OF as ContextMenuTrigger, OW as ContextSidebar, kW as ContextToggleButton, EK as CopyableCell, FW as CopyableText, OZ as DEFAULT_SLOTS, hK as DataTable, gK as DataTableColumnHeader, OK as DataTableEmptyState, cK as DataTablePagination, lK as DataTableViewOptions, CK as DateCell, Lq as DatePicker, Rq as DateRangePicker, Vq as DateTimePicker, Wq as DateTimeRangePicker, cF as Dialog, dF as DialogClose, pF as DialogContent, _F as DialogDescription, hF as DialogFooter, mF as DialogHeader, fF as DialogOverlay, uF as DialogPortal, gF as DialogTitle, lF as DialogTrigger, qI as Drawer, XI as DrawerClose, QI as DrawerContent, nL as DrawerDescription, eL as DrawerFooter, $I as DrawerHeader, ZI as DrawerOverlay, YI as DrawerPortal, tL as DrawerTitle, JI as DrawerTrigger, rL as DropdownMenu, lL as DropdownMenuCheckboxItem, oL as DropdownMenuContent, sL as DropdownMenuGroup, cL as DropdownMenuItem, fL as DropdownMenuLabel, iL as DropdownMenuPortal, uL as DropdownMenuRadioGroup, dL as DropdownMenuRadioItem, pL as DropdownMenuSeparator, mL as DropdownMenuShortcut, hL as DropdownMenuSub, _L as DropdownMenuSubContent, gL as DropdownMenuSubTrigger, aL as DropdownMenuTrigger, Kq as ElCheatSheetTrigger, vL as Empty, wL as EmptyContent, CL as EmptyDescription, yL as EmptyHeader, xL as EmptyMedia, SL as EmptyTitle, qq as FacetedFilter, M as Field, _ as FieldContent, v as FieldDescription, O as FieldError, T as FieldGroup, b as FieldLabel, y as FieldLegend, p as FieldSeparator, N as FieldSet, I as FieldTitle, Qq as FileUpload, vz as FileUploadInput, Zq as FileUploadItem, yz as HoverCard, xz as HoverCardContent, wz as HoverCardDescription, Sz as HoverCardHeader, Cz as HoverCardTitle, bz as HoverCardTrigger, FA as Input, IA as InputGroup, RA as InputGroupAddon, BA as InputGroupButton, HA as InputGroupInput, VA as InputGroupText, UA as InputGroupTextarea, Oz as Item, Pz as ItemActions, jz as ItemContent, Nz as ItemDescription, Iz as ItemFooter, Tz as ItemGroup, Fz as ItemHeader, Az as ItemMedia, Ez as ItemSeparator, Mz as ItemTitle, kY as JsonSchemaForm, Lz as Kbd, Rz as KbdGroup, h as Label, AZ as LayoutSlotsProvider, Vz as Logo, TK as MonoCell, NZ as PageFocused, PZ as PageHeader, Hz as Pagination, Uz as PaginationContent, Jz as PaginationEllipsis, Wz as PaginationItem, Gz as PaginationLink, qz as PaginationNext, Kz as PaginationPrevious, rY as PasswordInput, Yz as Popover, Qz as PopoverAnchor, Zz as PopoverContent, tB as PopoverDescription, $z as PopoverHeader, eB as PopoverTitle, Xz as PopoverTrigger, ft as PortalContainerProvider, nB as Progress, iB as Prose, aB as RadioGroup, oB as RadioGroupItem, nH as ResizableHandle, tH as ResizablePanel, eH as ResizablePanelGroup, rH as ScrollArea, iH as ScrollBar, aH as Select, lH as SelectContent, oH as SelectGroup, dH as SelectItem, uH as SelectLabel, mH as SelectScrollDownButton, pH as SelectScrollUpButton, fH as SelectSeparator, cH as SelectTrigger, sH as SelectValue, dW as SelectorDropdown, fW as SelectorTriggerButton, F as Separator, hH as Sheet, _H as SheetClose, bH as SheetContent, wH as SheetDescription, SH as SheetFooter, xH as SheetHeader, CH as SheetTitle, gH as SheetTrigger, UH as Sidebar, ZH as SidebarContent, YH as SidebarFooter, QH as SidebarGroup, eU as SidebarGroupAction, tU as SidebarGroupContent, $H as SidebarGroupLabel, JH as SidebarHeader, qH as SidebarInput, KH as SidebarInset, nU as SidebarMenu, oU as SidebarMenuAction, sU as SidebarMenuBadge, aU as SidebarMenuButton, rU as SidebarMenuItem, cU as SidebarMenuSkeleton, lU as SidebarMenuSub, dU as SidebarMenuSubButton, uU as SidebarMenuSubItem, xW as SidebarModeControl, yW as SidebarModeProvider, DW as SidebarNavigation, HH as SidebarProvider, GH as SidebarRail, XH as SidebarSeparator, WH as SidebarTrigger, jW as SidebarUpgradeFooter, n as Skeleton, UU as Spinner, WU as Switch, GU as Table, qU as TableBody, QU as TableCaption, ZU as TableCell, JU as TableFooter, XU as TableHead, KU as TableHeader, YU as TableRow, $U as Tabs, rW as TabsContent, tW as TabsList, nW as TabsTrigger, e as Textarea, Ee as ThemeProvider, HU as Toaster, aW as Toggle, sW as ToggleGroup, cW as ToggleGroupItem, EH as Tooltip, OH as TooltipContent, TH as TooltipProvider, DH as TooltipTrigger, IZ as TopNavUser, DK as TruncatedCell, o as alertVariants, Vv as badgeVariants, IW as buildLinearBreadcrumbs, Qv as buttonGroupVariants, Xv as buttonVariants, t as cn, AY as composeResolvers, TJ as extractDefaults, bZ as jsonSchemaResolver, Bz as logoVariants, eW as tabsListVariants, EU as toast, iW as toggleVariants, oj as useComboboxAnchor, MZ as useLayoutConfig, jZ as useLayoutSlots, pt as usePortalContainer, VH as useSidebar, gW as useSidebarMode, Te as useTheme };
|