@tamagui/demos 1.114.4 → 1.115.1
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/AccordionDemo.cjs +96 -0
- package/dist/cjs/AddThemeDemo.cjs +70 -0
- package/dist/cjs/AlertDialogDemo.cjs +96 -0
- package/dist/cjs/AnimationsDemo.cjs +100 -0
- package/dist/cjs/AnimationsEnterDemo.cjs +74 -0
- package/dist/cjs/AnimationsHoverDemo.cjs +47 -0
- package/dist/cjs/AnimationsPresenceDemo.cjs +124 -0
- package/dist/cjs/AnimationsTimingDemo.cjs +46 -0
- package/dist/cjs/AvatarDemo.cjs +53 -0
- package/dist/cjs/BuildAButtonDemo.cjs +125 -0
- package/dist/cjs/ButtonDemo.cjs +83 -0
- package/dist/cjs/{CardDemo.js → CardDemo.cjs} +67 -41
- package/dist/cjs/CheckboxDemo.cjs +70 -0
- package/dist/cjs/CheckboxHeadlessDemo.cjs +87 -0
- package/dist/cjs/CheckboxUnstyledDemo.cjs +78 -0
- package/dist/cjs/ColorsDemo.cjs +121 -0
- package/dist/cjs/DialogDemo.cjs +155 -0
- package/dist/cjs/FormsDemo.cjs +70 -0
- package/dist/cjs/Grid.cjs +71 -0
- package/dist/cjs/GroupDemo.cjs +85 -0
- package/dist/cjs/HeadingsDemo.cjs +45 -0
- package/dist/cjs/ImageDemo.cjs +36 -0
- package/dist/cjs/InputsDemo.cjs +60 -0
- package/dist/cjs/LabelDemo.cjs +60 -0
- package/dist/cjs/LinearGradientDemo.cjs +48 -0
- package/dist/cjs/ListItemDemo.cjs +100 -0
- package/dist/cjs/LucideIconsDemo.cjs +93 -0
- package/dist/cjs/NewInputsDemo.cjs +60 -0
- package/dist/cjs/PopoverDemo.cjs +145 -0
- package/dist/cjs/ProgressDemo.cjs +106 -0
- package/dist/cjs/RadioGroupDemo.cjs +71 -0
- package/dist/cjs/RadioGroupHeadlessDemo.cjs +168 -0
- package/dist/cjs/RadioGroupUnstyledDemo.cjs +142 -0
- package/dist/cjs/ReplaceThemeDemo.cjs +78 -0
- package/dist/cjs/ScrollViewDemo.cjs +74 -0
- package/dist/cjs/SelectDemo.cjs +228 -0
- package/dist/cjs/SeparatorDemo.cjs +60 -0
- package/dist/cjs/ShapesDemo.cjs +42 -0
- package/dist/cjs/SheetDemo.cjs +176 -0
- package/dist/cjs/SliderDemo.cjs +58 -0
- package/dist/cjs/SpinnerDemo.cjs +41 -0
- package/dist/cjs/StacksDemo.cjs +104 -0
- package/dist/cjs/SwitchDemo.cjs +95 -0
- package/dist/cjs/SwitchHeadlessDemo.cjs +101 -0
- package/dist/cjs/SwitchUnstyledDemo.cjs +89 -0
- package/dist/cjs/TabsAdvancedDemo.cjs +340 -0
- package/dist/cjs/TabsDemo.cjs +191 -0
- package/dist/cjs/TextDemo.cjs +52 -0
- package/dist/cjs/ThemeBuilderDemo.cjs +178 -0
- package/dist/cjs/ThemeInverseDemo.cjs +69 -0
- package/dist/cjs/ToastDemo.cjs +133 -0
- package/dist/cjs/ToastDuplicateDemo.cjs +83 -0
- package/dist/cjs/ToggleGroupDemo.cjs +97 -0
- package/dist/cjs/TokensDemo.cjs +125 -0
- package/dist/cjs/TooltipDemo.cjs +125 -0
- package/dist/cjs/UpdateThemeDemo.cjs +81 -0
- package/dist/cjs/WebNativeImageDemo.cjs +34 -0
- package/dist/cjs/index.cjs +74 -0
- package/dist/cjs/tamagui.config.cjs +29 -0
- package/dist/cjs/useOnIntersecting.cjs +66 -0
- package/package.json +22 -21
- package/dist/cjs/AccordionDemo.js +0 -43
- package/dist/cjs/AddThemeDemo.js +0 -56
- package/dist/cjs/AlertDialogDemo.js +0 -68
- package/dist/cjs/AnimationsDemo.js +0 -99
- package/dist/cjs/AnimationsEnterDemo.js +0 -55
- package/dist/cjs/AnimationsHoverDemo.js +0 -41
- package/dist/cjs/AnimationsPresenceDemo.js +0 -102
- package/dist/cjs/AnimationsTimingDemo.js +0 -40
- package/dist/cjs/AvatarDemo.js +0 -45
- package/dist/cjs/BuildAButtonDemo.js +0 -57
- package/dist/cjs/ButtonDemo.js +0 -39
- package/dist/cjs/CheckboxDemo.js +0 -40
- package/dist/cjs/CheckboxHeadlessDemo.js +0 -62
- package/dist/cjs/CheckboxUnstyledDemo.js +0 -52
- package/dist/cjs/ColorsDemo.js +0 -95
- package/dist/cjs/DialogDemo.js +0 -99
- package/dist/cjs/FormsDemo.js +0 -57
- package/dist/cjs/Grid.js +0 -58
- package/dist/cjs/GroupDemo.js +0 -39
- package/dist/cjs/HeadingsDemo.js +0 -31
- package/dist/cjs/ImageDemo.js +0 -33
- package/dist/cjs/InputsDemo.js +0 -46
- package/dist/cjs/LabelDemo.js +0 -33
- package/dist/cjs/LinearGradientDemo.js +0 -47
- package/dist/cjs/ListItemDemo.js +0 -61
- package/dist/cjs/LucideIconsDemo.js +0 -72
- package/dist/cjs/NewInputsDemo.js +0 -46
- package/dist/cjs/PopoverDemo.js +0 -126
- package/dist/cjs/ProgressDemo.js +0 -88
- package/dist/cjs/RadioGroupDemo.js +0 -36
- package/dist/cjs/RadioGroupHeadlessDemo.js +0 -117
- package/dist/cjs/RadioGroupUnstyledDemo.js +0 -107
- package/dist/cjs/ReplaceThemeDemo.js +0 -58
- package/dist/cjs/ScrollViewDemo.js +0 -43
- package/dist/cjs/SelectDemo.js +0 -190
- package/dist/cjs/SeparatorDemo.js +0 -35
- package/dist/cjs/ShapesDemo.js +0 -27
- package/dist/cjs/SheetDemo.js +0 -120
- package/dist/cjs/SliderDemo.js +0 -34
- package/dist/cjs/SpinnerDemo.js +0 -27
- package/dist/cjs/StacksDemo.js +0 -93
- package/dist/cjs/SwitchDemo.js +0 -56
- package/dist/cjs/SwitchHeadlessDemo.js +0 -87
- package/dist/cjs/SwitchUnstyledDemo.js +0 -64
- package/dist/cjs/TabsAdvancedDemo.js +0 -283
- package/dist/cjs/TabsDemo.js +0 -144
- package/dist/cjs/TextDemo.js +0 -31
- package/dist/cjs/ThemeBuilderDemo.js +0 -149
- package/dist/cjs/ThemeInverseDemo.js +0 -56
- package/dist/cjs/ToastDemo.js +0 -112
- package/dist/cjs/ToastDuplicateDemo.js +0 -64
- package/dist/cjs/ToggleGroupDemo.js +0 -63
- package/dist/cjs/TokensDemo.js +0 -100
- package/dist/cjs/TooltipDemo.js +0 -68
- package/dist/cjs/UpdateThemeDemo.js +0 -61
- package/dist/cjs/WebNativeImageDemo.js +0 -24
- package/dist/cjs/index.js +0 -71
- package/dist/cjs/tamagui.config.js +0 -22
- package/dist/cjs/useOnIntersecting.js +0 -63
- /package/dist/cjs/{AccordionDemo.js.map → AccordionDemo.cjs.map} +0 -0
- /package/dist/cjs/{AddThemeDemo.js.map → AddThemeDemo.cjs.map} +0 -0
- /package/dist/cjs/{AlertDialogDemo.js.map → AlertDialogDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsDemo.js.map → AnimationsDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsEnterDemo.js.map → AnimationsEnterDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsHoverDemo.js.map → AnimationsHoverDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsPresenceDemo.js.map → AnimationsPresenceDemo.cjs.map} +0 -0
- /package/dist/cjs/{AnimationsTimingDemo.js.map → AnimationsTimingDemo.cjs.map} +0 -0
- /package/dist/cjs/{AvatarDemo.js.map → AvatarDemo.cjs.map} +0 -0
- /package/dist/cjs/{BuildAButtonDemo.js.map → BuildAButtonDemo.cjs.map} +0 -0
- /package/dist/cjs/{ButtonDemo.js.map → ButtonDemo.cjs.map} +0 -0
- /package/dist/cjs/{CardDemo.js.map → CardDemo.cjs.map} +0 -0
- /package/dist/cjs/{CheckboxDemo.js.map → CheckboxDemo.cjs.map} +0 -0
- /package/dist/cjs/{CheckboxHeadlessDemo.js.map → CheckboxHeadlessDemo.cjs.map} +0 -0
- /package/dist/cjs/{CheckboxUnstyledDemo.js.map → CheckboxUnstyledDemo.cjs.map} +0 -0
- /package/dist/cjs/{ColorsDemo.js.map → ColorsDemo.cjs.map} +0 -0
- /package/dist/cjs/{DialogDemo.js.map → DialogDemo.cjs.map} +0 -0
- /package/dist/cjs/{FormsDemo.js.map → FormsDemo.cjs.map} +0 -0
- /package/dist/cjs/{Grid.js.map → Grid.cjs.map} +0 -0
- /package/dist/cjs/{GroupDemo.js.map → GroupDemo.cjs.map} +0 -0
- /package/dist/cjs/{HeadingsDemo.js.map → HeadingsDemo.cjs.map} +0 -0
- /package/dist/cjs/{ImageDemo.js.map → ImageDemo.cjs.map} +0 -0
- /package/dist/cjs/{InputsDemo.js.map → InputsDemo.cjs.map} +0 -0
- /package/dist/cjs/{LabelDemo.js.map → LabelDemo.cjs.map} +0 -0
- /package/dist/cjs/{LinearGradientDemo.js.map → LinearGradientDemo.cjs.map} +0 -0
- /package/dist/cjs/{ListItemDemo.js.map → ListItemDemo.cjs.map} +0 -0
- /package/dist/cjs/{LucideIconsDemo.js.map → LucideIconsDemo.cjs.map} +0 -0
- /package/dist/cjs/{NewInputsDemo.js.map → NewInputsDemo.cjs.map} +0 -0
- /package/dist/cjs/{PopoverDemo.js.map → PopoverDemo.cjs.map} +0 -0
- /package/dist/cjs/{ProgressDemo.js.map → ProgressDemo.cjs.map} +0 -0
- /package/dist/cjs/{RadioGroupDemo.js.map → RadioGroupDemo.cjs.map} +0 -0
- /package/dist/cjs/{RadioGroupHeadlessDemo.js.map → RadioGroupHeadlessDemo.cjs.map} +0 -0
- /package/dist/cjs/{RadioGroupUnstyledDemo.js.map → RadioGroupUnstyledDemo.cjs.map} +0 -0
- /package/dist/cjs/{ReplaceThemeDemo.js.map → ReplaceThemeDemo.cjs.map} +0 -0
- /package/dist/cjs/{ScrollViewDemo.js.map → ScrollViewDemo.cjs.map} +0 -0
- /package/dist/cjs/{SelectDemo.js.map → SelectDemo.cjs.map} +0 -0
- /package/dist/cjs/{SeparatorDemo.js.map → SeparatorDemo.cjs.map} +0 -0
- /package/dist/cjs/{ShapesDemo.js.map → ShapesDemo.cjs.map} +0 -0
- /package/dist/cjs/{SheetDemo.js.map → SheetDemo.cjs.map} +0 -0
- /package/dist/cjs/{SliderDemo.js.map → SliderDemo.cjs.map} +0 -0
- /package/dist/cjs/{SpinnerDemo.js.map → SpinnerDemo.cjs.map} +0 -0
- /package/dist/cjs/{StacksDemo.js.map → StacksDemo.cjs.map} +0 -0
- /package/dist/cjs/{SwitchDemo.js.map → SwitchDemo.cjs.map} +0 -0
- /package/dist/cjs/{SwitchHeadlessDemo.js.map → SwitchHeadlessDemo.cjs.map} +0 -0
- /package/dist/cjs/{SwitchUnstyledDemo.js.map → SwitchUnstyledDemo.cjs.map} +0 -0
- /package/dist/cjs/{TabsAdvancedDemo.js.map → TabsAdvancedDemo.cjs.map} +0 -0
- /package/dist/cjs/{TabsDemo.js.map → TabsDemo.cjs.map} +0 -0
- /package/dist/cjs/{TextDemo.js.map → TextDemo.cjs.map} +0 -0
- /package/dist/cjs/{ThemeBuilderDemo.js.map → ThemeBuilderDemo.cjs.map} +0 -0
- /package/dist/cjs/{ThemeInverseDemo.js.map → ThemeInverseDemo.cjs.map} +0 -0
- /package/dist/cjs/{ToastDemo.js.map → ToastDemo.cjs.map} +0 -0
- /package/dist/cjs/{ToastDuplicateDemo.js.map → ToastDuplicateDemo.cjs.map} +0 -0
- /package/dist/cjs/{ToggleGroupDemo.js.map → ToggleGroupDemo.cjs.map} +0 -0
- /package/dist/cjs/{TokensDemo.js.map → TokensDemo.cjs.map} +0 -0
- /package/dist/cjs/{TooltipDemo.js.map → TooltipDemo.cjs.map} +0 -0
- /package/dist/cjs/{UpdateThemeDemo.js.map → UpdateThemeDemo.cjs.map} +0 -0
- /package/dist/cjs/{WebNativeImageDemo.js.map → WebNativeImageDemo.cjs.map} +0 -0
- /package/dist/cjs/{index.js.map → index.cjs.map} +0 -0
- /package/dist/cjs/{tamagui.config.js.map → tamagui.config.cjs.map} +0 -0
- /package/dist/cjs/{useOnIntersecting.js.map → useOnIntersecting.cjs.map} +0 -0
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
-
mod
|
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
-
var SwitchHeadlessDemo_exports = {};
|
|
24
|
-
__export(SwitchHeadlessDemo_exports, {
|
|
25
|
-
SwitchHeadlessDemo: () => SwitchHeadlessDemo
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(SwitchHeadlessDemo_exports);
|
|
28
|
-
var import_react = __toESM(require("react")), import_switch_headless = require("@tamagui/switch-headless"), import_react_native = require("react-native-web"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
function SwitchHeadlessDemo() {
|
|
30
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, { width: 200, alignItems: "center", space: "$3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { gap: "$3", alignItems: "center", children: [
|
|
31
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, { htmlFor: "headless", children: "Headless" }),
|
|
32
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeadlessSwitch, { defaultChecked: !0, id: "headless" })
|
|
33
|
-
] }) });
|
|
34
|
-
}
|
|
35
|
-
const HeadlessSwitch = import_react.default.forwardRef((props, ref) => {
|
|
36
|
-
const [checked, setChecked] = import_react.default.useState(props.defaultChecked || !1), { switchProps, switchRef, bubbleInput } = (0, import_switch_headless.useSwitch)(
|
|
37
|
-
props,
|
|
38
|
-
[checked, setChecked],
|
|
39
|
-
ref
|
|
40
|
-
), animation = import_react.default.useRef(new import_react_native.Animated.Value(checked ? 1 : 0)).current;
|
|
41
|
-
return import_react.default.useEffect(() => {
|
|
42
|
-
import_react_native.Animated.timing(animation, {
|
|
43
|
-
toValue: checked ? 1 : 0,
|
|
44
|
-
duration: 100,
|
|
45
|
-
useNativeDriver: !0
|
|
46
|
-
}).start();
|
|
47
|
-
}, [checked]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
-
import_react_native.Pressable,
|
|
50
|
-
{
|
|
51
|
-
style: {
|
|
52
|
-
width: 40,
|
|
53
|
-
height: 20,
|
|
54
|
-
borderRadius: 100,
|
|
55
|
-
backgroundColor: checked ? "lightblue" : "silver"
|
|
56
|
-
},
|
|
57
|
-
ref: switchRef,
|
|
58
|
-
...switchProps,
|
|
59
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
-
import_react_native.Animated.View,
|
|
61
|
-
{
|
|
62
|
-
style: [
|
|
63
|
-
{
|
|
64
|
-
backgroundColor: "black",
|
|
65
|
-
borderRadius: 100,
|
|
66
|
-
width: 20,
|
|
67
|
-
height: 20
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
transform: [
|
|
71
|
-
{
|
|
72
|
-
translateX: animation.interpolate({
|
|
73
|
-
inputRange: [0, 1],
|
|
74
|
-
outputRange: [0, 20]
|
|
75
|
-
})
|
|
76
|
-
}
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
),
|
|
84
|
-
bubbleInput
|
|
85
|
-
] });
|
|
86
|
-
});
|
|
87
|
-
//# sourceMappingURL=SwitchHeadlessDemo.js.map
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var SwitchUnstyledDemo_exports = {};
|
|
16
|
-
__export(SwitchUnstyledDemo_exports, {
|
|
17
|
-
Switch: () => Switch,
|
|
18
|
-
SwitchUnstyledDemo: () => SwitchUnstyledDemo
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(SwitchUnstyledDemo_exports);
|
|
21
|
-
var import_core = require("@tamagui/core"), import_switch = require("@tamagui/switch"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
-
const Frame = (0, import_core.styled)(import_core.Stack, {
|
|
23
|
-
width: 40,
|
|
24
|
-
height: 20,
|
|
25
|
-
borderRadius: 20,
|
|
26
|
-
variants: {
|
|
27
|
-
checked: {
|
|
28
|
-
true: {
|
|
29
|
-
backgroundColor: "lightblue"
|
|
30
|
-
},
|
|
31
|
-
false: {
|
|
32
|
-
backgroundColor: "silver"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
defaultVariants: {
|
|
37
|
-
checked: !1
|
|
38
|
-
}
|
|
39
|
-
}), Thumb = (0, import_core.styled)(import_core.Stack, {
|
|
40
|
-
width: 20,
|
|
41
|
-
height: 20,
|
|
42
|
-
backgroundColor: "black",
|
|
43
|
-
borderRadius: 20,
|
|
44
|
-
variants: {
|
|
45
|
-
checked: {
|
|
46
|
-
true: {
|
|
47
|
-
opacity: 0.8
|
|
48
|
-
},
|
|
49
|
-
false: {
|
|
50
|
-
opacity: 0.5
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}), Switch = (0, import_switch.createSwitch)({
|
|
55
|
-
Frame,
|
|
56
|
-
Thumb
|
|
57
|
-
});
|
|
58
|
-
function SwitchUnstyledDemo() {
|
|
59
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, { width: 200, alignItems: "center", space: "$3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { gap: "$3", alignItems: "center", children: [
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Label, { htmlFor: "unstyled-switch", children: "Unstyled" }),
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Switch, { defaultChecked: !0, id: "unstyled-switch", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Switch.Thumb, { animation: "quick" }) })
|
|
62
|
-
] }) });
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=SwitchUnstyledDemo.js.map
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
-
mod
|
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
-
var TabsAdvancedDemo_exports = {};
|
|
24
|
-
__export(TabsAdvancedDemo_exports, {
|
|
25
|
-
TabsAdvancedDemo: () => TabsAdvancedDemo
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(TabsAdvancedDemo_exports);
|
|
28
|
-
var import_react = __toESM(require("react")), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
const demos = ["background", "underline"], demosTitle = {
|
|
30
|
-
background: "Background Indicator",
|
|
31
|
-
underline: "Underline Indicator"
|
|
32
|
-
}, TabsAdvancedDemo = () => {
|
|
33
|
-
const [demoIndex, setDemoIndex] = import_react.default.useState(0), demo = demos[demoIndex];
|
|
34
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
35
|
-
demo === "underline" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsAdvancedUnderline, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsAdvancedBackground, {}),
|
|
36
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
37
|
-
import_tamagui.XStack,
|
|
38
|
-
{
|
|
39
|
-
alignItems: "center",
|
|
40
|
-
gap: "$4",
|
|
41
|
-
position: "absolute",
|
|
42
|
-
bottom: "$3",
|
|
43
|
-
left: "$4",
|
|
44
|
-
$xxs: { display: "none" },
|
|
45
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { size: "$2", onPress: () => setDemoIndex((x) => (x + 1) % demos.length), children: demosTitle[demo] })
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
] });
|
|
49
|
-
}, TabsAdvancedBackground = () => {
|
|
50
|
-
const [tabState, setTabState] = import_react.default.useState({
|
|
51
|
-
activeAt: null,
|
|
52
|
-
currentTab: "tab1",
|
|
53
|
-
intentAt: null,
|
|
54
|
-
prevActiveAt: null
|
|
55
|
-
}), setCurrentTab = (currentTab2) => setTabState({ ...tabState, currentTab: currentTab2 }), setIntentIndicator = (intentAt2) => setTabState({ ...tabState, intentAt: intentAt2 }), setActiveIndicator = (activeAt2) => setTabState({ ...tabState, prevActiveAt: tabState.activeAt, activeAt: activeAt2 }), { activeAt, intentAt, prevActiveAt, currentTab } = tabState, direction = !activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x ? 0 : activeAt.x > prevActiveAt.x ? -1 : 1, handleOnInteraction = (type, layout) => {
|
|
56
|
-
type === "select" ? setActiveIndicator(layout) : setIntentIndicator(layout);
|
|
57
|
-
};
|
|
58
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
59
|
-
import_tamagui.Tabs,
|
|
60
|
-
{
|
|
61
|
-
value: currentTab,
|
|
62
|
-
onValueChange: setCurrentTab,
|
|
63
|
-
orientation: "horizontal",
|
|
64
|
-
size: "$4",
|
|
65
|
-
padding: "$2",
|
|
66
|
-
height: 150,
|
|
67
|
-
flexDirection: "column",
|
|
68
|
-
activationMode: "manual",
|
|
69
|
-
backgroundColor: "$background",
|
|
70
|
-
borderRadius: "$4",
|
|
71
|
-
position: "relative",
|
|
72
|
-
children: [
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { children: [
|
|
74
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, { children: intentAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
-
TabsRovingIndicator,
|
|
76
|
-
{
|
|
77
|
-
borderRadius: "$4",
|
|
78
|
-
width: intentAt.width,
|
|
79
|
-
height: intentAt.height,
|
|
80
|
-
x: intentAt.x,
|
|
81
|
-
y: intentAt.y
|
|
82
|
-
}
|
|
83
|
-
) }),
|
|
84
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, { children: activeAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
-
TabsRovingIndicator,
|
|
86
|
-
{
|
|
87
|
-
borderRadius: "$4",
|
|
88
|
-
theme: "active",
|
|
89
|
-
width: activeAt.width,
|
|
90
|
-
height: activeAt.height,
|
|
91
|
-
x: activeAt.x,
|
|
92
|
-
y: activeAt.y
|
|
93
|
-
}
|
|
94
|
-
) }),
|
|
95
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
96
|
-
import_tamagui.Tabs.List,
|
|
97
|
-
{
|
|
98
|
-
disablePassBorderRadius: !0,
|
|
99
|
-
loop: !1,
|
|
100
|
-
"aria-label": "Manage your account",
|
|
101
|
-
gap: "$2",
|
|
102
|
-
backgroundColor: "transparent",
|
|
103
|
-
children: [
|
|
104
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
105
|
-
import_tamagui.Tabs.Tab,
|
|
106
|
-
{
|
|
107
|
-
unstyled: !0,
|
|
108
|
-
paddingVertical: "$2",
|
|
109
|
-
paddingHorizontal: "$3",
|
|
110
|
-
value: "tab1",
|
|
111
|
-
onInteraction: handleOnInteraction,
|
|
112
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Profile" })
|
|
113
|
-
}
|
|
114
|
-
),
|
|
115
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
|
-
import_tamagui.Tabs.Tab,
|
|
117
|
-
{
|
|
118
|
-
unstyled: !0,
|
|
119
|
-
paddingVertical: "$2",
|
|
120
|
-
paddingHorizontal: "$3",
|
|
121
|
-
value: "tab2",
|
|
122
|
-
onInteraction: handleOnInteraction,
|
|
123
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Connections" })
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
127
|
-
import_tamagui.Tabs.Tab,
|
|
128
|
-
{
|
|
129
|
-
unstyled: !0,
|
|
130
|
-
paddingVertical: "$2",
|
|
131
|
-
paddingHorizontal: "$3",
|
|
132
|
-
value: "tab3",
|
|
133
|
-
onInteraction: handleOnInteraction,
|
|
134
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Notifications" })
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
)
|
|
140
|
-
] }),
|
|
141
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, { exitBeforeEnter: !0, custom: { direction }, initial: !1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedYStack, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Content, { value: currentTab, forceMount: !0, flex: 1, justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, { textAlign: "center", children: currentTab }) }) }, currentTab) })
|
|
142
|
-
]
|
|
143
|
-
}
|
|
144
|
-
);
|
|
145
|
-
}, TabsAdvancedUnderline = () => {
|
|
146
|
-
const [tabState, setTabState] = import_react.default.useState({
|
|
147
|
-
activeAt: null,
|
|
148
|
-
currentTab: "tab1",
|
|
149
|
-
intentAt: null,
|
|
150
|
-
prevActiveAt: null
|
|
151
|
-
}), setCurrentTab = (currentTab2) => setTabState({ ...tabState, currentTab: currentTab2 }), setIntentIndicator = (intentAt2) => setTabState({ ...tabState, intentAt: intentAt2 }), setActiveIndicator = (activeAt2) => setTabState({ ...tabState, prevActiveAt: tabState.activeAt, activeAt: activeAt2 }), { activeAt, intentAt, prevActiveAt, currentTab } = tabState, direction = !activeAt || !prevActiveAt || activeAt.x === prevActiveAt.x ? 0 : activeAt.x > prevActiveAt.x ? -1 : 1, handleOnInteraction = (type, layout) => {
|
|
152
|
-
type === "select" ? setActiveIndicator(layout) : setIntentIndicator(layout);
|
|
153
|
-
};
|
|
154
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
155
|
-
import_tamagui.Tabs,
|
|
156
|
-
{
|
|
157
|
-
value: currentTab,
|
|
158
|
-
onValueChange: setCurrentTab,
|
|
159
|
-
orientation: "horizontal",
|
|
160
|
-
size: "$4",
|
|
161
|
-
height: 150,
|
|
162
|
-
flexDirection: "column",
|
|
163
|
-
activationMode: "manual",
|
|
164
|
-
backgroundColor: "$background",
|
|
165
|
-
borderRadius: "$4",
|
|
166
|
-
children: [
|
|
167
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { children: [
|
|
168
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, { children: intentAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
169
|
-
TabsRovingIndicator,
|
|
170
|
-
{
|
|
171
|
-
width: intentAt.width,
|
|
172
|
-
height: "$0.5",
|
|
173
|
-
x: intentAt.x,
|
|
174
|
-
bottom: 0
|
|
175
|
-
}
|
|
176
|
-
) }),
|
|
177
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, { children: activeAt && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
178
|
-
TabsRovingIndicator,
|
|
179
|
-
{
|
|
180
|
-
theme: "active",
|
|
181
|
-
active: !0,
|
|
182
|
-
width: activeAt.width,
|
|
183
|
-
height: "$0.5",
|
|
184
|
-
x: activeAt.x,
|
|
185
|
-
bottom: 0
|
|
186
|
-
}
|
|
187
|
-
) }),
|
|
188
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
189
|
-
import_tamagui.Tabs.List,
|
|
190
|
-
{
|
|
191
|
-
disablePassBorderRadius: !0,
|
|
192
|
-
loop: !1,
|
|
193
|
-
"aria-label": "Manage your account",
|
|
194
|
-
borderBottomLeftRadius: 0,
|
|
195
|
-
borderBottomRightRadius: 0,
|
|
196
|
-
paddingBottom: "$1.5",
|
|
197
|
-
borderColor: "$color3",
|
|
198
|
-
borderBottomWidth: "$0.5",
|
|
199
|
-
backgroundColor: "transparent",
|
|
200
|
-
children: [
|
|
201
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
202
|
-
import_tamagui.Tabs.Tab,
|
|
203
|
-
{
|
|
204
|
-
unstyled: !0,
|
|
205
|
-
paddingHorizontal: "$3",
|
|
206
|
-
paddingVertical: "$2",
|
|
207
|
-
value: "tab1",
|
|
208
|
-
onInteraction: handleOnInteraction,
|
|
209
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Profile" })
|
|
210
|
-
}
|
|
211
|
-
),
|
|
212
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
213
|
-
import_tamagui.Tabs.Tab,
|
|
214
|
-
{
|
|
215
|
-
unstyled: !0,
|
|
216
|
-
paddingHorizontal: "$3",
|
|
217
|
-
paddingVertical: "$2",
|
|
218
|
-
value: "tab2",
|
|
219
|
-
onInteraction: handleOnInteraction,
|
|
220
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Connections" })
|
|
221
|
-
}
|
|
222
|
-
),
|
|
223
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
224
|
-
import_tamagui.Tabs.Tab,
|
|
225
|
-
{
|
|
226
|
-
unstyled: !0,
|
|
227
|
-
paddingHorizontal: "$3",
|
|
228
|
-
paddingVertical: "$2",
|
|
229
|
-
value: "tab3",
|
|
230
|
-
onInteraction: handleOnInteraction,
|
|
231
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Notifications" })
|
|
232
|
-
}
|
|
233
|
-
)
|
|
234
|
-
]
|
|
235
|
-
}
|
|
236
|
-
)
|
|
237
|
-
] }),
|
|
238
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AnimatePresence, { exitBeforeEnter: !0, custom: { direction }, initial: !1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AnimatedYStack, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Content, { value: currentTab, forceMount: !0, flex: 1, justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, { textAlign: "center", children: currentTab }) }) }, currentTab) })
|
|
239
|
-
]
|
|
240
|
-
}
|
|
241
|
-
);
|
|
242
|
-
}, TabsRovingIndicator = ({ active, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
243
|
-
import_tamagui.YStack,
|
|
244
|
-
{
|
|
245
|
-
position: "absolute",
|
|
246
|
-
backgroundColor: "$color5",
|
|
247
|
-
opacity: 0.7,
|
|
248
|
-
animation: "100ms",
|
|
249
|
-
enterStyle: {
|
|
250
|
-
opacity: 0
|
|
251
|
-
},
|
|
252
|
-
exitStyle: {
|
|
253
|
-
opacity: 0
|
|
254
|
-
},
|
|
255
|
-
...active && {
|
|
256
|
-
backgroundColor: "$color8",
|
|
257
|
-
opacity: 0.6
|
|
258
|
-
},
|
|
259
|
-
...props
|
|
260
|
-
}
|
|
261
|
-
), AnimatedYStack = (0, import_tamagui.styled)(import_tamagui.YStack, {
|
|
262
|
-
flex: 1,
|
|
263
|
-
x: 0,
|
|
264
|
-
opacity: 1,
|
|
265
|
-
animation: "100ms",
|
|
266
|
-
variants: {
|
|
267
|
-
// 1 = right, 0 = nowhere, -1 = left
|
|
268
|
-
direction: {
|
|
269
|
-
":number": (direction) => ({
|
|
270
|
-
enterStyle: {
|
|
271
|
-
x: direction > 0 ? -25 : 25,
|
|
272
|
-
opacity: 0
|
|
273
|
-
},
|
|
274
|
-
exitStyle: {
|
|
275
|
-
zIndex: 0,
|
|
276
|
-
x: direction < 0 ? -25 : 25,
|
|
277
|
-
opacity: 0
|
|
278
|
-
}
|
|
279
|
-
})
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
//# sourceMappingURL=TabsAdvancedDemo.js.map
|
package/dist/cjs/TabsDemo.js
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
-
mod
|
|
22
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
-
var TabsDemo_exports = {};
|
|
24
|
-
__export(TabsDemo_exports, {
|
|
25
|
-
TabsDemo: () => TabsDemo
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(TabsDemo_exports);
|
|
28
|
-
var import_react = __toESM(require("react")), import_tamagui = require("tamagui"), import_jsx_runtime = (
|
|
29
|
-
// web only fix for position relative
|
|
30
|
-
require("react/jsx-runtime")
|
|
31
|
-
);
|
|
32
|
-
const demos = ["horizontal", "vertical"], demosTitle = {
|
|
33
|
-
horizontal: "Horizontal",
|
|
34
|
-
vertical: "Vertical"
|
|
35
|
-
};
|
|
36
|
-
function TabsDemo() {
|
|
37
|
-
const [demoIndex, setDemoIndex] = import_react.default.useState(0), demo = demos[demoIndex];
|
|
38
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
39
|
-
import_tamagui.YStack,
|
|
40
|
-
{
|
|
41
|
-
paddingHorizontal: "$4",
|
|
42
|
-
...import_tamagui.isWeb && {
|
|
43
|
-
position: "unset"
|
|
44
|
-
},
|
|
45
|
-
children: [
|
|
46
|
-
demo === "horizontal" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HorizontalTabs, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(VerticalTabs, {}),
|
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
-
import_tamagui.XStack,
|
|
49
|
-
{
|
|
50
|
-
alignItems: "center",
|
|
51
|
-
space: !0,
|
|
52
|
-
position: "absolute",
|
|
53
|
-
bottom: "$3",
|
|
54
|
-
left: "$4",
|
|
55
|
-
$xxs: { display: "none" },
|
|
56
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { size: "$2", onPress: () => setDemoIndex((x) => (x + 1) % demos.length), children: demosTitle[demo] })
|
|
57
|
-
}
|
|
58
|
-
)
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
const HorizontalTabs = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
64
|
-
import_tamagui.Tabs,
|
|
65
|
-
{
|
|
66
|
-
defaultValue: "tab1",
|
|
67
|
-
orientation: "horizontal",
|
|
68
|
-
flexDirection: "column",
|
|
69
|
-
width: 400,
|
|
70
|
-
height: 150,
|
|
71
|
-
borderRadius: "$4",
|
|
72
|
-
borderWidth: "$0.25",
|
|
73
|
-
overflow: "hidden",
|
|
74
|
-
borderColor: "$borderColor",
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
77
|
-
import_tamagui.Tabs.List,
|
|
78
|
-
{
|
|
79
|
-
separator: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Separator, { vertical: !0 }),
|
|
80
|
-
disablePassBorderRadius: "bottom",
|
|
81
|
-
"aria-label": "Manage your account",
|
|
82
|
-
children: [
|
|
83
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, { flex: 1, value: "tab1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { fontFamily: "$body", children: "Profile" }) }),
|
|
84
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, { flex: 1, value: "tab2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { fontFamily: "$body", children: "Connections" }) }),
|
|
85
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, { flex: 1, value: "tab3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { fontFamily: "$body", children: "Notifications" }) })
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
),
|
|
89
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Separator, {}),
|
|
90
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContent, { value: "tab1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, { children: "Profile" }) }),
|
|
91
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContent, { value: "tab2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, { children: "Connections" }) }),
|
|
92
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContent, { value: "tab3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, { children: "Notifications" }) })
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
), VerticalTabs = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
96
|
-
import_tamagui.Tabs,
|
|
97
|
-
{
|
|
98
|
-
defaultValue: "tab1",
|
|
99
|
-
flexDirection: "row",
|
|
100
|
-
orientation: "vertical",
|
|
101
|
-
width: 400,
|
|
102
|
-
borderRadius: "$4",
|
|
103
|
-
borderWidth: "$0.25",
|
|
104
|
-
overflow: "hidden",
|
|
105
|
-
borderColor: "$borderColor",
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
108
|
-
import_tamagui.Tabs.List,
|
|
109
|
-
{
|
|
110
|
-
disablePassBorderRadius: "end",
|
|
111
|
-
"aria-label": "Manage your account",
|
|
112
|
-
separator: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Separator, {}),
|
|
113
|
-
children: [
|
|
114
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, { value: "tab1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Profile" }) }),
|
|
115
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, { value: "tab2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Connections" }) }),
|
|
116
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Tabs.Tab, { value: "tab3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { children: "Notifications" }) })
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
),
|
|
120
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Separator, { vertical: !0 }),
|
|
121
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContent, { value: "tab1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, { textAlign: "center", children: "Profile" }) }),
|
|
122
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContent, { value: "tab2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, { textAlign: "center", children: "Connections" }) }),
|
|
123
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsContent, { value: "tab3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.H5, { textAlign: "center", children: "Notifications" }) })
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
), TabsContent = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
127
|
-
import_tamagui.Tabs.Content,
|
|
128
|
-
{
|
|
129
|
-
backgroundColor: "$background",
|
|
130
|
-
padding: "$2",
|
|
131
|
-
alignItems: "center",
|
|
132
|
-
justifyContent: "center",
|
|
133
|
-
flex: 1,
|
|
134
|
-
borderColor: "$background",
|
|
135
|
-
borderRadius: "$2",
|
|
136
|
-
borderTopLeftRadius: 0,
|
|
137
|
-
borderTopRightRadius: 0,
|
|
138
|
-
borderWidth: "$2",
|
|
139
|
-
...props,
|
|
140
|
-
children: props.children
|
|
141
|
-
},
|
|
142
|
-
"tab3"
|
|
143
|
-
);
|
|
144
|
-
//# sourceMappingURL=TabsDemo.js.map
|
package/dist/cjs/TextDemo.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
-
var TextDemo_exports = {};
|
|
16
|
-
__export(TextDemo_exports, {
|
|
17
|
-
TextDemo: () => TextDemo
|
|
18
|
-
});
|
|
19
|
-
module.exports = __toCommonJS(TextDemo_exports);
|
|
20
|
-
var import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
-
function TextDemo() {
|
|
22
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { gap: "$2", alignItems: "center", children: [
|
|
23
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { size: "$3", children: "SizableText" }),
|
|
24
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { space: !0, children: [
|
|
25
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { theme: "alt1", size: "$3", children: "alt1" }),
|
|
26
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.SizableText, { theme: "alt2", size: "$3", children: "alt2" })
|
|
27
|
-
] }),
|
|
28
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, { size: "$2", fontWeight: "800", children: "Paragraph" })
|
|
29
|
-
] });
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=TextDemo.js.map
|