@tamagui/shapes 3.0.0-beta.831.1 → 3.0.0-beta.889.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Square.cjs +1 -4
- package/dist/cjs/Square.native.cjs +1 -4
- package/dist/cjs/Square.native.js +1 -4
- package/dist/cjs/Square.native.js.map +1 -1
- package/dist/cjs/getShapeSize.cjs +3 -2
- package/dist/cjs/getShapeSize.native.cjs +3 -2
- package/dist/cjs/getShapeSize.native.js +3 -2
- package/dist/cjs/getShapeSize.native.js.map +1 -1
- package/dist/esm/Square.mjs +1 -4
- package/dist/esm/Square.mjs.map +1 -1
- package/dist/esm/Square.native.js +1 -4
- package/dist/esm/Square.native.js.map +1 -1
- package/dist/esm/getShapeSize.mjs +3 -2
- package/dist/esm/getShapeSize.mjs.map +1 -1
- package/dist/esm/getShapeSize.native.js +3 -2
- package/dist/esm/getShapeSize.native.js.map +1 -1
- package/dist/jsx/Square.mjs +1 -4
- package/dist/jsx/Square.mjs.map +1 -1
- package/dist/jsx/Square.native.cjs +1 -4
- package/dist/jsx/Square.native.js +1 -4
- package/dist/jsx/Square.native.js.map +1 -1
- package/dist/jsx/getShapeSize.mjs +3 -2
- package/dist/jsx/getShapeSize.mjs.map +1 -1
- package/dist/jsx/getShapeSize.native.cjs +3 -2
- package/dist/jsx/getShapeSize.native.js +3 -2
- package/dist/jsx/getShapeSize.native.js.map +1 -1
- package/package.json +5 -5
- package/src/Square.tsx +1 -4
- package/src/getShapeSize.tsx +21 -23
- package/types/Circle.d.ts +3 -3
- package/types/Square.d.ts +3 -3
- package/types/Square.d.ts.map +1 -1
- package/types/getShapeSize.d.ts +1 -3
- package/types/getShapeSize.d.ts.map +1 -1
package/dist/cjs/Square.cjs
CHANGED
|
@@ -29,10 +29,7 @@ const Square = (0, import_web.styled)(import_stacks.YStack, {
|
|
|
29
29
|
alignItems: "center",
|
|
30
30
|
justifyContent: "center",
|
|
31
31
|
variants: {
|
|
32
|
-
size:
|
|
33
|
-
number: import_getShapeSize.getShapeSize,
|
|
34
|
-
Size: import_getShapeSize.getShapeSize
|
|
35
|
-
},
|
|
32
|
+
size: import_getShapeSize.getShapeSize,
|
|
36
33
|
circular: { true: { borderRadius: 1e5 } },
|
|
37
34
|
transparent: { true: { backgroundColor: "transparent" } }
|
|
38
35
|
}
|
|
@@ -31,10 +31,7 @@ var Square = (0, import_web.styled)(import_stacks.YStack, {
|
|
|
31
31
|
alignItems: "center",
|
|
32
32
|
justifyContent: "center",
|
|
33
33
|
variants: {
|
|
34
|
-
size:
|
|
35
|
-
number: import_getShapeSize.getShapeSize,
|
|
36
|
-
Size: import_getShapeSize.getShapeSize
|
|
37
|
-
},
|
|
34
|
+
size: import_getShapeSize.getShapeSize,
|
|
38
35
|
circular: { true: { borderRadius: 1e5 } },
|
|
39
36
|
transparent: { true: { backgroundColor: "transparent" } }
|
|
40
37
|
}
|
|
@@ -31,10 +31,7 @@ var Square = (0, import_web.styled)(import_stacks.YStack, {
|
|
|
31
31
|
alignItems: "center",
|
|
32
32
|
justifyContent: "center",
|
|
33
33
|
variants: {
|
|
34
|
-
size:
|
|
35
|
-
number: import_getShapeSize.getShapeSize,
|
|
36
|
-
Size: import_getShapeSize.getShapeSize
|
|
37
|
-
},
|
|
34
|
+
size: import_getShapeSize.getShapeSize,
|
|
38
35
|
circular: { true: { borderRadius: 1e5 } },
|
|
39
36
|
transparent: { true: { backgroundColor: "transparent" } }
|
|
40
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Square.native.js","names":[],"sources":["cjs/Square.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Square_exports = {};\n__export(Square_exports, {\n Square: () => Square\n});\nmodule.exports = __toCommonJS(Square_exports);\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_web = require(\"@tamagui/web\");\nvar import_getShapeSize = require(\"./getShapeSize\");\nvar Square = (0, import_web.styled)(import_stacks.YStack, {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size:
|
|
1
|
+
{"version":3,"file":"Square.native.js","names":[],"sources":["cjs/Square.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Square_exports = {};\n__export(Square_exports, {\n Square: () => Square\n});\nmodule.exports = __toCommonJS(Square_exports);\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_web = require(\"@tamagui/web\");\nvar import_getShapeSize = require(\"./getShapeSize\");\nvar Square = (0, import_web.styled)(import_stacks.YStack, {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: import_getShapeSize.getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n}, {\n memo: true\n});\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iBAAiB,CAAC;AACtB,SAAS,gBAAgB,EACvB,cAAc,OAChB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,sBAAsB,QAAQ,0BAAgB;AAClD,IAAI,UAAU,GAAG,WAAW,OAAM,CAAE,cAAc,QAAQ;CACxD,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM,oBAAoB;EAE1B,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GAAG,EACD,MAAM,KACR,CAAC"}
|
|
@@ -22,7 +22,8 @@ var getShapeSize_exports = {};
|
|
|
22
22
|
__export(getShapeSize_exports, { getShapeSize: () => getShapeSize });
|
|
23
23
|
module.exports = __toCommonJS(getShapeSize_exports);
|
|
24
24
|
var import_size = require("@tamagui/size");
|
|
25
|
-
|
|
25
|
+
var import_web = require("@tamagui/web");
|
|
26
|
+
const getShapeSize = import_web.styled.dynamic((size, { tokens }) => {
|
|
26
27
|
const sizeToken = (0, import_size.resolveSizeToken)(size, "size");
|
|
27
28
|
const resolved = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken] ?? sizeToken;
|
|
28
29
|
const width = resolved;
|
|
@@ -35,4 +36,4 @@ const getShapeSize = (size, { tokens }) => {
|
|
|
35
36
|
maxHeight: height,
|
|
36
37
|
minHeight: height
|
|
37
38
|
};
|
|
38
|
-
};
|
|
39
|
+
});
|
|
@@ -24,7 +24,8 @@ var getShapeSize_exports = {};
|
|
|
24
24
|
__export(getShapeSize_exports, { getShapeSize: () => getShapeSize });
|
|
25
25
|
module.exports = __toCommonJS(getShapeSize_exports);
|
|
26
26
|
var import_size = require("@tamagui/size");
|
|
27
|
-
var
|
|
27
|
+
var import_web = require("@tamagui/web");
|
|
28
|
+
var getShapeSize = import_web.styled.dynamic(function(size, param) {
|
|
28
29
|
var { tokens } = param;
|
|
29
30
|
var sizeToken = (0, import_size.resolveSizeToken)(size, "size");
|
|
30
31
|
var _tokens_size_sizeToken;
|
|
@@ -39,4 +40,4 @@ var getShapeSize = function(size, param) {
|
|
|
39
40
|
maxHeight: height,
|
|
40
41
|
minHeight: height
|
|
41
42
|
};
|
|
42
|
-
};
|
|
43
|
+
});
|
|
@@ -24,7 +24,8 @@ var getShapeSize_exports = {};
|
|
|
24
24
|
__export(getShapeSize_exports, { getShapeSize: () => getShapeSize });
|
|
25
25
|
module.exports = __toCommonJS(getShapeSize_exports);
|
|
26
26
|
var import_size = require("@tamagui/size");
|
|
27
|
-
var
|
|
27
|
+
var import_web = require("@tamagui/web");
|
|
28
|
+
var getShapeSize = import_web.styled.dynamic(function(size, param) {
|
|
28
29
|
var { tokens } = param;
|
|
29
30
|
var sizeToken = (0, import_size.resolveSizeToken)(size, "size");
|
|
30
31
|
var _tokens_size_sizeToken;
|
|
@@ -39,6 +40,6 @@ var getShapeSize = function(size, param) {
|
|
|
39
40
|
maxHeight: height,
|
|
40
41
|
minHeight: height
|
|
41
42
|
};
|
|
42
|
-
};
|
|
43
|
+
});
|
|
43
44
|
|
|
44
45
|
//# sourceMappingURL=getShapeSize.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getShapeSize.native.js","names":[],"sources":["cjs/getShapeSize.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar getShapeSize_exports = {};\n__export(getShapeSize_exports, {\n getShapeSize: () => getShapeSize\n});\nmodule.exports = __toCommonJS(getShapeSize_exports);\nvar import_size = require(\"@tamagui/size\");\nvar getShapeSize = function(size, param) {\n var { tokens } = param;\n var sizeToken = (0, import_size.resolveSizeToken)(size, \"size\");\n var _tokens_size_sizeToken;\n var resolved = typeof sizeToken === \"number\" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;\n var width = resolved;\n var height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,uBAAuB,CAAC;AAC5B,SAAS,sBAAsB,EAC7B,oBAAoB,aACtB,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,eAAe,SAAS,MAAM,OAAO;
|
|
1
|
+
{"version":3,"file":"getShapeSize.native.js","names":[],"sources":["cjs/getShapeSize.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar getShapeSize_exports = {};\n__export(getShapeSize_exports, {\n getShapeSize: () => getShapeSize\n});\nmodule.exports = __toCommonJS(getShapeSize_exports);\nvar import_size = require(\"@tamagui/size\");\nvar import_web = require(\"@tamagui/web\");\nvar getShapeSize = import_web.styled.dynamic(function(size, param) {\n var { tokens } = param;\n var sizeToken = (0, import_size.resolveSizeToken)(size, \"size\");\n var _tokens_size_sizeToken;\n var resolved = typeof sizeToken === \"number\" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;\n var width = resolved;\n var height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n});\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,uBAAuB,CAAC;AAC5B,SAAS,sBAAsB,EAC7B,oBAAoB,aACtB,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,eAAe,WAAW,OAAO,QAAQ,SAAS,MAAM,OAAO;CACjE,IAAI,EAAE,WAAW;CACjB,IAAI,aAAa,GAAG,YAAY,iBAAgB,CAAE,MAAM,MAAM;CAC9D,IAAI;CACJ,IAAI,WAAW,OAAO,cAAc,WAAW,aAAa,yBAAyB,OAAO,KAAK,gBAAgB,QAAQ,2BAA2B,KAAK,IAAI,yBAAyB;CACtL,IAAI,QAAQ;CACZ,IAAI,SAAS;CACb,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF,CAAC"}
|
package/dist/esm/Square.mjs
CHANGED
|
@@ -7,10 +7,7 @@ const Square = styled(YStack, {
|
|
|
7
7
|
alignItems: "center",
|
|
8
8
|
justifyContent: "center",
|
|
9
9
|
variants: {
|
|
10
|
-
size:
|
|
11
|
-
number: getShapeSize,
|
|
12
|
-
Size: getShapeSize
|
|
13
|
-
},
|
|
10
|
+
size: getShapeSize,
|
|
14
11
|
circular: { true: { borderRadius: 1e5 } },
|
|
15
12
|
transparent: { true: { backgroundColor: "transparent" } }
|
|
16
13
|
}
|
package/dist/esm/Square.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Square.js","names":[],"sources":["esm/Square.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nconst Square = styled(\n YStack,\n {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size:
|
|
1
|
+
{"version":3,"file":"Square.js","names":[],"sources":["esm/Square.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nconst Square = styled(\n YStack,\n {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n },\n {\n memo: true\n }\n);\nexport {\n Square\n};\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;;;AAGA,MAAM,SAAS,OACb,QACA;CACE,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;EAEN,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GACA,EACE,MAAM,KACR,CACF"}
|
|
@@ -7,10 +7,7 @@ var Square = styled(YStack, {
|
|
|
7
7
|
alignItems: "center",
|
|
8
8
|
justifyContent: "center",
|
|
9
9
|
variants: {
|
|
10
|
-
size:
|
|
11
|
-
number: getShapeSize,
|
|
12
|
-
Size: getShapeSize
|
|
13
|
-
},
|
|
10
|
+
size: getShapeSize,
|
|
14
11
|
circular: { true: { borderRadius: 1e5 } },
|
|
15
12
|
transparent: { true: { backgroundColor: "transparent" } }
|
|
16
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Square.native.js","names":[],"sources":["esm/Square.native.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nvar Square = styled(YStack, {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size:
|
|
1
|
+
{"version":3,"file":"Square.native.js","names":[],"sources":["esm/Square.native.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nvar Square = styled(YStack, {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n}, {\n memo: true\n});\nexport {\n Square\n};\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;;;AAGA,IAAI,SAAS,OAAO,QAAQ;CAC1B,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;EAEN,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GAAG,EACD,MAAM,KACR,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolveSizeToken } from "@tamagui/size";
|
|
2
|
+
import { styled } from "@tamagui/web";
|
|
2
3
|
|
|
3
|
-
const getShapeSize = (size, { tokens }) => {
|
|
4
|
+
const getShapeSize = styled.dynamic((size, { tokens }) => {
|
|
4
5
|
const sizeToken = resolveSizeToken(size, "size");
|
|
5
6
|
const resolved = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken] ?? sizeToken;
|
|
6
7
|
const width = resolved;
|
|
@@ -13,7 +14,7 @@ const getShapeSize = (size, { tokens }) => {
|
|
|
13
14
|
maxHeight: height,
|
|
14
15
|
minHeight: height
|
|
15
16
|
};
|
|
16
|
-
};
|
|
17
|
+
});
|
|
17
18
|
|
|
18
19
|
export { getShapeSize };
|
|
19
20
|
//# sourceMappingURL=getShapeSize.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getShapeSize.js","names":[],"sources":["esm/getShapeSize.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nconst getShapeSize = (size, { tokens }) => {\n
|
|
1
|
+
{"version":3,"file":"getShapeSize.js","names":[],"sources":["esm/getShapeSize.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nimport { styled } from \"@tamagui/web\";\nconst getShapeSize = styled.dynamic(\n (size, { tokens }) => {\n const sizeToken = resolveSizeToken(size, \"size\");\n const resolved = typeof sizeToken === \"number\" ? sizeToken : tokens.size[sizeToken] ?? sizeToken;\n const width = resolved;\n const height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n }\n);\nexport {\n getShapeSize\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;;AAEA,MAAM,eAAe,OAAO,SACzB,MAAM,EAAE,aAAa;CACpB,MAAM,YAAY,iBAAiB,MAAM,MAAM;CAC/C,MAAM,WAAW,OAAO,cAAc,WAAW,YAAY,OAAO,KAAK,cAAc;CACvF,MAAM,QAAQ;CACd,MAAM,SAAS;CACf,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF,CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolveSizeToken } from "@tamagui/size";
|
|
2
|
+
import { styled } from "@tamagui/web";
|
|
2
3
|
|
|
3
|
-
var getShapeSize = function(size, param) {
|
|
4
|
+
var getShapeSize = styled.dynamic(function(size, param) {
|
|
4
5
|
var { tokens } = param;
|
|
5
6
|
var sizeToken = resolveSizeToken(size, "size");
|
|
6
7
|
var _tokens_size_sizeToken;
|
|
@@ -15,7 +16,7 @@ var getShapeSize = function(size, param) {
|
|
|
15
16
|
maxHeight: height,
|
|
16
17
|
minHeight: height
|
|
17
18
|
};
|
|
18
|
-
};
|
|
19
|
+
});
|
|
19
20
|
|
|
20
21
|
export { getShapeSize };
|
|
21
22
|
//# sourceMappingURL=getShapeSize.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getShapeSize.native.js","names":[],"sources":["esm/getShapeSize.native.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nvar getShapeSize = function(size, param) {\n var { tokens } = param;\n var sizeToken = resolveSizeToken(size, \"size\");\n var _tokens_size_sizeToken;\n var resolved = typeof sizeToken === \"number\" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;\n var width = resolved;\n var height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n};\nexport {\n getShapeSize\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getShapeSize.native.js","names":[],"sources":["esm/getShapeSize.native.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nimport { styled } from \"@tamagui/web\";\nvar getShapeSize = styled.dynamic(function(size, param) {\n var { tokens } = param;\n var sizeToken = resolveSizeToken(size, \"size\");\n var _tokens_size_sizeToken;\n var resolved = typeof sizeToken === \"number\" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;\n var width = resolved;\n var height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n});\nexport {\n getShapeSize\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;;AAEA,IAAI,eAAe,OAAO,QAAQ,SAAS,MAAM,OAAO;CACtD,IAAI,EAAE,WAAW;CACjB,IAAI,YAAY,iBAAiB,MAAM,MAAM;CAC7C,IAAI;CACJ,IAAI,WAAW,OAAO,cAAc,WAAW,aAAa,yBAAyB,OAAO,KAAK,gBAAgB,QAAQ,2BAA2B,KAAK,IAAI,yBAAyB;CACtL,IAAI,QAAQ;CACZ,IAAI,SAAS;CACb,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF,CAAC"}
|
package/dist/jsx/Square.mjs
CHANGED
|
@@ -7,10 +7,7 @@ const Square = styled(YStack, {
|
|
|
7
7
|
alignItems: "center",
|
|
8
8
|
justifyContent: "center",
|
|
9
9
|
variants: {
|
|
10
|
-
size:
|
|
11
|
-
number: getShapeSize,
|
|
12
|
-
Size: getShapeSize
|
|
13
|
-
},
|
|
10
|
+
size: getShapeSize,
|
|
14
11
|
circular: { true: { borderRadius: 1e5 } },
|
|
15
12
|
transparent: { true: { backgroundColor: "transparent" } }
|
|
16
13
|
}
|
package/dist/jsx/Square.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Square.js","names":[],"sources":["jsx/Square.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nconst Square = styled(\n YStack,\n {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size:
|
|
1
|
+
{"version":3,"file":"Square.js","names":[],"sources":["jsx/Square.js"],"sourcesContent":["import { YStack } from \"@tamagui/stacks\";\nimport { styled } from \"@tamagui/web\";\nimport { getShapeSize } from \"./getShapeSize\";\nconst Square = styled(\n YStack,\n {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n },\n {\n memo: true\n }\n);\nexport {\n Square\n};\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;;;AAGA,MAAM,SAAS,OACb,QACA;CACE,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;EAEN,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GACA,EACE,MAAM,KACR,CACF"}
|
|
@@ -31,10 +31,7 @@ var Square = (0, import_web.styled)(import_stacks.YStack, {
|
|
|
31
31
|
alignItems: "center",
|
|
32
32
|
justifyContent: "center",
|
|
33
33
|
variants: {
|
|
34
|
-
size:
|
|
35
|
-
number: import_getShapeSize.getShapeSize,
|
|
36
|
-
Size: import_getShapeSize.getShapeSize
|
|
37
|
-
},
|
|
34
|
+
size: import_getShapeSize.getShapeSize,
|
|
38
35
|
circular: { true: { borderRadius: 1e5 } },
|
|
39
36
|
transparent: { true: { backgroundColor: "transparent" } }
|
|
40
37
|
}
|
|
@@ -31,10 +31,7 @@ var Square = (0, import_web.styled)(import_stacks.YStack, {
|
|
|
31
31
|
alignItems: "center",
|
|
32
32
|
justifyContent: "center",
|
|
33
33
|
variants: {
|
|
34
|
-
size:
|
|
35
|
-
number: import_getShapeSize.getShapeSize,
|
|
36
|
-
Size: import_getShapeSize.getShapeSize
|
|
37
|
-
},
|
|
34
|
+
size: import_getShapeSize.getShapeSize,
|
|
38
35
|
circular: { true: { borderRadius: 1e5 } },
|
|
39
36
|
transparent: { true: { backgroundColor: "transparent" } }
|
|
40
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Square.native.js","names":[],"sources":["jsx/Square.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Square_exports = {};\n__export(Square_exports, {\n Square: () => Square\n});\nmodule.exports = __toCommonJS(Square_exports);\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_web = require(\"@tamagui/web\");\nvar import_getShapeSize = require(\"./getShapeSize\");\nvar Square = (0, import_web.styled)(import_stacks.YStack, {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size:
|
|
1
|
+
{"version":3,"file":"Square.native.js","names":[],"sources":["jsx/Square.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Square_exports = {};\n__export(Square_exports, {\n Square: () => Square\n});\nmodule.exports = __toCommonJS(Square_exports);\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_web = require(\"@tamagui/web\");\nvar import_getShapeSize = require(\"./getShapeSize\");\nvar Square = (0, import_web.styled)(import_stacks.YStack, {\n displayName: \"Square\",\n alignItems: \"center\",\n justifyContent: \"center\",\n variants: {\n size: import_getShapeSize.getShapeSize,\n // shape modifiers formerly inherited from ThemeableStack (now removed).\n circular: {\n true: {\n borderRadius: 1e5\n }\n },\n transparent: {\n true: {\n backgroundColor: \"transparent\"\n }\n }\n }\n}, {\n memo: true\n});\n//# sourceMappingURL=Square.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iBAAiB,CAAC;AACtB,SAAS,gBAAgB,EACvB,cAAc,OAChB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,sBAAsB,QAAQ,0BAAgB;AAClD,IAAI,UAAU,GAAG,WAAW,OAAM,CAAE,cAAc,QAAQ;CACxD,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM,oBAAoB;EAE1B,UAAU,EACR,MAAM,EACJ,cAAc,IAChB,EACF;EACA,aAAa,EACX,MAAM,EACJ,iBAAiB,cACnB,EACF;CACF;AACF,GAAG,EACD,MAAM,KACR,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { resolveSizeToken } from "@tamagui/size";
|
|
2
|
+
import { styled } from "@tamagui/web";
|
|
2
3
|
|
|
3
|
-
const getShapeSize = (size, { tokens }) => {
|
|
4
|
+
const getShapeSize = styled.dynamic((size, { tokens }) => {
|
|
4
5
|
const sizeToken = resolveSizeToken(size, "size");
|
|
5
6
|
const resolved = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken] ?? sizeToken;
|
|
6
7
|
const width = resolved;
|
|
@@ -13,7 +14,7 @@ const getShapeSize = (size, { tokens }) => {
|
|
|
13
14
|
maxHeight: height,
|
|
14
15
|
minHeight: height
|
|
15
16
|
};
|
|
16
|
-
};
|
|
17
|
+
});
|
|
17
18
|
|
|
18
19
|
export { getShapeSize };
|
|
19
20
|
//# sourceMappingURL=getShapeSize.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getShapeSize.js","names":[],"sources":["jsx/getShapeSize.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nconst getShapeSize = (size, { tokens }) => {\n
|
|
1
|
+
{"version":3,"file":"getShapeSize.js","names":[],"sources":["jsx/getShapeSize.js"],"sourcesContent":["import { resolveSizeToken } from \"@tamagui/size\";\nimport { styled } from \"@tamagui/web\";\nconst getShapeSize = styled.dynamic(\n (size, { tokens }) => {\n const sizeToken = resolveSizeToken(size, \"size\");\n const resolved = typeof sizeToken === \"number\" ? sizeToken : tokens.size[sizeToken] ?? sizeToken;\n const width = resolved;\n const height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n }\n);\nexport {\n getShapeSize\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;;AAEA,MAAM,eAAe,OAAO,SACzB,MAAM,EAAE,aAAa;CACpB,MAAM,YAAY,iBAAiB,MAAM,MAAM;CAC/C,MAAM,WAAW,OAAO,cAAc,WAAW,YAAY,OAAO,KAAK,cAAc;CACvF,MAAM,QAAQ;CACd,MAAM,SAAS;CACf,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF,CACF"}
|
|
@@ -24,7 +24,8 @@ var getShapeSize_exports = {};
|
|
|
24
24
|
__export(getShapeSize_exports, { getShapeSize: () => getShapeSize });
|
|
25
25
|
module.exports = __toCommonJS(getShapeSize_exports);
|
|
26
26
|
var import_size = require("@tamagui/size");
|
|
27
|
-
var
|
|
27
|
+
var import_web = require("@tamagui/web");
|
|
28
|
+
var getShapeSize = import_web.styled.dynamic(function(size, param) {
|
|
28
29
|
var { tokens } = param;
|
|
29
30
|
var sizeToken = (0, import_size.resolveSizeToken)(size, "size");
|
|
30
31
|
var _tokens_size_sizeToken;
|
|
@@ -39,4 +40,4 @@ var getShapeSize = function(size, param) {
|
|
|
39
40
|
maxHeight: height,
|
|
40
41
|
minHeight: height
|
|
41
42
|
};
|
|
42
|
-
};
|
|
43
|
+
});
|
|
@@ -24,7 +24,8 @@ var getShapeSize_exports = {};
|
|
|
24
24
|
__export(getShapeSize_exports, { getShapeSize: () => getShapeSize });
|
|
25
25
|
module.exports = __toCommonJS(getShapeSize_exports);
|
|
26
26
|
var import_size = require("@tamagui/size");
|
|
27
|
-
var
|
|
27
|
+
var import_web = require("@tamagui/web");
|
|
28
|
+
var getShapeSize = import_web.styled.dynamic(function(size, param) {
|
|
28
29
|
var { tokens } = param;
|
|
29
30
|
var sizeToken = (0, import_size.resolveSizeToken)(size, "size");
|
|
30
31
|
var _tokens_size_sizeToken;
|
|
@@ -39,6 +40,6 @@ var getShapeSize = function(size, param) {
|
|
|
39
40
|
maxHeight: height,
|
|
40
41
|
minHeight: height
|
|
41
42
|
};
|
|
42
|
-
};
|
|
43
|
+
});
|
|
43
44
|
|
|
44
45
|
//# sourceMappingURL=getShapeSize.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getShapeSize.native.js","names":[],"sources":["jsx/getShapeSize.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar getShapeSize_exports = {};\n__export(getShapeSize_exports, {\n getShapeSize: () => getShapeSize\n});\nmodule.exports = __toCommonJS(getShapeSize_exports);\nvar import_size = require(\"@tamagui/size\");\nvar getShapeSize = function(size, param) {\n var { tokens } = param;\n var sizeToken = (0, import_size.resolveSizeToken)(size, \"size\");\n var _tokens_size_sizeToken;\n var resolved = typeof sizeToken === \"number\" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;\n var width = resolved;\n var height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n};\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,uBAAuB,CAAC;AAC5B,SAAS,sBAAsB,EAC7B,oBAAoB,aACtB,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,eAAe,SAAS,MAAM,OAAO;
|
|
1
|
+
{"version":3,"file":"getShapeSize.native.js","names":[],"sources":["jsx/getShapeSize.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar getShapeSize_exports = {};\n__export(getShapeSize_exports, {\n getShapeSize: () => getShapeSize\n});\nmodule.exports = __toCommonJS(getShapeSize_exports);\nvar import_size = require(\"@tamagui/size\");\nvar import_web = require(\"@tamagui/web\");\nvar getShapeSize = import_web.styled.dynamic(function(size, param) {\n var { tokens } = param;\n var sizeToken = (0, import_size.resolveSizeToken)(size, \"size\");\n var _tokens_size_sizeToken;\n var resolved = typeof sizeToken === \"number\" ? sizeToken : (_tokens_size_sizeToken = tokens.size[sizeToken]) !== null && _tokens_size_sizeToken !== void 0 ? _tokens_size_sizeToken : sizeToken;\n var width = resolved;\n var height = resolved;\n return {\n width,\n height,\n minWidth: width,\n maxWidth: width,\n maxHeight: height,\n minHeight: height\n };\n});\n//# sourceMappingURL=getShapeSize.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,uBAAuB,CAAC;AAC5B,SAAS,sBAAsB,EAC7B,oBAAoB,aACtB,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,aAAa,QAAQ,cAAc;AACvC,IAAI,eAAe,WAAW,OAAO,QAAQ,SAAS,MAAM,OAAO;CACjE,IAAI,EAAE,WAAW;CACjB,IAAI,aAAa,GAAG,YAAY,iBAAgB,CAAE,MAAM,MAAM;CAC9D,IAAI;CACJ,IAAI,WAAW,OAAO,cAAc,WAAW,aAAa,yBAAyB,OAAO,KAAK,gBAAgB,QAAQ,2BAA2B,KAAK,IAAI,yBAAyB;CACtL,IAAI,QAAQ;CACZ,IAAI,SAAS;CACb,OAAO;EACL;EACA;EACA,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/shapes",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.889.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"clean:build": "tamagui-build clean:build"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tamagui/size": "3.0.0-beta.
|
|
38
|
-
"@tamagui/stacks": "3.0.0-beta.
|
|
39
|
-
"@tamagui/web": "3.0.0-beta.
|
|
37
|
+
"@tamagui/size": "3.0.0-beta.889.1",
|
|
38
|
+
"@tamagui/stacks": "3.0.0-beta.889.1",
|
|
39
|
+
"@tamagui/web": "3.0.0-beta.889.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "3.0.0-beta.
|
|
42
|
+
"@tamagui/build": "3.0.0-beta.889.1",
|
|
43
43
|
"react": "19.2.3"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
package/src/Square.tsx
CHANGED
|
@@ -12,10 +12,7 @@ export const Square = styled(
|
|
|
12
12
|
justifyContent: 'center',
|
|
13
13
|
|
|
14
14
|
variants: {
|
|
15
|
-
size:
|
|
16
|
-
number: getShapeSize,
|
|
17
|
-
Size: getShapeSize,
|
|
18
|
-
},
|
|
15
|
+
size: getShapeSize,
|
|
19
16
|
|
|
20
17
|
// shape modifiers formerly inherited from ThemeableStack (now removed).
|
|
21
18
|
circular: {
|
package/src/getShapeSize.tsx
CHANGED
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import type { YStackProps } from '@tamagui/stacks'
|
|
2
1
|
import { resolveSizeToken } from '@tamagui/size'
|
|
3
|
-
import type
|
|
2
|
+
import { styled, type SizeTokens } from '@tamagui/web'
|
|
4
3
|
|
|
5
|
-
export const getShapeSize
|
|
6
|
-
size,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
minHeight: height,
|
|
4
|
+
export const getShapeSize = styled.dynamic<SizeTokens | number | true>(
|
|
5
|
+
(size, { tokens }) => {
|
|
6
|
+
const sizeToken = resolveSizeToken(size, 'size')
|
|
7
|
+
// a numeric size is a literal pixel value, never a token index. the size
|
|
8
|
+
// scale is keyed by numeric-looking strings ('60'), so indexing it with a
|
|
9
|
+
// number silently turns <Square size={60} /> into that token's value.
|
|
10
|
+
// resolveTokenSize in @tamagui/size draws the same line.
|
|
11
|
+
const resolved =
|
|
12
|
+
typeof sizeToken === 'number' ? sizeToken : (tokens.size[sizeToken] ?? sizeToken)
|
|
13
|
+
const width = resolved
|
|
14
|
+
const height = resolved
|
|
15
|
+
return {
|
|
16
|
+
width,
|
|
17
|
+
height,
|
|
18
|
+
minWidth: width,
|
|
19
|
+
maxWidth: width,
|
|
20
|
+
maxHeight: height,
|
|
21
|
+
minHeight: height,
|
|
22
|
+
}
|
|
25
23
|
}
|
|
26
|
-
|
|
24
|
+
)
|
package/types/Circle.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { GetProps } from '@tamagui/web';
|
|
2
2
|
export declare const Circle: import("react").FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "circular" | "elevation" | "size" | "transparent" | keyof import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithFlatVariantValues<{
|
|
3
3
|
circular?: boolean | undefined;
|
|
4
|
-
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
4
|
+
elevation?: number | false | import("@tamagui/web").Size | undefined;
|
|
5
5
|
size?: number | import("@tamagui/web").Size | undefined;
|
|
6
6
|
transparent?: boolean | undefined;
|
|
7
7
|
}> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & {
|
|
8
8
|
ref?: import("react").Ref<import("@tamagui/web").TamaguiElement> | undefined;
|
|
9
9
|
}> & import("@tamagui/web").StaticComponentObject<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
10
10
|
circular?: boolean | undefined;
|
|
11
|
-
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
11
|
+
elevation?: number | false | import("@tamagui/web").Size | undefined;
|
|
12
12
|
size?: number | import("@tamagui/web").Size | undefined;
|
|
13
13
|
transparent?: boolean | undefined;
|
|
14
14
|
}, import("@tamagui/web").StaticConfigPublic & {
|
|
@@ -18,7 +18,7 @@ export declare const Circle: import("react").FunctionComponent<Omit<import("@tam
|
|
|
18
18
|
}, "staticConfig"> & {
|
|
19
19
|
__tama: [import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
20
20
|
circular?: boolean | undefined;
|
|
21
|
-
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
21
|
+
elevation?: number | false | import("@tamagui/web").Size | undefined;
|
|
22
22
|
size?: number | import("@tamagui/web").Size | undefined;
|
|
23
23
|
transparent?: boolean | undefined;
|
|
24
24
|
}, import("@tamagui/web").StaticConfigPublic & {
|
package/types/Square.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { GetProps } from '@tamagui/web';
|
|
2
2
|
export declare const Square: import("react").FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "circular" | "elevation" | "size" | "transparent" | keyof import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase> & import("@tamagui/web").WithFlatVariantValues<{
|
|
3
3
|
circular?: boolean | undefined;
|
|
4
|
-
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
4
|
+
elevation?: number | false | import("@tamagui/web").Size | undefined;
|
|
5
5
|
size?: number | import("@tamagui/web").Size | undefined;
|
|
6
6
|
transparent?: boolean | undefined;
|
|
7
7
|
}> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & {
|
|
8
8
|
ref?: import("react").Ref<import("@tamagui/web").TamaguiElement> | undefined;
|
|
9
9
|
}> & import("@tamagui/web").StaticComponentObject<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
10
10
|
circular?: boolean | undefined;
|
|
11
|
-
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
11
|
+
elevation?: number | false | import("@tamagui/web").Size | undefined;
|
|
12
12
|
size?: number | import("@tamagui/web").Size | undefined;
|
|
13
13
|
transparent?: boolean | undefined;
|
|
14
14
|
}, import("@tamagui/web").StaticConfigPublic & {
|
|
@@ -18,7 +18,7 @@ export declare const Square: import("react").FunctionComponent<Omit<import("@tam
|
|
|
18
18
|
}, "staticConfig"> & {
|
|
19
19
|
__tama: [import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
|
|
20
20
|
circular?: boolean | undefined;
|
|
21
|
-
elevation?: number | import("@tamagui/web").Size | undefined;
|
|
21
|
+
elevation?: number | false | import("@tamagui/web").Size | undefined;
|
|
22
22
|
size?: number | import("@tamagui/web").Size | undefined;
|
|
23
23
|
transparent?: boolean | undefined;
|
|
24
24
|
}, import("@tamagui/web").StaticConfigPublic & {
|
package/types/Square.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Square.d.ts","sourceRoot":"","sources":["../src/Square.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Square.d.ts","sourceRoot":"","sources":["../src/Square.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAK5C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;CA2BlB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAA"}
|
package/types/getShapeSize.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import type { SizeVariantSpreadFunction } from '@tamagui/web';
|
|
3
|
-
export declare const getShapeSize: SizeVariantSpreadFunction<YStackProps>;
|
|
1
|
+
export declare const getShapeSize: import("@tamagui/web/types/types").StyledDynamicFn<number | import("@tamagui/web").Size, Record<string, any>>;
|
|
4
2
|
//# sourceMappingURL=getShapeSize.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getShapeSize.d.ts","sourceRoot":"","sources":["../src/getShapeSize.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getShapeSize.d.ts","sourceRoot":"","sources":["../src/getShapeSize.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,+GAoBxB,CAAA"}
|