@tamagui/demos 1.26.1 → 1.27.0-1684260142805
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/ButtonHeadlessDemo.js +110 -0
- package/dist/cjs/ButtonHeadlessDemo.js.map +6 -0
- package/dist/cjs/ButtonSimpleDemo.js +49 -0
- package/dist/cjs/ButtonSimpleDemo.js.map +6 -0
- package/dist/cjs/SheetDemo.js.map +1 -1
- package/dist/esm/ButtonHeadlessDemo.js +93 -0
- package/dist/esm/ButtonHeadlessDemo.js.map +6 -0
- package/dist/esm/{ButtonDemo.mjs → ButtonSimpleDemo.js} +3 -3
- package/dist/esm/ButtonSimpleDemo.js.map +6 -0
- package/dist/esm/SheetDemo.js.map +1 -1
- package/dist/jsx/ButtonHeadlessDemo.js +92 -0
- package/dist/jsx/ButtonHeadlessDemo.js.map +6 -0
- package/dist/jsx/ButtonHeadlessDemo.mjs.map +6 -0
- package/dist/jsx/ButtonSimpleDemo.js +24 -0
- package/dist/jsx/ButtonSimpleDemo.js.map +6 -0
- package/dist/jsx/ButtonSimpleDemo.mjs.map +6 -0
- package/dist/jsx/SheetDemo.js.map +1 -1
- package/dist/jsx/SheetDemo.mjs.map +1 -1
- package/package.json +18 -18
- package/src/SheetDemo.tsx +1 -1
- package/types/ButtonHeadlessDemo.d.ts.map +1 -0
- package/types/ButtonSimpleDemo.d.ts.map +1 -0
- package/dist/esm/AddThemeDemo.mjs +0 -36
- package/dist/esm/AlertDialogDemo.mjs +0 -53
- package/dist/esm/AnimationsDemo.mjs +0 -89
- package/dist/esm/AnimationsEnterDemo.mjs +0 -40
- package/dist/esm/AnimationsHoverDemo.mjs +0 -27
- package/dist/esm/AnimationsPresenceDemo.mjs +0 -73
- package/dist/esm/AnimationsTimingDemo.mjs +0 -26
- package/dist/esm/AvatarDemo.mjs +0 -30
- package/dist/esm/ButtonNewDemo.mjs +0 -31
- package/dist/esm/CardDemo.mjs +0 -48
- package/dist/esm/CheckboxDemo.mjs +0 -22
- package/dist/esm/ColorsDemo.mjs +0 -98
- package/dist/esm/DialogDemo.mjs +0 -84
- package/dist/esm/FormsDemo.mjs +0 -36
- package/dist/esm/GroupDemo.mjs +0 -25
- package/dist/esm/HeadingsDemo.mjs +0 -16
- package/dist/esm/ImageDemo.mjs +0 -18
- package/dist/esm/InputsDemo.mjs +0 -31
- package/dist/esm/LabelDemo.mjs +0 -18
- package/dist/esm/LinearGradientDemo.mjs +0 -33
- package/dist/esm/ListItemDemo.mjs +0 -47
- package/dist/esm/LucideIconsDemo.mjs +0 -52
- package/dist/esm/PopoverDemo.mjs +0 -76
- package/dist/esm/ProgressDemo.mjs +0 -59
- package/dist/esm/RadioGroupDemo.mjs +0 -21
- package/dist/esm/ReplaceThemeDemo.mjs +0 -49
- package/dist/esm/ScrollViewDemo.mjs +0 -18
- package/dist/esm/SelectDemo.mjs +0 -137
- package/dist/esm/SeparatorDemo.mjs +0 -20
- package/dist/esm/ShapesDemo.mjs +0 -12
- package/dist/esm/SheetDemo.mjs +0 -91
- package/dist/esm/SliderDemo.mjs +0 -19
- package/dist/esm/SpinnerDemo.mjs +0 -12
- package/dist/esm/StacksDemo.mjs +0 -58
- package/dist/esm/SwitchDemo.mjs +0 -33
- package/dist/esm/TabsAdvancedDemo.mjs +0 -283
- package/dist/esm/TabsDemo.mjs +0 -141
- package/dist/esm/TextDemo.mjs +0 -16
- package/dist/esm/ThemeInverseDemo.mjs +0 -42
- package/dist/esm/ToastDemo.mjs +0 -101
- package/dist/esm/ToastDuplicateDemo.mjs +0 -44
- package/dist/esm/ToggleGroupDemo.mjs +0 -49
- package/dist/esm/TokensDemo.mjs +0 -87
- package/dist/esm/TooltipDemo.mjs +0 -68
- package/dist/esm/UpdateThemeDemo.mjs +0 -56
- package/dist/esm/conf.mjs +0 -5
- package/dist/esm/index.mjs +0 -48
- package/dist/esm/tamagui.config.mjs +0 -6
- package/dist/esm/useOnIntersecting.mjs +0 -68
package/dist/esm/ColorsDemo.mjs
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
H2,
|
|
4
|
-
Paragraph,
|
|
5
|
-
Separator,
|
|
6
|
-
Square,
|
|
7
|
-
XStack,
|
|
8
|
-
YStack,
|
|
9
|
-
getTokens,
|
|
10
|
-
getVariableValue
|
|
11
|
-
} from "tamagui";
|
|
12
|
-
const colorGroups = ["orange", "yellow", "green", "blue", "purple", "pink", "red"];
|
|
13
|
-
function ColorsDemo() {
|
|
14
|
-
const colors = getTokens({ prefixed: false }).color;
|
|
15
|
-
const [colorsLight, colorsDark] = [getColors(colors), getColors(colors, true)];
|
|
16
|
-
return /* @__PURE__ */ jsxs(YStack, { marginTop: "$4", space: "$8", children: [
|
|
17
|
-
/* @__PURE__ */ jsx(ColorsRow, { title: "Light", colors: colorsLight }),
|
|
18
|
-
/* @__PURE__ */ jsx(Separator, {}),
|
|
19
|
-
/* @__PURE__ */ jsx(ColorsRow, { title: "Dark", colors: colorsDark })
|
|
20
|
-
] });
|
|
21
|
-
}
|
|
22
|
-
function ColorsRow({ title, colors }) {
|
|
23
|
-
return /* @__PURE__ */ jsxs(YStack, { space: true, $sm: { space: "$2" }, children: [
|
|
24
|
-
/* @__PURE__ */ jsx(H2, { size: "$2", children: title }),
|
|
25
|
-
/* @__PURE__ */ jsxs(XStack, { space: true, alignSelf: "center", children: [
|
|
26
|
-
/* @__PURE__ */ jsxs(YStack, { space: true, $sm: { space: "$2" }, alignSelf: "center", children: [
|
|
27
|
-
colors.map((group, index) => {
|
|
28
|
-
return /* @__PURE__ */ jsx(XStack, { space: "$2", children: group.map((color) => {
|
|
29
|
-
return /* @__PURE__ */ jsx(
|
|
30
|
-
Square,
|
|
31
|
-
{
|
|
32
|
-
borderRadius: "$2",
|
|
33
|
-
size: "$4",
|
|
34
|
-
height: "$4",
|
|
35
|
-
borderWidth: 1,
|
|
36
|
-
backgroundColor: getVariableValue(color),
|
|
37
|
-
borderColor: "$color7",
|
|
38
|
-
$sm: {
|
|
39
|
-
size: "$2"
|
|
40
|
-
},
|
|
41
|
-
$xs: {
|
|
42
|
-
size: "$1"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
`${color.key}${index}`
|
|
46
|
-
);
|
|
47
|
-
}) }, index);
|
|
48
|
-
}),
|
|
49
|
-
/* @__PURE__ */ jsx(XStack, { space: "$2", alignSelf: "center", children: new Array(13).fill(0).slice(1).map((_, index) => {
|
|
50
|
-
return /* @__PURE__ */ jsx(
|
|
51
|
-
Paragraph,
|
|
52
|
-
{
|
|
53
|
-
color: "$color10",
|
|
54
|
-
textAlign: "center",
|
|
55
|
-
width: "$4",
|
|
56
|
-
$sm: {
|
|
57
|
-
width: "$2"
|
|
58
|
-
},
|
|
59
|
-
$xs: {
|
|
60
|
-
width: "$1"
|
|
61
|
-
},
|
|
62
|
-
children: index
|
|
63
|
-
},
|
|
64
|
-
index
|
|
65
|
-
);
|
|
66
|
-
}) })
|
|
67
|
-
] }),
|
|
68
|
-
/* @__PURE__ */ jsx(YStack, { space: "$4", marginTop: "$2", children: colorGroups.map((name) => /* @__PURE__ */ jsx(
|
|
69
|
-
Paragraph,
|
|
70
|
-
{
|
|
71
|
-
theme: name,
|
|
72
|
-
color: "$color10",
|
|
73
|
-
height: "$4",
|
|
74
|
-
rotate: "-10deg",
|
|
75
|
-
$sm: {
|
|
76
|
-
height: "$2"
|
|
77
|
-
},
|
|
78
|
-
$xs: {
|
|
79
|
-
height: "$1"
|
|
80
|
-
},
|
|
81
|
-
children: name
|
|
82
|
-
},
|
|
83
|
-
name
|
|
84
|
-
)) })
|
|
85
|
-
] })
|
|
86
|
-
] });
|
|
87
|
-
}
|
|
88
|
-
function getColors(colors, dark = false) {
|
|
89
|
-
return colorGroups.map((group) => {
|
|
90
|
-
return Object.keys(colors).filter(
|
|
91
|
-
(color) => color.startsWith(group) && (dark ? color.endsWith("Dark") : !color.endsWith("Dark"))
|
|
92
|
-
).map((key) => colors[key]);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
export {
|
|
96
|
-
ColorsDemo
|
|
97
|
-
};
|
|
98
|
-
//# sourceMappingURL=ColorsDemo.mjs.map
|
package/dist/esm/DialogDemo.mjs
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { X } from "@tamagui/lucide-icons";
|
|
3
|
-
import {
|
|
4
|
-
Adapt,
|
|
5
|
-
Button,
|
|
6
|
-
Dialog,
|
|
7
|
-
Fieldset,
|
|
8
|
-
Input,
|
|
9
|
-
Label,
|
|
10
|
-
Paragraph,
|
|
11
|
-
Sheet,
|
|
12
|
-
TooltipSimple,
|
|
13
|
-
Unspaced,
|
|
14
|
-
YStack
|
|
15
|
-
} from "tamagui";
|
|
16
|
-
import { SelectDemoItem } from "./SelectDemo";
|
|
17
|
-
function DialogDemo() {
|
|
18
|
-
return /* @__PURE__ */ jsxs(Dialog, { modal: true, children: [
|
|
19
|
-
/* @__PURE__ */ jsx(Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { children: "Edit Profile" }) }),
|
|
20
|
-
/* @__PURE__ */ jsx(Adapt, { when: "sm", platform: "touch", children: /* @__PURE__ */ jsxs(Sheet, { zIndex: 2e5, modal: true, dismissOnSnapToBottom: true, children: [
|
|
21
|
-
/* @__PURE__ */ jsx(Sheet.Frame, { padding: "$4", space: true, children: /* @__PURE__ */ jsx(Adapt.Contents, {}) }),
|
|
22
|
-
/* @__PURE__ */ jsx(Sheet.Overlay, {})
|
|
23
|
-
] }) }),
|
|
24
|
-
/* @__PURE__ */ jsxs(Dialog.Portal, { children: [
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
26
|
-
Dialog.Overlay,
|
|
27
|
-
{
|
|
28
|
-
animation: "quick",
|
|
29
|
-
opacity: 0.5,
|
|
30
|
-
enterStyle: { opacity: 0 },
|
|
31
|
-
exitStyle: { opacity: 0 }
|
|
32
|
-
},
|
|
33
|
-
"overlay"
|
|
34
|
-
),
|
|
35
|
-
/* @__PURE__ */ jsxs(
|
|
36
|
-
Dialog.Content,
|
|
37
|
-
{
|
|
38
|
-
bordered: true,
|
|
39
|
-
elevate: true,
|
|
40
|
-
animation: [
|
|
41
|
-
"quick",
|
|
42
|
-
{
|
|
43
|
-
opacity: {
|
|
44
|
-
overshootClamping: true
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
enterStyle: { x: 0, y: -20, opacity: 0, scale: 0.9 },
|
|
49
|
-
exitStyle: { x: 0, y: 10, opacity: 0, scale: 0.95 },
|
|
50
|
-
space: true,
|
|
51
|
-
children: [
|
|
52
|
-
/* @__PURE__ */ jsx(Dialog.Title, { children: "Edit profile" }),
|
|
53
|
-
/* @__PURE__ */ jsx(Dialog.Description, { children: "Make changes to your profile here. Click save when you're done." }),
|
|
54
|
-
/* @__PURE__ */ jsxs(Fieldset, { space: "$4", horizontal: true, children: [
|
|
55
|
-
/* @__PURE__ */ jsx(Label, { width: 160, justifyContent: "flex-end", htmlFor: "name", children: "Name" }),
|
|
56
|
-
/* @__PURE__ */ jsx(Input, { flex: 1, id: "name", defaultValue: "Nate Wienert" })
|
|
57
|
-
] }),
|
|
58
|
-
/* @__PURE__ */ jsxs(Fieldset, { space: "$4", horizontal: true, children: [
|
|
59
|
-
/* @__PURE__ */ jsx(Label, { width: 160, justifyContent: "flex-end", htmlFor: "username", children: /* @__PURE__ */ jsx(TooltipSimple, { label: "Pick your favorite", placement: "bottom-start", children: /* @__PURE__ */ jsx(Paragraph, { children: "Food" }) }) }),
|
|
60
|
-
/* @__PURE__ */ jsx(SelectDemoItem, {})
|
|
61
|
-
] }),
|
|
62
|
-
/* @__PURE__ */ jsx(YStack, { alignItems: "flex-end", marginTop: "$2", children: /* @__PURE__ */ jsx(Dialog.Close, { displayWhenAdapted: true, asChild: true, children: /* @__PURE__ */ jsx(Button, { theme: "alt1", "aria-label": "Close", children: "Save changes" }) }) }),
|
|
63
|
-
/* @__PURE__ */ jsx(Unspaced, { children: /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
64
|
-
Button,
|
|
65
|
-
{
|
|
66
|
-
position: "absolute",
|
|
67
|
-
top: "$3",
|
|
68
|
-
right: "$3",
|
|
69
|
-
size: "$2",
|
|
70
|
-
circular: true,
|
|
71
|
-
icon: X
|
|
72
|
-
}
|
|
73
|
-
) }) })
|
|
74
|
-
]
|
|
75
|
-
},
|
|
76
|
-
"content"
|
|
77
|
-
)
|
|
78
|
-
] })
|
|
79
|
-
] });
|
|
80
|
-
}
|
|
81
|
-
export {
|
|
82
|
-
DialogDemo
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=DialogDemo.mjs.map
|
package/dist/esm/FormsDemo.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
import { Button, Form, H4, Spinner } from "tamagui";
|
|
4
|
-
function FormsDemo(props) {
|
|
5
|
-
const [status, setStatus] = useState("off");
|
|
6
|
-
useEffect(() => {
|
|
7
|
-
if (status === "submitting") {
|
|
8
|
-
const timer = setTimeout(() => setStatus("off"), 2e3);
|
|
9
|
-
return () => {
|
|
10
|
-
clearTimeout(timer);
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
}, [status]);
|
|
14
|
-
return /* @__PURE__ */ jsxs(
|
|
15
|
-
Form,
|
|
16
|
-
{
|
|
17
|
-
alignItems: "center",
|
|
18
|
-
minWidth: 300,
|
|
19
|
-
space: true,
|
|
20
|
-
onSubmit: () => setStatus("submitting"),
|
|
21
|
-
borderWidth: 1,
|
|
22
|
-
borderRadius: "$4",
|
|
23
|
-
backgroundColor: "$background",
|
|
24
|
-
borderColor: "$borderColor",
|
|
25
|
-
padding: "$8",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ jsx(H4, { children: status[0].toUpperCase() + status.slice(1) }),
|
|
28
|
-
/* @__PURE__ */ jsx(Form.Trigger, { asChild: true, disabled: status !== "off", children: /* @__PURE__ */ jsx(Button, { icon: status === "submitting" ? () => /* @__PURE__ */ jsx(Spinner, {}) : void 0, children: "Submit" }) })
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
export {
|
|
34
|
-
FormsDemo
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=FormsDemo.mjs.map
|
package/dist/esm/GroupDemo.mjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Activity, Airplay } from "@tamagui/lucide-icons";
|
|
3
|
-
import { Button, Group, ListItem, Separator, XGroup, YGroup, YStack } from "tamagui";
|
|
4
|
-
function GroupDemo() {
|
|
5
|
-
return /* @__PURE__ */ jsxs(YStack, { padding: "$3", space: "$2", alignItems: "center", children: [
|
|
6
|
-
/* @__PURE__ */ jsxs(Group, { axis: "horizontal", children: [
|
|
7
|
-
/* @__PURE__ */ jsx(Group.Item, { children: /* @__PURE__ */ jsx(Button, { children: "First" }) }),
|
|
8
|
-
/* @__PURE__ */ jsx(Group.Item, { children: /* @__PURE__ */ jsx(Button, { children: "Second" }) }),
|
|
9
|
-
/* @__PURE__ */ jsx(Group.Item, { children: /* @__PURE__ */ jsx(Button, { children: "Third" }) })
|
|
10
|
-
] }),
|
|
11
|
-
/* @__PURE__ */ jsxs(XGroup, { size: "$3", $gtSm: { size: "$5" }, children: [
|
|
12
|
-
/* @__PURE__ */ jsx(XGroup.Item, { children: /* @__PURE__ */ jsx(Button, { size: "$3", icon: Activity, children: "First" }) }),
|
|
13
|
-
/* @__PURE__ */ jsx(XGroup.Item, { children: /* @__PURE__ */ jsx(Button, { size: "$3", icon: Airplay, children: "Second" }) })
|
|
14
|
-
] }),
|
|
15
|
-
/* @__PURE__ */ jsxs(YGroup, { separator: /* @__PURE__ */ jsx(Separator, {}), children: [
|
|
16
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(ListItem, { title: "First" }) }),
|
|
17
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(ListItem, { title: "Second", subTitle: "Second subtitle" }) }),
|
|
18
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(ListItem, { children: "Third" }) })
|
|
19
|
-
] })
|
|
20
|
-
] });
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
GroupDemo
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=GroupDemo.mjs.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { H1, H2, H3, H4, H5, H6, YStack } from "tamagui";
|
|
3
|
-
function HeadingsDemo() {
|
|
4
|
-
return /* @__PURE__ */ jsxs(YStack, { alignSelf: "center", children: [
|
|
5
|
-
/* @__PURE__ */ jsx(H1, { children: "Heading 1" }),
|
|
6
|
-
/* @__PURE__ */ jsx(H2, { children: "Heading 2" }),
|
|
7
|
-
/* @__PURE__ */ jsx(H3, { children: "Heading 3" }),
|
|
8
|
-
/* @__PURE__ */ jsx(H4, { children: "Heading 4" }),
|
|
9
|
-
/* @__PURE__ */ jsx(H5, { children: "Heading 5" }),
|
|
10
|
-
/* @__PURE__ */ jsx(H6, { children: "Heading 6" })
|
|
11
|
-
] });
|
|
12
|
-
}
|
|
13
|
-
export {
|
|
14
|
-
HeadingsDemo
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=HeadingsDemo.mjs.map
|
package/dist/esm/ImageDemo.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Image } from "tamagui";
|
|
3
|
-
function ImageDemo() {
|
|
4
|
-
return /* @__PURE__ */ jsx(
|
|
5
|
-
Image,
|
|
6
|
-
{
|
|
7
|
-
source: {
|
|
8
|
-
uri: "https://placekitten.com/200/300",
|
|
9
|
-
width: 200,
|
|
10
|
-
height: 300
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
ImageDemo
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=ImageDemo.mjs.map
|
package/dist/esm/InputsDemo.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Input, TextArea, XStack, YStack } from "tamagui";
|
|
3
|
-
function InputsDemo() {
|
|
4
|
-
return /* @__PURE__ */ jsxs(
|
|
5
|
-
YStack,
|
|
6
|
-
{
|
|
7
|
-
width: 200,
|
|
8
|
-
minHeight: 250,
|
|
9
|
-
overflow: "hidden",
|
|
10
|
-
space: "$2",
|
|
11
|
-
margin: "$3",
|
|
12
|
-
padding: "$2",
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ jsx(InputDemo, { size: "$2" }),
|
|
15
|
-
/* @__PURE__ */ jsx(InputDemo, { size: "$3" }),
|
|
16
|
-
/* @__PURE__ */ jsx(InputDemo, { size: "$4" }),
|
|
17
|
-
/* @__PURE__ */ jsx(TextArea, { minHeight: 140, placeholder: "Enter your details...", numberOfLines: 4 })
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
function InputDemo(props) {
|
|
23
|
-
return /* @__PURE__ */ jsxs(XStack, { alignItems: "center", space: "$2", children: [
|
|
24
|
-
/* @__PURE__ */ jsx(Input, { flex: 1, size: props.size, placeholder: `Size ${props.size}...` }),
|
|
25
|
-
/* @__PURE__ */ jsx(Button, { size: props.size, children: "Go" })
|
|
26
|
-
] });
|
|
27
|
-
}
|
|
28
|
-
export {
|
|
29
|
-
InputsDemo
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=InputsDemo.mjs.map
|
package/dist/esm/LabelDemo.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Input, Label, Switch, XStack, YStack } from "tamagui";
|
|
3
|
-
function LabelDemo() {
|
|
4
|
-
return /* @__PURE__ */ jsxs(YStack, { padding: "$3", minWidth: 300, space: "$4", children: [
|
|
5
|
-
/* @__PURE__ */ jsxs(XStack, { alignItems: "center", space: "$4", children: [
|
|
6
|
-
/* @__PURE__ */ jsx(Label, { width: 90, htmlFor: "name", children: "Name" }),
|
|
7
|
-
/* @__PURE__ */ jsx(Input, { flex: 1, id: "name", defaultValue: "Nate Wienert" })
|
|
8
|
-
] }),
|
|
9
|
-
/* @__PURE__ */ jsxs(XStack, { alignItems: "center", space: "$4", children: [
|
|
10
|
-
/* @__PURE__ */ jsx(Label, { width: 90, htmlFor: "notify", children: "Notifications" }),
|
|
11
|
-
/* @__PURE__ */ jsx(Switch, { id: "notify", children: /* @__PURE__ */ jsx(Switch.Thumb, { animation: "quick" }) })
|
|
12
|
-
] })
|
|
13
|
-
] });
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
LabelDemo
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=LabelDemo.mjs.map
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { XStack } from "tamagui";
|
|
3
|
-
import { LinearGradient } from "tamagui/linear-gradient";
|
|
4
|
-
function LinearGradientDemo() {
|
|
5
|
-
return /* @__PURE__ */ jsxs(XStack, { space: true, children: [
|
|
6
|
-
/* @__PURE__ */ jsx(
|
|
7
|
-
LinearGradient,
|
|
8
|
-
{
|
|
9
|
-
width: "$6",
|
|
10
|
-
height: "$6",
|
|
11
|
-
borderRadius: "$4",
|
|
12
|
-
colors: ["$red10", "$yellow10"],
|
|
13
|
-
start: [0, 1],
|
|
14
|
-
end: [0, 0]
|
|
15
|
-
}
|
|
16
|
-
),
|
|
17
|
-
/* @__PURE__ */ jsx(
|
|
18
|
-
LinearGradient,
|
|
19
|
-
{
|
|
20
|
-
width: "$6",
|
|
21
|
-
height: "$6",
|
|
22
|
-
borderRadius: "$4",
|
|
23
|
-
colors: ["$background", "$color"],
|
|
24
|
-
start: [1, 1],
|
|
25
|
-
end: [0, 0]
|
|
26
|
-
}
|
|
27
|
-
)
|
|
28
|
-
] });
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
LinearGradientDemo
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=LinearGradientDemo.mjs.map
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronRight, Cloud, Moon, Star, Sun } from "@tamagui/lucide-icons";
|
|
3
|
-
import { ListItem, Separator, XStack, YGroup } from "tamagui";
|
|
4
|
-
function ListItemDemo() {
|
|
5
|
-
return /* @__PURE__ */ jsxs(XStack, { $sm: { flexDirection: "column" }, paddingHorizontal: "$4", space: true, children: [
|
|
6
|
-
/* @__PURE__ */ jsx(ListItemDemo1, {}),
|
|
7
|
-
/* @__PURE__ */ jsx(ListItemDemo2, {})
|
|
8
|
-
] });
|
|
9
|
-
}
|
|
10
|
-
function ListItemDemo1() {
|
|
11
|
-
return /* @__PURE__ */ jsxs(YGroup, { alignSelf: "center", bordered: true, width: 240, size: "$4", children: [
|
|
12
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(ListItem, { hoverTheme: true, icon: Star, title: "Star", subTitle: "Twinkles" }) }),
|
|
13
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(ListItem, { hoverTheme: true, icon: Moon, children: "Moon" }) }),
|
|
14
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(ListItem, { hoverTheme: true, icon: Sun, children: "Sun" }) }),
|
|
15
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(ListItem, { hoverTheme: true, icon: Cloud, children: "Cloud" }) })
|
|
16
|
-
] });
|
|
17
|
-
}
|
|
18
|
-
function ListItemDemo2() {
|
|
19
|
-
return /* @__PURE__ */ jsxs(YGroup, { alignSelf: "center", bordered: true, width: 240, size: "$5", separator: /* @__PURE__ */ jsx(Separator, {}), children: [
|
|
20
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(
|
|
21
|
-
ListItem,
|
|
22
|
-
{
|
|
23
|
-
hoverTheme: true,
|
|
24
|
-
pressTheme: true,
|
|
25
|
-
title: "Star",
|
|
26
|
-
subTitle: "Subtitle",
|
|
27
|
-
icon: Star,
|
|
28
|
-
iconAfter: ChevronRight
|
|
29
|
-
}
|
|
30
|
-
) }),
|
|
31
|
-
/* @__PURE__ */ jsx(YGroup.Item, { children: /* @__PURE__ */ jsx(
|
|
32
|
-
ListItem,
|
|
33
|
-
{
|
|
34
|
-
hoverTheme: true,
|
|
35
|
-
pressTheme: true,
|
|
36
|
-
title: "Moon",
|
|
37
|
-
subTitle: "Subtitle",
|
|
38
|
-
icon: Moon,
|
|
39
|
-
iconAfter: ChevronRight
|
|
40
|
-
}
|
|
41
|
-
) })
|
|
42
|
-
] });
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
ListItemDemo
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=ListItemDemo.mjs.map
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as LucideIcons from "@tamagui/lucide-icons";
|
|
3
|
-
import { useMemo, useState } from "react";
|
|
4
|
-
import { ScrollView } from "react-native";
|
|
5
|
-
import { Grid, Input, Paragraph, Spacer, YStack, useDebounceValue } from "tamagui";
|
|
6
|
-
const lucideIcons = Object.keys(LucideIcons).map((name) => ({
|
|
7
|
-
key: name.toLowerCase(),
|
|
8
|
-
name,
|
|
9
|
-
Icon: LucideIcons[name]
|
|
10
|
-
}));
|
|
11
|
-
function LucideIconsDemo() {
|
|
12
|
-
const [searchRaw, setSearch] = useState("");
|
|
13
|
-
const search = useDebounceValue(searchRaw, 400);
|
|
14
|
-
const size = 100;
|
|
15
|
-
const iconsMemo = useMemo(
|
|
16
|
-
() => lucideIcons.filter((x) => x.key.startsWith(search.toLowerCase())).map(({ Icon, name }) => /* @__PURE__ */ jsxs(
|
|
17
|
-
YStack,
|
|
18
|
-
{
|
|
19
|
-
height: size + 20,
|
|
20
|
-
alignItems: "center",
|
|
21
|
-
justifyContent: "center",
|
|
22
|
-
children: [
|
|
23
|
-
/* @__PURE__ */ jsx(Icon, { size: size * 0.25 }),
|
|
24
|
-
/* @__PURE__ */ jsx(Spacer, {}),
|
|
25
|
-
/* @__PURE__ */ jsx(
|
|
26
|
-
Paragraph,
|
|
27
|
-
{
|
|
28
|
-
height: "$6",
|
|
29
|
-
wordWrap: "break-word",
|
|
30
|
-
maxWidth: "100%",
|
|
31
|
-
textAlign: "center",
|
|
32
|
-
paddingHorizontal: "$2",
|
|
33
|
-
size: "$1",
|
|
34
|
-
opacity: 0.5,
|
|
35
|
-
children: name
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
name
|
|
41
|
-
)),
|
|
42
|
-
[search]
|
|
43
|
-
);
|
|
44
|
-
return /* @__PURE__ */ jsxs(YStack, { minWidth: "100%", padding: "$4", paddingBottom: "$0", space: true, children: [
|
|
45
|
-
/* @__PURE__ */ jsx(Input, { value: searchRaw, onChangeText: setSearch, placeholder: "Search..." }),
|
|
46
|
-
/* @__PURE__ */ jsx(YStack, { height: 420, children: /* @__PURE__ */ jsx(ScrollView, { children: /* @__PURE__ */ jsx(Grid, { itemMinWidth: size, children: iconsMemo }) }) })
|
|
47
|
-
] });
|
|
48
|
-
}
|
|
49
|
-
export {
|
|
50
|
-
LucideIconsDemo
|
|
51
|
-
};
|
|
52
|
-
//# sourceMappingURL=LucideIconsDemo.mjs.map
|
package/dist/esm/PopoverDemo.mjs
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp } from "@tamagui/lucide-icons";
|
|
3
|
-
import {
|
|
4
|
-
Adapt,
|
|
5
|
-
Button,
|
|
6
|
-
Input,
|
|
7
|
-
Label,
|
|
8
|
-
Popover,
|
|
9
|
-
XStack,
|
|
10
|
-
YStack
|
|
11
|
-
} from "tamagui";
|
|
12
|
-
function PopoverDemo() {
|
|
13
|
-
return /* @__PURE__ */ jsxs(XStack, { space: "$2", flex: 1, justifyContent: "center", alignItems: "center", children: [
|
|
14
|
-
/* @__PURE__ */ jsx(Demo, { placement: "left", Icon: ChevronLeft, Name: "left-popover" }),
|
|
15
|
-
/* @__PURE__ */ jsx(Demo, { placement: "bottom", Icon: ChevronDown, Name: "bottom-popover" }),
|
|
16
|
-
/* @__PURE__ */ jsx(Demo, { placement: "top", Icon: ChevronUp, Name: "top-popover" }),
|
|
17
|
-
/* @__PURE__ */ jsx(Demo, { placement: "right", Icon: ChevronRight, Name: "right-popover" })
|
|
18
|
-
] });
|
|
19
|
-
}
|
|
20
|
-
function Demo({
|
|
21
|
-
Icon,
|
|
22
|
-
Name,
|
|
23
|
-
...props
|
|
24
|
-
}) {
|
|
25
|
-
return /* @__PURE__ */ jsxs(Popover, { size: "$5", allowFlip: true, ...props, children: [
|
|
26
|
-
/* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { icon: Icon }) }),
|
|
27
|
-
/* @__PURE__ */ jsx(Adapt, { when: "sm", platform: "touch", children: /* @__PURE__ */ jsxs(Popover.Sheet, { modal: true, dismissOnSnapToBottom: true, children: [
|
|
28
|
-
/* @__PURE__ */ jsx(Popover.Sheet.Frame, { padding: "$4", children: /* @__PURE__ */ jsx(Adapt.Contents, {}) }),
|
|
29
|
-
/* @__PURE__ */ jsx(Popover.Sheet.Overlay, {})
|
|
30
|
-
] }) }),
|
|
31
|
-
/* @__PURE__ */ jsxs(
|
|
32
|
-
Popover.Content,
|
|
33
|
-
{
|
|
34
|
-
borderWidth: 1,
|
|
35
|
-
borderColor: "$borderColor",
|
|
36
|
-
enterStyle: { x: 0, y: -10, opacity: 0 },
|
|
37
|
-
exitStyle: { x: 0, y: -10, opacity: 0 },
|
|
38
|
-
x: 0,
|
|
39
|
-
y: 0,
|
|
40
|
-
opacity: 1,
|
|
41
|
-
animation: [
|
|
42
|
-
"quick",
|
|
43
|
-
{
|
|
44
|
-
opacity: {
|
|
45
|
-
overshootClamping: true
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
elevate: true,
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ jsx(Popover.Arrow, { borderWidth: 1, borderColor: "$borderColor" }),
|
|
52
|
-
/* @__PURE__ */ jsxs(YStack, { space: "$3", children: [
|
|
53
|
-
/* @__PURE__ */ jsxs(XStack, { space: "$3", children: [
|
|
54
|
-
/* @__PURE__ */ jsx(Label, { size: "$3", htmlFor: Name, children: "Name" }),
|
|
55
|
-
/* @__PURE__ */ jsx(Input, { size: "$3", id: Name })
|
|
56
|
-
] }),
|
|
57
|
-
/* @__PURE__ */ jsx(Popover.Close, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
58
|
-
Button,
|
|
59
|
-
{
|
|
60
|
-
size: "$3",
|
|
61
|
-
onPress: () => {
|
|
62
|
-
},
|
|
63
|
-
children: "Submit"
|
|
64
|
-
}
|
|
65
|
-
) })
|
|
66
|
-
] })
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
] });
|
|
71
|
-
}
|
|
72
|
-
export {
|
|
73
|
-
Demo,
|
|
74
|
-
PopoverDemo
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=PopoverDemo.mjs.map
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
import { Button, Paragraph, Progress, Slider, XStack, YStack } from "tamagui";
|
|
4
|
-
function ProgressDemo() {
|
|
5
|
-
const [size, setSize] = useState(4);
|
|
6
|
-
const [progress, setProgress] = useState(20);
|
|
7
|
-
const sizeProp = `$${size}`;
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
const timer = setTimeout(() => setProgress(60), 1e3);
|
|
10
|
-
return () => {
|
|
11
|
-
clearTimeout(timer);
|
|
12
|
-
};
|
|
13
|
-
}, []);
|
|
14
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15
|
-
/* @__PURE__ */ jsxs(YStack, { height: 60, alignItems: "center", space: true, children: [
|
|
16
|
-
/* @__PURE__ */ jsxs(Paragraph, { height: 30, opacity: 0.5, children: [
|
|
17
|
-
"Size: ",
|
|
18
|
-
size
|
|
19
|
-
] }),
|
|
20
|
-
/* @__PURE__ */ jsx(Progress, { size: sizeProp, value: progress, children: /* @__PURE__ */ jsx(Progress.Indicator, { animation: "bouncy" }) })
|
|
21
|
-
] }),
|
|
22
|
-
/* @__PURE__ */ jsxs(
|
|
23
|
-
XStack,
|
|
24
|
-
{
|
|
25
|
-
alignItems: "center",
|
|
26
|
-
space: true,
|
|
27
|
-
position: "absolute",
|
|
28
|
-
bottom: "$3",
|
|
29
|
-
left: "$4",
|
|
30
|
-
$xxs: { display: "none" },
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ jsxs(
|
|
33
|
-
Slider,
|
|
34
|
-
{
|
|
35
|
-
size: "$2",
|
|
36
|
-
width: 130,
|
|
37
|
-
defaultValue: [4],
|
|
38
|
-
min: 2,
|
|
39
|
-
max: 6,
|
|
40
|
-
step: 1,
|
|
41
|
-
onValueChange: ([val]) => {
|
|
42
|
-
setSize(val);
|
|
43
|
-
},
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ jsx(Slider.Track, { borderWidth: 1, borderColor: "$color5", children: /* @__PURE__ */ jsx(Slider.TrackActive, {}) }),
|
|
46
|
-
/* @__PURE__ */ jsx(Slider.Thumb, { circular: true, index: 0 })
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
/* @__PURE__ */ jsx(Button, { size: "$2", onPress: () => setProgress((prev) => (prev + 20) % 100), children: "Load" })
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
] });
|
|
55
|
-
}
|
|
56
|
-
export {
|
|
57
|
-
ProgressDemo
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=ProgressDemo.mjs.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Label, RadioGroup, XStack, YStack } from "tamagui";
|
|
3
|
-
function RadioGroupDemo() {
|
|
4
|
-
return /* @__PURE__ */ jsx(RadioGroup, { defaultValue: "3", name: "form", children: /* @__PURE__ */ jsxs(YStack, { width: 300, alignItems: "center", space: "$2", children: [
|
|
5
|
-
/* @__PURE__ */ jsx(RadioGroupItemWithLabel, { size: "$3", value: "2", label: "Second value" }),
|
|
6
|
-
/* @__PURE__ */ jsx(RadioGroupItemWithLabel, { size: "$4", value: "3", label: "Third value" }),
|
|
7
|
-
/* @__PURE__ */ jsx(RadioGroupItemWithLabel, { size: "$5", value: "4", label: "Fourth value" })
|
|
8
|
-
] }) });
|
|
9
|
-
}
|
|
10
|
-
function RadioGroupItemWithLabel(props) {
|
|
11
|
-
const id = `radiogroup-${props.value}`;
|
|
12
|
-
return /* @__PURE__ */ jsxs(XStack, { width: 300, alignItems: "center", space: "$4", children: [
|
|
13
|
-
/* @__PURE__ */ jsx(RadioGroup.Item, { value: props.value, id, size: props.size, children: /* @__PURE__ */ jsx(RadioGroup.Indicator, {}) }),
|
|
14
|
-
/* @__PURE__ */ jsx(Label, { size: props.size, htmlFor: id, children: props.label })
|
|
15
|
-
] });
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
RadioGroupDemo,
|
|
19
|
-
RadioGroupItemWithLabel
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=RadioGroupDemo.mjs.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { addTheme, replaceTheme } from "@tamagui/theme";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
Button,
|
|
6
|
-
Square,
|
|
7
|
-
Theme,
|
|
8
|
-
XStack,
|
|
9
|
-
YStack,
|
|
10
|
-
useForceUpdate,
|
|
11
|
-
useIsomorphicLayoutEffect
|
|
12
|
-
} from "tamagui";
|
|
13
|
-
function ReplaceThemeDemo() {
|
|
14
|
-
const [theme, setTheme] = useState();
|
|
15
|
-
const update = useForceUpdate();
|
|
16
|
-
useIsomorphicLayoutEffect(() => {
|
|
17
|
-
addTheme({
|
|
18
|
-
name: "mytheme",
|
|
19
|
-
insertCSS: true,
|
|
20
|
-
theme: {
|
|
21
|
-
color: "red",
|
|
22
|
-
color2: "green"
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
setTheme("mytheme");
|
|
26
|
-
}, []);
|
|
27
|
-
return /* @__PURE__ */ jsxs(YStack, { alignItems: "center", space: true, children: [
|
|
28
|
-
/* @__PURE__ */ jsx(XStack, { gap: "$5", children: /* @__PURE__ */ jsx(Theme, { name: theme ?? null, children: /* @__PURE__ */ jsx(Square, { borderRadius: "$8", size: 100, backgroundColor: "$color" }) }) }),
|
|
29
|
-
/* @__PURE__ */ jsx(
|
|
30
|
-
Button,
|
|
31
|
-
{
|
|
32
|
-
onPress: () => {
|
|
33
|
-
replaceTheme({
|
|
34
|
-
name: "mytheme",
|
|
35
|
-
theme: {
|
|
36
|
-
color: "blue"
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
update();
|
|
40
|
-
},
|
|
41
|
-
children: "Replace theme to only have $color: blue"
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] });
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
ReplaceThemeDemo
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=ReplaceThemeDemo.mjs.map
|