rift-ds 1.18.0 → 1.19.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 (50) hide show
  1. package/behaviors/useAnchoredPosition.d.ts +3 -1
  2. package/behaviors/useAnchoredPosition.js +1 -0
  3. package/behaviors/useTopLayer.d.ts +35 -0
  4. package/behaviors/useTopLayer.js +22 -0
  5. package/chat/ChatLauncher.js +23 -0
  6. package/chat/ChatWidget.css +8 -3
  7. package/components/AiButton/AiButton.css +11 -0
  8. package/components/AiButton/AiButton.d.ts +2 -0
  9. package/components/AiButton/AiButton.js +3 -1
  10. package/components/AppSidebar/AppSidebar.css +59 -9
  11. package/components/AppSidebar/AppSidebar.d.ts +2 -2
  12. package/components/AppSidebar/AppSidebar.js +15 -9
  13. package/components/Chart/BarChart.js +1 -0
  14. package/components/Chart/Chart.css +6 -0
  15. package/components/Chart/ComboChart.js +1 -0
  16. package/components/Chart/StackedBarChart.js +1 -0
  17. package/components/CommandPaletteTrigger/CommandPaletteTrigger.css +13 -1
  18. package/components/Composer/Composer.css +72 -0
  19. package/components/Composer/Composer.d.ts +5 -1
  20. package/components/Composer/Composer.js +8 -1
  21. package/components/DataTable/DataTable.css +7 -3
  22. package/components/Popover/Popover.d.ts +2 -0
  23. package/components/Popover/Popover.js +2 -1
  24. package/components/SegmentedControl/SegmentedControl.css +3 -1
  25. package/components/SegmentedControl/SegmentedControl.js +2 -0
  26. package/components/SidebarPanel/SidebarPanel.css +10 -2
  27. package/components/SidebarPanel/SidebarPanel.d.ts +1 -1
  28. package/components/SidebarPanel/SidebarPanel.js +5 -2
  29. package/components/SiteHeader/SiteHeader.css +63 -5
  30. package/components/SiteHeader/SiteHeader.d.ts +11 -3
  31. package/components/SiteHeader/SiteHeader.js +51 -16
  32. package/components/SourceChip/SourceChip.css +5 -1
  33. package/components/SourceChip/SourceChip.js +3 -0
  34. package/components/TableToolbar/TableToolbar.css +130 -1
  35. package/components/TableToolbar/TableToolbar.d.ts +52 -0
  36. package/components/TableToolbar/TableToolbar.js +232 -32
  37. package/components/ThemeToggle/ThemeToggle.css +26 -0
  38. package/components/ThemeToggle/ThemeToggle.d.ts +11 -1
  39. package/components/ThemeToggle/ThemeToggle.js +36 -5
  40. package/components/Toast/Toast.css +4 -0
  41. package/components/Toast/Toast.d.ts +9 -0
  42. package/components/Toast/Toast.js +9 -2
  43. package/components/Tooltip/Tooltip.css +9 -4
  44. package/components/Tooltip/Tooltip.d.ts +4 -2
  45. package/components/Tooltip/Tooltip.js +16 -4
  46. package/index.js +2 -1
  47. package/package.json +1 -1
  48. package/tokens/motion.d.ts +2 -0
  49. package/tokens/motion.js +2 -0
  50. package/tokens/tokens-light.css +4 -3
@@ -3,6 +3,7 @@ import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import React, { useState, useRef, useId, useEffect, isValidElement, cloneElement } from "react";
4
4
  import { useLayer } from "../../behaviors/useLayer.js";
5
5
  import { useAnchoredPosition } from "../../behaviors/useAnchoredPosition.js";
6
+ import { useTopLayer } from "../../behaviors/useTopLayer.js";
6
7
  import "./Tooltip.css";
7
8
  import { MOTION_HOVER_SHOW_DELAY_MS, MOTION_HOVER_HIDE_DELAY_MS } from "../../tokens/motion.js";
8
9
  const clamp = (value, min, max) => max < min ? min : Math.min(Math.max(value, min), max);
@@ -54,6 +55,7 @@ const Tooltip = React.forwardRef(
54
55
  setVisible(false);
55
56
  }
56
57
  });
58
+ useTopLayer({ open: visible, panelRef });
57
59
  useAnchoredPosition({
58
60
  open: visible,
59
61
  anchorRef,
@@ -103,10 +105,20 @@ const Tooltip = React.forwardRef(
103
105
  },
104
106
  children: [
105
107
  trigger,
106
- /* @__PURE__ */ jsxs("span", { ref: panelRef, className: panelClasses, role: "tooltip", id: tooltipId, children: [
107
- content,
108
- /* @__PURE__ */ jsx("span", { className: `${baseClass}__arrow` })
109
- ] })
108
+ /* @__PURE__ */ jsxs(
109
+ "span",
110
+ {
111
+ ref: panelRef,
112
+ className: panelClasses,
113
+ role: "tooltip",
114
+ id: tooltipId,
115
+ popover: "manual",
116
+ children: [
117
+ content,
118
+ /* @__PURE__ */ jsx("span", { className: `${baseClass}__arrow` })
119
+ ]
120
+ }
121
+ )
110
122
  ]
111
123
  }
112
124
  );
package/index.js CHANGED
@@ -147,7 +147,7 @@ import { ThreadPanel } from "./components/ThreadPanel/ThreadPanel.js";
147
147
  import { ThreadTabs } from "./components/ThreadTabs/ThreadTabs.js";
148
148
  import { Timeline } from "./components/Timeline/Timeline.js";
149
149
  import { TimePicker } from "./components/TimePicker/TimePicker.js";
150
- import { Toast, ToastProvider, useToast } from "./components/Toast/Toast.js";
150
+ import { Toast, ToastProvider, useOptionalToast, useToast } from "./components/Toast/Toast.js";
151
151
  import { ToggleGroup } from "./components/ToggleGroup/ToggleGroup.js";
152
152
  import { SwitchIndicator, ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.js";
153
153
  import { Toolbar, ToolbarSeparator } from "./components/Toolbar/Toolbar.js";
@@ -386,6 +386,7 @@ export {
386
386
  useAttachments,
387
387
  useColorMode,
388
388
  useField,
389
+ useOptionalToast,
389
390
  useShaderField,
390
391
  useStreamReveal,
391
392
  useToast
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rift-ds",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "An AI-ready React design system: accessible components on composable tokens, light/dark theming, and CSS-variable overrides.",
5
5
  "author": {
6
6
  "name": "Robert Ritacca",
@@ -18,6 +18,8 @@ export declare const MOTION_HOVER_SHOW_DELAY_MS = 300;
18
18
  export declare const MOTION_HOVER_HIDE_DELAY_MS = 150;
19
19
  /** How long a transient notification stays before dismissing itself. */
20
20
  export declare const MOTION_AUTO_DISMISS_MS = 5000;
21
+ /** How long a notification carrying an action, such as an Undo, stays before dismissing itself: time to read it and decide. */
22
+ export declare const MOTION_ACTION_DISMISS_MS = 10000;
21
23
  /** How long an exiting element's unmount waits for its CSS exit animation — mirrors --motion-duration-base. */
22
24
  export declare const MOTION_EXIT_SYNC_MS = 200;
23
25
  /** Interval between automatic slide advances. */
package/tokens/motion.js CHANGED
@@ -1,6 +1,7 @@
1
1
  const MOTION_HOVER_SHOW_DELAY_MS = 300;
2
2
  const MOTION_HOVER_HIDE_DELAY_MS = 150;
3
3
  const MOTION_AUTO_DISMISS_MS = 5e3;
4
+ const MOTION_ACTION_DISMISS_MS = 1e4;
4
5
  const MOTION_EXIT_SYNC_MS = 200;
5
6
  const MOTION_AUTOPLAY_INTERVAL_MS = 5e3;
6
7
  const MOTION_FEEDBACK_RESET_MS = 2e3;
@@ -24,6 +25,7 @@ const MOTION_CONTEXT_RESTORE_WAIT_MS = 700;
24
25
  const MOTION_ANNOUNCE_DEBOUNCE_MS = 500;
25
26
  const MOTION_SHORTCUT_SEQUENCE_MS = 1e3;
26
27
  export {
28
+ MOTION_ACTION_DISMISS_MS,
27
29
  MOTION_ANNOUNCE_DEBOUNCE_MS,
28
30
  MOTION_AUTOPLAY_INTERVAL_MS,
29
31
  MOTION_AUTO_DISMISS_MS,
@@ -299,8 +299,9 @@
299
299
  --color-pixel-ink-5: var(--primitive-blue-07);
300
300
  --color-pixel-ink-6: var(--primitive-purple-08);
301
301
 
302
- /* Count badge - The solid pill a count rides on an icon's corner (a
303
- toolbar's filter count, a tab's unread count, a bar's dot): the error
302
+ /* Count badge - The solid pill a count rides on an icon's corner or
303
+ trails a row with (a toolbar's filter count, a tab's unread count, a
304
+ nav row's count, a bar's dot): the error
304
305
  ramp at a step its figures read on, so it is seen at a glance. */
305
306
  --color-count-badge-bg: var(--primitive-red-08);
306
307
  --color-count-badge-text: var(--primitive-neutral-01);
@@ -399,7 +400,7 @@
399
400
  a modal sits level with the app rail it covers by DOM order. */
400
401
  --layer-dropdown: 10; /* menus and panels anchored to a control */
401
402
  --layer-sticky: 10; /* bars pinned to an edge while the page scrolls */
402
- --layer-floating: 50; /* tooltips, hover cards, context menus */
403
+ --layer-floating: 50; /* hover cards, context menus; tooltips without the top layer */
403
404
  --layer-nav: 80; /* fixed mobile navigation and its trigger */
404
405
  --layer-nav-scrim: 90; /* the scrim behind the mobile nav drawer */
405
406
  --layer-nav-rail: 100; /* the app rail and its open mobile drawer */