@blinkdotnew/mobile-ui 2.0.0-alpha.5 → 2.0.0-alpha.6
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/dist/index.d.mts +314 -3
- package/dist/index.d.ts +314 -3
- package/dist/index.js +1254 -190
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1207 -170
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -197,6 +197,130 @@ type BadgeProps = {
|
|
|
197
197
|
};
|
|
198
198
|
declare function Badge({ children, variant }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
199
199
|
|
|
200
|
+
declare const ICONS: {
|
|
201
|
+
readonly home: "⌂";
|
|
202
|
+
readonly search: "⌕";
|
|
203
|
+
readonly back: "‹";
|
|
204
|
+
readonly forward: "›";
|
|
205
|
+
readonly close: "✕";
|
|
206
|
+
readonly menu: "☰";
|
|
207
|
+
readonly more: "⋯";
|
|
208
|
+
readonly plus: "+";
|
|
209
|
+
readonly minus: "−";
|
|
210
|
+
readonly check: "✓";
|
|
211
|
+
readonly star: "★";
|
|
212
|
+
readonly starOutline: "☆";
|
|
213
|
+
readonly heart: "♥";
|
|
214
|
+
readonly heartOutline: "♡";
|
|
215
|
+
readonly share: "⤴";
|
|
216
|
+
readonly edit: "✎";
|
|
217
|
+
readonly trash: "⌫";
|
|
218
|
+
readonly copy: "⎘";
|
|
219
|
+
readonly chat: "💬";
|
|
220
|
+
readonly mail: "✉";
|
|
221
|
+
readonly bell: "🔔";
|
|
222
|
+
readonly bellOff: "🔕";
|
|
223
|
+
readonly send: "➤";
|
|
224
|
+
readonly play: "▶";
|
|
225
|
+
readonly pause: "⏸";
|
|
226
|
+
readonly camera: "📷";
|
|
227
|
+
readonly image: "🖼";
|
|
228
|
+
readonly info: "ℹ";
|
|
229
|
+
readonly warning: "⚠";
|
|
230
|
+
readonly error: "✕";
|
|
231
|
+
readonly success: "✓";
|
|
232
|
+
readonly loading: "⟳";
|
|
233
|
+
readonly user: "👤";
|
|
234
|
+
readonly users: "👥";
|
|
235
|
+
readonly settings: "⚙";
|
|
236
|
+
readonly lock: "🔒";
|
|
237
|
+
readonly unlock: "🔓";
|
|
238
|
+
readonly arrowUp: "↑";
|
|
239
|
+
readonly arrowDown: "↓";
|
|
240
|
+
readonly arrowLeft: "←";
|
|
241
|
+
readonly arrowRight: "→";
|
|
242
|
+
readonly chevronUp: "⌃";
|
|
243
|
+
readonly chevronDown: "⌄";
|
|
244
|
+
readonly chevronLeft: "‹";
|
|
245
|
+
readonly chevronRight: "›";
|
|
246
|
+
};
|
|
247
|
+
type IconName = keyof typeof ICONS;
|
|
248
|
+
type IconProps = {
|
|
249
|
+
name: IconName;
|
|
250
|
+
size?: number;
|
|
251
|
+
color?: string;
|
|
252
|
+
};
|
|
253
|
+
declare function Icon({ name, size, color }: IconProps): react_jsx_runtime.JSX.Element;
|
|
254
|
+
|
|
255
|
+
type AccordionItem = {
|
|
256
|
+
id: string;
|
|
257
|
+
title: string;
|
|
258
|
+
content: ReactNode;
|
|
259
|
+
};
|
|
260
|
+
type AccordionProps = {
|
|
261
|
+
items: AccordionItem[];
|
|
262
|
+
defaultOpen?: string;
|
|
263
|
+
allowMultiple?: boolean;
|
|
264
|
+
};
|
|
265
|
+
declare function Accordion({ items, defaultOpen, allowMultiple }: AccordionProps): react_jsx_runtime.JSX.Element;
|
|
266
|
+
|
|
267
|
+
type TabItem = {
|
|
268
|
+
id: string;
|
|
269
|
+
label: string;
|
|
270
|
+
content: ReactNode;
|
|
271
|
+
};
|
|
272
|
+
type TabsProps = {
|
|
273
|
+
tabs: TabItem[];
|
|
274
|
+
activeTab?: string;
|
|
275
|
+
onTabChange?: (tabId: string) => void;
|
|
276
|
+
variant?: 'underline' | 'pill';
|
|
277
|
+
};
|
|
278
|
+
declare function Tabs({ tabs, activeTab, onTabChange, variant }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
279
|
+
|
|
280
|
+
type ToggleOption = {
|
|
281
|
+
id: string;
|
|
282
|
+
label: string;
|
|
283
|
+
};
|
|
284
|
+
type ToggleGroupProps = {
|
|
285
|
+
options: ToggleOption[];
|
|
286
|
+
value: string;
|
|
287
|
+
onValueChange: (value: string) => void;
|
|
288
|
+
size?: 'sm' | 'md' | 'lg';
|
|
289
|
+
};
|
|
290
|
+
declare function ToggleGroup({ options, value, onValueChange, size }: ToggleGroupProps): react_jsx_runtime.JSX.Element;
|
|
291
|
+
|
|
292
|
+
type ToastVariant = 'default' | 'success' | 'error' | 'warning';
|
|
293
|
+
type ToastData = {
|
|
294
|
+
id: string;
|
|
295
|
+
message: string;
|
|
296
|
+
variant?: ToastVariant;
|
|
297
|
+
duration?: number;
|
|
298
|
+
};
|
|
299
|
+
type ToastContextType = {
|
|
300
|
+
show: (message: string, variant?: ToastVariant, duration?: number) => void;
|
|
301
|
+
};
|
|
302
|
+
declare const toast: (message: string, variant?: ToastVariant, duration?: number) => void;
|
|
303
|
+
declare function ToastProvider({ children }: {
|
|
304
|
+
children: ReactNode;
|
|
305
|
+
}): react_jsx_runtime.JSX.Element;
|
|
306
|
+
declare function useToast(): ToastContextType;
|
|
307
|
+
|
|
308
|
+
type FormFieldProps = {
|
|
309
|
+
label?: string;
|
|
310
|
+
error?: string;
|
|
311
|
+
helperText?: string;
|
|
312
|
+
required?: boolean;
|
|
313
|
+
children: ReactNode;
|
|
314
|
+
};
|
|
315
|
+
declare function FormField({ label, error, helperText, required, children }: FormFieldProps): react_jsx_runtime.JSX.Element;
|
|
316
|
+
|
|
317
|
+
type TooltipProps = {
|
|
318
|
+
content: string;
|
|
319
|
+
children: ReactNode;
|
|
320
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
321
|
+
};
|
|
322
|
+
declare function BlinkTooltip({ content, children, side }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
323
|
+
|
|
200
324
|
type StepPageProps = {
|
|
201
325
|
title: string;
|
|
202
326
|
description?: string;
|
|
@@ -247,25 +371,53 @@ type KeyboardStickyFooterProps = {
|
|
|
247
371
|
};
|
|
248
372
|
declare function KeyboardStickyFooter({ children, offset }: KeyboardStickyFooterProps): react_jsx_runtime.JSX.Element;
|
|
249
373
|
|
|
374
|
+
type SafeAreaProps = {
|
|
375
|
+
children: ReactNode;
|
|
376
|
+
edges?: ('top' | 'bottom' | 'left' | 'right')[];
|
|
377
|
+
};
|
|
378
|
+
declare function SafeArea({ children, edges }: SafeAreaProps): react_jsx_runtime.JSX.Element;
|
|
379
|
+
|
|
380
|
+
type GridProps = {
|
|
381
|
+
children: ReactNode;
|
|
382
|
+
columns?: 2 | 3 | 4;
|
|
383
|
+
gap?: '$2' | '$3' | '$4';
|
|
384
|
+
};
|
|
385
|
+
declare function Grid({ children, columns, gap }: GridProps): react_jsx_runtime.JSX.Element;
|
|
386
|
+
type ContainerProps = {
|
|
387
|
+
children: ReactNode;
|
|
388
|
+
maxWidth?: number;
|
|
389
|
+
centered?: boolean;
|
|
390
|
+
};
|
|
391
|
+
declare function Container({ children, maxWidth, centered }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
392
|
+
|
|
250
393
|
type PlanOption = {
|
|
251
394
|
id: string;
|
|
252
395
|
name: string;
|
|
253
396
|
price: string;
|
|
254
397
|
period: string;
|
|
255
|
-
|
|
398
|
+
pricePerWeek?: string;
|
|
399
|
+
savings?: string;
|
|
256
400
|
popular?: boolean;
|
|
401
|
+
trial?: string;
|
|
257
402
|
};
|
|
258
403
|
type PaywallScreenProps = {
|
|
259
404
|
title?: string;
|
|
260
405
|
subtitle?: string;
|
|
406
|
+
features?: string[];
|
|
261
407
|
plans: PlanOption[];
|
|
262
408
|
selectedPlan?: string;
|
|
263
409
|
onSelectPlan?: (planId: string) => void;
|
|
264
410
|
onContinue?: () => void;
|
|
411
|
+
onClose?: () => void;
|
|
265
412
|
onRestore?: () => void;
|
|
413
|
+
onTerms?: () => void;
|
|
414
|
+
onPrivacy?: () => void;
|
|
266
415
|
continueLabel?: string;
|
|
416
|
+
reassurance?: string;
|
|
417
|
+
hero?: ReactNode;
|
|
418
|
+
socialProof?: string;
|
|
267
419
|
};
|
|
268
|
-
declare function PaywallScreen({ title, subtitle, plans, selectedPlan, onSelectPlan, onContinue, onRestore, continueLabel, }: PaywallScreenProps): react_jsx_runtime.JSX.Element;
|
|
420
|
+
declare function PaywallScreen({ title, subtitle, features, plans, selectedPlan, onSelectPlan, onContinue, onClose, onRestore, onTerms, onPrivacy, continueLabel, reassurance, hero, socialProof, }: PaywallScreenProps): react_jsx_runtime.JSX.Element;
|
|
269
421
|
|
|
270
422
|
type OnboardingStep = {
|
|
271
423
|
title: string;
|
|
@@ -338,4 +490,163 @@ type ProfileHeaderProps = {
|
|
|
338
490
|
};
|
|
339
491
|
declare function ProfileHeader({ name, subtitle, avatar, stats, actions }: ProfileHeaderProps): react_jsx_runtime.JSX.Element;
|
|
340
492
|
|
|
341
|
-
|
|
493
|
+
type AppHeaderVariant = 'simple' | 'back' | 'profile' | 'centered';
|
|
494
|
+
type AppHeaderProps = {
|
|
495
|
+
title: string;
|
|
496
|
+
subtitle?: string;
|
|
497
|
+
variant?: AppHeaderVariant;
|
|
498
|
+
onBack?: () => void;
|
|
499
|
+
avatar?: string;
|
|
500
|
+
left?: ReactNode;
|
|
501
|
+
right?: ReactNode;
|
|
502
|
+
transparent?: boolean;
|
|
503
|
+
borderless?: boolean;
|
|
504
|
+
};
|
|
505
|
+
declare function AppHeader({ title, subtitle, variant, onBack, avatar, left, right, transparent, borderless, }: AppHeaderProps): react_jsx_runtime.JSX.Element;
|
|
506
|
+
|
|
507
|
+
type BottomSheetProps = {
|
|
508
|
+
open: boolean;
|
|
509
|
+
onOpenChange: (open: boolean) => void;
|
|
510
|
+
title?: string;
|
|
511
|
+
children: ReactNode;
|
|
512
|
+
snapPoints?: number[];
|
|
513
|
+
dismissOnSnapToBottom?: boolean;
|
|
514
|
+
showHandle?: boolean;
|
|
515
|
+
showClose?: boolean;
|
|
516
|
+
};
|
|
517
|
+
declare function BottomSheet({ open, onOpenChange, title, children, snapPoints, dismissOnSnapToBottom, showHandle, showClose, }: BottomSheetProps): react_jsx_runtime.JSX.Element;
|
|
518
|
+
|
|
519
|
+
type AuthProvider = {
|
|
520
|
+
id: string;
|
|
521
|
+
name: string;
|
|
522
|
+
icon?: ReactNode;
|
|
523
|
+
};
|
|
524
|
+
type LoginScreenProps = {
|
|
525
|
+
title?: string;
|
|
526
|
+
subtitle?: string;
|
|
527
|
+
logo?: ReactNode;
|
|
528
|
+
providers?: AuthProvider[];
|
|
529
|
+
onProviderPress?: (providerId: string) => void;
|
|
530
|
+
showEmailForm?: boolean;
|
|
531
|
+
onEmailSubmit?: (email: string, password: string) => void;
|
|
532
|
+
onForgotPassword?: () => void;
|
|
533
|
+
onCreateAccount?: () => void;
|
|
534
|
+
onTerms?: () => void;
|
|
535
|
+
onPrivacy?: () => void;
|
|
536
|
+
loading?: boolean;
|
|
537
|
+
};
|
|
538
|
+
declare function LoginScreen({ title, subtitle, logo, providers, onProviderPress, showEmailForm, onEmailSubmit, onForgotPassword, onCreateAccount, onTerms, onPrivacy, loading, }: LoginScreenProps): react_jsx_runtime.JSX.Element;
|
|
539
|
+
|
|
540
|
+
type TabBarItem = {
|
|
541
|
+
id: string;
|
|
542
|
+
label: string;
|
|
543
|
+
icon?: ReactNode;
|
|
544
|
+
};
|
|
545
|
+
type TabBarProps = {
|
|
546
|
+
tabs: TabBarItem[];
|
|
547
|
+
activeTab: string;
|
|
548
|
+
onTabPress: (tabId: string) => void;
|
|
549
|
+
showLabels?: boolean;
|
|
550
|
+
};
|
|
551
|
+
declare function TabBar({ tabs, activeTab, onTabPress, showLabels }: TabBarProps): react_jsx_runtime.JSX.Element;
|
|
552
|
+
|
|
553
|
+
type SearchBarProps = {
|
|
554
|
+
value: string;
|
|
555
|
+
onChangeText: (text: string) => void;
|
|
556
|
+
placeholder?: string;
|
|
557
|
+
onFilter?: () => void;
|
|
558
|
+
onCancel?: () => void;
|
|
559
|
+
autoFocus?: boolean;
|
|
560
|
+
};
|
|
561
|
+
declare function SearchBar({ value, onChangeText, placeholder, onFilter, onCancel, autoFocus }: SearchBarProps): react_jsx_runtime.JSX.Element;
|
|
562
|
+
|
|
563
|
+
type FABProps = {
|
|
564
|
+
icon?: ReactNode;
|
|
565
|
+
label?: string;
|
|
566
|
+
onPress: () => void;
|
|
567
|
+
position?: 'bottom-right' | 'bottom-center' | 'bottom-left';
|
|
568
|
+
size?: 'sm' | 'md' | 'lg';
|
|
569
|
+
};
|
|
570
|
+
declare function FloatingActionButton({ icon, label, onPress, position, size }: FABProps): react_jsx_runtime.JSX.Element;
|
|
571
|
+
|
|
572
|
+
type ActionSheetItem = {
|
|
573
|
+
id: string;
|
|
574
|
+
label: string;
|
|
575
|
+
icon?: ReactNode;
|
|
576
|
+
destructive?: boolean;
|
|
577
|
+
};
|
|
578
|
+
type ActionSheetProps = {
|
|
579
|
+
open: boolean;
|
|
580
|
+
onOpenChange: (open: boolean) => void;
|
|
581
|
+
title?: string;
|
|
582
|
+
items: ActionSheetItem[];
|
|
583
|
+
onSelect: (itemId: string) => void;
|
|
584
|
+
cancelLabel?: string;
|
|
585
|
+
};
|
|
586
|
+
declare function ActionSheet({ open, onOpenChange, title, items, onSelect, cancelLabel, }: ActionSheetProps): react_jsx_runtime.JSX.Element;
|
|
587
|
+
|
|
588
|
+
type SkeletonProps = {
|
|
589
|
+
width?: number | string;
|
|
590
|
+
height?: number;
|
|
591
|
+
borderRadius?: number;
|
|
592
|
+
variant?: 'text' | 'circular' | 'rectangular';
|
|
593
|
+
};
|
|
594
|
+
declare function Skeleton({ width, height, borderRadius, variant }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
595
|
+
|
|
596
|
+
type NotificationBannerProps = {
|
|
597
|
+
title: string;
|
|
598
|
+
message?: string;
|
|
599
|
+
variant?: 'info' | 'success' | 'warning' | 'error';
|
|
600
|
+
onPress?: () => void;
|
|
601
|
+
onDismiss?: () => void;
|
|
602
|
+
icon?: ReactNode;
|
|
603
|
+
};
|
|
604
|
+
declare function NotificationBanner({ title, message, variant, onPress, onDismiss, icon, }: NotificationBannerProps): react_jsx_runtime.JSX.Element;
|
|
605
|
+
|
|
606
|
+
type ProgressStepsProps = {
|
|
607
|
+
steps: string[];
|
|
608
|
+
currentStep: number;
|
|
609
|
+
variant?: 'dots' | 'bar' | 'numbered';
|
|
610
|
+
};
|
|
611
|
+
declare function ProgressSteps({ steps, currentStep, variant }: ProgressStepsProps): react_jsx_runtime.JSX.Element;
|
|
612
|
+
|
|
613
|
+
type SwipeAction = {
|
|
614
|
+
id: string;
|
|
615
|
+
label: string;
|
|
616
|
+
color: string;
|
|
617
|
+
onPress: () => void;
|
|
618
|
+
};
|
|
619
|
+
type SwipeableRowProps = {
|
|
620
|
+
children: ReactNode;
|
|
621
|
+
leftActions?: SwipeAction[];
|
|
622
|
+
rightActions?: SwipeAction[];
|
|
623
|
+
};
|
|
624
|
+
declare function SwipeableRow({ children, leftActions, rightActions }: SwipeableRowProps): react_jsx_runtime.JSX.Element;
|
|
625
|
+
|
|
626
|
+
type MediaCardProps = {
|
|
627
|
+
image: string;
|
|
628
|
+
title: string;
|
|
629
|
+
subtitle?: string;
|
|
630
|
+
overlay?: 'gradient' | 'dark' | 'none';
|
|
631
|
+
aspectRatio?: number;
|
|
632
|
+
onPress?: () => void;
|
|
633
|
+
badge?: string;
|
|
634
|
+
};
|
|
635
|
+
declare function MediaCard({ image, title, subtitle, overlay, aspectRatio, onPress, badge, }: MediaCardProps): react_jsx_runtime.JSX.Element;
|
|
636
|
+
|
|
637
|
+
type CarouselProps = {
|
|
638
|
+
children: ReactNode;
|
|
639
|
+
gap?: '$2' | '$3' | '$4';
|
|
640
|
+
snapToInterval?: number;
|
|
641
|
+
showIndicators?: boolean;
|
|
642
|
+
};
|
|
643
|
+
declare function Carousel({ children, gap, snapToInterval, showIndicators }: CarouselProps): react_jsx_runtime.JSX.Element;
|
|
644
|
+
|
|
645
|
+
type PullToRefreshProps = {
|
|
646
|
+
children: ReactNode;
|
|
647
|
+
onRefresh: () => Promise<void>;
|
|
648
|
+
refreshing?: boolean;
|
|
649
|
+
};
|
|
650
|
+
declare function PullToRefresh({ children, onRefresh, refreshing }: PullToRefreshProps): react_jsx_runtime.JSX.Element;
|
|
651
|
+
|
|
652
|
+
export { Accordion, type AccordionItem, type AccordionProps, ActionSheet, type ActionSheetItem, type ActionSheetProps, AppHeader, type AppHeaderProps, type AppHeaderVariant, type AuthProvider, Badge, type BadgeProps, Avatar as BlinkAvatar, type AvatarProps as BlinkAvatarProps, Button as BlinkButton, type ButtonProps as BlinkButtonProps, Card as BlinkCard, type CardProps as BlinkCardProps, type BlinkConfig, Input as BlinkInput, type InputProps as BlinkInputProps, BlinkText, type BlinkTextProps, BlinkTooltip, BottomSheet, type BottomSheetProps, Carousel, type CarouselProps, ChatBubble, type ChatBubbleProps, type ChatMessage, Container, type ContainerProps, DialogProvider, Divider, type DividerProps, EmptyState, type EmptyStateProps, type FABProps, FloatingActionButton, FormField, type FormFieldProps, Grid, type GridProps, ICONS, Icon, type IconName, type IconProps, Image, KeyboardStickyFooter, type KeyboardStickyFooterProps, ListItem, type ListItemProps, LoginScreen, type LoginScreenProps, MediaCard, type MediaCardProps, NotificationBanner, type NotificationBannerProps, OnboardingCarousel, type OnboardingCarouselProps, type OnboardingStep, PageContainer, PageMainContainer, PaywallScreen, type PaywallScreenProps, type PlanOption, Pressable, ProfileHeader, type ProfileHeaderProps, ProgressSteps, type ProgressStepsProps, PullToRefresh, type PullToRefreshProps, SafeArea, type SafeAreaProps, ScreenLayout, SearchBar, type SearchBarProps, Section, type SectionProps, SepHeading, type SettingsItem, SettingsScreen, type SettingsScreenProps, type SettingsSection, Skeleton, type SkeletonProps, StepPageLayout, type StepPageProps, SubHeading, type SwipeAction, SwipeableRow, type SwipeableRowProps, TabBar, type TabBarItem, type TabBarProps, type TabItem, Tabs, type TabsProps, type ToastContextType, type ToastData, ToastProvider, type ToastVariant, ToggleGroup, type ToggleGroupProps, type ToggleOption, type TooltipProps, blinkConfig, dialogConfirm, showError, toast, useToast };
|