@calliopelabs/ui 0.6.1 → 0.7.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.
|
@@ -76,7 +76,7 @@ export function CustomAccentField({ id, value, ground, disabled, onChange, }) {
|
|
|
76
76
|
: !parsed
|
|
77
77
|
? t.customAccentInvalid
|
|
78
78
|
: check?.ok
|
|
79
|
-
? t.customAccentOk(check.ratio.toFixed(1))
|
|
80
|
-
: t.customAccentFaint((check?.ratio ?? 1).toFixed(1), MIN_NON_TEXT_CONTRAST, modeFor(ground));
|
|
79
|
+
? t.customAccentOk(check.ratio.toFixed(1), ground)
|
|
80
|
+
: t.customAccentFaint((check?.ratio ?? 1).toFixed(1), MIN_NON_TEXT_CONTRAST, modeFor(ground), ground);
|
|
81
81
|
return (_jsxs("div", { className: "mt-1 flex min-w-0 flex-col gap-1.5", children: [_jsx("label", { htmlFor: id, className: "text-sm font-medium", children: t.customAccent }), _jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [_jsx("input", { type: "color", "aria-label": t.customAccentPick, disabled: disabled, value: parsed ?? "#2f9e52", onChange: (event) => update(event.target.value), className: "size-8 shrink-0 cursor-pointer rounded-lg border bg-transparent disabled:cursor-not-allowed" }), _jsx("input", { id: id, type: "text", inputMode: "text", spellCheck: false, disabled: disabled, value: draft, placeholder: "#2f9e52", onChange: (event) => update(event.target.value), "aria-invalid": Boolean(draft) && !check?.ok, "aria-describedby": helpId, className: "h-8 w-32 rounded-lg border border-input bg-transparent px-2.5 font-mono text-sm outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-invalid:border-destructive" }), value && _jsx("span", { className: "text-xs text-muted-foreground", children: t.customAccentInUse })] }), _jsx("p", { id: helpId, "aria-live": "polite", className: cn("text-xs [overflow-wrap:anywhere]", draft && !check?.ok ? "text-danger-fg" : "text-muted-foreground"), children: help })] }));
|
|
82
82
|
}
|
|
@@ -100,8 +100,9 @@ export interface Messages {
|
|
|
100
100
|
customAccentHelp: string;
|
|
101
101
|
customAccentInvalid: string;
|
|
102
102
|
customAccentInUse: string;
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
/** `ground` is the ground's key, for a message that names it. */
|
|
104
|
+
customAccentOk: (ratio: string, ground: string) => string;
|
|
105
|
+
customAccentFaint: (ratio: string, min: number, mode: "dark" | "light", ground: string) => string;
|
|
105
106
|
};
|
|
106
107
|
}
|
|
107
108
|
export declare const defaultMessages: Messages;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calliopelabs/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Calliope AI shared operator UI: app shell, navigation, page frame, data table and list patterns, status colours, design tokens and appearance for Astrolift AI and Zentinelle AI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"calliope-ai",
|