rift-ds 1.40.0 → 1.42.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 (218) hide show
  1. package/README.md +6 -2
  2. package/behaviors/LoadingImage.d.ts +2 -0
  3. package/behaviors/LoadingImage.js +34 -0
  4. package/behaviors/ScrollRegion.js +15 -2
  5. package/behaviors/VisuallyHidden.d.ts +30 -0
  6. package/behaviors/VisuallyHidden.js +17 -0
  7. package/behaviors/loading-image.css +30 -0
  8. package/behaviors/quietFocus.d.ts +4 -0
  9. package/behaviors/quietFocus.js +14 -0
  10. package/behaviors/shell.css +9 -11
  11. package/behaviors/useFocusScope.d.ts +3 -1
  12. package/behaviors/useFocusScope.js +4 -6
  13. package/bin/rift-ds.mjs +1 -0
  14. package/bin/templates/app/components/rift/ColorModeScript.tsx +3 -1
  15. package/bin/templates/app/components/rift/RiftRoot.tsx +40 -1
  16. package/bin/templates/blocks/app/dashboard/page.tsx +7 -5
  17. package/bin/templates/blocks/app/landing/page.tsx +1 -1
  18. package/bin/templates/blocks/app/pricing/page.module.css +15 -1
  19. package/bin/templates/blocks/app/pricing/page.tsx +8 -1
  20. package/bin/templates/blocks/app/sign-in/page.tsx +10 -2
  21. package/bin/templates/blocks/app/sign-up/page.module.css +83 -0
  22. package/bin/templates/blocks/app/sign-up/page.tsx +126 -0
  23. package/bin/templates/blocks/app/starter/page.tsx +1 -1
  24. package/bin/templates/blocks/components/blocks/AppShell.module.css +0 -10
  25. package/bin/templates/blocks/components/blocks/AppShell.tsx +41 -116
  26. package/bin/templates/blocks/components/blocks/DocsShell.tsx +5 -1
  27. package/bin/templates/blocks/registry.json +44 -6
  28. package/chat/ChatLauncher.d.ts +2 -2
  29. package/chat/ChatWidget.css +7 -7
  30. package/chat/ChatWidget.d.ts +1 -1
  31. package/components/AgentPlan/AgentPlan.css +1 -1
  32. package/components/AlertDialog/AlertDialog.css +14 -0
  33. package/components/AlertDialog/AlertDialog.d.ts +35 -3
  34. package/components/AlertDialog/AlertDialog.js +16 -5
  35. package/components/AppLayout/AppLayout.css +1 -1
  36. package/components/AppLayout/AppLayout.d.ts +2 -2
  37. package/components/AppSidebar/AppSidebar.css +25 -17
  38. package/components/AppSidebar/AppSidebar.d.ts +4 -4
  39. package/components/AppSidebar/AppSidebar.js +14 -5
  40. package/components/Attachment/AttachmentGroup.js +2 -1
  41. package/components/Attachment/AttachmentTile.js +2 -1
  42. package/components/Avatar/Avatar.css +18 -5
  43. package/components/Avatar/Avatar.d.ts +2 -0
  44. package/components/Avatar/Avatar.js +2 -1
  45. package/components/AvatarGroup/AvatarGroup.css +8 -1
  46. package/components/AvatarGroup/AvatarGroup.d.ts +6 -0
  47. package/components/AvatarGroup/AvatarGroup.js +2 -2
  48. package/components/Badge/Badge.css +6 -0
  49. package/components/Breadcrumb/Breadcrumb.css +4 -1
  50. package/components/Button/Button.css +20 -1
  51. package/components/Button/Button.js +6 -1
  52. package/components/Card/Card.css +11 -0
  53. package/components/Card/Card.d.ts +9 -3
  54. package/components/Card/Card.js +21 -2
  55. package/components/Chart/AreaChart.d.ts +7 -0
  56. package/components/Chart/AreaChart.js +51 -45
  57. package/components/Chart/BarChart.d.ts +7 -0
  58. package/components/Chart/BarChart.js +52 -46
  59. package/components/Chart/Chart.css +122 -1
  60. package/components/Chart/ChartSkeleton.d.ts +32 -0
  61. package/components/Chart/ChartSkeleton.js +149 -0
  62. package/components/Chart/ComboChart.d.ts +7 -0
  63. package/components/Chart/ComboChart.js +80 -74
  64. package/components/Chart/LineChart.d.ts +17 -3
  65. package/components/Chart/LineChart.js +61 -39
  66. package/components/Chart/PieChart.d.ts +7 -0
  67. package/components/Chart/PieChart.js +41 -34
  68. package/components/Chart/RadarChart.d.ts +7 -0
  69. package/components/Chart/RadarChart.js +38 -32
  70. package/components/Chart/RadialChart.d.ts +7 -0
  71. package/components/Chart/RadialChart.js +5 -1
  72. package/components/Chart/ScatterChart.d.ts +7 -0
  73. package/components/Chart/ScatterChart.js +46 -40
  74. package/components/Chart/StackedBarChart.d.ts +10 -1
  75. package/components/Chart/StackedBarChart.js +51 -43
  76. package/components/Chart/Treemap.d.ts +7 -0
  77. package/components/Chart/Treemap.js +17 -11
  78. package/components/Checkbox/Checkbox.css +25 -1
  79. package/components/Checkbox/Checkbox.d.ts +8 -4
  80. package/components/Checkbox/Checkbox.js +17 -8
  81. package/components/Chip/Chip.css +5 -3
  82. package/components/ContactCard/ContactCard.css +4 -3
  83. package/components/ContributionGraph/ContributionGraph.css +20 -0
  84. package/components/ContributionGraph/ContributionGraph.d.ts +4 -0
  85. package/components/ContributionGraph/ContributionGraph.js +11 -6
  86. package/components/DataTable/DataTable.css +91 -4
  87. package/components/DataTable/DataTable.d.ts +42 -4
  88. package/components/DataTable/DataTable.js +121 -90
  89. package/components/DateInput/DateInput.css +3 -1
  90. package/components/DatePicker/DatePicker.css +16 -0
  91. package/components/DatePicker/DatePicker.d.ts +13 -0
  92. package/components/DatePicker/DatePicker.js +21 -27
  93. package/components/DatePicker/MonthGrid.d.ts +2 -2
  94. package/components/DatePicker/MonthGrid.js +1 -1
  95. package/components/DatePicker/today.d.ts +15 -0
  96. package/components/DatePicker/today.js +17 -0
  97. package/components/DateRangePicker/DateRangePicker.d.ts +14 -1
  98. package/components/DateRangePicker/DateRangePicker.js +18 -7
  99. package/components/DescriptionList/DescriptionList.css +11 -0
  100. package/components/DescriptionList/DescriptionList.d.ts +5 -1
  101. package/components/DescriptionList/DescriptionList.js +21 -6
  102. package/components/Dialog/Dialog.css +9 -0
  103. package/components/Dialog/Dialog.d.ts +9 -0
  104. package/components/Dialog/Dialog.js +32 -19
  105. package/components/DocumentChip/DocumentChip.css +1 -1
  106. package/components/Drawer/Drawer.d.ts +9 -0
  107. package/components/Drawer/Drawer.js +8 -0
  108. package/components/DrillMenu/DrillMenu.d.ts +2 -1
  109. package/components/DrillMenu/DrillMenu.js +14 -3
  110. package/components/Dropdown/Dropdown.css +3 -1
  111. package/components/EmptyState/EmptyState.css +8 -1
  112. package/components/EntitySwitcher/EntitySwitcher.css +2 -1
  113. package/components/Field/Field.css +2 -2
  114. package/components/FileInput/FileInput.css +1 -1
  115. package/components/FilterBar/FilterBar.d.ts +6 -1
  116. package/components/FunnelChart/FunnelChart.d.ts +7 -0
  117. package/components/FunnelChart/FunnelChart.js +44 -30
  118. package/components/GanttChart/GanttChart.css +10 -0
  119. package/components/GanttChart/GanttChart.d.ts +4 -0
  120. package/components/GanttChart/GanttChart.js +66 -33
  121. package/components/Gauge/Gauge.css +23 -0
  122. package/components/Gauge/Gauge.d.ts +4 -0
  123. package/components/Gauge/Gauge.js +14 -8
  124. package/components/Icon/Icon.css +6 -1
  125. package/components/Icon/Icon.d.ts +3 -1
  126. package/components/Icon/Icon.js +2 -0
  127. package/components/ImageCompare/ImageCompare.js +2 -1
  128. package/components/Input/Input.css +3 -1
  129. package/components/List/List.css +1 -1
  130. package/components/NotificationCenter/NotificationCenter.css +16 -0
  131. package/components/NotificationCenter/NotificationCenter.d.ts +4 -0
  132. package/components/NotificationCenter/NotificationCenter.js +23 -1
  133. package/components/NumberInput/NumberInput.css +2 -0
  134. package/components/PageHeader/PageHeader.css +12 -4
  135. package/components/Panel/Panel.d.ts +1 -1
  136. package/components/PixelAvatar/PixelAvatar.css +7 -1
  137. package/components/PixelAvatar/PixelAvatar.d.ts +2 -0
  138. package/components/PixelAvatar/PixelAvatar.js +2 -1
  139. package/components/Prose/Prose.css +1 -1
  140. package/components/RadioButton/RadioButton.css +1 -1
  141. package/components/RadioButton/RadioButton.d.ts +4 -2
  142. package/components/RadioButton/RadioButton.js +5 -2
  143. package/components/ResourceTimeline/ResourceTimeline.css +12 -0
  144. package/components/ResourceTimeline/ResourceTimeline.d.ts +5 -1
  145. package/components/ResourceTimeline/ResourceTimeline.js +94 -52
  146. package/components/RichDropdown/RichDropdown.css +3 -1
  147. package/components/SelectionCard/SelectionCard.css +29 -0
  148. package/components/SelectionCard/SelectionCard.d.ts +7 -0
  149. package/components/SelectionCard/SelectionCard.js +25 -2
  150. package/components/ShaderField/useShaderField.js +2 -2
  151. package/components/ShaderScene/ShaderScene.js +2 -2
  152. package/components/SiteHeader/SiteHeader.css +0 -9
  153. package/components/SourceChip/SourceChip.css +2 -1
  154. package/components/Sparkline/Sparkline.css +20 -0
  155. package/components/Sparkline/Sparkline.d.ts +4 -0
  156. package/components/Sparkline/Sparkline.js +14 -8
  157. package/components/Stat/Stat.css +31 -0
  158. package/components/Stat/Stat.d.ts +23 -2
  159. package/components/Stat/Stat.js +21 -6
  160. package/components/SubNavPanel/SubNavPanel.css +10 -9
  161. package/components/Table/Table.css +409 -14
  162. package/components/Table/Table.d.ts +32 -2
  163. package/components/Table/Table.js +66 -34
  164. package/components/Textarea/Textarea.css +4 -2
  165. package/components/ThemeToggle/colorMode.d.ts +10 -2
  166. package/components/ThemeToggle/colorMode.js +4 -2
  167. package/components/ThreadHistory/ThreadHistory.css +11 -0
  168. package/components/ThreadHistory/ThreadHistory.d.ts +5 -1
  169. package/components/ThreadHistory/ThreadHistory.js +6 -1
  170. package/components/ThreadPanel/ThreadPanel.d.ts +4 -0
  171. package/components/ThreadPanel/ThreadPanel.js +5 -1
  172. package/components/TimePicker/TimePicker.css +3 -1
  173. package/components/TimePicker/TimePicker.d.ts +4 -2
  174. package/components/TimePicker/TimePicker.js +11 -3
  175. package/components/Timeline/Timeline.css +15 -0
  176. package/components/Timeline/Timeline.d.ts +8 -0
  177. package/components/Timeline/Timeline.js +21 -0
  178. package/components/Toast/Toast.css +16 -0
  179. package/components/Toast/Toast.d.ts +7 -2
  180. package/components/ToggleGroup/ToggleGroup.css +28 -2
  181. package/components/ToggleSwitch/ToggleSwitch.css +1 -1
  182. package/components/Tooltip/Tooltip.d.ts +9 -0
  183. package/components/Tooltip/Tooltip.js +34 -8
  184. package/components/TreeView/TreeView.css +12 -0
  185. package/components/TreeView/TreeView.d.ts +4 -0
  186. package/components/TreeView/TreeView.js +20 -0
  187. package/components/UsageCard/UsageCard.css +11 -0
  188. package/components/UsageCard/UsageCard.d.ts +4 -0
  189. package/components/UsageCard/UsageCard.js +25 -16
  190. package/components/Widget/Widget.css +7 -0
  191. package/components/Widget/Widget.d.ts +4 -0
  192. package/components/Widget/Widget.js +14 -2
  193. package/components/registry.json +5 -2
  194. package/components/registry.json.d.ts +5 -2
  195. package/components/registry.json.js +1 -1
  196. package/package.json +9 -3
  197. package/tokens/motion.d.ts +2 -0
  198. package/tokens/motion.js +2 -0
  199. package/tokens/presets/contrast.css +36 -3
  200. package/tokens/presets/coral.css +39 -3
  201. package/tokens/presets/forest.css +55 -3
  202. package/tokens/presets/gold.css +39 -4
  203. package/tokens/presets/marquee.css +42 -4
  204. package/tokens/presets/mono.css +107 -29
  205. package/tokens/presets/pink.css +41 -3
  206. package/tokens/presets/plum.css +41 -1
  207. package/tokens/presets/terminal.css +40 -4
  208. package/tokens/presets/violet.css +42 -3
  209. package/tokens/presets/warm.css +49 -5
  210. package/tokens/presets/zest.css +47 -3
  211. package/tokens/registry.json +2 -0
  212. package/tokens/registry.json.d.ts +2 -0
  213. package/tokens/registry.json.js +1 -1
  214. package/tokens/tokens-dark.css +5 -0
  215. package/tokens/tokens-light.css +9 -0
  216. package/tokens/values.d.ts +14 -1
  217. package/tokens/values.js +14 -1
  218. package/tokens/values.json.js +1 -1
@@ -63,7 +63,7 @@
63
63
  ============================================ */
64
64
 
65
65
  .ds-field--error .ds-field__helper {
66
- color: var(--color-status-error-border);
66
+ color: var(--color-text-error);
67
67
  }
68
68
 
69
69
  /* The newer form: the error is a message of its own under the control,
@@ -75,7 +75,7 @@
75
75
  font-weight: var(--font-paragraph-sm-weight);
76
76
  line-height: var(--font-paragraph-sm-line-height);
77
77
  letter-spacing: var(--font-paragraph-sm-letter-spacing);
78
- color: var(--color-status-error-text);
78
+ color: var(--color-text-error);
79
79
  }
80
80
 
81
81
  /* ============================================
@@ -161,7 +161,7 @@
161
161
  font-weight: var(--font-paragraph-sm-weight);
162
162
  line-height: var(--font-paragraph-sm-line-height);
163
163
  letter-spacing: var(--font-paragraph-sm-letter-spacing);
164
- color: var(--color-status-error-text);
164
+ color: var(--color-text-error);
165
165
  }
166
166
 
167
167
  /* ============================================
@@ -52,9 +52,14 @@ export interface FilterBarProps extends FilterBarOwnProps, Omit<React.ComponentP
52
52
  * opens a popover of options, active filters show their choice and grow a
53
53
  * clear button, and a clear-all appears once anything is active. State is one
54
54
  * map of filter id to active values, controlled or uncontrolled, so wiring it
55
- * to a DataTable is a single callback. Popovers are real listboxes: arrow
55
+ * to a list is a single callback. Popovers are real listboxes: arrow
56
56
  * keys move, Enter and Space toggle, Escape closes, focus never leaves the
57
57
  * chip.
58
+ *
59
+ * It is for a collection that is not a DataTable: a card grid, a feed, a
60
+ * list. A DataTable's filters belong in its own bar, `TableToolbar` in the
61
+ * table's `toolbar` slot, which reads the table's columns and shares one
62
+ * filter list with its headers.
58
63
  */
59
64
  export declare const FilterBar: React.ForwardRefExoticComponent<FilterBarProps & React.RefAttributes<HTMLDivElement>>;
60
65
  export {};
@@ -45,6 +45,13 @@ type FunnelChartOwnProps = {
45
45
  * height floor no longer applies; the prop is ignored.
46
46
  */
47
47
  minStageShare?: number;
48
+ /**
49
+ * Holds the chart's placeholder, the outline of this chart type, in place of the chart while its data is still being fetched.
50
+ * Before its first draw the chart shows the same placeholder by itself, so this is only for a wait the host knows about.
51
+ */
52
+ loading?: boolean;
53
+ /** Accessible name announced while `loading`. */
54
+ loadingLabel?: string;
48
55
  /** Additional CSS classes */
49
56
  className?: string;
50
57
  };
@@ -4,6 +4,7 @@ import React, { useCallback } from "react";
4
4
  import { ResponsiveContainer, FunnelChart as FunnelChart$1, Tooltip, Funnel, LabelList } from "recharts";
5
5
  import { getChartSeriesColors } from "../Chart/palette.js";
6
6
  import { useChartAnimation } from "../Chart/useChartAnimation.js";
7
+ import { ChartSkeleton } from "../Chart/ChartSkeleton.js";
7
8
  import "../Chart/Chart.css";
8
9
  import "./FunnelChart.css";
9
10
  import { useLocale } from "../../behaviors/LocaleProvider.js";
@@ -42,6 +43,8 @@ const FunnelChart = React.forwardRef(
42
43
  summaryLabel,
43
44
  emptyLabel = "Funnel, no data",
44
45
  minStageShare,
46
+ loading = false,
47
+ loadingLabel = "Loading chart",
45
48
  className = "",
46
49
  locale: localeProp,
47
50
  ...rest
@@ -73,42 +76,53 @@ const FunnelChart = React.forwardRef(
73
76
  title && /* @__PURE__ */ jsx("h3", { className: `${chartClass}__title`, children: title }),
74
77
  subtitle && /* @__PURE__ */ jsx("p", { className: `${chartClass}__subtitle`, children: subtitle })
75
78
  ] }) }),
76
- /* @__PURE__ */ jsx("div", { className: `${chartClass}__body`, role: "img", "aria-label": ariaLabel, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(
77
- FunnelChart$1,
79
+ /* @__PURE__ */ jsxs(
80
+ "div",
78
81
  {
79
- margin: {
80
- top: 4,
81
- right: showLabels ? Math.ceil(Math.max(0, ...stages.map((s) => s.name.length)) * 12 * 0.6) + 12 : 4,
82
- bottom: 4,
83
- left: 4
84
- },
82
+ className: `${chartClass}__body`,
83
+ role: loading ? void 0 : "img",
84
+ "aria-label": loading ? void 0 : ariaLabel,
85
85
  children: [
86
- /* @__PURE__ */ jsx(Tooltip, { content: renderTooltip }),
87
- /* @__PURE__ */ jsx(
88
- Funnel,
86
+ /* @__PURE__ */ jsx(ChartSkeleton, { shape: "funnel", height, loading, loadingLabel }),
87
+ !loading && /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(
88
+ FunnelChart$1,
89
89
  {
90
- ...animation,
91
- dataKey: "value",
92
- nameKey: "name",
93
- data: stages,
94
- lastShapeType: "rectangle",
95
- stroke: surfaceColor,
96
- strokeWidth: 2,
97
- children: showLabels && /* @__PURE__ */ jsx(
98
- LabelList,
99
- {
100
- position: "right",
101
- dataKey: "name",
102
- fill: textSecondary,
103
- stroke: "none",
104
- fontSize: 12
105
- }
106
- )
90
+ margin: {
91
+ top: 4,
92
+ right: showLabels ? Math.ceil(Math.max(0, ...stages.map((s) => s.name.length)) * 12 * 0.6) + 12 : 4,
93
+ bottom: 4,
94
+ left: 4
95
+ },
96
+ children: [
97
+ /* @__PURE__ */ jsx(Tooltip, { content: renderTooltip }),
98
+ /* @__PURE__ */ jsx(
99
+ Funnel,
100
+ {
101
+ ...animation,
102
+ dataKey: "value",
103
+ nameKey: "name",
104
+ data: stages,
105
+ lastShapeType: "rectangle",
106
+ stroke: surfaceColor,
107
+ strokeWidth: 2,
108
+ children: showLabels && /* @__PURE__ */ jsx(
109
+ LabelList,
110
+ {
111
+ position: "right",
112
+ dataKey: "name",
113
+ fill: textSecondary,
114
+ stroke: "none",
115
+ fontSize: 12
116
+ }
117
+ )
118
+ }
119
+ )
120
+ ]
107
121
  }
108
- )
122
+ ) })
109
123
  ]
110
124
  }
111
- ) }) })
125
+ )
112
126
  ] });
113
127
  }
114
128
  );
@@ -317,4 +317,14 @@ button.ds-gantt__bar:focus-visible {
317
317
  }
318
318
  }
319
319
 
320
+ /* Loading: a label line beside a placeholder bar on each row, in the
321
+ Skeleton fill. */
322
+
323
+ .ds-gantt__bar.ds-gantt__bar--loading {
324
+ position: absolute;
325
+ height: var(--ds-gantt-bar-height);
326
+ border-radius: var(--radius-pill);
327
+ background-color: var(--color-bg-container-secondary);
328
+ }
329
+
320
330
  } /* @layer rift.components */
@@ -79,6 +79,10 @@ type GanttChartOwnProps = {
79
79
  progressLabel?: (percent: number) => string;
80
80
  /** The word a `projected` bar's tooltip and accessible text carries. Defaults to "projected". */
81
81
  projectedLabel?: string;
82
+ /** Holds placeholder rows, a label line beside a placeholder bar, in place of the timeline while the plan is being fetched: as many as `items` holds, or four when it is empty. */
83
+ loading?: boolean;
84
+ /** Accessible name announced while `loading`. */
85
+ loadingLabel?: string;
82
86
  /** Additional CSS classes */
83
87
  className?: string;
84
88
  };
@@ -2,9 +2,16 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { DEFAULT_LOCALE } from "../../behaviors/locale.js";
4
4
  import "../Chart/Chart.css";
5
+ import { Skeleton } from "../Skeleton/Skeleton.js";
5
6
  import "./GanttChart.css";
6
7
  import "../../behaviors/visually-hidden.css";
7
8
  const MS_PER_DAY = 24 * 60 * 60 * 1e3;
9
+ const LOADING_BARS = [
10
+ [4, 30],
11
+ [22, 26],
12
+ [40, 34],
13
+ [62, 28]
14
+ ];
8
15
  const parseDay = (date) => /* @__PURE__ */ new Date(`${date}T00:00:00`);
9
16
  const isValidDay = (date) => !Number.isNaN(date.getTime());
10
17
  const daysBetween = (from, to) => Math.round((to.getTime() - from.getTime()) / MS_PER_DAY);
@@ -45,6 +52,8 @@ const GanttChart = React.forwardRef(
45
52
  rangeLabel = defaultRangeLabel,
46
53
  progressLabel = defaultProgressLabel,
47
54
  projectedLabel = "projected",
55
+ loading = false,
56
+ loadingLabel = "Loading",
48
57
  className = "",
49
58
  ...rest
50
59
  }, ref) => {
@@ -171,39 +180,63 @@ const GanttChart = React.forwardRef(
171
180
  title && /* @__PURE__ */ jsx("h3", { className: `${chartClass}__title`, children: title }),
172
181
  subtitle && /* @__PURE__ */ jsx("p", { className: `${chartClass}__subtitle`, children: subtitle })
173
182
  ] }) }),
174
- /* @__PURE__ */ jsx("div", { className: `${chartClass}__body ${baseClass}__body`, children: drawable && /* @__PURE__ */ jsx("div", { className: `${baseClass}__scroll`, children: /* @__PURE__ */ jsxs("div", { className: `${baseClass}__canvas`, children: [
175
- /* @__PURE__ */ jsxs("div", { className: `${baseClass}__axis`, "aria-hidden": "true", children: [
176
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__corner` }),
177
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__months`, children: months.map((month) => /* @__PURE__ */ jsx(
178
- "span",
179
- {
180
- className: `${baseClass}__month-label`,
181
- style: { left: `${month.left}%` },
182
- children: month.label
183
- },
184
- month.label + month.left
185
- )) })
186
- ] }),
187
- /* @__PURE__ */ jsxs("div", { className: `${baseClass}__rows`, children: [
188
- overlay,
189
- blocks.map((block, blockIndex) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
190
- block.group && /* @__PURE__ */ jsxs("div", { className: `${baseClass}__group-row`, children: [
191
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__group-label`, children: block.group }),
192
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__track` })
193
- ] }),
194
- /* @__PURE__ */ jsxs("ul", { className: `${baseClass}__list`, "aria-label": block.group, children: [
195
- block.items.map((item) => /* @__PURE__ */ jsxs("li", { className: `${baseClass}__row`, children: [
196
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__label`, children: item.label }),
197
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__track`, children: renderBar(item) })
198
- ] }, item.id)),
199
- block.milestones.map((milestone) => /* @__PURE__ */ jsxs("li", { className: `${baseClass}__row`, children: [
200
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__label ${baseClass}__label--milestone`, children: milestone.label }),
201
- /* @__PURE__ */ jsx("div", { className: `${baseClass}__track`, children: renderMilestone(milestone) })
202
- ] }, milestone.id))
203
- ] })
204
- ] }, block.group ?? `block-${blockIndex}`))
205
- ] })
206
- ] }) }) })
183
+ /* @__PURE__ */ jsxs("div", { className: `${chartClass}__body ${baseClass}__body`, children: [
184
+ loading && /* @__PURE__ */ jsx("div", { className: `${baseClass}__scroll`, children: /* @__PURE__ */ jsx("div", { className: `${baseClass}__canvas`, children: /* @__PURE__ */ jsx("ul", { className: `${baseClass}__list`, "aria-busy": "true", children: Array.from({ length: items.length || 4 }, (_, index) => {
185
+ const [left, width] = LOADING_BARS[index % LOADING_BARS.length];
186
+ return /* @__PURE__ */ jsxs("li", { className: `${baseClass}__row`, children: [
187
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__label`, children: /* @__PURE__ */ jsx(
188
+ Skeleton,
189
+ {
190
+ variant: "text",
191
+ width: "70%",
192
+ ...index === 0 ? { loadingLabel } : { "aria-hidden": true }
193
+ }
194
+ ) }),
195
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__track`, children: /* @__PURE__ */ jsx(
196
+ Skeleton,
197
+ {
198
+ variant: "rectangular",
199
+ className: `${baseClass}__bar ${baseClass}__bar--loading`,
200
+ style: { left: `${left}%`, width: `${width}%` },
201
+ "aria-hidden": "true"
202
+ }
203
+ ) })
204
+ ] }, index);
205
+ }) }) }) }),
206
+ drawable && !loading && /* @__PURE__ */ jsx("div", { className: `${baseClass}__scroll`, children: /* @__PURE__ */ jsxs("div", { className: `${baseClass}__canvas`, children: [
207
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}__axis`, "aria-hidden": "true", children: [
208
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__corner` }),
209
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__months`, children: months.map((month) => /* @__PURE__ */ jsx(
210
+ "span",
211
+ {
212
+ className: `${baseClass}__month-label`,
213
+ style: { left: `${month.left}%` },
214
+ children: month.label
215
+ },
216
+ month.label + month.left
217
+ )) })
218
+ ] }),
219
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}__rows`, children: [
220
+ overlay,
221
+ blocks.map((block, blockIndex) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
222
+ block.group && /* @__PURE__ */ jsxs("div", { className: `${baseClass}__group-row`, children: [
223
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__group-label`, children: block.group }),
224
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__track` })
225
+ ] }),
226
+ /* @__PURE__ */ jsxs("ul", { className: `${baseClass}__list`, "aria-label": block.group, children: [
227
+ block.items.map((item) => /* @__PURE__ */ jsxs("li", { className: `${baseClass}__row`, children: [
228
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__label`, children: item.label }),
229
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__track`, children: renderBar(item) })
230
+ ] }, item.id)),
231
+ block.milestones.map((milestone) => /* @__PURE__ */ jsxs("li", { className: `${baseClass}__row`, children: [
232
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__label ${baseClass}__label--milestone`, children: milestone.label }),
233
+ /* @__PURE__ */ jsx("div", { className: `${baseClass}__track`, children: renderMilestone(milestone) })
234
+ ] }, milestone.id))
235
+ ] })
236
+ ] }, block.group ?? `block-${blockIndex}`))
237
+ ] })
238
+ ] }) })
239
+ ] })
207
240
  ] });
208
241
  }
209
242
  );
@@ -123,4 +123,27 @@
123
123
  color: var(--color-text-secondary);
124
124
  }
125
125
 
126
+ /* ============================================
127
+ LOADING — the empty dial, pulsing, with a
128
+ placeholder where the reading goes
129
+ ============================================ */
130
+
131
+ .ds-gauge--loading .ds-gauge__track {
132
+ /* ds-allow(motion): the pulse needs a symmetric in-out curve and no
133
+ --motion-ease-* token provides one; the duration is tokenized. */
134
+ animation: ds-gauge-pulse var(--motion-duration-loop-shimmer) ease-in-out infinite alternate;
135
+ }
136
+
137
+ .ds-gauge__value > .ds-skeleton {
138
+ width: 3ch;
139
+ height: calc(1lh - var(--padding-300));
140
+ margin-block: var(--padding-150);
141
+ }
142
+
143
+ @keyframes ds-gauge-pulse {
144
+ to {
145
+ opacity: 0.5;
146
+ }
147
+ }
148
+
126
149
  } /* @layer rift.components */
@@ -50,6 +50,10 @@ type GaugeOwnProps = {
50
50
  strokeWidth?: number;
51
51
  /** The BCP 47 locale the value is written in when no `formatValue` is given, such as `ar-EG`. Defaults to `en-US`. This component can render from a Server Component, so it takes the prop alone and reads no LocaleProvider. */
52
52
  locale?: string;
53
+ /** Draws the empty dial, pulsing, with a placeholder where the reading goes, while the value is being fetched. The label stays. */
54
+ loading?: boolean;
55
+ /** Accessible name announced while `loading`. */
56
+ loadingLabel?: string;
53
57
  /** Additional CSS classes */
54
58
  className?: string;
55
59
  };
@@ -1,6 +1,7 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import "../Chart/Chart.css";
4
+ import { Skeleton } from "../Skeleton/Skeleton.js";
4
5
  import "./Gauge.css";
5
6
  import { formatNumber, DEFAULT_LOCALE } from "../../behaviors/locale.js";
6
7
  const SWEEP_UNITS = 75;
@@ -20,6 +21,8 @@ const Gauge = React.forwardRef(
20
21
  size = 120,
21
22
  strokeWidth = 12,
22
23
  locale = DEFAULT_LOCALE,
24
+ loading = false,
25
+ loadingLabel = "Loading",
23
26
  className = "",
24
27
  ...rest
25
28
  }, ref) => {
@@ -34,6 +37,7 @@ const Gauge = React.forwardRef(
34
37
  bare && `${chartClass}--bare`,
35
38
  baseClass,
36
39
  `${baseClass}--${resolvedTone}`,
40
+ loading && `${baseClass}--loading`,
37
41
  className
38
42
  ].filter(Boolean).join(" ");
39
43
  const radius = (size - strokeWidth) / 2;
@@ -51,12 +55,14 @@ const Gauge = React.forwardRef(
51
55
  {
52
56
  className: `${baseClass}__dial`,
53
57
  style: { width: size, height: size },
54
- role: "meter",
55
- "aria-valuenow": value,
56
- "aria-valuemin": min,
57
- "aria-valuemax": max,
58
- "aria-valuetext": displayValue,
59
- "aria-label": label ?? restAriaLabel,
58
+ ...loading ? { role: "status", "aria-busy": true, "aria-label": loadingLabel } : {
59
+ role: "meter",
60
+ "aria-valuenow": value,
61
+ "aria-valuemin": min,
62
+ "aria-valuemax": max,
63
+ "aria-valuetext": displayValue,
64
+ "aria-label": label ?? restAriaLabel
65
+ },
60
66
  children: [
61
67
  /* @__PURE__ */ jsxs(
62
68
  "svg",
@@ -81,7 +87,7 @@ const Gauge = React.forwardRef(
81
87
  transform: `rotate(135 ${center} ${center})`
82
88
  }
83
89
  ),
84
- valueUnits > 0 && /* @__PURE__ */ jsx(
90
+ valueUnits > 0 && !loading && /* @__PURE__ */ jsx(
85
91
  "circle",
86
92
  {
87
93
  className: `${baseClass}__arc`,
@@ -98,7 +104,7 @@ const Gauge = React.forwardRef(
98
104
  }
99
105
  ),
100
106
  (showValue || label) && /* @__PURE__ */ jsxs("div", { className: `${baseClass}__center`, children: [
101
- showValue && /* @__PURE__ */ jsx("span", { className: `${baseClass}__value`, children: displayValue }),
107
+ showValue && /* @__PURE__ */ jsx("span", { className: `${baseClass}__value`, children: loading ? /* @__PURE__ */ jsx(Skeleton, { variant: "rectangular", "aria-hidden": "true" }) : displayValue }),
102
108
  label && /* @__PURE__ */ jsx("span", { className: `${baseClass}__label`, children: label })
103
109
  ] })
104
110
  ]
@@ -48,10 +48,15 @@
48
48
  .ds-icon--tile {
49
49
  width: var(--control-height-default);
50
50
  height: var(--control-height-default);
51
- border-radius: var(--radius-pill);
51
+ border-radius: var(--ds-mark-radius, var(--radius-pill));
52
52
  background-color: var(--color-icon-bg);
53
53
  }
54
54
 
55
+ /* Round: the shared mark hook at a true circle, as Avatar's `round`. */
56
+ .ds-icon--round {
57
+ --ds-mark-radius: 50%;
58
+ }
59
+
55
60
  /* On the tile's fill the default glyph takes the primary text colour, the
56
61
  mark's established ink, so it holds its weight against the disc. */
57
62
  .ds-icon--tile.ds-icon--default {
@@ -13,6 +13,8 @@ type IconOwnProps = {
13
13
  label?: string;
14
14
  /** Sets the glyph on a round tile of the icon fill, the mark at the head of a stat card or a list row. */
15
15
  tile?: boolean;
16
+ /** With `tile`, draws the tile as a true circle whatever the theme's radius. A container's `roundMarks` (Table, DataTable) does the same for every tile inside it. */
17
+ round?: boolean;
16
18
  /** Additional CSS classes */
17
19
  className?: string;
18
20
  };
@@ -23,5 +25,5 @@ export interface IconProps extends IconOwnProps, Omit<React.ComponentPropsWithRe
23
25
  * draws one: beside a heading, at the head of a stat card, in a row of text.
24
26
  * Decorative unless it has a `label`. Presentational and server-renderable.
25
27
  */
26
- export declare function Icon({ name, size, tone, filled, label, tile, className, style, ref, ...rest }: IconProps): React.JSX.Element;
28
+ export declare function Icon({ name, size, tone, filled, label, tile, round, className, style, ref, ...rest }: IconProps): React.JSX.Element;
27
29
  export {};
@@ -10,6 +10,7 @@ function Icon({
10
10
  filled = false,
11
11
  label,
12
12
  tile = false,
13
+ round = false,
13
14
  className = "",
14
15
  style,
15
16
  ref,
@@ -21,6 +22,7 @@ function Icon({
21
22
  `ds-icon--${tone}`,
22
23
  filled ? "ds-icon--filled" : "",
23
24
  tile ? "ds-icon--tile" : "",
25
+ tile && round ? "ds-icon--round" : "",
24
26
  className
25
27
  ].filter(Boolean).join(" ");
26
28
  return /* @__PURE__ */ jsx(
@@ -3,6 +3,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
3
  import React, { useState, useRef } from "react";
4
4
  import "./ImageCompare.css";
5
5
  import "../../fonts/material-symbols.css";
6
+ import { LoadingImage } from "../../behaviors/LoadingImage.js";
6
7
  const clamp = (n) => Math.max(0, Math.min(100, n));
7
8
  const ImageCompare = React.forwardRef(
8
9
  ({
@@ -102,7 +103,7 @@ const ImageCompare = React.forwardRef(
102
103
  onPointerUp: endDrag,
103
104
  onPointerCancel: endDrag,
104
105
  children: [
105
- /* @__PURE__ */ jsx("img", { className: `${baseClass}__after`, src: afterSrc, alt: afterAlt, draggable: false }),
106
+ /* @__PURE__ */ jsx(LoadingImage, { className: `${baseClass}__after`, src: afterSrc, alt: afterAlt, draggable: false }),
106
107
  /* @__PURE__ */ jsx("div", { className: `${baseClass}__before-clip`, children: /* @__PURE__ */ jsx("img", { className: `${baseClass}__before`, src: beforeSrc, alt: beforeAlt, draggable: false }) }),
107
108
  showLabels && /* @__PURE__ */ jsxs(Fragment, { children: [
108
109
  /* @__PURE__ */ jsx("span", { className: `${baseClass}__label ${baseClass}__label--before`, "aria-hidden": "true", children: beforeLabel }),
@@ -98,7 +98,9 @@
98
98
  ERROR STATE
99
99
  ============================================ */
100
100
 
101
- .ds-input--error .ds-input__field {
101
+ /* The hover rule above is more specific, so the error border names it too. */
102
+ .ds-input--error .ds-input__field,
103
+ .ds-input--error .ds-input__field:hover:not(:focus):not(:disabled) {
102
104
  border-color: var(--color-status-error-border);
103
105
  }
104
106
 
@@ -133,7 +133,7 @@
133
133
 
134
134
  .ds-list--marker-check .ds-list__tick {
135
135
  display: flex;
136
- color: var(--color-status-positive-text);
136
+ color: var(--color-status-positive-icon);
137
137
  }
138
138
 
139
139
  .ds-list__tick-glyph {
@@ -316,4 +316,20 @@
316
316
  color: inherit;
317
317
  }
318
318
 
319
+ /* Loading: each placeholder row holds a round mark in the media slot beside
320
+ a title line and a body line. */
321
+
322
+ .ds-notification-center__placeholder {
323
+ display: flex;
324
+ flex: 1;
325
+ flex-direction: column;
326
+ gap: var(--gap-200);
327
+ min-width: 0;
328
+ }
329
+
330
+ .ds-notification-item--loading .ds-skeleton--circular {
331
+ width: var(--icon-size-800);
332
+ height: var(--icon-size-800);
333
+ }
334
+
319
335
  } /* @layer rift.components */
@@ -151,6 +151,10 @@ type NotificationCenterOwnProps = {
151
151
  emptyStateLabels?: Partial<Pick<EmptyStateProps, 'title' | 'description'>>;
152
152
  /** The BCP 47 locale the tab counts are written in, such as `ar-EG`. Defaults to the nearest LocaleProvider's, else `en-US`. */
153
153
  locale?: string;
154
+ /** Holds three placeholder rows, a mark beside two lines, in the list while the notifications are being fetched. The header, tabs and footer stay. */
155
+ loading?: boolean;
156
+ /** Accessible name announced while `loading`. */
157
+ loadingLabel?: string;
154
158
  /** Additional CSS classes */
155
159
  className?: string;
156
160
  /** The notifications, newest first — typically NotificationItems. */
@@ -10,6 +10,7 @@ import { DropdownMenu } from "../DropdownMenu/DropdownMenu.js";
10
10
  import "./NotificationCenter.css";
11
11
  import "../../behaviors/visually-hidden.css";
12
12
  import "../../fonts/material-symbols.css";
13
+ import { Skeleton } from "../Skeleton/Skeleton.js";
13
14
  import { useLocale } from "../../behaviors/LocaleProvider.js";
14
15
  import { useLinkComponent } from "../../behaviors/LinkProvider.js";
15
16
  const NotificationItem = React.forwardRef(
@@ -49,6 +50,11 @@ const NotificationItem = React.forwardRef(
49
50
  }
50
51
  );
51
52
  NotificationItem.displayName = "NotificationItem";
53
+ const LOADING_ROW_WIDTHS = [
54
+ ["58%", "82%"],
55
+ ["46%", "70%"],
56
+ ["64%", "76%"]
57
+ ];
52
58
  const NotificationCenter = React.forwardRef(
53
59
  ({
54
60
  title = "Notifications",
@@ -75,6 +81,8 @@ const NotificationCenter = React.forwardRef(
75
81
  seeAllLabel = "See all",
76
82
  linkComponent,
77
83
  locale: localeProp,
84
+ loading = false,
85
+ loadingLabel = "Loading",
78
86
  className = "",
79
87
  children,
80
88
  ...rest
@@ -143,7 +151,21 @@ const NotificationCenter = React.forwardRef(
143
151
  role: hasTabs ? "tabpanel" : void 0,
144
152
  id: hasTabs ? panelId : void 0,
145
153
  "aria-label": hasTabs && activeTabIndex >= 0 ? tabs[activeTabIndex].label : void 0,
146
- children: hasItems ? children : emptyState ?? /* @__PURE__ */ jsx(
154
+ "aria-busy": loading || void 0,
155
+ children: loading ? LOADING_ROW_WIDTHS.map(([titleWidth, bodyWidth], index) => /* @__PURE__ */ jsxs("div", { className: "ds-notification-item ds-notification-item--loading", children: [
156
+ /* @__PURE__ */ jsx("span", { className: "ds-notification-item__media", children: /* @__PURE__ */ jsx(Skeleton, { variant: "circular", "aria-hidden": "true" }) }),
157
+ /* @__PURE__ */ jsxs("div", { className: `${baseClass}__placeholder`, children: [
158
+ /* @__PURE__ */ jsx(
159
+ Skeleton,
160
+ {
161
+ variant: "text",
162
+ width: titleWidth,
163
+ ...index === 0 ? { loadingLabel } : { "aria-hidden": true }
164
+ }
165
+ ),
166
+ /* @__PURE__ */ jsx(Skeleton, { variant: "text", width: bodyWidth, "aria-hidden": "true" })
167
+ ] })
168
+ ] }, index)) : hasItems ? children : emptyState ?? /* @__PURE__ */ jsx(
147
169
  EmptyState,
148
170
  {
149
171
  icon: "notifications",
@@ -119,7 +119,9 @@
119
119
  ERROR STATE
120
120
  ============================================ */
121
121
 
122
+ /* The hover rule above is more specific, so the error border names it too. */
122
123
  .ds-numberinput--error .ds-numberinput__shell,
124
+ .ds-numberinput--error .ds-numberinput__shell:hover:not(:focus-within),
123
125
  .ds-numberinput--error .ds-numberinput__shell:focus-within {
124
126
  border-color: var(--color-status-error-border);
125
127
  }
@@ -66,15 +66,23 @@
66
66
  align-items: stretch;
67
67
  }
68
68
 
69
- .ds-page-header__actions {
70
- justify-content: stretch;
71
- }
72
-
73
69
  /* Each action starts at its own width and grows to share the row, so a
74
70
  label never squeezes: actions that cannot fit side by side wrap. */
75
71
  .ds-page-header__actions > * {
76
72
  flex: 1 1 auto;
77
73
  }
74
+
75
+ /* An action inside a Tooltip grows with its wrapper, or the wrapper
76
+ takes the room and the button sits at one end of it. */
77
+ .ds-page-header__actions > .ds-tooltip > .ds-button {
78
+ flex: 1 1 auto;
79
+ }
80
+
81
+ /* An icon-only action keeps its own box: the labelled ones share the row. */
82
+ .ds-page-header__actions > .ds-icon-button,
83
+ .ds-page-header__actions > .ds-tooltip:has(> .ds-icon-button) {
84
+ flex: 0 0 auto;
85
+ }
78
86
  }
79
87
 
80
88
  } /* @layer rift.components */
@@ -3,7 +3,7 @@ import { default as React } from 'react';
3
3
  type PanelOwnProps = {
4
4
  /** Interior padding: 'default' uses --padding-500, 'compact' uses --padding-400, 'none' removes it */
5
5
  padding?: 'default' | 'compact' | 'none';
6
- /** Draws the container border the Widget tile wears, so the panel keeps a visible edge in a theme whose page fill matches the panel's. */
6
+ /** Draws the container border the Widget tile wears. Pass it whenever the panel sits on a surface of its own fill, such as an app's content surface or a theme whose page matches the panel, so a KPI tile or a chart card keeps a visible edge. */
7
7
  bordered?: boolean;
8
8
  /** Additional CSS classes */
9
9
  className?: string;