@ciridae/ui 1.0.3 → 1.0.5

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.
Files changed (124) hide show
  1. package/dist/chat/conversation-source.d.ts +15 -1
  2. package/dist/chat/describe-tool-call.d.ts +3 -3
  3. package/dist/chat/describe-tool-call.js +3 -3
  4. package/dist/chat/message-text.js +2 -2
  5. package/dist/ciridae.css +16 -4
  6. package/dist/components/activity-feed.d.ts +1 -0
  7. package/dist/components/activity-feed.js +1 -0
  8. package/dist/components/app-frame.d.ts +13 -1
  9. package/dist/components/app-frame.js +45 -3
  10. package/dist/components/app-navigation.d.ts +28 -1
  11. package/dist/components/app-navigation.js +110 -14
  12. package/dist/components/badge.d.ts +29 -4
  13. package/dist/components/badge.js +134 -15
  14. package/dist/components/bulk-action-bar.js +3 -3
  15. package/dist/components/button.d.ts +10 -3
  16. package/dist/components/button.js +77 -44
  17. package/dist/components/calendar.js +44 -17
  18. package/dist/components/centered-page.js +2 -2
  19. package/dist/components/chart.d.ts +1 -1
  20. package/dist/components/chart.js +16 -11
  21. package/dist/components/chat-client-source.js +47 -6
  22. package/dist/components/chat-sheet-controller.d.ts +1 -0
  23. package/dist/components/chat-sheet-controller.js +1 -0
  24. package/dist/components/chat-sheet.d.ts +10 -2
  25. package/dist/components/chat-sheet.js +74 -37
  26. package/dist/components/chat.d.ts +90 -14
  27. package/dist/components/chat.js +401 -101
  28. package/dist/components/checkbox-item.d.ts +5 -2
  29. package/dist/components/checkbox-item.js +9 -5
  30. package/dist/components/chip.d.ts +5 -0
  31. package/dist/components/chip.js +27 -1
  32. package/dist/components/column-settings.js +1 -1
  33. package/dist/components/command-menu.d.ts +5 -1
  34. package/dist/components/command-menu.js +98 -32
  35. package/dist/components/command-palette.d.ts +6 -2
  36. package/dist/components/command-palette.js +20 -10
  37. package/dist/components/data-display.d.ts +35 -4
  38. package/dist/components/data-display.js +138 -19
  39. package/dist/components/data-grid.d.ts +14 -2
  40. package/dist/components/data-grid.js +61 -26
  41. package/dist/components/date-range-picker.js +9 -20
  42. package/dist/components/drawer.d.ts +5 -0
  43. package/dist/components/drawer.js +91 -54
  44. package/dist/components/editable-field.d.ts +17 -3
  45. package/dist/components/editable-field.js +57 -27
  46. package/dist/components/email-input.js +6 -5
  47. package/dist/components/environment-frame.d.ts +1 -1
  48. package/dist/components/environment-frame.js +37 -6
  49. package/dist/components/filter-bar.js +39 -28
  50. package/dist/components/form-controls.d.ts +9 -0
  51. package/dist/components/form-controls.js +46 -22
  52. package/dist/components/form-layout.d.ts +7 -3
  53. package/dist/components/form-layout.js +68 -23
  54. package/dist/components/glass-menu.d.ts +3 -0
  55. package/dist/components/glass-menu.js +63 -0
  56. package/dist/components/gradient-edge.d.ts +9 -0
  57. package/dist/components/gradient-edge.js +31 -0
  58. package/dist/components/input.d.ts +4 -2
  59. package/dist/components/input.js +26 -15
  60. package/dist/components/keycap.d.ts +9 -5
  61. package/dist/components/keycap.js +57 -19
  62. package/dist/components/lightbox.js +2 -1
  63. package/dist/components/locale.d.ts +10 -0
  64. package/dist/components/locale.js +18 -2
  65. package/dist/components/log-entry.d.ts +40 -0
  66. package/dist/components/log-entry.js +146 -0
  67. package/dist/components/mention-input.js +4 -3
  68. package/dist/components/menu.d.ts +6 -2
  69. package/dist/components/menu.js +34 -37
  70. package/dist/components/meter.d.ts +9 -1
  71. package/dist/components/meter.js +64 -6
  72. package/dist/components/navigation.d.ts +21 -4
  73. package/dist/components/navigation.js +84 -19
  74. package/dist/components/notification-tray.js +5 -4
  75. package/dist/components/overlays.d.ts +3 -1
  76. package/dist/components/overlays.js +69 -40
  77. package/dist/components/page-frame.js +1 -1
  78. package/dist/components/panel.d.ts +1 -1
  79. package/dist/components/panel.js +18 -12
  80. package/dist/components/radio-card.js +10 -9
  81. package/dist/components/record.d.ts +25 -1
  82. package/dist/components/record.js +147 -18
  83. package/dist/components/segmented-bar.d.ts +3 -1
  84. package/dist/components/segmented-bar.js +16 -6
  85. package/dist/components/select.d.ts +5 -2
  86. package/dist/components/select.js +103 -127
  87. package/dist/components/shell-skeleton.js +1 -1
  88. package/dist/components/shell.d.ts +2 -2
  89. package/dist/components/shell.js +43 -45
  90. package/dist/components/sidebar.d.ts +7 -2
  91. package/dist/components/sidebar.js +55 -27
  92. package/dist/components/single-line-text.d.ts +2 -0
  93. package/dist/components/single-line-text.js +16 -0
  94. package/dist/components/site-banner.d.ts +5 -2
  95. package/dist/components/site-banner.js +17 -6
  96. package/dist/components/skeleton.d.ts +7 -6
  97. package/dist/components/skeleton.js +28 -16
  98. package/dist/components/skeletons.d.ts +12 -0
  99. package/dist/components/skeletons.js +71 -8
  100. package/dist/components/stages.d.ts +78 -6
  101. package/dist/components/stages.js +512 -156
  102. package/dist/components/stat-card.d.ts +10 -2
  103. package/dist/components/stat-card.js +92 -37
  104. package/dist/components/status-banner.js +1 -1
  105. package/dist/components/tabs.js +26 -13
  106. package/dist/components/theme-toggle.d.ts +4 -0
  107. package/dist/components/theme-toggle.js +67 -0
  108. package/dist/components/toast.d.ts +9 -2
  109. package/dist/components/toast.js +78 -29
  110. package/dist/preset.js +291 -33
  111. package/dist/styled-system/styles.css +3107 -1039
  112. package/dist/styled-system/tokens/index.mjs +602 -22
  113. package/dist/styled-system/tokens/tokens.d.ts +11 -11
  114. package/dist/styled-system/types/prop-type.d.ts +2 -2
  115. package/dist/styles.css +16 -4
  116. package/dist/theme/color.d.ts +3 -0
  117. package/dist/theme/color.js +5 -0
  118. package/dist/theme/derive.d.ts +9 -2
  119. package/dist/theme/derive.js +72 -12
  120. package/dist/theme/palettes.d.ts +49 -6
  121. package/dist/theme/palettes.js +84 -15
  122. package/dist/theme/tokens.d.ts +3 -3
  123. package/dist/theme/tokens.js +108 -32
  124. package/package.json +9 -1
@@ -1,11 +1,16 @@
1
1
  import { lean } from "./color.js";
2
2
  export const PALETTE_NAMES = ["ciridae", "ocean", "moss", "violet", "ember"];
3
- /* The kit's own greys: today's dark, and the Figma's crisp light, each face flattened to its middle. */
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: "#212124",
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: "#FFFFFF",
53
+ card: "#FBFBFB",
36
54
  well: "#EEEEEE",
37
55
  avatar: "#D8D8DE",
38
56
  primary: "#2A2A2D",
39
- secondary: "#3F3F45",
40
- muted: "#7B7B7E",
57
+ secondary: "#7B7B7E",
58
+ muted: "#98989E",
41
59
  subtle: "#98989E",
42
60
  archived: "#5A5854",
43
- line: "#E2E2E6",
61
+ line: "#CDCDCD",
44
62
  border: "#CDCDCD",
45
- cardBorder: "#E2E2E2",
63
+ cardBorder: "#CDCDCD",
46
64
  mark: "#A7A7A7",
47
65
  hairline: "#E0DAD0",
48
- wash: "#141416",
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
- /* Today's look: a monochrome primary that inverts with the theme, and the kit's warm gold. */
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: { text: { base: "#F7644F", _light: "#C4594B" } },
118
- yellow: { text: { base: "#DFBB65", _light: "#93793A" } },
119
- blue: {
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: {
@@ -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.mark" | "border.glass" | "border.toolbar" | "border.hairline", ThemedColor>;
6
- gradients: Record<"skeleton", ThemedColor>;
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;
@@ -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 brand accent in both themes. Set from the palette, not by reference: Panda
17
- // renders a reference to a dotted semantic token as an undefined variable.
18
- "border.focus": palette.colors["accent.brand"],
19
- // A field's edge once invalid: the accent red in dark, a quieter dark red in light.
20
- "border.error": { base: palette.colors["accent.red"].base, _light: "rgba(168,71,71,.33)" },
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
- "bg.card": { base: dark.card, _light: light.card },
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
- // The well of a field you type into or pick from; flat, where the raised faces are glass.
29
- "bg.field": { base: alpha(dark.well, 0.33), _light: alpha(light.well, 0.66) },
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. Dark is the
42
- * button's glass; light is a translucent wash under `border.toolbar`, where the button's
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 grey washes: a hovered item, and the firmer fill a chip or a subtle button wears.
56
- "bg.hover": { base: alpha(dark.hover, 0.05), _light: alpha(light.hover, 0.04) },
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.03), _light: alpha(light.wash, 0.03) },
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: alpha(dark.muted, 0.6), _light: light.muted },
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,68 @@ 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
+ // Card and panel outlines: Stroke/Gray 66 in dark and Light Gray 66 in light.
119
+ "border.card": { base: alpha(dark.cardBorder, 0.66), _light: alpha(light.cardBorder, 0.66) },
120
+ // The edge of what sits on the canvas -- the sidebar search, the active nav pill, the main
121
+ // surface's outline -- darker in light so it holds on the grey.
122
+ "border.canvas": { base: alpha(dark.border, 0.5), _light: alpha(light.mark, 0.33) },
123
+ // A divider or row rule on a card, sheet or drawer, and the drawer shell's glass edge.
124
+ "border.divider": { base: alpha(dark.border, 0.66), _light: alpha(light.border, 0.66) },
125
+ // The hairline round a hovered menu or select item.
126
+ "border.menuHover": {
127
+ base: alpha(dark.menuHoverBorder, 0.5),
128
+ _light: alpha(light.menuHoverBorder, 0.33),
129
+ },
75
130
  // The hairline round an unticked checkbox or radio: the top of the glass edge, flat.
76
131
  "border.mark": { base: alpha(dark.mark, 0.33), _light: alpha(light.mark, 0.33) },
77
132
  // The hairline round a glass button and the glass card surfaces: the dark mark in both
78
133
  // themes, as the bronze hairline is; the light mark is too pale for it. Dark sits at the
79
134
  // old vertical gradient's average, not its bright top, so a button's edge stays quiet.
80
135
  "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
136
  // The sidebar's divider.
84
137
  "border.hairline": { base: dark.hairline, _light: light.hairline },
138
+ // The grey data marks: a grey series and its swatch, and a part not started yet.
139
+ "chart.neutral": { base: alpha(dark.wash, 0.2), _light: light.secondary },
140
+ "chart.notStarted": { base: alpha(dark.wash, 0.2), _light: alpha(light.mark, 0.33) },
85
141
  },
86
142
  gradients: {
87
- skeleton: {
88
- base: `linear-gradient(90deg, ${alpha(dark.wash, 0.06)} 30%, ${alpha(dark.wash, 0.12)} 50%, ${alpha(dark.wash, 0.06)} 70%)`,
89
- _light: `linear-gradient(90deg, ${alpha(light.wash, 0.05)} 30%, ${alpha(light.wash, 0.09)} 50%, ${alpha(light.wash, 0.05)} 70%)`,
143
+ ...palette.gradients,
144
+ // The skeleton as the design draws it, with no shimmer: the canvas's gradient in light,
145
+ // a flat white wash in dark.
146
+ skeletonFill: {
147
+ base: linearGradient("to bottom", [dark.wash, dark.wash], 0.08),
148
+ _light: linearGradient("to bottom", light.gradients.canvas, 1),
149
+ },
150
+ /*
151
+ * The faces the design paints as gradients, top to bottom; each flat `bg.*` face sits near
152
+ * its middle. Dark draws the canvas and panel flat, and the raised, selected and card faces
153
+ * as white glass falling to the muted grey.
154
+ */
155
+ canvas: face("canvas", { base: 1, _light: 1 }),
156
+ panel: face("panel", { base: 0.66, _light: 0.66 }),
157
+ card: {
158
+ base: linearGradient("to bottom", dark.gradients.raised, 0.05),
159
+ _light: linearGradient("to bottom", [light.card, light.card], 1),
160
+ },
161
+ raised: face("raised", { base: 0.1, _light: 1 }),
162
+ // A hovered toolbar control or round button: the raised face, thinner in dark.
163
+ raisedHover: face("raised", { base: 0.05, _light: 1 }),
164
+ // The toolbar control's tint -- a select, slicer, filter chip, an unticked mark in dark.
165
+ selected: face("selected", { base: 0.1, _light: 0.66 }),
166
+ // A hovered log row: the flat wash in light, and in dark the raised glass at half its
167
+ // strength, as `bg.rowHover` flattens it.
168
+ rowHover: {
169
+ base: linearGradient("to bottom", dark.gradients.raised, 0.05),
170
+ _light: linearGradient("to bottom", [light.wash, light.wash], 0.04),
90
171
  },
91
172
  },
92
173
  shadows: {
@@ -98,10 +179,8 @@ export function deriveThemeTokens(theme = {}) {
98
179
  base: `inset 1px 2px 8px ${alpha(dark.shade, 0.25)}`,
99
180
  _light: `inset 1px 2px 8px ${alpha(light.shade, 0.07)}`,
100
181
  },
101
- card: {
102
- base: `1px 2px 8px ${alpha(dark.shade, 0.33)}`,
103
- _light: `1px 2px 8px ${alpha(light.shade, 0.1)}`,
104
- },
182
+ card: { base: cardElevation, _light: cardElevation },
183
+ soft: { base: softElevation, _light: softElevation },
105
184
  focus: {
106
185
  base: `0 0 4px ${alpha(dark.focus, 0.66)}`,
107
186
  _light: `0 0 4px ${alpha(light.focus, 0.5)}`,
@@ -111,10 +190,7 @@ export function deriveThemeTokens(theme = {}) {
111
190
  base: `0 0 8px ${alpha(dark.muted, 0.25)}`,
112
191
  _light: `0 0 8px ${alpha(dark.muted, 0.2)}`,
113
192
  },
114
- toast: {
115
- base: "0 8px 24px rgba(0,0,0,.45)",
116
- _light: `0 8px 24px ${alpha(light.shade, 0.16)}`,
117
- },
193
+ toast: { base: softElevation, _light: softElevation },
118
194
  /*
119
195
  * Control elevation: a bevel catching light from above, plus the shadow the control casts.
120
196
  * 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",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -130,6 +130,10 @@
130
130
  "types": "./dist/components/theme-customizer.d.ts",
131
131
  "default": "./dist/components/theme-customizer.js"
132
132
  },
133
+ "./theme-toggle": {
134
+ "types": "./dist/components/theme-toggle.d.ts",
135
+ "default": "./dist/components/theme-toggle.js"
136
+ },
133
137
  "./segmented-bar": {
134
138
  "types": "./dist/components/segmented-bar.d.ts",
135
139
  "default": "./dist/components/segmented-bar.js"
@@ -398,6 +402,10 @@
398
402
  "types": "./dist/components/shell-skeleton.d.ts",
399
403
  "default": "./dist/components/shell-skeleton.js"
400
404
  },
405
+ "./log-entry": {
406
+ "types": "./dist/components/log-entry.d.ts",
407
+ "default": "./dist/components/log-entry.js"
408
+ },
401
409
  "./log-list": {
402
410
  "types": "./dist/components/log-list.d.ts",
403
411
  "default": "./dist/components/log-list.js"