@ciridae/ui 1.0.4 → 1.0.9
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/README.md +3 -2
- package/dist/chat/conversation-source.d.ts +1 -3
- package/dist/chat/message-text.js +6 -6
- package/dist/chat/use-chat-conversation.d.ts +7 -2
- package/dist/chat/use-chat-conversation.js +2 -1
- package/dist/components/activity-feed.d.ts +0 -1
- package/dist/components/activity-feed.js +6 -7
- package/dist/components/agent-work.d.ts +5 -1
- package/dist/components/agent-work.js +27 -13
- package/dist/components/app-frame.d.ts +3 -17
- package/dist/components/app-frame.js +11 -30
- package/dist/components/app-navigation.d.ts +5 -6
- package/dist/components/app-navigation.js +70 -40
- package/dist/components/badge.d.ts +0 -4
- package/dist/components/badge.js +17 -27
- package/dist/components/bulk-action-bar.js +2 -2
- package/dist/components/button.js +41 -50
- package/dist/components/calendar.js +5 -8
- package/dist/components/centered-page.js +4 -4
- package/dist/components/chart.js +3 -4
- package/dist/components/chat-client-source.js +55 -34
- package/dist/components/chat-page.js +1 -1
- package/dist/components/chat-sheet.d.ts +30 -20
- package/dist/components/chat-sheet.js +112 -54
- package/dist/components/chat.d.ts +27 -56
- package/dist/components/chat.js +153 -132
- package/dist/components/checkbox-item.js +4 -4
- package/dist/components/checkbox-list.js +6 -6
- package/dist/components/chip.js +2 -2
- package/dist/components/collapsible.js +3 -3
- package/dist/components/color-theme.d.ts +3 -6
- package/dist/components/color-theme.js +10 -11
- package/dist/components/column-settings.js +3 -3
- package/dist/components/command-menu.d.ts +1 -2
- package/dist/components/command-menu.js +56 -77
- package/dist/components/command-palette.js +5 -2
- package/dist/components/copyable-id.js +5 -5
- package/dist/components/data-display.d.ts +1 -7
- package/dist/components/data-display.js +32 -55
- package/dist/components/data-grid.d.ts +4 -7
- package/dist/components/data-grid.js +106 -90
- package/dist/components/date-range-picker.js +4 -5
- package/dist/components/document-viewer.js +23 -23
- package/dist/components/drawer.d.ts +2 -1
- package/dist/components/drawer.js +45 -20
- package/dist/components/dropzone.js +13 -13
- package/dist/components/editable-field.d.ts +2 -7
- package/dist/components/editable-field.js +14 -27
- package/dist/components/email-input.js +2 -3
- package/dist/components/environment-frame.js +7 -7
- package/dist/components/expandable-text.js +2 -2
- package/dist/components/feedback-screenshot.js +7 -7
- package/dist/components/feedback-sheet.js +8 -8
- package/dist/components/filter-bar.js +41 -27
- package/dist/components/form-controls.d.ts +3 -6
- package/dist/components/form-controls.js +15 -22
- package/dist/components/form-layout.d.ts +6 -6
- package/dist/components/form-layout.js +10 -16
- package/dist/components/glass-menu.d.ts +2 -0
- package/dist/components/glass-menu.js +14 -18
- package/dist/components/gradient-edge.d.ts +0 -1
- package/dist/components/gradient-edge.js +8 -9
- package/dist/components/icon.js +1 -1
- package/dist/components/input.js +18 -17
- package/dist/components/keycap.d.ts +2 -6
- package/dist/components/keycap.js +4 -12
- package/dist/components/layout.js +11 -10
- package/dist/components/lightbox.js +8 -8
- package/dist/components/link.js +1 -1
- package/dist/components/locale.d.ts +23 -7
- package/dist/components/locale.js +19 -7
- package/dist/components/log-entry.d.ts +2 -14
- package/dist/components/log-entry.js +11 -22
- package/dist/components/log-list.js +1 -1
- package/dist/components/mention-input.js +13 -14
- package/dist/components/menu.d.ts +7 -4
- package/dist/components/menu.js +23 -10
- package/dist/components/meter.d.ts +2 -3
- package/dist/components/meter.js +12 -16
- package/dist/components/navigation.d.ts +0 -7
- package/dist/components/navigation.js +3 -12
- package/dist/components/notification-tray.js +7 -7
- package/dist/components/overlays.d.ts +5 -2
- package/dist/components/overlays.js +24 -24
- package/dist/components/panel.js +3 -3
- package/dist/components/progress.js +2 -2
- package/dist/components/radio-card.d.ts +1 -1
- package/dist/components/radio-card.js +9 -9
- package/dist/components/record.d.ts +2 -4
- package/dist/components/record.js +19 -32
- package/dist/components/scroll-area.js +10 -10
- package/dist/components/segmented-bar.js +9 -9
- package/dist/components/select.d.ts +3 -5
- package/dist/components/select.js +26 -44
- package/dist/components/settings.js +1 -1
- package/dist/components/shell-skeleton.js +1 -1
- package/dist/components/shell.d.ts +1 -1
- package/dist/components/shell.js +69 -24
- package/dist/components/side-panel.js +3 -3
- package/dist/components/sidebar.d.ts +0 -5
- package/dist/components/sidebar.js +25 -33
- package/dist/components/single-line-text.js +3 -4
- package/dist/components/site-banner.js +4 -4
- package/dist/components/skeleton.js +19 -22
- package/dist/components/skeletons.d.ts +0 -3
- package/dist/components/skeletons.js +5 -10
- package/dist/components/stages.d.ts +6 -3
- package/dist/components/stages.js +77 -105
- package/dist/components/stat-card.d.ts +2 -5
- package/dist/components/stat-card.js +23 -31
- package/dist/components/status-banner.js +6 -6
- package/dist/components/status.js +3 -3
- package/dist/components/steps.js +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs.js +15 -18
- package/dist/components/theme-customizer.d.ts +5 -8
- package/dist/components/theme-customizer.js +9 -41
- package/dist/components/theme-toggle.d.ts +0 -1
- package/dist/components/theme-toggle.js +6 -11
- package/dist/components/toast.d.ts +1 -7
- package/dist/components/toast.js +19 -22
- package/dist/components/user-chip.js +8 -8
- package/dist/components/wizard.js +6 -4
- package/dist/preset.d.ts +1 -2
- package/dist/preset.js +41 -89
- package/dist/styled-system/css/conditions.mjs +1 -1
- package/dist/styled-system/css/css.mjs +1 -1
- package/dist/styled-system/styles.css +820 -1297
- package/dist/styled-system/tokens/index.mjs +78 -1926
- package/dist/styled-system/tokens/tokens.d.ts +18 -33
- package/dist/styled-system/types/conditions.d.ts +0 -74
- package/dist/styled-system/types/prop-type.d.ts +15 -40
- package/dist/styled-system/types/style-props.d.ts +705 -705
- package/dist/theme/color.d.ts +0 -1
- package/dist/theme/color.js +0 -16
- package/dist/theme/derive.d.ts +3 -3
- package/dist/theme/derive.js +9 -32
- package/dist/theme/index.d.ts +1 -2
- package/dist/theme/index.js +3 -5
- package/dist/theme/options.d.ts +2 -4
- package/dist/theme/options.js +0 -1
- package/dist/theme/{palettes.d.ts → palette.d.ts} +12 -23
- package/dist/theme/palette.js +127 -0
- package/dist/theme/tokens.d.ts +8 -13
- package/dist/theme/tokens.js +39 -92
- package/package.json +1 -1
- package/dist/theme/palettes.js +0 -254
package/dist/theme/color.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export declare function alpha(color: string, opacity: number): string;
|
|
|
2
2
|
/** A gradient's two ends: top and bottom for a face, start and end for a bar. */
|
|
3
3
|
export type GradientEnds = readonly [from: string, to: string];
|
|
4
4
|
export declare function linearGradient(direction: "to bottom" | "to right", [from, to]: GradientEnds, opacity: number): string;
|
|
5
|
-
export declare function lean(grey: string, hue: string, amount: number): string;
|
package/dist/theme/color.js
CHANGED
|
@@ -5,28 +5,12 @@ function parseHex(color) {
|
|
|
5
5
|
const channel = (start) => parseInt(digits.slice(start, start + 2), 16);
|
|
6
6
|
return [channel(0), channel(2), channel(4)];
|
|
7
7
|
}
|
|
8
|
-
function formatHex([red, green, blue]) {
|
|
9
|
-
return `#${[red, green, blue].map((channel) => channel.toString(16).padStart(2, "0")).join("")}`.toUpperCase();
|
|
10
|
-
}
|
|
11
8
|
/* Panda's own alpha spelling, `.12` rather than `0.12`, so the output matches hand-written values. */
|
|
12
9
|
export function alpha(color, opacity) {
|
|
13
10
|
const [red, green, blue] = parseHex(color);
|
|
14
11
|
return `rgba(${red},${green},${blue},${String(opacity).replace(/^0\./, ".")})`;
|
|
15
12
|
}
|
|
16
|
-
/* A linear gradient between two #RRGGBB ends, both at `opacity`. */
|
|
17
13
|
export function linearGradient(direction, [from, to], opacity) {
|
|
18
14
|
const paint = (color) => (opacity === 1 ? color : alpha(color, opacity));
|
|
19
15
|
return `linear-gradient(${direction}, ${paint(from)}, ${paint(to)})`;
|
|
20
16
|
}
|
|
21
|
-
/*
|
|
22
|
-
* A grey leaned toward a hue: the hue less its own grey is added to it at `amount`, so every grey
|
|
23
|
-
* in a ramp leans the same way and keeps its lightness. Channels clip at the ends, so white and
|
|
24
|
-
* black stay put.
|
|
25
|
-
*/
|
|
26
|
-
export function lean(grey, hue, amount) {
|
|
27
|
-
const [hueRed, hueGreen, hueBlue] = parseHex(hue);
|
|
28
|
-
const hueGrey = 0.299 * hueRed + 0.587 * hueGreen + 0.114 * hueBlue;
|
|
29
|
-
const [red, green, blue] = parseHex(grey);
|
|
30
|
-
const channel = (value, hueValue) => Math.min(255, Math.max(0, Math.round(value + amount * (hueValue - hueGrey))));
|
|
31
|
-
return formatHex([channel(red, hueRed), channel(green, hueGreen), channel(blue, hueBlue)]);
|
|
32
|
-
}
|
package/dist/theme/derive.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Palette, ThemedColor, ThemedGradient } from "./palette.js";
|
|
2
2
|
export declare function themedGradient(direction: "to bottom" | "to right", ends: ThemedGradient, opacity: {
|
|
3
3
|
base: number;
|
|
4
4
|
_light: number;
|
|
@@ -6,7 +6,7 @@ export declare function themedGradient(direction: "to bottom" | "to right", ends
|
|
|
6
6
|
/** An edge a theme does not draw, as a gradient so it fits wherever its drawn siblings go. */
|
|
7
7
|
export declare const noEdge = "linear-gradient(transparent, transparent)";
|
|
8
8
|
export type PaletteTokens = {
|
|
9
|
-
colors: Record<"accent.brand" | "accent.green" | "accent.
|
|
10
|
-
gradients: Record<"primary" | "tinted" | "border.tinted" | "chart.area" | "chart.progress" | "chart.atRisk", ThemedColor>;
|
|
9
|
+
colors: Record<"accent.brand" | "accent.green" | "accent.red" | "accent.redDark" | "accent.yellow" | "accent.yellowIcon" | "accent.blue" | "accent.bronze" | "border.bronze" | "bg.successSubtle" | "bg.errorSubtle" | "bg.warningSubtle" | "bg.infoSubtle" | "bg.selected" | "bg.selectedHover" | "border.selected" | "bg.primary" | "bg.primaryHover" | "chart.bar" | "chart.trend" | "chart.category1" | "chart.category2" | "chart.category3" | "chart.category4" | "chart.barTrack" | "chart.progressTrack" | "chart.atRiskTrack", ThemedColor>;
|
|
10
|
+
gradients: Record<"primary" | "primaryHover" | "tinted" | "border.tinted" | "chart.area" | "chart.progress" | "chart.atRisk", ThemedColor>;
|
|
11
11
|
};
|
|
12
12
|
export declare function derivePaletteTokens(palette: Palette): PaletteTokens;
|
package/dist/theme/derive.js
CHANGED
|
@@ -1,46 +1,28 @@
|
|
|
1
1
|
import { alpha, linearGradient } from "./color.js";
|
|
2
|
-
import { chartIndigo, } from "./palettes.js";
|
|
3
2
|
function themed(color, map) {
|
|
4
3
|
return { base: map(color.base, "base"), _light: map(color._light, "_light") };
|
|
5
4
|
}
|
|
6
|
-
/* A gradient token from its ends, with each color theme at its own opacity. */
|
|
7
5
|
export function themedGradient(direction, ends, opacity) {
|
|
8
6
|
return {
|
|
9
7
|
base: linearGradient(direction, ends.base, opacity.base),
|
|
10
8
|
_light: linearGradient(direction, ends._light, opacity._light),
|
|
11
9
|
};
|
|
12
10
|
}
|
|
13
|
-
/* A flat color as a gradient, so a face with no gradient still fits where a gradient goes. */
|
|
14
|
-
function flatGradient(color) {
|
|
15
|
-
return { base: [color.base, color.base], _light: [color._light, color._light] };
|
|
16
|
-
}
|
|
17
11
|
/** An edge a theme does not draw, as a gradient so it fits wherever its drawn siblings go. */
|
|
18
12
|
export const noEdge = "linear-gradient(transparent, transparent)";
|
|
19
|
-
/* A palette with no chart of its own draws its marks in its status hues, flat. */
|
|
20
|
-
function chartFromStatusHues(status) {
|
|
21
|
-
return {
|
|
22
|
-
bar: status.blue.text,
|
|
23
|
-
trend: status.blue.text,
|
|
24
|
-
area: flatGradient(status.blue.text),
|
|
25
|
-
categories: [status.yellow.text, status.green.text, chartIndigo, status.red.text],
|
|
26
|
-
progress: flatGradient(status.blue.text),
|
|
27
|
-
atRisk: flatGradient(status.yellow.text),
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
13
|
/*
|
|
31
14
|
* The subtle status backgrounds are the hue at a tenth in both themes, but for blue: .15 in dark
|
|
32
15
|
* and .08 in light. A selected row, tab or card is washed with a neutral ink a little under that,
|
|
33
16
|
* so it reads apart from a grey hover; its edge is the ink at a fifth or so. The bronze hairline is
|
|
34
17
|
* the dark bronze in both themes, at a third and a bit under; the light bronze is too grey for
|
|
35
|
-
* it.
|
|
18
|
+
* it. The primary face's hover lets a little of the surface through in both themes. The
|
|
36
19
|
* tinted face is warm glass: faint over the dark surface, nearly solid in light; its edge is
|
|
37
20
|
* stronger in dark. A progress bar's track is its hue at .15 in dark and a fifth in light.
|
|
38
21
|
*/
|
|
39
22
|
/** The ink a selection wash is mixed from: white over the dark theme, near-black over light. */
|
|
40
23
|
const selectionInk = { base: "#FFFFFF", _light: "#37373A" };
|
|
41
24
|
export function derivePaletteTokens(palette) {
|
|
42
|
-
const { accent, primary, status, bronze, tint } = palette;
|
|
43
|
-
const chart = palette.chart ?? chartFromStatusHues(status);
|
|
25
|
+
const { accent, primary, primaryGradient, status, bronze, tint, chart } = palette;
|
|
44
26
|
const wash = (name, opacity) => themed(status[name].wash ?? status[name].text, (color, theme) => alpha(color, opacity[theme]));
|
|
45
27
|
const track = (hue) => themed(hue, (color, theme) => alpha(color, theme === "base" ? 0.15 : 0.2));
|
|
46
28
|
const [category1, category2, category3, category4] = chart.categories;
|
|
@@ -48,13 +30,11 @@ export function derivePaletteTokens(palette) {
|
|
|
48
30
|
colors: {
|
|
49
31
|
"accent.brand": accent,
|
|
50
32
|
"accent.green": status.green.text,
|
|
51
|
-
// The deeper green and red of a label on the hue's tint, such as a tinted button's.
|
|
52
|
-
"accent.greenDark": status.green.dark ?? status.green.text,
|
|
53
33
|
"accent.red": status.red.text,
|
|
54
|
-
"accent.redDark": status.red.dark
|
|
34
|
+
"accent.redDark": status.red.dark,
|
|
55
35
|
// Yellow text, and the brighter yellow of its icons, dots and rings.
|
|
56
36
|
"accent.yellow": status.yellow.text,
|
|
57
|
-
"accent.yellowIcon": status.yellow.icon
|
|
37
|
+
"accent.yellowIcon": status.yellow.icon,
|
|
58
38
|
"accent.blue": status.blue.text,
|
|
59
39
|
"accent.bronze": bronze,
|
|
60
40
|
"border.bronze": {
|
|
@@ -65,36 +45,33 @@ export function derivePaletteTokens(palette) {
|
|
|
65
45
|
"bg.errorSubtle": wash("red", { base: 0.1, _light: 0.1 }),
|
|
66
46
|
"bg.warningSubtle": wash("yellow", { base: 0.1, _light: 0.1 }),
|
|
67
47
|
"bg.infoSubtle": wash("blue", { base: 0.15, _light: 0.08 }),
|
|
68
|
-
// A neutral grey wash,
|
|
48
|
+
// A neutral grey wash, so selection reads as state, not as brand color.
|
|
69
49
|
"bg.selected": themed(selectionInk, (color, theme) => alpha(color, theme === "base" ? 0.08 : 0.07)),
|
|
70
50
|
"bg.selectedHover": themed(selectionInk, (color, theme) => alpha(color, theme === "base" ? 0.12 : 0.1)),
|
|
71
51
|
"border.selected": themed(selectionInk, (color, theme) => alpha(color, theme === "base" ? 0.24 : 0.2)),
|
|
72
52
|
"bg.primary": primary,
|
|
73
53
|
"bg.primaryHover": { base: alpha(primary.base, 0.88), _light: primary._light },
|
|
74
|
-
"bg.tinted": { base: alpha(tint.face.base, 0.1), _light: alpha(tint.face._light, 0.66) },
|
|
75
54
|
"chart.bar": chart.bar,
|
|
76
55
|
"chart.trend": chart.trend,
|
|
77
56
|
"chart.category1": category1,
|
|
78
57
|
"chart.category2": category2,
|
|
79
58
|
"chart.category3": category3,
|
|
80
59
|
"chart.category4": category4,
|
|
81
|
-
// A past column under the current one: the bar's hue on its track.
|
|
82
60
|
"chart.barTrack": track(chart.bar),
|
|
83
61
|
"chart.progressTrack": track(chart.trend),
|
|
84
62
|
"chart.atRiskTrack": track(category1),
|
|
85
63
|
},
|
|
86
64
|
gradients: {
|
|
87
|
-
primary: themedGradient("to bottom",
|
|
65
|
+
primary: themedGradient("to bottom", primaryGradient, {
|
|
88
66
|
base: 1,
|
|
89
67
|
_light: 1,
|
|
90
68
|
}),
|
|
91
|
-
|
|
69
|
+
primaryHover: themedGradient("to bottom", primaryGradient, { base: 0.88, _light: 0.88 }),
|
|
70
|
+
tinted: themedGradient("to bottom", tint.faceGradient, {
|
|
92
71
|
base: 0.1,
|
|
93
72
|
_light: 0.66,
|
|
94
73
|
}),
|
|
95
|
-
"border.tinted": tint.edge
|
|
96
|
-
? themedGradient("to bottom", tint.edge, { base: 0.6, _light: 0.33 })
|
|
97
|
-
: { base: noEdge, _light: noEdge },
|
|
74
|
+
"border.tinted": themedGradient("to bottom", tint.edge, { base: 0.6, _light: 0.33 }),
|
|
98
75
|
"chart.area": themedGradient("to bottom", chart.area, { base: 0.1, _light: 0.2 }),
|
|
99
76
|
"chart.progress": themedGradient("to right", chart.progress, { base: 1, _light: 1 }),
|
|
100
77
|
"chart.atRisk": themedGradient("to right", chart.atRisk, { base: 1, _light: 1 }),
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export { breakpointQuery, breakpoints, type Breakpoint } from "./breakpoints.js";
|
|
2
2
|
export { defaultTheme, type Brand, type CiridaeTheme, type ColorTheme } from "./options.js";
|
|
3
|
-
export {
|
|
4
|
-
export { deriveThemeTokens, themeStylesheet, themeVariables, type ThemeTokens } from "./tokens.js";
|
|
3
|
+
export { deriveThemeTokens, type ThemeTokens } from "./tokens.js";
|
package/dist/theme/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* The theme at runtime: the
|
|
3
|
-
*
|
|
4
|
-
* `palette` and `fonts` and writes this stylesheet itself; use these directly to preview themes.
|
|
2
|
+
* The theme at runtime: the breakpoints, the brand and theme options, and the token values the
|
|
3
|
+
* preset is built from.
|
|
5
4
|
*/
|
|
6
5
|
export { breakpointQuery, breakpoints } from "./breakpoints.js";
|
|
7
6
|
export { defaultTheme } from "./options.js";
|
|
8
|
-
export {
|
|
9
|
-
export { deriveThemeTokens, themeStylesheet, themeVariables } from "./tokens.js";
|
|
7
|
+
export { deriveThemeTokens } from "./tokens.js";
|
package/dist/theme/options.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { PaletteName } from "./palettes.js";
|
|
2
1
|
export type ColorTheme = "dark" | "light";
|
|
3
2
|
/**
|
|
4
3
|
* What a product calls itself (a short name for tight spots like a rail) and its public asset
|
|
@@ -14,11 +13,10 @@ export type Brand = {
|
|
|
14
13
|
card?: string;
|
|
15
14
|
};
|
|
16
15
|
/**
|
|
17
|
-
* The few choices a product makes once. The
|
|
18
|
-
*
|
|
16
|
+
* The few choices a product makes once. The fonts shape the tokens through `createCiridaePreset`;
|
|
17
|
+
* the last two are runtime settings `ThemeProvider` takes.
|
|
19
18
|
*/
|
|
20
19
|
export type CiridaeTheme = {
|
|
21
|
-
palette: PaletteName;
|
|
22
20
|
fonts: {
|
|
23
21
|
display?: string;
|
|
24
22
|
sans?: string;
|
package/dist/theme/options.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** A color per color theme, in the shape Panda's semantic tokens take. */
|
|
1
|
+
import type { GradientEnds } from "./color.js";
|
|
3
2
|
export type ThemedColor = {
|
|
4
3
|
base: string;
|
|
5
4
|
_light: string;
|
|
@@ -9,12 +8,7 @@ export type ThemedGradient = {
|
|
|
9
8
|
base: GradientEnds;
|
|
10
9
|
_light: GradientEnds;
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
export type PaletteName = (typeof PALETTE_NAMES)[number];
|
|
14
|
-
/**
|
|
15
|
-
* The greys under one color theme: every neutral token is one of these, flat, at an alpha or as a
|
|
16
|
-
* gradient's end. Dark draws its glass as pale greys over the surface; light draws solids.
|
|
17
|
-
*/
|
|
11
|
+
/** Dark draws its glass as pale greys over the surface; light draws solids. */
|
|
18
12
|
export type Greys = {
|
|
19
13
|
canvas: string;
|
|
20
14
|
panel: string;
|
|
@@ -24,7 +18,6 @@ export type Greys = {
|
|
|
24
18
|
primary: string;
|
|
25
19
|
secondary: string;
|
|
26
20
|
muted: string;
|
|
27
|
-
subtle: string;
|
|
28
21
|
archived: string;
|
|
29
22
|
line: string;
|
|
30
23
|
border: string;
|
|
@@ -61,35 +54,33 @@ export type GreyRamp = {
|
|
|
61
54
|
export type Palette = {
|
|
62
55
|
greys: GreyRamp;
|
|
63
56
|
accent: ThemedColor;
|
|
64
|
-
focusRing
|
|
57
|
+
focusRing: ThemedColor;
|
|
65
58
|
primary: ThemedColor;
|
|
66
|
-
primaryGradient
|
|
59
|
+
primaryGradient: ThemedGradient;
|
|
67
60
|
status: {
|
|
68
61
|
green: StatusHue & {
|
|
69
|
-
dark
|
|
62
|
+
dark: ThemedColor;
|
|
70
63
|
};
|
|
71
64
|
red: StatusHue & {
|
|
72
|
-
dark
|
|
65
|
+
dark: ThemedColor;
|
|
73
66
|
};
|
|
74
67
|
yellow: StatusHue & {
|
|
75
|
-
icon
|
|
68
|
+
icon: ThemedColor;
|
|
76
69
|
};
|
|
77
70
|
blue: StatusHue;
|
|
78
71
|
};
|
|
79
72
|
bronze: ThemedColor;
|
|
80
73
|
tint: {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
edge?: ThemedGradient;
|
|
74
|
+
faceGradient: ThemedGradient;
|
|
75
|
+
edge: ThemedGradient;
|
|
84
76
|
};
|
|
85
|
-
chart
|
|
77
|
+
chart: ChartHues;
|
|
86
78
|
};
|
|
87
79
|
type StatusHue = {
|
|
88
80
|
text: ThemedColor;
|
|
89
81
|
wash?: ThemedColor;
|
|
90
82
|
};
|
|
91
|
-
|
|
92
|
-
export type ChartHues = {
|
|
83
|
+
type ChartHues = {
|
|
93
84
|
bar: ThemedColor;
|
|
94
85
|
trend: ThemedColor;
|
|
95
86
|
area: ThemedGradient;
|
|
@@ -97,7 +88,5 @@ export type ChartHues = {
|
|
|
97
88
|
progress: ThemedGradient;
|
|
98
89
|
atRisk: ThemedGradient;
|
|
99
90
|
};
|
|
100
|
-
|
|
101
|
-
export declare const chartIndigo: ThemedColor;
|
|
102
|
-
export declare const palettes: Record<PaletteName, Palette>;
|
|
91
|
+
export declare const ciridaePalette: Palette;
|
|
103
92
|
export {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/** The third chart category: no status hue is indigo. */
|
|
2
|
+
const chartIndigo = { base: "#8A86FF", _light: "#5B56EE" };
|
|
3
|
+
/*
|
|
4
|
+
* The kit's own greys, from the Ciridae OS Figma: each face it paints as a gradient is kept as its
|
|
5
|
+
* two ends and flattened to its middle. A dark card is white glass, washed in at 5%.
|
|
6
|
+
*/
|
|
7
|
+
const ciridaeGreys = {
|
|
8
|
+
dark: {
|
|
9
|
+
canvas: "#141416",
|
|
10
|
+
panel: "#27272A",
|
|
11
|
+
card: "#FFFFFF",
|
|
12
|
+
well: "#1D1D20",
|
|
13
|
+
avatar: "#36363C",
|
|
14
|
+
primary: "#FFFFFF",
|
|
15
|
+
secondary: "#B4B1AC",
|
|
16
|
+
muted: "#827F7A",
|
|
17
|
+
archived: "#827F7A",
|
|
18
|
+
line: "#36363C",
|
|
19
|
+
border: "#3C3C3C",
|
|
20
|
+
cardBorder: "#3C3C3C",
|
|
21
|
+
mark: "#898887",
|
|
22
|
+
hairline: "#3B342B",
|
|
23
|
+
menuHoverBorder: "#3C3C3C",
|
|
24
|
+
wash: "#FFFFFF",
|
|
25
|
+
shade: "#141416",
|
|
26
|
+
focus: "#827F7A",
|
|
27
|
+
surface: "#27272B",
|
|
28
|
+
control: "#1A1A1C",
|
|
29
|
+
pill: "#1B1B1D",
|
|
30
|
+
glass: "#C1BFBD",
|
|
31
|
+
raised: "#C1BFBD",
|
|
32
|
+
hover: "#C1BFBD",
|
|
33
|
+
knob: "#FFFFFF",
|
|
34
|
+
scrim: "#141416",
|
|
35
|
+
popover: "#141416",
|
|
36
|
+
modalShell: "#FFFFFF",
|
|
37
|
+
modalSheet: "#FFFFFF",
|
|
38
|
+
drawerShell: "#27272A",
|
|
39
|
+
drawerSheet: "#2B2B2D",
|
|
40
|
+
gradients: {
|
|
41
|
+
canvas: ["#141416", "#141416"],
|
|
42
|
+
panel: ["#27272A", "#27272A"],
|
|
43
|
+
raised: ["#FFFFFF", "#827F7A"],
|
|
44
|
+
selected: ["#FFFFFF", "#827F7A"],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
light: {
|
|
48
|
+
canvas: "#E1E1E1",
|
|
49
|
+
panel: "#F8F8F8",
|
|
50
|
+
card: "#FBFBFB",
|
|
51
|
+
well: "#EEEEEE",
|
|
52
|
+
avatar: "#D8D8DE",
|
|
53
|
+
primary: "#2A2A2D",
|
|
54
|
+
secondary: "#7B7B7E",
|
|
55
|
+
muted: "#98989E",
|
|
56
|
+
archived: "#5A5854",
|
|
57
|
+
line: "#CDCDCD",
|
|
58
|
+
border: "#CDCDCD",
|
|
59
|
+
cardBorder: "#CDCDCD",
|
|
60
|
+
mark: "#A7A7A7",
|
|
61
|
+
hairline: "#E0DAD0",
|
|
62
|
+
menuHoverBorder: "#D8D8D8",
|
|
63
|
+
wash: "#2A2A2D",
|
|
64
|
+
shade: "#141416",
|
|
65
|
+
focus: "#6B6A68",
|
|
66
|
+
surface: "#FBFBFC",
|
|
67
|
+
control: "#F2F2F6",
|
|
68
|
+
pill: "#FAFAFB",
|
|
69
|
+
glass: "#F2F2F2",
|
|
70
|
+
raised: "#F3F3F4",
|
|
71
|
+
hover: "#4B4A48",
|
|
72
|
+
knob: "#FBFBFB",
|
|
73
|
+
scrim: "#2A2A2D",
|
|
74
|
+
popover: "#F0F0F0",
|
|
75
|
+
modalShell: "#EEEEEE",
|
|
76
|
+
modalSheet: "#FBFBFB",
|
|
77
|
+
drawerShell: "#F0F0F0",
|
|
78
|
+
drawerSheet: "#FBFBFB",
|
|
79
|
+
gradients: {
|
|
80
|
+
canvas: ["#D8D8D8", "#EBEBEB"],
|
|
81
|
+
panel: ["#F0F0F0", "#FFFFFF"],
|
|
82
|
+
raised: ["#FDFDFD", "#E8E9EA"],
|
|
83
|
+
selected: ["#F8F8F8", "#ECECEC"],
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
export const ciridaePalette = {
|
|
88
|
+
greys: ciridaeGreys,
|
|
89
|
+
accent: { base: "#D1B778", _light: "#8A6D33" },
|
|
90
|
+
focusRing: { base: "#66B7F1", _light: "#4186B8" },
|
|
91
|
+
primary: { base: "#FFFFFF", _light: "#37373A" },
|
|
92
|
+
primaryGradient: { base: ["#FFFFFF", "#FFFFFF"], _light: ["#57575B", "#171719"] },
|
|
93
|
+
status: {
|
|
94
|
+
green: {
|
|
95
|
+
text: { base: "#45A999", _light: "#488F83" },
|
|
96
|
+
wash: { base: "#45A999", _light: "#3D8B7D" },
|
|
97
|
+
dark: { base: "#45A999", _light: "#698984" },
|
|
98
|
+
},
|
|
99
|
+
red: {
|
|
100
|
+
text: { base: "#F7644F", _light: "#EB442C" },
|
|
101
|
+
dark: { base: "#F7644F", _light: "#986159" },
|
|
102
|
+
},
|
|
103
|
+
yellow: {
|
|
104
|
+
text: { base: "#DFBB65", _light: "#B27D00" },
|
|
105
|
+
icon: { base: "#DFBB65", _light: "#DB972A" },
|
|
106
|
+
},
|
|
107
|
+
blue: { text: { base: "#66B7F1", _light: "#4186B8" } },
|
|
108
|
+
},
|
|
109
|
+
bronze: { base: "#725D42", _light: "#6D6554" },
|
|
110
|
+
tint: {
|
|
111
|
+
faceGradient: { base: ["#FFFFFF", "#FFCD7B"], _light: ["#FDFDFD", "#E8E2D9"] },
|
|
112
|
+
edge: { base: ["#FFF1C9", "#A47D28"], _light: ["#B5AF87", "#BF8931"] },
|
|
113
|
+
},
|
|
114
|
+
chart: {
|
|
115
|
+
bar: { base: "#66B7F1", _light: "#72BFF6" },
|
|
116
|
+
trend: { base: "#66B7F1", _light: "#4186B8" },
|
|
117
|
+
area: { base: ["#FFFFFF", "#A4D5F8"], _light: ["#60BCFF", "#FFFFFF"] },
|
|
118
|
+
categories: [
|
|
119
|
+
{ base: "#DFBB65", _light: "#F8B853" },
|
|
120
|
+
{ base: "#45A999", _light: "#488F83" },
|
|
121
|
+
chartIndigo,
|
|
122
|
+
{ base: "#F7644F", _light: "#EB442C" },
|
|
123
|
+
],
|
|
124
|
+
progress: { base: ["#A6D6FA", "#4D9CD9"], _light: ["#7AC1F4", "#4186B8"] },
|
|
125
|
+
atRisk: { base: ["#F2D995", "#C99E3E"], _light: ["#F8B853", "#DB972A"] },
|
|
126
|
+
},
|
|
127
|
+
};
|
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type PaletteTokens } from "./derive.js";
|
|
2
|
-
import { type CiridaeTheme
|
|
3
|
-
import { type ThemedColor } from "./
|
|
2
|
+
import { type CiridaeTheme } from "./options.js";
|
|
3
|
+
import { type ThemedColor } from "./palette.js";
|
|
4
4
|
export type ThemeTokens = {
|
|
5
|
-
colors: Record<keyof PaletteTokens["colors"] | "border.focus" | "border.error" | "bg.canvas" | "bg.panel" | "bg.card" | "bg.surface" | "bg.avatar" | "bg.backdrop" | "bg.popover" | "bg.modalShell" | "bg.modalSheet" | "bg.drawerShell" | "bg.drawerSheet" | "bg.field" | "bg.formField" | "bg.openTrigger" | "bg.fieldDisabled" | "bg.control" | "bg.pill" | "bg.glass" | "bg.
|
|
5
|
+
colors: Record<keyof PaletteTokens["colors"] | "border.focus" | "border.error" | "bg.canvas" | "bg.panel" | "bg.card" | "bg.surface" | "bg.avatar" | "bg.backdrop" | "bg.popover" | "bg.modalShell" | "bg.modalSheet" | "bg.drawerShell" | "bg.drawerSheet" | "bg.field" | "bg.formField" | "bg.openTrigger" | "bg.fieldDisabled" | "bg.control" | "bg.pill" | "bg.glass" | "bg.raised" | "bg.raisedHover" | "bg.check" | "bg.hover" | "bg.controlHover" | "bg.fill" | "bg.rowHover" | "bg.track" | "bg.knob" | "fg.primary" | "fg.secondary" | "fg.muted" | "fg.subtle" | "fg.label" | "fg.archived" | "border.subtle" | "border.control" | "border.panel" | "border.card" | "border.canvas" | "border.divider" | "border.popover" | "border.menuHover" | "border.mark" | "border.glass" | "border.hairline" | "chart.neutral" | "chart.notStarted", ThemedColor>;
|
|
6
6
|
gradients: Record<keyof PaletteTokens["gradients"] | "skeletonFill" | "canvas" | "panel" | "card" | "raised" | "raisedHover" | "selected" | "rowHover", ThemedColor>;
|
|
7
7
|
shadows: Record<"search" | "inset" | "card" | "soft" | "focus" | "glow" | "toast" | "control.raised" | "control.raisedHover" | "control.pressed", ThemedColor>;
|
|
8
8
|
fonts: {
|
|
@@ -13,17 +13,12 @@ export type ThemeTokens = {
|
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* Every token value a theme decides. `createCiridaePreset` bakes these into the stylesheet;
|
|
16
|
-
* `
|
|
16
|
+
* `fontStylesheet` writes the same faces over it at runtime, so the two never drift.
|
|
17
17
|
*/
|
|
18
18
|
export declare function deriveThemeTokens(theme?: Partial<CiridaeTheme>): ThemeTokens;
|
|
19
19
|
/**
|
|
20
|
-
* The
|
|
21
|
-
* the
|
|
22
|
-
*
|
|
20
|
+
* The faces in `fonts` as a stylesheet of the variables Panda names them by. Unlayered, it wins
|
|
21
|
+
* over the built stylesheet's `@layer tokens` blocks, so the page shows the faces with no rebuild.
|
|
22
|
+
* A face left out keeps the built one.
|
|
23
23
|
*/
|
|
24
|
-
export declare function
|
|
25
|
-
/**
|
|
26
|
-
* The theme's variables for both color themes, as a stylesheet. Unlayered, it wins over the
|
|
27
|
-
* built stylesheet's `@layer tokens` blocks, so the page shows the theme with no rebuild.
|
|
28
|
-
*/
|
|
29
|
-
export declare function themeStylesheet(theme: Partial<CiridaeTheme>): string;
|
|
24
|
+
export declare function fontStylesheet(fonts: CiridaeTheme["fonts"]): string;
|