@aeolus-fleet/ui 0.37.3 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/atoms/avatar.d.ts +2 -2
- package/dist/atoms/avatar.js +2 -6
- package/dist/atoms/avatar.js.map +1 -1
- package/dist/atoms/input.d.ts +20 -0
- package/dist/atoms/input.js +31 -0
- package/dist/atoms/input.js.map +1 -0
- package/dist/atoms/label.d.ts +8 -0
- package/dist/atoms/label.js +10 -0
- package/dist/atoms/label.js.map +1 -0
- package/dist/atoms/ship-state.d.ts +32 -0
- package/dist/atoms/ship-state.js +43 -0
- package/dist/atoms/ship-state.js.map +1 -0
- package/dist/atoms/switch.d.ts +7 -0
- package/dist/atoms/switch.js +13 -0
- package/dist/atoms/switch.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/molecules/app-switcher.d.ts +7 -4
- package/dist/molecules/app-switcher.js +8 -5
- package/dist/molecules/app-switcher.js.map +1 -1
- package/dist/molecules/avatar-menu.d.ts +12 -2
- package/dist/molecules/avatar-menu.js +5 -3
- package/dist/molecules/avatar-menu.js.map +1 -1
- package/dist/molecules/harbour-activity.d.ts +7 -0
- package/dist/molecules/harbour-activity.js +36 -0
- package/dist/molecules/harbour-activity.js.map +1 -0
- package/dist/molecules/harbour-group.d.ts +15 -0
- package/dist/molecules/harbour-group.js +17 -0
- package/dist/molecules/harbour-group.js.map +1 -0
- package/dist/molecules/harbour-numbers.d.ts +14 -0
- package/dist/molecules/harbour-numbers.js +42 -0
- package/dist/molecules/harbour-numbers.js.map +1 -0
- package/dist/molecules/harbour-state.d.ts +14 -0
- package/dist/molecules/harbour-state.js +24 -0
- package/dist/molecules/harbour-state.js.map +1 -0
- package/dist/molecules/harbour-tile.d.ts +25 -0
- package/dist/molecules/harbour-tile.js +54 -0
- package/dist/molecules/harbour-tile.js.map +1 -0
- package/dist/organisms/app-header.d.ts +14 -8
- package/dist/organisms/app-header.js +9 -6
- package/dist/organisms/app-header.js.map +1 -1
- package/dist/organisms/harbour.d.ts +44 -0
- package/dist/organisms/harbour.js +30 -0
- package/dist/organisms/harbour.js.map +1 -0
- package/dist/organisms/sign-in-backgrounds.d.ts +1 -2
- package/dist/organisms/sign-in-backgrounds.js +1 -2
- package/dist/organisms/sign-in-backgrounds.js.map +1 -1
- package/dist/theme.css +16 -0
- package/dist/tokens.css +26 -18
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { HARBOUR_GROUP_LOOK } from './harbour-state.js';
|
|
4
|
+
import { HarbourTile } from './harbour-tile.js';
|
|
5
|
+
/**
|
|
6
|
+
* The tiles' columns, by Harbour's own width (a container query on Harbour,
|
|
7
|
+
* docs/design/fleet-overview): as many tiles of at least 14rem as fit (four at
|
|
8
|
+
* the console's 1440, seven at 1920, three in Bridge's column at 1920, one
|
|
9
|
+
* in Bridge's column at 1440), two a row on a phone, under 24rem.
|
|
10
|
+
*/
|
|
11
|
+
const TILE_COLUMNS = 'grid-cols-[repeat(auto-fill,minmax(14rem,1fr))] @max-[24rem]:grid-cols-2';
|
|
12
|
+
/** One of Harbour's groups (docs/design/fleet-overview): its icon, word and how many ships it holds, then its tiles. */
|
|
13
|
+
export function HarbourGroup({ kind, tiles, hrefOf, link, now }) {
|
|
14
|
+
const { word, Icon } = HARBOUR_GROUP_LOOK[kind];
|
|
15
|
+
return (_jsxs("section", { "aria-label": word, className: "flex flex-col gap-2", "data-testid": `harbour-group-${kind}`, children: [_jsxs("h3", { className: "flex items-center gap-2 text-body leading-5 font-semibold", children: [_jsx(Icon, { "aria-hidden": true, className: "size-4 shrink-0" }), word, _jsx("span", { className: "font-normal text-muted-foreground tabular-nums", children: tiles.length })] }), _jsx("ul", { className: `grid gap-2 ${TILE_COLUMNS}`, children: tiles.map((ship) => (_jsx("li", { className: "min-w-0", children: _jsx(HarbourTile, { ship: ship, kind: kind, href: hrefOf?.(ship.id), link: link, now: now }) }, ship.id))) })] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=harbour-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harbour-group.js","sourceRoot":"","sources":["../../src/molecules/harbour-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,OAAO,EAAE,kBAAkB,EAAyB,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,YAAY,GAAG,0EAA0E,CAAC;AAYhG,wHAAwH;AACxH,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAqB;IAChF,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAChD,OAAO,CACL,iCAAqB,IAAI,EAAE,SAAS,EAAC,qBAAqB,iBAAc,iBAAiB,IAAI,EAAE,aAC7F,cAAI,SAAS,EAAC,2DAA2D,aACvE,KAAC,IAAI,yBAAa,SAAS,EAAC,iBAAiB,GAAG,EAC/C,IAAI,EACL,eAAM,SAAS,EAAC,gDAAgD,YAAE,KAAK,CAAC,MAAM,GAAQ,IACnF,EACL,aAAI,SAAS,EAAE,cAAc,YAAY,EAAE,YACxC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,aAAkB,SAAS,EAAC,SAAS,YACnC,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,GAAI,IAD/E,IAAI,CAAC,EAAE,CAEX,CACN,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HarbourOutput } from '@aeolus-fleet/common';
|
|
2
|
+
/** Harbour's numbers: the ships, and how many are in each state. */
|
|
3
|
+
export type HarbourCounts = NonNullable<HarbourOutput['counts']>;
|
|
4
|
+
/**
|
|
5
|
+
* Harbour's numbers (docs/design/fleet-overview, docs/design/state-colours):
|
|
6
|
+
* the ships, then Alert, Awaiting crew, Blocked, Working and Idle, each a
|
|
7
|
+
* ShipState in its tone; only Alert is filled, and a number at 0 carries no
|
|
8
|
+
* tone at all. Large numbers, small ones when Harbour is narrow (under
|
|
9
|
+
* 35rem: a phone, Bridge's column at 1440). Undefined draws the shape that
|
|
10
|
+
* is coming.
|
|
11
|
+
*/
|
|
12
|
+
export declare function HarbourNumbers({ counts }: {
|
|
13
|
+
counts: HarbourCounts | undefined;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Ship } from 'lucide-react';
|
|
3
|
+
import { ShipState } from '../atoms/ship-state.js';
|
|
4
|
+
import { classNames } from '../class-names.js';
|
|
5
|
+
/** The states in the order the numbers show them (docs/design/state-colours, "Five states"). */
|
|
6
|
+
const STATES = ['alert', 'awaitingCrew', 'blocked', 'working', 'idle'];
|
|
7
|
+
/** At 0 a state's number carries no tone: its word is muted, its value in the foreground. */
|
|
8
|
+
const NO_TONE = 'text-muted-foreground';
|
|
9
|
+
/** Only Alert fills its card, above 0. */
|
|
10
|
+
const ALERT_CARD = 'border-tone-attention-border bg-tone-attention-bg';
|
|
11
|
+
/** A number's value in its state's tone, above 0; Idle has none and stays in the foreground. */
|
|
12
|
+
const VALUE_TONES = {
|
|
13
|
+
alert: 'text-tone-attention-fg',
|
|
14
|
+
awaitingCrew: 'text-tone-waiting-fg',
|
|
15
|
+
blocked: 'text-tone-blocked-fg',
|
|
16
|
+
working: 'text-tone-active-fg',
|
|
17
|
+
idle: '',
|
|
18
|
+
};
|
|
19
|
+
function HarbourNumber({ value, word, testId, valueTone, card }) {
|
|
20
|
+
return (_jsxs("div", { "data-testid": testId, className: classNames('flex min-w-0 flex-col gap-0.5 rounded-lg border border-border bg-card px-3 py-2.5 @max-[35rem]:items-center @max-[35rem]:px-1 @max-[35rem]:py-2 @max-[35rem]:text-center', card), children: [value === undefined ? (_jsx("span", { "aria-hidden": true, className: "block h-8 w-10 animate-pulse rounded-md bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none @max-[35rem]:size-6.5" })) : (_jsx("span", { className: classNames('text-[28px] leading-8.5 font-semibold text-foreground tabular-nums @max-[35rem]:text-[22px] @max-[35rem]:leading-6.5', valueTone), children: value })), word] }));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The word under a number, smaller when Harbour is narrow; "Awaiting crew" may wrap there (Thomas, 3 Nov).
|
|
24
|
+
* On a phone (under 24rem) six numbers leave no room for an icon beside a word: the icon sits above it.
|
|
25
|
+
*/
|
|
26
|
+
const WORD = 'min-w-0 items-start @max-[35rem]:gap-0.75 @max-[35rem]:text-[11px] @max-[35rem]:leading-3.5 [&_svg]:mt-0.5 @max-[35rem]:[&_svg]:mt-px @max-[35rem]:[&_svg]:size-3 @max-[24rem]:flex-col @max-[24rem]:items-center';
|
|
27
|
+
/**
|
|
28
|
+
* Harbour's numbers (docs/design/fleet-overview, docs/design/state-colours):
|
|
29
|
+
* the ships, then Alert, Awaiting crew, Blocked, Working and Idle, each a
|
|
30
|
+
* ShipState in its tone; only Alert is filled, and a number at 0 carries no
|
|
31
|
+
* tone at all. Large numbers, small ones when Harbour is narrow (under
|
|
32
|
+
* 35rem: a phone, Bridge's column at 1440). Undefined draws the shape that
|
|
33
|
+
* is coming.
|
|
34
|
+
*/
|
|
35
|
+
export function HarbourNumbers({ counts }) {
|
|
36
|
+
return (_jsx("div", { className: "@container min-w-0", "data-testid": "harbour-numbers", children: _jsxs("div", { className: "grid grid-cols-6 gap-3 @max-[35rem]:gap-1.5", children: [_jsx(HarbourNumber, { value: counts?.ships, word: _jsxs("span", { className: classNames('inline-flex gap-1.25 text-meta font-medium text-muted-foreground', WORD), children: [_jsx(Ship, { "aria-hidden": true, className: "size-3.5 shrink-0" }), "Ships"] }), testId: "harbour-number-ships" }), STATES.map((state) => {
|
|
37
|
+
const value = counts?.[state];
|
|
38
|
+
const isToned = value !== undefined && value > 0;
|
|
39
|
+
return (_jsx(HarbourNumber, { value: value, word: _jsx(ShipState, { state: state, className: classNames(WORD, isToned ? undefined : NO_TONE) }), testId: `harbour-number-${state}`, valueTone: isToned ? VALUE_TONES[state] : undefined, card: isToned && state === 'alert' ? ALERT_CARD : undefined }, state));
|
|
40
|
+
})] }) }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=harbour-numbers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harbour-numbers.js","sourceRoot":"","sources":["../../src/molecules/harbour-numbers.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,gGAAgG;AAChG,MAAM,MAAM,GAA4B,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAEhG,6FAA6F;AAC7F,MAAM,OAAO,GAAG,uBAAuB,CAAC;AAExC,0CAA0C;AAC1C,MAAM,UAAU,GAAG,mDAAmD,CAAC;AAEvE,gGAAgG;AAChG,MAAM,WAAW,GAAiC;IAChD,KAAK,EAAE,wBAAwB;IAC/B,YAAY,EAAE,sBAAsB;IACpC,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,qBAAqB;IAC9B,IAAI,EAAE,E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AS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAI,EAC7F,MAAM,EAAE,kBAAkB,KAAK,EAAE,EACjC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EACnD,IAAI,EAAE,OAAO,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,IALtD,KAAK,CAMV,CACH,CAAC;gBACJ,CAAC,CAAC,IACE,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type LucideIcon } from 'lucide-react';
|
|
2
|
+
/**
|
|
3
|
+
* Harbour's groups (docs/design/fleet-overview), shared by its groups and
|
|
4
|
+
* tiles. A ship's state shows through ShipState, as everywhere else.
|
|
5
|
+
*/
|
|
6
|
+
/** Harbour's groups, in the order it shows them: People, Agents, Plugins, Through the gateway. */
|
|
7
|
+
export declare const HARBOUR_GROUP_KINDS: readonly ["people", "agents", "plugins", "gateway"];
|
|
8
|
+
export type HarbourGroupKind = (typeof HARBOUR_GROUP_KINDS)[number];
|
|
9
|
+
export declare const HARBOUR_GROUP_LOOK: Record<HarbourGroupKind, {
|
|
10
|
+
word: string;
|
|
11
|
+
Icon: LucideIcon;
|
|
12
|
+
kindWord: string;
|
|
13
|
+
KindIcon: LucideIcon;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Network, Plug, SquareTerminal, User, Users } from 'lucide-react';
|
|
2
|
+
/**
|
|
3
|
+
* Harbour's groups (docs/design/fleet-overview), shared by its groups and
|
|
4
|
+
* tiles. A ship's state shows through ShipState, as everywhere else.
|
|
5
|
+
*/
|
|
6
|
+
/** Harbour's groups, in the order it shows them: People, Agents, Plugins, Through the gateway. */
|
|
7
|
+
export const HARBOUR_GROUP_KINDS = ['people', 'agents', 'plugins', 'gateway'];
|
|
8
|
+
export const HARBOUR_GROUP_LOOK = {
|
|
9
|
+
people: { word: 'People', Icon: Users, kindWord: 'Person', KindIcon: User },
|
|
10
|
+
agents: {
|
|
11
|
+
word: 'Agents',
|
|
12
|
+
Icon: SquareTerminal,
|
|
13
|
+
kindWord: 'Agent',
|
|
14
|
+
KindIcon: SquareTerminal,
|
|
15
|
+
},
|
|
16
|
+
plugins: { word: 'Plugins', Icon: Plug, kindWord: 'Plugin', KindIcon: Plug },
|
|
17
|
+
gateway: {
|
|
18
|
+
word: 'Through the gateway',
|
|
19
|
+
Icon: Network,
|
|
20
|
+
kindWord: 'Through the gateway',
|
|
21
|
+
KindIcon: Network,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=harbour-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harbour-state.js","sourceRoot":"","sources":["../../src/molecules/harbour-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAmB,MAAM,cAAc,CAAC;AAE3F;;;GAGG;AAEH,kGAAkG;AAClG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AAIvF,MAAM,CAAC,MAAM,kBAAkB,GAAyG;IACtI,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3E,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,cAAc;KACzB;IACD,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5E,OAAO,EAAE;QACP,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,qBAAqB;QAC/B,QAAQ,EAAE,OAAO;KAClB;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HarbourOutput } from '@aeolus-fleet/common';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { type HarbourGroupKind } from './harbour-state.js';
|
|
4
|
+
/** A ship as its tile shows it: `fleet.harbour`'s tile, its group saying its kind. */
|
|
5
|
+
export type HarbourTileShip = Pick<HarbourOutput['items'][number], 'id' | 'name' | 'state' | 'note' | 'lastActivityAt'>;
|
|
6
|
+
export interface HarbourTileProps {
|
|
7
|
+
ship: HarbourTileShip;
|
|
8
|
+
/** The group the tile sits in: its kind icon. */
|
|
9
|
+
kind: HarbourGroupKind;
|
|
10
|
+
/** The ship's page; none draws a tile that is not a link. */
|
|
11
|
+
href?: string;
|
|
12
|
+
/** The app's link, such as Next.js's Link, through Base UI's render prop; a plain anchor without one. */
|
|
13
|
+
link?: useRender.RenderProp;
|
|
14
|
+
/** The time the last activity is measured from. */
|
|
15
|
+
now: Date;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* One ship on Harbour (docs/design/fleet-overview, "The tile"), the same in
|
|
19
|
+
* the console and Bridge: its kind, its whole name, what it is doing (its
|
|
20
|
+
* report's note, two lines), its state and when it last did something. With
|
|
21
|
+
* an href it opens the ship's page, the arrow showing on hover and focus. A
|
|
22
|
+
* working ship's tile carries the live band in Sea, which stands still under
|
|
23
|
+
* reduced motion. The title holds "name: note" for the note cut short.
|
|
24
|
+
*/
|
|
25
|
+
export declare function HarbourTile({ ship, kind, href, link, now }: HarbourTileProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { ArrowUpRight } from 'lucide-react';
|
|
5
|
+
import { ShipState, shipStateWordOf } from '../atoms/ship-state.js';
|
|
6
|
+
import { classNames } from '../class-names.js';
|
|
7
|
+
import { lastActivityWordsOf } from './harbour-activity.js';
|
|
8
|
+
import { HARBOUR_GROUP_LOOK } from './harbour-state.js';
|
|
9
|
+
/** A tile is filled in its state's tone (docs/design/state-colours); Idle stays plain, so colour marks only what is going on. */
|
|
10
|
+
const TILE_TONES = {
|
|
11
|
+
alert: 'border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg',
|
|
12
|
+
awaitingCrew: 'border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg',
|
|
13
|
+
blocked: 'border-tone-blocked-border bg-tone-blocked-bg text-tone-blocked-fg',
|
|
14
|
+
working: 'border-tone-active-border bg-tone-active-bg text-tone-active-fg',
|
|
15
|
+
idle: 'border-border bg-card text-muted-foreground',
|
|
16
|
+
};
|
|
17
|
+
/** On a link, hover and press give the border the state's colour. */
|
|
18
|
+
const LINK_TONES = {
|
|
19
|
+
alert: 'hover:border-tone-attention-fg active:border-tone-attention-fg',
|
|
20
|
+
awaitingCrew: 'hover:border-tone-waiting-fg active:border-tone-waiting-fg',
|
|
21
|
+
blocked: 'hover:border-tone-blocked-fg active:border-tone-blocked-fg',
|
|
22
|
+
working: 'hover:border-tone-active-fg active:border-tone-active-fg',
|
|
23
|
+
idle: 'hover:border-muted-foreground active:border-muted-foreground',
|
|
24
|
+
};
|
|
25
|
+
const TILE = 'relative grid h-full min-h-28 min-w-0 grid-rows-[auto_1fr_auto] gap-1 overflow-hidden rounded-md border px-3 py-2.5 no-underline';
|
|
26
|
+
/** A link lifts a little on hover with a soft shadow; pressed, it sits down again. Reduced motion: nothing moves. */
|
|
27
|
+
const LINK = 'group cursor-pointer transition-[border-color,box-shadow,transform] duration-(--duration-fast) outline-none hover:-translate-y-px hover:shadow-[0_2px_8px_-2px_color-mix(in_oklch,var(--foreground)_18%,transparent)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:translate-y-0 active:shadow-none motion-reduce:transition-none motion-reduce:hover:translate-y-0';
|
|
28
|
+
/**
|
|
29
|
+
* One ship on Harbour (docs/design/fleet-overview, "The tile"), the same in
|
|
30
|
+
* the console and Bridge: its kind, its whole name, what it is doing (its
|
|
31
|
+
* report's note, two lines), its state and when it last did something. With
|
|
32
|
+
* an href it opens the ship's page, the arrow showing on hover and focus. A
|
|
33
|
+
* working ship's tile carries the live band in Sea, which stands still under
|
|
34
|
+
* reduced motion. The title holds "name: note" for the note cut short.
|
|
35
|
+
*/
|
|
36
|
+
export function HarbourTile({ ship, kind, href, link, now }) {
|
|
37
|
+
const { name, state, note } = ship;
|
|
38
|
+
const { kindWord, KindIcon } = HARBOUR_GROUP_LOOK[kind];
|
|
39
|
+
const isLink = href !== undefined;
|
|
40
|
+
const content = (_jsxs(_Fragment, { children: [_jsxs("span", { className: "flex min-w-0 items-start gap-2 pr-4.5", children: [_jsx("span", { "data-testid": "harbour-tile-kind", title: kindWord, className: classNames('inline-flex size-5.5 shrink-0 items-center justify-center rounded-md border bg-card/70', state === 'idle' ? 'border-border' : 'border-current/25'), children: _jsx(KindIcon, { "aria-hidden": true, className: "size-3.25" }) }), _jsx("span", { className: "min-w-0 pt-0.5 text-meta leading-4.5 font-semibold wrap-anywhere text-foreground", children: name })] }), isLink ? (_jsx("span", { className: "absolute top-2.25 right-2.25 inline-flex text-muted-foreground opacity-0 transition-opacity duration-(--duration-fast) group-hover:opacity-100 group-focus-visible:opacity-100 motion-reduce:transition-none", children: _jsx(ArrowUpRight, { "aria-hidden": true, className: "size-3.5" }) })) : null, _jsx("span", { className: "line-clamp-2 text-caption leading-4 text-muted-foreground", children: note }), _jsxs("span", { className: "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", children: [_jsx(ShipState, { state: state, size: "caption" }), _jsx("span", { "data-testid": "harbour-tile-age", className: "text-caption whitespace-nowrap text-muted-foreground", children: lastActivityWordsOf(ship.lastActivityAt, now) })] }), state === 'working' ? (_jsx("i", { "data-testid": "harbour-tile-live", "aria-hidden": true, className: "absolute inset-x-0 bottom-0 h-0.5 animate-live-band bg-[linear-gradient(90deg,transparent,var(--live-band),transparent)] bg-size-[40%_100%] bg-no-repeat opacity-70 motion-reduce:animate-none motion-reduce:bg-live-band motion-reduce:bg-none motion-reduce:opacity-35" })) : null] }));
|
|
41
|
+
return useRender({
|
|
42
|
+
defaultTagName: isLink ? 'a' : 'div',
|
|
43
|
+
render: isLink ? link : undefined,
|
|
44
|
+
props: {
|
|
45
|
+
'data-testid': 'harbour-tile',
|
|
46
|
+
'data-state': state,
|
|
47
|
+
title: `${name}: ${note ?? shipStateWordOf(state)}`,
|
|
48
|
+
className: classNames(TILE, TILE_TONES[state], isLink ? classNames(LINK, LINK_TONES[state]) : undefined),
|
|
49
|
+
...(isLink ? { href } : {}),
|
|
50
|
+
children: content,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=harbour-tile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harbour-tile.js","sourceRoot":"","sources":["../../src/molecules/harbour-tile.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAyB,MAAM,oBAAoB,CAAC;AAK/E,iIAAiI;AACjI,MAAM,UAAU,GAAiC;IAC/C,KAAK,EAAE,0EAA0E;IACjF,YAAY,EAAE,oEAAoE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,GAAQ,EACzF,gBAAM,SAAS,EAAC,+DAA+D,aAC7E,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAC,SAAS,GAAG,EAC1C,8BAAkB,kBAAkB,EAAC,SAAS,EAAC,sDAAsD,YAClG,mBAAmB,CAAC,IAAI,CAAC,cAAc,EAAE,GAAG,CAAC,GACzC,IACF,EACN,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CACrB,2BACc,mBAAmB,uBAE/B,SAAS,EAAC,0QAA0Q,GACpR,CACH,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,CAAC;IACF,OAAO,SAAS,CAAC;QACf,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK;QACpC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QACjC,KAAK,EAAE;YACL,aAAa,EAAE,cAAc;YAC7B,YAAY,EAAE,KAAK;YACnB,KAAK,EAAE,GAAG,IAAI,KAAK,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YACnD,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACxG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3B,QAAQ,EAAE,OAAO;SAClB;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -4,24 +4,30 @@ import { type AvatarMenuProps } from '../molecules/avatar-menu.js';
|
|
|
4
4
|
interface AppHeaderProps {
|
|
5
5
|
/** Undefined while the fleet in view is not known yet: the title's shape stands in. */
|
|
6
6
|
switcher: AppSwitcherModel | undefined;
|
|
7
|
-
/**
|
|
8
|
-
|
|
7
|
+
/** full: "Acme / Console ▾"; fleet: "Acme" alone, for an app whose breadcrumb follows the fleet. */
|
|
8
|
+
switcherLayout?: 'full' | 'fleet';
|
|
9
|
+
/** The avatar menu, always last; unset, the app shows it elsewhere, such as in its sidebar foot. */
|
|
10
|
+
account?: AvatarMenuProps;
|
|
9
11
|
/** Opens the command palette; without it the search trigger is not shown. */
|
|
10
12
|
onSearch?: () => void;
|
|
11
13
|
/** The search trigger's words: "Search ships or jump to". */
|
|
12
14
|
searchLabel?: string;
|
|
15
|
+
/** trigger: a button with the ⌘K hint, after the app's controls. field: shaped as a search field, before them. */
|
|
16
|
+
search?: 'trigger' | 'field';
|
|
13
17
|
/** The app's own part after the title, such as a breadcrumb. */
|
|
14
18
|
children?: ReactNode;
|
|
15
|
-
/** The app's own controls
|
|
19
|
+
/** The app's own controls beside the search, such as a live status or Compose. */
|
|
16
20
|
actions?: ReactNode;
|
|
17
21
|
className?: string;
|
|
18
22
|
}
|
|
19
23
|
/**
|
|
20
24
|
* The header every Aeolus web app shows on desktop (header design H1 to H13),
|
|
21
|
-
* 56 px: the switcher in the title ("Acme / Console ▾"
|
|
22
|
-
* after it, then the app's controls, the command palette's
|
|
23
|
-
* with its ⌘K hint
|
|
24
|
-
*
|
|
25
|
+
* 56 px: the switcher in the title ("Acme / Console ▾", or "Acme" alone), the
|
|
26
|
+
* app's own part after it, then the app's controls, the command palette's
|
|
27
|
+
* search trigger with its ⌘K hint (or a search field before the controls,
|
|
28
|
+
* as the console draws it: docs/design/fleet-overview), and the avatar menu
|
|
29
|
+
* unless the app shows it elsewhere. Each app's own bar takes the header on
|
|
30
|
+
* phone, with the switcher compact (H6).
|
|
25
31
|
*/
|
|
26
|
-
export declare function AppHeader({ switcher, account, onSearch, searchLabel, children, actions, className }: AppHeaderProps): import("react").JSX.Element;
|
|
32
|
+
export declare function AppHeader({ switcher, switcherLayout, account, onSearch, searchLabel, search, children, actions, className }: AppHeaderProps): import("react").JSX.Element;
|
|
27
33
|
export {};
|
|
@@ -7,12 +7,15 @@ import { AvatarMenu } from '../molecules/avatar-menu.js';
|
|
|
7
7
|
import { classNames } from '../class-names.js';
|
|
8
8
|
/**
|
|
9
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 ▾"
|
|
11
|
-
* after it, then the app's controls, the command palette's
|
|
12
|
-
* with its ⌘K hint
|
|
13
|
-
*
|
|
10
|
+
* 56 px: the switcher in the title ("Acme / Console ▾", or "Acme" alone), the
|
|
11
|
+
* app's own part after it, then the app's controls, the command palette's
|
|
12
|
+
* search trigger with its ⌘K hint (or a search field before the controls,
|
|
13
|
+
* as the console draws it: docs/design/fleet-overview), and the avatar menu
|
|
14
|
+
* unless the app shows it elsewhere. Each app's own bar takes the header on
|
|
15
|
+
* phone, with the switcher compact (H6).
|
|
14
16
|
*/
|
|
15
|
-
export function AppHeader({ switcher, account, onSearch, searchLabel = 'Search or jump to', children, actions, className }) {
|
|
16
|
-
|
|
17
|
+
export function AppHeader({ switcher, switcherLayout = 'full', account, onSearch, searchLabel = 'Search or jump to', search = 'trigger', children, actions, className }) {
|
|
18
|
+
const searchTrigger = onSearch ? (search === 'field' ? (_jsx(Button, { variant: "secondary", size: "md", icon: _jsx(Search, { "aria-hidden": true }), "data-testid": "header-search", onClick: onSearch, className: "w-50 justify-start font-normal text-muted-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring", children: _jsx("span", { className: "truncate", children: searchLabel }) })) : (_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;
|
|
19
|
+
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: switcherLayout, className: "shrink-0" })), children] }), _jsxs("div", { className: "flex shrink-0 items-center gap-3", children: [search === 'field' ? searchTrigger : null, actions, search === 'trigger' ? searchTrigger : null, account === undefined ? null : _jsx(AvatarMenu, { ...account })] })] }));
|
|
17
20
|
}
|
|
18
21
|
//# sourceMappingURL=app-header.js.map
|
|
@@ -1 +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;
|
|
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;AAsB/C;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EA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MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAC3C,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,UAAU,OAAK,OAAO,GAAI,IACvD,IACC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ShipId } from '@aeolus-fleet/common';
|
|
2
|
+
import type { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import { type HarbourCounts } from '../molecules/harbour-numbers.js';
|
|
5
|
+
import type { HarbourGroupKind } from '../molecules/harbour-state.js';
|
|
6
|
+
import type { HarbourTileShip } from '../molecules/harbour-tile.js';
|
|
7
|
+
/** One of Harbour's groups as the app hands it: its kind and its tiles, in the order to show. */
|
|
8
|
+
export interface HarbourGroupShips {
|
|
9
|
+
kind: HarbourGroupKind;
|
|
10
|
+
tiles: readonly HarbourTileShip[];
|
|
11
|
+
}
|
|
12
|
+
export interface HarbourProps {
|
|
13
|
+
/** The numbers; undefined draws their loading shape. */
|
|
14
|
+
counts: HarbourCounts | undefined;
|
|
15
|
+
/** The groups with a ship, in order; undefined draws the loading shape. */
|
|
16
|
+
groups: readonly HarbourGroupShips[] | undefined;
|
|
17
|
+
/** The time each tile's last activity is measured from. */
|
|
18
|
+
now: Date;
|
|
19
|
+
/** Each ship's page; none draws tiles that are not links. */
|
|
20
|
+
hrefOf?: (shipId: ShipId) => string;
|
|
21
|
+
/** The app's link for the tiles, such as Next.js's Link, through Base UI's render prop. */
|
|
22
|
+
link?: useRender.RenderProp;
|
|
23
|
+
/** Between the numbers and the groups: the console's filter bar; Bridge passes none. */
|
|
24
|
+
between?: ReactNode;
|
|
25
|
+
/** Stands in for the groups when there are none: no match, argo alone. */
|
|
26
|
+
empty?: ReactNode;
|
|
27
|
+
state: 'ready' | 'loading' | 'error';
|
|
28
|
+
/** The failed read's technical reason, in mono. */
|
|
29
|
+
errorDetail?: string;
|
|
30
|
+
onRetry: () => void;
|
|
31
|
+
/** A new result is coming: the groups shown are the previous one, dimmed. */
|
|
32
|
+
isUpdating?: boolean;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Harbour (docs/design/fleet-overview), the fleet overview the console and
|
|
36
|
+
* Bridge share: the numbers on top, then what the app puts between (the
|
|
37
|
+
* console's filter bar), then one tile per ship grouped People, Agents,
|
|
38
|
+
* Plugins and Through the gateway. Props only: each app reads the fleet its
|
|
39
|
+
* own way. It lays itself out by its own width, not the window's (a
|
|
40
|
+
* container query), so the same part fits the console's page and Bridge's
|
|
41
|
+
* column. While the fleet is read, the shape that is coming; when the read
|
|
42
|
+
* fails, what went wrong and Try again.
|
|
43
|
+
*/
|
|
44
|
+
export declare function Harbour({ counts, groups, now, hrefOf, link, between, empty, state, errorDetail, onRetry, isUpdating }: HarbourProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CircleAlert, RotateCw } from 'lucide-react';
|
|
4
|
+
import { Button } from '../atoms/button.js';
|
|
5
|
+
import { classNames } from '../class-names.js';
|
|
6
|
+
import { HarbourGroup } from '../molecules/harbour-group.js';
|
|
7
|
+
import { HarbourNumbers } from '../molecules/harbour-numbers.js';
|
|
8
|
+
/** The shape of the tiles that are coming, while the fleet is read. */
|
|
9
|
+
const LOADING_TILES = ['first', 'second', 'third', 'fourth'];
|
|
10
|
+
function HarbourLoading() {
|
|
11
|
+
return (_jsxs("div", { className: "flex flex-col gap-2", "data-testid": "harbour-loading", "aria-hidden": true, children: [_jsx("span", { className: "h-4 w-30 animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none" }), _jsx("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(14rem,1fr))] gap-2 @max-[24rem]:grid-cols-2", children: LOADING_TILES.map((key) => (_jsx("span", { className: "min-h-28 animate-pulse rounded-md bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none" }, key))) })] }));
|
|
12
|
+
}
|
|
13
|
+
function HarbourError({ detail, onRetry }) {
|
|
14
|
+
return (_jsxs("div", { role: "alert", "data-testid": "harbour-error", className: "flex items-start gap-2.5 rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3 py-2.5 text-tone-attention-fg", children: [_jsx(CircleAlert, { "aria-hidden": true, className: "mt-0.5 size-4 shrink-0" }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("p", { className: "text-meta font-semibold text-foreground", children: "Couldn\u2019t read the fleet" }), _jsxs("p", { className: "text-meta text-foreground", children: ["Nothing changed. The page tries again by itself", detail === undefined ? '.' : '; ', detail === undefined ? null : _jsx("code", { className: "font-mono text-code wrap-anywhere", children: detail })] })] }), _jsx(Button, { size: "xs", icon: _jsx(RotateCw, { "aria-hidden": true }), onClick: onRetry, "data-testid": "harbour-retry", children: "Try again" })] }));
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Harbour (docs/design/fleet-overview), the fleet overview the console and
|
|
18
|
+
* Bridge share: the numbers on top, then what the app puts between (the
|
|
19
|
+
* console's filter bar), then one tile per ship grouped People, Agents,
|
|
20
|
+
* Plugins and Through the gateway. Props only: each app reads the fleet its
|
|
21
|
+
* own way. It lays itself out by its own width, not the window's (a
|
|
22
|
+
* container query), so the same part fits the console's page and Bridge's
|
|
23
|
+
* column. While the fleet is read, the shape that is coming; when the read
|
|
24
|
+
* fails, what went wrong and Try again.
|
|
25
|
+
*/
|
|
26
|
+
export function Harbour({ counts, groups, now, hrefOf, link, between, empty, state, errorDetail, onRetry, isUpdating = false }) {
|
|
27
|
+
const body = state === 'error' ? (_jsx(HarbourError, { detail: errorDetail, onRetry: onRetry })) : state === 'loading' || groups === undefined ? (_jsx(HarbourLoading, {})) : groups.length === 0 ? (empty) : (_jsx("div", { className: classNames('flex flex-col gap-3.5 transition-opacity duration-(--duration-fast) motion-reduce:transition-none', isUpdating ? 'opacity-55' : undefined), "aria-busy": isUpdating, "data-testid": "harbour-groups", children: groups.map(({ kind, tiles }) => (_jsx(HarbourGroup, { kind: kind, tiles: tiles, hrefOf: hrefOf, link: link, now: now }, kind))) }));
|
|
28
|
+
return (_jsxs("section", { "aria-label": "Harbour", className: "@container flex min-w-0 flex-col gap-3.5", "data-testid": "harbour", children: [state === 'error' && counts === undefined ? null : _jsx(HarbourNumbers, { counts: state === 'loading' ? undefined : counts }), between, body] }));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=harbour.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harbour.js","sourceRoot":"","sources":["../../src/organisms/harbour.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAsB,MAAM,iCAAiC,CAAC;AAiCrF,uEAAuE;AACvE,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAEtE,SAAS,cAAc;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,qBAAqB,iBAAa,iBAAiB,kCAChE,eAAM,SAAS,EAAC,sHAAsH,GAAG,EACzI,cAAK,SAAS,EAAC,qFAAqF,YACjG,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAC1B,eAAgB,SAAS,EAAC,sHAAsH,IAArI,GAAG,CAAqI,CACpJ,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,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AC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,eAAa,UAAU,iBAAc,gBAAgB,YACxN,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC/B,KAAC,YAAY,IAAY,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,IAApE,IAAI,CAAoE,CAC5F,CAAC,GACE,CACP,CAAC;IACJ,OAAO,CACL,iCAAoB,SAAS,EAAC,SAAS,EAAC,0CAA0C,iBAAa,SAAS,aAErG,KAAK,KAAK,OAAO,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,MAAM,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,GAAI,EACvH,OAAO,EACP,IAAI,IACG,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The six backgrounds of the signed-out screens
|
|
3
|
-
* docs/design/sign-in-backgrounds/mockup.html: the sea seen from above with
|
|
2
|
+
* The six backgrounds of the signed-out screens: the sea seen from above with
|
|
4
3
|
* single ships, and in five of them squadrons sailing among them. Each draws
|
|
5
4
|
* the same every time from its seeds, on a 1600 by 1000 canvas; one is picked
|
|
6
5
|
* at random when a screen loads.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The six backgrounds of the signed-out screens
|
|
3
|
-
* docs/design/sign-in-backgrounds/mockup.html: the sea seen from above with
|
|
2
|
+
* The six backgrounds of the signed-out screens: the sea seen from above with
|
|
4
3
|
* single ships, and in five of them squadrons sailing among them. Each draws
|
|
5
4
|
* the same every time from its seeds, on a 1600 by 1000 canvas; one is picked
|
|
6
5
|
* at random when a screen loads.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sign-in-backgrounds.js","sourceRoot":"","sources":["../../src/organisms/sign-in-backgrounds.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sign-in-backgrounds.js","sourceRoot":"","sources":["../../src/organisms/sign-in-backgrounds.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,CAAU,CAAC;AAIxI,6GAA6G;AAC7G,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAW,CAAC;AAErE,+DAA+D;AAC/D,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAAC,MAAM,GAAG,aAAa,CAAC;AAErE,uEAAuE;AACvE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AA2BtC,MAAM,UAAU,GAAG,EAAE,CAAC;AACtB,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,MAAM,gBAAgB,GAAoB;IACxC,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,CAAC;IAChJ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CA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,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC9L,CAAC,CAAC,CAAC;IACH,MAAM,MAAM,GAAe,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzN,OAAO,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,OAAO,CAAC,OAAe;IAC9B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;AACnC,CAAC"}
|
package/dist/theme.css
CHANGED
|
@@ -48,6 +48,9 @@
|
|
|
48
48
|
--color-tone-active-bg: var(--tone-active-bg);
|
|
49
49
|
--color-tone-active-fg: var(--tone-active-fg);
|
|
50
50
|
--color-tone-active-border: var(--tone-active-border);
|
|
51
|
+
--color-tone-blocked-bg: var(--tone-blocked-bg);
|
|
52
|
+
--color-tone-blocked-fg: var(--tone-blocked-fg);
|
|
53
|
+
--color-tone-blocked-border: var(--tone-blocked-border);
|
|
51
54
|
--color-tone-ok-bg: var(--tone-ok-bg);
|
|
52
55
|
--color-tone-ok-fg: var(--tone-ok-fg);
|
|
53
56
|
--color-tone-ok-border: var(--tone-ok-border);
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
--color-tone-ended-bg: var(--tone-ended-bg);
|
|
58
61
|
--color-tone-ended-fg: var(--tone-ended-fg);
|
|
59
62
|
--color-tone-ended-border: var(--tone-ended-border);
|
|
63
|
+
--color-live-band: var(--live-band);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
@theme {
|
|
@@ -112,6 +116,18 @@
|
|
|
112
116
|
background-color: var(--highlight);
|
|
113
117
|
}
|
|
114
118
|
}
|
|
119
|
+
|
|
120
|
+
/* A working ship's Harbour tile: a band of light runs along its foot (docs/design/fleet-overview). */
|
|
121
|
+
--animate-live-band: live-band 2.4s linear infinite;
|
|
122
|
+
|
|
123
|
+
@keyframes live-band {
|
|
124
|
+
from {
|
|
125
|
+
background-position: -60% 0;
|
|
126
|
+
}
|
|
127
|
+
to {
|
|
128
|
+
background-position: 160% 0;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
115
131
|
}
|
|
116
132
|
|
|
117
133
|
@layer base {
|
package/dist/tokens.css
CHANGED
|
@@ -20,21 +20,26 @@
|
|
|
20
20
|
--primary-foreground:oklch(0.985 0.003 247);
|
|
21
21
|
--destructive:oklch(0.53 0.2 27);
|
|
22
22
|
--destructive-foreground:oklch(0.99 0 0);
|
|
23
|
-
--tone-waiting-bg
|
|
24
|
-
--tone-waiting-fg
|
|
25
|
-
--tone-waiting-border
|
|
26
|
-
--tone-active-bg
|
|
27
|
-
--tone-active-fg
|
|
28
|
-
--tone-active-border
|
|
23
|
+
--tone-waiting-bg:#FDF4E1;
|
|
24
|
+
--tone-waiting-fg:#8A5300;
|
|
25
|
+
--tone-waiting-border:#F0D198;
|
|
26
|
+
--tone-active-bg:#E8F6FB;
|
|
27
|
+
--tone-active-fg:#0B6A88;
|
|
28
|
+
--tone-active-border:#A6DAEB;
|
|
29
|
+
--tone-blocked-bg:#F3EEFC;
|
|
30
|
+
--tone-blocked-fg:#6B3FB8;
|
|
31
|
+
--tone-blocked-border:#D3C3F2;
|
|
29
32
|
--tone-ok-bg:oklch(0.96 0.04 155);
|
|
30
33
|
--tone-ok-fg:oklch(0.44 0.1 155);
|
|
31
34
|
--tone-ok-border:oklch(0.86 0.07 155);
|
|
32
|
-
--tone-attention-bg
|
|
33
|
-
--tone-attention-fg
|
|
34
|
-
--tone-attention-border
|
|
35
|
+
--tone-attention-bg:#FFEEE9;
|
|
36
|
+
--tone-attention-fg:#AE3820;
|
|
37
|
+
--tone-attention-border:#FFC2B2;
|
|
35
38
|
--tone-ended-bg:oklch(0.957 0.005 247);
|
|
36
39
|
--tone-ended-fg:oklch(0.47 0.015 257);
|
|
37
40
|
--tone-ended-border:oklch(0.87 0.01 247);
|
|
41
|
+
/* A working ship's live band: Sea itself, both modes, where nothing is read (docs/design/state-colours, "The brand's colours"). */
|
|
42
|
+
--live-band:#2BA3C9;
|
|
38
43
|
--card-foreground:var(--foreground);
|
|
39
44
|
--popover-foreground:var(--foreground);
|
|
40
45
|
--secondary-foreground:var(--foreground);
|
|
@@ -135,18 +140,21 @@
|
|
|
135
140
|
--primary-foreground:oklch(0.21 0.035 257);
|
|
136
141
|
--destructive:oklch(0.56 0.19 25);
|
|
137
142
|
--destructive-foreground:oklch(0.99 0 0);
|
|
138
|
-
--tone-waiting-bg
|
|
139
|
-
--tone-waiting-fg
|
|
140
|
-
--tone-waiting-border
|
|
141
|
-
--tone-active-bg
|
|
142
|
-
--tone-active-fg
|
|
143
|
-
--tone-active-border
|
|
143
|
+
--tone-waiting-bg:#33280F;
|
|
144
|
+
--tone-waiting-fg:#F3C46C;
|
|
145
|
+
--tone-waiting-border:#6E5119;
|
|
146
|
+
--tone-active-bg:#0E2C37;
|
|
147
|
+
--tone-active-fg:#85D3EC;
|
|
148
|
+
--tone-active-border:#1F5E72;
|
|
149
|
+
--tone-blocked-bg:#2A2142;
|
|
150
|
+
--tone-blocked-fg:#C9B1F7;
|
|
151
|
+
--tone-blocked-border:#523E86;
|
|
144
152
|
--tone-ok-bg:oklch(0.29 0.05 155);
|
|
145
153
|
--tone-ok-fg:oklch(0.86 0.1 155);
|
|
146
154
|
--tone-ok-border:oklch(0.41 0.07 155);
|
|
147
|
-
--tone-attention-bg
|
|
148
|
-
--tone-attention-fg
|
|
149
|
-
--tone-attention-border
|
|
155
|
+
--tone-attention-bg:#3A1E19;
|
|
156
|
+
--tone-attention-fg:#FFA58F;
|
|
157
|
+
--tone-attention-border:#7B3628;
|
|
150
158
|
--tone-ended-bg:oklch(0.255 0.01 257);
|
|
151
159
|
--tone-ended-fg:oklch(0.78 0.015 257);
|
|
152
160
|
--tone-ended-border:oklch(0.36 0.012 257);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeolus-fleet/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"description": "The UI parts every Aeolus web app shows: atoms, molecules and organisms, props only, and the design tokens.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aeolus"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"postpack": "rm LICENSE"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@aeolus-fleet/common": "0.
|
|
40
|
+
"@aeolus-fleet/common": "0.38.1",
|
|
41
41
|
"@base-ui/react": "^1.8.0",
|
|
42
42
|
"class-variance-authority": "^0.7.1",
|
|
43
43
|
"clsx": "^2.1.1",
|