rift-ds 1.19.1 → 1.20.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 (73) hide show
  1. package/README.md +3 -3
  2. package/components/AgentStatus/AgentStatus.css +8 -0
  3. package/components/AppSidebar/AppSidebar.css +37 -0
  4. package/components/AppSidebar/AppSidebar.d.ts +2 -0
  5. package/components/AppSidebar/AppSidebar.js +248 -215
  6. package/components/Checkbox/Checkbox.css +4 -1
  7. package/components/Checkbox/Checkbox.d.ts +12 -5
  8. package/components/Checkbox/Checkbox.js +7 -2
  9. package/components/ColorPicker/ColorPicker.js +3 -1
  10. package/components/Combobox/Combobox.d.ts +1 -1
  11. package/components/Composer/Composer.css +42 -2
  12. package/components/Composer/Composer.d.ts +1 -1
  13. package/components/Composer/Composer.js +1 -0
  14. package/components/Dropdown/Dropdown.d.ts +4 -4
  15. package/components/Dropdown/Dropdown.js +1 -0
  16. package/components/EventCalendar/EventCalendar.css +3 -1
  17. package/components/LegendTile/LegendTile.css +10 -3
  18. package/components/LegendTile/LegendTile.d.ts +1 -1
  19. package/components/LegendTile/LegendTile.js +1 -1
  20. package/components/PinInput/PinInput.d.ts +6 -0
  21. package/components/PinInput/PinInput.js +38 -34
  22. package/components/RadioButton/RadioButton.css +4 -1
  23. package/components/RadioButton/RadioButton.d.ts +10 -12
  24. package/components/RadioButton/RadioButton.js +8 -6
  25. package/components/Reasoning/Reasoning.css +14 -0
  26. package/components/RichDropdown/RichDropdown.d.ts +4 -5
  27. package/components/RichDropdown/RichDropdown.js +1 -0
  28. package/components/SegmentedControl/SegmentedControl.css +37 -0
  29. package/components/SegmentedControl/SegmentedControl.d.ts +16 -2
  30. package/components/SegmentedControl/SegmentedControl.js +41 -4
  31. package/components/SelectionCard/SelectionCard.d.ts +7 -1
  32. package/components/SelectionCard/SelectionCard.js +2 -1
  33. package/components/Stat/Stat.css +2 -2
  34. package/components/TableToolbar/TableToolbar.css +13 -3
  35. package/components/TableToolbar/TableToolbar.d.ts +1 -0
  36. package/components/TableToolbar/TableToolbar.js +11 -2
  37. package/components/Tabs/Tabs.d.ts +2 -0
  38. package/components/Tabs/Tabs.js +1 -0
  39. package/components/TagInput/TagInput.d.ts +7 -0
  40. package/components/TagInput/TagInput.js +5 -3
  41. package/components/ThemeToggle/ThemeToggle.css +3 -25
  42. package/components/ThemeToggle/ThemeToggle.js +8 -20
  43. package/components/TimePicker/TimePicker.d.ts +6 -0
  44. package/components/TimePicker/TimePicker.js +4 -0
  45. package/components/Timeline/Timeline.css +7 -2
  46. package/components/Timeline/Timeline.d.ts +4 -4
  47. package/components/ToggleSwitch/ToggleSwitch.d.ts +8 -0
  48. package/components/ToggleSwitch/ToggleSwitch.js +6 -1
  49. package/components/ToolCall/ToolCall.css +11 -3
  50. package/components/TypographySwatch/TypographySwatch.css +3 -1
  51. package/components/WorldMap/WorldMap.d.ts +1 -1
  52. package/components/WorldMap/WorldMap.js +1 -1
  53. package/components/registry.json +1 -1
  54. package/components/registry.json.d.ts +1 -1
  55. package/components/registry.json.js +1 -1
  56. package/package.json +5 -1
  57. package/tokens/presets/contrast.css +8 -8
  58. package/tokens/presets/forest.css +10 -8
  59. package/tokens/presets/gold.css +12 -10
  60. package/tokens/presets/marquee.css +9 -9
  61. package/tokens/presets/pink.css +8 -8
  62. package/tokens/presets/terminal.css +8 -8
  63. package/tokens/presets/violet.css +8 -8
  64. package/tokens/presets/warm.css +8 -8
  65. package/tokens/presets/zest.css +8 -8
  66. package/tokens/registry.json +2 -0
  67. package/tokens/registry.json.d.ts +2 -0
  68. package/tokens/registry.json.js +1 -1
  69. package/tokens/tokens-dark.css +4 -0
  70. package/tokens/tokens-light.css +8 -4
  71. package/tokens/values.d.ts +34 -0
  72. package/tokens/values.js +11 -0
  73. package/tokens/values.json.js +8 -0
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import React, { useState, useRef, useCallback, useLayoutEffect } from "react";
4
4
  import "./SegmentedControl.css";
5
5
  import "../../behaviors/visually-hidden.css";
@@ -7,6 +7,7 @@ import "../../fonts/material-symbols.css";
7
7
  import { mirrorClass, logicalArrowKey } from "../../behaviors/direction.js";
8
8
  import { useAnchoredPosition } from "../../behaviors/useAnchoredPosition.js";
9
9
  import { useTopLayer } from "../../behaviors/useTopLayer.js";
10
+ import { CircularButton } from "../CircularButton/CircularButton.js";
10
11
  const SegmentedControl = React.forwardRef(
11
12
  ({
12
13
  segments,
@@ -22,9 +23,13 @@ const SegmentedControl = React.forwardRef(
22
23
  collapse = false,
23
24
  showLabels = true,
24
25
  ariaLabel,
26
+ cycle = false,
27
+ cycleLabel,
25
28
  className = "",
29
+ "aria-label": nativeAriaLabel,
26
30
  ...rest
27
31
  }, ref) => {
32
+ const name = nativeAriaLabel ?? ariaLabel;
28
33
  const controlledValue = value ?? legacyActiveSegment;
29
34
  const isControlled = controlledValue !== void 0;
30
35
  const [internalValue, setInternalValue] = useState(
@@ -153,8 +158,9 @@ const SegmentedControl = React.forwardRef(
153
158
  }
154
159
  const metrics = metricsRef.current;
155
160
  if (!metrics) return;
156
- const available = host.clientWidth;
157
- if (available === 0) return;
161
+ const hostStyle = getComputedStyle(host);
162
+ const available = host.clientWidth - parseFloat(hostStyle.paddingInlineStart) - parseFloat(hostStyle.paddingInlineEnd);
163
+ if (host.clientWidth === 0) return;
158
164
  const next = available >= metrics.full ? "full" : available >= metrics.labels || !everySegmentHasIcon ? "labels" : "icons";
159
165
  setCollapseState(
160
166
  (current) => current.key === collapseKey && current.mode === next ? current : { key: collapseKey, mode: next }
@@ -239,10 +245,40 @@ const SegmentedControl = React.forwardRef(
239
245
  });
240
246
  }
241
247
  };
248
+ if (cycle) {
249
+ const enabled = segments.filter((segment) => !segment.disabled);
250
+ const current = segments.find((segment) => segment.value === activeSegment) ?? enabled[0] ?? segments[0];
251
+ const currentIndex = segments.indexOf(current);
252
+ const next = [...segments.slice(currentIndex + 1), ...segments.slice(0, currentIndex + 1)].find(
253
+ (segment) => !segment.disabled
254
+ ) ?? current;
255
+ const label = current && (cycleLabel ? cycleLabel(current.label, next.label) : `${name ? `${name}: ` : ""}${current.label}. Switch to ${next.label}`);
256
+ return /* @__PURE__ */ jsx(
257
+ "div",
258
+ {
259
+ ...rest,
260
+ ref: setRef,
261
+ className: [baseClass, sizeClass, variantClass, `${baseClass}--cycle`, className].filter(Boolean).join(" "),
262
+ children: current && /* @__PURE__ */ jsx(
263
+ CircularButton,
264
+ {
265
+ icon: current.icon ?? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: current.label.charAt(0) }),
266
+ size,
267
+ variant: "secondary",
268
+ tone: "neutral",
269
+ ariaLabel: label,
270
+ tooltip: current.label,
271
+ disabled: next === current,
272
+ onClick: () => select(next.value)
273
+ }
274
+ )
275
+ }
276
+ );
277
+ }
242
278
  return /* @__PURE__ */ jsxs(
243
279
  "div",
244
280
  {
245
- "aria-label": ariaLabel,
281
+ "aria-label": name,
246
282
  ...rest,
247
283
  ref: setRef,
248
284
  className: classes,
@@ -272,6 +308,7 @@ const SegmentedControl = React.forwardRef(
272
308
  className: btnClasses,
273
309
  "aria-selected": isActive,
274
310
  "aria-disabled": segment.disabled || void 0,
311
+ "aria-controls": segment.panelId,
275
312
  disabled: segment.disabled,
276
313
  tabIndex: isActive ? 0 : -1,
277
314
  "data-segment-value": segment.value,
@@ -25,7 +25,13 @@ type SelectionCardOwnProps = {
25
25
  defaultValue?: string | string[];
26
26
  /** Called with the next selection — a string in radio mode, an array otherwise */
27
27
  onValueChange?: (value: string | string[]) => void;
28
- /** Group name (used for aria-label on the group) */
28
+ /**
29
+ * Form field name, also the group's aria-label when none is given. When set,
30
+ * each selected option's `value` submits with an enclosing form through a
31
+ * hidden input, repeated in checkbox and toggle modes as a set of native
32
+ * checkboxes does; a disabled option submits nothing. In a form, name the group
33
+ * with `aria-label` too, so a field key is never what a screen reader announces.
34
+ */
29
35
  name?: string;
30
36
  /** Additional CSS classes */
31
37
  className?: string;
@@ -70,7 +70,8 @@ const SelectionCard = React.forwardRef(
70
70
  /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: option.label }),
71
71
  option.description && /* @__PURE__ */ jsx("span", { className: `${baseClass}__description`, children: option.description })
72
72
  ] }),
73
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__indicator`, children: mode === "radio" ? /* @__PURE__ */ jsx(RadioIndicator, { checked: selected }) : mode === "toggle" ? /* @__PURE__ */ jsx(SwitchIndicator, { checked: selected }) : /* @__PURE__ */ jsx(CheckboxIndicator, { checked: selected }) })
73
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__indicator`, children: mode === "radio" ? /* @__PURE__ */ jsx(RadioIndicator, { checked: selected }) : mode === "toggle" ? /* @__PURE__ */ jsx(SwitchIndicator, { checked: selected }) : /* @__PURE__ */ jsx(CheckboxIndicator, { checked: selected }) }),
74
+ name && selected && /* @__PURE__ */ jsx("input", { type: "hidden", name, value: option.value, disabled: option.disabled })
74
75
  ]
75
76
  },
76
77
  option.value
@@ -66,8 +66,8 @@
66
66
  line-height: 1;
67
67
  }
68
68
 
69
- /* The trend tokens are theme-split for contrast: deep status inks on
70
- light surfaces, the mint/coral accents on dark ones. */
69
+ /* The trend tokens are theme-split for contrast: the brightest ramp steps
70
+ that hold AA on the primary container, the mint/coral accents on dark ones. */
71
71
  .ds-stat__delta--up {
72
72
  color: var(--color-trend-up);
73
73
  }
@@ -2,6 +2,7 @@
2
2
  TABLE TOOLBAR
3
3
  The control bar over a table: search, filter chips, the More panel's columns,
4
4
  the density switch, the count, the actions and the AI command, in one line.
5
+ A long AI command grows its own row.
5
6
  ============================================ */
6
7
 
7
8
  .ds-table-toolbar {
@@ -380,12 +381,18 @@
380
381
  it stays in view). */
381
382
  .ds-table-toolbar__row {
382
383
  position: relative;
384
+ display: grid;
385
+ grid-template-columns: minmax(0, 1fr);
383
386
  min-width: 0;
384
387
  }
385
388
 
389
+ .ds-table-toolbar__row > .ds-table-toolbar__main {
390
+ grid-area: 1 / 1;
391
+ }
392
+
386
393
  /* A row that takes over the bar: the bar's controls fade out, then the row
387
- comes in. Coming back is the reverse. The bar stays laid out throughout, so the
388
- row never changes height. */
394
+ comes in. Coming back is the reverse. The bar stays laid out throughout, so taking
395
+ over never changes the row's height; only a long AI command grows it (below). */
389
396
  .ds-table-toolbar__start > *,
390
397
  .ds-table-toolbar__end {
391
398
  transition: opacity var(--motion-duration-fast) var(--motion-ease-standard) var(--motion-duration-fast);
@@ -580,14 +587,17 @@
580
587
  inset: 0;
581
588
  z-index: 1;
582
589
  display: flex;
583
- align-items: center;
590
+ align-items: flex-end;
584
591
  gap: var(--gap-200);
585
592
  visibility: hidden;
586
593
  pointer-events: none;
587
594
  transition: visibility 0s linear var(--motion-duration-fast);
588
595
  }
589
596
 
597
+ /* Open, it shares the bar's grid cell in flow, so a long request grows the row and pushes the table down. */
590
598
  .ds-table-toolbar__command-row[data-open] {
599
+ position: relative;
600
+ grid-area: 1 / 1;
591
601
  visibility: visible;
592
602
  pointer-events: auto;
593
603
  transition: visibility 0s;
@@ -284,6 +284,7 @@ type TableToolbarOwnProps = {
284
284
  * text your handler turns into a whole table setup. It reaches everything a
285
285
  * view holds (filters, sorts, search, columns, pinning, grouping, density),
286
286
  * so it can do in a sentence what the bar's other controls do one at a time.
287
+ * A long request grows the composer to three rows, pushing the table down.
287
288
  * The library calls no model; your handler does. A change or an error lands in
288
289
  * a toast, in the surrounding ToastProvider's stack if there is one, else in the
289
290
  * bar's own at the bottom-right. Shows only inside a DataTable.
@@ -140,6 +140,7 @@ function ToolbarPanel({
140
140
  )
141
141
  ] });
142
142
  }
143
+ const COMMAND_MAX_ROWS = 3;
143
144
  function CommandRow({ command, table, labels, size, open, onClose, state, onStateChange }) {
144
145
  const { toast, dismiss } = useToast();
145
146
  const [text, setText] = useState("");
@@ -250,6 +251,7 @@ function CommandRow({ command, table, labels, size, open, onClose, state, onStat
250
251
  Composer,
251
252
  {
252
253
  inline: true,
254
+ maxRows: COMMAND_MAX_ROWS,
253
255
  size,
254
256
  value: text,
255
257
  onValueChange: setText,
@@ -509,12 +511,14 @@ const TableToolbar = React.forwardRef(
509
511
  const rootRef = useRef(null);
510
512
  const [narrow, setNarrow] = useState(false);
511
513
  const [crowded, setCrowded] = useState(false);
514
+ const foldedAt = useRef(0);
512
515
  useEffect(() => {
513
516
  const node = rootRef.current;
514
517
  if (!node) return;
515
518
  const observer = new ResizeObserver(([entry]) => {
516
- setNarrow(entry.contentRect.width < BREAKPOINT_PHONE_PX);
517
- setCrowded(entry.contentRect.width < BREAKPOINT_SHEET_PX);
519
+ const width = entry.contentRect.width;
520
+ setNarrow(width < BREAKPOINT_PHONE_PX || width <= foldedAt.current);
521
+ setCrowded(width < BREAKPOINT_SHEET_PX);
518
522
  });
519
523
  observer.observe(node);
520
524
  return () => observer.disconnect();
@@ -537,6 +541,11 @@ const TableToolbar = React.forwardRef(
537
541
  used += width + gap;
538
542
  }
539
543
  const moreWidth = (more?.getBoundingClientRect().width ?? 0) + gap;
544
+ if (used - gap + (chipEls.length ? moreWidth : 0) > start.clientWidth + 1) {
545
+ foldedAt.current = rootRef.current?.getBoundingClientRect().width ?? 0;
546
+ setNarrow(true);
547
+ return;
548
+ }
540
549
  let n = 0;
541
550
  for (let i = 0; i < chipEls.length; i += 1) {
542
551
  const width = chipEls[i].getBoundingClientRect().width + gap;
@@ -8,6 +8,8 @@ export interface Tab {
8
8
  icon?: string | React.ReactNode;
9
9
  /** Whether this tab is disabled */
10
10
  disabled?: boolean;
11
+ /** The id of the `role="tabpanel"` element this tab shows, written as the tab's `aria-controls`. The consumer renders the panels. */
12
+ panelId?: string;
11
13
  }
12
14
  /** Props owned by Tabs itself — everything else falls through to the tablist. */
13
15
  type TabsOwnProps = {
@@ -87,6 +87,7 @@ const Tabs = React.forwardRef(
87
87
  role: "tab",
88
88
  "aria-selected": isActive,
89
89
  "aria-disabled": tab.disabled,
90
+ "aria-controls": tab.panelId,
90
91
  tabIndex: isActive ? 0 : -1,
91
92
  "data-tab-value": tab.value,
92
93
  onClick: () => !tab.disabled && select(tab.value),
@@ -30,6 +30,13 @@ type TagInputOwnProps = {
30
30
  removeLabel?: (tag: string) => string;
31
31
  /** Additional CSS classes — applied to the wrapper, not the <input> */
32
32
  className?: string;
33
+ /**
34
+ * Form field name. When set, the committed tags submit with an enclosing
35
+ * form through hidden inputs, one entry per tag, nothing while disabled.
36
+ * The draft text being typed is never submitted. Also the fallback for the
37
+ * element id (`id || name || label`).
38
+ */
39
+ name?: string;
33
40
  };
34
41
  export interface TagInputProps extends TagInputOwnProps, Omit<React.ComponentPropsWithoutRef<'input'>, keyof TagInputOwnProps | 'type' | 'value' | 'defaultValue'> {
35
42
  }
@@ -22,6 +22,7 @@ const TagInput = React.forwardRef(
22
22
  onChange,
23
23
  onKeyDown,
24
24
  name,
25
+ form,
25
26
  id,
26
27
  ...rest
27
28
  }, ref) => {
@@ -116,21 +117,22 @@ const TagInput = React.forwardRef(
116
117
  "input",
117
118
  {
118
119
  ...rest,
120
+ form,
119
121
  ref: setRef,
120
122
  className: `${baseClass}__input`,
121
123
  type: "text",
122
124
  id: inputId,
123
- name,
124
125
  value: draft,
125
126
  placeholder: atLimit ? "" : placeholder,
126
127
  disabled,
127
- required,
128
+ "aria-required": required || void 0,
128
129
  "aria-invalid": error,
129
130
  "aria-describedby": describedBy,
130
131
  onChange: handleChange,
131
132
  onKeyDown: handleKeyDown
132
133
  }
133
- )
134
+ ),
135
+ name && tags.map((tag) => /* @__PURE__ */ jsx("input", { type: "hidden", name, value: tag, form, disabled }, tag))
134
136
  ] })
135
137
  }
136
138
  );
@@ -11,28 +11,6 @@
11
11
  flex-shrink: 0;
12
12
  }
13
13
 
14
- /* The cycle form: one circle in the track recipe the strip, the
15
- CommandPaletteTrigger and the ThemePicker's trigger wear (container fill,
16
- hairline border, the track's curve), so it reads as one of that family in
17
- a row; it hovers like the picker's trigger, the fill stepping up. */
18
- .ds-theme-toggle--cycle {
19
- display: inline-flex;
20
- }
21
-
22
- .ds-theme-toggle--cycle .ds-circular-button {
23
- background-color: var(--color-bg-container-primary);
24
- border: var(--border-025) solid var(--color-bg-container-border);
25
- border-radius: calc(var(--radius-pill) + var(--padding-100));
26
- }
27
-
28
- .ds-theme-toggle--cycle .ds-circular-button:not(.ds-circular-button--disabled):hover {
29
- background-color: var(--color-bg-container-secondary);
30
- }
31
-
32
- /* The glyph holds the icon colour in every state, as the family's glyphs
33
- do: only the fill steps on hover. */
34
- .ds-theme-toggle--cycle .ds-circular-button .ds-circular-button__icon,
35
- .ds-theme-toggle--cycle .ds-circular-button:not(.ds-circular-button--disabled):hover .ds-circular-button__icon,
36
- .ds-theme-toggle--cycle .ds-circular-button:not(.ds-circular-button--disabled):active .ds-circular-button__icon {
37
- color: var(--color-action-icon-default);
38
- }
14
+ /* The cycle form is SegmentedControl's (`ds-segmented-control--cycle`),
15
+ which draws the circle; `ds-theme-toggle--cycle` stays as a consumer
16
+ hook and styles nothing here. */
@@ -2,7 +2,6 @@
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import React, { useEffect } from "react";
4
4
  import { SegmentedControl } from "../SegmentedControl/SegmentedControl.js";
5
- import { CircularButton } from "../CircularButton/CircularButton.js";
6
5
  import { DEFAULT_COLOR_MODE_STORAGE_KEY } from "./colorMode.js";
7
6
  import { useColorMode } from "./useColorMode.js";
8
7
  import "./ThemeToggle.css";
@@ -44,30 +43,19 @@ const ThemeToggle = React.forwardRef(
44
43
  onValueChange?.(next);
45
44
  };
46
45
  if (cycle) {
47
- const index = Math.max(
48
- segments.findIndex((segment) => segment.value === setting),
49
- 0
50
- );
51
- const current = segments[index];
52
- const next = segments[(index + 1) % segments.length];
53
46
  return /* @__PURE__ */ jsx(
54
- "div",
47
+ SegmentedControl,
55
48
  {
49
+ "aria-label": ariaLabel,
56
50
  ...rest,
57
51
  ref,
58
52
  className: ["ds-theme-toggle", "ds-theme-toggle--cycle", className].filter(Boolean).join(" "),
59
- children: /* @__PURE__ */ jsx(
60
- CircularButton,
61
- {
62
- icon: current.icon,
63
- size,
64
- variant: "secondary",
65
- tone: "neutral",
66
- ariaLabel: cycleLabel(current.label, next.label),
67
- tooltip: current.label,
68
- onClick: () => pick(next.value)
69
- }
70
- )
53
+ segments,
54
+ value: setting,
55
+ onValueChange: (next) => pick(next),
56
+ size,
57
+ cycle: true,
58
+ cycleLabel
71
59
  }
72
60
  );
73
61
  }
@@ -28,6 +28,12 @@ type TimePickerOwnProps = {
28
28
  * `en-US`.
29
29
  */
30
30
  locale?: string;
31
+ /**
32
+ * Form field name. When set, the selected 24-hour "HH:MM" value submits with
33
+ * an enclosing form through a hidden input (nothing while no value is set,
34
+ * nothing while disabled), as Dropdown does.
35
+ */
36
+ name?: string;
31
37
  /** Component size */
32
38
  size?: 'default' | 'compact';
33
39
  /** Whether the picker is disabled */
@@ -45,6 +45,8 @@ const TimePicker = React.forwardRef(
45
45
  stepMinutes = 30,
46
46
  hourFormat: hourFormatProp,
47
47
  locale: localeProp,
48
+ name,
49
+ form,
48
50
  size = "default",
49
51
  disabled = false,
50
52
  required = false,
@@ -212,6 +214,7 @@ const TimePicker = React.forwardRef(
212
214
  {
213
215
  ...rest,
214
216
  type: "button",
217
+ form,
215
218
  id: inputId,
216
219
  ref: setTriggerRef,
217
220
  className: `${baseClass}__trigger`,
@@ -238,6 +241,7 @@ const TimePicker = React.forwardRef(
238
241
  ]
239
242
  }
240
243
  ),
244
+ name && selectedValue !== void 0 && /* @__PURE__ */ jsx("input", { type: "hidden", name, value: selectedValue, form, disabled }),
241
245
  isOpen && /* @__PURE__ */ jsx(
242
246
  "ul",
243
247
  {
@@ -253,16 +253,21 @@
253
253
  gap: var(--gap-200);
254
254
  }
255
255
 
256
+ /* A long role title takes its own line above the dates rather than
257
+ running under them. */
256
258
  .ds-timeline__role-header {
257
259
  display: flex;
260
+ flex-wrap: wrap;
258
261
  align-items: center;
259
262
  justify-content: space-between;
260
- gap: var(--gap-400);
263
+ gap: var(--gap-100) var(--gap-400);
261
264
  }
262
265
 
263
266
  .ds-timeline__role-title {
264
267
  margin: 0;
265
- flex: 1;
268
+ /* Sized by its text, so a title that cannot sit beside the dates wraps
269
+ the header (a zero basis would never wrap it). */
270
+ flex: 1 1 auto;
266
271
  min-width: 0;
267
272
  font-family: var(--font-heading-3-family);
268
273
  font-size: var(--font-heading-3-size);
@@ -37,9 +37,9 @@ export interface TimelineCompany {
37
37
  }
38
38
  /** Default variant — a flat sequence of steps/events with dot, badge, or icon markers. */
39
39
  export interface TimelineDefaultProps {
40
- /** Selects the flat step/event layout — the default when omitted */
40
+ /** Which layout the timeline draws. Omitted or `default`: a flat sequence of steps or events with dot, number or icon markers. */
41
41
  variant?: 'default';
42
- /** Ordered list of steps/events */
42
+ /** The entries, in order. Their shape follows `variant`: in the default layout, steps or events (`TimelineItem`). */
43
43
  items: TimelineItem[];
44
44
  /** `vertical` timeline (default) or `horizontal` stepper */
45
45
  orientation?: 'vertical' | 'horizontal';
@@ -52,9 +52,9 @@ export interface TimelineDefaultProps {
52
52
  }
53
53
  /** Company variant — grouped roles under a logo, for résumé/pipeline histories. */
54
54
  export interface TimelineCompanyProps {
55
- /** Selects the grouped layout: roles nested under a company logo */
55
+ /** `company`: roles grouped under a company logo, for résumé and pipeline histories. */
56
56
  variant: 'company';
57
- /** Ordered list of company/tool entries */
57
+ /** In the `company` layout, companies with their roles (`TimelineCompany`). */
58
58
  items: TimelineCompany[];
59
59
  /** Text shown in place of the end date for a role marked `present` */
60
60
  presentLabel?: string;
@@ -34,6 +34,14 @@ type ToggleSwitchOwnProps = {
34
34
  * @deprecated Pass the native `aria-label` attribute instead.
35
35
  */
36
36
  ariaLabel?: string;
37
+ /**
38
+ * Form field name. When set, the switch submits with an enclosing form
39
+ * through a hidden input: `value` while on, nothing while off or disabled,
40
+ * as a native checkbox does.
41
+ */
42
+ name?: string;
43
+ /** The value submitted under `name` while on. Defaults to "on", the native checkbox's. */
44
+ value?: React.ComponentPropsWithoutRef<'button'>['value'];
37
45
  };
38
46
  export interface ToggleSwitchProps extends ToggleSwitchOwnProps, Omit<React.ComponentPropsWithoutRef<'button'>, keyof ToggleSwitchOwnProps | 'type'> {
39
47
  }
@@ -19,6 +19,9 @@ const ToggleSwitch = React.forwardRef(
19
19
  onClick,
20
20
  className = "",
21
21
  ariaLabel,
22
+ name,
23
+ value = "on",
24
+ form,
22
25
  ...rest
23
26
  }, ref) => {
24
27
  const baseClass = "ds-toggle-switch";
@@ -52,6 +55,7 @@ const ToggleSwitch = React.forwardRef(
52
55
  type: "button",
53
56
  className: classes,
54
57
  onClick: handleClick,
58
+ form,
55
59
  disabled,
56
60
  role: "switch",
57
61
  "aria-checked": checked,
@@ -63,7 +67,8 @@ const ToggleSwitch = React.forwardRef(
63
67
  helperText ? /* @__PURE__ */ jsxs("span", { className: `${baseClass}__text`, children: [
64
68
  showLabel && /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label }),
65
69
  /* @__PURE__ */ jsx("span", { className: `${baseClass}__helper`, id: helperId, children: helperText })
66
- ] }) : showLabel && /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label })
70
+ ] }) : showLabel && /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label }),
71
+ name && checked && /* @__PURE__ */ jsx("input", { type: "hidden", name, value, form, disabled })
67
72
  ]
68
73
  }
69
74
  );
@@ -83,17 +83,25 @@
83
83
  }
84
84
 
85
85
  /* The tool name is an identifier, so it takes the code stack —
86
- the one place the system leaves Nunito Sans */
86
+ the one place the system leaves Nunito Sans. It yields to the status
87
+ when the row is short of room, ending in an ellipsis, so a long name
88
+ never pushes the status out of the card. */
87
89
  .ds-tool-call__name {
88
- flex: none;
90
+ flex: 0 1 auto;
91
+ min-width: 0;
92
+ overflow: hidden;
93
+ text-overflow: ellipsis;
94
+ white-space: nowrap;
89
95
  font-family: var(--font-family-code);
90
96
  font-size: var(--font-paragraph-sm-size);
91
97
  line-height: var(--font-paragraph-sm-line-height);
92
98
  color: var(--color-text-primary);
93
99
  }
94
100
 
101
+ /* A zero basis, so the summary yields all its room before the name gives
102
+ up any of its own. */
95
103
  .ds-tool-call__summary {
96
- flex: 1 1 auto;
104
+ flex: 1 1 0;
97
105
  min-width: 0;
98
106
  overflow: hidden;
99
107
  text-overflow: ellipsis;
@@ -55,9 +55,11 @@
55
55
  width: 100%;
56
56
  }
57
57
 
58
+ /* Equal columns while each value fits; never narrower than its own words,
59
+ so on a phone the row wraps instead of drawing values over each other. */
58
60
  .ds-typography-swatch__value-item {
59
61
  flex: 1;
60
- min-width: 0;
62
+ min-width: min-content;
61
63
  display: flex;
62
64
  flex-direction: column;
63
65
  gap: 0;
@@ -77,7 +77,7 @@ type WorldMapOwnProps = {
77
77
  * content — the floating-panel alternative to `renderCallout`'s bare
78
78
  * readout, opening on hover or focus with the system's delays and Escape
79
79
  * dismissal. Content must be phrasing-level (spans), the panel's own
80
- * rule. Opens upward, or downward for a marker near the frame's top.
80
+ * rule. Opens toward the map's centre, where the room is: downward from the upper half, upward from the lower.
81
81
  * Needs `interactive`; when both renderers are given, this one wins.
82
82
  */
83
83
  renderHoverCard?: (point: WorldMapPoint) => React.ReactNode;
@@ -365,7 +365,7 @@ const WorldMap = React.forwardRef(
365
365
  HoverCard,
366
366
  {
367
367
  content: renderHoverCard(point),
368
- position: py < 25 ? "bottom" : "top",
368
+ position: py < 50 ? "bottom" : "top",
369
369
  children: marker
370
370
  }
371
371
  )
@@ -750,7 +750,7 @@
750
750
  "name": "LegendTile",
751
751
  "label": "Legend tile",
752
752
  "slug": "legend-tile",
753
- "description": "The labelled value tile under a chart: a series dot, the series name, and its reading, on an inset fill.",
753
+ "description": "The labelled value tile under a chart: a series dot, the series name, and its reading, on a soft neutral fill.",
754
754
  "category": "charts",
755
755
  "client": false
756
756
  },
@@ -750,7 +750,7 @@ declare const _default: {
750
750
  "name": "LegendTile",
751
751
  "label": "Legend tile",
752
752
  "slug": "legend-tile",
753
- "description": "The labelled value tile under a chart: a series dot, the series name, and its reading, on an inset fill.",
753
+ "description": "The labelled value tile under a chart: a series dot, the series name, and its reading, on a soft neutral fill.",
754
754
  "category": "charts",
755
755
  "client": false
756
756
  },