@tamagui/demos 1.0.1-beta.75 → 1.0.1-beta.76
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/PopoverDemo.js +17 -20
- package/dist/cjs/PopoverDemo.js.map +2 -2
- package/dist/esm/AnimationsDemo.js +19 -4
- package/dist/esm/AnimationsDemo.js.map +1 -1
- package/dist/esm/ButtonDemo.js +19 -4
- package/dist/esm/ButtonDemo.js.map +1 -1
- package/dist/esm/CardDemo.js +19 -4
- package/dist/esm/CardDemo.js.map +1 -1
- package/dist/esm/PopoverDemo.js +39 -11
- package/dist/esm/PopoverDemo.js.map +2 -2
- package/dist/esm/SliderDemo.js +33 -5
- package/dist/esm/SliderDemo.js.map +1 -1
- package/dist/esm/TamaguiLogo.js +56 -22
- package/dist/esm/TamaguiLogo.js.map +1 -1
- package/dist/esm/TooltipDemo.js +31 -4
- package/dist/esm/TooltipDemo.js.map +1 -1
- package/dist/jsx/PopoverDemo.js +4 -4
- package/package.json +5 -5
- package/src/PopoverDemo.tsx +6 -5
- package/types/PopoverDemo.d.ts.map +1 -1
package/dist/cjs/PopoverDemo.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
7
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -42,7 +40,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
42
40
|
}
|
|
43
41
|
return to;
|
|
44
42
|
};
|
|
45
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
46
43
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
47
44
|
var PopoverDemo_exports = {};
|
|
48
45
|
__export(PopoverDemo_exports, {
|
|
@@ -51,29 +48,28 @@ __export(PopoverDemo_exports, {
|
|
|
51
48
|
});
|
|
52
49
|
module.exports = __toCommonJS(PopoverDemo_exports);
|
|
53
50
|
var import_feather_icons = require("@tamagui/feather-icons");
|
|
54
|
-
var import_react = __toESM(require("react"));
|
|
55
51
|
var import_tamagui = require("tamagui");
|
|
56
52
|
function PopoverDemo() {
|
|
57
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ React.createElement(import_tamagui.XStack, {
|
|
58
54
|
space: "$2"
|
|
59
|
-
}, /* @__PURE__ */
|
|
55
|
+
}, /* @__PURE__ */ React.createElement(Demo, {
|
|
60
56
|
placement: "left",
|
|
61
57
|
Icon: import_feather_icons.ChevronLeft
|
|
62
|
-
}), /* @__PURE__ */
|
|
58
|
+
}), /* @__PURE__ */ React.createElement(Demo, {
|
|
63
59
|
placement: "bottom",
|
|
64
60
|
Icon: import_feather_icons.ChevronDown
|
|
65
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ React.createElement(Demo, {
|
|
66
62
|
placement: "right",
|
|
67
63
|
Icon: import_feather_icons.ChevronRight
|
|
68
64
|
}));
|
|
69
65
|
}
|
|
70
66
|
function Demo(_a) {
|
|
71
67
|
var _b = _a, { Icon } = _b, props = __objRest(_b, ["Icon"]);
|
|
72
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ React.createElement(import_tamagui.Popover, __spreadValues({
|
|
73
69
|
modal: true
|
|
74
|
-
}, props), /* @__PURE__ */
|
|
70
|
+
}, props), /* @__PURE__ */ React.createElement(import_tamagui.Popover.Trigger, null, /* @__PURE__ */ React.createElement(import_tamagui.Button, {
|
|
75
71
|
icon: Icon
|
|
76
|
-
})), /* @__PURE__ */
|
|
72
|
+
})), /* @__PURE__ */ React.createElement(import_tamagui.Popover.Content, {
|
|
77
73
|
elevation: "$4",
|
|
78
74
|
enterStyle: { x: 0, y: -10, o: 0 },
|
|
79
75
|
exitStyle: { x: 0, y: -10, o: 0 },
|
|
@@ -82,16 +78,17 @@ function Demo(_a) {
|
|
|
82
78
|
x: 0,
|
|
83
79
|
y: 0,
|
|
84
80
|
o: 1,
|
|
85
|
-
animation: "bouncy"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
81
|
+
animation: "bouncy",
|
|
82
|
+
elevate: true
|
|
83
|
+
}, /* @__PURE__ */ React.createElement(import_tamagui.Popover.Arrow, null), /* @__PURE__ */ React.createElement(import_tamagui.YStack, {
|
|
84
|
+
p: "$3"
|
|
85
|
+
}, /* @__PURE__ */ React.createElement(import_tamagui.XStack, {
|
|
86
|
+
space: "$3"
|
|
87
|
+
}, /* @__PURE__ */ React.createElement(import_tamagui.Label, {
|
|
88
|
+
size: "$3",
|
|
92
89
|
htmlFor: "name"
|
|
93
|
-
}, "Name"), /* @__PURE__ */
|
|
94
|
-
size: "$
|
|
90
|
+
}, "Name"), /* @__PURE__ */ React.createElement(import_tamagui.Input, {
|
|
91
|
+
size: "$3",
|
|
95
92
|
id: "name"
|
|
96
93
|
})))));
|
|
97
94
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/PopoverDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { ChevronDown, ChevronLeft, ChevronRight } from '@tamagui/feather-icons'\nimport
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { ChevronDown, ChevronLeft, ChevronRight } from '@tamagui/feather-icons'\nimport { Button, Input, Label, Popover, PopoverProps, XStack, YStack } from 'tamagui'\n\nexport default function PopoverDemo() {\n return (\n <XStack space=\"$2\">\n <Demo placement=\"left\" Icon={ChevronLeft} />\n <Demo placement=\"bottom\" Icon={ChevronDown} />\n <Demo placement=\"right\" Icon={ChevronRight} />\n </XStack>\n )\n}\n\nexport function Demo({ Icon, ...props }: PopoverProps & { Icon?: any }) {\n return (\n <Popover modal {...props}>\n <Popover.Trigger>\n <Button icon={Icon} />\n </Popover.Trigger>\n <Popover.Content\n elevation=\"$4\"\n enterStyle={{ x: 0, y: -10, o: 0 }}\n exitStyle={{ x: 0, y: -10, o: 0 }}\n p=\"$2\"\n br=\"$4\"\n x={0}\n y={0}\n o={1}\n animation=\"bouncy\"\n elevate\n >\n <Popover.Arrow />\n\n <YStack p=\"$3\">\n <XStack space=\"$3\">\n <Label size=\"$3\" htmlFor=\"name\">\n Name\n </Label>\n <Input size=\"$3\" id=\"name\" />\n </XStack>\n </YStack>\n </Popover.Content>\n </Popover>\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAuD;AACvD,qBAA4E;AAE7D,uBAAuB;AACpC,SACE,oCAAC;AAAA,IAAO,OAAM;AAAA,KACZ,oCAAC;AAAA,IAAK,WAAU;AAAA,IAAO,MAAM;AAAA,GAAa,GAC1C,oCAAC;AAAA,IAAK,WAAU;AAAA,IAAS,MAAM;AAAA,GAAa,GAC5C,oCAAC;AAAA,IAAK,WAAU;AAAA,IAAQ,MAAM;AAAA,GAAc,CAC9C;AAEJ;AAEO,cAAc,IAAmD;AAAnD,eAAE,WAAF,IAAW,kBAAX,IAAW,CAAT;AACrB,SACE,oCAAC;AAAA,IAAQ,OAAK;AAAA,KAAK,QACjB,oCAAC,uBAAQ,SAAR,MACC,oCAAC;AAAA,IAAO,MAAM;AAAA,GAAM,CACtB,GACA,oCAAC,uBAAQ,SAAR;AAAA,IACC,WAAU;AAAA,IACV,YAAY,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,EAAE;AAAA,IACjC,WAAW,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,EAAE;AAAA,IAChC,GAAE;AAAA,IACF,IAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,WAAU;AAAA,IACV,SAAO;AAAA,KAEP,oCAAC,uBAAQ,OAAR,IAAc,GAEf,oCAAC;AAAA,IAAO,GAAE;AAAA,KACR,oCAAC;AAAA,IAAO,OAAM;AAAA,KACZ,oCAAC;AAAA,IAAM,MAAK;AAAA,IAAK,SAAQ;AAAA,KAAO,MAEhC,GACA,oCAAC;AAAA,IAAM,MAAK;AAAA,IAAK,IAAG;AAAA,GAAO,CAC7B,CACF,CACF,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
import { Play } from "@tamagui/feather-icons";
|
|
2
18
|
import React from "react";
|
|
3
19
|
import { Button, Square, useControllableState } from "tamagui";
|
|
@@ -14,7 +30,7 @@ var AnimationsDemo_default = (props) => {
|
|
|
14
30
|
return (x + to) % positions.length;
|
|
15
31
|
});
|
|
16
32
|
};
|
|
17
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Square, {
|
|
33
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Square, __spreadValues({
|
|
18
34
|
focusable: false,
|
|
19
35
|
animation: props.animation || "bouncy",
|
|
20
36
|
onPress: () => next(),
|
|
@@ -26,9 +42,8 @@ var AnimationsDemo_default = (props) => {
|
|
|
26
42
|
},
|
|
27
43
|
pressStyle: {
|
|
28
44
|
scale: 0.9
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
}, props.children || /* @__PURE__ */ React.createElement(LogoIcon, {
|
|
45
|
+
}
|
|
46
|
+
}, position), props.children || /* @__PURE__ */ React.createElement(LogoIcon, {
|
|
32
47
|
downscale: 0.75
|
|
33
48
|
})), /* @__PURE__ */ React.createElement(Button, {
|
|
34
49
|
pos: "absolute",
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/AnimationsDemo.tsx"],
|
|
4
4
|
"sourcesContent": ["import { Play } from '@tamagui/feather-icons'\nimport React from 'react'\nimport { Button, Square, useControllableState } from 'tamagui'\n\nimport { LogoIcon } from './TamaguiLogo'\n\nexport default (props) => {\n const [positionI, setPositionI] = useControllableState({\n strategy: 'most-recent-wins',\n prop: props.position,\n defaultProp: 0,\n })\n const position = positions[positionI]\n const next = (to = 1) => {\n setPositionI((x) => {\n return (x + to) % positions.length\n })\n }\n\n return (\n <>\n <Square\n focusable={false}\n animation={props.animation || 'bouncy'}\n onPress={() => next()}\n size={110}\n bc=\"$pink10\"\n br=\"$9\"\n hoverStyle={{\n scale: 1.1,\n }}\n pressStyle={{\n scale: 0.9,\n }}\n {...position}\n >\n {props.children || <LogoIcon downscale={0.75} />}\n </Square>\n\n <Button\n pos=\"absolute\"\n b={20}\n l={20}\n icon={Play}\n theme={props.tint}\n size=\"$5\"\n circular\n onPress={() => next()}\n />\n </>\n )\n}\n\nexport const positions = [\n {\n x: 0,\n y: 0,\n scale: 1,\n rotate: '0deg',\n },\n {\n x: -50,\n y: -50,\n scale: 0.5,\n rotate: '-45deg',\n hoverStyle: {\n scale: 0.6,\n },\n pressStyle: {\n scale: 0.4,\n },\n },\n {\n x: 50,\n y: 50,\n scale: 1,\n rotate: '180deg',\n hoverStyle: {\n scale: 1.1,\n },\n pressStyle: {\n scale: 0.9,\n },\n },\n]\n"],
|
|
5
|
-
"mappings": "AAAA;AACA;AACA;AAEA;AAEA,IAAO,yBAAQ,CAAC,UAAU;AACxB,QAAM,CAAC,WAAW,gBAAgB,qBAAqB;AAAA,IACrD,UAAU;AAAA,IACV,MAAM,MAAM;AAAA,IACZ,aAAa;AAAA,EACf,CAAC;AACD,QAAM,WAAW,UAAU;AAC3B,QAAM,OAAO,CAAC,KAAK,MAAM;AACvB,iBAAa,CAAC,MAAM;AAClB,aAAQ,KAAI,MAAM,UAAU;AAAA,IAC9B,CAAC;AAAA,EACH;AAEA,SACE,0DACE,oCAAC;AAAA,IACC,WAAW;AAAA,IACX,WAAW,MAAM,aAAa;AAAA,IAC9B,SAAS,MAAM,KAAK;AAAA,IACpB,MAAM;AAAA,IACN,IAAG;AAAA,IACH,IAAG;AAAA,IACH,YAAY;AAAA,MACV,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,OAAO;AAAA,IACT;AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAEA;AAEA,IAAO,yBAAQ,CAAC,UAAU;AACxB,QAAM,CAAC,WAAW,gBAAgB,qBAAqB;AAAA,IACrD,UAAU;AAAA,IACV,MAAM,MAAM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@ -1,12 +1,27 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
import { Activity, Airplay } from "@tamagui/feather-icons";
|
|
2
18
|
import React from "react";
|
|
3
19
|
import { Button, Group, XStack, YStack } from "tamagui";
|
|
4
20
|
function ButtonDemo(props) {
|
|
5
|
-
return /* @__PURE__ */ React.createElement(YStack, {
|
|
21
|
+
return /* @__PURE__ */ React.createElement(YStack, __spreadValues({
|
|
6
22
|
p: "$3",
|
|
7
|
-
space: true
|
|
8
|
-
|
|
9
|
-
}, /* @__PURE__ */ React.createElement(Button, null, "Plain"), /* @__PURE__ */ React.createElement(Button, {
|
|
23
|
+
space: true
|
|
24
|
+
}, props), /* @__PURE__ */ React.createElement(Button, null, "Plain"), /* @__PURE__ */ React.createElement(Button, {
|
|
10
25
|
als: "center",
|
|
11
26
|
icon: Airplay,
|
|
12
27
|
size: "$6"
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ButtonDemo.tsx"],
|
|
4
4
|
"sourcesContent": ["import { Activity, Airplay } from '@tamagui/feather-icons'\nimport React from 'react'\nimport { Button, Group, XStack, YStack } from 'tamagui'\n\nexport default function ButtonDemo(props) {\n return (\n <YStack p=\"$3\" space {...props}>\n <Button>Plain</Button>\n <Button als=\"center\" icon={Airplay} size=\"$6\">\n Large\n </Button>\n <Group>\n <Button w=\"50%\" size=\"$3\" br={0} theme=\"alt2\">\n Alt2\n </Button>\n <Button w=\"50%\" size=\"$3\" br={0} theme=\"yellow\">\n Yellow\n </Button>\n </Group>\n <XStack space=\"$2\">\n <Button themeInverse size=\"$3\">\n Small Inverse\n </Button>\n <Button iconAfter={Activity} size=\"$3\">\n After\n </Button>\n </XStack>\n <Group>\n <Button w=\"50%\" br={0} size=\"$2\" disabled>\n disabled\n </Button>\n <Button w=\"50%\" br={0} size=\"$2\" chromeless>\n chromeless\n </Button>\n </Group>\n </YStack>\n )\n}\n"],
|
|
5
|
-
"mappings": "AAAA;AACA;AACA;AAEe,oBAAoB,OAAO;AACxC,SACE,oCAAC;AAAA,IAAO,GAAE;AAAA,IAAK,OAAK;AAAA,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAEe,oBAAoB,OAAO;AACxC,SACE,oCAAC;AAAA,IAAO,GAAE;AAAA,IAAK,OAAK;AAAA,KAAK,QACvB,oCAAC,cAAO,OAAK,GACb,oCAAC;AAAA,IAAO,KAAI;AAAA,IAAS,MAAM;AAAA,IAAS,MAAK;AAAA,KAAK,OAE9C,GACA,oCAAC,aACC,oCAAC;AAAA,IAAO,GAAE;AAAA,IAAM,MAAK;AAAA,IAAK,IAAI;AAAA,IAAG,OAAM;AAAA,KAAO,MAE9C,GACA,oCAAC;AAAA,IAAO,GAAE;AAAA,IAAM,MAAK;AAAA,IAAK,IAAI;AAAA,IAAG,OAAM;AAAA,KAAS,QAEhD,CACF,GACA,oCAAC;AAAA,IAAO,OAAM;AAAA,KACZ,oCAAC;AAAA,IAAO,cAAY;AAAA,IAAC,MAAK;AAAA,KAAK,eAE/B,GACA,oCAAC;AAAA,IAAO,WAAW;AAAA,IAAU,MAAK;AAAA,KAAK,OAEvC,CACF,GACA,oCAAC,aACC,oCAAC;AAAA,IAAO,GAAE;AAAA,IAAM,IAAI;AAAA,IAAG,MAAK;AAAA,IAAK,UAAQ;AAAA,KAAC,UAE1C,GACA,oCAAC;AAAA,IAAO,GAAE;AAAA,IAAM,IAAI;AAAA,IAAG,MAAK;AAAA,IAAK,YAAU;AAAA,KAAC,YAE5C,CACF,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/CardDemo.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
import React from "react";
|
|
2
18
|
import { Button, Card, H2, Image, Paragraph, XStack } from "tamagui";
|
|
3
19
|
import camera from "../../public/camera.jpg";
|
|
@@ -21,13 +37,12 @@ function CardDemo() {
|
|
|
21
37
|
}));
|
|
22
38
|
}
|
|
23
39
|
function DemoCard(props) {
|
|
24
|
-
return /* @__PURE__ */ React.createElement(Card, {
|
|
40
|
+
return /* @__PURE__ */ React.createElement(Card, __spreadValues({
|
|
25
41
|
theme: "dark",
|
|
26
42
|
elevate: true,
|
|
27
43
|
size: "$4",
|
|
28
|
-
bordered: true
|
|
29
|
-
|
|
30
|
-
}, /* @__PURE__ */ React.createElement(Card.Header, {
|
|
44
|
+
bordered: true
|
|
45
|
+
}, props), /* @__PURE__ */ React.createElement(Card.Header, {
|
|
31
46
|
padded: true
|
|
32
47
|
}, /* @__PURE__ */ React.createElement(H2, null, "Sony A7IV"), /* @__PURE__ */ React.createElement(Paragraph, {
|
|
33
48
|
theme: "alt2"
|
package/dist/esm/CardDemo.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/CardDemo.tsx"],
|
|
4
4
|
"sourcesContent": ["import React from 'react'\nimport { Button, Card, CardProps, H2, H3, Image, Paragraph, XStack } from 'tamagui'\n\n// @ts-ignore\nimport camera from '../../public/camera.jpg'\n\nexport default function CardDemo() {\n return (\n <XStack $sm={{ flexDirection: 'column' }} px=\"$4\" space>\n <DemoCard\n animation=\"bouncy\"\n size=\"$4\"\n w={250}\n h={300}\n scale={0.9}\n hoverStyle={{ scale: 0.925 }}\n pressStyle={{ scale: 0.875 }}\n />\n <DemoCard size=\"$5\" w={250} h={300} />\n </XStack>\n )\n}\n\nfunction DemoCard(props: CardProps) {\n return (\n <Card theme=\"dark\" elevate size=\"$4\" bordered {...props}>\n <Card.Header padded>\n <H2>Sony A7IV</H2>\n <Paragraph theme=\"alt2\">Now available</Paragraph>\n </Card.Header>\n <Card.Footer padded>\n <XStack f={1} />\n <Button br=\"$10\">Purchase</Button>\n </Card.Footer>\n <Card.Background>\n <Image pos=\"absolute\" width={300} height={500} resizeMode=\"cover\" src={camera.src} />\n </Card.Background>\n </Card>\n )\n}\n"],
|
|
5
|
-
"mappings": "AAAA;AACA;AAGA;AAEe,oBAAoB;AACjC,SACE,oCAAC;AAAA,IAAO,KAAK,EAAE,eAAe,SAAS;AAAA,IAA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AAO,IAAG;AAAA,KAAM,UAAQ,CAC3B,GACA,oCAAC,KAAK,YAAL,MACC,oCAAC;AAAA,IAAM,KAAI;AAAA,IAAW,OAAO;AAAA,IAAK,QAAQ;AAAA,IAAK,YAAW;AAAA,IAAQ,KAAK,OAAO;AAAA,GAAK,CACrF,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/PopoverDemo.js
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
1
29
|
import { ChevronDown, ChevronLeft, ChevronRight } from "@tamagui/feather-icons";
|
|
2
|
-
import React from "react";
|
|
3
30
|
import { Button, Input, Label, Popover, XStack, YStack } from "tamagui";
|
|
4
31
|
function PopoverDemo() {
|
|
5
32
|
return /* @__PURE__ */ React.createElement(XStack, {
|
|
@@ -15,11 +42,11 @@ function PopoverDemo() {
|
|
|
15
42
|
Icon: ChevronRight
|
|
16
43
|
}));
|
|
17
44
|
}
|
|
18
|
-
function Demo(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, /* @__PURE__ */ React.createElement(Popover.Trigger, null, /* @__PURE__ */ React.createElement(Button, {
|
|
45
|
+
function Demo(_a) {
|
|
46
|
+
var _b = _a, { Icon } = _b, props = __objRest(_b, ["Icon"]);
|
|
47
|
+
return /* @__PURE__ */ React.createElement(Popover, __spreadValues({
|
|
48
|
+
modal: true
|
|
49
|
+
}, props), /* @__PURE__ */ React.createElement(Popover.Trigger, null, /* @__PURE__ */ React.createElement(Button, {
|
|
23
50
|
icon: Icon
|
|
24
51
|
})), /* @__PURE__ */ React.createElement(Popover.Content, {
|
|
25
52
|
elevation: "$4",
|
|
@@ -30,16 +57,17 @@ function Demo({ Icon, ...props }) {
|
|
|
30
57
|
x: 0,
|
|
31
58
|
y: 0,
|
|
32
59
|
o: 1,
|
|
33
|
-
animation: "bouncy"
|
|
60
|
+
animation: "bouncy",
|
|
61
|
+
elevate: true
|
|
34
62
|
}, /* @__PURE__ */ React.createElement(Popover.Arrow, null), /* @__PURE__ */ React.createElement(YStack, {
|
|
35
|
-
p: "$
|
|
63
|
+
p: "$3"
|
|
36
64
|
}, /* @__PURE__ */ React.createElement(XStack, {
|
|
37
|
-
space: "$
|
|
65
|
+
space: "$3"
|
|
38
66
|
}, /* @__PURE__ */ React.createElement(Label, {
|
|
39
|
-
size: "$
|
|
67
|
+
size: "$3",
|
|
40
68
|
htmlFor: "name"
|
|
41
69
|
}, "Name"), /* @__PURE__ */ React.createElement(Input, {
|
|
42
|
-
size: "$
|
|
70
|
+
size: "$3",
|
|
43
71
|
id: "name"
|
|
44
72
|
})))));
|
|
45
73
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/PopoverDemo.tsx"],
|
|
4
|
-
"sourcesContent": ["import { ChevronDown, ChevronLeft, ChevronRight } from '@tamagui/feather-icons'\nimport
|
|
5
|
-
"mappings": "AAAA;AACA;
|
|
4
|
+
"sourcesContent": ["import { ChevronDown, ChevronLeft, ChevronRight } from '@tamagui/feather-icons'\nimport { Button, Input, Label, Popover, PopoverProps, XStack, YStack } from 'tamagui'\n\nexport default function PopoverDemo() {\n return (\n <XStack space=\"$2\">\n <Demo placement=\"left\" Icon={ChevronLeft} />\n <Demo placement=\"bottom\" Icon={ChevronDown} />\n <Demo placement=\"right\" Icon={ChevronRight} />\n </XStack>\n )\n}\n\nexport function Demo({ Icon, ...props }: PopoverProps & { Icon?: any }) {\n return (\n <Popover modal {...props}>\n <Popover.Trigger>\n <Button icon={Icon} />\n </Popover.Trigger>\n <Popover.Content\n elevation=\"$4\"\n enterStyle={{ x: 0, y: -10, o: 0 }}\n exitStyle={{ x: 0, y: -10, o: 0 }}\n p=\"$2\"\n br=\"$4\"\n x={0}\n y={0}\n o={1}\n animation=\"bouncy\"\n elevate\n >\n <Popover.Arrow />\n\n <YStack p=\"$3\">\n <XStack space=\"$3\">\n <Label size=\"$3\" htmlFor=\"name\">\n Name\n </Label>\n <Input size=\"$3\" id=\"name\" />\n </XStack>\n </YStack>\n </Popover.Content>\n </Popover>\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAEe,uBAAuB;AACpC,SACE,oCAAC;AAAA,IAAO,OAAM;AAAA,KACZ,oCAAC;AAAA,IAAK,WAAU;AAAA,IAAO,MAAM;AAAA,GAAa,GAC1C,oCAAC;AAAA,IAAK,WAAU;AAAA,IAAS,MAAM;AAAA,GAAa,GAC5C,oCAAC;AAAA,IAAK,WAAU;AAAA,IAAQ,MAAM;AAAA,GAAc,CAC9C;AAEJ;AAEO,cAAc,IAAmD;AAAnD,eAAE,WAAF,IAAW,kBAAX,IAAW,CAAT;AACrB,SACE,oCAAC;AAAA,IAAQ,OAAK;AAAA,KAAK,QACjB,oCAAC,QAAQ,SAAR,MACC,oCAAC;AAAA,IAAO,MAAM;AAAA,GAAM,CACtB,GACA,oCAAC,QAAQ,SAAR;AAAA,IACC,WAAU;AAAA,IACV,YAAY,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,EAAE;AAAA,IACjC,WAAW,EAAE,GAAG,GAAG,GAAG,KAAK,GAAG,EAAE;AAAA,IAChC,GAAE;AAAA,IACF,IAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,WAAU;AAAA,IACV,SAAO;AAAA,KAEP,oCAAC,QAAQ,OAAR,IAAc,GAEf,oCAAC;AAAA,IAAO,GAAE;AAAA,KACR,oCAAC;AAAA,IAAO,OAAM;AAAA,KACZ,oCAAC;AAAA,IAAM,MAAK;AAAA,IAAK,SAAQ;AAAA,KAAO,MAEhC,GACA,oCAAC;AAAA,IAAM,MAAK;AAAA,IAAK,IAAG;AAAA,GAAO,CAC7B,CACF,CACF,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/SliderDemo.js
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
1
29
|
import { Slider, XStack } from "tamagui";
|
|
2
30
|
function SliderDemo() {
|
|
3
31
|
return /* @__PURE__ */ React.createElement(XStack, {
|
|
@@ -11,13 +39,13 @@ function SliderDemo() {
|
|
|
11
39
|
width: 200
|
|
12
40
|
}));
|
|
13
41
|
}
|
|
14
|
-
function SimpleSlider(
|
|
15
|
-
|
|
42
|
+
function SimpleSlider(_a) {
|
|
43
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
44
|
+
return /* @__PURE__ */ React.createElement(Slider, __spreadValues({
|
|
16
45
|
defaultValue: [50],
|
|
17
46
|
max: 100,
|
|
18
|
-
step: 1
|
|
19
|
-
|
|
20
|
-
}, /* @__PURE__ */ React.createElement(Slider.Track, null, /* @__PURE__ */ React.createElement(Slider.TrackActive, null)), /* @__PURE__ */ React.createElement(Slider.Thumb, {
|
|
47
|
+
step: 1
|
|
48
|
+
}, props), /* @__PURE__ */ React.createElement(Slider.Track, null, /* @__PURE__ */ React.createElement(Slider.TrackActive, null)), /* @__PURE__ */ React.createElement(Slider.Thumb, {
|
|
21
49
|
bordered: true,
|
|
22
50
|
circular: true,
|
|
23
51
|
elevate: true,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/SliderDemo.tsx"],
|
|
4
4
|
"sourcesContent": ["import { Slider, SliderProps, XStack } from 'tamagui'\n\nexport default function SliderDemo() {\n return (\n <XStack height={200} ai=\"center\" space=\"$8\">\n <SimpleSlider height={200} orientation=\"vertical\" />\n <SimpleSlider width={200} />\n </XStack>\n )\n}\n\nfunction SimpleSlider({ children, ...props }: SliderProps) {\n return (\n <Slider defaultValue={[50]} max={100} step={1} {...props}>\n <Slider.Track>\n <Slider.TrackActive />\n </Slider.Track>\n <Slider.Thumb bordered circular elevate index={0} />\n {children}\n </Slider>\n )\n}\n"],
|
|
5
|
-
"mappings": "AAAA;AAEe,sBAAsB;AACnC,SACE,oCAAC;AAAA,IAAO,QAAQ;AAAA,IAAK,IAAG;AAAA,IAAS,OAAM;AAAA,KACrC,oCAAC;AAAA,IAAa,QAAQ;AAAA,IAAK,aAAY;AAAA,GAAW,GAClD,oCAAC;AAAA,IAAa,OAAO;AAAA,GAAK,CAC5B;AAEJ;AAEA,sBAAsB,
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAEe,sBAAsB;AACnC,SACE,oCAAC;AAAA,IAAO,QAAQ;AAAA,IAAK,IAAG;AAAA,IAAS,OAAM;AAAA,KACrC,oCAAC;AAAA,IAAa,QAAQ;AAAA,IAAK,aAAY;AAAA,GAAW,GAClD,oCAAC;AAAA,IAAa,OAAO;AAAA,GAAK,CAC5B;AAEJ;AAEA,sBAAsB,IAAqC;AAArC,eAAE,eAAF,IAAe,kBAAf,IAAe,CAAb;AACtB,SACE,oCAAC;AAAA,IAAO,cAAc,CAAC,EAAE;AAAA,IAAG,KAAK;AAAA,IAAK,MAAM;AAAA,KAAO,QACjD,oCAAC,OAAO,OAAP,MACC,oCAAC,OAAO,aAAP,IAAmB,CACtB,GACA,oCAAC,OAAO,OAAP;AAAA,IAAa,UAAQ;AAAA,IAAC,UAAQ;AAAA,IAAC,SAAO;AAAA,IAAC,OAAO;AAAA,GAAG,GACjD,QACH;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/TamaguiLogo.js
CHANGED
|
@@ -1,29 +1,63 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
1
29
|
import React, { forwardRef } from "react";
|
|
2
30
|
import { XStack, YStack } from "tamagui";
|
|
3
31
|
const tints = ["red", "orange", "yellow", "green", "blue", "purple", "pink"];
|
|
4
32
|
const logoColors = tints.map((t) => `var(--${t}9)`);
|
|
5
|
-
const TamaguiLogo = forwardRef(({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, /* @__PURE__ */ React.createElement(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
const TamaguiLogo = forwardRef((_a, ref) => {
|
|
34
|
+
var _b = _a, {
|
|
35
|
+
showWords,
|
|
36
|
+
color,
|
|
37
|
+
downscale,
|
|
38
|
+
onHoverLetter
|
|
39
|
+
} = _b, props = __objRest(_b, [
|
|
40
|
+
"showWords",
|
|
41
|
+
"color",
|
|
42
|
+
"downscale",
|
|
43
|
+
"onHoverLetter"
|
|
44
|
+
]);
|
|
45
|
+
return /* @__PURE__ */ React.createElement(XStack, __spreadValues({
|
|
46
|
+
ref,
|
|
47
|
+
ai: "center",
|
|
48
|
+
jc: "center",
|
|
49
|
+
space: "$5"
|
|
50
|
+
}, props), /* @__PURE__ */ React.createElement(LogoIcon, {
|
|
51
|
+
downscale: (downscale ?? 1) * (showWords ? 2 : 1.5),
|
|
52
|
+
color
|
|
53
|
+
}), showWords && /* @__PURE__ */ React.createElement(YStack, {
|
|
54
|
+
mb: -4
|
|
55
|
+
}, /* @__PURE__ */ React.createElement(LogoWords, {
|
|
56
|
+
onHoverLetter,
|
|
57
|
+
downscale: downscale ?? 2,
|
|
58
|
+
color
|
|
59
|
+
})));
|
|
60
|
+
});
|
|
27
61
|
const LogoWords = ({
|
|
28
62
|
color,
|
|
29
63
|
downscale = 1,
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/TamaguiLogo.tsx"],
|
|
4
4
|
"sourcesContent": ["import React, { forwardRef } from 'react'\nimport { ThemeName, XStack, XStackProps, YStack } from 'tamagui'\n\nexport const tints: ThemeName[] = ['red', 'orange', 'yellow', 'green', 'blue', 'purple', 'pink']\n\nexport const logoColors = tints.map((t) => `var(--${t}9)`)\n\nexport const TamaguiLogo = forwardRef(\n (\n {\n showWords,\n color,\n downscale,\n onHoverLetter,\n ...props\n }: {\n onHoverLetter?: (i: number) => void\n showWords?: boolean\n color?: string\n downscale?: number\n } & XStackProps,\n ref\n ) => (\n <XStack ref={ref} ai=\"center\" jc=\"center\" space=\"$5\" {...props}>\n <LogoIcon downscale={(downscale ?? 1) * (showWords ? 2 : 1.5)} color={color} />\n {showWords && (\n <YStack mb={-4}>\n <LogoWords onHoverLetter={onHoverLetter} downscale={downscale ?? 2} color={color} />\n </YStack>\n )}\n </XStack>\n )\n)\n\nexport const LogoWords = ({\n color,\n downscale = 1,\n onHoverLetter,\n}: {\n color?: string\n downscale?: number\n onHoverLetter?: any\n}) => {\n return (\n <svg\n width={373 * (1 / downscale) * 0.333333334}\n height={41 * (1 / downscale) * 0.333333334}\n viewBox=\"0 0 373 41\"\n >\n <polygon\n shapeRendering=\"crispEdges\"\n fill={color || logoColors[0]}\n points=\"24.3870968 40.1612903 24.3870968 8.67741935 32.2580645 8.67741935 32.2580645 0.806451613 0.774193548 0.806451613 0.774193548 8.67741935 8.64516129 8.67741935 8.64516129 40.1612903\"\n onMouseEnter={onHoverLetter ? () => onHoverLetter(0) : undefined}\n />\n <path\n shapeRendering=\"crispEdges\"\n fill={color || logoColors[1]}\n d=\"M87.3548387,0.806451613 L87.3548387,8.67741935 L95.2258065,8.67741935 L95.2258065,40.1612903 L79.483871,40.1612903 L79.483871,24.4193548 L71.6129032,24.4193548 L71.6129032,40.1612903 L55.8709677,40.1612903 L55.8709677,8.67741935 L63.7419355,8.67741935 L63.7419355,0.806451613 L87.3548387,0.806451613 Z M79.483871,8.67741935 L71.6129032,8.67741935 L71.6129032,16.5483871 L79.483871,16.5483871 L79.483871,8.67741935 Z\"\n fillRule=\"nonzero\"\n onMouseEnter={onHoverLetter ? () => onHoverLetter(1) : undefined}\n />\n <polygon\n shapeRendering=\"crispEdges\"\n fill={color || logoColors[2]}\n points=\"130.645161 40.1612903 130.645161 22.4516129 138.516129 22.4516129 138.516129 40.1612903 154.258065 40.1612903 154.258065 0.806451613 142.451613 0.806451613 142.451613 8.67741935 126.709677 8.67741935 126.709677 0.806451613 114.903226 0.806451613 114.903226 40.1612903\"\n onMouseEnter={onHoverLetter ? () => onHoverLetter(2) : undefined}\n />\n <path\n fill={color || logoColors[3]}\n d=\"M205.419355,0.806451613 L205.419355,8.67741935 L213.290323,8.67741935 L213.290323,40.1612903 L197.548387,40.1612903 L197.548387,24.4193548 L189.677419,24.4193548 L189.677419,40.1612903 L173.935484,40.1612903 L173.935484,8.67741935 L181.806452,8.67741935 L181.806452,0.806451613 L205.419355,0.806451613 Z M197.548387,8.67741935 L189.677419,8.67741935 L189.677419,16.5483871 L197.548387,16.5483871 L197.548387,8.67741935 Z\"\n fillRule=\"nonzero\"\n onMouseEnter={onHoverLetter ? () => onHoverLetter(3) : undefined}\n />\n <polygon\n shapeRendering=\"crispEdges\"\n fill={color || logoColors[4]}\n points=\"264.451613 40.1612903 264.451613 32.2903226 272.322581 32.2903226 272.322581 16.5483871 256.580645 16.5483871 256.580645 32.2903226 248.709677 32.2903226 248.709677 8.67741935 272.322581 8.67741935 272.322581 0.806451613 240.83871 0.806451613 240.83871 8.67741935 232.967742 8.67741935 232.967742 32.2903226 240.83871 32.2903226 240.83871 40.1612903\"\n onMouseEnter={onHoverLetter ? () => onHoverLetter(4) : undefined}\n />\n <polygon\n shapeRendering=\"crispEdges\"\n fill={color || logoColors[5]}\n points=\"323.483871 40.1612903 323.483871 32.2903226 331.354839 32.2903226 331.354839 0.806451613 315.612903 0.806451613 315.612903 32.2903226 307.741935 32.2903226 307.741935 0.806451613 292 0.806451613 292 32.2903226 299.870968 32.2903226 299.870968 40.1612903\"\n onMouseEnter={onHoverLetter ? () => onHoverLetter(5) : undefined}\n />\n <polygon\n shapeRendering=\"crispEdges\"\n fill={color || logoColors[6]}\n points=\"372.677419 40.1612903 372.677419 0.806451613 356.935484 0.806451613 356.935484 40.1612903\"\n onMouseEnter={onHoverLetter ? () => onHoverLetter(6) : undefined}\n />\n </svg>\n )\n // return <Image width={206 / 2} height={31 / 2} src={logo.src} />\n}\n\nexport const LogoIcon = ({ downscale = 2, color = 'var(--color)' }: any) => {\n return (\n <YStack\n als=\"center\"\n marginVertical={-10}\n pressStyle={{\n opacity: 0.7,\n }}\n >\n <svg\n width={450 / 8 / downscale}\n height={420 / 8 / downscale}\n viewBox=\"0 0 450 420\"\n version=\"1.1\"\n xmlns=\"http://www.w3.org/2000/svg\"\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n >\n <g transform=\"translate(-150.000000, -210.000000)\">\n <g transform=\"translate(150.000000, 210.000000)\">\n <g transform=\"translate(30.000000, 30.000000)\" fill={color}>\n {/* <path d=\"M300,0 L300,30 L364,30 L364,60 L420,60 L420,150 L364,150 L364,180 L300,180 L300,300 L270,300 L270,360 L60,360 L60,300 L0,300 L0,60 L60,60 L60,0 L300,0 Z\"></path> */}\n </g>\n <g\n transform=\"translate(225.000000, 210.000000) scale(-1, 1) translate(-225.000000, -210.000000) \"\n fill={color}\n >\n <g>\n <rect fill={color} x=\"150\" y=\"0\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"180\" y=\"0\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"210\" y=\"0\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"240\" y=\"0\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"270\" y=\"0\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"300\" y=\"0\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"330\" y=\"30\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"360\" y=\"60\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"390\" y=\"90\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"390\" y=\"120\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"390\" y=\"150\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"390\" y=\"180\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"420\" y=\"210\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"420\" y=\"240\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"420\" y=\"270\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"390\" y=\"300\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"360\" y=\"330\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"330\" y=\"360\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"300\" y=\"390\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"270\" y=\"390\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"240\" y=\"360\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"210\" y=\"360\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"210\" y=\"390\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"180\" y=\"390\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"150\" y=\"360\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"150\" y=\"330\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"120\" y=\"300\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"90\" y=\"240\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"90\" y=\"270\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"90\" y=\"210\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"60\" y=\"180\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"30\" y=\"180\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"0\" y=\"150\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"30\" y=\"120\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"60\" y=\"120\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"90\" y=\"120\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"0\" y=\"90\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"0\" y=\"120\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"30\" y=\"60\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"30\" y=\"60\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"60\" y=\"60\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"120\" y=\"30\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"150\" y=\"60\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"240\" y=\"90\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"240\" y=\"210\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"240\" y=\"240\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"270\" y=\"270\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"300\" y=\"240\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"300\" y=\"210\" width=\"20\" height=\"20\"></rect>\n <rect fill={color} x=\"90\" y=\"60\" width=\"20\" height=\"20\"></rect>\n </g>\n </g>\n </g>\n </g>\n </svg>\n </YStack>\n )\n}\n"],
|
|
5
|
-
"mappings": "AAAA;AACA;AAEO,MAAM,QAAqB,CAAC,OAAO,UAAU,UAAU,SAAS,QAAQ,UAAU,MAAM;AAExF,MAAM,aAAa,MAAM,IAAI,CAAC,MAA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;AAAA,IAAK,QAAO;AAAA,GAAK,GACzD,oCAAC;AAAA,IAAK,MAAM;AAAA,IAAO,GAAE;AAAA,IAAM,GAAE;AAAA,IAAK,OAAM;AAAA,IAAK,QAAO;AAAA,GAAK,GACzD,oCAAC;AAAA,IAAK,MAAM;AAAA,IAAO,GAAE;AAAA,IAAM,GAAE;AAAA,IAAM,OAAM;AAAA,IAAK,QAAO;AAAA,GAAK,GAC1D,oCAAC;AAAA,IAAK,MAAM;AAAA,IAAO,GAAE;AAAA,IAAM,GAAE;AAAA,IAAM,OAAM;AAAA,IAAK,QAAO;AAAA,GAAK,GAC1D,oCAAC;AAAA,IAAK,MAAM;AAAA,IAAO,GAAE;AAAA,IAAM,GAAE;AAAA,IAAM,OAAM;AAAA,IAAK,QAAO;AAAA,GAAK,GAC1D,oCAAC;AAAA,IAAK,MAAM;AAAA,IAAO,GAAE;AAAA,IAAM,GAAE;AAAA,IAAM,OAAM;AAAA,IAAK,QAAO;AAAA,GAAK,GAC1D,oCAAC;AAAA,IAAK,MAAM;AAAA,IAAO,GAAE;AAAA,IAAM,GAAE;AAAA,IAAM,OAAM;AAAA,IAAK,QAAO;AAAA,GAAK,GAC1D,oCAAC;AAAA,IAAK,MAAM;AAAA,IAAO,GAAE;AAAA,IAAK,GAAE;AAAA,IAAK,OAAM;AAAA,IAAK,QAAO;AAAA,GAAK,CAC1D,CACF,CACF,CACF,CACF,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/TooltipDemo.js
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
var __objRest = (source, exclude) => {
|
|
18
|
+
var target = {};
|
|
19
|
+
for (var prop in source)
|
|
20
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
21
|
+
target[prop] = source[prop];
|
|
22
|
+
if (source != null && __getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
24
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
};
|
|
1
29
|
import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Circle } from "@tamagui/feather-icons";
|
|
2
30
|
import React from "react";
|
|
3
31
|
import { Button, Paragraph, Tooltip, TooltipGroup, XStack, YStack } from "tamagui";
|
|
@@ -49,10 +77,9 @@ function TooltipDemo() {
|
|
|
49
77
|
Icon: Circle
|
|
50
78
|
}))));
|
|
51
79
|
}
|
|
52
|
-
function Demo(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, /* @__PURE__ */ React.createElement(Tooltip.Trigger, null, /* @__PURE__ */ React.createElement(Button, {
|
|
80
|
+
function Demo(_a) {
|
|
81
|
+
var _b = _a, { Icon } = _b, props = __objRest(_b, ["Icon"]);
|
|
82
|
+
return /* @__PURE__ */ React.createElement(Tooltip, __spreadValues({}, props), /* @__PURE__ */ React.createElement(Tooltip.Trigger, null, /* @__PURE__ */ React.createElement(Button, {
|
|
56
83
|
icon: Icon,
|
|
57
84
|
circular: true
|
|
58
85
|
})), /* @__PURE__ */ React.createElement(Tooltip.Content, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/TooltipDemo.tsx"],
|
|
4
4
|
"sourcesContent": ["import { ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Circle } from '@tamagui/feather-icons'\nimport React from 'react'\nimport { Button, Paragraph, Tooltip, TooltipGroup, TooltipProps, XStack, YStack } from 'tamagui'\n\nexport default function TooltipDemo() {\n return (\n <TooltipGroup delay={{ open: 3000, close: 100 }}>\n <YStack space=\"$2\" als=\"center\">\n <XStack space=\"$2\">\n <Demo groupId=\"0\" placement=\"top-end\" Icon={Circle} />\n <Demo groupId=\"1\" placement=\"top\" Icon={ChevronUp} />\n <Demo groupId=\"2\" placement=\"top-start\" Icon={Circle} />\n </XStack>\n <XStack space=\"$2\">\n <Demo groupId=\"3\" placement=\"left\" Icon={ChevronLeft} />\n <YStack f={1} />\n <Demo groupId=\"4\" placement=\"right\" Icon={ChevronRight} />\n </XStack>\n <XStack space=\"$2\">\n <Demo groupId=\"5\" placement=\"bottom-end\" Icon={Circle} />\n <Demo groupId=\"6\" placement=\"bottom\" Icon={ChevronDown} />\n <Demo groupId=\"7\" placement=\"bottom-start\" Icon={Circle} />\n </XStack>\n </YStack>\n </TooltipGroup>\n )\n}\n\nexport function Demo({ Icon, ...props }: TooltipProps & { Icon?: any }) {\n return (\n <Tooltip {...props}>\n <Tooltip.Trigger>\n <Button icon={Icon} circular />\n </Tooltip.Trigger>\n <Tooltip.Content\n enterStyle={{ x: 0, y: -5, o: 0, scale: 0.9 }}\n exitStyle={{ x: 0, y: -5, o: 0, scale: 0.9 }}\n scale={1}\n x={0}\n y={0}\n o={1}\n animation=\"bouncy\"\n >\n <Tooltip.Arrow />\n <Paragraph>Hello world</Paragraph>\n </Tooltip.Content>\n </Tooltip>\n )\n}\n"],
|
|
5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;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,WAAU;AAAA,KAEV,oCAAC,QAAQ,OAAR,IAAc,GACf,oCAAC,iBAAU,aAAW,CACxB,CACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/PopoverDemo.js
CHANGED
|
@@ -10,11 +10,11 @@ function PopoverDemo() {
|
|
|
10
10
|
function Demo({ Icon, ...props }) {
|
|
11
11
|
return <Popover modal {...props}>
|
|
12
12
|
<Popover.Trigger><Button icon={Icon} /></Popover.Trigger>
|
|
13
|
-
<Popover.Content elevation="$4" enterStyle={{ x: 0, y: -10, o: 0 }} exitStyle={{ x: 0, y: -10, o: 0 }} p="$2" br="$4" x={0} y={0} o={1} animation="bouncy">
|
|
13
|
+
<Popover.Content elevation="$4" enterStyle={{ x: 0, y: -10, o: 0 }} exitStyle={{ x: 0, y: -10, o: 0 }} p="$2" br="$4" x={0} y={0} o={1} animation="bouncy" elevate>
|
|
14
14
|
<Popover.Arrow />
|
|
15
|
-
<YStack p="$
|
|
16
|
-
<Label size="$
|
|
17
|
-
<Input size="$
|
|
15
|
+
<YStack p="$3"><XStack space="$3">
|
|
16
|
+
<Label size="$3" htmlFor="name">Name</Label>
|
|
17
|
+
<Input size="$3" id="name" />
|
|
18
18
|
</XStack></YStack>
|
|
19
19
|
</Popover.Content>
|
|
20
20
|
</Popover>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/demos",
|
|
3
|
-
"version": "1.0.1-beta.
|
|
3
|
+
"version": "1.0.1-beta.76",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"watch": "tamagui-build --watch"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@tamagui/config-base": "^1.0.1-beta.
|
|
21
|
-
"@tamagui/core": "^1.0.1-beta.
|
|
22
|
-
"tamagui": "^1.0.1-beta.
|
|
20
|
+
"@tamagui/config-base": "^1.0.1-beta.76",
|
|
21
|
+
"@tamagui/core": "^1.0.1-beta.76",
|
|
22
|
+
"tamagui": "^1.0.1-beta.76"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"react": "*",
|
|
26
26
|
"react-dom": "*"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@tamagui/build": "^1.0.1-beta.
|
|
29
|
+
"@tamagui/build": "^1.0.1-beta.76",
|
|
30
30
|
"react": "*",
|
|
31
31
|
"react-dom": "*"
|
|
32
32
|
},
|
package/src/PopoverDemo.tsx
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ChevronDown, ChevronLeft, ChevronRight } from '@tamagui/feather-icons'
|
|
2
|
-
import React from 'react'
|
|
3
2
|
import { Button, Input, Label, Popover, PopoverProps, XStack, YStack } from 'tamagui'
|
|
4
3
|
|
|
5
4
|
export default function PopoverDemo() {
|
|
@@ -28,14 +27,16 @@ export function Demo({ Icon, ...props }: PopoverProps & { Icon?: any }) {
|
|
|
28
27
|
y={0}
|
|
29
28
|
o={1}
|
|
30
29
|
animation="bouncy"
|
|
30
|
+
elevate
|
|
31
31
|
>
|
|
32
32
|
<Popover.Arrow />
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
|
|
34
|
+
<YStack p="$3">
|
|
35
|
+
<XStack space="$3">
|
|
36
|
+
<Label size="$3" htmlFor="name">
|
|
36
37
|
Name
|
|
37
38
|
</Label>
|
|
38
|
-
<Input size="$
|
|
39
|
+
<Input size="$3" id="name" />
|
|
39
40
|
</XStack>
|
|
40
41
|
</YStack>
|
|
41
42
|
</Popover.Content>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverDemo.d.ts","sourceRoot":"","sources":["../src/PopoverDemo.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PopoverDemo.d.ts","sourceRoot":"","sources":["../src/PopoverDemo.tsx"],"names":[],"mappings":";AACA,OAAO,EAAiC,YAAY,EAAkB,MAAM,SAAS,CAAA;AAErF,MAAM,CAAC,OAAO,UAAU,WAAW,gBAQlC;AAED,wBAAgB,IAAI,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,GAAG;IAAE,IAAI,CAAC,EAAE,GAAG,CAAA;CAAE,eA+BrE"}
|