@ciridae/ui 1.0.2 → 1.0.4
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/app/auth.d.ts +10 -0
- package/dist/app/auth.js +60 -0
- package/dist/app/error-boundary.d.ts +18 -0
- package/dist/app/error-boundary.js +45 -0
- package/dist/app/feedback.d.ts +12 -0
- package/dist/app/feedback.js +128 -0
- package/dist/app/index.d.ts +8 -0
- package/dist/app/index.js +8 -0
- package/dist/app/request-errors.d.ts +63 -0
- package/dist/app/request-errors.js +172 -0
- package/dist/app/sentry.d.ts +18 -0
- package/dist/app/sentry.js +52 -0
- package/dist/app/telemetry.d.ts +7 -0
- package/dist/app/telemetry.js +28 -0
- package/dist/app/trail.d.ts +9 -0
- package/dist/app/trail.js +18 -0
- package/dist/chat/chat-query-keys.d.ts +3 -3
- package/dist/chat/contract.d.ts +15 -15
- package/dist/chat/conversation-items-query-options.d.ts +114 -114
- package/dist/chat/conversation-source.d.ts +89 -0
- package/dist/chat/conversation-source.js +1 -0
- package/dist/chat/describe-tool-call.d.ts +3 -3
- package/dist/chat/describe-tool-call.js +3 -3
- package/dist/chat/message-text.d.ts +1 -1
- package/dist/chat/message-text.js +116 -48
- package/dist/chat/use-conversation-list.d.ts +6 -6
- package/dist/ciridae.css +16 -4
- package/dist/components/activity-feed.d.ts +3 -2
- package/dist/components/activity-feed.js +1 -0
- package/dist/components/agent-work.d.ts +3 -3
- package/dist/components/app-frame.d.ts +91 -0
- package/dist/components/app-frame.js +134 -0
- package/dist/components/app-navigation.d.ts +30 -3
- package/dist/components/app-navigation.js +105 -14
- package/dist/components/badge.d.ts +30 -5
- package/dist/components/badge.js +134 -15
- package/dist/components/brand-icons.d.ts +3 -3
- package/dist/components/bulk-action-bar.d.ts +1 -1
- package/dist/components/bulk-action-bar.js +3 -3
- package/dist/components/button.d.ts +12 -5
- package/dist/components/button.js +77 -44
- package/dist/components/calendar.d.ts +1 -1
- package/dist/components/calendar.js +44 -17
- package/dist/components/centered-page.d.ts +1 -1
- package/dist/components/centered-page.js +2 -2
- package/dist/components/chart.d.ts +22 -2
- package/dist/components/chart.js +251 -51
- package/dist/components/chat-client-source.d.ts +16 -0
- package/dist/components/chat-client-source.js +297 -0
- package/dist/components/chat-page.d.ts +9 -8
- package/dist/components/chat-page.js +7 -11
- package/dist/components/chat-sheet-controller.d.ts +11 -14
- package/dist/components/chat-sheet-controller.js +3 -3
- package/dist/components/chat-sheet.d.ts +18 -11
- package/dist/components/chat-sheet.js +188 -289
- package/dist/components/chat.d.ts +109 -19
- package/dist/components/chat.js +520 -124
- package/dist/components/checkbox-item.d.ts +6 -3
- package/dist/components/checkbox-item.js +9 -5
- package/dist/components/checkbox-list.d.ts +1 -1
- package/dist/components/chip.d.ts +6 -1
- package/dist/components/chip.js +27 -1
- package/dist/components/collapsible.d.ts +1 -1
- package/dist/components/color-theme.d.ts +1 -1
- package/dist/components/column-settings.d.ts +1 -1
- package/dist/components/column-settings.js +1 -1
- package/dist/components/command-menu.d.ts +5 -1
- package/dist/components/command-menu.js +98 -32
- package/dist/components/command-palette.d.ts +7 -3
- package/dist/components/command-palette.js +20 -11
- package/dist/components/copyable-id.d.ts +22 -5
- package/dist/components/copyable-id.js +46 -6
- package/dist/components/data-display.d.ts +39 -8
- package/dist/components/data-display.js +138 -19
- package/dist/components/data-grid.d.ts +23 -11
- package/dist/components/data-grid.js +61 -26
- package/dist/components/date-range-picker.d.ts +1 -1
- package/dist/components/date-range-picker.js +9 -20
- package/dist/components/date-time.d.ts +1 -1
- package/dist/components/dialog-height-context.d.ts +1 -1
- package/dist/components/document-viewer.d.ts +2 -2
- package/dist/components/drawer.d.ts +11 -6
- package/dist/components/drawer.js +91 -54
- package/dist/components/dropzone.d.ts +4 -4
- package/dist/components/editable-field.d.ts +12 -3
- package/dist/components/editable-field.js +57 -27
- package/dist/components/email-input.d.ts +1 -1
- package/dist/components/email-input.js +6 -5
- package/dist/components/environment-frame.d.ts +2 -2
- package/dist/components/environment-frame.js +37 -6
- package/dist/components/expandable-text.d.ts +1 -1
- package/dist/components/feedback-screenshot.d.ts +1 -1
- package/dist/components/feedback-sheet.d.ts +18 -3
- package/dist/components/feedback-sheet.js +216 -55
- package/dist/components/field-context.d.ts +1 -1
- package/dist/components/filter-bar.d.ts +3 -3
- package/dist/components/filter-bar.js +43 -29
- package/dist/components/form-controls.d.ts +12 -3
- package/dist/components/form-controls.js +46 -22
- package/dist/components/form-layout.d.ts +14 -10
- package/dist/components/form-layout.js +68 -23
- package/dist/components/glass-menu.d.ts +3 -0
- package/dist/components/glass-menu.js +63 -0
- package/dist/components/gradient-edge.d.ts +9 -0
- package/dist/components/gradient-edge.js +31 -0
- package/dist/components/hotkeys.d.ts +2 -2
- package/dist/components/icon.d.ts +1 -1
- package/dist/components/input.d.ts +7 -5
- package/dist/components/input.js +29 -17
- package/dist/components/keyboard-shortcuts.d.ts +2 -2
- package/dist/components/keycap.d.ts +10 -6
- package/dist/components/keycap.js +57 -19
- package/dist/components/layout.d.ts +13 -13
- package/dist/components/lightbox.d.ts +9 -3
- package/dist/components/lightbox.js +13 -9
- package/dist/components/link.d.ts +1 -1
- package/dist/components/locale.d.ts +42 -2
- package/dist/components/locale.js +43 -3
- package/dist/components/log-entry.d.ts +40 -0
- package/dist/components/log-entry.js +146 -0
- package/dist/components/log-list.d.ts +3 -3
- package/dist/components/mention-input.d.ts +2 -2
- package/dist/components/mention-input.js +4 -3
- package/dist/components/menu.d.ts +7 -3
- package/dist/components/menu.js +34 -37
- package/dist/components/meter.d.ts +10 -2
- package/dist/components/meter.js +64 -6
- package/dist/components/navigation.d.ts +21 -4
- package/dist/components/navigation.js +84 -19
- package/dist/components/notification-tray.d.ts +1 -1
- package/dist/components/notification-tray.js +5 -4
- package/dist/components/overlays.d.ts +6 -4
- package/dist/components/overlays.js +69 -40
- package/dist/components/page-frame.d.ts +4 -4
- package/dist/components/page-frame.js +1 -1
- package/dist/components/panel.d.ts +4 -4
- package/dist/components/panel.js +18 -12
- package/dist/components/profile-header.d.ts +1 -1
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/project-avatar.d.ts +1 -1
- package/dist/components/radio-card.d.ts +2 -2
- package/dist/components/radio-card.js +10 -9
- package/dist/components/record.d.ts +29 -5
- package/dist/components/record.js +147 -18
- package/dist/components/resolved-file-url.d.ts +19 -0
- package/dist/components/resolved-file-url.js +49 -0
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/secret-dialog.d.ts +1 -1
- package/dist/components/segmented-bar.d.ts +4 -2
- package/dist/components/segmented-bar.js +16 -6
- package/dist/components/select.d.ts +9 -6
- package/dist/components/select.js +103 -127
- package/dist/components/settings.d.ts +4 -4
- package/dist/components/shell-skeleton.d.ts +1 -1
- package/dist/components/shell-skeleton.js +1 -1
- package/dist/components/shell.d.ts +21 -21
- package/dist/components/shell.js +43 -43
- package/dist/components/side-panel.d.ts +3 -3
- package/dist/components/sidebar.d.ts +13 -8
- package/dist/components/sidebar.js +55 -27
- package/dist/components/single-line-text.d.ts +2 -0
- package/dist/components/single-line-text.js +16 -0
- package/dist/components/site-banner.d.ts +5 -2
- package/dist/components/site-banner.js +17 -6
- package/dist/components/skeleton.d.ts +8 -7
- package/dist/components/skeleton.js +28 -16
- package/dist/components/skeletons.d.ts +17 -5
- package/dist/components/skeletons.js +71 -8
- package/dist/components/stages.d.ts +83 -11
- package/dist/components/stages.js +512 -156
- package/dist/components/stat-card.d.ts +12 -4
- package/dist/components/stat-card.js +92 -37
- package/dist/components/status-banner.d.ts +1 -1
- package/dist/components/status-banner.js +1 -1
- package/dist/components/status.d.ts +2 -2
- package/dist/components/steps.d.ts +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/tabs.d.ts +8 -8
- package/dist/components/tabs.js +26 -13
- package/dist/components/theme-customizer.d.ts +2 -2
- package/dist/components/theme-toggle.d.ts +4 -0
- package/dist/components/theme-toggle.js +67 -0
- package/dist/components/toast.d.ts +10 -3
- package/dist/components/toast.js +78 -29
- package/dist/components/use-new-version-available.d.ts +6 -0
- package/dist/components/use-new-version-available.js +29 -0
- package/dist/components/user-chip.d.ts +3 -3
- package/dist/components/wizard.d.ts +2 -2
- package/dist/feedback/contract.d.ts +136 -136
- package/dist/feedback/feedback-controller.d.ts +6 -6
- package/dist/feedback/generated/zod.gen.d.ts +28 -28
- package/dist/feedback/operator-contract.d.ts +11 -11
- package/dist/feedback/operator-controller.d.ts +32 -13
- package/dist/feedback/operator-controller.js +44 -11
- package/dist/preset.js +289 -33
- package/dist/styled-system/styles.css +3294 -1079
- package/dist/styled-system/tokens/index.mjs +598 -22
- package/dist/styled-system/tokens/tokens.d.ts +11 -11
- package/dist/styled-system/types/prop-type.d.ts +2 -2
- package/dist/styles.css +16 -4
- package/dist/theme/color.d.ts +3 -0
- package/dist/theme/color.js +5 -0
- package/dist/theme/derive.d.ts +9 -2
- package/dist/theme/derive.js +72 -12
- package/dist/theme/palettes.d.ts +49 -6
- package/dist/theme/palettes.js +84 -15
- package/dist/theme/tokens.d.ts +3 -3
- package/dist/theme/tokens.js +107 -32
- package/package.json +40 -3
package/dist/theme/palettes.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { lean } from "./color.js";
|
|
2
2
|
export const PALETTE_NAMES = ["ciridae", "ocean", "moss", "violet", "ember"];
|
|
3
|
-
|
|
3
|
+
/** The third chart category: no status hue is indigo, so every palette shares this one. */
|
|
4
|
+
export const chartIndigo = { base: "#8A86FF", _light: "#5B56EE" };
|
|
5
|
+
/*
|
|
6
|
+
* The kit's own greys, from the Ciridae OS Figma: each face it paints as a gradient is kept as its
|
|
7
|
+
* two ends and flattened to its middle. A dark card is white glass, washed in at 5%.
|
|
8
|
+
*/
|
|
4
9
|
const ciridaeGreys = {
|
|
5
10
|
dark: {
|
|
6
11
|
canvas: "#141416",
|
|
7
12
|
panel: "#27272A",
|
|
8
|
-
card: "#
|
|
13
|
+
card: "#FFFFFF",
|
|
9
14
|
well: "#1D1D20",
|
|
10
15
|
avatar: "#36363C",
|
|
11
16
|
primary: "#FFFFFF",
|
|
@@ -18,6 +23,7 @@ const ciridaeGreys = {
|
|
|
18
23
|
cardBorder: "#3C3C3C",
|
|
19
24
|
mark: "#898887",
|
|
20
25
|
hairline: "#3B342B",
|
|
26
|
+
menuHoverBorder: "#3C3C3C",
|
|
21
27
|
wash: "#FFFFFF",
|
|
22
28
|
shade: "#141416",
|
|
23
29
|
focus: "#827F7A",
|
|
@@ -28,24 +34,37 @@ const ciridaeGreys = {
|
|
|
28
34
|
raised: "#C1BFBD",
|
|
29
35
|
hover: "#C1BFBD",
|
|
30
36
|
knob: "#FFFFFF",
|
|
37
|
+
scrim: "#141416",
|
|
38
|
+
popover: "#141416",
|
|
39
|
+
modalShell: "#FFFFFF",
|
|
40
|
+
modalSheet: "#FFFFFF",
|
|
41
|
+
drawerShell: "#27272A",
|
|
42
|
+
drawerSheet: "#2B2B2D",
|
|
43
|
+
gradients: {
|
|
44
|
+
canvas: ["#141416", "#141416"],
|
|
45
|
+
panel: ["#27272A", "#27272A"],
|
|
46
|
+
raised: ["#FFFFFF", "#827F7A"],
|
|
47
|
+
selected: ["#FFFFFF", "#827F7A"],
|
|
48
|
+
},
|
|
31
49
|
},
|
|
32
50
|
light: {
|
|
33
51
|
canvas: "#E1E1E1",
|
|
34
52
|
panel: "#F8F8F8",
|
|
35
|
-
card: "#
|
|
53
|
+
card: "#FBFBFB",
|
|
36
54
|
well: "#EEEEEE",
|
|
37
55
|
avatar: "#D8D8DE",
|
|
38
56
|
primary: "#2A2A2D",
|
|
39
|
-
secondary: "#
|
|
40
|
-
muted: "#
|
|
57
|
+
secondary: "#7B7B7E",
|
|
58
|
+
muted: "#98989E",
|
|
41
59
|
subtle: "#98989E",
|
|
42
60
|
archived: "#5A5854",
|
|
43
|
-
line: "#
|
|
61
|
+
line: "#CDCDCD",
|
|
44
62
|
border: "#CDCDCD",
|
|
45
|
-
cardBorder: "#
|
|
63
|
+
cardBorder: "#CDCDCD",
|
|
46
64
|
mark: "#A7A7A7",
|
|
47
65
|
hairline: "#E0DAD0",
|
|
48
|
-
|
|
66
|
+
menuHoverBorder: "#D8D8D8",
|
|
67
|
+
wash: "#2A2A2D",
|
|
49
68
|
shade: "#141416",
|
|
50
69
|
focus: "#6B6A68",
|
|
51
70
|
surface: "#FBFBFC",
|
|
@@ -55,6 +74,18 @@ const ciridaeGreys = {
|
|
|
55
74
|
raised: "#F3F3F4",
|
|
56
75
|
hover: "#4B4A48",
|
|
57
76
|
knob: "#FBFBFB",
|
|
77
|
+
scrim: "#2A2A2D",
|
|
78
|
+
popover: "#F0F0F0",
|
|
79
|
+
modalShell: "#EEEEEE",
|
|
80
|
+
modalSheet: "#FBFBFB",
|
|
81
|
+
drawerShell: "#F0F0F0",
|
|
82
|
+
drawerSheet: "#FBFBFB",
|
|
83
|
+
gradients: {
|
|
84
|
+
canvas: ["#D8D8D8", "#EBEBEB"],
|
|
85
|
+
panel: ["#F0F0F0", "#FFFFFF"],
|
|
86
|
+
raised: ["#FDFDFD", "#E8E9EA"],
|
|
87
|
+
selected: ["#F8F8F8", "#ECECEC"],
|
|
88
|
+
},
|
|
58
89
|
},
|
|
59
90
|
};
|
|
60
91
|
/*
|
|
@@ -66,6 +97,7 @@ function leanedGreys(hue) {
|
|
|
66
97
|
const leanAll = (greys, toward) => {
|
|
67
98
|
const surface = (grey) => lean(grey, toward, 1);
|
|
68
99
|
const ink = (grey) => lean(grey, toward, 0.5);
|
|
100
|
+
const surfaceGradient = ([from, to]) => [surface(from), surface(to)];
|
|
69
101
|
return {
|
|
70
102
|
canvas: surface(greys.canvas),
|
|
71
103
|
panel: surface(greys.panel),
|
|
@@ -82,6 +114,7 @@ function leanedGreys(hue) {
|
|
|
82
114
|
cardBorder: ink(greys.cardBorder),
|
|
83
115
|
mark: ink(greys.mark),
|
|
84
116
|
hairline: ink(greys.hairline),
|
|
117
|
+
menuHoverBorder: ink(greys.menuHoverBorder),
|
|
85
118
|
wash: surface(greys.wash),
|
|
86
119
|
shade: surface(greys.shade),
|
|
87
120
|
focus: ink(greys.focus),
|
|
@@ -92,6 +125,18 @@ function leanedGreys(hue) {
|
|
|
92
125
|
raised: surface(greys.raised),
|
|
93
126
|
hover: surface(greys.hover),
|
|
94
127
|
knob: surface(greys.knob),
|
|
128
|
+
scrim: surface(greys.scrim),
|
|
129
|
+
popover: surface(greys.popover),
|
|
130
|
+
modalShell: surface(greys.modalShell),
|
|
131
|
+
modalSheet: surface(greys.modalSheet),
|
|
132
|
+
drawerShell: surface(greys.drawerShell),
|
|
133
|
+
drawerSheet: surface(greys.drawerSheet),
|
|
134
|
+
gradients: {
|
|
135
|
+
canvas: surfaceGradient(greys.gradients.canvas),
|
|
136
|
+
panel: surfaceGradient(greys.gradients.panel),
|
|
137
|
+
raised: surfaceGradient(greys.gradients.raised),
|
|
138
|
+
selected: surfaceGradient(greys.gradients.selected),
|
|
139
|
+
},
|
|
95
140
|
};
|
|
96
141
|
};
|
|
97
142
|
return {
|
|
@@ -99,30 +144,54 @@ function leanedGreys(hue) {
|
|
|
99
144
|
light: leanAll(ciridaeGreys.light, hue._light),
|
|
100
145
|
};
|
|
101
146
|
}
|
|
102
|
-
/* The kit's own warm glass, which every palette but ember keeps. */
|
|
147
|
+
/* The kit's own warm glass, which every palette but ember keeps. The flat face is its middle. */
|
|
103
148
|
const amberTint = {
|
|
104
149
|
face: { base: "#FFE6BD", _light: "#F2EFEB" },
|
|
150
|
+
faceGradient: { base: ["#FFFFFF", "#FFCD7B"], _light: ["#FDFDFD", "#E8E2D9"] },
|
|
151
|
+
edge: { base: ["#FFF1C9", "#A47D28"], _light: ["#B5AF87", "#BF8931"] },
|
|
105
152
|
};
|
|
106
153
|
export const palettes = {
|
|
107
|
-
/*
|
|
154
|
+
/*
|
|
155
|
+
* The Ciridae OS look: a monochrome primary that inverts with the theme, the kit's warm gold,
|
|
156
|
+
* and a blue focus ring apart from it.
|
|
157
|
+
*/
|
|
108
158
|
ciridae: {
|
|
109
159
|
greys: ciridaeGreys,
|
|
110
160
|
accent: { base: "#D1B778", _light: "#8A6D33" },
|
|
161
|
+
focusRing: { base: "#66B7F1", _light: "#4186B8" },
|
|
111
162
|
primary: { base: "#FFFFFF", _light: "#37373A" },
|
|
163
|
+
primaryGradient: { base: ["#FFFFFF", "#FFFFFF"], _light: ["#57575B", "#171719"] },
|
|
112
164
|
status: {
|
|
113
165
|
green: {
|
|
114
166
|
text: { base: "#45A999", _light: "#488F83" },
|
|
115
167
|
wash: { base: "#45A999", _light: "#3D8B7D" },
|
|
168
|
+
dark: { base: "#45A999", _light: "#698984" },
|
|
116
169
|
},
|
|
117
|
-
red: {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
text: { base: "#66B7F2", _light: "#4186B8" },
|
|
121
|
-
wash: { base: "#66B7F2", _light: "#4189C4" },
|
|
170
|
+
red: {
|
|
171
|
+
text: { base: "#F7644F", _light: "#EB442C" },
|
|
172
|
+
dark: { base: "#F7644F", _light: "#986159" },
|
|
122
173
|
},
|
|
174
|
+
yellow: {
|
|
175
|
+
text: { base: "#DFBB65", _light: "#B27D00" },
|
|
176
|
+
icon: { base: "#DFBB65", _light: "#DB972A" },
|
|
177
|
+
},
|
|
178
|
+
blue: { text: { base: "#66B7F1", _light: "#4186B8" } },
|
|
123
179
|
},
|
|
124
180
|
bronze: { base: "#725D42", _light: "#6D6554" },
|
|
125
181
|
tint: amberTint,
|
|
182
|
+
chart: {
|
|
183
|
+
bar: { base: "#66B7F1", _light: "#72BFF6" },
|
|
184
|
+
trend: { base: "#66B7F1", _light: "#4186B8" },
|
|
185
|
+
area: { base: ["#FFFFFF", "#A4D5F8"], _light: ["#60BCFF", "#FFFFFF"] },
|
|
186
|
+
categories: [
|
|
187
|
+
{ base: "#DFBB65", _light: "#F8B853" },
|
|
188
|
+
{ base: "#45A999", _light: "#488F83" },
|
|
189
|
+
chartIndigo,
|
|
190
|
+
{ base: "#F7644F", _light: "#EB442C" },
|
|
191
|
+
],
|
|
192
|
+
progress: { base: ["#A6D6FA", "#4D9CD9"], _light: ["#7AC1F4", "#4186B8"] },
|
|
193
|
+
atRisk: { base: ["#F2D995", "#C99E3E"], _light: ["#F8B853", "#DB972A"] },
|
|
194
|
+
},
|
|
126
195
|
},
|
|
127
196
|
/* A cool blue, where the primary takes the accent. */
|
|
128
197
|
ocean: {
|
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { type PaletteTokens } from "./derive.js";
|
|
|
2
2
|
import { type CiridaeTheme, type ColorTheme } from "./options.js";
|
|
3
3
|
import { type ThemedColor } from "./palettes.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.field" | "bg.fieldDisabled" | "bg.control" | "bg.pill" | "bg.glass" | "bg.glassHover" | "bg.raised" | "bg.raisedHover" | "bg.check" | "bg.hover" | "bg.fill" | "bg.rowHover" | "bg.track" | "bg.knob" | "fg.primary" | "fg.secondary" | "fg.muted" | "fg.subtle" | "fg.archived" | "border.subtle" | "border.control" | "border.panel" | "border.card" | "border.
|
|
6
|
-
gradients: Record<"
|
|
7
|
-
shadows: Record<"search" | "inset" | "card" | "focus" | "glow" | "toast" | "control.raised" | "control.raisedHover" | "control.pressed", ThemedColor>;
|
|
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.glassHover" | "bg.raised" | "bg.raisedHover" | "bg.check" | "bg.hover" | "bg.controlHover" | "bg.pressed" | "bg.fill" | "bg.rowHover" | "bg.track" | "bg.knob" | "fg.primary" | "fg.secondary" | "fg.muted" | "fg.subtle" | "fg.quietGlyph" | "fg.label" | "fg.archived" | "border.subtle" | "border.control" | "border.panel" | "border.card" | "border.canvas" | "border.divider" | "border.menuHover" | "border.mark" | "border.glass" | "border.hairline" | "chart.neutral" | "chart.notStarted", ThemedColor>;
|
|
6
|
+
gradients: Record<keyof PaletteTokens["gradients"] | "skeletonFill" | "canvas" | "panel" | "card" | "raised" | "raisedHover" | "selected" | "rowHover", ThemedColor>;
|
|
7
|
+
shadows: Record<"search" | "inset" | "card" | "soft" | "focus" | "glow" | "toast" | "control.raised" | "control.raisedHover" | "control.pressed", ThemedColor>;
|
|
8
8
|
fonts: {
|
|
9
9
|
display: string;
|
|
10
10
|
sans: string;
|
package/dist/theme/tokens.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { alpha } from "./color.js";
|
|
2
|
-
import { derivePaletteTokens } from "./derive.js";
|
|
1
|
+
import { alpha, linearGradient } from "./color.js";
|
|
2
|
+
import { derivePaletteTokens, themedGradient } from "./derive.js";
|
|
3
3
|
import { defaultTheme } from "./options.js";
|
|
4
4
|
import { palettes } from "./palettes.js";
|
|
5
|
+
/* The two elevations, the same in both themes: a card's, and the softer one a sheet or toast casts. */
|
|
6
|
+
const cardElevation = "0 1px 4px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.03)";
|
|
7
|
+
const softElevation = "0 1px 2px rgba(0,0,0,.04), 0 6px 20px -4px rgba(0,0,0,.05)";
|
|
5
8
|
/**
|
|
6
9
|
* Every token value a theme decides. `createCiridaePreset` bakes these into the stylesheet;
|
|
7
10
|
* `themeVariables` writes the same values over it at runtime, so the two never drift.
|
|
@@ -10,23 +13,54 @@ export function deriveThemeTokens(theme = {}) {
|
|
|
10
13
|
const source = palettes[theme.palette ?? defaultTheme.palette];
|
|
11
14
|
const palette = derivePaletteTokens(source);
|
|
12
15
|
const { dark, light } = source.greys;
|
|
16
|
+
const face = (name, opacity) => themedGradient("to bottom", { base: dark.gradients[name], _light: light.gradients[name] }, opacity);
|
|
13
17
|
return {
|
|
14
18
|
colors: {
|
|
15
19
|
...palette.colors,
|
|
16
|
-
// Focus is the
|
|
17
|
-
// renders a reference to a dotted semantic token as an
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
// Focus is the palette's focus ring, its accent unless it names another. Set from the
|
|
21
|
+
// palette, not by reference: Panda renders a reference to a dotted semantic token as an
|
|
22
|
+
// undefined variable.
|
|
23
|
+
"border.focus": source.focusRing ?? source.accent,
|
|
24
|
+
// A field's edge once invalid: the palette's red, at full strength in both themes.
|
|
25
|
+
"border.error": palette.colors["accent.red"],
|
|
21
26
|
"bg.canvas": { base: dark.canvas, _light: light.canvas },
|
|
22
27
|
// The app's main surface and its panels: a translucent lift off the canvas.
|
|
23
28
|
"bg.panel": { base: alpha(dark.panel, 0.66), _light: alpha(light.panel, 0.66) },
|
|
24
|
-
|
|
29
|
+
// A card: white glass in dark, a near-white solid in light.
|
|
30
|
+
"bg.card": { base: alpha(dark.card, 0.05), _light: light.card },
|
|
25
31
|
// A dialog, drawer or stat card: the card lifted a step.
|
|
26
32
|
"bg.surface": { base: dark.surface, _light: light.surface },
|
|
27
33
|
"bg.avatar": { base: dark.avatar, _light: light.avatar },
|
|
28
|
-
//
|
|
29
|
-
"bg.
|
|
34
|
+
// Behind a modal, full screen; the design gives a drawer none.
|
|
35
|
+
"bg.backdrop": { base: alpha(dark.scrim, 0.6), _light: alpha(light.scrim, 0.24) },
|
|
36
|
+
/*
|
|
37
|
+
* The overlays' glass, blurred by the `blurs.*` token of the same name. A popover or menu
|
|
38
|
+
* is one glass face; a modal and a drawer are a glass shell holding a sheet.
|
|
39
|
+
*/
|
|
40
|
+
"bg.popover": { base: alpha(dark.popover, 0.6), _light: alpha(light.popover, 0.33) },
|
|
41
|
+
"bg.modalShell": {
|
|
42
|
+
base: alpha(dark.modalShell, 0.01),
|
|
43
|
+
_light: alpha(light.modalShell, 0.66),
|
|
44
|
+
},
|
|
45
|
+
"bg.modalSheet": {
|
|
46
|
+
base: alpha(dark.modalSheet, 0.01),
|
|
47
|
+
_light: alpha(light.modalSheet, 0.88),
|
|
48
|
+
},
|
|
49
|
+
"bg.drawerShell": {
|
|
50
|
+
base: alpha(dark.drawerShell, 0.33),
|
|
51
|
+
_light: alpha(light.drawerShell, 0.33),
|
|
52
|
+
},
|
|
53
|
+
"bg.drawerSheet": { base: dark.drawerSheet, _light: alpha(light.drawerSheet, 0.88) },
|
|
54
|
+
// A flat well on the canvas or a sheet -- a tab or saved-view track, the nav pill: white at
|
|
55
|
+
// 5% in dark, where the raised faces are glass.
|
|
56
|
+
"bg.field": { base: alpha(dark.wash, 0.05), _light: alpha(light.well, 0.66) },
|
|
57
|
+
// The well of a form field you type into or pick from -- input, textarea, select field,
|
|
58
|
+
// combobox, the sidebar search: the darker well grey in dark, the same grey well as
|
|
59
|
+
// `bg.field` in light.
|
|
60
|
+
"bg.formField": { base: alpha(dark.well, 0.33), _light: alpha(light.well, 0.66) },
|
|
61
|
+
// A menu's trigger while its menu is open, such as the workspace switcher: the canvas
|
|
62
|
+
// edge's grey as a fill in dark, the field's well in light.
|
|
63
|
+
"bg.openTrigger": { base: alpha(dark.border, 0.5), _light: alpha(light.well, 0.66) },
|
|
30
64
|
// A disabled field loses its grey in light and reads as a blank well.
|
|
31
65
|
"bg.fieldDisabled": { base: alpha(dark.well, 0.33), _light: light.knob },
|
|
32
66
|
/*
|
|
@@ -38,9 +72,9 @@ export function deriveThemeTokens(theme = {}) {
|
|
|
38
72
|
"bg.control": { base: alpha(dark.control, 0.5), _light: alpha(light.control, 0.95) },
|
|
39
73
|
"bg.pill": { base: dark.pill, _light: light.pill },
|
|
40
74
|
/*
|
|
41
|
-
* The glass face of a toolbar control -- a select, a slicer, a hovered card
|
|
42
|
-
* button's glass; light is a translucent wash
|
|
43
|
-
* `bg.raised` is solid. Hover is the button face.
|
|
75
|
+
* The glass face of a toolbar control -- a select, a slicer, a hovered card -- flat at the
|
|
76
|
+
* middle of `gradients.selected`. Dark is the button's glass; light is a translucent wash,
|
|
77
|
+
* where the button's `bg.raised` is solid. Hover is the button face.
|
|
44
78
|
*/
|
|
45
79
|
"bg.glass": { base: alpha(dark.glass, 0.1), _light: alpha(light.glass, 0.66) },
|
|
46
80
|
"bg.glassHover": { base: alpha(dark.glass, 0.05), _light: light.raised },
|
|
@@ -52,14 +86,19 @@ export function deriveThemeTokens(theme = {}) {
|
|
|
52
86
|
"bg.raisedHover": { base: alpha(dark.raised, 0.05), _light: light.raised },
|
|
53
87
|
// An unticked checkbox or radio: glass in dark, a solid near-white in light.
|
|
54
88
|
"bg.check": { base: alpha(dark.glass, 0.1), _light: light.knob },
|
|
55
|
-
// The
|
|
56
|
-
"bg.hover": { base: alpha(dark.
|
|
89
|
+
// The state layers over a hovered and a pressed item: white in dark, the primary ink in light.
|
|
90
|
+
"bg.hover": { base: alpha(dark.wash, 0.06), _light: alpha(light.wash, 0.06) },
|
|
91
|
+
// The quieter layer over a hovered field, mark, tab or segment: the ink at 4% in light. Dark
|
|
92
|
+
// draws none there, and lifts the text or the edge instead.
|
|
93
|
+
"bg.controlHover": { base: alpha(dark.wash, 0), _light: alpha(light.wash, 0.04) },
|
|
94
|
+
"bg.pressed": { base: alpha(dark.wash, 0.08), _light: alpha(light.wash, 0.08) },
|
|
95
|
+
// The firmer grey fill a chip or a subtle button wears.
|
|
57
96
|
"bg.fill": { base: alpha(dark.hover, 0.1), _light: alpha(light.hover, 0.08) },
|
|
58
97
|
// A hovered table or list row: a flat wash, so a column of rows reads as one surface rather
|
|
59
98
|
// than a stack of separately lit bands. A selected row takes the accent's `bg.selected`.
|
|
60
|
-
"bg.rowHover": { base: alpha(dark.wash, 0.
|
|
99
|
+
"bg.rowHover": { base: alpha(dark.wash, 0.05), _light: alpha(light.wash, 0.04) },
|
|
61
100
|
// A switch's track while off; checked, it takes the green.
|
|
62
|
-
"bg.track": { base:
|
|
101
|
+
"bg.track": { base: dark.muted, _light: light.secondary },
|
|
63
102
|
"bg.knob": { base: dark.knob, _light: light.knob },
|
|
64
103
|
"fg.primary": { base: dark.primary, _light: light.primary },
|
|
65
104
|
// Supporting text that still reads: a record's meta line, a part's next step.
|
|
@@ -67,26 +106,67 @@ export function deriveThemeTokens(theme = {}) {
|
|
|
67
106
|
"fg.muted": { base: dark.muted, _light: light.muted },
|
|
68
107
|
// Placeholder and meta text: the muted grey, lifted a step further in light.
|
|
69
108
|
"fg.subtle": { base: dark.subtle, _light: light.subtle },
|
|
109
|
+
// A muted glyph, such as a separator, or the ring of a step not reached yet.
|
|
110
|
+
"fg.quietGlyph": { base: alpha(dark.border, 0.66), _light: alpha(light.subtle, 0.33) },
|
|
111
|
+
// A label beside its value -- a description list's term, a neutral badge, a stage's meta, a
|
|
112
|
+
// log row's detail: the muted grey in dark, the secondary in light.
|
|
113
|
+
"fg.label": { base: dark.muted, _light: light.secondary },
|
|
70
114
|
"fg.archived": { base: alpha(dark.archived, 0.66), _light: alpha(light.archived, 0.66) },
|
|
71
|
-
"border.subtle": { base: dark.line, _light: light.line },
|
|
115
|
+
"border.subtle": { base: dark.line, _light: alpha(light.line, 0.66) },
|
|
72
116
|
"border.control": { base: alpha(dark.border, 0.5), _light: alpha(light.border, 0.66) },
|
|
73
117
|
"border.panel": { base: alpha(dark.border, 1), _light: alpha(light.border, 0.66) },
|
|
74
|
-
"border.card": { base: dark.cardBorder, _light: light.cardBorder },
|
|
118
|
+
"border.card": { base: dark.cardBorder, _light: alpha(light.cardBorder, 0.66) },
|
|
119
|
+
// The edge of what sits on the canvas -- the sidebar search, the active nav pill, the main
|
|
120
|
+
// surface's outline -- darker in light so it holds on the grey.
|
|
121
|
+
"border.canvas": { base: alpha(dark.border, 0.5), _light: alpha(light.mark, 0.33) },
|
|
122
|
+
// A divider or row rule on a card, sheet or drawer, and the drawer shell's glass edge.
|
|
123
|
+
"border.divider": { base: alpha(dark.border, 0.66), _light: alpha(light.border, 0.66) },
|
|
124
|
+
// The hairline round a hovered menu or select item.
|
|
125
|
+
"border.menuHover": {
|
|
126
|
+
base: alpha(dark.menuHoverBorder, 0.5),
|
|
127
|
+
_light: alpha(light.menuHoverBorder, 0.33),
|
|
128
|
+
},
|
|
75
129
|
// The hairline round an unticked checkbox or radio: the top of the glass edge, flat.
|
|
76
130
|
"border.mark": { base: alpha(dark.mark, 0.33), _light: alpha(light.mark, 0.33) },
|
|
77
131
|
// The hairline round a glass button and the glass card surfaces: the dark mark in both
|
|
78
132
|
// themes, as the bronze hairline is; the light mark is too pale for it. Dark sits at the
|
|
79
133
|
// old vertical gradient's average, not its bright top, so a button's edge stays quiet.
|
|
80
134
|
"border.glass": { base: alpha(dark.mark, 0.2), _light: alpha(dark.mark, 0.28) },
|
|
81
|
-
// The hairline round a toolbar control: the glass edge in dark, the control border in light.
|
|
82
|
-
"border.toolbar": { base: alpha(dark.mark, 0.33), _light: alpha(light.border, 0.66) },
|
|
83
135
|
// The sidebar's divider.
|
|
84
136
|
"border.hairline": { base: dark.hairline, _light: light.hairline },
|
|
137
|
+
// The grey data marks: a grey series and its swatch, and a part not started yet.
|
|
138
|
+
"chart.neutral": { base: alpha(dark.wash, 0.2), _light: light.secondary },
|
|
139
|
+
"chart.notStarted": { base: alpha(dark.wash, 0.2), _light: alpha(light.mark, 0.33) },
|
|
85
140
|
},
|
|
86
141
|
gradients: {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
142
|
+
...palette.gradients,
|
|
143
|
+
// The skeleton as the design draws it, with no shimmer: the canvas's gradient in light,
|
|
144
|
+
// a flat white wash in dark.
|
|
145
|
+
skeletonFill: {
|
|
146
|
+
base: linearGradient("to bottom", [dark.wash, dark.wash], 0.08),
|
|
147
|
+
_light: linearGradient("to bottom", light.gradients.canvas, 1),
|
|
148
|
+
},
|
|
149
|
+
/*
|
|
150
|
+
* The faces the design paints as gradients, top to bottom; each flat `bg.*` face sits near
|
|
151
|
+
* its middle. Dark draws the canvas and panel flat, and the raised, selected and card faces
|
|
152
|
+
* as white glass falling to the muted grey.
|
|
153
|
+
*/
|
|
154
|
+
canvas: face("canvas", { base: 1, _light: 1 }),
|
|
155
|
+
panel: face("panel", { base: 0.66, _light: 0.66 }),
|
|
156
|
+
card: {
|
|
157
|
+
base: linearGradient("to bottom", dark.gradients.raised, 0.05),
|
|
158
|
+
_light: linearGradient("to bottom", [light.card, light.card], 1),
|
|
159
|
+
},
|
|
160
|
+
raised: face("raised", { base: 0.1, _light: 1 }),
|
|
161
|
+
// A hovered toolbar control or round button: the raised face, thinner in dark.
|
|
162
|
+
raisedHover: face("raised", { base: 0.05, _light: 1 }),
|
|
163
|
+
// The toolbar control's tint -- a select, slicer, filter chip, an unticked mark in dark.
|
|
164
|
+
selected: face("selected", { base: 0.1, _light: 0.66 }),
|
|
165
|
+
// A hovered log row: the flat wash in light, and in dark the raised glass at half its
|
|
166
|
+
// strength, as `bg.rowHover` flattens it.
|
|
167
|
+
rowHover: {
|
|
168
|
+
base: linearGradient("to bottom", dark.gradients.raised, 0.05),
|
|
169
|
+
_light: linearGradient("to bottom", [light.wash, light.wash], 0.04),
|
|
90
170
|
},
|
|
91
171
|
},
|
|
92
172
|
shadows: {
|
|
@@ -98,10 +178,8 @@ export function deriveThemeTokens(theme = {}) {
|
|
|
98
178
|
base: `inset 1px 2px 8px ${alpha(dark.shade, 0.25)}`,
|
|
99
179
|
_light: `inset 1px 2px 8px ${alpha(light.shade, 0.07)}`,
|
|
100
180
|
},
|
|
101
|
-
card: {
|
|
102
|
-
|
|
103
|
-
_light: `1px 2px 8px ${alpha(light.shade, 0.1)}`,
|
|
104
|
-
},
|
|
181
|
+
card: { base: cardElevation, _light: cardElevation },
|
|
182
|
+
soft: { base: softElevation, _light: softElevation },
|
|
105
183
|
focus: {
|
|
106
184
|
base: `0 0 4px ${alpha(dark.focus, 0.66)}`,
|
|
107
185
|
_light: `0 0 4px ${alpha(light.focus, 0.5)}`,
|
|
@@ -111,10 +189,7 @@ export function deriveThemeTokens(theme = {}) {
|
|
|
111
189
|
base: `0 0 8px ${alpha(dark.muted, 0.25)}`,
|
|
112
190
|
_light: `0 0 8px ${alpha(dark.muted, 0.2)}`,
|
|
113
191
|
},
|
|
114
|
-
toast: {
|
|
115
|
-
base: "0 8px 24px rgba(0,0,0,.45)",
|
|
116
|
-
_light: `0 8px 24px ${alpha(light.shade, 0.16)}`,
|
|
117
|
-
},
|
|
192
|
+
toast: { base: softElevation, _light: softElevation },
|
|
118
193
|
/*
|
|
119
194
|
* Control elevation: a bevel catching light from above, plus the shadow the control casts.
|
|
120
195
|
* The cast shadow is softened in light, since a dark scrim on a white page reads far
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ciridae/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -94,6 +94,14 @@
|
|
|
94
94
|
"types": "./dist/components/document-viewer.d.ts",
|
|
95
95
|
"default": "./dist/components/document-viewer.js"
|
|
96
96
|
},
|
|
97
|
+
"./app-frame": {
|
|
98
|
+
"types": "./dist/components/app-frame.d.ts",
|
|
99
|
+
"default": "./dist/components/app-frame.js"
|
|
100
|
+
},
|
|
101
|
+
"./feedback-operator": {
|
|
102
|
+
"types": "./dist/feedback/operator-controller.d.ts",
|
|
103
|
+
"default": "./dist/feedback/operator-controller.js"
|
|
104
|
+
},
|
|
97
105
|
"./lightbox": {
|
|
98
106
|
"types": "./dist/components/lightbox.d.ts",
|
|
99
107
|
"default": "./dist/components/lightbox.js"
|
|
@@ -122,6 +130,10 @@
|
|
|
122
130
|
"types": "./dist/components/theme-customizer.d.ts",
|
|
123
131
|
"default": "./dist/components/theme-customizer.js"
|
|
124
132
|
},
|
|
133
|
+
"./theme-toggle": {
|
|
134
|
+
"types": "./dist/components/theme-toggle.d.ts",
|
|
135
|
+
"default": "./dist/components/theme-toggle.js"
|
|
136
|
+
},
|
|
125
137
|
"./segmented-bar": {
|
|
126
138
|
"types": "./dist/components/segmented-bar.d.ts",
|
|
127
139
|
"default": "./dist/components/segmented-bar.js"
|
|
@@ -390,6 +402,10 @@
|
|
|
390
402
|
"types": "./dist/components/shell-skeleton.d.ts",
|
|
391
403
|
"default": "./dist/components/shell-skeleton.js"
|
|
392
404
|
},
|
|
405
|
+
"./log-entry": {
|
|
406
|
+
"types": "./dist/components/log-entry.d.ts",
|
|
407
|
+
"default": "./dist/components/log-entry.js"
|
|
408
|
+
},
|
|
393
409
|
"./log-list": {
|
|
394
410
|
"types": "./dist/components/log-list.d.ts",
|
|
395
411
|
"default": "./dist/components/log-list.js"
|
|
@@ -473,6 +489,10 @@
|
|
|
473
489
|
"./format-money": {
|
|
474
490
|
"types": "./dist/format/money.d.ts",
|
|
475
491
|
"default": "./dist/format/money.js"
|
|
492
|
+
},
|
|
493
|
+
"./ciridae-app": {
|
|
494
|
+
"types": "./dist/app/index.d.ts",
|
|
495
|
+
"default": "./dist/app/index.js"
|
|
476
496
|
}
|
|
477
497
|
},
|
|
478
498
|
"imports": {
|
|
@@ -487,22 +507,39 @@
|
|
|
487
507
|
"@types/react": ">=19",
|
|
488
508
|
"date-fns": "^4",
|
|
489
509
|
"react": ">=19",
|
|
490
|
-
"react-dom": ">=19"
|
|
510
|
+
"react-dom": ">=19",
|
|
511
|
+
"@ciridae/auth": ">=0.3.0",
|
|
512
|
+
"@ciridae/telemetry": ">=0.3.1",
|
|
513
|
+
"@sentry/react": ">=10",
|
|
514
|
+
"react-router-dom": ">=7"
|
|
491
515
|
},
|
|
492
516
|
"peerDependenciesMeta": {
|
|
493
517
|
"@types/react": {
|
|
494
518
|
"optional": true
|
|
519
|
+
},
|
|
520
|
+
"@ciridae/auth": {
|
|
521
|
+
"optional": true
|
|
522
|
+
},
|
|
523
|
+
"@ciridae/telemetry": {
|
|
524
|
+
"optional": true
|
|
525
|
+
},
|
|
526
|
+
"@sentry/react": {
|
|
527
|
+
"optional": true
|
|
528
|
+
},
|
|
529
|
+
"react-router-dom": {
|
|
530
|
+
"optional": true
|
|
495
531
|
}
|
|
496
532
|
},
|
|
497
533
|
"dependencies": {
|
|
498
534
|
"@base-ui/react": "1.6.0",
|
|
499
535
|
"@phosphor-icons/react": "2.1.10",
|
|
536
|
+
"@tanstack/charts": "1.1.0",
|
|
537
|
+
"@tanstack/markdown": "1.0.0",
|
|
500
538
|
"@tanstack/react-hotkeys": "0.17.0",
|
|
501
539
|
"@tanstack/react-pacer": "0.24.1",
|
|
502
540
|
"@tanstack/react-table": "9.2.4",
|
|
503
541
|
"@tanstack/react-virtual": "3.14.23",
|
|
504
542
|
"cmdk": "1.1.1",
|
|
505
|
-
"recharts": "^3.9.2",
|
|
506
543
|
"sonner": "2.0.8",
|
|
507
544
|
"zod": "^4.4.3"
|
|
508
545
|
},
|