@reinvented/design 1.0.0 → 1.2.0
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 +1 -1
- package/SKILL.md +214 -0
- package/package.json +4 -3
- package/skills/apps/analytics.md +103 -0
- package/skills/apps/booking-scheduling.md +97 -0
- package/skills/apps/content-management.md +52 -0
- package/skills/apps/crm.md +80 -0
- package/skills/apps/e-commerce.md +109 -0
- package/skills/apps/education.md +79 -0
- package/skills/apps/finance.md +68 -0
- package/skills/apps/health-fitness.md +72 -0
- package/skills/apps/marketplace.md +99 -0
- package/skills/apps/messaging.md +84 -0
- package/skills/apps/portfolio-personal.md +90 -0
- package/skills/apps/project-management.md +95 -0
- package/skills/apps/saas-dashboard.md +104 -0
- package/skills/apps/social-platform.md +50 -0
- package/skills/blocks/auth.md +106 -0
- package/skills/blocks/communication.md +98 -0
- package/skills/blocks/content.md +107 -0
- package/skills/blocks/data-management.md +109 -0
- package/skills/blocks/data-viz.md +92 -0
- package/skills/blocks/ecommerce.md +126 -0
- package/skills/blocks/feedback.md +97 -0
- package/skills/blocks/filtering.md +127 -0
- package/skills/blocks/marketing.md +136 -0
- package/skills/blocks/media.md +102 -0
- package/skills/blocks/navigation.md +136 -0
- package/skills/blocks/onboarding.md +75 -0
- package/skills/blocks/profiles.md +131 -0
- package/skills/blocks/scheduling.md +117 -0
- package/skills/blocks/settings.md +102 -0
- package/skills/components/advanced-components.md +142 -0
- package/skills/components/avatar.md +92 -0
- package/skills/components/badge.md +105 -0
- package/skills/components/button.md +87 -0
- package/skills/components/card.md +144 -0
- package/skills/components/chart.md +88 -0
- package/skills/components/dialog.md +109 -0
- package/skills/components/dropdown-menu.md +117 -0
- package/skills/components/extended-components.md +187 -0
- package/skills/components/feedback.md +165 -0
- package/skills/components/form.md +112 -0
- package/skills/components/input.md +107 -0
- package/skills/components/map.md +53 -0
- package/skills/components/navigation.md +73 -0
- package/skills/components/overlay.md +77 -0
- package/skills/components/page-header.md +51 -0
- package/skills/components/select.md +175 -0
- package/skills/components/table.md +102 -0
- package/skills/components/tabs.md +105 -0
- package/skills/components/utilities.md +138 -0
- package/skills/devices/desktop.md +43 -0
- package/skills/devices/mobile.md +77 -0
- package/skills/foundation/design-principles.md +77 -0
- package/skills/foundation/design-tokens.md +121 -0
- package/skills/foundation/mockup-generation.md +118 -0
- package/skills/foundation/rules.md +54 -0
- package/skills/foundation/tailwind-usage.md +204 -0
- package/skills/layouts/dashboard.md +71 -0
- package/skills/layouts/full-page-form.md +75 -0
- package/skills/layouts/list-detail.md +70 -0
- package/skills/layouts/marketing.md +70 -0
- package/skills/layouts/responsive.md +67 -0
- package/skills/layouts/settings-page.md +106 -0
- package/skills/layouts/sidebar.md +73 -0
- package/skills/layouts/topbar.md +68 -0
- package/skills/patterns/auth.md +131 -0
- package/skills/patterns/content-display.md +164 -0
- package/skills/patterns/dashboards.md +104 -0
- package/skills/patterns/data-tables.md +113 -0
- package/skills/patterns/empty-states.md +71 -0
- package/skills/patterns/error-states.md +73 -0
- package/skills/patterns/forms.md +136 -0
- package/skills/patterns/loading-states.md +92 -0
- package/skills/patterns/navigation.md +113 -0
- package/skills/patterns/notifications.md +91 -0
- package/skills/patterns/onboarding.md +42 -0
- package/skills/patterns/search.md +55 -0
- package/skills/patterns/settings.md +132 -0
- package/skills/patterns/user-profiles.md +67 -0
- package/skills/personas/business-operator.md +114 -0
- package/skills/personas/consumer-casual.md +60 -0
- package/skills/personas/consumer-power-user.md +109 -0
- package/skills/personas/creative-professional.md +109 -0
- package/skills/personas/enterprise-admin.md +134 -0
- package/skills/visual/color-usage.md +62 -0
- package/skills/visual/dark-mode.md +50 -0
- package/skills/visual/polish-techniques.md +101 -0
- package/skills/visual/spacing-composition.md +69 -0
- package/skills/visual/transitions-animations.md +66 -0
- package/skills/visual/typography-hierarchy.md +66 -0
- package/src/components/blocks/auth/auth-card/AuthCard.tsx +2 -2
- package/src/components/blocks/auth/social-login/SocialLoginGroup.tsx +2 -2
- package/src/components/blocks/auth/two-factor/TwoFactorForm.tsx +4 -4
- package/src/components/blocks/communication/activity-item/ActivityItem.tsx +1 -1
- package/src/components/blocks/communication/activity-item/ActivityItemAvatar.tsx +2 -2
- package/src/components/blocks/communication/activity-item/ActivityItemContent.tsx +1 -1
- package/src/components/blocks/communication/chat-bubble/ChatBubble.tsx +1 -1
- package/src/components/blocks/communication/chat-bubble/ChatBubbleAvatar.tsx +2 -2
- package/src/components/blocks/communication/chat-bubble/ChatBubbleMessage.tsx +1 -1
- package/src/components/blocks/communication/chat-bubble/ChatBubbleTimestamp.tsx +1 -1
- package/src/components/blocks/content/article-header/ArticleHeader.tsx +3 -3
- package/src/components/blocks/content/author-card/AuthorCard.tsx +4 -4
- package/src/components/blocks/content/rich-text/RichTextContent.tsx +1 -1
- package/src/components/blocks/data-management/kanban/KanbanBoard.tsx +1 -1
- package/src/components/blocks/data-management/kanban/KanbanCard.tsx +4 -4
- package/src/components/blocks/data-management/kanban/KanbanColumn.tsx +3 -3
- package/src/components/blocks/data-management/tree-view/TreeItem.tsx +2 -2
- package/src/components/blocks/data-management/tree-view/TreeView.tsx +1 -1
- package/src/components/blocks/data-viz/financial-ticker/FinancialTicker.tsx +1 -1
- package/src/components/blocks/data-viz/kpi-card/KpiCard.tsx +2 -2
- package/src/components/blocks/data-viz/stat-grid/StatGrid.tsx +1 -1
- package/src/components/blocks/ecommerce/pricing-tier/PricingFeatureList.tsx +2 -2
- package/src/components/blocks/ecommerce/pricing-tier/PricingHeader.tsx +2 -2
- package/src/components/blocks/ecommerce/pricing-tier/PricingTier.tsx +2 -2
- package/src/components/blocks/ecommerce/product-card/ProductCard.tsx +2 -2
- package/src/components/blocks/ecommerce/product-card/ProductCardContent.tsx +2 -2
- package/src/components/blocks/ecommerce/product-card/ProductCardImage.tsx +1 -1
- package/src/components/blocks/ecommerce/product-card/ProductCardPrice.tsx +1 -1
- package/src/components/blocks/ecommerce/rating-summary/RatingStars.tsx +1 -1
- package/src/components/blocks/feedback/empty-state/EmptyState.tsx +2 -2
- package/src/components/blocks/feedback/error-state/ErrorState.tsx +2 -2
- package/src/components/blocks/feedback/not-found/NotFoundState.tsx +2 -2
- package/src/components/blocks/filtering/faceted-sidebar/FacetedGroup.tsx +2 -2
- package/src/components/blocks/filtering/faceted-sidebar/FacetedSidebar.tsx +2 -2
- package/src/components/blocks/filtering/filter-bar/FilterBar.tsx +4 -4
- package/src/components/blocks/filtering/search-result/SearchResultItem.tsx +2 -2
- package/src/components/blocks/marketing/cta-block/CtaBlock.tsx +2 -2
- package/src/components/blocks/marketing/feature-grid/FeatureGrid.tsx +1 -1
- package/src/components/blocks/marketing/hero-section/HeroSection.tsx +3 -3
- package/src/components/blocks/marketing/testimonial-card/TestimonialCard.tsx +3 -3
- package/src/components/blocks/media/call-controls/CallControlButton.tsx +3 -3
- package/src/components/blocks/media/call-controls/CallControls.tsx +1 -1
- package/src/components/blocks/media/media-player/MediaPlayer.tsx +1 -1
- package/src/components/blocks/media/media-player/MediaPlayerControls.tsx +1 -1
- package/src/components/blocks/media/media-player/MediaPlayerScrubber.tsx +1 -1
- package/src/components/blocks/media/media-player/MediaPlayerVideo.tsx +1 -1
- package/src/components/blocks/navigation/app-sidebar/AppSidebar.tsx +2 -2
- package/src/components/blocks/navigation/app-sidebar/NavItem.tsx +1 -1
- package/src/components/blocks/navigation/context-switcher/ContextSwitcher.tsx +3 -3
- package/src/components/blocks/navigation/top-navbar/TopNavbar.tsx +2 -2
- package/src/components/blocks/onboarding/onboarding-welcome/OnboardingWelcome.tsx +3 -3
- package/src/components/blocks/onboarding/step-wizard/StepWizard.tsx +1 -1
- package/src/components/blocks/profiles/connection-list/ConnectionItem.tsx +3 -3
- package/src/components/blocks/profiles/connection-list/ConnectionList.tsx +1 -1
- package/src/components/blocks/profiles/profile-header/ProfileHeader.tsx +3 -3
- package/src/components/blocks/profiles/profile-stats/ProfileStats.tsx +1 -1
- package/src/components/blocks/scheduling/booking-slot/BookingSlot.tsx +1 -1
- package/src/components/blocks/scheduling/event-card/EventCard.tsx +3 -3
- package/src/components/blocks/scheduling/timeline-row/TimelineRow.tsx +2 -2
- package/src/components/blocks/settings/billing-usage/BillingUsage.tsx +3 -3
- package/src/components/blocks/settings/integration-card/IntegrationCard.tsx +5 -5
- package/src/components/blocks/settings/settings-section/SettingsSection.tsx +1 -1
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/alert-dialog.tsx +2 -2
- package/src/components/ui/alert.tsx +1 -1
- package/src/components/ui/avatar.tsx +1 -1
- package/src/components/ui/badge.tsx +7 -1
- package/src/components/ui/breadcrumb.tsx +1 -1
- package/src/components/ui/button.tsx +8 -1
- package/src/components/ui/calendar.tsx +2 -2
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/carousel.tsx +2 -2
- package/src/components/ui/chart.tsx +1 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/command.tsx +2 -2
- package/src/components/ui/component-placeholder.tsx +1 -1
- package/src/components/ui/context-menu.tsx +1 -1
- package/src/components/ui/dialog.tsx +1 -1
- package/src/components/ui/drawer.tsx +1 -1
- package/src/components/ui/dropdown-menu.tsx +1 -1
- package/src/components/ui/form.tsx +2 -2
- package/src/components/ui/hover-card.tsx +1 -1
- package/src/components/ui/input-otp.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/menubar.tsx +1 -1
- package/src/components/ui/navigation-menu.tsx +1 -1
- package/src/components/ui/pagination.tsx +2 -2
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +1 -1
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/resizable.tsx +1 -1
- package/src/components/ui/scroll-area.tsx +1 -1
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/sonner.tsx +13 -6
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/table.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/toast.tsx +1 -1
- package/src/components/ui/toaster.tsx +1 -1
- package/src/components/ui/toggle-group.tsx +2 -2
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/hooks/use-toast.ts +1 -1
- package/src/styles/tokens.css +1 -1
- package/DESIGN_GUIDE.md +0 -148
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Navigation & Shells Blocks
|
|
2
|
+
|
|
3
|
+
This document covers composite UI blocks designed for Application Shells, Sidebars, Top Navbars, and Context Switchers.
|
|
4
|
+
|
|
5
|
+
## When to use Blocks vs Primitives
|
|
6
|
+
|
|
7
|
+
Use these blocks anytime you are constructing the foundational shell of a dashboard, portal, or desktop web app. DO NOT build sidebars manually using arbitrary Flex/Grid math. These blocks automatically handle fixed widths (`w-64`), scrolling (`<ScrollArea>`), and bottom-aligned footers.
|
|
8
|
+
|
|
9
|
+
## 1. AppSidebar & NavItem
|
|
10
|
+
|
|
11
|
+
The `AppSidebar` standardizes the left-hand navigation column common in standard SaaS products.
|
|
12
|
+
|
|
13
|
+
### Anatomy
|
|
14
|
+
```tsx
|
|
15
|
+
// React Component
|
|
16
|
+
import { AppSidebar, NavItem } from '@reinvented/design'
|
|
17
|
+
import { ContextSwitcher } from '@reinvented/design'
|
|
18
|
+
import { LayoutDashboard, Users, Settings } from 'lucide-react'
|
|
19
|
+
import { Badge } from '@reinvented/design'
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export default function Component() {
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<AppSidebar>
|
|
26
|
+
<template #header>
|
|
27
|
+
<ContextSwitcher
|
|
28
|
+
:contexts="[{ id: '1', name: 'Acme Corp' }]"
|
|
29
|
+
activeId="1"
|
|
30
|
+
/>
|
|
31
|
+
</>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
<NavItem title="Dashboard" :icon="LayoutDashboard" isActive />
|
|
36
|
+
<NavItem title="Team Members" :icon="Users">
|
|
37
|
+
<template #badge>
|
|
38
|
+
<Badge variant="secondary" className="ml-auto">12</Badge>
|
|
39
|
+
</>
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
</NavItem>
|
|
43
|
+
|
|
44
|
+
<template #footer>
|
|
45
|
+
<NavItem title="Settings" :icon="Settings" />
|
|
46
|
+
</>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
</AppSidebar>
|
|
50
|
+
</>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Usage Rules
|
|
56
|
+
- `AppSidebar` establishes a strict `h-screen w-64` boundary.
|
|
57
|
+
- Places the default `<slot>` content into a perfectly calculated `<ScrollArea>` so an overflowing number of links won't push the layout down.
|
|
58
|
+
- Provides named `#header` and `#footer` slots.
|
|
59
|
+
- `NavItem` renders a flexible anchor tag (`<a>` if `href` is present, `<button>` otherwise). It conditionally applies `primary` tints if `isActive` is true.
|
|
60
|
+
|
|
61
|
+
## 2. TopNavbar
|
|
62
|
+
|
|
63
|
+
The `TopNavbar` establishes a horizontal header spanning the top of the interface.
|
|
64
|
+
|
|
65
|
+
### Anatomy
|
|
66
|
+
```tsx
|
|
67
|
+
// React Component
|
|
68
|
+
import { TopNavbar } from '@reinvented/design'
|
|
69
|
+
import { Input } from '@reinvented/design'
|
|
70
|
+
import { Avatar, AvatarFallback } from '@reinvented/design'
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
export default function Component() {
|
|
74
|
+
return (
|
|
75
|
+
<>
|
|
76
|
+
<TopNavbar @menu-click="sidebarOpen = true">
|
|
77
|
+
<template #brand>
|
|
78
|
+
<div className="font-black text-xl tracking-tight">AcmeApp</div>
|
|
79
|
+
</>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
<template #center>
|
|
84
|
+
<Input placeholder="Global search..." className="w-full" />
|
|
85
|
+
</>
|
|
86
|
+
)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
<template #actions>
|
|
90
|
+
<Avatar className="h-8 w-8">
|
|
91
|
+
<AvatarFallback>JD</AvatarFallback>
|
|
92
|
+
</Avatar>
|
|
93
|
+
</>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
</TopNavbar>
|
|
97
|
+
</>
|
|
98
|
+
)
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Usage Rules
|
|
103
|
+
- Standardizes a sticky, frosted-glass header (`bg-background/95 backdrop-blur`).
|
|
104
|
+
- Auto-collapses the `#center` slot entirely on mobile to prioritize `brand` and `actions`.
|
|
105
|
+
- Features an embedded mobile hamburger `<Menu>` icon button that is `md:hidden`, emitting `@menu-click` so the developer can wire up a mobile Sidebar Sheet easily.
|
|
106
|
+
|
|
107
|
+
## 3. ContextSwitcher
|
|
108
|
+
|
|
109
|
+
The `ContextSwitcher` is a highly specialized dropdown used for jumping between Projects, Teams, or Organizations.
|
|
110
|
+
|
|
111
|
+
### Anatomy
|
|
112
|
+
```tsx
|
|
113
|
+
// React Component
|
|
114
|
+
import { ContextSwitcher } from '@reinvented/design'
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
export default function Component() {
|
|
118
|
+
return (
|
|
119
|
+
<>
|
|
120
|
+
<ContextSwitcher
|
|
121
|
+
:contexts="[
|
|
122
|
+
{ id: 'acme', name: 'Acme Design Corp' },
|
|
123
|
+
{ id: 'personal', name: 'Personal Workspace' }
|
|
124
|
+
]"
|
|
125
|
+
activeId="personal"
|
|
126
|
+
@select="(id) => switchWorkspace(id)"
|
|
127
|
+
/>
|
|
128
|
+
</>
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Usage Rules
|
|
134
|
+
- Automates the complex layout of pairing small `<Avatar>` thumbnails with a truncated organization name and a trailing `<ChevronsUpDown>` caret.
|
|
135
|
+
- Natively controls Shadcn's `<DropdownMenu>` sequence, rendering out standard menu items for each available context.
|
|
136
|
+
- Drops a permanent "Create Workspace..." action at the bottom of the list.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Onboarding & Walkthrough Blocks
|
|
2
|
+
|
|
3
|
+
This document covers composite UI blocks designed for Welcome Modals, Multi-step setup Wizards, and Feature Tooltips.
|
|
4
|
+
|
|
5
|
+
## When to use Blocks vs Primitives
|
|
6
|
+
|
|
7
|
+
Use these blocks anytime a user is encountering an app or a complex feature workflow for the first time. DO NOT build step trackers manually using raw `<p>` and `<hr>` elements; calculating Flex overlaps and dynamic progress lines requires these structured blocks.
|
|
8
|
+
|
|
9
|
+
## 1. OnboardingWelcome
|
|
10
|
+
|
|
11
|
+
The `OnboardingWelcome` is a heavily themed `<Card>` designed uniquely to appear as a pop-up or a standalone hero page just after user registration.
|
|
12
|
+
|
|
13
|
+
### Anatomy
|
|
14
|
+
```tsx
|
|
15
|
+
// React Component
|
|
16
|
+
import { OnboardingWelcome } from '@reinvented/design'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export default function Component() {
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<OnboardingWelcome
|
|
23
|
+
title="Welcome to Reinvented"
|
|
24
|
+
description="You've successfully joined the platform. Let's get your account set up perfectly so you can hit the ground running."
|
|
25
|
+
image="/illustrations/welcome-hero.jpg"
|
|
26
|
+
:features="['Connect your design system', 'Invite your core team', 'Launch your first mockup']"
|
|
27
|
+
primaryAction="Get Started"
|
|
28
|
+
secondaryAction="Skip for now"
|
|
29
|
+
@primary="startSetup"
|
|
30
|
+
@secondary="skipSetup"
|
|
31
|
+
/>
|
|
32
|
+
</>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Usage Rules
|
|
38
|
+
- `image` expects an absolute or relative path to a cover photo/illustration. If omitted, the block gracefully falls back to an abstract branded gradient header.
|
|
39
|
+
- The `features` prop renders an automatically aligned list using `<CheckCircle2>` Lucide icons.
|
|
40
|
+
- Exposes two explicit events: `@primary` and `@secondary`. Use them to trigger routing or API calls.
|
|
41
|
+
|
|
42
|
+
## 2. StepWizard
|
|
43
|
+
|
|
44
|
+
The `StepWizard` block creates a horizontal sequence tracker.
|
|
45
|
+
|
|
46
|
+
### Anatomy
|
|
47
|
+
```tsx
|
|
48
|
+
// React Component
|
|
49
|
+
import { StepWizard } from '@reinvented/design'
|
|
50
|
+
import { ref } from 'react'
|
|
51
|
+
|
|
52
|
+
const currentStep = ref(2)
|
|
53
|
+
const mySteps = [
|
|
54
|
+
{ title: 'Create Profile', description: 'Your basic details' },
|
|
55
|
+
{ title: 'Workspace', description: 'Setup your team' },
|
|
56
|
+
{ title: 'Billing', description: 'Choose a plan' },
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
export default function Component() {
|
|
61
|
+
return (
|
|
62
|
+
<>
|
|
63
|
+
<div className="max-w-3xl w-full mx-auto">
|
|
64
|
+
<StepWizard :steps="mySteps" :currentStep="currentStep" />
|
|
65
|
+
</div>
|
|
66
|
+
</>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Usage Rules
|
|
72
|
+
- `steps` takes an array of objects containing `title` and an optional `description`.
|
|
73
|
+
- `currentStep` is 1-indexed (e.g., passing `1` means the *first* step is active).
|
|
74
|
+
- **Automated Aesthetics:** The block automatically fills a solid `primary` progress bar connecting the completed steps. Completed circles swap to `<Check>` icons; the active step gets a thick Focus ring; future steps remain grayed out.
|
|
75
|
+
- It hides standard text on mobile, ensuring the timeline bubbles do not squish or overflow out of bounds on small screens.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# User Profile Blocks
|
|
2
|
+
|
|
3
|
+
This document covers composite UI blocks designed for User Profiles, Stat Summaries, and Connection Lists (followers/following).
|
|
4
|
+
|
|
5
|
+
## When to use Blocks vs Primitives
|
|
6
|
+
|
|
7
|
+
Use these blocks whenever the app requires user profile viewing or management interfaces. DO NOT build Profile Header banners manually by absolutely positioning avatars over background images. This `ProfileHeader` handles z-indexing, negative margin overlays, and mobile-responsive flex-wrapping automatically.
|
|
8
|
+
|
|
9
|
+
## 1. ProfileHeader
|
|
10
|
+
|
|
11
|
+
The `ProfileHeader` block is the massive hero section at the top of a user's page.
|
|
12
|
+
|
|
13
|
+
### Anatomy
|
|
14
|
+
```tsx
|
|
15
|
+
// React Component
|
|
16
|
+
import { ProfileHeader } from '@reinvented/design'
|
|
17
|
+
import { Button } from '@reinvented/design'
|
|
18
|
+
import { UserPlus, MessageCircle } from 'lucide-react'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export default function Component() {
|
|
22
|
+
return (
|
|
23
|
+
<>
|
|
24
|
+
<ProfileHeader
|
|
25
|
+
name="Sarah Drasner"
|
|
26
|
+
handle="@sarah_edo"
|
|
27
|
+
bio="Engineering Manager, Speaker, Author of SVG Animations. Vue Core team member."
|
|
28
|
+
avatar="/avatars/sarah.jpg"
|
|
29
|
+
banner="/banners/tech-pattern.jpg"
|
|
30
|
+
verified
|
|
31
|
+
>
|
|
32
|
+
<template #actions>
|
|
33
|
+
<Button variant="outline" size="sm">
|
|
34
|
+
<MessageCircle className="mr-2 h-4 w-4" />
|
|
35
|
+
Message
|
|
36
|
+
</Button>
|
|
37
|
+
<Button size="sm">
|
|
38
|
+
<UserPlus className="mr-2 h-4 w-4" />
|
|
39
|
+
Follow
|
|
40
|
+
</Button>
|
|
41
|
+
</>
|
|
42
|
+
)
|
|
43
|
+
}
|
|
44
|
+
</ProfileHeader>
|
|
45
|
+
</>
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Usage Rules
|
|
51
|
+
- `banner` prop automatically handles the `object-cover` height. If omitted, it gracefully falls back to a branded gradient placeholder.
|
|
52
|
+
- The Avatar is forced to `h-32 w-32` and automatically pulls itself up over the banner via negative margin `-mt-20`.
|
|
53
|
+
- Use the `#actions` slot to inject standard buttons aligned beautifully to the far right on desktop, or stacked beneath on mobile.
|
|
54
|
+
|
|
55
|
+
## 2. ProfileStats
|
|
56
|
+
|
|
57
|
+
The `ProfileStats` block is a horizontal readout of macro-numbers often placed right beneath the ProfileHeader bio.
|
|
58
|
+
|
|
59
|
+
### Anatomy
|
|
60
|
+
```tsx
|
|
61
|
+
// React Component
|
|
62
|
+
import { ProfileStats } from '@reinvented/design'
|
|
63
|
+
|
|
64
|
+
const myStats = [
|
|
65
|
+
{ label: 'Followers', value: '12.4K' },
|
|
66
|
+
{ label: 'Following', value: 891 },
|
|
67
|
+
{ label: 'Repositories', value: 42 }
|
|
68
|
+
]
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
export default function Component() {
|
|
72
|
+
return (
|
|
73
|
+
<>
|
|
74
|
+
<ProfileStats :stats="myStats" />
|
|
75
|
+
</>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Usage Rules
|
|
81
|
+
- Takes a simple array of `stats` mapping `{ label, value }`.
|
|
82
|
+
- Automatically handles typography scaling (massive numbers, muted labels).
|
|
83
|
+
- Wraps reliably on small breakpoints without breaking grid constraints.
|
|
84
|
+
|
|
85
|
+
## 3. ConnectionList
|
|
86
|
+
|
|
87
|
+
The `ConnectionList` set builds the "Followers", "Following", or "Team Members" tabular views.
|
|
88
|
+
|
|
89
|
+
### Anatomy
|
|
90
|
+
```tsx
|
|
91
|
+
// React Component
|
|
92
|
+
import { ConnectionList, ConnectionItem } from '@reinvented/design'
|
|
93
|
+
import { Button } from '@reinvented/design'
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
export default function Component() {
|
|
97
|
+
return (
|
|
98
|
+
<>
|
|
99
|
+
<ConnectionList className="max-w-2xl mt-8">
|
|
100
|
+
<ConnectionItem
|
|
101
|
+
name="Evan You"
|
|
102
|
+
description="Creator of Vue and Vite"
|
|
103
|
+
avatar="/avatars/evan.jpg"
|
|
104
|
+
>
|
|
105
|
+
<template #action>
|
|
106
|
+
<Button variant="secondary" size="sm">Following</Button>
|
|
107
|
+
</>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
</ConnectionItem>
|
|
111
|
+
|
|
112
|
+
<ConnectionItem
|
|
113
|
+
name="Janakan"
|
|
114
|
+
description="Design Systems Engineer"
|
|
115
|
+
>
|
|
116
|
+
<template #action>
|
|
117
|
+
<Button variant="outline" size="sm">Follow</Button>
|
|
118
|
+
</>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
</ConnectionItem>
|
|
122
|
+
</ConnectionList>
|
|
123
|
+
</>
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Usage Rules
|
|
129
|
+
- `<ConnectionItem>` acts as a wide `<Card>` exposing a `#action` slot on the far right.
|
|
130
|
+
- The `avatar` maps to a standard Shadcn `<Avatar>` handling missing src fallbacks with initials identically to other blocks.
|
|
131
|
+
- The `ConnectionList` is merely a flex-column wrapper enforcing standard `gap-4` uniform spacing.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Scheduling & Calendaring Blocks
|
|
2
|
+
|
|
3
|
+
This document covers composite UI blocks designed for Event representations, Booking workflows, and Time-series tracking.
|
|
4
|
+
|
|
5
|
+
## When to use Blocks vs Primitives
|
|
6
|
+
|
|
7
|
+
Use these blocks anytime the app requires plotting events against time. DO NOT build timeline nodes manually using absolute `div` positioning. The `TimelineRow` handles the exact Z-indexing and intersecting SVG drawing lines natively.
|
|
8
|
+
|
|
9
|
+
## 1. EventCard
|
|
10
|
+
|
|
11
|
+
The `EventCard` standardizes the display of agenda items, meetings, or scheduled tasks.
|
|
12
|
+
|
|
13
|
+
### Anatomy
|
|
14
|
+
```tsx
|
|
15
|
+
// React Component
|
|
16
|
+
import { EventCard } from '@reinvented/design'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export default function Component() {
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<EventCard
|
|
23
|
+
title="Design System Sync"
|
|
24
|
+
date="October 24, 2026"
|
|
25
|
+
time="10:00 AM - 11:30 AM"
|
|
26
|
+
isVirtual
|
|
27
|
+
:attendees="12"
|
|
28
|
+
tag="Engineering"
|
|
29
|
+
tagVariant="outline"
|
|
30
|
+
/>
|
|
31
|
+
</>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Usage Rules
|
|
37
|
+
- Composes a left-border-accented Card (`border-l-4`).
|
|
38
|
+
- Uses standard Lucide calendar/clock taxonomy to plot the time data.
|
|
39
|
+
- Automatically handles the logic for rendering the `MapPin` (if `location` is provided) OR the `<Video>` icon (if `isVirtual` is set to true).
|
|
40
|
+
- If `attendees` > 0, drops down a footer containing an overlapped avatar skeleton cluster mimicking traditional SaaS invite stacks.
|
|
41
|
+
|
|
42
|
+
## 2. TimelineRow
|
|
43
|
+
|
|
44
|
+
The `TimelineRow` creates a vertically flowing history or agenda block.
|
|
45
|
+
|
|
46
|
+
### Anatomy
|
|
47
|
+
```tsx
|
|
48
|
+
// React Component
|
|
49
|
+
import { TimelineRow } from '@reinvented/design'
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
export default function Component() {
|
|
53
|
+
return (
|
|
54
|
+
<>
|
|
55
|
+
<div className="max-w-md">
|
|
56
|
+
<TimelineRow
|
|
57
|
+
time="09:00 AM"
|
|
58
|
+
title="Kickoff Presentation"
|
|
59
|
+
status="past"
|
|
60
|
+
/>
|
|
61
|
+
<TimelineRow
|
|
62
|
+
time="10:30 AM"
|
|
63
|
+
title="Interactive Workshop"
|
|
64
|
+
description="Breakout into 4 groups to tackle the component library mapping."
|
|
65
|
+
status="current"
|
|
66
|
+
tag="Live"
|
|
67
|
+
/>
|
|
68
|
+
<TimelineRow
|
|
69
|
+
time="01:00 PM"
|
|
70
|
+
title="Catered Networking Lunch"
|
|
71
|
+
status="future"
|
|
72
|
+
isLast
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
</>
|
|
76
|
+
)
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Usage Rules
|
|
81
|
+
- Designed to be stacked. The component is just a row.
|
|
82
|
+
- **`status` engine:**
|
|
83
|
+
- `'past'`: Bubble fills solid `primary`; text is solid `foreground`.
|
|
84
|
+
- `'current'`: Bubble gets an `animate-pulse` halo ring; text is solid `foreground`.
|
|
85
|
+
- `'future'`: Bubble turns into a `muted` inner ring; text drops back to `muted-foreground`.
|
|
86
|
+
- **CRITICAL:** You must pass `isLast` to the final `<TimelineRow>` in your array so it stops rendering the downward connective line.
|
|
87
|
+
|
|
88
|
+
## 3. BookingSlot
|
|
89
|
+
|
|
90
|
+
The `BookingSlot` provides a standardized, accessible button specific to Calendly-style time pickers.
|
|
91
|
+
|
|
92
|
+
### Anatomy
|
|
93
|
+
```tsx
|
|
94
|
+
// React Component
|
|
95
|
+
import { BookingSlot } from '@reinvented/design'
|
|
96
|
+
import { ref } from 'react'
|
|
97
|
+
|
|
98
|
+
const slot = ref<string | null>(null)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
export default function Component() {
|
|
102
|
+
return (
|
|
103
|
+
<>
|
|
104
|
+
<div className="grid grid-cols-2 gap-3 max-w-sm">
|
|
105
|
+
<BookingSlot time="9:00 AM" available @select="slot = '9:00 AM'" :selected="slot === '9:00 AM'" />
|
|
106
|
+
<BookingSlot time="9:30 AM" :available="false" />
|
|
107
|
+
<BookingSlot time="10:00 AM" available @select="slot = '10:00 AM'" :selected="slot === '10:00 AM'" />
|
|
108
|
+
</div>
|
|
109
|
+
</>
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Usage Rules
|
|
115
|
+
- The component is functionally a massive `<button>` with deeply tied transition aesthetics.
|
|
116
|
+
- Defaults to transparent boundaries on normal state. Once `selected` is True, it pops into filled `<primary>` color and drops down a small `<Check>` icon via CSS animation in the right corner.
|
|
117
|
+
- Passing `available="false"` natively applies CSS `opacity-60`, drops the background to `muted`, and applies `cursor-not-allowed`.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Settings & Config Blocks
|
|
2
|
+
|
|
3
|
+
This document covers composite UI blocks designed for Account Settings, Organization Preferences, Integrations, and Billing dashboards.
|
|
4
|
+
|
|
5
|
+
## When to use Blocks vs Primitives
|
|
6
|
+
|
|
7
|
+
Use these blocks anytime the user is managing backend configurations or account state. DO NOT build settings layouts manually using arbitrary grid splits. The `SettingsSection` enforces the standard "Label Left, Controls Right" pattern.
|
|
8
|
+
|
|
9
|
+
## 1. SettingsSection
|
|
10
|
+
|
|
11
|
+
The `SettingsSection` is the core structural wrapper for any form or preference block on a settings page.
|
|
12
|
+
|
|
13
|
+
### Anatomy
|
|
14
|
+
```tsx
|
|
15
|
+
// React Component
|
|
16
|
+
import { Input } from '@reinvented/design'
|
|
17
|
+
import { Label } from '@reinvented/design'
|
|
18
|
+
import { Button } from '@reinvented/design'
|
|
19
|
+
import { SettingsSection } from '@reinvented/design'
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
export default function Component() {
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<SettingsSection
|
|
26
|
+
title="Display Name"
|
|
27
|
+
description="This will be displayed on your public profile and in team channels."
|
|
28
|
+
>
|
|
29
|
+
<div className="flex flex-col gap-4 max-w-sm">
|
|
30
|
+
<Input placeholder="Enter your display name" />
|
|
31
|
+
<Button className="w-fit">Save Changes</Button>
|
|
32
|
+
</div>
|
|
33
|
+
</SettingsSection>
|
|
34
|
+
</>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Usage Rules
|
|
40
|
+
- Automatically parses into a 3-column Grid (`md:grid-cols-3`). The title and description lock to the left column (`col-span-1`), while the `<slot>` claims the remaining right-hand space (`col-span-2`).
|
|
41
|
+
- Stacks cleanly into a single column automatically on mobile breakpoints.
|
|
42
|
+
- Interleaves cleanly with other `<SettingsSection>` blocks, automatically injecting a dividing border between them (`border-b`).
|
|
43
|
+
|
|
44
|
+
## 2. IntegrationCard
|
|
45
|
+
|
|
46
|
+
The `IntegrationCard` standardizes 3rd-party connection toggles (e.g., Slack, Stripe).
|
|
47
|
+
|
|
48
|
+
### Anatomy
|
|
49
|
+
```tsx
|
|
50
|
+
// React Component
|
|
51
|
+
import { IntegrationCard } from '@reinvented/design'
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
export default function Component() {
|
|
55
|
+
return (
|
|
56
|
+
<>
|
|
57
|
+
<IntegrationCard
|
|
58
|
+
name="Slack"
|
|
59
|
+
description="Send notifications and incident alerts perfectly formatted to your team's channel."
|
|
60
|
+
icon="/icons/slack.svg"
|
|
61
|
+
status="connected"
|
|
62
|
+
isConfigurable
|
|
63
|
+
/>
|
|
64
|
+
</>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Usage Rules
|
|
70
|
+
- Exposes a `status` prop (`'connected' | 'disconnected' | 'error'`). Passing `'connected'` natively toggles the top-right `<Switch>` component to true. Passing `'error'` mounts a red destructive badge.
|
|
71
|
+
- The `icon` injects an image src into the top-left square bounded box.
|
|
72
|
+
- Setting `isConfigurable` drops a grey footer containing a "Configure integration" button, mimicking robust standard SaaS settings.
|
|
73
|
+
|
|
74
|
+
## 3. BillingUsage
|
|
75
|
+
|
|
76
|
+
The `BillingUsage` block renders a progress bar and usage stats against plan limits.
|
|
77
|
+
|
|
78
|
+
### Anatomy
|
|
79
|
+
```tsx
|
|
80
|
+
// React Component
|
|
81
|
+
import { BillingUsage } from '@reinvented/design'
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
export default function Component() {
|
|
85
|
+
return (
|
|
86
|
+
<>
|
|
87
|
+
<BillingUsage
|
|
88
|
+
title="API Requests"
|
|
89
|
+
description="Total API calls made this billing cycle."
|
|
90
|
+
:used="8500"
|
|
91
|
+
:limit="10000"
|
|
92
|
+
unit="requests"
|
|
93
|
+
/>
|
|
94
|
+
</>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Usage Rules
|
|
100
|
+
- Takes `used` and `limit` as raw numbers to automatically compute math logic (percentages, remaining budget).
|
|
101
|
+
- Automatically mounts the Shadcn `<Progress>` bar.
|
|
102
|
+
- *Defensive UI:* The progress bar natively shifts its color mapping to `rose-500` (red) the moment usage exceeds 85%, indicating impending limit breaks to the user visually.
|