@hanzogui/stacks 8.3.1 → 8.3.3

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.
Files changed (125) hide show
  1. package/dist/cjs/NestingContext.js +7 -0
  2. package/dist/cjs/NestingContext.js.map +1 -0
  3. package/dist/cjs/SizableStack.js +29 -0
  4. package/dist/cjs/SizableStack.js.map +1 -0
  5. package/dist/cjs/Stacks.js +48 -0
  6. package/dist/cjs/Stacks.js.map +1 -0
  7. package/dist/cjs/ThemeableStack.js +39 -0
  8. package/dist/cjs/ThemeableStack.js.map +1 -0
  9. package/dist/cjs/getElevation.js +45 -0
  10. package/dist/cjs/getElevation.js.map +1 -0
  11. package/dist/cjs/index.js +9 -0
  12. package/dist/cjs/index.js.map +1 -0
  13. package/dist/cjs/package.json +1 -0
  14. package/dist/cjs/variants.js +39 -0
  15. package/dist/cjs/variants.js.map +1 -0
  16. package/dist/esm/NestingContext.js +3 -0
  17. package/dist/esm/NestingContext.js.map +1 -0
  18. package/dist/esm/SizableStack.js +26 -0
  19. package/dist/esm/SizableStack.js.map +1 -0
  20. package/dist/esm/Stacks.js +45 -0
  21. package/dist/esm/Stacks.js.map +1 -0
  22. package/dist/esm/ThemeableStack.js +36 -0
  23. package/dist/esm/ThemeableStack.js.map +1 -0
  24. package/dist/esm/getElevation.js +40 -0
  25. package/dist/esm/getElevation.js.map +1 -0
  26. package/dist/esm/index.js +6 -6
  27. package/dist/esm/index.js.map +1 -1
  28. package/dist/esm/variants.js +35 -0
  29. package/dist/esm/variants.js.map +1 -0
  30. package/package.json +22 -17
  31. package/src/SizableStack.tsx +2 -2
  32. package/src/Stacks.tsx +1 -1
  33. package/src/ThemeableStack.tsx +2 -2
  34. package/src/index.ts +5 -5
  35. package/src/variants.tsx +1 -1
  36. package/types/SizableStack.d.ts +7 -7
  37. package/types/Stacks.d.ts +1 -1
  38. package/types/Stacks.d.ts.map +1 -1
  39. package/types/ThemeableStack.d.ts +13 -17
  40. package/types/ThemeableStack.d.ts.map +1 -1
  41. package/types/getElevation.d.ts +2 -2
  42. package/types/getElevation.d.ts.map +1 -1
  43. package/types/index.d.ts +5 -5
  44. package/types/index.d.ts.map +1 -1
  45. package/types/variants.d.ts +2 -2
  46. package/types/variants.d.ts.map +1 -1
  47. package/dist/cjs/NestingContext.cjs +0 -40
  48. package/dist/cjs/NestingContext.native.js +0 -43
  49. package/dist/cjs/NestingContext.native.js.map +0 -1
  50. package/dist/cjs/SizableStack.cjs +0 -52
  51. package/dist/cjs/SizableStack.native.js +0 -55
  52. package/dist/cjs/SizableStack.native.js.map +0 -1
  53. package/dist/cjs/Stacks.cjs +0 -62
  54. package/dist/cjs/Stacks.native.js +0 -65
  55. package/dist/cjs/Stacks.native.js.map +0 -1
  56. package/dist/cjs/ThemeableStack.cjs +0 -63
  57. package/dist/cjs/ThemeableStack.native.js +0 -66
  58. package/dist/cjs/ThemeableStack.native.js.map +0 -1
  59. package/dist/cjs/getElevation.cjs +0 -70
  60. package/dist/cjs/getElevation.native.js +0 -74
  61. package/dist/cjs/getElevation.native.js.map +0 -1
  62. package/dist/cjs/index.cjs +0 -24
  63. package/dist/cjs/index.native.js +0 -27
  64. package/dist/cjs/index.native.js.map +0 -1
  65. package/dist/cjs/variants.cjs +0 -68
  66. package/dist/cjs/variants.native.js +0 -73
  67. package/dist/cjs/variants.native.js.map +0 -1
  68. package/dist/esm/NestingContext.mjs +0 -4
  69. package/dist/esm/NestingContext.mjs.map +0 -1
  70. package/dist/esm/NestingContext.native.js +0 -4
  71. package/dist/esm/NestingContext.native.js.map +0 -1
  72. package/dist/esm/SizableStack.mjs +0 -27
  73. package/dist/esm/SizableStack.mjs.map +0 -1
  74. package/dist/esm/SizableStack.native.js +0 -27
  75. package/dist/esm/SizableStack.native.js.map +0 -1
  76. package/dist/esm/Stacks.mjs +0 -34
  77. package/dist/esm/Stacks.mjs.map +0 -1
  78. package/dist/esm/Stacks.native.js +0 -34
  79. package/dist/esm/Stacks.native.js.map +0 -1
  80. package/dist/esm/ThemeableStack.mjs +0 -37
  81. package/dist/esm/ThemeableStack.mjs.map +0 -1
  82. package/dist/esm/ThemeableStack.native.js +0 -37
  83. package/dist/esm/ThemeableStack.native.js.map +0 -1
  84. package/dist/esm/getElevation.mjs +0 -44
  85. package/dist/esm/getElevation.mjs.map +0 -1
  86. package/dist/esm/getElevation.native.js +0 -45
  87. package/dist/esm/getElevation.native.js.map +0 -1
  88. package/dist/esm/index.mjs +0 -6
  89. package/dist/esm/index.mjs.map +0 -1
  90. package/dist/esm/index.native.js +0 -6
  91. package/dist/esm/index.native.js.map +0 -1
  92. package/dist/esm/variants.mjs +0 -41
  93. package/dist/esm/variants.mjs.map +0 -1
  94. package/dist/esm/variants.native.js +0 -43
  95. package/dist/esm/variants.native.js.map +0 -1
  96. package/dist/jsx/NestingContext.mjs +0 -4
  97. package/dist/jsx/NestingContext.mjs.map +0 -1
  98. package/dist/jsx/NestingContext.native.js +0 -43
  99. package/dist/jsx/NestingContext.native.js.map +0 -1
  100. package/dist/jsx/SizableStack.mjs +0 -27
  101. package/dist/jsx/SizableStack.mjs.map +0 -1
  102. package/dist/jsx/SizableStack.native.js +0 -55
  103. package/dist/jsx/SizableStack.native.js.map +0 -1
  104. package/dist/jsx/Stacks.mjs +0 -34
  105. package/dist/jsx/Stacks.mjs.map +0 -1
  106. package/dist/jsx/Stacks.native.js +0 -65
  107. package/dist/jsx/Stacks.native.js.map +0 -1
  108. package/dist/jsx/ThemeableStack.mjs +0 -37
  109. package/dist/jsx/ThemeableStack.mjs.map +0 -1
  110. package/dist/jsx/ThemeableStack.native.js +0 -66
  111. package/dist/jsx/ThemeableStack.native.js.map +0 -1
  112. package/dist/jsx/getElevation.mjs +0 -44
  113. package/dist/jsx/getElevation.mjs.map +0 -1
  114. package/dist/jsx/getElevation.native.js +0 -74
  115. package/dist/jsx/getElevation.native.js.map +0 -1
  116. package/dist/jsx/index.js +0 -6
  117. package/dist/jsx/index.js.map +0 -1
  118. package/dist/jsx/index.mjs +0 -6
  119. package/dist/jsx/index.mjs.map +0 -1
  120. package/dist/jsx/index.native.js +0 -27
  121. package/dist/jsx/index.native.js.map +0 -1
  122. package/dist/jsx/variants.mjs +0 -41
  123. package/dist/jsx/variants.mjs.map +0 -1
  124. package/dist/jsx/variants.native.js +0 -73
  125. package/dist/jsx/variants.native.js.map +0 -1
@@ -1,74 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","getElevation_exports","getElevation","getSizedElevation","module","exports","import_core","require","size","extras","tokens","token","sizeNum","isVariable","val","param","theme","num","_$val","getVariableValue","height","shadowRadius","Math","round","shadow","shadowColor","shadowOffset","width","isAndroid","elevationAndroid"],"sources":["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(\"@hanzogui/core\");\nvar getElevation = function(size, extras) {\n if (!size) return;\n var { tokens } = extras;\n var token = tokens.size[size];\n var sizeNum = (0, import_core.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 (val === true) {\n var _$val = (0, import_core.getVariableValue)(tokens.size[\"true\"]);\n if (typeof _$val === \"number\") {\n num = _$val;\n } else {\n num = 10;\n }\n } else {\n num = +val;\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 shadow = {\n shadowColor: theme.shadowColor,\n shadowRadius,\n shadowOffset: {\n height,\n width: 0\n },\n ...import_core.isAndroid ? {\n elevationAndroid: 2 * height\n } : {}\n };\n return shadow;\n};\n//# sourceMappingURL=getElevation.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAAC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A,CAASW,GAAG,EAAEC,KAAK,EAAE;EAC3C,IAAI;IAAEC,KAAK;IAAEN;EAAO,CAAC,GAAGK,KAAK;EAC7B,IAAIE,GAAG,GAAG,CAAC;EACX,IAAIH,GAAG,KAAK,IAAI,EAAE;IAChB,IAAII,KAAK,GAAG,CAAC,CAAC,EAAEZ,WAAW,CAACa,gBAAgB,EAAET,MAAM,CAACF,IAAI,CAAC,MAAM,CAAC,CAAC;IAClE,IAAI,OAAOU,KAAK,KAAK,QAAQ,EAAE;MAC7BD,GAAG,GAAGC,KAAK;IACb,CAAC,MAAM;MACLD,GAAG,GAAG,EAAE;IACV;EACF,CAAC,MAAM;IACLA,GAAG,GAAG,CAACH,GAAG;EACZ;EACA,IAAIG,GAAG,KAAK,CAAC,EAAE;IACb;EACF;EACA,IAAI,CAACG,MAAM,EAAEC,YAAY,CAAC,GAAG,CAC3BC,IAAI,CAACC,KAAK,CAACN,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,EACvBK,IAAI,CAACC,KAAK,CAACN,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CACxB;EACD,IAAIO,MAAM,GAAG;IACXC,WAAW,EAAET,KAAK,CAACS,WAAW;IAC9BJ,YAAY;IACZK,YAAY,EAAE;MACZN,MAAM;MACNO,KAAK,EAAE;IACT,CAAC;IACD,IAAGrB,WAAW,CAACsB,SAAS,GAAG;MACzBC,gBAAgB,EAAE,CAAC,GAAGT;IACxB,CAAC,GAAG,CAAC,CAAC;EACR,CAAC;EACD,OAAOI,MAAM;AACf,CAAC","ignoreList":[]}
package/dist/jsx/index.js DELETED
@@ -1,6 +0,0 @@
1
- export * from "./Stacks.mjs";
2
- export * from "./ThemeableStack.mjs";
3
- export * from "./SizableStack.mjs";
4
- export * from "./NestingContext.mjs";
5
- export * from "./getElevation.mjs";
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- export * from "./Stacks.mjs";
2
- export * from "./ThemeableStack.mjs";
3
- export * from "./SizableStack.mjs";
4
- export * from "./NestingContext.mjs";
5
- export * from "./getElevation.mjs";
6
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
@@ -1,27 +0,0 @@
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", {
18
- value: true
19
- }), mod);
20
- var index_exports = {};
21
- module.exports = __toCommonJS(index_exports);
22
- __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
- __reExport(index_exports, require("./NestingContext.native.js"), module.exports);
26
- __reExport(index_exports, require("./getElevation.native.js"), module.exports);
27
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc","key","call","get","enumerable","__reExport","target","mod","secondTarget","__toCommonJS","value","index_exports","module","exports","require"],"sources":["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(\"./ThemeableStack\"), module.exports);\n__reExport(index_exports, require(\"./SizableStack\"), 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":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,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OAAO,CAAC;AACtER,UAAU,CAACM,aAAa,EAAEG,OAAO,CAAC,0BAAgB,CAAC,EAAEF,MAAM,CAACC,OAAO,CAAC","ignoreList":[]}
@@ -1,41 +0,0 @@
1
- import { getElevation } from "./getElevation.mjs";
2
- const elevate = {
3
- true: (_, extras) => {
4
- return getElevation(extras.props["size"], extras);
5
- }
6
- };
7
- const bordered = (val, {
8
- props
9
- }) => {
10
- return {
11
- // TODO size it with size in '...size'
12
- borderWidth: typeof val === "number" ? val : 1,
13
- borderColor: "$borderColor"
14
- };
15
- };
16
- const circularStyle = {
17
- borderRadius: 1e5,
18
- padding: 0
19
- };
20
- const circular = {
21
- true: (_, {
22
- props,
23
- tokens
24
- }) => {
25
- if (!("size" in props)) {
26
- return circularStyle;
27
- }
28
- const size = typeof props.size === "number" ? props.size : tokens.size[props.size];
29
- return {
30
- ...circularStyle,
31
- width: size,
32
- height: size,
33
- maxWidth: size,
34
- maxHeight: size,
35
- minWidth: size,
36
- minHeight: size
37
- };
38
- }
39
- };
40
- export { bordered, circular, elevate };
41
- //# sourceMappingURL=variants.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getElevation","elevate","true","_","extras","props","bordered","val","borderWidth","borderColor","circularStyle","borderRadius","padding","circular","tokens","size","width","height","maxWidth","maxHeight","minWidth","minHeight"],"sources":["../../src/variants.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,YAAA,QAAoB;AAEtB,MAAMC,OAAA,GAAU;EACrBC,IAAA,EAAMA,CAACC,CAAA,EAAYC,MAAA,KAAgB;IACjC,OAAOJ,YAAA,CAAaI,MAAA,CAAOC,KAAA,CAAM,MAAM,GAAGD,MAAM;EAClD;AACF;AAEO,MAAME,QAAA,GAAWA,CAACC,GAAA,EAAuB;EAAEF;AAAM,MAAM;EAC5D,OAAO;IAAA;IAELG,WAAA,EAAa,OAAOD,GAAA,KAAQ,WAAWA,GAAA,GAAM;IAC7CE,WAAA,EAAa;EACf;AACF;AAEA,MAAMC,aAAA,GAAgB;EACpBC,YAAA,EAAc;EACdC,OAAA,EAAS;AACX;AAEO,MAAMC,QAAA,GAAW;EACtBX,IAAA,EAAMA,CAACC,CAAA,EAAG;IAAEE,KAAA;IAAOS;EAAO,MAAM;IAC9B,IAAI,EAAE,UAAUT,KAAA,GAAQ;MACtB,OAAOK,aAAA;IACT;IACA,MAAMK,IAAA,GAAO,OAAOV,KAAA,CAAMU,IAAA,KAAS,WAAWV,KAAA,CAAMU,IAAA,GAAOD,MAAA,CAAOC,IAAA,CAAKV,KAAA,CAAMU,IAAI;IACjF,OAAO;MACL,GAAGL,aAAA;MACHM,KAAA,EAAOD,IAAA;MACPE,MAAA,EAAQF,IAAA;MACRG,QAAA,EAAUH,IAAA;MACVI,SAAA,EAAWJ,IAAA;MACXK,QAAA,EAAUL,IAAA;MACVM,SAAA,EAAWN;IACb;EACF;AACF","ignoreList":[]}
@@ -1,73 +0,0 @@
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 variants_exports = {};
26
- __export(variants_exports, {
27
- bordered: () => bordered,
28
- circular: () => circular,
29
- elevate: () => elevate
30
- });
31
- module.exports = __toCommonJS(variants_exports);
32
- var import_getElevation = require("./getElevation.native.js");
33
- var elevate = {
34
- true: function (_, extras) {
35
- return (0, import_getElevation.getElevation)(extras.props["size"], extras);
36
- }
37
- };
38
- var bordered = function (val, param) {
39
- var {
40
- props
41
- } = param;
42
- return {
43
- // TODO size it with size in '...size'
44
- borderWidth: typeof val === "number" ? val : 1,
45
- borderColor: "$borderColor"
46
- };
47
- };
48
- var circularStyle = {
49
- borderRadius: 1e5,
50
- padding: 0
51
- };
52
- var circular = {
53
- true: function (_, param) {
54
- var {
55
- props,
56
- tokens
57
- } = param;
58
- if (!("size" in props)) {
59
- return circularStyle;
60
- }
61
- var size = typeof props.size === "number" ? props.size : tokens.size[props.size];
62
- return {
63
- ...circularStyle,
64
- width: size,
65
- height: size,
66
- maxWidth: size,
67
- maxHeight: size,
68
- minWidth: size,
69
- minHeight: size
70
- };
71
- }
72
- };
73
- //# sourceMappingURL=variants.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","variants_exports","bordered","circular","elevate","module","exports","import_getElevation","require","true","_","extras","getElevation","props","val","param","borderWidth","borderColor","circularStyle","borderRadius","padding","tokens","size","width","height","maxWidth","maxHeight","minWidth","minHeight"],"sources":["variants.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 variants_exports = {};\n__export(variants_exports, {\n bordered: () => bordered,\n circular: () => circular,\n elevate: () => elevate\n});\nmodule.exports = __toCommonJS(variants_exports);\nvar import_getElevation = require(\"./getElevation\");\nvar elevate = {\n true: function(_, extras) {\n return (0, import_getElevation.getElevation)(extras.props[\"size\"], extras);\n }\n};\nvar bordered = function(val, param) {\n var { props } = param;\n return {\n // TODO size it with size in '...size'\n borderWidth: typeof val === \"number\" ? val : 1,\n borderColor: \"$borderColor\"\n };\n};\nvar circularStyle = {\n borderRadius: 1e5,\n padding: 0\n};\nvar circular = {\n true: function(_, param) {\n var { props, tokens } = param;\n if (!(\"size\" in props)) {\n return circularStyle;\n }\n var size = typeof props.size === \"number\" ? props.size : tokens.size[props.size];\n return {\n ...circularStyle,\n width: size,\n height: size,\n maxWidth: size,\n maxHeight: size,\n minWidth: size,\n minHeight: size\n };\n }\n};\n//# sourceMappingURL=variants.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAO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