@crystal-ui/core 2.3.1 → 2.4.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.
Files changed (55) hide show
  1. package/README.md +82 -23
  2. package/assets/core/preferences.d.ts +4 -4
  3. package/assets/core/preferences.js +4 -4
  4. package/assets/core/presets.d.ts +4 -3
  5. package/assets/core/presets.js +24 -18
  6. package/assets/core/spring.js +9 -10
  7. package/assets/core/state.js +7 -7
  8. package/assets/crystal.css +783 -288
  9. package/assets/crystal.d.ts +3 -3
  10. package/assets/crystal.js +100 -123
  11. package/assets/icons/heading-2.svg +1 -0
  12. package/assets/icons/heading-3.svg +1 -0
  13. package/assets/icons/heading-4.svg +1 -0
  14. package/assets/icons/link.svg +1 -0
  15. package/assets/icons/list-ordered.svg +1 -0
  16. package/assets/icons/list.svg +1 -0
  17. package/assets/icons/manifest.json +81 -2
  18. package/assets/icons/quote.svg +1 -0
  19. package/assets/icons/redo.svg +1 -0
  20. package/assets/icons/subscript.svg +1 -0
  21. package/assets/icons/undo.svg +1 -0
  22. package/assets/icons/unlink.svg +1 -0
  23. package/assets/motion.js +13 -12
  24. package/docs/accessibility.md +50 -54
  25. package/docs/adoption.md +33 -19
  26. package/docs/catalogue.md +113 -108
  27. package/docs/colors.md +67 -73
  28. package/docs/components.md +142 -66
  29. package/docs/icons.md +9 -3
  30. package/docs/materials.md +129 -117
  31. package/docs/motion-components.md +15 -15
  32. package/docs/motion.md +156 -158
  33. package/docs/principles.md +12 -12
  34. package/docs/tokens.md +129 -130
  35. package/engines.js +3 -3
  36. package/package.json +11 -3
  37. package/tokens/catalogue/01-layout.json +1 -1
  38. package/tokens/catalogue/02-navigation.json +4 -4
  39. package/tokens/catalogue/03-actions.json +2 -1
  40. package/tokens/catalogue/04-inputs.json +30 -22
  41. package/tokens/catalogue/05-data-display.json +9 -14
  42. package/tokens/catalogue/06-feedback.json +8 -6
  43. package/tokens/catalogue/07-overlays.json +4 -4
  44. package/tokens/catalogue/08-typography.json +12 -8
  45. package/tokens/catalogue/09-utility.json +1 -1
  46. package/tokens/catalogue/10-charts.json +7 -7
  47. package/tokens/catalogue/11-media.json +33 -20
  48. package/tokens/catalogue/12-commerce.json +4 -4
  49. package/tokens/catalogue/13-screens.json +2 -3
  50. package/tokens/catalogue/14-blocks.json +3 -3
  51. package/tokens/catalogue.json +176 -116
  52. package/tokens/crystal.tokens.json +6 -6
  53. package/tokens/motion-recipes.json +6 -6
  54. package/tokens/surface-recipes.json +3452 -0
  55. package/tokens/surfaces.json +48 -17
@@ -1958,7 +1958,7 @@
1958
1958
  "seriesCount": {
1959
1959
  "$type": "number",
1960
1960
  "$value": 6,
1961
- "$description": "How many categorical series the palette can tell apart by colour. A seventh series repeats the first colour and must differ by another channel — a dash pattern, a fill pattern or a marker shape — because six hues is where perceptual separation runs out, not where charts do."
1961
+ "$description": "How many categorical series the palette can tell apart by colour. A seventh series repeats the first colour and must differ by another channel, such as a dash pattern, a fill pattern or a marker shape. Six hues is where perceptual separation runs out, and charts often need more."
1962
1962
  },
1963
1963
  "seriesLightness": {
1964
1964
  "light": {
@@ -1969,7 +1969,7 @@
1969
1969
  "dark": {
1970
1970
  "$type": "number",
1971
1971
  "$value": 0.72,
1972
- "$description": "The same, for dark mode. Higher than light, because the ground is dark and a mark must be lighter than it — but not as high as the ground allows. At 0.80 sRGB can no longer hold the chroma at the violet and blue hues, the colours there go pale, and the first series of a violet palette lands on the same colour as the palette's own action colour, which is a data mark that reads as a button."
1972
+ "$description": "The same, for dark mode. Higher than light, because the ground is dark and a mark must be lighter than it, but not as high as the ground allows. At 0.80 sRGB can no longer hold the chroma at the violet and blue hues, the colours there go pale, and the first series of a violet palette lands on the same colour as the palette's own action colour, which is a data mark that reads as a button."
1973
1973
  }
1974
1974
  },
1975
1975
  "seriesChroma": {
@@ -1985,7 +1985,7 @@
1985
1985
  "seriesContrast": {
1986
1986
  "$type": "number",
1987
1987
  "$value": 3,
1988
- "$description": "The floor every series colour clears against both the surface and the canvas of its mode. A data mark is a graphical object carrying information, so WCAG 1.4.11 applies to it and 3:1 is the bar. Where a hue cannot reach the floor at the stated lightness, its lightness moves until it does — the floor is not negotiable and the family resemblance is."
1988
+ "$description": "The floor every series colour clears against both the surface and the canvas of its mode. A data mark is a graphical object carrying information, so WCAG 1.4.11 applies to it and 3:1 is the bar. Where a hue cannot reach the floor at the stated lightness, its lightness moves until it does. The floor is fixed, and the family resemblance gives way."
1989
1989
  },
1990
1990
  "stroke": {
1991
1991
  "$type": "dimension",
@@ -1995,7 +1995,7 @@
1995
1995
  "hairline": {
1996
1996
  "$type": "dimension",
1997
1997
  "$value": "1px",
1998
- "$description": "The separation a chart draws in the surface colour rather than in ink — between pie segments, heatmap cells, treemap rectangles and map regions. It is a gap, not a border: it shows the ground through."
1998
+ "$description": "The separation a chart draws in the surface colour rather than in ink, between pie segments, heatmap cells, treemap rectangles and map regions. It is a gap that shows the ground through."
1999
1999
  },
2000
2000
  "pointMin": {
2001
2001
  "$type": "dimension",
@@ -2025,7 +2025,7 @@
2025
2025
  "fillOpacity": {
2026
2026
  "$type": "number",
2027
2027
  "$value": 0.25,
2028
- "$description": "Opacity of a fill whose job is to show extent without hiding what is behind it — the region under a line, the inside of a radar polygon. Low enough that two overlapping series are still two, and that the gridlines a reader measures against are still legible through both."
2028
+ "$description": "Opacity of a fill whose job is to show extent without hiding what is behind it, such as the region under a line or the inside of a radar polygon. Low enough that two overlapping series are still two, and that the gridlines a reader measures against are still legible through both."
2029
2029
  },
2030
2030
  "linkOpacity": {
2031
2031
  "$type": "number",
@@ -2035,7 +2035,7 @@
2035
2035
  "intensitySteps": {
2036
2036
  "$type": "number",
2037
2037
  "$value": 5,
2038
- "$description": "How many buckets an intensity scale has — a heatmap cell, a calendar day. Five, because a reader comparing cells is matching them to a key rather than reading a gradient, and a key with more entries than a hand has fingers is a key nobody uses."
2038
+ "$description": "How many buckets an intensity scale has, for a heatmap cell or a calendar day. Five, because a reader comparing cells is matching them to a key rather than reading a gradient, and a key with more entries than a hand has fingers is a key nobody uses."
2039
2039
  },
2040
2040
  "gaugeSweep": {
2041
2041
  "$type": "number",
@@ -2492,7 +2492,7 @@
2492
2492
  "offset": 1
2493
2493
  }
2494
2494
  ],
2495
- "use": "A loader, or an indeterminate progress ring, while an operation is genuinely pending — and only then. Starts when the work starts and stops when it resolves. One period for every continuous indicator, so two in one view never tick against each other.",
2495
+ "use": "A loader, or an indeterminate progress ring, only while an operation is genuinely pending. Starts when the work starts and stops when it resolves. One period for every continuous indicator, so two in one view never tick against each other.",
2496
2496
  "reduced": "Static: the whole track visible and nothing turning. Never a partial arc, which reports a measurement nobody took.",
2497
2497
  "material": "stone",
2498
2498
  "signature": "feather"
@@ -2569,7 +2569,7 @@
2569
2569
  "step": 24,
2570
2570
  "maxMarks": 24
2571
2571
  },
2572
- "use": "A data mark — a bar, a series, a segment — growing from its baseline when a chart first appears, and not when its data later changes. transform-origin is the baseline. Staggered by index up to 24 marks; past that every mark arrives together, because a sequence nobody can count is decoration.",
2572
+ "use": "A data mark (a bar, a series, a segment) growing from its baseline when a chart first appears, and not when its data later changes. transform-origin is the baseline. Staggered by index up to 24 marks; past that every mark arrives together, because a sequence nobody can count is decoration.",
2573
2573
  "reduced": "Marks appear in place at their values.",
2574
2574
  "material": "haze",
2575
2575
  "signature": "feather",
@@ -2596,10 +2596,10 @@
2596
2596
  }
2597
2597
  }
2598
2598
  ],
2599
- "travelPolicy": "5–30px ordinary, 50px guidance; justified large transitions may exceed it. Haze and Stone paint moves locally while text stays fixed.",
2599
+ "travelPolicy": "5 to 30px ordinary, 50px guidance; justified large transitions may exceed it. Haze and Stone paint moves locally while text stays fixed.",
2600
2600
  "springPolicy": "Every recipe carries a spring fitted to its authored duration, which remains the authority. Damping ratio is chosen by signature: inertia and coalesce overshoot because momentum is their material claim, feather and caustic do not because a soft edge that bounces is wrong. Disabling springs must reproduce the keyframes exactly.",
2601
- "continuousPolicy": "A continuous recipe is the one kind of motion that repeats, and it is not ambient: it reports work that is genuinely pending, runs only while that work is pending, and stops when it resolves. Nothing loops at rest. Every continuous recipe travels linearly at one period, motion.flow, so no two indicators in a view tick against each other, and none carries a spring, because a loop has no rest position to settle to. Reduced motion removes it and leaves the whole track or fill in place — never a partial segment, which would report a measurement nobody took.",
2602
- "staggerPolicy": "A recipe that animates many marks at once may declare a stagger: a step between consecutive marks and a ceiling on how many are staggered. Past the ceiling every mark arrives together. The whole staggered sequence stays within the recipe's duration ceiling, and a recipe that shows data declares overshoot never and is critically damped — a mark that overshoots its value has shown a number that is not true.",
2601
+ "continuousPolicy": "A continuous recipe is the one kind of motion that repeats, and it is not ambient: it reports work that is genuinely pending, runs only while that work is pending, and stops when it resolves. Nothing loops at rest. Every continuous recipe travels linearly at one period, motion.flow, so no two indicators in a view tick against each other, and none carries a spring, because a loop has no rest position to settle to. Reduced motion removes it and leaves the whole track or fill in place, never a partial segment, which would report a measurement nobody took.",
2602
+ "staggerPolicy": "A recipe that animates many marks at once may declare a stagger: a step between consecutive marks and a ceiling on how many are staggered. Past the ceiling every mark arrives together. The whole staggered sequence stays within the recipe's duration ceiling, and a recipe that shows data declares overshoot never and is critically damped. A mark that overshoots its value has shown a number that is not true.",
2603
2603
  "incompressibility": "Deformations conserve volume: every scale(sx, sy) satisfies sx*sy = 1 within 0.005. Corrected by dividing both axes by the square root of the area, which preserves each deformation's aspect ratio exactly and removes only the compressibility error. Enforced by tools/validate-motion.cjs.",
2604
- "ambientPolicy": "Ambient motion is what a surface does at rest. It is a capability tier, not a default: a platform declares support, and a surface opts in. Two rules are absolute. Ambient runs on the rim and the fill and never on a surface the user is reading, for the same reason Resin lenses at its edge rather than rippling through its middle. And it is the first motion that prefers-reduced-motion removes — WCAG 2.2.2 requires that anything moving for more than five seconds can be stopped, and an ambient loop never stops on its own. Where a platform cannot honour it, ambient degrades to a static surface with no other change."
2604
+ "ambientPolicy": "Ambient motion is what a surface does at rest. It is a capability tier: a platform declares support, and a surface opts in. Two rules are absolute. Ambient runs on the rim and the fill and never on a surface the user is reading, for the same reason Resin lenses at its edge rather than rippling through its middle. It is also the first motion that prefers-reduced-motion removes. WCAG 2.2.2 requires that anything moving for more than five seconds can be stopped, and an ambient loop never stops on its own. Where a platform cannot honour it, ambient degrades to a static surface with no other change."
2605
2605
  }