@tamagui/demos 1.116.1 → 1.116.2
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.js +43 -0
- package/dist/cjs/AddThemeDemo.js +56 -0
- package/dist/cjs/AlertDialogDemo.js +68 -0
- package/dist/cjs/AnimationsDemo.js +99 -0
- package/dist/cjs/AnimationsEnterDemo.js +55 -0
- package/dist/cjs/AnimationsHoverDemo.js +41 -0
- package/dist/cjs/AnimationsPresenceDemo.js +102 -0
- package/dist/cjs/AnimationsTimingDemo.js +40 -0
- package/dist/cjs/AvatarDemo.js +45 -0
- package/dist/cjs/BuildAButtonDemo.js +57 -0
- package/dist/cjs/ButtonDemo.js +39 -0
- package/dist/cjs/CardDemo.js +63 -0
- package/dist/cjs/CheckboxDemo.js +40 -0
- package/dist/cjs/CheckboxHeadlessDemo.js +62 -0
- package/dist/cjs/CheckboxUnstyledDemo.js +52 -0
- package/dist/cjs/ColorsDemo.js +95 -0
- package/dist/cjs/DialogDemo.js +99 -0
- package/dist/cjs/FormsDemo.js +57 -0
- package/dist/cjs/Grid.js +58 -0
- package/dist/cjs/GroupDemo.js +39 -0
- package/dist/cjs/HeadingsDemo.js +31 -0
- package/dist/cjs/ImageDemo.js +33 -0
- package/dist/cjs/InputsDemo.js +46 -0
- package/dist/cjs/LabelDemo.js +33 -0
- package/dist/cjs/LinearGradientDemo.js +47 -0
- package/dist/cjs/ListItemDemo.js +61 -0
- package/dist/cjs/LucideIconsDemo.js +72 -0
- package/dist/cjs/NewInputsDemo.js +46 -0
- package/dist/cjs/PopoverDemo.js +126 -0
- package/dist/cjs/ProgressDemo.js +88 -0
- package/dist/cjs/RadioGroupDemo.js +36 -0
- package/dist/cjs/RadioGroupHeadlessDemo.js +117 -0
- package/dist/cjs/RadioGroupUnstyledDemo.js +107 -0
- package/dist/cjs/ReplaceThemeDemo.js +58 -0
- package/dist/cjs/ScrollViewDemo.js +43 -0
- package/dist/cjs/SelectDemo.js +190 -0
- package/dist/cjs/SeparatorDemo.js +35 -0
- package/dist/cjs/ShapesDemo.js +27 -0
- package/dist/cjs/SheetDemo.js +120 -0
- package/dist/cjs/SliderDemo.js +34 -0
- package/dist/cjs/SpinnerDemo.js +27 -0
- package/dist/cjs/StacksDemo.js +93 -0
- package/dist/cjs/SwitchDemo.js +56 -0
- package/dist/cjs/SwitchHeadlessDemo.js +87 -0
- package/dist/cjs/SwitchUnstyledDemo.js +64 -0
- package/dist/cjs/TabsAdvancedDemo.js +283 -0
- package/dist/cjs/TabsDemo.js +144 -0
- package/dist/cjs/TextDemo.js +31 -0
- package/dist/cjs/ThemeBuilderDemo.js +149 -0
- package/dist/cjs/ThemeInverseDemo.js +56 -0
- package/dist/cjs/ToastDemo.js +112 -0
- package/dist/cjs/ToastDuplicateDemo.js +64 -0
- package/dist/cjs/ToggleGroupDemo.js +63 -0
- package/dist/cjs/TokensDemo.js +100 -0
- package/dist/cjs/TooltipDemo.js +68 -0
- package/dist/cjs/UpdateThemeDemo.js +61 -0
- package/dist/cjs/WebNativeImageDemo.js +24 -0
- package/dist/cjs/index.js +71 -0
- package/dist/cjs/tamagui.config.js +22 -0
- package/dist/cjs/useOnIntersecting.js +63 -0
- package/package.json +19 -19
- /package/dist/cjs/{AccordionDemo.cjs.map → AccordionDemo.js.map} +0 -0
- /package/dist/cjs/{AddThemeDemo.cjs.map → AddThemeDemo.js.map} +0 -0
- /package/dist/cjs/{AlertDialogDemo.cjs.map → AlertDialogDemo.js.map} +0 -0
- /package/dist/cjs/{AnimationsDemo.cjs.map → AnimationsDemo.js.map} +0 -0
- /package/dist/cjs/{AnimationsEnterDemo.cjs.map → AnimationsEnterDemo.js.map} +0 -0
- /package/dist/cjs/{AnimationsHoverDemo.cjs.map → AnimationsHoverDemo.js.map} +0 -0
- /package/dist/cjs/{AnimationsPresenceDemo.cjs.map → AnimationsPresenceDemo.js.map} +0 -0
- /package/dist/cjs/{AnimationsTimingDemo.cjs.map → AnimationsTimingDemo.js.map} +0 -0
- /package/dist/cjs/{AvatarDemo.cjs.map → AvatarDemo.js.map} +0 -0
- /package/dist/cjs/{BuildAButtonDemo.cjs.map → BuildAButtonDemo.js.map} +0 -0
- /package/dist/cjs/{ButtonDemo.cjs.map → ButtonDemo.js.map} +0 -0
- /package/dist/cjs/{CardDemo.cjs.map → CardDemo.js.map} +0 -0
- /package/dist/cjs/{CheckboxDemo.cjs.map → CheckboxDemo.js.map} +0 -0
- /package/dist/cjs/{CheckboxHeadlessDemo.cjs.map → CheckboxHeadlessDemo.js.map} +0 -0
- /package/dist/cjs/{CheckboxUnstyledDemo.cjs.map → CheckboxUnstyledDemo.js.map} +0 -0
- /package/dist/cjs/{ColorsDemo.cjs.map → ColorsDemo.js.map} +0 -0
- /package/dist/cjs/{DialogDemo.cjs.map → DialogDemo.js.map} +0 -0
- /package/dist/cjs/{FormsDemo.cjs.map → FormsDemo.js.map} +0 -0
- /package/dist/cjs/{Grid.cjs.map → Grid.js.map} +0 -0
- /package/dist/cjs/{GroupDemo.cjs.map → GroupDemo.js.map} +0 -0
- /package/dist/cjs/{HeadingsDemo.cjs.map → HeadingsDemo.js.map} +0 -0
- /package/dist/cjs/{ImageDemo.cjs.map → ImageDemo.js.map} +0 -0
- /package/dist/cjs/{InputsDemo.cjs.map → InputsDemo.js.map} +0 -0
- /package/dist/cjs/{LabelDemo.cjs.map → LabelDemo.js.map} +0 -0
- /package/dist/cjs/{LinearGradientDemo.cjs.map → LinearGradientDemo.js.map} +0 -0
- /package/dist/cjs/{ListItemDemo.cjs.map → ListItemDemo.js.map} +0 -0
- /package/dist/cjs/{LucideIconsDemo.cjs.map → LucideIconsDemo.js.map} +0 -0
- /package/dist/cjs/{NewInputsDemo.cjs.map → NewInputsDemo.js.map} +0 -0
- /package/dist/cjs/{PopoverDemo.cjs.map → PopoverDemo.js.map} +0 -0
- /package/dist/cjs/{ProgressDemo.cjs.map → ProgressDemo.js.map} +0 -0
- /package/dist/cjs/{RadioGroupDemo.cjs.map → RadioGroupDemo.js.map} +0 -0
- /package/dist/cjs/{RadioGroupHeadlessDemo.cjs.map → RadioGroupHeadlessDemo.js.map} +0 -0
- /package/dist/cjs/{RadioGroupUnstyledDemo.cjs.map → RadioGroupUnstyledDemo.js.map} +0 -0
- /package/dist/cjs/{ReplaceThemeDemo.cjs.map → ReplaceThemeDemo.js.map} +0 -0
- /package/dist/cjs/{ScrollViewDemo.cjs.map → ScrollViewDemo.js.map} +0 -0
- /package/dist/cjs/{SelectDemo.cjs.map → SelectDemo.js.map} +0 -0
- /package/dist/cjs/{SeparatorDemo.cjs.map → SeparatorDemo.js.map} +0 -0
- /package/dist/cjs/{ShapesDemo.cjs.map → ShapesDemo.js.map} +0 -0
- /package/dist/cjs/{SheetDemo.cjs.map → SheetDemo.js.map} +0 -0
- /package/dist/cjs/{SliderDemo.cjs.map → SliderDemo.js.map} +0 -0
- /package/dist/cjs/{SpinnerDemo.cjs.map → SpinnerDemo.js.map} +0 -0
- /package/dist/cjs/{StacksDemo.cjs.map → StacksDemo.js.map} +0 -0
- /package/dist/cjs/{SwitchDemo.cjs.map → SwitchDemo.js.map} +0 -0
- /package/dist/cjs/{SwitchHeadlessDemo.cjs.map → SwitchHeadlessDemo.js.map} +0 -0
- /package/dist/cjs/{SwitchUnstyledDemo.cjs.map → SwitchUnstyledDemo.js.map} +0 -0
- /package/dist/cjs/{TabsAdvancedDemo.cjs.map → TabsAdvancedDemo.js.map} +0 -0
- /package/dist/cjs/{TabsDemo.cjs.map → TabsDemo.js.map} +0 -0
- /package/dist/cjs/{TextDemo.cjs.map → TextDemo.js.map} +0 -0
- /package/dist/cjs/{ThemeBuilderDemo.cjs.map → ThemeBuilderDemo.js.map} +0 -0
- /package/dist/cjs/{ThemeInverseDemo.cjs.map → ThemeInverseDemo.js.map} +0 -0
- /package/dist/cjs/{ToastDemo.cjs.map → ToastDemo.js.map} +0 -0
- /package/dist/cjs/{ToastDuplicateDemo.cjs.map → ToastDuplicateDemo.js.map} +0 -0
- /package/dist/cjs/{ToggleGroupDemo.cjs.map → ToggleGroupDemo.js.map} +0 -0
- /package/dist/cjs/{TokensDemo.cjs.map → TokensDemo.js.map} +0 -0
- /package/dist/cjs/{TooltipDemo.cjs.map → TooltipDemo.js.map} +0 -0
- /package/dist/cjs/{UpdateThemeDemo.cjs.map → UpdateThemeDemo.js.map} +0 -0
- /package/dist/cjs/{WebNativeImageDemo.cjs.map → WebNativeImageDemo.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{tamagui.config.cjs.map → tamagui.config.js.map} +0 -0
- /package/dist/cjs/{useOnIntersecting.cjs.map → useOnIntersecting.js.map} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
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 AccordionDemo_exports = {};
|
|
16
|
+
__export(AccordionDemo_exports, {
|
|
17
|
+
AccordionDemo: () => AccordionDemo
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(AccordionDemo_exports);
|
|
20
|
+
var import_lucide_icons = require("@tamagui/lucide-icons"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
function AccordionDemo() {
|
|
22
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion, { overflow: "hidden", width: "$20", type: "multiple", children: [
|
|
23
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion.Item, { value: "a1", children: [
|
|
24
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Trigger, { flexDirection: "row", justifyContent: "space-between", children: ({
|
|
25
|
+
open
|
|
26
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
27
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, { children: "1. Take a cold shower" }),
|
|
28
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Square, { animation: "quick", rotate: open ? "180deg" : "0deg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons.ChevronDown, { size: "$1" }) })
|
|
29
|
+
] }) }),
|
|
30
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.HeightAnimator, { animation: "medium", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Content, { animation: "medium", exitStyle: { opacity: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, { children: "Cold showers can help reduce inflammation, relieve pain, improve circulation, lower stress levels, and reduce muscle soreness and fatigue." }) }) })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Accordion.Item, { value: "a2", children: [
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Trigger, { flexDirection: "row", justifyContent: "space-between", children: ({
|
|
34
|
+
open
|
|
35
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, { children: "2. Eat 4 eggs" }),
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Square, { animation: "quick", rotate: open ? "180deg" : "0deg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons.ChevronDown, { size: "$1" }) })
|
|
38
|
+
] }) }),
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.HeightAnimator, { animation: "medium", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Accordion.Content, { animation: "medium", exitStyle: { opacity: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Paragraph, { children: "Eggs have been a dietary staple since time immemorial and there\u2019s good reason for their continued presence in our menus and meals." }) }) })
|
|
40
|
+
] })
|
|
41
|
+
] });
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=AccordionDemo.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
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 AddThemeDemo_exports = {};
|
|
24
|
+
__export(AddThemeDemo_exports, {
|
|
25
|
+
AddThemeDemo: () => AddThemeDemo
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(AddThemeDemo_exports);
|
|
28
|
+
var import_react = __toESM(require("react")), import_theme = require("@tamagui/theme"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
function AddThemeDemo() {
|
|
30
|
+
const [theme, setTheme] = import_react.default.useState();
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { alignItems: "center", space: !0, children: [
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.H3, { children: [
|
|
33
|
+
"Theme: ",
|
|
34
|
+
theme ?? "none"
|
|
35
|
+
] }),
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Theme, { name: theme ?? "red", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Square, { borderRadius: "$8", size: 100, backgroundColor: "$color" }) }),
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
|
+
import_tamagui.Button,
|
|
39
|
+
{
|
|
40
|
+
disabled: theme === "superblue",
|
|
41
|
+
onPress: () => {
|
|
42
|
+
(0, import_theme.addTheme)({
|
|
43
|
+
name: "superblue",
|
|
44
|
+
insertCSS: !0,
|
|
45
|
+
theme: {
|
|
46
|
+
background: "#000",
|
|
47
|
+
color: "blue"
|
|
48
|
+
}
|
|
49
|
+
}), setTheme("superblue");
|
|
50
|
+
},
|
|
51
|
+
children: "Add superblue theme"
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] });
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=AddThemeDemo.js.map
|
|
@@ -0,0 +1,68 @@
|
|
|
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 AlertDialogDemo_exports = {};
|
|
16
|
+
__export(AlertDialogDemo_exports, {
|
|
17
|
+
AlertDialogDemo: () => AlertDialogDemo
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(AlertDialogDemo_exports);
|
|
20
|
+
var import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
function AlertDialogDemo() {
|
|
22
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.AlertDialog, { native: !0, children: [
|
|
23
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Trigger, { asChild: !0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { children: "Show Alert" }) }),
|
|
24
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.AlertDialog.Portal, { children: [
|
|
25
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
26
|
+
import_tamagui.AlertDialog.Overlay,
|
|
27
|
+
{
|
|
28
|
+
animation: "quick",
|
|
29
|
+
opacity: 0.5,
|
|
30
|
+
enterStyle: { opacity: 0 },
|
|
31
|
+
exitStyle: { opacity: 0 }
|
|
32
|
+
},
|
|
33
|
+
"overlay"
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
36
|
+
import_tamagui.AlertDialog.Content,
|
|
37
|
+
{
|
|
38
|
+
bordered: !0,
|
|
39
|
+
elevate: !0,
|
|
40
|
+
animation: [
|
|
41
|
+
"quick",
|
|
42
|
+
{
|
|
43
|
+
opacity: {
|
|
44
|
+
overshootClamping: !0
|
|
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
|
+
x: 0,
|
|
51
|
+
scale: 1,
|
|
52
|
+
opacity: 1,
|
|
53
|
+
y: 0,
|
|
54
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { space: !0, children: [
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Title, { children: "Accept" }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Description, { children: "By pressing yes, you accept our terms and conditions." }),
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { gap: "$3", justifyContent: "flex-end", children: [
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Cancel, { asChild: !0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { children: "Cancel" }) }),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Action, { asChild: !0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: "active", children: "Accept" }) })
|
|
60
|
+
] })
|
|
61
|
+
] })
|
|
62
|
+
},
|
|
63
|
+
"content"
|
|
64
|
+
)
|
|
65
|
+
] })
|
|
66
|
+
] });
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=AlertDialogDemo.js.map
|
|
@@ -0,0 +1,99 @@
|
|
|
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 AnimationsDemo_exports = {};
|
|
16
|
+
__export(AnimationsDemo_exports, {
|
|
17
|
+
AnimationsDemo: () => AnimationsDemo,
|
|
18
|
+
positions: () => positions
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(AnimationsDemo_exports);
|
|
21
|
+
var import_logo = require("@tamagui/logo"), import_lucide_icons = require("@tamagui/lucide-icons"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
+
function AnimationsDemo(props) {
|
|
23
|
+
const [positionI, setPositionI] = (0, import_tamagui.useControllableState)({
|
|
24
|
+
strategy: "most-recent-wins",
|
|
25
|
+
prop: props.position,
|
|
26
|
+
defaultProp: 0
|
|
27
|
+
}), position = positions[positionI], onPress = (0, import_tamagui.useEvent)(() => {
|
|
28
|
+
setPositionI((x) => (x + 1) % positions.length);
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
32
|
+
import_tamagui.Square,
|
|
33
|
+
{
|
|
34
|
+
animation: props.animation || "bouncy",
|
|
35
|
+
animateOnly: ["transform"],
|
|
36
|
+
onPress,
|
|
37
|
+
size: 104,
|
|
38
|
+
borderColor: "$borderColor",
|
|
39
|
+
borderWidth: 1,
|
|
40
|
+
borderRadius: "$9",
|
|
41
|
+
backgroundColor: "$color9",
|
|
42
|
+
hoverStyle: {
|
|
43
|
+
scale: 1.5
|
|
44
|
+
},
|
|
45
|
+
pressStyle: {
|
|
46
|
+
scale: 0.9
|
|
47
|
+
},
|
|
48
|
+
...position,
|
|
49
|
+
children: props.children || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_logo.LogoIcon, { downscale: 0.75 })
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
import_tamagui.Button,
|
|
54
|
+
{
|
|
55
|
+
position: "absolute",
|
|
56
|
+
bottom: 20,
|
|
57
|
+
left: 20,
|
|
58
|
+
icon: import_lucide_icons.Play,
|
|
59
|
+
theme: props.tint,
|
|
60
|
+
size: "$5",
|
|
61
|
+
circular: !0,
|
|
62
|
+
onPress
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] });
|
|
66
|
+
}
|
|
67
|
+
const positions = [
|
|
68
|
+
{
|
|
69
|
+
x: 0,
|
|
70
|
+
y: 0,
|
|
71
|
+
scale: 1,
|
|
72
|
+
rotate: "0deg"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
x: -50,
|
|
76
|
+
y: -50,
|
|
77
|
+
scale: 0.5,
|
|
78
|
+
rotate: "-45deg",
|
|
79
|
+
hoverStyle: {
|
|
80
|
+
scale: 0.6
|
|
81
|
+
},
|
|
82
|
+
pressStyle: {
|
|
83
|
+
scale: 0.4
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
x: 50,
|
|
88
|
+
y: 50,
|
|
89
|
+
scale: 1,
|
|
90
|
+
rotate: "180deg",
|
|
91
|
+
hoverStyle: {
|
|
92
|
+
scale: 1.1
|
|
93
|
+
},
|
|
94
|
+
pressStyle: {
|
|
95
|
+
scale: 0.9
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
];
|
|
99
|
+
//# sourceMappingURL=AnimationsDemo.js.map
|
|
@@ -0,0 +1,55 @@
|
|
|
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 AnimationsEnterDemo_exports = {};
|
|
24
|
+
__export(AnimationsEnterDemo_exports, {
|
|
25
|
+
AnimationsEnterDemo: () => AnimationsEnterDemo
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(AnimationsEnterDemo_exports);
|
|
28
|
+
var import_react = __toESM(require("react")), import_logo = require("@tamagui/logo"), import_tamagui = require("tamagui"), import_useOnIntersecting = require("./useOnIntersecting"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
function AnimationsEnterDemo(props) {
|
|
30
|
+
const ref = import_react.default.useRef(null), [key, setKey] = import_react.default.useState(0);
|
|
31
|
+
return import_tamagui.isWeb && !(0, import_useOnIntersecting.useIsIntersecting)(ref, { once: !0 }) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, { ref }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
33
|
+
import_tamagui.Square,
|
|
34
|
+
{
|
|
35
|
+
enterStyle: {
|
|
36
|
+
scale: 1.5,
|
|
37
|
+
y: -10,
|
|
38
|
+
opacity: 0
|
|
39
|
+
},
|
|
40
|
+
animation: "bouncy",
|
|
41
|
+
elevation: "$4",
|
|
42
|
+
size: 110,
|
|
43
|
+
opacity: 1,
|
|
44
|
+
scale: 1,
|
|
45
|
+
y: 0,
|
|
46
|
+
backgroundColor: "$pink10",
|
|
47
|
+
borderRadius: "$9",
|
|
48
|
+
children: props.children ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_logo.LogoIcon, { downscale: 0.75 })
|
|
49
|
+
},
|
|
50
|
+
key
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { size: "$3", marginTop: "$4", onPress: () => setKey(Math.random()), children: "Re-mount" })
|
|
53
|
+
] });
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=AnimationsEnterDemo.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
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 AnimationsHoverDemo_exports = {};
|
|
16
|
+
__export(AnimationsHoverDemo_exports, {
|
|
17
|
+
AnimationsHoverDemo: () => AnimationsHoverDemo
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(AnimationsHoverDemo_exports);
|
|
20
|
+
var import_logo = require("@tamagui/logo"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
function AnimationsHoverDemo() {
|
|
22
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
23
|
+
import_tamagui.Square,
|
|
24
|
+
{
|
|
25
|
+
borderColor: "$borderColor",
|
|
26
|
+
animation: "bouncy",
|
|
27
|
+
elevation: "$4",
|
|
28
|
+
backgroundColor: "$color9",
|
|
29
|
+
size: 104,
|
|
30
|
+
borderRadius: "$9",
|
|
31
|
+
hoverStyle: {
|
|
32
|
+
scale: 1.2
|
|
33
|
+
},
|
|
34
|
+
pressStyle: {
|
|
35
|
+
scale: 0.9
|
|
36
|
+
},
|
|
37
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_logo.LogoIcon, { downscale: 0.75 })
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=AnimationsHoverDemo.js.map
|
|
@@ -0,0 +1,102 @@
|
|
|
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 AnimationsPresenceDemo_exports = {};
|
|
24
|
+
__export(AnimationsPresenceDemo_exports, {
|
|
25
|
+
AnimationsPresenceDemo: () => AnimationsPresenceDemo,
|
|
26
|
+
images: () => images
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(AnimationsPresenceDemo_exports);
|
|
29
|
+
var import_react = __toESM(require("react")), import_animate_presence = require("@tamagui/animate-presence"), import_lucide_icons = require("@tamagui/lucide-icons"), import_tamagui = require("tamagui"), import_photo1 = __toESM(require("../../public/photo1.jpg")), import_photo2 = __toESM(require("../../public/photo2.jpg")), import_photo3 = __toESM(require("../../public/photo3.jpg")), import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
const images = [import_photo1.default, import_photo2.default, import_photo3.default].map((x) => x.src || x), GalleryItem = (0, import_tamagui.styled)(import_tamagui.YStack, {
|
|
31
|
+
zIndex: 1,
|
|
32
|
+
x: 0,
|
|
33
|
+
opacity: 1,
|
|
34
|
+
fullscreen: !0,
|
|
35
|
+
variants: {
|
|
36
|
+
// 1 = right, 0 = nowhere, -1 = left
|
|
37
|
+
going: {
|
|
38
|
+
":number": (going) => ({
|
|
39
|
+
enterStyle: {
|
|
40
|
+
x: going > 0 ? 1e3 : -1e3,
|
|
41
|
+
opacity: 0
|
|
42
|
+
},
|
|
43
|
+
exitStyle: {
|
|
44
|
+
zIndex: 0,
|
|
45
|
+
x: going < 0 ? 1e3 : -1e3,
|
|
46
|
+
opacity: 0
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}), wrap = (min, max, v) => {
|
|
52
|
+
const rangeSize = max - min;
|
|
53
|
+
return ((v - min) % rangeSize + rangeSize) % rangeSize + min;
|
|
54
|
+
};
|
|
55
|
+
function AnimationsPresenceDemo() {
|
|
56
|
+
const [[page, going], setPage] = import_react.default.useState([0, 0]), imageIndex = wrap(0, images.length, page), paginate = (going2) => {
|
|
57
|
+
setPage([page + going2, going2]);
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
60
|
+
import_tamagui.XStack,
|
|
61
|
+
{
|
|
62
|
+
overflow: "hidden",
|
|
63
|
+
backgroundColor: "#000",
|
|
64
|
+
position: "relative",
|
|
65
|
+
height: 300,
|
|
66
|
+
width: "100%",
|
|
67
|
+
alignItems: "center",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence, { initial: !1, custom: { going }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(GalleryItem, { animation: "slow", going, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Image, { source: { uri: images[imageIndex], width: 820, height: 300 } }) }, page) }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
71
|
+
import_tamagui.Button,
|
|
72
|
+
{
|
|
73
|
+
accessibilityLabel: "Carousel left",
|
|
74
|
+
icon: import_lucide_icons.ArrowLeft,
|
|
75
|
+
size: "$5",
|
|
76
|
+
position: "absolute",
|
|
77
|
+
left: "$4",
|
|
78
|
+
circular: !0,
|
|
79
|
+
elevate: !0,
|
|
80
|
+
onPress: () => paginate(-1),
|
|
81
|
+
zi: 100
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
import_tamagui.Button,
|
|
86
|
+
{
|
|
87
|
+
accessibilityLabel: "Carousel right",
|
|
88
|
+
icon: import_lucide_icons.ArrowRight,
|
|
89
|
+
size: "$5",
|
|
90
|
+
position: "absolute",
|
|
91
|
+
right: "$4",
|
|
92
|
+
circular: !0,
|
|
93
|
+
elevate: !0,
|
|
94
|
+
onPress: () => paginate(1),
|
|
95
|
+
zi: 100
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=AnimationsPresenceDemo.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
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 AnimationsTimingDemo_exports = {};
|
|
16
|
+
__export(AnimationsTimingDemo_exports, {
|
|
17
|
+
AnimationsTimingDemo: () => AnimationsTimingDemo
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(AnimationsTimingDemo_exports);
|
|
20
|
+
var import_logo = require("@tamagui/logo"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
function AnimationsTimingDemo() {
|
|
22
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
23
|
+
import_tamagui.Square,
|
|
24
|
+
{
|
|
25
|
+
backgroundColor: "$pink10",
|
|
26
|
+
animation: "100ms",
|
|
27
|
+
elevation: "$4",
|
|
28
|
+
size: 110,
|
|
29
|
+
borderRadius: "$9",
|
|
30
|
+
hoverStyle: {
|
|
31
|
+
scale: 1.2
|
|
32
|
+
},
|
|
33
|
+
pressStyle: {
|
|
34
|
+
scale: 0.9
|
|
35
|
+
},
|
|
36
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_logo.LogoIcon, { downscale: 0.75 })
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=AnimationsTimingDemo.js.map
|
|
@@ -0,0 +1,45 @@
|
|
|
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 AvatarDemo_exports = {};
|
|
16
|
+
__export(AvatarDemo_exports, {
|
|
17
|
+
AvatarDemo: () => AvatarDemo
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(AvatarDemo_exports);
|
|
20
|
+
var import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
function AvatarDemo() {
|
|
22
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { alignItems: "center", gap: "$6", children: [
|
|
23
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Avatar, { circular: !0, size: "$10", children: [
|
|
24
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
25
|
+
import_tamagui.Avatar.Image,
|
|
26
|
+
{
|
|
27
|
+
accessibilityLabel: "Cam",
|
|
28
|
+
src: "https://images.unsplash.com/photo-1548142813-c348350df52b?&w=150&h=150&dpr=2&q=80"
|
|
29
|
+
}
|
|
30
|
+
),
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Avatar.Fallback, { backgroundColor: "$blue10" })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.Avatar, { circular: !0, size: "$8", children: [
|
|
34
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
35
|
+
import_tamagui.Avatar.Image,
|
|
36
|
+
{
|
|
37
|
+
accessibilityLabel: "Nate Wienert",
|
|
38
|
+
src: "https://images.unsplash.com/photo-1531384441138-2736e62e0919?&w=100&h=100&dpr=2&q=80"
|
|
39
|
+
}
|
|
40
|
+
),
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Avatar.Fallback, { delayMs: 600, backgroundColor: "$blue10" })
|
|
42
|
+
] })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=AvatarDemo.js.map
|
|
@@ -0,0 +1,57 @@
|
|
|
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 BuildAButtonDemo_exports = {};
|
|
16
|
+
__export(BuildAButtonDemo_exports, {
|
|
17
|
+
BuildAButtonDemo: () => BuildAButtonDemo
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(BuildAButtonDemo_exports);
|
|
20
|
+
var import_lucide_icons = require("@tamagui/lucide-icons"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
const outlined = {
|
|
22
|
+
backgroundColor: "transparent",
|
|
23
|
+
borderWidth: 2,
|
|
24
|
+
borderColor: "$background",
|
|
25
|
+
borderRadius: "$10",
|
|
26
|
+
hoverStyle: {
|
|
27
|
+
backgroundColor: "transparent",
|
|
28
|
+
borderColor: "$backgroundPress"
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
function BuildAButtonDemo() {
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, { fullscreen: !0, ov: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { mah: 200, y: -100, x: -40, rotate: "-10deg", children: [
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { y: 35, size: "$2", ...outlined, subTheme: "alt1", borderWidth: 1 }),
|
|
34
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { y: 30 }),
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { y: -50, ...outlined }),
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { ...outlined, icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons.Hand, {}) }),
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { size: "$6", subTheme: "alt2" }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { size: "$6", subTheme: "alt2", ...outlined }),
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { size: "$8", subTheme: "alt2", iconAfter: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_icons.Drumstick, {}), ...outlined }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { size: "$10", subTheme: "alt1" }),
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonCol, { size: "$8", subTheme: "alt2", ...outlined, borderRadius: 0 })
|
|
42
|
+
] }) });
|
|
43
|
+
}
|
|
44
|
+
function ButtonCol(props) {
|
|
45
|
+
const subTheme = props.subTheme ? `_${props.subTheme}` : "";
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { padding: "$2", gap: "$3", children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: props.subTheme, ...props, children: "Hello" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: "orange" + subTheme, ...props, children: "Hello" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: "yellow" + subTheme, ...props, children: "Hello" }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: "green" + subTheme, ...props, children: "Hello" }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: "blue" + subTheme, ...props, children: "Hello" }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: "purple" + subTheme, ...props, children: "Hello" }),
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: "pink" + subTheme, ...props, children: "Hello" }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { theme: "red" + subTheme, ...props, children: "Hello" })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=BuildAButtonDemo.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
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 ButtonDemo_exports = {};
|
|
16
|
+
__export(ButtonDemo_exports, {
|
|
17
|
+
ButtonDemo: () => ButtonDemo
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(ButtonDemo_exports);
|
|
20
|
+
var import_lucide_icons = require("@tamagui/lucide-icons"), import_tamagui = require("tamagui"), import_jsx_runtime = require("react/jsx-runtime");
|
|
21
|
+
function ButtonDemo(props) {
|
|
22
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, { padding: "$3", gap: "$3", ...props, children: [
|
|
23
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { children: "Plain" }),
|
|
24
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { alignSelf: "center", icon: import_lucide_icons.Airplay, size: "$6", children: "Large" }),
|
|
25
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { gap: "$2", justifyContent: "center", children: [
|
|
26
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { size: "$3", theme: "active", children: "Active" }),
|
|
27
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { size: "$3", variant: "outlined", children: "Outlined" })
|
|
28
|
+
] }),
|
|
29
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XStack, { gap: "$2", children: [
|
|
30
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { themeInverse: !0, size: "$3", children: "Inverse" }),
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { iconAfter: import_lucide_icons.Activity, size: "$3", children: "iconAfter" })
|
|
32
|
+
] }),
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.XGroup, { children: [
|
|
34
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XGroup.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { width: "50%", size: "$2", disabled: !0, opacity: 0.5, children: "disabled" }) }),
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XGroup.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Button, { width: "50%", size: "$2", chromeless: !0, children: "chromeless" }) })
|
|
36
|
+
] })
|
|
37
|
+
] });
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=ButtonDemo.js.map
|