@crystal-ui/core 2.5.0 → 2.7.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  [Open the live component studies](../motion.html#component-motion) · [Search all recipes](../motion.html#recipe-library) · [Run browser contracts](../motion-contracts.html)
4
4
 
5
- Crystal ships 59 executable component recipes in nine families, the six material signatures, Mirage withdrawal, a modal dismissal, and a measured-layout helper. Three of the recipes are continuous indicators of pending work. This is the animation foundation for future component libraries. The demonstration includes real local component behavior, but is not an audited production React, Rust or native component library. No remote operation is represented as implemented.
5
+ Crystal ships 60 executable component recipes in nine families, the six material signatures, Mirage withdrawal, a modal dismissal, a measured-layout helper, and the travelling selection pill, which plays `selection-travel` between measured segments. Three of the recipes are continuous indicators of pending work. This is the animation foundation for future component libraries. The demonstration includes real local component behavior, but is not an audited production React, Rust or native component library. No remote operation is represented as implemented.
6
6
 
7
7
  ## Engine responsibilities
8
8
 
@@ -38,7 +38,8 @@ The same formula applies to display labels, tags, badges and keyboard caps. Use
38
38
  | Slider, stepper, numeric output | `slider-step` | Native keyboard range interaction and current value |
39
39
  | Input, textarea, validation group | `field-focus`, `field-invalid`, `field-valid`, `hint-in/out` | Real validation, associated error text, `aria-invalid` |
40
40
  | Copy action, confirmation mark | `copy-confirm`, `success` | Play only after the actual action succeeds |
41
- | Tab, navigation rail, bottom navigation | `selection`, `tab-in` | Selected semantics, roving tab stop, panel visibility |
41
+ | Tab, navigation rail, bottom navigation | `selection`, `tab-in`; on a strip, `selection-travel` through `travel()` | Selected semantics, roving tab stop, panel visibility |
42
+ | Segmented control, dock, toggle button group | `selection-travel` through `travel()` | Selected semantics first; selection stays label weight, so the pill is never the only sign of it |
42
43
  | Page/view, wizard step, breadcrumb, pagination | `page-in/out`, `breadcrumb` | Router/history and focus managed by the host |
43
44
  | Dialog / alert dialog | Haze + Mirage + `dismiss` | Native modality, initial focus, Escape, focus return |
44
45
  | Drawer / inspector / sheet | `drawer-in/out` + Mirage | Native modality or an explicitly nonmodal panel contract |
@@ -73,6 +74,7 @@ Base times below are at 1×; the preview resolves the saved speed at playback. E
73
74
  | `press` | resin / pressure | Motion | 320ms | Buttons, icon buttons and segmented controls. Disabled controls never animate. |
74
75
  | `hover` | resin / caustic | Motion | 700ms | Fine-pointer affordance only; keyboard focus is immediate. |
75
76
  | `selection` | resin / meniscus | Motion | 420ms | Selected chips, radios, toggles and navigation; set selected semantics first. |
77
+ | `selection-travel` | resin / meniscus | Motion | 460ms | The one .cr-indicator.pill behind the selected segment of tabs, a segmented control, the dock, bottom navigation or a toggle button group, moving to the new segment when the choice changes. Set the selected semantics first; selection stays label weight, so the pill is never the only sign of it. Critically damped: a pill that overshoots stands for a moment on a segment nobody chose. |
76
78
  | `switch-on` | resin / coalesce | Motion | 460ms | Animate the thumb after its checked state is applied. |
77
79
  | `switch-off` | resin / coalesce | Motion | 460ms | Animate the thumb after its unchecked state is applied. |
78
80
  | `check` | resin / iris | Motion | 340ms | Checkbox and radio indicators; retain a visible non-color state. |
@@ -155,6 +157,18 @@ CrystalMotion.stopAll();
155
157
 
156
158
  `layout(element, previousRect)` compares the previous and current DOM position. Displacements up to the viewport diagonal use a GSAP-controlled inverse transform, with duration adapting to distance. Pass `{extended:false}` to retain the compact 50px/crossfade behavior. Offscreen-scale moves beyond the viewport diagonal crossfade. The final order is always the real DOM order. Layout animation is cosmetic and does not supply drag-and-drop behavior.
157
159
 
160
+ `travel(pill, segment, {instant})` moves a strip's selection pill (D-37). The pill is one `.cr-indicator.pill`, `aria-hidden`, a child of the plane that holds the segments: `.cr-dock`, `.cr-dock-inner` or `.cr-group`. Set the segment's selected semantics first, then call `travel` with the segment that carries them. It measures the segment inside the plane, writes `--cr-pill-x`, `--cr-pill-y`, `--cr-pill-width`, `--cr-pill-height` and `--cr-pill-radius` on the pill, marks it `data-placed`, and plays `selection-travel` from where the pill is seen to where the segment stands. Placing the pill is what hands the fill to it: until then each segment paints its own, so a strip with no script looks as it always has. The first call, `{instant:true}` (call it from a resize observer, or when fonts load) and reduced motion place the pill without travelling. A travel that starts while another is under way starts from where the pill is seen, so a quick second choice turns the pill rather than snapping it. While it travels the pill carries `data-travelling`, and the arriving label keeps the strip's ink until the pill is under it; its weight changes at once, with the semantics. Forced colours draw no pill and keep the segment's own outline.
161
+
162
+ ```js
163
+ const pill = strip.querySelector(':scope > .cr-indicator.pill');
164
+ await CrystalMotion.travel(pill, strip.querySelector('[aria-selected=true]'), { instant: true });
165
+
166
+ // When the choice changes:
167
+ previous.setAttribute('aria-selected', 'false');
168
+ next.setAttribute('aria-selected', 'true');
169
+ await CrystalMotion.travel(pill, next);
170
+ ```
171
+
158
172
  The engine bridge restores prior inline values and priorities for its owned properties. Consumers should avoid modifying the same animated property during an effect; stop it before changing that property. Component implementations should use a dedicated animated wrapper when they already own a nontrivial transform. Libraries must not let two engines compete for the same property.
159
173
 
160
174
  ## Live examples and interruption
package/docs/motion.md CHANGED
@@ -85,7 +85,7 @@ The canonical motion definitions live in `tokens/crystal.json`; CSS and JSON exp
85
85
 
86
86
  Both engines are installed, bundled locally and used by the runtime. [Motion's animate API](https://motion.dev/docs/animate) drives element keyframes. [GSAP timelines](https://gsap.com/docs/v3/GSAP/Timeline/) control material paint-layer clocks and selected component sequences. Native Web Animations effects paint actual pseudo-elements under those GSAP clocks; CSS supplies the native dialog backdrop fallback.
87
87
 
88
- See the [component motion suite](motion-components.html) for all 59 recipes, engine assignments, API contracts, live component behavior, test instructions and future component-library/Storybook coverage. [License notices](../reference/ASSET-NOTICES.md) accompany the local bundle.
88
+ See the [component motion suite](motion-components.html) for all 60 recipes, engine assignments, API contracts, live component behavior, test instructions and future component-library/Storybook coverage. [License notices](../reference/ASSET-NOTICES.md) accompany the local bundle.
89
89
 
90
90
  The compact CSS timing tokens remain available for small state changes. The material-driven Resin press recipe uses 320ms for a complete compression/recovery sequence; hover light uses 700ms. These visual clocks never delay the actual action. The executable catalog lists the current duration of every recipe.
91
91
 
@@ -228,7 +228,7 @@ including that reduced motion still applies the state instantly.
228
228
 
229
229
  <!-- generated:recipes -->
230
230
 
231
- All 59 recipes in 9 categories, generated from `core/tokens/motion-recipes.json`. Damping ratio and
231
+ All 60 recipes in 9 categories, generated from `core/tokens/motion-recipes.json`. Damping ratio and
232
232
  overshoot are derived from each recipe's spring by `core/assets/core/spring.js`, so a
233
233
  retuned spring cannot leave a stale number in this table.
234
234
 
@@ -243,6 +243,7 @@ correct is a material question; see the signature policy below.
243
243
  | `press`: Press and release | 320ms | pressure | resin | 0.660 | 6.3% | Buttons, icon buttons and segmented controls. Disabled controls never animate. | Apply the semantic state immediately; omit decorative movement. |
244
244
  | `hover`: Light follows the surface | 700ms | caustic | resin | 0.900 | 0.2% | Fine-pointer affordance only; keyboard focus is immediate. | Apply the semantic state immediately; omit decorative movement. |
245
245
  | `selection`: Selection settle | 420ms | meniscus | resin | 0.700 | 4.6% | Selected chips, radios, toggles and navigation; set selected semantics first. | Apply the semantic state immediately; omit decorative movement. |
246
+ | `selection-travel`: Selection travel | 460ms | meniscus | resin | 1.000 | none | The one .cr-indicator.pill behind the selected segment of tabs, a segmented control, the dock, bottom navigation or a toggle button group, moving to the new segment when the choice changes. Set the selected semantics first; selection stays label weight, so the pill is never the only sign of it. Critically damped: a pill that overshoots stands for a moment on a segment nobody chose. | The pill is placed behind the new segment at once; nothing travels. |
246
247
  | `switch-on`: Switch on | 460ms | coalesce | resin | 0.620 | 8.4% | Animate the thumb after its checked state is applied. | Apply the semantic state immediately; omit decorative movement. |
247
248
  | `switch-off`: Switch off | 460ms | coalesce | resin | 0.620 | 8.4% | Animate the thumb after its unchecked state is applied. | Apply the semantic state immediately; omit decorative movement. |
248
249
  | `check`: Checkmark confirmation | 340ms | iris | resin | 0.800 | 1.5% | Checkbox and radio indicators; retain a visible non-color state. | Apply the semantic state immediately; omit decorative movement. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crystal-ui/core",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "description": "Crystal, Meridian's design system: design tokens, material stylesheets, a token resolver, a headless state core, motion recipes, icons and the specification.",
5
5
  "keywords": [
6
6
  "design-system",
@@ -93,7 +93,7 @@
93
93
  "hover",
94
94
  "focus"
95
95
  ],
96
- "material": "Resin plane, Stone label backing, primary fill on the selected destination",
96
+ "material": "Resin plane, Stone label backing, the primary pill behind the selected destination",
97
97
  "surface": [
98
98
  "dock"
99
99
  ],
@@ -102,7 +102,7 @@
102
102
  "crystal": "The single shared plane, label weight for the current entry, elevation",
103
103
  "product": "Destinations and routing",
104
104
  "motion": [
105
- "selection"
105
+ "selection-travel"
106
106
  ],
107
107
  "parity": [
108
108
  "mui:BottomNavigation",
@@ -148,7 +148,7 @@
148
148
  "selected",
149
149
  "disabled"
150
150
  ],
151
- "material": "Resin strip, primary fill on the selected tab",
151
+ "material": "Resin strip, the primary pill behind the selected tab",
152
152
  "surface": [
153
153
  "dock"
154
154
  ],
@@ -157,7 +157,8 @@
157
157
  "crystal": "Strip material, label weight for the selected tab, focus ring",
158
158
  "product": "The roving tabindex implementation and panel content",
159
159
  "motion": [
160
- "tab-in"
160
+ "tab-in",
161
+ "selection-travel"
161
162
  ],
162
163
  "parity": [
163
164
  "mantine:Tabs",
@@ -348,10 +349,10 @@
348
349
  ],
349
350
  "geometry": "Pill; targets at least 44px; respects the safe area.",
350
351
  "semantics": "role=\"navigation\"; the current destination carries aria-current=\"page\".",
351
- "crystal": "Material, geometry, selection by label weight, safe-area inset",
352
+ "crystal": "Material, geometry, selection by label weight with the pill behind it, safe-area inset",
352
353
  "product": "Destinations and routing",
353
354
  "motion": [
354
- "selection"
355
+ "selection-travel"
355
356
  ],
356
357
  "parity": [
357
358
  "mui:BottomNavigation"
@@ -79,10 +79,11 @@
79
79
  ],
80
80
  "geometry": "Pill outer geometry; interior corners square against neighbours",
81
81
  "semantics": "group role with an accessible name when the buttons are related",
82
- "crystal": "The shared plane and interior separation",
82
+ "crystal": "The shared plane and interior separation; as a toggle set, the pill behind the pressed button",
83
83
  "product": "Which actions are grouped",
84
84
  "motion": [
85
- "press"
85
+ "press",
86
+ "selection-travel"
86
87
  ],
87
88
  "parity": [
88
89
  "mantine:Button.Group",
@@ -463,7 +463,7 @@
463
463
  "selected",
464
464
  "disabled"
465
465
  ],
466
- "material": "One Resin plane; primary fill on the selected segment",
466
+ "material": "One Resin plane; the primary pill behind the selected segment",
467
467
  "surface": [
468
468
  "dock"
469
469
  ],
@@ -472,7 +472,7 @@
472
472
  "crystal": "Shared plane, label weight for the selected segment, focus ring",
473
473
  "product": "Options and change handling",
474
474
  "motion": [
475
- "selection"
475
+ "selection-travel"
476
476
  ],
477
477
  "parity": [
478
478
  "mantine:SegmentedControl",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$description": "Crystal component catalogue, combined. Generated from core/tokens/catalogue/.",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "surfaces": [
5
5
  {
6
6
  "id": "plastic",
@@ -18,9 +18,14 @@
18
18
  "Frost"
19
19
  ],
20
20
  "class": ".cr-frost",
21
- "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.",
21
+ "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).",
22
22
  "also": [
23
- ".cr-frost.bar"
23
+ ".cr-frost.bar",
24
+ ".cr-frost.pane",
25
+ ".cr-frost.flat",
26
+ ".cr-frost.docked",
27
+ ".cr-frost.sheet",
28
+ ".cr-frost.reading"
24
29
  ]
25
30
  },
26
31
  {
@@ -30,9 +35,14 @@
30
35
  "Haze"
31
36
  ],
32
37
  "class": ".cr-haze",
33
- "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.",
38
+ "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).",
34
39
  "also": [
35
- ".cr-haze.overlay"
40
+ ".cr-haze.overlay",
41
+ ".cr-haze.inset",
42
+ ".cr-haze.flush",
43
+ ".cr-haze.flat",
44
+ ".cr-haze.flat.sunken",
45
+ ".cr-haze.raised"
36
46
  ]
37
47
  },
38
48
  {
@@ -42,9 +52,11 @@
42
52
  "Resin"
43
53
  ],
44
54
  "class": ".cr-resin",
45
- "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.",
55
+ "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).",
46
56
  "also": [
47
- ".cr-resin.transport"
57
+ ".cr-resin.transport",
58
+ ".cr-resin.flat",
59
+ ".cr-resin.divider"
48
60
  ]
49
61
  },
50
62
  {
@@ -84,11 +96,13 @@
84
96
  "Haze"
85
97
  ],
86
98
  "class": ".cr-field-shell",
87
- "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.",
99
+ "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).",
88
100
  "also": [
89
- ".cr-editor"
101
+ ".cr-editor",
102
+ ".cr-field-shell.block"
90
103
  ],
91
104
  "partial": {
105
+ ".cr-field-shell.block": "The shell's display only: worn with `.cr-field-shell`, which carries the coat.",
92
106
  ".cr-editor": "A part: the document inside the field shell, which carries the Resin surround and the Haze well."
93
107
  }
94
108
  },
@@ -141,7 +155,7 @@
141
155
  "also": [
142
156
  ".cr-dialog::backdrop"
143
157
  ],
144
- "use": "The chromatic diffusion of the real scene behind a modal. Never a content surface; the decision surface above it is Haze."
158
+ "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)."
145
159
  },
146
160
  {
147
161
  "id": "dialog",
@@ -166,7 +180,7 @@
166
180
  "Haze"
167
181
  ],
168
182
  "class": ".cr-indicator",
169
- "use": "A 20px informational circle painting Haze on an isolated layer, or the moving pill behind a selected segment. Haze rather than Resin, because it sits on a surface that is often already translucent. Never a selection mark."
183
+ "use": "A 20px informational circle painting Haze on an isolated layer, or, as `.cr-indicator.pill`, the primary fill that travels behind the selected segment of a strip (D-37): tabs, a segmented control, the dock, bottom navigation or a toggle button group. The circle is Haze rather than Resin, because it sits on a surface that is often already translucent. Neither is ever the only mark of a selection: the selected segment keeps its label weight, and the circle never marks one at all."
170
184
  },
171
185
  {
172
186
  "id": "status",
@@ -696,7 +710,7 @@
696
710
  "hover",
697
711
  "focus"
698
712
  ],
699
- "material": "Resin plane, Stone label backing, primary fill on the selected destination",
713
+ "material": "Resin plane, Stone label backing, the primary pill behind the selected destination",
700
714
  "surface": [
701
715
  "dock"
702
716
  ],
@@ -705,7 +719,7 @@
705
719
  "crystal": "The single shared plane, label weight for the current entry, elevation",
706
720
  "product": "Destinations and routing",
707
721
  "motion": [
708
- "selection"
722
+ "selection-travel"
709
723
  ],
710
724
  "parity": [
711
725
  "mui:BottomNavigation",
@@ -751,7 +765,7 @@
751
765
  "selected",
752
766
  "disabled"
753
767
  ],
754
- "material": "Resin strip, primary fill on the selected tab",
768
+ "material": "Resin strip, the primary pill behind the selected tab",
755
769
  "surface": [
756
770
  "dock"
757
771
  ],
@@ -760,7 +774,8 @@
760
774
  "crystal": "Strip material, label weight for the selected tab, focus ring",
761
775
  "product": "The roving tabindex implementation and panel content",
762
776
  "motion": [
763
- "tab-in"
777
+ "tab-in",
778
+ "selection-travel"
764
779
  ],
765
780
  "parity": [
766
781
  "mantine:Tabs",
@@ -951,10 +966,10 @@
951
966
  ],
952
967
  "geometry": "Pill; targets at least 44px; respects the safe area.",
953
968
  "semantics": "role=\"navigation\"; the current destination carries aria-current=\"page\".",
954
- "crystal": "Material, geometry, selection by label weight, safe-area inset",
969
+ "crystal": "Material, geometry, selection by label weight with the pill behind it, safe-area inset",
955
970
  "product": "Destinations and routing",
956
971
  "motion": [
957
- "selection"
972
+ "selection-travel"
958
973
  ],
959
974
  "parity": [
960
975
  "mui:BottomNavigation"
@@ -1149,10 +1164,11 @@
1149
1164
  ],
1150
1165
  "geometry": "Pill outer geometry; interior corners square against neighbours",
1151
1166
  "semantics": "group role with an accessible name when the buttons are related",
1152
- "crystal": "The shared plane and interior separation",
1167
+ "crystal": "The shared plane and interior separation; as a toggle set, the pill behind the pressed button",
1153
1168
  "product": "Which actions are grouped",
1154
1169
  "motion": [
1155
- "press"
1170
+ "press",
1171
+ "selection-travel"
1156
1172
  ],
1157
1173
  "parity": [
1158
1174
  "mantine:Button.Group",
@@ -1794,7 +1810,7 @@
1794
1810
  "selected",
1795
1811
  "disabled"
1796
1812
  ],
1797
- "material": "One Resin plane; primary fill on the selected segment",
1813
+ "material": "One Resin plane; the primary pill behind the selected segment",
1798
1814
  "surface": [
1799
1815
  "dock"
1800
1816
  ],
@@ -1803,7 +1819,7 @@
1803
1819
  "crystal": "Shared plane, label weight for the selected segment, focus ring",
1804
1820
  "product": "Options and change handling",
1805
1821
  "motion": [
1806
- "selection"
1822
+ "selection-travel"
1807
1823
  ],
1808
1824
  "parity": [
1809
1825
  "mantine:SegmentedControl",
@@ -144,6 +144,53 @@
144
144
  }
145
145
  }
146
146
  },
147
+ {
148
+ "id": "selection-travel",
149
+ "category": "Controls",
150
+ "label": "Selection travel",
151
+ "duration": 460,
152
+ "engine": "Motion",
153
+ "keyframes": [
154
+ {
155
+ "transform": "translateX(-96px)",
156
+ "width": "88px",
157
+ "offset": 0
158
+ },
159
+ {
160
+ "transform": "translateX(0px)",
161
+ "width": "112px",
162
+ "offset": 1
163
+ }
164
+ ],
165
+ "measured": "The keyframes are a sample: the pill leaving an 88px segment for the 112px segment beside it. A player measures both segments when the choice changes and substitutes the departing segment’s offset from the arriving one, and its size, for the first keyframe; the last keyframe is always the arriving segment where it stands. CrystalMotion.travel() does this on the web.",
166
+ "overshoot": "never",
167
+ "travelException": "The pill crosses its own strip from the segment that was chosen to the one that is; the strip is its bound, and the distance is wherever the two segments stand.",
168
+ "use": "The one .cr-indicator.pill behind the selected segment of tabs, a segmented control, the dock, bottom navigation or a toggle button group, moving to the new segment when the choice changes. Set the selected semantics first; selection stays label weight, so the pill is never the only sign of it. Critically damped: a pill that overshoots stands for a moment on a segment nobody chose.",
169
+ "reduced": "The pill is placed behind the new segment at once; nothing travels.",
170
+ "material": "resin",
171
+ "signature": "meniscus",
172
+ "spring": {
173
+ "stiffness": 773.7214,
174
+ "damping": 55.6317,
175
+ "mass": 1,
176
+ "dampingRatio": 1,
177
+ "platform": {
178
+ "swiftUI": {
179
+ "response": 0.2259,
180
+ "dampingFraction": 1
181
+ },
182
+ "compose": {
183
+ "dampingRatio": 1,
184
+ "stiffness": 773.7214
185
+ },
186
+ "web": {
187
+ "stiffness": 773.7214,
188
+ "damping": 55.6317,
189
+ "mass": 1
190
+ }
191
+ }
192
+ }
193
+ },
147
194
  {
148
195
  "id": "switch-on",
149
196
  "category": "Controls",