@tamagui/logo 1.0.1-beta.139
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/TamaguiLogo.js +127 -0
- package/dist/cjs/TamaguiLogo.js.map +7 -0
- package/dist/cjs/index.js +19 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/esm/TamaguiLogo.js +96 -0
- package/dist/esm/TamaguiLogo.js.map +7 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/jsx/TamaguiLogo.js +42 -0
- package/dist/jsx/TamaguiLogo.js.map +7 -0
- package/dist/jsx/index.js +2 -0
- package/dist/jsx/index.js.map +7 -0
- package/package.json +31 -0
- package/src/TamaguiLogo.tsx +115 -0
- package/src/index.tsx +1 -0
- package/types/TamaguiLogo.d.ts +26 -0
- package/types/index.d.ts +2 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
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));
|
|
21
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
|
+
var TamaguiLogo_exports = {};
|
|
23
|
+
__export(TamaguiLogo_exports, {
|
|
24
|
+
LogoIcon: () => LogoIcon,
|
|
25
|
+
LogoWords: () => LogoWords,
|
|
26
|
+
TamaguiLogo: () => TamaguiLogo,
|
|
27
|
+
logoColors: () => logoColors,
|
|
28
|
+
tints: () => tints
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(TamaguiLogo_exports);
|
|
31
|
+
var import_react = __toESM(require("react"));
|
|
32
|
+
var import_tamagui = require("tamagui");
|
|
33
|
+
const tints = ["red", "orange", "yellow", "green", "blue", "purple", "pink"];
|
|
34
|
+
const logoColors = tints.map((t) => `var(--${t}9)`);
|
|
35
|
+
const TamaguiLogo = (0, import_react.forwardRef)(({
|
|
36
|
+
showWords,
|
|
37
|
+
color,
|
|
38
|
+
downscale,
|
|
39
|
+
onHoverLetter,
|
|
40
|
+
...props
|
|
41
|
+
}, ref) => /* @__PURE__ */ import_react.default.createElement(import_tamagui.XStack, {
|
|
42
|
+
ref,
|
|
43
|
+
alignItems: "center",
|
|
44
|
+
justifyContent: "center",
|
|
45
|
+
space: "$5",
|
|
46
|
+
...props
|
|
47
|
+
}, /* @__PURE__ */ import_react.default.createElement(LogoIcon, {
|
|
48
|
+
downscale: (downscale ?? 1) * (showWords ? 2 : 1.5),
|
|
49
|
+
color
|
|
50
|
+
}), showWords && /* @__PURE__ */ import_react.default.createElement(import_tamagui.YStack, {
|
|
51
|
+
marginBottom: -4
|
|
52
|
+
}, /* @__PURE__ */ import_react.default.createElement(LogoWords, {
|
|
53
|
+
onHoverLetter,
|
|
54
|
+
downscale: downscale ?? 2,
|
|
55
|
+
color
|
|
56
|
+
}))));
|
|
57
|
+
const LogoWords = ({
|
|
58
|
+
color,
|
|
59
|
+
downscale = 1,
|
|
60
|
+
onHoverLetter
|
|
61
|
+
}) => {
|
|
62
|
+
return /* @__PURE__ */ import_react.default.createElement("svg", {
|
|
63
|
+
width: 373 * (1 / downscale) * 0.333333334,
|
|
64
|
+
height: 41 * (1 / downscale) * 0.333333334,
|
|
65
|
+
viewBox: "0 0 373 41"
|
|
66
|
+
}, /* @__PURE__ */ import_react.default.createElement("polygon", {
|
|
67
|
+
shapeRendering: "crispEdges",
|
|
68
|
+
fill: color || logoColors[0],
|
|
69
|
+
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",
|
|
70
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(0) : void 0
|
|
71
|
+
}), /* @__PURE__ */ import_react.default.createElement("path", {
|
|
72
|
+
shapeRendering: "crispEdges",
|
|
73
|
+
fill: color || logoColors[1],
|
|
74
|
+
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",
|
|
75
|
+
fillRule: "nonzero",
|
|
76
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(1) : void 0
|
|
77
|
+
}), /* @__PURE__ */ import_react.default.createElement("polygon", {
|
|
78
|
+
shapeRendering: "crispEdges",
|
|
79
|
+
fill: color || logoColors[2],
|
|
80
|
+
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",
|
|
81
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(2) : void 0
|
|
82
|
+
}), /* @__PURE__ */ import_react.default.createElement("path", {
|
|
83
|
+
fill: color || logoColors[3],
|
|
84
|
+
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",
|
|
85
|
+
fillRule: "nonzero",
|
|
86
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(3) : void 0
|
|
87
|
+
}), /* @__PURE__ */ import_react.default.createElement("polygon", {
|
|
88
|
+
shapeRendering: "crispEdges",
|
|
89
|
+
fill: color || logoColors[4],
|
|
90
|
+
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",
|
|
91
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(4) : void 0
|
|
92
|
+
}), /* @__PURE__ */ import_react.default.createElement("polygon", {
|
|
93
|
+
shapeRendering: "crispEdges",
|
|
94
|
+
fill: color || logoColors[5],
|
|
95
|
+
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",
|
|
96
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(5) : void 0
|
|
97
|
+
}), /* @__PURE__ */ import_react.default.createElement("polygon", {
|
|
98
|
+
shapeRendering: "crispEdges",
|
|
99
|
+
fill: color || logoColors[6],
|
|
100
|
+
points: "372.677419 40.1612903 372.677419 0.806451613 356.935484 0.806451613 356.935484 40.1612903",
|
|
101
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(6) : void 0
|
|
102
|
+
}));
|
|
103
|
+
};
|
|
104
|
+
const LogoIcon = ({ downscale = 2 }) => {
|
|
105
|
+
return /* @__PURE__ */ import_react.default.createElement(import_tamagui.YStack, {
|
|
106
|
+
className: "unselectable",
|
|
107
|
+
alignSelf: "center",
|
|
108
|
+
marginVertical: -10,
|
|
109
|
+
pressStyle: {
|
|
110
|
+
opacity: 0.7
|
|
111
|
+
}
|
|
112
|
+
}, /* @__PURE__ */ import_react.default.createElement("img", {
|
|
113
|
+
className: "tamagui-icon",
|
|
114
|
+
width: 450 / 8 / downscale,
|
|
115
|
+
height: 420 / 8 / downscale,
|
|
116
|
+
src: "/tamagui-icon.svg"
|
|
117
|
+
}));
|
|
118
|
+
};
|
|
119
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
120
|
+
0 && (module.exports = {
|
|
121
|
+
LogoIcon,
|
|
122
|
+
LogoWords,
|
|
123
|
+
TamaguiLogo,
|
|
124
|
+
logoColors,
|
|
125
|
+
tints
|
|
126
|
+
});
|
|
127
|
+
//# sourceMappingURL=TamaguiLogo.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/TamaguiLogo.tsx"],
|
|
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} alignItems=\"center\" justifyContent=\"center\" space=\"$5\" {...props}>\n <LogoIcon downscale={(downscale ?? 1) * (showWords ? 2 : 1.5)} color={color} />\n {showWords && (\n <YStack marginBottom={-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}\n\nexport const LogoIcon = ({ downscale = 2 }: any) => {\n return (\n <YStack\n className=\"unselectable\"\n alignSelf=\"center\"\n marginVertical={-10}\n pressStyle={{\n opacity: 0.7,\n }}\n >\n <img\n className=\"tamagui-icon\"\n width={450 / 8 / downscale}\n height={420 / 8 / downscale}\n src=\"/tamagui-icon.svg\"\n />\n </YStack>\n )\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkC;AAClC,qBAAuD;AAEhD,MAAM,QAAqB,CAAC,OAAO,UAAU,UAAU,SAAS,QAAQ,UAAU,MAAM;AAExF,MAAM,aAAa,MAAM,IAAI,CAAC,MAAM,SAAS,KAAK;AAElD,MAAM,cAAc,6BACzB,CACE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,GAOL,QAEA,mDAAC;AAAA,EAAO;AAAA,EAAU,YAAW;AAAA,EAAS,gBAAe;AAAA,EAAS,OAAM;AAAA,EAAM,GAAG;AAAA,GAC3E,mDAAC;AAAA,EAAS,WAAY,cAAa,KAAM,aAAY,IAAI;AAAA,EAAM;AAAA,CAAc,GAC5E,aACC,mDAAC;AAAA,EAAO,cAAc;AAAA,GACpB,mDAAC;AAAA,EAAU;AAAA,EAA8B,WAAW,aAAa;AAAA,EAAG;AAAA,CAAc,CACpF,CAEJ,CAEJ;AAEO,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,MAKI;AACJ,SACE,mDAAC;AAAA,IACC,OAAO,MAAO,KAAI,aAAa;AAAA,IAC/B,QAAQ,KAAM,KAAI,aAAa;AAAA,IAC/B,SAAQ;AAAA,KAER,mDAAC;AAAA,IACC,gBAAe;AAAA,IACf,MAAM,SAAS,WAAW;AAAA,IAC1B,QAAO;AAAA,IAC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[]
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(src_exports);
|
|
18
|
+
__reExport(src_exports, require("./TamaguiLogo"), module.exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { XStack, YStack } from "tamagui";
|
|
3
|
+
const tints = ["red", "orange", "yellow", "green", "blue", "purple", "pink"];
|
|
4
|
+
const logoColors = tints.map((t) => `var(--${t}9)`);
|
|
5
|
+
const TamaguiLogo = forwardRef(({
|
|
6
|
+
showWords,
|
|
7
|
+
color,
|
|
8
|
+
downscale,
|
|
9
|
+
onHoverLetter,
|
|
10
|
+
...props
|
|
11
|
+
}, ref) => /* @__PURE__ */ React.createElement(XStack, {
|
|
12
|
+
ref,
|
|
13
|
+
alignItems: "center",
|
|
14
|
+
justifyContent: "center",
|
|
15
|
+
space: "$5",
|
|
16
|
+
...props
|
|
17
|
+
}, /* @__PURE__ */ React.createElement(LogoIcon, {
|
|
18
|
+
downscale: (downscale ?? 1) * (showWords ? 2 : 1.5),
|
|
19
|
+
color
|
|
20
|
+
}), showWords && /* @__PURE__ */ React.createElement(YStack, {
|
|
21
|
+
marginBottom: -4
|
|
22
|
+
}, /* @__PURE__ */ React.createElement(LogoWords, {
|
|
23
|
+
onHoverLetter,
|
|
24
|
+
downscale: downscale ?? 2,
|
|
25
|
+
color
|
|
26
|
+
}))));
|
|
27
|
+
const LogoWords = ({
|
|
28
|
+
color,
|
|
29
|
+
downscale = 1,
|
|
30
|
+
onHoverLetter
|
|
31
|
+
}) => {
|
|
32
|
+
return /* @__PURE__ */ React.createElement("svg", {
|
|
33
|
+
width: 373 * (1 / downscale) * 0.333333334,
|
|
34
|
+
height: 41 * (1 / downscale) * 0.333333334,
|
|
35
|
+
viewBox: "0 0 373 41"
|
|
36
|
+
}, /* @__PURE__ */ React.createElement("polygon", {
|
|
37
|
+
shapeRendering: "crispEdges",
|
|
38
|
+
fill: color || logoColors[0],
|
|
39
|
+
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",
|
|
40
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(0) : void 0
|
|
41
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
42
|
+
shapeRendering: "crispEdges",
|
|
43
|
+
fill: color || logoColors[1],
|
|
44
|
+
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",
|
|
45
|
+
fillRule: "nonzero",
|
|
46
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(1) : void 0
|
|
47
|
+
}), /* @__PURE__ */ React.createElement("polygon", {
|
|
48
|
+
shapeRendering: "crispEdges",
|
|
49
|
+
fill: color || logoColors[2],
|
|
50
|
+
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",
|
|
51
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(2) : void 0
|
|
52
|
+
}), /* @__PURE__ */ React.createElement("path", {
|
|
53
|
+
fill: color || logoColors[3],
|
|
54
|
+
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",
|
|
55
|
+
fillRule: "nonzero",
|
|
56
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(3) : void 0
|
|
57
|
+
}), /* @__PURE__ */ React.createElement("polygon", {
|
|
58
|
+
shapeRendering: "crispEdges",
|
|
59
|
+
fill: color || logoColors[4],
|
|
60
|
+
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",
|
|
61
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(4) : void 0
|
|
62
|
+
}), /* @__PURE__ */ React.createElement("polygon", {
|
|
63
|
+
shapeRendering: "crispEdges",
|
|
64
|
+
fill: color || logoColors[5],
|
|
65
|
+
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",
|
|
66
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(5) : void 0
|
|
67
|
+
}), /* @__PURE__ */ React.createElement("polygon", {
|
|
68
|
+
shapeRendering: "crispEdges",
|
|
69
|
+
fill: color || logoColors[6],
|
|
70
|
+
points: "372.677419 40.1612903 372.677419 0.806451613 356.935484 0.806451613 356.935484 40.1612903",
|
|
71
|
+
onMouseEnter: onHoverLetter ? () => onHoverLetter(6) : void 0
|
|
72
|
+
}));
|
|
73
|
+
};
|
|
74
|
+
const LogoIcon = ({ downscale = 2 }) => {
|
|
75
|
+
return /* @__PURE__ */ React.createElement(YStack, {
|
|
76
|
+
className: "unselectable",
|
|
77
|
+
alignSelf: "center",
|
|
78
|
+
marginVertical: -10,
|
|
79
|
+
pressStyle: {
|
|
80
|
+
opacity: 0.7
|
|
81
|
+
}
|
|
82
|
+
}, /* @__PURE__ */ React.createElement("img", {
|
|
83
|
+
className: "tamagui-icon",
|
|
84
|
+
width: 450 / 8 / downscale,
|
|
85
|
+
height: 420 / 8 / downscale,
|
|
86
|
+
src: "/tamagui-icon.svg"
|
|
87
|
+
}));
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
LogoIcon,
|
|
91
|
+
LogoWords,
|
|
92
|
+
TamaguiLogo,
|
|
93
|
+
logoColors,
|
|
94
|
+
tints
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=TamaguiLogo.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/TamaguiLogo.tsx"],
|
|
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} alignItems=\"center\" justifyContent=\"center\" space=\"$5\" {...props}>\n <LogoIcon downscale={(downscale ?? 1) * (showWords ? 2 : 1.5)} color={color} />\n {showWords && (\n <YStack marginBottom={-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}\n\nexport const LogoIcon = ({ downscale = 2 }: any) => {\n return (\n <YStack\n className=\"unselectable\"\n alignSelf=\"center\"\n marginVertical={-10}\n pressStyle={{\n opacity: 0.7,\n }}\n >\n <img\n className=\"tamagui-icon\"\n width={450 / 8 / downscale}\n height={420 / 8 / downscale}\n src=\"/tamagui-icon.svg\"\n />\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,MAAM,SAAS,KAAK;AAElD,MAAM,cAAc,WACzB,CACE;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,KACG;AAAA,GAOL,QAEA,oCAAC;AAAA,EAAO;AAAA,EAAU,YAAW;AAAA,EAAS,gBAAe;AAAA,EAAS,OAAM;AAAA,EAAM,GAAG;AAAA,GAC3E,oCAAC;AAAA,EAAS,WAAY,cAAa,KAAM,aAAY,IAAI;AAAA,EAAM;AAAA,CAAc,GAC5E,aACC,oCAAC;AAAA,EAAO,cAAc;AAAA,GACpB,oCAAC;AAAA,EAAU;AAAA,EAA8B,WAAW,aAAa;AAAA,EAAG;AAAA,CAAc,CACpF,CAEJ,CAEJ;AAEO,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,MAKI;AACJ,SACE,oCAAC;AAAA,IACC,OAAO,MAAO,KAAI,aAAa;AAAA,IAC/B,QAAQ,KAAM,KA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AU;AAAA,IACV,OAAO,MAAM,IAAI;AAAA,IACjB,QAAQ,MAAM,IAAI;AAAA,IAClB,KAAI;AAAA,GACN,CACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { forwardRef } from "react";
|
|
2
|
+
import { XStack, YStack } from "tamagui";
|
|
3
|
+
const tints = ["red", "orange", "yellow", "green", "blue", "purple", "pink"];
|
|
4
|
+
const logoColors = tints.map((t) => `var(--${t}9)`);
|
|
5
|
+
const TamaguiLogo = forwardRef(({
|
|
6
|
+
showWords,
|
|
7
|
+
color,
|
|
8
|
+
downscale,
|
|
9
|
+
onHoverLetter,
|
|
10
|
+
...props
|
|
11
|
+
}, ref) => <XStack ref={ref} alignItems="center" justifyContent="center" space="$5" {...props}>
|
|
12
|
+
<LogoIcon downscale={(downscale != null ? downscale : 1) * (showWords ? 2 : 1.5)} color={color} />
|
|
13
|
+
{showWords && <YStack marginBottom={-4}><LogoWords onHoverLetter={onHoverLetter} downscale={downscale != null ? downscale : 2} color={color} /></YStack>}
|
|
14
|
+
</XStack>);
|
|
15
|
+
const LogoWords = ({
|
|
16
|
+
color,
|
|
17
|
+
downscale = 1,
|
|
18
|
+
onHoverLetter
|
|
19
|
+
}) => {
|
|
20
|
+
return <svg width={373 * (1 / downscale) * 0.333333334} height={41 * (1 / downscale) * 0.333333334} viewBox="0 0 373 41">
|
|
21
|
+
<polygon shapeRendering="crispEdges" fill={color || logoColors[0]} 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" onMouseEnter={onHoverLetter ? () => onHoverLetter(0) : void 0} />
|
|
22
|
+
<path shapeRendering="crispEdges" fill={color || logoColors[1]} 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" fillRule="nonzero" onMouseEnter={onHoverLetter ? () => onHoverLetter(1) : void 0} />
|
|
23
|
+
<polygon shapeRendering="crispEdges" fill={color || logoColors[2]} 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" onMouseEnter={onHoverLetter ? () => onHoverLetter(2) : void 0} />
|
|
24
|
+
<path fill={color || logoColors[3]} 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" fillRule="nonzero" onMouseEnter={onHoverLetter ? () => onHoverLetter(3) : void 0} />
|
|
25
|
+
<polygon shapeRendering="crispEdges" fill={color || logoColors[4]} 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" onMouseEnter={onHoverLetter ? () => onHoverLetter(4) : void 0} />
|
|
26
|
+
<polygon shapeRendering="crispEdges" fill={color || logoColors[5]} 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" onMouseEnter={onHoverLetter ? () => onHoverLetter(5) : void 0} />
|
|
27
|
+
<polygon shapeRendering="crispEdges" fill={color || logoColors[6]} points="372.677419 40.1612903 372.677419 0.806451613 356.935484 0.806451613 356.935484 40.1612903" onMouseEnter={onHoverLetter ? () => onHoverLetter(6) : void 0} />
|
|
28
|
+
</svg>;
|
|
29
|
+
};
|
|
30
|
+
const LogoIcon = ({ downscale = 2 }) => {
|
|
31
|
+
return <YStack className="unselectable" alignSelf="center" marginVertical={-10} pressStyle={{
|
|
32
|
+
opacity: 0.7
|
|
33
|
+
}}><img className="tamagui-icon" width={450 / 8 / downscale} height={420 / 8 / downscale} src="/tamagui-icon.svg" /></YStack>;
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
LogoIcon,
|
|
37
|
+
LogoWords,
|
|
38
|
+
TamaguiLogo,
|
|
39
|
+
logoColors,
|
|
40
|
+
tints
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=TamaguiLogo.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/TamaguiLogo.tsx"],
|
|
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} alignItems=\"center\" justifyContent=\"center\" space=\"$5\" {...props}>\n <LogoIcon downscale={(downscale ?? 1) * (showWords ? 2 : 1.5)} color={color} />\n {showWords && (\n <YStack marginBottom={-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}\n\nexport const LogoIcon = ({ downscale = 2 }: any) => {\n return (\n <YStack\n className=\"unselectable\"\n alignSelf=\"center\"\n marginVertical={-10}\n pressStyle={{\n opacity: 0.7,\n }}\n >\n <img\n className=\"tam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,IAAI,QACzD;AAAA,IACA,CAAC,QACC,eAAe,aACf,MAAM,SAAS,WAAW,IAC1B,OAAO,gWACP,cAAc,gBAAgB,MAAM,cAAc,CAAC,IAAI,QACzD;AAAA,IACA,CAAC,QACC,eAAe,aACf,MAAM,SAAS,WAAW,IAC1B,OAAO,gQACP,cAAc,gBAAgB,MAAM,cAAc,CAAC,IAAI,QACzD;AAAA,IACA,CAAC,QACC,eAAe,aACf,MAAM,SAAS,WAAW,IAC1B,OAAO,4FACP,cAAc,gBAAgB,MAAM,cAAc,CAAC,IAAI,QACzD;AAAA,EACF,EAhDC;AAkDL;AAEO,MAAM,WAAW,CAAC,EAAE,YAAY,QAAa;AAClD,SACE,CAAC,OACC,UAAU,eACV,UAAU,SACV,gBAAgB,KAChB,YAAY;AAAA,IACV,SAAS;AAAA,EACX,GAEA,CAAC,IACC,UAAU,eACV,OAAO,MAAM,IAAI,WACjB,QAAQ,MAAM,IAAI,WAClB,IAAI,oBACN,EACF,EAdC;AAgBL;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tamagui/logo",
|
|
3
|
+
"version": "1.0.1-beta.139",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"source": "src/index.ts",
|
|
6
|
+
"types": "./types/index.d.ts",
|
|
7
|
+
"main": "dist/cjs",
|
|
8
|
+
"module": "dist/esm",
|
|
9
|
+
"module:jsx": "dist/jsx",
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"types",
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tamagui-build",
|
|
17
|
+
"watch": "tamagui-build --watch"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"react": "*",
|
|
21
|
+
"react-dom": "*"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@tamagui/build": "^1.0.1-beta.139",
|
|
25
|
+
"react": "*",
|
|
26
|
+
"react-dom": "*"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react'
|
|
2
|
+
import { ThemeName, XStack, XStackProps, YStack } from 'tamagui'
|
|
3
|
+
|
|
4
|
+
export const tints: ThemeName[] = ['red', 'orange', 'yellow', 'green', 'blue', 'purple', 'pink']
|
|
5
|
+
|
|
6
|
+
export const logoColors = tints.map((t) => `var(--${t}9)`)
|
|
7
|
+
|
|
8
|
+
export const TamaguiLogo = forwardRef(
|
|
9
|
+
(
|
|
10
|
+
{
|
|
11
|
+
showWords,
|
|
12
|
+
color,
|
|
13
|
+
downscale,
|
|
14
|
+
onHoverLetter,
|
|
15
|
+
...props
|
|
16
|
+
}: {
|
|
17
|
+
onHoverLetter?: (i: number) => void
|
|
18
|
+
showWords?: boolean
|
|
19
|
+
color?: string
|
|
20
|
+
downscale?: number
|
|
21
|
+
} & XStackProps,
|
|
22
|
+
ref
|
|
23
|
+
) => (
|
|
24
|
+
<XStack ref={ref} alignItems="center" justifyContent="center" space="$5" {...props}>
|
|
25
|
+
<LogoIcon downscale={(downscale ?? 1) * (showWords ? 2 : 1.5)} color={color} />
|
|
26
|
+
{showWords && (
|
|
27
|
+
<YStack marginBottom={-4}>
|
|
28
|
+
<LogoWords onHoverLetter={onHoverLetter} downscale={downscale ?? 2} color={color} />
|
|
29
|
+
</YStack>
|
|
30
|
+
)}
|
|
31
|
+
</XStack>
|
|
32
|
+
)
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
export const LogoWords = ({
|
|
36
|
+
color,
|
|
37
|
+
downscale = 1,
|
|
38
|
+
onHoverLetter,
|
|
39
|
+
}: {
|
|
40
|
+
color?: string
|
|
41
|
+
downscale?: number
|
|
42
|
+
onHoverLetter?: any
|
|
43
|
+
}) => {
|
|
44
|
+
return (
|
|
45
|
+
<svg
|
|
46
|
+
width={373 * (1 / downscale) * 0.333333334}
|
|
47
|
+
height={41 * (1 / downscale) * 0.333333334}
|
|
48
|
+
viewBox="0 0 373 41"
|
|
49
|
+
>
|
|
50
|
+
<polygon
|
|
51
|
+
shapeRendering="crispEdges"
|
|
52
|
+
fill={color || logoColors[0]}
|
|
53
|
+
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"
|
|
54
|
+
onMouseEnter={onHoverLetter ? () => onHoverLetter(0) : undefined}
|
|
55
|
+
/>
|
|
56
|
+
<path
|
|
57
|
+
shapeRendering="crispEdges"
|
|
58
|
+
fill={color || logoColors[1]}
|
|
59
|
+
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"
|
|
60
|
+
fillRule="nonzero"
|
|
61
|
+
onMouseEnter={onHoverLetter ? () => onHoverLetter(1) : undefined}
|
|
62
|
+
/>
|
|
63
|
+
<polygon
|
|
64
|
+
shapeRendering="crispEdges"
|
|
65
|
+
fill={color || logoColors[2]}
|
|
66
|
+
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"
|
|
67
|
+
onMouseEnter={onHoverLetter ? () => onHoverLetter(2) : undefined}
|
|
68
|
+
/>
|
|
69
|
+
<path
|
|
70
|
+
fill={color || logoColors[3]}
|
|
71
|
+
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"
|
|
72
|
+
fillRule="nonzero"
|
|
73
|
+
onMouseEnter={onHoverLetter ? () => onHoverLetter(3) : undefined}
|
|
74
|
+
/>
|
|
75
|
+
<polygon
|
|
76
|
+
shapeRendering="crispEdges"
|
|
77
|
+
fill={color || logoColors[4]}
|
|
78
|
+
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"
|
|
79
|
+
onMouseEnter={onHoverLetter ? () => onHoverLetter(4) : undefined}
|
|
80
|
+
/>
|
|
81
|
+
<polygon
|
|
82
|
+
shapeRendering="crispEdges"
|
|
83
|
+
fill={color || logoColors[5]}
|
|
84
|
+
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"
|
|
85
|
+
onMouseEnter={onHoverLetter ? () => onHoverLetter(5) : undefined}
|
|
86
|
+
/>
|
|
87
|
+
<polygon
|
|
88
|
+
shapeRendering="crispEdges"
|
|
89
|
+
fill={color || logoColors[6]}
|
|
90
|
+
points="372.677419 40.1612903 372.677419 0.806451613 356.935484 0.806451613 356.935484 40.1612903"
|
|
91
|
+
onMouseEnter={onHoverLetter ? () => onHoverLetter(6) : undefined}
|
|
92
|
+
/>
|
|
93
|
+
</svg>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export const LogoIcon = ({ downscale = 2 }: any) => {
|
|
98
|
+
return (
|
|
99
|
+
<YStack
|
|
100
|
+
className="unselectable"
|
|
101
|
+
alignSelf="center"
|
|
102
|
+
marginVertical={-10}
|
|
103
|
+
pressStyle={{
|
|
104
|
+
opacity: 0.7,
|
|
105
|
+
}}
|
|
106
|
+
>
|
|
107
|
+
<img
|
|
108
|
+
className="tamagui-icon"
|
|
109
|
+
width={450 / 8 / downscale}
|
|
110
|
+
height={420 / 8 / downscale}
|
|
111
|
+
src="/tamagui-icon.svg"
|
|
112
|
+
/>
|
|
113
|
+
</YStack>
|
|
114
|
+
)
|
|
115
|
+
}
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TamaguiLogo'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ThemeName } from 'tamagui';
|
|
3
|
+
export declare const tints: ThemeName[];
|
|
4
|
+
export declare const logoColors: string[];
|
|
5
|
+
export declare const TamaguiLogo: React.ForwardRefExoticComponent<{
|
|
6
|
+
onHoverLetter?: ((i: number) => void) | undefined;
|
|
7
|
+
showWords?: boolean | undefined;
|
|
8
|
+
color?: string | undefined;
|
|
9
|
+
downscale?: number | undefined;
|
|
10
|
+
} & Omit<import("react-native").ViewProps, "display" | "children"> & import("tamagui").RNWViewProps & import("tamagui").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
|
|
11
|
+
readonly fullscreen?: boolean | undefined;
|
|
12
|
+
readonly elevation?: import("tamagui").SizeTokens | undefined;
|
|
13
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("tamagui").RNWViewProps & import("tamagui").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
|
|
14
|
+
readonly fullscreen?: boolean | undefined;
|
|
15
|
+
readonly elevation?: import("tamagui").SizeTokens | undefined;
|
|
16
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("tamagui").RNWViewProps & import("tamagui").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{}, "elevation" | "fullscreen"> & {
|
|
17
|
+
readonly fullscreen?: boolean | undefined;
|
|
18
|
+
readonly elevation?: import("tamagui").SizeTokens | undefined;
|
|
19
|
+
}>> & React.RefAttributes<unknown>>;
|
|
20
|
+
export declare const LogoWords: ({ color, downscale, onHoverLetter, }: {
|
|
21
|
+
color?: string | undefined;
|
|
22
|
+
downscale?: number | undefined;
|
|
23
|
+
onHoverLetter?: any;
|
|
24
|
+
}) => JSX.Element;
|
|
25
|
+
export declare const LogoIcon: ({ downscale }: any) => JSX.Element;
|
|
26
|
+
//# sourceMappingURL=TamaguiLogo.d.ts.map
|
package/types/index.d.ts
ADDED