@underverse-ui/underverse 1.0.192 → 1.0.194
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 +27 -0
- package/api-reference.json +1 -1
- package/dist/index.cjs +1247 -620
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +106 -1
- package/dist/index.d.ts +106 -1
- package/dist/index.js +906 -278
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -282,6 +282,33 @@ function App() {
|
|
|
282
282
|
}
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
+
### AccessDenied (Interactive 403 / Upgrade State)
|
|
286
|
+
|
|
287
|
+
The `AccessDenied` component renders a premium, highly interactive card for 403 Forbidden, 401 Unauthorized, or license upgrade restrictions.
|
|
288
|
+
- **Interactive Robot Face**: Features an SVG illustration whose pupil tracks the cursor position in real-time. Includes an emergency flashing alarm light color-synced with the active variant.
|
|
289
|
+
- **Spotlight Flashlight**: Hovering over the card casts a radial gradient spotlight that reveals a glowing, drop-shadowed status text (e.g., `"403"` or `"PRO"`) under the cursor's path.
|
|
290
|
+
- **Customizable Code**: Customize the background status code or text using the `code` prop. Font size automatically shrinks if the length exceeds 3 characters.
|
|
291
|
+
- **Icon Fallback**: Supports passing a custom React component to `icon` to render a glassmorphic static icon stage instead of the interactive robot face.
|
|
292
|
+
|
|
293
|
+
#### Usage Example
|
|
294
|
+
|
|
295
|
+
```tsx
|
|
296
|
+
import { AccessDenied, Button } from "@underverse-ui/underverse";
|
|
297
|
+
|
|
298
|
+
function App() {
|
|
299
|
+
return (
|
|
300
|
+
<AccessDenied
|
|
301
|
+
title="Tính năng cần nâng cấp"
|
|
302
|
+
description="Báo cáo và phân tích trên Trang chủ chưa có trong gói license hiện tại. Hãy nâng cấp gói để sử dụng tính năng này."
|
|
303
|
+
variant="warning" // "destructive" | "warning" | "info"
|
|
304
|
+
code="PRO" // Customize background flashlight status text
|
|
305
|
+
>
|
|
306
|
+
<Button variant="warning">Nâng cấp gói ngay</Button>
|
|
307
|
+
</AccessDenied>
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
285
312
|
## Exported Components
|
|
286
313
|
|
|
287
314
|
### Core Components
|