@thewhatmatters/wmds 0.4.36 → 0.4.38
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/CHANGELOG.md +24 -0
- package/dist/components/molecules/PageHeader/pageHeaderStyles.d.ts.map +1 -1
- package/dist/components/molecules/PageHeader/pageHeaderStyles.js +1 -1
- package/dist/components/organisms/AppShell/AppShell.d.ts +21 -2
- package/dist/components/organisms/AppShell/AppShell.d.ts.map +1 -1
- package/dist/components/organisms/AppShell/AppShell.js +202 -129
- package/dist/components/organisms/AppShell/appShellStyles.d.ts +7 -2
- package/dist/components/organisms/AppShell/appShellStyles.d.ts.map +1 -1
- package/dist/components/organisms/AppShell/appShellStyles.js +2 -2
- package/dist/components/organisms/Dialog/Dialog.js +31 -31
- package/dist/components/organisms/Panel/Panel.js +28 -28
- package/dist/components/organisms/Sheet/Sheet.js +28 -28
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +47 -47
- package/dist/styles.css +1 -1
- package/docs/components.md +1 -1
- package/docs/exports.json +1 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-appshell--portal-dashboard-pattern.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--status-pill.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-band--page-in-bands.tsx +1 -1
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-above.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-card--terminal-frame.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-carousel--image-carousel.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--revenue-by-line.tsx +1 -1
- package/docs/patterns/components-chart--segmented-ring-pattern.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +1 -1
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-copyfield--clipboard-blocked.tsx +1 -1
- package/docs/patterns/components-copyfield--copied.tsx +1 -1
- package/docs/patterns/components-copyfield--copy-key.tsx +1 -1
- package/docs/patterns/components-copyfield--on-navy.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-typed-confirmation.tsx +1 -1
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-displaycontrols--theme-switch.tsx +1 -1
- package/docs/patterns/components-errorsummary--contact-form.tsx +1 -1
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-filterpanel--panel.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herointro--with-actions.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--short-form-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-linktile--resource-tile.tsx +1 -1
- package/docs/patterns/components-linktile--router-link.tsx +1 -1
- package/docs/patterns/components-logview--detail-pane.tsx +1 -1
- package/docs/patterns/components-logview--log-viewer.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--app-sidebar.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-header-actions.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet-url-deep-link.tsx +1 -1
- package/docs/patterns/components-sheet--side-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--hero-stat.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-table--approvals-with-sheet.tsx +1 -1
- package/docs/patterns/components-table--approvals.tsx +1 -1
- package/docs/patterns/components-table--basic.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--needs-you-table.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textarea--save-status.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-tilegrid--masonry.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-grid.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +1 -1
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +1 -1
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/guides-resource-detail--detail.tsx +1 -1
- package/docs/patterns/index.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ Every release of `@thewhatmatters/wmds` is listed here, newest first.
|
|
|
7
7
|
- **Pasted patterns:** when a release changes a **Pattern — …** story's Show code, it is named under Consumer actions so apps re-copy it.
|
|
8
8
|
- **How to add an entry** (contributors): add your change to the top entry. If that version is already on npm (`npm view @thewhatmatters/wmds versions`), start a new entry above it and bump `version` in `package.json` to match. `npm run check:changelog` enforces the format.
|
|
9
9
|
|
|
10
|
+
## 0.4.38
|
|
11
|
+
|
|
12
|
+
**AppShell: a page picker on the phone menu button.**
|
|
13
|
+
|
|
14
|
+
- **AppShell** `menuButton="picker"` (new): below `lg` the menu button shows the icon, the current page (`title`, truncating) and a chevron, standing in for the title, so a long page name isn't cut to one word ("Hero — Feature Center ▾"). Its name is `labels.menu: title`. The `h1` stays in the page for screen readers and is visible from `lg`.
|
|
15
|
+
- Story **AppShell → State — phone, page picker**, with an interaction test.
|
|
16
|
+
|
|
17
|
+
### Consumer actions
|
|
18
|
+
|
|
19
|
+
- None.
|
|
20
|
+
|
|
21
|
+
## 0.4.37
|
|
22
|
+
|
|
23
|
+
**AppShell: a docked aside you can use while watching the page, a labelled phone menu button, and titles that end in an ellipsis.**
|
|
24
|
+
|
|
25
|
+
- **AppShell** `asideMode` (new): `overlay` (default, unchanged) or `docked`. Docked, from `lg`, the aside is a raised column beside the page (320px), and the page narrows to make room instead of being covered: for controls you use while watching the page change, like a font panel. It's a `complementary` landmark named by its title; Close or Escape from inside returns focus to the button that opened it. Below `lg` it's the overlay **Panel** either way. New exports `appShellAsideModes`, `AppShellAsideMode`.
|
|
26
|
+
- **AppShell** `menuButton` (new): `icon` (default, unchanged) or `label`, the icon plus `labels.menu` as visible text on the phone menu button (Header rule N7), for when the glyph alone doesn't say what the menu holds. New exports `appShellMenuButtons`, `AppShellMenuButton`.
|
|
27
|
+
- **PageHeader** `variant="app"`: a long title ends in an ellipsis on one line instead of wrapping out of the 56px band.
|
|
28
|
+
- Stories **AppShell → State — aside docked** and **State — phone, labelled menu**, with interaction tests (the page narrows, no dialog, focus returns on Close and Escape; the labelled button opens the menu).
|
|
29
|
+
|
|
30
|
+
### Consumer actions
|
|
31
|
+
|
|
32
|
+
- None.
|
|
33
|
+
|
|
10
34
|
## 0.4.36
|
|
11
35
|
|
|
12
36
|
**Colour fixes from building every component in light and dark: fills that vanished, the navy on the dark body, invalid hovers, and a primary Button on a band.**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageHeaderStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/PageHeader/pageHeaderStyles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,qCAAsC,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,4FAA4F;AAC5F,eAAO,MAAM,8BAA8B,uCAAuC,CAAC;AAEnF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAWpE,CAAC;AAEF,eAAO,MAAM,sBAAsB,oCAAoC,CAAC;AAExE,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pageHeaderStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/PageHeader/pageHeaderStyles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,qCAAsC,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,4FAA4F;AAC5F,eAAO,MAAM,8BAA8B,uCAAuC,CAAC;AAEnF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAWpE,CAAC;AAEF,eAAO,MAAM,sBAAsB,oCAAoC,CAAC;AAExE,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AAEvE,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAKpE,CAAC"}
|
|
@@ -12,7 +12,7 @@ var r = [
|
|
|
12
12
|
page: "flex items-center justify-between gap-4",
|
|
13
13
|
toolbar: e("flex items-center justify-between gap-2", n.md)
|
|
14
14
|
}, o = "flex min-w-0 items-center gap-3", s = "flex shrink-0 items-center gap-2", c = {
|
|
15
|
-
app: e(t("section-heading"), "text-fg"),
|
|
15
|
+
app: e(t("section-heading"), "min-w-0 truncate text-fg"),
|
|
16
16
|
page: e(t("section-heading"), "text-fg"),
|
|
17
17
|
toolbar: e(t("ui-label"), "font-medium text-fg")
|
|
18
18
|
};
|
|
@@ -13,6 +13,10 @@ export interface AppShellLabels {
|
|
|
13
13
|
/** The skip link, the first tab stop, which moves focus to the page content. */
|
|
14
14
|
skipToContent: string;
|
|
15
15
|
}
|
|
16
|
+
export declare const appShellAsideModes: readonly ["overlay", "docked"];
|
|
17
|
+
export type AppShellAsideMode = (typeof appShellAsideModes)[number];
|
|
18
|
+
export declare const appShellMenuButtons: readonly ["icon", "label", "picker"];
|
|
19
|
+
export type AppShellMenuButton = (typeof appShellMenuButtons)[number];
|
|
16
20
|
export interface AppShellProps {
|
|
17
21
|
/** Page title — the `h1` in the title bar. */
|
|
18
22
|
title: string;
|
|
@@ -33,11 +37,25 @@ export interface AppShellProps {
|
|
|
33
37
|
sidebarOpen?: boolean;
|
|
34
38
|
defaultSidebarOpen?: boolean;
|
|
35
39
|
onSidebarOpenChange?: (open: boolean) => void;
|
|
40
|
+
/**
|
|
41
|
+
* `overlay` (default): the aside is a non-blocking **Panel** over the page.
|
|
42
|
+
* `docked`: from `lg` it sits beside the page, which narrows to make room, for controls you use while
|
|
43
|
+
* watching the page change (a font panel). Below `lg` it's the overlay **Panel** either way.
|
|
44
|
+
*/
|
|
45
|
+
asideMode?: AppShellAsideMode;
|
|
36
46
|
/** Aside open — controlled. */
|
|
37
47
|
asideOpen?: boolean;
|
|
38
48
|
defaultAsideOpen?: boolean;
|
|
39
49
|
onAsideOpenChange?: (open: boolean) => void;
|
|
40
50
|
labels?: Partial<AppShellLabels>;
|
|
51
|
+
/**
|
|
52
|
+
* The phone menu button (below `lg`): `icon` (default); `label`, the icon plus `labels.menu` as visible
|
|
53
|
+
* text ("Patterns"), when the glyph alone wouldn't say what the menu holds; or `picker`, the icon plus the
|
|
54
|
+
* current page (`title`) and a chevron, standing in for the title on phones, when the menu is a list of
|
|
55
|
+
* pages and the button should say which one you're on ("Hero — Feature Center ▾"). With `picker` the
|
|
56
|
+
* `h1` stays in the page for screen readers but is only visible from `lg`.
|
|
57
|
+
*/
|
|
58
|
+
menuButton?: AppShellMenuButton;
|
|
41
59
|
/** Page content. **AppShell.Brand**, **Sidebar**, **Header**, and **Aside** children fill their slots instead. */
|
|
42
60
|
children?: ReactNode;
|
|
43
61
|
className?: AppShellLayoutClassName;
|
|
@@ -68,10 +86,11 @@ export interface AppShellContextValue {
|
|
|
68
86
|
}
|
|
69
87
|
/** State of the nearest **AppShell** — for a header button that opens the aside. */
|
|
70
88
|
export declare function useAppShell(): AppShellContextValue;
|
|
71
|
-
declare function AppShellRoot({ title, brand: brandProp, sidebar: sidebarProp, sidebarFooter: sidebarFooterProp, header: headerProp, aside: asideProp, asideTitle, asideDescription, sidebarOpen: sidebarOpenProp, defaultSidebarOpen, onSidebarOpenChange, asideOpen: asideOpenProp, defaultAsideOpen, onAsideOpenChange, labels: labelsProp, children, className, }: AppShellProps): import("react").JSX.Element;
|
|
89
|
+
declare function AppShellRoot({ title, brand: brandProp, sidebar: sidebarProp, sidebarFooter: sidebarFooterProp, header: headerProp, aside: asideProp, asideTitle, asideDescription, sidebarOpen: sidebarOpenProp, defaultSidebarOpen, onSidebarOpenChange, asideOpen: asideOpenProp, defaultAsideOpen, onAsideOpenChange, asideMode, menuButton, labels: labelsProp, children, className, }: AppShellProps): import("react").JSX.Element;
|
|
72
90
|
/**
|
|
73
91
|
* App chrome — a sidebar on the page background and the page as an inset, raised surface with a
|
|
74
|
-
* title bar. Below `lg` the sidebar is a start **Sheet**; the optional aside is a non-blocking **Panel
|
|
92
|
+
* title bar. Below `lg` the sidebar is a start **Sheet**; the optional aside is a non-blocking **Panel**,
|
|
93
|
+
* or with `asideMode="docked"`, from `lg`, a column beside the page.
|
|
75
94
|
*/
|
|
76
95
|
export declare const AppShell: typeof AppShellRoot & {
|
|
77
96
|
Brand: typeof AppShellBrand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/AppShell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAYL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AA6Bf,uDAAuD;AACvD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C,MAAM,WAAW,cAAc;IAC7B,oFAAoF;IACpF,QAAQ,EAAE,MAAM,CAAC;IACjB,yFAAyF;IACzF,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAC;CACvB;AAUD,eAAO,MAAM,kBAAkB,gCAAiC,CAAC;AACjE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,eAAO,MAAM,mBAAmB,sCAAuC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,WAAW,aAAa;IAC5B,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,4GAA4G;IAC5G,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,yEAAyE;IACzE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,uKAAuK;IACvK,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,8FAA8F;IAC9F,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kFAAkF;IAClF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,gEAAgE;IAChE,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,6CAA6C;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C;;;;OAIG;IACH,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,+BAA+B;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACjC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC,kHAAkH;IAClH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,sBAAuB,SAAQ,iBAAiB;IACxD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB;AAED,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAErD;AAED,iBAAS,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAEvD;AAED,iBAAS,qBAAqB,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAE7D;AAED,iBAAS,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,+BAEtD;AAED,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,sBAAsB,+BAE1D;AAED,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,qFAAqF;IACrF,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAID,oFAAoF;AACpF,wBAAgB,WAAW,IAAI,oBAAoB,CAMlD;AAkDD,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,iBAAiB,EAChC,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE,SAAS,EAChB,UAAU,EACV,gBAAgB,EAChB,WAAW,EAAE,eAAe,EAC5B,kBAAyB,EACzB,mBAAmB,EACnB,SAAS,EAAE,aAAa,EACxB,gBAAwB,EACxB,iBAAiB,EACjB,SAAqB,EACrB,UAAmB,EACnB,MAAM,EAAE,UAAU,EAClB,QAAQ,EACR,SAAS,GACV,EAAE,aAAa,+BA2Sf;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;;;;;CAMnB,CAAC"}
|
|
@@ -1,218 +1,291 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
3
|
+
import { Button as t } from "../../atoms/Button/Button.js";
|
|
4
|
+
import { IconButton as n } from "../../atoms/IconButton/IconButton.js";
|
|
5
|
+
import { Kbd as r } from "../../atoms/Kbd/Kbd.js";
|
|
6
|
+
import { Tooltip as i } from "../../atoms/Tooltip/Tooltip.js";
|
|
7
|
+
import { pageHeaderTitleClasses as ee } from "../../molecules/PageHeader/pageHeaderStyles.js";
|
|
8
|
+
import { PageHeader as a } from "../../molecules/PageHeader/PageHeader.js";
|
|
9
|
+
import { overlayPanelBodyScrollClasses as te, overlayPanelSectionStackClasses as ne } from "../Dialog/dialogStyles.js";
|
|
10
|
+
import { OverlayPanelHeader as re } from "../Dialog/OverlayPanelHeader.js";
|
|
11
|
+
import { Panel as ie } from "../Panel/Panel.js";
|
|
12
|
+
import { Sheet as ae } from "../Sheet/Sheet.js";
|
|
13
|
+
import { appShellAsideDockedClasses as oe, appShellBrandClasses as se, appShellCanvasClasses as ce, appShellMainClasses as le, appShellRootClasses as ue, appShellSheetBodyClasses as de, appShellSidebarBodyClasses as o, appShellSidebarClasses as fe, appShellSidebarFooterClasses as pe, appShellSkipLinkClasses as me, appShellSurfaceClasses as he, appShellToggleDesktopClasses as ge, appShellToggleMobileClasses as s } from "./appShellStyles.js";
|
|
14
|
+
import { Children as c, createContext as _e, isValidElement as ve, useCallback as l, useContext as ye, useEffect as u, useId as be, useMemo as xe, useRef as d, useState as f } from "react";
|
|
15
|
+
import { ChevronDown as Se, PanelLeft as p } from "lucide-react";
|
|
16
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
13
17
|
//#region src/components/organisms/AppShell/AppShell.tsx
|
|
14
|
-
var
|
|
18
|
+
var Ce = {
|
|
15
19
|
collapse: "Collapse sidebar",
|
|
16
20
|
expand: "Expand sidebar",
|
|
17
21
|
menu: "Menu",
|
|
18
22
|
aside: "Details",
|
|
19
23
|
skipToContent: "Skip to content"
|
|
20
|
-
}
|
|
24
|
+
}, _ = ["overlay", "docked"], v = [
|
|
25
|
+
"icon",
|
|
26
|
+
"label",
|
|
27
|
+
"picker"
|
|
28
|
+
];
|
|
29
|
+
function y({ children: e }) {
|
|
30
|
+
return /* @__PURE__ */ h(m, { children: e });
|
|
31
|
+
}
|
|
32
|
+
function b({ children: e }) {
|
|
33
|
+
return /* @__PURE__ */ h(m, { children: e });
|
|
34
|
+
}
|
|
21
35
|
function x({ children: e }) {
|
|
22
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ h(m, { children: e });
|
|
23
37
|
}
|
|
24
38
|
function S({ children: e }) {
|
|
25
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ h(m, { children: e });
|
|
26
40
|
}
|
|
27
41
|
function C({ children: e }) {
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
}
|
|
30
|
-
function w({ children: e }) {
|
|
31
|
-
return /* @__PURE__ */ y(v, { children: e });
|
|
42
|
+
return /* @__PURE__ */ h(m, { children: e });
|
|
32
43
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
var E = l(null);
|
|
37
|
-
function D() {
|
|
38
|
-
let e = f(E);
|
|
44
|
+
var w = _e(null);
|
|
45
|
+
function T() {
|
|
46
|
+
let e = ye(w);
|
|
39
47
|
if (e == null) throw Error("useAppShell must be used inside <AppShell>.");
|
|
40
48
|
return e;
|
|
41
49
|
}
|
|
42
|
-
function
|
|
43
|
-
let [r, i] =
|
|
44
|
-
return [e ?? r,
|
|
50
|
+
function E(e, t, n) {
|
|
51
|
+
let [r, i] = f(t);
|
|
52
|
+
return [e ?? r, l((t) => {
|
|
45
53
|
e ?? i(t), n?.(t);
|
|
46
54
|
}, [e, n])];
|
|
47
55
|
}
|
|
48
|
-
var
|
|
49
|
-
function
|
|
56
|
+
var D = "(min-width: 1024px)";
|
|
57
|
+
function we(e) {
|
|
50
58
|
return e instanceof HTMLElement && e.isContentEditable;
|
|
51
59
|
}
|
|
52
|
-
function
|
|
60
|
+
function Te(e) {
|
|
53
61
|
let t = { content: [] };
|
|
54
62
|
return c.forEach(e, (e) => {
|
|
55
|
-
if (!
|
|
63
|
+
if (!ve(e)) {
|
|
56
64
|
e != null && e !== !1 && t.content.push(e);
|
|
57
65
|
return;
|
|
58
66
|
}
|
|
59
|
-
e.type ===
|
|
67
|
+
e.type === y ? t.brand = e.props.children : e.type === b ? t.sidebar = e.props.children : e.type === x ? t.sidebarFooter = e.props.children : e.type === S ? t.header = e.props.children : e.type === C ? t.aside = e.props : t.content.push(e);
|
|
60
68
|
}), t;
|
|
61
69
|
}
|
|
62
|
-
function
|
|
63
|
-
let
|
|
64
|
-
...
|
|
65
|
-
...
|
|
66
|
-
},
|
|
67
|
-
!e &&
|
|
68
|
-
}, [
|
|
69
|
-
window.matchMedia(
|
|
70
|
-
}, [
|
|
71
|
-
|
|
72
|
-
let e = window.matchMedia(
|
|
70
|
+
function O({ title: c, brand: _e, sidebar: ve, sidebarFooter: ye, header: _, aside: v, asideTitle: y, asideDescription: b, sidebarOpen: x, defaultSidebarOpen: S = !0, onSidebarOpenChange: C, asideOpen: T, defaultAsideOpen: O = !1, onAsideOpenChange: k, asideMode: Ee = "overlay", menuButton: A = "icon", labels: De, children: Oe, className: ke }) {
|
|
71
|
+
let j = {
|
|
72
|
+
...Ce,
|
|
73
|
+
...De
|
|
74
|
+
}, M = Te(Oe), N = _e ?? M.brand, P = ve ?? M.sidebar, F = ye ?? M.sidebarFooter, I = _ ?? M.header, L = v ?? M.aside?.children, R = P != null, z = L != null, [B, Ae] = E(x, S, C), [V, H] = E(T, O, k), [U, W] = f(!1), [je, G] = f(!1), K = be(), Me = d(null), Ne = d(null), q = l((e) => {
|
|
75
|
+
!e && Me.current?.contains(document.activeElement) && Ne.current?.focus(), Ae(e);
|
|
76
|
+
}, [Ae]), J = l(() => {
|
|
77
|
+
window.matchMedia(D).matches ? q(!B) : W((e) => !e);
|
|
78
|
+
}, [q, B]);
|
|
79
|
+
u(() => {
|
|
80
|
+
let e = window.matchMedia(D);
|
|
81
|
+
G(e.matches);
|
|
73
82
|
function t(e) {
|
|
74
|
-
e.matches && W(!1);
|
|
83
|
+
G(e.matches), e.matches && W(!1);
|
|
75
84
|
}
|
|
76
85
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
77
|
-
}, []),
|
|
86
|
+
}, []), u(() => {
|
|
78
87
|
if (!R) return;
|
|
79
88
|
function e(e) {
|
|
80
|
-
e.defaultPrevented || e.altKey || e.shiftKey || !(e.metaKey || e.ctrlKey) || e.key.toLowerCase() !== "b" ||
|
|
89
|
+
e.defaultPrevented || e.altKey || e.shiftKey || !(e.metaKey || e.ctrlKey) || e.key.toLowerCase() !== "b" || we(e.target) || (e.preventDefault(), J());
|
|
81
90
|
}
|
|
82
91
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
83
|
-
}, [R,
|
|
84
|
-
let
|
|
85
|
-
sidebarOpen:
|
|
86
|
-
setSidebarOpen:
|
|
92
|
+
}, [R, J]);
|
|
93
|
+
let Pe = xe(() => ({
|
|
94
|
+
sidebarOpen: B,
|
|
95
|
+
setSidebarOpen: q,
|
|
87
96
|
menuOpen: U,
|
|
88
97
|
setMenuOpen: W,
|
|
89
98
|
asideOpen: V,
|
|
90
99
|
setAsideOpen: H,
|
|
91
|
-
toggleSidebar:
|
|
100
|
+
toggleSidebar: J
|
|
92
101
|
}), [
|
|
93
102
|
V,
|
|
94
103
|
U,
|
|
95
104
|
H,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
105
|
+
q,
|
|
106
|
+
B,
|
|
107
|
+
J
|
|
99
108
|
]);
|
|
100
|
-
function
|
|
109
|
+
function Fe(e) {
|
|
101
110
|
e.target.closest("nav a[href], nav button") != null && W(!1);
|
|
102
111
|
}
|
|
103
|
-
let
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
let Y = z && Ee === "docked" && je, X = `${K}-aside`, Ie = d(null), Z = d(null);
|
|
113
|
+
u(() => {
|
|
114
|
+
Y && (V ? Z.current = document.activeElement : Z.current = null);
|
|
115
|
+
}, [V, Y]);
|
|
116
|
+
function Le() {
|
|
117
|
+
let e = Z.current, t = Ie.current?.contains(document.activeElement) ?? !1;
|
|
118
|
+
H(!1), t && (e?.isConnected ? e.focus() : document.getElementById(`${K}-main`)?.focus());
|
|
119
|
+
}
|
|
120
|
+
let Re = B ? j.collapse : j.expand, Q = `${K}-main`, ze = N == null ? null : /* @__PURE__ */ h("div", {
|
|
121
|
+
className: se,
|
|
122
|
+
children: N
|
|
123
|
+
}), Be = F == null ? null : /* @__PURE__ */ h("div", {
|
|
124
|
+
className: pe,
|
|
125
|
+
children: F
|
|
126
|
+
}), $ = R ? /* @__PURE__ */ g(i.Provider, { children: [/* @__PURE__ */ g(i, { children: [/* @__PURE__ */ h(i.Trigger, { render: /* @__PURE__ */ h(n, {
|
|
127
|
+
ref: Ne,
|
|
111
128
|
role: "ghost",
|
|
112
129
|
size: "sm",
|
|
113
130
|
title: "",
|
|
114
|
-
icon: /* @__PURE__ */
|
|
115
|
-
"aria-label":
|
|
116
|
-
"aria-expanded":
|
|
117
|
-
"aria-controls":
|
|
131
|
+
icon: /* @__PURE__ */ h(p, { strokeWidth: 2 }),
|
|
132
|
+
"aria-label": Re,
|
|
133
|
+
"aria-expanded": B,
|
|
134
|
+
"aria-controls": K,
|
|
118
135
|
"aria-keyshortcuts": "Control+B Meta+B",
|
|
119
|
-
className:
|
|
120
|
-
onClick: () =>
|
|
121
|
-
}) }), /* @__PURE__ */
|
|
136
|
+
className: ge,
|
|
137
|
+
onClick: () => q(!B)
|
|
138
|
+
}) }), /* @__PURE__ */ h(i.Content, { children: /* @__PURE__ */ g("span", {
|
|
122
139
|
className: "inline-flex items-center gap-2",
|
|
123
140
|
children: [
|
|
124
|
-
|
|
125
|
-
/* @__PURE__ */
|
|
141
|
+
Re,
|
|
142
|
+
/* @__PURE__ */ h(r, {
|
|
126
143
|
size: "sm",
|
|
127
144
|
children: "Ctrl"
|
|
128
145
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ h(r, {
|
|
130
147
|
size: "sm",
|
|
131
148
|
children: "B"
|
|
132
149
|
})
|
|
133
150
|
]
|
|
134
|
-
}) })] }), /* @__PURE__ */
|
|
151
|
+
}) })] }), A === "picker" ? /* @__PURE__ */ h(t, {
|
|
152
|
+
role: "ghost",
|
|
153
|
+
size: "sm",
|
|
154
|
+
icon: /* @__PURE__ */ h(p, { strokeWidth: 2 }),
|
|
155
|
+
endIcon: /* @__PURE__ */ h(Se, { strokeWidth: 2 }),
|
|
156
|
+
"aria-label": `${j.menu}: ${c}`,
|
|
157
|
+
"aria-expanded": U,
|
|
158
|
+
"aria-haspopup": "dialog",
|
|
159
|
+
"aria-keyshortcuts": "Control+B Meta+B",
|
|
160
|
+
className: e(s, "min-w-0 max-w-full"),
|
|
161
|
+
onClick: () => W(!0),
|
|
162
|
+
children: /* @__PURE__ */ h("span", {
|
|
163
|
+
className: "min-w-0 truncate",
|
|
164
|
+
children: c
|
|
165
|
+
})
|
|
166
|
+
}) : A === "label" ? /* @__PURE__ */ h(t, {
|
|
135
167
|
role: "ghost",
|
|
136
168
|
size: "sm",
|
|
137
|
-
icon: /* @__PURE__ */
|
|
138
|
-
"aria-label": M.menu,
|
|
169
|
+
icon: /* @__PURE__ */ h(p, { strokeWidth: 2 }),
|
|
139
170
|
"aria-expanded": U,
|
|
140
171
|
"aria-haspopup": "dialog",
|
|
141
172
|
"aria-keyshortcuts": "Control+B Meta+B",
|
|
142
|
-
className:
|
|
173
|
+
className: e(s, "shrink-0"),
|
|
174
|
+
onClick: () => W(!0),
|
|
175
|
+
children: j.menu
|
|
176
|
+
}) : /* @__PURE__ */ h(n, {
|
|
177
|
+
role: "ghost",
|
|
178
|
+
size: "sm",
|
|
179
|
+
icon: /* @__PURE__ */ h(p, { strokeWidth: 2 }),
|
|
180
|
+
"aria-label": j.menu,
|
|
181
|
+
"aria-expanded": U,
|
|
182
|
+
"aria-haspopup": "dialog",
|
|
183
|
+
"aria-keyshortcuts": "Control+B Meta+B",
|
|
184
|
+
className: s,
|
|
143
185
|
onClick: () => W(!0)
|
|
144
186
|
})] }) : null;
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
value:
|
|
147
|
-
children: /* @__PURE__ */
|
|
148
|
-
className: e(
|
|
187
|
+
return /* @__PURE__ */ h(w.Provider, {
|
|
188
|
+
value: Pe,
|
|
189
|
+
children: /* @__PURE__ */ g("div", {
|
|
190
|
+
className: e(ue, ke),
|
|
149
191
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
href: `#${
|
|
152
|
-
className:
|
|
192
|
+
/* @__PURE__ */ h("a", {
|
|
193
|
+
href: `#${Q}`,
|
|
194
|
+
className: me,
|
|
153
195
|
onClick: (e) => {
|
|
154
|
-
e.preventDefault(), document.getElementById(
|
|
196
|
+
e.preventDefault(), document.getElementById(Q)?.focus();
|
|
155
197
|
},
|
|
156
|
-
children:
|
|
198
|
+
children: j.skipToContent
|
|
157
199
|
}),
|
|
158
|
-
R ? /* @__PURE__ */
|
|
159
|
-
ref:
|
|
160
|
-
id:
|
|
161
|
-
className: e(
|
|
200
|
+
R ? /* @__PURE__ */ g("div", {
|
|
201
|
+
ref: Me,
|
|
202
|
+
id: K,
|
|
203
|
+
className: e(fe, !B && "lg:!hidden"),
|
|
162
204
|
children: [
|
|
163
|
-
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
className:
|
|
166
|
-
children:
|
|
205
|
+
ze,
|
|
206
|
+
/* @__PURE__ */ h("div", {
|
|
207
|
+
className: o,
|
|
208
|
+
children: P
|
|
167
209
|
}),
|
|
168
|
-
|
|
210
|
+
Be
|
|
169
211
|
]
|
|
170
212
|
}) : null,
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
className:
|
|
173
|
-
children: /* @__PURE__ */
|
|
174
|
-
className:
|
|
175
|
-
children: [/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ g("div", {
|
|
214
|
+
className: ce,
|
|
215
|
+
children: [/* @__PURE__ */ g("div", {
|
|
216
|
+
className: he,
|
|
217
|
+
children: [A === "picker" ? /* @__PURE__ */ h(a, {
|
|
218
|
+
variant: "app",
|
|
219
|
+
"aria-label": c,
|
|
220
|
+
start: /* @__PURE__ */ g(m, { children: [$, /* @__PURE__ */ h("h1", {
|
|
221
|
+
className: e(ee.app, "max-lg:sr-only"),
|
|
222
|
+
children: c
|
|
223
|
+
})] }),
|
|
224
|
+
end: I
|
|
225
|
+
}) : /* @__PURE__ */ h(a, {
|
|
176
226
|
variant: "app",
|
|
177
227
|
title: c,
|
|
178
228
|
"aria-label": c,
|
|
179
|
-
start:
|
|
180
|
-
end:
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
-
id:
|
|
229
|
+
start: $,
|
|
230
|
+
end: I
|
|
231
|
+
}), /* @__PURE__ */ h("main", {
|
|
232
|
+
id: Q,
|
|
183
233
|
tabIndex: -1,
|
|
184
|
-
className:
|
|
185
|
-
children:
|
|
234
|
+
className: le,
|
|
235
|
+
children: M.content
|
|
186
236
|
})]
|
|
187
|
-
})
|
|
237
|
+
}), Y && V ? /* @__PURE__ */ h("aside", {
|
|
238
|
+
ref: Ie,
|
|
239
|
+
id: X,
|
|
240
|
+
"aria-labelledby": `${X}-title`,
|
|
241
|
+
className: oe,
|
|
242
|
+
onKeyDown: (e) => {
|
|
243
|
+
e.key === "Escape" && !e.defaultPrevented && (e.preventDefault(), Le());
|
|
244
|
+
},
|
|
245
|
+
children: /* @__PURE__ */ g("div", {
|
|
246
|
+
className: ne,
|
|
247
|
+
children: [/* @__PURE__ */ h(re, {
|
|
248
|
+
titleId: `${X}-title`,
|
|
249
|
+
descriptionId: `${X}-description`,
|
|
250
|
+
title: y ?? M.aside?.title ?? j.aside,
|
|
251
|
+
description: b ?? M.aside?.description,
|
|
252
|
+
closeLabel: "Close panel",
|
|
253
|
+
onClose: Le,
|
|
254
|
+
delineated: !0
|
|
255
|
+
}), /* @__PURE__ */ h("div", {
|
|
256
|
+
className: e(te, "pb-4"),
|
|
257
|
+
children: L
|
|
258
|
+
})]
|
|
259
|
+
})
|
|
260
|
+
}) : null]
|
|
188
261
|
}),
|
|
189
|
-
R ? /* @__PURE__ */
|
|
262
|
+
R ? /* @__PURE__ */ h(ae, {
|
|
190
263
|
open: U,
|
|
191
264
|
onOpenChange: W,
|
|
192
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ h(ae.Content, {
|
|
193
266
|
side: "start",
|
|
194
|
-
title:
|
|
195
|
-
children: /* @__PURE__ */
|
|
196
|
-
className:
|
|
197
|
-
onClick:
|
|
267
|
+
title: j.menu,
|
|
268
|
+
children: /* @__PURE__ */ g("div", {
|
|
269
|
+
className: de,
|
|
270
|
+
onClick: Fe,
|
|
198
271
|
children: [
|
|
199
|
-
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
className:
|
|
202
|
-
children:
|
|
272
|
+
ze,
|
|
273
|
+
/* @__PURE__ */ h("div", {
|
|
274
|
+
className: o,
|
|
275
|
+
children: P
|
|
203
276
|
}),
|
|
204
|
-
|
|
277
|
+
Be
|
|
205
278
|
]
|
|
206
279
|
})
|
|
207
280
|
})
|
|
208
281
|
}) : null,
|
|
209
|
-
|
|
282
|
+
z && !Y ? /* @__PURE__ */ h(ie, {
|
|
210
283
|
open: V,
|
|
211
284
|
onOpenChange: H,
|
|
212
|
-
children: /* @__PURE__ */
|
|
285
|
+
children: /* @__PURE__ */ h(ie.Content, {
|
|
213
286
|
side: "end",
|
|
214
|
-
title:
|
|
215
|
-
description:
|
|
287
|
+
title: y ?? M.aside?.title ?? j.aside,
|
|
288
|
+
description: b ?? M.aside?.description,
|
|
216
289
|
children: L
|
|
217
290
|
})
|
|
218
291
|
}) : null
|
|
@@ -220,12 +293,12 @@ function A({ title: c, brand: l, sidebar: u, sidebarFooter: f, header: v, aside:
|
|
|
220
293
|
})
|
|
221
294
|
});
|
|
222
295
|
}
|
|
223
|
-
var
|
|
224
|
-
Brand:
|
|
225
|
-
Sidebar:
|
|
226
|
-
SidebarFooter:
|
|
227
|
-
Header:
|
|
228
|
-
Aside:
|
|
296
|
+
var k = Object.assign(O, {
|
|
297
|
+
Brand: y,
|
|
298
|
+
Sidebar: b,
|
|
299
|
+
SidebarFooter: x,
|
|
300
|
+
Header: S,
|
|
301
|
+
Aside: C
|
|
229
302
|
});
|
|
230
303
|
//#endregion
|
|
231
|
-
export {
|
|
304
|
+
export { k as AppShell, _ as appShellAsideModes, v as appShellMenuButtons, T as useAppShell };
|
|
@@ -7,8 +7,13 @@ export declare const appShellBrandClasses: string;
|
|
|
7
7
|
export declare const appShellSidebarBodyClasses = "min-h-0 flex-1 overflow-y-auto";
|
|
8
8
|
/** Pinned under the scrolling nav — the same 16px inset as the brand row. */
|
|
9
9
|
export declare const appShellSidebarFooterClasses = "box-border shrink-0 px-4 py-3";
|
|
10
|
-
/** 8px inset around the raised surface. */
|
|
11
|
-
export declare const appShellCanvasClasses = "flex min-h-0 min-w-0 flex-1 p-2";
|
|
10
|
+
/** 8px inset around the raised surface (and a docked aside beside it, 8px apart). */
|
|
11
|
+
export declare const appShellCanvasClasses = "flex min-h-0 min-w-0 flex-1 gap-2 p-2";
|
|
12
|
+
/**
|
|
13
|
+
* `asideMode="docked"` from `lg`: a second raised surface beside the page, which narrows to make room,
|
|
14
|
+
* so the page stays visible and usable while the aside is open (live controls, a font panel).
|
|
15
|
+
*/
|
|
16
|
+
export declare const appShellAsideDockedClasses: string;
|
|
12
17
|
/** Raised surface — the Card shell radius and the soft card shadow. */
|
|
13
18
|
export declare const appShellSurfaceClasses: string;
|
|
14
19
|
/** First tab stop: hidden until focused, then pinned over the top-start corner. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appShellStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/AppShell/appShellStyles.ts"],"names":[],"mappings":"AAIA,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,yDAAyD,CAAC;AAE1F,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,mEAAmE,CAAC;AAEvG,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,QAGhC,CAAC;AAEF,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E,6EAA6E;AAC7E,eAAO,MAAM,4BAA4B,kCAAkC,CAAC;AAE5E,
|
|
1
|
+
{"version":3,"file":"appShellStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/AppShell/appShellStyles.ts"],"names":[],"mappings":"AAIA,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,yDAAyD,CAAC;AAE1F,sFAAsF;AACtF,eAAO,MAAM,sBAAsB,mEAAmE,CAAC;AAEvG,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,QAGhC,CAAC;AAEF,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E,6EAA6E;AAC7E,eAAO,MAAM,4BAA4B,kCAAkC,CAAC;AAE5E,qFAAqF;AACrF,eAAO,MAAM,qBAAqB,0CAA0C,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,QAGtC,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,QAGlC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,uBAAuB,QAGqB,CAAC;AAE1D,eAAO,MAAM,mBAAmB,2FAC0D,CAAC;AAE3F,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D,eAAO,MAAM,2BAA2B,eAAe,CAAC;AAExD,eAAO,MAAM,wBAAwB,iCAAiC,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { cn as e } from "../../../lib/cn.js";
|
|
|
3
3
|
import { cardLayoutShellShapeClasses as t } from "../../molecules/Card/cardStyles.js";
|
|
4
4
|
import { pageHeaderAppBandHeightClasses as n } from "../../molecules/PageHeader/pageHeaderStyles.js";
|
|
5
5
|
//#region src/components/organisms/AppShell/appShellStyles.ts
|
|
6
|
-
var r = "flex h-full min-h-0 w-full bg-body font-sans text-fg", i = "flex h-full min-h-0 w-60 shrink-0 flex-col pt-2 max-lg:!hidden", a = e("box-border flex shrink-0 items-center gap-2 px-4", n), o = "min-h-0 flex-1 overflow-y-auto", s = "box-border shrink-0 px-4 py-3", c = "flex min-h-0 min-w-0 flex-1 p-2", l = e("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-surface shadow-soft-card", t.rounded),
|
|
6
|
+
var r = "flex h-full min-h-0 w-full bg-body font-sans text-fg", i = "flex h-full min-h-0 w-60 shrink-0 flex-col pt-2 max-lg:!hidden", a = e("box-border flex shrink-0 items-center gap-2 px-4", n), o = "min-h-0 flex-1 overflow-y-auto", s = "box-border shrink-0 px-4 py-3", c = "flex min-h-0 min-w-0 flex-1 gap-2 p-2", l = e("flex min-h-0 w-80 shrink-0 flex-col overflow-hidden bg-surface shadow-soft-card", t.rounded), u = e("flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-surface shadow-soft-card", t.rounded), d = "sr-only focus:not-sr-only focus:fixed focus:start-4 focus:top-4 focus:z-50 focus:rounded-[var(--radius-control)] focus:bg-body focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-fg focus:outline-none focus:ring-2 focus:ring-focus-ring", f = "min-h-0 flex-1 overflow-y-auto px-[var(--grid-margin)] py-6 focus-visible:outline-none", p = "max-lg:!hidden", m = "lg:!hidden", h = "flex h-full min-h-0 flex-col";
|
|
7
7
|
//#endregion
|
|
8
|
-
export { a as appShellBrandClasses, c as appShellCanvasClasses,
|
|
8
|
+
export { l as appShellAsideDockedClasses, a as appShellBrandClasses, c as appShellCanvasClasses, f as appShellMainClasses, r as appShellRootClasses, h as appShellSheetBodyClasses, o as appShellSidebarBodyClasses, i as appShellSidebarClasses, s as appShellSidebarFooterClasses, d as appShellSkipLinkClasses, u as appShellSurfaceClasses, p as appShellToggleDesktopClasses, m as appShellToggleMobileClasses };
|