@aeolus-fleet/ui 0.0.0-stage → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +10 -2
  3. package/dist/atoms/avatar.d.ts +16 -0
  4. package/dist/atoms/avatar.js +44 -0
  5. package/dist/atoms/avatar.js.map +1 -0
  6. package/dist/atoms/button.d.ts +22 -0
  7. package/dist/atoms/button.js +48 -0
  8. package/dist/atoms/button.js.map +1 -0
  9. package/dist/atoms/dialog-surface.d.ts +19 -0
  10. package/dist/atoms/dialog-surface.js +32 -0
  11. package/dist/atoms/dialog-surface.js.map +1 -0
  12. package/dist/atoms/dialog.d.ts +19 -0
  13. package/dist/atoms/dialog.js +37 -0
  14. package/dist/atoms/dialog.js.map +1 -0
  15. package/dist/atoms/dropdown-menu.d.ts +21 -0
  16. package/dist/atoms/dropdown-menu.js +42 -0
  17. package/dist/atoms/dropdown-menu.js.map +1 -0
  18. package/dist/atoms/kbd.d.ts +7 -0
  19. package/dist/atoms/kbd.js +11 -0
  20. package/dist/atoms/kbd.js.map +1 -0
  21. package/dist/atoms/sheet.d.ts +23 -0
  22. package/dist/atoms/sheet.js +52 -0
  23. package/dist/atoms/sheet.js.map +1 -0
  24. package/dist/atoms/tooltip.d.ts +10 -0
  25. package/dist/atoms/tooltip.js +24 -0
  26. package/dist/atoms/tooltip.js.map +1 -0
  27. package/dist/class-names.d.ts +3 -0
  28. package/dist/class-names.js +29 -0
  29. package/dist/class-names.js.map +1 -0
  30. package/dist/index.d.ts +23 -0
  31. package/dist/index.js +24 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/molecules/app-switcher.d.ts +20 -0
  34. package/dist/molecules/app-switcher.js +57 -0
  35. package/dist/molecules/app-switcher.js.map +1 -0
  36. package/dist/molecules/avatar-entry.d.ts +21 -0
  37. package/dist/molecules/avatar-entry.js +6 -0
  38. package/dist/molecules/avatar-entry.js.map +1 -0
  39. package/dist/molecules/avatar-menu.d.ts +43 -0
  40. package/dist/molecules/avatar-menu.js +111 -0
  41. package/dist/molecules/avatar-menu.js.map +1 -0
  42. package/dist/molecules/signed-in-as.d.ts +4 -0
  43. package/dist/molecules/signed-in-as.js +6 -0
  44. package/dist/molecules/signed-in-as.js.map +1 -0
  45. package/dist/organisms/app-header.d.ts +27 -0
  46. package/dist/organisms/app-header.js +18 -0
  47. package/dist/organisms/app-header.js.map +1 -0
  48. package/dist/organisms/command-palette.d.ts +44 -0
  49. package/dist/organisms/command-palette.js +77 -0
  50. package/dist/organisms/command-palette.js.map +1 -0
  51. package/dist/organisms/sign-in-background.d.ts +10 -0
  52. package/dist/organisms/sign-in-background.js +48 -0
  53. package/dist/organisms/sign-in-background.js.map +1 -0
  54. package/dist/organisms/sign-in-backgrounds.d.ts +40 -0
  55. package/dist/organisms/sign-in-backgrounds.js +135 -0
  56. package/dist/organisms/sign-in-backgrounds.js.map +1 -0
  57. package/dist/theme.css +168 -0
  58. package/dist/tokens.css +154 -0
  59. package/package.json +57 -4
@@ -0,0 +1,52 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Dialog as SheetPrimitive } from '@base-ui/react/dialog';
4
+ import { cva } from 'class-variance-authority';
5
+ import { XIcon } from 'lucide-react';
6
+ import { classNames } from '../class-names.js';
7
+ import { Button } from './button.js';
8
+ /**
9
+ * shadcn Sheet on Base UI Dialog (docs/design/png/Sheet.png). Right: the
10
+ * desktop side sheet, 560 px, header with title, context and close, scrolling
11
+ * body, footer. Bottom: the phone sheet for menus, filters and confirms, with a
12
+ * handle, --radius-2xl top corners and full-width 44 px actions, Cancel last.
13
+ * Under reduced motion it fades instead of sliding.
14
+ */
15
+ const sheetPopup = cva('fixed z-50 flex flex-col bg-popover text-body text-popover-foreground shadow-lg outline-none duration-(--duration-slow) ease-(--ease-standard) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0', {
16
+ variants: {
17
+ side: {
18
+ right: 'inset-y-0 right-0 h-full w-full border-l border-border sm:max-w-(--size-sheet) motion-safe:data-open:slide-in-from-right motion-safe:data-closed:slide-out-to-right',
19
+ bottom: 'inset-x-0 bottom-0 max-h-[90dvh] rounded-t-2xl border-t border-border px-4 pt-2 pb-[max(calc(var(--spacing)*4),env(safe-area-inset-bottom))] motion-safe:data-open:slide-in-from-bottom motion-safe:data-closed:slide-out-to-bottom',
20
+ },
21
+ },
22
+ defaultVariants: { side: 'right' },
23
+ });
24
+ function Sheet(props) {
25
+ return _jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
26
+ }
27
+ function SheetTrigger(props) {
28
+ return _jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
29
+ }
30
+ function SheetClose(props) {
31
+ return _jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
32
+ }
33
+ function SheetContent({ className, children, side = 'right', ...props }) {
34
+ return (_jsxs(SheetPrimitive.Portal, { children: [_jsx(SheetPrimitive.Backdrop, { "data-slot": "sheet-overlay", className: "fixed inset-0 z-50 bg-overlay duration-(--duration-slow) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0" }), _jsxs(SheetPrimitive.Popup, { "data-slot": "sheet-content", "data-side": side, className: classNames(sheetPopup({ side }), className), ...props, children: [side === 'bottom' ? (_jsx("div", { "aria-hidden": true, className: "mx-auto mb-3 h-1 w-9 shrink-0 rounded-full bg-border" })) : (_jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", render: _jsx(Button, { variant: "ghost", size: "sm", isIconOnly: true, className: "absolute top-4 right-4", "aria-label": "Close" }), children: _jsx(XIcon, {}) })), children] })] }));
35
+ }
36
+ function SheetHeader({ className, ...props }) {
37
+ return (_jsx("div", { "data-slot": "sheet-header", className: classNames('flex flex-col gap-0.5 in-data-[side=right]:border-b in-data-[side=right]:px-6 in-data-[side=right]:py-5 in-data-[side=right]:pr-14', className), ...props }));
38
+ }
39
+ function SheetBody({ className, ...props }) {
40
+ return (_jsx("div", { "data-slot": "sheet-body", className: classNames('min-h-0 flex-1 overflow-y-auto in-data-[side=right]:p-6', className), ...props }));
41
+ }
42
+ function SheetFooter({ className, ...props }) {
43
+ return (_jsx("div", { "data-slot": "sheet-footer", className: classNames('flex flex-col-reverse gap-2 pt-3 in-data-[side=right]:flex-row in-data-[side=right]:justify-end in-data-[side=right]:border-t in-data-[side=right]:px-6 in-data-[side=right]:py-4', className), ...props }));
44
+ }
45
+ function SheetTitle({ className, ...props }) {
46
+ return (_jsx(SheetPrimitive.Title, { "data-slot": "sheet-title", className: classNames('text-heading font-semibold text-foreground in-data-[side=bottom]:py-2 in-data-[side=bottom]:text-section', className), ...props }));
47
+ }
48
+ function SheetDescription({ className, ...props }) {
49
+ return (_jsx(SheetPrimitive.Description, { "data-slot": "sheet-description", className: classNames('text-meta text-muted-foreground', className), ...props }));
50
+ }
51
+ export { Sheet, SheetBody, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, };
52
+ //# sourceMappingURL=sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.js","sourceRoot":"","sources":["../../src/atoms/sheet.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAGrC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,GAAG,CACpB,wOAAwO,EACxO;IACE,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,KAAK,EACH,qKAAqK;YACvK,MAAM,EACJ,qOAAqO;SACxO;KACF;IACD,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AAS,EAAE,UAAU,CACnB,oIAAoI,EACpI,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyB;IAC/D,OAAO,CACL,2BACY,YAAY,EACtB,SAAS,EAAE,UAAU,CAAC,yDAAyD,EAAE,SAAS,CAAC,KACvF,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyB;IACjE,OAAO,CACL,2BACY,cAAc,EACxB,SAAS,EAAE,UAAU,CACnB,mLAAmL,EACnL,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA8B;IACrE,OAAO,CACL,KAAC,cAAc,CAAC,KAAK,iBACT,aAAa,EACvB,SAAS,EAAE,UAAU,CACnB,0GAA0G,EAC1G,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoC;IACjF,OAAO,CACL,KAAC,cAAc,CAAC,WAAW,iBACf,mBAAmB,EAC7B,SAAS,EAAE,UAAU,CAAC,iCAAiC,EAAE,SAAS,CAAC,KAC/D,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,KAAK,EACL,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,GACb,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
2
+ /**
3
+ * shadcn Tooltip on Base UI (docs/design/png/Tooltip.png). Supplementary only:
4
+ * the same text is also the accessible name or visible elsewhere. None on phone.
5
+ */
6
+ declare function TooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): import("react").JSX.Element;
7
+ declare function Tooltip(props: TooltipPrimitive.Root.Props): import("react").JSX.Element;
8
+ declare function TooltipTrigger(props: TooltipPrimitive.Trigger.Props): import("react").JSX.Element;
9
+ declare function TooltipContent({ className, side, sideOffset, align, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, 'align' | 'side' | 'sideOffset'>): import("react").JSX.Element;
10
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -0,0 +1,24 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
4
+ import { classNames } from '../class-names.js';
5
+ /** Hover waits this long before a tooltip opens; keyboard focus opens it at once. */
6
+ const HOVER_DELAY_MS = 500;
7
+ /**
8
+ * shadcn Tooltip on Base UI (docs/design/png/Tooltip.png). Supplementary only:
9
+ * the same text is also the accessible name or visible elsewhere. None on phone.
10
+ */
11
+ function TooltipProvider({ delay = HOVER_DELAY_MS, ...props }) {
12
+ return _jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delay: delay, ...props });
13
+ }
14
+ function Tooltip(props) {
15
+ return _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
16
+ }
17
+ function TooltipTrigger(props) {
18
+ return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
19
+ }
20
+ function TooltipContent({ className, side = 'top', sideOffset = 6, align = 'center', ...props }) {
21
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Positioner, { align: align, side: side, sideOffset: sideOffset, className: "isolate z-50 max-sm:hidden", children: _jsx(TooltipPrimitive.Popup, { "data-slot": "tooltip-content", className: classNames('w-fit max-w-xs origin-(--transform-origin) rounded-sm bg-foreground px-2 py-1 text-caption font-medium text-background shadow-md duration-(--duration-fast) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0', className), ...props }) }) }));
22
+ }
23
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
24
+ //# sourceMappingURL=tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/atoms/tooltip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,qFAAqF;AACrF,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B;;;GAGG;AACH,SAAS,eAAe,CAAC,EAAE,KAAK,GAAG,cAAc,EAAE,GAAG,KAAK,EAAmC;IAC5F,OAAO,KAAC,gBAAgB,CAAC,QAAQ,iBAAW,kBAAkB,EAAC,KAAK,EAAE,KAAK,KAAM,KAAK,GAAI,CAAC;AAC7F,CAAC;AAED,SAAS,OAAO,CAAC,KAAkC;IACjD,OAAO,KAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,KAAK,KAAK,GAAI,CAAC;AAClE,CAAC;AAED,SAAS,cAAc,CAAC,KAAqC;IAC3D,OAAO,KAAC,gBAAgB,CAAC,OAAO,iBAAW,iBAAiB,KAAK,KAAK,GAAI,CAAC;AAC7E,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,SAAS,EACT,IAAI,GAAG,KAAK,EACZ,UAAU,GAAG,CAAC,EACd,KAAK,GAAG,QAAQ,EAChB,GAAG,KAAK,EACgG;IACxG,OAAO,CACL,KAAC,gBAAgB,CAAC,MAAM,cACtB,KAAC,gBAAgB,CAAC,UAAU,IAC1B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,SAAS,EAAC,4BAA4B,YAEtC,KAAC,gBAAgB,CAAC,KAAK,iBACX,iBAAiB,EAC3B,SAAS,EAAE,UAAU,CACnB,qPAAqP,EACrP,SAAS,CACV,KACG,KAAK,GACT,GAC0B,GACN,CAC3B,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type ClassValue } from 'clsx';
2
+ /** Joins class names, and lets a later Tailwind class win over an earlier one for the same property. */
3
+ export declare function classNames(...inputs: ClassValue[]): string;
@@ -0,0 +1,29 @@
1
+ import { clsx } from 'clsx';
2
+ import { extendTailwindMerge } from 'tailwind-merge';
3
+ /**
4
+ * The text styles from tokens.css. tailwind-merge has to know they are font
5
+ * sizes: otherwise it takes text-body for a colour and drops a text colour
6
+ * written before it.
7
+ */
8
+ const TEXT_STYLES = [
9
+ 'micro',
10
+ 'caption',
11
+ 'meta',
12
+ 'body',
13
+ 'section',
14
+ 'body-touch',
15
+ 'input-touch',
16
+ 'heading',
17
+ 'heading-touch',
18
+ 'title',
19
+ 'title-touch',
20
+ 'metric',
21
+ 'id',
22
+ 'code',
23
+ ];
24
+ const merge = extendTailwindMerge({ extend: { theme: { text: TEXT_STYLES } } });
25
+ /** Joins class names, and lets a later Tailwind class win over an earlier one for the same property. */
26
+ export function classNames(...inputs) {
27
+ return merge(clsx(inputs));
28
+ }
29
+ //# sourceMappingURL=class-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"class-names.js","sourceRoot":"","sources":["../src/class-names.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAmB,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAClB,OAAO;IACP,SAAS;IACT,MAAM;IACN,MAAM;IACN,SAAS;IACT,YAAY;IACZ,aAAa;IACb,SAAS;IACT,eAAe;IACf,OAAO;IACP,aAAa;IACb,QAAQ;IACR,IAAI;IACJ,MAAM;CACP,CAAC;AAEF,MAAM,KAAK,GAAG,mBAAmB,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;AAEhF,wGAAwG;AACxG,MAAM,UAAU,UAAU,CAAC,GAAG,MAAoB;IAChD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `@aeolus-fleet/ui`: the parts every Aeolus web app shows, in atomic design
3
+ * layers. React parts, props only, client-safe (decision 0033). Each app
4
+ * imports its styles from `@aeolus-fleet/ui/tokens.css` and scans this
5
+ * package for Tailwind classes.
6
+ */
7
+ export * from './atoms/avatar.js';
8
+ export * from './atoms/button.js';
9
+ export * from './atoms/dialog.js';
10
+ export * from './atoms/dialog-surface.js';
11
+ export * from './atoms/dropdown-menu.js';
12
+ export * from './atoms/kbd.js';
13
+ export * from './atoms/sheet.js';
14
+ export * from './atoms/tooltip.js';
15
+ export * from './class-names.js';
16
+ export * from './molecules/app-switcher.js';
17
+ export * from './molecules/avatar-entry.js';
18
+ export * from './molecules/avatar-menu.js';
19
+ export * from './molecules/signed-in-as.js';
20
+ export * from './organisms/app-header.js';
21
+ export * from './organisms/command-palette.js';
22
+ export * from './organisms/sign-in-background.js';
23
+ export * from './organisms/sign-in-backgrounds.js';
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ /**
2
+ * `@aeolus-fleet/ui`: the parts every Aeolus web app shows, in atomic design
3
+ * layers. React parts, props only, client-safe (decision 0033). Each app
4
+ * imports its styles from `@aeolus-fleet/ui/tokens.css` and scans this
5
+ * package for Tailwind classes.
6
+ */
7
+ export * from './atoms/avatar.js';
8
+ export * from './atoms/button.js';
9
+ export * from './atoms/dialog.js';
10
+ export * from './atoms/dialog-surface.js';
11
+ export * from './atoms/dropdown-menu.js';
12
+ export * from './atoms/kbd.js';
13
+ export * from './atoms/sheet.js';
14
+ export * from './atoms/tooltip.js';
15
+ export * from './class-names.js';
16
+ export * from './molecules/app-switcher.js';
17
+ export * from './molecules/avatar-entry.js';
18
+ export * from './molecules/avatar-menu.js';
19
+ export * from './molecules/signed-in-as.js';
20
+ export * from './organisms/app-header.js';
21
+ export * from './organisms/command-palette.js';
22
+ export * from './organisms/sign-in-background.js';
23
+ export * from './organisms/sign-in-backgrounds.js';
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { AppSwitcherModel } from '@aeolus-fleet/common/rules';
2
+ interface AppSwitcherProps {
3
+ switcher: AppSwitcherModel;
4
+ /**
5
+ * full: "Acme / Console ▾", the fleet part switching fleet and the app part
6
+ * switching app, each a menu. compact (phone, H6): "Console ▾", one bottom
7
+ * Sheet with the fleets, then the apps.
8
+ */
9
+ layout: 'full' | 'compact';
10
+ className?: string;
11
+ }
12
+ /**
13
+ * The switcher in the title (header design H1, H6, H8, H9): the fleet in view
14
+ * and the app open. Choosing another fleet or app follows its link; the
15
+ * choice says "Opening ..." with a spinner at once, and the others wait,
16
+ * until the browser leaves. Without anywhere else to go it is plain text,
17
+ * with no ▾.
18
+ */
19
+ export declare function AppSwitcher({ switcher, layout, className }: AppSwitcherProps): import("react").JSX.Element;
20
+ export {};
@@ -0,0 +1,57 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Check, ChevronDown, LoaderCircle } from 'lucide-react';
4
+ import { useState } from 'react';
5
+ import { Button } from '../atoms/button.js';
6
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger } from '../atoms/dropdown-menu.js';
7
+ import { Sheet, SheetClose, SheetContent, SheetTitle, SheetTrigger } from '../atoms/sheet.js';
8
+ import { classNames } from '../class-names.js';
9
+ const triggerClass = 'inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-body font-semibold text-foreground outline-none transition-colors duration-(--duration-fast) hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent disabled:opacity-60';
10
+ /** A choice's mark: a spinner while it opens, a check on the one in view. */
11
+ function Mark({ isCurrent, isOpening }) {
12
+ if (isOpening) {
13
+ return _jsx(LoaderCircle, { "aria-hidden": true, className: "ml-auto animate-spin motion-reduce:animate-none" });
14
+ }
15
+ return isCurrent ? _jsx(Check, { "aria-hidden": true, className: "ml-auto" }) : null;
16
+ }
17
+ /** One choice in a desktop menu: a link, with "Opening" while the browser goes there. */
18
+ function MenuChoice({ url, name, isCurrent, opening, onOpen, testId }) {
19
+ const isOpening = opening?.url === url && opening.name === name;
20
+ return (_jsxs(DropdownMenuItem, { "data-testid": testId, "data-current": isCurrent || undefined, disabled: opening !== undefined && !isOpening, closeOnClick: false, render: (props) => (_jsx("a", { ...props, href: url, "aria-current": isCurrent ? 'page' : undefined, onClick: (event) => {
21
+ props.onClick?.(event);
22
+ onOpen({ url, name });
23
+ }, children: props.children })), children: [_jsx("span", { className: "min-w-0 truncate", children: isOpening ? `Opening ${name}` : name }), _jsx(Mark, { isCurrent: isCurrent, isOpening: isOpening })] }));
24
+ }
25
+ /** One choice in the phone's Sheet: a 44 px link, with "Opening" while the browser goes there. */
26
+ function SheetChoice({ url, name, isCurrent, opening, onOpen, testId }) {
27
+ const isOpening = opening?.url === url && opening.name === name;
28
+ return (_jsxs("a", { href: url, "data-testid": testId, "aria-current": isCurrent ? 'page' : undefined, "aria-disabled": opening !== undefined && !isOpening ? true : undefined, onClick: (event) => {
29
+ if (opening !== undefined) {
30
+ event.preventDefault();
31
+ return;
32
+ }
33
+ onOpen({ url, name });
34
+ }, className: "flex h-(--size-control-touch) items-center gap-2.5 rounded-md px-2 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring aria-disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground", children: [_jsx("span", { className: "min-w-0 truncate", children: isOpening ? `Opening ${name}` : name }), _jsx(Mark, { isCurrent: isCurrent, isOpening: isOpening })] }));
35
+ }
36
+ function SheetGroup({ label, children }) {
37
+ return (_jsxs("div", { role: "group", "aria-label": label, className: "flex flex-col gap-0.5", children: [_jsx("p", { className: "px-2 text-caption font-medium text-muted-foreground", children: label }), children] }));
38
+ }
39
+ /**
40
+ * The switcher in the title (header design H1, H6, H8, H9): the fleet in view
41
+ * and the app open. Choosing another fleet or app follows its link; the
42
+ * choice says "Opening ..." with a spinner at once, and the others wait,
43
+ * until the browser leaves. Without anywhere else to go it is plain text,
44
+ * with no ▾.
45
+ */
46
+ export function AppSwitcher({ switcher, layout, className }) {
47
+ const [opening, setOpening] = useState(undefined);
48
+ const { fleet, appLabel, fleets, apps, canSwitch } = switcher;
49
+ if (!canSwitch) {
50
+ return (_jsxs("p", { "data-testid": "app-switcher", className: classNames('flex min-w-0 items-center gap-1 px-1.5 text-body font-semibold text-foreground', className), children: [layout === 'full' ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "truncate", children: fleet.name }), _jsx("span", { "aria-hidden": true, className: "text-muted-foreground", children: "/" })] })) : null, _jsx("span", { className: "truncate", children: appLabel })] }));
51
+ }
52
+ if (layout === 'compact') {
53
+ return (_jsxs(Sheet, { children: [_jsxs(SheetTrigger, { "data-testid": "app-switcher", "aria-label": `Switch fleet or app: ${fleet.name}, ${appLabel}`, className: classNames(triggerClass, 'text-title-touch', className), children: [_jsx("span", { className: "truncate", children: appLabel }), opening === undefined ? _jsx(ChevronDown, { "aria-hidden": true, className: "size-(--size-icon) shrink-0 text-muted-foreground" }) : _jsx(LoaderCircle, { "aria-hidden": true, className: "size-(--size-icon) shrink-0 animate-spin motion-reduce:animate-none" })] }), _jsxs(SheetContent, { side: "bottom", "data-testid": "app-switcher-sheet", className: "gap-3", children: [_jsx(SheetTitle, { className: "sr-only", children: "Switch fleet or app" }), _jsx(SheetGroup, { label: "Fleets", children: fleets.map((choice) => (_jsx(SheetChoice, { url: choice.url, name: choice.name, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-fleet" }, choice.id))) }), _jsx(SheetGroup, { label: "Apps", children: apps.map((choice) => (_jsx(SheetChoice, { url: choice.url, name: choice.label, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-app" }, choice.app))) }), _jsx(SheetClose, { render: _jsx(Button, { size: "touch", className: "w-full" }), children: "Cancel" })] })] }));
54
+ }
55
+ return (_jsxs("nav", { "aria-label": "Fleet and app", "data-testid": "app-switcher", className: classNames('flex min-w-0 items-center gap-0.5', className), children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { "data-testid": "app-switcher-fleets", "aria-label": `Fleet: ${fleet.name}. Switch fleet`, className: triggerClass, children: _jsx("span", { className: "truncate", children: fleet.name }) }), _jsx(DropdownMenuContent, { align: "start", className: "w-56", children: _jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Fleets" }), fleets.map((choice) => (_jsx(MenuChoice, { url: choice.url, name: choice.name, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-fleet" }, choice.id)))] }) })] }), _jsx("span", { "aria-hidden": true, className: "text-muted-foreground", children: "/" }), _jsxs(DropdownMenu, { children: [_jsxs(DropdownMenuTrigger, { "data-testid": "app-switcher-apps", "aria-label": `App: ${appLabel}. Switch app`, className: triggerClass, children: [_jsx("span", { className: "truncate", children: appLabel }), opening === undefined ? _jsx(ChevronDown, { "aria-hidden": true, className: "size-(--size-icon-sm) shrink-0 text-muted-foreground" }) : _jsx(LoaderCircle, { "aria-hidden": true, className: "size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none" })] }), _jsx(DropdownMenuContent, { align: "start", className: "w-56", children: _jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Apps" }), apps.map((choice) => (_jsx(MenuChoice, { url: choice.url, name: choice.label, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-app" }, choice.app)))] }) })] })] }));
56
+ }
57
+ //# sourceMappingURL=app-switcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-switcher.js","sourceRoot":"","sources":["../../src/molecules/app-switcher.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAC3J,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAmB/C,MAAM,YAAY,GAChB,gRAAgR,CAAC;AAEnR,6EAA6E;AAC7E,SAAS,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAA8C;IAChF,IAAI,SAAS,EA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AAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC,oBAAoB,IAA7I,MAAM,CAAC,EAAE,CAAuI,CAClK,CAAC,IACgB,GACA,IACT,EACf,oCAAkB,SAAS,EAAC,uBAAuB,kBAAS,EAC5D,MAAC,YAAY,eACX,MAAC,mBAAmB,mBAAa,mBAAmB,gBAAa,QAAQ,QAAQ,cAAc,EAAE,SAAS,EAAE,YAAY,aACtH,eAAM,SAAS,EAAC,UAAU,YAAE,QAAQ,GAAQ,EAC3C,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,KAAC,WAAW,yBAAa,SAAS,EAAC,sDAAsD,GAAG,CAAC,CAAC,CAAC,KAAC,YAAY,yBAAa,SAAS,EAAC,wEAAwE,GAAG,IACnN,EACtB,KAAC,mBAAmB,IAAC,KAAK,EAAC,OAAO,EAAC,SAAS,EAAC,MAAM,YACjD,MAAC,iBAAiB,eAChB,KAAC,iBAAiB,uBAAyB,EAC1C,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACpB,KAAC,UAAU,IAAkB,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC,kBAAkB,IAA7I,MAAM,CAAC,GAAG,CAAsI,CAClK,CAAC,IACgB,GACA,IACT,IACX,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,21 @@
1
+ import type { ReactNode } from 'react';
2
+ /** An entry of the app's own in the avatar menu, such as Take the tour; phone-only ones stand in for what a tab bar lacks (H6). */
3
+ export interface AvatarMenuEntry {
4
+ key: string;
5
+ label: string;
6
+ icon: ReactNode;
7
+ /** A link, or an action; one of the two. */
8
+ href?: string;
9
+ onSelect?: () => void;
10
+ isPhoneOnly?: boolean;
11
+ /** For an action whose work runs on the server, such as signing in as argo: what the entry says while it runs. Set, the menu stays open once it is picked. */
12
+ workingLabel?: string;
13
+ /** Whether that work runs now: the entry says its working label, with a spinner, and takes no second press. */
14
+ isWorking?: boolean;
15
+ }
16
+ /** What the menu shows of an entry: its label, or its working label while its work runs, and whether picking it closes the menu. */
17
+ export declare function shownEntryOf(entry: AvatarMenuEntry): {
18
+ label: string;
19
+ isWorking: boolean;
20
+ shouldCloseMenu: boolean;
21
+ };
@@ -0,0 +1,6 @@
1
+ /** What the menu shows of an entry: its label, or its working label while its work runs, and whether picking it closes the menu. */
2
+ export function shownEntryOf(entry) {
3
+ const isWorking = entry.workingLabel !== undefined && entry.isWorking === true;
4
+ return { label: isWorking && entry.workingLabel !== undefined ? entry.workingLabel : entry.label, isWorking, shouldCloseMenu: entry.workingLabel === undefined };
5
+ }
6
+ //# sourceMappingURL=avatar-entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-entry.js","sourceRoot":"","sources":["../../src/molecules/avatar-entry.ts"],"names":[],"mappings":"AAiBA,oIAAoI;AACpI,MAAM,UAAU,YAAY,CAAC,KAAsB;IACjD,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,KAAK,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IAC/E,OAAO,EAAE,KAAK,EAAE,SAAS,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;AACnK,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { Theme } from '@aeolus-fleet/common';
2
+ import { type SignedInAs } from './signed-in-as.js';
3
+ import { type AvatarMenuEntry } from './avatar-entry.js';
4
+ /** A keyboard shortcut the app offers, for the Keyboard shortcuts dialog: its keys in order and what it does. */
5
+ export interface Shortcut {
6
+ keys: readonly string[];
7
+ label: string;
8
+ }
9
+ export interface AvatarMenuProps {
10
+ /** The account's name; undefined until known, or for argo's sign-in and the viewer, which go by those names. */
11
+ name: string | undefined;
12
+ /** How someone is signed in here (H10); undefined until known. */
13
+ signedInAs: SignedInAs | undefined;
14
+ /** This session, as the app words it ("Device · Mac · Chrome, since 08:02"); unset, no session line. */
15
+ session?: string;
16
+ /** Account's address from the apps list: set, the menu offers Your account, Your rights and Email updates (H8). */
17
+ accountUrl?: string;
18
+ /** The theme chosen; undefined while unknown, or for a sign-in that has none (the viewer). */
19
+ theme: Theme | undefined;
20
+ themes: readonly Theme[];
21
+ /** Whether the menu offers the theme at all. */
22
+ hasTheme: boolean;
23
+ onThemeChange: (theme: Theme) => void;
24
+ shortcuts: readonly Shortcut[];
25
+ helpUrl: string;
26
+ onSignOut: () => void;
27
+ isSigningOut: boolean;
28
+ entries?: readonly AvatarMenuEntry[];
29
+ }
30
+ /**
31
+ * The avatar menu on desktop (header design H8, H10, H13): the avatar opens a
32
+ * DropdownMenu with who is signed in here and how, the account's own pages
33
+ * in Account, the app's entries, the theme (applied at once), keyboard
34
+ * shortcuts, help and sign out, which shows "Signing out" until it ends.
35
+ */
36
+ export declare function AvatarMenu(props: AvatarMenuProps): import("react").JSX.Element;
37
+ /**
38
+ * The avatar menu on phone (H6): the avatar opens the same content as a
39
+ * bottom Sheet, with the app's phone-only entries for what its tab bar
40
+ * lacks, the theme as three buttons, and Cancel. No keyboard shortcuts on
41
+ * phone.
42
+ */
43
+ export declare function AvatarMenuSheet(props: AvatarMenuProps): import("react").JSX.Element;
@@ -0,0 +1,111 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { BellRing, CircleHelp, CircleUserRound, Keyboard, LaptopMinimal, LoaderCircle, LogOut, Monitor, Moon, ShieldCheck, Sun } from 'lucide-react';
4
+ import { useState } from 'react';
5
+ import { signedInAsOf } from './signed-in-as.js';
6
+ import { shownEntryOf } from './avatar-entry.js';
7
+ import { Avatar } from '../atoms/avatar.js';
8
+ import { Button } from '../atoms/button.js';
9
+ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../atoms/dialog.js';
10
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger } from '../atoms/dropdown-menu.js';
11
+ import { Kbd } from '../atoms/kbd.js';
12
+ import { Sheet, SheetClose, SheetContent, SheetTitle, SheetTrigger } from '../atoms/sheet.js';
13
+ import { classNames } from '../class-names.js';
14
+ const THEME_LABELS = { light: 'Light', dark: 'Dark', system: 'System' };
15
+ const THEME_ICONS = { light: Sun, dark: Moon, system: Monitor };
16
+ /** The account's own pages in Account, from its address there. */
17
+ function accountPagesOf(accountUrl) {
18
+ return [
19
+ { key: 'account', label: 'Your account', href: accountUrl, Icon: CircleUserRound },
20
+ { key: 'rights', label: 'Your rights', href: `${accountUrl}/rights`, Icon: ShieldCheck },
21
+ { key: 'updates', label: 'Email updates', href: `${accountUrl}/updates`, Icon: BellRing },
22
+ ];
23
+ }
24
+ /** The name the avatar shows: the account's, or argo or the viewer by their own. */
25
+ function displayNameOf(name, signedInAs) {
26
+ if (name !== undefined) {
27
+ return name;
28
+ }
29
+ return signedInAs === 'viewer' ? 'viewer' : signedInAs === 'argo' ? 'argo' : ' ';
30
+ }
31
+ function themeOf(value, themes) {
32
+ return themes.find((theme) => theme === value);
33
+ }
34
+ /** Who is signed in here, and how (H10), with this session when the app words it. */
35
+ function WhoHeader({ name, signedInAs, session }) {
36
+ const shown = displayNameOf(name, signedInAs);
37
+ return (_jsxs("div", { className: "flex flex-col gap-2 px-2.5 pt-2 pb-2.5", children: [_jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx(Avatar, { kind: signedInAs === 'argo' ? 'argo' : 'account', size: 28, name: shown }), _jsxs("span", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate text-body font-medium text-foreground", children: shown }), _jsx("span", { "data-testid": "avatar-menu-signed-in-as", className: "truncate text-caption text-muted-foreground", children: signedInAs === undefined ? ' ' : signedInAsOf(signedInAs) })] })] }), session === undefined ? null : (_jsxs("p", { "data-testid": "avatar-menu-session", className: "flex items-start gap-1.5 text-caption text-muted-foreground", children: [_jsx(LaptopMinimal, { "aria-hidden": true, className: "mt-px size-(--size-icon-sm) shrink-0" }), _jsxs("span", { children: ["This session: ", _jsx("span", { className: "font-medium text-foreground", children: session })] })] }))] }));
38
+ }
39
+ /** An entry's icon and label, or a spinner and its working label while its work runs. */
40
+ function EntryContent({ entry }) {
41
+ const shown = shownEntryOf(entry);
42
+ return (_jsxs(_Fragment, { children: [shown.isWorking ? _jsx(LoaderCircle, { "aria-hidden": true, "data-testid": "avatar-menu-entry-spinner", className: "animate-spin motion-reduce:animate-none" }) : entry.icon, shown.label] }));
43
+ }
44
+ function SignOutLabel({ isSigningOut }) {
45
+ return isSigningOut ? (_jsxs(_Fragment, { children: [_jsx(LoaderCircle, { "aria-hidden": true, className: "animate-spin motion-reduce:animate-none" }), "Signing out"] })) : (_jsxs(_Fragment, { children: [_jsx(LogOut, { "aria-hidden": true }), "Sign out"] }));
46
+ }
47
+ /** The app's keyboard shortcuts, desktop only: phone has no Kbd hints (H6). */
48
+ function ShortcutsDialog({ isOpen, onOpenChange, shortcuts }) {
49
+ return (_jsx(Dialog, { open: isOpen, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { size: "sm", "data-testid": "avatar-menu-shortcuts-dialog", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Keyboard shortcuts" }), _jsx(DialogDescription, { children: "What the keys do here." })] }), _jsx("ul", { className: "flex flex-col gap-2", children: shortcuts.map((shortcut) => (_jsxs("li", { className: "flex items-center justify-between gap-4 text-body text-foreground", children: [shortcut.label, _jsx("span", { className: "flex gap-1", children: shortcut.keys.map((key) => (_jsx(Kbd, { children: key }, key))) })] }, shortcut.label))) })] }) }));
50
+ }
51
+ /**
52
+ * The avatar menu on desktop (header design H8, H10, H13): the avatar opens a
53
+ * DropdownMenu with who is signed in here and how, the account's own pages
54
+ * in Account, the app's entries, the theme (applied at once), keyboard
55
+ * shortcuts, help and sign out, which shows "Signing out" until it ends.
56
+ */
57
+ export function AvatarMenu(props) {
58
+ const { name, signedInAs, accountUrl, theme, themes, hasTheme, onThemeChange, shortcuts, helpUrl, onSignOut, isSigningOut, entries = [] } = props;
59
+ const [isShortcutsOpen, setIsShortcutsOpen] = useState(false);
60
+ const shown = displayNameOf(name, signedInAs);
61
+ const label = `Account menu, ${shown}${signedInAs === undefined ? '' : `, ${signedInAsOf(signedInAs)}`}`;
62
+ return (_jsxs(_Fragment, { children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { "data-testid": "avatar-menu", "aria-label": label, className: "inline-flex size-(--size-control) shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-ring", children: _jsx(Avatar, { kind: signedInAs === 'argo' ? 'argo' : 'account', size: 28, name: shown }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-64", children: [_jsx(WhoHeader, { name: name, signedInAs: signedInAs, session: props.session }), accountUrl === undefined
63
+ ? null
64
+ : accountPagesOf(accountUrl).map(({ key, label: pageLabel, href, Icon }) => (_jsxs(DropdownMenuItem, { "data-testid": `avatar-menu-${key}`, render: (itemProps) => (_jsx("a", { ...itemProps, href: href, children: itemProps.children })), children: [_jsx(Icon, { "aria-hidden": true }), pageLabel] }, key))), entries
65
+ .filter((entry) => entry.isPhoneOnly !== true)
66
+ .map((entry) => (_jsx(DropdownMenuItem, { "data-testid": `avatar-menu-${entry.key}`, disabled: shownEntryOf(entry).isWorking, closeOnClick: shownEntryOf(entry).shouldCloseMenu, onClick: entry.onSelect, ...(entry.href === undefined
67
+ ? {}
68
+ : {
69
+ render: (itemProps) => (_jsx("a", { ...itemProps, href: entry.href, children: itemProps.children })),
70
+ }), children: _jsx(EntryContent, { entry: entry }) }, entry.key))), hasTheme ? (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Theme" }), _jsx(DropdownMenuRadioGroup, { value: theme ?? null, onValueChange: (value) => {
71
+ const picked = themeOf(value, themes);
72
+ if (picked !== undefined) {
73
+ onThemeChange(picked);
74
+ }
75
+ }, children: themes.map((option) => {
76
+ const Icon = THEME_ICONS[option];
77
+ return (_jsxs(DropdownMenuRadioItem, { value: option, disabled: theme === undefined, closeOnClick: false, "data-testid": `avatar-menu-theme-${option}`, children: [_jsx(Icon, { "aria-hidden": true }), THEME_LABELS[option]] }, option));
78
+ }) })] })] })) : null, _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { "data-testid": "avatar-menu-shortcuts", onClick: () => {
79
+ setIsShortcutsOpen(true);
80
+ }, children: [_jsx(Keyboard, { "aria-hidden": true }), "Keyboard shortcuts"] }), _jsxs(DropdownMenuItem, { "data-testid": "avatar-menu-help", render: (itemProps) => (_jsx("a", { ...itemProps, href: helpUrl, target: "_blank", rel: "noreferrer", children: itemProps.children })), children: [_jsx(CircleHelp, { "aria-hidden": true }), "Help", _jsx("span", { className: "sr-only", children: " (opens in a new tab)" })] }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { "data-testid": "avatar-menu-sign-out", disabled: isSigningOut, closeOnClick: false, onClick: onSignOut, children: _jsx(SignOutLabel, { isSigningOut: isSigningOut }) })] })] }), _jsx(ShortcutsDialog, { isOpen: isShortcutsOpen, onOpenChange: setIsShortcutsOpen, shortcuts: shortcuts })] }));
81
+ }
82
+ const rowClass = 'flex h-(--size-control-touch) w-full items-center gap-2.5 border-t border-border pt-3 text-body-touch text-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60 [&_svg]:size-(--size-icon) [&_svg]:text-muted-foreground';
83
+ /**
84
+ * The avatar menu on phone (H6): the avatar opens the same content as a
85
+ * bottom Sheet, with the app's phone-only entries for what its tab bar
86
+ * lacks, the theme as three buttons, and Cancel. No keyboard shortcuts on
87
+ * phone.
88
+ */
89
+ export function AvatarMenuSheet(props) {
90
+ const { name, signedInAs, accountUrl, theme, themes, hasTheme, onThemeChange, helpUrl, onSignOut, isSigningOut, entries = [] } = props;
91
+ const [isOpen, setIsOpen] = useState(false);
92
+ const shown = displayNameOf(name, signedInAs);
93
+ return (_jsxs(Sheet, { open: isOpen, onOpenChange: setIsOpen, children: [_jsx(SheetTrigger, { "data-testid": "avatar-menu", "aria-label": `Account menu, ${shown}${signedInAs === undefined ? '' : `, ${signedInAsOf(signedInAs)}`}`, className: "inline-flex size-(--size-control-touch) shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-ring", children: _jsx(Avatar, { kind: signedInAs === 'argo' ? 'argo' : 'account', size: 28, name: shown }) }), _jsxs(SheetContent, { side: "bottom", "data-testid": "avatar-menu-sheet", className: "gap-3", children: [_jsx(SheetTitle, { className: "sr-only", children: "Account" }), _jsx(WhoHeader, { name: name, signedInAs: signedInAs, session: props.session }), accountUrl === undefined
94
+ ? null
95
+ : accountPagesOf(accountUrl).map(({ key, label, href, Icon }) => (_jsxs("a", { href: href, "data-testid": `avatar-menu-${key}`, className: rowClass, children: [_jsx(Icon, { "aria-hidden": true }), label] }, key))), entries.map((entry) => entry.href === undefined ? (_jsx("button", { type: "button", "data-testid": `avatar-menu-${entry.key}`, className: rowClass, disabled: shownEntryOf(entry).isWorking, onClick: () => {
96
+ if (shownEntryOf(entry).shouldCloseMenu) {
97
+ setIsOpen(false);
98
+ }
99
+ entry.onSelect?.();
100
+ }, children: _jsx(EntryContent, { entry: entry }) }, entry.key)) : (_jsxs("a", { href: entry.href, "data-testid": `avatar-menu-${entry.key}`, className: rowClass, onClick: () => {
101
+ setIsOpen(false);
102
+ entry.onSelect?.();
103
+ }, children: [entry.icon, entry.label] }, entry.key))), hasTheme ? (_jsxs("div", { role: "group", "aria-label": "Theme", className: "flex flex-col gap-1.5 border-t border-border pt-3", children: [_jsx("p", { className: "text-caption text-muted-foreground", children: "Theme" }), _jsx("div", { className: "grid grid-cols-3 gap-1 rounded-lg bg-muted p-1", children: themes.map((option) => {
104
+ const Icon = THEME_ICONS[option];
105
+ const isChosen = option === theme;
106
+ return (_jsxs("button", { type: "button", "aria-pressed": isChosen, disabled: theme === undefined, "data-testid": `avatar-menu-theme-${option}`, onClick: () => {
107
+ onThemeChange(option);
108
+ }, className: classNames('inline-flex h-(--size-control-touch) items-center justify-center gap-1.5 rounded-md text-body-touch text-muted-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60 [&_svg]:size-(--size-icon)', isChosen ? 'bg-background text-foreground shadow-xs' : undefined), children: [_jsx(Icon, { "aria-hidden": true }), THEME_LABELS[option]] }, option));
109
+ }) })] })) : null, _jsxs("a", { href: helpUrl, target: "_blank", rel: "noreferrer", "data-testid": "avatar-menu-help", className: rowClass, children: [_jsx(CircleHelp, { "aria-hidden": true }), "Help", _jsx("span", { className: "sr-only", children: " (opens in a new tab)" })] }), _jsx("button", { type: "button", "data-testid": "avatar-menu-sign-out", disabled: isSigningOut, onClick: onSignOut, className: rowClass, children: _jsx(SignOutLabel, { isSigningOut: isSigningOut }) }), _jsx(SheetClose, { render: _jsx(Button, { size: "touch", className: "w-full" }), children: "Cancel" })] })] }));
110
+ }
111
+ //# sourceMappingURL=avatar-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-menu.js","sourceRoot":"","sources":["../../src/molecules/avatar-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAmB,MAAM,cAAc,CAAC;AACtK,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGj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AU,IAAC,MAAM,EAAE,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,QAAQ,GAAG,uBAAqB,IACtE,IACT,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** How someone is signed in here (H10). */
2
+ export type SignedInAs = 'argo' | 'account' | 'viewer';
3
+ /** The avatar menu's line for how someone is signed in here. */
4
+ export declare function signedInAsOf(signedInAs: SignedInAs): string;
@@ -0,0 +1,6 @@
1
+ const SIGNED_IN_AS_LABELS = { argo: 'Signed in as argo', account: 'Signed in as your account', viewer: 'Viewer' };
2
+ /** The avatar menu's line for how someone is signed in here. */
3
+ export function signedInAsOf(signedInAs) {
4
+ return SIGNED_IN_AS_LABELS[signedInAs];
5
+ }
6
+ //# sourceMappingURL=signed-in-as.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signed-in-as.js","sourceRoot":"","sources":["../../src/molecules/signed-in-as.ts"],"names":[],"mappings":"AAGA,MAAM,mBAAmB,GAA+B,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,2BAA2B,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAE9I,gEAAgE;AAChE,MAAM,UAAU,YAAY,CAAC,UAAsB;IACjD,OAAO,mBAAmB,CAAC,UAAU,CAAC,CAAC;AACzC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { AppSwitcherModel } from '@aeolus-fleet/common/rules';
3
+ import { type AvatarMenuProps } from '../molecules/avatar-menu.js';
4
+ interface AppHeaderProps {
5
+ /** Undefined while the fleet in view is not known yet: the title's shape stands in. */
6
+ switcher: AppSwitcherModel | undefined;
7
+ /** The avatar menu, always last. */
8
+ account: AvatarMenuProps;
9
+ /** Opens the command palette; without it the search trigger is not shown. */
10
+ onSearch?: () => void;
11
+ /** The search trigger's words: "Search ships or jump to". */
12
+ searchLabel?: string;
13
+ /** The app's own part after the title, such as a breadcrumb. */
14
+ children?: ReactNode;
15
+ /** The app's own controls before the search, such as a live status or Compose. */
16
+ actions?: ReactNode;
17
+ className?: string;
18
+ }
19
+ /**
20
+ * The header every Aeolus web app shows on desktop (header design H1 to H13),
21
+ * 56 px: the switcher in the title ("Acme / Console ▾"), the app's own part
22
+ * after it, then the app's controls, the command palette's search trigger
23
+ * with its ⌘K hint, and the avatar menu. Each app's own bar takes the
24
+ * header on phone, with the switcher compact (H6).
25
+ */
26
+ export declare function AppHeader({ switcher, account, onSearch, searchLabel, children, actions, className }: AppHeaderProps): import("react").JSX.Element;
27
+ export {};
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Search } from 'lucide-react';
3
+ import { AppSwitcher } from '../molecules/app-switcher.js';
4
+ import { Button } from '../atoms/button.js';
5
+ import { Kbd } from '../atoms/kbd.js';
6
+ import { AvatarMenu } from '../molecules/avatar-menu.js';
7
+ import { classNames } from '../class-names.js';
8
+ /**
9
+ * The header every Aeolus web app shows on desktop (header design H1 to H13),
10
+ * 56 px: the switcher in the title ("Acme / Console ▾"), the app's own part
11
+ * after it, then the app's controls, the command palette's search trigger
12
+ * with its ⌘K hint, and the avatar menu. Each app's own bar takes the
13
+ * header on phone, with the switcher compact (H6).
14
+ */
15
+ export function AppHeader({ switcher, account, onSearch, searchLabel = 'Search or jump to', children, actions, className }) {
16
+ return (_jsxs("header", { "data-slot": "app-header", className: classNames('sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6', className), children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [switcher === undefined ? (_jsx("span", { "data-testid": "app-switcher-loading", "aria-hidden": true, className: "h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none" })) : (_jsx(AppSwitcher, { switcher: switcher, layout: "full", className: "shrink-0" })), children] }), _jsxs("div", { className: "flex shrink-0 items-center gap-3", children: [actions, onSearch ? (_jsxs(Button, { size: "sm", icon: _jsx(Search, { "aria-hidden": true }), "data-testid": "header-search", className: "w-60 justify-start font-normal text-muted-foreground max-lg:w-auto", onClick: onSearch, children: [_jsx("span", { className: "grow text-left max-lg:sr-only", children: searchLabel }), _jsx(Kbd, { children: "\u2318K" })] })) : null, _jsx(AvatarMenu, { ...account })] })] }));
17
+ }
18
+ //# sourceMappingURL=app-header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-header.js","sourceRoot":"","sources":["../../src/organisms/app-header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAwB,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAkB/C;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,GAAG,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAkB;IACxI,OAAO,CACL,+BACY,YAAY,EACtB,SAAS,EAAE,UAAU,CAAC,gIAAgI,EAAE,SAAS,CAAC,aAElK,eAAK,SAAS,EAAC,iCAAiC,aAC7C,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CACxB,8BAAkB,sBAAsB,uBAAa,SAAS,EAAC,6EAA6E,GAAG,CAChJ,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,EAAC,SAAS,EAAC,UAAU,GAAG,CACvE,EACA,QAAQ,IACL,EACN,eAAK,SAAS,EAAC,kCAAkC,aAC9C,OAAO,EACP,QAAQ,CAAC,CAAC,CAAC,CACV,MAAC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