@ciridae/ui 1.0.5 → 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 +65 -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 +109 -51
- package/dist/components/chat.d.ts +27 -56
- package/dist/components/chat.js +151 -129
- 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 -12
- package/dist/components/editable-field.js +13 -26
- 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 +39 -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 +805 -1279
- package/dist/styled-system/tokens/index.mjs +74 -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 +38 -92
- package/package.json +1 -1
- package/dist/theme/palettes.js +0 -254
package/dist/preset.js
CHANGED
|
@@ -4,8 +4,7 @@ import { linearGradient } from "./theme/color.js";
|
|
|
4
4
|
import { noEdge, themedGradient } from "./theme/derive.js";
|
|
5
5
|
import { deriveThemeTokens } from "./theme/tokens.js";
|
|
6
6
|
export { breakpointQuery, breakpoints } from "./theme/breakpoints.js";
|
|
7
|
-
export {
|
|
8
|
-
export { deriveThemeTokens, themeVariables } from "./theme/tokens.js";
|
|
7
|
+
export { deriveThemeTokens } from "./theme/tokens.js";
|
|
9
8
|
const appBaseCss = {
|
|
10
9
|
"html, body, #root": {
|
|
11
10
|
margin: "0",
|
|
@@ -18,12 +17,15 @@ const appBaseCss = {
|
|
|
18
17
|
":where(a)": { color: "inherit", textDecoration: "none" },
|
|
19
18
|
"*": { scrollbarWidth: "thin", scrollbarColor: "token(colors.border.control) transparent" },
|
|
20
19
|
};
|
|
21
|
-
/* The grey glass edge dark draws round a raised face, and round most of the hue glass. */
|
|
22
20
|
const darkGlassEdge = "linear-gradient(to bottom, rgba(137,136,135,.33), rgba(101,96,92,.33) 10%, rgba(43,41,39,.33) 90%, rgba(64,63,63,.33))";
|
|
23
|
-
/* An edge drawn as the grey glass in dark, and as a two-color gradient at .33 in light. */
|
|
24
21
|
function glassEdgeWithLightGradient(top, bottom) {
|
|
25
22
|
return { base: darkGlassEdge, _light: linearGradient("to bottom", [top, bottom], 0.33) };
|
|
26
23
|
}
|
|
24
|
+
// Gradient ends that more than one face or edge is drawn in, so they change together.
|
|
25
|
+
const darkSuccessGreenEnds = ["#BEE1DB", "#327A6E"];
|
|
26
|
+
const lightSuccessGlassEnds = ["#ECECEC", "#DFEFEC"];
|
|
27
|
+
const lightSuccessEdgeEnds = ["#9FCCC3", "#589D92"];
|
|
28
|
+
const lightSelectedEdgeEnds = ["#D8D8D8", "#CCCBCB"];
|
|
27
29
|
/** The kit's tokens under a theme. Anything left out takes the default, which is today's look. */
|
|
28
30
|
export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
29
31
|
const { colors, gradients, shadows, fonts } = deriveThemeTokens(theme);
|
|
@@ -111,6 +113,11 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
111
113
|
},
|
|
112
114
|
},
|
|
113
115
|
tokens: {
|
|
116
|
+
// Colours that are CSS keywords rather than palette entries, so a strict style can name them.
|
|
117
|
+
colors: {
|
|
118
|
+
transparent: { value: "transparent" },
|
|
119
|
+
currentColor: { value: "currentColor" },
|
|
120
|
+
},
|
|
114
121
|
spacing: {
|
|
115
122
|
none: { value: "0" },
|
|
116
123
|
"control.trackInset": { value: "2px" },
|
|
@@ -129,15 +136,20 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
129
136
|
"control.largeInline": { value: "20px" },
|
|
130
137
|
// Inline padding on the side of a trigger that ends in its caret.
|
|
131
138
|
"control.iconInline": { value: "10px" },
|
|
132
|
-
// The assistant launcher's padding at its end, round the shortcut keycap.
|
|
133
139
|
"control.launcherInlineEnd": { value: "7px" },
|
|
134
140
|
// The underline search field keeps its icon close to the text's left edge.
|
|
135
141
|
"search.inline": { value: "4px" },
|
|
136
142
|
"field.block": { value: "10px" },
|
|
143
|
+
"gap.4": { value: "4px" },
|
|
144
|
+
"gap.6": { value: "6px" },
|
|
145
|
+
"gap.8": { value: "8px" },
|
|
146
|
+
"gap.12": { value: "12px" },
|
|
147
|
+
"gap.16": { value: "16px" },
|
|
148
|
+
"gap.20": { value: "20px" },
|
|
149
|
+
"gap.24": { value: "24px" },
|
|
137
150
|
"layout.tightGap": { value: "4px" },
|
|
138
151
|
// Between a sidebar's groups, and the sidebar's own inset from the window edge.
|
|
139
152
|
"sidebar.groupGap": { value: "16px" },
|
|
140
|
-
// The least room between the sidebar's navigation and its footer.
|
|
141
153
|
"sidebar.footerGap": { value: "18px" },
|
|
142
154
|
"sidebar.inline": { value: "10px" },
|
|
143
155
|
"sidebar.block": { value: "14px" },
|
|
@@ -149,15 +161,12 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
149
161
|
"layout.pageGap": { value: "12px" },
|
|
150
162
|
"layout.projectListOffset": { value: "28px" },
|
|
151
163
|
"layout.sectionGap": { value: "12px" },
|
|
152
|
-
//
|
|
153
|
-
// draws no centered card; one card alone on an empty page keeps more room than the
|
|
154
|
-
// sections of an app page.
|
|
164
|
+
// The design draws no centered card; one card alone on an empty page keeps more room than the sections of an app page.
|
|
155
165
|
"layout.centeredCardGap": { value: "24px" },
|
|
156
166
|
"log.columnGap": { value: "10px" },
|
|
157
167
|
"log.detailIndent": { value: "34px" },
|
|
158
168
|
"log.detailIndentCompact": { value: "32px" },
|
|
159
169
|
"log.rowBlock": { value: "3px" },
|
|
160
|
-
// A log entry's padding: in a feed, a compact feed, and a side panel.
|
|
161
170
|
"log.entryBlock": { value: "14px" },
|
|
162
171
|
"log.entryInline": { value: "20px" },
|
|
163
172
|
"log.entryCompactBlock": { value: "8px" },
|
|
@@ -172,29 +181,24 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
172
181
|
"panel.default": { value: "12px" },
|
|
173
182
|
"panel.comfortable": { value: "16px" },
|
|
174
183
|
"panel.roomy": { value: "24px" },
|
|
175
|
-
// A card's padding, and a stat tile's.
|
|
176
184
|
"panel.card": { value: "20px" },
|
|
177
185
|
"tile.block": { value: "18px" },
|
|
178
186
|
"tile.inline": { value: "20px" },
|
|
179
|
-
// Between the bars of a stat tile's placeholder.
|
|
180
187
|
"skeleton.tileGap": { value: "10px" },
|
|
181
|
-
// An empty state's block padding on a page, and bare or in a compact spot.
|
|
182
188
|
"emptyState.pageBlock": { value: "56px" },
|
|
183
189
|
"emptyState.compactBlock": { value: "32px" },
|
|
184
|
-
// Between the stages on a stage strip.
|
|
185
190
|
"stage.connectorGap": { value: "10px" },
|
|
186
|
-
// Between a numbered list's number and its text, the kit's Numbered item.
|
|
187
191
|
"list.numberGap": { value: "10px" },
|
|
188
|
-
// Between a budget row's name and its meter, the kit's Budget row.
|
|
189
192
|
"meter.rowGap": { value: "36px" },
|
|
190
|
-
"panel.sidebarBlock": { value: "14px" },
|
|
191
193
|
"page.inline": { value: "12px" },
|
|
192
194
|
"shell.leading": { value: "28px" },
|
|
193
195
|
"table.cell": { value: "12px" },
|
|
194
|
-
"table.rowBlock": { value: "16px" },
|
|
195
196
|
"table.compactRowBlock": { value: "8px" },
|
|
196
197
|
},
|
|
197
198
|
sizes: {
|
|
199
|
+
// A flex child that may shrink below its content (`minWidth: "0"`), and its parent's whole width or height.
|
|
200
|
+
"0": { value: "0" },
|
|
201
|
+
full: { value: "100%" },
|
|
198
202
|
"border.hairline": { value: "1px" },
|
|
199
203
|
"indicator.dot": { value: "4px" },
|
|
200
204
|
"indicator.live": { value: "6px" },
|
|
@@ -203,7 +207,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
203
207
|
"indicator.count": { value: "16px" },
|
|
204
208
|
"log.caretColumn": { value: "12px" },
|
|
205
209
|
"log.minimum": { value: "320px" },
|
|
206
|
-
// A log entry's time column.
|
|
207
210
|
"log.timeColumn": { value: "64px" },
|
|
208
211
|
"log.rawMaximum": { value: "200px" },
|
|
209
212
|
"assistant.orb": { value: "28px" },
|
|
@@ -214,7 +217,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
214
217
|
"avatar.menu": { value: "24px" },
|
|
215
218
|
"avatar.agent": { value: "26px" },
|
|
216
219
|
"avatar.row": { value: "32px" },
|
|
217
|
-
// A record's owner, and the stand-in when there is none.
|
|
218
220
|
"avatar.owner": { value: "28px" },
|
|
219
221
|
"avatar.large": { value: "44px" },
|
|
220
222
|
// A mark set inline beside a name -- an icon, a provider logo, a project tile -- so
|
|
@@ -223,25 +225,19 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
223
225
|
"progress.track": { value: "6px" },
|
|
224
226
|
"progress.segment": { value: "3px" },
|
|
225
227
|
"indicator.swatch": { value: "8px" },
|
|
226
|
-
// A row in a menu or a select's list
|
|
228
|
+
// A row in a menu or a select's list.
|
|
227
229
|
"menu.item": { value: "30px" },
|
|
228
|
-
"select.compactItem": { value: "28px" },
|
|
229
230
|
"code.maximum": { value: "320px" },
|
|
230
231
|
// The Ciridae mark above a short card, as the sign-in pages show it.
|
|
231
232
|
"brand.logo": { value: "40px" },
|
|
232
233
|
"indicator.radio": { value: "6px" },
|
|
233
234
|
"skeleton.line": { value: "16px" },
|
|
234
|
-
// A skeleton's bar or pill, its small pill, and a caption line.
|
|
235
235
|
"skeleton.bar": { value: "20px" },
|
|
236
236
|
"skeleton.badge": { value: "16px" },
|
|
237
237
|
"skeleton.caption": { value: "8px" },
|
|
238
238
|
"skeleton.short": { value: "64px" },
|
|
239
|
-
// A status chip's placeholder, and the design's fixed text bar; the small one is
|
|
240
|
-
// `skeleton.caption`.
|
|
241
239
|
"skeleton.pill": { value: "84px" },
|
|
242
240
|
"skeleton.textLine": { value: "10px" },
|
|
243
|
-
// A stat tile's height, which its placeholder and its empty stand-in hold; a card's
|
|
244
|
-
// placeholder, and the band its bars sit centred in.
|
|
245
241
|
"tile.minimum": { value: "96px" },
|
|
246
242
|
"skeleton.card": { value: "300px" },
|
|
247
243
|
"skeleton.cardBody": { value: "150px" },
|
|
@@ -261,27 +257,20 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
261
257
|
"control.clear": { value: "20px" },
|
|
262
258
|
// A step chip or small badge in a row of text.
|
|
263
259
|
"control.chip": { value: "22px" },
|
|
264
|
-
// A keycap that holds a word such as Esc rather than one glyph.
|
|
265
260
|
"control.wordKeycap": { value: "35px" },
|
|
266
|
-
// The composer's send button.
|
|
267
261
|
"control.send": { value: "26px" },
|
|
268
262
|
"control.small": { value: "30px" },
|
|
269
263
|
// A tab at rest: 2px under the open one, which fills its 30px track.
|
|
270
264
|
"control.restingTab": { value: "28px" },
|
|
271
265
|
"control.row": { value: "34px" },
|
|
272
|
-
// A round icon button in the top bar or a pager, and the smaller one that closes a sheet.
|
|
273
266
|
"control.round": { value: "34px" },
|
|
274
267
|
// The collapsed sidebar's expand button, the kit's 32px round button.
|
|
275
268
|
"control.roundRail": { value: "32px" },
|
|
276
269
|
"control.roundSmall": { value: "28px" },
|
|
277
270
|
"control.sidebarSearch": { value: "36px" },
|
|
278
|
-
// The square tile an icon sits on beside a row's title.
|
|
279
|
-
// The disc a numbered list's number sits in.
|
|
280
271
|
"list.number": { value: "20px" },
|
|
281
272
|
"tile.icon": { value: "32px" },
|
|
282
|
-
// The parts rollup's line, in place of the stage strip.
|
|
283
273
|
"partsRollup.height": { value: "26px" },
|
|
284
|
-
// A stat tile's chart slot, and the line's plot at its foot, under the end point's room.
|
|
285
274
|
"sparkline.width": { value: "88px" },
|
|
286
275
|
"sparkline.height": { value: "32px" },
|
|
287
276
|
"sparkline.plotWidth": { value: "84px" },
|
|
@@ -296,11 +285,8 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
296
285
|
"workspace.avatar": { value: "34px" },
|
|
297
286
|
"control.field": { value: "46px" },
|
|
298
287
|
"sidebar.projectAction": { value: "48px" },
|
|
299
|
-
// The rule between the icon rail's sections.
|
|
300
288
|
"sidebar.railRule": { value: "24px" },
|
|
301
|
-
// A sidebar row shorter than a page's, such as the settings sidebar's Back to app.
|
|
302
289
|
"sidebar.shortRow": { value: "28px" },
|
|
303
|
-
"toast.minimum": { value: "56px" },
|
|
304
290
|
"chat.footer": { value: "60px" },
|
|
305
291
|
"shell.header": { value: "54px" },
|
|
306
292
|
"shell.collapsed": { value: "64px" },
|
|
@@ -308,7 +294,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
308
294
|
"table.headRow": { value: "44px" },
|
|
309
295
|
// A textarea at rest: two lines of body text in its well; it grows as it is dragged.
|
|
310
296
|
"field.textarea": { value: "64px" },
|
|
311
|
-
// An input set inline in a row.
|
|
312
297
|
"field.inline": { value: "28px" },
|
|
313
298
|
"chat.input": { value: "87px" },
|
|
314
299
|
"chat.inputMobile": { value: "72px" },
|
|
@@ -316,7 +301,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
316
301
|
"overlay.menu": { value: "200px" },
|
|
317
302
|
// The tallest a select's or combobox's list grows before it scrolls.
|
|
318
303
|
"overlay.menuList": { value: "320px" },
|
|
319
|
-
// A stuck step's "Not sure?" menu of ways forward.
|
|
320
304
|
"overlay.helpMenu": { value: "360px" },
|
|
321
305
|
// The notification tray as a popover from the bell, and how much of its list shows.
|
|
322
306
|
"overlay.tray": { value: "380px" },
|
|
@@ -331,10 +315,9 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
331
315
|
"search.regularPreview": { value: "250px" },
|
|
332
316
|
"search.sidebarPreview": { value: "264px" },
|
|
333
317
|
"shell.sidebar": { value: "248px" },
|
|
334
|
-
//
|
|
318
|
+
// The glass shell round each dialog and palette adds its padding.
|
|
335
319
|
"overlay.dialog": { value: "440px" },
|
|
336
320
|
"overlay.palette": { value: "640px" },
|
|
337
|
-
// The command palette's query row, a result row and its footer of key hints.
|
|
338
321
|
"commandPalette.query": { value: "56px" },
|
|
339
322
|
"commandPalette.row": { value: "40px" },
|
|
340
323
|
"commandPalette.footer": { value: "44px" },
|
|
@@ -346,7 +329,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
346
329
|
"overlay.sheetNarrow": { value: "400px" },
|
|
347
330
|
"overlay.sheetDocked": { value: "clamp(400px, 29.7vw, 488px)" },
|
|
348
331
|
"toast.width": { value: "440px" },
|
|
349
|
-
// A toast's progress track.
|
|
350
332
|
"toast.progressWidth": { value: "72px" },
|
|
351
333
|
"toast.progressHeight": { value: "4px" },
|
|
352
334
|
"chat.thread": { value: "640px" },
|
|
@@ -369,7 +351,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
369
351
|
// A locked step's dot, and a locked requirement's row, which keeps a little more.
|
|
370
352
|
"locked.step": { value: ".5" },
|
|
371
353
|
"locked.requirement": { value: ".55" },
|
|
372
|
-
// A round icon button fades further.
|
|
373
354
|
disabledRound: { value: ".25" },
|
|
374
355
|
// A ticked mark under the pointer, in dark: the face and its glyph fade a little.
|
|
375
356
|
checkedHover: { value: ".88" },
|
|
@@ -398,7 +379,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
398
379
|
body: { value: "1.4" },
|
|
399
380
|
},
|
|
400
381
|
fontSizes: {
|
|
401
|
-
// The largest figure on a page, set with `letterSpacings.display`.
|
|
402
382
|
display: { value: "36px" },
|
|
403
383
|
body: { value: "14px" },
|
|
404
384
|
caption: { value: "13px" },
|
|
@@ -440,8 +420,8 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
440
420
|
toast: { value: "90" },
|
|
441
421
|
},
|
|
442
422
|
radii: {
|
|
423
|
+
none: { value: "0" },
|
|
443
424
|
round: { value: "999px" },
|
|
444
|
-
// A sidebar nav item.
|
|
445
425
|
nav: { value: "3px" },
|
|
446
426
|
keycap: { value: "6px" },
|
|
447
427
|
// Round 2 fields -- inputs, selects, checkboxes -- are nearly square-cornered.
|
|
@@ -462,7 +442,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
462
442
|
"bg.panel": { value: colors["bg.panel"] },
|
|
463
443
|
"bg.card": { value: colors["bg.card"] },
|
|
464
444
|
"bg.avatar": { value: colors["bg.avatar"] },
|
|
465
|
-
// The modal scrim, and the overlays' glass; see `deriveThemeTokens`.
|
|
466
445
|
"bg.backdrop": { value: colors["bg.backdrop"] },
|
|
467
446
|
"bg.popover": { value: colors["bg.popover"] },
|
|
468
447
|
"bg.modalShell": { value: colors["bg.modalShell"] },
|
|
@@ -476,18 +455,18 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
476
455
|
"bg.errorSubtle": { value: colors["bg.errorSubtle"] },
|
|
477
456
|
"fg.archived": { value: colors["fg.archived"] },
|
|
478
457
|
"border.subtle": { value: colors["border.subtle"] },
|
|
479
|
-
// Focus is the palette's focus ring
|
|
458
|
+
// Focus is the palette's focus ring, Accent Blue.
|
|
480
459
|
"border.focus": { value: colors["border.focus"] },
|
|
481
460
|
// The greys, from the palette's ramp; see `deriveThemeTokens`.
|
|
482
461
|
"fg.primary": { value: colors["fg.primary"] },
|
|
483
462
|
"fg.muted": { value: colors["fg.muted"] },
|
|
484
463
|
"fg.secondary": { value: colors["fg.secondary"] },
|
|
485
464
|
"fg.subtle": { value: colors["fg.subtle"] },
|
|
486
|
-
"fg.quietGlyph": { value: colors["fg.quietGlyph"] },
|
|
487
465
|
"fg.label": { value: colors["fg.label"] },
|
|
488
466
|
"border.control": { value: colors["border.control"] },
|
|
489
467
|
"border.canvas": { value: colors["border.canvas"] },
|
|
490
468
|
"border.divider": { value: colors["border.divider"] },
|
|
469
|
+
"border.popover": { value: colors["border.popover"] },
|
|
491
470
|
"border.menuHover": { value: colors["border.menuHover"] },
|
|
492
471
|
"bg.field": { value: colors["bg.field"] },
|
|
493
472
|
"bg.formField": { value: colors["bg.formField"] },
|
|
@@ -507,24 +486,16 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
507
486
|
"border.card": { value: colors["border.card"] },
|
|
508
487
|
"border.glass": { value: colors["border.glass"] },
|
|
509
488
|
"border.hairline": { value: colors["border.hairline"] },
|
|
510
|
-
|
|
511
|
-
* The flat faces; see `deriveThemeTokens`. `bg.surface` lifts a dialog or drawer off
|
|
512
|
-
* the card; `bg.control` is what a field or tab track wears; `bg.glass` and
|
|
513
|
-
* `bg.raised` are the toolbar control and the button; `bg.hover` and `bg.pressed` are
|
|
514
|
-
* the state layers and `bg.fill` the firmer grey fill. A face the design paints as a
|
|
515
|
-
* gradient has one under `gradients` too.
|
|
516
|
-
*/
|
|
489
|
+
// A face the design paints as a gradient has one under `gradients` too.
|
|
517
490
|
"bg.surface": { value: colors["bg.surface"] },
|
|
518
491
|
"bg.control": { value: colors["bg.control"] },
|
|
519
492
|
"bg.pill": { value: colors["bg.pill"] },
|
|
520
493
|
"bg.glass": { value: colors["bg.glass"] },
|
|
521
|
-
"bg.glassHover": { value: colors["bg.glassHover"] },
|
|
522
494
|
"bg.raised": { value: colors["bg.raised"] },
|
|
523
495
|
"bg.raisedHover": { value: colors["bg.raisedHover"] },
|
|
524
496
|
"bg.check": { value: colors["bg.check"] },
|
|
525
497
|
"bg.hover": { value: colors["bg.hover"] },
|
|
526
498
|
"bg.controlHover": { value: colors["bg.controlHover"] },
|
|
527
|
-
"bg.pressed": { value: colors["bg.pressed"] },
|
|
528
499
|
"bg.fill": { value: colors["bg.fill"] },
|
|
529
500
|
/*
|
|
530
501
|
* `primary` inverts: white on a dark panel, near-black on a light one. Light has no
|
|
@@ -532,13 +503,7 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
532
503
|
*/
|
|
533
504
|
"bg.primary": { value: colors["bg.primary"] },
|
|
534
505
|
"bg.primaryHover": { value: colors["bg.primaryHover"] },
|
|
535
|
-
/* The warm glass of the tinted button. */
|
|
536
|
-
"bg.tinted": { value: colors["bg.tinted"] },
|
|
537
|
-
/* The destructive button's red. */
|
|
538
|
-
"bg.danger": { value: { base: "#F67C6A", _light: "#F36B57" } },
|
|
539
506
|
/*
|
|
540
|
-
* The solid tint of an attention block or a highlighted field, the same in every
|
|
541
|
-
* palette as the destructive red is; `border.*Tint` under `gradients` edges a block.
|
|
542
507
|
* Yellow is the design's 5% wash in dark. Dark draws a green or red block as its hue's
|
|
543
508
|
* glass, which these flatten to its middle.
|
|
544
509
|
*/
|
|
@@ -548,7 +513,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
548
513
|
// Links take the palette's accent; the four status hues keep their meaning.
|
|
549
514
|
"accent.brand": { value: colors["accent.brand"] },
|
|
550
515
|
"accent.green": { value: colors["accent.green"] },
|
|
551
|
-
"accent.greenDark": { value: colors["accent.greenDark"] },
|
|
552
516
|
"accent.red": { value: colors["accent.red"] },
|
|
553
517
|
"accent.redDark": { value: colors["accent.redDark"] },
|
|
554
518
|
"accent.yellow": { value: colors["accent.yellow"] },
|
|
@@ -585,7 +549,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
585
549
|
// The shadows `deriveThemeTokens` sets, most cast in the palette's greys.
|
|
586
550
|
search: { value: shadows.search },
|
|
587
551
|
inset: { value: shadows.inset },
|
|
588
|
-
// A card's elevation, and the softer one of a sheet, toast or chip, or the segment that is on.
|
|
589
552
|
card: { value: shadows.card },
|
|
590
553
|
soft: { value: shadows.soft },
|
|
591
554
|
// The faint glow round a drawer's glass shell; light only.
|
|
@@ -609,16 +572,10 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
609
572
|
"control.pressed": { value: shadows["control.pressed"] },
|
|
610
573
|
},
|
|
611
574
|
gradients: {
|
|
612
|
-
// A loading placeholder's flat fill.
|
|
613
575
|
skeletonFill: { value: gradients.skeletonFill },
|
|
614
576
|
orb: {
|
|
615
577
|
value: "radial-gradient(circle at 70% 24%, rgba(232,224,195,.9) 0 9%, transparent 11%), linear-gradient(180deg, #E8E0C3, #46361D)",
|
|
616
578
|
},
|
|
617
|
-
/*
|
|
618
|
-
* The faces the design paints as gradients, most with a flat `bg.*` sibling near its
|
|
619
|
-
* middle; see `deriveThemeTokens`. The destructive face is the same red in every palette,
|
|
620
|
-
* as `bg.danger` is.
|
|
621
|
-
*/
|
|
622
579
|
canvas: { value: gradients.canvas },
|
|
623
580
|
panel: { value: gradients.panel },
|
|
624
581
|
card: { value: gradients.card },
|
|
@@ -627,17 +584,16 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
627
584
|
selected: { value: gradients.selected },
|
|
628
585
|
rowHover: { value: gradients.rowHover },
|
|
629
586
|
primary: { value: gradients.primary },
|
|
587
|
+
primaryHover: { value: gradients.primaryHover },
|
|
630
588
|
tinted: { value: gradients.tinted },
|
|
589
|
+
// The destructive face is fixed here rather than drawn from the palette.
|
|
631
590
|
danger: {
|
|
632
591
|
value: {
|
|
633
592
|
base: "linear-gradient(to bottom, #F69385, #F7644F)",
|
|
634
593
|
_light: "linear-gradient(to bottom, #F48272, #F2533C)",
|
|
635
594
|
},
|
|
636
595
|
},
|
|
637
|
-
|
|
638
|
-
* The 1px edges a face draws as a gradient, through `[data-edge]`. Dark draws no edge
|
|
639
|
-
* on the primary or destructive face.
|
|
640
|
-
*/
|
|
596
|
+
// Dark draws no edge on the primary or destructive face.
|
|
641
597
|
"border.raised": { value: glassEdgeWithLightGradient("#BCB6B6", "#9C9A9A") },
|
|
642
598
|
"border.primary": {
|
|
643
599
|
value: {
|
|
@@ -656,36 +612,34 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
656
612
|
"border.otherWorkspaceMark": {
|
|
657
613
|
value: {
|
|
658
614
|
base: linearGradient("to bottom", ["#3C3C3C", "#3C3C3C"], 0.66),
|
|
659
|
-
_light: linearGradient("to bottom",
|
|
615
|
+
_light: linearGradient("to bottom", lightSelectedEdgeEnds, 0.66),
|
|
660
616
|
},
|
|
661
617
|
},
|
|
662
618
|
// The selected face's edge, round a user's chat bubble.
|
|
663
619
|
"border.selected": {
|
|
664
620
|
value: {
|
|
665
621
|
base: darkGlassEdge,
|
|
666
|
-
_light: linearGradient("to bottom",
|
|
622
|
+
_light: linearGradient("to bottom", lightSelectedEdgeEnds, 0.66),
|
|
667
623
|
},
|
|
668
624
|
},
|
|
669
|
-
// A chart's area under its trend line, and a progress bar on track and at risk.
|
|
670
625
|
"chart.area": { value: gradients["chart.area"] },
|
|
671
626
|
"chart.progress": { value: gradients["chart.progress"] },
|
|
672
627
|
"chart.atRisk": { value: gradients["chart.atRisk"] },
|
|
673
628
|
/*
|
|
674
629
|
* The hue glass a badge, a step or the current stage wears, each with its edge: .66 in
|
|
675
|
-
* light and .10 in dark, the done step stronger in dark.
|
|
676
|
-
* in every palette, as the destructive red is.
|
|
630
|
+
* light and .10 in dark, the done step stronger in dark.
|
|
677
631
|
*/
|
|
678
632
|
infoGlass: {
|
|
679
633
|
value: themedGradient("to bottom", { base: ["#FFFFFF", "#A4D5F8"], _light: ["#F4F5F5", "#E2F2FF"] }, { base: 0.1, _light: 0.66 }),
|
|
680
634
|
},
|
|
681
635
|
successGlass: {
|
|
682
|
-
value: themedGradient("to bottom", { base: ["#FFFFFF", "#7BF6FF"], _light:
|
|
636
|
+
value: themedGradient("to bottom", { base: ["#FFFFFF", "#7BF6FF"], _light: lightSuccessGlassEnds }, { base: 0.1, _light: 0.66 }),
|
|
683
637
|
},
|
|
684
638
|
dangerGlass: {
|
|
685
639
|
value: themedGradient("to bottom", { base: ["#FFFFFF", "#F3A69B"], _light: ["#FDFDFD", "#E8DAD9"] }, { base: 0.1, _light: 0.66 }),
|
|
686
640
|
},
|
|
687
641
|
stepDoneGlass: {
|
|
688
|
-
value: themedGradient("to bottom", { base:
|
|
642
|
+
value: themedGradient("to bottom", { base: darkSuccessGreenEnds, _light: lightSuccessGlassEnds }, { base: 0.6, _light: 0.66 }),
|
|
689
643
|
},
|
|
690
644
|
currentStageGlass: {
|
|
691
645
|
value: themedGradient("to bottom", { base: ["#FFFFFF", "#FFCD7B"], _light: ["#F3F3F3", "#FDF4DF"] }, { base: 0.1, _light: 0.66 }),
|
|
@@ -694,24 +648,20 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
694
648
|
"border.successGlass": { value: glassEdgeWithLightGradient("#AEF3E5", "#96BFB9") },
|
|
695
649
|
"border.dangerGlass": { value: glassEdgeWithLightGradient("#DABBBB", "#A68181") },
|
|
696
650
|
"border.stepDoneGlass": {
|
|
697
|
-
value: themedGradient("to bottom", { base:
|
|
651
|
+
value: themedGradient("to bottom", { base: darkSuccessGreenEnds, _light: lightSuccessEdgeEnds }, { base: 0.6, _light: 0.33 }),
|
|
698
652
|
},
|
|
699
653
|
"border.currentStageGlass": { value: glassEdgeWithLightGradient("#EEDFBA", "#E8C674") },
|
|
700
|
-
// The edge of an attention block on its `bg.*Tint`: your move, ready and stuck.
|
|
701
654
|
"border.warningTint": {
|
|
702
655
|
value: themedGradient("to bottom", { base: ["#FFF1C9", "#A47D28"], _light: ["#DBCAA9", "#987C38"] }, { base: 0.15, _light: 0.33 }),
|
|
703
656
|
},
|
|
704
657
|
"border.successTint": {
|
|
705
|
-
value: themedGradient("to bottom", { base:
|
|
658
|
+
value: themedGradient("to bottom", { base: darkSuccessGreenEnds, _light: lightSuccessEdgeEnds }, { base: 0.15, _light: 0.33 }),
|
|
706
659
|
},
|
|
707
660
|
"border.errorTint": {
|
|
708
661
|
value: themedGradient("to bottom", { base: ["#FCC9C1", "#B24839"], _light: ["#C35151", "#8E3D3D"] }, { base: 0.15, _light: 0.33 }),
|
|
709
662
|
},
|
|
710
663
|
},
|
|
711
|
-
|
|
712
|
-
* The overlays' backdrop blur, by role: a popover or menu, a modal's glass shell and its
|
|
713
|
-
* sheet, a drawer's shell. Dark blurs a modal's shell; light blurs its sheet.
|
|
714
|
-
*/
|
|
664
|
+
// Dark blurs a modal's shell; light blurs its sheet.
|
|
715
665
|
blurs: {
|
|
716
666
|
popover: { value: { base: "64px", _light: "128px" } },
|
|
717
667
|
modalShell: { value: { base: "64px", _light: "8px" } },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withoutSpace } from '../helpers.mjs';
|
|
2
2
|
|
|
3
|
-
const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_wide,_notWide,_rail,_phone,_notPhone,
|
|
3
|
+
const conditionsStr = "_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_wide,_notWide,_rail,_phone,_notPhone,base"
|
|
4
4
|
const conditions = new Set(conditionsStr.split(','))
|
|
5
5
|
|
|
6
6
|
const conditionRegex = /^@|&|&$/
|