@abyss-project/commons-front-core 8.1.0 → 8.2.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 +125 -93
- package/catalog/captures-plan.ts +5 -1
- package/catalog/catalog-entries.ts +4 -0
- package/catalog/pages/AccountMenu.tsx +62 -0
- package/catalog/pages/NotificationsMenu.tsx +116 -0
- package/catalog/pages/index.ts +4 -0
- package/catalog/specs/captures.spec.ts +7 -0
- package/catalog/specs/write-capture-index.ts +1 -0
- package/dist/{AbyssCookieConsentProvider-BhSzVu8P.js → AbyssCookieConsentProvider-TE46ywnd.js} +554 -514
- package/dist/{CookieConsentSettings.component-DMEAuCVS.js → CookieConsentSettings.component-BKsYgpMa.js} +1 -1
- package/dist/components/layers/CommandPalette/CommandPalette.d.ts +27 -6
- package/dist/components/layers/CommandPalette/command-registry.d.ts +39 -9
- package/dist/components/layers/Modal/Modal.d.ts +2 -1
- package/dist/components/states/PageState/PageState.d.ts +6 -1
- package/dist/components/structure/AccountMenu/AccountMenu.d.ts +27 -0
- package/dist/components/structure/AccountMenu/AccountMenu.spec.d.ts +1 -0
- package/dist/components/structure/AppShell/AppShell.d.ts +9 -3
- package/dist/components/structure/AppShell/ShellNavigation.d.ts +4 -2
- package/dist/components/structure/AppShell/app-shell.types.d.ts +38 -2
- package/dist/components/structure/NotificationsMenu/NotificationsMenu.d.ts +36 -0
- package/dist/components/structure/NotificationsMenu/NotificationsMenu.spec.d.ts +1 -0
- package/dist/components/structure/PageHeader/PageHeader.d.ts +2 -2
- package/dist/components/structure/index.d.ts +2 -0
- package/dist/components/structure/test-support/structure-test-harness.d.ts +6 -0
- package/dist/cookie-consent.js +2 -2
- package/dist/{design-theme-CvLzOz3p.js → design-theme-CN_6fRX3.js} +2317 -2278
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-rich-intl.hook.d.ts +40 -0
- package/dist/hooks/use-scroll-overflow-cue.hook.d.ts +9 -0
- package/dist/hooks/use-scroll-overflow-cue.hook.spec.d.ts +1 -0
- package/dist/{index-GoHiFeaw.js → index-4BMCQ_6u.js} +2 -2
- package/dist/{index-BkfBpYKR.js → index-B-Gq5Zeh.js} +3 -3
- package/dist/{index-BqIg55B3.js → index-BI8z_ZwK.js} +4 -4
- package/dist/{index-DixNft1u.js → index-BR66kEMM.js} +2 -2
- package/dist/{index-D_GWBYM2.js → index-BXs_bBcm.js} +1 -1
- package/dist/{index-6KdfKdSJ.js → index-BZfgg1Dp.js} +2 -2
- package/dist/{index-21vSFz6u.js → index-Bi3OW3pz.js} +2 -2
- package/dist/{index-D4Qh2Iww.js → index-Bu5LDz63.js} +3 -3
- package/dist/{index-ClLoBnCN.js → index-C-bs2P06.js} +2 -2
- package/dist/{index-Btnmn1iK.js → index-C4VmhCn7.js} +4 -4
- package/dist/{index-ASLTmD1Y.js → index-C6ZLgLu-.js} +2 -2
- package/dist/{index-BVS73U9E.js → index-CK9kVK6Y.js} +4 -4
- package/dist/{index-BTjzj7mm.js → index-D490I-Im.js} +2 -2
- package/dist/{index-7HAvRXgu.js → index-DC-vg2P2.js} +2 -2
- package/dist/{index-bR-mnNUA.js → index-DPxFwYmx.js} +2 -2
- package/dist/{index-D5e4uD4k.js → index-Dhz388yW.js} +2 -2
- package/dist/{index-C92C_oG5.js → index-DistZiPf.js} +2 -2
- package/dist/{index-LdiTmDFg.js → index-DjLWvtUt.js} +2 -2
- package/dist/{index-BtsnuEJC.js → index-Dm6584pR.js} +14734 -14782
- package/dist/{index-CHGRiRCe.js → index-FS21eF3a.js} +3 -3
- package/dist/{index-Ni4BmFs4.js → index-csvcp4rP.js} +2 -2
- package/dist/{index-l7FAjaVB.js → index-ltq6POQa.js} +3 -3
- package/dist/index.js +5579 -4478
- package/dist/legacy/theme/core-breakpoints-under-legacy-theme.spec.d.ts +1 -0
- package/dist/legacy.js +18 -18
- package/dist/theme/DesignCssVariables.d.ts +11 -0
- package/dist/theme/DesignCssVariables.spec.d.ts +1 -0
- package/dist/theme/components/shared.d.ts +4 -1
- package/dist/theme/css-variables.d.ts +7 -0
- package/dist/theme/design-media.d.ts +26 -0
- package/dist/theme/design-media.spec.d.ts +1 -0
- package/dist/theme/focus-ring.spec.d.ts +1 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/use-design-breakpoint.d.ts +7 -0
- package/dist/translations/en.d.ts +20 -0
- package/dist/translations/fr.d.ts +20 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
2
|
import { useState as m, useEffect as C } from "react";
|
|
3
3
|
import { Card as v, CardContent as b, Stack as u, Typography as o, FormControlLabel as l, Box as r, Checkbox as d, Button as M } from "@mui/material";
|
|
4
|
-
import { g as R, u as x } from "./AbyssCookieConsentProvider-
|
|
4
|
+
import { g as R, u as x } from "./AbyssCookieConsentProvider-TE46ywnd.js";
|
|
5
5
|
const B = () => {
|
|
6
6
|
const t = R(), { consent: i, save: y } = x(), [h, g] = m((i == null ? void 0 : i.analytics) ?? !1), [k, f] = m((i == null ? void 0 : i.marketing) ?? !1), c = i == null ? void 0 : i.analytics, n = i == null ? void 0 : i.marketing;
|
|
7
7
|
return C(() => {
|
|
@@ -1,28 +1,49 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Command } from './command-registry';
|
|
3
|
-
export type { Command } from './command-registry';
|
|
2
|
+
import { Command, CommandSource } from './command-registry';
|
|
3
|
+
export type { Command, CommandSource } from './command-registry';
|
|
4
|
+
/** Delay between the last keystroke and the call of the command sources. */
|
|
5
|
+
export declare const COMMAND_SOURCE_DEBOUNCE_MS = 200;
|
|
6
|
+
export interface CommandPaletteOpenOptions {
|
|
7
|
+
/** Lists only the commands of this group; the filter shows as a chip the user can remove. */
|
|
8
|
+
group?: string;
|
|
9
|
+
}
|
|
4
10
|
export interface CommandPaletteApi {
|
|
5
|
-
/**
|
|
6
|
-
|
|
11
|
+
/** Whether the palette is open: a host fetches the lists it registers only while it is. */
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
/** Opens the palette, as `Ctrl+K` / `Cmd+K` does, filtered on `options.group` when given. */
|
|
14
|
+
open(options?: CommandPaletteOpenOptions): void;
|
|
7
15
|
/**
|
|
8
16
|
* Runs the registered command `id` (closing the palette first if it is open) and returns `true`;
|
|
9
17
|
* returns `false` when no mounted component registers that command.
|
|
10
18
|
*/
|
|
11
19
|
execute(id: string): boolean;
|
|
12
20
|
}
|
|
21
|
+
export interface CommandPaletteRecents {
|
|
22
|
+
/** `localStorage` key the identifiers of the last executed commands are kept under. */
|
|
23
|
+
storageKey: string;
|
|
24
|
+
/** Number of recent commands kept and listed; 5 by default. */
|
|
25
|
+
max?: number;
|
|
26
|
+
}
|
|
13
27
|
export interface CommandPaletteProviderProps {
|
|
14
28
|
children: ReactNode;
|
|
29
|
+
/** Lists the last executed commands first, under « Récents », while the search is empty. */
|
|
30
|
+
recents?: CommandPaletteRecents;
|
|
15
31
|
}
|
|
16
32
|
/**
|
|
17
33
|
* Holds the commands the mounted screens register and the palette that lists them. `Ctrl+K` /
|
|
18
34
|
* `Cmd+K` opens it anywhere in the page; `useCommandPalette().execute(id)` runs a command by its
|
|
19
35
|
* identifier, for the voice and MCP clients.
|
|
20
36
|
*/
|
|
21
|
-
export declare function CommandPaletteProvider({ children, }: CommandPaletteProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function CommandPaletteProvider({ children, recents, }: CommandPaletteProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
22
38
|
/**
|
|
23
39
|
* Registers `commands` while the calling component is mounted. Pass a memoized array: a new array
|
|
24
40
|
* replaces the previous one at each render.
|
|
25
41
|
*/
|
|
26
42
|
export declare const useRegisterCommands: (commands: Command[]) => void;
|
|
27
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* Registers `source` while the calling component is mounted. Memoize `search`: a new function is a
|
|
45
|
+
* new source, which drops its answers and searches again.
|
|
46
|
+
*/
|
|
47
|
+
export declare const useRegisterCommandSource: (source: CommandSource) => void;
|
|
48
|
+
/** Opens the palette, tells whether it is open and runs commands by identifier. */
|
|
28
49
|
export declare const useCommandPalette: () => CommandPaletteApi;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
/** An action of the application, reachable from the palette and by its identifier. */
|
|
2
3
|
export interface Command {
|
|
3
4
|
/** Stable identifier: the address the voice and MCP clients use to run the action. */
|
|
@@ -5,6 +6,10 @@ export interface Command {
|
|
|
5
6
|
label: string;
|
|
6
7
|
/** Heading the command is listed under in the palette. */
|
|
7
8
|
group: string;
|
|
9
|
+
/** Context shown muted under the label, on one line; searched like the label. */
|
|
10
|
+
subtitle?: string;
|
|
11
|
+
/** Decorative mark shown before the label. */
|
|
12
|
+
icon?: ReactNode;
|
|
8
13
|
/** Extra words the search matches, such as synonyms. */
|
|
9
14
|
keywords?: string[];
|
|
10
15
|
/** Shortcut hint shown next to the command; the palette binds no key for it. */
|
|
@@ -12,19 +17,36 @@ export interface Command {
|
|
|
12
17
|
run(): void;
|
|
13
18
|
}
|
|
14
19
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
20
|
+
* Commands found by a search the palette cannot run itself, such as a server-side search. The
|
|
21
|
+
* palette calls `search` while it is open, once the query is long enough, and lists the results
|
|
22
|
+
* under `group`.
|
|
18
23
|
*/
|
|
19
|
-
export
|
|
24
|
+
export interface CommandSource {
|
|
25
|
+
/** Stable identifier of the source. */
|
|
26
|
+
id: string;
|
|
27
|
+
/** Heading the results are listed under; a group filter matches it. */
|
|
28
|
+
group: string;
|
|
29
|
+
/** Resolves the commands matching `query`; `signal` aborts when the query changes or the palette closes. */
|
|
30
|
+
search(query: string, signal: AbortSignal): Promise<Command[]>;
|
|
31
|
+
/** Number of characters of the trimmed query below which the source is not called; 1 by default. */
|
|
32
|
+
minQueryLength?: number;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The items every mounted registration contributes, as an external store. A registration is
|
|
36
|
+
* replaced in place when its items change, so the listing order stays the mount order; when two
|
|
37
|
+
* registrations share an identifier, the most recent item wins.
|
|
38
|
+
*/
|
|
39
|
+
export declare class KeyedRegistry<Item extends {
|
|
40
|
+
id: string;
|
|
41
|
+
}> {
|
|
20
42
|
private readonly registrations;
|
|
21
43
|
private readonly listeners;
|
|
22
44
|
private snapshot;
|
|
23
|
-
register(key: symbol,
|
|
45
|
+
register(key: symbol, items: Item[]): void;
|
|
24
46
|
unregister(key: symbol): void;
|
|
25
|
-
find(id: string):
|
|
47
|
+
find(id: string): Item | undefined;
|
|
26
48
|
readonly subscribe: (listener: () => void) => (() => void);
|
|
27
|
-
readonly getSnapshot: () =>
|
|
49
|
+
readonly getSnapshot: () => Item[];
|
|
28
50
|
private refresh;
|
|
29
51
|
}
|
|
30
52
|
export interface CommandGroup {
|
|
@@ -32,7 +54,15 @@ export interface CommandGroup {
|
|
|
32
54
|
commands: Command[];
|
|
33
55
|
}
|
|
34
56
|
/**
|
|
35
|
-
* The commands whose label, group or keywords contain every word of `query` (case and
|
|
36
|
-
* ignored), grouped in the order their group first appears.
|
|
57
|
+
* The commands whose label, subtitle, group or keywords contain every word of `query` (case and
|
|
58
|
+
* accents ignored), grouped in the order their group first appears.
|
|
37
59
|
*/
|
|
38
60
|
export declare const searchCommands: (commands: Command[], query: string) => CommandGroup[];
|
|
61
|
+
/** Number of recent commands kept when the host sets no maximum. */
|
|
62
|
+
export declare const DEFAULT_RECENTS_MAX = 5;
|
|
63
|
+
/** The identifiers stored under `storageKey`, most recent first; none when storage is unreadable. */
|
|
64
|
+
export declare const readRecents: (storageKey: string) => string[];
|
|
65
|
+
/** Stores `ids` under `storageKey`; when storage refuses, the recents live for the page only. */
|
|
66
|
+
export declare const writeRecents: (storageKey: string, ids: string[]) => void;
|
|
67
|
+
/** `ids` with `id` moved to the front, at most `max` long. */
|
|
68
|
+
export declare const pushRecent: (ids: string[], id: string, max: number) => string[];
|
|
@@ -18,6 +18,7 @@ export interface ModalProps {
|
|
|
18
18
|
/**
|
|
19
19
|
* A modal dialog (`.modal`): header with title, description and close button, scrolling body,
|
|
20
20
|
* footer of actions. Focus is trapped inside and returns to the opener on close; Escape and the
|
|
21
|
-
* scrim close it. Below the
|
|
21
|
+
* scrim close it. Below 768 px (the design system's tablet tier, whatever the theme) it is presented
|
|
22
|
+
* as a `BottomSheet`.
|
|
22
23
|
*/
|
|
23
24
|
export declare function Modal({ open, onClose, title, description, size, actions, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -17,12 +17,17 @@ export interface PageStateError {
|
|
|
17
17
|
message?: string;
|
|
18
18
|
onRetry(): void;
|
|
19
19
|
}
|
|
20
|
+
export interface PageStateForbidden {
|
|
21
|
+
/** Replaces the generic description (who to ask); the title stays « Accès refusé ». */
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
20
24
|
export interface PageStateProps {
|
|
21
25
|
status: PageStatus;
|
|
22
26
|
/** Placeholder built by the page from the same layout as the ready content. */
|
|
23
27
|
skeleton: ReactNode;
|
|
24
28
|
empty?: PageStateEmpty;
|
|
25
29
|
error?: PageStateError;
|
|
30
|
+
forbidden?: PageStateForbidden;
|
|
26
31
|
/** The ready content. */
|
|
27
32
|
children: ReactNode;
|
|
28
33
|
}
|
|
@@ -30,4 +35,4 @@ export interface PageStateProps {
|
|
|
30
35
|
* The content slot of a page in each of its states. The page frame (header, toolbar) stays around
|
|
31
36
|
* it: only the slot changes, so an empty or failed page keeps its header and actions.
|
|
32
37
|
*/
|
|
33
|
-
export declare function PageState({ status, skeleton, empty, error, children, }: PageStateProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
38
|
+
export declare function PageState({ status, skeleton, empty, error, forbidden, children, }: PageStateProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ThemeMode } from '../../../theme/tokens/primitives';
|
|
3
|
+
export interface AccountMenuUser {
|
|
4
|
+
name: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
avatarUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AccountMenuItem {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** A route followed by the host router, or an absolute URL. */
|
|
13
|
+
href?: string;
|
|
14
|
+
onClick?(): void;
|
|
15
|
+
}
|
|
16
|
+
export interface AccountMenuProps {
|
|
17
|
+
user: AccountMenuUser;
|
|
18
|
+
themeMode: ThemeMode;
|
|
19
|
+
onThemeModeChange(mode: ThemeMode): void;
|
|
20
|
+
items: AccountMenuItem[];
|
|
21
|
+
onLogout(): void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The account entry of the top bar: the viewer's avatar opens a menu with their name and email,
|
|
25
|
+
* the host's entries (account, settings, billing…), the dark theme switch and the logout.
|
|
26
|
+
*/
|
|
27
|
+
export declare function AccountMenu({ user, themeMode, onThemeModeChange, items, onLogout, }: AccountMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,7 +5,13 @@ import { AppShellProps } from './app-shell.types';
|
|
|
5
5
|
* navigation sections with their counts, an optional footer, a top bar and the page. There is no
|
|
6
6
|
* application switcher: each service keeps its own front.
|
|
7
7
|
*
|
|
8
|
-
* From
|
|
9
|
-
* tooltips; below
|
|
8
|
+
* From 1200 px up the sidebar is 256 px wide; from 768 to 1199 px it becomes an icon rail with
|
|
9
|
+
* tooltips; below 768 px a top bar opens it in a drawer. The widths are the design system's tiers,
|
|
10
|
+
* never the theme's MUI breakpoints: the legacy theme's `md` is 900 px.
|
|
11
|
+
*
|
|
12
|
+
* With `chromeless` there is no sidebar, rail, drawer or top bar: the page fills the window.
|
|
13
|
+
*
|
|
14
|
+
* Every form renders `children` at the same place of one tree (root, column, `main`): switching
|
|
15
|
+
* form or `chromeless` never remounts the page.
|
|
10
16
|
*/
|
|
11
|
-
export declare function AppShell({ product, space, nav, activeItemId, mainSpaceLink, topbar, footer, children, }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function AppShell({ product, space, nav, activeItemId, mainSpaceLink, topbar, footer, chromeless, children, }: AppShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,9 +19,11 @@ export declare function ShellNavigation({ nav, activeItemId, form, onNavigate, }
|
|
|
19
19
|
}): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
/**
|
|
21
21
|
* The footer entries of the navigation (plan, family, account): labelled rows, or an icon with a
|
|
22
|
-
* tooltip in the rail, like the navigation entries. They lead
|
|
22
|
+
* tooltip in the rail, like the navigation entries. They lead to the main front as plain links,
|
|
23
|
+
* unless `internal`: a route of this app, followed by the host router.
|
|
23
24
|
*/
|
|
24
|
-
export declare function ShellFooterLinks({ items, form, }: {
|
|
25
|
+
export declare function ShellFooterLinks({ items, form, onNavigate, }: {
|
|
25
26
|
items: AppShellFooterItem[];
|
|
26
27
|
form: NavigationForm;
|
|
28
|
+
onNavigate?(): void;
|
|
27
29
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,20 +10,46 @@ export interface Space {
|
|
|
10
10
|
kind: SpaceKind;
|
|
11
11
|
avatarUrl?: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* A secondary action on a navigation row, such as "new board" next to "Boards", or on a section,
|
|
15
|
+
* such as "manage pins" next to "Épinglés".
|
|
16
|
+
*/
|
|
17
|
+
export interface NavItemAction {
|
|
18
|
+
/** Accessible name of the icon button. */
|
|
19
|
+
label: string;
|
|
20
|
+
icon: ReactNode;
|
|
21
|
+
onClick(): void;
|
|
22
|
+
}
|
|
13
23
|
export interface NavItem {
|
|
14
24
|
id: string;
|
|
15
25
|
label: string;
|
|
16
26
|
icon: ReactNode;
|
|
17
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Route inside the app, followed by the host router; with `external`, an absolute URL opened in
|
|
29
|
+
* a new tab.
|
|
30
|
+
*/
|
|
18
31
|
href: string;
|
|
19
32
|
count?: number;
|
|
20
33
|
/** The count needs action: shown as a red pill (a red dot in the rail). */
|
|
21
34
|
urgent?: boolean;
|
|
35
|
+
/** A plain link opened in a new tab, its accessible name saying so. */
|
|
36
|
+
external?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* An icon button at the end of the row: shown on hover or focus in the sidebar, always in the
|
|
39
|
+
* drawer, absent from the rail.
|
|
40
|
+
*/
|
|
41
|
+
action?: NavItemAction;
|
|
22
42
|
}
|
|
23
43
|
export interface NavSection {
|
|
24
44
|
id: string;
|
|
25
45
|
title?: string;
|
|
46
|
+
/** May be empty when the section carries an `action`: the section then shows only its action. */
|
|
26
47
|
items: NavItem[];
|
|
48
|
+
/**
|
|
49
|
+
* An icon button at the right of the section title in the sidebar and the drawer; in the rail,
|
|
50
|
+
* where titles are hidden, a single icon button with a tooltip at the head of the section.
|
|
51
|
+
*/
|
|
52
|
+
action?: NavItemAction;
|
|
27
53
|
}
|
|
28
54
|
export interface AppShellProduct {
|
|
29
55
|
kind: ToolKind;
|
|
@@ -47,8 +73,13 @@ export interface AppShellFooterItem {
|
|
|
47
73
|
label: string;
|
|
48
74
|
/** Icon or avatar, sized by the shell; alone in the rail, with `label` as its tooltip. */
|
|
49
75
|
icon: ReactNode;
|
|
50
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Absolute URL of the main front, followed as a plain link; with `internal`, a route inside the
|
|
78
|
+
* app, followed by the host router like `NavItem.href`.
|
|
79
|
+
*/
|
|
51
80
|
href: string;
|
|
81
|
+
/** The entry is a route of this app (the main front's own account pages). */
|
|
82
|
+
internal?: boolean;
|
|
52
83
|
}
|
|
53
84
|
export interface AppShellProps {
|
|
54
85
|
product: AppShellProduct;
|
|
@@ -60,6 +91,11 @@ export interface AppShellProps {
|
|
|
60
91
|
topbar?: ReactNode;
|
|
61
92
|
/** Bottom of the navigation (plan, family, account), under a hairline. */
|
|
62
93
|
footer?: AppShellFooterItem[];
|
|
94
|
+
/**
|
|
95
|
+
* Full-screen mode (editors): no sidebar, rail, drawer or top bar, the page fills the window.
|
|
96
|
+
* An open mobile drawer closes.
|
|
97
|
+
*/
|
|
98
|
+
chromeless?: boolean;
|
|
63
99
|
children: ReactNode;
|
|
64
100
|
}
|
|
65
101
|
/** The three forms of the shell: full sidebar (≥ `lg`), icon rail (`md`–`lg`), drawer (< `md`). */
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface NotificationItem {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
body?: string;
|
|
6
|
+
createdAt: string | Date;
|
|
7
|
+
read: boolean;
|
|
8
|
+
/** Icon or avatar, sized by the menu (24 px). */
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
/** Where the notification leads: a route followed by the host router, or an absolute URL. */
|
|
11
|
+
href?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface NotificationsMenuProps {
|
|
14
|
+
items: NotificationItem[];
|
|
15
|
+
unreadCount: number;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
/** Called each time the panel opens, for the host to refresh the list. */
|
|
18
|
+
onOpen?(): void;
|
|
19
|
+
/** Called when a notification is chosen; the host marks it read. */
|
|
20
|
+
onItemClick(id: string): void;
|
|
21
|
+
onMarkAllRead(): void;
|
|
22
|
+
/** State of the sound toggle, shown when `onToggleSound` is given. */
|
|
23
|
+
soundEnabled?: boolean;
|
|
24
|
+
onToggleSound?(): void;
|
|
25
|
+
/** Route of the notification preferences page: a settings link in the panel header. */
|
|
26
|
+
preferencesHref?: string;
|
|
27
|
+
/** Buttons at the end of a notification row (accept an invitation, dismiss…). */
|
|
28
|
+
renderItemActions?(item: NotificationItem): ReactNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The notifications of the top bar: a bell with the unread count, which opens a panel (a popover
|
|
32
|
+
* from `md` up, a bottom sheet below) listing the notifications, with "mark all read", the sound
|
|
33
|
+
* toggle and the preferences link. The host owns the data: it loads the list in `onOpen`, marks a
|
|
34
|
+
* notification read in `onItemClick` and all of them in `onMarkAllRead`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function NotificationsMenu({ items, unreadCount, loading, onOpen, onItemClick, onMarkAllRead, soundEnabled, onToggleSound, preferencesHref, renderItemActions, }: NotificationsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,7 +14,7 @@ export interface PageHeaderProps {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* The header of a page (mock-up `.ph`): breadcrumbs, optional icon, the page title (`h1`, the one
|
|
17
|
-
* title size of the ecosystem), a subtitle line and the page actions.
|
|
18
|
-
*
|
|
17
|
+
* title size of the ecosystem), a subtitle line and the page actions. The actions go under the
|
|
18
|
+
* title below `md`, and from `md` up whenever they do not fit beside it.
|
|
19
19
|
*/
|
|
20
20
|
export declare function PageHeader({ title, subtitle, breadcrumbs, icon, actions, }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './AppShell/AppShell';
|
|
2
2
|
export * from './AppShell/app-shell.types';
|
|
3
|
+
export * from './NotificationsMenu/NotificationsMenu';
|
|
4
|
+
export * from './AccountMenu/AccountMenu';
|
|
3
5
|
export * from './PageHeader/PageHeader';
|
|
4
6
|
export * from './Section/Section';
|
|
5
7
|
export * from './Surface/Surface';
|
|
@@ -51,3 +51,9 @@ export declare const stateRules: (element: HTMLElement, state: "focus" | "hover"
|
|
|
51
51
|
export declare const focusRingColor: (element: HTMLElement) => string | undefined;
|
|
52
52
|
/** The outline color `element` draws now (a state class such as `Mui-focused` already set). */
|
|
53
53
|
export declare const currentOutlineColor: (element: HTMLElement) => string;
|
|
54
|
+
/**
|
|
55
|
+
* The value of `property` on `element` at a viewport of `width` pixels: the last declaration of
|
|
56
|
+
* the style rules that match the element, media rules included when their width query matches
|
|
57
|
+
* `width` (jsdom evaluates no media query, so `getComputedStyle` sees none of them).
|
|
58
|
+
*/
|
|
59
|
+
export declare const styleAt: (element: HTMLElement, width: number, property: string) => string;
|
package/dist/cookie-consent.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as e, c as a, C as n, D as C, R as i, V as t, d as r, f as A, r as k, e as c, u as l, b, a as f, w as u } from "./AbyssCookieConsentProvider-
|
|
2
|
-
import { C as E } from "./CookieConsentSettings.component-
|
|
1
|
+
import { A as e, c as a, C as n, D as C, R as i, V as t, d as r, f as A, r as k, e as c, u as l, b, a as f, w as u } from "./AbyssCookieConsentProvider-TE46ywnd.js";
|
|
2
|
+
import { C as E } from "./CookieConsentSettings.component-BKsYgpMa.js";
|
|
3
3
|
export {
|
|
4
4
|
e as AbyssCookieConsentProvider,
|
|
5
5
|
a as COOKIE_NAME,
|