rift-ds 1.2.0 → 1.3.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 (46) hide show
  1. package/README.md +2 -2
  2. package/components/Chart/BarChart.js +1 -1
  3. package/components/Chart/ComboChart.js +1 -1
  4. package/components/Chart/Treemap.js +83 -6
  5. package/components/ColorPicker/ColorPicker.js +1 -1
  6. package/components/Composer/Composer.css +45 -3
  7. package/components/Composer/Composer.d.ts +14 -6
  8. package/components/Composer/Composer.js +25 -5
  9. package/components/DatePicker/DatePicker.css +1 -1
  10. package/components/EventCalendar/EventCalendar.css +2 -2
  11. package/components/FileInput/FileInput.css +1 -1
  12. package/components/Globe/Globe.d.ts +5 -3
  13. package/components/Globe/Globe.js +18 -2
  14. package/components/Inspector/Inspector.css +108 -3
  15. package/components/Inspector/InspectorColorPicker.d.ts +43 -0
  16. package/components/Inspector/InspectorColorPicker.js +51 -0
  17. package/components/Instructions/Instructions.css +4 -4
  18. package/components/Prose/Prose.css +27 -0
  19. package/components/Sparkline/Sparkline.css +2 -2
  20. package/components/Spinner/Spinner.css +1 -1
  21. package/components/Timeline/Timeline.css +1 -1
  22. package/components/WorldMap/land.d.ts +1 -1
  23. package/components/registry.json +10 -1
  24. package/components/registry.json.d.ts +10 -1
  25. package/components/registry.json.js +1 -1
  26. package/index.d.ts +1 -0
  27. package/index.js +2 -0
  28. package/package.json +1 -1
  29. package/tokens/motion.d.ts +2 -0
  30. package/tokens/motion.js +2 -0
  31. package/tokens/presets/contrast.css +2 -4
  32. package/tokens/presets/coral.css +2 -4
  33. package/tokens/presets/forest.css +2 -4
  34. package/tokens/presets/gold.css +4 -4
  35. package/tokens/presets/mono.css +0 -2
  36. package/tokens/presets/pink.css +4 -4
  37. package/tokens/presets/terminal.css +5 -4
  38. package/tokens/presets/violet.css +2 -4
  39. package/tokens/presets/warm.css +3 -4
  40. package/tokens/presets/zest.css +2 -4
  41. package/tokens/registry.json +1 -0
  42. package/tokens/registry.json.d.ts +1 -0
  43. package/tokens/registry.json.js +1 -1
  44. package/tokens/tokens-dark.css +8 -5
  45. package/tokens/tokens-light.css +4 -2
  46. package/tokens/tokens-motion.css +2 -0
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { jsxs, jsx } from "react/jsx-runtime";
3
+ import React from "react";
4
+ import { ColorPicker } from "../ColorPicker/ColorPicker.js";
5
+ import "./Inspector.css";
6
+ const InspectorColorPicker = React.forwardRef(
7
+ ({
8
+ label,
9
+ value,
10
+ defaultValue,
11
+ onValueChange,
12
+ showAlpha = false,
13
+ name,
14
+ disabled = false,
15
+ size = "default",
16
+ className = "",
17
+ ...rest
18
+ }, ref) => {
19
+ const baseId = React.useId();
20
+ const labelId = `${baseId}-label`;
21
+ const triggerId = `${baseId}-trigger`;
22
+ const classes = [
23
+ "ds-inspector-color-picker",
24
+ size === "compact" ? "ds-inspector-color-picker--compact" : "",
25
+ disabled ? "ds-inspector-color-picker--disabled" : "",
26
+ className
27
+ ].filter(Boolean).join(" ");
28
+ return /* @__PURE__ */ jsxs("div", { ...rest, ref, className: classes, children: [
29
+ /* @__PURE__ */ jsx("span", { id: labelId, className: "ds-inspector-color-picker__label", "aria-hidden": "true", children: label }),
30
+ /* @__PURE__ */ jsx(
31
+ ColorPicker,
32
+ {
33
+ id: triggerId,
34
+ "aria-labelledby": `${labelId} ${triggerId}-value`,
35
+ size,
36
+ value,
37
+ defaultValue,
38
+ onValueChange,
39
+ showAlpha,
40
+ showText: true,
41
+ name,
42
+ disabled
43
+ }
44
+ )
45
+ ] });
46
+ }
47
+ );
48
+ InspectorColorPicker.displayName = "InspectorColorPicker";
49
+ export {
50
+ InspectorColorPicker
51
+ };
@@ -64,14 +64,14 @@
64
64
  width: 32px;
65
65
  height: 32px;
66
66
  border-radius: var(--radius-pill);
67
- border: var(--border-025) solid var(--color-action-primary-border);
67
+ border: var(--border-025) solid var(--color-bg-container-border);
68
68
  background-color: transparent;
69
69
  flex-shrink: 0;
70
70
  }
71
71
 
72
72
  .ds-instructions__badge .material-symbols-rounded {
73
73
  --icon-size: var(--icon-size-600);
74
- color: var(--color-action-primary-bg);
74
+ color: var(--color-icon-primary);
75
75
  }
76
76
 
77
77
  .ds-instructions__number {
@@ -79,14 +79,14 @@
79
79
  font-size: var(--font-paragraph-sm-size);
80
80
  font-weight: var(--font-title-body-weight);
81
81
  line-height: 1;
82
- color: var(--color-action-primary-bg);
82
+ color: var(--color-text-secondary);
83
83
  }
84
84
 
85
85
  .ds-instructions__dot {
86
86
  width: 8px;
87
87
  height: 8px;
88
88
  border-radius: var(--radius-pill);
89
- background-color: var(--color-action-primary-bg);
89
+ background-color: var(--color-icon-primary);
90
90
  }
91
91
 
92
92
  .ds-instructions__connector {
@@ -173,6 +173,33 @@
173
173
  font-size: inherit;
174
174
  }
175
175
 
176
+ /* A renderer that maps fenced code to CodeBlock (for its copy button)
177
+ gets the same block rhythm, and the plain-pre panel and inline-code
178
+ chip step aside so CodeBlock's own chrome is the only chrome */
179
+ .ds-prose .ds-code-block {
180
+ margin: 0;
181
+ margin-block-end: var(--gap-400);
182
+ }
183
+
184
+ .ds-prose > .ds-code-block:last-child {
185
+ margin-block-end: 0;
186
+ }
187
+
188
+ .ds-prose .ds-code-block pre {
189
+ margin: 0;
190
+ padding: var(--padding-400);
191
+ overflow: auto;
192
+ background-color: transparent;
193
+ border: none;
194
+ border-radius: 0;
195
+ }
196
+
197
+ .ds-prose .ds-code-block code {
198
+ background-color: transparent;
199
+ border-radius: 0;
200
+ padding-inline: 0;
201
+ }
202
+
176
203
  /* ============================================
177
204
  BLOCKQUOTES
178
205
  Mirrors Reasoning's trace rail
@@ -12,7 +12,7 @@
12
12
  display: inline-block;
13
13
  vertical-align: middle;
14
14
  flex-shrink: 0;
15
- color: var(--color-action-primary-bg);
15
+ color: var(--color-chart-series-1);
16
16
  }
17
17
 
18
18
  /* Parts */
@@ -60,7 +60,7 @@
60
60
  /* Tones */
61
61
 
62
62
  .ds-sparkline--accent {
63
- color: var(--color-action-primary-bg);
63
+ color: var(--color-chart-series-1);
64
64
  }
65
65
 
66
66
  .ds-sparkline--positive {
@@ -52,7 +52,7 @@
52
52
  ============================================ */
53
53
 
54
54
  .ds-spinner--primary .ds-spinner__arc {
55
- stroke: var(--color-action-primary-bg);
55
+ stroke: var(--color-text-primary);
56
56
  }
57
57
 
58
58
  .ds-spinner--neutral .ds-spinner__arc {
@@ -331,7 +331,7 @@
331
331
  }
332
332
 
333
333
  .ds-timeline__role-bullets a {
334
- color: var(--color-action-primary-bg);
334
+ color: var(--color-action-primary-text-tertiary);
335
335
  font-weight: var(--font-paragraph-emphasis-weight);
336
336
  text-decoration: underline;
337
337
  text-decoration-color: transparent;