@digilogiclabs/saas-factory-ui 0.18.3 → 0.21.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 +140 -0
- package/dist/index.css +337 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +18558 -13323
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15229 -9958
- package/dist/index.mjs.map +1 -1
- package/dist/native/index.js +0 -2
- package/dist/native/index.js.map +1 -1
- package/dist/native/index.mjs +0 -1
- package/dist/web/index.css +337 -0
- package/dist/web/index.css.map +1 -1
- package/dist/web/index.js +18558 -13323
- package/dist/web/index.js.map +1 -1
- package/dist/web/index.mjs +15229 -9958
- package/dist/web/index.mjs.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -241,6 +241,142 @@ export default function App() {
|
|
|
241
241
|
- `SafeContainer` - Safe area aware container
|
|
242
242
|
- `TouchableCard` - Pressable card component
|
|
243
243
|
|
|
244
|
+
## 🆕 NEW v0.21.0: Layout & Navigation System
|
|
245
|
+
|
|
246
|
+
### Complete Application Structure
|
|
247
|
+
A comprehensive system providing everything needed for modern SaaS applications:
|
|
248
|
+
|
|
249
|
+
#### 🏗️ App Shell Components
|
|
250
|
+
|
|
251
|
+
| Component | Web | Native | Description |
|
|
252
|
+
|-----------|-----|--------|-------------|
|
|
253
|
+
| `AppShell` | ✅ | ✅ | Complete application layout orchestration |
|
|
254
|
+
| `Header` | ✅ | ✅ | Top navigation with user menu and actions |
|
|
255
|
+
| `Sidebar` | ✅ | - | Collapsible navigation sidebar (web) |
|
|
256
|
+
| `Drawer` | - | ✅ | Slide-out navigation drawer (mobile) |
|
|
257
|
+
| `Breadcrumbs` | ✅ | - | Hierarchical navigation breadcrumbs |
|
|
258
|
+
|
|
259
|
+
#### 🧭 Navigation Components
|
|
260
|
+
|
|
261
|
+
| Component | Web | Native | Description |
|
|
262
|
+
|-----------|-----|--------|-------------|
|
|
263
|
+
| `Tabs` | ✅ | ✅ | Feature-rich tabbed navigation |
|
|
264
|
+
| `BottomTabBar` | - | ✅ | Mobile-optimized bottom tab navigation |
|
|
265
|
+
| `Stepper` | ✅ | ✅ | Step-by-step process visualization |
|
|
266
|
+
| `Pagination` | ✅ | ✅ | Data navigation with page controls |
|
|
267
|
+
| `CommandPalette` | ✅ | - | Keyboard-driven command palette (Cmd+K) |
|
|
268
|
+
|
|
269
|
+
#### 🎯 Tour & Onboarding
|
|
270
|
+
|
|
271
|
+
| Component | Web | Native | Description |
|
|
272
|
+
|-----------|-----|--------|-------------|
|
|
273
|
+
| `Tour` | ✅ | ✅ | Interactive guided tours with spotlights |
|
|
274
|
+
| `Onboarding` | ✅ | ✅ | Multi-step onboarding with progress tracking |
|
|
275
|
+
| `Tooltip` | ✅ | ✅ | Contextual feature highlights |
|
|
276
|
+
| `WelcomeModal` | ✅ | ✅ | Welcome screens with feature showcase |
|
|
277
|
+
| `FeatureHighlight` | ✅ | - | Animated feature callouts with pulse effects |
|
|
278
|
+
|
|
279
|
+
#### 📋 Layout Templates
|
|
280
|
+
|
|
281
|
+
| Template | Web | Native | Description |
|
|
282
|
+
|----------|-----|--------|-------------|
|
|
283
|
+
| `DashboardLayout` | ✅ | ✅ | Complete dashboard with navigation |
|
|
284
|
+
| `AuthLayout` | ✅ | ✅ | Authentication pages with features showcase |
|
|
285
|
+
| `SettingsLayout` | ✅ | ✅ | Settings pages with tabbed navigation |
|
|
286
|
+
|
|
287
|
+
### Usage Examples
|
|
288
|
+
|
|
289
|
+
#### Web Dashboard with Command Palette
|
|
290
|
+
```tsx
|
|
291
|
+
import {
|
|
292
|
+
DashboardLayout,
|
|
293
|
+
CommandPalette,
|
|
294
|
+
useCommandPalette
|
|
295
|
+
} from '@digilogiclabs/saas-factory-ui';
|
|
296
|
+
|
|
297
|
+
export default function Dashboard() {
|
|
298
|
+
const commands = [
|
|
299
|
+
{
|
|
300
|
+
id: 'nav',
|
|
301
|
+
label: 'Navigation',
|
|
302
|
+
items: [
|
|
303
|
+
{ id: 'dashboard', label: 'Go to Dashboard', action: () => router.push('/') },
|
|
304
|
+
{ id: 'settings', label: 'Open Settings', action: () => router.push('/settings') },
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
];
|
|
308
|
+
|
|
309
|
+
const { isOpen, toggle } = useCommandPalette({
|
|
310
|
+
commands,
|
|
311
|
+
keyboardShortcut: 'cmd+k'
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
return (
|
|
315
|
+
<DashboardLayout>
|
|
316
|
+
<div className="p-6">
|
|
317
|
+
<h1>Dashboard Content</h1>
|
|
318
|
+
<p>Press Cmd+K to open command palette</p>
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<CommandPalette
|
|
322
|
+
open={isOpen}
|
|
323
|
+
onOpenChange={toggle}
|
|
324
|
+
commands={commands}
|
|
325
|
+
/>
|
|
326
|
+
</DashboardLayout>
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
#### Native App with Bottom Tabs
|
|
332
|
+
```tsx
|
|
333
|
+
import {
|
|
334
|
+
DashboardLayout,
|
|
335
|
+
Tour,
|
|
336
|
+
useTour
|
|
337
|
+
} from '@digilogiclabs/saas-factory-ui/native';
|
|
338
|
+
|
|
339
|
+
export default function MobileApp() {
|
|
340
|
+
const tourSteps = [
|
|
341
|
+
{
|
|
342
|
+
id: 'welcome',
|
|
343
|
+
title: 'Welcome!',
|
|
344
|
+
content: 'Let me show you around',
|
|
345
|
+
target: '#main-content'
|
|
346
|
+
}
|
|
347
|
+
];
|
|
348
|
+
|
|
349
|
+
const { isOpen, start } = useTour({
|
|
350
|
+
steps: tourSteps,
|
|
351
|
+
localStorage: { key: 'app-tour' }
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
return (
|
|
355
|
+
<DashboardLayout
|
|
356
|
+
showBottomTabs={true}
|
|
357
|
+
bottomTabs={[
|
|
358
|
+
{ id: 'home', label: 'Home', icon: '🏠' },
|
|
359
|
+
{ id: 'search', label: 'Search', icon: '🔍' },
|
|
360
|
+
{ id: 'profile', label: 'Profile', icon: '👤' },
|
|
361
|
+
]}
|
|
362
|
+
>
|
|
363
|
+
<ScrollView>
|
|
364
|
+
<Text style={styles.title}>Mobile Dashboard</Text>
|
|
365
|
+
<TouchableOpacity onPress={start}>
|
|
366
|
+
<Text>Start Tour</Text>
|
|
367
|
+
</TouchableOpacity>
|
|
368
|
+
</ScrollView>
|
|
369
|
+
|
|
370
|
+
<Tour
|
|
371
|
+
steps={tourSteps}
|
|
372
|
+
isOpen={isOpen}
|
|
373
|
+
onRequestClose={() => {}}
|
|
374
|
+
/>
|
|
375
|
+
</DashboardLayout>
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
|
|
244
380
|
### 🔧 Available Hooks
|
|
245
381
|
|
|
246
382
|
#### Cross-Platform Hooks
|
|
@@ -248,10 +384,14 @@ export default function App() {
|
|
|
248
384
|
- `useNetworkInfo` - **NEW** Network connection monitoring
|
|
249
385
|
- `useOfflineState` - **NEW** Online/offline status detection
|
|
250
386
|
- `useCache` - **NEW** Persistent caching utilities
|
|
387
|
+
- `useTour` - **NEW** Tour state management with localStorage persistence
|
|
388
|
+
- `useOnboarding` - **NEW** Multi-step onboarding flow management
|
|
251
389
|
|
|
252
390
|
#### Web-Only Hooks
|
|
253
391
|
- `useMediaQuery` - Responsive breakpoint detection
|
|
254
392
|
- `useLockBody` - Body scroll lock for modals
|
|
393
|
+
- `useCommandPalette` - **NEW** Command palette state management
|
|
394
|
+
- `useResponsive` - **NEW** Advanced responsive breakpoint detection
|
|
255
395
|
|
|
256
396
|
#### Native-Only Hooks
|
|
257
397
|
- `useDimensions` - Screen dimensions and orientation
|