@doneisbetter/gds-admin 2.6.4 → 2.6.5
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/{chunk-XZ3OB3RK.mjs → chunk-LKBDBFHP.mjs} +2 -1
- package/dist/client.d.mts +3 -2
- package/dist/client.d.ts +3 -2
- package/dist/client.js +2 -1
- package/dist/client.mjs +1 -1
- package/dist/index.d.mts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +86 -34
- package/dist/index.mjs +51 -1
- package/package.json +3 -3
|
@@ -11,6 +11,7 @@ function AppShell({
|
|
|
11
11
|
headerContext,
|
|
12
12
|
headerActions,
|
|
13
13
|
mobileNavigation,
|
|
14
|
+
showThemeToggle = true,
|
|
14
15
|
children
|
|
15
16
|
}) {
|
|
16
17
|
const primaryNav = primaryNavigation ?? navLinks;
|
|
@@ -25,7 +26,7 @@ function AppShell({
|
|
|
25
26
|
] }) }),
|
|
26
27
|
/* @__PURE__ */ jsxs(Group, { wrap: "nowrap", children: [
|
|
27
28
|
headerActions,
|
|
28
|
-
/* @__PURE__ */ jsx(ThemeToggle, {})
|
|
29
|
+
showThemeToggle ? /* @__PURE__ */ jsx(ThemeToggle, {}) : null
|
|
29
30
|
] })
|
|
30
31
|
] }),
|
|
31
32
|
sidebar: /* @__PURE__ */ jsxs(Stack, { gap: "md", h: "100%", children: [
|
package/dist/client.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ContentOpsActionBar, ContentOpsActionBarProps, ContentOpsEditor, ContentOpsEditorProps, ContentOpsSection, ContentOpsSectionProps, FormSection, FormSectionProps, InfoCard, InfoCardProps, PageHeader, PageHeaderOverflowAction, PageHeaderProps, StatItem, StatsStrip, StatsStripProps, WorkspaceHeader, WorkspaceHeaderProps } from './server.mjs';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as React$1 from 'react';
|
|
4
3
|
import React__default, { ReactNode, Key } from 'react';
|
|
4
|
+
export { ContentOpsActionBar, ContentOpsActionBarProps, ContentOpsEditor, ContentOpsEditorProps, ContentOpsSection, ContentOpsSectionProps, FormSection, FormSectionProps, InfoCard, InfoCardProps, PageHeader, PageHeaderOverflowAction, PageHeaderProps, StatItem, StatsStrip, StatsStripProps, WorkspaceHeader, WorkspaceHeaderProps } from './server.mjs';
|
|
5
5
|
import * as _mantine_core from '@mantine/core';
|
|
6
6
|
import { SidebarNavItemProps, SemanticAction } from '@doneisbetter/gds-core';
|
|
7
7
|
|
|
@@ -14,13 +14,14 @@ interface AppShellProps {
|
|
|
14
14
|
headerContext?: ReactNode;
|
|
15
15
|
headerActions?: ReactNode;
|
|
16
16
|
mobileNavigation?: ReactNode;
|
|
17
|
+
showThemeToggle?: boolean;
|
|
17
18
|
children: ReactNode;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* AppShell provides the standard GDS application layout.
|
|
21
22
|
* It strictly controls the header, sidebar, and main content area.
|
|
22
23
|
*/
|
|
23
|
-
declare function AppShell({ logoText, navLinks, primaryNavigation, secondaryNavigation, accountPanel, headerContext, headerActions, mobileNavigation, children, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function AppShell({ logoText, navLinks, primaryNavigation, secondaryNavigation, accountPanel, headerContext, headerActions, mobileNavigation, showThemeToggle, children, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
24
25
|
|
|
25
26
|
interface DataTableColumn<T> {
|
|
26
27
|
key: string;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { ContentOpsActionBar, ContentOpsActionBarProps, ContentOpsEditor, ContentOpsEditorProps, ContentOpsSection, ContentOpsSectionProps, FormSection, FormSectionProps, InfoCard, InfoCardProps, PageHeader, PageHeaderOverflowAction, PageHeaderProps, StatItem, StatsStrip, StatsStripProps, WorkspaceHeader, WorkspaceHeaderProps } from './server.js';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
2
|
import * as React$1 from 'react';
|
|
4
3
|
import React__default, { ReactNode, Key } from 'react';
|
|
4
|
+
export { ContentOpsActionBar, ContentOpsActionBarProps, ContentOpsEditor, ContentOpsEditorProps, ContentOpsSection, ContentOpsSectionProps, FormSection, FormSectionProps, InfoCard, InfoCardProps, PageHeader, PageHeaderOverflowAction, PageHeaderProps, StatItem, StatsStrip, StatsStripProps, WorkspaceHeader, WorkspaceHeaderProps } from './server.js';
|
|
5
5
|
import * as _mantine_core from '@mantine/core';
|
|
6
6
|
import { SidebarNavItemProps, SemanticAction } from '@doneisbetter/gds-core';
|
|
7
7
|
|
|
@@ -14,13 +14,14 @@ interface AppShellProps {
|
|
|
14
14
|
headerContext?: ReactNode;
|
|
15
15
|
headerActions?: ReactNode;
|
|
16
16
|
mobileNavigation?: ReactNode;
|
|
17
|
+
showThemeToggle?: boolean;
|
|
17
18
|
children: ReactNode;
|
|
18
19
|
}
|
|
19
20
|
/**
|
|
20
21
|
* AppShell provides the standard GDS application layout.
|
|
21
22
|
* It strictly controls the header, sidebar, and main content area.
|
|
22
23
|
*/
|
|
23
|
-
declare function AppShell({ logoText, navLinks, primaryNavigation, secondaryNavigation, accountPanel, headerContext, headerActions, mobileNavigation, children, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function AppShell({ logoText, navLinks, primaryNavigation, secondaryNavigation, accountPanel, headerContext, headerActions, mobileNavigation, showThemeToggle, children, }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
24
25
|
|
|
25
26
|
interface DataTableColumn<T> {
|
|
26
27
|
key: string;
|
package/dist/client.js
CHANGED
|
@@ -59,6 +59,7 @@ function AppShell({
|
|
|
59
59
|
headerContext,
|
|
60
60
|
headerActions,
|
|
61
61
|
mobileNavigation,
|
|
62
|
+
showThemeToggle = true,
|
|
62
63
|
children
|
|
63
64
|
}) {
|
|
64
65
|
const primaryNav = primaryNavigation ?? navLinks;
|
|
@@ -73,7 +74,7 @@ function AppShell({
|
|
|
73
74
|
] }) }),
|
|
74
75
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Group, { wrap: "nowrap", children: [
|
|
75
76
|
headerActions,
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_gds_core.ThemeToggle, {})
|
|
77
|
+
showThemeToggle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_gds_core.ThemeToggle, {}) : null
|
|
77
78
|
] })
|
|
78
79
|
] }),
|
|
79
80
|
sidebar: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Stack, { gap: "md", h: "100%", children: [
|
package/dist/client.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
export { AppShell, AppShellProps, DataTable, DataTableColumn, DataTableProps, EditorScaffold, EditorScaffoldProps, ResponsiveDataView, ResponsiveDataViewFilterChip, ResponsiveDataViewProps, SemanticNavLink, SemanticNavLinkProps } from './client.mjs';
|
|
2
2
|
export { ContentOpsActionBar, ContentOpsActionBarProps, ContentOpsEditor, ContentOpsEditorProps, ContentOpsSection, ContentOpsSectionProps, FormSection, FormSectionProps, InfoCard, InfoCardProps, PageHeader, PageHeaderOverflowAction, PageHeaderProps, StatItem, StatsStrip, StatsStripProps, WorkspaceHeader, WorkspaceHeaderProps } from './server.mjs';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
5
|
import '@mantine/core';
|
|
6
6
|
import '@doneisbetter/gds-core';
|
|
7
|
+
|
|
8
|
+
interface ReferenceSiteLocaleOption {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
interface ReferenceSiteShellProps {
|
|
13
|
+
logoText?: string;
|
|
14
|
+
headerContext: ReactNode;
|
|
15
|
+
primaryNavigation: ReactNode;
|
|
16
|
+
secondaryNavigation?: ReactNode;
|
|
17
|
+
locale: string;
|
|
18
|
+
localeOptions: ReferenceSiteLocaleOption[];
|
|
19
|
+
onLocaleChange: (locale: string) => void;
|
|
20
|
+
localizationNotice?: ReactNode;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare function ReferenceSiteShell({ logoText, headerContext, primaryNavigation, secondaryNavigation, locale, localeOptions, onLocaleChange, localizationNotice, children, }: ReferenceSiteShellProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { type ReferenceSiteLocaleOption, ReferenceSiteShell, type ReferenceSiteShellProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
export { AppShell, AppShellProps, DataTable, DataTableColumn, DataTableProps, EditorScaffold, EditorScaffoldProps, ResponsiveDataView, ResponsiveDataViewFilterChip, ResponsiveDataViewProps, SemanticNavLink, SemanticNavLinkProps } from './client.js';
|
|
2
2
|
export { ContentOpsActionBar, ContentOpsActionBarProps, ContentOpsEditor, ContentOpsEditorProps, ContentOpsSection, ContentOpsSectionProps, FormSection, FormSectionProps, InfoCard, InfoCardProps, PageHeader, PageHeaderOverflowAction, PageHeaderProps, StatItem, StatsStrip, StatsStripProps, WorkspaceHeader, WorkspaceHeaderProps } from './server.js';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
5
|
import '@mantine/core';
|
|
6
6
|
import '@doneisbetter/gds-core';
|
|
7
|
+
|
|
8
|
+
interface ReferenceSiteLocaleOption {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
interface ReferenceSiteShellProps {
|
|
13
|
+
logoText?: string;
|
|
14
|
+
headerContext: ReactNode;
|
|
15
|
+
primaryNavigation: ReactNode;
|
|
16
|
+
secondaryNavigation?: ReactNode;
|
|
17
|
+
locale: string;
|
|
18
|
+
localeOptions: ReferenceSiteLocaleOption[];
|
|
19
|
+
onLocaleChange: (locale: string) => void;
|
|
20
|
+
localizationNotice?: ReactNode;
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare function ReferenceSiteShell({ logoText, headerContext, primaryNavigation, secondaryNavigation, locale, localeOptions, onLocaleChange, localizationNotice, children, }: ReferenceSiteShellProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { type ReferenceSiteLocaleOption, ReferenceSiteShell, type ReferenceSiteShellProps };
|
package/dist/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __export(index_exports, {
|
|
|
39
39
|
FormSection: () => FormSection,
|
|
40
40
|
InfoCard: () => InfoCard,
|
|
41
41
|
PageHeader: () => PageHeader,
|
|
42
|
+
ReferenceSiteShell: () => ReferenceSiteShell,
|
|
42
43
|
ResponsiveDataView: () => ResponsiveDataView,
|
|
43
44
|
SemanticNavLink: () => SemanticNavLink,
|
|
44
45
|
StatsStrip: () => StatsStrip,
|
|
@@ -59,6 +60,7 @@ function AppShell({
|
|
|
59
60
|
headerContext,
|
|
60
61
|
headerActions,
|
|
61
62
|
mobileNavigation,
|
|
63
|
+
showThemeToggle = true,
|
|
62
64
|
children
|
|
63
65
|
}) {
|
|
64
66
|
const primaryNav = primaryNavigation ?? navLinks;
|
|
@@ -73,7 +75,7 @@ function AppShell({
|
|
|
73
75
|
] }) }),
|
|
74
76
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Group, { wrap: "nowrap", children: [
|
|
75
77
|
headerActions,
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_gds_core.ThemeToggle, {})
|
|
78
|
+
showThemeToggle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_gds_core.ThemeToggle, {}) : null
|
|
77
79
|
] })
|
|
78
80
|
] }),
|
|
79
81
|
sidebar: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Stack, { gap: "md", h: "100%", children: [
|
|
@@ -289,9 +291,58 @@ function ResponsiveDataView({
|
|
|
289
291
|
] });
|
|
290
292
|
}
|
|
291
293
|
|
|
292
|
-
// src/
|
|
294
|
+
// src/ReferenceSiteShell.tsx
|
|
293
295
|
var import_core9 = require("@mantine/core");
|
|
296
|
+
var import_icons_react = require("@tabler/icons-react");
|
|
297
|
+
var import_gds_core6 = require("@doneisbetter/gds-core");
|
|
294
298
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
299
|
+
function ReferenceSiteShell({
|
|
300
|
+
logoText = "General Design System",
|
|
301
|
+
headerContext,
|
|
302
|
+
primaryNavigation,
|
|
303
|
+
secondaryNavigation,
|
|
304
|
+
locale,
|
|
305
|
+
localeOptions,
|
|
306
|
+
onLocaleChange,
|
|
307
|
+
localizationNotice,
|
|
308
|
+
children
|
|
309
|
+
}) {
|
|
310
|
+
const activeLocale = localeOptions.find((option) => option.id === locale) ?? localeOptions[0];
|
|
311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
312
|
+
AppShell,
|
|
313
|
+
{
|
|
314
|
+
logoText,
|
|
315
|
+
primaryNavigation,
|
|
316
|
+
secondaryNavigation,
|
|
317
|
+
headerContext,
|
|
318
|
+
showThemeToggle: false,
|
|
319
|
+
headerActions: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core9.Group, { gap: "sm", children: [
|
|
320
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core9.Menu, { position: "bottom-end", withArrow: true, children: [
|
|
321
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core9.Menu.Target, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
322
|
+
import_core9.Button,
|
|
323
|
+
{
|
|
324
|
+
variant: "light",
|
|
325
|
+
radius: "md",
|
|
326
|
+
leftSection: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react.IconLanguage, { size: "1.1rem" }),
|
|
327
|
+
rightSection: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_icons_react.IconChevronDown, { size: "0.95rem" }),
|
|
328
|
+
children: activeLocale?.label ?? "Language"
|
|
329
|
+
}
|
|
330
|
+
) }),
|
|
331
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core9.Menu.Dropdown, { children: localeOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_core9.Menu.Item, { onClick: () => onLocaleChange(option.id), children: option.label }, option.id)) })
|
|
332
|
+
] }),
|
|
333
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_gds_core6.ThemeToggle, {})
|
|
334
|
+
] }),
|
|
335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_core9.Stack, { gap: "md", children: [
|
|
336
|
+
localizationNotice ? typeof localizationNotice === "string" ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_gds_core6.AccentPanel, { tone: "amber", variant: "soft-outline", title: "Localization status", badge: activeLocale?.label ?? locale, children: localizationNotice }) : localizationNotice : null,
|
|
337
|
+
children
|
|
338
|
+
] })
|
|
339
|
+
}
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// src/WorkspaceHeader.tsx
|
|
344
|
+
var import_core10 = require("@mantine/core");
|
|
345
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
295
346
|
function WorkspaceHeader({
|
|
296
347
|
breadcrumbs,
|
|
297
348
|
eyebrow,
|
|
@@ -300,15 +351,15 @@ function WorkspaceHeader({
|
|
|
300
351
|
primaryAction,
|
|
301
352
|
secondaryActions
|
|
302
353
|
}) {
|
|
303
|
-
return /* @__PURE__ */ (0,
|
|
304
|
-
breadcrumbs?.length ? /* @__PURE__ */ (0,
|
|
305
|
-
eyebrow ? /* @__PURE__ */ (0,
|
|
306
|
-
/* @__PURE__ */ (0,
|
|
307
|
-
/* @__PURE__ */ (0,
|
|
308
|
-
/* @__PURE__ */ (0,
|
|
309
|
-
description ? /* @__PURE__ */ (0,
|
|
354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core10.Stack, { gap: "sm", mb: "xl", children: [
|
|
355
|
+
breadcrumbs?.length ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core10.Breadcrumbs, { children: breadcrumbs }) : null,
|
|
356
|
+
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core10.Text, { size: "sm", fw: 700, c: "dimmed", tt: "uppercase", children: eyebrow }) : null,
|
|
357
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core10.Group, { justify: "space-between", align: "flex-start", gap: "md", children: [
|
|
358
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core10.Stack, { gap: 6, children: [
|
|
359
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core10.Title, { order: 1, children: title }),
|
|
360
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core10.Text, { c: "dimmed", maw: 640, children: description }) : null
|
|
310
361
|
] }),
|
|
311
|
-
/* @__PURE__ */ (0,
|
|
362
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core10.Group, { gap: "sm", children: [
|
|
312
363
|
secondaryActions,
|
|
313
364
|
primaryAction
|
|
314
365
|
] })
|
|
@@ -317,8 +368,8 @@ function WorkspaceHeader({
|
|
|
317
368
|
}
|
|
318
369
|
|
|
319
370
|
// src/EditorScaffold.tsx
|
|
320
|
-
var
|
|
321
|
-
var
|
|
371
|
+
var import_core11 = require("@mantine/core");
|
|
372
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
322
373
|
function EditorScaffold({
|
|
323
374
|
header,
|
|
324
375
|
context,
|
|
@@ -328,18 +379,18 @@ function EditorScaffold({
|
|
|
328
379
|
footer,
|
|
329
380
|
stickyFooter = false
|
|
330
381
|
}) {
|
|
331
|
-
return /* @__PURE__ */ (0,
|
|
382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core11.Stack, { gap: "lg", children: [
|
|
332
383
|
header,
|
|
333
384
|
context,
|
|
334
|
-
/* @__PURE__ */ (0,
|
|
335
|
-
/* @__PURE__ */ (0,
|
|
336
|
-
preview || settings ? /* @__PURE__ */ (0,
|
|
385
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core11.Grid, { gutter: "lg", align: "start", children: [
|
|
386
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core11.Grid.Col, { span: { base: 12, md: preview ? 7 : 8 }, children: form }),
|
|
387
|
+
preview || settings ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_core11.Grid.Col, { span: { base: 12, md: preview ? 5 : 4 }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core11.Stack, { gap: "lg", children: [
|
|
337
388
|
preview,
|
|
338
389
|
settings
|
|
339
390
|
] }) }) : null
|
|
340
391
|
] }),
|
|
341
|
-
footer ? stickyFooter ? /* @__PURE__ */ (0,
|
|
342
|
-
|
|
392
|
+
footer ? stickyFooter ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
393
|
+
import_core11.Paper,
|
|
343
394
|
{
|
|
344
395
|
withBorder: true,
|
|
345
396
|
radius: "xl",
|
|
@@ -356,8 +407,8 @@ function EditorScaffold({
|
|
|
356
407
|
}
|
|
357
408
|
|
|
358
409
|
// src/ContentOpsSection.tsx
|
|
359
|
-
var
|
|
360
|
-
var
|
|
410
|
+
var import_gds_core7 = require("@doneisbetter/gds-core");
|
|
411
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
361
412
|
function ContentOpsSection({
|
|
362
413
|
id,
|
|
363
414
|
title,
|
|
@@ -366,13 +417,13 @@ function ContentOpsSection({
|
|
|
366
417
|
children,
|
|
367
418
|
tone = "default"
|
|
368
419
|
}) {
|
|
369
|
-
return /* @__PURE__ */ (0,
|
|
420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_gds_core7.SectionPanel, { id, title, description, action, tone, children });
|
|
370
421
|
}
|
|
371
422
|
|
|
372
423
|
// src/ContentOpsActionBar.tsx
|
|
373
|
-
var
|
|
374
|
-
var
|
|
375
|
-
var
|
|
424
|
+
var import_core12 = require("@mantine/core");
|
|
425
|
+
var import_gds_core8 = require("@doneisbetter/gds-core");
|
|
426
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
376
427
|
function ContentOpsActionBar({
|
|
377
428
|
dirty = false,
|
|
378
429
|
saving = false,
|
|
@@ -382,12 +433,12 @@ function ContentOpsActionBar({
|
|
|
382
433
|
secondaryAction,
|
|
383
434
|
tertiaryAction
|
|
384
435
|
}) {
|
|
385
|
-
return /* @__PURE__ */ (0,
|
|
386
|
-
/* @__PURE__ */ (0,
|
|
387
|
-
/* @__PURE__ */ (0,
|
|
388
|
-
status ? typeof status === "string" ? /* @__PURE__ */ (0,
|
|
436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Paper, { withBorder: true, radius: "xl", p: "md", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { justify: "space-between", align: "center", gap: "md", wrap: "wrap", children: [
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { gap: "sm", wrap: "wrap", children: [
|
|
438
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Badge, { color: saving ? "violet" : dirty ? "yellow" : "teal", variant: "light", children: saving ? "Saving" : dirty ? "Unsaved changes" : "Saved" }),
|
|
439
|
+
status ? typeof status === "string" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core12.Text, { size: "sm", c: "dimmed", children: status }) : status : null
|
|
389
440
|
] }),
|
|
390
|
-
actions ? /* @__PURE__ */ (0,
|
|
441
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_gds_core8.ActionBar, { ...actions }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core12.Group, { gap: "sm", wrap: "wrap", children: [
|
|
391
442
|
tertiaryAction,
|
|
392
443
|
secondaryAction,
|
|
393
444
|
primaryAction
|
|
@@ -396,8 +447,8 @@ function ContentOpsActionBar({
|
|
|
396
447
|
}
|
|
397
448
|
|
|
398
449
|
// src/ContentOpsEditor.tsx
|
|
399
|
-
var
|
|
400
|
-
var
|
|
450
|
+
var import_core13 = require("@mantine/core");
|
|
451
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
401
452
|
function ContentOpsEditor({
|
|
402
453
|
header,
|
|
403
454
|
context,
|
|
@@ -407,14 +458,14 @@ function ContentOpsEditor({
|
|
|
407
458
|
preview,
|
|
408
459
|
settings
|
|
409
460
|
}) {
|
|
410
|
-
return /* @__PURE__ */ (0,
|
|
461
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_core13.Stack, { gap: "lg", children: [
|
|
411
462
|
header,
|
|
412
463
|
status,
|
|
413
|
-
/* @__PURE__ */ (0,
|
|
464
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
414
465
|
EditorScaffold,
|
|
415
466
|
{
|
|
416
467
|
context,
|
|
417
|
-
form: /* @__PURE__ */ (0,
|
|
468
|
+
form: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_core13.Stack, { gap: "lg", children: sections }),
|
|
418
469
|
preview,
|
|
419
470
|
settings,
|
|
420
471
|
footer: actionBar,
|
|
@@ -434,6 +485,7 @@ function ContentOpsEditor({
|
|
|
434
485
|
FormSection,
|
|
435
486
|
InfoCard,
|
|
436
487
|
PageHeader,
|
|
488
|
+
ReferenceSiteShell,
|
|
437
489
|
ResponsiveDataView,
|
|
438
490
|
SemanticNavLink,
|
|
439
491
|
StatsStrip,
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
DataTable,
|
|
4
4
|
ResponsiveDataView,
|
|
5
5
|
SemanticNavLink
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LKBDBFHP.mjs";
|
|
7
7
|
import {
|
|
8
8
|
ContentOpsActionBar,
|
|
9
9
|
ContentOpsEditor,
|
|
@@ -15,6 +15,55 @@ import {
|
|
|
15
15
|
StatsStrip,
|
|
16
16
|
WorkspaceHeader
|
|
17
17
|
} from "./chunk-CFL7O7EU.mjs";
|
|
18
|
+
|
|
19
|
+
// src/ReferenceSiteShell.tsx
|
|
20
|
+
import { Button, Group, Menu, Stack } from "@mantine/core";
|
|
21
|
+
import { IconChevronDown, IconLanguage } from "@tabler/icons-react";
|
|
22
|
+
import { AccentPanel, ThemeToggle } from "@doneisbetter/gds-core";
|
|
23
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
24
|
+
function ReferenceSiteShell({
|
|
25
|
+
logoText = "General Design System",
|
|
26
|
+
headerContext,
|
|
27
|
+
primaryNavigation,
|
|
28
|
+
secondaryNavigation,
|
|
29
|
+
locale,
|
|
30
|
+
localeOptions,
|
|
31
|
+
onLocaleChange,
|
|
32
|
+
localizationNotice,
|
|
33
|
+
children
|
|
34
|
+
}) {
|
|
35
|
+
const activeLocale = localeOptions.find((option) => option.id === locale) ?? localeOptions[0];
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
AppShell,
|
|
38
|
+
{
|
|
39
|
+
logoText,
|
|
40
|
+
primaryNavigation,
|
|
41
|
+
secondaryNavigation,
|
|
42
|
+
headerContext,
|
|
43
|
+
showThemeToggle: false,
|
|
44
|
+
headerActions: /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
|
|
45
|
+
/* @__PURE__ */ jsxs(Menu, { position: "bottom-end", withArrow: true, children: [
|
|
46
|
+
/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(
|
|
47
|
+
Button,
|
|
48
|
+
{
|
|
49
|
+
variant: "light",
|
|
50
|
+
radius: "md",
|
|
51
|
+
leftSection: /* @__PURE__ */ jsx(IconLanguage, { size: "1.1rem" }),
|
|
52
|
+
rightSection: /* @__PURE__ */ jsx(IconChevronDown, { size: "0.95rem" }),
|
|
53
|
+
children: activeLocale?.label ?? "Language"
|
|
54
|
+
}
|
|
55
|
+
) }),
|
|
56
|
+
/* @__PURE__ */ jsx(Menu.Dropdown, { children: localeOptions.map((option) => /* @__PURE__ */ jsx(Menu.Item, { onClick: () => onLocaleChange(option.id), children: option.label }, option.id)) })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ jsx(ThemeToggle, {})
|
|
59
|
+
] }),
|
|
60
|
+
children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
61
|
+
localizationNotice ? typeof localizationNotice === "string" ? /* @__PURE__ */ jsx(AccentPanel, { tone: "amber", variant: "soft-outline", title: "Localization status", badge: activeLocale?.label ?? locale, children: localizationNotice }) : localizationNotice : null,
|
|
62
|
+
children
|
|
63
|
+
] })
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
18
67
|
export {
|
|
19
68
|
AppShell,
|
|
20
69
|
ContentOpsActionBar,
|
|
@@ -25,6 +74,7 @@ export {
|
|
|
25
74
|
FormSection,
|
|
26
75
|
InfoCard,
|
|
27
76
|
PageHeader,
|
|
77
|
+
ReferenceSiteShell,
|
|
28
78
|
ResponsiveDataView,
|
|
29
79
|
SemanticNavLink,
|
|
30
80
|
StatsStrip,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doneisbetter/gds-admin",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.5",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"dev": "tsup --watch"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@doneisbetter/gds-core": "^2.6.
|
|
42
|
-
"@doneisbetter/gds-theme": "^2.6.
|
|
41
|
+
"@doneisbetter/gds-core": "^2.6.5",
|
|
42
|
+
"@doneisbetter/gds-theme": "^2.6.5",
|
|
43
43
|
"@mantine/core": "^7.9.0 || ^8.3.0 || ^9.0.0",
|
|
44
44
|
"@mantine/hooks": "^7.9.0 || ^8.3.0 || ^9.0.0",
|
|
45
45
|
"@tabler/icons-react": "^3.5.0",
|