@crystal-ui/core 2.1.0 → 2.2.0
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/assets/crystal-theme.css +15 -0
- package/assets/crystal.css +300 -5
- package/assets/crystal.js +10 -0
- package/assets/motion.js +17 -2
- package/assets/tokens.js +1 -1
- package/docs/accessibility.md +9 -2
- package/docs/adoption.md +3 -1
- package/docs/catalogue.md +462 -31
- package/docs/components.md +26 -9
- package/docs/materials.md +12 -4
- package/docs/motion-components.md +11 -6
- package/docs/motion.md +10 -2
- package/docs/tokens.md +1 -1
- package/engines.js +13 -2
- package/exports/crystal-tokens.kt +1 -1
- package/exports/crystal-tokens.swift +1 -1
- package/exports/crystal-tokens.ts +1 -1
- package/package.json +2 -1
- package/tokens/catalogue/01-layout.json +45 -0
- package/tokens/catalogue/02-navigation.json +88 -1
- package/tokens/catalogue/03-actions.json +41 -0
- package/tokens/catalogue/04-inputs.json +366 -5
- package/tokens/catalogue/05-data-display.json +187 -1
- package/tokens/catalogue/06-feedback.json +78 -6
- package/tokens/catalogue/07-overlays.json +50 -3
- package/tokens/catalogue/08-typography.json +54 -0
- package/tokens/catalogue/09-utility.json +79 -0
- package/tokens/catalogue/10-charts.json +89 -1
- package/tokens/catalogue/11-media.json +33 -0
- package/tokens/catalogue/12-commerce.json +134 -1
- package/tokens/catalogue/13-screens.json +77 -0
- package/tokens/catalogue/14-blocks.json +101 -0
- package/tokens/catalogue.json +1646 -19
- package/tokens/crystal.json +1 -1
- package/tokens/crystal.tokens.json +2 -2
- package/tokens/motion-recipes.json +124 -0
- package/tokens/surfaces.json +167 -0
package/assets/crystal-theme.css
CHANGED
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
--cr-content-own-fill: rgba(230, 219, 252, 0.8);
|
|
53
53
|
--cr-content-feather: 1.95px;
|
|
54
54
|
--cr-haze-inset: 8px;
|
|
55
|
+
--cr-action-disabled-opacity: 0.55;
|
|
56
|
+
--cr-choice-box-size: 26px;
|
|
57
|
+
--cr-choice-box-radius: 9px;
|
|
58
|
+
--cr-switch-track-width: 44px;
|
|
59
|
+
--cr-switch-track-height: 28px;
|
|
55
60
|
--cr-chart-stroke: 2px;
|
|
56
61
|
--cr-chart-hairline: 1px;
|
|
57
62
|
--cr-chart-point-min: 6px;
|
|
@@ -231,6 +236,11 @@
|
|
|
231
236
|
--cr-content-own-fill: rgba(230, 219, 252, 0.8);
|
|
232
237
|
--cr-content-feather: 1.95px;
|
|
233
238
|
--cr-haze-inset: 8px;
|
|
239
|
+
--cr-action-disabled-opacity: 0.55;
|
|
240
|
+
--cr-choice-box-size: 26px;
|
|
241
|
+
--cr-choice-box-radius: 9px;
|
|
242
|
+
--cr-switch-track-width: 44px;
|
|
243
|
+
--cr-switch-track-height: 28px;
|
|
234
244
|
--cr-chart-stroke: 2px;
|
|
235
245
|
--cr-chart-hairline: 1px;
|
|
236
246
|
--cr-chart-point-min: 6px;
|
|
@@ -410,6 +420,11 @@
|
|
|
410
420
|
--cr-content-own-fill: rgba(51, 30, 101, 0.8);
|
|
411
421
|
--cr-content-feather: 1.95px;
|
|
412
422
|
--cr-haze-inset: 8px;
|
|
423
|
+
--cr-action-disabled-opacity: 0.55;
|
|
424
|
+
--cr-choice-box-size: 26px;
|
|
425
|
+
--cr-choice-box-radius: 9px;
|
|
426
|
+
--cr-switch-track-width: 44px;
|
|
427
|
+
--cr-switch-track-height: 28px;
|
|
413
428
|
--cr-chart-stroke: 2px;
|
|
414
429
|
--cr-chart-hairline: 1px;
|
|
415
430
|
--cr-chart-point-min: 6px;
|
package/assets/crystal.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
:is(.cr-frost,.cr-acrylic):before{content:'';position:absolute;inset:0;pointer-events:none;z-index:-1;border-radius:inherit;opacity:var(--cr-grain-opacity);background-image:url('grain.svg')}
|
|
24
24
|
:is(.cr-resin,.cr-glass){background:var(--cr-resin-fill);border-radius:999px;box-shadow:var(--cr-shadow-float);backdrop-filter:blur(var(--cr-resin-blur)) saturate(var(--cr-resin-saturation));-webkit-backdrop-filter:blur(var(--cr-resin-blur)) saturate(var(--cr-resin-saturation))}
|
|
25
25
|
.cr-well{background:var(--cr-surface);border-radius:calc(var(--cr-radius) - 7px);color:var(--cr-text);border:1px solid var(--cr-edge)}
|
|
26
|
-
.cr-button{min-height:
|
|
26
|
+
.cr-button{min-height:48px;padding:15px 24px;border-radius:999px;border:1px solid transparent;font-weight:750;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:9px;line-height:1.3}
|
|
27
27
|
.cr-button:hover{box-shadow:var(--cr-shadow-content);filter:brightness(1.04)}/* The button vocabulary is four names and none of them is a colour Crystal
|
|
28
28
|
does not have.
|
|
29
29
|
|
|
@@ -329,10 +329,12 @@
|
|
|
329
329
|
|
|
330
330
|
In `@layer crystal.component`, which is where the preview had it and where the
|
|
331
331
|
layer order at the top of this file already reserves a slot. That matters for
|
|
332
|
-
more than tidiness: the rules above
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
332
|
+
more than tidiness: the rules above sit in `crystal.reset`, an earlier layer,
|
|
333
|
+
so these win regardless of specificity — which is what let a reset-layer hover
|
|
334
|
+
(D-21) and a reset-layer target size (D-20) publish values that never
|
|
335
|
+
rendered. A component recipe belongs in this layer or nowhere. The cascade is
|
|
336
|
+
the one the preview has been rendering all along, which is what makes this an
|
|
337
|
+
adoption rather than a redesign.
|
|
336
338
|
--------------------------------------------------------------------------- */
|
|
337
339
|
@layer crystal.component {
|
|
338
340
|
:is(button,a.cr-button,.cr-control,.cr-field-shell,.cr-resin-haze,.cr-status) {
|
|
@@ -1167,3 +1169,296 @@ span.cr-status>span {
|
|
|
1167
1169
|
}
|
|
1168
1170
|
}
|
|
1169
1171
|
}
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
/* ---------------------------------------------------------------------------
|
|
1175
|
+
Component recipes for the catalogue — 28 September 2026.
|
|
1176
|
+
|
|
1177
|
+
`core/tokens/surfaces.json` names the closed set of material compositions a
|
|
1178
|
+
component may be made of, and every catalogue entry now says which it is.
|
|
1179
|
+
Most of the vocabulary was already here. Four compositions were not, and
|
|
1180
|
+
each was found the same way: Crystal React reached a component the catalogue
|
|
1181
|
+
specified, looked for the recipe, and rebuilt it locally with a comment
|
|
1182
|
+
saying Crystal had none. The R-19 sweep named them — a navigation link, a
|
|
1183
|
+
nav rail item, a drag handle, and the "bare" control that eighteen distinct
|
|
1184
|
+
controls and 127 instances had been approximating with `background:
|
|
1185
|
+
transparent`, which takes off one layer of the Resin coat and leaves four.
|
|
1186
|
+
|
|
1187
|
+
Each recipe is authored here, in `@layer crystal.component`, and nowhere
|
|
1188
|
+
else. Not in `crystal.reset`: D-20 and D-21 were both rules authored there
|
|
1189
|
+
that this layer erased, and a recipe that may not render is worse than none.
|
|
1190
|
+
|
|
1191
|
+
Everything reads tokens where a token exists and falls back to the literal
|
|
1192
|
+
the token publishes, so a stylesheet loaded without the generated theme
|
|
1193
|
+
still renders the same recipe.
|
|
1194
|
+
--------------------------------------------------------------------------- */
|
|
1195
|
+
@layer crystal.component {
|
|
1196
|
+
|
|
1197
|
+
/* A bare control.
|
|
1198
|
+
*
|
|
1199
|
+
* Selector note, which applies to the three recipes below: the coat is keyed on
|
|
1200
|
+
* `:is(button, a.cr-button, …)`, specificity (0,1,1), in this same layer. A lone
|
|
1201
|
+
* class is (0,1,0) and loses to it whatever the source order — measured, a
|
|
1202
|
+
* `<button class="cr-bare">` kept the fill, the rim and the blur. Each recipe
|
|
1203
|
+
* therefore carries the element compound and reaches (0,2,0). A rule that must
|
|
1204
|
+
* beat the coat and does not say so in its selector is D-20 by another route.
|
|
1205
|
+
*
|
|
1206
|
+
* Crystal paints the Resin coat by element — `:is(button, …)` above — so a
|
|
1207
|
+
* `<button>` wears the fill, the rim, the float shadow, the backdrop blur and
|
|
1208
|
+
* both feathered pseudo-layers whether or not anything asked. A control that
|
|
1209
|
+
* sits inside a surface which already has a coat must not wear a second one: a
|
|
1210
|
+
* disclosure chevron, a chip's remove button, a sort header, a stepper's arrows,
|
|
1211
|
+
* the dismiss button on a toast. Declaring `background: transparent` on one of
|
|
1212
|
+
* those takes off one layer of five. This takes off all five and keeps what a
|
|
1213
|
+
* control still owes — the 44px target, the pill hit area, the focus ring.
|
|
1214
|
+
*
|
|
1215
|
+
* It is not `.cr-button.quiet`. Quiet keeps the whole shell and drops only the
|
|
1216
|
+
* reading pad, which is what makes a quiet *button* quiet; a chevron is not a
|
|
1217
|
+
* Resin control that has been quietened.
|
|
1218
|
+
*/
|
|
1219
|
+
:is(button, a, [role=button], .cr-bare).cr-bare {
|
|
1220
|
+
display: inline-flex;
|
|
1221
|
+
align-items: center;
|
|
1222
|
+
justify-content: center;
|
|
1223
|
+
gap: 8px;
|
|
1224
|
+
min-inline-size: 44px;
|
|
1225
|
+
min-block-size: 44px;
|
|
1226
|
+
padding: 0 10px;
|
|
1227
|
+
border: 1px solid transparent;
|
|
1228
|
+
border-radius: 999px;
|
|
1229
|
+
background: transparent;
|
|
1230
|
+
color: inherit;
|
|
1231
|
+
backdrop-filter: none;
|
|
1232
|
+
-webkit-backdrop-filter: none;
|
|
1233
|
+
filter: none;
|
|
1234
|
+
font-weight: inherit;
|
|
1235
|
+
}
|
|
1236
|
+
.cr-bare::before,
|
|
1237
|
+
.cr-bare::after {
|
|
1238
|
+
content: none;
|
|
1239
|
+
display: none;
|
|
1240
|
+
}
|
|
1241
|
+
/* Resting state only: focus is a box-shadow recipe, and a blanket `none`
|
|
1242
|
+
would silently reduce it to a bare outline. */
|
|
1243
|
+
.cr-bare:not(:focus-visible) {
|
|
1244
|
+
box-shadow: none;
|
|
1245
|
+
}
|
|
1246
|
+
.cr-bare:hover:not(:disabled):not([aria-disabled=true]) {
|
|
1247
|
+
background: var(--cr-surface-alt);
|
|
1248
|
+
filter: none;
|
|
1249
|
+
}
|
|
1250
|
+
/* An on state without a reading pad has nothing to tint, so it takes the
|
|
1251
|
+
weight half of the selection rule and keeps the surface ink — the element
|
|
1252
|
+
rule above would otherwise leave on-primary ink on a transparent ground. */
|
|
1253
|
+
.cr-bare:is([aria-pressed=true],[aria-selected=true],[aria-checked=true]) {
|
|
1254
|
+
color: var(--cr-text);
|
|
1255
|
+
font-weight: 800;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/* A drag handle: a bare control with a grip and a lift while it is held.
|
|
1259
|
+
* Pointer capture, the keyboard alternative and drop validation are the
|
|
1260
|
+
* product's; the handle says only that it can be grabbed and when it has been. */
|
|
1261
|
+
:is(button, [role=button], .cr-drag-handle).cr-drag-handle {
|
|
1262
|
+
cursor: grab;
|
|
1263
|
+
touch-action: none;
|
|
1264
|
+
color: var(--cr-muted);
|
|
1265
|
+
padding: 12px 16px;
|
|
1266
|
+
background-image: radial-gradient(circle at center, currentColor 1.25px, transparent 1.75px);
|
|
1267
|
+
background-size: 6px 6px;
|
|
1268
|
+
background-repeat: repeat;
|
|
1269
|
+
background-position: center;
|
|
1270
|
+
background-clip: content-box;
|
|
1271
|
+
background-color: transparent;
|
|
1272
|
+
}
|
|
1273
|
+
.cr-drag-handle:hover:not([aria-disabled=true]) {
|
|
1274
|
+
color: var(--cr-text);
|
|
1275
|
+
}
|
|
1276
|
+
.cr-drag-handle:is([aria-grabbed=true],[data-dragging],[data-dragging=true]) {
|
|
1277
|
+
cursor: grabbing;
|
|
1278
|
+
color: var(--cr-text);
|
|
1279
|
+
background-color: var(--cr-surface);
|
|
1280
|
+
box-shadow: var(--cr-shadow-float);
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/* A navigation entry.
|
|
1284
|
+
*
|
|
1285
|
+
* `docs/components.md` names the documentation site's side menu as the
|
|
1286
|
+
* reference implementation of selection, and until now that recipe lived only
|
|
1287
|
+
* in the site's own stylesheet — the same shape as D-9, a specification only
|
|
1288
|
+
* one renderer could read. Lifted from `crystal-preview` `.menu-item` as it
|
|
1289
|
+
* renders: an entry is furniture on the panel beneath it, so it has no material
|
|
1290
|
+
* of its own and no Resin coat. Thirteen floating capsules in a sidebar would
|
|
1291
|
+
* be exactly the legibility noise the hierarchy exists to prevent. The pill
|
|
1292
|
+
* geometry stays, because "go here" is an action.
|
|
1293
|
+
*
|
|
1294
|
+
* Selection is label weight, 650 at rest and 800 when current. Nothing is drawn
|
|
1295
|
+
* beside the label. `.stacked` puts the icon above the label for a rail.
|
|
1296
|
+
*/
|
|
1297
|
+
:is(button, a, [role=link], .cr-nav-item).cr-nav-item {
|
|
1298
|
+
position: relative;
|
|
1299
|
+
display: inline-flex;
|
|
1300
|
+
align-items: center;
|
|
1301
|
+
justify-content: flex-start;
|
|
1302
|
+
gap: 10px;
|
|
1303
|
+
min-height: 44px;
|
|
1304
|
+
padding: 10px 14px;
|
|
1305
|
+
border: 1px solid transparent;
|
|
1306
|
+
border-radius: 999px;
|
|
1307
|
+
background: transparent;
|
|
1308
|
+
color: var(--cr-muted);
|
|
1309
|
+
font-size: 14px;
|
|
1310
|
+
font-weight: 650;
|
|
1311
|
+
line-height: 1.35;
|
|
1312
|
+
text-align: start;
|
|
1313
|
+
text-decoration: none;
|
|
1314
|
+
backdrop-filter: none;
|
|
1315
|
+
-webkit-backdrop-filter: none;
|
|
1316
|
+
filter: none;
|
|
1317
|
+
}
|
|
1318
|
+
.cr-nav-item::before,
|
|
1319
|
+
.cr-nav-item::after {
|
|
1320
|
+
content: none;
|
|
1321
|
+
display: none;
|
|
1322
|
+
}
|
|
1323
|
+
.cr-nav-item:not(:focus-visible) {
|
|
1324
|
+
box-shadow: none;
|
|
1325
|
+
}
|
|
1326
|
+
.cr-nav-item:hover:not([aria-disabled=true]) {
|
|
1327
|
+
background: var(--cr-surface-alt);
|
|
1328
|
+
color: var(--cr-text);
|
|
1329
|
+
filter: none;
|
|
1330
|
+
}
|
|
1331
|
+
.cr-nav-item:is([aria-current]:not([aria-current=false]),[aria-selected=true],[aria-pressed=true]) {
|
|
1332
|
+
background: var(--cr-surface-alt);
|
|
1333
|
+
color: var(--cr-text);
|
|
1334
|
+
font-weight: 800;
|
|
1335
|
+
}
|
|
1336
|
+
.cr-nav-item.stacked {
|
|
1337
|
+
flex-direction: column;
|
|
1338
|
+
justify-content: center;
|
|
1339
|
+
gap: 4px;
|
|
1340
|
+
min-width: 64px;
|
|
1341
|
+
padding: 8px 10px;
|
|
1342
|
+
font-size: 12px;
|
|
1343
|
+
line-height: 1.25;
|
|
1344
|
+
}
|
|
1345
|
+
.cr-nav-item svg {
|
|
1346
|
+
width: 24px;
|
|
1347
|
+
height: 24px;
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
/* A Resin panel: the Resin plane with the content radius instead of the pill,
|
|
1351
|
+
for a floating control plane that is a rectangle — a floating window, a wide
|
|
1352
|
+
media control bar. Fill, rim, blur and shadow are the plane's; only the
|
|
1353
|
+
geometry changes, and it matches the Frost panel's so nested radii line up. */
|
|
1354
|
+
:is(.cr-resin,.cr-glass).panel {
|
|
1355
|
+
border-radius: calc(var(--cr-radius) + 6px);
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
/* A switch is a checkbox with a track. Native `<input type=checkbox
|
|
1359
|
+
role=switch>`, styled by element like the checkbox and radio above: the
|
|
1360
|
+
track is the Resin box stretched to the published track size, the thumb is
|
|
1361
|
+
the opaque surface with the contact shadow, and the on state is the
|
|
1362
|
+
primary-soft pair. The thumb travels the difference between the two
|
|
1363
|
+
dimensions, so changing either token moves it correctly. */
|
|
1364
|
+
input[type=checkbox][role=switch] {
|
|
1365
|
+
width: var(--cr-switch-track-width, 44px);
|
|
1366
|
+
height: var(--cr-switch-track-height, 28px);
|
|
1367
|
+
border-radius: 999px;
|
|
1368
|
+
display: inline-block;
|
|
1369
|
+
position: relative;
|
|
1370
|
+
}
|
|
1371
|
+
input[type=checkbox][role=switch]::after {
|
|
1372
|
+
content: '';
|
|
1373
|
+
position: absolute;
|
|
1374
|
+
inset-block-start: 2px;
|
|
1375
|
+
inset-inline-start: 2px;
|
|
1376
|
+
width: calc(var(--cr-switch-track-height, 28px) - 6px);
|
|
1377
|
+
height: calc(var(--cr-switch-track-height, 28px) - 6px);
|
|
1378
|
+
border: 0;
|
|
1379
|
+
border-radius: 50%;
|
|
1380
|
+
background: var(--cr-surface);
|
|
1381
|
+
box-shadow: 0 2px 4px var(--cr-control-edge), 0 4px 8px var(--cr-shadow-contact);
|
|
1382
|
+
transition: translate var(--cr-state) var(--cr-ease-settle);
|
|
1383
|
+
}
|
|
1384
|
+
input[type=checkbox][role=switch]:checked {
|
|
1385
|
+
background: var(--cr-primary-soft);
|
|
1386
|
+
}
|
|
1387
|
+
input[type=checkbox][role=switch]:checked::after {
|
|
1388
|
+
content: '';
|
|
1389
|
+
width: calc(var(--cr-switch-track-height, 28px) - 6px);
|
|
1390
|
+
height: calc(var(--cr-switch-track-height, 28px) - 6px);
|
|
1391
|
+
background: var(--cr-primary);
|
|
1392
|
+
box-shadow: 0 2px 4px var(--cr-control-edge), 0 4px 8px var(--cr-shadow-contact);
|
|
1393
|
+
translate: calc(var(--cr-switch-track-width, 44px) - var(--cr-switch-track-height, 28px)) 0;
|
|
1394
|
+
}
|
|
1395
|
+
:root[dir=rtl] input[type=checkbox][role=switch]:checked::after {
|
|
1396
|
+
translate: calc(var(--cr-switch-track-height, 28px) - var(--cr-switch-track-width, 44px)) 0;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
/* The checkbox and radio read their geometry from the tokens that publish it,
|
|
1400
|
+
with the literal the token publishes as the fallback. Same rendering; one
|
|
1401
|
+
source. */
|
|
1402
|
+
input:is([type=checkbox],[type=radio]) {
|
|
1403
|
+
width: var(--cr-choice-box-size, 26px);
|
|
1404
|
+
height: var(--cr-choice-box-size, 26px);
|
|
1405
|
+
border-radius: var(--cr-choice-box-radius, 9px);
|
|
1406
|
+
}
|
|
1407
|
+
input[type=radio] {
|
|
1408
|
+
border-radius: 50%;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
/* Disabled. The reset layer dims a native `button:disabled` and nothing else,
|
|
1412
|
+
so an action link, a control span and a navigation entry had no disabled
|
|
1413
|
+
state at all. The opacity is the published token; a disabled element must
|
|
1414
|
+
still not be the only explanation of unavailability, and the product still
|
|
1415
|
+
has to refuse the action — this only shows that it will. */
|
|
1416
|
+
button:disabled,
|
|
1417
|
+
:is(a.cr-button,.cr-control,.cr-nav-item,.cr-bare,.cr-drag-handle)[aria-disabled=true] {
|
|
1418
|
+
opacity: var(--cr-action-disabled-opacity, .55);
|
|
1419
|
+
cursor: not-allowed;
|
|
1420
|
+
filter: none;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/* Controls inside a Resin plane lose their own backdrop filter — the rule above
|
|
1424
|
+
lists the action controls, and these are controls too. */
|
|
1425
|
+
:is(.cr-resin,.cr-glass,.cr-resin-haze) :is(.cr-bare,.cr-nav-item,.cr-drag-handle) {
|
|
1426
|
+
backdrop-filter: none;
|
|
1427
|
+
-webkit-backdrop-filter: none;
|
|
1428
|
+
isolation: isolate;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
@media (prefers-reduced-transparency:reduce) {
|
|
1432
|
+
.cr-drag-handle:is([aria-grabbed=true],[data-dragging],[data-dragging=true]) {
|
|
1433
|
+
background-color: var(--cr-surface);
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
@media (forced-colors:active) {
|
|
1438
|
+
/* The current entry is a ring, never a fill: Chromium paints an opaque Canvas
|
|
1439
|
+
backplate behind text runs, above the element's own background, so a filled
|
|
1440
|
+
row loses its label entirely. */
|
|
1441
|
+
.cr-nav-item:is([aria-current]:not([aria-current=false]),[aria-selected=true],[aria-pressed=true]) {
|
|
1442
|
+
background: Canvas;
|
|
1443
|
+
color: CanvasText;
|
|
1444
|
+
outline: 2px solid Highlight;
|
|
1445
|
+
outline-offset: -3px;
|
|
1446
|
+
}
|
|
1447
|
+
.cr-nav-item,
|
|
1448
|
+
.cr-bare {
|
|
1449
|
+
border-color: transparent;
|
|
1450
|
+
box-shadow: none;
|
|
1451
|
+
}
|
|
1452
|
+
.cr-drag-handle:is([aria-grabbed=true],[data-dragging],[data-dragging=true]) {
|
|
1453
|
+
background-color: Canvas;
|
|
1454
|
+
outline: 2px solid Highlight;
|
|
1455
|
+
outline-offset: -3px;
|
|
1456
|
+
box-shadow: none;
|
|
1457
|
+
}
|
|
1458
|
+
input[type=checkbox][role=switch] {
|
|
1459
|
+
appearance: auto;
|
|
1460
|
+
width: auto;
|
|
1461
|
+
height: auto;
|
|
1462
|
+
}
|
|
1463
|
+
}
|
|
1464
|
+
}
|
package/assets/crystal.js
CHANGED
|
@@ -81,6 +81,16 @@
|
|
|
81
81
|
exactly what Crystal React did on sixteen surfaces. A recipe that only
|
|
82
82
|
one renderer knows is not a specification. */
|
|
83
83
|
'--cr-haze-inset':data.component.haze.inset+'px',
|
|
84
|
+
/* Control geometry that `crystal.css` used to carry as literals — 26px
|
|
85
|
+
boxes, a 44×28 track, .55 for a disabled control — while the same
|
|
86
|
+
numbers were published as tokens a platform library reads. Two
|
|
87
|
+
statements of one value is the drift CONTRACT §1 forbids, so the
|
|
88
|
+
stylesheet now reads these and the literal is the fallback only. */
|
|
89
|
+
'--cr-action-disabled-opacity':String(data.component.action.disabledOpacity),
|
|
90
|
+
'--cr-choice-box-size':data.component.choice.boxSize+'px',
|
|
91
|
+
'--cr-choice-box-radius':data.component.choice.boxRadius+'px',
|
|
92
|
+
'--cr-switch-track-width':data.component.switch.trackWidth+'px',
|
|
93
|
+
'--cr-switch-track-height':data.component.switch.trackHeight+'px',
|
|
84
94
|
/* Chart geometry. A chart's colours vary with the palette and arrive with
|
|
85
95
|
the other roles above; these do not vary at all. They are published
|
|
86
96
|
rather than left to each renderer because the catalogue says "line
|
package/assets/motion.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/* Crystal material choreography.
|
|
1
|
+
/* Crystal material choreography. Every effect is cancellable, and every effect is finite
|
|
2
|
+
except a continuous indicator — activity-turn, activity-travel, skeleton-sweep — which
|
|
3
|
+
repeats while its work is pending and is stopped by the caller when the work resolves. */
|
|
2
4
|
(function(root){
|
|
3
5
|
'use strict';
|
|
4
6
|
const media=matchMedia('(prefers-reduced-motion: reduce)'),active=new Map();
|
|
@@ -53,8 +55,21 @@
|
|
|
53
55
|
element.dataset.crMotionSignature=recipe.signature||'measured-layout';
|
|
54
56
|
if(reduced()){element.dataset.crMotionState='instant';return Promise.resolve({status:'instant'});}
|
|
55
57
|
const opts={duration:duration(base,options.rate),engine,easing:recipe.signature==='inertia'?'cubic-bezier(0.16, 0.7, 0.2, 1)':recipe.signature==='coalesce'?'cubic-bezier(0.34, 0.08, 0.24, 1)':'cubic-bezier(0.22, 0.65, 0.22, 1)'};
|
|
58
|
+
/* A continuous recipe travels at constant speed and repeats until stop() — the
|
|
59
|
+
returned promise settles only when it is cancelled, which is the caller's to do
|
|
60
|
+
the moment the pending work resolves. */
|
|
61
|
+
if(recipe.loop){opts.easing=recipe.easing||'linear';opts.repeat=Infinity;}
|
|
62
|
+
/* A staggered mark waits its turn: `index` is its position and `count` how many
|
|
63
|
+
marks arrive together. Past the recipe's ceiling every mark arrives at once, so
|
|
64
|
+
a stagger never needs a count nobody can see; without a count there is no
|
|
65
|
+
stagger, because a mark cannot know it is the last. */
|
|
66
|
+
if(recipe.stagger&&Number.isInteger(options.index)&&Number.isInteger(options.count)&&options.count<=recipe.stagger.maxMarks)
|
|
67
|
+
opts.delay=duration(options.index*recipe.stagger.step,options.rate);
|
|
56
68
|
const animations=[CrystalEngines.frames(element,frames,opts)];
|
|
57
|
-
|
|
69
|
+
/* The optical layers are finite decoration on a transition. On a loop they would
|
|
70
|
+
repeat with it, and a feathered edge that ripples for as long as something is
|
|
71
|
+
loading is ambient motion by another route. */
|
|
72
|
+
if(!recipe.loop)opticalLayers(element,recipe,opts,animations);
|
|
58
73
|
active.set(element,animations);element.dataset.crMotionState='running';
|
|
59
74
|
return Promise.all(animations.map(animation=>animation.finished.then(()=>true,error=>{if(error.name!=='AbortError')throw error;return false;}))).then(results=>{
|
|
60
75
|
const status=results.every(Boolean)?'finished':'cancelled';
|
package/assets/tokens.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.CRYSTAL_TOKENS = {"version":"2.0.0","name":"Crystal","basis":"crystal-03-balanced; Meridian Digital design system","default":{"palette":"prism","mode":"light","atmosphere":90,"translucency":35,"elevation":125,"radius":28,"density":"comfortable","reduced":false,"font":"manrope","reduceMotion":false,"motionSpeed":1},"palettes":{"prism":{"name":"Prism","description":"Electric violet, orchid light. The shared signature.","seed":"#7338EF","companion":"#EF48C6","glow":"#52BDF3","modes":{"light":{"canvas":"#f9f6fe","surface":"#ffffff","surfaceAlt":"#f2edfe","text":"#171130","muted":"#402e76","primary":"#7338EF","onPrimary":"#ffffff","primarySoft":"#e6dbfc","onPrimarySoft":"#2b195a","outline":"#624a9f","decorative":"#7338EF","companion":"#EF48C6","glow":"#52BDF3","chartSeries1":"#9D45B2","chartSeries2":"#C43444","chartSeries3":"#956800","chartSeries4":"#298800","chartSeries5":"#008287","chartSeries6":"#286CD8","chartHeat1":"#EFEEFD","chartOnHeat1":"#171130","chartHeat2":"#D6D3F9","chartOnHeat2":"#171130","chartHeat3":"#BEB7F4","chartOnHeat3":"#171130","chartHeat4":"#A79CEE","chartOnHeat4":"#171130","chartHeat5":"#9280E7","chartOnHeat5":"#171130","chartAxis":"#624a9f","chartGrid":"rgba(23, 17, 48, 0.12)"},"dark":{"canvas":"#120d26","surface":"#1d1730","surfaceAlt":"#332756","text":"#f7f3fe","muted":"#dbcbfb","primary":"#c8b1f9","onPrimary":"#16102e","primarySoft":"#331e65","onPrimarySoft":"#ebe3fd","outline":"#bfa3f8","decorative":"#7e48f0","companion":"#EF48C6","glow":"#52BDF3","chartSeries1":"#D57BEA","chartSeries2":"#FF7077","chartSeries3":"#D59800","chartSeries4":"#60BE48","chartSeries5":"#00BBC2","chartSeries6":"#6CA4FF","chartHeat1":"#1B1929","chartOnHeat1":"#f7f3fe","chartHeat2":"#292443","chartOnHeat2":"#f7f3fe","chartHeat3":"#372E60","chartOnHeat3":"#f7f3fe","chartHeat4":"#46387D","chartOnHeat4":"#f7f3fe","chartHeat5":"#56429C","chartOnHeat5":"#f7f3fe","chartAxis":"#bfa3f8","chartGrid":"rgba(247, 243, 254, 0.16)"}}},"fuchsia":{"name":"Fuchsia","description":"Confident magenta for creative products.","seed":"#C01993","companion":"#7C4DFF","glow":"#FF96DA","modes":{"light":{"canvas":"#fcf5fa","surface":"#ffffff","surfaceAlt":"#f9eaf5","text":"#210d25","muted":"#5b2356","primary":"#C01993","onPrimary":"#ffffff","primarySoft":"#f4d6ec","onPrimarySoft":"#440f3d","outline":"#813e7a","decorative":"#C01993","companion":"#7C4DFF","glow":"#FF96DA","chartSeries1":"#C33353","chartSeries2":"#9B6400","chartSeries3":"#4B8300","chartSeries4":"#008380","chartSeries5":"#0071D0","chartSeries6":"#9549BB","chartHeat1":"#FAEBF4","chartOnHeat1":"#210d25","chartHeat2":"#F2CBE1","chartOnHeat2":"#210d25","chartHeat3":"#E8ABCF","chartOnHeat3":"#210d25","chartHeat4":"#DC8ABD","chartOnHeat4":"#210d25","chartHeat5":"#CF69AB","chartOnHeat5":"#210d25","chartAxis":"#813e7a","chartGrid":"rgba(33, 13, 37, 0.12)"},"dark":{"canvas":"#190a1e","surface":"#241427","surfaceAlt":"#422144","text":"#fbf1f9","muted":"#efc3e3","primary":"#e6a5d5","onPrimary":"#1f0d23","primarySoft":"#4e1344","onPrimarySoft":"#f6dff0","outline":"#e295cd","decorative":"#c52b9c","companion":"#7C4DFF","glow":"#FF96DA","chartSeries1":"#FF6D85","chartSeries2":"#DE9200","chartSeries3":"#76BB32","chartSeries4":"#00BCB9","chartSeries5":"#5AA8FF","chartSeries6":"#CB7EF4","chartHeat1":"#26161F","chartOnHeat1":"#fbf1f9","chartHeat2":"#3C1D31","chartOnHeat2":"#fbf1f9","chartHeat3":"#542343","chartOnHeat3":"#fbf1f9","chartHeat4":"#6D2856","chartOnHeat4":"#fbf1f9","chartHeat5":"#862D6A","chartOnHeat5":"#fbf1f9","chartAxis":"#e295cd","chartGrid":"rgba(251, 241, 249, 0.16)"}}},"cobalt":{"name":"Cobalt","description":"Clear blue with a violet undertone.","seed":"#2758E8","companion":"#6D47F2","glow":"#48C6F0","modes":{"light":{"canvas":"#f5f7fe","surface":"#ffffff","surfaceAlt":"#ecf0fd","text":"#0d1530","muted":"#263974","primary":"#2758E8","onPrimary":"#ffffff","primarySoft":"#d8e1fb","onPrimarySoft":"#132458","outline":"#44579c","decorative":"#2758E8","companion":"#6D47F2","glow":"#48C6F0","chartSeries1":"#7C54CD","chartSeries2":"#BC3577","chartSeries3":"#AD5700","chartSeries4":"#707900","chartSeries5":"#00856E","chartSeries6":"#007BAC","chartHeat1":"#EAF0FE","chartOnHeat1":"#0d1530","chartHeat2":"#C7D8FC","chartOnHeat2":"#0d1530","chartHeat3":"#A5C0F8","chartOnHeat3":"#0d1530","chartHeat4":"#84A7F3","chartOnHeat4":"#0d1530","chartHeat5":"#648EED","chartOnHeat5":"#0d1530","chartAxis":"#44579c","chartGrid":"rgba(13, 21, 48, 0.12)"},"dark":{"canvas":"#0b1025","surface":"#151a30","surfaceAlt":"#252d55","text":"#f2f5fe","muted":"#c7d4f9","primary":"#abbef6","onPrimary":"#0d142d","primarySoft":"#182962","onPrimarySoft":"#e1e8fc","outline":"#9cb2f4","decorative":"#3865ea","companion":"#6D47F2","glow":"#48C6F0","chartSeries1":"#AD8DFF","chartSeries2":"#F86DAA","chartSeries3":"#F78000","chartSeries4":"#A3AF00","chartSeries5":"#00C09F","chartSeries6":"#00B2F6","chartHeat1":"#151C2A","chartOnHeat1":"#f2f5fe","chartHeat2":"#1B2846","chartOnHeat2":"#f2f5fe","chartHeat3":"#213563","chartOnHeat3":"#f2f5fe","chartHeat4":"#274282","chartOnHeat4":"#f2f5fe","chartHeat5":"#2E4FA2","chartOnHeat5":"#f2f5fe","chartAxis":"#9cb2f4","chartGrid":"rgba(242, 245, 254, 0.16)"}}},"ion":{"name":"Ion","description":"Vivid cyan and indigo for focused tools.","seed":"#007E97","companion":"#3D45E5","glow":"#36DCD1","modes":{"light":{"canvas":"#f4f9fa","surface":"#ffffff","surfaceAlt":"#e8f3f6","text":"#081a25","muted":"#184757","primary":"#007E97","onPrimary":"#ffffff","primarySoft":"#d1e8ec","onPrimarySoft":"#06303e","outline":"#34667c","decorative":"#007E97","companion":"#3D45E5","glow":"#36DCD1","chartSeries1":"#0075C4","chartSeries2":"#8F4CC0","chartSeries3":"#C2335D","chartSeries4":"#9F6200","chartSeries5":"#588000","chartSeries6":"#00837C","chartHeat1":"#E2F4F9","chartOnHeat1":"#081a25","chartHeat2":"#B2E1EF","chartOnHeat2":"#081a25","chartHeat3":"#7ECEE5","chartOnHeat3":"#081a25","chartHeat4":"#38BADA","chartOnHeat4":"#081a25","chartHeat5":"#00A3C3","chartOnHeat5":"#081a25","chartAxis":"#34667c","chartGrid":"rgba(8, 26, 37, 0.12)"},"dark":{"canvas":"#07141e","surface":"#111e27","surfaceAlt":"#1d3445","text":"#f0f7f9","muted":"#bddde4","primary":"#9ccdd6","onPrimary":"#081924","primarySoft":"#0a3646","onPrimarySoft":"#dbedf0","outline":"#8ac4cf","decorative":"#14889f","companion":"#3D45E5","glow":"#36DCD1","chartSeries1":"#4AAAFF","chartSeries2":"#C481FA","chartSeries3":"#FE6C8F","chartSeries4":"#E48E00","chartSeries5":"#83B81E","chartSeries6":"#00BDB3","chartHeat1":"#091F25","chartOnHeat1":"#f0f7f9","chartHeat2":"#002F3B","chartOnHeat2":"#f0f7f9","chartHeat3":"#003F4D","chartOnHeat3":"#f0f7f9","chartHeat4":"#004F60","chartOnHeat4":"#f0f7f9","chartHeat5":"#006073","chartOnHeat5":"#f0f7f9","chartAxis":"#8ac4cf","chartGrid":"rgba(240, 247, 249, 0.16)"}}},"amethyst":{"name":"Amethyst","description":"Rich purple with a warm luminous edge.","seed":"#8430C6","companion":"#CE49B2","glow":"#9198FF","modes":{"light":{"canvas":"#f9f6fc","surface":"#ffffff","surfaceAlt":"#f4ecfa","text":"#19102b","muted":"#462b68","primary":"#8430C6","onPrimary":"#ffffff","primarySoft":"#e9daf5","onPrimarySoft":"#30174d","outline":"#69478f","decorative":"#8430C6","companion":"#CE49B2","glow":"#9198FF","chartSeries1":"#AD3D9A","chartSeries2":"#C43B15","chartSeries3":"#867000","chartSeries4":"#00884D","chartSeries5":"#007F95","chartSeries6":"#5761D8","chartHeat1":"#F3EDFB","chartOnHeat1":"#19102b","chartHeat2":"#E0D0F4","chartOnHeat2":"#19102b","chartHeat3":"#CDB3ED","chartOnHeat3":"#19102b","chartHeat4":"#BA95E4","chartOnHeat4":"#19102b","chartHeat5":"#A878DB","chartOnHeat5":"#19102b","chartAxis":"#69478f","chartGrid":"rgba(25, 16, 43, 0.12)"},"dark":{"canvas":"#130d22","surface":"#1e162c","surfaceAlt":"#36254e","text":"#f8f3fc","muted":"#dfc9f0","primary":"#cfaee9","onPrimary":"#180f29","primarySoft":"#391b56","onPrimarySoft":"#eee2f7","outline":"#c6a0e5","decorative":"#8e41cb","companion":"#CE49B2","glow":"#9198FF","chartSeries1":"#E773D0","chartSeries2":"#FF7452","chartSeries3":"#C2A200","chartSeries4":"#00C471","chartSeries5":"#00B8D6","chartSeries6":"#8B9BFF","chartHeat1":"#1F1827","chartOnHeat1":"#f8f3fc","chartHeat2":"#302140","chartOnHeat2":"#f8f3fc","chartHeat3":"#422A5A","chartOnHeat3":"#f8f3fc","chartHeat4":"#543375","chartOnHeat4":"#f8f3fc","chartHeat5":"#683B92","chartOnHeat5":"#f8f3fc","chartAxis":"#c6a0e5","chartGrid":"rgba(248, 243, 252, 0.16)"}}},"harbor":{"name":"Harbor","description":"The original palette, mapped to shared roles.","seed":"#4669B2","companion":"#8970B5","glow":"#72C4DF","modes":{"light":{"canvas":"#faf8fe","surface":"#ffffff","surfaceAlt":"#e7e7f1","text":"#30323a","muted":"#5c5f68","primary":"#4b5e8b","onPrimary":"#f9f8ff","primarySoft":"#b8cbff","onPrimarySoft":"#2f436e","outline":"#787a84","decorative":"#4669B2","companion":"#8970B5","glow":"#72C4DF","chartSeries1":"#7955CF","chartSeries2":"#BB367A","chartSeries3":"#AE5600","chartSeries4":"#727800","chartSeries5":"#00856C","chartSeries6":"#007BAA","chartHeat1":"#E9F0FE","chartOnHeat1":"#30323a","chartHeat2":"#B3C5E7","chartOnHeat2":"#30323a","chartHeat3":"#7F9AD0","chartOnHeat3":"#30323a","chartHeat4":"#4E70B7","chartOnHeat4":"#f9f8ff","chartHeat5":"#1F459D","chartOnHeat5":"#f9f8ff","chartAxis":"#787a84","chartGrid":"rgba(48, 50, 58, 0.12)"},"dark":{"canvas":"#0d0e12","surface":"#111318","surfaceAlt":"#1d1f26","text":"#e4e5f0","muted":"#a9aab5","primary":"#b8c6ee","onPrimary":"#314060","primarySoft":"#445274","onPrimarySoft":"#dae3ff","outline":"#73757f","decorative":"#4669B2","companion":"#8970B5","glow":"#72C4DF","contentOwnSurface":"#283c60","chartSeries1":"#AA8EFF","chartSeries2":"#F76EAD","chartSeries3":"#F87E08","chartSeries4":"#A5AE00","chartSeries5":"#00C09D","chartSeries6":"#00B2F3","chartHeat1":"#141C2A","chartOnHeat1":"#e4e5f0","chartHeat2":"#1A2845","chartOnHeat2":"#e4e5f0","chartHeat3":"#203563","chartOnHeat3":"#e4e5f0","chartHeat4":"#254282","chartOnHeat4":"#e4e5f0","chartHeat5":"#2A50A2","chartOnHeat5":"#e4e5f0","chartAxis":"#73757f","chartGrid":"rgba(228, 229, 240, 0.16)"}}}},"status":{"light":{"success":{"ink":"#175D38","surface":"#E5F4EA","symbol":"✓","label":"Ready"},"attention":{"ink":"#714B00","surface":"#FFF0CD","symbol":"△","label":"Review needed"},"danger":{"ink":"#941D36","surface":"#FFE8EC","symbol":"!","label":"Action blocked"},"info":{"ink":"#334155","surface":"#E8EDF4","symbol":"i","label":"Information"}},"dark":{"success":{"ink":"#9BE2B3","surface":"#173525","symbol":"✓","label":"Ready"},"attention":{"ink":"#FFDA8A","surface":"#3D2D0E","symbol":"△","label":"Review needed"},"danger":{"ink":"#FFB2C0","surface":"#481C29","symbol":"!","label":"Action blocked"},"info":{"ink":"#D2DCEC","surface":"#263244","symbol":"i","label":"Information"}}},"material":{"acrylicBlur":40,"acrylicSaturation":125,"glassBlur":20,"glassSaturation":165,"glassOpacity":0.2,"grainOpacity":0.045,"labelVeil":0.55,"labelVeilDark":0.6,"contentOpacity":0.8,"contentFeather":1.95,"stoneFeather":1.95,"mirageColor":"#111525","mirageOpacity":0.38,"mirageBlur":28,"mirageSaturation":165,"mirageBrightness":88,"mirageFallbackOpacity":0.64,"micaInactive":{"light":"#f1f1f3","dark":"#202126"}},"motion":{"press":120,"state":213.33,"spatial":293.33,"exit":160,"easing":{"enter":"cubic-bezier(0.22, 0.65, 0.22, 1)","settle":"cubic-bezier(0.2, 0, 0.2, 1)","exit":"cubic-bezier(0.4, 0, 0.6, 1)"},"distance":{"panel":24,"floating":30,"content":0,"exit":20,"depth":50,"feather":6},"material":1000,"liquid":1400,"flow":1200,"departure":650,"maxDuration":5000,"maxTravel":50,"travelPolicy":{"ordinaryRange":[5,30],"compactGuideline":50,"extended":"Documented large compositions and measured layout may exceed 50px.","stationaryMaterials":["haze","stone"]}},"typography":{"readingSize":16,"readingLeading":24,"family":"Manrope","scale":{"display":{"ratio":2,"leading":1.1,"tracking":"-0.055em"},"title":{"ratio":1.5,"leading":1.2,"tracking":"-0.04em"},"heading":{"ratio":1.25,"leading":1.3,"tracking":"-0.03em"},"subheading":{"ratio":1.0625,"leading":1.45,"tracking":"-0.01em"},"body":{"ratio":1,"leading":1.5,"tracking":"0"},"caption":{"ratio":0.8125,"leading":1.45,"tracking":"0"}}},"component":{"action":{"radius":999,"minTarget":44,"paddingBlock":15,"paddingInline":24,"gap":9,"disabledOpacity":0.55},"scrollbar":{"width":10,"thumbMinLength":32,"inset":2},"scrollArea":{"fadeDepth":24},"layout":{"containerMax":1536,"readingMax":920,"gutterCompact":18,"gutterBase":26,"gutterWide":44,"minCellWidth":240,"sidebarWidth":280},"icon":{"size":20,"action":24},"choice":{"boxSize":26,"boxRadius":9},"switch":{"trackWidth":44,"trackHeight":28},"slider":{"trackHeight":8,"thumbSize":26},"chip":{"height":32},"overlayArrow":{"size":14,"radius":3},"overlay":{"maxWidth":480,"tooltipMaxWidth":352},"field":{"wellInset":7},"card":{"radius":28},"focus":{"coreWidth":2,"coreOffset":3},"indicator":{"size":20,"fieldSize":24,"lineWidth":3},"anchor":{"underlineOffset":4},"tree":{"indentStep":20},"haze":{"inset":8},"chart":{"seriesCount":6,"seriesLightness":{"light":0.55,"dark":0.72},"seriesChroma":0.18,"seriesHueOffset":30,"seriesContrast":3,"stroke":2,"hairline":1,"pointMin":6,"pointMax":18,"barRadius":4,"cellGap":2,"ringThickness":0.32,"fillOpacity":0.25,"linkOpacity":0.45,"intensitySteps":5,"gaugeSweep":270},"progress":{"ringStroke":8}},"spacing":{"2xs":4,"xs":8,"sm":12,"md":16,"lg":24,"xl":32,"2xl":48},"schemaNote":"Generated from core/tokens/crystal.tokens.json (W3C DTCG). Edit the DTCG source, not this file.","materials":{"plastic":{"name":"Plastic","role":"Opaque contextual foundation","inspiration":"Microsoft Mica","primitive":".cr-plastic"},"frost":{"name":"Frost","role":"Diffused intermediate surface","inspiration":"Microsoft Acrylic","primitive":".cr-frost"},"resin":{"name":"Resin","role":"Floating optical control surface","inspiration":"Apple Liquid Glass","primitive":".cr-resin"},"haze":{"name":"Haze","role":"Soft content fill","inspiration":"Crystal solid content recipe","primitive":".cr-haze"},"stone":{"name":"Stone","role":"Protected label backing","inspiration":"Crystal protected-label veil","primitive":".cr-stone"},"mirage":{"name":"Mirage","role":"Chromatic diffusion and dark modal separation","inspiration":"Modal smoke/scrim pattern","primitive":".cr-mirage and dialog::backdrop"}}};
|
|
1
|
+
window.CRYSTAL_TOKENS = {"version":"2.0.0","name":"Crystal","basis":"crystal-03-balanced; Meridian Digital design system","default":{"palette":"prism","mode":"light","atmosphere":90,"translucency":35,"elevation":125,"radius":28,"density":"comfortable","reduced":false,"font":"manrope","reduceMotion":false,"motionSpeed":1},"palettes":{"prism":{"name":"Prism","description":"Electric violet, orchid light. The shared signature.","seed":"#7338EF","companion":"#EF48C6","glow":"#52BDF3","modes":{"light":{"canvas":"#f9f6fe","surface":"#ffffff","surfaceAlt":"#f2edfe","text":"#171130","muted":"#402e76","primary":"#7338EF","onPrimary":"#ffffff","primarySoft":"#e6dbfc","onPrimarySoft":"#2b195a","outline":"#624a9f","decorative":"#7338EF","companion":"#EF48C6","glow":"#52BDF3","chartSeries1":"#9D45B2","chartSeries2":"#C43444","chartSeries3":"#956800","chartSeries4":"#298800","chartSeries5":"#008287","chartSeries6":"#286CD8","chartHeat1":"#EFEEFD","chartOnHeat1":"#171130","chartHeat2":"#D6D3F9","chartOnHeat2":"#171130","chartHeat3":"#BEB7F4","chartOnHeat3":"#171130","chartHeat4":"#A79CEE","chartOnHeat4":"#171130","chartHeat5":"#9280E7","chartOnHeat5":"#171130","chartAxis":"#624a9f","chartGrid":"rgba(23, 17, 48, 0.12)"},"dark":{"canvas":"#120d26","surface":"#1d1730","surfaceAlt":"#332756","text":"#f7f3fe","muted":"#dbcbfb","primary":"#c8b1f9","onPrimary":"#16102e","primarySoft":"#331e65","onPrimarySoft":"#ebe3fd","outline":"#bfa3f8","decorative":"#7e48f0","companion":"#EF48C6","glow":"#52BDF3","chartSeries1":"#D57BEA","chartSeries2":"#FF7077","chartSeries3":"#D59800","chartSeries4":"#60BE48","chartSeries5":"#00BBC2","chartSeries6":"#6CA4FF","chartHeat1":"#1B1929","chartOnHeat1":"#f7f3fe","chartHeat2":"#292443","chartOnHeat2":"#f7f3fe","chartHeat3":"#372E60","chartOnHeat3":"#f7f3fe","chartHeat4":"#46387D","chartOnHeat4":"#f7f3fe","chartHeat5":"#56429C","chartOnHeat5":"#f7f3fe","chartAxis":"#bfa3f8","chartGrid":"rgba(247, 243, 254, 0.16)"}}},"fuchsia":{"name":"Fuchsia","description":"Confident magenta for creative products.","seed":"#C01993","companion":"#7C4DFF","glow":"#FF96DA","modes":{"light":{"canvas":"#fcf5fa","surface":"#ffffff","surfaceAlt":"#f9eaf5","text":"#210d25","muted":"#5b2356","primary":"#C01993","onPrimary":"#ffffff","primarySoft":"#f4d6ec","onPrimarySoft":"#440f3d","outline":"#813e7a","decorative":"#C01993","companion":"#7C4DFF","glow":"#FF96DA","chartSeries1":"#C33353","chartSeries2":"#9B6400","chartSeries3":"#4B8300","chartSeries4":"#008380","chartSeries5":"#0071D0","chartSeries6":"#9549BB","chartHeat1":"#FAEBF4","chartOnHeat1":"#210d25","chartHeat2":"#F2CBE1","chartOnHeat2":"#210d25","chartHeat3":"#E8ABCF","chartOnHeat3":"#210d25","chartHeat4":"#DC8ABD","chartOnHeat4":"#210d25","chartHeat5":"#CF69AB","chartOnHeat5":"#210d25","chartAxis":"#813e7a","chartGrid":"rgba(33, 13, 37, 0.12)"},"dark":{"canvas":"#190a1e","surface":"#241427","surfaceAlt":"#422144","text":"#fbf1f9","muted":"#efc3e3","primary":"#e6a5d5","onPrimary":"#1f0d23","primarySoft":"#4e1344","onPrimarySoft":"#f6dff0","outline":"#e295cd","decorative":"#c52b9c","companion":"#7C4DFF","glow":"#FF96DA","chartSeries1":"#FF6D85","chartSeries2":"#DE9200","chartSeries3":"#76BB32","chartSeries4":"#00BCB9","chartSeries5":"#5AA8FF","chartSeries6":"#CB7EF4","chartHeat1":"#26161F","chartOnHeat1":"#fbf1f9","chartHeat2":"#3C1D31","chartOnHeat2":"#fbf1f9","chartHeat3":"#542343","chartOnHeat3":"#fbf1f9","chartHeat4":"#6D2856","chartOnHeat4":"#fbf1f9","chartHeat5":"#862D6A","chartOnHeat5":"#fbf1f9","chartAxis":"#e295cd","chartGrid":"rgba(251, 241, 249, 0.16)"}}},"cobalt":{"name":"Cobalt","description":"Clear blue with a violet undertone.","seed":"#2758E8","companion":"#6D47F2","glow":"#48C6F0","modes":{"light":{"canvas":"#f5f7fe","surface":"#ffffff","surfaceAlt":"#ecf0fd","text":"#0d1530","muted":"#263974","primary":"#2758E8","onPrimary":"#ffffff","primarySoft":"#d8e1fb","onPrimarySoft":"#132458","outline":"#44579c","decorative":"#2758E8","companion":"#6D47F2","glow":"#48C6F0","chartSeries1":"#7C54CD","chartSeries2":"#BC3577","chartSeries3":"#AD5700","chartSeries4":"#707900","chartSeries5":"#00856E","chartSeries6":"#007BAC","chartHeat1":"#EAF0FE","chartOnHeat1":"#0d1530","chartHeat2":"#C7D8FC","chartOnHeat2":"#0d1530","chartHeat3":"#A5C0F8","chartOnHeat3":"#0d1530","chartHeat4":"#84A7F3","chartOnHeat4":"#0d1530","chartHeat5":"#648EED","chartOnHeat5":"#0d1530","chartAxis":"#44579c","chartGrid":"rgba(13, 21, 48, 0.12)"},"dark":{"canvas":"#0b1025","surface":"#151a30","surfaceAlt":"#252d55","text":"#f2f5fe","muted":"#c7d4f9","primary":"#abbef6","onPrimary":"#0d142d","primarySoft":"#182962","onPrimarySoft":"#e1e8fc","outline":"#9cb2f4","decorative":"#3865ea","companion":"#6D47F2","glow":"#48C6F0","chartSeries1":"#AD8DFF","chartSeries2":"#F86DAA","chartSeries3":"#F78000","chartSeries4":"#A3AF00","chartSeries5":"#00C09F","chartSeries6":"#00B2F6","chartHeat1":"#151C2A","chartOnHeat1":"#f2f5fe","chartHeat2":"#1B2846","chartOnHeat2":"#f2f5fe","chartHeat3":"#213563","chartOnHeat3":"#f2f5fe","chartHeat4":"#274282","chartOnHeat4":"#f2f5fe","chartHeat5":"#2E4FA2","chartOnHeat5":"#f2f5fe","chartAxis":"#9cb2f4","chartGrid":"rgba(242, 245, 254, 0.16)"}}},"ion":{"name":"Ion","description":"Vivid cyan and indigo for focused tools.","seed":"#007E97","companion":"#3D45E5","glow":"#36DCD1","modes":{"light":{"canvas":"#f4f9fa","surface":"#ffffff","surfaceAlt":"#e8f3f6","text":"#081a25","muted":"#184757","primary":"#007E97","onPrimary":"#ffffff","primarySoft":"#d1e8ec","onPrimarySoft":"#06303e","outline":"#34667c","decorative":"#007E97","companion":"#3D45E5","glow":"#36DCD1","chartSeries1":"#0075C4","chartSeries2":"#8F4CC0","chartSeries3":"#C2335D","chartSeries4":"#9F6200","chartSeries5":"#588000","chartSeries6":"#00837C","chartHeat1":"#E2F4F9","chartOnHeat1":"#081a25","chartHeat2":"#B2E1EF","chartOnHeat2":"#081a25","chartHeat3":"#7ECEE5","chartOnHeat3":"#081a25","chartHeat4":"#38BADA","chartOnHeat4":"#081a25","chartHeat5":"#00A3C3","chartOnHeat5":"#081a25","chartAxis":"#34667c","chartGrid":"rgba(8, 26, 37, 0.12)"},"dark":{"canvas":"#07141e","surface":"#111e27","surfaceAlt":"#1d3445","text":"#f0f7f9","muted":"#bddde4","primary":"#9ccdd6","onPrimary":"#081924","primarySoft":"#0a3646","onPrimarySoft":"#dbedf0","outline":"#8ac4cf","decorative":"#14889f","companion":"#3D45E5","glow":"#36DCD1","chartSeries1":"#4AAAFF","chartSeries2":"#C481FA","chartSeries3":"#FE6C8F","chartSeries4":"#E48E00","chartSeries5":"#83B81E","chartSeries6":"#00BDB3","chartHeat1":"#091F25","chartOnHeat1":"#f0f7f9","chartHeat2":"#002F3B","chartOnHeat2":"#f0f7f9","chartHeat3":"#003F4D","chartOnHeat3":"#f0f7f9","chartHeat4":"#004F60","chartOnHeat4":"#f0f7f9","chartHeat5":"#006073","chartOnHeat5":"#f0f7f9","chartAxis":"#8ac4cf","chartGrid":"rgba(240, 247, 249, 0.16)"}}},"amethyst":{"name":"Amethyst","description":"Rich purple with a warm luminous edge.","seed":"#8430C6","companion":"#CE49B2","glow":"#9198FF","modes":{"light":{"canvas":"#f9f6fc","surface":"#ffffff","surfaceAlt":"#f4ecfa","text":"#19102b","muted":"#462b68","primary":"#8430C6","onPrimary":"#ffffff","primarySoft":"#e9daf5","onPrimarySoft":"#30174d","outline":"#69478f","decorative":"#8430C6","companion":"#CE49B2","glow":"#9198FF","chartSeries1":"#AD3D9A","chartSeries2":"#C43B15","chartSeries3":"#867000","chartSeries4":"#00884D","chartSeries5":"#007F95","chartSeries6":"#5761D8","chartHeat1":"#F3EDFB","chartOnHeat1":"#19102b","chartHeat2":"#E0D0F4","chartOnHeat2":"#19102b","chartHeat3":"#CDB3ED","chartOnHeat3":"#19102b","chartHeat4":"#BA95E4","chartOnHeat4":"#19102b","chartHeat5":"#A878DB","chartOnHeat5":"#19102b","chartAxis":"#69478f","chartGrid":"rgba(25, 16, 43, 0.12)"},"dark":{"canvas":"#130d22","surface":"#1e162c","surfaceAlt":"#36254e","text":"#f8f3fc","muted":"#dfc9f0","primary":"#cfaee9","onPrimary":"#180f29","primarySoft":"#391b56","onPrimarySoft":"#eee2f7","outline":"#c6a0e5","decorative":"#8e41cb","companion":"#CE49B2","glow":"#9198FF","chartSeries1":"#E773D0","chartSeries2":"#FF7452","chartSeries3":"#C2A200","chartSeries4":"#00C471","chartSeries5":"#00B8D6","chartSeries6":"#8B9BFF","chartHeat1":"#1F1827","chartOnHeat1":"#f8f3fc","chartHeat2":"#302140","chartOnHeat2":"#f8f3fc","chartHeat3":"#422A5A","chartOnHeat3":"#f8f3fc","chartHeat4":"#543375","chartOnHeat4":"#f8f3fc","chartHeat5":"#683B92","chartOnHeat5":"#f8f3fc","chartAxis":"#c6a0e5","chartGrid":"rgba(248, 243, 252, 0.16)"}}},"harbor":{"name":"Harbor","description":"The original palette, mapped to shared roles.","seed":"#4669B2","companion":"#8970B5","glow":"#72C4DF","modes":{"light":{"canvas":"#faf8fe","surface":"#ffffff","surfaceAlt":"#e7e7f1","text":"#30323a","muted":"#5c5f68","primary":"#4b5e8b","onPrimary":"#f9f8ff","primarySoft":"#b8cbff","onPrimarySoft":"#2f436e","outline":"#787a84","decorative":"#4669B2","companion":"#8970B5","glow":"#72C4DF","chartSeries1":"#7955CF","chartSeries2":"#BB367A","chartSeries3":"#AE5600","chartSeries4":"#727800","chartSeries5":"#00856C","chartSeries6":"#007BAA","chartHeat1":"#E9F0FE","chartOnHeat1":"#30323a","chartHeat2":"#B3C5E7","chartOnHeat2":"#30323a","chartHeat3":"#7F9AD0","chartOnHeat3":"#30323a","chartHeat4":"#4E70B7","chartOnHeat4":"#f9f8ff","chartHeat5":"#1F459D","chartOnHeat5":"#f9f8ff","chartAxis":"#787a84","chartGrid":"rgba(48, 50, 58, 0.12)"},"dark":{"canvas":"#0d0e12","surface":"#111318","surfaceAlt":"#1d1f26","text":"#e4e5f0","muted":"#a9aab5","primary":"#b8c6ee","onPrimary":"#314060","primarySoft":"#445274","onPrimarySoft":"#dae3ff","outline":"#73757f","decorative":"#4669B2","companion":"#8970B5","glow":"#72C4DF","contentOwnSurface":"#283c60","chartSeries1":"#AA8EFF","chartSeries2":"#F76EAD","chartSeries3":"#F87E08","chartSeries4":"#A5AE00","chartSeries5":"#00C09D","chartSeries6":"#00B2F3","chartHeat1":"#141C2A","chartOnHeat1":"#e4e5f0","chartHeat2":"#1A2845","chartOnHeat2":"#e4e5f0","chartHeat3":"#203563","chartOnHeat3":"#e4e5f0","chartHeat4":"#254282","chartOnHeat4":"#e4e5f0","chartHeat5":"#2A50A2","chartOnHeat5":"#e4e5f0","chartAxis":"#73757f","chartGrid":"rgba(228, 229, 240, 0.16)"}}}},"status":{"light":{"success":{"ink":"#175D38","surface":"#E5F4EA","symbol":"✓","label":"Ready"},"attention":{"ink":"#714B00","surface":"#FFF0CD","symbol":"△","label":"Review needed"},"danger":{"ink":"#941D36","surface":"#FFE8EC","symbol":"!","label":"Action blocked"},"info":{"ink":"#334155","surface":"#E8EDF4","symbol":"i","label":"Information"}},"dark":{"success":{"ink":"#9BE2B3","surface":"#173525","symbol":"✓","label":"Ready"},"attention":{"ink":"#FFDA8A","surface":"#3D2D0E","symbol":"△","label":"Review needed"},"danger":{"ink":"#FFB2C0","surface":"#481C29","symbol":"!","label":"Action blocked"},"info":{"ink":"#D2DCEC","surface":"#263244","symbol":"i","label":"Information"}}},"material":{"acrylicBlur":40,"acrylicSaturation":125,"glassBlur":20,"glassSaturation":165,"glassOpacity":0.2,"grainOpacity":0.045,"labelVeil":0.55,"labelVeilDark":0.6,"contentOpacity":0.8,"contentFeather":1.95,"stoneFeather":1.95,"mirageColor":"#111525","mirageOpacity":0.38,"mirageBlur":28,"mirageSaturation":165,"mirageBrightness":88,"mirageFallbackOpacity":0.64,"micaInactive":{"light":"#f1f1f3","dark":"#202126"}},"motion":{"press":120,"state":213.33,"spatial":293.33,"exit":160,"easing":{"enter":"cubic-bezier(0.22, 0.65, 0.22, 1)","settle":"cubic-bezier(0.2, 0, 0.2, 1)","exit":"cubic-bezier(0.4, 0, 0.6, 1)"},"distance":{"panel":24,"floating":30,"content":0,"exit":20,"depth":50,"feather":6},"material":1000,"liquid":1400,"flow":1200,"departure":650,"maxDuration":5000,"maxTravel":50,"travelPolicy":{"ordinaryRange":[5,30],"compactGuideline":50,"extended":"Documented large compositions and measured layout may exceed 50px.","stationaryMaterials":["haze","stone"]}},"typography":{"readingSize":16,"readingLeading":24,"family":"Manrope","scale":{"display":{"ratio":2,"leading":1.1,"tracking":"-0.055em"},"title":{"ratio":1.5,"leading":1.2,"tracking":"-0.04em"},"heading":{"ratio":1.25,"leading":1.3,"tracking":"-0.03em"},"subheading":{"ratio":1.0625,"leading":1.45,"tracking":"-0.01em"},"body":{"ratio":1,"leading":1.5,"tracking":"0"},"caption":{"ratio":0.8125,"leading":1.45,"tracking":"0"}}},"component":{"action":{"radius":999,"minTarget":48,"paddingBlock":15,"paddingInline":24,"gap":9,"disabledOpacity":0.55},"scrollbar":{"width":10,"thumbMinLength":32,"inset":2},"scrollArea":{"fadeDepth":24},"layout":{"containerMax":1536,"readingMax":920,"gutterCompact":18,"gutterBase":26,"gutterWide":44,"minCellWidth":240,"sidebarWidth":280},"icon":{"size":20,"action":24},"choice":{"boxSize":26,"boxRadius":9},"switch":{"trackWidth":44,"trackHeight":28},"slider":{"trackHeight":8,"thumbSize":26},"chip":{"height":32},"overlayArrow":{"size":14,"radius":3},"overlay":{"maxWidth":480,"tooltipMaxWidth":352},"field":{"wellInset":7},"card":{"radius":28},"focus":{"coreWidth":2,"coreOffset":3},"indicator":{"size":20,"fieldSize":24,"lineWidth":3},"anchor":{"underlineOffset":4},"tree":{"indentStep":20},"haze":{"inset":8},"chart":{"seriesCount":6,"seriesLightness":{"light":0.55,"dark":0.72},"seriesChroma":0.18,"seriesHueOffset":30,"seriesContrast":3,"stroke":2,"hairline":1,"pointMin":6,"pointMax":18,"barRadius":4,"cellGap":2,"ringThickness":0.32,"fillOpacity":0.25,"linkOpacity":0.45,"intensitySteps":5,"gaugeSweep":270},"progress":{"ringStroke":8}},"spacing":{"2xs":4,"xs":8,"sm":12,"md":16,"lg":24,"xl":32,"2xl":48},"schemaNote":"Generated from core/tokens/crystal.tokens.json (W3C DTCG). Edit the DTCG source, not this file.","materials":{"plastic":{"name":"Plastic","role":"Opaque contextual foundation","inspiration":"Microsoft Mica","primitive":".cr-plastic"},"frost":{"name":"Frost","role":"Diffused intermediate surface","inspiration":"Microsoft Acrylic","primitive":".cr-frost"},"resin":{"name":"Resin","role":"Floating optical control surface","inspiration":"Apple Liquid Glass","primitive":".cr-resin"},"haze":{"name":"Haze","role":"Soft content fill","inspiration":"Crystal solid content recipe","primitive":".cr-haze"},"stone":{"name":"Stone","role":"Protected label backing","inspiration":"Crystal protected-label veil","primitive":".cr-stone"},"mirage":{"name":"Mirage","role":"Chromatic diffusion and dark modal separation","inspiration":"Modal smoke/scrim pattern","primitive":".cr-mirage and dialog::backdrop"}}};
|
package/docs/accessibility.md
CHANGED
|
@@ -83,7 +83,7 @@ this rule came from are in
|
|
|
83
83
|
|
|
84
84
|
## Reduced motion
|
|
85
85
|
|
|
86
|
-
`prefers-reduced-motion: reduce` is honoured by every one of the
|
|
86
|
+
`prefers-reduced-motion: reduce` is honoured by every one of the 61 motion recipes. Each
|
|
87
87
|
recipe declares its own `reduced` behaviour rather than being globally switched off,
|
|
88
88
|
because "no animation" and "no *movement*" are different requirements.
|
|
89
89
|
|
|
@@ -93,6 +93,13 @@ shows it has been pressed. What is removed is the travel, the overshoot and the
|
|
|
93
93
|
layer. Reduced motion resolves to zero displacement regardless of the recipe's spring —
|
|
94
94
|
this is asserted by `tools/validate-motion.cjs`, not left to each implementation.
|
|
95
95
|
|
|
96
|
+
The three continuous indicators are the one place this reads differently, because what they
|
|
97
|
+
report is not a change but a state that lasts: work that is pending. Under reduced motion the
|
|
98
|
+
movement goes and the whole track or fill stays, static — never a segment frozen part of the way
|
|
99
|
+
along, which would report a measurement nobody took — and the text beside the indicator still
|
|
100
|
+
says what is loading. With or without reduced motion, a continuous indicator stops when the work
|
|
101
|
+
resolves; none of them repeats at rest.
|
|
102
|
+
|
|
96
103
|
## Reduced transparency
|
|
97
104
|
|
|
98
105
|
`prefers-reduced-transparency: reduce` sets `data-effects="opaque"`, which replaces every
|
|
@@ -161,7 +168,7 @@ backdrops with the fixed Resin fill.
|
|
|
161
168
|
| Failures | 0 |
|
|
162
169
|
| Lowest result of any kind | 3.07:1 |
|
|
163
170
|
| Lowest normal-text result | 4.67:1 |
|
|
164
|
-
| Checks run | 2026-09-
|
|
171
|
+
| Checks run | 2026-09-28 |
|
|
165
172
|
|
|
166
173
|
Normal text is held to 4.5:1. Essential non-text — focus rings, control boundaries,
|
|
167
174
|
indicator lines — uses its separate 3:1 threshold, which is the correct standard for those
|
package/docs/adoption.md
CHANGED
|
@@ -36,7 +36,9 @@ The site uses relative local assets without fetching fonts or services. Review i
|
|
|
36
36
|
|
|
37
37
|
Copy `assets/crystal.css`, `assets/fonts/`, `assets/grain.svg`, and the theme CSS into the product. Preserve the primitive stylesheet’s relative asset paths. Load theme CSS before primitive CSS. The reference-site CSS/JS are not needed by a product.
|
|
38
38
|
|
|
39
|
-
`assets/crystal.css` carries the Resin interaction surface, the components built on it — `.cr-control`, `.cr-field-shell`, `.cr-indicator`, `.cr-resin-haze` and `.cr-tag` — the dock, the table and its scroller, and every native form control: checkbox, radio, range, file button, select option and menu item. Before 2.1.0 it carried none of
|
|
39
|
+
`assets/crystal.css` carries the Resin interaction surface, the components built on it — `.cr-control`, `.cr-field-shell`, `.cr-indicator`, `.cr-resin-haze` and `.cr-tag` — the dock, the table and its scroller, and every native form control: checkbox, radio, switch, range, file button, select option and menu item. As of 2.2.0 it also carries the four recipes the catalogue needed and no consumer could obtain: `.cr-nav-item` (a navigation entry, selected by label weight), `.cr-bare` (a control with no Resin coat, for controls inside a surface that already has one), `.cr-drag-handle`, and `.cr-resin.panel` (the Resin plane with the content radius). Before 2.1.0 it carried none of the control surface, and this page told you to copy a second stylesheet, `assets/controls.css`, that the package has never contained. There is no second stylesheet to copy.
|
|
40
|
+
|
|
41
|
+
Every component in the catalogue names the surface it is made of, from the closed vocabulary in `tokens/surfaces.json` (exported as `@crystal-ui/core/surfaces`). A library implements each surface once — as a class, a mixin or a native view — and every component made of it inherits the implementation. The catalogue chapter lists the vocabulary with the `crystal.css` recipe behind each entry.
|
|
40
42
|
|
|
41
43
|
```html
|
|
42
44
|
<link rel="stylesheet" href="crystal-theme.css">
|