@tamagui/button 2.0.0-rc.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/cjs/Button.cjs +247 -174
  2. package/dist/cjs/Button.native.js +252 -177
  3. package/dist/cjs/Button.native.js.map +1 -1
  4. package/dist/cjs/Button.test.cjs +33 -5
  5. package/dist/cjs/Button.test.native.js +34 -6
  6. package/dist/cjs/Button.test.native.js.map +1 -1
  7. package/dist/cjs/index.cjs +7 -5
  8. package/dist/cjs/index.native.js +7 -5
  9. package/dist/cjs/index.native.js.map +1 -1
  10. package/dist/cjs/v1/Button.cjs +221 -212
  11. package/dist/cjs/v1/Button.native.js +223 -215
  12. package/dist/cjs/v1/Button.native.js.map +1 -1
  13. package/dist/cjs/v1/Button.test.cjs +5 -5
  14. package/dist/cjs/v1/Button.test.native.js +6 -6
  15. package/dist/cjs/v1/Button.test.native.js.map +1 -1
  16. package/dist/cjs/v1/index.cjs +7 -5
  17. package/dist/cjs/v1/index.native.js +7 -5
  18. package/dist/cjs/v1/index.native.js.map +1 -1
  19. package/dist/esm/Button.mjs +227 -156
  20. package/dist/esm/Button.mjs.map +1 -1
  21. package/dist/esm/Button.native.js +232 -159
  22. package/dist/esm/Button.native.js.map +1 -1
  23. package/dist/esm/Button.test.mjs +30 -2
  24. package/dist/esm/Button.test.mjs.map +1 -1
  25. package/dist/esm/Button.test.native.js +30 -2
  26. package/dist/esm/Button.test.native.js.map +1 -1
  27. package/dist/esm/index.js +1 -1
  28. package/dist/esm/index.js.map +1 -6
  29. package/dist/esm/v1/Button.mjs +199 -192
  30. package/dist/esm/v1/Button.mjs.map +1 -1
  31. package/dist/esm/v1/Button.native.js +200 -194
  32. package/dist/esm/v1/Button.native.js.map +1 -1
  33. package/dist/esm/v1/Button.test.mjs +2 -2
  34. package/dist/esm/v1/Button.test.mjs.map +1 -1
  35. package/dist/esm/v1/Button.test.native.js +2 -2
  36. package/dist/esm/v1/Button.test.native.js.map +1 -1
  37. package/dist/jsx/Button.mjs +227 -156
  38. package/dist/jsx/Button.mjs.map +1 -1
  39. package/dist/jsx/Button.native.js +252 -177
  40. package/dist/jsx/Button.native.js.map +1 -1
  41. package/dist/jsx/Button.test.mjs +30 -2
  42. package/dist/jsx/Button.test.mjs.map +1 -1
  43. package/dist/jsx/Button.test.native.js +34 -6
  44. package/dist/jsx/Button.test.native.js.map +1 -1
  45. package/dist/jsx/index.js +1 -1
  46. package/dist/jsx/index.js.map +1 -6
  47. package/dist/jsx/index.native.js +7 -5
  48. package/dist/jsx/v1/Button.mjs +199 -192
  49. package/dist/jsx/v1/Button.mjs.map +1 -1
  50. package/dist/jsx/v1/Button.native.js +223 -215
  51. package/dist/jsx/v1/Button.native.js.map +1 -1
  52. package/dist/jsx/v1/Button.test.mjs +2 -2
  53. package/dist/jsx/v1/Button.test.mjs.map +1 -1
  54. package/dist/jsx/v1/Button.test.native.js +6 -6
  55. package/dist/jsx/v1/Button.test.native.js.map +1 -1
  56. package/dist/jsx/v1/index.native.js +7 -5
  57. package/package.json +15 -18
  58. package/src/Button.test.tsx +24 -0
  59. package/src/Button.tsx +129 -25
  60. package/src/v1/Button.tsx +6 -0
  61. package/types/Button.d.ts +148 -39
  62. package/types/Button.d.ts.map +1 -1
  63. package/types/v1/Button.d.ts +21 -21
  64. package/types/v1/Button.d.ts.map +1 -1
  65. package/dist/cjs/Button.js +0 -176
  66. package/dist/cjs/Button.js.map +0 -6
  67. package/dist/cjs/Button.test.js +0 -8
  68. package/dist/cjs/Button.test.js.map +0 -6
  69. package/dist/cjs/index.js +0 -15
  70. package/dist/cjs/index.js.map +0 -6
  71. package/dist/cjs/v1/Button.js +0 -208
  72. package/dist/cjs/v1/Button.js.map +0 -6
  73. package/dist/cjs/v1/Button.test.js +0 -8
  74. package/dist/cjs/v1/Button.test.js.map +0 -6
  75. package/dist/cjs/v1/index.js +0 -15
  76. package/dist/cjs/v1/index.js.map +0 -6
  77. package/dist/esm/Button.js +0 -174
  78. package/dist/esm/Button.js.map +0 -6
  79. package/dist/esm/Button.test.js +0 -10
  80. package/dist/esm/Button.test.js.map +0 -6
  81. package/dist/esm/v1/Button.js +0 -201
  82. package/dist/esm/v1/Button.js.map +0 -6
  83. package/dist/esm/v1/Button.test.js +0 -10
  84. package/dist/esm/v1/Button.test.js.map +0 -6
  85. package/dist/esm/v1/index.js +0 -2
  86. package/dist/esm/v1/index.js.map +0 -6
  87. package/dist/jsx/Button.js +0 -174
  88. package/dist/jsx/Button.js.map +0 -6
  89. package/dist/jsx/Button.test.js +0 -10
  90. package/dist/jsx/Button.test.js.map +0 -6
  91. package/dist/jsx/v1/Button.js +0 -201
  92. package/dist/jsx/v1/Button.js.map +0 -6
  93. package/dist/jsx/v1/Button.test.js +0 -10
  94. package/dist/jsx/v1/Button.test.js.map +0 -6
  95. package/dist/jsx/v1/index.js +0 -2
  96. package/dist/jsx/v1/index.js.map +0 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/button",
3
- "version": "2.0.0-rc.8",
3
+ "version": "2.0.0",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -19,15 +19,12 @@
19
19
  "./package.json": "./package.json",
20
20
  ".": {
21
21
  "types": "./types/index.d.ts",
22
- "react-native": {
23
- "module": "./dist/esm/index.native.js",
24
- "import": "./dist/esm/index.native.js",
25
- "require": "./dist/cjs/index.native.js"
26
- },
22
+ "react-native": "./dist/esm/index.native.js",
23
+ "browser": "./dist/esm/index.mjs",
27
24
  "module": "./dist/esm/index.mjs",
28
25
  "import": "./dist/esm/index.mjs",
29
26
  "require": "./dist/cjs/index.cjs",
30
- "default": "./dist/cjs/index.native.js"
27
+ "default": "./dist/esm/index.mjs"
31
28
  }
32
29
  },
33
30
  "publishConfig": {
@@ -40,19 +37,19 @@
40
37
  "clean:build": "tamagui-build clean:build"
41
38
  },
42
39
  "dependencies": {
43
- "@tamagui/config-default": "2.0.0-rc.8",
44
- "@tamagui/core": "2.0.0-rc.8",
45
- "@tamagui/font-size": "2.0.0-rc.8",
46
- "@tamagui/get-button-sized": "2.0.0-rc.8",
47
- "@tamagui/helpers": "2.0.0-rc.8",
48
- "@tamagui/helpers-tamagui": "2.0.0-rc.8",
49
- "@tamagui/spacer": "2.0.0-rc.8",
50
- "@tamagui/stacks": "2.0.0-rc.8",
51
- "@tamagui/text": "2.0.0-rc.8",
52
- "@tamagui/web": "2.0.0-rc.8"
40
+ "@tamagui/config-default": "2.0.0",
41
+ "@tamagui/core": "2.0.0",
42
+ "@tamagui/get-button-sized": "2.0.0",
43
+ "@tamagui/helpers": "2.0.0",
44
+ "@tamagui/helpers-tamagui": "2.0.0",
45
+ "@tamagui/spacer": "2.0.0",
46
+ "@tamagui/stacks": "2.0.0",
47
+ "@tamagui/text": "2.0.0",
48
+ "@tamagui/font-size": "2.0.0",
49
+ "@tamagui/web": "2.0.0"
53
50
  },
54
51
  "devDependencies": {
55
- "@tamagui/build": "2.0.0-rc.8",
52
+ "@tamagui/build": "2.0.0",
56
53
  "react": ">=19",
57
54
  "vitest": "4.0.4"
58
55
  },
@@ -1,6 +1,7 @@
1
1
  import { getDefaultTamaguiConfig } from '@tamagui/config-default'
2
2
  import { createTamagui } from '@tamagui/core'
3
3
  import { describe, expect, test } from 'vitest'
4
+ import { Button } from './Button'
4
5
 
5
6
  const conf = createTamagui(getDefaultTamaguiConfig())
6
7
 
@@ -9,6 +10,29 @@ describe('Button', () => {
9
10
  expect(true).toBeTruthy()
10
11
  })
11
12
 
13
+ // type tests for native button props (issue #3914)
14
+ test('accepts native button html props', () => {
15
+ // these should type check without errors
16
+ const _submitBtn = <Button type="submit">Submit</Button>
17
+ const _resetBtn = <Button type="reset">Reset</Button>
18
+ const _buttonBtn = <Button type="button">Button</Button>
19
+ const _formBtn = (
20
+ <Button
21
+ type="submit"
22
+ form="myForm"
23
+ formAction="/submit"
24
+ formMethod="post"
25
+ formTarget="_blank"
26
+ formNoValidate
27
+ name="submitBtn"
28
+ value="submit"
29
+ >
30
+ Submit
31
+ </Button>
32
+ )
33
+ expect(true).toBeTruthy()
34
+ })
35
+
12
36
  // test(`Adapts to a when given accessibilityRole="link"`, async () => {
13
37
  // const { container } = render(
14
38
  // <TamaguiProvider config={conf} defaultTheme="light">
package/src/Button.tsx CHANGED
@@ -1,9 +1,10 @@
1
1
  import { getFontSize } from '@tamagui/font-size'
2
2
  import { getButtonSized } from '@tamagui/get-button-sized'
3
- import { getIcon } from '@tamagui/helpers-tamagui'
3
+ import { getIcon, useCurrentColor } from '@tamagui/helpers-tamagui'
4
4
  import { ButtonNestingContext, getElevation, themeableVariants } from '@tamagui/stacks'
5
+ import type { TextContextStyles, TextParentStyles } from '@tamagui/text'
5
6
  import { SizableText, wrapChildrenInText } from '@tamagui/text'
6
- import type { ColorTokens, GetProps, SizeTokens, Token } from '@tamagui/web'
7
+ import type { GetProps, SizeTokens, Token } from '@tamagui/web'
7
8
  import {
8
9
  createStyledContext,
9
10
  getTokenValue,
@@ -17,16 +18,25 @@ import { useContext } from 'react'
17
18
 
18
19
  type ButtonVariant = 'outlined'
19
20
 
20
- const context = createStyledContext<{
21
+ type ButtonContextStyles = TextContextStyles & {
21
22
  size?: SizeTokens
22
23
  variant?: ButtonVariant
23
- color?: ColorTokens | string
24
24
  elevation?: SizeTokens | number
25
- }>({
25
+ }
26
+
27
+ const context = createStyledContext<ButtonContextStyles>({
26
28
  size: undefined,
27
29
  variant: undefined,
28
30
  color: undefined,
29
31
  elevation: undefined,
32
+ ellipsis: undefined,
33
+ fontFamily: undefined,
34
+ fontSize: undefined,
35
+ fontStyle: undefined,
36
+ fontWeight: undefined,
37
+ letterSpacing: undefined,
38
+ maxFontSizeMultiplier: undefined,
39
+ textAlign: undefined,
30
40
  })
31
41
 
32
42
  const Frame = styled(View, {
@@ -38,17 +48,26 @@ const Frame = styled(View, {
38
48
 
39
49
  variants: {
40
50
  unstyled: {
51
+ true: {
52
+ // reset browser <button> defaults
53
+ outlineWidth: 0,
54
+ borderWidth: 0,
55
+ backgroundColor: 'transparent',
56
+ },
41
57
  false: {
42
58
  size: '$true',
43
59
  justifyContent: 'center',
44
60
  alignItems: 'center',
45
61
  flexWrap: 'nowrap',
46
62
  flexDirection: 'row',
47
- cursor: 'pointer',
48
63
  backgroundColor: '$background',
49
64
  borderWidth: 1,
50
65
  borderColor: 'transparent',
51
66
 
67
+ '$platform-web': {
68
+ cursor: 'pointer',
69
+ },
70
+
52
71
  hoverStyle: {
53
72
  backgroundColor: '$backgroundHover',
54
73
  borderColor: '$borderColorHover',
@@ -137,12 +156,15 @@ const Text = styled(SizableText, {
137
156
  unstyled: {
138
157
  false: {
139
158
  userSelect: 'none',
140
- cursor: 'pointer',
141
159
  // flexGrow 1 leads to inconsistent native style where text pushes to start of view
142
160
  flexGrow: 0,
143
161
  flexShrink: 1,
144
162
  ellipsis: true,
145
163
  color: '$color',
164
+
165
+ '$platform-web': {
166
+ cursor: 'pointer',
167
+ },
146
168
  },
147
169
  },
148
170
  } as const,
@@ -164,6 +186,11 @@ const Icon = (props: {
164
186
  }
165
187
 
166
188
  const sizeToken = size ?? styledContext.size
189
+ const iconColorProp =
190
+ styledContext.color === 'unset' || typeof styledContext.color === 'number'
191
+ ? undefined
192
+ : styledContext.color
193
+ const iconColor = useCurrentColor(iconColorProp)
167
194
 
168
195
  const iconSize =
169
196
  (typeof sizeToken === 'number' ? sizeToken * 0.5 : getFontSize(sizeToken as Token)) *
@@ -171,14 +198,14 @@ const Icon = (props: {
171
198
 
172
199
  return getIcon(children, {
173
200
  size: iconSize,
174
- color: styledContext.color,
201
+ color: iconColor,
175
202
  })
176
203
  }
177
204
 
178
205
  export const ButtonContext = createStyledContext<{
179
206
  size?: SizeTokens
180
207
  variant?: ButtonVariant
181
- color?: ColorTokens | string
208
+ color?: ButtonContextStyles['color']
182
209
  }>({
183
210
  size: undefined,
184
211
  variant: undefined,
@@ -187,11 +214,22 @@ export const ButtonContext = createStyledContext<{
187
214
 
188
215
  type IconProp = JSX.Element | FunctionComponent<{ color?: any; size?: any }> | null
189
216
 
190
- type ButtonExtraProps = {
217
+ type ButtonExtraProps = TextParentStyles & {
191
218
  icon?: IconProp
192
219
  iconAfter?: IconProp
193
220
  scaleIcon?: number
194
221
  iconSize?: SizeTokens
222
+
223
+ // native button html props
224
+ type?: 'submit' | 'reset' | 'button'
225
+ form?: string
226
+ formAction?: string
227
+ formEncType?: string
228
+ formMethod?: string
229
+ formNoValidate?: boolean
230
+ formTarget?: string
231
+ name?: string
232
+ value?: string | readonly string[] | number
195
233
  }
196
234
 
197
235
  const ButtonComponent = Frame.styleable<ButtonExtraProps>((propsIn, ref) => {
@@ -203,11 +241,35 @@ const ButtonComponent = Frame.styleable<ButtonExtraProps>((propsIn, ref) => {
203
241
  noExpand: true,
204
242
  })
205
243
 
206
- const { children, iconSize, icon, iconAfter, scaleIcon = 1, ...props } = processedProps
244
+ const {
245
+ children,
246
+ iconSize,
247
+ icon,
248
+ iconAfter,
249
+ scaleIcon = 1,
250
+ noTextWrap,
251
+ textProps,
252
+ color,
253
+ ellipsis,
254
+ fontFamily,
255
+ fontSize,
256
+ fontStyle,
257
+ fontWeight,
258
+ letterSpacing,
259
+ maxFontSizeMultiplier,
260
+ textAlign,
261
+ ...props
262
+ } = processedProps
207
263
 
208
264
  const size = propsIn.size || (propsIn.unstyled ? undefined : '$true')
209
265
 
210
266
  const styledContext = context.useStyledContext()
267
+ const contextColor = color ?? propsIn.color ?? styledContext?.color
268
+ const iconColorProp =
269
+ contextColor === 'unset' || typeof contextColor === 'number'
270
+ ? undefined
271
+ : contextColor
272
+ const iconColor = useCurrentColor(iconColorProp)
211
273
  const finalSize = iconSize ?? size ?? styledContext?.size
212
274
  const iconSizeNumber =
213
275
  (typeof finalSize === 'number' ? finalSize * 0.5 : getFontSize(finalSize as Token)) *
@@ -217,34 +279,76 @@ const ButtonComponent = Frame.styleable<ButtonExtraProps>((propsIn, ref) => {
217
279
  if (!icon) return null
218
280
  return getIcon(icon, {
219
281
  size: iconSizeNumber,
220
- color: styledContext?.color,
282
+ color: iconColor,
221
283
  // No marginLeft or marginRight needed - spacing is handled by the gap property in Frame's size variants
222
284
  })
223
285
  })
224
286
 
225
287
  const wrappedChildren = wrapChildrenInText(
226
288
  Text,
227
- { children },
289
+ {
290
+ children,
291
+ color: contextColor,
292
+ ellipsis: ellipsis ?? propsIn.ellipsis ?? styledContext?.ellipsis,
293
+ fontFamily: fontFamily ?? propsIn.fontFamily ?? styledContext?.fontFamily,
294
+ fontSize: fontSize ?? propsIn.fontSize ?? styledContext?.fontSize,
295
+ fontStyle: fontStyle ?? propsIn.fontStyle ?? styledContext?.fontStyle,
296
+ fontWeight: fontWeight ?? propsIn.fontWeight ?? styledContext?.fontWeight,
297
+ letterSpacing:
298
+ letterSpacing ?? propsIn.letterSpacing ?? styledContext?.letterSpacing,
299
+ maxFontSizeMultiplier:
300
+ maxFontSizeMultiplier ??
301
+ propsIn.maxFontSizeMultiplier ??
302
+ styledContext?.maxFontSizeMultiplier,
303
+ noTextWrap: noTextWrap ?? propsIn.noTextWrap,
304
+ textAlign: textAlign ?? propsIn.textAlign ?? styledContext?.textAlign,
305
+ textProps: textProps ?? propsIn.textProps,
306
+ },
228
307
  {
229
308
  unstyled: process.env.TAMAGUI_HEADLESS === '1',
230
309
  size: finalSize ?? styledContext?.size,
231
310
  }
232
311
  )
233
312
 
313
+ const textContext: TextContextStyles = {
314
+ color: contextColor,
315
+ ellipsis: ellipsis ?? propsIn.ellipsis ?? styledContext?.ellipsis,
316
+ fontFamily: fontFamily ?? propsIn.fontFamily ?? styledContext?.fontFamily,
317
+ fontSize: fontSize ?? propsIn.fontSize ?? styledContext?.fontSize,
318
+ fontStyle: fontStyle ?? propsIn.fontStyle ?? styledContext?.fontStyle,
319
+ fontWeight: fontWeight ?? propsIn.fontWeight ?? styledContext?.fontWeight,
320
+ letterSpacing: letterSpacing ?? propsIn.letterSpacing ?? styledContext?.letterSpacing,
321
+ maxFontSizeMultiplier:
322
+ maxFontSizeMultiplier ??
323
+ propsIn.maxFontSizeMultiplier ??
324
+ styledContext?.maxFontSizeMultiplier,
325
+ textAlign: textAlign ?? propsIn.textAlign ?? styledContext?.textAlign,
326
+ }
327
+
328
+ const buttonContext: ButtonContextStyles = {
329
+ ...styledContext,
330
+ ...textContext,
331
+ size: props.size ?? propsIn.size ?? styledContext?.size,
332
+ variant: props.variant ?? propsIn.variant ?? styledContext?.variant,
333
+ elevation: props.elevation ?? propsIn.elevation ?? styledContext?.elevation,
334
+ }
335
+
234
336
  return (
235
337
  <ButtonNestingContext.Provider value={true}>
236
- <Frame
237
- ref={ref}
238
- {...props}
239
- {...(isNested && { render: 'span' })}
240
- // Pass resolved size to circular variant when no explicit size provided
241
- {...(props.circular && !propsIn.size && { size })}
242
- tabIndex={0}
243
- >
244
- {themedIcon}
245
- {wrappedChildren}
246
- {themedIconAfter}
247
- </Frame>
338
+ <context.Provider {...buttonContext}>
339
+ <Frame
340
+ ref={ref}
341
+ {...props}
342
+ {...(isNested && { render: 'span' })}
343
+ // pass resolved size to circular variant when no explicit size provided
344
+ {...(props.circular && !propsIn.size && { size })}
345
+ tabIndex={0}
346
+ >
347
+ {themedIcon}
348
+ {wrappedChildren}
349
+ {themedIconAfter}
350
+ </Frame>
351
+ </context.Provider>
248
352
  </ButtonNestingContext.Provider>
249
353
  )
250
354
  })
package/src/v1/Button.tsx CHANGED
@@ -85,6 +85,12 @@ const ButtonFrame = styled(ThemeableStack, {
85
85
 
86
86
  variants: {
87
87
  unstyled: {
88
+ true: {
89
+ // reset browser <button> defaults
90
+ outlineWidth: 0,
91
+ borderWidth: 0,
92
+ backgroundColor: 'transparent',
93
+ },
88
94
  false: {
89
95
  size: '$true',
90
96
  justifyContent: 'center',
package/types/Button.d.ts CHANGED
@@ -1,103 +1,212 @@
1
- import type { ColorTokens, GetProps, SizeTokens } from '@tamagui/web';
1
+ import type { TextContextStyles } from '@tamagui/text';
2
+ import type { GetProps, SizeTokens } from '@tamagui/web';
2
3
  import type { FunctionComponent, JSX } from 'react';
3
4
  type ButtonVariant = 'outlined';
5
+ type ButtonContextStyles = TextContextStyles & {
6
+ size?: SizeTokens;
7
+ variant?: ButtonVariant;
8
+ elevation?: SizeTokens | number;
9
+ };
4
10
  export declare const ButtonContext: import("@tamagui/web").StyledContext<{
5
11
  size?: SizeTokens;
6
12
  variant?: ButtonVariant;
7
- color?: ColorTokens | string;
13
+ color?: ButtonContextStyles["color"];
8
14
  }>;
9
15
  type IconProp = JSX.Element | FunctionComponent<{
10
16
  color?: any;
11
17
  size?: any;
12
18
  }> | null;
13
- type ButtonExtraProps = {
14
- icon?: IconProp;
15
- iconAfter?: IconProp;
16
- scaleIcon?: number;
17
- iconSize?: SizeTokens;
18
- };
19
19
  declare const ButtonComponent: import("@tamagui/web").TamaguiComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {
20
20
  size?: number | SizeTokens | undefined;
21
21
  variant?: "outlined" | undefined;
22
+ disabled?: boolean | undefined;
23
+ unstyled?: boolean | undefined;
22
24
  elevation?: number | SizeTokens | undefined;
23
25
  circular?: boolean | undefined;
24
26
  chromeless?: boolean | "all" | undefined;
25
- disabled?: boolean | undefined;
26
- unstyled?: boolean | undefined;
27
- }>, keyof ButtonExtraProps> & ButtonExtraProps, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps & ButtonExtraProps, import("@tamagui/web").StackStyleBase, {
27
+ }>, "form" | "name" | "value" | keyof TextContextStyles | "textProps" | "noTextWrap" | "icon" | "iconAfter" | "scaleIcon" | "iconSize" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & TextContextStyles & {
28
+ textProps?: Partial<import("@tamagui/text").SizableTextProps>;
29
+ noTextWrap?: boolean;
30
+ } & {
31
+ icon?: IconProp;
32
+ iconAfter?: IconProp;
33
+ scaleIcon?: number;
34
+ iconSize?: SizeTokens;
35
+ type?: "submit" | "reset" | "button";
36
+ form?: string;
37
+ formAction?: string;
38
+ formEncType?: string;
39
+ formMethod?: string;
40
+ formNoValidate?: boolean;
41
+ formTarget?: string;
42
+ name?: string;
43
+ value?: string | readonly string[] | number;
44
+ }, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps & TextContextStyles & {
45
+ textProps?: Partial<import("@tamagui/text").SizableTextProps>;
46
+ noTextWrap?: boolean;
47
+ } & {
48
+ icon?: IconProp;
49
+ iconAfter?: IconProp;
50
+ scaleIcon?: number;
51
+ iconSize?: SizeTokens;
52
+ type?: "submit" | "reset" | "button";
53
+ form?: string;
54
+ formAction?: string;
55
+ formEncType?: string;
56
+ formMethod?: string;
57
+ formNoValidate?: boolean;
58
+ formTarget?: string;
59
+ name?: string;
60
+ value?: string | readonly string[] | number;
61
+ }, import("@tamagui/web").StackStyleBase, {
28
62
  size?: number | SizeTokens | undefined;
29
63
  variant?: "outlined" | undefined;
64
+ disabled?: boolean | undefined;
65
+ unstyled?: boolean | undefined;
30
66
  elevation?: number | SizeTokens | undefined;
31
67
  circular?: boolean | undefined;
32
68
  chromeless?: boolean | "all" | undefined;
33
- disabled?: boolean | undefined;
34
- unstyled?: boolean | undefined;
35
69
  }, import("@tamagui/web").StaticConfigPublic>;
36
70
  export declare const Button: import("react").ForwardRefExoticComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {
37
71
  size?: number | SizeTokens | undefined;
38
72
  variant?: "outlined" | undefined;
73
+ disabled?: boolean | undefined;
74
+ unstyled?: boolean | undefined;
39
75
  elevation?: number | SizeTokens | undefined;
40
76
  circular?: boolean | undefined;
41
77
  chromeless?: boolean | "all" | undefined;
42
- disabled?: boolean | undefined;
43
- unstyled?: boolean | undefined;
44
- }>, keyof ButtonExtraProps> & ButtonExtraProps & import("react").RefAttributes<import("@tamagui/web").TamaguiElement>> & import("@tamagui/web").StaticComponentObject<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {
78
+ }>, "form" | "name" | "value" | keyof TextContextStyles | "textProps" | "noTextWrap" | "icon" | "iconAfter" | "scaleIcon" | "iconSize" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & TextContextStyles & {
79
+ textProps?: Partial<import("@tamagui/text").SizableTextProps>;
80
+ noTextWrap?: boolean;
81
+ } & {
82
+ icon?: IconProp;
83
+ iconAfter?: IconProp;
84
+ scaleIcon?: number;
85
+ iconSize?: SizeTokens;
86
+ type?: "submit" | "reset" | "button";
87
+ form?: string;
88
+ formAction?: string;
89
+ formEncType?: string;
90
+ formMethod?: string;
91
+ formNoValidate?: boolean;
92
+ formTarget?: string;
93
+ name?: string;
94
+ value?: string | readonly string[] | number;
95
+ } & import("react").RefAttributes<import("@tamagui/web").TamaguiElement>> & import("@tamagui/web").StaticComponentObject<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {
45
96
  size?: number | SizeTokens | undefined;
46
97
  variant?: "outlined" | undefined;
98
+ disabled?: boolean | undefined;
99
+ unstyled?: boolean | undefined;
47
100
  elevation?: number | SizeTokens | undefined;
48
101
  circular?: boolean | undefined;
49
102
  chromeless?: boolean | "all" | undefined;
50
- disabled?: boolean | undefined;
51
- unstyled?: boolean | undefined;
52
- }>, keyof ButtonExtraProps> & ButtonExtraProps, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps & ButtonExtraProps, import("@tamagui/web").StackStyleBase, {
103
+ }>, "form" | "name" | "value" | keyof TextContextStyles | "textProps" | "noTextWrap" | "icon" | "iconAfter" | "scaleIcon" | "iconSize" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & TextContextStyles & {
104
+ textProps?: Partial<import("@tamagui/text").SizableTextProps>;
105
+ noTextWrap?: boolean;
106
+ } & {
107
+ icon?: IconProp;
108
+ iconAfter?: IconProp;
109
+ scaleIcon?: number;
110
+ iconSize?: SizeTokens;
111
+ type?: "submit" | "reset" | "button";
112
+ form?: string;
113
+ formAction?: string;
114
+ formEncType?: string;
115
+ formMethod?: string;
116
+ formNoValidate?: boolean;
117
+ formTarget?: string;
118
+ name?: string;
119
+ value?: string | readonly string[] | number;
120
+ }, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps & TextContextStyles & {
121
+ textProps?: Partial<import("@tamagui/text").SizableTextProps>;
122
+ noTextWrap?: boolean;
123
+ } & {
124
+ icon?: IconProp;
125
+ iconAfter?: IconProp;
126
+ scaleIcon?: number;
127
+ iconSize?: SizeTokens;
128
+ type?: "submit" | "reset" | "button";
129
+ form?: string;
130
+ formAction?: string;
131
+ formEncType?: string;
132
+ formMethod?: string;
133
+ formNoValidate?: boolean;
134
+ formTarget?: string;
135
+ name?: string;
136
+ value?: string | readonly string[] | number;
137
+ }, import("@tamagui/web").StackStyleBase, {
53
138
  size?: number | SizeTokens | undefined;
54
139
  variant?: "outlined" | undefined;
140
+ disabled?: boolean | undefined;
141
+ unstyled?: boolean | undefined;
55
142
  elevation?: number | SizeTokens | undefined;
56
143
  circular?: boolean | undefined;
57
144
  chromeless?: boolean | "all" | undefined;
58
- disabled?: boolean | undefined;
59
- unstyled?: boolean | undefined;
60
145
  }, import("@tamagui/web").StaticConfigPublic> & Omit<import("@tamagui/web").StaticConfigPublic, "staticConfig" | "styleable"> & {
61
146
  __tama: [Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {
62
147
  size?: number | SizeTokens | undefined;
63
148
  variant?: "outlined" | undefined;
149
+ disabled?: boolean | undefined;
150
+ unstyled?: boolean | undefined;
64
151
  elevation?: number | SizeTokens | undefined;
65
152
  circular?: boolean | undefined;
66
153
  chromeless?: boolean | "all" | undefined;
67
- disabled?: boolean | undefined;
68
- unstyled?: boolean | undefined;
69
- }>, keyof ButtonExtraProps> & ButtonExtraProps, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps & ButtonExtraProps, import("@tamagui/web").StackStyleBase, {
154
+ }>, "form" | "name" | "value" | keyof TextContextStyles | "textProps" | "noTextWrap" | "icon" | "iconAfter" | "scaleIcon" | "iconSize" | "type" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget"> & TextContextStyles & {
155
+ textProps?: Partial<import("@tamagui/text").SizableTextProps>;
156
+ noTextWrap?: boolean;
157
+ } & {
158
+ icon?: IconProp;
159
+ iconAfter?: IconProp;
160
+ scaleIcon?: number;
161
+ iconSize?: SizeTokens;
162
+ type?: "submit" | "reset" | "button";
163
+ form?: string;
164
+ formAction?: string;
165
+ formEncType?: string;
166
+ formMethod?: string;
167
+ formNoValidate?: boolean;
168
+ formTarget?: string;
169
+ name?: string;
170
+ value?: string | readonly string[] | number;
171
+ }, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps & TextContextStyles & {
172
+ textProps?: Partial<import("@tamagui/text").SizableTextProps>;
173
+ noTextWrap?: boolean;
174
+ } & {
175
+ icon?: IconProp;
176
+ iconAfter?: IconProp;
177
+ scaleIcon?: number;
178
+ iconSize?: SizeTokens;
179
+ type?: "submit" | "reset" | "button";
180
+ form?: string;
181
+ formAction?: string;
182
+ formEncType?: string;
183
+ formMethod?: string;
184
+ formNoValidate?: boolean;
185
+ formTarget?: string;
186
+ name?: string;
187
+ value?: string | readonly string[] | number;
188
+ }, import("@tamagui/web").StackStyleBase, {
70
189
  size?: number | SizeTokens | undefined;
71
190
  variant?: "outlined" | undefined;
191
+ disabled?: boolean | undefined;
192
+ unstyled?: boolean | undefined;
72
193
  elevation?: number | SizeTokens | undefined;
73
194
  circular?: boolean | undefined;
74
195
  chromeless?: boolean | "all" | undefined;
75
- disabled?: boolean | undefined;
76
- unstyled?: boolean | undefined;
77
196
  }, import("@tamagui/web").StaticConfigPublic];
78
197
  } & {
79
- Apply: import("react").Provider<{
80
- size?: SizeTokens;
81
- variant?: ButtonVariant;
82
- color?: ColorTokens | string;
83
- elevation?: SizeTokens | number;
84
- }> & import("react").ProviderExoticComponent<Partial<{
85
- size?: SizeTokens;
86
- variant?: ButtonVariant;
87
- color?: ColorTokens | string;
88
- elevation?: SizeTokens | number;
89
- }> & {
198
+ Apply: import("react").Provider<ButtonContextStyles> & import("react").ProviderExoticComponent<Partial<ButtonContextStyles> & {
90
199
  children?: import("react").ReactNode;
91
200
  scope?: string;
92
201
  }>;
93
202
  Frame: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/web").StackNonStyleProps, import("@tamagui/web").StackStyleBase, {
94
203
  size?: number | SizeTokens | undefined;
95
204
  variant?: "outlined" | undefined;
205
+ disabled?: boolean | undefined;
206
+ unstyled?: boolean | undefined;
96
207
  elevation?: number | SizeTokens | undefined;
97
208
  circular?: boolean | undefined;
98
209
  chromeless?: boolean | "all" | undefined;
99
- disabled?: boolean | undefined;
100
- unstyled?: boolean | undefined;
101
210
  }, import("@tamagui/web").StaticConfigPublic>;
102
211
  Text: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
103
212
  size?: import("@tamagui/web").FontSizeTokens | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAS,MAAM,cAAc,CAAA;AAS5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAGnD,KAAK,aAAa,GAAG,UAAU,CAAA;AAgK/B,eAAO,MAAM,aAAa;WACjB,UAAU;cACP,aAAa;YACf,WAAW,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