@blinkdotnew/mobile-ui 2.0.0-alpha.8 → 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 +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js +88 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +137 -87
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +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';
|
|
4
|
-
export {
|
|
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';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import * as _tamagui_core from '@tamagui/core';
|
|
@@ -291,14 +291,20 @@ declare function BlinkToggleGroup({ options, value, onValueChange, size }: Blink
|
|
|
291
291
|
type BlinkToastVariant = 'default' | 'success' | 'error' | 'warning';
|
|
292
292
|
type BlinkToastData = {
|
|
293
293
|
id: string;
|
|
294
|
-
|
|
294
|
+
title: string;
|
|
295
|
+
message?: string;
|
|
296
|
+
variant?: BlinkToastVariant;
|
|
297
|
+
duration?: number;
|
|
298
|
+
};
|
|
299
|
+
type BlinkToastOptions = {
|
|
300
|
+
message?: string;
|
|
295
301
|
variant?: BlinkToastVariant;
|
|
296
302
|
duration?: number;
|
|
297
303
|
};
|
|
298
304
|
type BlinkToastContextType = {
|
|
299
|
-
show: (
|
|
305
|
+
show: (title: string, options?: BlinkToastOptions) => void;
|
|
300
306
|
};
|
|
301
|
-
declare const toast: (
|
|
307
|
+
declare const toast: (title: string, options?: BlinkToastOptions | BlinkToastVariant) => void;
|
|
302
308
|
declare function BlinkToastProvider({ children }: {
|
|
303
309
|
children: ReactNode;
|
|
304
310
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -640,4 +646,4 @@ type PullToRefreshProps = {
|
|
|
640
646
|
};
|
|
641
647
|
declare function PullToRefresh({ children, onRefresh, refreshing }: PullToRefreshProps): react_jsx_runtime.JSX.Element;
|
|
642
648
|
|
|
643
|
-
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,7 +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';
|
|
4
|
-
export {
|
|
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';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import * as _tamagui_core from '@tamagui/core';
|
|
@@ -291,14 +291,20 @@ declare function BlinkToggleGroup({ options, value, onValueChange, size }: Blink
|
|
|
291
291
|
type BlinkToastVariant = 'default' | 'success' | 'error' | 'warning';
|
|
292
292
|
type BlinkToastData = {
|
|
293
293
|
id: string;
|
|
294
|
-
|
|
294
|
+
title: string;
|
|
295
|
+
message?: string;
|
|
296
|
+
variant?: BlinkToastVariant;
|
|
297
|
+
duration?: number;
|
|
298
|
+
};
|
|
299
|
+
type BlinkToastOptions = {
|
|
300
|
+
message?: string;
|
|
295
301
|
variant?: BlinkToastVariant;
|
|
296
302
|
duration?: number;
|
|
297
303
|
};
|
|
298
304
|
type BlinkToastContextType = {
|
|
299
|
-
show: (
|
|
305
|
+
show: (title: string, options?: BlinkToastOptions) => void;
|
|
300
306
|
};
|
|
301
|
-
declare const toast: (
|
|
307
|
+
declare const toast: (title: string, options?: BlinkToastOptions | BlinkToastVariant) => void;
|
|
302
308
|
declare function BlinkToastProvider({ children }: {
|
|
303
309
|
children: ReactNode;
|
|
304
310
|
}): react_jsx_runtime.JSX.Element;
|
|
@@ -640,4 +646,4 @@ type PullToRefreshProps = {
|
|
|
640
646
|
};
|
|
641
647
|
declare function PullToRefresh({ children, onRefresh, refreshing }: PullToRefreshProps): react_jsx_runtime.JSX.Element;
|
|
642
648
|
|
|
643
|
-
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,
|
|
@@ -111,9 +112,6 @@ __export(index_exports, {
|
|
|
111
112
|
Text: () => import_tamagui49.Text,
|
|
112
113
|
TextArea: () => import_tamagui49.TextArea,
|
|
113
114
|
Theme: () => import_tamagui49.Theme,
|
|
114
|
-
Toast: () => import_toast.Toast,
|
|
115
|
-
ToastProvider: () => import_toast.ToastProvider,
|
|
116
|
-
ToastViewport: () => import_toast.ToastViewport,
|
|
117
115
|
ToggleGroup: () => import_tamagui49.ToggleGroup,
|
|
118
116
|
Tooltip: () => import_tamagui49.Tooltip,
|
|
119
117
|
TooltipSimple: () => import_tamagui49.TooltipSimple,
|
|
@@ -126,16 +124,16 @@ __export(index_exports, {
|
|
|
126
124
|
YStack: () => import_tamagui49.YStack,
|
|
127
125
|
ZStack: () => import_tamagui49.ZStack,
|
|
128
126
|
blinkConfig: () => blinkConfig,
|
|
127
|
+
createTamagui: () => import_tamagui49.createTamagui,
|
|
129
128
|
dialogConfirm: () => dialogConfirm,
|
|
130
129
|
showError: () => showError,
|
|
131
130
|
styled: () => import_tamagui49.styled,
|
|
131
|
+
tamaguiDefaultConfig: () => import_v52.defaultConfig,
|
|
132
132
|
toast: () => toast,
|
|
133
133
|
useBlinkToast: () => useBlinkToast,
|
|
134
134
|
useMedia: () => import_tamagui49.useMedia,
|
|
135
135
|
useTheme: () => import_tamagui49.useTheme,
|
|
136
136
|
useThemeName: () => import_tamagui49.useThemeName,
|
|
137
|
-
useToastController: () => import_toast.useToastController,
|
|
138
|
-
useToastState: () => import_toast.useToastState,
|
|
139
137
|
withStaticProperties: () => import_tamagui49.withStaticProperties
|
|
140
138
|
});
|
|
141
139
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -148,8 +146,8 @@ var blinkConfig = (0, import_tamagui.createTamagui)({
|
|
|
148
146
|
});
|
|
149
147
|
|
|
150
148
|
// src/index.ts
|
|
149
|
+
var import_v52 = require("@tamagui/config/v5");
|
|
151
150
|
var import_tamagui49 = require("tamagui");
|
|
152
|
-
var import_toast = require("@tamagui/toast");
|
|
153
151
|
|
|
154
152
|
// src/primitives/Button.tsx
|
|
155
153
|
var import_tamagui2 = require("tamagui");
|
|
@@ -789,23 +787,31 @@ var import_react5 = require("react");
|
|
|
789
787
|
var import_tamagui17 = require("tamagui");
|
|
790
788
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
791
789
|
var ToastContext = (0, import_react5.createContext)(null);
|
|
792
|
-
var
|
|
793
|
-
default: "$
|
|
794
|
-
success: "$
|
|
795
|
-
error: "$
|
|
796
|
-
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: "!" }
|
|
797
795
|
};
|
|
798
796
|
var globalToastShow = null;
|
|
799
|
-
var toast = (
|
|
800
|
-
|
|
797
|
+
var toast = (title, options) => {
|
|
798
|
+
const opts = typeof options === "string" ? { variant: options } : options;
|
|
799
|
+
if (globalToastShow) globalToastShow(title, opts);
|
|
801
800
|
else console.warn("BlinkToastProvider not mounted");
|
|
802
801
|
};
|
|
803
802
|
function BlinkToastProvider({ children }) {
|
|
804
803
|
const [toasts, setToasts] = (0, import_react5.useState)([]);
|
|
805
|
-
const show = (0, import_react5.useCallback)((
|
|
804
|
+
const show = (0, import_react5.useCallback)((title, options) => {
|
|
806
805
|
const id = Math.random().toString(36).slice(2, 9);
|
|
807
|
-
|
|
808
|
-
|
|
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);
|
|
809
815
|
}, []);
|
|
810
816
|
(0, import_react5.useEffect)(() => {
|
|
811
817
|
globalToastShow = show;
|
|
@@ -813,24 +819,72 @@ function BlinkToastProvider({ children }) {
|
|
|
813
819
|
globalToastShow = null;
|
|
814
820
|
};
|
|
815
821
|
}, [show]);
|
|
822
|
+
const dismiss = (0, import_react5.useCallback)((id) => {
|
|
823
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
824
|
+
}, []);
|
|
816
825
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(ToastContext.Provider, { value: { show }, children: [
|
|
817
826
|
children,
|
|
818
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
827
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
819
828
|
import_tamagui17.YStack,
|
|
820
829
|
{
|
|
821
|
-
|
|
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,
|
|
822
838
|
paddingHorizontal: "$4",
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
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
|
+
)
|
|
834
888
|
] });
|
|
835
889
|
}
|
|
836
890
|
function useBlinkToast() {
|
|
@@ -1543,14 +1597,14 @@ function Skeleton({ width, height, borderRadius, variant = "rectangular" }) {
|
|
|
1543
1597
|
// src/patterns/NotificationBanner.tsx
|
|
1544
1598
|
var import_tamagui42 = require("tamagui");
|
|
1545
1599
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
1546
|
-
var
|
|
1600
|
+
var variantColors = {
|
|
1547
1601
|
info: { bg: "$blue3", text: "$blue11" },
|
|
1548
1602
|
success: { bg: "$green3", text: "$green11" },
|
|
1549
1603
|
warning: { bg: "$yellow3", text: "$yellow11" },
|
|
1550
1604
|
error: { bg: "$red3", text: "$red11" }
|
|
1551
1605
|
};
|
|
1552
1606
|
function NotificationBanner({ title, message, variant = "info", onPress, onDismiss, icon }) {
|
|
1553
|
-
const colors =
|
|
1607
|
+
const colors = variantColors[variant];
|
|
1554
1608
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1555
1609
|
import_tamagui42.XStack,
|
|
1556
1610
|
{
|
|
@@ -1729,6 +1783,7 @@ function PullToRefresh({ children, onRefresh, refreshing = false }) {
|
|
|
1729
1783
|
BlinkButton,
|
|
1730
1784
|
BlinkCard,
|
|
1731
1785
|
BlinkInput,
|
|
1786
|
+
BlinkProvider,
|
|
1732
1787
|
BlinkTabs,
|
|
1733
1788
|
BlinkText,
|
|
1734
1789
|
BlinkToastProvider,
|
|
@@ -1807,9 +1862,6 @@ function PullToRefresh({ children, onRefresh, refreshing = false }) {
|
|
|
1807
1862
|
Text,
|
|
1808
1863
|
TextArea,
|
|
1809
1864
|
Theme,
|
|
1810
|
-
Toast,
|
|
1811
|
-
ToastProvider,
|
|
1812
|
-
ToastViewport,
|
|
1813
1865
|
ToggleGroup,
|
|
1814
1866
|
Tooltip,
|
|
1815
1867
|
TooltipSimple,
|
|
@@ -1822,16 +1874,16 @@ function PullToRefresh({ children, onRefresh, refreshing = false }) {
|
|
|
1822
1874
|
YStack,
|
|
1823
1875
|
ZStack,
|
|
1824
1876
|
blinkConfig,
|
|
1877
|
+
createTamagui,
|
|
1825
1878
|
dialogConfirm,
|
|
1826
1879
|
showError,
|
|
1827
1880
|
styled,
|
|
1881
|
+
tamaguiDefaultConfig,
|
|
1828
1882
|
toast,
|
|
1829
1883
|
useBlinkToast,
|
|
1830
1884
|
useMedia,
|
|
1831
1885
|
useTheme,
|
|
1832
1886
|
useThemeName,
|
|
1833
|
-
useToastController,
|
|
1834
|
-
useToastState,
|
|
1835
1887
|
withStaticProperties
|
|
1836
1888
|
});
|
|
1837
1889
|
//# sourceMappingURL=index.js.map
|