@godxjp/ui 18.4.0 → 18.5.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/README.md +16 -1
- package/dist/app/theme-axes.d.ts +11 -3
- package/dist/app/theme-axes.js +2 -1
- package/dist/components/charts/chart-frame.d.ts +17 -3
- package/dist/components/charts/chart-frame.js +7 -1
- package/dist/components/charts/chart-summary.d.ts +21 -0
- package/dist/components/charts/chart-summary.js +32 -5
- package/dist/components/charts/compact-bar-trend.d.ts +29 -0
- package/dist/components/charts/compact-bar-trend.js +74 -0
- package/dist/components/charts/index.d.ts +3 -0
- package/dist/components/charts/index.js +2 -0
- package/dist/components/data-display/badge.d.ts +8 -0
- package/dist/components/data-display/badge.js +7 -1
- package/dist/components/data-display/data-table.d.ts +16 -1
- package/dist/components/data-display/data-table.js +56 -0
- package/dist/components/data-display/index.d.ts +3 -1
- package/dist/components/data-display/index.js +10 -1
- package/dist/components/data-display/list-row.d.ts +22 -4
- package/dist/components/data-display/list-row.js +21 -3
- package/dist/components/data-display/service-launcher-card.d.ts +40 -0
- package/dist/components/data-display/service-launcher-card.js +97 -0
- package/dist/components/data-entry/command-palette.d.ts +37 -0
- package/dist/components/data-entry/command-palette.js +125 -0
- package/dist/components/data-entry/index.d.ts +2 -0
- package/dist/components/data-entry/index.js +2 -0
- package/dist/components/feedback/dialog.d.ts +2 -0
- package/dist/components/feedback/dialog.js +42 -33
- package/dist/components/feedback/index.d.ts +4 -1
- package/dist/components/feedback/index.js +6 -2
- package/dist/components/feedback/sheet.d.ts +26 -4
- package/dist/components/feedback/sheet.js +54 -7
- package/dist/components/feedback/two-factor-setup.d.ts +31 -0
- package/dist/components/feedback/two-factor-setup.js +97 -0
- package/dist/components/general/index.d.ts +1 -1
- package/dist/components/general/logo.d.ts +42 -8
- package/dist/components/general/logo.js +67 -14
- package/dist/components/layout/app-shell.js +21 -5
- package/dist/components/layout/auth-divider.d.ts +7 -0
- package/dist/components/layout/auth-divider.js +21 -0
- package/dist/components/layout/auth-footer.d.ts +5 -0
- package/dist/components/layout/auth-footer.js +24 -0
- package/dist/components/layout/auth-identity.d.ts +5 -0
- package/dist/components/layout/auth-identity.js +17 -0
- package/dist/components/layout/auth-shell.d.ts +8 -1
- package/dist/components/layout/auth-shell.js +25 -6
- package/dist/components/layout/auth-stack.d.ts +4 -0
- package/dist/components/layout/auth-stack.js +8 -0
- package/dist/components/layout/centered-shell.d.ts +5 -2
- package/dist/components/layout/centered-shell.js +2 -1
- package/dist/components/layout/index.d.ts +18 -3
- package/dist/components/layout/index.js +17 -2
- package/dist/components/layout/legal-document-shell.d.ts +34 -0
- package/dist/components/layout/legal-document-shell.js +186 -0
- package/dist/components/layout/master-detail.d.ts +24 -0
- package/dist/components/layout/master-detail.js +48 -0
- package/dist/components/layout/org-switcher.d.ts +9 -0
- package/dist/components/layout/org-switcher.js +218 -0
- package/dist/components/layout/page-container.d.ts +1 -1
- package/dist/components/layout/page-container.js +3 -2
- package/dist/components/layout/sidebar-link.d.ts +43 -0
- package/dist/components/layout/sidebar-link.js +13 -0
- package/dist/components/layout/sidebar.d.ts +42 -5
- package/dist/components/layout/sidebar.js +170 -85
- package/dist/components/navigation/app-setting-picker.js +17 -6
- package/dist/components/navigation/filter-bar.d.ts +12 -3
- package/dist/components/navigation/filter-bar.js +8 -2
- package/dist/components/navigation/index.d.ts +2 -2
- package/dist/components/navigation/index.js +3 -1
- package/dist/components/navigation/tabs-scroll.d.ts +70 -0
- package/dist/components/navigation/tabs-scroll.js +76 -0
- package/dist/components/navigation/tabs.js +35 -20
- package/dist/email/brand-mark.d.ts +92 -0
- package/dist/email/brand-mark.js +83 -0
- package/dist/email/color.d.ts +52 -0
- package/dist/email/color.js +37 -0
- package/dist/email/geometry.d.ts +112 -0
- package/dist/email/geometry.js +89 -0
- package/dist/email/index.d.ts +78 -0
- package/dist/email/index.js +76 -0
- package/dist/email/inline-style.d.ts +25 -0
- package/dist/email/inline-style.js +21 -0
- package/dist/email/tokens.generated.d.ts +147 -0
- package/dist/email/tokens.generated.js +142 -0
- package/dist/i18n/messages/en.json +21 -2
- package/dist/i18n/messages/ja.json +21 -2
- package/dist/i18n/messages/vi.json +21 -2
- package/dist/inertia/index.d.ts +50 -0
- package/dist/inertia/index.js +5 -0
- package/dist/props/components/app.prop.d.ts +11 -1
- package/dist/props/components/charts.prop.d.ts +40 -1
- package/dist/props/components/data-display.prop.d.ts +13 -1
- package/dist/props/components/feedback.prop.d.ts +10 -0
- package/dist/props/components/index.d.ts +2 -2
- package/dist/props/components/layout.prop.d.ts +373 -10
- package/dist/props/components/layout.prop.js +1 -0
- package/dist/props/components/navigation.prop.d.ts +19 -1
- package/dist/props/registry.d.ts +291 -7
- package/dist/props/registry.js +341 -7
- package/dist/props/vocabulary/index.d.ts +1 -1
- package/dist/props/vocabulary/interaction.prop.d.ts +1 -1
- package/dist/props/vocabulary/layout.prop.d.ts +18 -0
- package/dist/styles/base.css +8 -2
- package/dist/styles/card-layout.css +161 -7
- package/dist/styles/chart-layout.css +97 -0
- package/dist/styles/control.css +48 -2
- package/dist/styles/data-display-layout.css +52 -6
- package/dist/styles/dialog-layout.css +105 -4
- package/dist/styles/fonts.css +15 -4
- package/dist/styles/index.css +11 -3
- package/dist/styles/layout.css +367 -1
- package/dist/styles/logo-layout.css +62 -0
- package/dist/styles/navigation-layout.css +43 -0
- package/dist/styles/shell-layout.css +488 -40
- package/dist/theme/dxs.canonical.css +76 -0
- package/dist/tokens/axes.css +39 -0
- package/dist/tokens/base.css +5 -0
- package/dist/tokens/components/card.css +48 -0
- package/dist/tokens/components/chart.css +47 -0
- package/dist/tokens/components/control.css +16 -0
- package/dist/tokens/components/email.css +66 -0
- package/dist/tokens/components/feedback.css +17 -0
- package/dist/tokens/components/legal-document.css +67 -0
- package/dist/tokens/components/list-row.css +23 -2
- package/dist/tokens/components/logo.css +32 -0
- package/dist/tokens/components/navigation.css +13 -0
- package/dist/tokens/components/sheet.css +19 -0
- package/dist/tokens/components/shell.css +138 -0
- package/dist/tokens/components/sidebar.css +33 -0
- package/dist/tokens/foundation.css +5 -2
- package/dist/tokens/semantic/layout.css +44 -2
- package/package.json +16 -5
|
@@ -5,20 +5,35 @@ export type { FlexAlignProp, FlexDirectionProp, FlexJustifyProp, FlexProp, FlexP
|
|
|
5
5
|
export { ResizablePanel, ResizablePanelGroup, ResizableHandle } from "./resizable.js";
|
|
6
6
|
export { AppShell } from "./app-shell.js";
|
|
7
7
|
export type { AppShellProps } from "./app-shell.js";
|
|
8
|
+
export { OrgSwitcher } from "./org-switcher.js";
|
|
9
|
+
export type { OrgSwitcherLabels, OrgSwitcherOrganization, OrgSwitcherProp, OrgSwitcherProps, } from "./org-switcher.js";
|
|
8
10
|
export { AuthShell } from "./auth-shell.js";
|
|
9
11
|
export type { AuthShellProp, AuthShellProps } from "./auth-shell.js";
|
|
12
|
+
export type { AuthShellPresetProp } from "../../props/vocabulary/index.js";
|
|
13
|
+
export { AuthDivider } from "./auth-divider.js";
|
|
14
|
+
export type { AuthDividerProp, AuthDividerProps } from "./auth-divider.js";
|
|
15
|
+
export { AuthIdentity } from "./auth-identity.js";
|
|
16
|
+
export type { AuthIdentityProp, AuthIdentityProps } from "./auth-identity.js";
|
|
17
|
+
export { AuthFooter } from "./auth-footer.js";
|
|
18
|
+
export type { AuthFooterProp, AuthFooterProps } from "./auth-footer.js";
|
|
19
|
+
export { AuthStack } from "./auth-stack.js";
|
|
20
|
+
export type { AuthStackProps } from "./auth-stack.js";
|
|
10
21
|
export { CenteredShell } from "./centered-shell.js";
|
|
11
22
|
export type { CenteredShellProp, CenteredShellProps } from "./centered-shell.js";
|
|
12
|
-
export type { CenteredShellWidthProp } from "../../props/vocabulary/index.js";
|
|
23
|
+
export type { CenteredShellWidthProp, CenteredShellAlignProp } from "../../props/vocabulary/index.js";
|
|
13
24
|
export { Breadcrumb } from "./breadcrumb.js";
|
|
14
25
|
export type { BreadcrumbProps } from "./breadcrumb.js";
|
|
15
|
-
export { Sidebar, SidebarHeader, SidebarItem, SidebarSection } from "./sidebar.js";
|
|
16
|
-
export type { SidebarItemData, SidebarProductProp as SidebarProduct, SidebarProp, SidebarProp as SidebarProps, SidebarSectionProp, } from "../../props/components/layout.prop.js";
|
|
26
|
+
export { createSidebarLink, Sidebar, SidebarHeader, SidebarItem, SidebarSection } from "./sidebar.js";
|
|
27
|
+
export type { SidebarItemData, SidebarLinkComponentProp, SidebarLinkProp, SidebarProductProp as SidebarProduct, SidebarProp, SidebarProp as SidebarProps, SidebarRenderItemProp, SidebarSectionProp, } from "../../props/components/layout.prop.js";
|
|
17
28
|
export { Topbar } from "./topbar.js";
|
|
18
29
|
export type { TopbarProp, TopbarProps } from "./topbar.js";
|
|
19
30
|
export { ResponsiveGrid } from "./responsive-grid.js";
|
|
20
31
|
export type { ResponsiveGridProps } from "./responsive-grid.js";
|
|
32
|
+
export { MasterDetail } from "./master-detail.js";
|
|
33
|
+
export type { MasterDetailProps } from "./master-detail.js";
|
|
21
34
|
export { SplitPane } from "./split-pane.js";
|
|
22
35
|
export type { SplitPaneProps } from "./split-pane.js";
|
|
23
36
|
export { Separator } from "./separator.js";
|
|
24
37
|
export { AspectRatio } from "./aspect-ratio.js";
|
|
38
|
+
export { LegalDocumentShell } from "./legal-document-shell.js";
|
|
39
|
+
export type { LegalDocumentSectionProp, LegalDocumentShellProp, LegalDocumentShellProps, } from "./legal-document-shell.js";
|
|
@@ -2,22 +2,36 @@ import { PageContainer } from "./page-container.js";
|
|
|
2
2
|
import { Flex } from "./flex.js";
|
|
3
3
|
import { ResizablePanel, ResizablePanelGroup, ResizableHandle } from "./resizable.js";
|
|
4
4
|
import { AppShell } from "./app-shell.js";
|
|
5
|
+
import { OrgSwitcher } from "./org-switcher.js";
|
|
5
6
|
import { AuthShell } from "./auth-shell.js";
|
|
7
|
+
import { AuthDivider } from "./auth-divider.js";
|
|
8
|
+
import { AuthIdentity } from "./auth-identity.js";
|
|
9
|
+
import { AuthFooter } from "./auth-footer.js";
|
|
10
|
+
import { AuthStack } from "./auth-stack.js";
|
|
6
11
|
import { CenteredShell } from "./centered-shell.js";
|
|
7
12
|
import { Breadcrumb } from "./breadcrumb.js";
|
|
8
|
-
import { Sidebar, SidebarHeader, SidebarItem, SidebarSection } from "./sidebar.js";
|
|
13
|
+
import { createSidebarLink, Sidebar, SidebarHeader, SidebarItem, SidebarSection } from "./sidebar.js";
|
|
9
14
|
import { Topbar } from "./topbar.js";
|
|
10
15
|
import { ResponsiveGrid } from "./responsive-grid.js";
|
|
16
|
+
import { MasterDetail } from "./master-detail.js";
|
|
11
17
|
import { SplitPane } from "./split-pane.js";
|
|
12
18
|
import { Separator } from "./separator.js";
|
|
13
19
|
import { AspectRatio } from "./aspect-ratio.js";
|
|
20
|
+
import { LegalDocumentShell } from "./legal-document-shell.js";
|
|
14
21
|
export {
|
|
15
22
|
AppShell,
|
|
16
23
|
AspectRatio,
|
|
24
|
+
AuthDivider,
|
|
25
|
+
AuthFooter,
|
|
26
|
+
AuthIdentity,
|
|
17
27
|
AuthShell,
|
|
28
|
+
AuthStack,
|
|
18
29
|
Breadcrumb,
|
|
19
30
|
CenteredShell,
|
|
20
31
|
Flex,
|
|
32
|
+
LegalDocumentShell,
|
|
33
|
+
MasterDetail,
|
|
34
|
+
OrgSwitcher,
|
|
21
35
|
PageContainer,
|
|
22
36
|
ResizableHandle,
|
|
23
37
|
ResizablePanel,
|
|
@@ -29,5 +43,6 @@ export {
|
|
|
29
43
|
SidebarItem,
|
|
30
44
|
SidebarSection,
|
|
31
45
|
SplitPane,
|
|
32
|
-
Topbar
|
|
46
|
+
Topbar,
|
|
47
|
+
createSidebarLink
|
|
33
48
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { LegalDocumentShellProp } from "../../props/components/layout.prop.js";
|
|
3
|
+
export type { LegalDocumentSectionProp, LegalDocumentShellProp, LegalDocumentShellProp as LegalDocumentShellProps, } from "../../props/components/layout.prop.js";
|
|
4
|
+
/**
|
|
5
|
+
* LegalDocumentShell — the long-form **legal / policy document** surface: terms of service, privacy
|
|
6
|
+
* policy, DPA, cookie policy, SLA, EULA, security policy.
|
|
7
|
+
*
|
|
8
|
+
* It exists because a legal page is NOT expressible as `CenteredShell` + `SplitPane` + tokens: the
|
|
9
|
+
* geometry is the easy half, and the half that keeps getting hand-rolled per app is the behaviour —
|
|
10
|
+
*
|
|
11
|
+
* - **scroll spy**: an `IntersectionObserver` marks the section at the reading line active, so the
|
|
12
|
+
* contents list tracks the reader (`aria-current="location"`, never colour-only);
|
|
13
|
+
* - **hash deep links**: `?#section-id` on load selects that section; activating a contents anchor
|
|
14
|
+
* rewrites the hash (`history.replaceState`, so the Back button is never hijacked);
|
|
15
|
+
* - **scroll offset**: `scroll-margin-block-start` from `--legal-document-scroll-offset`, so a jump
|
|
16
|
+
* lands below sticky chrome with no offset arithmetic;
|
|
17
|
+
* - **focus handoff**: the target `<section tabIndex={-1}>` takes focus (`preventScroll`), so a
|
|
18
|
+
* keyboard/screen-reader user actually arrives IN the section, with a visible ring;
|
|
19
|
+
* - **reduced motion**: the smooth scroll degrades to an instant jump under
|
|
20
|
+
* `prefers-reduced-motion: reduce`.
|
|
21
|
+
*
|
|
22
|
+
* Semantics: `<article>` labelled by the `<h1>` · a NAMED `<nav>` for the contents · REAL
|
|
23
|
+
* `<a href="#…">` anchors (middle-clickable, deep-linkable, work before JS boots) · one `<section>`
|
|
24
|
+
* per entry labelled by its `<h2>`.
|
|
25
|
+
*
|
|
26
|
+
* Layout: the shell owns its query container, so the one-column ⇄ two-column decision comes from
|
|
27
|
+
* its OWN width (the SplitPane precedent, gh#165). At ≥56rem the contents become a sticky rail
|
|
28
|
+
* beside a measure-capped column; below that (the 390×844 case) the shell is a single column and
|
|
29
|
+
* the contents are a static compact block between the header and the first section — never pinned,
|
|
30
|
+
* so a phone loses no vertical space.
|
|
31
|
+
*
|
|
32
|
+
* ALL legal text stays consumer-owned: the shell only receives `sections` and slots.
|
|
33
|
+
*/
|
|
34
|
+
export declare const LegalDocumentShell: React.ForwardRefExoticComponent<LegalDocumentShellProp & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useTranslation } from "../../i18n/use-translation.js";
|
|
5
|
+
import { useControlledLatch } from "../../lib/hooks.js";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import { Heading } from "../general/typography.js";
|
|
8
|
+
const SPY_ROOT_MARGIN = "-10% 0px -75% 0px";
|
|
9
|
+
const ISO_CALENDAR_DATE = /^\d{4}-\d{2}-\d{2}$/;
|
|
10
|
+
function prefersReducedMotion() {
|
|
11
|
+
if (typeof window === "undefined" || typeof window.matchMedia !== "function") return false;
|
|
12
|
+
try {
|
|
13
|
+
return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function formatEffectiveDate(value, locale) {
|
|
19
|
+
const iso = value.trim();
|
|
20
|
+
const isCalendarDate = ISO_CALENDAR_DATE.test(iso);
|
|
21
|
+
const date = new Date(isCalendarDate ? `${iso}T00:00:00Z` : iso);
|
|
22
|
+
if (Number.isNaN(date.getTime())) return value;
|
|
23
|
+
return new Intl.DateTimeFormat(locale, {
|
|
24
|
+
year: "numeric",
|
|
25
|
+
month: "long",
|
|
26
|
+
day: "numeric",
|
|
27
|
+
...isCalendarDate ? { timeZone: "UTC" } : {}
|
|
28
|
+
}).format(date);
|
|
29
|
+
}
|
|
30
|
+
const LegalDocumentShell = React.forwardRef(
|
|
31
|
+
function LegalDocumentShell2({
|
|
32
|
+
title,
|
|
33
|
+
version,
|
|
34
|
+
effectiveDate,
|
|
35
|
+
summary,
|
|
36
|
+
contentsLabel,
|
|
37
|
+
sections,
|
|
38
|
+
activeSection,
|
|
39
|
+
defaultActiveSection,
|
|
40
|
+
onActiveSectionChange,
|
|
41
|
+
documentNavigation,
|
|
42
|
+
footerAction,
|
|
43
|
+
id,
|
|
44
|
+
className
|
|
45
|
+
}, ref) {
|
|
46
|
+
const { t, locale } = useTranslation();
|
|
47
|
+
const generatedId = React.useId();
|
|
48
|
+
const baseId = id ?? generatedId;
|
|
49
|
+
const titleId = `${baseId}-title`;
|
|
50
|
+
const contentsId = `${baseId}-contents`;
|
|
51
|
+
const rootRef = React.useRef(null);
|
|
52
|
+
const setRefs = React.useCallback(
|
|
53
|
+
(node) => {
|
|
54
|
+
rootRef.current = node;
|
|
55
|
+
if (typeof ref === "function") ref(node);
|
|
56
|
+
else if (ref) ref.current = node;
|
|
57
|
+
},
|
|
58
|
+
[ref]
|
|
59
|
+
);
|
|
60
|
+
const isControlled = useControlledLatch(activeSection !== void 0);
|
|
61
|
+
const [internalActive, setInternalActive] = React.useState(
|
|
62
|
+
() => defaultActiveSection ?? sections[0]?.id
|
|
63
|
+
);
|
|
64
|
+
const active = isControlled ? activeSection : internalActive;
|
|
65
|
+
const emit = React.useCallback(
|
|
66
|
+
(sectionId) => {
|
|
67
|
+
if (!isControlled) setInternalActive(sectionId);
|
|
68
|
+
onActiveSectionChange?.(sectionId);
|
|
69
|
+
},
|
|
70
|
+
[isControlled, onActiveSectionChange]
|
|
71
|
+
);
|
|
72
|
+
const activeRef = React.useRef(active);
|
|
73
|
+
const emitRef = React.useRef(emit);
|
|
74
|
+
React.useEffect(() => {
|
|
75
|
+
activeRef.current = active;
|
|
76
|
+
emitRef.current = emit;
|
|
77
|
+
});
|
|
78
|
+
const sectionIdsKey = sections.map((section) => section.id).join("\0");
|
|
79
|
+
const hashHandledRef = React.useRef(false);
|
|
80
|
+
React.useEffect(() => {
|
|
81
|
+
if (hashHandledRef.current || typeof window === "undefined") return;
|
|
82
|
+
hashHandledRef.current = true;
|
|
83
|
+
const hash = decodeURIComponent(window.location.hash.replace(/^#/, ""));
|
|
84
|
+
if (hash && sectionIdsKey.split("\0").includes(hash)) emitRef.current(hash);
|
|
85
|
+
}, [sectionIdsKey]);
|
|
86
|
+
React.useEffect(() => {
|
|
87
|
+
const root = rootRef.current;
|
|
88
|
+
if (!root || typeof IntersectionObserver === "undefined") return;
|
|
89
|
+
const ids = sectionIdsKey ? sectionIdsKey.split("\0") : [];
|
|
90
|
+
const intersecting = /* @__PURE__ */ new Map();
|
|
91
|
+
const observer = new IntersectionObserver(
|
|
92
|
+
(entries) => {
|
|
93
|
+
for (const entry of entries) {
|
|
94
|
+
const entryId = entry.target.dataset.legalSection;
|
|
95
|
+
if (entryId) intersecting.set(entryId, entry.isIntersecting);
|
|
96
|
+
}
|
|
97
|
+
const next = ids.find((sectionId) => intersecting.get(sectionId));
|
|
98
|
+
if (next && next !== activeRef.current) emitRef.current(next);
|
|
99
|
+
},
|
|
100
|
+
{ rootMargin: SPY_ROOT_MARGIN, threshold: 0 }
|
|
101
|
+
);
|
|
102
|
+
for (const element of root.querySelectorAll("[data-legal-section]")) {
|
|
103
|
+
observer.observe(element);
|
|
104
|
+
}
|
|
105
|
+
return () => observer.disconnect();
|
|
106
|
+
}, [sectionIdsKey]);
|
|
107
|
+
const handleContentsClick = (event, sectionId) => {
|
|
108
|
+
if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
emit(sectionId);
|
|
112
|
+
const target = typeof document === "undefined" ? null : document.getElementById(sectionId);
|
|
113
|
+
if (!target) return;
|
|
114
|
+
event.preventDefault();
|
|
115
|
+
window.history?.replaceState?.(null, "", `#${sectionId}`);
|
|
116
|
+
target.scrollIntoView?.({
|
|
117
|
+
behavior: prefersReducedMotion() ? "auto" : "smooth",
|
|
118
|
+
block: "start"
|
|
119
|
+
});
|
|
120
|
+
target.focus({ preventScroll: true });
|
|
121
|
+
};
|
|
122
|
+
const contentsName = contentsLabel ?? t("layout.legalDocumentShell.contents");
|
|
123
|
+
return /* @__PURE__ */ jsx(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
ref: setRefs,
|
|
127
|
+
id,
|
|
128
|
+
"data-slot": "legal-document-shell",
|
|
129
|
+
className: cn("ui-legal-document-scope", className),
|
|
130
|
+
children: /* @__PURE__ */ jsxs("article", { className: "ui-legal-document", "aria-labelledby": titleId, children: [
|
|
131
|
+
/* @__PURE__ */ jsxs("header", { className: "ui-legal-document-header", children: [
|
|
132
|
+
/* @__PURE__ */ jsx(Heading, { level: 1, id: titleId, children: title }),
|
|
133
|
+
(version !== void 0 || effectiveDate !== void 0) && /* @__PURE__ */ jsxs("div", { className: "ui-legal-document-meta", children: [
|
|
134
|
+
version !== void 0 && /* @__PURE__ */ jsx("span", { children: t("layout.legalDocumentShell.version", { version }) }),
|
|
135
|
+
effectiveDate !== void 0 && // <time dateTime> keeps the MACHINE-readable value as the ISO 8601 input while
|
|
136
|
+
// the visible text is the Intl-formatted, locale-correct rendering.
|
|
137
|
+
/* @__PURE__ */ jsx("time", { dateTime: effectiveDate, children: t("layout.legalDocumentShell.effectiveDate", {
|
|
138
|
+
date: formatEffectiveDate(effectiveDate, locale)
|
|
139
|
+
}) })
|
|
140
|
+
] }),
|
|
141
|
+
summary !== void 0 && // A <div> (not <p>): the summary slot may carry block content, and a <p> inside a <p>
|
|
142
|
+
// is invalid HTML the browser silently un-nests.
|
|
143
|
+
/* @__PURE__ */ jsx("div", { className: "ui-legal-document-summary", children: summary })
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ jsxs("div", { className: "ui-legal-document-rail", children: [
|
|
146
|
+
documentNavigation !== void 0 && /* @__PURE__ */ jsx("div", { "data-slot": "legal-document-navigation", children: documentNavigation }),
|
|
147
|
+
/* @__PURE__ */ jsxs("nav", { className: "ui-legal-document-toc", "aria-labelledby": contentsId, children: [
|
|
148
|
+
/* @__PURE__ */ jsx("p", { id: contentsId, className: "ui-legal-document-toc-title", children: contentsName }),
|
|
149
|
+
/* @__PURE__ */ jsx("ol", { className: "ui-legal-document-toc-list", children: sections.map((section) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
150
|
+
"a",
|
|
151
|
+
{
|
|
152
|
+
href: `#${section.id}`,
|
|
153
|
+
className: "ui-legal-document-toc-link",
|
|
154
|
+
"data-active": section.id === active ? "" : void 0,
|
|
155
|
+
"aria-current": section.id === active ? "location" : void 0,
|
|
156
|
+
onClick: (event) => handleContentsClick(event, section.id),
|
|
157
|
+
children: section.title
|
|
158
|
+
}
|
|
159
|
+
) }, section.id)) })
|
|
160
|
+
] })
|
|
161
|
+
] }),
|
|
162
|
+
/* @__PURE__ */ jsx("div", { className: "ui-legal-document-content", children: sections.map((section) => /* @__PURE__ */ jsxs(
|
|
163
|
+
"section",
|
|
164
|
+
{
|
|
165
|
+
id: section.id,
|
|
166
|
+
tabIndex: -1,
|
|
167
|
+
"data-legal-section": section.id,
|
|
168
|
+
"aria-labelledby": `${section.id}-heading`,
|
|
169
|
+
className: "ui-legal-document-section",
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ jsx(Heading, { level: 2, id: `${section.id}-heading`, children: section.title }),
|
|
172
|
+
/* @__PURE__ */ jsx("div", { className: "ui-legal-document-section-body", children: section.content })
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
section.id
|
|
176
|
+
)) }),
|
|
177
|
+
footerAction !== void 0 && /* @__PURE__ */ jsx("footer", { className: "ui-legal-document-footer", children: footerAction })
|
|
178
|
+
] })
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
LegalDocumentShell.displayName = "LegalDocumentShell";
|
|
184
|
+
export {
|
|
185
|
+
LegalDocumentShell
|
|
186
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { MasterDetailProp } from "../../props/components/layout.prop.js";
|
|
2
|
+
export type MasterDetailProps = MasterDetailProp;
|
|
3
|
+
/**
|
|
4
|
+
* Token-owned master-detail composition: a selectable collection beside the detail surface it
|
|
5
|
+
* drives. Geometry is the component's only responsibility — the tracks (`--master-detail-rail-*`),
|
|
6
|
+
* the gap (`--master-detail-gap`) and the stacking threshold (`--master-detail-collapse-below`)
|
|
7
|
+
* are all tokens, so a consumer never authors grid tracks or per-screen spacing (gh#223).
|
|
8
|
+
*
|
|
9
|
+
* `rail` chooses which region keeps the fixed track: `detail` (default) is the canonical fluid
|
|
10
|
+
* list + fixed detail rail; `master` is the leading navigator rail. Either way `master` comes
|
|
11
|
+
* first in DOM order, so below the threshold the regions stack list-then-detail.
|
|
12
|
+
*
|
|
13
|
+
* `masterViewport` bounds the collection (gh#231): `auto` (default) lets it grow with its content
|
|
14
|
+
* exactly as before, while `compact`/`standard` cap its block size with a token and scroll it
|
|
15
|
+
* INSIDE the region — the only thing that stops a long real collection from pushing the detail
|
|
16
|
+
* thousands of pixels below the fold once the layout stacks.
|
|
17
|
+
*
|
|
18
|
+
* SELECTION AND KEYBOARD STAY WITH THE CALLER — deliberately. The controls inside `master` may be
|
|
19
|
+
* a listbox, a tablist, a link list or toggle buttons, and only the caller knows which APG pattern
|
|
20
|
+
* applies; a layout that imposed one would fight it. What the layout DOES own is the wiring those
|
|
21
|
+
* patterns need: two named landmark regions, a stable `detailId` for `aria-controls`, and a
|
|
22
|
+
* `tabIndex={-1}` detail region so the app can move focus to the new detail after a selection.
|
|
23
|
+
*/
|
|
24
|
+
export declare function MasterDetail({ master, children, rail, railWidth, masterViewport, collapseBelow, masterLabel, detailLabel, detailId, }: MasterDetailProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
function MasterDetail({
|
|
3
|
+
master,
|
|
4
|
+
children,
|
|
5
|
+
rail = "detail",
|
|
6
|
+
railWidth = "standard",
|
|
7
|
+
masterViewport = "auto",
|
|
8
|
+
collapseBelow,
|
|
9
|
+
masterLabel,
|
|
10
|
+
detailLabel,
|
|
11
|
+
detailId
|
|
12
|
+
}) {
|
|
13
|
+
const bounded = masterViewport !== "auto";
|
|
14
|
+
return /* @__PURE__ */ jsxs(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: "ui-master-detail",
|
|
18
|
+
"data-rail": rail,
|
|
19
|
+
"data-rail-width": railWidth,
|
|
20
|
+
"data-master-viewport": masterViewport,
|
|
21
|
+
"data-collapse-below": collapseBelow === void 0 ? void 0 : String(collapseBelow),
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx(
|
|
24
|
+
"section",
|
|
25
|
+
{
|
|
26
|
+
className: "ui-master-detail-master",
|
|
27
|
+
"aria-label": masterLabel,
|
|
28
|
+
tabIndex: bounded ? 0 : void 0,
|
|
29
|
+
children: master
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
"section",
|
|
34
|
+
{
|
|
35
|
+
className: "ui-master-detail-detail",
|
|
36
|
+
id: detailId,
|
|
37
|
+
"aria-label": detailLabel,
|
|
38
|
+
tabIndex: -1,
|
|
39
|
+
children
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
MasterDetail
|
|
48
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { OrgSwitcherProp } from "../../props/components/layout.prop.js";
|
|
3
|
+
export type { OrgSwitcherLabels, OrgSwitcherOrganization, OrgSwitcherProp, OrgSwitcherProp as OrgSwitcherProps, } from "../../props/components/layout.prop.js";
|
|
4
|
+
/**
|
|
5
|
+
* Organization switcher with one stable shell contract: canonical trigger geometry, an optional
|
|
6
|
+
* status badge, a searchable desktop popover, a focus-trapped bottom Sheet at/below the shared
|
|
7
|
+
* `--sheet-responsive-breakpoint-width`, and explicit loading/empty/error states.
|
|
8
|
+
*/
|
|
9
|
+
export declare function OrgSwitcher({ organizations, value, onValueChange, collapsed, disabled, loading, error, onRetry, labels, responsive, open, onOpenChange, className, }: OrgSwitcherProp): React.JSX.Element;
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Check, ChevronsUpDown, Loader2, RotateCcw } from "lucide-react";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../data-display/popover.js";
|
|
7
|
+
import {
|
|
8
|
+
Command,
|
|
9
|
+
CommandEmpty,
|
|
10
|
+
CommandGroup,
|
|
11
|
+
CommandInput,
|
|
12
|
+
CommandItem,
|
|
13
|
+
CommandList
|
|
14
|
+
} from "../data-entry/command.js";
|
|
15
|
+
import {
|
|
16
|
+
Sheet,
|
|
17
|
+
SheetBody,
|
|
18
|
+
SheetContent,
|
|
19
|
+
SheetHeader,
|
|
20
|
+
SheetTrigger,
|
|
21
|
+
useSheetResponsiveMode
|
|
22
|
+
} from "../feedback/sheet.js";
|
|
23
|
+
import { Button } from "../general/button.js";
|
|
24
|
+
function OrganizationMark({ organization }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("span", { className: "ui-org-switcher-avatar", "aria-hidden": "true", children: organization?.avatar ?? organization?.name.trim().charAt(0).toUpperCase() ?? "?" });
|
|
26
|
+
}
|
|
27
|
+
function OrganizationBadge({ organization }) {
|
|
28
|
+
if (organization.badge == null) return null;
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
"span",
|
|
31
|
+
{
|
|
32
|
+
"data-slot": "org-switcher-badge",
|
|
33
|
+
className: "shrink-0",
|
|
34
|
+
"aria-hidden": organization.badgeLabel != null ? "true" : void 0,
|
|
35
|
+
children: organization.badge
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
const OrgSwitcherTrigger = React.forwardRef(
|
|
40
|
+
({ organization, collapsed, disabled, label, ...props }, ref) => {
|
|
41
|
+
const reactId = React.useId();
|
|
42
|
+
const badgeDescriptionId = !collapsed && organization?.badge != null && organization.badgeLabel != null ? `${reactId}-badge` : void 0;
|
|
43
|
+
return /* @__PURE__ */ jsxs(
|
|
44
|
+
Button,
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
type: "button",
|
|
48
|
+
variant: "ghost",
|
|
49
|
+
className: "ui-org-switcher-trigger",
|
|
50
|
+
"data-collapsed": collapsed ? "true" : void 0,
|
|
51
|
+
disabled,
|
|
52
|
+
"aria-label": label,
|
|
53
|
+
"aria-describedby": badgeDescriptionId,
|
|
54
|
+
...props,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ jsx(OrganizationMark, { organization }),
|
|
57
|
+
!collapsed ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
58
|
+
/* @__PURE__ */ jsxs("span", { className: "ui-org-switcher-current", children: [
|
|
59
|
+
/* @__PURE__ */ jsx("span", { className: "ui-org-switcher-name", children: organization?.name ?? label }),
|
|
60
|
+
organization?.meta != null ? /* @__PURE__ */ jsx("span", { className: "ui-org-switcher-meta", children: organization.meta }) : null
|
|
61
|
+
] }),
|
|
62
|
+
organization != null ? /* @__PURE__ */ jsx(OrganizationBadge, { organization }) : null,
|
|
63
|
+
badgeDescriptionId != null ? /* @__PURE__ */ jsx("span", { id: badgeDescriptionId, className: "sr-only", children: organization?.badgeLabel }) : null,
|
|
64
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "ui-org-switcher-chevron", "aria-hidden": "true" })
|
|
65
|
+
] }) : null
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
OrgSwitcherTrigger.displayName = "OrgSwitcherTrigger";
|
|
72
|
+
function OrgSwitcherPanel({
|
|
73
|
+
organizations,
|
|
74
|
+
value,
|
|
75
|
+
onValueChange,
|
|
76
|
+
loading,
|
|
77
|
+
error,
|
|
78
|
+
onRetry,
|
|
79
|
+
labels,
|
|
80
|
+
close
|
|
81
|
+
}) {
|
|
82
|
+
if (loading) {
|
|
83
|
+
return /* @__PURE__ */ jsxs("div", { className: "ui-org-switcher-state", role: "status", children: [
|
|
84
|
+
/* @__PURE__ */ jsx(Loader2, { className: "ui-org-switcher-spinner", "aria-hidden": "true" }),
|
|
85
|
+
/* @__PURE__ */ jsx("span", { children: labels.loading })
|
|
86
|
+
] });
|
|
87
|
+
}
|
|
88
|
+
if (error != null) {
|
|
89
|
+
return /* @__PURE__ */ jsxs("div", { className: "ui-org-switcher-state", role: "alert", children: [
|
|
90
|
+
/* @__PURE__ */ jsx("span", { children: error }),
|
|
91
|
+
onRetry != null ? /* @__PURE__ */ jsxs(Button, { type: "button", variant: "outline", size: "sm", onClick: onRetry, children: [
|
|
92
|
+
/* @__PURE__ */ jsx(RotateCcw, { "aria-hidden": "true" }),
|
|
93
|
+
labels.retry
|
|
94
|
+
] }) : null
|
|
95
|
+
] });
|
|
96
|
+
}
|
|
97
|
+
return /* @__PURE__ */ jsxs(Command, { label: labels.title, className: "ui-org-switcher-command", children: [
|
|
98
|
+
/* @__PURE__ */ jsx(CommandInput, { placeholder: labels.search, "aria-label": labels.search }),
|
|
99
|
+
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
100
|
+
/* @__PURE__ */ jsx(CommandEmpty, { children: labels.empty }),
|
|
101
|
+
/* @__PURE__ */ jsx(CommandGroup, { children: organizations.map((organization) => {
|
|
102
|
+
const selected = organization.id === value;
|
|
103
|
+
return /* @__PURE__ */ jsxs(
|
|
104
|
+
CommandItem,
|
|
105
|
+
{
|
|
106
|
+
value: `${organization.name} ${String(organization.meta ?? "")}`,
|
|
107
|
+
keywords: organization.badgeLabel != null ? [organization.id, organization.badgeLabel] : [organization.id],
|
|
108
|
+
disabled: organization.disabled,
|
|
109
|
+
onSelect: () => {
|
|
110
|
+
onValueChange?.(organization.id);
|
|
111
|
+
close();
|
|
112
|
+
},
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsx(OrganizationMark, { organization }),
|
|
115
|
+
/* @__PURE__ */ jsxs("span", { className: "ui-org-switcher-option", children: [
|
|
116
|
+
/* @__PURE__ */ jsx("span", { className: "ui-org-switcher-name", children: organization.name }),
|
|
117
|
+
organization.meta != null ? /* @__PURE__ */ jsx("span", { className: "ui-org-switcher-meta", children: organization.meta }) : null
|
|
118
|
+
] }),
|
|
119
|
+
/* @__PURE__ */ jsx(OrganizationBadge, { organization }),
|
|
120
|
+
organization.badge != null && organization.badgeLabel != null ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: organization.badgeLabel }) : null,
|
|
121
|
+
selected ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
122
|
+
/* @__PURE__ */ jsx(Check, { className: "ui-org-switcher-check", "aria-hidden": "true" }),
|
|
123
|
+
/* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
124
|
+
"(",
|
|
125
|
+
labels.title,
|
|
126
|
+
")"
|
|
127
|
+
] })
|
|
128
|
+
] }) : null
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
organization.id
|
|
132
|
+
);
|
|
133
|
+
}) })
|
|
134
|
+
] })
|
|
135
|
+
] });
|
|
136
|
+
}
|
|
137
|
+
function OrgSwitcher({
|
|
138
|
+
organizations,
|
|
139
|
+
value,
|
|
140
|
+
onValueChange,
|
|
141
|
+
collapsed = false,
|
|
142
|
+
disabled = false,
|
|
143
|
+
loading = false,
|
|
144
|
+
error,
|
|
145
|
+
onRetry,
|
|
146
|
+
labels,
|
|
147
|
+
responsive = "auto",
|
|
148
|
+
open,
|
|
149
|
+
onOpenChange,
|
|
150
|
+
className
|
|
151
|
+
}) {
|
|
152
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
|
|
153
|
+
const controlled = open !== void 0;
|
|
154
|
+
const resolvedOpen = controlled ? open : uncontrolledOpen;
|
|
155
|
+
const setOpen = React.useCallback(
|
|
156
|
+
(nextOpen) => {
|
|
157
|
+
if (!controlled) {
|
|
158
|
+
setUncontrolledOpen(nextOpen);
|
|
159
|
+
}
|
|
160
|
+
onOpenChange?.(nextOpen);
|
|
161
|
+
},
|
|
162
|
+
[controlled, onOpenChange]
|
|
163
|
+
);
|
|
164
|
+
const compactViewport = useSheetResponsiveMode("auto") === "bottom";
|
|
165
|
+
const sheet = responsive === "sheet" || responsive === "auto" && compactViewport;
|
|
166
|
+
const current = organizations.find((organization) => organization.id === value);
|
|
167
|
+
const fallbackName = current?.name ?? labels.title;
|
|
168
|
+
const triggerLabel = labels.trigger(fallbackName);
|
|
169
|
+
const triggerDisabled = disabled;
|
|
170
|
+
const trigger = /* @__PURE__ */ jsx(
|
|
171
|
+
OrgSwitcherTrigger,
|
|
172
|
+
{
|
|
173
|
+
organization: current,
|
|
174
|
+
collapsed,
|
|
175
|
+
disabled: triggerDisabled,
|
|
176
|
+
label: triggerLabel
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
const panel = /* @__PURE__ */ jsx(
|
|
180
|
+
OrgSwitcherPanel,
|
|
181
|
+
{
|
|
182
|
+
organizations,
|
|
183
|
+
value,
|
|
184
|
+
onValueChange,
|
|
185
|
+
loading,
|
|
186
|
+
error,
|
|
187
|
+
onRetry,
|
|
188
|
+
labels,
|
|
189
|
+
close: () => setOpen(false)
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
if (sheet) {
|
|
193
|
+
return /* @__PURE__ */ jsx("div", { className: cn("ui-org-switcher", className), "data-collapsed": collapsed || void 0, children: /* @__PURE__ */ jsxs(Sheet, { open: resolvedOpen, onOpenChange: setOpen, children: [
|
|
194
|
+
/* @__PURE__ */ jsx(SheetTrigger, { asChild: true, children: trigger }),
|
|
195
|
+
/* @__PURE__ */ jsxs(
|
|
196
|
+
SheetContent,
|
|
197
|
+
{
|
|
198
|
+
responsive: "bottom",
|
|
199
|
+
className: "ui-org-switcher-sheet",
|
|
200
|
+
style: {
|
|
201
|
+
"--sheet-bottom-max-height": "var(--org-switcher-sheet-max-height)"
|
|
202
|
+
},
|
|
203
|
+
children: [
|
|
204
|
+
/* @__PURE__ */ jsx(SheetHeader, { title: labels.title }),
|
|
205
|
+
/* @__PURE__ */ jsx(SheetBody, { children: panel })
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
] }) });
|
|
210
|
+
}
|
|
211
|
+
return /* @__PURE__ */ jsx("div", { className: cn("ui-org-switcher", className), "data-collapsed": collapsed || void 0, children: /* @__PURE__ */ jsxs(Popover, { open: resolvedOpen, onOpenChange: setOpen, children: [
|
|
212
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: trigger }),
|
|
213
|
+
/* @__PURE__ */ jsx(PopoverContent, { align: "start", className: "ui-org-switcher-popover", "aria-label": labels.title, children: panel })
|
|
214
|
+
] }) });
|
|
215
|
+
}
|
|
216
|
+
export {
|
|
217
|
+
OrgSwitcher
|
|
218
|
+
};
|
|
@@ -2,7 +2,7 @@ import type { PageContainerProp, PageInsetProp } from "../../props/components/la
|
|
|
2
2
|
export type { PageContainerProp, PageContainerProp as PageContainerProps, } from "../../props/components/layout.prop.js";
|
|
3
3
|
export type { BreadcrumbItemProp, BreadcrumbItemProp as BreadcrumbItem, } from "../../props/vocabulary/navigation.prop.js";
|
|
4
4
|
export declare function PageContainerInset({ className, children, ...props }: PageInsetProp): import("react").JSX.Element;
|
|
5
|
-
declare function PageContainerRoot({ title, subtitle, extra, footer, breadcrumb, breadcrumbLabel, breadcrumbAriaLabel, linkComponent: LinkComponent, density, variant, stickyFooter, footerReveal, fill, children, className, }: PageContainerProp): import("react").JSX.Element;
|
|
5
|
+
declare function PageContainerRoot({ title, subtitle, extra, footer, breadcrumb, breadcrumbLabel, breadcrumbAriaLabel, linkComponent: LinkComponent, density, variant, headerLayout, stickyFooter, footerReveal, fill, children, className, }: PageContainerProp): import("react").JSX.Element;
|
|
6
6
|
export declare const PageContainer: typeof PageContainerRoot & {
|
|
7
7
|
Inset: typeof PageContainerInset;
|
|
8
8
|
};
|
|
@@ -44,6 +44,7 @@ function PageContainerRoot({
|
|
|
44
44
|
linkComponent: LinkComponent = "a",
|
|
45
45
|
density,
|
|
46
46
|
variant = "default",
|
|
47
|
+
headerLayout = "stack",
|
|
47
48
|
stickyFooter = false,
|
|
48
49
|
footerReveal = "always",
|
|
49
50
|
fill = false,
|
|
@@ -69,7 +70,7 @@ function PageContainerRoot({
|
|
|
69
70
|
className
|
|
70
71
|
),
|
|
71
72
|
children: [
|
|
72
|
-
/* @__PURE__ */ jsxs("header", { ref: headerRef, className: "ui-page-header", children: [
|
|
73
|
+
/* @__PURE__ */ jsxs("header", { ref: headerRef, className: "ui-page-header", "data-layout": headerLayout, children: [
|
|
73
74
|
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx(
|
|
74
75
|
"nav",
|
|
75
76
|
{
|
|
@@ -100,7 +101,7 @@ function PageContainerRoot({
|
|
|
100
101
|
}
|
|
101
102
|
),
|
|
102
103
|
/* @__PURE__ */ jsxs("div", { className: "ui-page-header-row", children: [
|
|
103
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
104
|
+
/* @__PURE__ */ jsxs("div", { className: "ui-page-header-heading min-w-0", children: [
|
|
104
105
|
/* @__PURE__ */ jsx("h1", { className: "ui-page-title", children: title }),
|
|
105
106
|
subtitle && /* @__PURE__ */ jsx("p", { className: "ui-page-subtitle", children: subtitle })
|
|
106
107
|
] }),
|