@crystal-ui/core 2.6.0 → 2.8.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.css +305 -1
- package/docs/catalogue.md +6 -6
- package/docs/components.md +22 -1
- package/package.json +1 -1
- package/tokens/catalogue.json +32 -12
- package/tokens/surface-recipes.json +1349 -60
- package/tokens/surfaces.json +15 -11
package/tokens/surfaces.json
CHANGED
|
@@ -14,24 +14,24 @@
|
|
|
14
14
|
"name": "Frost panel",
|
|
15
15
|
"materials": ["Frost"],
|
|
16
16
|
"class": ".cr-frost",
|
|
17
|
-
"use": "Intermediate task frames and every transient surface that opens over content: side panels, drawers, sheets and app bars, and menus, popovers, tooltips and toasts (R15e). Reading content inside it sits on Haze. `.cr-frost.bar` is a transient overlay shaped as a row of controls, a pill with 4px padding: the selection toolbar over highlighted text.",
|
|
18
|
-
"also": [".cr-frost.bar"]
|
|
17
|
+
"use": "Intermediate task frames and every transient surface that opens over content: side panels, drawers, sheets and app bars, and menus, popovers, tooltips and toasts (R15e). Reading content inside it sits on Haze. `.cr-frost.bar` is a transient overlay shaped as a row of controls, a pill with 4px padding: the selection toolbar over highlighted text. `.pane` takes the content radius, for a pane beside content: a navigation rail, a filter panel, a workspace pane. `.flat` drops the grain. `.docked` is a pane docked to the window's edges, with no rim, radius or shadow: an app bar, a sidebar. `.sheet` slides over content from an edge, with the `--cr-edge` rim, the content radius and the float shadow: a drawer. `.reading` holds a Haze reading fill on `::after`, inset by `--cr-frost-reading-inset` (default `--cr-haze-inset`): a toast, a popover. `.flat` composes with `.pane`, `.docked` and `.sheet` (2.7.0).",
|
|
18
|
+
"also": [".cr-frost.bar", ".cr-frost.pane", ".cr-frost.flat", ".cr-frost.docked", ".cr-frost.sheet", ".cr-frost.reading"]
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"id": "haze",
|
|
22
22
|
"name": "Haze reading surface",
|
|
23
23
|
"materials": ["Haze"],
|
|
24
24
|
"class": ".cr-haze",
|
|
25
|
-
"use": "Anything read: cards, rows, panels, wells, forms, messages, decisions. 80% fill, 1.95px feather on an isolated paint layer, crisp foreground. `.cr-well` is the same recipe recessed into a Frost or Resin frame. `.cr-haze.overlay` is the recessed overlay: a transient overlay opened inside a pane that is already lifted, drawn as a flat Haze fill with the `--cr-edge` rim and the content shadow, so it can be told from the pane it sits in.",
|
|
26
|
-
"also": [".cr-haze.overlay"]
|
|
25
|
+
"use": "Anything read: cards, rows, panels, wells, forms, messages, decisions. 80% fill, 1.95px feather on an isolated paint layer, crisp foreground. `.cr-well` is the same recipe recessed into a Frost or Resin frame. `.cr-haze.overlay` is the recessed overlay: a transient overlay opened inside a pane that is already lifted, drawn as a flat Haze fill with the `--cr-edge` rim and the content shadow, so it can be told from the pane it sits in. `.inset` is a reading card with no border box, its fill inset by `--cr-haze-inset` and no shadow under it: an alert, a result, a product card. `.flush` is the same card filled to its own edge: a thumbnail, a slide, a chart node. `.flat` is the fill on the element itself, with no feather and no layer: a list or accordion row. `.flat.sunken` falls back to the alternate surface instead of the surface: a placeholder. `.raised` gives the fill the float shadow: a command palette (2.7.0).",
|
|
26
|
+
"also": [".cr-haze.overlay", ".cr-haze.inset", ".cr-haze.flush", ".cr-haze.flat", ".cr-haze.flat.sunken", ".cr-haze.raised"]
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
"id": "resin",
|
|
30
30
|
"name": "Resin plane",
|
|
31
31
|
"materials": ["Resin"],
|
|
32
32
|
"class": ".cr-resin",
|
|
33
|
-
"use": "One floating Resin plane with no reading fill of its own, pill-shaped unless it is a panel: a player's transport bar, a pinned element, a Resin handle over imagery or between regions. Controls inside it lose their own backdrop filter, because Resin never contains Resin. A plane whose controls are labels to be read holds a Haze fill as well, and is a dock. `.cr-resin.transport` is the media transport: the pill with 4px block and 12px inline padding around its 48px controls (58px tall with its rim), with tabular time readouts, wrapping to a second row in a player narrower than 420px. `.cr-media` is the stage it sits on (the content radius, the letterbox, `--cr-media-aspect` and `--cr-media-fit`), and `.cr-media-bar` is the region inset 12px, or the safe area in full screen, that holds the transport.",
|
|
34
|
-
"also": [".cr-resin.transport"]
|
|
33
|
+
"use": "One floating Resin plane with no reading fill of its own, pill-shaped unless it is a panel: a player's transport bar, a pinned element, a Resin handle over imagery or between regions. Controls inside it lose their own backdrop filter, because Resin never contains Resin. A plane whose controls are labels to be read holds a Haze fill as well, and is a dock. `.cr-resin.transport` is the media transport: the pill with 4px block and 12px inline padding around its 48px controls (58px tall with its rim), with tabular time readouts, wrapping to a second row in a player narrower than 420px. `.cr-media` is the stage it sits on (the content radius, the letterbox, `--cr-media-aspect` and `--cr-media-fit`), and `.cr-media-bar` is the region inset 12px, or the safe area in full screen, that holds the transport. `.flat` drops the sheen layers, for a plane that is a mark rather than a control: a step or timeline marker. `.divider` is the handle between resizable regions: the Resin fill and blur only, with no rim, shadow or sheen, falling back to the outline colour (2.7.0).",
|
|
34
|
+
"also": [".cr-resin.transport", ".cr-resin.flat", ".cr-resin.divider"]
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
"id": "resin-panel",
|
|
@@ -58,9 +58,10 @@
|
|
|
58
58
|
"name": "Field shell",
|
|
59
59
|
"materials": ["Resin", "Haze"],
|
|
60
60
|
"class": ".cr-field-shell",
|
|
61
|
-
"use": "The Resin surround of a native text entry, with the Haze well the value is read on and the circular field-state badge. The native control keeps its functional boundary and semantics. `.cr-editor` is the editable surface inside a rich text field: the shared prose vocabulary (headings, lists, checklists, marks, insertions and deletions) with the primary caret and a 28% primary selection, distinct from the primary-soft highlight (D-34). `.cr-editor-toolbar` is its toolbar, above the text on a fine pointer and below it, clear of the touch keyboard, on a coarse one.",
|
|
62
|
-
"also": [".cr-editor"],
|
|
61
|
+
"use": "The Resin surround of a native text entry, with the Haze well the value is read on and the circular field-state badge. The native control keeps its functional boundary and semantics. `.cr-editor` is the editable surface inside a rich text field: the shared prose vocabulary (headings, lists, checklists, marks, insertions and deletions) with the primary caret and a 28% primary selection, distinct from the primary-soft highlight (D-34). `.cr-editor-toolbar` is its toolbar, above the text on a fine pointer and below it, clear of the touch keyboard, on a coarse one. `.block` is the shell as a block that fills its row, for a field laid out in a form (2.7.0).",
|
|
62
|
+
"also": [".cr-editor", ".cr-field-shell.block"],
|
|
63
63
|
"partial": {
|
|
64
|
+
".cr-field-shell.block": "The shell's display only: worn with `.cr-field-shell`, which carries the coat.",
|
|
64
65
|
".cr-editor": "A part: the document inside the field shell, which carries the Resin surround and the Haze well."
|
|
65
66
|
}
|
|
66
67
|
},
|
|
@@ -96,7 +97,7 @@
|
|
|
96
97
|
"materials": ["Mirage"],
|
|
97
98
|
"class": ".cr-mirage",
|
|
98
99
|
"also": [".cr-dialog::backdrop"],
|
|
99
|
-
"use": "The chromatic diffusion of the real scene behind a modal. Never a content surface; the decision surface above it is Haze."
|
|
100
|
+
"use": "The chromatic diffusion of the real scene behind a modal. Never a content surface; the decision surface above it is Haze. The opaque setting draws it as the flat fallback fill, as reduced transparency does (2.7.0)."
|
|
100
101
|
},
|
|
101
102
|
{
|
|
102
103
|
"id": "dialog",
|
|
@@ -186,9 +187,12 @@
|
|
|
186
187
|
"name": "Selection control",
|
|
187
188
|
"materials": ["Resin"],
|
|
188
189
|
"class": "input:is([type=checkbox],[type=radio])",
|
|
189
|
-
"also": ["input[type=checkbox][role=switch]", "input[type=range]"],
|
|
190
|
-
"use": "Native checkbox, radio, switch and range, styled by element: a Resin box, circle or track with a contained mark, and the marked glass thumb. Semantics stay native.",
|
|
190
|
+
"also": ["input[type=checkbox][role=switch]", "input[type=range]", ".cr-choice", ".cr-choice.radio", ".cr-choice.outline"],
|
|
191
|
+
"use": "Native checkbox, radio, switch and range, styled by element: a Resin box, circle or track with a contained mark, and the marked glass thumb. Semantics stay native. `.cr-choice` is the same box on any element, for a library that keeps the input visually hidden and draws the box itself (2.8.0); `.radio` is the circle, and a switch's track is the box at the track's size with the pill radius. The mark and the selected colour are the component's. `.cr-choice.outline` is the outlined box: the `--cr-outline` boundary, the plain Resin fill and a single inset rim (2.8.0). In opaque mode and under reduced transparency the box, native or not, becomes the surface with no backdrop (2.8.0).",
|
|
191
192
|
"partial": {
|
|
193
|
+
".cr-choice": "The box alone: the mark inside it and the colour of a selected box are drawn by the component that wears it.",
|
|
194
|
+
".cr-choice.radio": "The box alone, round: the dot inside it is the component's.",
|
|
195
|
+
".cr-choice.outline": "The box alone: the mark inside it and the colour of a selected box are drawn by the component that wears it.",
|
|
192
196
|
"input[type=range]": "A track and a thumb, painted on the slider's pseudo-elements (`::-webkit-slider-runnable-track`, `::-webkit-slider-thumb` and their `::-moz-range-` forms), which this record does not read."
|
|
193
197
|
}
|
|
194
198
|
},
|