@calliopelabs/ui 0.0.0-stage → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +334 -2
- package/dist/appearance/AppearancePicker.d.ts +10 -0
- package/dist/appearance/AppearancePicker.js +75 -0
- package/dist/appearance/AppearanceProvider.d.ts +53 -0
- package/dist/appearance/AppearanceProvider.js +113 -0
- package/dist/appearance/AppearanceScript.d.ts +16 -0
- package/dist/appearance/AppearanceScript.js +14 -0
- package/dist/appearance/appearance.d.ts +90 -0
- package/dist/appearance/appearance.js +151 -0
- package/dist/appearance/boot.d.ts +30 -0
- package/dist/appearance/boot.js +91 -0
- package/dist/appearance/brands.d.ts +187 -0
- package/dist/appearance/brands.js +150 -0
- package/dist/appearance/product.d.ts +89 -0
- package/dist/appearance/product.js +96 -0
- package/dist/data/DataTable.d.ts +66 -0
- package/dist/data/DataTable.js +148 -0
- package/dist/data/List.d.ts +55 -0
- package/dist/data/List.js +41 -0
- package/dist/data/types.d.ts +92 -0
- package/dist/data/types.js +2 -0
- package/dist/data/use-row-selection.d.ts +17 -0
- package/dist/data/use-row-selection.js +51 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +61 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/lib/cn.js +6 -0
- package/dist/lib/local-store.d.ts +12 -0
- package/dist/lib/local-store.js +54 -0
- package/dist/nav/Nav.d.ts +21 -0
- package/dist/nav/Nav.js +97 -0
- package/dist/nav/model.d.ts +77 -0
- package/dist/nav/model.js +72 -0
- package/dist/overlays/ConfirmDialog.d.ts +37 -0
- package/dist/overlays/ConfirmDialog.js +70 -0
- package/dist/overlays/Dialog.d.ts +18 -0
- package/dist/overlays/Dialog.js +39 -0
- package/dist/overlays/Drawer.d.ts +24 -0
- package/dist/overlays/Drawer.js +42 -0
- package/dist/page/Breadcrumbs.d.ts +20 -0
- package/dist/page/Breadcrumbs.js +25 -0
- package/dist/page/PageFrame.d.ts +17 -0
- package/dist/page/PageFrame.js +14 -0
- package/dist/page/PageHeader.d.ts +28 -0
- package/dist/page/PageHeader.js +13 -0
- package/dist/page/Section.d.ts +18 -0
- package/dist/page/Section.js +12 -0
- package/dist/page/TabNav.d.ts +19 -0
- package/dist/page/TabNav.js +16 -0
- package/dist/primitives/Button.d.ts +16 -0
- package/dist/primitives/Button.js +36 -0
- package/dist/primitives/Checkbox.d.ts +8 -0
- package/dist/primitives/Checkbox.js +13 -0
- package/dist/primitives/DropdownMenu.d.ts +11 -0
- package/dist/primitives/DropdownMenu.js +25 -0
- package/dist/primitives/Input.d.ts +2 -0
- package/dist/primitives/Input.js +5 -0
- package/dist/primitives/Popover.d.ts +5 -0
- package/dist/primitives/Popover.js +13 -0
- package/dist/primitives/Skeleton.d.ts +3 -0
- package/dist/primitives/Skeleton.js +6 -0
- package/dist/primitives/Tabs.d.ts +12 -0
- package/dist/primitives/Tabs.js +22 -0
- package/dist/provider/UIProvider.d.ts +29 -0
- package/dist/provider/UIProvider.js +21 -0
- package/dist/provider/messages.d.ts +106 -0
- package/dist/provider/messages.js +104 -0
- package/dist/shell/AppShell.d.ts +43 -0
- package/dist/shell/AppShell.js +62 -0
- package/dist/shell/BrandMark.d.ts +14 -0
- package/dist/shell/BrandMark.js +14 -0
- package/dist/shell/RailPanel.d.ts +39 -0
- package/dist/shell/RailPanel.js +62 -0
- package/dist/shell/RailTree.d.ts +35 -0
- package/dist/shell/RailTree.js +32 -0
- package/dist/shell/Sidebar.d.ts +26 -0
- package/dist/shell/Sidebar.js +21 -0
- package/dist/shell/UserMenu.d.ts +22 -0
- package/dist/shell/UserMenu.js +31 -0
- package/dist/shell/placement.d.ts +10 -0
- package/dist/shell/placement.js +6 -0
- package/dist/shell/rail-state.d.ts +13 -0
- package/dist/shell/rail-state.js +28 -0
- package/dist/states/EmptyState.d.ts +20 -0
- package/dist/states/EmptyState.js +15 -0
- package/dist/states/ErrorState.d.ts +23 -0
- package/dist/states/ErrorState.js +16 -0
- package/dist/states/LoadingState.d.ts +14 -0
- package/dist/states/LoadingState.js +14 -0
- package/dist/status/StatusBadge.d.ts +19 -0
- package/dist/status/StatusBadge.js +13 -0
- package/dist/status/StatusDot.d.ts +14 -0
- package/dist/status/StatusDot.js +7 -0
- package/dist/status/tones.d.ts +17 -0
- package/dist/status/tones.js +29 -0
- package/dist/styles/preset.css +175 -0
- package/dist/styles/theme.css +339 -0
- package/dist/theme/contrast.d.ts +8 -0
- package/dist/theme/contrast.js +18 -0
- package/dist/theme/css.d.ts +23 -0
- package/dist/theme/css.js +116 -0
- package/dist/theme/tokens.d.ts +195 -0
- package/dist/theme/tokens.js +294 -0
- package/package.json +112 -4
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Calliope AI operator palette: one table, and the source of
|
|
3
|
+
* `src/styles/theme.css` (`npm run theme`). Every value here is either a
|
|
4
|
+
* ground (the surface ramp), a family accent (action colour and the lead
|
|
5
|
+
* chart series), a semantic status, or a density step.
|
|
6
|
+
*
|
|
7
|
+
* Values come from the Astrolift frontend (`app/globals.css`, origin/main
|
|
8
|
+
* 8edb40d) and the operator-UI amendment of 2026-08-21: grounds are black
|
|
9
|
+
* and neutral, the sidebar is the one brand surface, corners are 2px, a
|
|
10
|
+
* second hue is allowed as accent, and semantic status never moves with the
|
|
11
|
+
* accent or the ground's tint. Astrolift's light values were oklch; they are
|
|
12
|
+
* stored here as the sRGB they render to, so the contrast tests can read
|
|
13
|
+
* them. One value changed on the way: light `warning` went from
|
|
14
|
+
* oklch(0.66 0.16 70) to oklch(0.65 0.16 70) so a warning dot clears 3:1 on
|
|
15
|
+
* paper and mist.
|
|
16
|
+
*/
|
|
17
|
+
export type Mode = "dark" | "light";
|
|
18
|
+
export declare const GROUNDS: {
|
|
19
|
+
readonly black: {
|
|
20
|
+
readonly label: "Black";
|
|
21
|
+
readonly mode: "dark";
|
|
22
|
+
};
|
|
23
|
+
readonly charcoal: {
|
|
24
|
+
readonly label: "Charcoal";
|
|
25
|
+
readonly mode: "dark";
|
|
26
|
+
};
|
|
27
|
+
readonly graphite: {
|
|
28
|
+
readonly label: "Graphite";
|
|
29
|
+
readonly mode: "dark";
|
|
30
|
+
};
|
|
31
|
+
readonly emerald: {
|
|
32
|
+
readonly label: "Emerald";
|
|
33
|
+
readonly mode: "dark";
|
|
34
|
+
};
|
|
35
|
+
readonly paper: {
|
|
36
|
+
readonly label: "Paper";
|
|
37
|
+
readonly mode: "light";
|
|
38
|
+
};
|
|
39
|
+
readonly mist: {
|
|
40
|
+
readonly label: "Mist";
|
|
41
|
+
readonly mode: "light";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type Ground = keyof typeof GROUNDS;
|
|
45
|
+
export declare const GROUND_KEYS: Ground[];
|
|
46
|
+
/**
|
|
47
|
+
* The surfaces a ground paints. `sidebar: "brand"` means the product's brand
|
|
48
|
+
* surface (`--brand-sidebar`, set by the product), falling back to the
|
|
49
|
+
* ground's own card colour when no product is set. Graphite and the light
|
|
50
|
+
* grounds keep a neutral sidebar whatever the product, so the brand colour
|
|
51
|
+
* is spent on the accent there (Astrolift #2286).
|
|
52
|
+
*/
|
|
53
|
+
export interface Surfaces {
|
|
54
|
+
background: string;
|
|
55
|
+
card: string;
|
|
56
|
+
popover: string;
|
|
57
|
+
secondary: string;
|
|
58
|
+
muted: string;
|
|
59
|
+
/** shadcn's name for the hover and selected surface, not the brand accent. */
|
|
60
|
+
accent: string;
|
|
61
|
+
mutedForeground: string;
|
|
62
|
+
border: string;
|
|
63
|
+
input: string;
|
|
64
|
+
sidebar: "brand" | string;
|
|
65
|
+
sidebarAccent: string;
|
|
66
|
+
sidebarBorder: string;
|
|
67
|
+
}
|
|
68
|
+
export declare const SURFACES: Record<Ground, Surfaces>;
|
|
69
|
+
/**
|
|
70
|
+
* What a mode paints before a ground refines it: dark starts on black, light
|
|
71
|
+
* on a neutral white. Every shipped ground overrides these surfaces, so the
|
|
72
|
+
* light set only shows when no ground is set.
|
|
73
|
+
*/
|
|
74
|
+
export declare const BASE_SURFACES: Record<Mode, Surfaces>;
|
|
75
|
+
export type StatusName = "success" | "warning" | "info" | "danger";
|
|
76
|
+
/**
|
|
77
|
+
* A status paints four tokens: the solid base (dots, icons, chart series),
|
|
78
|
+
* `fg` (text and icons on the status tint), `bg` (a subtle callout fill) and
|
|
79
|
+
* `border` (the tinted hairline). Defined per mode only: no ground and no
|
|
80
|
+
* accent may redefine them. Info is green; the family permits no blue.
|
|
81
|
+
*/
|
|
82
|
+
export interface StatusTokens {
|
|
83
|
+
base: string;
|
|
84
|
+
fg: string;
|
|
85
|
+
bg: string;
|
|
86
|
+
border: string;
|
|
87
|
+
}
|
|
88
|
+
export interface ModeTokens {
|
|
89
|
+
foreground: string;
|
|
90
|
+
destructive: string;
|
|
91
|
+
/** chart-1 is always the accent; these are series two to five. */
|
|
92
|
+
chart: {
|
|
93
|
+
"chart-2": string;
|
|
94
|
+
"chart-3": string;
|
|
95
|
+
"chart-4": string;
|
|
96
|
+
"chart-5": string;
|
|
97
|
+
};
|
|
98
|
+
sidebarForeground: string;
|
|
99
|
+
status: Record<StatusName, StatusTokens>;
|
|
100
|
+
}
|
|
101
|
+
export declare const MODE_TOKENS: Record<Mode, ModeTokens>;
|
|
102
|
+
/**
|
|
103
|
+
* The family accents: the action colour, focus ring and lead chart series.
|
|
104
|
+
* `dark` and `light` are the accent on each mode's grounds; `onDark` and
|
|
105
|
+
* `onLight` are the ink on a filled accent. A product may add its own brand
|
|
106
|
+
* accent beside these (Zentinelle teal); none of them reaches status.
|
|
107
|
+
*/
|
|
108
|
+
export interface AccentSpec {
|
|
109
|
+
label: string;
|
|
110
|
+
dark: string;
|
|
111
|
+
onDark: string;
|
|
112
|
+
light: string;
|
|
113
|
+
onLight: string;
|
|
114
|
+
/** Chart series moved so they do not collide with this accent. */
|
|
115
|
+
chart?: Partial<Record<Mode, Partial<ModeTokens["chart"]>>>;
|
|
116
|
+
}
|
|
117
|
+
export declare const ACCENTS: {
|
|
118
|
+
readonly green: {
|
|
119
|
+
readonly label: "Green";
|
|
120
|
+
readonly dark: "#2f9e52";
|
|
121
|
+
readonly onDark: "#04241b";
|
|
122
|
+
readonly light: "#26803f";
|
|
123
|
+
readonly onLight: "#f3fbf7";
|
|
124
|
+
};
|
|
125
|
+
readonly copper: {
|
|
126
|
+
readonly label: "Copper";
|
|
127
|
+
readonly dark: "#c97b4a";
|
|
128
|
+
readonly onDark: "#140a04";
|
|
129
|
+
readonly light: "#9c5730";
|
|
130
|
+
readonly onLight: "#f3fbf7";
|
|
131
|
+
readonly chart: {
|
|
132
|
+
readonly dark: {
|
|
133
|
+
readonly "chart-3": "#d9c7a3";
|
|
134
|
+
readonly "chart-5": "#2f9e52";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
readonly ice: {
|
|
139
|
+
readonly label: "Ice";
|
|
140
|
+
readonly dark: "#6e9fc4";
|
|
141
|
+
readonly onDark: "#06131c";
|
|
142
|
+
readonly light: "#3d6f95";
|
|
143
|
+
readonly onLight: "#f3fbf7";
|
|
144
|
+
readonly chart: {
|
|
145
|
+
readonly dark: {
|
|
146
|
+
readonly "chart-3": "#b9d4e4";
|
|
147
|
+
readonly "chart-5": "#2f9e52";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
readonly periwinkle: {
|
|
152
|
+
readonly label: "Periwinkle";
|
|
153
|
+
readonly dark: "#8b8fd9";
|
|
154
|
+
readonly onDark: "#0b0c1a";
|
|
155
|
+
readonly light: "#5a5fae";
|
|
156
|
+
readonly onLight: "#f3fbf7";
|
|
157
|
+
readonly chart: {
|
|
158
|
+
readonly dark: {
|
|
159
|
+
readonly "chart-3": "#c3c5ec";
|
|
160
|
+
readonly "chart-5": "#2f9e52";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
readonly amber: {
|
|
165
|
+
readonly label: "Amber";
|
|
166
|
+
readonly dark: "#e0b34a";
|
|
167
|
+
readonly onDark: "#1a1204";
|
|
168
|
+
readonly light: "#8a6410";
|
|
169
|
+
readonly onLight: "#f3fbf7";
|
|
170
|
+
readonly chart: {
|
|
171
|
+
readonly dark: {
|
|
172
|
+
readonly "chart-4": "#c97b4a";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
export type FamilyAccent = keyof typeof ACCENTS;
|
|
178
|
+
export declare const ACCENT_KEYS: FamilyAccent[];
|
|
179
|
+
/** The accent a mode paints when nothing chooses one. */
|
|
180
|
+
export declare const DEFAULT_ACCENT: FamilyAccent;
|
|
181
|
+
export type Density = "compact" | "cards";
|
|
182
|
+
/**
|
|
183
|
+
* Density is a layout axis, not padding (operator-UI amendment): `compact`
|
|
184
|
+
* is one panel of hairline rows, `cards` boxes items and flows them into
|
|
185
|
+
* responsive columns. Components read these variables, and a subtree can
|
|
186
|
+
* carry its own `data-density`, so the nearest one wins.
|
|
187
|
+
*/
|
|
188
|
+
export declare const DENSITIES: Record<Density, {
|
|
189
|
+
label: string;
|
|
190
|
+
hint: string;
|
|
191
|
+
tokens: Record<string, string>;
|
|
192
|
+
}>;
|
|
193
|
+
export declare const DENSITY_KEYS: Density[];
|
|
194
|
+
/** Mode-independent tokens. `--radius` is the corners setting (2px shipped). */
|
|
195
|
+
export declare const STATIC_TOKENS: Record<string, string>;
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Calliope AI operator palette: one table, and the source of
|
|
3
|
+
* `src/styles/theme.css` (`npm run theme`). Every value here is either a
|
|
4
|
+
* ground (the surface ramp), a family accent (action colour and the lead
|
|
5
|
+
* chart series), a semantic status, or a density step.
|
|
6
|
+
*
|
|
7
|
+
* Values come from the Astrolift frontend (`app/globals.css`, origin/main
|
|
8
|
+
* 8edb40d) and the operator-UI amendment of 2026-08-21: grounds are black
|
|
9
|
+
* and neutral, the sidebar is the one brand surface, corners are 2px, a
|
|
10
|
+
* second hue is allowed as accent, and semantic status never moves with the
|
|
11
|
+
* accent or the ground's tint. Astrolift's light values were oklch; they are
|
|
12
|
+
* stored here as the sRGB they render to, so the contrast tests can read
|
|
13
|
+
* them. One value changed on the way: light `warning` went from
|
|
14
|
+
* oklch(0.66 0.16 70) to oklch(0.65 0.16 70) so a warning dot clears 3:1 on
|
|
15
|
+
* paper and mist.
|
|
16
|
+
*/
|
|
17
|
+
export const GROUNDS = {
|
|
18
|
+
black: { label: "Black", mode: "dark" },
|
|
19
|
+
charcoal: { label: "Charcoal", mode: "dark" },
|
|
20
|
+
graphite: { label: "Graphite", mode: "dark" },
|
|
21
|
+
emerald: { label: "Emerald", mode: "dark" },
|
|
22
|
+
paper: { label: "Paper", mode: "light" },
|
|
23
|
+
mist: { label: "Mist", mode: "light" },
|
|
24
|
+
};
|
|
25
|
+
export const GROUND_KEYS = Object.keys(GROUNDS);
|
|
26
|
+
const PRIMARY_TINT_16 = "color-mix(in oklab, var(--primary) 16%, transparent)";
|
|
27
|
+
const PRIMARY_TINT_14 = "color-mix(in oklab, var(--primary) 14%, transparent)";
|
|
28
|
+
export const SURFACES = {
|
|
29
|
+
black: {
|
|
30
|
+
background: "#000000",
|
|
31
|
+
card: "#0a0a0a",
|
|
32
|
+
popover: "#141414",
|
|
33
|
+
secondary: "#161616",
|
|
34
|
+
muted: "#111111",
|
|
35
|
+
accent: "#1b1b1b",
|
|
36
|
+
mutedForeground: "#848b88",
|
|
37
|
+
border: "rgba(255, 255, 255, 0.1)",
|
|
38
|
+
input: "rgba(255, 255, 255, 0.1)",
|
|
39
|
+
sidebar: "brand",
|
|
40
|
+
sidebarAccent: PRIMARY_TINT_16,
|
|
41
|
+
sidebarBorder: "rgba(255, 255, 255, 0.08)",
|
|
42
|
+
},
|
|
43
|
+
charcoal: {
|
|
44
|
+
background: "#0e0f10",
|
|
45
|
+
card: "#161819",
|
|
46
|
+
popover: "#1e2022",
|
|
47
|
+
secondary: "#202325",
|
|
48
|
+
muted: "#191b1c",
|
|
49
|
+
accent: "#232628",
|
|
50
|
+
mutedForeground: "#8b9194",
|
|
51
|
+
border: "rgba(255, 255, 255, 0.1)",
|
|
52
|
+
input: "rgba(255, 255, 255, 0.1)",
|
|
53
|
+
sidebar: "brand",
|
|
54
|
+
sidebarAccent: PRIMARY_TINT_16,
|
|
55
|
+
sidebarBorder: "rgba(255, 255, 255, 0.08)",
|
|
56
|
+
},
|
|
57
|
+
graphite: {
|
|
58
|
+
background: "#111214",
|
|
59
|
+
card: "#18191b",
|
|
60
|
+
popover: "#202124",
|
|
61
|
+
secondary: "#222326",
|
|
62
|
+
muted: "#1b1c1e",
|
|
63
|
+
accent: "#26272a",
|
|
64
|
+
mutedForeground: "#8e9296",
|
|
65
|
+
border: "rgba(255, 255, 255, 0.09)",
|
|
66
|
+
input: "rgba(255, 255, 255, 0.1)",
|
|
67
|
+
sidebar: "#161719",
|
|
68
|
+
sidebarAccent: PRIMARY_TINT_14,
|
|
69
|
+
sidebarBorder: "rgba(255, 255, 255, 0.07)",
|
|
70
|
+
},
|
|
71
|
+
emerald: {
|
|
72
|
+
background: "#050b08",
|
|
73
|
+
card: "#0a1310",
|
|
74
|
+
popover: "#0d1814",
|
|
75
|
+
secondary: "#121d18",
|
|
76
|
+
muted: "#101a15",
|
|
77
|
+
accent: "#16261f",
|
|
78
|
+
mutedForeground: "#8ba199",
|
|
79
|
+
border: "rgba(255, 255, 255, 0.1)",
|
|
80
|
+
input: "rgba(255, 255, 255, 0.1)",
|
|
81
|
+
sidebar: "brand",
|
|
82
|
+
sidebarAccent: PRIMARY_TINT_16,
|
|
83
|
+
sidebarBorder: "rgba(255, 255, 255, 0.08)",
|
|
84
|
+
},
|
|
85
|
+
paper: {
|
|
86
|
+
background: "#faf6ee",
|
|
87
|
+
card: "#fffdf9",
|
|
88
|
+
popover: "#fffdf9",
|
|
89
|
+
secondary: "#f3eee4",
|
|
90
|
+
muted: "#f3eee4",
|
|
91
|
+
accent: "#f0e6da",
|
|
92
|
+
mutedForeground: "#5c5b58",
|
|
93
|
+
border: "#dedad2",
|
|
94
|
+
input: "#dedad2",
|
|
95
|
+
sidebar: "#f5f0e4",
|
|
96
|
+
sidebarAccent: "#f0e6da",
|
|
97
|
+
sidebarBorder: "#dedad2",
|
|
98
|
+
},
|
|
99
|
+
mist: {
|
|
100
|
+
background: "#f2f7f9",
|
|
101
|
+
card: "#ffffff",
|
|
102
|
+
popover: "#ffffff",
|
|
103
|
+
secondary: "#e9eff2",
|
|
104
|
+
muted: "#e9eff2",
|
|
105
|
+
accent: "#dfeaf0",
|
|
106
|
+
mutedForeground: "#5c5b58",
|
|
107
|
+
border: "#d6dcdf",
|
|
108
|
+
input: "#d6dcdf",
|
|
109
|
+
sidebar: "#e9f1f5",
|
|
110
|
+
sidebarAccent: "#dfeaf0",
|
|
111
|
+
sidebarBorder: "#d6dcdf",
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* What a mode paints before a ground refines it: dark starts on black, light
|
|
116
|
+
* on a neutral white. Every shipped ground overrides these surfaces, so the
|
|
117
|
+
* light set only shows when no ground is set.
|
|
118
|
+
*/
|
|
119
|
+
export const BASE_SURFACES = {
|
|
120
|
+
dark: SURFACES.black,
|
|
121
|
+
light: {
|
|
122
|
+
background: "#fafaf9",
|
|
123
|
+
card: "#ffffff",
|
|
124
|
+
popover: "#ffffff",
|
|
125
|
+
secondary: "#f1f1f0",
|
|
126
|
+
muted: "#f1f1f0",
|
|
127
|
+
accent: "#f3ebe5",
|
|
128
|
+
mutedForeground: "#5c5b58",
|
|
129
|
+
border: "#dfdedc",
|
|
130
|
+
input: "#dfdedc",
|
|
131
|
+
sidebar: "#f4f3f1",
|
|
132
|
+
sidebarAccent: "#f3ebe5",
|
|
133
|
+
sidebarBorder: "#dfdedc",
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
export const MODE_TOKENS = {
|
|
137
|
+
dark: {
|
|
138
|
+
foreground: "#f0f2f1",
|
|
139
|
+
destructive: "#ff6b6b",
|
|
140
|
+
chart: {
|
|
141
|
+
"chart-2": "#8fd82a",
|
|
142
|
+
"chart-3": "#cbf39d",
|
|
143
|
+
"chart-4": "#e0b34a",
|
|
144
|
+
"chart-5": "#0b6644",
|
|
145
|
+
},
|
|
146
|
+
sidebarForeground: "#f0f2f1",
|
|
147
|
+
status: {
|
|
148
|
+
success: {
|
|
149
|
+
base: "#8fd82a",
|
|
150
|
+
fg: "#a6e34d",
|
|
151
|
+
bg: "rgba(143, 216, 42, 0.1)",
|
|
152
|
+
border: "rgba(143, 216, 42, 0.35)",
|
|
153
|
+
},
|
|
154
|
+
warning: {
|
|
155
|
+
base: "#f0c34e",
|
|
156
|
+
fg: "#f0c34e",
|
|
157
|
+
bg: "rgba(240, 195, 78, 0.1)",
|
|
158
|
+
border: "rgba(240, 195, 78, 0.35)",
|
|
159
|
+
},
|
|
160
|
+
info: {
|
|
161
|
+
base: "#2f9e52",
|
|
162
|
+
fg: "#5cbb79",
|
|
163
|
+
bg: "rgba(47, 158, 82, 0.14)",
|
|
164
|
+
border: "rgba(47, 158, 82, 0.4)",
|
|
165
|
+
},
|
|
166
|
+
danger: {
|
|
167
|
+
base: "#ff6b6b",
|
|
168
|
+
fg: "#ff8a8a",
|
|
169
|
+
bg: "rgba(255, 107, 107, 0.1)",
|
|
170
|
+
border: "rgba(255, 107, 107, 0.35)",
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
light: {
|
|
175
|
+
foreground: "#1e1d1b",
|
|
176
|
+
destructive: "#d40c1a",
|
|
177
|
+
chart: {
|
|
178
|
+
"chart-2": "#5c9c1a",
|
|
179
|
+
"chart-3": "#8a7a5c",
|
|
180
|
+
"chart-4": "#b8860b",
|
|
181
|
+
"chart-5": "#26803f",
|
|
182
|
+
},
|
|
183
|
+
sidebarForeground: "#1e1d1b",
|
|
184
|
+
status: {
|
|
185
|
+
success: { base: "#508d23", fg: "#305a12", bg: "#e3f5da", border: "#b4d7a2" },
|
|
186
|
+
warning: { base: "#cb7a00", fg: "#824c12", bg: "#fef0d4", border: "#e8c184" },
|
|
187
|
+
info: { base: "#2f8543", fg: "#1b622d", bg: "#e2f4e3", border: "#acd8b1" },
|
|
188
|
+
danger: { base: "#df2225", fg: "#bb0916", bg: "#ffeae9", border: "#ffb1aa" },
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
export const ACCENTS = {
|
|
193
|
+
green: {
|
|
194
|
+
label: "Green",
|
|
195
|
+
dark: "#2f9e52",
|
|
196
|
+
onDark: "#04241b",
|
|
197
|
+
light: "#26803f",
|
|
198
|
+
onLight: "#f3fbf7",
|
|
199
|
+
},
|
|
200
|
+
copper: {
|
|
201
|
+
label: "Copper",
|
|
202
|
+
dark: "#c97b4a",
|
|
203
|
+
onDark: "#140a04",
|
|
204
|
+
light: "#9c5730",
|
|
205
|
+
onLight: "#f3fbf7",
|
|
206
|
+
chart: { dark: { "chart-3": "#d9c7a3", "chart-5": "#2f9e52" } },
|
|
207
|
+
},
|
|
208
|
+
ice: {
|
|
209
|
+
label: "Ice",
|
|
210
|
+
dark: "#6e9fc4",
|
|
211
|
+
onDark: "#06131c",
|
|
212
|
+
light: "#3d6f95",
|
|
213
|
+
onLight: "#f3fbf7",
|
|
214
|
+
chart: { dark: { "chart-3": "#b9d4e4", "chart-5": "#2f9e52" } },
|
|
215
|
+
},
|
|
216
|
+
periwinkle: {
|
|
217
|
+
label: "Periwinkle",
|
|
218
|
+
dark: "#8b8fd9",
|
|
219
|
+
onDark: "#0b0c1a",
|
|
220
|
+
light: "#5a5fae",
|
|
221
|
+
onLight: "#f3fbf7",
|
|
222
|
+
chart: { dark: { "chart-3": "#c3c5ec", "chart-5": "#2f9e52" } },
|
|
223
|
+
},
|
|
224
|
+
amber: {
|
|
225
|
+
label: "Amber",
|
|
226
|
+
dark: "#e0b34a",
|
|
227
|
+
onDark: "#1a1204",
|
|
228
|
+
light: "#8a6410",
|
|
229
|
+
onLight: "#f3fbf7",
|
|
230
|
+
// Amber is the accent here, so the amber series moves to copper.
|
|
231
|
+
chart: { dark: { "chart-4": "#c97b4a" } },
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
export const ACCENT_KEYS = Object.keys(ACCENTS);
|
|
235
|
+
/** The accent a mode paints when nothing chooses one. */
|
|
236
|
+
export const DEFAULT_ACCENT = "green";
|
|
237
|
+
/**
|
|
238
|
+
* Density is a layout axis, not padding (operator-UI amendment): `compact`
|
|
239
|
+
* is one panel of hairline rows, `cards` boxes items and flows them into
|
|
240
|
+
* responsive columns. Components read these variables, and a subtree can
|
|
241
|
+
* carry its own `data-density`, so the nearest one wins.
|
|
242
|
+
*/
|
|
243
|
+
export const DENSITIES = {
|
|
244
|
+
compact: {
|
|
245
|
+
label: "Compact",
|
|
246
|
+
hint: "Dense rows with hairline dividers",
|
|
247
|
+
tokens: {
|
|
248
|
+
"row-pad-y": "0.5rem",
|
|
249
|
+
"row-pad-x": "0.75rem",
|
|
250
|
+
"stack-gap": "0.75rem",
|
|
251
|
+
"panel-pad": "1rem",
|
|
252
|
+
"list-columns": "minmax(0, 1fr)",
|
|
253
|
+
"list-gap": "0px",
|
|
254
|
+
"list-frame-border": "1px",
|
|
255
|
+
"list-frame-radius": "var(--radius)",
|
|
256
|
+
"list-item-border": "0px",
|
|
257
|
+
"list-item-radius": "0px",
|
|
258
|
+
"list-item-bg": "transparent",
|
|
259
|
+
"list-item-pad": "var(--row-pad-y) var(--row-pad-x)",
|
|
260
|
+
"list-item-direction": "row",
|
|
261
|
+
"list-item-align": "center",
|
|
262
|
+
"list-item-trail": "auto",
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
cards: {
|
|
266
|
+
label: "Cards",
|
|
267
|
+
hint: "Boxed items that flow into columns",
|
|
268
|
+
tokens: {
|
|
269
|
+
"row-pad-y": "0.9rem",
|
|
270
|
+
"row-pad-x": "1rem",
|
|
271
|
+
"stack-gap": "1rem",
|
|
272
|
+
"panel-pad": "1.25rem",
|
|
273
|
+
"list-columns": "repeat(auto-fill, minmax(min(100%, 16rem), 1fr))",
|
|
274
|
+
"list-gap": "var(--stack-gap)",
|
|
275
|
+
"list-frame-border": "0px",
|
|
276
|
+
"list-frame-radius": "0px",
|
|
277
|
+
"list-item-border": "1px",
|
|
278
|
+
"list-item-radius": "var(--radius)",
|
|
279
|
+
"list-item-bg": "var(--card)",
|
|
280
|
+
"list-item-pad": "var(--panel-pad)",
|
|
281
|
+
"list-item-direction": "column",
|
|
282
|
+
"list-item-align": "stretch",
|
|
283
|
+
"list-item-trail": "0px",
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
};
|
|
287
|
+
export const DENSITY_KEYS = Object.keys(DENSITIES);
|
|
288
|
+
/** Mode-independent tokens. `--radius` is the corners setting (2px shipped). */
|
|
289
|
+
export const STATIC_TOKENS = {
|
|
290
|
+
radius: "2px",
|
|
291
|
+
"motion-fast": "120ms",
|
|
292
|
+
"motion-base": "200ms",
|
|
293
|
+
"motion-slow": "320ms",
|
|
294
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,114 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calliopelabs/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.3.1",
|
|
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
|
+
"keywords": [
|
|
6
|
+
"calliope-ai",
|
|
7
|
+
"astrolift",
|
|
8
|
+
"zentinelle",
|
|
9
|
+
"react",
|
|
10
|
+
"tailwindcss",
|
|
11
|
+
"design-system",
|
|
12
|
+
"storybook"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/calliopeai/calliope-ui#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/calliopeai/calliope-ui/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/calliopeai/calliope-ui.git"
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "Calliope Labs Inc",
|
|
24
|
+
"type": "module",
|
|
25
|
+
"sideEffects": [
|
|
26
|
+
"**/*.css"
|
|
27
|
+
],
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"default": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./theme.css": "./dist/styles/theme.css",
|
|
34
|
+
"./preset.css": "./dist/styles/preset.css",
|
|
35
|
+
"./package.json": "./package.json"
|
|
36
|
+
},
|
|
37
|
+
"main": "./dist/index.js",
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"files": [
|
|
40
|
+
"dist"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "node scripts/build.mjs",
|
|
44
|
+
"prepack": "npm run build",
|
|
45
|
+
"pack:check": "node scripts/check-package.mjs",
|
|
46
|
+
"theme": "tsx scripts/generate-theme.ts",
|
|
47
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
48
|
+
"lint": "eslint . --max-warnings=0",
|
|
49
|
+
"format": "prettier --write .",
|
|
50
|
+
"format:check": "prettier --check .",
|
|
51
|
+
"test": "vitest run",
|
|
52
|
+
"test:watch": "vitest",
|
|
53
|
+
"test:story-coverage": "vitest run src/test/story-coverage.test.ts",
|
|
54
|
+
"storybook": "storybook dev -p 6006",
|
|
55
|
+
"build-storybook": "storybook build --quiet"
|
|
56
|
+
},
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"class-variance-authority": "^0.7.1",
|
|
59
|
+
"clsx": "^2.1.1",
|
|
60
|
+
"lucide-react": "^1.58.0",
|
|
61
|
+
"radix-ui": "^1.8.1",
|
|
62
|
+
"tailwind-merge": "^3.7.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@eslint/js": "^9.39.5",
|
|
66
|
+
"@fontsource-variable/dm-sans": "^5.3.0",
|
|
67
|
+
"@fontsource/ibm-plex-mono": "^5.3.0",
|
|
68
|
+
"@fontsource/ibm-plex-sans": "^5.3.0",
|
|
69
|
+
"@storybook/addon-a11y": "^10.6.2",
|
|
70
|
+
"@storybook/react-vite": "^10.6.2",
|
|
71
|
+
"@tailwindcss/cli": "^4.3.3",
|
|
72
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
73
|
+
"@testing-library/dom": "^10.4.2",
|
|
74
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
75
|
+
"@testing-library/react": "^16.3.3",
|
|
76
|
+
"@testing-library/user-event": "^14.6.8",
|
|
77
|
+
"@types/node": "^24.19.2",
|
|
78
|
+
"@types/react": "^19.3.0",
|
|
79
|
+
"@types/react-dom": "^19.3.0",
|
|
80
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
81
|
+
"axe-core": "^4.14.0",
|
|
82
|
+
"eslint": "^9.39.5",
|
|
83
|
+
"eslint-config-prettier": "^10.1.8",
|
|
84
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
85
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
86
|
+
"eslint-plugin-storybook": "^10.6.2",
|
|
87
|
+
"globals": "^17.13.0",
|
|
88
|
+
"jsdom": "^30.1.3",
|
|
89
|
+
"prettier": "^3.9.10",
|
|
90
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
91
|
+
"react": "^19.3.1",
|
|
92
|
+
"react-dom": "^19.3.1",
|
|
93
|
+
"storybook": "^10.6.2",
|
|
94
|
+
"tailwindcss": "^4.3.3",
|
|
95
|
+
"tsx": "^4.23.15",
|
|
96
|
+
"typescript": "~6.0.3",
|
|
97
|
+
"typescript-eslint": "^8.71.2",
|
|
98
|
+
"vite": "^8.3.4",
|
|
99
|
+
"vitest": "^5.0.5"
|
|
100
|
+
},
|
|
101
|
+
"peerDependencies": {
|
|
102
|
+
"react": "^19.0.0",
|
|
103
|
+
"react-dom": "^19.0.0",
|
|
104
|
+
"tailwindcss": "^4.0.0"
|
|
105
|
+
},
|
|
106
|
+
"peerDependenciesMeta": {
|
|
107
|
+
"tailwindcss": {
|
|
108
|
+
"optional": true
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"publishConfig": {
|
|
112
|
+
"access": "public"
|
|
113
|
+
}
|
|
114
|
+
}
|