@gravitee/graphene-core 2.33.1 → 2.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/USAGE_GUIDE.md +101 -6
  2. package/dist/__stories__/fixtures/apim/page-layout-labels.fixture.d.ts +2 -3
  3. package/dist/__stories__/fixtures/apim/page-layout-labels.fixture.d.ts.map +1 -1
  4. package/dist/__stories__/fixtures/index.d.ts +1 -1
  5. package/dist/__stories__/fixtures/index.d.ts.map +1 -1
  6. package/dist/__stories__/fixtures/shell/app-switcher.fixture.d.ts +2 -0
  7. package/dist/__stories__/fixtures/shell/app-switcher.fixture.d.ts.map +1 -1
  8. package/dist/base/Sidebar/Sidebar.d.ts.map +1 -1
  9. package/dist/composed/AppContextBar/AppContextBar.d.ts +18 -0
  10. package/dist/composed/AppContextBar/AppContextBar.d.ts.map +1 -0
  11. package/dist/composed/AppContextBar/index.d.ts +3 -0
  12. package/dist/composed/AppContextBar/index.d.ts.map +1 -0
  13. package/dist/composed/AppSidebar/AppSidebar.d.ts +7 -11
  14. package/dist/composed/AppSidebar/AppSidebar.d.ts.map +1 -1
  15. package/dist/composed/AppSidebar/ContextSidebar.d.ts.map +1 -1
  16. package/dist/composed/AppSidebar/use-hover-expand.d.ts +3 -6
  17. package/dist/composed/AppSidebar/use-hover-expand.d.ts.map +1 -1
  18. package/dist/composed/AppSwitcher/AppSwitcher.d.ts +5 -2
  19. package/dist/composed/AppSwitcher/AppSwitcher.d.ts.map +1 -1
  20. package/dist/composed/ContentHeader/ContentHeader.d.ts +6 -1
  21. package/dist/composed/ContentHeader/ContentHeader.d.ts.map +1 -1
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +6852 -6948
  25. package/dist/styles/globals.css +1 -1
  26. package/package.json +1 -1
  27. package/snippets/context-sidebar-detail-page.tsx +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravitee/graphene-core",
3
- "version": "2.33.1",
3
+ "version": "2.34.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": [
@@ -25,6 +25,9 @@ const resourceNavGroups: NavGroup[] = [
25
25
  ];
26
26
 
27
27
  // 2. Build your detail page component.
28
+ // The host provides <AppContextBar /> in ContentHeader's appContext slot.
29
+ // Do NOT include the application/module name as the first breadcrumb —
30
+ // it is already shown by AppContextBar. Start at the page level.
28
31
  export function ResourceDetailPage({
29
32
  resource,
30
33
  onBack,
@@ -41,7 +44,7 @@ export function ResourceDetailPage({
41
44
  <AppLayout
42
45
  viewMode="context"
43
46
  contextExpanded={contextExpanded}
44
- sidebar={null /* replace with your <AppSidebar /> */}
47
+ sidebar={null /* replace with your <AppSidebar renderNavigation={...} /> */}
45
48
  contextSidebar={
46
49
  <ContextSidebar
47
50
  header={
@@ -58,6 +61,7 @@ export function ResourceDetailPage({
58
61
  subheader={
59
62
  <ContentHeader
60
63
  leading={<ContextToggleButton expanded={contextExpanded} onToggle={() => setContextExpanded((v) => !v)} />}
64
+ appContext={null /* replace with <AppContextBar apps={...} activeAppKey={...} ... /> */}
61
65
  breadcrumbs={[
62
66
  { label: '{LIST_PAGE_LABEL}', onClick: onBack },
63
67
  { label: resource.name },
@@ -75,8 +79,10 @@ export function ResourceDetailPage({
75
79
 
76
80
  // 3. With LayoutSlots (module federation):
77
81
  // If using useLayoutConfig instead of direct props, push the sidebar from
78
- // inside your module component:
82
+ // inside your module component. The host owns appContext in ContentHeader;
83
+ // modules only set breadcrumbs, leading, and contextSidebar.
79
84
  //
85
+ // // appContext lives in the host shell's ContentHeader — modules do not set it.
80
86
  // useLayoutConfig(
81
87
  // {
82
88
  // viewMode: 'context',