@xeonr/platform-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/kit/Badge.d.ts +19 -0
- package/dist/kit/Badge.d.ts.map +1 -0
- package/dist/kit/Badge.js +61 -0
- package/dist/kit/Badge.js.map +1 -0
- package/dist/kit/Button.d.ts +28 -0
- package/dist/kit/Button.d.ts.map +1 -0
- package/dist/kit/Button.js +73 -0
- package/dist/kit/Button.js.map +1 -0
- package/dist/kit/DataTable.d.ts +23 -0
- package/dist/kit/DataTable.d.ts.map +1 -0
- package/dist/kit/DataTable.js +59 -0
- package/dist/kit/DataTable.js.map +1 -0
- package/dist/kit/EmptyState.d.ts +10 -0
- package/dist/kit/EmptyState.d.ts.map +1 -0
- package/dist/kit/EmptyState.js +42 -0
- package/dist/kit/EmptyState.js.map +1 -0
- package/dist/kit/EntityHeader.d.ts +17 -0
- package/dist/kit/EntityHeader.d.ts.map +1 -0
- package/dist/kit/EntityHeader.js +61 -0
- package/dist/kit/EntityHeader.js.map +1 -0
- package/dist/kit/Form.d.ts +78 -0
- package/dist/kit/Form.d.ts.map +1 -0
- package/dist/kit/Form.js +210 -0
- package/dist/kit/Form.js.map +1 -0
- package/dist/kit/Icon.d.ts +102 -0
- package/dist/kit/Icon.d.ts.map +1 -0
- package/dist/kit/Icon.js +48 -0
- package/dist/kit/Icon.js.map +1 -0
- package/dist/kit/KV.d.ts +9 -0
- package/dist/kit/KV.d.ts.map +1 -0
- package/dist/kit/KV.js +23 -0
- package/dist/kit/KV.js.map +1 -0
- package/dist/kit/LogView.d.ts +21 -0
- package/dist/kit/LogView.d.ts.map +1 -0
- package/dist/kit/LogView.js +35 -0
- package/dist/kit/LogView.js.map +1 -0
- package/dist/kit/Modal.d.ts +50 -0
- package/dist/kit/Modal.d.ts.map +1 -0
- package/dist/kit/Modal.js +112 -0
- package/dist/kit/Modal.js.map +1 -0
- package/dist/kit/PageHeader.d.ts +30 -0
- package/dist/kit/PageHeader.d.ts.map +1 -0
- package/dist/kit/PageHeader.js +67 -0
- package/dist/kit/PageHeader.js.map +1 -0
- package/dist/kit/Panel.d.ts +26 -0
- package/dist/kit/Panel.d.ts.map +1 -0
- package/dist/kit/Panel.js +49 -0
- package/dist/kit/Panel.js.map +1 -0
- package/dist/kit/Secret.d.ts +9 -0
- package/dist/kit/Secret.d.ts.map +1 -0
- package/dist/kit/Secret.js +39 -0
- package/dist/kit/Secret.js.map +1 -0
- package/dist/kit/Skeleton.d.ts +12 -0
- package/dist/kit/Skeleton.d.ts.map +1 -0
- package/dist/kit/Skeleton.js +21 -0
- package/dist/kit/Skeleton.js.map +1 -0
- package/dist/kit/Toast.d.ts +17 -0
- package/dist/kit/Toast.d.ts.map +1 -0
- package/dist/kit/Toast.js +64 -0
- package/dist/kit/Toast.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +16 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +105 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/tokens.d.ts +62 -0
- package/dist/theme/tokens.d.ts.map +1 -0
- package/dist/theme/tokens.js +171 -0
- package/dist/theme/tokens.js.map +1 -0
- package/package.json +49 -0
- package/scripts/check-colour-literals.mjs +221 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { BRAND, GRAD, GRAD_90, cssVariables, v } from "./theme/tokens.ts";
|
|
2
|
+
export { AppThemeProvider, useTheme, type ThemePref } from "./theme/ThemeProvider.tsx";
|
|
3
|
+
export { Icon, extendIcons, type IconName } from "./kit/Icon.tsx";
|
|
4
|
+
export { AppButton, IconButton, ButtonRow, type AppButtonProps } from "./kit/Button.tsx";
|
|
5
|
+
export { StatusPill, Tag, LiveDot, type Tone } from "./kit/Badge.tsx";
|
|
6
|
+
export { Panel, PanelHead, PanelTitle, PanelActions, PanelBody, MicroLabel, Hairline } from "./kit/Panel.tsx";
|
|
7
|
+
export { Skeleton, SkeletonRow } from "./kit/Skeleton.tsx";
|
|
8
|
+
export { EmptyState } from "./kit/EmptyState.tsx";
|
|
9
|
+
export { FormGrid, Field, Input, MonoInput, Select, TextArea, Segmented, Toggle, FormSection, FormActions, InlineError, KVEditor, kvToMap, mapToKv, type KVPair, } from "./kit/Form.tsx";
|
|
10
|
+
export { EntityModal, ConfirmDialog, PromptDialog } from "./kit/Modal.tsx";
|
|
11
|
+
export { DataTable, type Column } from "./kit/DataTable.tsx";
|
|
12
|
+
export { PageHead, PageTitle, PageActions, FactLine, PageBody, SubNav } from "./kit/PageHeader.tsx";
|
|
13
|
+
export { EntityHeader, CodeChip } from "./kit/EntityHeader.tsx";
|
|
14
|
+
export { LogSurface, LogPanel, type LogLine } from "./kit/LogView.tsx";
|
|
15
|
+
export { KVGrid } from "./kit/KV.tsx";
|
|
16
|
+
export { SecretField, CopyIcon } from "./kit/Secret.tsx";
|
|
17
|
+
export { ToastProvider, useToast } from "./kit/Toast.tsx";
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAIvF,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,UAAU,EAA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
// Tokens + theme: the --x-* custom-property sheet (dark-first, first-class
|
|
4
|
+
// light), the tri-state ThemeProvider, and `v` for styled-components.
|
|
5
|
+
export { BRAND, GRAD, GRAD_90, cssVariables, v } from "./theme/tokens.js";
|
|
6
|
+
export { AppThemeProvider, useTheme } from "./theme/ThemeProvider.js";
|
|
7
|
+
// Kit: the same names and props container-platform/ui and functions/ui use,
|
|
8
|
+
// so adopting the package is an import-path change.
|
|
9
|
+
export { Icon, extendIcons } from "./kit/Icon.js";
|
|
10
|
+
export { AppButton, IconButton, ButtonRow } from "./kit/Button.js";
|
|
11
|
+
export { StatusPill, Tag, LiveDot } from "./kit/Badge.js";
|
|
12
|
+
export { Panel, PanelHead, PanelTitle, PanelActions, PanelBody, MicroLabel, Hairline } from "./kit/Panel.js";
|
|
13
|
+
export { Skeleton, SkeletonRow } from "./kit/Skeleton.js";
|
|
14
|
+
export { EmptyState } from "./kit/EmptyState.js";
|
|
15
|
+
export { FormGrid, Field, Input, MonoInput, Select, TextArea, Segmented, Toggle, FormSection, FormActions, InlineError, KVEditor, kvToMap, mapToKv, } from "./kit/Form.js";
|
|
16
|
+
export { EntityModal, ConfirmDialog, PromptDialog } from "./kit/Modal.js";
|
|
17
|
+
export { DataTable } from "./kit/DataTable.js";
|
|
18
|
+
export { PageHead, PageTitle, PageActions, FactLine, PageBody, SubNav } from "./kit/PageHeader.js";
|
|
19
|
+
export { EntityHeader, CodeChip } from "./kit/EntityHeader.js";
|
|
20
|
+
export { LogSurface, LogPanel } from "./kit/LogView.js";
|
|
21
|
+
export { KVGrid } from "./kit/KV.js";
|
|
22
|
+
export { SecretField, CopyIcon } from "./kit/Secret.js";
|
|
23
|
+
export { ToastProvider, useToast } from "./kit/Toast.js";
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,EAAE;AACF,2EA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MAAM,kBAAmB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAc,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAkB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAiB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type Tone = "ok" | "run" | "warn" | "crit" | "info" | "brand" | "mut";
|
|
2
|
+
export declare const StatusPill: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
3
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
4
|
+
}, {
|
|
5
|
+
$tone: Tone;
|
|
6
|
+
$live?: boolean | undefined;
|
|
7
|
+
}>> & string;
|
|
8
|
+
/** Tag: small mono chip for technical strings (kinds, commits, roles). */
|
|
9
|
+
export declare const Tag: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "style"> & {
|
|
10
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
$tone?: Tone | undefined;
|
|
13
|
+
}>> & string;
|
|
14
|
+
export declare const LiveDot: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "style"> & {
|
|
15
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
$tone?: Tone | undefined;
|
|
18
|
+
}>> & string;
|
|
19
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/kit/Badge.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAc7E,eAAO,MAAM,UAAU;;;WAAwB,IAAI;YAAU,OAAO,GAAG,SAAS;YAsB/E,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,GAAG;;;YAAyB,IAAI,GAAG,SAAS;YAgBxD,CAAC;AAGF,eAAO,MAAM,OAAO;;;YAAsB,IAAI,GAAG,SAAS;YAMzD,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import styled, { css, keyframes } from "styled-components";
|
|
2
|
+
import { v } from "../theme/tokens.js";
|
|
3
|
+
const tones = {
|
|
4
|
+
ok: css `background: ${v.successBg}; color: ${v.success};`,
|
|
5
|
+
run: css `background: ${v.infoBg}; color: ${v.info};`,
|
|
6
|
+
warn: css `background: ${v.warningBg}; color: ${v.warning};`,
|
|
7
|
+
crit: css `background: ${v.dangerBg}; color: ${v.danger};`,
|
|
8
|
+
info: css `background: ${v.infoBg}; color: ${v.info};`,
|
|
9
|
+
brand: css `background: ${v.brand12}; color: ${v.brand};`,
|
|
10
|
+
mut: css `background: ${v.hover}; color: ${v.muted};`,
|
|
11
|
+
};
|
|
12
|
+
const breathe = keyframes `50% { opacity: 0.45; }`;
|
|
13
|
+
export const StatusPill = styled.span `
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: 6px;
|
|
17
|
+
height: 22px;
|
|
18
|
+
padding: 0 9px;
|
|
19
|
+
border-radius: 6px;
|
|
20
|
+
font-size: 10.5px;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
letter-spacing: 0.02em;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
${(p) => tones[p.$tone]}
|
|
25
|
+
${(p) => p.$live &&
|
|
26
|
+
css `
|
|
27
|
+
&::before {
|
|
28
|
+
content: "";
|
|
29
|
+
width: 6px; height: 6px; border-radius: 50%;
|
|
30
|
+
background: currentColor;
|
|
31
|
+
animation: ${breathe} 2.4s ease-in-out infinite;
|
|
32
|
+
}
|
|
33
|
+
`}
|
|
34
|
+
`;
|
|
35
|
+
/** Tag: small mono chip for technical strings (kinds, commits, roles). */
|
|
36
|
+
export const Tag = styled.span `
|
|
37
|
+
display: inline-flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 5px;
|
|
40
|
+
height: 20px;
|
|
41
|
+
padding: 0 7px;
|
|
42
|
+
border-radius: 5px;
|
|
43
|
+
font-family: ${v.mono};
|
|
44
|
+
font-size: 10.5px;
|
|
45
|
+
border: 1px solid ${v.line2};
|
|
46
|
+
color: ${v.muted};
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
max-width: 100%;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
${(p) => (p.$tone ? css `border-color: transparent; ${tones[p.$tone]}` : "")}
|
|
52
|
+
`;
|
|
53
|
+
const dotPulse = keyframes `50% { opacity: 0.4; }`;
|
|
54
|
+
export const LiveDot = styled.i `
|
|
55
|
+
display: inline-block;
|
|
56
|
+
width: 7px; height: 7px; border-radius: 50%;
|
|
57
|
+
background: ${(p) => (p.$tone === "crit" ? v.danger : p.$tone === "warn" ? v.warning : v.success)};
|
|
58
|
+
box-shadow: 0 0 8px currentColor;
|
|
59
|
+
animation: ${dotPulse} 2.4s ease-in-out infinite;
|
|
60
|
+
`;
|
|
61
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/kit/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE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,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;CAC5E,CAAC;AAEF,MAAM,QAAQ,GAAG,SAAS,CAAA,uBAAuB,CAAC;AAClD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAA8B;;;gBAG7C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;;eAEpF,QAAQ;CACtB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode, ComponentProps } from "react";
|
|
2
|
+
import { type IconName } from "./Icon.tsx";
|
|
3
|
+
type Variant = "grad" | "ghost" | "quiet" | "danger";
|
|
4
|
+
type Size = "md" | "sm" | "xs";
|
|
5
|
+
export interface AppButtonProps extends Omit<ComponentProps<"button">, "ref"> {
|
|
6
|
+
variant?: Variant | undefined;
|
|
7
|
+
size?: Size | undefined;
|
|
8
|
+
icon?: IconName | undefined;
|
|
9
|
+
loading?: boolean | undefined;
|
|
10
|
+
children?: ReactNode | undefined;
|
|
11
|
+
/** render as another element (e.g. as={Link} to=…) */
|
|
12
|
+
as?: React.ElementType | undefined;
|
|
13
|
+
to?: string | undefined;
|
|
14
|
+
href?: string | undefined;
|
|
15
|
+
target?: string | undefined;
|
|
16
|
+
rel?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare function AppButton({ variant, size, icon, loading, children, disabled, ...rest }: AppButtonProps): import("react").JSX.Element;
|
|
19
|
+
export declare const IconButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
|
|
20
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
21
|
+
}, {
|
|
22
|
+
$size?: number | undefined;
|
|
23
|
+
}>> & string;
|
|
24
|
+
export declare const ButtonRow: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
25
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
26
|
+
}> & string;
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/kit/Button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEjD,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC;AACrD,KAAK,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAuD/B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC;IAC3E,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,sDAAsD;IACtD,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,SAAS,CAAC;IACnC,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED,wBAAgB,SAAS,CAAC,EAAE,OAAiB,EAAE,IAAW,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,+BAOvH;AAED,eAAO,MAAM,UAAU;;;YAA2B,MAAM,GAAG,SAAS;YAYnE,CAAC;AAEF,eAAO,MAAM,SAAS;;WAIrB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled, { css } from "styled-components";
|
|
3
|
+
import { v } from "../theme/tokens.js";
|
|
4
|
+
import { Icon } from "./Icon.js";
|
|
5
|
+
const sizes = {
|
|
6
|
+
md: css `height: 34px; padding: 0 14px; font-size: 12.5px;`,
|
|
7
|
+
sm: css `height: 30px; padding: 0 12px; font-size: 12px;`,
|
|
8
|
+
xs: css `height: 26px; padding: 0 10px; font-size: 11.5px;`,
|
|
9
|
+
};
|
|
10
|
+
const Base = styled.button `
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
gap: 7px;
|
|
15
|
+
border-radius: ${v.rCtl};
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
border: 1px solid transparent;
|
|
19
|
+
transition: filter 0.14s ease, background 0.14s ease, border-color 0.14s ease;
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
${(p) => sizes[p.$size]}
|
|
22
|
+
&:active:not(:disabled) { transform: translateY(1px); }
|
|
23
|
+
&:disabled { opacity: 0.55; cursor: not-allowed; }
|
|
24
|
+
|
|
25
|
+
${(p) => p.$variant === "grad" &&
|
|
26
|
+
css `
|
|
27
|
+
background: ${v.grad};
|
|
28
|
+
color: ${v.onBrand};
|
|
29
|
+
box-shadow: 0 8px 20px -12px ${v.brand55};
|
|
30
|
+
&:hover:not(:disabled) { filter: brightness(1.08); }
|
|
31
|
+
`}
|
|
32
|
+
${(p) => p.$variant === "ghost" &&
|
|
33
|
+
css `
|
|
34
|
+
border-color: ${v.line2};
|
|
35
|
+
background: ${v.surface};
|
|
36
|
+
color: ${v.text};
|
|
37
|
+
&:hover:not(:disabled) { border-color: ${v.brand55}; }
|
|
38
|
+
`}
|
|
39
|
+
${(p) => p.$variant === "quiet" &&
|
|
40
|
+
css `
|
|
41
|
+
background: ${v.hover};
|
|
42
|
+
color: ${v.text};
|
|
43
|
+
&:hover:not(:disabled) { background: ${v.brand12}; }
|
|
44
|
+
`}
|
|
45
|
+
${(p) => p.$variant === "danger" &&
|
|
46
|
+
css `
|
|
47
|
+
background: ${v.dangerBg};
|
|
48
|
+
color: ${v.danger};
|
|
49
|
+
&:hover:not(:disabled) { filter: brightness(1.06); border-color: ${v.danger}; }
|
|
50
|
+
`}
|
|
51
|
+
`;
|
|
52
|
+
export function AppButton({ variant = "ghost", size = "sm", icon, loading, children, disabled, ...rest }) {
|
|
53
|
+
return (_jsxs(Base, { "$variant": variant, "$size": size, disabled: disabled || loading, ...rest, children: [loading ? _jsx(Icon, { name: "spinner", spin: true }) : icon ? _jsx(Icon, { name: icon }) : null, children] }));
|
|
54
|
+
}
|
|
55
|
+
export const IconButton = styled.button `
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
justify-content: center;
|
|
59
|
+
width: ${(p) => p.$size ?? 30}px;
|
|
60
|
+
height: ${(p) => p.$size ?? 30}px;
|
|
61
|
+
border-radius: ${v.rCtl};
|
|
62
|
+
color: ${v.muted};
|
|
63
|
+
border: 1px solid transparent;
|
|
64
|
+
transition: background 0.14s ease, color 0.14s ease;
|
|
65
|
+
&:hover { background: ${v.hover}; color: ${v.text}; }
|
|
66
|
+
&:active { transform: translateY(1px); }
|
|
67
|
+
`;
|
|
68
|
+
export const ButtonRow = styled.div `
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: 8px;
|
|
72
|
+
`;
|
|
73
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/kit/Button.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAiB,MAAM,WAAY,CAAC;AAKjD,MAAM,KAAK,GAAyC;IAClD,EAAE,EAAE,GAAG,CAAA,mDAAmD;IAC1D,EAAE,EAAE,GAAG,CAAA,iDAAiD;IACxD,EAAE,EAAE,GAAG,CAAA,mDAAmD;CAC3D,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAoC;;;;;mBAK3C,CAAC,CAAC,IAAI;;;;;;IAMrB,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;;;;IAIrB,CAAC,CAAC,EAAE,EAAE,CACN,CAAC,CAAC,QAAQ,KAAK,MAAM;IACrB,GAAG,CAAA;oBACa,CAAC,CAAC,IAAI;eACX,CAAC,CAAC,OAAO;qCACa,CAAC,CAAC,OAAO;;KAEzC;IACD,CAAC,CAAC,EAAE,EAAE,CACN,CAAC,CAAC,QAAQ,KAAK,OAAO;IACtB,GAAG,CAAA;sBACe,CAAC,CAAC,KAAK;oBACT,CAAC,CAAC,OAAO;eACd,CAAC,CAAC,IAAI;+CAC0B,CAAC,CAAC,OAAO;KACnD;IACD,CAAC,CAAC,EAAE,EAAE,CACN,CAAC,CAAC,QAAQ,KAAK,OAAO;IACtB,GAAG,CAAA;oBACa,CAAC,CAAC,KAAK;eACZ,CAAC,CA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|
+
render: (row: T) => ReactNode;
|
|
6
|
+
width?: string | undefined;
|
|
7
|
+
align?: "left" | "right" | undefined;
|
|
8
|
+
/** hide below this viewport width (px) */
|
|
9
|
+
hideBelow?: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare function DataTable<T>({ columns, rows, rowKey, loading, skeletonRows, empty, rowHref, onRowClick, severity, footer }: {
|
|
12
|
+
columns: Column<T>[];
|
|
13
|
+
rows: T[] | undefined;
|
|
14
|
+
rowKey: (row: T) => string;
|
|
15
|
+
loading?: boolean | undefined;
|
|
16
|
+
skeletonRows?: number | undefined;
|
|
17
|
+
empty?: ReactNode | undefined;
|
|
18
|
+
rowHref?: ((row: T) => string | null) | undefined;
|
|
19
|
+
onRowClick?: ((row: T) => void) | undefined;
|
|
20
|
+
severity?: ((row: T) => "crit" | "warn" | null) | undefined;
|
|
21
|
+
footer?: ReactNode | undefined;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=DataTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.d.ts","sourceRoot":"","sources":["../../src/kit/DataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOjD,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACrC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAiDD,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAgB,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE;IAC/H,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC;IACtB,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IAClD,UAAU,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5C,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IAC5D,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAChC,+BA6CA"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Fragment } from "react";
|
|
3
|
+
import styled, { css } from "styled-components";
|
|
4
|
+
import { useNavigate } from "react-router-dom";
|
|
5
|
+
import { v } from "../theme/tokens.js";
|
|
6
|
+
import { Panel } from "./Panel.js";
|
|
7
|
+
import { Skeleton, SkeletonRow } from "./Skeleton.js";
|
|
8
|
+
const Table = styled.table `
|
|
9
|
+
border-collapse: collapse;
|
|
10
|
+
width: 100%;
|
|
11
|
+
font-size: 12.5px;
|
|
12
|
+
`;
|
|
13
|
+
const Th = styled.th `
|
|
14
|
+
text-align: ${(p) => p.$align ?? "left"};
|
|
15
|
+
font-size: 10px;
|
|
16
|
+
font-weight: 600;
|
|
17
|
+
letter-spacing: 0.1em;
|
|
18
|
+
text-transform: uppercase;
|
|
19
|
+
color: ${v.faint};
|
|
20
|
+
background: ${v.surface2};
|
|
21
|
+
border-bottom: 1px solid ${v.line};
|
|
22
|
+
padding: 9px 16px;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
${(p) => p.$hide && css `@media (max-width: ${p.$hide}px) { display: none; }`}
|
|
25
|
+
`;
|
|
26
|
+
const Td = styled.td `
|
|
27
|
+
text-align: ${(p) => p.$align ?? "left"};
|
|
28
|
+
padding: 10px 16px;
|
|
29
|
+
border-bottom: 1px solid ${v.line};
|
|
30
|
+
vertical-align: middle;
|
|
31
|
+
${(p) => p.$hide && css `@media (max-width: ${p.$hide}px) { display: none; }`}
|
|
32
|
+
`;
|
|
33
|
+
// Severity edge bar — an xmb port: a 3px inset mark down the row's leading edge.
|
|
34
|
+
const Tr = styled.tr `
|
|
35
|
+
${(p) => p.$click && css `cursor: pointer; &:hover td { background: ${v.hover}; }`}
|
|
36
|
+
&:last-child td { border-bottom: none; }
|
|
37
|
+
${(p) => p.$mark && css `td:first-child { box-shadow: inset 3px 0 0 0 ${p.$mark === "crit" ? v.danger : v.warning}; }`}
|
|
38
|
+
`;
|
|
39
|
+
const FootRow = styled.div `
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: 10px;
|
|
43
|
+
padding: 10px 16px;
|
|
44
|
+
font-size: 11.5px;
|
|
45
|
+
color: ${v.faint};
|
|
46
|
+
border-top: 1px solid ${v.line};
|
|
47
|
+
`;
|
|
48
|
+
const Scroll = styled.div `overflow-x: auto;`;
|
|
49
|
+
export function DataTable({ columns, rows, rowKey, loading, skeletonRows = 5, empty, rowHref, onRowClick, severity, footer }) {
|
|
50
|
+
const navigate = useNavigate();
|
|
51
|
+
const showSkeleton = loading && (!rows || rows.length === 0);
|
|
52
|
+
const isEmpty = !loading && rows && rows.length === 0;
|
|
53
|
+
return (_jsxs(Panel, { children: [_jsx(Scroll, { children: _jsxs(Table, { children: [_jsx("thead", { children: _jsx("tr", { children: columns.map((c) => _jsx(Th, { "$align": c.align, "$hide": c.hideBelow, style: c.width ? { width: c.width } : undefined, children: c.head }, c.key)) }) }), !showSkeleton && !isEmpty ? (_jsx("tbody", { style: loading ? { opacity: 0.55 } : undefined, children: (rows ?? []).map((r) => {
|
|
54
|
+
const href = rowHref?.(r) ?? null;
|
|
55
|
+
const click = !!href || !!onRowClick;
|
|
56
|
+
return (_jsx(Tr, { "$click": click, "$mark": severity?.(r) ?? null, onClick: click ? () => (href ? navigate(href) : onRowClick?.(r)) : undefined, children: columns.map((c) => _jsx(Td, { "$align": c.align, "$hide": c.hideBelow, children: c.render(r) }, c.key)) }, rowKey(r)));
|
|
57
|
+
}) })) : null] }) }), showSkeleton ? (_jsx("div", { children: Array.from({ length: skeletonRows }).map((_, i) => (_jsxs(SkeletonRow, { children: [_jsx(Skeleton, { "$w": "26%" }), _jsx(Skeleton, { "$w": "12%" }), _jsx(Skeleton, { "$w": "8%" }), _jsx(Skeleton, { "$w": "16%" })] }, i))) })) : null, isEmpty ? _jsx(Fragment, { children: empty }) : null, footer && !showSkeleton && !isEmpty ? _jsx(FootRow, { children: footer }) : null] }));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=DataTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataTable.js","sourceRoot":"","sources":["../../src/kit/DataTable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAA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actNode } from "react";
|
|
2
|
+
import { type IconName } from "./Icon.tsx";
|
|
3
|
+
export declare function EmptyState({ icon, title, desc, action, compact }: {
|
|
4
|
+
icon?: IconName | undefined;
|
|
5
|
+
title: string;
|
|
6
|
+
desc?: string | undefined;
|
|
7
|
+
action?: ReactNode | undefined;
|
|
8
|
+
compact?: boolean | undefined;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../src/kit/EmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAyCjD,wBAAgB,UAAU,CAAC,EAAE,IAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IACzE,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC/B,+BASA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { v } from "../theme/tokens.js";
|
|
4
|
+
import { Icon } from "./Icon.js";
|
|
5
|
+
const Wrap = styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
text-align: center;
|
|
11
|
+
gap: 6px;
|
|
12
|
+
padding: ${(p) => (p.$compact ? "34px 20px" : "56px 24px")};
|
|
13
|
+
`;
|
|
14
|
+
const Glyph = styled.div `
|
|
15
|
+
width: 46px;
|
|
16
|
+
height: 46px;
|
|
17
|
+
border-radius: 12px;
|
|
18
|
+
display: grid;
|
|
19
|
+
place-items: center;
|
|
20
|
+
background: ${v.brand08};
|
|
21
|
+
color: ${v.brand};
|
|
22
|
+
font-size: 17px;
|
|
23
|
+
margin-bottom: 6px;
|
|
24
|
+
`;
|
|
25
|
+
const Title = styled.div `
|
|
26
|
+
font-size: 13.5px;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
`;
|
|
29
|
+
const Desc = styled.div `
|
|
30
|
+
font-size: 12.5px;
|
|
31
|
+
color: ${v.muted};
|
|
32
|
+
max-width: 46ch;
|
|
33
|
+
`;
|
|
34
|
+
const Actions = styled.div `
|
|
35
|
+
margin-top: 12px;
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: 8px;
|
|
38
|
+
`;
|
|
39
|
+
export function EmptyState({ icon = "box", title, desc, action, compact }) {
|
|
40
|
+
return (_jsxs(Wrap, { "$compact": compact, children: [_jsx(Glyph, { children: _jsx(Icon, { name: icon }) }), _jsx(Title, { children: title }), desc ? _jsx(Desc, { children: desc }) : null, action ? _jsx(Actions, { children: action }) : null] }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../src/kit/EmptyState.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAiB,MAAM,WAAY,CAAC;AAEjD,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAoC;;;;;;;aAO9C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC;CAC3D,CAAC;AAEF,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;gBAMR,CAAC,CAAC,OAAO;WACd,CAAC,CAAC,KAAK;;;CAGjB,CAAC;AAEF,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGvB,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAA;;WAEZ,CAAC,CAAC,KAAK;;CAEjB,CAAC;AAEF,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIzB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,EAAE,IAAI,GAAG,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAMtE;IACC,OAAO,CACL,MAAC,IAAI,gBAAW,OAAO,aACrB,KAAC,KAAK,cAAC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,GAAQ,EACnC,KAAC,KAAK,cAAE,KAAK,GAAS,EACrB,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,cAAE,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,EACjC,MAAM,CAAC,CAAC,CAAC,KAAC,OAAO,cAAE,MAAM,GAAW,CAAC,CAAC,CAAC,IAAI,IACvC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type IconName } from "./Icon.tsx";
|
|
3
|
+
export declare const CodeChip: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "style"> & {
|
|
4
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
5
|
+
}> & string;
|
|
6
|
+
export declare function EntityHeader({ icon, title, plainTitle, chips, after, actions }: {
|
|
7
|
+
icon: IconName;
|
|
8
|
+
title: string;
|
|
9
|
+
/** sans-serif title for user-defined labels; mono (the default) suits ids */
|
|
10
|
+
plainTitle?: boolean | undefined;
|
|
11
|
+
/** mono code chips under the title: url, repo, created… */
|
|
12
|
+
chips?: ReactNode[] | undefined;
|
|
13
|
+
/** rendered next to the title: status pill etc. */
|
|
14
|
+
after?: ReactNode | undefined;
|
|
15
|
+
actions?: ReactNode | undefined;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=EntityHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityHeader.d.ts","sourceRoot":"","sources":["../../src/kit/EntityHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAyCjD,eAAO,MAAM,QAAQ;;WAWpB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;IAC/E,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,SAAS,CAAC;IAChC,mDAAmD;IACnD,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,+BAcA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { v } from "../theme/tokens.js";
|
|
4
|
+
import { Icon } from "./Icon.js";
|
|
5
|
+
const Wrap = styled.header `
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 13px;
|
|
9
|
+
flex-wrap: wrap;
|
|
10
|
+
`;
|
|
11
|
+
const Tile = styled.div `
|
|
12
|
+
width: 38px;
|
|
13
|
+
height: 38px;
|
|
14
|
+
flex: none;
|
|
15
|
+
border-radius: 11px;
|
|
16
|
+
background: ${v.grad};
|
|
17
|
+
color: ${v.onBrand};
|
|
18
|
+
display: grid;
|
|
19
|
+
place-items: center;
|
|
20
|
+
font-size: 15px;
|
|
21
|
+
box-shadow: 0 8px 20px -12px ${v.brand55};
|
|
22
|
+
`;
|
|
23
|
+
const Title = styled.h2 `
|
|
24
|
+
margin: 0;
|
|
25
|
+
font-family: ${(p) => (p.$plain ? v.font : v.mono)};
|
|
26
|
+
font-size: 17px;
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
letter-spacing: -0.01em;
|
|
29
|
+
word-break: break-all;
|
|
30
|
+
`;
|
|
31
|
+
const SubRow = styled.div `
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: 5px;
|
|
35
|
+
flex-wrap: wrap;
|
|
36
|
+
margin-top: 3px;
|
|
37
|
+
font-size: 11.5px;
|
|
38
|
+
color: ${v.faint};
|
|
39
|
+
`;
|
|
40
|
+
export const CodeChip = styled.code `
|
|
41
|
+
font-size: 10.5px;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
padding: 2px 6px;
|
|
44
|
+
background: ${v.hover};
|
|
45
|
+
border: 1px solid ${v.line};
|
|
46
|
+
color: ${v.muted};
|
|
47
|
+
max-width: 320px;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
text-overflow: ellipsis;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
`;
|
|
52
|
+
export function EntityHeader({ icon, title, plainTitle, chips, after, actions }) {
|
|
53
|
+
return (_jsxs(Wrap, { children: [_jsx(Tile, { children: _jsx(Icon, { name: icon }) }), _jsxs("div", { style: { minWidth: 0 }, children: [_jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, flexWrap: "wrap" }, children: [_jsx(Title, { "$plain": plainTitle, children: title }), after] }), chips && chips.length ? _jsx(SubRow, { children: chips.map((c, i) => _jsx("span", { children: c }, i)) }) : null] }), actions ? _jsx(Actions, { children: actions }) : null] }));
|
|
54
|
+
}
|
|
55
|
+
const Actions = styled.div `
|
|
56
|
+
margin-left: auto;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 8px;
|
|
60
|
+
`;
|
|
61
|
+
//# sourceMappingURL=EntityHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityHeader.js","sourceRoot":"","sources":["../../src/kit/EntityHeader.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AACvC,OAAO,EAAE,IAAI,EAAiB,MAAM,WAAY,CAAC;AAEjD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;CAKzB,CAAC;AAEF,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;gBAKP,CAAC,CAAC,IAAI;WACX,CAAC,CAAC,OAAO;;;;iCAIa,CAAC,CAAC,OAAO;CACzC,CAAC;AAEF,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAkC;;iBAExC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;;;;;CAKnD,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;WAOd,CAAC,CAAC,KAAK;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAA;;;;gBAInB,CAAC,CAAC,KAAK;sBACD,CAAC,CAAC,IAAI;WACjB,CAAC,CAAC,KAAK;;;;;CAKjB,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAU5E;IACC,OAAO,CACL,MAAC,IAAI,eACH,KAAC,IAAI,cAAC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,GAAI,GAAO,EACjC,eAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,aACzB,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,aAC9E,KAAC,KAAK,cAAS,UAAU,YAAG,KAAK,GAAS,EACzC,KAAK,IACF,EACL,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAC,MAAM,cAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,yBAAe,CAAC,IAAL,CAAC,CAAY,CAAC,GAAU,CAAC,CAAC,CAAC,IAAI,IAC5F,EACL,OAAO,CAAC,CAAC,CAAC,KAAC,OAAO,cAAE,OAAO,GAAW,CAAC,CAAC,CAAC,IAAI,IACzC,CACR,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKzB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare const FormGrid: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
3
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
4
|
+
}, {
|
|
5
|
+
$cols?: number | undefined;
|
|
6
|
+
}>> & string;
|
|
7
|
+
export declare const FieldWrap: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "style"> & {
|
|
8
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
$span?: number | undefined;
|
|
11
|
+
}>> & string;
|
|
12
|
+
export declare function Field({ label, hint, span, children }: {
|
|
13
|
+
label: string;
|
|
14
|
+
hint?: ReactNode | undefined;
|
|
15
|
+
span?: number | undefined;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare const Input: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
19
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
20
|
+
}> & string;
|
|
21
|
+
export declare const MonoInput: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "style"> & {
|
|
22
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
23
|
+
}> & string;
|
|
24
|
+
export declare const Select: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "style"> & {
|
|
25
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
26
|
+
}> & string;
|
|
27
|
+
export declare const TextArea: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Merged<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "style"> & {
|
|
28
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
$mono?: boolean | undefined;
|
|
31
|
+
}>> & string;
|
|
32
|
+
export declare function Segmented<T extends string>({ options, value, onChange }: {
|
|
33
|
+
options: {
|
|
34
|
+
value: T;
|
|
35
|
+
label: string;
|
|
36
|
+
}[];
|
|
37
|
+
value: T;
|
|
38
|
+
onChange: (val: T) => void;
|
|
39
|
+
}): import("react").JSX.Element;
|
|
40
|
+
export declare function Toggle({ checked, onChange, label, disabled }: {
|
|
41
|
+
checked: boolean;
|
|
42
|
+
onChange: (c: boolean) => void;
|
|
43
|
+
label: ReactNode;
|
|
44
|
+
disabled?: boolean | undefined;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
46
|
+
export declare function FormSection({ title, desc, badge, children }: {
|
|
47
|
+
title: string;
|
|
48
|
+
desc?: string | undefined;
|
|
49
|
+
badge?: ReactNode | undefined;
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
}): import("react").JSX.Element;
|
|
52
|
+
export interface KVPair {
|
|
53
|
+
k: string;
|
|
54
|
+
v: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function KVEditor({ rows, onChange, disabled, keyPlaceholder, valuePlaceholder, addLabel, secret, validateKey }: {
|
|
57
|
+
rows: KVPair[];
|
|
58
|
+
onChange: (rows: KVPair[]) => void;
|
|
59
|
+
disabled?: boolean | undefined;
|
|
60
|
+
keyPlaceholder?: string | undefined;
|
|
61
|
+
valuePlaceholder?: string | undefined;
|
|
62
|
+
addLabel?: string | undefined;
|
|
63
|
+
/** render value inputs as password fields (secret material) */
|
|
64
|
+
secret?: boolean | undefined;
|
|
65
|
+
/** returns why a key is invalid, or null — shown inline under the row */
|
|
66
|
+
validateKey?: ((key: string) => string | null) | undefined;
|
|
67
|
+
}): import("react").JSX.Element;
|
|
68
|
+
/** Rows → wire map, dropping blank names and trimming keys. */
|
|
69
|
+
export declare function kvToMap(rows: KVPair[]): Record<string, string>;
|
|
70
|
+
/** Wire map → rows (for prefill/readback). */
|
|
71
|
+
export declare function mapToKv(m: Record<string, string> | undefined): KVPair[];
|
|
72
|
+
export declare const FormActions: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
73
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
74
|
+
}> & string;
|
|
75
|
+
export declare const InlineError: import("styled-components/dist/types").IStyledComponentBase<"web", Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
|
|
76
|
+
style?: import("react").CSSProperties | import("styled-components/dist/types").CSSPropertiesWithVars | undefined;
|
|
77
|
+
}> & string;
|
|
78
|
+
//# sourceMappingURL=Form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../src/kit/Form.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,QAAQ;;;YAAwB,MAAM,GAAG,SAAS;YAK9D,CAAC;AAEF,eAAO,MAAM,SAAS;;;YAA0B,MAAM,GAAG,SAAS;YAIjE,CAAC;AASF,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAQrJ;AAiBD,eAAO,MAAM,KAAK;;WAAuB,CAAC;AAC1C,eAAO,MAAM,SAAS;;WAAkE,CAAC;AACzF,eAAO,MAAM,MAAM;;WAQlB,CAAC;AACF,eAAO,MAAM,QAAQ;;;YAA6B,OAAO,GAAG,SAAS;YAQpE,CAA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