@tamagui/stacks 1.0.1-beta.68 → 1.0.1-beta.71

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
  }
@@ -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
  }
@@ -35,10 +35,10 @@ __export(variants_exports, {
35
35
  bordered: () => bordered,
36
36
  circular: () => circular,
37
37
  elevate: () => elevate,
38
- focusable: () => focusable,
39
- hoverable: () => hoverable,
38
+ focusTheme: () => focusTheme,
39
+ hoverTheme: () => hoverTheme,
40
40
  padded: () => padded,
41
- pressable: () => pressable,
41
+ pressTheme: () => pressTheme,
42
42
  radiused: () => radiused
43
43
  });
44
44
  module.exports = __toCommonJS(variants_exports);
@@ -52,15 +52,15 @@ const bordered = /* @__PURE__ */ __name((val, { props }) => {
52
52
  return __spreadValues(__spreadValues(__spreadValues({
53
53
  borderWidth: typeof val === "number" ? val : 1,
54
54
  borderColor: "$borderColor"
55
- }, props.hoverable && {
55
+ }, props.hoverTheme && {
56
56
  hoverStyle: {
57
57
  borderColor: "$borderColorHover"
58
58
  }
59
- }), props.pressable && {
59
+ }), props.pressTheme && {
60
60
  pressStyle: {
61
61
  borderColor: "$borderColorPress"
62
62
  }
63
- }), props.focusable && {
63
+ }), props.focusTheme && {
64
64
  focusStyle: {
65
65
  borderColor: "$borderColorFocus"
66
66
  }
@@ -98,57 +98,42 @@ const circular = {
98
98
  };
99
99
  }
100
100
  };
101
- const hoverable = {
101
+ const hoverTheme = {
102
102
  true: {
103
103
  hoverStyle: {
104
104
  backgroundColor: "$backgroundHover",
105
105
  borderColor: "$borderColorHover"
106
106
  }
107
107
  },
108
- false: {
109
- hoverStyle: {
110
- backgroundColor: "$background",
111
- borderColor: "$borderColor"
112
- }
113
- }
108
+ false: {}
114
109
  };
115
- const pressable = {
110
+ const pressTheme = {
116
111
  true: {
117
112
  pressStyle: {
118
113
  backgroundColor: "$backgroundPress",
119
114
  borderColor: "$borderColorPress"
120
115
  }
121
116
  },
122
- false: {
123
- pressStyle: {
124
- backgroundColor: "$background",
125
- borderColor: "$borderColor"
126
- }
127
- }
117
+ false: {}
128
118
  };
129
- const focusable = {
119
+ const focusTheme = {
130
120
  true: {
131
121
  focusStyle: {
132
122
  backgroundColor: "$backgroundFocus",
133
123
  borderColor: "$borderColorFocus"
134
124
  }
135
125
  },
136
- false: {
137
- focusStyle: {
138
- backgroundColor: "$background",
139
- borderColor: "$borderColor"
140
- }
141
- }
126
+ false: {}
142
127
  };
143
128
  // Annotate the CommonJS export names for ESM import in node:
144
129
  0 && (module.exports = {
145
130
  bordered,
146
131
  circular,
147
132
  elevate,
148
- focusable,
149
- hoverable,
133
+ focusTheme,
134
+ hoverTheme,
150
135
  padded,
151
- pressable,
136
+ pressTheme,
152
137
  radiused
153
138
  });
154
139
  //# 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 hoverStyle: {\n backgroundColor: '$background',\n borderColor: '$borderColor',\n },\n },\n}\n\nexport const pressable = {\n true: {\n pressStyle: {\n backgroundColor: '$backgroundPress',\n borderColor: '$borderColorPress',\n },\n },\n false: {\n pressStyle: {\n backgroundColor: '$background',\n borderColor: '$borderColor',\n },\n },\n}\n\nexport const focusable = {\n true: {\n focusStyle: {\n backgroundColor: '$backgroundFocus',\n borderColor: '$borderColorFocus',\n },\n },\n false: {\n focusStyle: {\n backgroundColor: '$background',\n borderColor: '$borderColor',\n },\n },\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;A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;AAAA,IACJ,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IACL,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AACF;",
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": ";;;;;;;;;;;;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A,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,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
  }
@@ -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
  }
@@ -10,17 +10,17 @@ const bordered = /* @__PURE__ */ __name((val, { props }) => {
10
10
  return {
11
11
  borderWidth: typeof val === "number" ? val : 1,
12
12
  borderColor: "$borderColor",
13
- ...props.hoverable && {
13
+ ...props.hoverTheme && {
14
14
  hoverStyle: {
15
15
  borderColor: "$borderColorHover"
16
16
  }
17
17
  },
18
- ...props.pressable && {
18
+ ...props.pressTheme && {
19
19
  pressStyle: {
20
20
  borderColor: "$borderColorPress"
21
21
  }
22
22
  },
23
- ...props.focusable && {
23
+ ...props.focusTheme && {
24
24
  focusStyle: {
25
25
  borderColor: "$borderColorFocus"
26
26
  }
@@ -59,56 +59,41 @@ const circular = {
59
59
  };
60
60
  }
61
61
  };
62
- const hoverable = {
62
+ const hoverTheme = {
63
63
  true: {
64
64
  hoverStyle: {
65
65
  backgroundColor: "$backgroundHover",
66
66
  borderColor: "$borderColorHover"
67
67
  }
68
68
  },
69
- false: {
70
- hoverStyle: {
71
- backgroundColor: "$background",
72
- borderColor: "$borderColor"
73
- }
74
- }
69
+ false: {}
75
70
  };
76
- const pressable = {
71
+ const pressTheme = {
77
72
  true: {
78
73
  pressStyle: {
79
74
  backgroundColor: "$backgroundPress",
80
75
  borderColor: "$borderColorPress"
81
76
  }
82
77
  },
83
- false: {
84
- pressStyle: {
85
- backgroundColor: "$background",
86
- borderColor: "$borderColor"
87
- }
88
- }
78
+ false: {}
89
79
  };
90
- const focusable = {
80
+ const focusTheme = {
91
81
  true: {
92
82
  focusStyle: {
93
83
  backgroundColor: "$backgroundFocus",
94
84
  borderColor: "$borderColorFocus"
95
85
  }
96
86
  },
97
- false: {
98
- focusStyle: {
99
- backgroundColor: "$background",
100
- borderColor: "$borderColor"
101
- }
102
- }
87
+ false: {}
103
88
  };
104
89
  export {
105
90
  bordered,
106
91
  circular,
107
92
  elevate,
108
- focusable,
109
- hoverable,
93
+ focusTheme,
94
+ hoverTheme,
110
95
  padded,
111
- pressable,
96
+ pressTheme,
112
97
  radiused
113
98
  };
114
99
  //# 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 hoverStyle: {\n backgroundColor: '$background',\n borderColor: '$borderColor',\n },\n },\n}\n\nexport const pressable = {\n true: {\n pressStyle: {\n backgroundColor: '$backgroundPress',\n borderColor: '$borderColorPress',\n },\n },\n false: {\n pressStyle: {\n backgroundColor: '$background',\n borderColor: '$borderColor',\n },\n },\n}\n\nexport const focusable = {\n true: {\n focusStyle: {\n backgroundColor: '$backgroundFocus',\n borderColor: '$borderColorFocus',\n },\n },\n false: {\n focusStyle: {\n backgroundColor: '$background',\n borderColor: '$borderColor',\n },\n },\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;AAAA,IACL,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;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;AAAA,IACL,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;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;AAAA,IACL,YAAY;AAAA,MACV,iBAAiB;AAAA,MACjB,aAAa;AAAA,IACf;AAAA,EACF;AACF;",
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,wBAAC,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;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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,
@@ -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,
@@ -10,17 +10,17 @@ const bordered = /* @__PURE__ */ __name((val, { props }) => {
10
10
  return {
11
11
  borderWidth: typeof val === "number" ? val : 1,
12
12
  borderColor: "$borderColor",
13
- ...props.hoverable && {
13
+ ...props.hoverTheme && {
14
14
  hoverStyle: {
15
15
  borderColor: "$borderColorHover"
16
16
  }
17
17
  },
18
- ...props.pressable && {
18
+ ...props.pressTheme && {
19
19
  pressStyle: {
20
20
  borderColor: "$borderColorPress"
21
21
  }
22
22
  },
23
- ...props.focusable && {
23
+ ...props.focusTheme && {
24
24
  focusStyle: {
25
25
  borderColor: "$borderColorFocus"
26
26
  }
@@ -59,55 +59,40 @@ const circular = {
59
59
  };
60
60
  }
61
61
  };
62
- const hoverable = {
62
+ const hoverTheme = {
63
63
  true: {
64
64
  hoverStyle: {
65
65
  backgroundColor: "$backgroundHover",
66
66
  borderColor: "$borderColorHover"
67
67
  }
68
68
  },
69
- false: {
70
- hoverStyle: {
71
- backgroundColor: "$background",
72
- borderColor: "$borderColor"
73
- }
74
- }
69
+ false: {}
75
70
  };
76
- const pressable = {
71
+ const pressTheme = {
77
72
  true: {
78
73
  pressStyle: {
79
74
  backgroundColor: "$backgroundPress",
80
75
  borderColor: "$borderColorPress"
81
76
  }
82
77
  },
83
- false: {
84
- pressStyle: {
85
- backgroundColor: "$background",
86
- borderColor: "$borderColor"
87
- }
88
- }
78
+ false: {}
89
79
  };
90
- const focusable = {
80
+ const focusTheme = {
91
81
  true: {
92
82
  focusStyle: {
93
83
  backgroundColor: "$backgroundFocus",
94
84
  borderColor: "$borderColorFocus"
95
85
  }
96
86
  },
97
- false: {
98
- focusStyle: {
99
- backgroundColor: "$background",
100
- borderColor: "$borderColor"
101
- }
102
- }
87
+ false: {}
103
88
  };
104
89
  export {
105
90
  bordered,
106
91
  circular,
107
92
  elevate,
108
- focusable,
109
- hoverable,
93
+ focusTheme,
94
+ hoverTheme,
110
95
  padded,
111
- pressable,
96
+ pressTheme,
112
97
  radiused
113
98
  };
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "@tamagui/stacks",
3
- "version": "1.0.1-beta.68",
4
- "sideEffects": false,
3
+ "version": "1.0.1-beta.71",
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.68"
22
+ "@tamagui/core": "^1.0.1-beta.71"
21
23
  },
22
24
  "peerDependencies": {
23
25
  "react": "*",
24
26
  "react-dom": "*"
25
27
  },
26
28
  "devDependencies": {
27
- "@tamagui/build": "^1.0.1-beta.68",
29
+ "@tamagui/build": "^1.0.1-beta.71",
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,47 +67,32 @@ 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',
74
74
  borderColor: '$borderColorHover',
75
75
  },
76
76
  },
77
- false: {
78
- hoverStyle: {
79
- backgroundColor: '$background',
80
- borderColor: '$borderColor',
81
- },
82
- },
77
+ false: {},
83
78
  }
84
79
 
85
- export const pressable = {
80
+ export const pressTheme = {
86
81
  true: {
87
82
  pressStyle: {
88
83
  backgroundColor: '$backgroundPress',
89
84
  borderColor: '$borderColorPress',
90
85
  },
91
86
  },
92
- false: {
93
- pressStyle: {
94
- backgroundColor: '$background',
95
- borderColor: '$borderColor',
96
- },
97
- },
87
+ false: {},
98
88
  }
99
89
 
100
- export const focusable = {
90
+ export const focusTheme = {
101
91
  true: {
102
92
  focusStyle: {
103
93
  backgroundColor: '$backgroundFocus',
104
94
  borderColor: '$borderColorFocus',
105
95
  },
106
96
  },
107
- false: {
108
- focusStyle: {
109
- backgroundColor: '$background',
110
- borderColor: '$borderColor',
111
- },
112
- },
97
+ false: {},
113
98
  }
@@ -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
@@ -94,6 +94,7 @@ export declare const elevate: {
94
94
  tag?: string | import("@tamagui/core").Variable<any> | undefined;
95
95
  theme?: import("@tamagui/core").Variable<any> | import("@tamagui/core").ThemeName | null | undefined;
96
96
  componentName?: string | import("@tamagui/core").Variable<any> | undefined;
97
+ forceStyle?: import("@tamagui/core").Variable<any> | "hover" | "press" | "focus" | undefined;
97
98
  onHoverIn?: import("@tamagui/core").Variable<any> | ((e: MouseEvent) => any) | undefined;
98
99
  onHoverOut?: import("@tamagui/core").Variable<any> | ((e: MouseEvent) => any) | undefined;
99
100
  onPress?: ((e: import("react-native").GestureResponderEvent) => any) | import("@tamagui/core").Variable<any> | undefined;
@@ -238,46 +239,31 @@ export declare const circular: {
238
239
  paddingHorizontal: number;
239
240
  };
240
241
  };
241
- export declare const hoverable: {
242
+ export declare const hoverTheme: {
242
243
  true: {
243
244
  hoverStyle: {
244
245
  backgroundColor: string;
245
246
  borderColor: string;
246
247
  };
247
248
  };
248
- false: {
249
- hoverStyle: {
250
- backgroundColor: string;
251
- borderColor: string;
252
- };
253
- };
249
+ false: {};
254
250
  };
255
- export declare const pressable: {
251
+ export declare const pressTheme: {
256
252
  true: {
257
253
  pressStyle: {
258
254
  backgroundColor: string;
259
255
  borderColor: string;
260
256
  };
261
257
  };
262
- false: {
263
- pressStyle: {
264
- backgroundColor: string;
265
- borderColor: string;
266
- };
267
- };
258
+ false: {};
268
259
  };
269
- export declare const focusable: {
260
+ export declare const focusTheme: {
270
261
  true: {
271
262
  focusStyle: {
272
263
  backgroundColor: string;
273
264
  borderColor: string;
274
265
  };
275
266
  };
276
- false: {
277
- focusStyle: {
278
- backgroundColor: string;
279
- borderColor: string;
280
- };
281
- };
267
+ false: {};
282
268
  };
283
269
  //# sourceMappingURL=variants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../src/variants.tsx"],"names":[],"mappings":";AAEA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAInB,CAAA;AAED,eAAO,MAAM,QAAQ,QAAS,OAAO,GAAG,MAAM;;SAwB7C,CAAA;AAED,eAAO,MAAM,MAAM;;;;CAOlB,CAAA;AAED,eAAO,MAAM,QAAQ;;;;CAOpB,CAAA;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;CAepB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAarB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAarB,CAAA;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAarB,CAAA"}
1
+ {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../src/variants.tsx"],"names":[],"mappings":";AAEA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAInB,CAAA;AAED,eAAO,MAAM,QAAQ,QAAS,OAAO,GAAG,MAAM;;SAwB7C,CAAA;AAED,eAAO,MAAM,MAAM;;;;CAOlB,CAAA;AAED,eAAO,MAAM,QAAQ;;;;CAOpB,CAAA;AAED,eAAO,MAAM,QAAQ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