@tamagui/stacks 2.7.7 → 3.0.0-beta.1091.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/cjs/NestingContext.cjs +17 -26
  2. package/dist/cjs/NestingContext.native.cjs +33 -0
  3. package/dist/cjs/NestingContext.native.js +18 -26
  4. package/dist/cjs/NestingContext.native.js.map +1 -1
  5. package/dist/cjs/Stacks.cjs +24 -41
  6. package/dist/cjs/Stacks.native.cjs +47 -0
  7. package/dist/cjs/Stacks.native.js +24 -40
  8. package/dist/cjs/Stacks.native.js.map +1 -1
  9. package/dist/cjs/getElevation.cjs +42 -57
  10. package/dist/cjs/getElevation.native.cjs +58 -0
  11. package/dist/cjs/getElevation.native.js +44 -58
  12. package/dist/cjs/getElevation.native.js.map +1 -1
  13. package/dist/cjs/index.cjs +9 -13
  14. package/dist/cjs/index.native.cjs +22 -0
  15. package/dist/cjs/index.native.js +9 -12
  16. package/dist/cjs/index.native.js.map +1 -1
  17. package/dist/esm/NestingContext.mjs +2 -0
  18. package/dist/esm/NestingContext.mjs.map +1 -1
  19. package/dist/esm/NestingContext.native.js +3 -1
  20. package/dist/esm/NestingContext.native.js.map +1 -1
  21. package/dist/esm/Stacks.mjs +11 -23
  22. package/dist/esm/Stacks.mjs.map +1 -1
  23. package/dist/esm/Stacks.native.js +11 -23
  24. package/dist/esm/Stacks.native.js.map +1 -1
  25. package/dist/esm/getElevation.mjs +31 -42
  26. package/dist/esm/getElevation.mjs.map +1 -1
  27. package/dist/esm/getElevation.native.js +32 -43
  28. package/dist/esm/getElevation.native.js.map +1 -1
  29. package/dist/esm/index.js +5 -6
  30. package/dist/esm/index.mjs +5 -6
  31. package/dist/esm/index.native.js +5 -6
  32. package/dist/jsx/NestingContext.mjs +2 -0
  33. package/dist/jsx/NestingContext.mjs.map +1 -1
  34. package/dist/jsx/NestingContext.native.cjs +33 -0
  35. package/dist/jsx/NestingContext.native.js +18 -26
  36. package/dist/jsx/NestingContext.native.js.map +1 -1
  37. package/dist/jsx/Stacks.mjs +11 -23
  38. package/dist/jsx/Stacks.mjs.map +1 -1
  39. package/dist/jsx/Stacks.native.cjs +47 -0
  40. package/dist/jsx/Stacks.native.js +24 -40
  41. package/dist/jsx/Stacks.native.js.map +1 -1
  42. package/dist/jsx/getElevation.mjs +31 -42
  43. package/dist/jsx/getElevation.mjs.map +1 -1
  44. package/dist/jsx/getElevation.native.cjs +58 -0
  45. package/dist/jsx/getElevation.native.js +44 -58
  46. package/dist/jsx/getElevation.native.js.map +1 -1
  47. package/dist/jsx/index.js +5 -6
  48. package/dist/jsx/index.mjs +5 -6
  49. package/dist/jsx/index.native.cjs +22 -0
  50. package/dist/jsx/index.native.js +9 -12
  51. package/dist/jsx/index.native.js.map +1 -1
  52. package/package.json +6 -6
  53. package/src/Stacks.tsx +1 -18
  54. package/src/getElevation.tsx +26 -40
  55. package/src/index.ts +0 -2
  56. package/types/Stacks.d.ts +39 -20
  57. package/types/Stacks.d.ts.map +1 -1
  58. package/types/getElevation.d.ts +2 -11
  59. package/types/getElevation.d.ts.map +1 -1
  60. package/types/index.d.ts +0 -2
  61. package/types/index.d.ts.map +1 -1
  62. package/dist/cjs/SizableStack.cjs +0 -52
  63. package/dist/cjs/SizableStack.native.js +0 -55
  64. package/dist/cjs/SizableStack.native.js.map +0 -1
  65. package/dist/cjs/ThemeableStack.cjs +0 -63
  66. package/dist/cjs/ThemeableStack.native.js +0 -66
  67. package/dist/cjs/ThemeableStack.native.js.map +0 -1
  68. package/dist/cjs/variants.cjs +0 -68
  69. package/dist/cjs/variants.native.js +0 -73
  70. package/dist/cjs/variants.native.js.map +0 -1
  71. package/dist/esm/SizableStack.mjs +0 -27
  72. package/dist/esm/SizableStack.mjs.map +0 -1
  73. package/dist/esm/SizableStack.native.js +0 -27
  74. package/dist/esm/SizableStack.native.js.map +0 -1
  75. package/dist/esm/ThemeableStack.mjs +0 -37
  76. package/dist/esm/ThemeableStack.mjs.map +0 -1
  77. package/dist/esm/ThemeableStack.native.js +0 -37
  78. package/dist/esm/ThemeableStack.native.js.map +0 -1
  79. package/dist/esm/index.js.map +0 -1
  80. package/dist/esm/index.mjs.map +0 -1
  81. package/dist/esm/index.native.js.map +0 -1
  82. package/dist/esm/variants.mjs +0 -41
  83. package/dist/esm/variants.mjs.map +0 -1
  84. package/dist/esm/variants.native.js +0 -43
  85. package/dist/esm/variants.native.js.map +0 -1
  86. package/dist/jsx/SizableStack.mjs +0 -27
  87. package/dist/jsx/SizableStack.mjs.map +0 -1
  88. package/dist/jsx/SizableStack.native.js +0 -55
  89. package/dist/jsx/SizableStack.native.js.map +0 -1
  90. package/dist/jsx/ThemeableStack.mjs +0 -37
  91. package/dist/jsx/ThemeableStack.mjs.map +0 -1
  92. package/dist/jsx/ThemeableStack.native.js +0 -66
  93. package/dist/jsx/ThemeableStack.native.js.map +0 -1
  94. package/dist/jsx/index.js.map +0 -1
  95. package/dist/jsx/index.mjs.map +0 -1
  96. package/dist/jsx/variants.mjs +0 -41
  97. package/dist/jsx/variants.mjs.map +0 -1
  98. package/dist/jsx/variants.native.js +0 -73
  99. package/dist/jsx/variants.native.js.map +0 -1
  100. package/src/SizableStack.tsx +0 -33
  101. package/src/ThemeableStack.tsx +0 -47
  102. package/src/variants.tsx +0 -38
  103. package/types/SizableStack.d.ts +0 -14
  104. package/types/SizableStack.d.ts.map +0 -1
  105. package/types/ThemeableStack.d.ts +0 -87
  106. package/types/ThemeableStack.d.ts.map +0 -1
  107. package/types/variants.d.ts +0 -28
  108. package/types/variants.d.ts.map +0 -1
@@ -1,6 +1,5 @@
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
+ export * from "./Stacks.mjs"
2
+
3
+ export * from "./NestingContext.mjs"
4
+
5
+ export * from "./getElevation.mjs"
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __copyProps = (to, from, except, desc) => {
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
15
+ };
16
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var index_exports = {};
19
+ module.exports = __toCommonJS(index_exports);
20
+ __reExport(index_exports, require("./Stacks.native.js"), module.exports);
21
+ __reExport(index_exports, require("./NestingContext.native.js"), module.exports);
22
+ __reExport(index_exports, require("./getElevation.native.js"), module.exports);
@@ -5,23 +5,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __copyProps = (to, from, except, desc) => {
8
- 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;
8
+ if (from && typeof from === "object" || typeof from === "function") {
9
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
+ get: () => from[key],
11
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
+ });
13
+ }
14
+ return to;
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
18
- value: true
19
- }), mod);
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
18
  var index_exports = {};
21
19
  module.exports = __toCommonJS(index_exports);
22
20
  __reExport(index_exports, require("./Stacks.native.js"), module.exports);
23
- __reExport(index_exports, require("./ThemeableStack.native.js"), module.exports);
24
- __reExport(index_exports, require("./SizableStack.native.js"), module.exports);
25
21
  __reExport(index_exports, require("./NestingContext.native.js"), module.exports);
26
22
  __reExport(index_exports, require("./getElevation.native.js"), module.exports);
23
+
27
24
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA;;AACA,IAAAA,SAAA,GAAcC,MAAA,CAAAC,cAAA;AACd,IAAAC,gBAAc,GAAAF,MAAA,CAAAG,wBAAA;AACd,IAAAC,iBAAc,GAAAJ,MAAA,CAAAK,mBAAA;AACd,IAAAC,YAAc,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["jsx/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./Stacks\"), module.exports);\n__reExport(index_exports, require(\"./NestingContext\"), module.exports);\n__reExport(index_exports, require(\"./getElevation\"), module.exports);\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,cAAc,QAAQ,KAAK,kBAAkB,YAAY,QAAQ,KAAK,SAAS,GAAG,gBAAgB,YAAY,cAAc,KAAK,SAAS;AAC9I,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,OAAO,UAAU,aAAa,aAAa;AAC3C,WAAW,eAAe,QAAQ,oBAAU,GAAG,OAAO,OAAO;AAC7D,WAAW,eAAe,QAAQ,4BAAkB,GAAG,OAAO,OAAO;AACrE,WAAW,eAAe,QAAQ,0BAAgB,GAAG,OAAO,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@tamagui/stacks",
3
- "version": "2.7.7",
3
+ "version": "3.0.0-beta.1091.1",
4
+ "license": "MIT",
4
5
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
6
  "source": "src/index.ts",
6
7
  "files": [
@@ -35,13 +36,12 @@
35
36
  "clean:build": "tamagui-build clean:build"
36
37
  },
37
38
  "dependencies": {
38
- "@tamagui/core": "2.7.7",
39
- "@tamagui/get-button-sized": "2.7.7",
40
- "@tamagui/web": "2.7.7"
39
+ "@tamagui/core": "3.0.0-beta.1091.1",
40
+ "@tamagui/web": "3.0.0-beta.1091.1"
41
41
  },
42
42
  "devDependencies": {
43
- "@tamagui/build": "2.7.7",
44
- "react": ">=19"
43
+ "@tamagui/build": "3.0.0-beta.1091.1",
44
+ "react": "19.2.3"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=19"
package/src/Stacks.tsx CHANGED
@@ -4,11 +4,6 @@ import { View, styled } from '@tamagui/core'
4
4
  import { getElevation } from './getElevation'
5
5
 
6
6
  export interface StackVariants {
7
- /**
8
- * @deprecated use `inset: 0, position: 'absolute'` instead
9
- */
10
- fullscreen?: boolean
11
-
12
7
  elevation?: number | SizeTokens
13
8
  }
14
9
 
@@ -18,20 +13,8 @@ export type YStackProps = Omit<GetProps<typeof YStack>, keyof StackVariants> &
18
13
  export type XStackProps = YStackProps
19
14
  export type ZStackProps = YStackProps
20
15
 
21
- export const fullscreenStyle = {
22
- position: 'absolute',
23
- inset: 0,
24
- } as const
25
-
26
16
  const variants = {
27
- fullscreen: {
28
- true: fullscreenStyle,
29
- },
30
-
31
- elevation: {
32
- '...size': getElevation,
33
- ':number': getElevation,
34
- },
17
+ elevation: getElevation,
35
18
  } as const
36
19
 
37
20
  /**
@@ -1,47 +1,33 @@
1
- import type {
2
- SizeTokens,
3
- SizeVariantSpreadFunction,
4
- ViewProps,
5
- VariantSpreadExtras,
6
- } from '@tamagui/core'
7
- import { getVariableValue, isAndroid, isVariable } from '@tamagui/core'
1
+ import type { SizeTokens } from '@tamagui/core'
2
+ import { isAndroid, resolveSize, styled } from '@tamagui/core'
8
3
 
9
- export const getElevation: SizeVariantSpreadFunction<ViewProps> = (size, extras) => {
4
+ export const getElevation = styled.dynamic<SizeTokens | number | boolean>((size, env) => {
10
5
  if (!size) return
11
- const { tokens } = extras
12
- const token = tokens.size[size]
13
- const sizeNum = (isVariable(token) ? +token.val : size) as number
14
- return getSizedElevation(sizeNum, extras)
15
- }
6
+ // elevation={10} means 10px, not size token '10'. the size scale is keyed by
7
+ // numeric-looking strings, so only a non-numeric token may be looked up.
8
+ if (typeof size === 'number') return getSizedElevation(size, env)
9
+ return getSizedElevation(resolveSize(size, env).controlHeight, env)
10
+ })
16
11
 
17
- export const getSizedElevation = (
18
- val: SizeTokens | number | boolean,
19
- { theme, tokens }: VariantSpreadExtras<any>
20
- ) => {
21
- let num = 0
22
- if (val === true) {
23
- const val = getVariableValue(tokens.size['true'])
12
+ export const getSizedElevation = styled.dynamic<SizeTokens | number | boolean>(
13
+ (val, env) => {
14
+ const { theme } = env
15
+ let num = 0
24
16
  if (typeof val === 'number') {
25
17
  num = val
26
- } else {
27
- num = 10
18
+ } else if (val) {
19
+ num = resolveSize(val, env).controlHeight || 10
20
+ }
21
+ if (num === 0) {
22
+ return
23
+ }
24
+ const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)]
25
+ const shadowColor = (theme as any)['shadow-color'] ?? (theme as any).shadowColor
26
+ return {
27
+ shadowColor,
28
+ shadowRadius,
29
+ shadowOffset: { height, width: 0 },
30
+ elevationAndroid: isAndroid ? 2 * height : undefined,
28
31
  }
29
- } else {
30
- num = +val
31
- }
32
- if (num === 0) {
33
- return
34
- }
35
- const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)]
36
- const shadow = {
37
- shadowColor: theme.shadowColor,
38
- shadowRadius,
39
- shadowOffset: { height, width: 0 },
40
- ...(isAndroid
41
- ? {
42
- elevationAndroid: 2 * height,
43
- }
44
- : {}),
45
32
  }
46
- return shadow
47
- }
33
+ )
package/src/index.ts CHANGED
@@ -1,5 +1,3 @@
1
1
  export * from './Stacks'
2
- export * from './ThemeableStack'
3
- export * from './SizableStack'
4
2
  export * from './NestingContext'
5
3
  export * from './getElevation'
package/types/Stacks.d.ts CHANGED
@@ -1,43 +1,62 @@
1
1
  import type { GetProps, SizeTokens } from '@tamagui/core';
2
2
  export interface StackVariants {
3
- /**
4
- * @deprecated use `inset: 0, position: 'absolute'` instead
5
- */
6
- fullscreen?: boolean;
7
3
  elevation?: number | SizeTokens;
8
4
  }
9
5
  export type YStackProps = Omit<GetProps<typeof YStack>, keyof StackVariants> & StackVariants;
10
6
  export type XStackProps = YStackProps;
11
7
  export type ZStackProps = YStackProps;
12
- export declare const fullscreenStyle: {
13
- readonly position: "absolute";
14
- readonly inset: 0;
15
- };
16
8
  /**
17
9
  * @summary A view that arranges its children in a vertical line.
18
10
  * @see — Docs https://tamagui.dev/ui/stacks#xstack-ystack-zstack
19
11
  */
20
- export declare const YStack: import("@tamagui/core").TamaguiComponent<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
21
- elevation?: number | SizeTokens | undefined;
22
- fullscreen?: boolean | undefined;
23
- }, import("@tamagui/core").StaticConfigPublic>;
12
+ export declare const YStack: import("react").FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "elevation" | keyof import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithFlatVariantValues<{
13
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
14
+ }> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & {
15
+ ref?: import("react").Ref<import("@tamagui/core").TamaguiElement> | undefined;
16
+ }> & import("@tamagui/core").StaticComponentObject<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
17
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
18
+ }, import("@tamagui/core").StaticConfigPublic> & Omit<import("@tamagui/core").StaticConfigPublic, "staticConfig"> & {
19
+ __tama: [import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
20
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
21
+ }, import("@tamagui/core").StaticConfigPublic];
22
+ };
24
23
  /**
25
24
  * @summary A view that arranges its children in a horizontal line.
26
25
  * @see — Docs https://tamagui.dev/ui/stacks#xstack-ystack-zstack
27
26
  */
28
- export declare const XStack: import("@tamagui/core").TamaguiComponent<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
29
- elevation?: number | SizeTokens | undefined;
30
- fullscreen?: boolean | undefined;
31
- }, import("@tamagui/core").StaticConfigPublic>;
27
+ export declare const XStack: import("react").FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "elevation" | keyof import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithFlatVariantValues<{
28
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
29
+ }> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & {
30
+ ref?: import("react").Ref<import("@tamagui/core").TamaguiElement> | undefined;
31
+ }> & import("@tamagui/core").StaticComponentObject<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
32
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
33
+ }, import("@tamagui/core").StaticConfigPublic> & Omit<import("@tamagui/core").StaticConfigPublic, "staticConfig"> & {
34
+ __tama: [import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
35
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
36
+ }, import("@tamagui/core").StaticConfigPublic];
37
+ };
32
38
  /**
33
39
  * @summary A view that stacks its children on top of each other.
34
40
  * @see — Docs https://tamagui.dev/ui/stacks#xstack-ystack-zstack
35
41
  */
36
- export declare const ZStack: import("@tamagui/core").TamaguiComponent<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
37
- elevation?: number | SizeTokens | undefined;
38
- fullscreen?: boolean | undefined;
42
+ export declare const ZStack: import("react").FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "elevation" | keyof import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithFlatVariantValues<{
43
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
44
+ }> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & {
45
+ ref?: import("react").Ref<import("@tamagui/core").TamaguiElement> | undefined;
46
+ }> & import("@tamagui/core").StaticComponentObject<import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
47
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
39
48
  }, import("@tamagui/core").StaticConfigPublic & {
40
49
  neverFlatten: true;
41
50
  isZStack: true;
42
- }>;
51
+ }> & Omit<import("@tamagui/core").StaticConfigPublic & {
52
+ neverFlatten: true;
53
+ isZStack: true;
54
+ }, "staticConfig"> & {
55
+ __tama: [import("@tamagui/core").TamaDefer, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
56
+ elevation?: number | false | import("@tamagui/core").Size | undefined;
57
+ }, import("@tamagui/core").StaticConfigPublic & {
58
+ neverFlatten: true;
59
+ isZStack: true;
60
+ }];
61
+ };
43
62
  //# sourceMappingURL=Stacks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stacks.d.ts","sourceRoot":"","sources":["../src/Stacks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKzD,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CAChC;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,aAAa,CAAC,GAC1E,aAAa,CAAA;AAEf,MAAM,MAAM,WAAW,GAAG,WAAW,CAAA;AACrC,MAAM,MAAM,WAAW,GAAG,WAAW,CAAA;AAErC,eAAO,MAAM,eAAe;;;CAGlB,CAAA;AAaV;;;GAGG;AACH,eAAO,MAAM,MAAM;;;8CAGjB,CAAA;AAIF;;;GAGG;AACH,eAAO,MAAM,MAAM;;;8CAGjB,CAAA;AAIF;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;EASlB,CAAA"}
1
+ {"version":3,"file":"Stacks.d.ts","sourceRoot":"","sources":["../src/Stacks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAKzD,MAAM,WAAW,aAAa;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;CAChC;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,MAAM,CAAC,EAAE,MAAM,aAAa,CAAC,GAC1E,aAAa,CAAA;AAEf,MAAM,MAAM,WAAW,GAAG,WAAW,CAAA;AACrC,MAAM,MAAM,WAAW,GAAG,WAAW,CAAA;AAMrC;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;CAGjB,CAAA;AAIF;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;CAGjB,CAAA;AAIF;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CASlB,CAAA"}
@@ -1,12 +1,3 @@
1
- import type { SizeTokens, SizeVariantSpreadFunction, ViewProps, VariantSpreadExtras } from '@tamagui/core';
2
- export declare const getElevation: SizeVariantSpreadFunction<ViewProps>;
3
- export declare const getSizedElevation: (val: SizeTokens | number | boolean, { theme, tokens }: VariantSpreadExtras<any>) => {
4
- elevationAndroid?: number | undefined;
5
- shadowColor: import("@tamagui/core").Variable<string> | import("@tamagui/core").Variable<any> | import("@tamagui/core").Variable<undefined> | undefined;
6
- shadowRadius: number;
7
- shadowOffset: {
8
- height: number;
9
- width: number;
10
- };
11
- } | undefined;
1
+ export declare const getElevation: import("@tamagui/web/types/types").StyledDynamicFn<number | false | import("@tamagui/core").Size, Record<string, any>>;
2
+ export declare const getSizedElevation: import("@tamagui/web/types/types").StyledDynamicFn<number | false | import("@tamagui/core").Size, Record<string, any>>;
12
3
  //# sourceMappingURL=getElevation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getElevation.d.ts","sourceRoot":"","sources":["../src/getElevation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,yBAAyB,EACzB,SAAS,EACT,mBAAmB,EACpB,MAAM,eAAe,CAAA;AAGtB,eAAO,MAAM,YAAY,EAAE,yBAAyB,CAAC,SAAS,CAM7D,CAAA;AAED,eAAO,MAAM,iBAAiB,GAC5B,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,EAClC,mBAAmB,mBAAmB,CAAC,GAAG,CAAC;;;;;;;;aA4B5C,CAAA"}
1
+ {"version":3,"file":"getElevation.d.ts","sourceRoot":"","sources":["../src/getElevation.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,wHAMvB,CAAA;AAEF,eAAO,MAAM,iBAAiB,wHAqB7B,CAAA"}
package/types/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  export * from './Stacks';
2
- export * from './ThemeableStack';
3
- export * from './SizableStack';
4
2
  export * from './NestingContext';
5
3
  export * from './getElevation';
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA"}
@@ -1,52 +0,0 @@
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("@tamagui/core");
29
- var import_get_button_sized = require("@tamagui/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
- });
@@ -1,55 +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 SizableStack_exports = {};
26
- __export(SizableStack_exports, {
27
- SizableStack: () => SizableStack
28
- });
29
- module.exports = __toCommonJS(SizableStack_exports);
30
- var import_core = require("@tamagui/core");
31
- var import_get_button_sized = require("@tamagui/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
@@ -1 +0,0 @@
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,gBAA+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":[]}
@@ -1,63 +0,0 @@
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("@tamagui/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
- });
@@ -1,66 +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 ThemeableStack_exports = {};
26
- __export(ThemeableStack_exports, {
27
- ThemeableStack: () => ThemeableStack,
28
- themeableVariants: () => themeableVariants
29
- });
30
- module.exports = __toCommonJS(ThemeableStack_exports);
31
- var import_core = require("@tamagui/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
@@ -1 +0,0 @@
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":[]}