@gravitee/graphene-core 3.51.0 → 3.52.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 CHANGED
@@ -1060,7 +1060,7 @@ The platform e2e suite selects elements by `data-testid` only. These are the rul
1060
1060
  - Anything that opens an overlay: the trigger.
1061
1061
  - Dialogs, sheets, drawers and popovers: the content node inside the portal, not the overlay.
1062
1062
  - Rows: the `<tr>`.
1063
- - Radix roots that render no element (`Dialog`, `Select`, `DropdownMenu`, `Popover`, `Tooltip`, …) have no target: put the id on their Trigger, Content or Item.
1063
+ - Radix roots that render no element (`Dialog`, `Select`, `DropdownMenu`, `Popover`, `Tooltip`, …) have no target: put the id on their Trigger, Content or Item. Nor do the providers (`ThemeProvider`, `SidebarModeProvider`, `LayoutSlotsProvider`): put the id on the components inside them.
1064
1064
  - Each component's docs page names its element and its derived parts: "Test id lands on …". Only what a docs page or the **Derived parts** table below states is guaranteed.
1065
1065
  - **Derived ids.** A component may give the parts it renders itself, that you can't compose, an id derived from yours: `${id}-<part>`, or `${id}-<part>-<key>` with a key taken verbatim from your data (a built-in close button would be `${id}-close`). Which parts exist is in the **Derived parts** table below and on each component's docs page: don't assume one they don't list. Match exact ids, not prefixes.
1066
1066
  - **Stability.** Documented targets and part names are public API. Renaming or removing one, or moving it to another element, ships only in a major version, with a release note.
@@ -1147,6 +1147,18 @@ The components that derive ids from yours. A part exists only when you pass an i
1147
1147
  | `FacetedFilter` | `${id}-count` | Count badge, while a value is selected |
1148
1148
  | `FacetedFilter` | `${id}-option-<value>` | Option, while the popover is open and the search shows it; `value` verbatim, not ending with `-select` |
1149
1149
  | `FacetedFilter` | `${id}-option-<value>-select` | The option's checkbox, present with its option; read-only: read `aria-checked`, click `${id}-option-<value>` to select (a click on the checkbox fails, the option intercepts it) |
1150
+ | `AppLayout` | `${id}-main` | Main content region (`<main>`) |
1151
+ | `AppLayout` | `${id}-context-sidebar` | Context sidebar `<aside>`, while `viewMode` is `'context'` with a `contextSidebar`; `aria-hidden` while collapsed |
1152
+ | `AppLayout` | `${id}-banner` | Banner wrapper, with `banner` |
1153
+ | `AppSidebar` | `${id}-logo` | Logo button, with `onLogoClick`; without it the logo is decorative and has no id |
1154
+ | `AppSidebar` | `${id}-footer` | Footer, holding the `renderFooter` content and the sidebar mode control |
1155
+ | `AppSidebar` | `${id}-rail` | Rail button (toggles the sidebar) |
1156
+ | `AppSidebar` | `${id}-mode` | Sidebar mode control trigger; its parts are those of `SidebarModeControl`: `${id}-mode-content`, `${id}-mode-option-<mode>` |
1157
+ | `SidebarModeControl` | `${id}-content` | Popover content, while the popover is open |
1158
+ | `SidebarModeControl` | `${id}-option-<mode>` | Mode option (`expanded`, `collapsed`, `hover-expand`), while the popover is open |
1159
+ | `SidebarNavigation` | `${id}-nav-<item.key>` | Item link, with an `href`, or button, locked or without one; `item.key` verbatim, unique across the whole navigation |
1160
+ | `ContextSidebar` | `${id}-nav-<item.key>` | Navigation item, with `groups`: the navigation takes the sidebar's own id; its parts are those of `SidebarNavigation` |
1161
+ | `SidebarUpgradeFooter` | `${id}-action` | Upgrade link, while `lockedFeatures` is not empty |
1150
1162
  | `CodeEditor` | `${id}-loading` | Skeleton, while Monaco loads |
1151
1163
  | `CodeEditor` | `${id}-fallback` | Plain textarea, when Monaco fails to load |
1152
1164
  | `JsonSchemaForm` | `${id}-<path>` | The control of the field at the react-hook-form path, verbatim (`headers.0.name`); a code editor field: its container, with `-loading` while Monaco loads and `-fallback` when it fails |
@@ -1163,6 +1175,8 @@ The components that derive ids from yours. A part exists only when you pass an i
1163
1175
 
1164
1176
  `JsonSchemaForm` renders no element of its own, so its id is only a prefix. A field at the root path is `${id}`, and its error `${id}-error`.
1165
1177
 
1178
+ `SidebarNavigation` renders no element of its own either: its id only prefixes its items. `ContextSidebar` hands its own id, unchanged, to the `SidebarNavigation` it renders from `groups`, so its items are `${id}-nav-<item.key>`. Some exports have their docs line on another component's page: `SidebarNavigation`, `SidebarUpgradeFooter`, `SidebarModeControl` and `SidebarModeProvider` on the `AppSidebar` page, `ContextToggleButton` and `LayoutSlotsProvider` on the `ContextSidebar` page, `ThemeProvider` on the `AppLayout` page.
1179
+
1166
1180
  The `DataTable` row key is TanStack's `row.id`: pass `tableOptions={{ getRowId: (entity) => entity.id }}` for a stable key. Without `getRowId`, the key is the row's index in `data`, which is not a contract. `DataTableColumnHeader` takes the prefix of its header cell, `${tableId}-header-<columnId>`, unless you give it an id of its own. Keys are verbatim, never escaped: a `getRowId` result must not end with `-select`, and a column id must not end with `-sort` or `-resize`, or two elements share one id (row `a`'s checkbox and a row `a-select` are both `${tableId}-row-a-select`). Use the record's own id, not a display label. `columnId` is TanStack's `column.id`: the column's `id`, else its `accessorKey` (`.` becomes `_`), else its `header` when that is a string, which makes the key a display label. Give an explicit `id` to every column group and to every column without an `accessorKey`. The id of a column group's header, `${tableId}-header-<groupId>` and its `-resize`, is unique only while the group's columns stay adjacent: a `columnOrder` or `columnPinning` passed through `tableOptions` that puts another column between them renders the group's header twice, with the same id.
1167
1181
 
1168
1182
  The `Calendar` day keys are dates as react-day-picker formats them: they assume react-day-picker's default `numerals` (`latn`) and no `dateLib` override (Gregorian calendar); the `locale` doesn't change them. The dropdown keys are positions: navigating or picking a month doesn't change them. A `Calendar` part you replace through `components` gets no id. Replacing `MonthCaption` also drops the `month` and `year` ids, even though the dropdowns still render.
@@ -2,6 +2,12 @@ import { ReactNode } from 'react';
2
2
  import { SidebarMode } from '../SidebarMode';
3
3
  import { ThemeMode } from '../ThemeProvider';
4
4
  interface AppLayoutProps {
5
+ /**
6
+ * Lands on the root `div[data-slot=sidebar-wrapper]`. Main region (`<main>`): `${id}-main`, context sidebar
7
+ * (`<aside>`, in context view mode with a `contextSidebar`): `${id}-context-sidebar`, banner (with `banner`):
8
+ * `${id}-banner`.
9
+ */
10
+ readonly 'data-testid'?: string;
5
11
  readonly className?: string;
6
12
  /** Side navigation element (typically an <AppSidebar />). */
7
13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G;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,2FAA2F;IAC3F,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,0DAA0D;IAC1D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,WAAW,CAAC;IAC1C,kDAAkD;IAClD,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC;CACnC;AAyGD,iBAAS,SAAS,CAAC,EAAE,kBAAmC,EAAE,YAAuB,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,+BAQ3G;kBARQ,SAAS;;;AAYlB,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -1,5 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
2
  interface AppSidebarProps {
3
+ /**
4
+ * Lands on the sidebar panel: `div[data-slot=sidebar-container]` on desktop; on mobile, the sheet content, inside
5
+ * the portal, while the sheet is open. `${id}-logo`: the logo button, with `onLogoClick` (without it the logo is
6
+ * decorative and has no id). Footer: `${id}-footer`, rail: `${id}-rail`, sidebar mode control: `${id}-mode`, which
7
+ * derives the parts of `SidebarModeControl` (`${id}-mode-content`, `${id}-mode-option-<mode>`); on mobile they too
8
+ * exist only while the sheet is open. What `renderNavigation` and `renderFooter` return keeps its own ids.
9
+ */
10
+ readonly 'data-testid'?: string;
3
11
  readonly className?: string;
4
12
  /**
5
13
  * Click handler for the logo. Use this for client-side routing in SPAs.
@@ -21,7 +29,7 @@ interface AppSidebarProps {
21
29
  */
22
30
  readonly renderFooter?: () => ReactNode;
23
31
  }
24
- declare function AppSidebar({ className, onLogoClick, renderNavigation, renderFooter }: AppSidebarProps): import("react").JSX.Element;
32
+ declare function AppSidebar({ className, onLogoClick, renderNavigation, renderFooter, 'data-testid': testId, }: AppSidebarProps): import("react").JSX.Element;
25
33
  declare namespace AppSidebar {
26
34
  var displayName: string;
27
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AppSidebar.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/AppSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBvC,UAAU,eAAe;IACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAElC;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,SAAS,CAAC;IAE5C;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,SAAS,CAAC;CACzC;AASD,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,EAAE,eAAe,+BAmD9F;kBAnDQ,UAAU;;;AAuDnB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"AppSidebar.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/AppSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBvC,UAAU,eAAe;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAElC;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,SAAS,CAAC;IAE5C;;;;;OAKG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,SAAS,CAAC;CACzC;AASD,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,EAAE,MAAM,GACtB,EAAE,eAAe,+BAqDjB;kBA3DQ,UAAU;;;AA+DnB,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -1,6 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { NavGroup } from './types';
3
3
  interface ContextSidebarProps {
4
+ /**
5
+ * Lands on the root `div[data-slot=context-sidebar]`. With `groups`, the navigation it renders takes the same id:
6
+ * each item is `${id}-nav-<item.key>`, as in `SidebarNavigation`. `children` keep their own ids.
7
+ */
8
+ readonly 'data-testid'?: string;
4
9
  readonly className?: string;
5
10
  /** App-specific header content (e.g. resource name, version, status). */
6
11
  readonly header?: ReactNode;
@@ -11,7 +16,7 @@ interface ContextSidebarProps {
11
16
  /** Escape hatch: provide fully custom navigation instead of `groups`. */
12
17
  readonly children?: ReactNode;
13
18
  }
14
- declare function ContextSidebar({ className, header, groups, activeItemKey, onItemSelect, children }: ContextSidebarProps): import("react").JSX.Element;
19
+ declare function ContextSidebar({ className, header, groups, activeItemKey, onItemSelect, children, 'data-testid': testId, }: ContextSidebarProps): import("react").JSX.Element;
15
20
  declare namespace ContextSidebar {
16
21
  var displayName: string;
17
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContextSidebar.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/ContextSidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,yEAAyE;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC7B,QAAQ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AqBrB;kBA7BQ,cAAc;;;AAiCvB,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,9 +1,12 @@
1
1
  interface ContextToggleButtonProps {
2
+ /** Lands on the `<button>`. */
3
+ readonly 'data-testid'?: string;
4
+ /** Whether the context sidebar is expanded; the button reports it as `aria-pressed`. */
2
5
  readonly expanded: boolean;
3
6
  readonly onToggle: () => void;
4
7
  readonly className?: string;
5
8
  }
6
- declare function ContextToggleButton({ expanded, onToggle, className }: ContextToggleButtonProps): import("react").JSX.Element;
9
+ declare function ContextToggleButton({ expanded, onToggle, className, 'data-testid': testId }: ContextToggleButtonProps): import("react").JSX.Element;
7
10
  declare namespace ContextToggleButton {
8
11
  var displayName: string;
9
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContextToggleButton.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/ContextToggleButton.tsx"],"names":[],"mappings":"AAIA,UAAU,wBAAwB;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,wBAAwB,+BAYvF;kBAZQ,mBAAmB;;;AAgB5B,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"ContextToggleButton.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/ContextToggleButton.tsx"],"names":[],"mappings":"AAIA,UAAU,wBAAwB;IAChC,+BAA+B;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,wFAAwF;IACxF,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,wBAAwB,+BAc9G;kBAdQ,mBAAmB;;;AAkB5B,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,10 +1,15 @@
1
1
  import { NavGroup } from './types';
2
2
  interface SidebarNavigationProps {
3
+ /**
4
+ * No element of its own: the id only prefixes the items. Each item's link (with an `href`) or button (locked, or
5
+ * no `href`): `${id}-nav-<item.key>`, the key verbatim.
6
+ */
7
+ readonly 'data-testid'?: string;
3
8
  readonly groups: NavGroup[];
4
9
  readonly activeItemKey?: string;
5
10
  readonly onItemSelect?: (key: string) => void;
6
11
  }
7
- declare function SidebarNavigation({ groups, activeItemKey, onItemSelect }: SidebarNavigationProps): import("react").JSX.Element;
12
+ declare function SidebarNavigation({ groups, activeItemKey, onItemSelect, 'data-testid': testId }: SidebarNavigationProps): import("react").JSX.Element;
8
13
  declare namespace SidebarNavigation {
9
14
  var displayName: string;
10
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarNavigation.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/SidebarNavigation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED,iBAAS,iBAAiB,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,sBAAsB,+BAiFzF;kBAjFQ,iBAAiB;;;AAqF1B,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"SidebarNavigation.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/SidebarNavigation.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,UAAU,sBAAsB;IAC9B;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED,iBAAS,iBAAiB,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,sBAAsB,+BAkFhH;kBAlFQ,iBAAiB;;;AAsF1B,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAC7B,YAAY,EAAE,sBAAsB,EAAE,CAAC"}
@@ -1,4 +1,6 @@
1
1
  interface SidebarUpgradeFooterProps {
2
+ /** Lands on the root `<div>`, while it renders (`lockedFeatures` not empty). Upgrade link: `${id}-action`. */
3
+ readonly 'data-testid'?: string;
2
4
  /**
3
5
  * Names of the sidebar items currently gated behind an upgrade (typically derived
4
6
  * from a license check at the composition site). Used to build a short, specific
@@ -29,7 +31,7 @@ interface SidebarUpgradeFooterProps {
29
31
  * />
30
32
  * ```
31
33
  */
32
- declare function SidebarUpgradeFooter({ lockedFeatures }: SidebarUpgradeFooterProps): import("react").JSX.Element | null;
34
+ declare function SidebarUpgradeFooter({ lockedFeatures, 'data-testid': testId }: SidebarUpgradeFooterProps): import("react").JSX.Element | null;
33
35
  declare namespace SidebarUpgradeFooter {
34
36
  var displayName: string;
35
37
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarUpgradeFooter.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/SidebarUpgradeFooter.tsx"],"names":[],"mappings":"AASA,UAAU,yBAAyB;IACjC;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,oBAAoB,CAAC,EAAE,cAAc,EAAE,EAAE,yBAAyB,sCAmB1E;kBAnBQ,oBAAoB;;;AA8B7B,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"SidebarUpgradeFooter.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/SidebarUpgradeFooter.tsx"],"names":[],"mappings":"AAUA,UAAU,yBAAyB;IACjC,8GAA8G;IAC9G,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,iBAAS,oBAAoB,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,yBAAyB,sCAmBjG;kBAnBQ,oBAAoB;;;AA8B7B,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAChC,YAAY,EAAE,yBAAyB,EAAE,CAAC"}
@@ -8,6 +8,10 @@ import { ElementType } from 'react';
8
8
  */
9
9
  type NavItemAccess = 'full' | 'locked' | 'limited';
10
10
  interface NavItem {
11
+ /**
12
+ * A stable key, never a label: unique across the whole navigation, not just its group. Used verbatim as the test
13
+ * id key (`${id}-nav-<key>`).
14
+ */
11
15
  readonly key: string;
12
16
  readonly title: string;
13
17
  readonly icon?: ElementType;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC;;;;;;GAMG;AACH,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnD,UAAU,OAAO;IACf,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,QAAQ;IAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC;CAC3B;AAED,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composed/AppSidebar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC;;;;;;GAMG;AACH,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnD,UAAU,OAAO;IACf;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,QAAQ;IAChB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC;CAC3B;AAED,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -30,6 +30,7 @@ interface LayoutSlotsContextValue {
30
30
  readonly resetSlots: (keys: ReadonlyArray<keyof LayoutSlots>) => void;
31
31
  }
32
32
  declare const DEFAULT_SLOTS: LayoutSlots;
33
+ /** Renders no element: no test id. */
33
34
  declare function LayoutSlotsProvider({ children }: {
34
35
  readonly children: ReactNode;
35
36
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutSlotsContext.d.ts","sourceRoot":"","sources":["../../../src/composed/LayoutSlots/LayoutSlotsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAA8C,MAAM,OAAO,CAAC;AAClG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gDAAgD,CAAC;AAEtF,UAAU,WAAW;IACnB,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,cAAc,EAAE,SAAS,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,eAAe,EAAE,CAAC;IACxC,sFAAsF;IACtF,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,SAAS,GAAG,YAAY,CAAC;IAClD,2GAA2G;IAC3G,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC5B;AAED,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,SAA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AQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,sEAAsE;IACtE,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;CAC5B;AAED,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,SAAS,MAAM,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IACvF,QAAQ,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,WAAW,CAAC,KAAK,IAAI,CAAC;CACvE;AAED,QAAA,MAAM,aAAa,EAAE,WAWpB,CAAC;AAIF,sCAAsC;AACtC,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAwB1E;AAED,iBAAS,cAAc,IAAI,uBAAuB,CAMjD;AAED,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAC;AAC9D,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC"}
@@ -9,6 +9,7 @@ interface SidebarModeProviderProps {
9
9
  readonly children: ReactNode;
10
10
  readonly defaultMode?: SidebarMode;
11
11
  }
12
+ /** Renders no element: no test id. */
12
13
  declare function SidebarModeProvider({ children, defaultMode }: SidebarModeProviderProps): import("react").JSX.Element;
13
14
  export { SidebarModeProvider, useSidebarMode };
14
15
  export type { SidebarMode, SidebarModeContextValue, SidebarModeProviderProps };
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarModeContext.d.ts","sourceRoot":"","sources":["../../../src/composed/SidebarMode/Sideb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EAAE,WAA4B,EAAE,EAAE,wBAAwB,+BAWhG;AAED,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,CAAC"}
@@ -1,7 +1,12 @@
1
1
  interface SidebarModeControlProps {
2
+ /**
3
+ * Lands on the trigger `<button>`. Popover content: `${id}-content`, each mode: `${id}-option-<mode>`
4
+ * (`expanded`, `collapsed`, `hover-expand`).
5
+ */
6
+ readonly 'data-testid'?: string;
2
7
  readonly className?: string;
3
8
  }
4
- declare function SidebarModeControl({ className }: SidebarModeControlProps): import("react").JSX.Element;
9
+ declare function SidebarModeControl({ className, 'data-testid': testId }: SidebarModeControlProps): import("react").JSX.Element;
5
10
  declare namespace SidebarModeControl {
6
11
  var displayName: string;
7
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarModeControl.d.ts","sourceRoot":"","sources":["../../../src/composed/SidebarMode/SidebarModeControl.tsx"],"names":[],"mappings":"AAgBA,UAAU,uBAAuB;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,EAAE,uBAAuB,+BAmDjE;kBAnDQ,kBAAkB;;;AAuD3B,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,uBAAuB,EAAE,CAAC"}
1
+ {"version":3,"file":"SidebarModeControl.d.ts","sourceRoot":"","sources":["../../../src/composed/SidebarMode/SidebarModeControl.tsx"],"names":[],"mappings":"AAiBA,UAAU,uBAAuB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,uBAAuB,+BAyDxF;kBAzDQ,kBAAkB;;;AA6D3B,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,uBAAuB,EAAE,CAAC"}
@@ -11,6 +11,7 @@ interface ThemeProviderProps {
11
11
  readonly children: ReactNode;
12
12
  readonly defaultMode?: ThemeMode;
13
13
  }
14
+ /** Renders no element: no test id. */
14
15
  declare function ThemeProvider({ children, defaultMode }: ThemeProviderProps): import("react").JSX.Element;
15
16
  declare function useTheme(): ThemeContextValue;
16
17
  export { THEME_MODE_STORAGE_KEY, ThemeProvider, useTheme };
@@ -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,CAAC;AAEvC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC7C,KAAK,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;AAItC,QAAA,MAAM,sBAAsB,wBAAwB,CAAC;AAErD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;CACvC;AAgCD,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;CAClC;AAED,iBAAS,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"}
1
+ {"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../src/composed/ThemeProvider/ThemeProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAC7C,KAAK,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;AAItC,QAAA,MAAM,sBAAsB,wBAAwB,CAAC;AAErD,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;CACvC;AAgCD,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;CAClC;AAED,sCAAsC;AACtC,iBAAS,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.js CHANGED
@@ -25122,14 +25122,15 @@ var UW = [
25122
25122
  label: "Expand on hover"
25123
25123
  }
25124
25124
  ];
25125
- function WW({ className: e }) {
25126
- let { mode: n, setMode: r } = zW(), { state: i } = oU(), a = i === "collapsed", [o, s] = Xe(!1), c = /* @__PURE__ */ U(pB, {
25125
+ function WW({ className: e, "data-testid": n }) {
25126
+ let { mode: r, setMode: i } = zW(), { state: a } = oU(), o = a === "collapsed", [s, c] = Xe(!1), l = /* @__PURE__ */ U(pB, {
25127
25127
  asChild: !0,
25128
25128
  children: /* @__PURE__ */ U(ay, {
25129
25129
  variant: "ghost",
25130
25130
  size: "icon",
25131
25131
  className: t("size-8 text-sidebar-foreground/70", e),
25132
25132
  "aria-label": "Sidebar display mode",
25133
+ "data-testid": n,
25133
25134
  children: /* @__PURE__ */ U(ge, {
25134
25135
  "aria-hidden": "true",
25135
25136
  className: "size-4"
@@ -25137,29 +25138,31 @@ function WW({ className: e }) {
25137
25138
  })
25138
25139
  });
25139
25140
  return /* @__PURE__ */ W(fB, {
25140
- open: o,
25141
- onOpenChange: s,
25142
- children: [a ? /* @__PURE__ */ W(GH, { children: [/* @__PURE__ */ U(KH, {
25141
+ open: s,
25142
+ onOpenChange: c,
25143
+ children: [o ? /* @__PURE__ */ W(GH, { children: [/* @__PURE__ */ U(KH, {
25143
25144
  asChild: !0,
25144
- children: c
25145
+ children: l
25145
25146
  }), /* @__PURE__ */ U(qH, {
25146
25147
  side: "right",
25147
25148
  children: "Sidebar mode"
25148
- })] }) : c, /* @__PURE__ */ U(mB, {
25149
+ })] }) : l, /* @__PURE__ */ U(mB, {
25149
25150
  side: "top",
25150
25151
  align: "start",
25151
25152
  className: "w-48 p-1",
25153
+ "data-testid": J(n, "content"),
25152
25154
  children: /* @__PURE__ */ U(OW, {
25153
25155
  type: "single",
25154
25156
  orientation: "vertical",
25155
- value: n,
25157
+ value: r,
25156
25158
  onValueChange: (e) => {
25157
- e && (r(e), s(!1));
25159
+ e && (i(e), c(!1));
25158
25160
  },
25159
25161
  className: "w-full",
25160
25162
  children: UW.map((e) => /* @__PURE__ */ U(kW, {
25161
25163
  value: e.value,
25162
25164
  className: "w-full justify-start text-sm",
25165
+ "data-testid": J(n, `option-${e.value}`),
25163
25166
  children: e.label
25164
25167
  }, e.value))
25165
25168
  })
@@ -25169,30 +25172,33 @@ function WW({ className: e }) {
25169
25172
  WW.displayName = "SidebarModeControl";
25170
25173
  //#endregion
25171
25174
  //#region src/composed/AppLayout/AppLayout.tsx
25172
- function GW({ className: e, sidebar: n, contextSidebar: r, subheader: i, children: a, viewMode: o, contextExpanded: s = !0, contentVariant: c = "default", banner: l, bannerSticky: u = !1, fullHeight: d = !0 }) {
25173
- let f = o === "context", { mode: p } = zW(), [m, h] = Xe(p), [g, _] = Xe(!1);
25174
- p !== m && (h(p), p !== "hover-expand" && _(!1));
25175
- let v = p === "expanded" ? !0 : p === "collapsed" ? !1 : g, y = p === "hover-expand" ? _ : void 0, [b, x] = Xe(o), [S, C] = Xe(!1);
25176
- return o !== b && (x(o), C(!0)), Ke(() => {
25175
+ function GW({ className: e, sidebar: n, contextSidebar: r, subheader: i, children: a, viewMode: o, contextExpanded: s = !0, contentVariant: c = "default", banner: l, bannerSticky: u = !1, fullHeight: d = !0, "data-testid": f }) {
25176
+ let p = o === "context", { mode: m } = zW(), [h, g] = Xe(m), [_, v] = Xe(!1);
25177
+ m !== h && (g(m), m !== "hover-expand" && v(!1));
25178
+ let y = m === "expanded" ? !0 : m === "collapsed" ? !1 : _, b = m === "hover-expand" ? v : void 0, [x, S] = Xe(o), [C, w] = Xe(!1);
25179
+ return o !== x && (S(o), w(!0)), Ke(() => {
25177
25180
  let e = requestAnimationFrame(() => {
25178
- C(!1);
25181
+ w(!1);
25179
25182
  });
25180
25183
  return () => cancelAnimationFrame(e);
25181
25184
  }, [o]), /* @__PURE__ */ U(sU, {
25182
- open: v,
25183
- onOpenChange: y,
25184
- className: t("min-h-0", d ? "h-svh" : "h-full", S && "**:duration-0!", p === "hover-expand" && g && "**:data-[slot=sidebar-gap]:w-(--sidebar-width-icon)!"),
25185
+ open: y,
25186
+ onOpenChange: b,
25187
+ className: t("min-h-0", d ? "h-svh" : "h-full", C && "**:duration-0!", m === "hover-expand" && _ && "**:data-[slot=sidebar-gap]:w-(--sidebar-width-icon)!"),
25185
25188
  style: d ? { "--topnav-height": "0rem" } : void 0,
25189
+ "data-testid": f,
25186
25190
  children: /* @__PURE__ */ W("div", {
25187
25191
  className: t("flex w-full flex-1 overflow-hidden", e),
25188
25192
  children: [n, /* @__PURE__ */ W(dU, {
25189
25193
  className: "flex min-h-0 flex-col",
25194
+ "data-testid": J(f, "main"),
25190
25195
  children: [i, /* @__PURE__ */ W("div", {
25191
25196
  className: "flex min-h-0 flex-1 overflow-hidden",
25192
- children: [f && r && /* @__PURE__ */ U("aside", {
25197
+ children: [p && r && /* @__PURE__ */ U("aside", {
25193
25198
  className: t("shrink-0 overflow-hidden border-r border-border", "transition-[width] duration-200 ease-linear", s ? "w-context-sidebar" : "w-0"),
25194
25199
  "aria-hidden": !s,
25195
25200
  ...!s && { inert: !0 },
25201
+ "data-testid": J(f, "context-sidebar"),
25196
25202
  children: /* @__PURE__ */ U("div", {
25197
25203
  className: "size-full overflow-y-auto",
25198
25204
  children: r
@@ -25201,6 +25207,7 @@ function GW({ className: e, sidebar: n, contextSidebar: r, subheader: i, childre
25201
25207
  className: "flex min-h-0 flex-1 flex-col overflow-y-auto",
25202
25208
  children: [l && /* @__PURE__ */ U("div", {
25203
25209
  className: t("shrink-0", u && "sticky top-0 z-20 bg-background"),
25210
+ "data-testid": J(f, "banner"),
25204
25211
  children: l
25205
25212
  }), /* @__PURE__ */ U("div", {
25206
25213
  className: t("mx-auto w-full", c === "full-bleed" ? "min-h-0 flex-1 p-0" : "max-w-content px-content pt-4 pb-content"),
@@ -25245,20 +25252,21 @@ var JW = /* @__PURE__ */ W($e, { children: [/* @__PURE__ */ U(iB, {}), /* @__PUR
25245
25252
  className: "truncate text-sm font-medium",
25246
25253
  children: "Gravitee"
25247
25254
  })] });
25248
- function YW({ className: e, onLogoClick: n, renderNavigation: r, renderFooter: i }) {
25249
- let { setOpen: a } = oU(), { mode: o } = zW(), { handleMouseEnter: s, handleMouseLeave: c } = qW({
25250
- mode: o,
25251
- setOpen: a
25255
+ function YW({ className: e, onLogoClick: n, renderNavigation: r, renderFooter: i, "data-testid": a }) {
25256
+ let { setOpen: o } = oU(), { mode: s } = zW(), { handleMouseEnter: c, handleMouseLeave: l } = qW({
25257
+ mode: s,
25258
+ setOpen: o
25252
25259
  });
25253
25260
  return /* @__PURE__ */ U("div", {
25254
25261
  className: e,
25255
- onMouseEnter: s,
25256
- onMouseLeave: c,
25262
+ onMouseEnter: c,
25263
+ onMouseLeave: l,
25257
25264
  children: /* @__PURE__ */ U(WH, {
25258
25265
  delayDuration: 0,
25259
25266
  skipDelayDuration: 0,
25260
25267
  children: /* @__PURE__ */ W(cU, {
25261
25268
  collapsible: "icon",
25269
+ "data-testid": a,
25262
25270
  children: [
25263
25271
  /* @__PURE__ */ U(pU, {
25264
25272
  className: "p-0",
@@ -25266,13 +25274,14 @@ function YW({ className: e, onLogoClick: n, renderNavigation: r, renderFooter: i
25266
25274
  className: "px-2 py-2",
25267
25275
  children: /* @__PURE__ */ U(xU, { children: /* @__PURE__ */ U(SU, { children: /* @__PURE__ */ U(wU, {
25268
25276
  size: "default",
25269
- asChild: !!n,
25277
+ asChild: !0,
25278
+ "data-testid": n ? J(a, "logo") : void 0,
25270
25279
  className: t("py-0.5 group-data-[collapsible=icon]:p-0.5! hover:bg-transparent active:bg-transparent", !n && "pointer-events-none"),
25271
25280
  children: n ? /* @__PURE__ */ U("button", {
25272
25281
  type: "button",
25273
25282
  onClick: n,
25274
25283
  children: JW
25275
- }) : JW
25284
+ }) : /* @__PURE__ */ U("div", { children: JW })
25276
25285
  }) }) })
25277
25286
  })
25278
25287
  }),
@@ -25285,15 +25294,16 @@ function YW({ className: e, onLogoClick: n, renderNavigation: r, renderFooter: i
25285
25294
  }),
25286
25295
  /* @__PURE__ */ W(mU, {
25287
25296
  className: "gap-2",
25297
+ "data-testid": J(a, "footer"),
25288
25298
  children: [i && /* @__PURE__ */ U("div", {
25289
25299
  className: "group-data-[collapsible=icon]:hidden",
25290
25300
  children: i()
25291
25301
  }), /* @__PURE__ */ U("div", {
25292
25302
  className: "flex items-center justify-start",
25293
- children: /* @__PURE__ */ U(WW, {})
25303
+ children: /* @__PURE__ */ U(WW, { "data-testid": J(a, "mode") })
25294
25304
  })]
25295
25305
  }),
25296
- /* @__PURE__ */ U(uU, {})
25306
+ /* @__PURE__ */ U(uU, { "data-testid": J(a, "rail") })
25297
25307
  ]
25298
25308
  })
25299
25309
  })
@@ -25302,38 +25312,39 @@ function YW({ className: e, onLogoClick: n, renderNavigation: r, renderFooter: i
25302
25312
  YW.displayName = "AppSidebar";
25303
25313
  //#endregion
25304
25314
  //#region src/composed/AppSidebar/SidebarNavigation.tsx
25305
- function XW({ groups: e, activeItemKey: n, onItemSelect: r }) {
25315
+ function XW({ groups: e, activeItemKey: n, onItemSelect: r, "data-testid": i }) {
25306
25316
  return /* @__PURE__ */ U($e, { children: e.map((e) => /* @__PURE__ */ W(_U, { children: [/* @__PURE__ */ U(vU, { children: e.label }), /* @__PURE__ */ U(bU, { children: /* @__PURE__ */ U(xU, { children: e.items.map((e) => {
25307
- let i = e.access ?? "full", a = i === "locked", o = i === "limited", s = !a && e.key === n;
25317
+ let a = e.access ?? "full", o = a === "locked", s = a === "limited", c = !o && e.key === n;
25308
25318
  return /* @__PURE__ */ U(SU, { children: /* @__PURE__ */ U(wU, {
25309
25319
  asChild: !0,
25310
- isActive: s,
25311
- tooltip: a ? `${e.title} · Requires an enterprise license` : o ? `${e.title} · Limited access` : e.title,
25320
+ isActive: c,
25321
+ "data-testid": J(i, `nav-${e.key}`),
25322
+ tooltip: o ? `${e.title} · Requires an enterprise license` : s ? `${e.title} · Limited access` : e.title,
25312
25323
  children: /* @__PURE__ */ W(jW, {
25313
- href: a ? void 0 : e.href,
25314
- "aria-current": s ? "page" : void 0,
25315
- "aria-disabled": a || void 0,
25316
- onClick: a ? void 0 : () => r?.(e.key),
25317
- followHref: !r && !s,
25318
- className: t(a && "cursor-not-allowed aria-disabled:pointer-events-auto! aria-disabled:opacity-100!"),
25324
+ href: o ? void 0 : e.href,
25325
+ "aria-current": c ? "page" : void 0,
25326
+ "aria-disabled": o || void 0,
25327
+ onClick: o ? void 0 : () => r?.(e.key),
25328
+ followHref: !r && !c,
25329
+ className: t(o && "cursor-not-allowed aria-disabled:pointer-events-auto! aria-disabled:opacity-100!"),
25319
25330
  children: [
25320
25331
  e.icon && /* @__PURE__ */ W("span", {
25321
25332
  className: "relative flex shrink-0",
25322
- children: [/* @__PURE__ */ U(e.icon, { className: t("size-4", a && "text-muted-foreground") }), (a || o) && /* @__PURE__ */ U("span", {
25333
+ children: [/* @__PURE__ */ U(e.icon, { className: t("size-4", o && "text-muted-foreground") }), (o || s) && /* @__PURE__ */ U("span", {
25323
25334
  "aria-hidden": !0,
25324
- className: t("absolute -top-0.5 -right-0.5 hidden size-2 rounded-full group-data-[collapsible=icon]:block", a ? "bg-primary" : "bg-warning")
25335
+ className: t("absolute -top-0.5 -right-0.5 hidden size-2 rounded-full group-data-[collapsible=icon]:block", o ? "bg-primary" : "bg-warning")
25325
25336
  })]
25326
25337
  }),
25327
25338
  /* @__PURE__ */ U("span", {
25328
- className: t("truncate", a && "text-muted-foreground"),
25339
+ className: t("truncate", o && "text-muted-foreground"),
25329
25340
  children: e.title
25330
25341
  }),
25331
- a && /* @__PURE__ */ W(Xv, {
25342
+ o && /* @__PURE__ */ W(Xv, {
25332
25343
  "aria-label": "Upgrade",
25333
25344
  className: "ml-auto gap-1 group-data-[collapsible=icon]:hidden",
25334
25345
  children: [/* @__PURE__ */ U(pe, { "aria-hidden": !0 }), "Upgrade"]
25335
25346
  }),
25336
- o && /* @__PURE__ */ W(Xv, {
25347
+ s && /* @__PURE__ */ W(Xv, {
25337
25348
  "aria-label": "Limited access",
25338
25349
  variant: "warning",
25339
25350
  className: "ml-auto gap-1 group-data-[collapsible=icon]:hidden",
@@ -25347,10 +25358,11 @@ function XW({ groups: e, activeItemKey: n, onItemSelect: r }) {
25347
25358
  XW.displayName = "SidebarNavigation";
25348
25359
  //#endregion
25349
25360
  //#region src/composed/AppSidebar/ContextSidebar.tsx
25350
- function ZW({ className: e, header: n, groups: r, activeItemKey: i, onItemSelect: a, children: o }) {
25361
+ function ZW({ className: e, header: n, groups: r, activeItemKey: i, onItemSelect: a, children: o, "data-testid": s }) {
25351
25362
  return /* @__PURE__ */ W("div", {
25352
25363
  "data-slot": "context-sidebar",
25353
25364
  className: t("flex h-full flex-col text-sidebar-foreground", e),
25365
+ "data-testid": s,
25354
25366
  children: [n && /* @__PURE__ */ U("div", {
25355
25367
  className: "shrink-0 px-4 py-3",
25356
25368
  children: n
@@ -25359,7 +25371,8 @@ function ZW({ className: e, header: n, groups: r, activeItemKey: i, onItemSelect
25359
25371
  children: o ?? (r && /* @__PURE__ */ U(XW, {
25360
25372
  groups: r,
25361
25373
  activeItemKey: i,
25362
- onItemSelect: a
25374
+ onItemSelect: a,
25375
+ "data-testid": s
25363
25376
  }))
25364
25377
  })]
25365
25378
  });
@@ -25367,13 +25380,15 @@ function ZW({ className: e, header: n, groups: r, activeItemKey: i, onItemSelect
25367
25380
  ZW.displayName = "ContextSidebar";
25368
25381
  //#endregion
25369
25382
  //#region src/composed/AppSidebar/ContextToggleButton.tsx
25370
- function QW({ expanded: e, onToggle: n, className: r }) {
25383
+ function QW({ expanded: e, onToggle: n, className: r, "data-testid": i }) {
25371
25384
  return /* @__PURE__ */ U(ay, {
25372
25385
  variant: "ghost",
25373
25386
  size: "icon",
25374
25387
  className: t("size-7", r),
25375
25388
  onClick: n,
25376
25389
  "aria-label": "Toggle context sidebar",
25390
+ "aria-pressed": e,
25391
+ "data-testid": i,
25377
25392
  children: /* @__PURE__ */ U(ge, { className: e ? "size-4" : "size-4 opacity-50" })
25378
25393
  });
25379
25394
  }
@@ -25381,9 +25396,10 @@ QW.displayName = "ContextToggleButton";
25381
25396
  //#endregion
25382
25397
  //#region src/composed/AppSidebar/SidebarUpgradeFooter.tsx
25383
25398
  var $W = "https://gravitee.io/self-hosted-trial";
25384
- function eG({ lockedFeatures: e }) {
25399
+ function eG({ lockedFeatures: e, "data-testid": t }) {
25385
25400
  return e.length === 0 ? null : /* @__PURE__ */ W("div", {
25386
25401
  className: "rounded-xl bg-primary/10 p-3",
25402
+ "data-testid": t,
25387
25403
  children: [
25388
25404
  /* @__PURE__ */ W("div", {
25389
25405
  className: "mb-1 flex items-center gap-2",
@@ -25403,6 +25419,7 @@ function eG({ lockedFeatures: e }) {
25403
25419
  asChild: !0,
25404
25420
  size: "sm",
25405
25421
  className: "w-full",
25422
+ "data-testid": J(t, "action"),
25406
25423
  children: /* @__PURE__ */ U("a", {
25407
25424
  href: $W,
25408
25425
  target: "_blank",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/graphene-core",
3
- "version": "3.51.0",
3
+ "version": "3.52.0",
4
4
  "type": "module",
5
5
  "description": "Gravitee's Graphene design system: accessible React components, design tokens, icons, and shared ESLint/TypeScript configs. Built on shadcn/ui and Tailwind.",
6
6
  "keywords": [