tamagui 1.12.2 → 1.13.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/dist/cjs/index.js CHANGED
@@ -108,7 +108,6 @@ __reExport(src_exports, require("@tamagui/stacks"), module.exports);
108
108
  __reExport(src_exports, require("@tamagui/switch"), module.exports);
109
109
  __reExport(src_exports, require("@tamagui/toggle-group"), module.exports);
110
110
  __reExport(src_exports, require("@tamagui/text"), module.exports);
111
- __reExport(src_exports, require("@tamagui/toast"), module.exports);
112
111
  __reExport(src_exports, require("@tamagui/tabs"), module.exports);
113
112
  __reExport(src_exports, require("@tamagui/tooltip"), module.exports);
114
113
  __reExport(src_exports, require("@tamagui/use-controllable-state"), module.exports);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './setup'\n\nexport * from '@tamagui/adapt'\nexport * from '@tamagui/alert-dialog'\nexport * from '@tamagui/animate-presence'\nexport * from '@tamagui/avatar'\nexport * from '@tamagui/button'\nexport * from '@tamagui/card'\nexport * from '@tamagui/compose-refs'\nexport * from '@tamagui/create-context'\nexport * from '@tamagui/dialog'\nexport * from '@tamagui/font-size'\nexport * from '@tamagui/form'\nexport * from '@tamagui/group'\nexport * from '@tamagui/helpers-tamagui'\nexport * from '@tamagui/image'\nexport * from '@tamagui/label'\nexport * from '@tamagui/list-item'\nexport * from '@tamagui/popover'\nexport * from '@tamagui/popper'\nexport * from '@tamagui/portal'\nexport * from '@tamagui/progress'\nexport * from '@tamagui/radio-group'\nexport * from '@tamagui/scroll-view'\nexport * from '@tamagui/select'\nexport * from '@tamagui/separator'\nexport * from '@tamagui/shapes'\nexport * from '@tamagui/sheet'\nexport * from '@tamagui/slider'\nexport * from '@tamagui/stacks'\nexport * from '@tamagui/switch'\nexport * from '@tamagui/toggle-group'\nexport * from '@tamagui/text'\nexport * from '@tamagui/toast'\nexport * from '@tamagui/tabs'\nexport * from '@tamagui/tooltip'\nexport * from '@tamagui/use-controllable-state'\nexport * from '@tamagui/use-debounce'\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/use-window-dimensions'\nexport * from '@tamagui/visually-hidden'\nexport * from '@tamagui/checkbox'\n\nexport * from './createTamagui'\n\nexport * from './views/TamaguiProvider'\nexport * from './viewTypes'\n\nexport * from './views/Anchor'\nexport * from './views/EnsureFlexed'\nexport * from './views/Fieldset'\nexport * from './views/Grid'\nexport * from './views/Input'\nexport * from './views/Layouts'\n// export * from './views/Skeleton'\nexport * from './views/Spinner'\nexport * from './views/TextArea'\n\n// since we overlap with StackProps and potentially others\n// lets be explicit on what gets exported\nexport type {\n AnimationKeys,\n ColorTokens,\n CreateTamaguiConfig,\n CreateTamaguiProps,\n FontColorTokens,\n FontLetterSpacingTokens,\n FontLineHeightTokens,\n FontSizeTokens,\n FontStyleTokens,\n FontTokens,\n FontTransformTokens,\n FontWeightTokens,\n GenericFont,\n GenericTamaguiConfig,\n GetAnimationKeys,\n GetProps,\n GetVariantProps,\n GenericTextVariants,\n GenericStackVariants,\n Media,\n MediaPropKeys,\n MediaQueries,\n MediaQueryState,\n Shorthands,\n SizeTokens,\n SpaceTokens,\n SpacerProps,\n StackPropsBase,\n TamaguiElement,\n StackNonStyleProps,\n StaticConfig,\n StaticConfigParsed,\n TamaguiBaseTheme,\n TamaguiComponent,\n TamaguiComponentPropsBase,\n TamaguiConfig,\n FontLanguages,\n TamaguiCustomConfig,\n TamaguiInternalConfig,\n TamaguiProviderProps,\n TextProps,\n TextPropsBase,\n TextNonStyleProps,\n ThemeKeys,\n ThemeName,\n ThemeParsed,\n ThemeProps,\n Themes,\n ThemeValueFallback,\n Tokens,\n TransformStyleProps,\n VariantSpreadExtras,\n VariantSpreadFunction,\n ZIndexTokens,\n} from '@tamagui/core'\n\nexport {\n // components\n Spacer,\n Stack,\n Text,\n Theme,\n FontLanguage,\n Unspaced,\n // context,\n TextAncestorContext,\n AnimationDriverProvider,\n // constants\n isChrome,\n isClient,\n isServer,\n isTouchable,\n isWeb,\n isWebTouchable,\n mediaQueryConfig,\n createComponent,\n createFont,\n createShorthands,\n createTheme,\n addTheme,\n updateTheme,\n createTokens,\n createVariable,\n getConfig,\n getAnimationDriver,\n getMedia,\n getStylesAtomic,\n getThemes,\n getTokens,\n getVariable,\n variableToString,\n getVariableValue,\n getVariableName,\n insertFont,\n isTamaguiElement,\n isTamaguiComponent,\n isVariable,\n matchMedia,\n mediaObjectToString,\n mediaState,\n spacedChildren,\n styled,\n themeable,\n useStyle,\n withStaticProperties,\n // hooks\n useGet,\n useEvent,\n useDidFinishSSR,\n useIsomorphicLayoutEffect,\n useIsTouchDevice,\n useMedia,\n useTheme,\n useThemeName,\n useSafeRef,\n} from '@tamagui/core'\n\nexport function LinearGradient(props: never) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`LinearGradient has been moved to tamagui/linear-gradient as of 1.1`)\n }\n return null\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAc,oBAAd;AAEA,wBAAc,2BAFd;AAGA,wBAAc,kCAHd;AAIA,wBAAc,sCAJd;AAKA,wBAAc,4BALd;AAMA,wBAAc,4BANd;AAOA,wBAAc,0BAPd;AAQA,wBAAc,kCARd;AASA,wBAAc,oCATd;AAUA,wBAAc,4BAVd;AAWA,wBAAc,+BAXd;AAYA,wBAAc,0BAZd;AAaA,wBAAc,2BAbd;AAcA,wBAAc,qCAdd;AAeA,wBAAc,2BAfd;AAgBA,wBAAc,2BAhBd;AAiBA,wBAAc,+BAjBd;AAkBA,wBAAc,6BAlBd;AAmBA,wBAAc,4BAnBd;AAoBA,wBAAc,4BApBd;AAqBA,wBAAc,8BArBd;AAsBA,wBAAc,iCAtBd;AAuBA,wBAAc,iCAvBd;AAwBA,wBAAc,4BAxBd;AAyBA,wBAAc,+BAzBd;AA0BA,wBAAc,4BA1Bd;AA2BA,wBAAc,2BA3Bd;AA4BA,wBAAc,4BA5Bd;AA6BA,wBAAc,4BA7Bd;AA8BA,wBAAc,4BA9Bd;AA+BA,wBAAc,kCA/Bd;AAgCA,wBAAc,0BAhCd;AAiCA,wBAAc,2BAjCd;AAkCA,wBAAc,0BAlCd;AAmCA,wBAAc,6BAnCd;AAoCA,wBAAc,4CApCd;AAqCA,wBAAc,kCArCd;AAsCA,wBAAc,sCAtCd;AAuCA,wBAAc,2CAvCd;AAwCA,wBAAc,qCAxCd;AAyCA,wBAAc,8BAzCd;AA2CA,wBAAc,4BA3Cd;AA6CA,wBAAc,oCA7Cd;AA8CA,wBAAc,wBA9Cd;AAgDA,wBAAc,2BAhDd;AAiDA,wBAAc,iCAjDd;AAkDA,wBAAc,6BAlDd;AAmDA,wBAAc,yBAnDd;AAoDA,wBAAc,0BApDd;AAqDA,wBAAc,4BArDd;AAuDA,wBAAc,4BAvDd;AAwDA,wBAAc,6BAxDd;AAqHA,kBA2DO;AAEA,SAAS,eAAe,OAAc;AAC3C,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,YAAQ,KAAK,oEAAoE;AAAA,EACnF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["export * from './setup'\n\nexport * from '@tamagui/adapt'\nexport * from '@tamagui/alert-dialog'\nexport * from '@tamagui/animate-presence'\nexport * from '@tamagui/avatar'\nexport * from '@tamagui/button'\nexport * from '@tamagui/card'\nexport * from '@tamagui/compose-refs'\nexport * from '@tamagui/create-context'\nexport * from '@tamagui/dialog'\nexport * from '@tamagui/font-size'\nexport * from '@tamagui/form'\nexport * from '@tamagui/group'\nexport * from '@tamagui/helpers-tamagui'\nexport * from '@tamagui/image'\nexport * from '@tamagui/label'\nexport * from '@tamagui/list-item'\nexport * from '@tamagui/popover'\nexport * from '@tamagui/popper'\nexport * from '@tamagui/portal'\nexport * from '@tamagui/progress'\nexport * from '@tamagui/radio-group'\nexport * from '@tamagui/scroll-view'\nexport * from '@tamagui/select'\nexport * from '@tamagui/separator'\nexport * from '@tamagui/shapes'\nexport * from '@tamagui/sheet'\nexport * from '@tamagui/slider'\nexport * from '@tamagui/stacks'\nexport * from '@tamagui/switch'\nexport * from '@tamagui/toggle-group'\nexport * from '@tamagui/text'\nexport * from '@tamagui/tabs'\nexport * from '@tamagui/tooltip'\nexport * from '@tamagui/use-controllable-state'\nexport * from '@tamagui/use-debounce'\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/use-window-dimensions'\nexport * from '@tamagui/visually-hidden'\nexport * from '@tamagui/checkbox'\n\nexport * from './createTamagui'\n\nexport * from './views/TamaguiProvider'\nexport * from './viewTypes'\n\nexport * from './views/Anchor'\nexport * from './views/EnsureFlexed'\nexport * from './views/Fieldset'\nexport * from './views/Grid'\nexport * from './views/Input'\nexport * from './views/Layouts'\n// export * from './views/Skeleton'\nexport * from './views/Spinner'\nexport * from './views/TextArea'\n\n// since we overlap with StackProps and potentially others\n// lets be explicit on what gets exported\nexport type {\n AnimationKeys,\n ColorTokens,\n CreateTamaguiConfig,\n CreateTamaguiProps,\n FontColorTokens,\n FontLetterSpacingTokens,\n FontLineHeightTokens,\n FontSizeTokens,\n FontStyleTokens,\n FontTokens,\n FontTransformTokens,\n FontWeightTokens,\n GenericFont,\n GenericTamaguiConfig,\n GetAnimationKeys,\n GetProps,\n GetVariantProps,\n GenericTextVariants,\n GenericStackVariants,\n Media,\n MediaPropKeys,\n MediaQueries,\n MediaQueryState,\n Shorthands,\n SizeTokens,\n SpaceTokens,\n SpacerProps,\n StackPropsBase,\n TamaguiElement,\n StackNonStyleProps,\n StaticConfig,\n StaticConfigParsed,\n TamaguiBaseTheme,\n TamaguiComponent,\n TamaguiComponentPropsBase,\n TamaguiConfig,\n FontLanguages,\n TamaguiCustomConfig,\n TamaguiInternalConfig,\n TamaguiProviderProps,\n TextProps,\n TextPropsBase,\n TextNonStyleProps,\n ThemeKeys,\n ThemeName,\n ThemeParsed,\n ThemeProps,\n Themes,\n ThemeValueFallback,\n Tokens,\n TransformStyleProps,\n VariantSpreadExtras,\n VariantSpreadFunction,\n ZIndexTokens,\n} from '@tamagui/core'\n\nexport {\n // components\n Spacer,\n Stack,\n Text,\n Theme,\n FontLanguage,\n Unspaced,\n // context,\n TextAncestorContext,\n AnimationDriverProvider,\n // constants\n isChrome,\n isClient,\n isServer,\n isTouchable,\n isWeb,\n isWebTouchable,\n mediaQueryConfig,\n createComponent,\n createFont,\n createShorthands,\n createTheme,\n addTheme,\n updateTheme,\n createTokens,\n createVariable,\n getConfig,\n getAnimationDriver,\n getMedia,\n getStylesAtomic,\n getThemes,\n getTokens,\n getVariable,\n variableToString,\n getVariableValue,\n getVariableName,\n insertFont,\n isTamaguiElement,\n isTamaguiComponent,\n isVariable,\n matchMedia,\n mediaObjectToString,\n mediaState,\n spacedChildren,\n styled,\n themeable,\n useStyle,\n withStaticProperties,\n // hooks\n useGet,\n useEvent,\n useDidFinishSSR,\n useIsomorphicLayoutEffect,\n useIsTouchDevice,\n useMedia,\n useTheme,\n useThemeName,\n useSafeRef,\n} from '@tamagui/core'\n\nexport function LinearGradient(props: never) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`LinearGradient has been moved to tamagui/linear-gradient as of 1.1`)\n }\n return null\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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;AAiDA,wBAAc,6BAjDd;AAkDA,wBAAc,yBAlDd;AAmDA,wBAAc,0BAnDd;AAoDA,wBAAc,4BApDd;AAsDA,wBAAc,4BAtDd;AAuDA,wBAAc,6BAvDd;AAoHA,kBA2DO;AAEA,SAAS,eAAe,OAAc;AAC3C,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,YAAQ,KAAK,oEAAoE;AAAA,EACnF;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var Form_exports = {};
20
+ __export(Form_exports, {
21
+ Form: () => Form
22
+ });
23
+ module.exports = __toCommonJS(Form_exports);
24
+ var import_core = require("@tamagui/core");
25
+ const Form = (0, import_core.styled)(import_core.Stack, {
26
+ name: "Form",
27
+ tag: "form"
28
+ });
29
+ // Annotate the CommonJS export names for ESM import in node:
30
+ 0 && (module.exports = {
31
+ Form
32
+ });
33
+ //# sourceMappingURL=Form.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/views/Form.tsx"],
4
+ "sourcesContent": ["import { Stack, styled } from '@tamagui/core'\n\nexport const Form = styled(Stack, {\n name: 'Form',\n tag: 'form',\n})\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAA8B;AAEvB,MAAM,WAAO,oBAAO,mBAAO;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AACP,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var Group_exports = {};
30
+ __export(Group_exports, {
31
+ GroupFrame: () => GroupFrame,
32
+ XGroup: () => XGroup,
33
+ YGroup: () => YGroup
34
+ });
35
+ module.exports = __toCommonJS(Group_exports);
36
+ var import_jsx_runtime = require("react/jsx-runtime");
37
+ var import_core = require("@tamagui/core");
38
+ var import_stacks = require("@tamagui/stacks");
39
+ var import_react = __toESM(require("react"));
40
+ var import_react_native = require("react-native");
41
+ const GroupFrame = (0, import_core.styled)(import_stacks.ThemeableStack, {
42
+ name: "GroupFrame",
43
+ backgroundColor: "$background",
44
+ y: 0,
45
+ variants: {
46
+ size: (val, { tokens }) => {
47
+ const borderRadius = tokens.radius[val] ?? val ?? tokens.radius["$true"];
48
+ return {
49
+ borderRadius
50
+ };
51
+ }
52
+ },
53
+ defaultVariants: {
54
+ size: "$true"
55
+ }
56
+ });
57
+ function createGroup(verticalDefault) {
58
+ return (0, import_react.forwardRef)((props, ref) => {
59
+ const activeProps = (0, import_core.useMediaPropsActive)(props);
60
+ const {
61
+ children: childrenProp,
62
+ space,
63
+ size = "$true",
64
+ spaceDirection,
65
+ separator,
66
+ scrollable,
67
+ vertical = verticalDefault,
68
+ disabled: disabledProp,
69
+ disablePassBorderRadius: disablePassBorderRadiusProp,
70
+ borderRadius,
71
+ ...restProps
72
+ } = (0, import_core.getExpandedShorthands)(activeProps);
73
+ const radius = borderRadius ?? (size ? (0, import_core.getVariableValue)((0, import_core.getTokens)(true).radius[size]) - 1 : void 0);
74
+ const hasRadius = radius !== void 0;
75
+ const disablePassBorderRadius = disablePassBorderRadiusProp ?? !hasRadius;
76
+ const childrens = import_react.Children.toArray(childrenProp);
77
+ const children = childrens.map((child, i) => {
78
+ if (!(0, import_react.isValidElement)(child))
79
+ return child;
80
+ const disabled = child.props.disabled ?? disabledProp;
81
+ const isFirst = i === 0;
82
+ const isLast = i === childrens.length - 1;
83
+ const radiusStyles = disablePassBorderRadius ? null : {
84
+ borderTopLeftRadius: 0,
85
+ borderTopRightRadius: 0,
86
+ borderBottomLeftRadius: 0,
87
+ borderBottomRightRadius: 0,
88
+ ...hasRadius && {
89
+ ...isFirst && !vertical && {
90
+ borderTopLeftRadius: radius,
91
+ borderBottomLeftRadius: radius
92
+ },
93
+ ...isFirst && vertical && {
94
+ borderTopLeftRadius: radius,
95
+ borderTopRightRadius: radius
96
+ },
97
+ ...isLast && !vertical && {
98
+ borderTopRightRadius: radius,
99
+ borderBottomRightRadius: radius
100
+ },
101
+ ...isLast && vertical && {
102
+ borderBottomLeftRadius: radius,
103
+ borderBottomRightRadius: radius
104
+ }
105
+ }
106
+ };
107
+ const props2 = {
108
+ disabled,
109
+ ...(0, import_core.isTamaguiElement)(child) ? radiusStyles : { style: radiusStyles }
110
+ };
111
+ return cloneElementWithPropOrder(child, props2);
112
+ });
113
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ GroupFrame,
115
+ {
116
+ ref,
117
+ size,
118
+ flexDirection: !vertical ? "row" : "column",
119
+ borderRadius,
120
+ ...restProps,
121
+ children: wrapScroll(
122
+ activeProps,
123
+ (0, import_core.spacedChildren)({
124
+ direction: spaceDirection,
125
+ separator,
126
+ space,
127
+ children
128
+ })
129
+ )
130
+ }
131
+ );
132
+ });
133
+ }
134
+ const YGroup = createGroup(true);
135
+ const XGroup = createGroup(false);
136
+ const wrapScroll = ({ scrollable, vertical, showScrollIndicator = false }, children) => {
137
+ if (scrollable)
138
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
+ import_react_native.ScrollView,
140
+ {
141
+ ...vertical && {
142
+ showsVerticalScrollIndicator: showScrollIndicator
143
+ },
144
+ ...!vertical && {
145
+ horizontal: true,
146
+ showsHorizontalScrollIndicator: showScrollIndicator
147
+ },
148
+ children
149
+ }
150
+ );
151
+ return children;
152
+ };
153
+ const cloneElementWithPropOrder = (child, props) => {
154
+ const next = (0, import_core.mergeProps)(child.props, props, false, (0, import_core.getConfig)().shorthands)[0];
155
+ return import_react.default.cloneElement({ ...child, props: null }, next);
156
+ };
157
+ // Annotate the CommonJS export names for ESM import in node:
158
+ 0 && (module.exports = {
159
+ GroupFrame,
160
+ XGroup,
161
+ YGroup
162
+ });
163
+ //# sourceMappingURL=Group.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/views/Group.tsx"],
4
+ "sourcesContent": ["import {\n GetProps,\n TamaguiElement,\n getConfig,\n getExpandedShorthands,\n getTokens,\n getVariableValue,\n isTamaguiElement,\n mergeProps,\n spacedChildren,\n styled,\n useMediaPropsActive,\n} from '@tamagui/core'\nimport { ThemeableStack } from '@tamagui/stacks'\nimport React, { Children, forwardRef, isValidElement } from 'react'\nimport { ScrollView } from 'react-native'\n\nexport const GroupFrame = styled(ThemeableStack, {\n name: 'GroupFrame',\n backgroundColor: '$background',\n y: 0,\n\n variants: {\n size: (val, { tokens }) => {\n const borderRadius = tokens.radius[val] ?? val ?? tokens.radius['$true']\n return {\n borderRadius,\n }\n },\n } as const,\n\n defaultVariants: {\n size: '$true',\n },\n})\n\nexport type GroupProps = GetProps<typeof GroupFrame> & {\n scrollable?: boolean\n /**\n * @default false\n */\n showScrollIndicator?: boolean\n disabled?: boolean\n vertical?: boolean\n disablePassBorderRadius?: boolean\n}\n\nfunction createGroup(verticalDefault: boolean) {\n return forwardRef<TamaguiElement, GroupProps>((props, ref) => {\n const activeProps = useMediaPropsActive(props)\n\n const {\n children: childrenProp,\n space,\n size = '$true',\n spaceDirection,\n separator,\n scrollable,\n vertical = verticalDefault,\n disabled: disabledProp,\n disablePassBorderRadius: disablePassBorderRadiusProp,\n borderRadius,\n ...restProps\n } = getExpandedShorthands(activeProps)\n\n const radius =\n borderRadius ??\n (size ? getVariableValue(getTokens(true).radius[size]) - 1 : undefined)\n\n const hasRadius = radius !== undefined\n const disablePassBorderRadius = disablePassBorderRadiusProp ?? !hasRadius\n const childrens = Children.toArray(childrenProp)\n const children = childrens.map((child, i) => {\n if (!isValidElement(child)) return child\n const disabled = child.props.disabled ?? disabledProp\n\n const isFirst = i === 0\n const isLast = i === childrens.length - 1\n\n const radiusStyles = disablePassBorderRadius\n ? null\n : {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n ...(hasRadius && {\n ...(isFirst &&\n !vertical && {\n borderTopLeftRadius: radius,\n borderBottomLeftRadius: radius,\n }),\n ...(isFirst &&\n vertical && {\n borderTopLeftRadius: radius,\n borderTopRightRadius: radius,\n }),\n ...(isLast &&\n !vertical && {\n borderTopRightRadius: radius,\n borderBottomRightRadius: radius,\n }),\n ...(isLast &&\n vertical && {\n borderBottomLeftRadius: radius,\n borderBottomRightRadius: radius,\n }),\n }),\n }\n\n const props = {\n disabled,\n ...(isTamaguiElement(child) ? radiusStyles : { style: radiusStyles }),\n }\n\n return cloneElementWithPropOrder(child, props)\n })\n\n return (\n <GroupFrame\n ref={ref}\n size={size}\n flexDirection={!vertical ? 'row' : 'column'}\n borderRadius={borderRadius}\n {...restProps}\n >\n {wrapScroll(\n activeProps,\n spacedChildren({\n direction: spaceDirection,\n separator,\n space,\n children,\n })\n )}\n </GroupFrame>\n )\n })\n}\n\nexport const YGroup = createGroup(true)\nexport const XGroup = createGroup(false)\n\nconst wrapScroll = (\n { scrollable, vertical, showScrollIndicator = false }: GroupProps,\n children: any\n) => {\n if (scrollable)\n return (\n <ScrollView\n {...(vertical && {\n showsVerticalScrollIndicator: showScrollIndicator,\n })}\n {...(!vertical && {\n horizontal: true,\n showsHorizontalScrollIndicator: showScrollIndicator,\n })}\n >\n {children}\n </ScrollView>\n )\n return children\n}\n\nconst cloneElementWithPropOrder = (child: any, props: Object) => {\n const next = mergeProps(child.props, props, false, getConfig().shorthands)[0]\n return React.cloneElement({ ...child, props: null }, next)\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuHM;AAvHN,kBAYO;AACP,oBAA+B;AAC/B,mBAA4D;AAC5D,0BAA2B;AAEpB,MAAM,iBAAa,oBAAO,8BAAgB;AAAA,EAC/C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,GAAG;AAAA,EAEH,UAAU;AAAA,IACR,MAAM,CAAC,KAAK,EAAE,OAAO,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YACtB,yBAAyB;AAAA,UAC3B;AAAA,UACF,GAAI,UACF,YAAY;AAAA,YACV,wBAAwB;AAAA,YACxB,yBAAyB;AAAA,UAC3B;AAAA,QACJ;AAAA,MACF;AAEJ,YAAMA,SAAQ;AAAA,QACZ;AAAA,QACA,OAAI,8BAAiB,KAAK,IAAI,eAAe,EAAE,OAAO,aAAa;AAAA,MACrE;AAEA,aAAO,0BAA0B,OAAOA,MAAK;AAAA,IAC/C,CAAC;AAED,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,eAAe,CAAC,WAAW,QAAQ;AAAA,QACnC;AAAA,QACC,GAAG;AAAA,QAEH;AAAA,UACC;AAAA,cACA,4BAAe;AAAA,YACb,WAAW;AAAA,YACX;AAAA,YACA;AAAA,YACA;AAAA,UACF,CAAC;AAAA,QACH;AAAA;AAAA,IACF;AAAA,EAEJ,CAAC;AACH;AAEO,MAAM,SAAS,YAAY,IAAI;AAC/B,MAAM,SAAS,YAAY,KAAK;AAEvC,MAAM,aAAa,CACjB,EAAE,YAAY,UAAU,sBAAsB,MAAM,GACpD,aACG;AACH,MAAI;AACF,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAI,YAAY;AAAA,UACf,8BAA8B;AAAA,QAChC;AAAA,QACC,GAAI,CAAC,YAAY;AAAA,UAChB,YAAY;AAAA,UACZ,gCAAgC;AAAA,QAClC;AAAA,QAEC;AAAA;AAAA,IACH;AAEJ,SAAO;AACT;AAEA,MAAM,4BAA4B,CAAC,OAAY,UAAkB;AAC/D,QAAM,WAAO,wBAAW,MAAM,OAAO,OAAO,WAAO,uBAAU,EAAE,UAAU,EAAE,CAAC;AAC5E,SAAO,aAAAC,QAAM,aAAa,EAAE,GAAG,OAAO,OAAO,KAAK,GAAG,IAAI;AAC3D;",
6
+ "names": ["props", "React"]
7
+ }
package/dist/esm/index.js CHANGED
@@ -30,7 +30,6 @@ export * from "@tamagui/stacks";
30
30
  export * from "@tamagui/switch";
31
31
  export * from "@tamagui/toggle-group";
32
32
  export * from "@tamagui/text";
33
- export * from "@tamagui/toast";
34
33
  export * from "@tamagui/tabs";
35
34
  export * from "@tamagui/tooltip";
36
35
  export * from "@tamagui/use-controllable-state";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './setup'\n\nexport * from '@tamagui/adapt'\nexport * from '@tamagui/alert-dialog'\nexport * from '@tamagui/animate-presence'\nexport * from '@tamagui/avatar'\nexport * from '@tamagui/button'\nexport * from '@tamagui/card'\nexport * from '@tamagui/compose-refs'\nexport * from '@tamagui/create-context'\nexport * from '@tamagui/dialog'\nexport * from '@tamagui/font-size'\nexport * from '@tamagui/form'\nexport * from '@tamagui/group'\nexport * from '@tamagui/helpers-tamagui'\nexport * from '@tamagui/image'\nexport * from '@tamagui/label'\nexport * from '@tamagui/list-item'\nexport * from '@tamagui/popover'\nexport * from '@tamagui/popper'\nexport * from '@tamagui/portal'\nexport * from '@tamagui/progress'\nexport * from '@tamagui/radio-group'\nexport * from '@tamagui/scroll-view'\nexport * from '@tamagui/select'\nexport * from '@tamagui/separator'\nexport * from '@tamagui/shapes'\nexport * from '@tamagui/sheet'\nexport * from '@tamagui/slider'\nexport * from '@tamagui/stacks'\nexport * from '@tamagui/switch'\nexport * from '@tamagui/toggle-group'\nexport * from '@tamagui/text'\nexport * from '@tamagui/toast'\nexport * from '@tamagui/tabs'\nexport * from '@tamagui/tooltip'\nexport * from '@tamagui/use-controllable-state'\nexport * from '@tamagui/use-debounce'\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/use-window-dimensions'\nexport * from '@tamagui/visually-hidden'\nexport * from '@tamagui/checkbox'\n\nexport * from './createTamagui'\n\nexport * from './views/TamaguiProvider'\nexport * from './viewTypes'\n\nexport * from './views/Anchor'\nexport * from './views/EnsureFlexed'\nexport * from './views/Fieldset'\nexport * from './views/Grid'\nexport * from './views/Input'\nexport * from './views/Layouts'\n// export * from './views/Skeleton'\nexport * from './views/Spinner'\nexport * from './views/TextArea'\n\n// since we overlap with StackProps and potentially others\n// lets be explicit on what gets exported\nexport type {\n AnimationKeys,\n ColorTokens,\n CreateTamaguiConfig,\n CreateTamaguiProps,\n FontColorTokens,\n FontLetterSpacingTokens,\n FontLineHeightTokens,\n FontSizeTokens,\n FontStyleTokens,\n FontTokens,\n FontTransformTokens,\n FontWeightTokens,\n GenericFont,\n GenericTamaguiConfig,\n GetAnimationKeys,\n GetProps,\n GetVariantProps,\n GenericTextVariants,\n GenericStackVariants,\n Media,\n MediaPropKeys,\n MediaQueries,\n MediaQueryState,\n Shorthands,\n SizeTokens,\n SpaceTokens,\n SpacerProps,\n StackPropsBase,\n TamaguiElement,\n StackNonStyleProps,\n StaticConfig,\n StaticConfigParsed,\n TamaguiBaseTheme,\n TamaguiComponent,\n TamaguiComponentPropsBase,\n TamaguiConfig,\n FontLanguages,\n TamaguiCustomConfig,\n TamaguiInternalConfig,\n TamaguiProviderProps,\n TextProps,\n TextPropsBase,\n TextNonStyleProps,\n ThemeKeys,\n ThemeName,\n ThemeParsed,\n ThemeProps,\n Themes,\n ThemeValueFallback,\n Tokens,\n TransformStyleProps,\n VariantSpreadExtras,\n VariantSpreadFunction,\n ZIndexTokens,\n} from '@tamagui/core'\n\nexport {\n // components\n Spacer,\n Stack,\n Text,\n Theme,\n FontLanguage,\n Unspaced,\n // context,\n TextAncestorContext,\n AnimationDriverProvider,\n // constants\n isChrome,\n isClient,\n isServer,\n isTouchable,\n isWeb,\n isWebTouchable,\n mediaQueryConfig,\n createComponent,\n createFont,\n createShorthands,\n createTheme,\n addTheme,\n updateTheme,\n createTokens,\n createVariable,\n getConfig,\n getAnimationDriver,\n getMedia,\n getStylesAtomic,\n getThemes,\n getTokens,\n getVariable,\n variableToString,\n getVariableValue,\n getVariableName,\n insertFont,\n isTamaguiElement,\n isTamaguiComponent,\n isVariable,\n matchMedia,\n mediaObjectToString,\n mediaState,\n spacedChildren,\n styled,\n themeable,\n useStyle,\n withStaticProperties,\n // hooks\n useGet,\n useEvent,\n useDidFinishSSR,\n useIsomorphicLayoutEffect,\n useIsTouchDevice,\n useMedia,\n useTheme,\n useThemeName,\n useSafeRef,\n} from '@tamagui/core'\n\nexport function LinearGradient(props: never) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`LinearGradient has been moved to tamagui/linear-gradient as of 1.1`)\n }\n return null\n}\n"],
5
- "mappings": "AAAA,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AAEd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AA6Dd;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,SAAS,eAAe,OAAc;AAC3C,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,YAAQ,KAAK,oEAAoE;AAAA,EACnF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["export * from './setup'\n\nexport * from '@tamagui/adapt'\nexport * from '@tamagui/alert-dialog'\nexport * from '@tamagui/animate-presence'\nexport * from '@tamagui/avatar'\nexport * from '@tamagui/button'\nexport * from '@tamagui/card'\nexport * from '@tamagui/compose-refs'\nexport * from '@tamagui/create-context'\nexport * from '@tamagui/dialog'\nexport * from '@tamagui/font-size'\nexport * from '@tamagui/form'\nexport * from '@tamagui/group'\nexport * from '@tamagui/helpers-tamagui'\nexport * from '@tamagui/image'\nexport * from '@tamagui/label'\nexport * from '@tamagui/list-item'\nexport * from '@tamagui/popover'\nexport * from '@tamagui/popper'\nexport * from '@tamagui/portal'\nexport * from '@tamagui/progress'\nexport * from '@tamagui/radio-group'\nexport * from '@tamagui/scroll-view'\nexport * from '@tamagui/select'\nexport * from '@tamagui/separator'\nexport * from '@tamagui/shapes'\nexport * from '@tamagui/sheet'\nexport * from '@tamagui/slider'\nexport * from '@tamagui/stacks'\nexport * from '@tamagui/switch'\nexport * from '@tamagui/toggle-group'\nexport * from '@tamagui/text'\nexport * from '@tamagui/tabs'\nexport * from '@tamagui/tooltip'\nexport * from '@tamagui/use-controllable-state'\nexport * from '@tamagui/use-debounce'\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/use-window-dimensions'\nexport * from '@tamagui/visually-hidden'\nexport * from '@tamagui/checkbox'\n\nexport * from './createTamagui'\n\nexport * from './views/TamaguiProvider'\nexport * from './viewTypes'\n\nexport * from './views/Anchor'\nexport * from './views/EnsureFlexed'\nexport * from './views/Fieldset'\nexport * from './views/Grid'\nexport * from './views/Input'\nexport * from './views/Layouts'\n// export * from './views/Skeleton'\nexport * from './views/Spinner'\nexport * from './views/TextArea'\n\n// since we overlap with StackProps and potentially others\n// lets be explicit on what gets exported\nexport type {\n AnimationKeys,\n ColorTokens,\n CreateTamaguiConfig,\n CreateTamaguiProps,\n FontColorTokens,\n FontLetterSpacingTokens,\n FontLineHeightTokens,\n FontSizeTokens,\n FontStyleTokens,\n FontTokens,\n FontTransformTokens,\n FontWeightTokens,\n GenericFont,\n GenericTamaguiConfig,\n GetAnimationKeys,\n GetProps,\n GetVariantProps,\n GenericTextVariants,\n GenericStackVariants,\n Media,\n MediaPropKeys,\n MediaQueries,\n MediaQueryState,\n Shorthands,\n SizeTokens,\n SpaceTokens,\n SpacerProps,\n StackPropsBase,\n TamaguiElement,\n StackNonStyleProps,\n StaticConfig,\n StaticConfigParsed,\n TamaguiBaseTheme,\n TamaguiComponent,\n TamaguiComponentPropsBase,\n TamaguiConfig,\n FontLanguages,\n TamaguiCustomConfig,\n TamaguiInternalConfig,\n TamaguiProviderProps,\n TextProps,\n TextPropsBase,\n TextNonStyleProps,\n ThemeKeys,\n ThemeName,\n ThemeParsed,\n ThemeProps,\n Themes,\n ThemeValueFallback,\n Tokens,\n TransformStyleProps,\n VariantSpreadExtras,\n VariantSpreadFunction,\n ZIndexTokens,\n} from '@tamagui/core'\n\nexport {\n // components\n Spacer,\n Stack,\n Text,\n Theme,\n FontLanguage,\n Unspaced,\n // context,\n TextAncestorContext,\n AnimationDriverProvider,\n // constants\n isChrome,\n isClient,\n isServer,\n isTouchable,\n isWeb,\n isWebTouchable,\n mediaQueryConfig,\n createComponent,\n createFont,\n createShorthands,\n createTheme,\n addTheme,\n updateTheme,\n createTokens,\n createVariable,\n getConfig,\n getAnimationDriver,\n getMedia,\n getStylesAtomic,\n getThemes,\n getTokens,\n getVariable,\n variableToString,\n getVariableValue,\n getVariableName,\n insertFont,\n isTamaguiElement,\n isTamaguiComponent,\n isVariable,\n matchMedia,\n mediaObjectToString,\n mediaState,\n spacedChildren,\n styled,\n themeable,\n useStyle,\n withStaticProperties,\n // hooks\n useGet,\n useEvent,\n useDidFinishSSR,\n useIsomorphicLayoutEffect,\n useIsTouchDevice,\n useMedia,\n useTheme,\n useThemeName,\n useSafeRef,\n} from '@tamagui/core'\n\nexport function LinearGradient(props: never) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`LinearGradient has been moved to tamagui/linear-gradient as of 1.1`)\n }\n return null\n}\n"],
5
+ "mappings": "AAAA,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AAEd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AA6Dd;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,SAAS,eAAe,OAAc;AAC3C,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,YAAQ,KAAK,oEAAoE;AAAA,EACnF;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -30,7 +30,6 @@ export * from "@tamagui/stacks";
30
30
  export * from "@tamagui/switch";
31
31
  export * from "@tamagui/toggle-group";
32
32
  export * from "@tamagui/text";
33
- export * from "@tamagui/toast";
34
33
  export * from "@tamagui/tabs";
35
34
  export * from "@tamagui/tooltip";
36
35
  export * from "@tamagui/use-controllable-state";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export * from './setup'\n\nexport * from '@tamagui/adapt'\nexport * from '@tamagui/alert-dialog'\nexport * from '@tamagui/animate-presence'\nexport * from '@tamagui/avatar'\nexport * from '@tamagui/button'\nexport * from '@tamagui/card'\nexport * from '@tamagui/compose-refs'\nexport * from '@tamagui/create-context'\nexport * from '@tamagui/dialog'\nexport * from '@tamagui/font-size'\nexport * from '@tamagui/form'\nexport * from '@tamagui/group'\nexport * from '@tamagui/helpers-tamagui'\nexport * from '@tamagui/image'\nexport * from '@tamagui/label'\nexport * from '@tamagui/list-item'\nexport * from '@tamagui/popover'\nexport * from '@tamagui/popper'\nexport * from '@tamagui/portal'\nexport * from '@tamagui/progress'\nexport * from '@tamagui/radio-group'\nexport * from '@tamagui/scroll-view'\nexport * from '@tamagui/select'\nexport * from '@tamagui/separator'\nexport * from '@tamagui/shapes'\nexport * from '@tamagui/sheet'\nexport * from '@tamagui/slider'\nexport * from '@tamagui/stacks'\nexport * from '@tamagui/switch'\nexport * from '@tamagui/toggle-group'\nexport * from '@tamagui/text'\nexport * from '@tamagui/toast'\nexport * from '@tamagui/tabs'\nexport * from '@tamagui/tooltip'\nexport * from '@tamagui/use-controllable-state'\nexport * from '@tamagui/use-debounce'\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/use-window-dimensions'\nexport * from '@tamagui/visually-hidden'\nexport * from '@tamagui/checkbox'\n\nexport * from './createTamagui'\n\nexport * from './views/TamaguiProvider'\nexport * from './viewTypes'\n\nexport * from './views/Anchor'\nexport * from './views/EnsureFlexed'\nexport * from './views/Fieldset'\nexport * from './views/Grid'\nexport * from './views/Input'\nexport * from './views/Layouts'\n// export * from './views/Skeleton'\nexport * from './views/Spinner'\nexport * from './views/TextArea'\n\n// since we overlap with StackProps and potentially others\n// lets be explicit on what gets exported\nexport type {\n AnimationKeys,\n ColorTokens,\n CreateTamaguiConfig,\n CreateTamaguiProps,\n FontColorTokens,\n FontLetterSpacingTokens,\n FontLineHeightTokens,\n FontSizeTokens,\n FontStyleTokens,\n FontTokens,\n FontTransformTokens,\n FontWeightTokens,\n GenericFont,\n GenericTamaguiConfig,\n GetAnimationKeys,\n GetProps,\n GetVariantProps,\n GenericTextVariants,\n GenericStackVariants,\n Media,\n MediaPropKeys,\n MediaQueries,\n MediaQueryState,\n Shorthands,\n SizeTokens,\n SpaceTokens,\n SpacerProps,\n StackPropsBase,\n TamaguiElement,\n StackNonStyleProps,\n StaticConfig,\n StaticConfigParsed,\n TamaguiBaseTheme,\n TamaguiComponent,\n TamaguiComponentPropsBase,\n TamaguiConfig,\n FontLanguages,\n TamaguiCustomConfig,\n TamaguiInternalConfig,\n TamaguiProviderProps,\n TextProps,\n TextPropsBase,\n TextNonStyleProps,\n ThemeKeys,\n ThemeName,\n ThemeParsed,\n ThemeProps,\n Themes,\n ThemeValueFallback,\n Tokens,\n TransformStyleProps,\n VariantSpreadExtras,\n VariantSpreadFunction,\n ZIndexTokens,\n} from '@tamagui/core'\n\nexport {\n // components\n Spacer,\n Stack,\n Text,\n Theme,\n FontLanguage,\n Unspaced,\n // context,\n TextAncestorContext,\n AnimationDriverProvider,\n // constants\n isChrome,\n isClient,\n isServer,\n isTouchable,\n isWeb,\n isWebTouchable,\n mediaQueryConfig,\n createComponent,\n createFont,\n createShorthands,\n createTheme,\n addTheme,\n updateTheme,\n createTokens,\n createVariable,\n getConfig,\n getAnimationDriver,\n getMedia,\n getStylesAtomic,\n getThemes,\n getTokens,\n getVariable,\n variableToString,\n getVariableValue,\n getVariableName,\n insertFont,\n isTamaguiElement,\n isTamaguiComponent,\n isVariable,\n matchMedia,\n mediaObjectToString,\n mediaState,\n spacedChildren,\n styled,\n themeable,\n useStyle,\n withStaticProperties,\n // hooks\n useGet,\n useEvent,\n useDidFinishSSR,\n useIsomorphicLayoutEffect,\n useIsTouchDevice,\n useMedia,\n useTheme,\n useThemeName,\n useSafeRef,\n} from '@tamagui/core'\n\nexport function LinearGradient(props: never) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`LinearGradient has been moved to tamagui/linear-gradient as of 1.1`)\n }\n return null\n}\n"],
5
- "mappings": "AAAA,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AAEd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AA6Dd;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,SAAS,eAAe,OAAc;AAC3C,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,YAAQ,KAAK,oEAAoE;AAAA,EACnF;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["export * from './setup'\n\nexport * from '@tamagui/adapt'\nexport * from '@tamagui/alert-dialog'\nexport * from '@tamagui/animate-presence'\nexport * from '@tamagui/avatar'\nexport * from '@tamagui/button'\nexport * from '@tamagui/card'\nexport * from '@tamagui/compose-refs'\nexport * from '@tamagui/create-context'\nexport * from '@tamagui/dialog'\nexport * from '@tamagui/font-size'\nexport * from '@tamagui/form'\nexport * from '@tamagui/group'\nexport * from '@tamagui/helpers-tamagui'\nexport * from '@tamagui/image'\nexport * from '@tamagui/label'\nexport * from '@tamagui/list-item'\nexport * from '@tamagui/popover'\nexport * from '@tamagui/popper'\nexport * from '@tamagui/portal'\nexport * from '@tamagui/progress'\nexport * from '@tamagui/radio-group'\nexport * from '@tamagui/scroll-view'\nexport * from '@tamagui/select'\nexport * from '@tamagui/separator'\nexport * from '@tamagui/shapes'\nexport * from '@tamagui/sheet'\nexport * from '@tamagui/slider'\nexport * from '@tamagui/stacks'\nexport * from '@tamagui/switch'\nexport * from '@tamagui/toggle-group'\nexport * from '@tamagui/text'\nexport * from '@tamagui/tabs'\nexport * from '@tamagui/tooltip'\nexport * from '@tamagui/use-controllable-state'\nexport * from '@tamagui/use-debounce'\nexport * from '@tamagui/use-force-update'\nexport * from '@tamagui/use-window-dimensions'\nexport * from '@tamagui/visually-hidden'\nexport * from '@tamagui/checkbox'\n\nexport * from './createTamagui'\n\nexport * from './views/TamaguiProvider'\nexport * from './viewTypes'\n\nexport * from './views/Anchor'\nexport * from './views/EnsureFlexed'\nexport * from './views/Fieldset'\nexport * from './views/Grid'\nexport * from './views/Input'\nexport * from './views/Layouts'\n// export * from './views/Skeleton'\nexport * from './views/Spinner'\nexport * from './views/TextArea'\n\n// since we overlap with StackProps and potentially others\n// lets be explicit on what gets exported\nexport type {\n AnimationKeys,\n ColorTokens,\n CreateTamaguiConfig,\n CreateTamaguiProps,\n FontColorTokens,\n FontLetterSpacingTokens,\n FontLineHeightTokens,\n FontSizeTokens,\n FontStyleTokens,\n FontTokens,\n FontTransformTokens,\n FontWeightTokens,\n GenericFont,\n GenericTamaguiConfig,\n GetAnimationKeys,\n GetProps,\n GetVariantProps,\n GenericTextVariants,\n GenericStackVariants,\n Media,\n MediaPropKeys,\n MediaQueries,\n MediaQueryState,\n Shorthands,\n SizeTokens,\n SpaceTokens,\n SpacerProps,\n StackPropsBase,\n TamaguiElement,\n StackNonStyleProps,\n StaticConfig,\n StaticConfigParsed,\n TamaguiBaseTheme,\n TamaguiComponent,\n TamaguiComponentPropsBase,\n TamaguiConfig,\n FontLanguages,\n TamaguiCustomConfig,\n TamaguiInternalConfig,\n TamaguiProviderProps,\n TextProps,\n TextPropsBase,\n TextNonStyleProps,\n ThemeKeys,\n ThemeName,\n ThemeParsed,\n ThemeProps,\n Themes,\n ThemeValueFallback,\n Tokens,\n TransformStyleProps,\n VariantSpreadExtras,\n VariantSpreadFunction,\n ZIndexTokens,\n} from '@tamagui/core'\n\nexport {\n // components\n Spacer,\n Stack,\n Text,\n Theme,\n FontLanguage,\n Unspaced,\n // context,\n TextAncestorContext,\n AnimationDriverProvider,\n // constants\n isChrome,\n isClient,\n isServer,\n isTouchable,\n isWeb,\n isWebTouchable,\n mediaQueryConfig,\n createComponent,\n createFont,\n createShorthands,\n createTheme,\n addTheme,\n updateTheme,\n createTokens,\n createVariable,\n getConfig,\n getAnimationDriver,\n getMedia,\n getStylesAtomic,\n getThemes,\n getTokens,\n getVariable,\n variableToString,\n getVariableValue,\n getVariableName,\n insertFont,\n isTamaguiElement,\n isTamaguiComponent,\n isVariable,\n matchMedia,\n mediaObjectToString,\n mediaState,\n spacedChildren,\n styled,\n themeable,\n useStyle,\n withStaticProperties,\n // hooks\n useGet,\n useEvent,\n useDidFinishSSR,\n useIsomorphicLayoutEffect,\n useIsTouchDevice,\n useMedia,\n useTheme,\n useThemeName,\n useSafeRef,\n} from '@tamagui/core'\n\nexport function LinearGradient(props: never) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`LinearGradient has been moved to tamagui/linear-gradient as of 1.1`)\n }\n return null\n}\n"],
5
+ "mappings": "AAAA,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AAEd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAEd,cAAc;AACd,cAAc;AA6Dd;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,SAAS,eAAe,OAAc;AAC3C,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,YAAQ,KAAK,oEAAoE;AAAA,EACnF;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,9 @@
1
+ import { Stack, styled } from "@tamagui/core";
2
+ const Form = styled(Stack, {
3
+ name: "Form",
4
+ tag: "form"
5
+ });
6
+ export {
7
+ Form
8
+ };
9
+ //# sourceMappingURL=Form.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/views/Form.tsx"],
4
+ "sourcesContent": ["import { Stack, styled } from '@tamagui/core'\n\nexport const Form = styled(Stack, {\n name: 'Form',\n tag: 'form',\n})\n"],
5
+ "mappings": "AAAA,SAAS,OAAO,cAAc;AAEvB,MAAM,OAAO,OAAO,OAAO;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AACP,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,9 @@
1
+ import { Stack, styled } from "@tamagui/core";
2
+ const Form = styled(Stack, {
3
+ name: "Form",
4
+ tag: "form"
5
+ });
6
+ export {
7
+ Form
8
+ };
9
+ //# sourceMappingURL=Form.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/views/Form.tsx"],
4
+ "sourcesContent": ["import { Stack, styled } from '@tamagui/core'\n\nexport const Form = styled(Stack, {\n name: 'Form',\n tag: 'form',\n})\n"],
5
+ "mappings": "AAAA,SAAS,OAAO,cAAc;AAEvB,MAAM,OAAO,OAAO,OAAO;AAAA,EAChC,MAAM;AAAA,EACN,KAAK;AACP,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,137 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import {
3
+ getConfig,
4
+ getExpandedShorthands,
5
+ getTokens,
6
+ getVariableValue,
7
+ isTamaguiElement,
8
+ mergeProps,
9
+ spacedChildren,
10
+ styled,
11
+ useMediaPropsActive
12
+ } from "@tamagui/core";
13
+ import { ThemeableStack } from "@tamagui/stacks";
14
+ import React, { Children, forwardRef, isValidElement } from "react";
15
+ import { ScrollView } from "react-native";
16
+ const GroupFrame = styled(ThemeableStack, {
17
+ name: "GroupFrame",
18
+ backgroundColor: "$background",
19
+ y: 0,
20
+ variants: {
21
+ size: (val, { tokens }) => {
22
+ const borderRadius = tokens.radius[val] ?? val ?? tokens.radius["$true"];
23
+ return {
24
+ borderRadius
25
+ };
26
+ }
27
+ },
28
+ defaultVariants: {
29
+ size: "$true"
30
+ }
31
+ });
32
+ function createGroup(verticalDefault) {
33
+ return forwardRef((props, ref) => {
34
+ const activeProps = useMediaPropsActive(props);
35
+ const {
36
+ children: childrenProp,
37
+ space,
38
+ size = "$true",
39
+ spaceDirection,
40
+ separator,
41
+ scrollable,
42
+ vertical = verticalDefault,
43
+ disabled: disabledProp,
44
+ disablePassBorderRadius: disablePassBorderRadiusProp,
45
+ borderRadius,
46
+ ...restProps
47
+ } = getExpandedShorthands(activeProps);
48
+ const radius = borderRadius ?? (size ? getVariableValue(getTokens(true).radius[size]) - 1 : void 0);
49
+ const hasRadius = radius !== void 0;
50
+ const disablePassBorderRadius = disablePassBorderRadiusProp ?? !hasRadius;
51
+ const childrens = Children.toArray(childrenProp);
52
+ const children = childrens.map((child, i) => {
53
+ if (!isValidElement(child))
54
+ return child;
55
+ const disabled = child.props.disabled ?? disabledProp;
56
+ const isFirst = i === 0;
57
+ const isLast = i === childrens.length - 1;
58
+ const radiusStyles = disablePassBorderRadius ? null : {
59
+ borderTopLeftRadius: 0,
60
+ borderTopRightRadius: 0,
61
+ borderBottomLeftRadius: 0,
62
+ borderBottomRightRadius: 0,
63
+ ...hasRadius && {
64
+ ...isFirst && !vertical && {
65
+ borderTopLeftRadius: radius,
66
+ borderBottomLeftRadius: radius
67
+ },
68
+ ...isFirst && vertical && {
69
+ borderTopLeftRadius: radius,
70
+ borderTopRightRadius: radius
71
+ },
72
+ ...isLast && !vertical && {
73
+ borderTopRightRadius: radius,
74
+ borderBottomRightRadius: radius
75
+ },
76
+ ...isLast && vertical && {
77
+ borderBottomLeftRadius: radius,
78
+ borderBottomRightRadius: radius
79
+ }
80
+ }
81
+ };
82
+ const props2 = {
83
+ disabled,
84
+ ...isTamaguiElement(child) ? radiusStyles : { style: radiusStyles }
85
+ };
86
+ return cloneElementWithPropOrder(child, props2);
87
+ });
88
+ return /* @__PURE__ */ jsx(
89
+ GroupFrame,
90
+ {
91
+ ref,
92
+ size,
93
+ flexDirection: !vertical ? "row" : "column",
94
+ borderRadius,
95
+ ...restProps,
96
+ children: wrapScroll(
97
+ activeProps,
98
+ spacedChildren({
99
+ direction: spaceDirection,
100
+ separator,
101
+ space,
102
+ children
103
+ })
104
+ )
105
+ }
106
+ );
107
+ });
108
+ }
109
+ const YGroup = createGroup(true);
110
+ const XGroup = createGroup(false);
111
+ const wrapScroll = ({ scrollable, vertical, showScrollIndicator = false }, children) => {
112
+ if (scrollable)
113
+ return /* @__PURE__ */ jsx(
114
+ ScrollView,
115
+ {
116
+ ...vertical && {
117
+ showsVerticalScrollIndicator: showScrollIndicator
118
+ },
119
+ ...!vertical && {
120
+ horizontal: true,
121
+ showsHorizontalScrollIndicator: showScrollIndicator
122
+ },
123
+ children
124
+ }
125
+ );
126
+ return children;
127
+ };
128
+ const cloneElementWithPropOrder = (child, props) => {
129
+ const next = mergeProps(child.props, props, false, getConfig().shorthands)[0];
130
+ return React.cloneElement({ ...child, props: null }, next);
131
+ };
132
+ export {
133
+ GroupFrame,
134
+ XGroup,
135
+ YGroup
136
+ };
137
+ //# sourceMappingURL=Group.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/views/Group.tsx"],
4
+ "sourcesContent": ["import {\n GetProps,\n TamaguiElement,\n getConfig,\n getExpandedShorthands,\n getTokens,\n getVariableValue,\n isTamaguiElement,\n mergeProps,\n spacedChildren,\n styled,\n useMediaPropsActive,\n} from '@tamagui/core'\nimport { ThemeableStack } from '@tamagui/stacks'\nimport React, { Children, forwardRef, isValidElement } from 'react'\nimport { ScrollView } from 'react-native'\n\nexport const GroupFrame = styled(ThemeableStack, {\n name: 'GroupFrame',\n backgroundColor: '$background',\n y: 0,\n\n variants: {\n size: (val, { tokens }) => {\n const borderRadius = tokens.radius[val] ?? val ?? tokens.radius['$true']\n return {\n borderRadius,\n }\n },\n } as const,\n\n defaultVariants: {\n size: '$true',\n },\n})\n\nexport type GroupProps = GetProps<typeof GroupFrame> & {\n scrollable?: boolean\n /**\n * @default false\n */\n showScrollIndicator?: boolean\n disabled?: boolean\n vertical?: boolean\n disablePassBorderRadius?: boolean\n}\n\nfunction createGroup(verticalDefault: boolean) {\n return forwardRef<TamaguiElement, GroupProps>((props, ref) => {\n const activeProps = useMediaPropsActive(props)\n\n const {\n children: childrenProp,\n space,\n size = '$true',\n spaceDirection,\n separator,\n scrollable,\n vertical = verticalDefault,\n disabled: disabledProp,\n disablePassBorderRadius: disablePassBorderRadiusProp,\n borderRadius,\n ...restProps\n } = getExpandedShorthands(activeProps)\n\n const radius =\n borderRadius ??\n (size ? getVariableValue(getTokens(true).radius[size]) - 1 : undefined)\n\n const hasRadius = radius !== undefined\n const disablePassBorderRadius = disablePassBorderRadiusProp ?? !hasRadius\n const childrens = Children.toArray(childrenProp)\n const children = childrens.map((child, i) => {\n if (!isValidElement(child)) return child\n const disabled = child.props.disabled ?? disabledProp\n\n const isFirst = i === 0\n const isLast = i === childrens.length - 1\n\n const radiusStyles = disablePassBorderRadius\n ? null\n : {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0,\n ...(hasRadius && {\n ...(isFirst &&\n !vertical && {\n borderTopLeftRadius: radius,\n borderBottomLeftRadius: radius,\n }),\n ...(isFirst &&\n vertical && {\n borderTopLeftRadius: radius,\n borderTopRightRadius: radius,\n }),\n ...(isLast &&\n !vertical && {\n borderTopRightRadius: radius,\n borderBottomRightRadius: radius,\n }),\n ...(isLast &&\n vertical && {\n borderBottomLeftRadius: radius,\n borderBottomRightRadius: radius,\n }),\n }),\n }\n\n const props = {\n disabled,\n ...(isTamaguiElement(child) ? radiusStyles : { style: radiusStyles }),\n }\n\n return cloneElementWithPropOrder(child, props)\n })\n\n return (\n <GroupFrame\n ref={ref}\n size={size}\n flexDirection={!vertical ? 'row' : 'column'}\n borderRadius={borderRadius}\n {...restProps}\n >\n {wrapScroll(\n activeProps,\n spacedChildren({\n direction: spaceDirection,\n separator,\n space,\n children,\n })\n )}\n </GroupFrame>\n )\n })\n}\n\nexport const YGroup = createGroup(true)\nexport const XGroup = createGroup(false)\n\nconst wrapScroll = (\n { scrollable, vertical, showScrollIndicator = false }: GroupProps,\n children: any\n) => {\n if (scrollable)\n return (\n <ScrollView\n {...(vertical && {\n showsVerticalScrollIndicator: showScrollIndicator,\n })}\n {...(!vertical && {\n horizontal: true,\n showsHorizontalScrollIndicator: showScrollIndicator,\n })}\n >\n {children}\n </ScrollView>\n )\n return children\n}\n\nconst cloneElementWithPropOrder = (child: any, props: Object) => {\n const next = mergeProps(child.props, props, false, getConfig().shorthands)[0]\n return React.cloneElement({ ...child, props: null }, next)\n}\n"],
5
+ "mappings": "AAuHM;AAvHN;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,sBAAsB;AAC/B,OAAO,SAAS,UAAU,YAAY,sBAAsB;AAC5D,SAAS,kBAAkB;AAEpB,MAAM,aAAa,OAAO,gBAAgB;AAAA,EAC/C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,GAAG;AAAA,EAEH,UAAU;AAAA,IACR,MAAM,CAAC,KAAK,EAAE,OAAO,MAAM;AACzB,YAAM,eAAe,OAAO,OAAO,GAAG,KAAK,OAAO,OAAO,OAAO,OAAO;AACvE,aAAO;AAAA,QACL;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,MAAM;AAAA,EACR;AACF,CAAC;AAaD,SAAS,YAAY,iBAA0B;AAC7C,SAAO,WAAuC,CAAC,OAAO,QAAQ;AAC5D,UAAM,cAAc,oBAAoB,KAAK;AAE7C,UAAM;AAAA,MACJ,UAAU;AAAA,MACV;AAAA,MACA,OAAO;AAAA,MACP;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX,UAAU;AAAA,MACV,yBAAyB;AAAA,MACzB;AAAA,MACA,GAAG;AAAA,IACL,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