@aeolus-fleet/ui 0.38.1 → 0.38.3
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/alert-dialog.d.ts +19 -0
- package/dist/atoms/alert-dialog.js +37 -0
- package/dist/atoms/alert-dialog.js.map +1 -0
- package/dist/atoms/badge.d.ts +13 -0
- package/dist/atoms/badge.js +32 -0
- package/dist/atoms/badge.js.map +1 -0
- package/dist/atoms/button.d.ts +2 -2
- package/dist/atoms/checkbox.d.ts +7 -0
- package/dist/atoms/checkbox.js +14 -0
- package/dist/atoms/checkbox.js.map +1 -0
- package/dist/atoms/separator.d.ts +6 -0
- package/dist/atoms/separator.js +12 -0
- package/dist/atoms/separator.js.map +1 -0
- package/dist/atoms/skeleton.d.ts +7 -0
- package/dist/atoms/skeleton.js +11 -0
- package/dist/atoms/skeleton.js.map +1 -0
- package/dist/atoms/tabs.d.ts +18 -0
- package/dist/atoms/tabs.js +49 -0
- package/dist/atoms/tabs.js.map +1 -0
- package/dist/atoms/toast.d.ts +28 -0
- package/dist/atoms/toast.js +38 -0
- package/dist/atoms/toast.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/molecules/empty-state.d.ts +21 -0
- package/dist/molecules/empty-state.js +18 -0
- package/dist/molecules/empty-state.js.map +1 -0
- package/dist/molecules/inline-error.d.ts +26 -0
- package/dist/molecules/inline-error.js +21 -0
- package/dist/molecules/inline-error.js.map +1 -0
- package/dist/molecules/loading-skeleton.d.ts +16 -0
- package/dist/molecules/loading-skeleton.js +18 -0
- package/dist/molecules/loading-skeleton.js.map +1 -0
- package/dist/molecules/status-badge.d.ts +29 -0
- package/dist/molecules/status-badge.js +81 -0
- package/dist/molecules/status-badge.js.map +1 -0
- package/dist/molecules/typed-confirm.d.ts +14 -0
- package/dist/molecules/typed-confirm.js +25 -0
- package/dist/molecules/typed-confirm.js.map +1 -0
- package/dist/organisms/scope-picker.d.ts +22 -0
- package/dist/organisms/scope-picker.js +24 -0
- package/dist/organisms/scope-picker.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';
|
|
2
|
+
import type { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import type { ComponentProps } from 'react';
|
|
4
|
+
import { dialogSurface } from './dialog-surface.js';
|
|
5
|
+
/**
|
|
6
|
+
* shadcn AlertDialog on Base UI: a confirm that the scrim does not dismiss
|
|
7
|
+
* (docs/design/png/Dialog.png). The title is the question, the body lists the
|
|
8
|
+
* consequences, the action names action and consequence. Focus starts on the
|
|
9
|
+
* safest button, Cancel.
|
|
10
|
+
*/
|
|
11
|
+
declare function AlertDialog(props: AlertDialogPrimitive.Root.Props): import("react").JSX.Element;
|
|
12
|
+
declare function AlertDialogTrigger(props: AlertDialogPrimitive.Trigger.Props): import("react").JSX.Element;
|
|
13
|
+
declare function AlertDialogClose(props: AlertDialogPrimitive.Close.Props): import("react").JSX.Element;
|
|
14
|
+
declare function AlertDialogContent({ className, size, children, ...props }: AlertDialogPrimitive.Popup.Props & VariantProps<typeof dialogSurface.popup>): import("react").JSX.Element;
|
|
15
|
+
declare function AlertDialogHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
16
|
+
declare function AlertDialogFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
17
|
+
declare function AlertDialogTitle({ className, ...props }: AlertDialogPrimitive.Title.Props): import("react").JSX.Element;
|
|
18
|
+
declare function AlertDialogDescription({ className, ...props }: AlertDialogPrimitive.Description.Props): import("react").JSX.Element;
|
|
19
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';
|
|
4
|
+
import { classNames } from '../class-names.js';
|
|
5
|
+
import { dialogSurface } from './dialog-surface.js';
|
|
6
|
+
/**
|
|
7
|
+
* shadcn AlertDialog on Base UI: a confirm that the scrim does not dismiss
|
|
8
|
+
* (docs/design/png/Dialog.png). The title is the question, the body lists the
|
|
9
|
+
* consequences, the action names action and consequence. Focus starts on the
|
|
10
|
+
* safest button, Cancel.
|
|
11
|
+
*/
|
|
12
|
+
function AlertDialog(props) {
|
|
13
|
+
return _jsx(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
14
|
+
}
|
|
15
|
+
function AlertDialogTrigger(props) {
|
|
16
|
+
return _jsx(AlertDialogPrimitive.Trigger, { "data-slot": "alert-dialog-trigger", ...props });
|
|
17
|
+
}
|
|
18
|
+
function AlertDialogClose(props) {
|
|
19
|
+
return _jsx(AlertDialogPrimitive.Close, { "data-slot": "alert-dialog-close", ...props });
|
|
20
|
+
}
|
|
21
|
+
function AlertDialogContent({ className, size, children, ...props }) {
|
|
22
|
+
return (_jsxs(AlertDialogPrimitive.Portal, { children: [_jsx(AlertDialogPrimitive.Backdrop, { "data-slot": "alert-dialog-overlay", className: dialogSurface.overlay }), _jsx(AlertDialogPrimitive.Popup, { "data-slot": "alert-dialog-content", className: classNames(dialogSurface.popup({ size }), className), ...props, children: children })] }));
|
|
23
|
+
}
|
|
24
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
25
|
+
return _jsx("div", { "data-slot": "alert-dialog-header", className: classNames(dialogSurface.header, className), ...props });
|
|
26
|
+
}
|
|
27
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
28
|
+
return _jsx("div", { "data-slot": "alert-dialog-footer", className: classNames(dialogSurface.footer, className), ...props });
|
|
29
|
+
}
|
|
30
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
31
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: classNames(dialogSurface.title, className), ...props }));
|
|
32
|
+
}
|
|
33
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
34
|
+
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: classNames(dialogSurface.description, className), ...props }));
|
|
35
|
+
}
|
|
36
|
+
export { AlertDialog, AlertDialogClose, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, };
|
|
37
|
+
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","sourceRoot":"","sources":["../../src/atoms/alert-dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAIlF,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;GAKG;AACH,SAAS,WAAW,CAAC,KAAsC;IACzD,OAAO,KAAC,oBAAoB,CAAC,IAAI,iBAAW,cAAc,KAAK,KAAK,GAAI,CAAC;AAC3E,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAyC;IACnE,OAAO,KAAC,oBAAoB,CAAC,OAAO,iBAAW,sBAAsB,KAAK,KAAK,GAAI,CAAC;AACtF,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAuC;IAC/D,OAAO,KAAC,oBAAoB,CAAC,KAAK,iBAAW,oBAAoB,KAAK,KAAK,GAAI,CAAC;AAClF,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACoE;IAC5E,OAAO,CACL,MAAC,oBAAoB,CAAC,MAAM,eAC1B,KAAC,oBAAoB,CAAC,QAAQ,iBAAW,sBAAsB,E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0,0 +1,13 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/**
|
|
4
|
+
* shadcn Badge, themed to docs/design/png/Badge.png. Neutral and outline for
|
|
5
|
+
* facts, type chips in mono, the operator kind chip on --highlight, counts as
|
|
6
|
+
* pills. Tone badges are StatusBadge, never built here by hand.
|
|
7
|
+
*/
|
|
8
|
+
declare const badgeVariants: (props?: ({
|
|
9
|
+
variant?: "type" | "kind" | "secondary" | "outline" | "count" | "count-neutral" | "count-attention" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
type BadgeProps = useRender.ComponentProps<'span'> & VariantProps<typeof badgeVariants>;
|
|
12
|
+
export declare function Badge({ className, variant, render, ...props }: BadgeProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { classNames } from '../class-names.js';
|
|
5
|
+
/**
|
|
6
|
+
* shadcn Badge, themed to docs/design/png/Badge.png. Neutral and outline for
|
|
7
|
+
* facts, type chips in mono, the operator kind chip on --highlight, counts as
|
|
8
|
+
* pills. Tone badges are StatusBadge, never built here by hand.
|
|
9
|
+
*/
|
|
10
|
+
const badgeVariants = cva('inline-flex w-fit shrink-0 items-center justify-center gap-1.5 border font-medium whitespace-nowrap [&>svg]:pointer-events-none [&>svg]:size-(--size-icon-sm)', {
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
secondary: 'h-5.5 rounded-sm border-transparent bg-secondary px-1.5 text-caption text-secondary-foreground',
|
|
14
|
+
outline: 'h-5.5 rounded-sm border-border bg-transparent px-1.5 text-caption text-foreground',
|
|
15
|
+
type: 'h-5.5 rounded-sm border-transparent bg-secondary px-1.5 font-mono text-id text-foreground',
|
|
16
|
+
kind: 'h-5.5 rounded-sm border-transparent bg-highlight px-1.5 font-mono text-id text-primary',
|
|
17
|
+
count: 'h-5 min-w-5 rounded-full border-transparent bg-primary px-1.5 text-micro font-semibold text-primary-foreground tabular-nums',
|
|
18
|
+
'count-neutral': 'h-5 min-w-5 rounded-full border-transparent bg-secondary px-1.5 text-micro font-semibold text-foreground tabular-nums',
|
|
19
|
+
'count-attention': 'h-5 min-w-5 rounded-full border-tone-attention-border bg-tone-attention-bg px-1.5 text-micro font-semibold text-tone-attention-fg tabular-nums',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: { variant: 'secondary' },
|
|
23
|
+
});
|
|
24
|
+
export function Badge({ className, variant, render, ...props }) {
|
|
25
|
+
return useRender({
|
|
26
|
+
defaultTagName: 'span',
|
|
27
|
+
props: mergeProps({ className: classNames(badgeVariants({ variant }), className) }, props),
|
|
28
|
+
render,
|
|
29
|
+
state: { slot: 'badge', variant },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/atoms/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,aAAa,GAAG,GAAG,CACvB,+JAA+J,EAC/J;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,SAAS,EAAE,gGAAgG;YAC3G,OAAO,EAAE,mFAAmF;YAC5F,IAAI,EAAE,2FAA2F;YACjG,IAAI,EAAE,wFAAwF;YAC9F,KAAK,EACH,6HAA6H;YAC/H,eAAe,EACb,uHAAuH;YACzH,iBAAiB,EACf,gJAAgJ;SACnJ;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;CAC1C,CACF,CAAC;AAIF,MAAM,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAc;IACxE,OAAO,SAAS,CAAC;QACf,cAAc,EAAE,MAAM;QACtB,KAAK,EAAE,UAAU,CAAS,EAAE,SAAS,EAAE,UAAU,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC;QAClG,MAAM;QACN,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE;KAClC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/atoms/button.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import type { ReactNode } from 'react';
|
|
|
7
7
|
* sizes. Icons sit spacing-2 from the label.
|
|
8
8
|
*/
|
|
9
9
|
declare const buttonVariants: (props?: ({
|
|
10
|
-
variant?: "
|
|
11
|
-
size?: "touch" | "
|
|
10
|
+
variant?: "secondary" | "primary" | "ghost" | "destructive" | null | undefined;
|
|
11
|
+
size?: "touch" | "sm" | "md" | "xs" | null | undefined;
|
|
12
12
|
isIconOnly?: boolean | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
type ButtonProps = ButtonPrimitive.Props & VariantProps<typeof buttonVariants> & {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
2
|
+
/**
|
|
3
|
+
* shadcn Checkbox on Base UI, themed to docs/design/png/Checkbox.png: one
|
|
4
|
+
* choice among several in a form. Checked fills with --primary. The label sits
|
|
5
|
+
* to the right, outside this atom. A single instant setting uses Switch.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
4
|
+
import { Check } from 'lucide-react';
|
|
5
|
+
import { classNames } from '../class-names.js';
|
|
6
|
+
/**
|
|
7
|
+
* shadcn Checkbox on Base UI, themed to docs/design/png/Checkbox.png: one
|
|
8
|
+
* choice among several in a form. Checked fills with --primary. The label sits
|
|
9
|
+
* to the right, outside this atom. A single instant setting uses Switch.
|
|
10
|
+
*/
|
|
11
|
+
export function Checkbox({ className, ...props }) {
|
|
12
|
+
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: classNames('peer inline-flex size-4 shrink-0 items-center justify-center rounded-sm border border-input bg-card text-primary-foreground transition-colors duration-(--duration-fast) outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring data-checked:border-primary data-checked:bg-primary data-disabled:opacity-45', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center", children: _jsx(Check, { "aria-hidden": "true", className: "size-3", strokeWidth: 3 }) }) }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/atoms/checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAgC;IAC5E,OAAO,CACL,KAAC,iBAAiB,CAAC,IAAI,iBACX,UAAU,EACpB,SAAS,EAAE,UAAU,CACnB,sVAAsV,EACtV,SAAS,CACV,KACG,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,iBAAW,oBAAoB,EAAC,SAAS,EAAC,kCAAkC,YACtG,KAAC,KAAK,mBAAa,MAAM,EAAC,SAAS,EAAC,QAAQ,EAAC,WAAW,EAAE,CAAC,GAAI,GACnC,GACP,CAC1B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
2
|
+
/**
|
|
3
|
+
* shadcn Separator on Base UI: 1 px --border. Groups menu items and toolbar
|
|
4
|
+
* clusters; sections of a page use spacing, not lines.
|
|
5
|
+
*/
|
|
6
|
+
export declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
4
|
+
import { classNames } from '../class-names.js';
|
|
5
|
+
/**
|
|
6
|
+
* shadcn Separator on Base UI: 1 px --border. Groups menu items and toolbar
|
|
7
|
+
* clusters; sections of a page use spacing, not lines.
|
|
8
|
+
*/
|
|
9
|
+
export function Separator({ className, orientation = 'horizontal', ...props }) {
|
|
10
|
+
return (_jsx(SeparatorPrimitive, { "data-slot": "separator", orientation: orientation, className: classNames('shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch', className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator.js","sourceRoot":"","sources":["../../src/atoms/separator.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,YAAY,EAAE,GAAG,KAAK,EAA4B;IACrG,OAAO,CACL,KAAC,kBAAkB,iBACP,WAAW,EACrB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,UAAU,CACnB,sKAAsK,EACtK,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* shadcn Skeleton, themed to docs/design/png/Skeleton.png: --secondary fill,
|
|
4
|
+
* --radius-sm, a 1.8 s pulse that stays still under reduced motion. The size
|
|
5
|
+
* comes from className, in the shape of the content it stands for.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Skeleton({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from '../class-names.js';
|
|
3
|
+
/**
|
|
4
|
+
* shadcn Skeleton, themed to docs/design/png/Skeleton.png: --secondary fill,
|
|
5
|
+
* --radius-sm, a 1.8 s pulse that stays still under reduced motion. The size
|
|
6
|
+
* comes from className, in the shape of the content it stands for.
|
|
7
|
+
*/
|
|
8
|
+
export function Skeleton({ className, ...props }) {
|
|
9
|
+
return (_jsx("div", { "data-slot": "skeleton", "aria-hidden": true, className: classNames('animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none', className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../src/atoms/skeleton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyB;IACrE,OAAO,CACL,2BACY,UAAU,uBAEpB,SAAS,EAAE,UAAU,CACnB,6GAA6G,EAC7G,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import type { ComponentProps } from 'react';
|
|
4
|
+
declare const tabsListVariants: (props?: ({
|
|
5
|
+
variant?: "line" | "segmented" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
type TabsVariant = NonNullable<VariantProps<typeof tabsListVariants>['variant']>;
|
|
8
|
+
declare function Tabs({ className, ...props }: TabsPrimitive.Root.Props): import("react").JSX.Element;
|
|
9
|
+
declare function TabsList({ className, variant, ...props }: TabsPrimitive.List.Props & {
|
|
10
|
+
variant?: TabsVariant;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
declare function TabsTrigger({ className, variant, ...props }: TabsPrimitive.Tab.Props & {
|
|
13
|
+
variant?: TabsVariant;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
/** The count a tab carries: a plain number in a segmented tab, a small pill in a line tab. */
|
|
16
|
+
declare function TabsCount({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
17
|
+
declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props): import("react").JSX.Element;
|
|
18
|
+
export { Tabs, TabsContent, TabsCount, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { classNames } from '../class-names.js';
|
|
6
|
+
/**
|
|
7
|
+
* shadcn Tabs on Base UI (docs/design/png/Tabs.png). Segmented (the shadcn
|
|
8
|
+
* default list) switches views of one list: Open, Done, All. Line splits a
|
|
9
|
+
* page into sections: Inbox, Sent, Timeline. On phone both become the
|
|
10
|
+
* full-width segmented control at touch height.
|
|
11
|
+
*/
|
|
12
|
+
const PHONE_SEGMENTED_LIST = 'max-sm:flex max-sm:w-full max-sm:gap-0.5 max-sm:rounded-lg max-sm:border max-sm:border-border max-sm:bg-muted max-sm:p-1';
|
|
13
|
+
const PHONE_SEGMENTED_TAB = 'max-sm:h-(--size-control-touch) max-sm:flex-1 max-sm:rounded-md max-sm:border-0 max-sm:px-3 max-sm:text-body-touch max-sm:data-active:bg-card max-sm:data-active:shadow-sm';
|
|
14
|
+
const tabsListVariants = cva('', {
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
segmented: 'inline-flex items-center gap-0.5 rounded-md border border-border bg-muted p-0.75',
|
|
18
|
+
line: 'flex items-center gap-6 border-b border-border',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: { variant: 'segmented' },
|
|
22
|
+
});
|
|
23
|
+
const tabVariants = cva('group/tab inline-flex items-center justify-center gap-2 font-medium whitespace-nowrap text-muted-foreground transition-colors duration-(--duration-fast) outline-none hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring data-active:text-foreground data-disabled:pointer-events-none data-disabled:opacity-45', {
|
|
24
|
+
variants: {
|
|
25
|
+
variant: {
|
|
26
|
+
segmented: 'h-7 gap-1.5 rounded-sm px-2.5 text-meta data-active:bg-card data-active:shadow-sm',
|
|
27
|
+
line: 'mb-[-1px] h-10 border-b-2 border-transparent px-0.5 text-body data-active:border-foreground',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: { variant: 'segmented' },
|
|
31
|
+
});
|
|
32
|
+
function Tabs({ className, ...props }) {
|
|
33
|
+
return _jsx(TabsPrimitive.Root, { "data-slot": "tabs", className: classNames('flex flex-col gap-4', className), ...props });
|
|
34
|
+
}
|
|
35
|
+
function TabsList({ className, variant = 'segmented', ...props }) {
|
|
36
|
+
return (_jsx(TabsPrimitive.List, { "data-slot": "tabs-list", "data-variant": variant, className: classNames(tabsListVariants({ variant }), PHONE_SEGMENTED_LIST, className), ...props }));
|
|
37
|
+
}
|
|
38
|
+
function TabsTrigger({ className, variant = 'segmented', ...props }) {
|
|
39
|
+
return (_jsx(TabsPrimitive.Tab, { "data-slot": "tabs-trigger", className: classNames(tabVariants({ variant }), PHONE_SEGMENTED_TAB, className), ...props }));
|
|
40
|
+
}
|
|
41
|
+
/** The count a tab carries: a plain number in a segmented tab, a small pill in a line tab. */
|
|
42
|
+
function TabsCount({ className, ...props }) {
|
|
43
|
+
return (_jsx("span", { "data-slot": "tabs-count", className: classNames('text-muted-foreground tabular-nums group-data-active/tab:text-foreground in-data-[variant=line]:inline-flex in-data-[variant=line]:size-5 in-data-[variant=line]:items-center in-data-[variant=line]:justify-center in-data-[variant=line]:rounded-full in-data-[variant=line]:bg-secondary in-data-[variant=line]:text-micro', className), ...props }));
|
|
44
|
+
}
|
|
45
|
+
function TabsContent({ className, ...props }) {
|
|
46
|
+
return _jsx(TabsPrimitive.Panel, { "data-slot": "tabs-content", className: classNames('outline-none', className), ...props });
|
|
47
|
+
}
|
|
48
|
+
export { Tabs, TabsContent, TabsCount, TabsList, TabsTrigger };
|
|
49
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../src/atoms/tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAA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L,KAAC,aAAa,CAAC,GAAG,iBACN,cAAc,EACxB,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,mBAAmB,EAAE,SAAS,CAAC,KAC3E,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,8FAA8F;AAC9F,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA0B;IAChE,OAAO,CACL,4BACY,YAAY,EACtB,SAAS,EAAE,UAAU,CACnB,+TAA+T,EAC/T,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA6B;IACrE,OAAO,KAAC,aAAa,CAAC,KAAK,iBAAW,cAAc,EAAC,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACvH,CAAC;AAED,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type ToastTone = 'success' | 'info' | 'error';
|
|
3
|
+
interface ToastContent {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
tone?: ToastTone;
|
|
7
|
+
/** One follow-up: View, Try again, Copy id. */
|
|
8
|
+
action?: {
|
|
9
|
+
label: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
onClick: () => void;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* One toast as the design draws it (docs/design/png/Toast.png): tone icon,
|
|
16
|
+
* title, one sentence, one follow-up. An error says so to assistive
|
|
17
|
+
* technology at once and carries its own close button.
|
|
18
|
+
*/
|
|
19
|
+
declare function ToastCard({ title, description, tone, action, onDismiss, }: ToastContent & {
|
|
20
|
+
onDismiss?: () => void;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
/** Shows a toast: confirms a finished action or offers one follow-up. Never validation, never the only record. */
|
|
23
|
+
declare function showToast(content: ToastContent): void;
|
|
24
|
+
/** Desktop bottom right, 24 px in; phone 12 px from the edges, above the TabBar. */
|
|
25
|
+
declare function Toaster({ className }: {
|
|
26
|
+
className?: string;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
28
|
+
export { showToast, ToastCard, Toaster };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CircleAlert, CircleCheck, Info, XIcon } from 'lucide-react';
|
|
4
|
+
import { toast as sonner, Toaster as SonnerToaster } from 'sonner';
|
|
5
|
+
import { classNames } from '../class-names.js';
|
|
6
|
+
import { Button } from './button.js';
|
|
7
|
+
/** Success and info close on their own after this long; errors stay until dismissed. */
|
|
8
|
+
const SUCCESS_DURATION_MS = 5_000;
|
|
9
|
+
const TONE_ICONS = {
|
|
10
|
+
success: _jsx(CircleCheck, { "aria-hidden": true, className: "text-tone-ok-fg" }),
|
|
11
|
+
info: _jsx(Info, { "aria-hidden": true, className: "text-muted-foreground" }),
|
|
12
|
+
error: _jsx(CircleAlert, { "aria-hidden": true, className: "text-tone-attention-fg" }),
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* One toast as the design draws it (docs/design/png/Toast.png): tone icon,
|
|
16
|
+
* title, one sentence, one follow-up. An error says so to assistive
|
|
17
|
+
* technology at once and carries its own close button.
|
|
18
|
+
*/
|
|
19
|
+
function ToastCard({ title, description, tone = 'success', action, onDismiss, }) {
|
|
20
|
+
return (_jsxs("div", { role: tone === 'error' ? 'alert' : 'status', className: "flex w-full gap-3 rounded-lg border border-border bg-popover py-3.5 pr-3.5 pl-4 text-popover-foreground shadow-lg sm:w-(--size-toast) [&>svg]:mt-0.5 [&>svg]:size-(--size-icon) [&>svg]:shrink-0", children: [TONE_ICONS[tone], _jsxs("div", { className: "flex min-w-0 grow flex-col gap-1", children: [_jsx("span", { className: "text-body font-medium", children: title }), description ? _jsx("span", { className: "text-meta text-muted-foreground", children: description }) : null, action ? (_jsx("div", { className: "mt-1 flex gap-1.5", children: _jsx(Button, { variant: "secondary", size: "xs", icon: action.icon, onClick: action.onClick, children: action.label }) })) : null] }), tone === 'error' && onDismiss ? (_jsx(Button, { variant: "ghost", size: "xs", isIconOnly: true, "aria-label": "Dismiss", className: "-mt-1 -mr-1", onClick: onDismiss, children: _jsx(XIcon, {}) })) : null] }));
|
|
21
|
+
}
|
|
22
|
+
/** Shows a toast: confirms a finished action or offers one follow-up. Never validation, never the only record. */
|
|
23
|
+
function showToast(content) {
|
|
24
|
+
const isError = content.tone === 'error';
|
|
25
|
+
sonner.custom((id) => (_jsx(ToastCard, { ...content, onDismiss: () => {
|
|
26
|
+
sonner.dismiss(id);
|
|
27
|
+
} })), { duration: isError ? Number.POSITIVE_INFINITY : SUCCESS_DURATION_MS });
|
|
28
|
+
}
|
|
29
|
+
/** Desktop bottom right, 24 px in; phone 12 px from the edges, above the TabBar. */
|
|
30
|
+
function Toaster({ className }) {
|
|
31
|
+
return (_jsx(SonnerToaster, { position: "bottom-right", offset: "calc(var(--spacing) * 6)", mobileOffset: {
|
|
32
|
+
left: 'calc(var(--spacing) * 3)',
|
|
33
|
+
right: 'calc(var(--spacing) * 3)',
|
|
34
|
+
bottom: 'calc(var(--size-tabbar) + var(--spacing) * 3)',
|
|
35
|
+
}, toastOptions: { unstyled: true }, className: classNames('toaster', className) }));
|
|
36
|
+
}
|
|
37
|
+
export { showToast, ToastCard, Toaster };
|
|
38
|
+
//# sourceMappingURL=toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.js","sourceRoot":"","sources":["../../src/atoms/toast.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,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|
5
5
|
* package for Tailwind classes.
|
|
6
6
|
*/
|
|
7
|
+
export * from './atoms/alert-dialog.js';
|
|
7
8
|
export * from './atoms/avatar.js';
|
|
9
|
+
export * from './atoms/badge.js';
|
|
8
10
|
export * from './atoms/button.js';
|
|
11
|
+
export * from './atoms/checkbox.js';
|
|
9
12
|
export * from './atoms/dialog.js';
|
|
10
13
|
export * from './atoms/dialog-surface.js';
|
|
11
14
|
export * from './atoms/dropdown-menu.js';
|
|
12
15
|
export * from './atoms/input.js';
|
|
13
16
|
export * from './atoms/kbd.js';
|
|
14
17
|
export * from './atoms/label.js';
|
|
18
|
+
export * from './atoms/separator.js';
|
|
15
19
|
export * from './atoms/sheet.js';
|
|
16
20
|
export * from './atoms/ship-state.js';
|
|
21
|
+
export * from './atoms/skeleton.js';
|
|
17
22
|
export * from './atoms/switch.js';
|
|
23
|
+
export * from './atoms/tabs.js';
|
|
24
|
+
export * from './atoms/toast.js';
|
|
18
25
|
export * from './atoms/tooltip.js';
|
|
19
26
|
export * from './class-names.js';
|
|
20
27
|
export * from './molecules/app-switcher.js';
|
|
21
28
|
export * from './molecules/avatar-entry.js';
|
|
22
29
|
export * from './molecules/avatar-menu.js';
|
|
30
|
+
export * from './molecules/empty-state.js';
|
|
23
31
|
export * from './molecules/harbour-activity.js';
|
|
24
32
|
export * from './molecules/harbour-group.js';
|
|
25
33
|
export * from './molecules/harbour-numbers.js';
|
|
26
34
|
export * from './molecules/harbour-state.js';
|
|
27
35
|
export * from './molecules/harbour-tile.js';
|
|
36
|
+
export * from './molecules/inline-error.js';
|
|
37
|
+
export * from './molecules/loading-skeleton.js';
|
|
28
38
|
export * from './molecules/signed-in-as.js';
|
|
39
|
+
export * from './molecules/status-badge.js';
|
|
40
|
+
export * from './molecules/typed-confirm.js';
|
|
29
41
|
export * from './organisms/app-header.js';
|
|
30
42
|
export * from './organisms/command-palette.js';
|
|
31
43
|
export * from './organisms/harbour.js';
|
|
44
|
+
export * from './organisms/scope-picker.js';
|
|
32
45
|
export * from './organisms/sign-in-background.js';
|
|
33
46
|
export * from './organisms/sign-in-backgrounds.js';
|
package/dist/index.js
CHANGED
|
@@ -4,31 +4,44 @@
|
|
|
4
4
|
* imports its styles from `@aeolus-fleet/ui/tokens.css` and scans this
|
|
5
5
|
* package for Tailwind classes.
|
|
6
6
|
*/
|
|
7
|
+
export * from './atoms/alert-dialog.js';
|
|
7
8
|
export * from './atoms/avatar.js';
|
|
9
|
+
export * from './atoms/badge.js';
|
|
8
10
|
export * from './atoms/button.js';
|
|
11
|
+
export * from './atoms/checkbox.js';
|
|
9
12
|
export * from './atoms/dialog.js';
|
|
10
13
|
export * from './atoms/dialog-surface.js';
|
|
11
14
|
export * from './atoms/dropdown-menu.js';
|
|
12
15
|
export * from './atoms/input.js';
|
|
13
16
|
export * from './atoms/kbd.js';
|
|
14
17
|
export * from './atoms/label.js';
|
|
18
|
+
export * from './atoms/separator.js';
|
|
15
19
|
export * from './atoms/sheet.js';
|
|
16
20
|
export * from './atoms/ship-state.js';
|
|
21
|
+
export * from './atoms/skeleton.js';
|
|
17
22
|
export * from './atoms/switch.js';
|
|
23
|
+
export * from './atoms/tabs.js';
|
|
24
|
+
export * from './atoms/toast.js';
|
|
18
25
|
export * from './atoms/tooltip.js';
|
|
19
26
|
export * from './class-names.js';
|
|
20
27
|
export * from './molecules/app-switcher.js';
|
|
21
28
|
export * from './molecules/avatar-entry.js';
|
|
22
29
|
export * from './molecules/avatar-menu.js';
|
|
30
|
+
export * from './molecules/empty-state.js';
|
|
23
31
|
export * from './molecules/harbour-activity.js';
|
|
24
32
|
export * from './molecules/harbour-group.js';
|
|
25
33
|
export * from './molecules/harbour-numbers.js';
|
|
26
34
|
export * from './molecules/harbour-state.js';
|
|
27
35
|
export * from './molecules/harbour-tile.js';
|
|
36
|
+
export * from './molecules/inline-error.js';
|
|
37
|
+
export * from './molecules/loading-skeleton.js';
|
|
28
38
|
export * from './molecules/signed-in-as.js';
|
|
39
|
+
export * from './molecules/status-badge.js';
|
|
40
|
+
export * from './molecules/typed-confirm.js';
|
|
29
41
|
export * from './organisms/app-header.js';
|
|
30
42
|
export * from './organisms/command-palette.js';
|
|
31
43
|
export * from './organisms/harbour.js';
|
|
44
|
+
export * from './organisms/scope-picker.js';
|
|
32
45
|
export * from './organisms/sign-in-background.js';
|
|
33
46
|
export * from './organisms/sign-in-backgrounds.js';
|
|
34
47
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,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,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface EmptyStateProps {
|
|
3
|
+
/** Says what is empty: "No ships besides argo yet". */
|
|
4
|
+
title: string;
|
|
5
|
+
/** One sentence on what fills it. */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/** A Lucide icon for the page variant. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** One action, only when the operator can fix it from here; for no results, the way back. */
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
variant?: 'page' | 'section' | 'no-results';
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Says what is empty and what happens next (docs/design/png/EmptyState.png),
|
|
16
|
+
* in two short sentences at most. Page: a dashed frame with an icon tile and
|
|
17
|
+
* one action. Section: one quiet line. No results: the line plus the way back
|
|
18
|
+
* ("Clear search").
|
|
19
|
+
*/
|
|
20
|
+
export declare function EmptyState({ title, description, icon, action, variant, className }: EmptyStateProps): import("react").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from '../class-names.js';
|
|
3
|
+
/**
|
|
4
|
+
* Says what is empty and what happens next (docs/design/png/EmptyState.png),
|
|
5
|
+
* in two short sentences at most. Page: a dashed frame with an icon tile and
|
|
6
|
+
* one action. Section: one quiet line. No results: the line plus the way back
|
|
7
|
+
* ("Clear search").
|
|
8
|
+
*/
|
|
9
|
+
export function EmptyState({ title, description, icon, action, variant = 'page', className }) {
|
|
10
|
+
if (variant === 'section') {
|
|
11
|
+
return (_jsxs("p", { "data-slot": "empty-state", "data-variant": variant, className: classNames('rounded-lg border border-border px-4 py-3 text-center text-meta text-muted-foreground', className), children: [title, description ? _jsxs(_Fragment, { children: [" ", description] }) : null] }));
|
|
12
|
+
}
|
|
13
|
+
if (variant === 'no-results') {
|
|
14
|
+
return (_jsxs("div", { "data-slot": "empty-state", "data-variant": variant, className: classNames('flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card px-4 py-6 text-center', className), children: [_jsx("p", { className: "text-meta text-muted-foreground", children: title }), action] }));
|
|
15
|
+
}
|
|
16
|
+
return (_jsxs("div", { "data-slot": "empty-state", "data-variant": variant, className: classNames('flex flex-col items-center gap-3 rounded-lg border border-dashed border-border bg-card px-6 py-10 text-center', className), children: [icon ? (_jsx("span", { "aria-hidden": true, className: "flex size-10 items-center justify-center rounded-lg border border-border bg-muted text-muted-foreground [&_svg]:size-(--size-icon-xl)", children: icon })) : null, _jsx("h2", { className: "text-heading font-semibold text-foreground max-sm:text-heading-touch", children: title }), description ? (_jsx("p", { className: "max-w-96 text-meta text-muted-foreground max-sm:text-body-touch", children: description })) : null, action ? _jsx("div", { className: "mt-1 max-sm:w-full max-sm:[&>*]:w-full", children: action }) : null] }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=empty-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../src/molecules/empty-state.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAe/C;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,SAAS,EAAmB;IAC3G,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,CACL,0BACY,aAAa,kBACT,OAAO,EACrB,SAAS,EAAE,UAAU,CACnB,uFAAuF,EACvF,SAAS,CACV,aAEA,KAAK,EACL,WAAW,CAAC,CAAC,CAAC,mCAAI,WAAW,IAAI,CAAC,CAAC,CAAC,IAAI,IACvC,CACL,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,KAAK,YAAY,EAAE,CAAC;QAC7B,OAAO,CACL,4BACY,aAAa,kBACT,OAAO,EACrB,SAAS,EAAE,UAAU,CACnB,kGAAkG,EAClG,SAAS,CACV,aAED,YAAG,SAAS,EAAC,iCAAiC,YAAE,KAAK,GAAK,EACzD,MAAM,IACH,CACP,CAAC;IACJ,CAAC;IACD,OAAO,CACL,4BACY,aAAa,kBACT,OAAO,EACrB,SAAS,EAAE,UAAU,CACnB,+GAA+G,EAC/G,SAAS,CACV,aAEA,IAAI,CAAC,CAAC,CAAC,CACN,oCAEE,SAAS,EAAC,uIAAuI,YAEhJ,IAAI,GACA,CACR,CAAC,CAAC,CAAC,IAAI,EACR,aAAI,SAAS,EAAC,sEAAsE,YAAE,KAAK,GAAM,EAChG,WAAW,CAAC,CAAC,CAAC,CACb,YAAG,SAAS,EAAC,iEAAiE,YAAE,WAAW,GAAK,CACjG,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,wCAAwC,YAAE,MAAM,GAAO,CAAC,CAAC,CAAC,IAAI,IACnF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface InlineErrorProps {
|
|
3
|
+
/** Page: "Couldn’t <verb> <thing>". Section: what failed. Field: the broken rule. */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Whether anything changed or was lost, and what to do. */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/** The technical reason, in mono (page only). */
|
|
8
|
+
detail?: string;
|
|
9
|
+
/** Page and section: Try again. */
|
|
10
|
+
onRetry?: () => void;
|
|
11
|
+
/** Try again was pressed and its read has not answered yet. */
|
|
12
|
+
isRetrying?: boolean;
|
|
13
|
+
variant?: 'field' | 'section' | 'page';
|
|
14
|
+
/** The field variant's id, for the field's aria-describedby. */
|
|
15
|
+
id?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Errors say what failed, whether anything changed and what to do
|
|
20
|
+
* (docs/design/png/InlineError.png). Field: under the field, in
|
|
21
|
+
* --destructive-text. Section: an attention panel where the action was taken.
|
|
22
|
+
* Page: replaces the content and keeps the chrome, with the technical reason in
|
|
23
|
+
* mono and Try again.
|
|
24
|
+
*/
|
|
25
|
+
export declare function InlineError({ title, description, detail, onRetry, isRetrying, variant, id, className, }: InlineErrorProps): import("react").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CircleAlert, CloudOff, RotateCw } from 'lucide-react';
|
|
3
|
+
import { Button } from '../atoms/button.js';
|
|
4
|
+
import { classNames } from '../class-names.js';
|
|
5
|
+
/**
|
|
6
|
+
* Errors say what failed, whether anything changed and what to do
|
|
7
|
+
* (docs/design/png/InlineError.png). Field: under the field, in
|
|
8
|
+
* --destructive-text. Section: an attention panel where the action was taken.
|
|
9
|
+
* Page: replaces the content and keeps the chrome, with the technical reason in
|
|
10
|
+
* mono and Try again.
|
|
11
|
+
*/
|
|
12
|
+
export function InlineError({ title, description, detail, onRetry, isRetrying = false, variant = 'section', id, className, }) {
|
|
13
|
+
if (variant === 'field') {
|
|
14
|
+
return (_jsxs("p", { id: id, "data-slot": "inline-error", "data-variant": variant, className: classNames('flex items-center gap-1.5 text-meta text-destructive-text [&_svg]:size-(--size-icon-sm) [&_svg]:shrink-0', className), children: [_jsx(CircleAlert, { "aria-hidden": true }), title] }));
|
|
15
|
+
}
|
|
16
|
+
if (variant === 'section') {
|
|
17
|
+
return (_jsxs("div", { role: "alert", "data-slot": "inline-error", "data-variant": variant, className: classNames('flex gap-2 rounded-lg border border-tone-attention-border bg-tone-attention-bg p-3 text-tone-attention-fg', className), children: [_jsx(CircleAlert, { "aria-hidden": true, className: "mt-0.5 size-(--size-icon) shrink-0" }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("p", { className: "text-body font-medium", children: title }), description ? _jsx("p", { className: "text-meta text-foreground", children: description }) : null, onRetry ? (_jsx(Button, { size: "xs", icon: _jsx(RotateCw, { "aria-hidden": true }), isLoading: isRetrying, onClick: onRetry, className: "self-start", children: isRetrying ? 'Trying again…' : 'Try again' })) : null] })] }));
|
|
18
|
+
}
|
|
19
|
+
return (_jsxs("div", { role: "alert", "data-slot": "inline-error", "data-variant": variant, className: classNames('flex flex-col items-center gap-3 rounded-lg border border-border bg-card px-6 py-10 text-center', className), children: [_jsx("span", { "aria-hidden": true, className: "flex size-10 items-center justify-center rounded-lg border border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg [&_svg]:size-(--size-icon-xl)", children: _jsx(CloudOff, {}) }), _jsx("h2", { className: "text-heading font-semibold text-foreground max-sm:text-heading-touch", children: title }), description ? (_jsx("p", { className: "max-w-96 text-meta text-muted-foreground max-sm:text-body-touch", children: description })) : null, detail ? (_jsx("code", { className: "rounded-sm border border-border bg-muted px-2 py-0.5 font-mono text-id text-muted-foreground", children: detail })) : null, onRetry ? (_jsx("div", { className: "flex items-center gap-2 max-sm:w-full max-sm:flex-col", children: _jsx(Button, { size: "sm", icon: _jsx(RotateCw, { "aria-hidden": true }), onClick: onRetry, className: "max-sm:w-full", children: "Try again" }) })) : null] }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=inline-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-error.js","sourceRoot":"","sources":["../../src/molecules/inline-error.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG/D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAmB/C;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,WAAW,EACX,MAAM,EACN,OAAO,EACP,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,SAAS,EACnB,EAAE,EACF,SAAS,GACQ;IACjB,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACxB,OAAO,CACL,aACE,EAAE,EAAE,EAAE,eACI,cAAc,kBACV,OAAO,EACrB,SAAS,E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ACF,CACR,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,CAAC,CAAC,CAAC,CACT,cAAK,SAAS,EAAC,uDAAuD,YACpE,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,KAAC,QAAQ,0BAAe,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,eAAe,0BAEpF,GACL,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface LoadingSkeletonProps {
|
|
2
|
+
variant: 'table' | 'cards' | 'detail' | 'list';
|
|
3
|
+
/** Rows in a table or list. */
|
|
4
|
+
rows?: number;
|
|
5
|
+
/** What is loading, for assistive technology: "Loading the fleet". */
|
|
6
|
+
label?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Loading in the shape of the real content (docs/design/png/LoadingSkeleton.png):
|
|
11
|
+
* the page frame stays, skeletons stand in for the table, metric cards, detail
|
|
12
|
+
* header or phone list. No spinners. The page switches to the page InlineError
|
|
13
|
+
* after 10 s without data; that timing belongs to the page.
|
|
14
|
+
*/
|
|
15
|
+
export declare function LoadingSkeleton({ variant, rows, label, className }: LoadingSkeletonProps): import("react").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { classNames } from '../class-names.js';
|
|
3
|
+
import { Skeleton } from '../atoms/skeleton.js';
|
|
4
|
+
const DEFAULT_ROWS = 4;
|
|
5
|
+
const METRIC_CARDS = 4;
|
|
6
|
+
function rowKeys(count) {
|
|
7
|
+
return Array.from({ length: count }, (_, row) => `row-${String(row)}`);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Loading in the shape of the real content (docs/design/png/LoadingSkeleton.png):
|
|
11
|
+
* the page frame stays, skeletons stand in for the table, metric cards, detail
|
|
12
|
+
* header or phone list. No spinners. The page switches to the page InlineError
|
|
13
|
+
* after 10 s without data; that timing belongs to the page.
|
|
14
|
+
*/
|
|
15
|
+
export function LoadingSkeleton({ variant, rows = DEFAULT_ROWS, label = 'Loading', className }) {
|
|
16
|
+
return (_jsxs("div", { role: "status", "data-slot": "loading-skeleton", "data-variant": variant, className: classNames('w-full', className), children: [_jsx("span", { className: "sr-only", children: label }), variant === 'table' ? (_jsxs("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: [_jsx("div", { className: "h-(--size-row-header) border-b border-border bg-muted" }), rowKeys(rows).map((key) => (_jsxs("div", { className: "flex h-(--size-row) items-center gap-8 border-b border-border px-4 last:border-0", children: [_jsx(Skeleton, { className: "h-2.5 w-24" }), _jsx(Skeleton, { className: "h-5 w-16" }), _jsx(Skeleton, { className: "h-5 w-20" }), _jsx(Skeleton, { className: "h-2.5 w-28" })] }, key)))] })) : null, variant === 'cards' ? (_jsx("div", { className: "grid grid-cols-2 gap-3 lg:grid-cols-4", children: rowKeys(METRIC_CARDS).map((key) => (_jsxs("div", { className: "flex flex-col gap-3 rounded-lg border border-border bg-card p-3", children: [_jsx(Skeleton, { className: "h-2.5 w-20" }), _jsx(Skeleton, { className: "h-6 w-10" }), _jsx(Skeleton, { className: "h-2.5 w-28" })] }, key))) })) : null, variant === 'detail' ? (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx(Skeleton, { className: "h-7 w-48" }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Skeleton, { className: "h-5 w-20" }), _jsx(Skeleton, { className: "h-5 w-16" })] }), _jsx(Skeleton, { className: "h-16 w-full rounded-lg" })] })) : null, variant === 'list' ? (_jsx("div", { className: "overflow-hidden rounded-lg border border-border bg-card", children: rowKeys(rows).map((key) => (_jsxs("div", { className: "flex flex-col gap-2.5 border-b border-border px-3.5 py-3 last:border-0", children: [_jsxs("div", { className: "flex justify-between", children: [_jsx(Skeleton, { className: "h-3 w-28" }), _jsx(Skeleton, { className: "h-5 w-16" })] }), _jsx(Skeleton, { className: "h-2.5 w-44" })] }, key))) })) : null] }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=loading-skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading-skeleton.js","sourceRoot":"","sources":["../../src/molecules/loading-skeleton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,YAAY,GAAG,CAAC,CAAC;AAWvB,SAAS,OAAO,CAAC,KAAa;IAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AACzE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,OAAO,EAAE,IAAI,GAAG,YAAY,EAAE,KAAK,GAAG,SAAS,EAAE,SAAS,EAAwB;IAClH,OAAO,CACL,eACE,IAAI,EAAC,QAAQ,eACH,kBAAkB,kBACd,OAAO,EACrB,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAE,SAAS,CAAC,aAE1C,eAAM,SAAS,EAAC,SAAS,YAAE,KAAK,GAAQ,EACvC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,CACrB,eAAK,SAAS,EAAC,yDAAyD,aACtE,cAAK,SAAS,EAAC,uDAAuD,GAAG,EACxE,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAC1B,eAEE,SAAS,EAAC,kFAAkF,aAE5F,KAAC,QAAQ,IAAC,SAAS,EAAC,YAAY,GAAG,EACnC,KAAC,QAAQ,IAAC,SAAS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AAU,GAAG,IAC7B,EACN,KAAC,QAAQ,IAAC,SAAS,EAAC,YAAY,GAAG,KAL3B,GAAG,CAMP,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { CrewStatus, DeliveryState, ScheduleState, ShipStatus, StuckCause } from '@aeolus-fleet/common';
|
|
2
|
+
/** A squadron's state (aeolus-fleet-squadrons' docs/squadrons.md). */
|
|
3
|
+
type SquadronState = 'forming' | 'sailing' | 'standing-down' | 'disbanded';
|
|
4
|
+
/** A count at its limit, or over it once a limit is lowered below use (the LimitMeter part). */
|
|
5
|
+
export type LimitState = 'at-limit' | 'over-limit';
|
|
6
|
+
/** A crew request with no trierarch: on the operator's to-do, or crewed by hand. */
|
|
7
|
+
export type UnassignedCrewState = 'needsCrew' | 'crewedByHand';
|
|
8
|
+
/** A step of a pushed delivery's way: handed to its agent by the computer side, or overdue by the 10 or 60 minute clock (decision 0040). */
|
|
9
|
+
export type PushedStepState = 'handedPushed' | 'overdue';
|
|
10
|
+
/** The fleet's health (decision 0042): its verdict, stuck or delivering, and why a delivery is stuck. */
|
|
11
|
+
export type HealthState = 'stuck' | 'delivering' | StuckCause;
|
|
12
|
+
/** A sealed fleet's state and whether its company key is reachable (decision 0068). */
|
|
13
|
+
export type SealingBadgeState = 'sealing' | 'sealed' | 'reachable' | 'notReachable';
|
|
14
|
+
/** A ship with an open alert (decision 0071): the badge after its status on the overview. */
|
|
15
|
+
export type AlertBadgeState = 'alert';
|
|
16
|
+
type Status = AlertBadgeState | SealingBadgeState | ShipStatus | DeliveryState | SquadronState | LimitState | CrewStatus | UnassignedCrewState | PushedStepState | HealthState | ScheduleState;
|
|
17
|
+
/**
|
|
18
|
+
* One component for every ship status and delivery state
|
|
19
|
+
* (docs/design/png/StatusBadge.png). Colour comes from the tone family, and
|
|
20
|
+
* each state has its own icon and label, so it reads without colour.
|
|
21
|
+
* Abandoned keeps a dashed border to set it apart from Dismissed.
|
|
22
|
+
*/
|
|
23
|
+
export declare function StatusBadge({ status, className }: {
|
|
24
|
+
status: Status;
|
|
25
|
+
className?: string;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
/** The label a status or state reads as, for a sentence beside the badge: "In flight". */
|
|
28
|
+
export declare function statusLabel(status: Status): string;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { AlarmClock, Anchor, Archive, Ban, CalendarCheck, CalendarClock, CalendarX, CircleAlert, CircleArrowRight, CircleCheckBig, CirclePause, CirclePlay, CircleSlash, Clock, CircleCheck, CircleDashed, CircleDotDashed, CircleMinus, CircleX, FlagOff, Gauge, Hourglass, Inbox, LoaderCircle, Lock, MailCheck, OctagonAlert, Power, RotateCcw, Sailboat, TriangleAlert, UserCheck, UserRoundSearch, } from 'lucide-react';
|
|
3
|
+
import { Badge } from '../atoms/badge.js';
|
|
4
|
+
import { classNames } from '../class-names.js';
|
|
5
|
+
/** Icon and word in the tone, no fill or border; only Attention keeps its fill (the Compact look). */
|
|
6
|
+
const TONE_CLASSES = {
|
|
7
|
+
waiting: 'border-transparent bg-transparent px-0.5 text-tone-waiting-fg',
|
|
8
|
+
active: 'border-transparent bg-transparent px-0.5 text-tone-active-fg',
|
|
9
|
+
ok: 'border-transparent bg-transparent px-0.5 text-tone-ok-fg',
|
|
10
|
+
attention: 'border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg',
|
|
11
|
+
ended: 'border-transparent bg-transparent px-0.5 text-tone-ended-fg',
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Every ship status, delivery state, squadron state, limit state, crew request state and schedule state with its tone, icon
|
|
15
|
+
* and label (docs/design/conventions.md, "Colour"). A handed delivery is in
|
|
16
|
+
* flight: a receive handed it to a crew, which has not acknowledged it yet. A
|
|
17
|
+
* receive is all a pull ship does, so handed reads "Handed (pulled)"; a
|
|
18
|
+
* pushed ship's computer side hands it to its agent, which reads "Handed". A
|
|
19
|
+
* step is overdue when the 10 or 60 minute clock told argo. A
|
|
20
|
+
* received delivery is in flight with a pushed ship's computer side, not yet
|
|
21
|
+
* handed to its agent. Handled and not handled say how the turn that took
|
|
22
|
+
* an acknowledged delivery ended: by itself, or died twice.
|
|
23
|
+
*/
|
|
24
|
+
const STATUSES = {
|
|
25
|
+
awaitingCrew: { tone: 'waiting', Icon: CircleDashed, label: 'Awaiting crew' },
|
|
26
|
+
crewed: { tone: 'ok', Icon: UserCheck, label: 'Crewed' },
|
|
27
|
+
retired: { tone: 'ended', Icon: Archive, label: 'Retired' },
|
|
28
|
+
pending: { tone: 'waiting', Icon: Hourglass, label: 'Pending' },
|
|
29
|
+
received: { tone: 'active', Icon: Inbox, label: 'Received' },
|
|
30
|
+
handed: { tone: 'active', Icon: CircleArrowRight, label: 'Handed (pulled)' },
|
|
31
|
+
handedPushed: { tone: 'active', Icon: CircleArrowRight, label: 'Handed' },
|
|
32
|
+
overdue: { tone: 'attention', Icon: AlarmClock, label: 'Overdue' },
|
|
33
|
+
acknowledged: { tone: 'ok', Icon: CircleCheck, label: 'Acknowledged' },
|
|
34
|
+
handled: { tone: 'ok', Icon: CircleCheckBig, label: 'Handled' },
|
|
35
|
+
notHandled: { tone: 'attention', Icon: CircleAlert, label: 'Not handled' },
|
|
36
|
+
undeliverable: { tone: 'attention', Icon: CircleX, label: 'Undeliverable' },
|
|
37
|
+
dismissed: { tone: 'ended', Icon: CircleMinus, label: 'Dismissed' },
|
|
38
|
+
abandoned: { tone: 'ended', Icon: Ban, label: 'Abandoned' },
|
|
39
|
+
forming: { tone: 'waiting', Icon: CircleDotDashed, label: 'Forming' },
|
|
40
|
+
sailing: { tone: 'ok', Icon: Sailboat, label: 'Sailing' },
|
|
41
|
+
'standing-down': { tone: 'active', Icon: Anchor, label: 'Standing down' },
|
|
42
|
+
disbanded: { tone: 'ended', Icon: FlagOff, label: 'Disbanded' },
|
|
43
|
+
'at-limit': { tone: 'waiting', Icon: Gauge, label: 'At limit' },
|
|
44
|
+
'over-limit': { tone: 'attention', Icon: TriangleAlert, label: 'Over limit' },
|
|
45
|
+
needsCrew: { tone: 'waiting', Icon: Clock, label: 'Needs crew' },
|
|
46
|
+
crewedByHand: { tone: 'ok', Icon: UserCheck, label: 'Crewed by hand' },
|
|
47
|
+
crewing: { tone: 'active', Icon: LoaderCircle, label: 'Crewing' },
|
|
48
|
+
running: { tone: 'ok', Icon: CirclePlay, label: 'Running' },
|
|
49
|
+
restarting: { tone: 'waiting', Icon: RotateCcw, label: 'Restarting' },
|
|
50
|
+
crashed: { tone: 'attention', Icon: CircleX, label: 'Crashed' },
|
|
51
|
+
releasing: { tone: 'active', Icon: Power, label: 'Releasing' },
|
|
52
|
+
stuck: { tone: 'attention', Icon: OctagonAlert, label: 'Stuck' },
|
|
53
|
+
delivering: { tone: 'ok', Icon: MailCheck, label: 'Delivering' },
|
|
54
|
+
noShipCanTake: { tone: 'attention', Icon: CircleSlash, label: 'No ship can take' },
|
|
55
|
+
waitingForCrew: { tone: 'waiting', Icon: UserRoundSearch, label: 'Waiting for crew' },
|
|
56
|
+
stalledInFlight: { tone: 'waiting', Icon: CirclePause, label: 'Stalled in flight' },
|
|
57
|
+
active: { tone: 'ok', Icon: CalendarClock, label: 'Active' },
|
|
58
|
+
paused: { tone: 'waiting', Icon: CirclePause, label: 'Paused' },
|
|
59
|
+
ended: { tone: 'ended', Icon: CalendarCheck, label: 'Ended' },
|
|
60
|
+
cancelled: { tone: 'ended', Icon: CalendarX, label: 'Cancelled' },
|
|
61
|
+
sealing: { tone: 'active', Icon: Lock, label: 'Sealing' },
|
|
62
|
+
sealed: { tone: 'ok', Icon: Lock, label: 'Sealed' },
|
|
63
|
+
reachable: { tone: 'ok', Icon: CircleCheck, label: 'Reachable' },
|
|
64
|
+
notReachable: { tone: 'attention', Icon: CircleAlert, label: 'Not reachable' },
|
|
65
|
+
alert: { tone: 'attention', Icon: TriangleAlert, label: 'Alert' },
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* One component for every ship status and delivery state
|
|
69
|
+
* (docs/design/png/StatusBadge.png). Colour comes from the tone family, and
|
|
70
|
+
* each state has its own icon and label, so it reads without colour.
|
|
71
|
+
* Abandoned keeps a dashed border to set it apart from Dismissed.
|
|
72
|
+
*/
|
|
73
|
+
export function StatusBadge({ status, className }) {
|
|
74
|
+
const { tone, Icon, label } = STATUSES[status];
|
|
75
|
+
return (_jsxs(Badge, { variant: "outline", "data-slot": "status-badge", "data-status": status, className: classNames(TONE_CLASSES[tone], status === 'abandoned' ? 'border-dashed border-tone-ended-border px-1.5' : undefined, className), children: [_jsx(Icon, { "aria-hidden": true }), label] }));
|
|
76
|
+
}
|
|
77
|
+
/** The label a status or state reads as, for a sentence beside the badge: "In flight". */
|
|
78
|
+
export function statusLabel(status) {
|
|
79
|
+
return STATUSES[status].label;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=status-badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-badge.js","sourceRoot":"","sources":["../../src/molecules/status-badge.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,UAAU,EACV,MAAM,EACN,OAAO,EACP,GAAG,EACH,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,UAAU,EACV,WAAW,EACX,KAAK,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,WAAW,EACX,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,KAAK,EACL,SAAS,EACT,QAAQ,EACR,aAAa,EACb,SAAS,EACT,eAAe,GAEhB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAA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
2
|
+
/** What the operator types to confirm: the ship's name. */
|
|
3
|
+
expected: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onValueChange: (value: string) => void;
|
|
6
|
+
'data-testid'?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Second confirmation for an irreversible action that loses work
|
|
10
|
+
* (docs/design/png/TypedConfirm.png): retiring a ship that still holds open
|
|
11
|
+
* deliveries, or renaming one that other ships may address by name. The caller keeps its action disabled until the typed value matches; no error styling while the operator is still typing.
|
|
12
|
+
*/
|
|
13
|
+
export declare function TypedConfirm({ expected, value, onValueChange, 'data-testid': testId }: TypedConfirmProps): import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import { Input } from '../atoms/input.js';
|
|
5
|
+
import { Label } from '../atoms/label.js';
|
|
6
|
+
/** The hint under the field: the rule while empty, then how far the text matches. Never error styling. */
|
|
7
|
+
function hintOf(expected, value) {
|
|
8
|
+
if (value === '') {
|
|
9
|
+
return 'Case and hyphens must match.';
|
|
10
|
+
}
|
|
11
|
+
return value === expected ? 'Matches. The button is now active.' : 'Doesn’t match yet.';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Second confirmation for an irreversible action that loses work
|
|
15
|
+
* (docs/design/png/TypedConfirm.png): retiring a ship that still holds open
|
|
16
|
+
* deliveries, or renaming one that other ships may address by name. The caller keeps its action disabled until the typed value matches; no error styling while the operator is still typing.
|
|
17
|
+
*/
|
|
18
|
+
export function TypedConfirm({ expected, value, onValueChange, 'data-testid': testId = 'retire-typed-confirm' }) {
|
|
19
|
+
const inputId = useId();
|
|
20
|
+
const hintId = useId();
|
|
21
|
+
return (_jsxs("div", { "data-testid": testId, className: "flex flex-col gap-1.5", children: [_jsxs(Label, { htmlFor: inputId, className: "text-meta", children: ["Type ", _jsx("code", { className: "rounded-xs bg-muted px-1 py-0.5 font-mono text-id", children: expected }), " to confirm"] }), _jsx(Input, { id: inputId, isMono: true, autoComplete: "off", autoCapitalize: "off", autoCorrect: "off", spellCheck: false, "aria-describedby": hintId, className: "max-sm:h-(--size-control-touch) max-sm:text-input-touch", value: value, onChange: (event) => {
|
|
22
|
+
onValueChange(event.target.value);
|
|
23
|
+
} }), _jsx("p", { id: hintId, "aria-live": "polite", className: "text-meta text-muted-foreground", children: hintOf(expected, value) })] }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=typed-confirm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typed-confirm.js","sourceRoot":"","sources":["../../src/molecules/typed-confirm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAU1C,0GAA0G;AAC1G,SAAS,MAAM,CAAC,QAAgB,EAAE,KAAa;IAC7C,IAAI,KAAK,KAAK,EAAE,EAAE,CAAC;QACjB,OAAO,8BAA8B,CAAC;IACxC,CAAC;IACD,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAC,oBAAoB,CAAC;AAC1F,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,GAAG,sBAAsB,EAAqB;IAChI,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;IAEvB,OAAO,CACL,8BAAkB,MAAM,EAAE,SAAS,EAAC,uBAAuB,aACzD,MAAC,KAAK,IAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,WAAW,sBACvC,eAAM,SAAS,EAAC,mDAAmD,YAAE,QAAQ,GAAQ,mBACpF,EACR,KAAC,KAAK,IACJ,EAAE,EAAE,OAAO,EACX,MAAM,QACN,YAAY,EAAC,KAAK,EAClB,cAAc,EAAC,KAAK,EACpB,WAAW,EAAC,KAAK,EACjB,UAAU,EAAE,KAAK,sBACC,MAAM,EACxB,SAAS,EAAC,yDAAyD,EACnE,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;oBAClB,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBACpC,CAAC,GACD,EACF,YAAG,EAAE,EAAE,MAAM,eAAY,QAAQ,EAAC,SAAS,EAAC,iCAAiC,YAC1E,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,GACtB,IACA,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** A scope the picker offers, with what it allows as the app's server words it. */
|
|
3
|
+
export interface ListedScope {
|
|
4
|
+
scope: string;
|
|
5
|
+
description: string;
|
|
6
|
+
}
|
|
7
|
+
interface ScopePickerProps {
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
/** The scopes on offer, each with its description from the app's server. */
|
|
10
|
+
listed: readonly ListedScope[];
|
|
11
|
+
picked: readonly string[];
|
|
12
|
+
onPick: (scopes: string[]) => void;
|
|
13
|
+
/** While what was picked is saved. */
|
|
14
|
+
isDisabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Picks several of the listed scopes, searched by code or description; each
|
|
18
|
+
* picked scope is a chip with its code. A scope picked before that is no
|
|
19
|
+
* longer listed stays picked, so it can be seen and removed.
|
|
20
|
+
*/
|
|
21
|
+
export declare function ScopePicker({ label, listed, picked, onPick, isDisabled }: ScopePickerProps): import("react").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Combobox } from '@base-ui/react/combobox';
|
|
4
|
+
import { Check, X } from 'lucide-react';
|
|
5
|
+
const itemOf = ({ scope, description }) => ({ value: scope, description });
|
|
6
|
+
/**
|
|
7
|
+
* Picks several of the listed scopes, searched by code or description; each
|
|
8
|
+
* picked scope is a chip with its code. A scope picked before that is no
|
|
9
|
+
* longer listed stays picked, so it can be seen and removed.
|
|
10
|
+
*/
|
|
11
|
+
export function ScopePicker({ label, listed, picked, onPick, isDisabled = false }) {
|
|
12
|
+
const { contains } = Combobox.useFilter();
|
|
13
|
+
const items = [...listed.map(itemOf), ...picked.filter((scope) => !listed.some((each) => each.scope === scope)).map((scope) => ({ value: scope, description: 'No longer defined in the fleet' }))];
|
|
14
|
+
const value = items.filter((item) => picked.includes(item.value));
|
|
15
|
+
return (_jsxs(Combobox.Root, { multiple: true, items: items, value: value, disabled: isDisabled, itemToStringLabel: (item) => item.value, isItemEqualToValue: (item, chosen) => item.value === chosen.value, onValueChange: (next, details) => {
|
|
16
|
+
// Escape closes the list; it never takes back what was picked.
|
|
17
|
+
if (details.reason === 'escape-key') {
|
|
18
|
+
details.cancel();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
onPick(next.map((item) => item.value));
|
|
22
|
+
}, filter: (item, query) => contains(item.value, query) || contains(item.description, query), children: [_jsxs("div", { className: "grid gap-1.5", "data-testid": "scope-picker", children: [_jsx(Combobox.Label, { className: "text-body font-medium text-foreground", children: label }), _jsx(Combobox.InputGroup, { className: "flex min-h-(--size-control) flex-wrap items-center gap-1 rounded-md border border-input bg-background px-2 py-1 has-disabled:opacity-50", children: _jsxs(Combobox.Chips, { className: "contents", children: [value.map((item) => (_jsxs(Combobox.Chip, { "data-testid": "scope-picker-chip", className: "inline-flex items-center gap-1 rounded-sm border border-border bg-muted px-1.5 font-mono text-id text-foreground", "aria-label": item.value, children: [item.value, _jsx(Combobox.ChipRemove, { className: "text-muted-foreground hover:text-foreground", "aria-label": `Remove ${item.value}`, children: _jsx(X, { "aria-hidden": true, className: "size-3" }) })] }, item.value))), _jsx(Combobox.Input, { "data-testid": "scope-picker-search", placeholder: value.length === 0 ? 'Search the fleet\'s scopes' : '', className: "h-6 min-w-32 flex-1 bg-transparent text-body outline-none placeholder:text-muted-foreground" })] }) })] }), _jsx(Combobox.Portal, { children: _jsx(Combobox.Positioner, { sideOffset: 4, className: "z-50", children: _jsxs(Combobox.Popup, { className: "max-h-72 w-(--anchor-width) overflow-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md", children: [_jsx(Combobox.Empty, { className: "px-2 py-1 text-meta text-muted-foreground empty:hidden", children: "No scope listed matches." }), _jsx(Combobox.List, { children: (item) => (_jsxs(Combobox.Item, { value: item, "data-testid": "scope-picker-option", className: "grid cursor-default grid-cols-[1rem_1fr] gap-x-2 rounded-sm px-2 py-1 data-highlighted:bg-accent", children: [_jsx(Combobox.ItemIndicator, { className: "row-span-2 pt-0.5", children: _jsx(Check, { "aria-hidden": true, className: "size-3.5" }) }), _jsx("span", { className: "col-start-2 font-mono text-code", children: item.value }), _jsx("span", { className: "col-start-2 text-meta text-muted-foreground", children: item.description })] }, item.value)) })] }) }) })] }));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=scope-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-picker.js","sourceRoot":"","sources":["../../src/organisms/scope-picker.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAcxC,MAAM,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAe,EAAa,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,CAA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aACpJ,KAAC,QAAQ,CAAC,KAAK,IAAC,SAAS,EAAC,wDAAwD,yCAA0C,EAC5H,KAAC,QAAQ,CAAC,IAAI,cACX,CAAC,IAAe,EAAE,EAAE,CAAC,CACpB,MAAC,QAAQ,CAAC,IAAI,IAAkB,KAAK,EAAE,IAAI,iBAAc,qBAAqB,EAAC,SAAS,EAAC,kGAAkG,aACzL,KAAC,QAAQ,CAAC,aAAa,IAAC,SAAS,EAAC,mBAAmB,YACnD,KAAC,KAAK,yBAAa,SAAS,EAAC,UAAU,GAAG,GACnB,EACzB,eAAM,SAAS,EAAC,iCAAiC,YAAE,IAAI,CAAC,KAAK,GAAQ,EACrE,eAAM,SAAS,EAAC,6CAA6C,YAAE,IAAI,CAAC,WAAW,GAAQ,KALrE,IAAI,CAAC,KAAK,CAMd,CACjB,GACa,IACD,GACG,GACN,IACJ,CACjB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeolus-fleet/ui",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.3",
|
|
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,13 +37,14 @@
|
|
|
37
37
|
"postpack": "rm LICENSE"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@aeolus-fleet/common": "0.38.
|
|
40
|
+
"@aeolus-fleet/common": "0.38.3",
|
|
41
41
|
"@base-ui/react": "^1.8.0",
|
|
42
42
|
"class-variance-authority": "^0.7.1",
|
|
43
43
|
"clsx": "^2.1.1",
|
|
44
44
|
"lucide-react": "^1.51.0",
|
|
45
45
|
"react": "^19.3.0",
|
|
46
46
|
"react-dom": "^19.3.0",
|
|
47
|
+
"sonner": "^2.0.8",
|
|
47
48
|
"tailwind-merge": "^3.7.0"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|