@tamagui/stacks 2.7.7 → 3.0.0-beta.637.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/NestingContext.cjs +18 -26
- package/dist/cjs/NestingContext.native.cjs +34 -0
- package/dist/cjs/NestingContext.native.js +19 -26
- package/dist/cjs/NestingContext.native.js.map +1 -1
- package/dist/cjs/Stacks.cjs +28 -41
- package/dist/cjs/Stacks.native.cjs +51 -0
- package/dist/cjs/Stacks.native.js +28 -40
- package/dist/cjs/Stacks.native.js.map +1 -1
- package/dist/cjs/getElevation.cjs +52 -55
- package/dist/cjs/getElevation.native.cjs +71 -0
- package/dist/cjs/getElevation.native.js +55 -56
- package/dist/cjs/getElevation.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -13
- package/dist/cjs/index.native.cjs +23 -0
- package/dist/cjs/index.native.js +10 -12
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/NestingContext.mjs +2 -0
- package/dist/esm/NestingContext.mjs.map +1 -1
- package/dist/esm/NestingContext.native.js +3 -1
- package/dist/esm/NestingContext.native.js.map +1 -1
- package/dist/esm/Stacks.mjs +14 -23
- package/dist/esm/Stacks.mjs.map +1 -1
- package/dist/esm/Stacks.native.js +14 -23
- package/dist/esm/Stacks.native.js.map +1 -1
- package/dist/esm/getElevation.mjs +39 -39
- package/dist/esm/getElevation.mjs.map +1 -1
- package/dist/esm/getElevation.native.js +42 -41
- package/dist/esm/getElevation.native.js.map +1 -1
- package/dist/esm/index.js +5 -6
- package/dist/esm/index.mjs +5 -6
- package/dist/esm/index.native.js +5 -6
- package/dist/jsx/NestingContext.mjs +2 -0
- package/dist/jsx/NestingContext.mjs.map +1 -1
- package/dist/jsx/NestingContext.native.cjs +34 -0
- package/dist/jsx/NestingContext.native.js +19 -26
- package/dist/jsx/NestingContext.native.js.map +1 -1
- package/dist/jsx/Stacks.mjs +14 -23
- package/dist/jsx/Stacks.mjs.map +1 -1
- package/dist/jsx/Stacks.native.cjs +51 -0
- package/dist/jsx/Stacks.native.js +28 -40
- package/dist/jsx/Stacks.native.js.map +1 -1
- package/dist/jsx/getElevation.mjs +39 -39
- package/dist/jsx/getElevation.mjs.map +1 -1
- package/dist/jsx/getElevation.native.cjs +71 -0
- package/dist/jsx/getElevation.native.js +55 -56
- package/dist/jsx/getElevation.native.js.map +1 -1
- package/dist/jsx/index.js +5 -6
- package/dist/jsx/index.mjs +5 -6
- package/dist/jsx/index.native.cjs +23 -0
- package/dist/jsx/index.native.js +10 -12
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +4 -5
- package/src/Stacks.tsx +2 -16
- package/src/getElevation.tsx +16 -9
- package/src/index.ts +0 -2
- package/types/Stacks.d.ts +39 -20
- package/types/Stacks.d.ts.map +1 -1
- package/types/getElevation.d.ts +2 -2
- package/types/getElevation.d.ts.map +1 -1
- package/types/index.d.ts +0 -2
- package/types/index.d.ts.map +1 -1
- package/dist/cjs/SizableStack.cjs +0 -52
- package/dist/cjs/SizableStack.native.js +0 -55
- package/dist/cjs/SizableStack.native.js.map +0 -1
- package/dist/cjs/ThemeableStack.cjs +0 -63
- package/dist/cjs/ThemeableStack.native.js +0 -66
- package/dist/cjs/ThemeableStack.native.js.map +0 -1
- package/dist/cjs/variants.cjs +0 -68
- package/dist/cjs/variants.native.js +0 -73
- package/dist/cjs/variants.native.js.map +0 -1
- package/dist/esm/SizableStack.mjs +0 -27
- package/dist/esm/SizableStack.mjs.map +0 -1
- package/dist/esm/SizableStack.native.js +0 -27
- package/dist/esm/SizableStack.native.js.map +0 -1
- package/dist/esm/ThemeableStack.mjs +0 -37
- package/dist/esm/ThemeableStack.mjs.map +0 -1
- package/dist/esm/ThemeableStack.native.js +0 -37
- package/dist/esm/ThemeableStack.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/variants.mjs +0 -41
- package/dist/esm/variants.mjs.map +0 -1
- package/dist/esm/variants.native.js +0 -43
- package/dist/esm/variants.native.js.map +0 -1
- package/dist/jsx/SizableStack.mjs +0 -27
- package/dist/jsx/SizableStack.mjs.map +0 -1
- package/dist/jsx/SizableStack.native.js +0 -55
- package/dist/jsx/SizableStack.native.js.map +0 -1
- package/dist/jsx/ThemeableStack.mjs +0 -37
- package/dist/jsx/ThemeableStack.mjs.map +0 -1
- package/dist/jsx/ThemeableStack.native.js +0 -66
- package/dist/jsx/ThemeableStack.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/variants.mjs +0 -41
- package/dist/jsx/variants.mjs.map +0 -1
- package/dist/jsx/variants.native.js +0 -73
- package/dist/jsx/variants.native.js.map +0 -1
- package/src/SizableStack.tsx +0 -33
- package/src/ThemeableStack.tsx +0 -47
- package/src/variants.tsx +0 -38
- package/types/SizableStack.d.ts +0 -14
- package/types/SizableStack.d.ts.map +0 -1
- package/types/ThemeableStack.d.ts +0 -87
- package/types/ThemeableStack.d.ts.map +0 -1
- package/types/variants.d.ts +0 -28
- package/types/variants.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"getElevation.native.js","names":[],"sources":["esm/getElevation.native.js"],"sourcesContent":["import { getVariableValue, isAndroid, isVariable, resolveSizeToken } from \"@tamagui/core\";\nvar getElevation = function(size, extras) {\n if (!size) return;\n var { tokens } = extras;\n var sizeToken = resolveSizeToken(size, \"size\");\n if (typeof sizeToken === \"number\") return getSizedElevation(sizeToken, extras);\n var token = tokens.size[sizeToken];\n var sizeNum = isVariable(token) ? +token.val : size;\n return getSizedElevation(sizeNum, extras);\n};\nvar getSizedElevation = function(val, param) {\n var { theme, tokens } = param;\n var num = 0;\n if (typeof val === \"number\") {\n num = val;\n } else if (val) {\n var sizeToken = resolveSizeToken(val, \"size\");\n var token = typeof sizeToken === \"number\" ? sizeToken : tokens.size[sizeToken];\n var tokenValue = getVariableValue(token);\n if (typeof tokenValue === \"number\") {\n num = tokenValue;\n } else {\n num = 10;\n }\n }\n if (num === 0) {\n return;\n }\n var [height, shadowRadius] = [\n Math.round(num / 4 + 1),\n Math.round(num / 2 + 2)\n ];\n var _theme_shadowcolor;\n var shadowColor = (_theme_shadowcolor = theme[\"shadow-color\"]) !== null && _theme_shadowcolor !== void 0 ? _theme_shadowcolor : theme.shadowColor;\n var shadow = {\n shadowColor,\n shadowRadius,\n shadowOffset: {\n height,\n width: 0\n },\n ...isAndroid ? {\n elevationAndroid: 2 * height\n } : {}\n };\n return shadow;\n};\nexport {\n getElevation,\n getSizedElevation\n};\n//# sourceMappingURL=getElevation.js.map\n"],"mappings":";;;AACA,IAAI,eAAe,SAAS,MAAM,QAAQ;CACxC,IAAI,CAAC,MAAM;CACX,IAAI,EAAE,WAAW;CACjB,IAAI,YAAY,iBAAiB,MAAM,MAAM;CAC7C,IAAI,OAAO,cAAc,UAAU,OAAO,kBAAkB,WAAW,MAAM;CAC7E,IAAI,QAAQ,OAAO,KAAK;CACxB,IAAI,UAAU,WAAW,KAAK,IAAI,CAAC,MAAM,MAAM;CAC/C,OAAO,kBAAkB,SAAS,MAAM;AAC1C;AACA,IAAI,oBAAoB,SAAS,KAAK,OAAO;CAC3C,IAAI,EAAE,OAAO,WAAW;CACxB,IAAI,MAAM;CACV,IAAI,OAAO,QAAQ,UAAU;EAC3B,MAAM;CACR,OAAO,IAAI,KAAK;EACd,IAAI,YAAY,iBAAiB,KAAK,MAAM;EAC5C,IAAI,QAAQ,OAAO,cAAc,WAAW,YAAY,OAAO,KAAK;EACpE,IAAI,aAAa,iBAAiB,KAAK;EACvC,IAAI,OAAO,eAAe,UAAU;GAClC,MAAM;EACR,OAAO;GACL,MAAM;EACR;CACF;CACA,IAAI,QAAQ,GAAG;EACb;CACF;CACA,IAAI,CAAC,QAAQ,gBAAgB,CAC3B,KAAK,MAAM,MAAM,IAAI,CAAC,GACtB,KAAK,MAAM,MAAM,IAAI,CAAC,CACxB;CACA,IAAI;CACJ,IAAI,eAAe,qBAAqB,MAAM,qBAAqB,QAAQ,uBAAuB,KAAK,IAAI,qBAAqB,MAAM;CACtI,IAAI,SAAS;EACX;EACA;EACA,cAAc;GACZ;GACA,OAAO;EACT;EACA,GAAG,YAAY,EACb,kBAAkB,IAAI,OACxB,IAAI,CAAC;CACP;CACA,OAAO;AACT"}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from "./Stacks.mjs"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
5
|
-
export * from "./getElevation.mjs"
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from "./Stacks.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./NestingContext.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./getElevation.mjs"
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from "./Stacks.mjs"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
5
|
-
export * from "./getElevation.mjs"
|
|
6
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
export * from "./Stacks.mjs"
|
|
2
|
+
|
|
3
|
+
export * from "./NestingContext.mjs"
|
|
4
|
+
|
|
5
|
+
export * from "./getElevation.mjs"
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from "./Stacks.native.js"
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
|
|
5
|
-
export * from "./getElevation.native.js"
|
|
6
|
-
//# sourceMappingURL=index.native.js.map
|
|
1
|
+
export * from "./Stacks.native.js"
|
|
2
|
+
|
|
3
|
+
export * from "./NestingContext.native.js"
|
|
4
|
+
|
|
5
|
+
export * from "./getElevation.native.js"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"NestingContext.js","names":[],"sources":["jsx/NestingContext.js"],"sourcesContent":["import React from \"react\";\nconst ButtonNestingContext = React.createContext(false);\nexport {\n ButtonNestingContext\n};\n//# sourceMappingURL=NestingContext.js.map\n"],"mappings":";;;AACA,MAAM,uBAAuB,MAAM,cAAc,KAAK"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: () => from[key],
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
28
|
+
}) : target, mod));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var NestingContext_exports = {};
|
|
31
|
+
__export(NestingContext_exports, { ButtonNestingContext: () => ButtonNestingContext });
|
|
32
|
+
module.exports = __toCommonJS(NestingContext_exports);
|
|
33
|
+
var import_react = __toESM(require("react"), 1);
|
|
34
|
+
var ButtonNestingContext = /* @__PURE__ */ import_react.default.createContext(false);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __create = Object.create;
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -7,37 +8,29 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
10
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
14
15
|
};
|
|
15
16
|
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: () => from[key],
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
23
24
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
-
value: mod,
|
|
31
|
-
enumerable: true
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
32
28
|
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
30
|
var NestingContext_exports = {};
|
|
37
|
-
__export(NestingContext_exports, {
|
|
38
|
-
ButtonNestingContext: () => ButtonNestingContext
|
|
39
|
-
});
|
|
31
|
+
__export(NestingContext_exports, { ButtonNestingContext: () => ButtonNestingContext });
|
|
40
32
|
module.exports = __toCommonJS(NestingContext_exports);
|
|
41
33
|
var import_react = __toESM(require("react"), 1);
|
|
42
|
-
var ButtonNestingContext = /* @__PURE__ */import_react.default.createContext(false);
|
|
34
|
+
var ButtonNestingContext = /* @__PURE__ */ import_react.default.createContext(false);
|
|
35
|
+
|
|
43
36
|
//# sourceMappingURL=NestingContext.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"NestingContext.native.js","names":[],"sources":["jsx/NestingContext.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar NestingContext_exports = {};\n__export(NestingContext_exports, {\n ButtonNestingContext: () => ButtonNestingContext\n});\nmodule.exports = __toCommonJS(NestingContext_exports);\nvar import_react = __toESM(require(\"react\"), 1);\nvar ButtonNestingContext = /* @__PURE__ */ import_react.default.createContext(false);\n//# sourceMappingURL=NestingContext.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,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,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,yBAAyB,CAAC;AAC9B,SAAS,wBAAwB,EAC/B,4BAA4B,qBAC9B,CAAC;AACD,OAAO,UAAU,aAAa,sBAAsB;AACpD,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,IAAI,uBAAuC,6BAAa,QAAQ,cAAc,KAAK"}
|
package/dist/jsx/Stacks.mjs
CHANGED
|
@@ -1,34 +1,25 @@
|
|
|
1
1
|
import { View, styled } from "@tamagui/core";
|
|
2
2
|
import { getElevation } from "./getElevation.mjs";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
fullscreen: {
|
|
9
|
-
true: fullscreenStyle
|
|
10
|
-
},
|
|
11
|
-
elevation: {
|
|
12
|
-
"...size": getElevation,
|
|
13
|
-
":number": getElevation
|
|
14
|
-
}
|
|
15
|
-
};
|
|
3
|
+
|
|
4
|
+
const variants = { elevation: {
|
|
5
|
+
number: getElevation,
|
|
6
|
+
Size: getElevation
|
|
7
|
+
} };
|
|
16
8
|
const YStack = styled(View, {
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
flexDirection: "column",
|
|
10
|
+
variants
|
|
19
11
|
});
|
|
20
12
|
YStack["displayName"] = "YStack";
|
|
21
13
|
const XStack = styled(View, {
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
flexDirection: "row",
|
|
15
|
+
variants
|
|
24
16
|
});
|
|
25
17
|
XStack["displayName"] = "XStack";
|
|
26
|
-
const ZStack = styled(YStack, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
neverFlatten: true,
|
|
30
|
-
isZStack: true
|
|
18
|
+
const ZStack = styled(YStack, { position: "relative" }, {
|
|
19
|
+
neverFlatten: true,
|
|
20
|
+
isZStack: true
|
|
31
21
|
});
|
|
32
22
|
ZStack["displayName"] = "ZStack";
|
|
33
|
-
|
|
23
|
+
|
|
24
|
+
export { XStack, YStack, ZStack };
|
|
34
25
|
//# sourceMappingURL=Stacks.mjs.map
|
package/dist/jsx/Stacks.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Stacks.js","names":[],"sources":["jsx/Stacks.js"],"sourcesContent":["import { View, styled } from \"@tamagui/core\";\nimport { getElevation } from \"./getElevation\";\nconst variants = {\n elevation: {\n number: getElevation,\n Size: getElevation\n }\n};\nconst YStack = styled(View, {\n flexDirection: \"column\",\n variants\n});\nYStack[\"displayName\"] = \"YStack\";\nconst XStack = styled(View, {\n flexDirection: \"row\",\n variants\n});\nXStack[\"displayName\"] = \"XStack\";\nconst ZStack = styled(\n YStack,\n {\n position: \"relative\"\n },\n {\n neverFlatten: true,\n isZStack: true\n }\n);\nZStack[\"displayName\"] = \"ZStack\";\nexport {\n XStack,\n YStack,\n ZStack\n};\n//# sourceMappingURL=Stacks.js.map\n"],"mappings":";;;;AAEA,MAAM,WAAW,EACf,WAAW;CACT,QAAQ;CACR,MAAM;AACR,EACF;AACA,MAAM,SAAS,OAAO,MAAM;CAC1B,eAAe;CACf;AACF,CAAC;AACD,OAAO,iBAAiB;AACxB,MAAM,SAAS,OAAO,MAAM;CAC1B,eAAe;CACf;AACF,CAAC;AACD,OAAO,iBAAiB;AACxB,MAAM,SAAS,OACb,QACA,EACE,UAAU,WACZ,GACA;CACE,cAAc;CACd,UAAU;AACZ,CACF;AACA,OAAO,iBAAiB"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var Stacks_exports = {};
|
|
25
|
+
__export(Stacks_exports, {
|
|
26
|
+
XStack: () => XStack,
|
|
27
|
+
YStack: () => YStack,
|
|
28
|
+
ZStack: () => ZStack
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(Stacks_exports);
|
|
31
|
+
var import_core = require("@tamagui/core");
|
|
32
|
+
var import_getElevation = require("./getElevation.native.js");
|
|
33
|
+
var variants = { elevation: {
|
|
34
|
+
number: import_getElevation.getElevation,
|
|
35
|
+
Size: import_getElevation.getElevation
|
|
36
|
+
} };
|
|
37
|
+
var YStack = (0, import_core.styled)(import_core.View, {
|
|
38
|
+
flexDirection: "column",
|
|
39
|
+
variants
|
|
40
|
+
});
|
|
41
|
+
YStack["displayName"] = "YStack";
|
|
42
|
+
var XStack = (0, import_core.styled)(import_core.View, {
|
|
43
|
+
flexDirection: "row",
|
|
44
|
+
variants
|
|
45
|
+
});
|
|
46
|
+
XStack["displayName"] = "XStack";
|
|
47
|
+
var ZStack = (0, import_core.styled)(YStack, { position: "relative" }, {
|
|
48
|
+
neverFlatten: true,
|
|
49
|
+
isZStack: true
|
|
50
|
+
});
|
|
51
|
+
ZStack["displayName"] = "ZStack";
|
|
@@ -1,65 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
24
|
var Stacks_exports = {};
|
|
26
25
|
__export(Stacks_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
fullscreenStyle: () => fullscreenStyle
|
|
26
|
+
XStack: () => XStack,
|
|
27
|
+
YStack: () => YStack,
|
|
28
|
+
ZStack: () => ZStack
|
|
31
29
|
});
|
|
32
30
|
module.exports = __toCommonJS(Stacks_exports);
|
|
33
31
|
var import_core = require("@tamagui/core");
|
|
34
32
|
var import_getElevation = require("./getElevation.native.js");
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
var variants = {
|
|
40
|
-
fullscreen: {
|
|
41
|
-
true: fullscreenStyle
|
|
42
|
-
},
|
|
43
|
-
elevation: {
|
|
44
|
-
"...size": import_getElevation.getElevation,
|
|
45
|
-
":number": import_getElevation.getElevation
|
|
46
|
-
}
|
|
47
|
-
};
|
|
33
|
+
var variants = { elevation: {
|
|
34
|
+
number: import_getElevation.getElevation,
|
|
35
|
+
Size: import_getElevation.getElevation
|
|
36
|
+
} };
|
|
48
37
|
var YStack = (0, import_core.styled)(import_core.View, {
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
flexDirection: "column",
|
|
39
|
+
variants
|
|
51
40
|
});
|
|
52
41
|
YStack["displayName"] = "YStack";
|
|
53
42
|
var XStack = (0, import_core.styled)(import_core.View, {
|
|
54
|
-
|
|
55
|
-
|
|
43
|
+
flexDirection: "row",
|
|
44
|
+
variants
|
|
56
45
|
});
|
|
57
46
|
XStack["displayName"] = "XStack";
|
|
58
|
-
var ZStack = (0, import_core.styled)(YStack, {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
neverFlatten: true,
|
|
62
|
-
isZStack: true
|
|
47
|
+
var ZStack = (0, import_core.styled)(YStack, { position: "relative" }, {
|
|
48
|
+
neverFlatten: true,
|
|
49
|
+
isZStack: true
|
|
63
50
|
});
|
|
64
51
|
ZStack["displayName"] = "ZStack";
|
|
52
|
+
|
|
65
53
|
//# sourceMappingURL=Stacks.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Stacks.native.js","names":[],"sources":["jsx/Stacks.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 Stacks_exports = {};\n__export(Stacks_exports, {\n XStack: () => XStack,\n YStack: () => YStack,\n ZStack: () => ZStack\n});\nmodule.exports = __toCommonJS(Stacks_exports);\nvar import_core = require(\"@tamagui/core\");\nvar import_getElevation = require(\"./getElevation\");\nvar variants = {\n elevation: {\n number: import_getElevation.getElevation,\n Size: import_getElevation.getElevation\n }\n};\nvar YStack = (0, import_core.styled)(import_core.View, {\n flexDirection: \"column\",\n variants\n});\nYStack[\"displayName\"] = \"YStack\";\nvar XStack = (0, import_core.styled)(import_core.View, {\n flexDirection: \"row\",\n variants\n});\nXStack[\"displayName\"] = \"XStack\";\nvar ZStack = (0, import_core.styled)(YStack, {\n position: \"relative\"\n}, {\n neverFlatten: true,\n isZStack: true\n});\nZStack[\"displayName\"] = \"ZStack\";\n//# sourceMappingURL=Stacks.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;CACvB,cAAc;CACd,cAAc;CACd,cAAc;AAChB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,sBAAsB,QAAQ,0BAAgB;AAClD,IAAI,WAAW,EACb,WAAW;CACT,QAAQ,oBAAoB;CAC5B,MAAM,oBAAoB;AAC5B,EACF;AACA,IAAI,UAAU,GAAG,YAAY,QAAQ,YAAY,MAAM;CACrD,eAAe;CACf;AACF,CAAC;AACD,OAAO,iBAAiB;AACxB,IAAI,UAAU,GAAG,YAAY,QAAQ,YAAY,MAAM;CACrD,eAAe;CACf;AACF,CAAC;AACD,OAAO,iBAAiB;AACxB,IAAI,UAAU,GAAG,YAAY,QAAQ,QAAQ,EAC3C,UAAU,WACZ,GAAG;CACD,cAAc;CACd,UAAU;AACZ,CAAC;AACD,OAAO,iBAAiB"}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { getVariableValue, isAndroid, isVariable } from "@tamagui/core";
|
|
1
|
+
import { getVariableValue, isAndroid, isVariable, resolveSizeToken } from "@tamagui/core";
|
|
2
|
+
|
|
2
3
|
const getElevation = (size, extras) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
if (!size) return;
|
|
5
|
+
const { tokens } = extras;
|
|
6
|
+
const sizeToken = resolveSizeToken(size, "size");
|
|
7
|
+
if (typeof sizeToken === "number") return getSizedElevation(sizeToken, extras);
|
|
8
|
+
const token = tokens.size[sizeToken];
|
|
9
|
+
const sizeNum = isVariable(token) ? +token.val : size;
|
|
10
|
+
return getSizedElevation(sizeNum, extras);
|
|
10
11
|
};
|
|
11
|
-
const getSizedElevation = (val, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
return shadow;
|
|
12
|
+
const getSizedElevation = (val, { theme, tokens }) => {
|
|
13
|
+
let num = 0;
|
|
14
|
+
if (typeof val === "number") {
|
|
15
|
+
num = val;
|
|
16
|
+
} else if (val) {
|
|
17
|
+
const sizeToken = resolveSizeToken(val, "size");
|
|
18
|
+
const token = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken];
|
|
19
|
+
const tokenValue = getVariableValue(token);
|
|
20
|
+
if (typeof tokenValue === "number") {
|
|
21
|
+
num = tokenValue;
|
|
22
|
+
} else {
|
|
23
|
+
num = 10;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
if (num === 0) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
|
|
30
|
+
const shadowColor = theme["shadow-color"] ?? theme.shadowColor;
|
|
31
|
+
const shadow = {
|
|
32
|
+
shadowColor,
|
|
33
|
+
shadowRadius,
|
|
34
|
+
shadowOffset: {
|
|
35
|
+
height,
|
|
36
|
+
width: 0
|
|
37
|
+
},
|
|
38
|
+
...isAndroid ? { elevationAndroid: 2 * height } : {}
|
|
39
|
+
};
|
|
40
|
+
return shadow;
|
|
42
41
|
};
|
|
42
|
+
|
|
43
43
|
export { getElevation, getSizedElevation };
|
|
44
44
|
//# sourceMappingURL=getElevation.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"getElevation.js","names":[],"sources":["jsx/getElevation.js"],"sourcesContent":["import { getVariableValue, isAndroid, isVariable, resolveSizeToken } from \"@tamagui/core\";\nconst getElevation = (size, extras) => {\n if (!size) return;\n const { tokens } = extras;\n const sizeToken = resolveSizeToken(size, \"size\");\n if (typeof sizeToken === \"number\") return getSizedElevation(sizeToken, extras);\n const token = tokens.size[sizeToken];\n const sizeNum = isVariable(token) ? +token.val : size;\n return getSizedElevation(sizeNum, extras);\n};\nconst getSizedElevation = (val, { theme, tokens }) => {\n let num = 0;\n if (typeof val === \"number\") {\n num = val;\n } else if (val) {\n const sizeToken = resolveSizeToken(val, \"size\");\n const token = typeof sizeToken === \"number\" ? sizeToken : tokens.size[sizeToken];\n const tokenValue = getVariableValue(token);\n if (typeof tokenValue === \"number\") {\n num = tokenValue;\n } else {\n num = 10;\n }\n }\n if (num === 0) {\n return;\n }\n const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];\n const shadowColor = theme[\"shadow-color\"] ?? theme.shadowColor;\n const shadow = {\n shadowColor,\n shadowRadius,\n shadowOffset: { height, width: 0 },\n ...isAndroid ? {\n elevationAndroid: 2 * height\n } : {}\n };\n return shadow;\n};\nexport {\n getElevation,\n getSizedElevation\n};\n//# sourceMappingURL=getElevation.js.map\n"],"mappings":";;;AACA,MAAM,gBAAgB,MAAM,WAAW;CACrC,IAAI,CAAC,MAAM;CACX,MAAM,EAAE,WAAW;CACnB,MAAM,YAAY,iBAAiB,MAAM,MAAM;CAC/C,IAAI,OAAO,cAAc,UAAU,OAAO,kBAAkB,WAAW,MAAM;CAC7E,MAAM,QAAQ,OAAO,KAAK;CAC1B,MAAM,UAAU,WAAW,KAAK,IAAI,CAAC,MAAM,MAAM;CACjD,OAAO,kBAAkB,SAAS,MAAM;AAC1C;AACA,MAAM,qBAAqB,KAAK,EAAE,OAAO,aAAa;CACpD,IAAI,MAAM;CACV,IAAI,OAAO,QAAQ,UAAU;EAC3B,MAAM;CACR,OAAO,IAAI,KAAK;EACd,MAAM,YAAY,iBAAiB,KAAK,MAAM;EAC9C,MAAM,QAAQ,OAAO,cAAc,WAAW,YAAY,OAAO,KAAK;EACtE,MAAM,aAAa,iBAAiB,KAAK;EACzC,IAAI,OAAO,eAAe,UAAU;GAClC,MAAM;EACR,OAAO;GACL,MAAM;EACR;CACF;CACA,IAAI,QAAQ,GAAG;EACb;CACF;CACA,MAAM,CAAC,QAAQ,gBAAgB,CAAC,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,KAAK,MAAM,MAAM,IAAI,CAAC,CAAC;CAChF,MAAM,cAAc,MAAM,mBAAmB,MAAM;CACnD,MAAM,SAAS;EACb;EACA;EACA,cAAc;GAAE;GAAQ,OAAO;EAAE;EACjC,GAAG,YAAY,EACb,kBAAkB,IAAI,OACxB,IAAI,CAAC;CACP;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
var __copyProps = (to, from, except, desc) => {
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
22
|
+
};
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
24
|
+
var getElevation_exports = {};
|
|
25
|
+
__export(getElevation_exports, {
|
|
26
|
+
getElevation: () => getElevation,
|
|
27
|
+
getSizedElevation: () => getSizedElevation
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(getElevation_exports);
|
|
30
|
+
var import_core = require("@tamagui/core");
|
|
31
|
+
var getElevation = function(size, extras) {
|
|
32
|
+
if (!size) return;
|
|
33
|
+
var { tokens } = extras;
|
|
34
|
+
var sizeToken = (0, import_core.resolveSizeToken)(size, "size");
|
|
35
|
+
if (typeof sizeToken === "number") return getSizedElevation(sizeToken, extras);
|
|
36
|
+
var token = tokens.size[sizeToken];
|
|
37
|
+
var sizeNum = (0, import_core.isVariable)(token) ? +token.val : size;
|
|
38
|
+
return getSizedElevation(sizeNum, extras);
|
|
39
|
+
};
|
|
40
|
+
var getSizedElevation = function(val, param) {
|
|
41
|
+
var { theme, tokens } = param;
|
|
42
|
+
var num = 0;
|
|
43
|
+
if (typeof val === "number") {
|
|
44
|
+
num = val;
|
|
45
|
+
} else if (val) {
|
|
46
|
+
var sizeToken = (0, import_core.resolveSizeToken)(val, "size");
|
|
47
|
+
var token = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken];
|
|
48
|
+
var tokenValue = (0, import_core.getVariableValue)(token);
|
|
49
|
+
if (typeof tokenValue === "number") {
|
|
50
|
+
num = tokenValue;
|
|
51
|
+
} else {
|
|
52
|
+
num = 10;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (num === 0) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
var [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
|
|
59
|
+
var _theme_shadowcolor;
|
|
60
|
+
var shadowColor = (_theme_shadowcolor = theme["shadow-color"]) !== null && _theme_shadowcolor !== void 0 ? _theme_shadowcolor : theme.shadowColor;
|
|
61
|
+
var shadow = {
|
|
62
|
+
shadowColor,
|
|
63
|
+
shadowRadius,
|
|
64
|
+
shadowOffset: {
|
|
65
|
+
height,
|
|
66
|
+
width: 0
|
|
67
|
+
},
|
|
68
|
+
...import_core.isAndroid ? { elevationAndroid: 2 * height } : {}
|
|
69
|
+
};
|
|
70
|
+
return shadow;
|
|
71
|
+
};
|