@blinkdotnew/mobile-ui 2.0.0-alpha.7 → 2.0.0-alpha.8

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 CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as tamagui from 'tamagui';
2
2
  import { TamaguiInternalConfig, GetProps, YStack } from 'tamagui';
3
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 { Toast, ToastProps, ToastProvider, ToastProviderProps, ToastViewport, ToastViewportProps, useToastController, useToastState } from '@tamagui/toast';
4
5
  import * as react from 'react';
5
6
  import { ReactNode } from 'react';
6
7
  import * as _tamagui_core from '@tamagui/core';
@@ -384,9 +385,10 @@ type ContainerProps = {
384
385
  children: ReactNode;
385
386
  maxWidth?: number;
386
387
  centered?: boolean;
388
+ padding?: string;
387
389
  };
388
390
  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;
391
+ declare function Container({ children, maxWidth, centered, padding }: ContainerProps): react_jsx_runtime.JSX.Element;
390
392
 
391
393
  type PlanOption = {
392
394
  id: string;
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
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 { Toast, ToastProps, ToastProvider, ToastProviderProps, ToastViewport, ToastViewportProps, useToastController, useToastState } from '@tamagui/toast';
4
5
  import * as react from 'react';
5
6
  import { ReactNode } from 'react';
6
7
  import * as _tamagui_core from '@tamagui/core';
@@ -384,9 +385,10 @@ type ContainerProps = {
384
385
  children: ReactNode;
385
386
  maxWidth?: number;
386
387
  centered?: boolean;
388
+ padding?: string;
387
389
  };
388
390
  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;
391
+ declare function Container({ children, maxWidth, centered, padding }: ContainerProps): react_jsx_runtime.JSX.Element;
390
392
 
391
393
  type PlanOption = {
392
394
  id: string;
package/dist/index.js CHANGED
@@ -111,6 +111,9 @@ __export(index_exports, {
111
111
  Text: () => import_tamagui49.Text,
112
112
  TextArea: () => import_tamagui49.TextArea,
113
113
  Theme: () => import_tamagui49.Theme,
114
+ Toast: () => import_toast.Toast,
115
+ ToastProvider: () => import_toast.ToastProvider,
116
+ ToastViewport: () => import_toast.ToastViewport,
114
117
  ToggleGroup: () => import_tamagui49.ToggleGroup,
115
118
  Tooltip: () => import_tamagui49.Tooltip,
116
119
  TooltipSimple: () => import_tamagui49.TooltipSimple,
@@ -131,6 +134,8 @@ __export(index_exports, {
131
134
  useMedia: () => import_tamagui49.useMedia,
132
135
  useTheme: () => import_tamagui49.useTheme,
133
136
  useThemeName: () => import_tamagui49.useThemeName,
137
+ useToastController: () => import_toast.useToastController,
138
+ useToastState: () => import_toast.useToastState,
134
139
  withStaticProperties: () => import_tamagui49.withStaticProperties
135
140
  });
136
141
  module.exports = __toCommonJS(index_exports);
@@ -144,6 +149,7 @@ var blinkConfig = (0, import_tamagui.createTamagui)({
144
149
 
145
150
  // src/index.ts
146
151
  var import_tamagui49 = require("tamagui");
152
+ var import_toast = require("@tamagui/toast");
147
153
 
148
154
  // src/primitives/Button.tsx
149
155
  var import_tamagui2 = require("tamagui");
@@ -990,14 +996,22 @@ function SafeArea({ children, edges = ["top", "bottom"] }) {
990
996
  }
991
997
 
992
998
  // src/layouts/Grid.tsx
999
+ var import_react6 = require("react");
993
1000
  var import_tamagui27 = require("tamagui");
994
1001
  var import_jsx_runtime19 = require("react/jsx-runtime");
995
1002
  function Grid({ children, columns = 2, gap = "$3" }) {
996
- const childWidth = `${100 / columns}%`;
997
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.XStack, { flexWrap: "wrap", gap, children: Array.isArray(children) ? children.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { width: childWidth, flexBasis: childWidth, children: child }, i)) : children });
1003
+ const items = import_react6.Children.toArray(children);
1004
+ const rows = [];
1005
+ for (let i = 0; i < items.length; i += columns) {
1006
+ rows.push(items.slice(i, i + columns));
1007
+ }
1008
+ 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: [
1009
+ row.map((item, ci) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { flex: 1, children: item }, ci)),
1010
+ row.length < columns && Array.from({ length: columns - row.length }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { flex: 1 }, `pad-${i}`))
1011
+ ] }, ri)) });
998
1012
  }
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 });
1013
+ function Container({ children, maxWidth = 500, centered = true, padding = "$4" }) {
1014
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tamagui27.YStack, { width: "100%", maxWidth, alignSelf: centered ? "center" : void 0, padding, children });
1001
1015
  }
1002
1016
 
1003
1017
  // src/patterns/PaywallScreen.tsx
@@ -1071,7 +1085,7 @@ function PaywallScreen({
1071
1085
  }
1072
1086
 
1073
1087
  // src/patterns/OnboardingCarousel.tsx
1074
- var import_react6 = require("react");
1088
+ var import_react7 = require("react");
1075
1089
  var import_tamagui29 = require("tamagui");
1076
1090
  var import_jsx_runtime21 = require("react/jsx-runtime");
1077
1091
  function OnboardingCarousel({
@@ -1082,7 +1096,7 @@ function OnboardingCarousel({
1082
1096
  skipLabel = "Skip",
1083
1097
  nextLabel = "Next"
1084
1098
  }) {
1085
- const [current, setCurrent] = (0, import_react6.useState)(0);
1099
+ const [current, setCurrent] = (0, import_react7.useState)(0);
1086
1100
  const isLast = current === steps.length - 1;
1087
1101
  const step = steps[current];
1088
1102
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_tamagui29.YStack, { flex: 1, backgroundColor: "$background", padding: "$4", justifyContent: "space-between", children: [
@@ -1312,12 +1326,12 @@ function BottomSheet({ open, onOpenChange, title, children, snapPoints = [85], d
1312
1326
  }
1313
1327
 
1314
1328
  // src/patterns/LoginScreen.tsx
1315
- var import_react7 = require("react");
1329
+ var import_react8 = require("react");
1316
1330
  var import_tamagui36 = require("tamagui");
1317
1331
  var import_jsx_runtime28 = require("react/jsx-runtime");
1318
1332
  function LoginScreen({ title = "Welcome", subtitle = "Sign in to continue", logo, providers = [], onProviderPress, showEmailForm, onEmailSubmit, onForgotPassword, onCreateAccount, onTerms, onPrivacy, loading }) {
1319
- const [email, setEmail] = (0, import_react7.useState)("");
1320
- const [password, setPassword] = (0, import_react7.useState)("");
1333
+ const [email, setEmail] = (0, import_react8.useState)("");
1334
+ const [password, setPassword] = (0, import_react8.useState)("");
1321
1335
  return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { flex: 1, padding: "$4", gap: "$5", backgroundColor: "$background", justifyContent: "center", children: [
1322
1336
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_tamagui36.YStack, { alignItems: "center", gap: "$2", children: [
1323
1337
  logo && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_tamagui36.YStack, { paddingBottom: "$3", children: logo }),
@@ -1580,11 +1594,11 @@ function ProgressSteps({ steps, currentStep, variant = "dots" }) {
1580
1594
  }
1581
1595
 
1582
1596
  // src/patterns/SwipeableRow.tsx
1583
- var import_react8 = require("react");
1597
+ var import_react9 = require("react");
1584
1598
  var import_tamagui44 = require("tamagui");
1585
1599
  var import_jsx_runtime36 = require("react/jsx-runtime");
1586
1600
  function SwipeableRow({ children, leftActions, rightActions }) {
1587
- const [showActions, setShowActions] = (0, import_react8.useState)(false);
1601
+ const [showActions, setShowActions] = (0, import_react9.useState)(false);
1588
1602
  const actions = [...leftActions ?? [], ...rightActions ?? []];
1589
1603
  if (actions.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children });
1590
1604
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_tamagui44.YStack, { children: [
@@ -1659,13 +1673,13 @@ function MediaCard({ image, title, subtitle, overlay = "gradient", aspectRatio =
1659
1673
  }
1660
1674
 
1661
1675
  // src/patterns/Carousel.tsx
1662
- var import_react9 = require("react");
1676
+ var import_react10 = require("react");
1663
1677
  var import_tamagui46 = require("tamagui");
1664
1678
  var import_react_native3 = require("react-native");
1665
1679
  var import_jsx_runtime38 = require("react/jsx-runtime");
1666
1680
  function Carousel({ children, gap = "$3", snapToInterval, showIndicators = false }) {
1667
- const [activeIndex, setActiveIndex] = (0, import_react9.useState)(0);
1668
- const count = import_react9.Children.count(children);
1681
+ const [activeIndex, setActiveIndex] = (0, import_react10.useState)(0);
1682
+ const count = import_react10.Children.count(children);
1669
1683
  const gapPx = gap === "$2" ? 8 : gap === "$3" ? 12 : 16;
1670
1684
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_tamagui46.YStack, { gap: "$3", children: [
1671
1685
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
@@ -1793,6 +1807,9 @@ function PullToRefresh({ children, onRefresh, refreshing = false }) {
1793
1807
  Text,
1794
1808
  TextArea,
1795
1809
  Theme,
1810
+ Toast,
1811
+ ToastProvider,
1812
+ ToastViewport,
1796
1813
  ToggleGroup,
1797
1814
  Tooltip,
1798
1815
  TooltipSimple,
@@ -1813,6 +1830,8 @@ function PullToRefresh({ children, onRefresh, refreshing = false }) {
1813
1830
  useMedia,
1814
1831
  useTheme,
1815
1832
  useThemeName,
1833
+ useToastController,
1834
+ useToastState,
1816
1835
  withStaticProperties
1817
1836
  });
1818
1837
  //# sourceMappingURL=index.js.map