@uniformdev/design-system 20.47.2-alpha.4 → 20.48.1-alpha.11

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
@@ -55,7 +55,59 @@ export default function Document() {
55
55
  }
56
56
  ```
57
57
 
58
- ### 2. Use Components
58
+ ### 2. Set up Providers (as needed)
59
+
60
+ Some components rely on React context providers to function correctly. Set them up as needed:
61
+
62
+ #### IconsProvider
63
+
64
+ Required by the `Icon` component when using string-based icon names (e.g. `icon="mail"`). Without the provider, you can still pass icon components directly.
65
+
66
+ ```tsx
67
+ import { IconsProvider, Icon } from '@uniformdev/design-system';
68
+
69
+ function App() {
70
+ return (
71
+ <IconsProvider>
72
+ <Icon icon="mail" />
73
+ </IconsProvider>
74
+ );
75
+ }
76
+ ```
77
+
78
+ **Direct consumers:** `Icon`
79
+ **Indirect consumers:** Any component that renders an `Icon` internally (e.g. `Button`, `Callout`, `Details`, `Menu`, and many more)
80
+
81
+ #### DrawerProvider
82
+
83
+ Optional for basic `Drawer` usage -- `Drawer` creates its own internal provider and renderer when no external `DrawerProvider` is present. An explicit `DrawerProvider` is only needed for shared drawer stacks (e.g. multiple drawers rendering into the same `DrawerRenderer`).
84
+
85
+ Required by `DrawerRenderer` and `TakeoverDrawerRenderer`, which must be rendered inside a `DrawerProvider`.
86
+
87
+ ```tsx
88
+ import { DrawerProvider, Drawer, DrawerRenderer } from '@uniformdev/design-system';
89
+
90
+ function App() {
91
+ return (
92
+ <DrawerProvider>
93
+ <Drawer id="my-drawer" header="Title">Content</Drawer>
94
+ <DrawerRenderer stackId="_default" />
95
+ </DrawerProvider>
96
+ );
97
+ }
98
+ ```
99
+
100
+ **Required by:** `DrawerRenderer`, `TakeoverDrawerRenderer`
101
+ **Optional for:** `Drawer` (self-sufficient for simple cases)
102
+
103
+ #### ParameterShell
104
+
105
+ Only required when using `*Inner` components directly (e.g. `ParameterInputInner`, `ParameterSelectInner`). The outer wrapper components (`ParameterInput`, `ParameterSelect`, etc.) create a `ParameterShell` automatically, so no external setup is needed for typical usage.
106
+
107
+ **Required by:** `ParameterInputInner`, `ParameterSelectInner`, `ParameterLinkInner`, `ParameterSelectSliderInner`, `ParameterToggleInner`, `ParameterNumberSliderInner`, `ParameterMultiSelectInner`, `ParameterTextareaInner`, `ParameterImageInner`
108
+ **Not required by:** `ParameterInput`, `ParameterSelect`, `ParameterLink`, and other outer wrappers (they provide it internally)
109
+
110
+ ### 3. Use Components
59
111
 
60
112
  ```tsx
61
113
  import { Button, Heading, Card, Input } from '@uniformdev/design-system';