@redis-ui/components 51.7.1 → 51.7.2

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.
package/README.md CHANGED
@@ -30,15 +30,18 @@ Components read all design tokens (colors, spacing, typography, etc.) from a sty
30
30
 
31
31
  You also need to render the `CommonStyles` global style component inside the theme provider. It applies theme-aware base styles to the body, scrollbars, and reduced-motion preferences.
32
32
 
33
+ Finally, wrap the app in `TooltipProvider`. Every `Tooltip`, including tooltips rendered inside other components, throws at render time without it.
34
+
33
35
  ```tsx
34
36
  import { ThemeProvider } from 'styled-components';
35
37
  import { themes, CommonStyles } from '@redis-ui/styles';
38
+ import { TooltipProvider } from '@redis-ui/components';
36
39
 
37
40
  function App() {
38
41
  return (
39
42
  <ThemeProvider theme={themes.light}>
40
43
  <CommonStyles />
41
- {/* your app */}
44
+ <TooltipProvider>{/* your app */}</TooltipProvider>
42
45
  </ThemeProvider>
43
46
  );
44
47
  }
@@ -59,6 +62,7 @@ For automatic light/dark mode switching with persistence, use the `SwitchableMod
59
62
 
60
63
  ```tsx
61
64
  import { SwitchableModeThemeProvider, themes, CommonStyles } from '@redis-ui/styles';
65
+ import { TooltipProvider } from '@redis-ui/components';
62
66
 
63
67
  function App() {
64
68
  return (
@@ -68,7 +72,7 @@ function App() {
68
72
  storageKey="redis-ui-theme-mode"
69
73
  >
70
74
  <CommonStyles />
71
- {/* your app */}
75
+ <TooltipProvider>{/* your app */}</TooltipProvider>
72
76
  </SwitchableModeThemeProvider>
73
77
  );
74
78
  }
@@ -92,8 +96,8 @@ function MyPage() {
92
96
 
93
97
  ## Documentation
94
98
 
95
- - **Storybook**: every component with live examples, props tables and composition guides: https://redislabsdev.github.io/redis-ui/
96
- - **Agent skill**: `skills/redis-ui-components` ships in this package, with a reference per component. See [Redis UI Skills](https://github.com/redislabsdev/redis-ui#redis-ui-skills) to link it into your project.
99
+ - **Storybook**: live examples, props tables and composition guides for the components: https://redislabsdev.github.io/redis-ui/
100
+ - **Agent skill**: `skills/redis-ui-components` ships in this package, with a reference for nearly every component (`Skeleton` and `TreeView` are still missing). See [Redis UI Skills](https://github.com/redislabsdev/redis-ui#redis-ui-skills) to link it into your project.
97
101
  - **Release notes**: [GitHub Releases](https://github.com/redislabsdev/redis-ui/releases)
98
102
 
99
103
  ## Contributing
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@redis-ui/components",
3
3
  "license": "UNLICENSED",
4
- "version": "51.7.1",
4
+ "version": "51.7.2",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "repository": "git@github.com:redislabsdev/redis-ui.git",
@@ -8,7 +8,13 @@ Popup component triggered by pointer hover, with customizable content, controlle
8
8
  import { Tooltip, TooltipProvider } from '@redis-ui/components';
9
9
  ```
10
10
 
11
- > `TooltipProvider` is exported alongside `Tooltip` and sets the shared hover delay (`openDelayDuration`, default `0`).
11
+ > **`TooltipProvider` is required.** Every `Tooltip` (including tooltips rendered inside other components) must have a `TooltipProvider` ancestor, or it throws at render time. Mount one once near the app root, inside the theme provider. It also sets the shared hover delay (`openDelayDuration`, default `0`). The examples below assume it is already mounted.
12
+ >
13
+ > ```tsx
14
+ > <TooltipProvider>
15
+ > <App />
16
+ > </TooltipProvider>
17
+ > ```
12
18
 
13
19
  > Examples that use `InfoIcon` also import it from `@redis-ui/icons`.
14
20
 
@@ -626,7 +632,7 @@ function Render() {
626
632
 
627
633
  ## Notes
628
634
 
629
- - `TooltipProvider` defaults `openDelayDuration` to `0`.
635
+ - `TooltipProvider` is required: without an ancestor provider, `Tooltip` throws (it is built on Radix Tooltip). It defaults `openDelayDuration` to `0`.
630
636
  - `Tooltip.Content` hides itself when `content` is falsy.
631
637
  - `Tooltip.Trigger` can wrap plain text, SVG, or multi-element triggers by setting `withButton`.
632
638
  - `Tooltip.Compose` supports controlled and uncontrolled open state.