@olwiba/ui 0.2.25 → 0.2.27
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/content/docs/app/app-shell.mdx +71 -0
- package/content/docs/app/auth-section.mdx +73 -0
- package/content/docs/app/billing-panel.mdx +38 -0
- package/content/docs/app/empty-state.mdx +47 -0
- package/content/docs/app/error-page.mdx +31 -0
- package/content/docs/app/index.mdx +13 -0
- package/content/docs/app/meta.json +4 -0
- package/content/docs/app/onboarding-wizard.mdx +41 -0
- package/content/docs/app/settings-section.mdx +37 -0
- package/content/docs/app/team-members-panel.mdx +35 -0
- package/content/docs/app/update-banner.mdx +43 -0
- package/content/docs/components/activity-feed.mdx +42 -0
- package/content/docs/components/chart.mdx +47 -0
- package/content/docs/components/command-menu.mdx +41 -0
- package/content/docs/components/confirm-dialog.mdx +26 -0
- package/content/docs/components/context-menu.mdx +26 -0
- package/content/docs/components/data-table.mdx +40 -0
- package/content/docs/components/dock.mdx +26 -0
- package/content/docs/components/feature-card.mdx +26 -0
- package/content/docs/components/file-upload.mdx +35 -0
- package/content/docs/components/full-page-spinner.mdx +44 -0
- package/content/docs/components/glass-card.mdx +26 -0
- package/content/docs/components/image-card.mdx +26 -0
- package/content/docs/components/index.mdx +49 -0
- package/content/docs/components/load-more.mdx +34 -0
- package/content/docs/components/meta.json +35 -0
- package/content/docs/components/notifications-popover.mdx +34 -0
- package/content/docs/components/notify.mdx +40 -0
- package/content/docs/components/olwiba-ui-context.mdx +69 -0
- package/content/docs/components/page-header.mdx +42 -0
- package/content/docs/components/pricing-card.mdx +26 -0
- package/content/docs/components/register-hotkeys.mdx +50 -0
- package/content/docs/components/root-error-fallback.mdx +39 -0
- package/content/docs/components/spotlight.mdx +26 -0
- package/content/docs/components/stat-card.mdx +26 -0
- package/content/docs/components/suspensed.mdx +42 -0
- package/content/docs/components/testimonial-card.mdx +26 -0
- package/content/docs/components/theme-color-updater.mdx +40 -0
- package/content/docs/components/theme-switch-minimal.mdx +32 -0
- package/content/docs/components/version-banner.mdx +44 -0
- package/content/docs/email/action-email.mdx +62 -0
- package/content/docs/email/email-layout.mdx +58 -0
- package/content/docs/email/email-link-fallback.mdx +46 -0
- package/content/docs/email/index.mdx +32 -0
- package/content/docs/email/meta.json +10 -0
- package/content/docs/email/notice-email.mdx +51 -0
- package/content/docs/hooks/index.mdx +21 -0
- package/content/docs/hooks/meta.json +16 -0
- package/content/docs/hooks/use-confirm.mdx +81 -0
- package/content/docs/hooks/use-controlled-open.mdx +53 -0
- package/content/docs/hooks/use-copy-to-clipboard.mdx +26 -0
- package/content/docs/hooks/use-debounce.mdx +26 -0
- package/content/docs/hooks/use-intersection-observer.mdx +26 -0
- package/content/docs/hooks/use-local-storage.mdx +26 -0
- package/content/docs/hooks/use-media-query.mdx +26 -0
- package/content/docs/hooks/use-mounted.mdx +39 -0
- package/content/docs/hooks/use-pagination.mdx +26 -0
- package/content/docs/hooks/use-scrolled-past.mdx +44 -0
- package/content/docs/index.mdx +68 -0
- package/content/docs/marketing/contact-section.mdx +16 -0
- package/content/docs/marketing/cta-section.mdx +31 -0
- package/content/docs/marketing/faq-section.mdx +16 -0
- package/content/docs/marketing/features-section.mdx +23 -0
- package/content/docs/marketing/footer.mdx +16 -0
- package/content/docs/marketing/hero-section.mdx +16 -0
- package/content/docs/marketing/index.mdx +22 -0
- package/content/docs/marketing/meta.json +20 -0
- package/content/docs/marketing/navbar.mdx +16 -0
- package/content/docs/marketing/newsletter-section.mdx +16 -0
- package/content/docs/marketing/post-list.mdx +32 -0
- package/content/docs/marketing/pricing-section.mdx +16 -0
- package/content/docs/marketing/stats-section.mdx +16 -0
- package/content/docs/marketing/steps-section.mdx +60 -0
- package/content/docs/marketing/team-section.mdx +16 -0
- package/content/docs/marketing/testimonials-section.mdx +16 -0
- package/content/docs/mechanics/carousel.mdx +42 -0
- package/content/docs/mechanics/index.mdx +11 -0
- package/content/docs/mechanics/meta.json +4 -0
- package/content/docs/mechanics/sortable.mdx +44 -0
- package/content/docs/meta.json +4 -0
- package/content/docs/motion/animated-swap.mdx +75 -0
- package/content/docs/motion/count-up.mdx +31 -0
- package/content/docs/motion/fade-in.mdx +34 -0
- package/content/docs/motion/index.mdx +12 -0
- package/content/docs/motion/meta.json +4 -0
- package/content/docs/motion/page-transition.mdx +29 -0
- package/content/docs/motion/stagger-children.mdx +31 -0
- package/content/docs/overlays/index.mdx +9 -0
- package/content/docs/overlays/meta.json +4 -0
- package/content/docs/overlays/overlay.mdx +60 -0
- package/content/docs/overlays/underlay.mdx +56 -0
- package/dist/email/index.d.ts +8 -1
- package/dist/email/index.js +3 -3
- package/dist/email/index.js.map +1 -1
- package/docs-manifest.json +253 -0
- package/package.json +18 -9
- package/site/demos/action-email.tsx +6 -0
- package/site/demos/activity-feed.tsx +42 -0
- package/site/demos/animated-swap.tsx +42 -0
- package/site/demos/app-shell.tsx +47 -0
- package/site/demos/app-ui-page.tsx +9 -0
- package/site/demos/application-sidebar-block.tsx +9 -0
- package/site/demos/auth-section.tsx +15 -0
- package/site/demos/auth-split-block.tsx +9 -0
- package/site/demos/billing-page.tsx +157 -0
- package/site/demos/billing-panel.tsx +26 -0
- package/site/demos/carousel.tsx +34 -0
- package/site/demos/chart.tsx +55 -0
- package/site/demos/command-menu.tsx +39 -0
- package/site/demos/confirm-dialog.tsx +27 -0
- package/site/demos/contact-form-block.tsx +3 -0
- package/site/demos/contact-section.tsx +2 -0
- package/site/demos/context-menu.tsx +30 -0
- package/site/demos/count-up.tsx +23 -0
- package/site/demos/cta-section.tsx +6 -0
- package/site/demos/dashboard-overview-block.tsx +9 -0
- package/site/demos/dashboard-shell-block.tsx +10 -0
- package/site/demos/data-table.tsx +47 -0
- package/site/demos/demo-brand.tsx +23 -0
- package/site/demos/dock.tsx +20 -0
- package/site/demos/document-sidebar-block.tsx +9 -0
- package/site/demos/email-examples.tsx +58 -0
- package/site/demos/email-frame.tsx +50 -0
- package/site/demos/email-layout.tsx +6 -0
- package/site/demos/email-link-fallback.tsx +6 -0
- package/site/demos/email-previews.generated.ts +11 -0
- package/site/demos/empty-state-block.tsx +3 -0
- package/site/demos/empty-state.tsx +23 -0
- package/site/demos/error-page.tsx +5 -0
- package/site/demos/fade-in.tsx +18 -0
- package/site/demos/faq-section.tsx +6 -0
- package/site/demos/feature-card.tsx +13 -0
- package/site/demos/features-section.tsx +6 -0
- package/site/demos/file-upload.tsx +16 -0
- package/site/demos/footer.tsx +42 -0
- package/site/demos/full-page-spinner.tsx +9 -0
- package/site/demos/glass-card.tsx +14 -0
- package/site/demos/glow-effect.tsx +3 -0
- package/site/demos/gradient-background.tsx +3 -0
- package/site/demos/grid-pattern.tsx +3 -0
- package/site/demos/hero-section.tsx +6 -0
- package/site/demos/image-card.tsx +17 -0
- package/site/demos/login-block.tsx +9 -0
- package/site/demos/marketing-cta-block.tsx +3 -0
- package/site/demos/marketing-demo-data.tsx +114 -0
- package/site/demos/marketing-faq-block.tsx +3 -0
- package/site/demos/marketing-features-block.tsx +3 -0
- package/site/demos/marketing-footer-block.tsx +3 -0
- package/site/demos/marketing-hero-block.tsx +10 -0
- package/site/demos/marketing-nav-block.tsx +3 -0
- package/site/demos/marketing-newsletter-block.tsx +3 -0
- package/site/demos/marketing-page.tsx +52 -0
- package/site/demos/marketing-pricing-block.tsx +3 -0
- package/site/demos/marketing-stats-block.tsx +3 -0
- package/site/demos/marketing-team-block.tsx +3 -0
- package/site/demos/marketing-testimonials-block.tsx +3 -0
- package/site/demos/navbar.tsx +32 -0
- package/site/demos/newsletter-section.tsx +2 -0
- package/site/demos/noise-overlay.tsx +3 -0
- package/site/demos/not-found-block.tsx +3 -0
- package/site/demos/notice-email.tsx +6 -0
- package/site/demos/notifications-popover.tsx +27 -0
- package/site/demos/notify.tsx +44 -0
- package/site/demos/olwiba-ui-context.tsx +51 -0
- package/site/demos/onboarding-block.tsx +3 -0
- package/site/demos/onboarding-wizard.tsx +43 -0
- package/site/demos/overlay.tsx +72 -0
- package/site/demos/page-header.tsx +15 -0
- package/site/demos/page-transition.tsx +34 -0
- package/site/demos/post-list.tsx +24 -0
- package/site/demos/pricing-card.tsx +27 -0
- package/site/demos/pricing-section.tsx +6 -0
- package/site/demos/register-hotkeys.tsx +39 -0
- package/site/demos/root-error-fallback.tsx +28 -0
- package/site/demos/settings-layout-block.tsx +3 -0
- package/site/demos/settings-section.tsx +22 -0
- package/site/demos/sign-in-page.tsx +10 -0
- package/site/demos/sortable.tsx +30 -0
- package/site/demos/spotlight.tsx +29 -0
- package/site/demos/stagger-children.tsx +16 -0
- package/site/demos/stat-card.tsx +12 -0
- package/site/demos/stats-section.tsx +6 -0
- package/site/demos/steps-section.tsx +66 -0
- package/site/demos/suspensed.tsx +31 -0
- package/site/demos/team-members-panel.tsx +26 -0
- package/site/demos/team-section.tsx +2 -0
- package/site/demos/testimonial-card.tsx +17 -0
- package/site/demos/testimonials-section.tsx +6 -0
- package/site/demos/theme-color-updater.tsx +32 -0
- package/site/demos/theme-switch-minimal.tsx +10 -0
- package/site/demos/underlay.tsx +74 -0
- package/site/demos/update-banner.tsx +31 -0
- package/site/demos/use-copy-to-clipboard.tsx +21 -0
- package/site/demos/use-debounce.tsx +25 -0
- package/site/demos/use-intersection-observer.tsx +32 -0
- package/site/demos/use-local-storage.tsx +22 -0
- package/site/demos/use-media-query.tsx +31 -0
- package/site/demos/use-pagination.tsx +31 -0
- package/site/demos/user-profile-block.tsx +3 -0
- package/site/demos/version-banner.tsx +27 -0
- package/site/lib/sandboxes.ts +1647 -0
- package/src/email/EmailLinkFallback.tsx +7 -1
- package/src/email/index.ts +3 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Dock
|
|
3
|
+
description: macOS-style icon dock with hover magnification animation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="dock" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Dock } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="Dock" props={[]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: FeatureCard
|
|
3
|
+
description: Icon, title, and description card with hover lift effect.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="feature-card" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { FeatureCard } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="FeatureCard" props={[]} />
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: FileUpload
|
|
3
|
+
description: Drag-and-drop file picker with a validated upload queue.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="file-upload" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { FileUpload } from "@olwiba/ui";
|
|
22
|
+
|
|
23
|
+
<FileUpload
|
|
24
|
+
multiple
|
|
25
|
+
accept="image/png,image/jpeg"
|
|
26
|
+
maxSizeMb={5}
|
|
27
|
+
hint="PNG or JPG, up to 5MB each"
|
|
28
|
+
/>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Progress and status are presentation-only — wire `files`/`onFilesChange` to your own upload layer to drive them, or leave the component uncontrolled and use `onFilesAdded` to kick off your own request per file.
|
|
32
|
+
|
|
33
|
+
## API Reference
|
|
34
|
+
|
|
35
|
+
<APIReference name="FileUpload" props={[]} />
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: FullPageSpinner
|
|
3
|
+
description: A centered full-page loading state for route-level suspense boundaries.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<ComponentPreview name="full-page-spinner" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { FullPageSpinner } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
<FullPageSpinner />
|
|
26
|
+
<FullPageSpinner message="Loading your workspace..." />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Use as a route-level suspense fallback:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Suspense } from "react";
|
|
33
|
+
|
|
34
|
+
<Suspense fallback={<FullPageSpinner message="Loading..." />}>
|
|
35
|
+
<Routes />
|
|
36
|
+
</Suspense>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## API Reference
|
|
40
|
+
|
|
41
|
+
<APIReference name="FullPageSpinner" props={[
|
|
42
|
+
{ name: "message", type: "string", default: "-" },
|
|
43
|
+
{ name: "className", type: "string", default: "-" },
|
|
44
|
+
]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: GlassCard
|
|
3
|
+
description: Frosted glass surface card with backdrop blur and translucent border.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="glass-card" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { GlassCard } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="GlassCard" props={[]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: ImageCard
|
|
3
|
+
description: Card with background image, gradient overlay, and content slot.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="image-card" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { ImageCard } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="ImageCard" props={[]} />
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Components
|
|
3
|
+
description: Interactive and card components provided by @olwiba/ui.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Smaller, focused components built on `@olwiba/cn` primitives.
|
|
7
|
+
|
|
8
|
+
## Interactive
|
|
9
|
+
|
|
10
|
+
| Component | Description |
|
|
11
|
+
|-----------|-------------|
|
|
12
|
+
| [Spotlight](/docs/components/spotlight) | Command palette with keyboard shortcut trigger and search |
|
|
13
|
+
| [Dock](/docs/components/dock) | macOS-style icon dock with hover magnification |
|
|
14
|
+
| [ContextMenu](/docs/components/context-menu) | Right-click context menu |
|
|
15
|
+
| [ConfirmDialog](/docs/components/confirm-dialog) | Modal confirmation dialog — pairs with the `useConfirm` hook |
|
|
16
|
+
|
|
17
|
+
## Data
|
|
18
|
+
|
|
19
|
+
| Component | Description |
|
|
20
|
+
|-----------|-------------|
|
|
21
|
+
| [DataTable](/docs/components/data-table) | Sortable, paginated data table with optional search and selection |
|
|
22
|
+
| [LoadMore](/docs/components/load-more) | Cursor-pagination footer with infinite scroll or a manual fallback |
|
|
23
|
+
|
|
24
|
+
## Cards
|
|
25
|
+
|
|
26
|
+
| Component | Description |
|
|
27
|
+
|-----------|-------------|
|
|
28
|
+
| [GlassCard](/docs/components/glass-card) | Frosted glass surface with backdrop blur |
|
|
29
|
+
| [FeatureCard](/docs/components/feature-card) | Icon, title, and description card |
|
|
30
|
+
| [StatCard](/docs/components/stat-card) | Metric card with value, label, and trend indicator |
|
|
31
|
+
| [TestimonialCard](/docs/components/testimonial-card) | Quote card with avatar and attribution |
|
|
32
|
+
| [PricingCard](/docs/components/pricing-card) | Single pricing tier with feature list and CTA |
|
|
33
|
+
| [ImageCard](/docs/components/image-card) | Card with background image and content overlay |
|
|
34
|
+
|
|
35
|
+
## Utility
|
|
36
|
+
|
|
37
|
+
| Component | Description |
|
|
38
|
+
|-----------|-------------|
|
|
39
|
+
| [Spinner](/docs/components/spinner) | Loading spinner |
|
|
40
|
+
| [FullPageSpinner](/docs/components/full-page-spinner) | Centered full-page loading state |
|
|
41
|
+
| [PageHeader](/docs/components/page-header) | Page title with description and action slot |
|
|
42
|
+
| [Suspensed](/docs/components/suspensed) | React.Suspense with a spinner fallback |
|
|
43
|
+
| [ThemeSwitchMinimal](/docs/components/theme-switch-minimal) | Dark / light mode toggle |
|
|
44
|
+
| [ThemeColorUpdater](/docs/components/theme-color-updater) | Syncs a color theme to `data-theme` on `<html>` |
|
|
45
|
+
| [VersionBanner](/docs/components/version-banner) | Dismissible version announcement banner |
|
|
46
|
+
| [RegisterHotkeys](/docs/components/register-hotkeys) | Declarative global keyboard shortcut registration |
|
|
47
|
+
| [RootErrorFallback](/docs/components/root-error-fallback) | Full-page error boundary fallback |
|
|
48
|
+
| [Kbd](/docs/components/kbd) | Keyboard shortcut badge |
|
|
49
|
+
| [OlwibaUIContext](/docs/components/olwiba-ui-context) | Context provider for shared app state |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: LoadMore
|
|
3
|
+
description: Cursor-pagination footer with guarded infinite scroll and a manual fallback.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
import { LoadMore } from "@olwiba/ui";
|
|
14
|
+
|
|
15
|
+
<LoadMore
|
|
16
|
+
hasNextPage={query.hasNextPage}
|
|
17
|
+
isFetchingNextPage={query.isFetchingNextPage}
|
|
18
|
+
fetchNextPage={query.fetchNextPage}
|
|
19
|
+
label="projects"
|
|
20
|
+
/>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use `auto={false}` when the content above has its own client-side pager. An always-visible sentinel below a paginated table would otherwise fetch every cursor page into memory immediately.
|
|
24
|
+
|
|
25
|
+
## API Reference
|
|
26
|
+
|
|
27
|
+
<APIReference name="LoadMore" props={[
|
|
28
|
+
{ name: "hasNextPage", type: "boolean", description: "Removes the footer when the cursor is exhausted." },
|
|
29
|
+
{ name: "isFetchingNextPage", type: "boolean", description: "Guards duplicate requests and controls loading feedback." },
|
|
30
|
+
{ name: "fetchNextPage", type: "() => void | Promise<unknown>", description: "Loads the next cursor page." },
|
|
31
|
+
{ name: "auto", type: "boolean", default: "true", description: "Use infinite scroll when true, or a manual button when false." },
|
|
32
|
+
{ name: "label", type: "string", default: '"more"', description: "Plural noun used in the manual button label." },
|
|
33
|
+
{ name: "rootMargin", type: "string", default: '"400px"', description: "IntersectionObserver prefetch margin." },
|
|
34
|
+
]} />
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Components",
|
|
3
|
+
"pages": [
|
|
4
|
+
"index",
|
|
5
|
+
"spotlight",
|
|
6
|
+
"dock",
|
|
7
|
+
"context-menu",
|
|
8
|
+
"confirm-dialog",
|
|
9
|
+
"command-menu",
|
|
10
|
+
"data-table",
|
|
11
|
+
"load-more",
|
|
12
|
+
"chart",
|
|
13
|
+
"file-upload",
|
|
14
|
+
"notify",
|
|
15
|
+
"notifications-popover",
|
|
16
|
+
"activity-feed",
|
|
17
|
+
"glass-card",
|
|
18
|
+
"feature-card",
|
|
19
|
+
"stat-card",
|
|
20
|
+
"testimonial-card",
|
|
21
|
+
"pricing-card",
|
|
22
|
+
"image-card",
|
|
23
|
+
"spinner",
|
|
24
|
+
"full-page-spinner",
|
|
25
|
+
"page-header",
|
|
26
|
+
"suspensed",
|
|
27
|
+
"theme-switch-minimal",
|
|
28
|
+
"theme-color-updater",
|
|
29
|
+
"version-banner",
|
|
30
|
+
"register-hotkeys",
|
|
31
|
+
"root-error-fallback",
|
|
32
|
+
"kbd",
|
|
33
|
+
"olwiba-ui-context"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: NotificationsPopover
|
|
3
|
+
description: Bell button with unread badge and a persistent notification inbox.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="notifications-popover" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { NotificationsPopover } from "@olwiba/ui";
|
|
22
|
+
|
|
23
|
+
<NotificationsPopover
|
|
24
|
+
notifications={notifications}
|
|
25
|
+
onMarkAllRead={() => markAllRead()}
|
|
26
|
+
onNotificationClick={(n) => { markRead(n.id); router.push(n.href); }}
|
|
27
|
+
/>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Complements `notify()` toasts: a toast announces an event as it happens, this popover holds the history. Presentation-only — pass `notifications` from your own data layer and persist read state in the callbacks. Unread items get a dot, a subtle background, and count toward the bell badge.
|
|
31
|
+
|
|
32
|
+
## API Reference
|
|
33
|
+
|
|
34
|
+
<APIReference name="NotificationsPopover" props={[]} />
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: notify
|
|
3
|
+
description: Rich toast notifications on top of sonner — one component, several variants.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="notify" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { notify } from "@olwiba/ui";
|
|
22
|
+
import { Toaster } from "@olwiba/cn";
|
|
23
|
+
|
|
24
|
+
// Mount once, e.g. in your root layout
|
|
25
|
+
<Toaster />
|
|
26
|
+
|
|
27
|
+
// Fire from anywhere
|
|
28
|
+
notify({ variant: "success", title: "Deploy complete", description: "Your project is live." });
|
|
29
|
+
notify({
|
|
30
|
+
variant: "message",
|
|
31
|
+
title: "New comment",
|
|
32
|
+
action: { label: "Reply", onClick: () => {} },
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`notify()` renders `NotificationToast` through sonner's `toast.custom` — swap the `variant` and pass `avatar`/`action`/`secondaryAction` rather than reaching for a different toast component per shape.
|
|
37
|
+
|
|
38
|
+
## API Reference
|
|
39
|
+
|
|
40
|
+
<APIReference name="NotifyOptions" props={[]} />
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: OlwibaUIContext
|
|
3
|
+
description: React context provider that supplies shared app state (isMobile) to the component tree.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<ComponentPreview name="olwiba-ui-context" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { OlwibaUIProvider, useOlwibaUI } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Wrap your app root — `isMobile` is auto-detected via `useIsMobile()` from `@olwiba/cn`:
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
<OlwibaUIProvider>
|
|
28
|
+
<App />
|
|
29
|
+
</OlwibaUIProvider>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Pass `mode` when an external store owns the current mode. The provider treats it as a controlled value and reacts when it changes:
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
<OlwibaUIProvider mode={mode}>
|
|
36
|
+
<App />
|
|
37
|
+
</OlwibaUIProvider>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
When `mode` is omitted, the provider starts at `default` and descendants may change it through `setMode` from `useOlwibaUI()`.
|
|
41
|
+
|
|
42
|
+
Override with a server-detected value to avoid hydration flicker:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
<OlwibaUIProvider isMobile={serverDetectedMobile}>
|
|
46
|
+
<App />
|
|
47
|
+
</OlwibaUIProvider>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Read the value from any child component:
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
function Sidebar() {
|
|
54
|
+
const { isMobile } = useOlwibaUI();
|
|
55
|
+
return isMobile ? <MobileNav /> : <DesktopSidebar />;
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## API Reference
|
|
60
|
+
|
|
61
|
+
<APIReference name="OlwibaUIProvider" props={[
|
|
62
|
+
{ name: "children", type: "ReactNode", default: "-" },
|
|
63
|
+
{ name: "isMobile", type: "boolean", default: "auto-detected" },
|
|
64
|
+
{ name: "mode", type: "'default' | 'playful' | 'smooth'", default: "internally managed from 'default'" },
|
|
65
|
+
]} />
|
|
66
|
+
|
|
67
|
+
<APIReference name="useOlwibaUI" props={[
|
|
68
|
+
{ name: "isMobile", type: "boolean", default: "-" },
|
|
69
|
+
]} />
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: PageHeader
|
|
3
|
+
description: A consistent top-of-page header with title, optional description, and an action slot.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<ComponentPreview name="page-header" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { PageHeader } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
<PageHeader
|
|
26
|
+
title="Team members"
|
|
27
|
+
description="Manage who has access to this workspace."
|
|
28
|
+
>
|
|
29
|
+
<Button>Invite member</Button>
|
|
30
|
+
</PageHeader>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`children` sit in a flex row aligned to the right of the title — ideal for primary CTAs or toolbar buttons.
|
|
34
|
+
|
|
35
|
+
## API Reference
|
|
36
|
+
|
|
37
|
+
<APIReference name="PageHeader" props={[
|
|
38
|
+
{ name: "title", type: "string", default: "-" },
|
|
39
|
+
{ name: "description", type: "string", default: "-" },
|
|
40
|
+
{ name: "className", type: "string", default: "-" },
|
|
41
|
+
{ name: "children", type: "ReactNode", default: "-" },
|
|
42
|
+
]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: PricingCard
|
|
3
|
+
description: Single pricing tier card with feature list and CTA button.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="pricing-card" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { PricingCard } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="PricingCard" props={[]} />
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: RegisterHotkeys
|
|
3
|
+
description: Declaratively register global keyboard shortcuts with modifier support.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<ComponentPreview name="register-hotkeys" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { RegisterHotkeys, type Hotkey } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
const hotkeys: Hotkey[] = [
|
|
26
|
+
{ key: 'k', meta: true, handler: () => openSearch(), description: 'Open search' },
|
|
27
|
+
{ key: 'Escape', handler: () => closeModal(), description: 'Close' },
|
|
28
|
+
{ key: '?', shift: true, handler: () => showHelp(), description: 'Show help' },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
<RegisterHotkeys hotkeys={hotkeys} />
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Attaches a single `keydown` listener on `document` — renders nothing, cleans up on unmount. Modifier matching is exact: `{ meta: true }` only fires when Meta is held and Ctrl/Shift/Alt are not.
|
|
35
|
+
|
|
36
|
+
## API Reference
|
|
37
|
+
|
|
38
|
+
<APIReference name="RegisterHotkeys" props={[
|
|
39
|
+
{ name: "hotkeys", type: "Hotkey[]", default: "-" },
|
|
40
|
+
]} />
|
|
41
|
+
|
|
42
|
+
<APIReference name="Hotkey" props={[
|
|
43
|
+
{ name: "key", type: "string", default: "-" },
|
|
44
|
+
{ name: "ctrl", type: "boolean", default: "false" },
|
|
45
|
+
{ name: "meta", type: "boolean", default: "false" },
|
|
46
|
+
{ name: "shift", type: "boolean", default: "false" },
|
|
47
|
+
{ name: "alt", type: "boolean", default: "false" },
|
|
48
|
+
{ name: "handler", type: "() => void", default: "-" },
|
|
49
|
+
{ name: "description", type: "string", default: "-" },
|
|
50
|
+
]} />
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: RootErrorFallback
|
|
3
|
+
description: A full-page error fallback for React error boundaries.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<ComponentPreview name="root-error-fallback" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { RootErrorFallback } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Compatible with `react-error-boundary`'s `FallbackComponent` prop out of the box:
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { ErrorBoundary } from "react-error-boundary";
|
|
28
|
+
|
|
29
|
+
<ErrorBoundary FallbackComponent={RootErrorFallback}>
|
|
30
|
+
<App />
|
|
31
|
+
</ErrorBoundary>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## API Reference
|
|
35
|
+
|
|
36
|
+
<APIReference name="RootErrorFallback" props={[
|
|
37
|
+
{ name: "error", type: "Error", default: "-" },
|
|
38
|
+
{ name: "resetErrorBoundary", type: "() => void", default: "-" },
|
|
39
|
+
]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Spotlight
|
|
3
|
+
description: Command palette shell with keyboard shortcut trigger and search input.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="spotlight" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { Spotlight } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="Spotlight" props={[]} />
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: StatCard
|
|
3
|
+
description: Metric card with value, label, and optional trend indicator.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<div className="flex flex-col md:flex-row items-center justify-start gap-2 mb-2">
|
|
7
|
+
<CopyCommandButton command="bun add @olwiba/ui" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<Sandbox id="stat-card" />
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
bun add @olwiba/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { StatCard } from "@olwiba/ui";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## API Reference
|
|
25
|
+
|
|
26
|
+
<APIReference name="StatCard" props={[]} />
|