@tamagui/stacks 2.7.7 → 3.0.0-beta.1091.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 +17 -26
- package/dist/cjs/NestingContext.native.cjs +33 -0
- package/dist/cjs/NestingContext.native.js +18 -26
- package/dist/cjs/NestingContext.native.js.map +1 -1
- package/dist/cjs/Stacks.cjs +24 -41
- package/dist/cjs/Stacks.native.cjs +47 -0
- package/dist/cjs/Stacks.native.js +24 -40
- package/dist/cjs/Stacks.native.js.map +1 -1
- package/dist/cjs/getElevation.cjs +42 -57
- package/dist/cjs/getElevation.native.cjs +58 -0
- package/dist/cjs/getElevation.native.js +44 -58
- package/dist/cjs/getElevation.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -13
- package/dist/cjs/index.native.cjs +22 -0
- package/dist/cjs/index.native.js +9 -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 +11 -23
- package/dist/esm/Stacks.mjs.map +1 -1
- package/dist/esm/Stacks.native.js +11 -23
- package/dist/esm/Stacks.native.js.map +1 -1
- package/dist/esm/getElevation.mjs +31 -42
- package/dist/esm/getElevation.mjs.map +1 -1
- package/dist/esm/getElevation.native.js +32 -43
- 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 +33 -0
- package/dist/jsx/NestingContext.native.js +18 -26
- package/dist/jsx/NestingContext.native.js.map +1 -1
- package/dist/jsx/Stacks.mjs +11 -23
- package/dist/jsx/Stacks.mjs.map +1 -1
- package/dist/jsx/Stacks.native.cjs +47 -0
- package/dist/jsx/Stacks.native.js +24 -40
- package/dist/jsx/Stacks.native.js.map +1 -1
- package/dist/jsx/getElevation.mjs +31 -42
- package/dist/jsx/getElevation.mjs.map +1 -1
- package/dist/jsx/getElevation.native.cjs +58 -0
- package/dist/jsx/getElevation.native.js +44 -58
- 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 +22 -0
- package/dist/jsx/index.native.js +9 -12
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +6 -6
- package/src/Stacks.tsx +1 -18
- package/src/getElevation.tsx +26 -40
- 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 -11
- 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
|
@@ -5,70 +5,56 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
12
|
};
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
21
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
22
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
23
|
var getElevation_exports = {};
|
|
26
24
|
__export(getElevation_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
getElevation: () => getElevation,
|
|
26
|
+
getSizedElevation: () => getSizedElevation
|
|
29
27
|
});
|
|
30
28
|
module.exports = __toCommonJS(getElevation_exports);
|
|
31
29
|
var import_core = require("@tamagui/core");
|
|
32
|
-
var getElevation = function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
shadowColor: theme.shadowColor,
|
|
63
|
-
shadowRadius,
|
|
64
|
-
shadowOffset: {
|
|
65
|
-
height,
|
|
66
|
-
width: 0
|
|
67
|
-
},
|
|
68
|
-
...(import_core.isAndroid ? {
|
|
69
|
-
elevationAndroid: 2 * height
|
|
70
|
-
} : {})
|
|
71
|
-
};
|
|
72
|
-
return shadow;
|
|
73
|
-
};
|
|
30
|
+
var getElevation = import_core.styled.dynamic(function(size, env) {
|
|
31
|
+
if (!size) return;
|
|
32
|
+
if (typeof size === "number") return getSizedElevation(size, env);
|
|
33
|
+
return getSizedElevation((0, import_core.resolveSize)(size, env).controlHeight, env);
|
|
34
|
+
});
|
|
35
|
+
var getSizedElevation = import_core.styled.dynamic(function(val, env) {
|
|
36
|
+
var { theme } = env;
|
|
37
|
+
var num = 0;
|
|
38
|
+
if (typeof val === "number") {
|
|
39
|
+
num = val;
|
|
40
|
+
} else if (val) {
|
|
41
|
+
num = (0, import_core.resolveSize)(val, env).controlHeight || 10;
|
|
42
|
+
}
|
|
43
|
+
if (num === 0) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
var [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
|
|
47
|
+
var _theme_shadowcolor;
|
|
48
|
+
var shadowColor = (_theme_shadowcolor = theme["shadow-color"]) !== null && _theme_shadowcolor !== void 0 ? _theme_shadowcolor : theme.shadowColor;
|
|
49
|
+
return {
|
|
50
|
+
shadowColor,
|
|
51
|
+
shadowRadius,
|
|
52
|
+
shadowOffset: {
|
|
53
|
+
height,
|
|
54
|
+
width: 0
|
|
55
|
+
},
|
|
56
|
+
elevationAndroid: import_core.isAndroid ? 2 * height : void 0
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
|
|
74
60
|
//# sourceMappingURL=getElevation.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"getElevation.native.js","names":[],"sources":["cjs/getElevation.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 getElevation_exports = {};\n__export(getElevation_exports, {\n getElevation: () => getElevation,\n getSizedElevation: () => getSizedElevation\n});\nmodule.exports = __toCommonJS(getElevation_exports);\nvar import_core = require(\"@tamagui/core\");\nvar getElevation = import_core.styled.dynamic(function(size, env) {\n if (!size) return;\n if (typeof size === \"number\") return getSizedElevation(size, env);\n return getSizedElevation((0, import_core.resolveSize)(size, env).controlHeight, env);\n});\nvar getSizedElevation = import_core.styled.dynamic(function(val, env) {\n var { theme } = env;\n var num = 0;\n if (typeof val === \"number\") {\n num = val;\n } else if (val) {\n num = (0, import_core.resolveSize)(val, env).controlHeight || 10;\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 return {\n shadowColor,\n shadowRadius,\n shadowOffset: {\n height,\n width: 0\n },\n elevationAndroid: import_core.isAndroid ? 2 * height : void 0\n };\n});\n//# sourceMappingURL=getElevation.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;CAC7B,oBAAoB;CACpB,yBAAyB;AAC3B,CAAC;AACD,OAAO,UAAU,aAAa,oBAAoB;AAClD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,eAAe,YAAY,OAAO,QAAQ,SAAS,MAAM,KAAK;CAChE,IAAI,CAAC,MAAM;CACX,IAAI,OAAO,SAAS,UAAU,OAAO,kBAAkB,MAAM,GAAG;CAChE,OAAO,mBAAmB,GAAG,YAAY,YAAW,CAAE,MAAM,GAAG,CAAC,CAAC,eAAe,GAAG;AACrF,CAAC;AACD,IAAI,oBAAoB,YAAY,OAAO,QAAQ,SAAS,KAAK,KAAK;CACpE,IAAI,EAAE,UAAU;CAChB,IAAI,MAAM;CACV,IAAI,OAAO,QAAQ,UAAU;EAC3B,MAAM;CACR,OAAO,IAAI,KAAK;EACd,OAAO,GAAG,YAAY,YAAW,CAAE,KAAK,GAAG,CAAC,CAAC,iBAAiB;CAChE;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,OAAO;EACL;EACA;EACA,cAAc;GACZ;GACA,OAAO;EACT;EACA,kBAAkB,YAAY,YAAY,IAAI,SAAS,KAAK;CAC9D;AACF,CAAC"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,22 +3,18 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
+
get: () => from[key],
|
|
9
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
13
|
};
|
|
14
14
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
}), mod);
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
16
|
var index_exports = {};
|
|
19
17
|
module.exports = __toCommonJS(index_exports);
|
|
20
18
|
__reExport(index_exports, require("./Stacks.cjs"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./ThemeableStack.cjs"), module.exports);
|
|
22
|
-
__reExport(index_exports, require("./SizableStack.cjs"), module.exports);
|
|
23
19
|
__reExport(index_exports, require("./NestingContext.cjs"), module.exports);
|
|
24
|
-
__reExport(index_exports, require("./getElevation.cjs"), module.exports);
|
|
20
|
+
__reExport(index_exports, require("./getElevation.cjs"), module.exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var index_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(index_exports);
|
|
20
|
+
__reExport(index_exports, require("./Stacks.native.js"), module.exports);
|
|
21
|
+
__reExport(index_exports, require("./NestingContext.native.js"), module.exports);
|
|
22
|
+
__reExport(index_exports, require("./getElevation.native.js"), module.exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,23 +5,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
15
|
};
|
|
16
16
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
17
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
18
|
-
value: true
|
|
19
|
-
}), mod);
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
18
|
var index_exports = {};
|
|
21
19
|
module.exports = __toCommonJS(index_exports);
|
|
22
20
|
__reExport(index_exports, require("./Stacks.native.js"), module.exports);
|
|
23
|
-
__reExport(index_exports, require("./ThemeableStack.native.js"), module.exports);
|
|
24
|
-
__reExport(index_exports, require("./SizableStack.native.js"), module.exports);
|
|
25
21
|
__reExport(index_exports, require("./NestingContext.native.js"), module.exports);
|
|
26
22
|
__reExport(index_exports, require("./getElevation.native.js"), module.exports);
|
|
23
|
+
|
|
27
24
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Stacks\"), module.exports);\n__reExport(index_exports, require(\"./NestingContext\"), module.exports);\n__reExport(index_exports, require(\"./getElevation\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,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,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO;AAC7D,WAAW,eAAe,QAAQ,4BAAkB,GAAG,OAAO,OAAO;AACrE,WAAW,eAAe,QAAQ,0BAAgB,GAAG,OAAO,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"NestingContext.js","names":[],"sources":["esm/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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"NestingContext.native.js","names":[],"sources":["esm/NestingContext.native.js"],"sourcesContent":["import React from \"react\";\nvar ButtonNestingContext = /* @__PURE__ */ React.createContext(false);\nexport {\n ButtonNestingContext\n};\n//# sourceMappingURL=NestingContext.js.map\n"],"mappings":";;;AACA,IAAI,uBAAuC,sBAAM,cAAc,KAAK"}
|
package/dist/esm/Stacks.mjs
CHANGED
|
@@ -1,34 +1,22 @@
|
|
|
1
1
|
import { View, styled } from "@tamagui/core";
|
|
2
2
|
import { getElevation } from "./getElevation.mjs";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
inset: 0
|
|
6
|
-
};
|
|
7
|
-
const variants = {
|
|
8
|
-
fullscreen: {
|
|
9
|
-
true: fullscreenStyle
|
|
10
|
-
},
|
|
11
|
-
elevation: {
|
|
12
|
-
"...size": getElevation,
|
|
13
|
-
":number": getElevation
|
|
14
|
-
}
|
|
15
|
-
};
|
|
3
|
+
|
|
4
|
+
const variants = { elevation: getElevation };
|
|
16
5
|
const YStack = styled(View, {
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
flexDirection: "column",
|
|
7
|
+
variants
|
|
19
8
|
});
|
|
20
9
|
YStack["displayName"] = "YStack";
|
|
21
10
|
const XStack = styled(View, {
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
flexDirection: "row",
|
|
12
|
+
variants
|
|
24
13
|
});
|
|
25
14
|
XStack["displayName"] = "XStack";
|
|
26
|
-
const ZStack = styled(YStack, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
neverFlatten: true,
|
|
30
|
-
isZStack: true
|
|
15
|
+
const ZStack = styled(YStack, { position: "relative" }, {
|
|
16
|
+
neverFlatten: true,
|
|
17
|
+
isZStack: true
|
|
31
18
|
});
|
|
32
19
|
ZStack["displayName"] = "ZStack";
|
|
33
|
-
|
|
20
|
+
|
|
21
|
+
export { XStack, YStack, ZStack };
|
|
34
22
|
//# sourceMappingURL=Stacks.mjs.map
|
package/dist/esm/Stacks.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Stacks.js","names":[],"sources":["esm/Stacks.js"],"sourcesContent":["import { View, styled } from \"@tamagui/core\";\nimport { getElevation } from \"./getElevation\";\nconst variants = {\n elevation: getElevation\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,aACb;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"}
|
|
@@ -1,34 +1,22 @@
|
|
|
1
1
|
import { View, styled } from "@tamagui/core";
|
|
2
2
|
import { getElevation } from "./getElevation.native.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
inset: 0
|
|
6
|
-
};
|
|
7
|
-
var variants = {
|
|
8
|
-
fullscreen: {
|
|
9
|
-
true: fullscreenStyle
|
|
10
|
-
},
|
|
11
|
-
elevation: {
|
|
12
|
-
"...size": getElevation,
|
|
13
|
-
":number": getElevation
|
|
14
|
-
}
|
|
15
|
-
};
|
|
3
|
+
|
|
4
|
+
var variants = { elevation: getElevation };
|
|
16
5
|
var YStack = styled(View, {
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
flexDirection: "column",
|
|
7
|
+
variants
|
|
19
8
|
});
|
|
20
9
|
YStack["displayName"] = "YStack";
|
|
21
10
|
var XStack = styled(View, {
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
flexDirection: "row",
|
|
12
|
+
variants
|
|
24
13
|
});
|
|
25
14
|
XStack["displayName"] = "XStack";
|
|
26
|
-
var ZStack = styled(YStack, {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
neverFlatten: true,
|
|
30
|
-
isZStack: true
|
|
15
|
+
var ZStack = styled(YStack, { position: "relative" }, {
|
|
16
|
+
neverFlatten: true,
|
|
17
|
+
isZStack: true
|
|
31
18
|
});
|
|
32
19
|
ZStack["displayName"] = "ZStack";
|
|
33
|
-
|
|
20
|
+
|
|
21
|
+
export { XStack, YStack, ZStack };
|
|
34
22
|
//# sourceMappingURL=Stacks.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Stacks.native.js","names":[],"sources":["esm/Stacks.native.js"],"sourcesContent":["import { View, styled } from \"@tamagui/core\";\nimport { getElevation } from \"./getElevation\";\nvar variants = {\n elevation: getElevation\n};\nvar YStack = styled(View, {\n flexDirection: \"column\",\n variants\n});\nYStack[\"displayName\"] = \"YStack\";\nvar XStack = styled(View, {\n flexDirection: \"row\",\n variants\n});\nXStack[\"displayName\"] = \"XStack\";\nvar ZStack = styled(YStack, {\n position: \"relative\"\n}, {\n neverFlatten: true,\n isZStack: true\n});\nZStack[\"displayName\"] = \"ZStack\";\nexport {\n XStack,\n YStack,\n ZStack\n};\n//# sourceMappingURL=Stacks.js.map\n"],"mappings":";;;;AAEA,IAAI,WAAW,EACb,WAAW,aACb;AACA,IAAI,SAAS,OAAO,MAAM;CACxB,eAAe;CACf;AACF,CAAC;AACD,OAAO,iBAAiB;AACxB,IAAI,SAAS,OAAO,MAAM;CACxB,eAAe;CACf;AACF,CAAC;AACD,OAAO,iBAAiB;AACxB,IAAI,SAAS,OAAO,QAAQ,EAC1B,UAAU,WACZ,GAAG;CACD,cAAc;CACd,UAAU;AACZ,CAAC;AACD,OAAO,iBAAiB"}
|
|
@@ -1,44 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
shadowRadius,
|
|
33
|
-
shadowOffset: {
|
|
34
|
-
height,
|
|
35
|
-
width: 0
|
|
36
|
-
},
|
|
37
|
-
...(isAndroid ? {
|
|
38
|
-
elevationAndroid: 2 * height
|
|
39
|
-
} : {})
|
|
40
|
-
};
|
|
41
|
-
return shadow;
|
|
42
|
-
};
|
|
1
|
+
import { isAndroid, resolveSize, styled } from "@tamagui/core";
|
|
2
|
+
|
|
3
|
+
const getElevation = styled.dynamic((size, env) => {
|
|
4
|
+
if (!size) return;
|
|
5
|
+
if (typeof size === "number") return getSizedElevation(size, env);
|
|
6
|
+
return getSizedElevation(resolveSize(size, env).controlHeight, env);
|
|
7
|
+
});
|
|
8
|
+
const getSizedElevation = styled.dynamic((val, env) => {
|
|
9
|
+
const { theme } = env;
|
|
10
|
+
let num = 0;
|
|
11
|
+
if (typeof val === "number") {
|
|
12
|
+
num = val;
|
|
13
|
+
} else if (val) {
|
|
14
|
+
num = resolveSize(val, env).controlHeight || 10;
|
|
15
|
+
}
|
|
16
|
+
if (num === 0) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
|
|
20
|
+
const shadowColor = theme["shadow-color"] ?? theme.shadowColor;
|
|
21
|
+
return {
|
|
22
|
+
shadowColor,
|
|
23
|
+
shadowRadius,
|
|
24
|
+
shadowOffset: {
|
|
25
|
+
height,
|
|
26
|
+
width: 0
|
|
27
|
+
},
|
|
28
|
+
elevationAndroid: isAndroid ? 2 * height : void 0
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
|
|
43
32
|
export { getElevation, getSizedElevation };
|
|
44
33
|
//# sourceMappingURL=getElevation.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"getElevation.js","names":[],"sources":["esm/getElevation.js"],"sourcesContent":["import { isAndroid, resolveSize, styled } from \"@tamagui/core\";\nconst getElevation = styled.dynamic((size, env) => {\n if (!size) return;\n if (typeof size === \"number\") return getSizedElevation(size, env);\n return getSizedElevation(resolveSize(size, env).controlHeight, env);\n});\nconst getSizedElevation = styled.dynamic(\n (val, env) => {\n const { theme } = env;\n let num = 0;\n if (typeof val === \"number\") {\n num = val;\n } else if (val) {\n num = resolveSize(val, env).controlHeight || 10;\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 return {\n shadowColor,\n shadowRadius,\n shadowOffset: { height, width: 0 },\n elevationAndroid: isAndroid ? 2 * height : void 0\n };\n }\n);\nexport {\n getElevation,\n getSizedElevation\n};\n//# sourceMappingURL=getElevation.js.map\n"],"mappings":";;;AACA,MAAM,eAAe,OAAO,SAAS,MAAM,QAAQ;CACjD,IAAI,CAAC,MAAM;CACX,IAAI,OAAO,SAAS,UAAU,OAAO,kBAAkB,MAAM,GAAG;CAChE,OAAO,kBAAkB,YAAY,MAAM,GAAG,CAAC,CAAC,eAAe,GAAG;AACpE,CAAC;AACD,MAAM,oBAAoB,OAAO,SAC9B,KAAK,QAAQ;CACZ,MAAM,EAAE,UAAU;CAClB,IAAI,MAAM;CACV,IAAI,OAAO,QAAQ,UAAU;EAC3B,MAAM;CACR,OAAO,IAAI,KAAK;EACd,MAAM,YAAY,KAAK,GAAG,CAAC,CAAC,iBAAiB;CAC/C;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,OAAO;EACL;EACA;EACA,cAAc;GAAE;GAAQ,OAAO;EAAE;EACjC,kBAAkB,YAAY,IAAI,SAAS,KAAK;CAClD;AACF,CACF"}
|
|
@@ -1,45 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
shadowRadius,
|
|
34
|
-
shadowOffset: {
|
|
35
|
-
height,
|
|
36
|
-
width: 0
|
|
37
|
-
},
|
|
38
|
-
...(isAndroid ? {
|
|
39
|
-
elevationAndroid: 2 * height
|
|
40
|
-
} : {})
|
|
41
|
-
};
|
|
42
|
-
return shadow;
|
|
43
|
-
};
|
|
1
|
+
import { isAndroid, resolveSize, styled } from "@tamagui/core";
|
|
2
|
+
|
|
3
|
+
var getElevation = styled.dynamic(function(size, env) {
|
|
4
|
+
if (!size) return;
|
|
5
|
+
if (typeof size === "number") return getSizedElevation(size, env);
|
|
6
|
+
return getSizedElevation(resolveSize(size, env).controlHeight, env);
|
|
7
|
+
});
|
|
8
|
+
var getSizedElevation = styled.dynamic(function(val, env) {
|
|
9
|
+
var { theme } = env;
|
|
10
|
+
var num = 0;
|
|
11
|
+
if (typeof val === "number") {
|
|
12
|
+
num = val;
|
|
13
|
+
} else if (val) {
|
|
14
|
+
num = resolveSize(val, env).controlHeight || 10;
|
|
15
|
+
}
|
|
16
|
+
if (num === 0) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
var [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
|
|
20
|
+
var _theme_shadowcolor;
|
|
21
|
+
var shadowColor = (_theme_shadowcolor = theme["shadow-color"]) !== null && _theme_shadowcolor !== void 0 ? _theme_shadowcolor : theme.shadowColor;
|
|
22
|
+
return {
|
|
23
|
+
shadowColor,
|
|
24
|
+
shadowRadius,
|
|
25
|
+
shadowOffset: {
|
|
26
|
+
height,
|
|
27
|
+
width: 0
|
|
28
|
+
},
|
|
29
|
+
elevationAndroid: isAndroid ? 2 * height : void 0
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
|
|
44
33
|
export { getElevation, getSizedElevation };
|
|
45
34
|
//# sourceMappingURL=getElevation.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"getElevation.native.js","names":[],"sources":["esm/getElevation.native.js"],"sourcesContent":["import { isAndroid, resolveSize, styled } from \"@tamagui/core\";\nvar getElevation = styled.dynamic(function(size, env) {\n if (!size) return;\n if (typeof size === \"number\") return getSizedElevation(size, env);\n return getSizedElevation(resolveSize(size, env).controlHeight, env);\n});\nvar getSizedElevation = styled.dynamic(function(val, env) {\n var { theme } = env;\n var num = 0;\n if (typeof val === \"number\") {\n num = val;\n } else if (val) {\n num = resolveSize(val, env).controlHeight || 10;\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 return {\n shadowColor,\n shadowRadius,\n shadowOffset: {\n height,\n width: 0\n },\n elevationAndroid: isAndroid ? 2 * height : void 0\n };\n});\nexport {\n getElevation,\n getSizedElevation\n};\n//# sourceMappingURL=getElevation.js.map\n"],"mappings":";;;AACA,IAAI,eAAe,OAAO,QAAQ,SAAS,MAAM,KAAK;CACpD,IAAI,CAAC,MAAM;CACX,IAAI,OAAO,SAAS,UAAU,OAAO,kBAAkB,MAAM,GAAG;CAChE,OAAO,kBAAkB,YAAY,MAAM,GAAG,CAAC,CAAC,eAAe,GAAG;AACpE,CAAC;AACD,IAAI,oBAAoB,OAAO,QAAQ,SAAS,KAAK,KAAK;CACxD,IAAI,EAAE,UAAU;CAChB,IAAI,MAAM;CACV,IAAI,OAAO,QAAQ,UAAU;EAC3B,MAAM;CACR,OAAO,IAAI,KAAK;EACd,MAAM,YAAY,KAAK,GAAG,CAAC,CAAC,iBAAiB;CAC/C;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,OAAO;EACL;EACA;EACA,cAAc;GACZ;GACA,OAAO;EACT;EACA,kBAAkB,YAAY,IAAI,SAAS,KAAK;CAClD;AACF,CAAC"}
|
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"
|