@tamagui/stacks 1.0.1-beta.70 → 1.0.1-beta.73

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.
@@ -30,9 +30,9 @@ const SizableStack = (0, import_core.styled)(import_Stacks.YStack, {
30
30
  flexShrink: 1,
31
31
  variants: {
32
32
  fontFamily: () => ({}),
33
- hoverable: import_variants.hoverable,
34
- pressable: import_variants.pressable,
35
- focusable: import_variants.focusable,
33
+ hoverTheme: import_variants.hoverTheme,
34
+ pressTheme: import_variants.pressTheme,
35
+ focusTheme: import_variants.focusTheme,
36
36
  circular: import_variants.circular,
37
37
  elevate: import_variants.elevate,
38
38
  bordered: import_variants.bordered,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SizableStack.tsx"],
4
- "sourcesContent": ["import { GetProps, getButtonSize, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks'\nimport { bordered, circular, elevate, focusable, hoverable, pressable } from './variants'\n\nexport const SizableStack = styled(YStack, {\n name: 'SizableStack',\n backgroundColor: '$background',\n flexDirection: 'row',\n flexShrink: 1,\n\n variants: {\n // allows the type to come in for use in size\n fontFamily: () => ({}),\n\n hoverable,\n pressable,\n focusable,\n circular,\n elevate,\n bordered,\n\n size: {\n '...size': getButtonSize,\n },\n },\n})\n\nexport type SizableStackProps = GetProps<typeof SizableStack>\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgD;AAEhD,oBAAuB;AACvB,sBAA6E;AAEtE,MAAM,eAAe,wBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,YAAY;AAAA,EAEZ,UAAU;AAAA,IAER,YAAY,MAAO,EAAC;AAAA,IAEpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW;AAAA,IACb;AAAA,EACF;AACF,CAAC;",
4
+ "sourcesContent": ["import { GetProps, getButtonSize, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks'\nimport { bordered, circular, elevate, focusTheme, hoverTheme, pressTheme } from './variants'\n\nexport const SizableStack = styled(YStack, {\n name: 'SizableStack',\n backgroundColor: '$background',\n flexDirection: 'row',\n flexShrink: 1,\n\n variants: {\n // allows the type to come in for use in size\n fontFamily: () => ({}),\n\n hoverTheme,\n pressTheme,\n focusTheme,\n circular,\n elevate,\n bordered,\n\n size: {\n '...size': getButtonSize,\n },\n },\n})\n\nexport type SizableStackProps = GetProps<typeof SizableStack>\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgD;AAEhD,oBAAuB;AACvB,sBAAgF;AAEzE,MAAM,eAAe,wBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,YAAY;AAAA,EAEZ,UAAU;AAAA,IAER,YAAY,MAAO,EAAC;AAAA,IAEpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW;AAAA,IACb;AAAA,EACF;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,6 @@ var __defProp = Object.defineProperty;
2
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
5
  var __export = (target, all) => {
7
6
  for (var name in all)
8
7
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -26,12 +25,12 @@ __export(Stacks_exports, {
26
25
  });
27
26
  module.exports = __toCommonJS(Stacks_exports);
28
27
  var import_core = require("@tamagui/core");
29
- const getElevation = /* @__PURE__ */ __name((size, extras) => {
28
+ const getElevation = (size, extras) => {
30
29
  const { tokens } = extras;
31
30
  const token = tokens.size[size];
32
31
  const sizeNum = (0, import_core.isVariable)(token) ? +token.val : size;
33
32
  return getSizedElevation(sizeNum, extras);
34
- }, "getElevation");
33
+ };
35
34
  const fullscreenStyle = {
36
35
  position: "absolute",
37
36
  top: 0,
@@ -64,7 +63,7 @@ const ZStack = (0, import_core.styled)(YStack, {
64
63
  neverFlatten: true,
65
64
  isZStack: true
66
65
  });
67
- const getSizedElevation = /* @__PURE__ */ __name((val, { theme, tokens }) => {
66
+ const getSizedElevation = (val, { theme, tokens }) => {
68
67
  const num = val === false ? 0 : val === true ? (() => {
69
68
  const val2 = (0, import_core.getVariableValue)(tokens.size["true"]);
70
69
  if (typeof val2 === "number") {
@@ -79,7 +78,7 @@ const getSizedElevation = /* @__PURE__ */ __name((val, { theme, tokens }) => {
79
78
  shadowOffset: { height, width: 0 }
80
79
  };
81
80
  return shadow;
82
- }, "getSizedElevation");
81
+ };
83
82
  // Annotate the CommonJS export names for ESM import in node:
84
83
  0 && (module.exports = {
85
84
  XStack,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Stacks.tsx"],
4
4
  "sourcesContent": ["import {\n GetProps,\n SizeTokens,\n SizeVariantSpreadFunction,\n Stack,\n StackProps,\n VariantSpreadExtras,\n getVariableValue,\n isVariable,\n styled,\n} from '@tamagui/core'\n\nexport type YStackProps = GetProps<typeof YStack>\nexport type XStackProps = YStackProps\nexport type ZStackProps = YStackProps\n\nexport const getElevation: SizeVariantSpreadFunction<StackProps> = (size, extras) => {\n const { tokens } = extras\n const token = tokens.size[size]\n const sizeNum = (isVariable(token) ? +token.val : size) as number\n // TODO this could be configurable with require('tamagui').configure({ elevation: () => {} })\n return getSizedElevation(sizeNum, extras)\n}\n\nconst fullscreenStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n} as const\n\nconst variants = {\n fullscreen: {\n true: fullscreenStyle,\n },\n elevation: {\n '...size': getElevation,\n },\n} as const\n\nexport const YStack = styled(Stack, {\n flexDirection: 'column',\n name: 'YStack',\n variants,\n})\n\nexport const XStack = styled(Stack, {\n flexDirection: 'row',\n name: 'XStack',\n variants,\n})\n\nexport const ZStack = styled(\n YStack,\n {\n name: 'ZStack',\n position: 'relative',\n },\n {\n neverFlatten: true,\n isZStack: true,\n }\n)\n\nexport const getSizedElevation = (\n val: SizeTokens | number | boolean,\n { theme, tokens }: VariantSpreadExtras<any>\n) => {\n const num =\n val === false\n ? 0\n : val === true\n ? // handles true\n (() => {\n const val = getVariableValue(tokens.size['true'])\n if (typeof val === 'number') {\n return val\n }\n return 10\n })()\n : +val\n const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)]\n const shadow = {\n shadowColor: theme.shadowColor,\n shadowRadius,\n shadowOffset: { height, width: 0 },\n }\n return shadow\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAUO;AAMA,MAAM,eAAsD,wBAAC,MAAM,WAAW;AACnF,QAAM,EAAE,WAAW;AACnB,QAAM,QAAQ,OAAO,KAAK;AAC1B,QAAM,UAAW,4BAAW,KAAK,IAAI,CAAC,MAAM,MAAM;AAElD,SAAO,kBAAkB,SAAS,MAAM;AAC1C,GANmE;AAQnE,MAAM,kBAAkB;AAAA,EACtB,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,SAAS,wBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf,MAAM;AAAA,EACN;AACF,CAAC;AAEM,MAAM,SAAS,wBAAO,mBAAO;AAAA,EAClC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AAA,EACN;AACF,CAAC;AAEM,MAAM,SAAS,wBAAO,mBAAO;AAAA,EAClC,eAAe;AAAA,EACf,MAAM;AAAA,EACN;AACF,CAAC;AAEM,MAAM,SAAS,wBACpB,QACA;AAAA,EACE,MAAM;AAAA,EACN,UAAU;AACZ,GACA;AAAA,EACE,cAAc;AAAA,EACd,UAAU;AACZ,CACF;AAEO,MAAM,oBAAoB,CAC/B,KACA,EAAE,OAAO,aACN;AACH,QAAM,MACJ,QAAQ,QACJ,IACA,QAAQ,OAEP,OAAM;AACL,UAAM,OAAM,kCAAiB,OAAO,KAAK,OAAO;AAChD,QAAI,OAAO,SAAQ,UAAU;AAC3B,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,GAAG,IACH,CAAC;AACP,QAAM,CAAC,QAAQ,gBAAgB,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,EACnC;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -33,9 +33,9 @@ const ThemeableStack = (0, import_core.styled)(import_Stacks.YStack, {
33
33
  }
34
34
  },
35
35
  radiused: import_variants.radiused,
36
- hoverable: import_variants.hoverable,
37
- pressable: import_variants.pressable,
38
- focusable: import_variants.focusable,
36
+ hoverTheme: import_variants.hoverTheme,
37
+ pressTheme: import_variants.pressTheme,
38
+ focusTheme: import_variants.focusTheme,
39
39
  circular: import_variants.circular,
40
40
  padded: import_variants.padded,
41
41
  elevate: import_variants.elevate,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ThemeableStack.tsx"],
4
- "sourcesContent": ["import { GetProps, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks'\nimport {\n bordered,\n circular,\n elevate,\n focusable,\n hoverable,\n padded,\n pressable,\n radiused,\n} from './variants'\n\nexport const ThemeableStack = styled(YStack, {\n name: 'SizableStack',\n\n variants: {\n // allows the type to come in for use in size\n fontFamily: () => ({}),\n\n backgrounded: {\n true: {\n backgroundColor: '$background',\n },\n },\n\n radiused,\n hoverable,\n pressable,\n focusable,\n circular,\n padded,\n elevate,\n bordered,\n\n transparent: {\n true: {\n backgroundColor: 'transparent',\n },\n },\n\n chromeless: {\n true: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n shadowColor: 'transparent',\n },\n },\n },\n})\n\nexport type ThemeableStackProps = GetProps<typeof ThemeableStack>\n"],
4
+ "sourcesContent": ["import { GetProps, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks'\nimport {\n bordered,\n circular,\n elevate,\n focusTheme,\n hoverTheme,\n padded,\n pressTheme,\n radiused,\n} from './variants'\n\nexport const ThemeableStack = styled(YStack, {\n name: 'SizableStack',\n\n variants: {\n // allows the type to come in for use in size\n fontFamily: () => ({}),\n\n backgrounded: {\n true: {\n backgroundColor: '$background',\n },\n },\n\n radiused,\n hoverTheme,\n pressTheme,\n focusTheme,\n circular,\n padded,\n elevate,\n bordered,\n\n transparent: {\n true: {\n backgroundColor: 'transparent',\n },\n },\n\n chromeless: {\n true: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n shadowColor: 'transparent',\n },\n },\n },\n})\n\nexport type ThemeableStackProps = GetProps<typeof ThemeableStack>\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AAEjC,oBAAuB;AACvB,sBASO;AAEA,MAAM,iBAAiB,wBAAO,sBAAQ;AAAA,EAC3C,MAAM;AAAA,EAEN,UAAU;AAAA,IAER,YAAY,MAAO,EAAC;AAAA,IAEpB,cAAc;AAAA,MACZ,MAAM;AAAA,QACJ,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,aAAa;AAAA,MACX,MAAM;AAAA,QACJ,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IAEA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,iBAAiB;AAAA,QACjB,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -16,7 +16,6 @@ var __spreadValues = (a, b) => {
16
16
  }
17
17
  return a;
18
18
  };
19
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
20
19
  var __export = (target, all) => {
21
20
  for (var name in all)
22
21
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -35,10 +34,10 @@ __export(variants_exports, {
35
34
  bordered: () => bordered,
36
35
  circular: () => circular,
37
36
  elevate: () => elevate,
38
- focusable: () => focusable,
39
- hoverable: () => hoverable,
37
+ focusTheme: () => focusTheme,
38
+ hoverTheme: () => hoverTheme,
40
39
  padded: () => padded,
41
- pressable: () => pressable,
40
+ pressTheme: () => pressTheme,
42
41
  radiused: () => radiused
43
42
  });
44
43
  module.exports = __toCommonJS(variants_exports);
@@ -48,24 +47,24 @@ const elevate = {
48
47
  return (0, import_Stacks.getElevation)(extras.props["size"], extras);
49
48
  }
50
49
  };
51
- const bordered = /* @__PURE__ */ __name((val, { props }) => {
50
+ const bordered = (val, { props }) => {
52
51
  return __spreadValues(__spreadValues(__spreadValues({
53
52
  borderWidth: typeof val === "number" ? val : 1,
54
53
  borderColor: "$borderColor"
55
- }, props.hoverable && {
54
+ }, props.hoverTheme && {
56
55
  hoverStyle: {
57
56
  borderColor: "$borderColorHover"
58
57
  }
59
- }), props.pressable && {
58
+ }), props.pressTheme && {
60
59
  pressStyle: {
61
60
  borderColor: "$borderColorPress"
62
61
  }
63
- }), props.focusable && {
62
+ }), props.focusTheme && {
64
63
  focusStyle: {
65
64
  borderColor: "$borderColorFocus"
66
65
  }
67
66
  });
68
- }, "bordered");
67
+ };
69
68
  const padded = {
70
69
  true: (_, extras) => {
71
70
  const { tokens, props } = extras;
@@ -98,7 +97,7 @@ const circular = {
98
97
  };
99
98
  }
100
99
  };
101
- const hoverable = {
100
+ const hoverTheme = {
102
101
  true: {
103
102
  hoverStyle: {
104
103
  backgroundColor: "$backgroundHover",
@@ -107,7 +106,7 @@ const hoverable = {
107
106
  },
108
107
  false: {}
109
108
  };
110
- const pressable = {
109
+ const pressTheme = {
111
110
  true: {
112
111
  pressStyle: {
113
112
  backgroundColor: "$backgroundPress",
@@ -116,7 +115,7 @@ const pressable = {
116
115
  },
117
116
  false: {}
118
117
  };
119
- const focusable = {
118
+ const focusTheme = {
120
119
  true: {
121
120
  focusStyle: {
122
121
  backgroundColor: "$backgroundFocus",
@@ -130,10 +129,10 @@ const focusable = {
130
129
  bordered,
131
130
  circular,
132
131
  elevate,
133
- focusable,
134
- hoverable,
132
+ focusTheme,
133
+ hoverTheme,
135
134
  padded,
136
- pressable,
135
+ pressTheme,
137
136
  radiused
138
137
  });
139
138
  //# sourceMappingURL=variants.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/variants.tsx"],
4
- "sourcesContent": ["import { getElevation } from './Stacks'\n\nexport const elevate = {\n true: (_, extras) => {\n return getElevation(extras.props['size'], extras)\n },\n}\n\nexport const bordered = (val: boolean | number, { props }) => {\n return {\n // TODO size it with size in '...size'\n borderWidth: typeof val === 'number' ? val : 1,\n borderColor: '$borderColor',\n\n ...(props.hoverable && {\n hoverStyle: {\n borderColor: '$borderColorHover',\n },\n }),\n\n ...(props.pressable && {\n pressStyle: {\n borderColor: '$borderColorPress',\n },\n }),\n\n ...(props.focusable && {\n focusStyle: {\n borderColor: '$borderColorFocus',\n },\n }),\n }\n}\n\nexport const padded = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n padding: tokens.space[props.size] || tokens.space['$4'],\n }\n },\n}\n\nexport const radiused = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n borderRadius: tokens.radius[props.size] || tokens.radius['$4'],\n }\n },\n}\n\nexport const circular = {\n true: (_, { props, tokens }) => {\n const size = tokens.size[props.size]\n return {\n width: size,\n height: size,\n maxWidth: size,\n maxHeight: size,\n minWidth: size,\n minHeight: size,\n borderRadius: 100_000,\n paddingVertical: 0,\n paddingHorizontal: 0,\n }\n },\n}\n\nexport const hoverable = {\n true: {\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n borderColor: '$borderColorHover',\n },\n },\n false: {},\n}\n\nexport const pressable = {\n true: {\n pressStyle: {\n backgroundColor: '$backgroundPress',\n borderColor: '$borderColorPress',\n },\n },\n false: {},\n}\n\nexport const focusable = {\n true: {\n focusStyle: {\n backgroundColor: '$backgroundFocus',\n borderColor: '$borderColorFocus',\n },\n },\n false: {},\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA6B;AAEtB,MAAM,UAAU;AAAA,EACrB,MAAM,CAAC,GAAG,WAAW;AACnB,WAAO,gCAAa,OAAO,MAAM,SAAS,MAAM;AAAA,EAClD;AACF;AAEO,MAAM,WAAW,wBAAC,KAAuB,EAAE,YAAY;AAC5D,SAAO;AAAA,IAEL,aAAa,OAAO,QAAQ,WAAW,MAAM;AAAA,IAC7C,aAAa;AAAA,KAET,MAAM,aAAa;AAAA,IACrB,YAAY;AAAA,MACV,aAAa;AAAA,IACf;AAAA,EACF,IAEI,MAAM,aAAa;AAAA,IACrB,YAAY;AAAA,MACV,aAAa;AAAA,IACf;AAAA,EACF,IAEI,MAAM,aAAa;AAAA,IACrB,YAAY;AAAA,MACV,aAAa;AAAA,IACf;AAAA,EACF;AAEJ,GAxBwB;AA0BjB,MAAM,SAAS;AAAA,EACpB,MAAM,CAAC,GAAG,WAAW;AACnB,UAAM,EAAE,QAAQ,UAAU;AAC1B,WAAO;AAAA,MACL,SAAS,OAAO,MAAM,MAAM,SAAS,OAAO,MAAM;AAAA,IACpD;AAAA,EACF;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,GAAG,WAAW;AACnB,UAAM,EAAE,QAAQ,UAAU;AAC1B,WAAO;AAAA,MACL,cAAc,OAAO,OAAO,MAAM,SAAS,OAAO,OAAO;AAAA,IAC3D;AAAA,EACF;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,GAAG,EAAE,OAAO,aAAa;AAC9B,UAAM,OAAO,OAAO,KAAK,MAAM;AAC/B,WAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU;AAAA,MACV,WAAW;AAAA,MACX,cAAc;AAAA,MACd,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,IACrB;AAAA,EACF;AACF;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;",
4
+ "sourcesContent": ["import { getElevation } from './Stacks'\n\nexport const elevate = {\n true: (_, extras) => {\n return getElevation(extras.props['size'], extras)\n },\n}\n\nexport const bordered = (val: boolean | number, { props }) => {\n return {\n // TODO size it with size in '...size'\n borderWidth: typeof val === 'number' ? val : 1,\n borderColor: '$borderColor',\n\n ...(props.hoverTheme && {\n hoverStyle: {\n borderColor: '$borderColorHover',\n },\n }),\n\n ...(props.pressTheme && {\n pressStyle: {\n borderColor: '$borderColorPress',\n },\n }),\n\n ...(props.focusTheme && {\n focusStyle: {\n borderColor: '$borderColorFocus',\n },\n }),\n }\n}\n\nexport const padded = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n padding: tokens.space[props.size] || tokens.space['$4'],\n }\n },\n}\n\nexport const radiused = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n borderRadius: tokens.radius[props.size] || tokens.radius['$4'],\n }\n },\n}\n\nexport const circular = {\n true: (_, { props, tokens }) => {\n const size = tokens.size[props.size]\n return {\n width: size,\n height: size,\n maxWidth: size,\n maxHeight: size,\n minWidth: size,\n minHeight: size,\n borderRadius: 100_000,\n paddingVertical: 0,\n paddingHorizontal: 0,\n }\n },\n}\n\nexport const hoverTheme = {\n true: {\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n borderColor: '$borderColorHover',\n },\n },\n false: {},\n}\n\nexport const pressTheme = {\n true: {\n pressStyle: {\n backgroundColor: '$backgroundPress',\n borderColor: '$borderColorPress',\n },\n },\n false: {},\n}\n\nexport const focusTheme = {\n true: {\n focusStyle: {\n backgroundColor: '$backgroundFocus',\n borderColor: '$borderColorFocus',\n },\n },\n false: {},\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA6B;AAEtB,MAAM,UAAU;AAAA,EACrB,MAAM,CAAC,GAAG,WAAW;AACnB,WAAO,gCAAa,OAAO,MAAM,SAAS,MAAM;AAAA,EAClD;AACF;AAEO,MAAM,WAAW,CAAC,KAAuB,EAAE,YAAY;AAC5D,SAAO;AAAA,IAEL,aAAa,OAAO,QAAQ,WAAW,MAAM;AAAA,IAC7C,aAAa;AAAA,KAET,MAAM,cAAc;AAAA,IACtB,YAAY;AAAA,MACV,aAAa;AAAA,IACf;AAAA,EACF,IA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C;AACV;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { getButtonSize, styled } from "@tamagui/core";
2
2
  import { YStack } from "./Stacks";
3
- import { bordered, circular, elevate, focusable, hoverable, pressable } from "./variants";
3
+ import { bordered, circular, elevate, focusTheme, hoverTheme, pressTheme } from "./variants";
4
4
  const SizableStack = styled(YStack, {
5
5
  name: "SizableStack",
6
6
  backgroundColor: "$background",
@@ -8,9 +8,9 @@ const SizableStack = styled(YStack, {
8
8
  flexShrink: 1,
9
9
  variants: {
10
10
  fontFamily: () => ({}),
11
- hoverable,
12
- pressable,
13
- focusable,
11
+ hoverTheme,
12
+ pressTheme,
13
+ focusTheme,
14
14
  circular,
15
15
  elevate,
16
16
  bordered,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/SizableStack.tsx"],
4
- "sourcesContent": ["import { GetProps, getButtonSize, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks'\nimport { bordered, circular, elevate, focusable, hoverable, pressable } from './variants'\n\nexport const SizableStack = styled(YStack, {\n name: 'SizableStack',\n backgroundColor: '$background',\n flexDirection: 'row',\n flexShrink: 1,\n\n variants: {\n // allows the type to come in for use in size\n fontFamily: () => ({}),\n\n hoverable,\n pressable,\n focusable,\n circular,\n elevate,\n bordered,\n\n size: {\n '...size': getButtonSize,\n },\n },\n})\n\nexport type SizableStackProps = GetProps<typeof SizableStack>\n"],
4
+ "sourcesContent": ["import { GetProps, getButtonSize, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks'\nimport { bordered, circular, elevate, focusTheme, hoverTheme, pressTheme } from './variants'\n\nexport const SizableStack = styled(YStack, {\n name: 'SizableStack',\n backgroundColor: '$background',\n flexDirection: 'row',\n flexShrink: 1,\n\n variants: {\n // allows the type to come in for use in size\n fontFamily: () => ({}),\n\n hoverTheme,\n pressTheme,\n focusTheme,\n circular,\n elevate,\n bordered,\n\n size: {\n '...size': getButtonSize,\n },\n },\n})\n\nexport type SizableStackProps = GetProps<typeof SizableStack>\n"],
5
5
  "mappings": "AAAA;AAEA;AACA;AAEO,MAAM,eAAe,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,YAAY;AAAA,EAEZ,UAAU;AAAA,IAER,YAAY,MAAO,EAAC;AAAA,IAEpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW;AAAA,IACb;AAAA,EACF;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,17 +1,15 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import {
4
2
  Stack,
5
3
  getVariableValue,
6
4
  isVariable,
7
5
  styled
8
6
  } from "@tamagui/core";
9
- const getElevation = /* @__PURE__ */ __name((size, extras) => {
7
+ const getElevation = (size, extras) => {
10
8
  const { tokens } = extras;
11
9
  const token = tokens.size[size];
12
10
  const sizeNum = isVariable(token) ? +token.val : size;
13
11
  return getSizedElevation(sizeNum, extras);
14
- }, "getElevation");
12
+ };
15
13
  const fullscreenStyle = {
16
14
  position: "absolute",
17
15
  top: 0,
@@ -44,7 +42,7 @@ const ZStack = styled(YStack, {
44
42
  neverFlatten: true,
45
43
  isZStack: true
46
44
  });
47
- const getSizedElevation = /* @__PURE__ */ __name((val, { theme, tokens }) => {
45
+ const getSizedElevation = (val, { theme, tokens }) => {
48
46
  const num = val === false ? 0 : val === true ? (() => {
49
47
  const val2 = getVariableValue(tokens.size["true"]);
50
48
  if (typeof val2 === "number") {
@@ -59,7 +57,7 @@ const getSizedElevation = /* @__PURE__ */ __name((val, { theme, tokens }) => {
59
57
  shadowOffset: { height, width: 0 }
60
58
  };
61
59
  return shadow;
62
- }, "getSizedElevation");
60
+ };
63
61
  export {
64
62
  XStack,
65
63
  YStack,
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Stacks.tsx"],
4
4
  "sourcesContent": ["import {\n GetProps,\n SizeTokens,\n SizeVariantSpreadFunction,\n Stack,\n StackProps,\n VariantSpreadExtras,\n getVariableValue,\n isVariable,\n styled,\n} from '@tamagui/core'\n\nexport type YStackProps = GetProps<typeof YStack>\nexport type XStackProps = YStackProps\nexport type ZStackProps = YStackProps\n\nexport const getElevation: SizeVariantSpreadFunction<StackProps> = (size, extras) => {\n const { tokens } = extras\n const token = tokens.size[size]\n const sizeNum = (isVariable(token) ? +token.val : size) as number\n // TODO this could be configurable with require('tamagui').configure({ elevation: () => {} })\n return getSizedElevation(sizeNum, extras)\n}\n\nconst fullscreenStyle = {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n} as const\n\nconst variants = {\n fullscreen: {\n true: fullscreenStyle,\n },\n elevation: {\n '...size': getElevation,\n },\n} as const\n\nexport const YStack = styled(Stack, {\n flexDirection: 'column',\n name: 'YStack',\n variants,\n})\n\nexport const XStack = styled(Stack, {\n flexDirection: 'row',\n name: 'XStack',\n variants,\n})\n\nexport const ZStack = styled(\n YStack,\n {\n name: 'ZStack',\n position: 'relative',\n },\n {\n neverFlatten: true,\n isZStack: true,\n }\n)\n\nexport const getSizedElevation = (\n val: SizeTokens | number | boolean,\n { theme, tokens }: VariantSpreadExtras<any>\n) => {\n const num =\n val === false\n ? 0\n : val === true\n ? // handles true\n (() => {\n const val = getVariableValue(tokens.size['true'])\n if (typeof val === 'number') {\n return val\n }\n return 10\n })()\n : +val\n const [height, shadowRadius] = [Math.round(num / 4 + 1), Math.round(num / 2 + 2)]\n const shadow = {\n shadowColor: theme.shadowColor,\n shadowRadius,\n shadowOffset: { height, width: 0 },\n }\n return shadow\n}\n"],
5
- "mappings": ";;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBO,MAAM,eAAsD,wBAAC,MAAM,WAAW;AACnF,QAAM,EAAE,WAAW;AACnB,QAAM,QAAQ,OAAO,KAAK;AAC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AO,KAAK;AAC1B,QAAM,UAAW,WAAW,KAAK,IAAI,CAAC,MAAM,MAAM;AAElD,SAAO,kBAAkB,SAAS,MAAM;AAC1C;AAEA,MAAM,kBAAkB;AAAA,EACtB,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,SAAS,OAAO,OAAO;AAAA,EAClC,eAAe;AAAA,EACf,MAAM;AAAA,EACN;AACF,CAAC;AAEM,MAAM,SAAS,OAAO,OAAO;AAAA,EAClC,eAAe;AAAA,EACf,MAAM;AAAA,EACN;AACF,CAAC;AAEM,MAAM,SAAS,OACpB,QACA;AAAA,EACE,MAAM;AAAA,EACN,UAAU;AACZ,GACA;AAAA,EACE,cAAc;AAAA,EACd,UAAU;AACZ,CACF;AAEO,MAAM,oBAAoB,CAC/B,KACA,EAAE,OAAO,aACN;AACH,QAAM,MACJ,QAAQ,QACJ,IACA,QAAQ,OAEP,OAAM;AACL,UAAM,OAAM,iBAAiB,OAAO,KAAK,OAAO;AAChD,QAAI,OAAO,SAAQ,UAAU;AAC3B,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,GAAG,IACH,CAAC;AACP,QAAM,CAAC,QAAQ,gBAAgB,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,EACnC;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -4,10 +4,10 @@ import {
4
4
  bordered,
5
5
  circular,
6
6
  elevate,
7
- focusable,
8
- hoverable,
7
+ focusTheme,
8
+ hoverTheme,
9
9
  padded,
10
- pressable,
10
+ pressTheme,
11
11
  radiused
12
12
  } from "./variants";
13
13
  const ThemeableStack = styled(YStack, {
@@ -20,9 +20,9 @@ const ThemeableStack = styled(YStack, {
20
20
  }
21
21
  },
22
22
  radiused,
23
- hoverable,
24
- pressable,
25
- focusable,
23
+ hoverTheme,
24
+ pressTheme,
25
+ focusTheme,
26
26
  circular,
27
27
  padded,
28
28
  elevate,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/ThemeableStack.tsx"],
4
- "sourcesContent": ["import { GetProps, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks'\nimport {\n bordered,\n circular,\n elevate,\n focusable,\n hoverable,\n padded,\n pressable,\n radiused,\n} from './variants'\n\nexport const ThemeableStack = styled(YStack, {\n name: 'SizableStack',\n\n variants: {\n // allows the type to come in for use in size\n fontFamily: () => ({}),\n\n backgrounded: {\n true: {\n backgroundColor: '$background',\n },\n },\n\n radiused,\n hoverable,\n pressable,\n focusable,\n circular,\n padded,\n elevate,\n bordered,\n\n transparent: {\n true: {\n backgroundColor: 'transparent',\n },\n },\n\n chromeless: {\n true: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n shadowColor: 'transparent',\n },\n },\n },\n})\n\nexport type ThemeableStackProps = GetProps<typeof ThemeableStack>\n"],
4
+ "sourcesContent": ["import { GetProps, styled } from '@tamagui/core'\n\nimport { YStack } from './Stacks'\nimport {\n bordered,\n circular,\n elevate,\n focusTheme,\n hoverTheme,\n padded,\n pressTheme,\n radiused,\n} from './variants'\n\nexport const ThemeableStack = styled(YStack, {\n name: 'SizableStack',\n\n variants: {\n // allows the type to come in for use in size\n fontFamily: () => ({}),\n\n backgrounded: {\n true: {\n backgroundColor: '$background',\n },\n },\n\n radiused,\n hoverTheme,\n pressTheme,\n focusTheme,\n circular,\n padded,\n elevate,\n bordered,\n\n transparent: {\n true: {\n backgroundColor: 'transparent',\n },\n },\n\n chromeless: {\n true: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n shadowColor: 'transparent',\n },\n },\n },\n})\n\nexport type ThemeableStackProps = GetProps<typeof ThemeableStack>\n"],
5
5
  "mappings": "AAAA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWO,MAAM,iBAAiB,OAAO,QAAQ;AAAA,EAC3C,MAAM;AAAA,EAEN,UAAU;AAAA,IAER,YAAY,MAAO,EAAC;AAAA,IAEpB,cAAc;AAAA,MACZ,MAAM;AAAA,QACJ,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,aAAa;AAAA,MACX,MAAM;AAAA,QACJ,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IAEA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,iBAAiB;AAAA,QACjB,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,32 +1,30 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import { getElevation } from "./Stacks";
4
2
  const elevate = {
5
3
  true: (_, extras) => {
6
4
  return getElevation(extras.props["size"], extras);
7
5
  }
8
6
  };
9
- const bordered = /* @__PURE__ */ __name((val, { props }) => {
7
+ const bordered = (val, { props }) => {
10
8
  return {
11
9
  borderWidth: typeof val === "number" ? val : 1,
12
10
  borderColor: "$borderColor",
13
- ...props.hoverable && {
11
+ ...props.hoverTheme && {
14
12
  hoverStyle: {
15
13
  borderColor: "$borderColorHover"
16
14
  }
17
15
  },
18
- ...props.pressable && {
16
+ ...props.pressTheme && {
19
17
  pressStyle: {
20
18
  borderColor: "$borderColorPress"
21
19
  }
22
20
  },
23
- ...props.focusable && {
21
+ ...props.focusTheme && {
24
22
  focusStyle: {
25
23
  borderColor: "$borderColorFocus"
26
24
  }
27
25
  }
28
26
  };
29
- }, "bordered");
27
+ };
30
28
  const padded = {
31
29
  true: (_, extras) => {
32
30
  const { tokens, props } = extras;
@@ -59,7 +57,7 @@ const circular = {
59
57
  };
60
58
  }
61
59
  };
62
- const hoverable = {
60
+ const hoverTheme = {
63
61
  true: {
64
62
  hoverStyle: {
65
63
  backgroundColor: "$backgroundHover",
@@ -68,7 +66,7 @@ const hoverable = {
68
66
  },
69
67
  false: {}
70
68
  };
71
- const pressable = {
69
+ const pressTheme = {
72
70
  true: {
73
71
  pressStyle: {
74
72
  backgroundColor: "$backgroundPress",
@@ -77,7 +75,7 @@ const pressable = {
77
75
  },
78
76
  false: {}
79
77
  };
80
- const focusable = {
78
+ const focusTheme = {
81
79
  true: {
82
80
  focusStyle: {
83
81
  backgroundColor: "$backgroundFocus",
@@ -90,10 +88,10 @@ export {
90
88
  bordered,
91
89
  circular,
92
90
  elevate,
93
- focusable,
94
- hoverable,
91
+ focusTheme,
92
+ hoverTheme,
95
93
  padded,
96
- pressable,
94
+ pressTheme,
97
95
  radiused
98
96
  };
99
97
  //# sourceMappingURL=variants.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/variants.tsx"],
4
- "sourcesContent": ["import { getElevation } from './Stacks'\n\nexport const elevate = {\n true: (_, extras) => {\n return getElevation(extras.props['size'], extras)\n },\n}\n\nexport const bordered = (val: boolean | number, { props }) => {\n return {\n // TODO size it with size in '...size'\n borderWidth: typeof val === 'number' ? val : 1,\n borderColor: '$borderColor',\n\n ...(props.hoverable && {\n hoverStyle: {\n borderColor: '$borderColorHover',\n },\n }),\n\n ...(props.pressable && {\n pressStyle: {\n borderColor: '$borderColorPress',\n },\n }),\n\n ...(props.focusable && {\n focusStyle: {\n borderColor: '$borderColorFocus',\n },\n }),\n }\n}\n\nexport const padded = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n padding: tokens.space[props.size] || tokens.space['$4'],\n }\n },\n}\n\nexport const radiused = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n borderRadius: tokens.radius[props.size] || tokens.radius['$4'],\n }\n },\n}\n\nexport const circular = {\n true: (_, { props, tokens }) => {\n const size = tokens.size[props.size]\n return {\n width: size,\n height: size,\n maxWidth: size,\n maxHeight: size,\n minWidth: size,\n minHeight: size,\n borderRadius: 100_000,\n paddingVertical: 0,\n paddingHorizontal: 0,\n }\n },\n}\n\nexport const hoverable = {\n true: {\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n borderColor: '$borderColorHover',\n },\n },\n false: {},\n}\n\nexport const pressable = {\n true: {\n pressStyle: {\n backgroundColor: '$backgroundPress',\n borderColor: '$borderColorPress',\n },\n },\n false: {},\n}\n\nexport const focusable = {\n true: {\n focusStyle: {\n backgroundColor: '$backgroundFocus',\n borderColor: '$borderColorFocus',\n },\n },\n false: {},\n}\n"],
5
- "mappings": ";;AAAA;AAEO,MAAM,UAAU;AAAA,EACrB,MAAM,CAAC,GAAG,WAAW;AACnB,WAAO,aAAa,OAAO,MAAM,SAAS,MAAM;AAAA,EAClD;AACF;AAEO,MAAM,WAAW,wBAAC,KAAuB,EAAE,YAAY;AAC5D,SAAO;AAAA,IAEL,aAAa,OAAO,QAAQ,WAAW,MAAM;AAAA,IAC7C,aAAa;AAAA,IAEb,GAAI,MAAM,aAAa;AAAA,MACrB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,GAAI,MAAM,aAAa;AAAA,MACrB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,GAAI,MAAM,aAAa;AAAA,MACrB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF,GAxBwB;AA0BjB,MAAM,SAAS;AAAA,EACpB,MAAM,CAAC,GAAG,WAAW;AACnB,UAAM,EAAE,QAAQ,UAAU;AAC1B,WAAO;AAAA,MACL,SAAS,OAAO,MAAM,MAAM,SAAS,OAAO,MAAM;AAAA,IACpD;AAAA,EACF;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,GAAG,WAAW;AACnB,UAAM,EAAE,QAAQ,UAAU;AAC1B,WAAO;AAAA,MACL,cAAc,OAAO,OAAO,MAAM,SAAS,OAAO,OAAO;AAAA,IAC3D;AAAA,EACF;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,GAAG,EAAE,OAAO,aAAa;AAC9B,UAAM,OAAO,OAAO,KAAK,MAAM;AAC/B,WAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU;AAAA,MACV,WAAW;AAAA,MACX,cAAc;AAAA,MACd,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,IACrB;AAAA,EACF;AACF;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;",
4
+ "sourcesContent": ["import { getElevation } from './Stacks'\n\nexport const elevate = {\n true: (_, extras) => {\n return getElevation(extras.props['size'], extras)\n },\n}\n\nexport const bordered = (val: boolean | number, { props }) => {\n return {\n // TODO size it with size in '...size'\n borderWidth: typeof val === 'number' ? val : 1,\n borderColor: '$borderColor',\n\n ...(props.hoverTheme && {\n hoverStyle: {\n borderColor: '$borderColorHover',\n },\n }),\n\n ...(props.pressTheme && {\n pressStyle: {\n borderColor: '$borderColorPress',\n },\n }),\n\n ...(props.focusTheme && {\n focusStyle: {\n borderColor: '$borderColorFocus',\n },\n }),\n }\n}\n\nexport const padded = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n padding: tokens.space[props.size] || tokens.space['$4'],\n }\n },\n}\n\nexport const radiused = {\n true: (_, extras) => {\n const { tokens, props } = extras\n return {\n borderRadius: tokens.radius[props.size] || tokens.radius['$4'],\n }\n },\n}\n\nexport const circular = {\n true: (_, { props, tokens }) => {\n const size = tokens.size[props.size]\n return {\n width: size,\n height: size,\n maxWidth: size,\n maxHeight: size,\n minWidth: size,\n minHeight: size,\n borderRadius: 100_000,\n paddingVertical: 0,\n paddingHorizontal: 0,\n }\n },\n}\n\nexport const hoverTheme = {\n true: {\n hoverStyle: {\n backgroundColor: '$backgroundHover',\n borderColor: '$borderColorHover',\n },\n },\n false: {},\n}\n\nexport const pressTheme = {\n true: {\n pressStyle: {\n backgroundColor: '$backgroundPress',\n borderColor: '$borderColorPress',\n },\n },\n false: {},\n}\n\nexport const focusTheme = {\n true: {\n focusStyle: {\n backgroundColor: '$backgroundFocus',\n borderColor: '$borderColorFocus',\n },\n },\n false: {},\n}\n"],
5
+ "mappings": "AAAA;AAEO,MAAM,UAAU;AAAA,EACrB,MAAM,CAAC,GAAG,WAAW;AACnB,WAAO,aAAa,OAAO,MAAM,SAAS,MAAM;AAAA,EAClD;AACF;AAEO,MAAM,WAAW,CAAC,KAAuB,EAAE,YAAY;AAC5D,SAAO;AAAA,IAEL,aAAa,OAAO,QAAQ,WAAW,MAAM;AAAA,IAC7C,aAAa;AAAA,IAEb,GAAI,MAAM,cAAc;AAAA,MACtB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,GAAI,MAAM,cAAc;AAAA,MACtB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,GAAI,MAAM,cAAc;AAAA,MACtB,YAAY;AAAA,QACV,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,SAAS;AAAA,EACpB,MAAM,CAAC,GAAG,WAAW;AACnB,UAAM,EAAE,QAAQ,UAAU;AAC1B,WAAO;AAAA,MACL,SAAS,OAAO,MAAM,MAAM,SAAS,OAAO,MAAM;AAAA,IACpD;AAAA,EACF;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,GAAG,WAAW;AACnB,UAAM,EAAE,QAAQ,UAAU;AAC1B,WAAO;AAAA,MACL,cAAc,OAAO,OAAO,MAAM,SAAS,OAAO,OAAO;AAAA,IAC3D;AAAA,EACF;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,MAAM,CAAC,GAAG,EAAE,OAAO,aAAa;AAC9B,UAAM,OAAO,OAAO,KAAK,MAAM;AAC/B,WAAO;AAAA,MACL,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,WAAW;AAAA,MACX,UAAU;AAAA,MACV,WAAW;AAAA,MACX,cAAc;AAAA,MACd,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,IACrB;AAAA,EACF;AACF;AAEO,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;AAEO,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO,CAAC;AACV;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { getButtonSize, styled } from "@tamagui/core";
2
2
  import { YStack } from "./Stacks";
3
- import { bordered, circular, elevate, focusable, hoverable, pressable } from "./variants";
3
+ import { bordered, circular, elevate, focusTheme, hoverTheme, pressTheme } from "./variants";
4
4
  const SizableStack = styled(YStack, {
5
5
  name: "SizableStack",
6
6
  backgroundColor: "$background",
@@ -8,9 +8,9 @@ const SizableStack = styled(YStack, {
8
8
  flexShrink: 1,
9
9
  variants: {
10
10
  fontFamily: () => ({}),
11
- hoverable,
12
- pressable,
13
- focusable,
11
+ hoverTheme,
12
+ pressTheme,
13
+ focusTheme,
14
14
  circular,
15
15
  elevate,
16
16
  bordered,
@@ -1,17 +1,15 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import {
4
2
  Stack,
5
3
  getVariableValue,
6
4
  isVariable,
7
5
  styled
8
6
  } from "@tamagui/core";
9
- const getElevation = /* @__PURE__ */ __name((size, extras) => {
7
+ const getElevation = (size, extras) => {
10
8
  const { tokens } = extras;
11
9
  const token = tokens.size[size];
12
10
  const sizeNum = isVariable(token) ? +token.val : size;
13
11
  return getSizedElevation(sizeNum, extras);
14
- }, "getElevation");
12
+ };
15
13
  const fullscreenStyle = {
16
14
  position: "absolute",
17
15
  top: 0,
@@ -44,7 +42,7 @@ const ZStack = styled(YStack, {
44
42
  neverFlatten: true,
45
43
  isZStack: true
46
44
  });
47
- const getSizedElevation = /* @__PURE__ */ __name((val, { theme, tokens }) => {
45
+ const getSizedElevation = (val, { theme, tokens }) => {
48
46
  const num = val === false ? 0 : val === true ? (() => {
49
47
  const val2 = getVariableValue(tokens.size["true"]);
50
48
  if (typeof val2 === "number") {
@@ -59,7 +57,7 @@ const getSizedElevation = /* @__PURE__ */ __name((val, { theme, tokens }) => {
59
57
  shadowOffset: { height, width: 0 }
60
58
  };
61
59
  return shadow;
62
- }, "getSizedElevation");
60
+ };
63
61
  export {
64
62
  XStack,
65
63
  YStack,
@@ -4,10 +4,10 @@ import {
4
4
  bordered,
5
5
  circular,
6
6
  elevate,
7
- focusable,
8
- hoverable,
7
+ focusTheme,
8
+ hoverTheme,
9
9
  padded,
10
- pressable,
10
+ pressTheme,
11
11
  radiused
12
12
  } from "./variants";
13
13
  const ThemeableStack = styled(YStack, {
@@ -20,9 +20,9 @@ const ThemeableStack = styled(YStack, {
20
20
  }
21
21
  },
22
22
  radiused,
23
- hoverable,
24
- pressable,
25
- focusable,
23
+ hoverTheme,
24
+ pressTheme,
25
+ focusTheme,
26
26
  circular,
27
27
  padded,
28
28
  elevate,
@@ -1,32 +1,30 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
1
  import { getElevation } from "./Stacks";
4
2
  const elevate = {
5
3
  true: (_, extras) => {
6
4
  return getElevation(extras.props["size"], extras);
7
5
  }
8
6
  };
9
- const bordered = /* @__PURE__ */ __name((val, { props }) => {
7
+ const bordered = (val, { props }) => {
10
8
  return {
11
9
  borderWidth: typeof val === "number" ? val : 1,
12
10
  borderColor: "$borderColor",
13
- ...props.hoverable && {
11
+ ...props.hoverTheme && {
14
12
  hoverStyle: {
15
13
  borderColor: "$borderColorHover"
16
14
  }
17
15
  },
18
- ...props.pressable && {
16
+ ...props.pressTheme && {
19
17
  pressStyle: {
20
18
  borderColor: "$borderColorPress"
21
19
  }
22
20
  },
23
- ...props.focusable && {
21
+ ...props.focusTheme && {
24
22
  focusStyle: {
25
23
  borderColor: "$borderColorFocus"
26
24
  }
27
25
  }
28
26
  };
29
- }, "bordered");
27
+ };
30
28
  const padded = {
31
29
  true: (_, extras) => {
32
30
  const { tokens, props } = extras;
@@ -59,7 +57,7 @@ const circular = {
59
57
  };
60
58
  }
61
59
  };
62
- const hoverable = {
60
+ const hoverTheme = {
63
61
  true: {
64
62
  hoverStyle: {
65
63
  backgroundColor: "$backgroundHover",
@@ -68,7 +66,7 @@ const hoverable = {
68
66
  },
69
67
  false: {}
70
68
  };
71
- const pressable = {
69
+ const pressTheme = {
72
70
  true: {
73
71
  pressStyle: {
74
72
  backgroundColor: "$backgroundPress",
@@ -77,7 +75,7 @@ const pressable = {
77
75
  },
78
76
  false: {}
79
77
  };
80
- const focusable = {
78
+ const focusTheme = {
81
79
  true: {
82
80
  focusStyle: {
83
81
  backgroundColor: "$backgroundFocus",
@@ -90,9 +88,9 @@ export {
90
88
  bordered,
91
89
  circular,
92
90
  elevate,
93
- focusable,
94
- hoverable,
91
+ focusTheme,
92
+ hoverTheme,
95
93
  padded,
96
- pressable,
94
+ pressTheme,
97
95
  radiused
98
96
  };
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "@tamagui/stacks",
3
- "version": "1.0.1-beta.70",
4
- "sideEffects": false,
3
+ "version": "1.0.1-beta.73",
4
+ "sideEffects": [
5
+ "*.css"
6
+ ],
5
7
  "source": "src/index.ts",
6
8
  "types": "./types/index.d.ts",
7
9
  "main": "dist/cjs",
@@ -17,14 +19,14 @@
17
19
  "watch": "tamagui-build --watch"
18
20
  },
19
21
  "dependencies": {
20
- "@tamagui/core": "^1.0.1-beta.70"
22
+ "@tamagui/core": "^1.0.1-beta.73"
21
23
  },
22
24
  "peerDependencies": {
23
25
  "react": "*",
24
26
  "react-dom": "*"
25
27
  },
26
28
  "devDependencies": {
27
- "@tamagui/build": "^1.0.1-beta.70",
29
+ "@tamagui/build": "^1.0.1-beta.73",
28
30
  "react": "*",
29
31
  "react-dom": "*"
30
32
  },
@@ -1,7 +1,7 @@
1
1
  import { GetProps, getButtonSize, styled } from '@tamagui/core'
2
2
 
3
3
  import { YStack } from './Stacks'
4
- import { bordered, circular, elevate, focusable, hoverable, pressable } from './variants'
4
+ import { bordered, circular, elevate, focusTheme, hoverTheme, pressTheme } from './variants'
5
5
 
6
6
  export const SizableStack = styled(YStack, {
7
7
  name: 'SizableStack',
@@ -13,9 +13,9 @@ export const SizableStack = styled(YStack, {
13
13
  // allows the type to come in for use in size
14
14
  fontFamily: () => ({}),
15
15
 
16
- hoverable,
17
- pressable,
18
- focusable,
16
+ hoverTheme,
17
+ pressTheme,
18
+ focusTheme,
19
19
  circular,
20
20
  elevate,
21
21
  bordered,
@@ -5,10 +5,10 @@ import {
5
5
  bordered,
6
6
  circular,
7
7
  elevate,
8
- focusable,
9
- hoverable,
8
+ focusTheme,
9
+ hoverTheme,
10
10
  padded,
11
- pressable,
11
+ pressTheme,
12
12
  radiused,
13
13
  } from './variants'
14
14
 
@@ -26,9 +26,9 @@ export const ThemeableStack = styled(YStack, {
26
26
  },
27
27
 
28
28
  radiused,
29
- hoverable,
30
- pressable,
31
- focusable,
29
+ hoverTheme,
30
+ pressTheme,
31
+ focusTheme,
32
32
  circular,
33
33
  padded,
34
34
  elevate,
package/src/variants.tsx CHANGED
@@ -12,19 +12,19 @@ export const bordered = (val: boolean | number, { props }) => {
12
12
  borderWidth: typeof val === 'number' ? val : 1,
13
13
  borderColor: '$borderColor',
14
14
 
15
- ...(props.hoverable && {
15
+ ...(props.hoverTheme && {
16
16
  hoverStyle: {
17
17
  borderColor: '$borderColorHover',
18
18
  },
19
19
  }),
20
20
 
21
- ...(props.pressable && {
21
+ ...(props.pressTheme && {
22
22
  pressStyle: {
23
23
  borderColor: '$borderColorPress',
24
24
  },
25
25
  }),
26
26
 
27
- ...(props.focusable && {
27
+ ...(props.focusTheme && {
28
28
  focusStyle: {
29
29
  borderColor: '$borderColorFocus',
30
30
  },
@@ -67,7 +67,7 @@ export const circular = {
67
67
  },
68
68
  }
69
69
 
70
- export const hoverable = {
70
+ export const hoverTheme = {
71
71
  true: {
72
72
  hoverStyle: {
73
73
  backgroundColor: '$backgroundHover',
@@ -77,7 +77,7 @@ export const hoverable = {
77
77
  false: {},
78
78
  }
79
79
 
80
- export const pressable = {
80
+ export const pressTheme = {
81
81
  true: {
82
82
  pressStyle: {
83
83
  backgroundColor: '$backgroundPress',
@@ -87,7 +87,7 @@ export const pressable = {
87
87
  false: {},
88
88
  }
89
89
 
90
- export const focusable = {
90
+ export const focusTheme = {
91
91
  true: {
92
92
  focusStyle: {
93
93
  backgroundColor: '$backgroundFocus',
@@ -2,11 +2,11 @@ import { GetProps } from '@tamagui/core';
2
2
  export declare const SizableStack: import("@tamagui/core").TamaguiComponent<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
3
3
  readonly fullscreen?: boolean | undefined;
4
4
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
5
- }, "focusable" | "fontFamily" | "size" | "hoverable" | "pressable" | "circular" | "elevate" | "bordered"> & {
5
+ }, "fontFamily" | "size" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered"> & {
6
6
  fontFamily?: unknown;
7
- hoverable?: boolean | undefined;
8
- pressable?: boolean | undefined;
9
- focusable?: boolean | undefined;
7
+ hoverTheme?: boolean | undefined;
8
+ pressTheme?: boolean | undefined;
9
+ focusTheme?: boolean | undefined;
10
10
  circular?: boolean | undefined;
11
11
  elevate?: boolean | undefined;
12
12
  bordered?: number | boolean | undefined;
@@ -14,11 +14,11 @@ export declare const SizableStack: import("@tamagui/core").TamaguiComponent<Omit
14
14
  } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
15
15
  readonly fullscreen?: boolean | undefined;
16
16
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
17
- }, "focusable" | "fontFamily" | "size" | "hoverable" | "pressable" | "circular" | "elevate" | "bordered"> & {
17
+ }, "fontFamily" | "size" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered"> & {
18
18
  fontFamily?: unknown;
19
- hoverable?: boolean | undefined;
20
- pressable?: boolean | undefined;
21
- focusable?: boolean | undefined;
19
+ hoverTheme?: boolean | undefined;
20
+ pressTheme?: boolean | undefined;
21
+ focusTheme?: boolean | undefined;
22
22
  circular?: boolean | undefined;
23
23
  elevate?: boolean | undefined;
24
24
  bordered?: number | boolean | undefined;
@@ -26,11 +26,11 @@ export declare const SizableStack: import("@tamagui/core").TamaguiComponent<Omit
26
26
  }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
27
27
  readonly fullscreen?: boolean | undefined;
28
28
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
29
- }, "focusable" | "fontFamily" | "size" | "hoverable" | "pressable" | "circular" | "elevate" | "bordered"> & {
29
+ }, "fontFamily" | "size" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered"> & {
30
30
  fontFamily?: unknown;
31
- hoverable?: boolean | undefined;
32
- pressable?: boolean | undefined;
33
- focusable?: boolean | undefined;
31
+ hoverTheme?: boolean | undefined;
32
+ pressTheme?: boolean | undefined;
33
+ focusTheme?: boolean | undefined;
34
34
  circular?: boolean | undefined;
35
35
  elevate?: boolean | undefined;
36
36
  bordered?: number | boolean | undefined;
@@ -40,9 +40,9 @@ export declare const SizableStack: import("@tamagui/core").TamaguiComponent<Omit
40
40
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
41
41
  } & {
42
42
  fontFamily?: unknown;
43
- hoverable?: boolean | undefined;
44
- pressable?: boolean | undefined;
45
- focusable?: boolean | undefined;
43
+ hoverTheme?: boolean | undefined;
44
+ pressTheme?: boolean | undefined;
45
+ focusTheme?: boolean | undefined;
46
46
  circular?: boolean | undefined;
47
47
  elevate?: boolean | undefined;
48
48
  bordered?: number | boolean | undefined;
File without changes
package/types/Stacks.d.ts CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -2,13 +2,13 @@ import { GetProps } from '@tamagui/core';
2
2
  export declare const ThemeableStack: import("@tamagui/core").TamaguiComponent<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
3
3
  readonly fullscreen?: boolean | undefined;
4
4
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
5
- }, "focusable" | "fontFamily" | "hoverable" | "pressable" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
5
+ }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
6
6
  fontFamily?: unknown;
7
7
  backgrounded?: boolean | undefined;
8
8
  radiused?: boolean | undefined;
9
- hoverable?: boolean | undefined;
10
- pressable?: boolean | undefined;
11
- focusable?: boolean | undefined;
9
+ hoverTheme?: boolean | undefined;
10
+ pressTheme?: boolean | undefined;
11
+ focusTheme?: boolean | undefined;
12
12
  circular?: boolean | undefined;
13
13
  padded?: boolean | undefined;
14
14
  elevate?: boolean | undefined;
@@ -18,13 +18,13 @@ export declare const ThemeableStack: import("@tamagui/core").TamaguiComponent<Om
18
18
  } & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
19
19
  readonly fullscreen?: boolean | undefined;
20
20
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
21
- }, "focusable" | "fontFamily" | "hoverable" | "pressable" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
21
+ }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
22
22
  fontFamily?: unknown;
23
23
  backgrounded?: boolean | undefined;
24
24
  radiused?: boolean | undefined;
25
- hoverable?: boolean | undefined;
26
- pressable?: boolean | undefined;
27
- focusable?: boolean | undefined;
25
+ hoverTheme?: boolean | undefined;
26
+ pressTheme?: boolean | undefined;
27
+ focusTheme?: boolean | undefined;
28
28
  circular?: boolean | undefined;
29
29
  padded?: boolean | undefined;
30
30
  elevate?: boolean | undefined;
@@ -34,13 +34,13 @@ export declare const ThemeableStack: import("@tamagui/core").TamaguiComponent<Om
34
34
  }>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
35
35
  readonly fullscreen?: boolean | undefined;
36
36
  readonly elevation?: import("@tamagui/core").SizeTokens | undefined;
37
- }, "focusable" | "fontFamily" | "hoverable" | "pressable" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
37
+ }, "fontFamily" | "hoverTheme" | "pressTheme" | "focusTheme" | "circular" | "elevate" | "bordered" | "transparent" | "backgrounded" | "radiused" | "padded" | "chromeless"> & {
38
38
  fontFamily?: unknown;
39
39
  backgrounded?: boolean | undefined;
40
40
  radiused?: boolean | undefined;
41
- hoverable?: boolean | undefined;
42
- pressable?: boolean | undefined;
43
- focusable?: boolean | undefined;
41
+ hoverTheme?: boolean | undefined;
42
+ pressTheme?: boolean | undefined;
43
+ focusTheme?: boolean | undefined;
44
44
  circular?: boolean | undefined;
45
45
  padded?: boolean | undefined;
46
46
  elevate?: boolean | undefined;
@@ -54,9 +54,9 @@ export declare const ThemeableStack: import("@tamagui/core").TamaguiComponent<Om
54
54
  fontFamily?: unknown;
55
55
  backgrounded?: boolean | undefined;
56
56
  radiused?: boolean | undefined;
57
- hoverable?: boolean | undefined;
58
- pressable?: boolean | undefined;
59
- focusable?: boolean | undefined;
57
+ hoverTheme?: boolean | undefined;
58
+ pressTheme?: boolean | undefined;
59
+ focusTheme?: boolean | undefined;
60
60
  circular?: boolean | undefined;
61
61
  padded?: boolean | undefined;
62
62
  elevate?: boolean | undefined;
File without changes
package/types/index.d.ts CHANGED
File without changes
File without changes
@@ -239,7 +239,7 @@ export declare const circular: {
239
239
  paddingHorizontal: number;
240
240
  };
241
241
  };
242
- export declare const hoverable: {
242
+ export declare const hoverTheme: {
243
243
  true: {
244
244
  hoverStyle: {
245
245
  backgroundColor: string;
@@ -248,7 +248,7 @@ export declare const hoverable: {
248
248
  };
249
249
  false: {};
250
250
  };
251
- export declare const pressable: {
251
+ export declare const pressTheme: {
252
252
  true: {
253
253
  pressStyle: {
254
254
  backgroundColor: string;
@@ -257,7 +257,7 @@ export declare const pressable: {
257
257
  };
258
258
  false: {};
259
259
  };
260
- export declare const focusable: {
260
+ export declare const focusTheme: {
261
261
  true: {
262
262
  focusStyle: {
263
263
  backgroundColor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../src/variants.tsx"],"names":[],"mappings":";AAEA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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