@tamagui/demos 1.125.6 → 1.125.7

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.
Files changed (121) hide show
  1. package/dist/esm/AccordionDemo.native.js +66 -79
  2. package/dist/esm/AccordionDemo.native.js.map +1 -6
  3. package/dist/esm/AddThemeDemo.native.js +25 -34
  4. package/dist/esm/AddThemeDemo.native.js.map +1 -6
  5. package/dist/esm/AlertDialogDemo.native.js +66 -84
  6. package/dist/esm/AlertDialogDemo.native.js.map +1 -6
  7. package/dist/esm/AnimationsDemo.native.js +65 -75
  8. package/dist/esm/AnimationsDemo.native.js.map +1 -6
  9. package/dist/esm/AnimationsEnterDemo.native.js +33 -38
  10. package/dist/esm/AnimationsEnterDemo.native.js.map +1 -6
  11. package/dist/esm/AnimationsHoverDemo.native.js +4 -6
  12. package/dist/esm/AnimationsHoverDemo.native.js.map +1 -6
  13. package/dist/esm/AnimationsPresenceDemo.native.js +78 -91
  14. package/dist/esm/AnimationsPresenceDemo.native.js.map +1 -6
  15. package/dist/esm/AnimationsTimingDemo.native.js +4 -6
  16. package/dist/esm/AnimationsTimingDemo.native.js.map +1 -6
  17. package/dist/esm/AvatarDemo.native.js +23 -34
  18. package/dist/esm/AvatarDemo.native.js.map +1 -6
  19. package/dist/esm/BuildAButtonDemo.native.js +73 -94
  20. package/dist/esm/BuildAButtonDemo.native.js.map +1 -6
  21. package/dist/esm/ButtonDemo.native.js +51 -68
  22. package/dist/esm/ButtonDemo.native.js.map +1 -6
  23. package/dist/esm/CardDemo.native.js +47 -63
  24. package/dist/esm/CardDemo.native.js.map +1 -6
  25. package/dist/esm/CheckboxDemo.native.js +31 -36
  26. package/dist/esm/CheckboxDemo.native.js.map +1 -6
  27. package/dist/esm/CheckboxHeadlessDemo.native.js +26 -33
  28. package/dist/esm/CheckboxHeadlessDemo.native.js.map +1 -6
  29. package/dist/esm/CheckboxUnstyledDemo.native.js +36 -40
  30. package/dist/esm/CheckboxUnstyledDemo.native.js.map +1 -6
  31. package/dist/esm/ColorsDemo.native.js +84 -106
  32. package/dist/esm/ColorsDemo.native.js.map +1 -6
  33. package/dist/esm/DialogDemo.native.js +130 -168
  34. package/dist/esm/DialogDemo.native.js.map +1 -6
  35. package/dist/esm/FormsDemo.native.js +18 -25
  36. package/dist/esm/FormsDemo.native.js.map +1 -6
  37. package/dist/esm/Grid.native.js +23 -22
  38. package/dist/esm/Grid.native.js.map +1 -6
  39. package/dist/esm/GroupDemo.native.js +55 -72
  40. package/dist/esm/GroupDemo.native.js.map +1 -6
  41. package/dist/esm/HeadingsDemo.native.js +16 -25
  42. package/dist/esm/HeadingsDemo.native.js.map +1 -6
  43. package/dist/esm/ImageDemo.native.js +3 -5
  44. package/dist/esm/ImageDemo.native.js.map +1 -6
  45. package/dist/esm/InputsDemo.native.js +21 -31
  46. package/dist/esm/InputsDemo.native.js.map +1 -6
  47. package/dist/esm/LabelDemo.native.js +29 -40
  48. package/dist/esm/LabelDemo.native.js.map +1 -6
  49. package/dist/esm/LinearGradientDemo.native.js +20 -43
  50. package/dist/esm/LinearGradientDemo.native.js.map +1 -6
  51. package/dist/esm/ListItemDemo.native.js +50 -63
  52. package/dist/esm/ListItemDemo.native.js.map +1 -6
  53. package/dist/esm/LucideIconsDemo.native.js +38 -44
  54. package/dist/esm/LucideIconsDemo.native.js.map +1 -6
  55. package/dist/esm/NewInputsDemo.native.js +21 -31
  56. package/dist/esm/NewInputsDemo.native.js.map +1 -6
  57. package/dist/esm/PopoverDemo.native.js +112 -143
  58. package/dist/esm/PopoverDemo.native.js.map +1 -6
  59. package/dist/esm/ProgressDemo.native.js +68 -85
  60. package/dist/esm/ProgressDemo.native.js.map +1 -6
  61. package/dist/esm/RadioGroupDemo.native.js +28 -38
  62. package/dist/esm/RadioGroupDemo.native.js.map +1 -6
  63. package/dist/esm/RadioGroupHeadlessDemo.native.js +75 -65
  64. package/dist/esm/RadioGroupHeadlessDemo.native.js.map +1 -6
  65. package/dist/esm/RadioGroupUnstyledDemo.native.js +94 -96
  66. package/dist/esm/RadioGroupUnstyledDemo.native.js.map +1 -6
  67. package/dist/esm/ReplaceThemeDemo.native.js +25 -29
  68. package/dist/esm/ReplaceThemeDemo.native.js.map +1 -6
  69. package/dist/esm/ScrollViewDemo.native.js +37 -48
  70. package/dist/esm/ScrollViewDemo.native.js.map +1 -6
  71. package/dist/esm/SelectDemo.native.js +183 -263
  72. package/dist/esm/SelectDemo.native.js.map +1 -6
  73. package/dist/esm/SeparatorDemo.native.js +29 -42
  74. package/dist/esm/SeparatorDemo.native.js.map +1 -6
  75. package/dist/esm/ShapesDemo.native.js +12 -17
  76. package/dist/esm/ShapesDemo.native.js.map +1 -6
  77. package/dist/esm/SheetDemo.native.js +146 -189
  78. package/dist/esm/SheetDemo.native.js.map +1 -6
  79. package/dist/esm/SliderDemo.native.js +22 -30
  80. package/dist/esm/SliderDemo.native.js.map +1 -6
  81. package/dist/esm/SpinnerDemo.native.js +10 -15
  82. package/dist/esm/SpinnerDemo.native.js.map +1 -6
  83. package/dist/esm/StacksDemo.native.js +67 -85
  84. package/dist/esm/StacksDemo.native.js.map +1 -6
  85. package/dist/esm/SwitchDemo.native.js +57 -76
  86. package/dist/esm/SwitchDemo.native.js.map +1 -6
  87. package/dist/esm/SwitchHeadlessDemo.native.js +45 -63
  88. package/dist/esm/SwitchHeadlessDemo.native.js.map +1 -6
  89. package/dist/esm/SwitchUnstyledDemo.native.js +46 -50
  90. package/dist/esm/SwitchUnstyledDemo.native.js.map +1 -6
  91. package/dist/esm/TabsAdvancedDemo.native.js +297 -297
  92. package/dist/esm/TabsAdvancedDemo.native.js.map +1 -6
  93. package/dist/esm/TabsDemo.native.js +135 -158
  94. package/dist/esm/TabsDemo.native.js.map +1 -6
  95. package/dist/esm/TextDemo.native.js +21 -30
  96. package/dist/esm/TextDemo.native.js.map +1 -6
  97. package/dist/esm/ThemeBuilderDemo.native.js +137 -170
  98. package/dist/esm/ThemeBuilderDemo.native.js.map +1 -6
  99. package/dist/esm/ThemeInverseDemo.native.js +30 -43
  100. package/dist/esm/ThemeInverseDemo.native.js.map +1 -6
  101. package/dist/esm/ToastDemo.native.js +73 -83
  102. package/dist/esm/ToastDemo.native.js.map +1 -6
  103. package/dist/esm/ToastDuplicateDemo.native.js +45 -61
  104. package/dist/esm/ToastDuplicateDemo.native.js.map +1 -6
  105. package/dist/esm/ToggleGroupDemo.native.js +58 -76
  106. package/dist/esm/ToggleGroupDemo.native.js.map +1 -6
  107. package/dist/esm/TokensDemo.native.js +94 -107
  108. package/dist/esm/TokensDemo.native.js.map +1 -6
  109. package/dist/esm/TooltipDemo.native.js +85 -109
  110. package/dist/esm/TooltipDemo.native.js.map +1 -6
  111. package/dist/esm/UpdateThemeDemo.native.js +28 -31
  112. package/dist/esm/UpdateThemeDemo.native.js.map +1 -6
  113. package/dist/esm/WebNativeImageDemo.native.js +3 -5
  114. package/dist/esm/WebNativeImageDemo.native.js.map +1 -6
  115. package/dist/esm/index.native.js +58 -58
  116. package/dist/esm/index.native.js.map +1 -6
  117. package/dist/esm/tamagui.config.native.js +4 -5
  118. package/dist/esm/tamagui.config.native.js.map +1 -6
  119. package/dist/esm/useOnIntersecting.native.js +42 -39
  120. package/dist/esm/useOnIntersecting.native.js.map +1 -6
  121. package/package.json +20 -20
@@ -1,18 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { AnimatePresence, Button, H5, SizableText, Tabs, XStack, YStack, styled } from "tamagui";
4
- var demos = [
5
- "background",
6
- "underline"
7
- ], demosTitle = {
8
- background: "Background Indicator",
9
- underline: "Underline Indicator"
10
- }, TabsAdvancedDemo = function() {
11
- var [demoIndex, setDemoIndex] = React.useState(0), demo = demos[demoIndex];
12
- return /* @__PURE__ */ _jsxs(_Fragment, {
13
- children: [
14
- demo === "underline" ? /* @__PURE__ */ _jsx(TabsAdvancedUnderline, {}) : /* @__PURE__ */ _jsx(TabsAdvancedBackground, {}),
15
- /* @__PURE__ */ _jsx(XStack, {
4
+ var demos = ["background", "underline"],
5
+ demosTitle = {
6
+ background: "Background Indicator",
7
+ underline: "Underline Indicator"
8
+ },
9
+ TabsAdvancedDemo = function () {
10
+ var [demoIndex, setDemoIndex] = React.useState(0),
11
+ demo = demos[demoIndex];
12
+ return /* @__PURE__ */_jsxs(_Fragment, {
13
+ children: [demo === "underline" ? /* @__PURE__ */_jsx(TabsAdvancedUnderline, {}) : /* @__PURE__ */_jsx(TabsAdvancedBackground, {}), /* @__PURE__ */_jsx(XStack, {
16
14
  alignItems: "center",
17
15
  gap: "$4",
18
16
  position: "absolute",
@@ -21,331 +19,333 @@ var demos = [
21
19
  $xxs: {
22
20
  display: "none"
23
21
  },
24
- children: /* @__PURE__ */ _jsx(Button, {
22
+ children: /* @__PURE__ */_jsx(Button, {
25
23
  size: "$2",
26
- onPress: function() {
27
- return setDemoIndex(function(x) {
24
+ onPress: function () {
25
+ return setDemoIndex(function (x) {
28
26
  return (x + 1) % demos.length;
29
27
  });
30
28
  },
31
29
  children: demosTitle[demo]
32
30
  })
33
- })
34
- ]
35
- });
36
- }, TabsAdvancedBackground = function() {
37
- var [tabState, setTabState] = React.useState(
38
- /**
39
- * Layout of the Tab user might intend to select (hovering / focusing)
40
- */
41
- /**
42
- * Layout of the Tab user selected
43
- */
44
- /**
45
- * Used to get the direction of activation for animating the active indicator
46
- */
47
- {
48
- activeAt: null,
49
- currentTab: "tab1",
50
- intentAt: null,
51
- prevActiveAt: null
52
- }
53
- ), setCurrentTab = function(currentTab2) {
54
- return setTabState({
55
- ...tabState,
56
- currentTab: currentTab2
57
- });
58
- }, setIntentIndicator = function(intentAt2) {
59
- return setTabState({
60
- ...tabState,
61
- intentAt: intentAt2
62
- });
63
- }, setActiveIndicator = function(activeAt2) {
64
- return setTabState({
65
- ...tabState,
66
- prevActiveAt: tabState.activeAt,
67
- activeAt: activeAt2
31
+ })]
68
32
  });
69
- }, { activeAt, intentAt, prevActiveAt, currentTab } = tabState, direction = function() {
70
- return !activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x ? 0 : activeAt.x > prevActiveAt.x ? -1 : 1;
71
- }(), handleOnInteraction = function(type, layout) {
72
- type === "select" ? setActiveIndicator(layout) : setIntentIndicator(layout);
73
- };
74
- return /* @__PURE__ */ _jsxs(Tabs, {
75
- value: currentTab,
76
- onValueChange: setCurrentTab,
77
- orientation: "horizontal",
78
- size: "$4",
79
- padding: "$2",
80
- height: 150,
81
- flexDirection: "column",
82
- activationMode: "manual",
83
- backgroundColor: "$background",
84
- borderRadius: "$4",
85
- position: "relative",
86
- children: [
87
- /* @__PURE__ */ _jsxs(YStack, {
88
- children: [
89
- /* @__PURE__ */ _jsx(AnimatePresence, {
90
- children: intentAt && /* @__PURE__ */ _jsx(TabsRovingIndicator, {
91
- borderRadius: "$4",
92
- width: intentAt.width,
93
- height: intentAt.height,
94
- x: intentAt.x,
95
- y: intentAt.y
33
+ },
34
+ TabsAdvancedBackground = function () {
35
+ var [tabState, setTabState] = React.useState(
36
+ /**
37
+ * Layout of the Tab user might intend to select (hovering / focusing)
38
+ */
39
+ /**
40
+ * Layout of the Tab user selected
41
+ */
42
+ /**
43
+ * Used to get the direction of activation for animating the active indicator
44
+ */
45
+ {
46
+ activeAt: null,
47
+ currentTab: "tab1",
48
+ intentAt: null,
49
+ prevActiveAt: null
50
+ }),
51
+ setCurrentTab = function (currentTab2) {
52
+ return setTabState({
53
+ ...tabState,
54
+ currentTab: currentTab2
55
+ });
56
+ },
57
+ setIntentIndicator = function (intentAt2) {
58
+ return setTabState({
59
+ ...tabState,
60
+ intentAt: intentAt2
61
+ });
62
+ },
63
+ setActiveIndicator = function (activeAt2) {
64
+ return setTabState({
65
+ ...tabState,
66
+ prevActiveAt: tabState.activeAt,
67
+ activeAt: activeAt2
68
+ });
69
+ },
70
+ {
71
+ activeAt,
72
+ intentAt,
73
+ prevActiveAt,
74
+ currentTab
75
+ } = tabState,
76
+ direction = function () {
77
+ return !activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x ? 0 : activeAt.x > prevActiveAt.x ? -1 : 1;
78
+ }(),
79
+ handleOnInteraction = function (type, layout) {
80
+ type === "select" ? setActiveIndicator(layout) : setIntentIndicator(layout);
81
+ };
82
+ return /* @__PURE__ */_jsxs(Tabs, {
83
+ value: currentTab,
84
+ onValueChange: setCurrentTab,
85
+ orientation: "horizontal",
86
+ size: "$4",
87
+ padding: "$2",
88
+ height: 150,
89
+ flexDirection: "column",
90
+ activationMode: "manual",
91
+ backgroundColor: "$background",
92
+ borderRadius: "$4",
93
+ position: "relative",
94
+ children: [/* @__PURE__ */_jsxs(YStack, {
95
+ children: [/* @__PURE__ */_jsx(AnimatePresence, {
96
+ children: intentAt && /* @__PURE__ */_jsx(TabsRovingIndicator, {
97
+ borderRadius: "$4",
98
+ width: intentAt.width,
99
+ height: intentAt.height,
100
+ x: intentAt.x,
101
+ y: intentAt.y
102
+ })
103
+ }), /* @__PURE__ */_jsx(AnimatePresence, {
104
+ children: activeAt && /* @__PURE__ */_jsx(TabsRovingIndicator, {
105
+ borderRadius: "$4",
106
+ theme: "accent",
107
+ width: activeAt.width,
108
+ height: activeAt.height,
109
+ x: activeAt.x,
110
+ y: activeAt.y
111
+ })
112
+ }), /* @__PURE__ */_jsxs(Tabs.List, {
113
+ disablePassBorderRadius: !0,
114
+ loop: !1,
115
+ "aria-label": "Manage your account",
116
+ gap: "$2",
117
+ backgroundColor: "transparent",
118
+ children: [/* @__PURE__ */_jsx(Tabs.Tab, {
119
+ unstyled: !0,
120
+ paddingVertical: "$2",
121
+ paddingHorizontal: "$3",
122
+ value: "tab1",
123
+ onInteraction: handleOnInteraction,
124
+ children: /* @__PURE__ */_jsx(SizableText, {
125
+ children: "Profile"
96
126
  })
97
- }),
98
- /* @__PURE__ */ _jsx(AnimatePresence, {
99
- children: activeAt && /* @__PURE__ */ _jsx(TabsRovingIndicator, {
100
- borderRadius: "$4",
101
- theme: "accent",
102
- width: activeAt.width,
103
- height: activeAt.height,
104
- x: activeAt.x,
105
- y: activeAt.y
127
+ }), /* @__PURE__ */_jsx(Tabs.Tab, {
128
+ unstyled: !0,
129
+ paddingVertical: "$2",
130
+ paddingHorizontal: "$3",
131
+ value: "tab2",
132
+ onInteraction: handleOnInteraction,
133
+ children: /* @__PURE__ */_jsx(SizableText, {
134
+ children: "Connections"
106
135
  })
107
- }),
108
- /* @__PURE__ */ _jsxs(Tabs.List, {
109
- disablePassBorderRadius: !0,
110
- loop: !1,
111
- "aria-label": "Manage your account",
112
- gap: "$2",
113
- backgroundColor: "transparent",
114
- children: [
115
- /* @__PURE__ */ _jsx(Tabs.Tab, {
116
- unstyled: !0,
117
- paddingVertical: "$2",
118
- paddingHorizontal: "$3",
119
- value: "tab1",
120
- onInteraction: handleOnInteraction,
121
- children: /* @__PURE__ */ _jsx(SizableText, {
122
- children: "Profile"
123
- })
124
- }),
125
- /* @__PURE__ */ _jsx(Tabs.Tab, {
126
- unstyled: !0,
127
- paddingVertical: "$2",
128
- paddingHorizontal: "$3",
129
- value: "tab2",
130
- onInteraction: handleOnInteraction,
131
- children: /* @__PURE__ */ _jsx(SizableText, {
132
- children: "Connections"
133
- })
134
- }),
135
- /* @__PURE__ */ _jsx(Tabs.Tab, {
136
- unstyled: !0,
137
- paddingVertical: "$2",
138
- paddingHorizontal: "$3",
139
- value: "tab3",
140
- onInteraction: handleOnInteraction,
141
- children: /* @__PURE__ */ _jsx(SizableText, {
142
- children: "Notifications"
143
- })
144
- })
145
- ]
146
- })
147
- ]
148
- }),
149
- /* @__PURE__ */ _jsx(AnimatePresence, {
136
+ }), /* @__PURE__ */_jsx(Tabs.Tab, {
137
+ unstyled: !0,
138
+ paddingVertical: "$2",
139
+ paddingHorizontal: "$3",
140
+ value: "tab3",
141
+ onInteraction: handleOnInteraction,
142
+ children: /* @__PURE__ */_jsx(SizableText, {
143
+ children: "Notifications"
144
+ })
145
+ })]
146
+ })]
147
+ }), /* @__PURE__ */_jsx(AnimatePresence, {
150
148
  exitBeforeEnter: !0,
151
149
  custom: {
152
150
  direction
153
151
  },
154
152
  initial: !1,
155
- children: /* @__PURE__ */ _jsx(AnimatedYStack, {
156
- children: /* @__PURE__ */ _jsx(Tabs.Content, {
153
+ children: /* @__PURE__ */_jsx(AnimatedYStack, {
154
+ children: /* @__PURE__ */_jsx(Tabs.Content, {
157
155
  value: currentTab,
158
156
  forceMount: !0,
159
157
  flex: 1,
160
158
  justifyContent: "center",
161
- children: /* @__PURE__ */ _jsx(H5, {
159
+ children: /* @__PURE__ */_jsx(H5, {
162
160
  textAlign: "center",
163
161
  children: currentTab
164
162
  })
165
163
  })
166
164
  }, currentTab)
167
- })
168
- ]
169
- });
170
- }, TabsAdvancedUnderline = function() {
171
- var [tabState, setTabState] = React.useState(
172
- /**
173
- * Layout of the Tab user might intend to select (hovering / focusing)
174
- */
175
- /**
176
- * Layout of the Tab user selected
177
- */
178
- /**
179
- * Used to get the direction of activation for animating the active indicator
180
- */
181
- {
182
- activeAt: null,
183
- currentTab: "tab1",
184
- intentAt: null,
185
- prevActiveAt: null
186
- }
187
- ), setCurrentTab = function(currentTab2) {
188
- return setTabState({
189
- ...tabState,
190
- currentTab: currentTab2
191
- });
192
- }, setIntentIndicator = function(intentAt2) {
193
- return setTabState({
194
- ...tabState,
195
- intentAt: intentAt2
196
- });
197
- }, setActiveIndicator = function(activeAt2) {
198
- return setTabState({
199
- ...tabState,
200
- prevActiveAt: tabState.activeAt,
201
- activeAt: activeAt2
165
+ })]
202
166
  });
203
- }, { activeAt, intentAt, prevActiveAt, currentTab } = tabState, direction = function() {
204
- return !activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x ? 0 : activeAt.x > prevActiveAt.x ? -1 : 1;
205
- }(), handleOnInteraction = function(type, layout) {
206
- type === "select" ? setActiveIndicator(layout) : setIntentIndicator(layout);
207
- };
208
- return /* @__PURE__ */ _jsxs(Tabs, {
209
- value: currentTab,
210
- onValueChange: setCurrentTab,
211
- orientation: "horizontal",
212
- size: "$4",
213
- height: 150,
214
- flexDirection: "column",
215
- activationMode: "manual",
216
- backgroundColor: "$background",
217
- borderRadius: "$4",
218
- children: [
219
- /* @__PURE__ */ _jsxs(YStack, {
220
- children: [
221
- /* @__PURE__ */ _jsx(AnimatePresence, {
222
- children: intentAt && /* @__PURE__ */ _jsx(TabsRovingIndicator, {
223
- width: intentAt.width,
224
- height: "$0.5",
225
- x: intentAt.x,
226
- bottom: 0
167
+ },
168
+ TabsAdvancedUnderline = function () {
169
+ var [tabState, setTabState] = React.useState(
170
+ /**
171
+ * Layout of the Tab user might intend to select (hovering / focusing)
172
+ */
173
+ /**
174
+ * Layout of the Tab user selected
175
+ */
176
+ /**
177
+ * Used to get the direction of activation for animating the active indicator
178
+ */
179
+ {
180
+ activeAt: null,
181
+ currentTab: "tab1",
182
+ intentAt: null,
183
+ prevActiveAt: null
184
+ }),
185
+ setCurrentTab = function (currentTab2) {
186
+ return setTabState({
187
+ ...tabState,
188
+ currentTab: currentTab2
189
+ });
190
+ },
191
+ setIntentIndicator = function (intentAt2) {
192
+ return setTabState({
193
+ ...tabState,
194
+ intentAt: intentAt2
195
+ });
196
+ },
197
+ setActiveIndicator = function (activeAt2) {
198
+ return setTabState({
199
+ ...tabState,
200
+ prevActiveAt: tabState.activeAt,
201
+ activeAt: activeAt2
202
+ });
203
+ },
204
+ {
205
+ activeAt,
206
+ intentAt,
207
+ prevActiveAt,
208
+ currentTab
209
+ } = tabState,
210
+ direction = function () {
211
+ return !activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x ? 0 : activeAt.x > prevActiveAt.x ? -1 : 1;
212
+ }(),
213
+ handleOnInteraction = function (type, layout) {
214
+ type === "select" ? setActiveIndicator(layout) : setIntentIndicator(layout);
215
+ };
216
+ return /* @__PURE__ */_jsxs(Tabs, {
217
+ value: currentTab,
218
+ onValueChange: setCurrentTab,
219
+ orientation: "horizontal",
220
+ size: "$4",
221
+ height: 150,
222
+ flexDirection: "column",
223
+ activationMode: "manual",
224
+ backgroundColor: "$background",
225
+ borderRadius: "$4",
226
+ children: [/* @__PURE__ */_jsxs(YStack, {
227
+ children: [/* @__PURE__ */_jsx(AnimatePresence, {
228
+ children: intentAt && /* @__PURE__ */_jsx(TabsRovingIndicator, {
229
+ width: intentAt.width,
230
+ height: "$0.5",
231
+ x: intentAt.x,
232
+ bottom: 0
233
+ })
234
+ }), /* @__PURE__ */_jsx(AnimatePresence, {
235
+ children: activeAt && /* @__PURE__ */_jsx(TabsRovingIndicator, {
236
+ theme: "accent",
237
+ active: !0,
238
+ width: activeAt.width,
239
+ height: "$0.5",
240
+ x: activeAt.x,
241
+ bottom: 0
242
+ })
243
+ }), /* @__PURE__ */_jsxs(Tabs.List, {
244
+ disablePassBorderRadius: !0,
245
+ loop: !1,
246
+ "aria-label": "Manage your account",
247
+ borderBottomLeftRadius: 0,
248
+ borderBottomRightRadius: 0,
249
+ paddingBottom: "$1.5",
250
+ borderColor: "$color3",
251
+ borderBottomWidth: "$0.5",
252
+ backgroundColor: "transparent",
253
+ children: [/* @__PURE__ */_jsx(Tabs.Tab, {
254
+ unstyled: !0,
255
+ paddingHorizontal: "$3",
256
+ paddingVertical: "$2",
257
+ value: "tab1",
258
+ onInteraction: handleOnInteraction,
259
+ children: /* @__PURE__ */_jsx(SizableText, {
260
+ children: "Profile"
227
261
  })
228
- }),
229
- /* @__PURE__ */ _jsx(AnimatePresence, {
230
- children: activeAt && /* @__PURE__ */ _jsx(TabsRovingIndicator, {
231
- theme: "accent",
232
- active: !0,
233
- width: activeAt.width,
234
- height: "$0.5",
235
- x: activeAt.x,
236
- bottom: 0
262
+ }), /* @__PURE__ */_jsx(Tabs.Tab, {
263
+ unstyled: !0,
264
+ paddingHorizontal: "$3",
265
+ paddingVertical: "$2",
266
+ value: "tab2",
267
+ onInteraction: handleOnInteraction,
268
+ children: /* @__PURE__ */_jsx(SizableText, {
269
+ children: "Connections"
237
270
  })
238
- }),
239
- /* @__PURE__ */ _jsxs(Tabs.List, {
240
- disablePassBorderRadius: !0,
241
- loop: !1,
242
- "aria-label": "Manage your account",
243
- borderBottomLeftRadius: 0,
244
- borderBottomRightRadius: 0,
245
- paddingBottom: "$1.5",
246
- borderColor: "$color3",
247
- borderBottomWidth: "$0.5",
248
- backgroundColor: "transparent",
249
- children: [
250
- /* @__PURE__ */ _jsx(Tabs.Tab, {
251
- unstyled: !0,
252
- paddingHorizontal: "$3",
253
- paddingVertical: "$2",
254
- value: "tab1",
255
- onInteraction: handleOnInteraction,
256
- children: /* @__PURE__ */ _jsx(SizableText, {
257
- children: "Profile"
258
- })
259
- }),
260
- /* @__PURE__ */ _jsx(Tabs.Tab, {
261
- unstyled: !0,
262
- paddingHorizontal: "$3",
263
- paddingVertical: "$2",
264
- value: "tab2",
265
- onInteraction: handleOnInteraction,
266
- children: /* @__PURE__ */ _jsx(SizableText, {
267
- children: "Connections"
268
- })
269
- }),
270
- /* @__PURE__ */ _jsx(Tabs.Tab, {
271
- unstyled: !0,
272
- paddingHorizontal: "$3",
273
- paddingVertical: "$2",
274
- value: "tab3",
275
- onInteraction: handleOnInteraction,
276
- children: /* @__PURE__ */ _jsx(SizableText, {
277
- children: "Notifications"
278
- })
279
- })
280
- ]
281
- })
282
- ]
283
- }),
284
- /* @__PURE__ */ _jsx(AnimatePresence, {
271
+ }), /* @__PURE__ */_jsx(Tabs.Tab, {
272
+ unstyled: !0,
273
+ paddingHorizontal: "$3",
274
+ paddingVertical: "$2",
275
+ value: "tab3",
276
+ onInteraction: handleOnInteraction,
277
+ children: /* @__PURE__ */_jsx(SizableText, {
278
+ children: "Notifications"
279
+ })
280
+ })]
281
+ })]
282
+ }), /* @__PURE__ */_jsx(AnimatePresence, {
285
283
  exitBeforeEnter: !0,
286
284
  custom: {
287
285
  direction
288
286
  },
289
287
  initial: !1,
290
- children: /* @__PURE__ */ _jsx(AnimatedYStack, {
291
- children: /* @__PURE__ */ _jsx(Tabs.Content, {
288
+ children: /* @__PURE__ */_jsx(AnimatedYStack, {
289
+ children: /* @__PURE__ */_jsx(Tabs.Content, {
292
290
  value: currentTab,
293
291
  forceMount: !0,
294
292
  flex: 1,
295
293
  justifyContent: "center",
296
- children: /* @__PURE__ */ _jsx(H5, {
294
+ children: /* @__PURE__ */_jsx(H5, {
297
295
  textAlign: "center",
298
296
  children: currentTab
299
297
  })
300
298
  })
301
299
  }, currentTab)
302
- })
303
- ]
304
- });
305
- }, TabsRovingIndicator = function(param) {
306
- var { active, ...props } = param;
307
- return /* @__PURE__ */ _jsx(YStack, {
308
- position: "absolute",
309
- backgroundColor: "$color5",
310
- opacity: 0.7,
300
+ })]
301
+ });
302
+ },
303
+ TabsRovingIndicator = function (param) {
304
+ var {
305
+ active,
306
+ ...props
307
+ } = param;
308
+ return /* @__PURE__ */_jsx(YStack, {
309
+ position: "absolute",
310
+ backgroundColor: "$color5",
311
+ opacity: 0.7,
312
+ animation: "100ms",
313
+ enterStyle: {
314
+ opacity: 0
315
+ },
316
+ exitStyle: {
317
+ opacity: 0
318
+ },
319
+ ...(active && {
320
+ backgroundColor: "$color8",
321
+ opacity: 0.6
322
+ }),
323
+ ...props
324
+ });
325
+ },
326
+ AnimatedYStack = styled(YStack, {
327
+ flex: 1,
328
+ x: 0,
329
+ opacity: 1,
311
330
  animation: "100ms",
312
- enterStyle: {
313
- opacity: 0
314
- },
315
- exitStyle: {
316
- opacity: 0
317
- },
318
- ...active && {
319
- backgroundColor: "$color8",
320
- opacity: 0.6
321
- },
322
- ...props
323
- });
324
- }, AnimatedYStack = styled(YStack, {
325
- flex: 1,
326
- x: 0,
327
- opacity: 1,
328
- animation: "100ms",
329
- variants: {
330
- // 1 = right, 0 = nowhere, -1 = left
331
- direction: {
332
- ":number": function(direction) {
333
- return {
334
- enterStyle: {
335
- x: direction > 0 ? -25 : 25,
336
- opacity: 0
337
- },
338
- exitStyle: {
339
- zIndex: 0,
340
- x: direction < 0 ? -25 : 25,
341
- opacity: 0
342
- }
343
- };
331
+ variants: {
332
+ // 1 = right, 0 = nowhere, -1 = left
333
+ direction: {
334
+ ":number": function (direction) {
335
+ return {
336
+ enterStyle: {
337
+ x: direction > 0 ? -25 : 25,
338
+ opacity: 0
339
+ },
340
+ exitStyle: {
341
+ zIndex: 0,
342
+ x: direction < 0 ? -25 : 25,
343
+ opacity: 0
344
+ }
345
+ };
346
+ }
344
347
  }
345
348
  }
346
- }
347
- });
348
- export {
349
- TabsAdvancedDemo
350
- };
351
- //# sourceMappingURL=TabsAdvancedDemo.js.map
349
+ });
350
+ export { TabsAdvancedDemo };
351
+ //# sourceMappingURL=TabsAdvancedDemo.native.js.map