@blinkdotnew/mobile-ui 2.0.0-alpha.7 → 2.0.0-alpha.9
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 +14 -6
- package/dist/index.d.ts +14 -6
- package/dist/index.js +110 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +210 -140
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as tamagui from 'tamagui';
|
|
2
2
|
import { TamaguiInternalConfig, GetProps, YStack } from 'tamagui';
|
|
3
|
-
export { Accordion, Adapt, AlertDialog, Anchor, Avatar, Button, Card, Checkbox, Circle, ColorTokens, Dialog, Fieldset, Form, GetProps, H1, H2, H3, H4, H5, H6, Input, Label, Paragraph, Popover, PortalProvider, Progress, RadioGroup, ScrollView, Select, Separator, Sheet, SizableText, SizeTokens, Slider, Spinner, Square, Switch, Tabs, Image as TamaguiImage, ListItem as TamaguiListItem, TamaguiProvider, Text, TextArea, Theme, ThemeTokens, ToggleGroup, Tooltip, TooltipSimple, Unspaced, View, VisuallyHidden, XGroup, XStack, YGroup, YStack, ZStack, styled, useMedia, useTheme, useThemeName, withStaticProperties } from 'tamagui';
|
|
3
|
+
export { Accordion, Adapt, AlertDialog, Anchor, Avatar, TamaguiProvider as BlinkProvider, Button, Card, Checkbox, Circle, ColorTokens, Dialog, Fieldset, Form, GetProps, H1, H2, H3, H4, H5, H6, Input, Label, Paragraph, Popover, PortalProvider, Progress, RadioGroup, ScrollView, Select, Separator, Sheet, SizableText, SizeTokens, Slider, Spinner, Square, Switch, Tabs, Image as TamaguiImage, ListItem as TamaguiListItem, TamaguiProvider, Text, TextArea, Theme, ThemeTokens, ToggleGroup, Tooltip, TooltipSimple, Unspaced, View, VisuallyHidden, XGroup, XStack, YGroup, YStack, ZStack, createTamagui, styled, useMedia, useTheme, useThemeName, withStaticProperties } from 'tamagui';
|
|
4
|
+
export { defaultConfig as tamaguiDefaultConfig } from '@tamagui/config/v5';
|
|
4
5
|
import * as react from 'react';
|
|
5
6
|
import { ReactNode } from 'react';
|
|
6
7
|
import * as _tamagui_core from '@tamagui/core';
|
|
@@ -290,14 +291,20 @@ declare function BlinkToggleGroup({ options, value, onValueChange, size }: Blink
|
|
|
290
291
|
type BlinkToastVariant = 'default' | 'success' | 'error' | 'warning';
|
|
291
292
|
type BlinkToastData = {
|
|
292
293
|
id: string;
|
|
293
|
-
|
|
294
|
+
title: string;
|
|
295
|
+
message?: string;
|
|
296
|
+
variant?: BlinkToastVariant;
|
|
297
|
+
duration?: number;
|
|
298
|
+
};
|
|
299
|
+
type BlinkToastOptions = {
|
|
300
|
+
message?: string;
|
|
294
301
|
variant?: BlinkToastVariant;
|
|
295
302
|
duration?: number;
|
|
296
303
|
};
|
|
297
304
|
type BlinkToastContextType = {
|
|
298
|
-
show: (
|
|
305
|
+
show: (title: string, options?: BlinkToastOptions) => void;
|
|
299
306
|
};
|
|
300
|
-
declare const toast: (
|
|
307
|
+
declare const toast: (title: string, options?: BlinkToastOptions | BlinkToastVariant) => void;
|
|
301
308
|
declare function BlinkToastProvider({ children }: {
|
|
302
309
|
children: ReactNode;
|
|
303
310
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -384,9 +391,10 @@ type ContainerProps = {
|
|
|
384
391
|
children: ReactNode;
|
|
385
392
|
maxWidth?: number;
|
|
386
393
|
centered?: boolean;
|
|
394
|
+
padding?: string;
|
|
387
395
|
};
|
|
388
396
|
declare function Grid({ children, columns, gap }: GridProps): react_jsx_runtime.JSX.Element;
|
|
389
|
-
declare function Container({ children, maxWidth, centered }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
397
|
+
declare function Container({ children, maxWidth, centered, padding }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
390
398
|
|
|
391
399
|
type PlanOption = {
|
|
392
400
|
id: string;
|
|
@@ -638,4 +646,4 @@ type PullToRefreshProps = {
|
|
|
638
646
|
};
|
|
639
647
|
declare function PullToRefresh({ children, onRefresh, refreshing }: PullToRefreshProps): react_jsx_runtime.JSX.Element;
|
|
640
648
|
|
|
641
|
-
export { ActionSheet, type ActionSheetItem, type ActionSheetProps, AppHeader, type AppHeaderProps, type AppHeaderVariant, type AuthProvider, Badge, type BadgeProps, BlinkAccordion, type BlinkAccordionItem, type BlinkAccordionProps, 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, type BlinkTabItem, BlinkTabs, type BlinkTabsProps, BlinkText, type BlinkTextProps, type BlinkToastContextType, type BlinkToastData, BlinkToastProvider, type BlinkToastVariant, BlinkToggleGroup, type BlinkToggleGroupProps, type BlinkToggleOption, 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 TooltipProps, blinkConfig, dialogConfirm, showError, toast, useBlinkToast };
|
|
649
|
+
export { ActionSheet, type ActionSheetItem, type ActionSheetProps, AppHeader, type AppHeaderProps, type AppHeaderVariant, type AuthProvider, Badge, type BadgeProps, BlinkAccordion, type BlinkAccordionItem, type BlinkAccordionProps, 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, type BlinkTabItem, BlinkTabs, type BlinkTabsProps, BlinkText, type BlinkTextProps, type BlinkToastContextType, type BlinkToastData, type BlinkToastOptions, BlinkToastProvider, type BlinkToastVariant, BlinkToggleGroup, type BlinkToggleGroupProps, type BlinkToggleOption, 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 TooltipProps, blinkConfig, dialogConfirm, showError, toast, useBlinkToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as tamagui from 'tamagui';
|
|
2
2
|
import { TamaguiInternalConfig, GetProps, YStack } from 'tamagui';
|
|
3
|
-
export { Accordion, Adapt, AlertDialog, Anchor, Avatar, Button, Card, Checkbox, Circle, ColorTokens, Dialog, Fieldset, Form, GetProps, H1, H2, H3, H4, H5, H6, Input, Label, Paragraph, Popover, PortalProvider, Progress, RadioGroup, ScrollView, Select, Separator, Sheet, SizableText, SizeTokens, Slider, Spinner, Square, Switch, Tabs, Image as TamaguiImage, ListItem as TamaguiListItem, TamaguiProvider, Text, TextArea, Theme, ThemeTokens, ToggleGroup, Tooltip, TooltipSimple, Unspaced, View, VisuallyHidden, XGroup, XStack, YGroup, YStack, ZStack, styled, useMedia, useTheme, useThemeName, withStaticProperties } from 'tamagui';
|
|
3
|
+
export { Accordion, Adapt, AlertDialog, Anchor, Avatar, TamaguiProvider as BlinkProvider, Button, Card, Checkbox, Circle, ColorTokens, Dialog, Fieldset, Form, GetProps, H1, H2, H3, H4, H5, H6, Input, Label, Paragraph, Popover, PortalProvider, Progress, RadioGroup, ScrollView, Select, Separator, Sheet, SizableText, SizeTokens, Slider, Spinner, Square, Switch, Tabs, Image as TamaguiImage, ListItem as TamaguiListItem, TamaguiProvider, Text, TextArea, Theme, ThemeTokens, ToggleGroup, Tooltip, TooltipSimple, Unspaced, View, VisuallyHidden, XGroup, XStack, YGroup, YStack, ZStack, createTamagui, styled, useMedia, useTheme, useThemeName, withStaticProperties } from 'tamagui';
|
|
4
|
+
export { defaultConfig as tamaguiDefaultConfig } from '@tamagui/config/v5';
|
|
4
5
|
import * as react from 'react';
|
|
5
6
|
import { ReactNode } from 'react';
|
|
6
7
|
import * as _tamagui_core from '@tamagui/core';
|
|
@@ -290,14 +291,20 @@ declare function BlinkToggleGroup({ options, value, onValueChange, size }: Blink
|
|
|
290
291
|
type BlinkToastVariant = 'default' | 'success' | 'error' | 'warning';
|
|
291
292
|
type BlinkToastData = {
|
|
292
293
|
id: string;
|
|
293
|
-
|
|
294
|
+
title: string;
|
|
295
|
+
message?: string;
|
|
296
|
+
variant?: BlinkToastVariant;
|
|
297
|
+
duration?: number;
|
|
298
|
+
};
|
|
299
|
+
type BlinkToastOptions = {
|
|
300
|
+
message?: string;
|
|
294
301
|
variant?: BlinkToastVariant;
|
|
295
302
|
duration?: number;
|
|
296
303
|
};
|
|
297
304
|
type BlinkToastContextType = {
|
|
298
|
-
show: (
|
|
305
|
+
show: (title: string, options?: BlinkToastOptions) => void;
|
|
299
306
|
};
|
|
300
|
-
declare const toast: (
|
|
307
|
+
declare const toast: (title: string, options?: BlinkToastOptions | BlinkToastVariant) => void;
|
|
301
308
|
declare function BlinkToastProvider({ children }: {
|
|
302
309
|
children: ReactNode;
|
|
303
310
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -384,9 +391,10 @@ type ContainerProps = {
|
|
|
384
391
|
children: ReactNode;
|
|
385
392
|
maxWidth?: number;
|
|
386
393
|
centered?: boolean;
|
|
394
|
+
padding?: string;
|
|
387
395
|
};
|
|
388
396
|
declare function Grid({ children, columns, gap }: GridProps): react_jsx_runtime.JSX.Element;
|
|
389
|
-
declare function Container({ children, maxWidth, centered }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
397
|
+
declare function Container({ children, maxWidth, centered, padding }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
390
398
|
|
|
391
399
|
type PlanOption = {
|
|
392
400
|
id: string;
|
|
@@ -638,4 +646,4 @@ type PullToRefreshProps = {
|
|
|
638
646
|
};
|
|
639
647
|
declare function PullToRefresh({ children, onRefresh, refreshing }: PullToRefreshProps): react_jsx_runtime.JSX.Element;
|
|
640
648
|
|
|
641
|
-
export { ActionSheet, type ActionSheetItem, type ActionSheetProps, AppHeader, type AppHeaderProps, type AppHeaderVariant, type AuthProvider, Badge, type BadgeProps, BlinkAccordion, type BlinkAccordionItem, type BlinkAccordionProps, 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, type BlinkTabItem, BlinkTabs, type BlinkTabsProps, BlinkText, type BlinkTextProps, type BlinkToastContextType, type BlinkToastData, BlinkToastProvider, type BlinkToastVariant, BlinkToggleGroup, type BlinkToggleGroupProps, type BlinkToggleOption, 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 TooltipProps, blinkConfig, dialogConfirm, showError, toast, useBlinkToast };
|
|
649
|
+
export { ActionSheet, type ActionSheetItem, type ActionSheetProps, AppHeader, type AppHeaderProps, type AppHeaderVariant, type AuthProvider, Badge, type BadgeProps, BlinkAccordion, type BlinkAccordionItem, type BlinkAccordionProps, 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, type BlinkTabItem, BlinkTabs, type BlinkTabsProps, BlinkText, type BlinkTextProps, type BlinkToastContextType, type BlinkToastData, type BlinkToastOptions, BlinkToastProvider, type BlinkToastVariant, BlinkToggleGroup, type BlinkToggleGroupProps, type BlinkToggleOption, 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 TooltipProps, blinkConfig, dialogConfirm, showError, toast, useBlinkToast };
|
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __export(index_exports, {
|
|
|
33
33
|
BlinkButton: () => Button,
|
|
34
34
|
BlinkCard: () => Card,
|
|
35
35
|
BlinkInput: () => Input,
|
|
36
|
+
BlinkProvider: () => import_tamagui49.TamaguiProvider,
|
|
36
37
|
BlinkTabs: () => BlinkTabs,
|
|
37
38
|
BlinkText: () => BlinkText,
|
|
38
39
|
BlinkToastProvider: () => BlinkToastProvider,
|
|
@@ -123,9 +124,11 @@ __export(index_exports, {
|
|
|
123
124
|
YStack: () => import_tamagui49.YStack,
|
|
124
125
|
ZStack: () => import_tamagui49.ZStack,
|
|
125
126
|
blinkConfig: () => blinkConfig,
|
|
127
|
+
createTamagui: () => import_tamagui49.createTamagui,
|
|
126
128
|
dialogConfirm: () => dialogConfirm,
|
|
127
129
|
showError: () => showError,
|
|
128
130
|
styled: () => import_tamagui49.styled,
|
|
131
|
+
tamaguiDefaultConfig: () => import_v52.defaultConfig,
|
|
129
132
|
toast: () => toast,
|
|
130
133
|
useBlinkToast: () => useBlinkToast,
|
|
131
134
|
useMedia: () => import_tamagui49.useMedia,
|
|
@@ -143,6 +146,7 @@ var blinkConfig = (0, import_tamagui.createTamagui)({
|
|
|
143
146
|
});
|
|
144
147
|
|
|
145
148
|
// src/index.ts
|
|
149
|
+
var import_v52 = require("@tamagui/config/v5");
|
|
146
150
|
var import_tamagui49 = require("tamagui");
|
|
147
151
|
|
|
148
152
|
// src/primitives/Button.tsx
|
|
@@ -783,23 +787,31 @@ var import_react5 = require("react");
|
|
|
783
787
|
var import_tamagui17 = require("tamagui");
|
|
784
788
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
785
789
|
var ToastContext = (0, import_react5.createContext)(null);
|
|
786
|
-
var
|
|
787
|
-
default: "$
|
|
788
|
-
success: "$
|
|
789
|
-
error: "$
|
|
790
|
-
warning: "$
|
|
790
|
+
var variantStyles = {
|
|
791
|
+
default: { bg: "$color3", border: "$color6", icon: "\u2139" },
|
|
792
|
+
success: { bg: "$green2", border: "$green7", icon: "\u2713" },
|
|
793
|
+
error: { bg: "$red2", border: "$red7", icon: "\u2715" },
|
|
794
|
+
warning: { bg: "$yellow2", border: "$yellow7", icon: "!" }
|
|
791
795
|
};
|
|
792
796
|
var globalToastShow = null;
|
|
793
|
-
var toast = (
|
|
794
|
-
|
|
797
|
+
var toast = (title, options) => {
|
|
798
|
+
const opts = typeof options === "string" ? { variant: options } : options;
|
|
799
|
+
if (globalToastShow) globalToastShow(title, opts);
|
|
795
800
|
else console.warn("BlinkToastProvider not mounted");
|
|
796
801
|
};
|
|
797
802
|
function BlinkToastProvider({ children }) {
|
|
798
803
|
const [toasts, setToasts] = (0, import_react5.useState)([]);
|
|
799
|
-
const show = (0, import_react5.useCallback)((
|
|
804
|
+
const show = (0, import_react5.useCallback)((title, options) => {
|
|
800
805
|
const id = Math.random().toString(36).slice(2, 9);
|
|
801
|
-
|
|
802
|
-
|
|
806
|
+
const entry = {
|
|
807
|
+
id,
|
|
808
|
+
title,
|
|
809
|
+
message: options?.message,
|
|
810
|
+
variant: options?.variant ?? "default",
|
|
811
|
+
duration: options?.duration ?? 3e3
|
|
812
|
+
};
|
|
813
|
+
setToasts((prev) => [...prev, entry]);
|
|
814
|
+
setTimeout(() => setToasts((prev) => prev.filter((t) => t.id !== id)), entry.duration);
|
|
803
815
|
}, []);
|
|
804
816
|
(0, import_react5.useEffect)(() => {
|
|
805
817
|
globalToastShow = show;
|
|
@@ -807,24 +819,72 @@ function BlinkToastProvider({ children }) {
|
|
|
807
819
|
globalToastShow = null;
|
|
808
820
|
};
|
|
809
821
|
}, [show]);
|
|
822
|
+
const dismiss = (0, import_react5.useCallback)((id) => {
|
|
823
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
824
|
+
}, []);
|
|
810
825
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(ToastContext.Provider, { value: { show }, children: [
|
|
811
826
|
children,
|
|
812
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
827
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
813
828
|
import_tamagui17.YStack,
|
|
814
829
|
{
|
|
815
|
-
|
|
830
|
+
position: "absolute",
|
|
831
|
+
top: 50,
|
|
832
|
+
left: 0,
|
|
833
|
+
right: 0,
|
|
834
|
+
alignItems: "center",
|
|
835
|
+
gap: "$2",
|
|
836
|
+
pointerEvents: "box-none",
|
|
837
|
+
zIndex: 1e5,
|
|
816
838
|
paddingHorizontal: "$4",
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
839
|
+
children: toasts.map((t) => {
|
|
840
|
+
const style = variantStyles[t.variant ?? "default"];
|
|
841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
842
|
+
import_tamagui17.XStack,
|
|
843
|
+
{
|
|
844
|
+
width: "100%",
|
|
845
|
+
maxWidth: 400,
|
|
846
|
+
backgroundColor: style.bg,
|
|
847
|
+
borderWidth: 1,
|
|
848
|
+
borderColor: style.border,
|
|
849
|
+
borderRadius: "$4",
|
|
850
|
+
paddingHorizontal: "$4",
|
|
851
|
+
paddingVertical: "$3",
|
|
852
|
+
gap: "$3",
|
|
853
|
+
alignItems: "flex-start",
|
|
854
|
+
enterStyle: { opacity: 0, y: -20, scale: 0.95 },
|
|
855
|
+
exitStyle: { opacity: 0, y: -20, scale: 0.95 },
|
|
856
|
+
opacity: 1,
|
|
857
|
+
y: 0,
|
|
858
|
+
scale: 1,
|
|
859
|
+
animation: "quick",
|
|
860
|
+
pointerEvents: "auto",
|
|
861
|
+
elevation: 4,
|
|
862
|
+
children: [
|
|
863
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tamagui17.SizableText, { size: "$4", fontWeight: "700", marginTop: "$0.5", children: style.icon }),
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_tamagui17.YStack, { flex: 1, gap: "$1", children: [
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tamagui17.SizableText, { size: "$4", fontWeight: "600", color: "$color12", children: t.title }),
|
|
866
|
+
t.message && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_tamagui17.SizableText, { size: "$3", color: "$color10", children: t.message })
|
|
867
|
+
] }),
|
|
868
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
869
|
+
import_tamagui17.SizableText,
|
|
870
|
+
{
|
|
871
|
+
size: "$3",
|
|
872
|
+
color: "$color8",
|
|
873
|
+
fontWeight: "600",
|
|
874
|
+
pressStyle: { opacity: 0.5 },
|
|
875
|
+
onPress: () => dismiss(t.id),
|
|
876
|
+
cursor: "pointer",
|
|
877
|
+
marginTop: "$0.5",
|
|
878
|
+
children: "\u2715"
|
|
879
|
+
}
|
|
880
|
+
)
|
|
881
|
+
]
|
|
882
|
+
},
|
|
883
|
+
t.id
|
|
884
|
+
);
|
|
885
|
+
})
|
|
886
|
+
}
|
|
887
|
+
)
|
|
828
888
|
] });
|
|
829
889
|
}
|
|
830
890
|
function useBlinkToast() {
|
|
@@ -990,14 +1050,22 @@ function SafeArea({ children, edges = ["top", "bottom"] }) {
|
|
|
990
1050
|
}
|
|
991
1051
|
|
|
992
1052
|
// src/layouts/Grid.tsx
|
|
1053
|
+
var import_react6 = require("react");
|
|
993
1054
|
var import_tamagui27 = require("tamagui");
|
|
994
1055
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
995
1056
|
function Grid({ children, columns = 2, gap = "$3" }) {
|
|
996
|
-
const
|
|
997
|
-
|
|
1057
|
+
const items = import_react6.Children.toArray(children);
|
|
1058
|
+
const rows = [];
|
|
1059
|
+
for (let i = 0; i < items.length; i += columns) {
|
|
1060
|
+
rows.push(items.slice(i, i + columns));
|
|
1061
|
+
}
|
|
1062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { gap, children: rows.map((row, ri) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_tamagui27.XStack, { gap, children: [
|
|
1063
|
+
row.map((item, ci) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { flex: 1, children: item }, ci)),
|
|
1064
|
+
row.length < columns && Array.from({ length: columns - row.length }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { flex: 1 }, `pad-${i}`))
|
|
1065
|
+
] }, ri)) });
|
|
998
1066
|
}
|
|
999
|
-
function Container({ children, maxWidth = 500, centered = true }) {
|
|
1000
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { width: "100%", maxWidth, alignSelf: centered ? "center" : void 0, children });
|
|
1067
|
+
function Container({ children, maxWidth = 500, centered = true, padding = "$4" }) {
|
|
1068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { width: "100%", maxWidth, alignSelf: centered ? "center" : void 0, padding, children });
|
|
1001
1069
|
}
|
|
1002
1070
|
|
|
1003
1071
|
// src/patterns/PaywallScreen.tsx
|
|
@@ -1071,7 +1139,7 @@ function PaywallScreen({
|
|
|
1071
1139
|
}
|
|
1072
1140
|
|
|
1073
1141
|
// src/patterns/OnboardingCarousel.tsx
|
|
1074
|
-
var
|
|
1142
|
+
var import_react7 = require("react");
|
|
1075
1143
|
var import_tamagui29 = require("tamagui");
|
|
1076
1144
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1077
1145
|
function OnboardingCarousel({
|
|
@@ -1082,7 +1150,7 @@ function OnboardingCarousel({
|
|
|
1082
1150
|
skipLabel = "Skip",
|
|
1083
1151
|
nextLabel = "Next"
|
|
1084
1152
|
}) {
|
|
1085
|
-
const [current, setCurrent] = (0,
|
|
1153
|
+
const [current, setCurrent] = (0, import_react7.useState)(0);
|
|
1086
1154
|
const isLast = current === steps.length - 1;
|
|
1087
1155
|
const step = steps[current];
|
|
1088
1156
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { flex: 1, backgroundColor: "$background", padding: "$4", justifyContent: "space-between", children: [
|
|
@@ -1312,12 +1380,12 @@ function BottomSheet({ open, onOpenChange, title, children, snapPoints = [85], d
|
|
|
1312
1380
|
}
|
|
1313
1381
|
|
|
1314
1382
|
// src/patterns/LoginScreen.tsx
|
|
1315
|
-
var
|
|
1383
|
+
var import_react8 = require("react");
|
|
1316
1384
|
var import_tamagui36 = require("tamagui");
|
|
1317
1385
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1318
1386
|
function LoginScreen({ title = "Welcome", subtitle = "Sign in to continue", logo, providers = [], onProviderPress, showEmailForm, onEmailSubmit, onForgotPassword, onCreateAccount, onTerms, onPrivacy, loading }) {
|
|
1319
|
-
const [email, setEmail] = (0,
|
|
1320
|
-
const [password, setPassword] = (0,
|
|
1387
|
+
const [email, setEmail] = (0, import_react8.useState)("");
|
|
1388
|
+
const [password, setPassword] = (0, import_react8.useState)("");
|
|
1321
1389
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { flex: 1, padding: "$4", gap: "$5", backgroundColor: "$background", justifyContent: "center", children: [
|
|
1322
1390
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { alignItems: "center", gap: "$2", children: [
|
|
1323
1391
|
logo && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.YStack, { paddingBottom: "$3", children: logo }),
|
|
@@ -1529,14 +1597,14 @@ function Skeleton({ width, height, borderRadius, variant = "rectangular" }) {
|
|
|
1529
1597
|
// src/patterns/NotificationBanner.tsx
|
|
1530
1598
|
var import_tamagui42 = require("tamagui");
|
|
1531
1599
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1532
|
-
var
|
|
1600
|
+
var variantColors = {
|
|
1533
1601
|
info: { bg: "$blue3", text: "$blue11" },
|
|
1534
1602
|
success: { bg: "$green3", text: "$green11" },
|
|
1535
1603
|
warning: { bg: "$yellow3", text: "$yellow11" },
|
|
1536
1604
|
error: { bg: "$red3", text: "$red11" }
|
|
1537
1605
|
};
|
|
1538
1606
|
function NotificationBanner({ title, message, variant = "info", onPress, onDismiss, icon }) {
|
|
1539
|
-
const colors =
|
|
1607
|
+
const colors = variantColors[variant];
|
|
1540
1608
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1541
1609
|
import_tamagui42.XStack,
|
|
1542
1610
|
{
|
|
@@ -1580,11 +1648,11 @@ function ProgressSteps({ steps, currentStep, variant = "dots" }) {
|
|
|
1580
1648
|
}
|
|
1581
1649
|
|
|
1582
1650
|
// src/patterns/SwipeableRow.tsx
|
|
1583
|
-
var
|
|
1651
|
+
var import_react9 = require("react");
|
|
1584
1652
|
var import_tamagui44 = require("tamagui");
|
|
1585
1653
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
1586
1654
|
function SwipeableRow({ children, leftActions, rightActions }) {
|
|
1587
|
-
const [showActions, setShowActions] = (0,
|
|
1655
|
+
const [showActions, setShowActions] = (0, import_react9.useState)(false);
|
|
1588
1656
|
const actions = [...leftActions ?? [], ...rightActions ?? []];
|
|
1589
1657
|
if (actions.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children });
|
|
1590
1658
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_tamagui44.YStack, { children: [
|
|
@@ -1659,13 +1727,13 @@ function MediaCard({ image, title, subtitle, overlay = "gradient", aspectRatio =
|
|
|
1659
1727
|
}
|
|
1660
1728
|
|
|
1661
1729
|
// src/patterns/Carousel.tsx
|
|
1662
|
-
var
|
|
1730
|
+
var import_react10 = require("react");
|
|
1663
1731
|
var import_tamagui46 = require("tamagui");
|
|
1664
1732
|
var import_react_native3 = require("react-native");
|
|
1665
1733
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
1666
1734
|
function Carousel({ children, gap = "$3", snapToInterval, showIndicators = false }) {
|
|
1667
|
-
const [activeIndex, setActiveIndex] = (0,
|
|
1668
|
-
const count =
|
|
1735
|
+
const [activeIndex, setActiveIndex] = (0, import_react10.useState)(0);
|
|
1736
|
+
const count = import_react10.Children.count(children);
|
|
1669
1737
|
const gapPx = gap === "$2" ? 8 : gap === "$3" ? 12 : 16;
|
|
1670
1738
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_tamagui46.YStack, { gap: "$3", children: [
|
|
1671
1739
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
@@ -1715,6 +1783,7 @@ function PullToRefresh({ children, onRefresh, refreshing = false }) {
|
|
|
1715
1783
|
BlinkButton,
|
|
1716
1784
|
BlinkCard,
|
|
1717
1785
|
BlinkInput,
|
|
1786
|
+
BlinkProvider,
|
|
1718
1787
|
BlinkTabs,
|
|
1719
1788
|
BlinkText,
|
|
1720
1789
|
BlinkToastProvider,
|
|
@@ -1805,9 +1874,11 @@ function PullToRefresh({ children, onRefresh, refreshing = false }) {
|
|
|
1805
1874
|
YStack,
|
|
1806
1875
|
ZStack,
|
|
1807
1876
|
blinkConfig,
|
|
1877
|
+
createTamagui,
|
|
1808
1878
|
dialogConfirm,
|
|
1809
1879
|
showError,
|
|
1810
1880
|
styled,
|
|
1881
|
+
tamaguiDefaultConfig,
|
|
1811
1882
|
toast,
|
|
1812
1883
|
useBlinkToast,
|
|
1813
1884
|
useMedia,
|