@tamagui/button 2.5.2 → 2.6.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 (43) hide show
  1. package/package.json +12 -12
  2. package/dist/cjs/v1/Button.cjs +0 -268
  3. package/dist/cjs/v1/Button.native.js +0 -273
  4. package/dist/cjs/v1/Button.native.js.map +0 -1
  5. package/dist/cjs/v1/Button.test.cjs +0 -9
  6. package/dist/cjs/v1/Button.test.native.js +0 -12
  7. package/dist/cjs/v1/Button.test.native.js.map +0 -1
  8. package/dist/cjs/v1/index.cjs +0 -20
  9. package/dist/cjs/v1/index.native.js +0 -23
  10. package/dist/cjs/v1/index.native.js.map +0 -1
  11. package/dist/esm/v1/Button.mjs +0 -238
  12. package/dist/esm/v1/Button.mjs.map +0 -1
  13. package/dist/esm/v1/Button.native.js +0 -240
  14. package/dist/esm/v1/Button.native.js.map +0 -1
  15. package/dist/esm/v1/Button.test.mjs +0 -10
  16. package/dist/esm/v1/Button.test.mjs.map +0 -1
  17. package/dist/esm/v1/Button.test.native.js +0 -10
  18. package/dist/esm/v1/Button.test.native.js.map +0 -1
  19. package/dist/esm/v1/index.mjs +0 -2
  20. package/dist/esm/v1/index.mjs.map +0 -1
  21. package/dist/esm/v1/index.native.js +0 -2
  22. package/dist/esm/v1/index.native.js.map +0 -1
  23. package/dist/jsx/v1/Button.mjs +0 -238
  24. package/dist/jsx/v1/Button.mjs.map +0 -1
  25. package/dist/jsx/v1/Button.native.js +0 -273
  26. package/dist/jsx/v1/Button.native.js.map +0 -1
  27. package/dist/jsx/v1/Button.test.mjs +0 -10
  28. package/dist/jsx/v1/Button.test.mjs.map +0 -1
  29. package/dist/jsx/v1/Button.test.native.js +0 -12
  30. package/dist/jsx/v1/Button.test.native.js.map +0 -1
  31. package/dist/jsx/v1/index.mjs +0 -2
  32. package/dist/jsx/v1/index.mjs.map +0 -1
  33. package/dist/jsx/v1/index.native.js +0 -23
  34. package/dist/jsx/v1/index.native.js.map +0 -1
  35. package/src/v1/Button.test.tsx +0 -21
  36. package/src/v1/Button.tsx +0 -342
  37. package/src/v1/index.ts +0 -1
  38. package/types/v1/Button.d.ts +0 -302
  39. package/types/v1/Button.d.ts.map +0 -1
  40. package/types/v1/Button.test.d.ts +0 -2
  41. package/types/v1/Button.test.d.ts.map +0 -1
  42. package/types/v1/index.d.ts +0 -2
  43. package/types/v1/index.d.ts.map +0 -1
package/src/v1/Button.tsx DELETED
@@ -1,342 +0,0 @@
1
- import { getFontSize } from '@tamagui/font-size'
2
- import { getButtonSized } from '@tamagui/get-button-sized'
3
- import { withStaticProperties } from '@tamagui/helpers'
4
- import { useGetThemedIcon } from '@tamagui/helpers-tamagui'
5
- import { ButtonNestingContext, ThemeableStack } from '@tamagui/stacks'
6
- import type { TextContextStyles, TextParentStyles } from '@tamagui/text'
7
- import { SizableText, wrapChildrenInText } from '@tamagui/text'
8
- import type { FontSizeTokens, GetProps, SizeTokens, ThemeableProps } from '@tamagui/web'
9
- import { createStyledContext, getVariableValue, styled, useProps } from '@tamagui/web'
10
- import type { FunctionComponent, JSX } from 'react'
11
- import { useContext } from 'react'
12
- import { spacedChildren } from '@tamagui/spacer'
13
-
14
- type ButtonVariant = 'outlined'
15
-
16
- export const ButtonContext = createStyledContext<
17
- Partial<
18
- TextContextStyles & {
19
- size: SizeTokens
20
- variant?: ButtonVariant
21
- }
22
- >
23
- >({
24
- // keeping these here means they work with styled() passing down color to text
25
- color: undefined,
26
- ellipsis: undefined,
27
- fontFamily: undefined,
28
- fontSize: undefined,
29
- fontStyle: undefined,
30
- fontWeight: undefined,
31
- letterSpacing: undefined,
32
- maxFontSizeMultiplier: undefined,
33
- size: undefined,
34
- textAlign: undefined,
35
- variant: undefined,
36
- })
37
-
38
- type ButtonIconProps = { color?: any; size?: any }
39
- type IconProp =
40
- | JSX.Element
41
- | FunctionComponent<ButtonIconProps>
42
- | ((props: ButtonIconProps) => any)
43
- | null
44
-
45
- type ButtonExtraProps = TextParentStyles &
46
- ThemeableProps & {
47
- /**
48
- * add icon before, passes color and size automatically if Component
49
- */
50
- icon?: IconProp
51
- /**
52
- * add icon after, passes color and size automatically if Component
53
- */
54
- iconAfter?: IconProp
55
- /**
56
- * adjust icon relative to size
57
- *
58
- * @default 1
59
- */
60
- scaleIcon?: number
61
- /**
62
- * make the spacing elements flex
63
- */
64
- spaceFlex?: number | boolean
65
- /**
66
- * adjust internal space relative to icon size
67
- */
68
- scaleSpace?: number
69
- /**
70
- * remove default styles
71
- */
72
- unstyled?: boolean
73
- }
74
-
75
- type ButtonProps = ButtonExtraProps & GetProps<typeof ButtonFrame>
76
-
77
- const BUTTON_NAME = 'Button'
78
-
79
- const ButtonFrame = styled(ThemeableStack, {
80
- name: BUTTON_NAME,
81
- render: 'button',
82
- context: ButtonContext,
83
- role: 'button',
84
- focusable: true,
85
-
86
- variants: {
87
- unstyled: {
88
- true: {
89
- // reset browser <button> defaults
90
- outlineWidth: 0,
91
- borderWidth: 0,
92
- backgroundColor: 'transparent',
93
- },
94
- false: {
95
- size: '$true',
96
- justifyContent: 'center',
97
- alignItems: 'center',
98
- flexWrap: 'nowrap',
99
- flexDirection: 'row',
100
- cursor: 'pointer',
101
- hoverTheme: true,
102
- pressTheme: true,
103
- backgroundColor: '$background',
104
- borderWidth: 1,
105
- borderColor: 'transparent',
106
-
107
- focusVisibleStyle: {
108
- outlineColor: '$outlineColor',
109
- outlineStyle: 'solid',
110
- outlineWidth: 2,
111
- },
112
- },
113
- },
114
-
115
- variant: {
116
- outlined: {
117
- backgroundColor: 'transparent',
118
- borderWidth: 2,
119
- borderColor: '$borderColor',
120
-
121
- hoverStyle: {
122
- backgroundColor: 'transparent',
123
- borderColor: '$borderColorHover',
124
- },
125
-
126
- pressStyle: {
127
- backgroundColor: 'transparent',
128
- borderColor: '$borderColorPress',
129
- },
130
-
131
- focusVisibleStyle: {
132
- backgroundColor: 'transparent',
133
- borderColor: '$borderColorFocus',
134
- },
135
- },
136
- },
137
-
138
- size: {
139
- '...size': getButtonSized,
140
- ':number': getButtonSized,
141
- },
142
-
143
- disabled: {
144
- true: {
145
- pointerEvents: 'none',
146
- },
147
- },
148
- } as const,
149
-
150
- defaultVariants: {
151
- unstyled: process.env.TAMAGUI_HEADLESS === '1',
152
- },
153
- })
154
-
155
- const ButtonText = styled(SizableText, {
156
- name: 'Button',
157
- context: ButtonContext,
158
-
159
- variants: {
160
- unstyled: {
161
- false: {
162
- userSelect: 'none',
163
- cursor: 'pointer',
164
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
165
- flexGrow: 0,
166
- flexShrink: 1,
167
- ellipsis: true,
168
- color: '$color',
169
- },
170
- },
171
- } as const,
172
-
173
- defaultVariants: {
174
- unstyled: process.env.TAMAGUI_HEADLESS === '1',
175
- },
176
- })
177
-
178
- const ButtonIcon = (props: { children: React.ReactNode; scaleIcon?: number }) => {
179
- const { children, scaleIcon = 1 } = props
180
- const { size, color } = useContext(ButtonContext)
181
-
182
- const iconSize =
183
- (typeof size === 'number' ? size * 0.5 : getFontSize(size as FontSizeTokens)) *
184
- scaleIcon
185
-
186
- const getThemedIcon = useGetThemedIcon({ size: iconSize, color: color as any })
187
- return getThemedIcon(children)
188
- }
189
-
190
- const ButtonComponent = ButtonFrame.styleable<ButtonExtraProps>(
191
- function Button(props, ref) {
192
- // @ts-ignore
193
- const { props: buttonProps } = useButton(props)
194
-
195
- return <ButtonFrame data-disable-theme {...buttonProps} ref={ref} />
196
- }
197
- )
198
- /**
199
- * @summary A Button is a clickable element that can be used to trigger actions such as submitting forms, navigating to other pages, or performing other actions.
200
- * @see — Docs https://tamagui.dev/ui/button
201
- */
202
- const Button = withStaticProperties(ButtonComponent, {
203
- Text: ButtonText,
204
- Icon: ButtonIcon,
205
- })
206
-
207
- /**
208
- * @deprecated Instead of useButton, see the Button docs for the newer and much improved Advanced customization pattern: https://tamagui.dev/docs/components/button
209
- */
210
- function useButton<Props extends ButtonProps>(
211
- { textProps, ...propsIn }: Props,
212
- { Text = Button.Text }: { Text: any } = { Text: Button.Text }
213
- ) {
214
- const isNested = useContext(ButtonNestingContext)
215
- const propsActive = useProps(propsIn, {
216
- noNormalize: true,
217
- noExpand: true,
218
- }) as any as ButtonProps
219
-
220
- // careful not to destructure and re-order props, order is important
221
- const {
222
- icon,
223
- iconAfter,
224
- gap,
225
- spaceFlex,
226
- scaleIcon = 1,
227
- scaleSpace = 0.66,
228
- noTextWrap,
229
- fontFamily,
230
- fontSize,
231
- fontWeight,
232
- fontStyle,
233
- letterSpacing,
234
- render,
235
- ellipsis,
236
- maxFontSizeMultiplier,
237
-
238
- ...restProps
239
- } = propsActive
240
-
241
- const size = propsActive.size || (propsActive.unstyled ? undefined : '$true')
242
-
243
- const color = propsActive.color as any
244
-
245
- const iconSize =
246
- (typeof size === 'number'
247
- ? size * 0.5
248
- : getFontSize(size as FontSizeTokens, {
249
- font: fontFamily?.[0] === '$' ? (fontFamily as any) : undefined,
250
- })) * scaleIcon
251
-
252
- const getThemedIcon = useGetThemedIcon({
253
- size: iconSize,
254
- color,
255
- })
256
-
257
- const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)
258
- const spaceSize = gap ?? getVariableValue(iconSize) * scaleSpace
259
- const contents = noTextWrap
260
- ? [propsIn.children]
261
- : wrapChildrenInText(
262
- Text,
263
- {
264
- children: propsIn.children,
265
- fontFamily,
266
- fontSize,
267
- textProps,
268
- fontWeight,
269
- fontStyle,
270
- letterSpacing,
271
- ellipsis,
272
- maxFontSizeMultiplier,
273
- },
274
- Text === ButtonText && propsActive.unstyled !== true
275
- ? {
276
- unstyled: process.env.TAMAGUI_HEADLESS === '1',
277
- size,
278
- }
279
- : undefined
280
- )
281
-
282
- const inner = spacedChildren({
283
- // a bit arbitrary but scaling to font size is necessary so long as button does
284
- space: spaceSize,
285
- spaceFlex,
286
- ensureKeys: true,
287
- direction:
288
- propsActive.flexDirection === 'column' ||
289
- propsActive.flexDirection === 'column-reverse'
290
- ? 'vertical'
291
- : 'horizontal',
292
- // for keys to stay the same we keep indices as similar a possible
293
- // so even if icons are undefined we still pass them
294
- children: [themedIcon, ...contents, themedIconAfter],
295
- })
296
-
297
- const props = {
298
- size,
299
- ...(propsIn.disabled && {
300
- // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
301
- focusable: undefined,
302
- // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
303
- focusVisibleStyle: {
304
- borderColor: '$background',
305
- },
306
- }),
307
- // fixes SSR issue + DOM nesting issue of not allowing button in button
308
- render:
309
- render ??
310
- (isNested
311
- ? 'span'
312
- : // defaults to <a /> when accessibilityRole = link
313
- // see https://github.com/tamagui/tamagui/issues/505
314
- propsActive.accessibilityRole === 'link' || propsActive.role === 'link'
315
- ? 'a'
316
- : 'button'),
317
-
318
- ...restProps,
319
-
320
- children: (
321
- <ButtonNestingContext.Provider value={true}>{inner}</ButtonNestingContext.Provider>
322
- ),
323
- // forces it to be a runtime pressStyle so it passes through context text colors
324
- disableClassName: true,
325
- } as Props
326
-
327
- return {
328
- spaceSize,
329
- isNested,
330
- props,
331
- }
332
- }
333
-
334
- export {
335
- Button,
336
- ButtonFrame,
337
- ButtonIcon,
338
- ButtonText,
339
- // legacy
340
- useButton,
341
- }
342
- export type { ButtonProps }
package/src/v1/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './Button'
@@ -1,302 +0,0 @@
1
- import type { TextContextStyles, TextParentStyles } from '@tamagui/text';
2
- import type { FontSizeTokens, GetProps, SizeTokens, ThemeableProps } from '@tamagui/web';
3
- import type { FunctionComponent, JSX } from 'react';
4
- type ButtonVariant = 'outlined';
5
- export declare const ButtonContext: import("@tamagui/web").StyledContext<Partial<TextContextStyles & {
6
- size: SizeTokens;
7
- variant?: ButtonVariant;
8
- }>>;
9
- type ButtonIconProps = {
10
- color?: any;
11
- size?: any;
12
- };
13
- type IconProp = JSX.Element | FunctionComponent<ButtonIconProps> | ((props: ButtonIconProps) => any) | null;
14
- type ButtonExtraProps = TextParentStyles & ThemeableProps & {
15
- /**
16
- * add icon before, passes color and size automatically if Component
17
- */
18
- icon?: IconProp;
19
- /**
20
- * add icon after, passes color and size automatically if Component
21
- */
22
- iconAfter?: IconProp;
23
- /**
24
- * adjust icon relative to size
25
- *
26
- * @default 1
27
- */
28
- scaleIcon?: number;
29
- /**
30
- * make the spacing elements flex
31
- */
32
- spaceFlex?: number | boolean;
33
- /**
34
- * adjust internal space relative to icon size
35
- */
36
- scaleSpace?: number;
37
- /**
38
- * remove default styles
39
- */
40
- unstyled?: boolean;
41
- };
42
- type ButtonProps = ButtonExtraProps & GetProps<typeof ButtonFrame>;
43
- declare const ButtonFrame: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
44
- size?: number | SizeTokens | undefined;
45
- variant?: "outlined" | undefined;
46
- disabled?: boolean | undefined;
47
- unstyled?: boolean | undefined;
48
- elevation?: number | SizeTokens | undefined;
49
- transparent?: boolean | undefined;
50
- circular?: boolean | undefined;
51
- chromeless?: boolean | "all" | undefined;
52
- fullscreen?: boolean | undefined;
53
- elevate?: boolean | undefined;
54
- bordered?: boolean | undefined;
55
- }, import("@tamagui/web").StaticConfigPublic>;
56
- declare const ButtonText: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
57
- size?: FontSizeTokens | undefined;
58
- unstyled?: boolean | undefined;
59
- }, import("@tamagui/web").StaticConfigPublic>;
60
- declare const ButtonIcon: (props: {
61
- children: React.ReactNode;
62
- scaleIcon?: number;
63
- }) => any;
64
- /**
65
- * @summary A Button is a clickable element that can be used to trigger actions such as submitting forms, navigating to other pages, or performing other actions.
66
- * @see — Docs https://tamagui.dev/ui/button
67
- */
68
- declare const Button: import("react").ForwardRefExoticComponent<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
69
- size?: number | SizeTokens | undefined;
70
- variant?: "outlined" | undefined;
71
- disabled?: boolean | undefined;
72
- unstyled?: boolean | undefined;
73
- elevation?: number | SizeTokens | undefined;
74
- transparent?: boolean | undefined;
75
- circular?: boolean | undefined;
76
- chromeless?: boolean | "all" | undefined;
77
- fullscreen?: boolean | undefined;
78
- elevate?: boolean | undefined;
79
- bordered?: boolean | undefined;
80
- }>, "unstyled" | keyof TextContextStyles | "textProps" | "noTextWrap" | "icon" | "iconAfter" | "scaleIcon" | keyof ThemeableProps | "spaceFlex" | "scaleSpace"> & TextContextStyles & {
81
- textProps?: Partial<import("@tamagui/text").SizableTextProps>;
82
- noTextWrap?: boolean;
83
- } & ThemeableProps & {
84
- /**
85
- * add icon before, passes color and size automatically if Component
86
- */
87
- icon?: IconProp;
88
- /**
89
- * add icon after, passes color and size automatically if Component
90
- */
91
- iconAfter?: IconProp;
92
- /**
93
- * adjust icon relative to size
94
- *
95
- * @default 1
96
- */
97
- scaleIcon?: number;
98
- /**
99
- * make the spacing elements flex
100
- */
101
- spaceFlex?: number | boolean;
102
- /**
103
- * adjust internal space relative to icon size
104
- */
105
- scaleSpace?: number;
106
- /**
107
- * remove default styles
108
- */
109
- unstyled?: boolean;
110
- } & import("react").RefAttributes<import("@tamagui/web").TamaguiElement>> & import("@tamagui/web").StaticComponentObject<Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
111
- size?: number | SizeTokens | undefined;
112
- variant?: "outlined" | undefined;
113
- disabled?: boolean | undefined;
114
- unstyled?: boolean | undefined;
115
- elevation?: number | SizeTokens | undefined;
116
- transparent?: boolean | undefined;
117
- circular?: boolean | undefined;
118
- chromeless?: boolean | "all" | undefined;
119
- fullscreen?: boolean | undefined;
120
- elevate?: boolean | undefined;
121
- bordered?: boolean | undefined;
122
- }>, "unstyled" | keyof TextContextStyles | "textProps" | "noTextWrap" | "icon" | "iconAfter" | "scaleIcon" | keyof ThemeableProps | "spaceFlex" | "scaleSpace"> & TextContextStyles & {
123
- textProps?: Partial<import("@tamagui/text").SizableTextProps>;
124
- noTextWrap?: boolean;
125
- } & ThemeableProps & {
126
- /**
127
- * add icon before, passes color and size automatically if Component
128
- */
129
- icon?: IconProp;
130
- /**
131
- * add icon after, passes color and size automatically if Component
132
- */
133
- iconAfter?: IconProp;
134
- /**
135
- * adjust icon relative to size
136
- *
137
- * @default 1
138
- */
139
- scaleIcon?: number;
140
- /**
141
- * make the spacing elements flex
142
- */
143
- spaceFlex?: number | boolean;
144
- /**
145
- * adjust internal space relative to icon size
146
- */
147
- scaleSpace?: number;
148
- /**
149
- * remove default styles
150
- */
151
- unstyled?: boolean;
152
- }, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & TextContextStyles & {
153
- textProps?: Partial<import("@tamagui/text").SizableTextProps>;
154
- noTextWrap?: boolean;
155
- } & ThemeableProps & {
156
- /**
157
- * add icon before, passes color and size automatically if Component
158
- */
159
- icon?: IconProp;
160
- /**
161
- * add icon after, passes color and size automatically if Component
162
- */
163
- iconAfter?: IconProp;
164
- /**
165
- * adjust icon relative to size
166
- *
167
- * @default 1
168
- */
169
- scaleIcon?: number;
170
- /**
171
- * make the spacing elements flex
172
- */
173
- spaceFlex?: number | boolean;
174
- /**
175
- * adjust internal space relative to icon size
176
- */
177
- scaleSpace?: number;
178
- /**
179
- * remove default styles
180
- */
181
- unstyled?: boolean;
182
- }, import("@tamagui/web").StackStyleBase, {
183
- size?: number | SizeTokens | undefined;
184
- variant?: "outlined" | undefined;
185
- disabled?: boolean | undefined;
186
- unstyled?: boolean | undefined;
187
- elevation?: number | SizeTokens | undefined;
188
- transparent?: boolean | undefined;
189
- circular?: boolean | undefined;
190
- chromeless?: boolean | "all" | undefined;
191
- fullscreen?: boolean | undefined;
192
- elevate?: boolean | undefined;
193
- bordered?: boolean | undefined;
194
- }, import("@tamagui/web").StaticConfigPublic> & Omit<import("@tamagui/web").StaticConfigPublic, "staticConfig" | "styleable"> & {
195
- __tama: [Omit<import("@tamagui/web").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/web").StackStyleBase, {
196
- size?: number | SizeTokens | undefined;
197
- variant?: "outlined" | undefined;
198
- disabled?: boolean | undefined;
199
- unstyled?: boolean | undefined;
200
- elevation?: number | SizeTokens | undefined;
201
- transparent?: boolean | undefined;
202
- circular?: boolean | undefined;
203
- chromeless?: boolean | "all" | undefined;
204
- fullscreen?: boolean | undefined;
205
- elevate?: boolean | undefined;
206
- bordered?: boolean | undefined;
207
- }>, "unstyled" | keyof TextContextStyles | "textProps" | "noTextWrap" | "icon" | "iconAfter" | "scaleIcon" | keyof ThemeableProps | "spaceFlex" | "scaleSpace"> & TextContextStyles & {
208
- textProps?: Partial<import("@tamagui/text").SizableTextProps>;
209
- noTextWrap?: boolean;
210
- } & ThemeableProps & {
211
- /**
212
- * add icon before, passes color and size automatically if Component
213
- */
214
- icon?: IconProp;
215
- /**
216
- * add icon after, passes color and size automatically if Component
217
- */
218
- iconAfter?: IconProp;
219
- /**
220
- * adjust icon relative to size
221
- *
222
- * @default 1
223
- */
224
- scaleIcon?: number;
225
- /**
226
- * make the spacing elements flex
227
- */
228
- spaceFlex?: number | boolean;
229
- /**
230
- * adjust internal space relative to icon size
231
- */
232
- scaleSpace?: number;
233
- /**
234
- * remove default styles
235
- */
236
- unstyled?: boolean;
237
- }, import("@tamagui/web").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & TextContextStyles & {
238
- textProps?: Partial<import("@tamagui/text").SizableTextProps>;
239
- noTextWrap?: boolean;
240
- } & ThemeableProps & {
241
- /**
242
- * add icon before, passes color and size automatically if Component
243
- */
244
- icon?: IconProp;
245
- /**
246
- * add icon after, passes color and size automatically if Component
247
- */
248
- iconAfter?: IconProp;
249
- /**
250
- * adjust icon relative to size
251
- *
252
- * @default 1
253
- */
254
- scaleIcon?: number;
255
- /**
256
- * make the spacing elements flex
257
- */
258
- spaceFlex?: number | boolean;
259
- /**
260
- * adjust internal space relative to icon size
261
- */
262
- scaleSpace?: number;
263
- /**
264
- * remove default styles
265
- */
266
- unstyled?: boolean;
267
- }, import("@tamagui/web").StackStyleBase, {
268
- size?: number | SizeTokens | undefined;
269
- variant?: "outlined" | undefined;
270
- disabled?: boolean | undefined;
271
- unstyled?: boolean | undefined;
272
- elevation?: number | SizeTokens | undefined;
273
- transparent?: boolean | undefined;
274
- circular?: boolean | undefined;
275
- chromeless?: boolean | "all" | undefined;
276
- fullscreen?: boolean | undefined;
277
- elevate?: boolean | undefined;
278
- bordered?: boolean | undefined;
279
- }, import("@tamagui/web").StaticConfigPublic];
280
- } & {
281
- Text: import("@tamagui/web").TamaguiComponent<import("@tamagui/web").TamaDefer, import("@tamagui/web").TamaguiTextElement, import("@tamagui/web").TextNonStyleProps, import("@tamagui/web").TextStylePropsBase, {
282
- size?: FontSizeTokens | undefined;
283
- unstyled?: boolean | undefined;
284
- }, import("@tamagui/web").StaticConfigPublic>;
285
- Icon: (props: {
286
- children: React.ReactNode;
287
- scaleIcon?: number;
288
- }) => any;
289
- };
290
- /**
291
- * @deprecated Instead of useButton, see the Button docs for the newer and much improved Advanced customization pattern: https://tamagui.dev/docs/components/button
292
- */
293
- declare function useButton<Props extends ButtonProps>({ textProps, ...propsIn }: Props, { Text }?: {
294
- Text: any;
295
- }): {
296
- spaceSize: number | import("@tamagui/web").UnionableString | "unset" | import("@tamagui/web").Variable<any>;
297
- isNested: boolean;
298
- props: Props;
299
- };
300
- export { Button, ButtonFrame, ButtonIcon, ButtonText, useButton, };
301
- export type { ButtonProps };
302
- //# sourceMappingURL=Button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/v1/Button.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,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E,IAAI,EAAE,GAAG,CAAA;CAA0B;;;;EAwH9D;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,UAAU,EACV,UAAU,EAEV,SAAS,GACV,CAAA;AACD,YAAY,EAAE,WAAW,EAAE,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Button.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.test.d.ts","sourceRoot":"","sources":["../../src/v1/Button.test.tsx"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export * from './Button';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA"}