@tamagui/stacks 1.61.3 → 1.62.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.
Files changed (57) hide show
  1. package/dist/cjs/SizableStack.js +12 -21
  2. package/dist/cjs/SizableStack.js.map +1 -1
  3. package/dist/cjs/SizableStack.native.js +49 -0
  4. package/dist/cjs/SizableStack.native.js.map +6 -0
  5. package/dist/cjs/Stacks.js +12 -21
  6. package/dist/cjs/Stacks.js.map +1 -1
  7. package/dist/cjs/Stacks.native.js +61 -0
  8. package/dist/cjs/Stacks.native.js.map +6 -0
  9. package/dist/cjs/ThemeableStack.js +8 -16
  10. package/dist/cjs/ThemeableStack.js.map +1 -1
  11. package/dist/cjs/ThemeableStack.native.js +66 -0
  12. package/dist/cjs/ThemeableStack.native.js.map +6 -0
  13. package/dist/cjs/getElevation.js +12 -25
  14. package/dist/cjs/getElevation.js.map +1 -1
  15. package/dist/cjs/getElevation.native.js +50 -0
  16. package/dist/cjs/getElevation.native.js.map +6 -0
  17. package/dist/cjs/index.js +4 -8
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/index.native.js +24 -0
  20. package/dist/cjs/index.native.js.map +6 -0
  21. package/dist/cjs/variants.js +34 -51
  22. package/dist/cjs/variants.js.map +1 -1
  23. package/dist/cjs/variants.native.js +119 -0
  24. package/dist/cjs/variants.native.js.map +6 -0
  25. package/dist/esm/SizableStack.js +6 -8
  26. package/dist/esm/SizableStack.js.map +1 -1
  27. package/dist/esm/Stacks.js +6 -10
  28. package/dist/esm/Stacks.js.map +1 -1
  29. package/dist/esm/ThemeableStack.js +2 -4
  30. package/dist/esm/ThemeableStack.js.map +1 -1
  31. package/dist/esm/getElevation.js +7 -16
  32. package/dist/esm/getElevation.js.map +1 -1
  33. package/dist/esm/variants.js +29 -42
  34. package/dist/esm/variants.js.map +1 -1
  35. package/dist/jsx/SizableStack.js +6 -8
  36. package/dist/jsx/SizableStack.js.map +1 -1
  37. package/dist/jsx/SizableStack.native.js +38 -0
  38. package/dist/jsx/SizableStack.native.js.map +6 -0
  39. package/dist/jsx/Stacks.js +6 -10
  40. package/dist/jsx/Stacks.js.map +1 -1
  41. package/dist/jsx/Stacks.native.js +38 -0
  42. package/dist/jsx/Stacks.native.js.map +6 -0
  43. package/dist/jsx/ThemeableStack.js +2 -4
  44. package/dist/jsx/ThemeableStack.js.map +1 -1
  45. package/dist/jsx/ThemeableStack.native.js +55 -0
  46. package/dist/jsx/ThemeableStack.native.js.map +6 -0
  47. package/dist/jsx/getElevation.js +7 -16
  48. package/dist/jsx/getElevation.js.map +1 -1
  49. package/dist/jsx/getElevation.native.js +32 -0
  50. package/dist/jsx/getElevation.native.js.map +6 -0
  51. package/dist/jsx/index.native.js +4 -0
  52. package/dist/jsx/index.native.js.map +6 -0
  53. package/dist/jsx/variants.js +29 -42
  54. package/dist/jsx/variants.js.map +1 -1
  55. package/dist/jsx/variants.native.js +91 -0
  56. package/dist/jsx/variants.native.js.map +6 -0
  57. package/package.json +4 -4
@@ -1,40 +1,33 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
13
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
19
15
  var SizableStack_exports = {};
20
16
  __export(SizableStack_exports, {
21
17
  SizableStack: () => SizableStack
22
18
  });
23
19
  module.exports = __toCommonJS(SizableStack_exports);
24
- var import_core = require("@tamagui/core");
25
- var import_get_button_sized = require("@tamagui/get-button-sized");
26
- var import_Stacks = require("./Stacks");
27
- var import_variants = require("./variants");
20
+ var import_core = require("@tamagui/core"), import_get_button_sized = require("@tamagui/get-button-sized"), import_Stacks = require("./Stacks"), import_variants = require("./variants");
28
21
  const SizableStack = (0, import_core.styled)(import_Stacks.XStack, {
29
22
  name: "SizableStack",
30
23
  variants: {
31
24
  unstyled: {
32
25
  true: {
33
- hoverTheme: false,
34
- pressTheme: false,
35
- focusTheme: false,
36
- elevate: false,
37
- bordered: false
26
+ hoverTheme: !1,
27
+ pressTheme: !1,
28
+ focusTheme: !1,
29
+ elevate: !1,
30
+ bordered: !1
38
31
  }
39
32
  },
40
33
  hoverTheme: import_variants.hoverTheme,
@@ -44,9 +37,7 @@ const SizableStack = (0, import_core.styled)(import_Stacks.XStack, {
44
37
  elevate: import_variants.elevate,
45
38
  bordered: import_variants.bordered,
46
39
  size: {
47
- "...size": (val, extras) => {
48
- return (0, import_get_button_sized.getButtonSized)(val, extras);
49
- }
40
+ "...size": (val, extras) => (0, import_get_button_sized.getButtonSized)(val, extras)
50
41
  }
51
42
  }
52
43
  });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SizableStack.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AACjC,8BAA+B;AAE/B,oBAAuB;AACvB,sBAOO;AAEA,MAAM,mBAAe,oBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW,CAAC,KAAK,WAAW;AAC1B,mBAAO,wCAAe,KAAK,MAAM;AAAA,MACnC;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC,0BACjC,0BAA+B,sCAE/B,gBAAuB,qBACvB,kBAOO;AAEA,MAAM,mBAAe,oBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW,CAAC,KAAK,eACR,wCAAe,KAAK,MAAM;AAAA,IAErC;AAAA,EACF;AACF,CAAC;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var SizableStack_exports = {};
17
+ __export(SizableStack_exports, {
18
+ SizableStack: () => SizableStack
19
+ });
20
+ module.exports = __toCommonJS(SizableStack_exports);
21
+ var import_core = require("@tamagui/core"), import_get_button_sized = require("@tamagui/get-button-sized"), import_Stacks = require("./Stacks"), import_variants = require("./variants");
22
+ const SizableStack = (0, import_core.styled)(import_Stacks.XStack, {
23
+ name: "SizableStack",
24
+ variants: {
25
+ unstyled: {
26
+ true: {
27
+ hoverTheme: !1,
28
+ pressTheme: !1,
29
+ focusTheme: !1,
30
+ elevate: !1,
31
+ bordered: !1
32
+ }
33
+ },
34
+ hoverTheme: import_variants.hoverTheme,
35
+ pressTheme: import_variants.pressTheme,
36
+ focusTheme: import_variants.focusTheme,
37
+ circular: import_variants.circular,
38
+ elevate: import_variants.elevate,
39
+ bordered: import_variants.bordered,
40
+ size: {
41
+ "...size": (val, extras) => (0, import_get_button_sized.getButtonSized)(val, extras)
42
+ }
43
+ }
44
+ });
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ SizableStack
48
+ });
49
+ //# sourceMappingURL=SizableStack.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/SizableStack.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC,0BACjC,0BAA+B,sCAE/B,gBAAuB,qBACvB,kBAOO;AAEA,MAAM,mBAAe,oBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EAEN,UAAU;AAAA,IACR,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW,CAAC,KAAK,eACR,wCAAe,KAAK,MAAM;AAAA,IAErC;AAAA,EACF;AACF,CAAC;",
5
+ "names": []
6
+ }
@@ -1,21 +1,17 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
13
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
19
15
  var Stacks_exports = {};
20
16
  __export(Stacks_exports, {
21
17
  XStack: () => XStack,
@@ -24,39 +20,34 @@ __export(Stacks_exports, {
24
20
  fullscreenStyle: () => fullscreenStyle
25
21
  });
26
22
  module.exports = __toCommonJS(Stacks_exports);
27
- var import_core = require("@tamagui/core");
28
- var import_getElevation = require("./getElevation");
23
+ var import_core = require("@tamagui/core"), import_getElevation = require("./getElevation");
29
24
  const fullscreenStyle = {
30
25
  position: "absolute",
31
26
  top: 0,
32
27
  left: 0,
33
28
  right: 0,
34
29
  bottom: 0
35
- };
36
- const variants = {
30
+ }, variants = {
37
31
  fullscreen: {
38
32
  true: fullscreenStyle
39
33
  },
40
34
  elevation: {
41
35
  "...size": import_getElevation.getElevation
42
36
  }
43
- };
44
- const YStack = (0, import_core.styled)(import_core.Stack, {
37
+ }, YStack = (0, import_core.styled)(import_core.Stack, {
45
38
  flexDirection: "column",
46
39
  variants
47
- });
48
- const XStack = (0, import_core.styled)(import_core.Stack, {
40
+ }), XStack = (0, import_core.styled)(import_core.Stack, {
49
41
  flexDirection: "row",
50
42
  variants
51
- });
52
- const ZStack = (0, import_core.styled)(
43
+ }), ZStack = (0, import_core.styled)(
53
44
  YStack,
54
45
  {
55
46
  position: "relative"
56
47
  },
57
48
  {
58
- neverFlatten: true,
59
- isZStack: true
49
+ neverFlatten: !0,
50
+ isZStack: !0
60
51
  }
61
52
  );
62
53
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Stacks.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwC;AAExC,0BAA6B;AAMtB,MAAM,kBAAkB;AAAA,EAC7B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,WAAW;AAAA,EACf,YAAY;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,WAAW;AAAA,IACT,WAAW;AAAA,EACb;AACF;AAEO,MAAM,aAAS,oBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf;AACF,CAAC;AAEM,MAAM,aAAS,oBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf;AACF,CAAC;AAEM,MAAM,aAAS;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,EACZ;AACF;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwC,0BAExC,sBAA6B;AAMtB,MAAM,kBAAkB;AAAA,EAC7B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV,GAEM,WAAW;AAAA,EACf,YAAY;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,WAAW;AAAA,IACT,WAAW;AAAA,EACb;AACF,GAEa,aAAS,oBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf;AACF,CAAC,GAEY,aAAS,oBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf;AACF,CAAC,GAEY,aAAS;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,EACZ;AACF;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var Stacks_exports = {};
17
+ __export(Stacks_exports, {
18
+ XStack: () => XStack,
19
+ YStack: () => YStack,
20
+ ZStack: () => ZStack,
21
+ fullscreenStyle: () => fullscreenStyle
22
+ });
23
+ module.exports = __toCommonJS(Stacks_exports);
24
+ var import_core = require("@tamagui/core"), import_getElevation = require("./getElevation");
25
+ const fullscreenStyle = {
26
+ position: "absolute",
27
+ top: 0,
28
+ left: 0,
29
+ right: 0,
30
+ bottom: 0
31
+ }, variants = {
32
+ fullscreen: {
33
+ true: fullscreenStyle
34
+ },
35
+ elevation: {
36
+ "...size": import_getElevation.getElevation
37
+ }
38
+ }, YStack = (0, import_core.styled)(import_core.Stack, {
39
+ flexDirection: "column",
40
+ variants
41
+ }), XStack = (0, import_core.styled)(import_core.Stack, {
42
+ flexDirection: "row",
43
+ variants
44
+ }), ZStack = (0, import_core.styled)(
45
+ YStack,
46
+ {
47
+ position: "relative"
48
+ },
49
+ {
50
+ neverFlatten: !0,
51
+ isZStack: !0
52
+ }
53
+ );
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ XStack,
57
+ YStack,
58
+ ZStack,
59
+ fullscreenStyle
60
+ });
61
+ //# sourceMappingURL=Stacks.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Stacks.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwC,0BAExC,sBAA6B;AAMtB,MAAM,kBAAkB;AAAA,EAC7B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AACV,GAEM,WAAW;AAAA,EACf,YAAY;AAAA,IACV,MAAM;AAAA,EACR;AAAA,EACA,WAAW;AAAA,IACT,WAAW;AAAA,EACb;AACF,GAEa,aAAS,oBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf;AACF,CAAC,GAEY,aAAS,oBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf;AACF,CAAC,GAEY,aAAS;AAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,EACZ;AACF;",
5
+ "names": []
6
+ }
@@ -1,30 +1,24 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
13
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
19
15
  var ThemeableStack_exports = {};
20
16
  __export(ThemeableStack_exports, {
21
17
  ThemeableStack: () => ThemeableStack,
22
18
  themeableVariants: () => themeableVariants
23
19
  });
24
20
  module.exports = __toCommonJS(ThemeableStack_exports);
25
- var import_core = require("@tamagui/core");
26
- var import_Stacks = require("./Stacks");
27
- var import_variants = require("./variants");
21
+ var import_core = require("@tamagui/core"), import_Stacks = require("./Stacks"), import_variants = require("./variants");
28
22
  const chromelessStyle = {
29
23
  backgroundColor: "transparent",
30
24
  borderColor: "transparent",
@@ -32,8 +26,7 @@ const chromelessStyle = {
32
26
  hoverStyle: {
33
27
  borderColor: "transparent"
34
28
  }
35
- };
36
- const themeableVariants = {
29
+ }, themeableVariants = {
37
30
  backgrounded: {
38
31
  true: {
39
32
  backgroundColor: "$background"
@@ -61,8 +54,7 @@ const themeableVariants = {
61
54
  focusStyle: chromelessStyle
62
55
  }
63
56
  }
64
- };
65
- const ThemeableStack = (0, import_core.styled)(import_Stacks.YStack, {
57
+ }, ThemeableStack = (0, import_core.styled)(import_Stacks.YStack, {
66
58
  variants: themeableVariants
67
59
  });
68
60
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ThemeableStack.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AAEjC,oBAAuB;AACvB,sBASO;AAEP,MAAM,kBAAkB;AAAA,EACtB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AAAA,EAEb,YAAY;AAAA,IACV,aAAa;AAAA,EACf;AACF;AAEO,MAAM,oBAAoB;AAAA,EAC/B,cAAc;AAAA,IACZ,MAAM;AAAA,MACJ,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,aAAa;AAAA,IACX,MAAM;AAAA,MACJ,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AAAA,IACV,MAAM;AAAA,IACN,KAAK;AAAA,MACH,GAAG;AAAA,MACH,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,IACd;AAAA,EACF;AACF;AAEO,MAAM,qBAAiB,oBAAO,sBAAQ;AAAA,EAC3C,UAAU;AACZ,CAAC;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC,0BAEjC,gBAAuB,qBACvB,kBASO;AAEP,MAAM,kBAAkB;AAAA,EACtB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AAAA,EAEb,YAAY;AAAA,IACV,aAAa;AAAA,EACf;AACF,GAEa,oBAAoB;AAAA,EAC/B,cAAc;AAAA,IACZ,MAAM;AAAA,MACJ,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,aAAa;AAAA,IACX,MAAM;AAAA,MACJ,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AAAA,IACV,MAAM;AAAA,IACN,KAAK;AAAA,MACH,GAAG;AAAA,MACH,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,IACd;AAAA,EACF;AACF,GAEa,qBAAiB,oBAAO,sBAAQ;AAAA,EAC3C,UAAU;AACZ,CAAC;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var ThemeableStack_exports = {};
17
+ __export(ThemeableStack_exports, {
18
+ ThemeableStack: () => ThemeableStack,
19
+ themeableVariants: () => themeableVariants
20
+ });
21
+ module.exports = __toCommonJS(ThemeableStack_exports);
22
+ var import_core = require("@tamagui/core"), import_Stacks = require("./Stacks"), import_variants = require("./variants");
23
+ const chromelessStyle = {
24
+ backgroundColor: "transparent",
25
+ borderColor: "transparent",
26
+ shadowColor: "transparent",
27
+ hoverStyle: {
28
+ borderColor: "transparent"
29
+ }
30
+ }, themeableVariants = {
31
+ backgrounded: {
32
+ true: {
33
+ backgroundColor: "$background"
34
+ }
35
+ },
36
+ radiused: import_variants.radiused,
37
+ hoverTheme: import_variants.hoverTheme,
38
+ pressTheme: import_variants.pressTheme,
39
+ focusTheme: import_variants.focusTheme,
40
+ circular: import_variants.circular,
41
+ padded: import_variants.padded,
42
+ elevate: import_variants.elevate,
43
+ bordered: import_variants.bordered,
44
+ transparent: {
45
+ true: {
46
+ backgroundColor: "transparent"
47
+ }
48
+ },
49
+ chromeless: {
50
+ true: chromelessStyle,
51
+ all: {
52
+ ...chromelessStyle,
53
+ hoverStyle: chromelessStyle,
54
+ pressStyle: chromelessStyle,
55
+ focusStyle: chromelessStyle
56
+ }
57
+ }
58
+ }, ThemeableStack = (0, import_core.styled)(import_Stacks.YStack, {
59
+ variants: themeableVariants
60
+ });
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ ThemeableStack,
64
+ themeableVariants
65
+ });
66
+ //# sourceMappingURL=ThemeableStack.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/ThemeableStack.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC,0BAEjC,gBAAuB,qBACvB,kBASO;AAEP,MAAM,kBAAkB;AAAA,EACtB,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aAAa;AAAA,EAEb,YAAY;AAAA,IACV,aAAa;AAAA,EACf;AACF,GAEa,oBAAoB;AAAA,EAC/B,cAAc;AAAA,IACZ,MAAM;AAAA,MACJ,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA,aAAa;AAAA,IACX,MAAM;AAAA,MACJ,iBAAiB;AAAA,IACnB;AAAA,EACF;AAAA,EAEA,YAAY;AAAA,IACV,MAAM;AAAA,IACN,KAAK;AAAA,MACH,GAAG;AAAA,MACH,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,YAAY;AAAA,IACd;AAAA,EACF;AACF,GAEa,qBAAiB,oBAAO,sBAAQ;AAAA,EAC3C,UAAU;AACZ,CAAC;",
5
+ "names": []
6
+ }
@@ -1,21 +1,17 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
12
10
  for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
12
  return to;
17
13
  };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
19
15
  var getElevation_exports = {};
20
16
  __export(getElevation_exports, {
21
17
  getElevation: () => getElevation,
@@ -26,25 +22,17 @@ var import_core = require("@tamagui/core");
26
22
  const getElevation = (size, extras) => {
27
23
  if (!size)
28
24
  return;
29
- const { tokens } = extras;
30
- const token = tokens.size[size];
31
- const sizeNum = (0, import_core.isVariable)(token) ? +token.val : size;
25
+ const { tokens } = extras, token = tokens.size[size], sizeNum = (0, import_core.isVariable)(token) ? +token.val : size;
32
26
  return getSizedElevation(sizeNum, extras);
33
- };
34
- const getSizedElevation = (val, { theme, tokens }) => {
27
+ }, getSizedElevation = (val, { theme, tokens }) => {
35
28
  let num = 0;
36
- if (val === true) {
37
- const val2 = (0, import_core.getVariableValue)(tokens.size["true"]);
38
- if (typeof val2 === "number") {
39
- num = val2;
40
- } else {
41
- num = 10;
42
- }
43
- } else {
29
+ if (val === !0) {
30
+ const val2 = (0, import_core.getVariableValue)(tokens.size.true);
31
+ typeof val2 == "number" ? num = val2 : num = 10;
32
+ } else
44
33
  num = +val;
45
- }
46
34
  const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
47
- const shadow = {
35
+ return {
48
36
  shadowColor: theme.shadowColor,
49
37
  shadowRadius,
50
38
  shadowOffset: { height, width: 0 },
@@ -52,7 +40,6 @@ const getSizedElevation = (val, { theme, tokens }) => {
52
40
  elevationAndroid: 2 * height
53
41
  } : {}
54
42
  };
55
- return shadow;
56
43
  };
57
44
  // Annotate the CommonJS export names for ESM import in node:
58
45
  0 && (module.exports = {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/getElevation.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAQO;AAEA,MAAM,eAAsD,CAAC,MAAM,WAAW;AACnF,MAAI,CAAC;AAAM;AACX,QAAM,EAAE,OAAO,IAAI;AACnB,QAAM,QAAQ,OAAO,KAAK,IAAI;AAC9B,QAAM,cAAW,wBAAW,KAAK,IAAI,CAAC,MAAM,MAAM;AAClD,SAAO,kBAAkB,SAAS,MAAM;AAC1C;AAEO,MAAM,oBAAoB,CAC/B,KACA,EAAE,OAAO,OAAO,MACb;AACH,MAAI,MAAM;AACV,MAAI,QAAQ,MAAM;AAChB,UAAMA,WAAM,8BAAiB,OAAO,KAAK,MAAM,CAAC;AAChD,QAAI,OAAOA,SAAQ,UAAU;AAC3B,YAAMA;AAAA,IACR,OAAO;AACL,YAAM;AAAA,IACR;AAAA,EACF,OAAO;AACL,UAAM,CAAC;AAAA,EACT;AACA,QAAM,CAAC,QAAQ,YAAY,IAAI,CAAC,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,KAAK,MAAM,MAAM,IAAI,CAAC,CAAC;AAChF,QAAM,SAAS;AAAA,IACb,aAAa,MAAM;AAAA,IACnB;AAAA,IACA,cAAc,EAAE,QAAQ,OAAO,EAAE;AAAA,IACjC,GAAI,wBACA;AAAA,MACE,kBAAkB,IAAI;AAAA,IACxB,IACA,CAAC;AAAA,EACP;AACA,SAAO;AACT;",
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAQO;AAEA,MAAM,eAAsD,CAAC,MAAM,WAAW;AACnF,MAAI,CAAC;AAAM;AACX,QAAM,EAAE,OAAO,IAAI,QACb,QAAQ,OAAO,KAAK,IAAI,GACxB,cAAW,wBAAW,KAAK,IAAI,CAAC,MAAM,MAAM;AAClD,SAAO,kBAAkB,SAAS,MAAM;AAC1C,GAEa,oBAAoB,CAC/B,KACA,EAAE,OAAO,OAAO,MACb;AACH,MAAI,MAAM;AACV,MAAI,QAAQ,IAAM;AAChB,UAAMA,WAAM,8BAAiB,OAAO,KAAK,IAAO;AAChD,IAAI,OAAOA,QAAQ,WACjB,MAAMA,OAEN,MAAM;AAAA,EAEV;AACE,UAAM,CAAC;AAET,QAAM,CAAC,QAAQ,YAAY,IAAI,CAAC,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,KAAK,MAAM,MAAM,IAAI,CAAC,CAAC;AAWhF,SAVe;AAAA,IACb,aAAa,MAAM;AAAA,IACnB;AAAA,IACA,cAAc,EAAE,QAAQ,OAAO,EAAE;AAAA,IACjC,GAAI,wBACA;AAAA,MACE,kBAAkB,IAAI;AAAA,IACxB,IACA,CAAC;AAAA,EACP;AAEF;",
5
5
  "names": ["val"]
6
6
  }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
+ var getElevation_exports = {};
17
+ __export(getElevation_exports, {
18
+ getElevation: () => getElevation,
19
+ getSizedElevation: () => getSizedElevation
20
+ });
21
+ module.exports = __toCommonJS(getElevation_exports);
22
+ var import_core = require("@tamagui/core");
23
+ const getElevation = (size, extras) => {
24
+ if (!size)
25
+ return;
26
+ const { tokens } = extras, token = tokens.size[size], sizeNum = (0, import_core.isVariable)(token) ? +token.val : size;
27
+ return getSizedElevation(sizeNum, extras);
28
+ }, getSizedElevation = (val, { theme, tokens }) => {
29
+ let num = 0;
30
+ if (val === !0) {
31
+ const val2 = (0, import_core.getVariableValue)(tokens.size.true);
32
+ typeof val2 == "number" ? num = val2 : num = 10;
33
+ } else
34
+ num = +val;
35
+ const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)];
36
+ return {
37
+ shadowColor: theme.shadowColor,
38
+ shadowRadius,
39
+ shadowOffset: { height, width: 0 },
40
+ ...import_core.isAndroid ? {
41
+ elevationAndroid: 2 * height
42
+ } : {}
43
+ };
44
+ };
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ getElevation,
48
+ getSizedElevation
49
+ });
50
+ //# sourceMappingURL=getElevation.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/getElevation.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAQO;AAEA,MAAM,eAAsD,CAAC,MAAM,WAAW;AACnF,MAAI,CAAC;AAAM;AACX,QAAM,EAAE,OAAO,IAAI,QACb,QAAQ,OAAO,KAAK,IAAI,GACxB,cAAW,wBAAW,KAAK,IAAI,CAAC,MAAM,MAAM;AAClD,SAAO,kBAAkB,SAAS,MAAM;AAC1C,GAEa,oBAAoB,CAC/B,KACA,EAAE,OAAO,OAAO,MACb;AACH,MAAI,MAAM;AACV,MAAI,QAAQ,IAAM;AAChB,UAAMA,WAAM,8BAAiB,OAAO,KAAK,IAAO;AAChD,IAAI,OAAOA,QAAQ,WACjB,MAAMA,OAEN,MAAM;AAAA,EAEV;AACE,UAAM,CAAC;AAET,QAAM,CAAC,QAAQ,YAAY,IAAI,CAAC,KAAK,MAAM,MAAM,IAAI,CAAC,GAAG,KAAK,MAAM,MAAM,IAAI,CAAC,CAAC;AAWhF,SAVe;AAAA,IACb,aAAa,MAAM;AAAA,IACnB;AAAA,IACA,cAAc,EAAE,QAAQ,OAAO,EAAE;AAAA,IACjC,GAAI,wBACA;AAAA,MACE,kBAAkB,IAAI;AAAA,IACxB,IACA,CAAC;AAAA,EACP;AAEF;",
5
+ "names": ["val"]
6
+ }
package/dist/cjs/index.js CHANGED
@@ -1,18 +1,14 @@
1
- "use strict";
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
5
  var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
6
+ if (from && typeof from == "object" || typeof from == "function")
8
7
  for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
8
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
9
  return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
10
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
16
12
  var src_exports = {};
17
13
  module.exports = __toCommonJS(src_exports);
18
14
  __reExport(src_exports, require("./Stacks"), module.exports);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,qBAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,6BAFd;",
4
+ "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,qBAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,6BAFd;",
5
5
  "names": []
6
6
  }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
13
+ var src_exports = {};
14
+ module.exports = __toCommonJS(src_exports);
15
+ __reExport(src_exports, require("./Stacks"), module.exports);
16
+ __reExport(src_exports, require("./SizableStack"), module.exports);
17
+ __reExport(src_exports, require("./ThemeableStack"), module.exports);
18
+ // Annotate the CommonJS export names for ESM import in node:
19
+ 0 && (module.exports = {
20
+ ...require("./Stacks"),
21
+ ...require("./SizableStack"),
22
+ ...require("./ThemeableStack")
23
+ });
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,qBAAd;AACA,wBAAc,2BADd;AAEA,wBAAc,6BAFd;",
5
+ "names": []
6
+ }