@hanzogui/stacks 7.0.0 → 7.3.0
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/LICENSE +40 -19
- package/dist/cjs/NestingContext.cjs +40 -0
- package/dist/cjs/NestingContext.native.js +43 -0
- package/dist/cjs/NestingContext.native.js.map +1 -0
- package/dist/cjs/SizableStack.cjs +52 -0
- package/dist/cjs/SizableStack.native.js +55 -0
- package/dist/cjs/SizableStack.native.js.map +1 -0
- package/dist/cjs/Stacks.cjs +62 -0
- package/dist/cjs/Stacks.native.js +65 -0
- package/dist/cjs/Stacks.native.js.map +1 -0
- package/dist/cjs/ThemeableStack.cjs +63 -0
- package/dist/cjs/ThemeableStack.native.js +66 -0
- package/dist/cjs/ThemeableStack.native.js.map +1 -0
- package/dist/cjs/getElevation.cjs +70 -0
- package/dist/cjs/getElevation.native.js +74 -0
- package/dist/cjs/getElevation.native.js.map +1 -0
- package/dist/cjs/index.cjs +24 -0
- package/dist/cjs/index.native.js +27 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/variants.cjs +68 -0
- package/dist/cjs/variants.native.js +73 -0
- package/dist/cjs/variants.native.js.map +1 -0
- package/dist/esm/NestingContext.mjs +4 -0
- package/dist/esm/NestingContext.mjs.map +1 -0
- package/dist/esm/NestingContext.native.js +4 -0
- package/dist/esm/NestingContext.native.js.map +1 -0
- package/dist/esm/SizableStack.mjs +27 -0
- package/dist/esm/SizableStack.mjs.map +1 -0
- package/dist/esm/SizableStack.native.js +27 -0
- package/dist/esm/SizableStack.native.js.map +1 -0
- package/dist/esm/Stacks.mjs +34 -0
- package/dist/esm/Stacks.mjs.map +1 -0
- package/dist/esm/Stacks.native.js +34 -0
- package/dist/esm/Stacks.native.js.map +1 -0
- package/dist/esm/ThemeableStack.mjs +37 -0
- package/dist/esm/ThemeableStack.mjs.map +1 -0
- package/dist/esm/ThemeableStack.native.js +37 -0
- package/dist/esm/ThemeableStack.native.js.map +1 -0
- package/dist/esm/getElevation.mjs +44 -0
- package/dist/esm/getElevation.mjs.map +1 -0
- package/dist/esm/getElevation.native.js +45 -0
- package/dist/esm/getElevation.native.js.map +1 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +6 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +6 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/variants.mjs +41 -0
- package/dist/esm/variants.mjs.map +1 -0
- package/dist/esm/variants.native.js +43 -0
- package/dist/esm/variants.native.js.map +1 -0
- package/dist/jsx/NestingContext.mjs +4 -0
- package/dist/jsx/NestingContext.mjs.map +1 -0
- package/dist/jsx/NestingContext.native.js +43 -0
- package/dist/jsx/NestingContext.native.js.map +1 -0
- package/dist/jsx/SizableStack.mjs +27 -0
- package/dist/jsx/SizableStack.mjs.map +1 -0
- package/dist/jsx/SizableStack.native.js +55 -0
- package/dist/jsx/SizableStack.native.js.map +1 -0
- package/dist/jsx/Stacks.mjs +34 -0
- package/dist/jsx/Stacks.mjs.map +1 -0
- package/dist/jsx/Stacks.native.js +65 -0
- package/dist/jsx/Stacks.native.js.map +1 -0
- package/dist/jsx/ThemeableStack.mjs +37 -0
- package/dist/jsx/ThemeableStack.mjs.map +1 -0
- package/dist/jsx/ThemeableStack.native.js +66 -0
- package/dist/jsx/ThemeableStack.native.js.map +1 -0
- package/dist/jsx/getElevation.mjs +44 -0
- package/dist/jsx/getElevation.mjs.map +1 -0
- package/dist/jsx/getElevation.native.js +74 -0
- package/dist/jsx/getElevation.native.js.map +1 -0
- package/dist/jsx/index.js +6 -0
- package/dist/jsx/index.js.map +1 -0
- package/dist/jsx/index.mjs +6 -0
- package/dist/jsx/index.mjs.map +1 -0
- package/dist/jsx/index.native.js +27 -0
- package/dist/jsx/index.native.js.map +1 -0
- package/dist/jsx/variants.mjs +41 -0
- package/dist/jsx/variants.mjs.map +1 -0
- package/dist/jsx/variants.native.js +73 -0
- package/dist/jsx/variants.native.js.map +1 -0
- package/package.json +13 -11
- package/src/Stacks.tsx +3 -3
- package/types/NestingContext.d.ts.map +1 -0
- package/types/SizableStack.d.ts +1 -1
- package/types/SizableStack.d.ts.map +1 -0
- package/types/Stacks.d.ts +6 -6
- package/types/Stacks.d.ts.map +1 -0
- package/types/ThemeableStack.d.ts +1 -1
- package/types/ThemeableStack.d.ts.map +1 -0
- package/types/getElevation.d.ts.map +1 -0
- package/types/index.d.ts.map +1 -0
- package/types/variants.d.ts.map +1 -0
package/LICENSE
CHANGED
|
@@ -1,21 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present, Hanzo AI, Inc.
|
|
4
|
+
|
|
5
|
+
Portions of this software are derived from upstream code originally licensed under
|
|
6
|
+
the MIT License, with the following copyright notices retained per its terms:
|
|
2
7
|
|
|
3
8
|
Copyright (c) 2020 Nate Wienert
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
Copyright (c) 2015-present, Nicolas Gallagher.
|
|
10
|
+
Copyright (c) 2015-present, Facebook, Inc.
|
|
11
|
+
Copyright (c) 2021 Radix
|
|
12
|
+
Copyright (c) 2017 Carmelo Pullara
|
|
13
|
+
Copyright (c) 2018 Framer B.V.
|
|
14
|
+
Copyright (c) 2022 WorkOS
|
|
15
|
+
|
|
16
|
+
All rights reserved.
|
|
17
|
+
|
|
18
|
+
Redistribution and use in source and binary forms, with or without
|
|
19
|
+
modification, are permitted provided that the following conditions are met:
|
|
20
|
+
|
|
21
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
22
|
+
list of conditions and the following disclaimer.
|
|
23
|
+
|
|
24
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
25
|
+
this list of conditions and the following disclaimer in the documentation
|
|
26
|
+
and/or other materials provided with the distribution.
|
|
27
|
+
|
|
28
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
29
|
+
may be used to endorse or promote products derived from this software
|
|
30
|
+
without specific prior written permission.
|
|
31
|
+
|
|
32
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
33
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
34
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
35
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
36
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
37
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
38
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
39
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
40
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
41
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
42
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
}), mod);
|
|
34
|
+
var NestingContext_exports = {};
|
|
35
|
+
__export(NestingContext_exports, {
|
|
36
|
+
ButtonNestingContext: () => ButtonNestingContext
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(NestingContext_exports);
|
|
39
|
+
var import_react = __toESM(require("react"), 1);
|
|
40
|
+
const ButtonNestingContext = import_react.default.createContext(false);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
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
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
36
|
+
var NestingContext_exports = {};
|
|
37
|
+
__export(NestingContext_exports, {
|
|
38
|
+
ButtonNestingContext: () => ButtonNestingContext
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(NestingContext_exports);
|
|
41
|
+
var import_react = __toESM(require("react"), 1);
|
|
42
|
+
var ButtonNestingContext = /* @__PURE__ */import_react.default.createContext(false);
|
|
43
|
+
//# sourceMappingURL=NestingContext.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","NestingContext_exports","__export","ButtonNestingContext","module","exports","import_react","__toESM","require"],"sources":["../../src/NestingContext.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,sBAAA;AAAAC,QAAA,CAAAD,sBAAA;EAAAE,oBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,sBAAA;AAEX,IAAAK,YAAM,GAAAC,OAAA,CAAAC,OAAuB","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var SizableStack_exports = {};
|
|
24
|
+
__export(SizableStack_exports, {
|
|
25
|
+
SizableStack: () => SizableStack
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(SizableStack_exports);
|
|
28
|
+
var import_core = require("@hanzogui/core");
|
|
29
|
+
var import_get_button_sized = require("@hanzogui/get-button-sized");
|
|
30
|
+
var import_ThemeableStack = require("./ThemeableStack.cjs");
|
|
31
|
+
var import_variants = require("./variants.cjs");
|
|
32
|
+
const SizableStack = (0, import_core.styled)(import_ThemeableStack.ThemeableStack, {
|
|
33
|
+
name: "SizableStack",
|
|
34
|
+
variants: {
|
|
35
|
+
unstyled: {
|
|
36
|
+
true: {
|
|
37
|
+
elevate: false,
|
|
38
|
+
bordered: false
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
circular: import_variants.circular,
|
|
42
|
+
elevate: import_variants.elevate,
|
|
43
|
+
bordered: {
|
|
44
|
+
true: import_variants.bordered
|
|
45
|
+
},
|
|
46
|
+
size: {
|
|
47
|
+
"...size": (val, extras) => {
|
|
48
|
+
return (0, import_get_button_sized.getButtonSized)(val, extras);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
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 __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var SizableStack_exports = {};
|
|
26
|
+
__export(SizableStack_exports, {
|
|
27
|
+
SizableStack: () => SizableStack
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(SizableStack_exports);
|
|
30
|
+
var import_core = require("@hanzogui/core");
|
|
31
|
+
var import_get_button_sized = require("@hanzogui/get-button-sized");
|
|
32
|
+
var import_ThemeableStack = require("./ThemeableStack.native.js");
|
|
33
|
+
var import_variants = require("./variants.native.js");
|
|
34
|
+
var SizableStack = (0, import_core.styled)(import_ThemeableStack.ThemeableStack, {
|
|
35
|
+
name: "SizableStack",
|
|
36
|
+
variants: {
|
|
37
|
+
unstyled: {
|
|
38
|
+
true: {
|
|
39
|
+
elevate: false,
|
|
40
|
+
bordered: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
circular: import_variants.circular,
|
|
44
|
+
elevate: import_variants.elevate,
|
|
45
|
+
bordered: {
|
|
46
|
+
true: import_variants.bordered
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
"...size": function (val, extras) {
|
|
50
|
+
return (0, import_get_button_sized.getButtonSized)(val, extras);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=SizableStack.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","SizableStack_exports","__export","SizableStack","module","exports","import_core","require","import_get_button_sized","import_ThemeableStack","import_variants","styled","ThemeableStack","name","variants","unstyled","true","elevate","bordered","circular","size","...size","val","extras","getButtonSized"],"sources":["../../src/SizableStack.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,oBAAA;AAAAC,QAAA,CAAAD,oBAAA;EAAAE,YAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAuB,CAAAK,oBAAA;AACvB,IAAAK,WAAA,GAAAC,OAAA,iBAA+B;AAE/B,IAAAC,uBAAA,GAA+BD,OAAA;AAC/B,IAAAE,qBAA4C,GAAAF,OAAA;AAErC,IAAAG,eAAM,GAAAH,OAAe;AAAuB,IACjDJ,YAAM,OAAAG,WAAA,CAAAK,MAAA,EAAAF,qBAAA,CAAAG,cAAA;EAENC,IAAA,gBAAU;EAAAC,QACR;IAAUC,QACF;MAAAC,IACJ;QACAC,OAAA,OAAU;QACZC,QAAA;MACF;IAEA;IACAC,QAAA,EAAAT,eAAA,CAAAS,QAAA;IAEAF,OAAA,EAAAP,eAAU,CAAAO,OAAA;IAAAC,QACF;MACRF,IAAA,EAAAN,eAAA,CAAAQ;IAEA;IAAME,IACJ;MACE,oBAAAC,CAAOC,GAAA,EAAAC,MAAA;QACT,WAAAf,uBAAA,CAAAgB,cAAA,EAAAF,GAAA,EAAAC,MAAA;MACF;IACF;EACD","ignoreList":[]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var Stacks_exports = {};
|
|
24
|
+
__export(Stacks_exports, {
|
|
25
|
+
XStack: () => XStack,
|
|
26
|
+
YStack: () => YStack,
|
|
27
|
+
ZStack: () => ZStack,
|
|
28
|
+
fullscreenStyle: () => fullscreenStyle
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(Stacks_exports);
|
|
31
|
+
var import_core = require("@hanzogui/core");
|
|
32
|
+
var import_getElevation = require("./getElevation.cjs");
|
|
33
|
+
const fullscreenStyle = {
|
|
34
|
+
position: "absolute",
|
|
35
|
+
inset: 0
|
|
36
|
+
};
|
|
37
|
+
const variants = {
|
|
38
|
+
fullscreen: {
|
|
39
|
+
true: fullscreenStyle
|
|
40
|
+
},
|
|
41
|
+
elevation: {
|
|
42
|
+
"...size": import_getElevation.getElevation,
|
|
43
|
+
":number": import_getElevation.getElevation
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const YStack = (0, import_core.styled)(import_core.View, {
|
|
47
|
+
flexDirection: "column",
|
|
48
|
+
variants
|
|
49
|
+
});
|
|
50
|
+
YStack["displayName"] = "YStack";
|
|
51
|
+
const XStack = (0, import_core.styled)(import_core.View, {
|
|
52
|
+
flexDirection: "row",
|
|
53
|
+
variants
|
|
54
|
+
});
|
|
55
|
+
XStack["displayName"] = "XStack";
|
|
56
|
+
const ZStack = (0, import_core.styled)(YStack, {
|
|
57
|
+
position: "relative"
|
|
58
|
+
}, {
|
|
59
|
+
neverFlatten: true,
|
|
60
|
+
isZStack: true
|
|
61
|
+
});
|
|
62
|
+
ZStack["displayName"] = "ZStack";
|
|
@@ -0,0 +1,65 @@
|
|
|
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 __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var Stacks_exports = {};
|
|
26
|
+
__export(Stacks_exports, {
|
|
27
|
+
XStack: () => XStack,
|
|
28
|
+
YStack: () => YStack,
|
|
29
|
+
ZStack: () => ZStack,
|
|
30
|
+
fullscreenStyle: () => fullscreenStyle
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(Stacks_exports);
|
|
33
|
+
var import_core = require("@hanzogui/core");
|
|
34
|
+
var import_getElevation = require("./getElevation.native.js");
|
|
35
|
+
var fullscreenStyle = {
|
|
36
|
+
position: "absolute",
|
|
37
|
+
inset: 0
|
|
38
|
+
};
|
|
39
|
+
var variants = {
|
|
40
|
+
fullscreen: {
|
|
41
|
+
true: fullscreenStyle
|
|
42
|
+
},
|
|
43
|
+
elevation: {
|
|
44
|
+
"...size": import_getElevation.getElevation,
|
|
45
|
+
":number": import_getElevation.getElevation
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
var YStack = (0, import_core.styled)(import_core.View, {
|
|
49
|
+
flexDirection: "column",
|
|
50
|
+
variants
|
|
51
|
+
});
|
|
52
|
+
YStack["displayName"] = "YStack";
|
|
53
|
+
var XStack = (0, import_core.styled)(import_core.View, {
|
|
54
|
+
flexDirection: "row",
|
|
55
|
+
variants
|
|
56
|
+
});
|
|
57
|
+
XStack["displayName"] = "XStack";
|
|
58
|
+
var ZStack = (0, import_core.styled)(YStack, {
|
|
59
|
+
position: "relative"
|
|
60
|
+
}, {
|
|
61
|
+
neverFlatten: true,
|
|
62
|
+
isZStack: true
|
|
63
|
+
});
|
|
64
|
+
ZStack["displayName"] = "ZStack";
|
|
65
|
+
//# sourceMappingURL=Stacks.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Stacks_exports","__export","XStack","YStack","ZStack","fullscreenStyle","module","exports","import_core","require","import_getElevation","position","inset","variants","fullscreen","true","elevation","getElevation","styled","View","flexDirection","neverFlatten","isZStack"],"sources":["../../src/Stacks.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,cAAA;AAAAC,QAAA,CAAAD,cAAA;EAAAE,MAAA,EAAAA,CAAA,KAAAA,MAAA;EAAAC,MAAA,EAAAA,CAAA,KAAAA,MAAA;EAAAC,MAAA,EAAAA,CAAA,KAAAA,MAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAZ,YAA6B,CAAAK,cAAA;AAE7B,IAAAQ,WAAA,GAAAC,OAAA,CAA6B;AAiBtB,IAAAC,mBAAM,GAAkBD,OAAA;AAAA,IAC7BJ,eAAU;EACVM,QAAO;EACTC,KAAA;AAEA;AAAiB,IACfC,QAAA,GAAY;EAAAC,UACJ;IACRC,IAAA,EAAAV;EAEA;EAAWW,SACT;IACA,WAAWN,mBAAA,CAAAO,YAAA;IACb,WAAAP,mBAAA,CAAAO;EACF;AAMO;AAA4B,IACjCd,MAAA,OAAeK,WAAA,CAAAU,MAAA,EAAAV,WAAA,CAAAW,IAAA;EACfC,aAAA;EACDP;AAED;AAMOV,MAAM,cAAS;AAAa,IACjCD,MAAA,OAAeM,WAAA,CAAAU,MAAA,EAAAV,WAAA,CAAAW,IAAA;EACfC,aAAA;EACDP;AAED;AAMOX,MAAM,cAAS;AAAA,IACpBE,MAAA,OAAAI,WAAA,CAAAU,MAAA,EAAAf,MAAA;EACAQ,QAAA;AAAA;EAEAU,YAAA;EACAC,QAAA;AAAA;AACgBlB,MACd,cAAU","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var ThemeableStack_exports = {};
|
|
24
|
+
__export(ThemeableStack_exports, {
|
|
25
|
+
ThemeableStack: () => ThemeableStack,
|
|
26
|
+
themeableVariants: () => themeableVariants
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(ThemeableStack_exports);
|
|
29
|
+
var import_core = require("@hanzogui/core");
|
|
30
|
+
var import_Stacks = require("./Stacks.cjs");
|
|
31
|
+
var import_variants = require("./variants.cjs");
|
|
32
|
+
const chromelessStyle = {
|
|
33
|
+
backgroundColor: "transparent",
|
|
34
|
+
borderColor: "transparent",
|
|
35
|
+
shadowColor: "transparent",
|
|
36
|
+
hoverStyle: {
|
|
37
|
+
borderColor: "transparent"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const themeableVariants = {
|
|
41
|
+
circular: import_variants.circular,
|
|
42
|
+
elevate: import_variants.elevate,
|
|
43
|
+
bordered: {
|
|
44
|
+
true: import_variants.bordered
|
|
45
|
+
},
|
|
46
|
+
transparent: {
|
|
47
|
+
true: {
|
|
48
|
+
backgroundColor: "transparent"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
chromeless: {
|
|
52
|
+
true: chromelessStyle,
|
|
53
|
+
all: {
|
|
54
|
+
...chromelessStyle,
|
|
55
|
+
hoverStyle: chromelessStyle,
|
|
56
|
+
pressStyle: chromelessStyle,
|
|
57
|
+
focusStyle: chromelessStyle
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const ThemeableStack = (0, import_core.styled)(import_Stacks.YStack, {
|
|
62
|
+
variants: themeableVariants
|
|
63
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
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 __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var ThemeableStack_exports = {};
|
|
26
|
+
__export(ThemeableStack_exports, {
|
|
27
|
+
ThemeableStack: () => ThemeableStack,
|
|
28
|
+
themeableVariants: () => themeableVariants
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(ThemeableStack_exports);
|
|
31
|
+
var import_core = require("@hanzogui/core");
|
|
32
|
+
var import_Stacks = require("./Stacks.native.js");
|
|
33
|
+
var import_variants = require("./variants.native.js");
|
|
34
|
+
var chromelessStyle = {
|
|
35
|
+
backgroundColor: "transparent",
|
|
36
|
+
borderColor: "transparent",
|
|
37
|
+
shadowColor: "transparent",
|
|
38
|
+
hoverStyle: {
|
|
39
|
+
borderColor: "transparent"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var themeableVariants = {
|
|
43
|
+
circular: import_variants.circular,
|
|
44
|
+
elevate: import_variants.elevate,
|
|
45
|
+
bordered: {
|
|
46
|
+
true: import_variants.bordered
|
|
47
|
+
},
|
|
48
|
+
transparent: {
|
|
49
|
+
true: {
|
|
50
|
+
backgroundColor: "transparent"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
chromeless: {
|
|
54
|
+
true: chromelessStyle,
|
|
55
|
+
all: {
|
|
56
|
+
...chromelessStyle,
|
|
57
|
+
hoverStyle: chromelessStyle,
|
|
58
|
+
pressStyle: chromelessStyle,
|
|
59
|
+
focusStyle: chromelessStyle
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var ThemeableStack = (0, import_core.styled)(import_Stacks.YStack, {
|
|
64
|
+
variants: themeableVariants
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=ThemeableStack.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","ThemeableStack_exports","__export","ThemeableStack","themeableVariants","module","exports","import_core","require","import_Stacks","import_variants","chromelessStyle","backgroundColor","borderColor","shadowColor","hoverStyle","circular","elevate","bordered","true","transparent","chromeless","all","pressStyle","focusStyle","styled","YStack","variants"],"sources":["../../src/ThemeableStack.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,sBAAA;AAAAC,QAAA,CAAAD,sBAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,iBAAA,EAAAA,CAAA,KAAAA;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAV,YAAuB,CAAAK,sBAAA;AAEvB,IAAAM,WAAA,GAAAC,OAAuB;AAEvB,IAAAC,aAAA,GAAAD,OAA4C;AAE5C,IAAAE,eAAM,GAAAF,OAAkB;AAAA,IACtBG,eAAiB;EACjBC,eAAa;EACbC,WAAA,EAAa;EAEbC,WAAA,EAAY;EAAAC,UACV;IACFF,WAAA;EACF;AAEO;AAA0B,IAC/BT,iBAAA;EACAY,QAAA,EAAAN,eAAA,CAAAM,QAAA;EAEAC,OAAA,EAAAP,eAAU,CAAAO,OAAA;EAAAC,QACF;IACRC,IAAA,EAAAT,eAAA,CAAAQ;EAEA;EAAaE,WACL;IAAAD,IACJ;MACFP,eAAA;IACF;EAEA;EAAYS,UACJ;IACNF,IAAA,EAAKR,eAAA;IAAAW,GACH,EAAG;MACH,GAAAX,eAAY;MACZI,UAAA,EAAYJ,eAAA;MACZY,UAAA,EAAYZ,eAAA;MACda,UAAA,EAAAb;IACF;EACF;AAEO;AAAsC,IAC3CR,cAAU,OAAAI,WAAA,CAAAkB,MAAA,EAAAhB,aAAA,CAAAiB,MAAA;EACXC,QAAA,EAAAvB","ignoreList":[]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var getElevation_exports = {};
|
|
24
|
+
__export(getElevation_exports, {
|
|
25
|
+
getElevation: () => getElevation,
|
|
26
|
+
getSizedElevation: () => getSizedElevation
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(getElevation_exports);
|
|
29
|
+
var import_core = require("@hanzogui/core");
|
|
30
|
+
const getElevation = (size, extras) => {
|
|
31
|
+
if (!size) return;
|
|
32
|
+
const {
|
|
33
|
+
tokens
|
|
34
|
+
} = extras;
|
|
35
|
+
const token = tokens.size[size];
|
|
36
|
+
const sizeNum = (0, import_core.isVariable)(token) ? +token.val : size;
|
|
37
|
+
return getSizedElevation(sizeNum, extras);
|
|
38
|
+
};
|
|
39
|
+
const getSizedElevation = (val, {
|
|
40
|
+
theme,
|
|
41
|
+
tokens
|
|
42
|
+
}) => {
|
|
43
|
+
let num = 0;
|
|
44
|
+
if (val === true) {
|
|
45
|
+
const val2 = (0, import_core.getVariableValue)(tokens.size["true"]);
|
|
46
|
+
if (typeof val2 === "number") {
|
|
47
|
+
num = val2;
|
|
48
|
+
} else {
|
|
49
|
+
num = 10;
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
num = +val;
|
|
53
|
+
}
|
|
54
|
+
if (num === 0) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
|
|
58
|
+
const shadow = {
|
|
59
|
+
shadowColor: theme.shadowColor,
|
|
60
|
+
shadowRadius,
|
|
61
|
+
shadowOffset: {
|
|
62
|
+
height,
|
|
63
|
+
width: 0
|
|
64
|
+
},
|
|
65
|
+
...(import_core.isAndroid ? {
|
|
66
|
+
elevationAndroid: 2 * height
|
|
67
|
+
} : {})
|
|
68
|
+
};
|
|
69
|
+
return shadow;
|
|
70
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
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 __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
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
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var getElevation_exports = {};
|
|
26
|
+
__export(getElevation_exports, {
|
|
27
|
+
getElevation: () => getElevation,
|
|
28
|
+
getSizedElevation: () => getSizedElevation
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(getElevation_exports);
|
|
31
|
+
var import_core = require("@hanzogui/core");
|
|
32
|
+
var getElevation = function (size, extras) {
|
|
33
|
+
if (!size) return;
|
|
34
|
+
var {
|
|
35
|
+
tokens
|
|
36
|
+
} = extras;
|
|
37
|
+
var token = tokens.size[size];
|
|
38
|
+
var sizeNum = (0, import_core.isVariable)(token) ? +token.val : size;
|
|
39
|
+
return getSizedElevation(sizeNum, extras);
|
|
40
|
+
};
|
|
41
|
+
var getSizedElevation = function (val, param) {
|
|
42
|
+
var {
|
|
43
|
+
theme,
|
|
44
|
+
tokens
|
|
45
|
+
} = param;
|
|
46
|
+
var num = 0;
|
|
47
|
+
if (val === true) {
|
|
48
|
+
var _$val = (0, import_core.getVariableValue)(tokens.size["true"]);
|
|
49
|
+
if (typeof _$val === "number") {
|
|
50
|
+
num = _$val;
|
|
51
|
+
} else {
|
|
52
|
+
num = 10;
|
|
53
|
+
}
|
|
54
|
+
} else {
|
|
55
|
+
num = +val;
|
|
56
|
+
}
|
|
57
|
+
if (num === 0) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
var [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
|
|
61
|
+
var shadow = {
|
|
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
|
+
};
|
|
74
|
+
//# sourceMappingURL=getElevation.native.js.map
|