@stackloop/ui 4.0.0 → 4.0.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.

Potentially problematic release.


This version of @stackloop/ui might be problematic. Click here for more details.

package/README.md CHANGED
@@ -165,6 +165,33 @@ Components with the `animate` prop:
165
165
 
166
166
  - `AudioRecorder`, `Badge`, `BottomSheet`, `Button`, `Card`, `CameraCapture`, `Checkbox`, `CountrySelect`, `DatePicker`, `Drawer`, `Dropdown`, `DualSlider`, `FileUploader`, `FloatingActionButton`, `Input`, `Modal`, `Pagination`, `PhoneInput`, `RadioPills`, `Select`, `Slider`, `Spinner`, `StepProgress`, `Table`, `Textarea`, `ThumbnailGrid`, `Toggle`, `ToastProvider`
167
167
 
168
+ ## Ripple Behavior
169
+
170
+ Ripple effects are **opt-in**. Initialize them once in your app entry file.
171
+
172
+ ```tsx
173
+ // main.tsx or index.tsx
174
+ import { setupRippleEffects } from '@stackloop/ui'
175
+
176
+ setupRippleEffects()
177
+ ```
178
+
179
+ After setup, ripple can apply to interactive elements (`button`, `a`, `[role="button"]`, and elements with `data-ripple="true"`).
180
+
181
+ - Disable ripple for a specific element:
182
+
183
+ ```html
184
+ <button data-ripple="false">No ripple</button>
185
+ ```
186
+
187
+ - Force ripple on a custom/non-button element:
188
+
189
+ ```html
190
+ <div role="button" data-ripple="true">Ripple enabled</div>
191
+ ```
192
+
193
+ Call `setupRippleEffects()` only once per app (for example in `main.tsx`) to avoid duplicate global listeners.
194
+
168
195
  **Checkbox**:
169
196
  - **Description:** Accessible checkbox with optional label and description.
170
197
  - **Props:**
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ interface FloatingPortalProps {
3
+ open: boolean;
4
+ anchorRef: React.RefObject<HTMLElement | null>;
5
+ placement: 'top' | 'bottom';
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ offset?: number;
9
+ matchWidth?: boolean;
10
+ }
11
+ export declare const FloatingPortal: React.FC<FloatingPortalProps>;
12
+ export {};