@tamagui/button 1.113.0 → 1.113.2
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.
|
@@ -8,233 +8,205 @@ import { SizableText, wrapChildrenInText } from "@tamagui/text";
|
|
|
8
8
|
import { createStyledContext, getVariableValue, spacedChildren, styled, useProps } from "@tamagui/web";
|
|
9
9
|
import { useContext } from "react";
|
|
10
10
|
var ButtonContext = createStyledContext({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
BUTTON_NAME
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
outlineStyle: "solid",
|
|
48
|
-
outlineWidth: 2
|
|
49
|
-
}
|
|
11
|
+
// keeping these here means they work with styled() passing down color to text
|
|
12
|
+
color: void 0,
|
|
13
|
+
ellipse: void 0,
|
|
14
|
+
fontFamily: void 0,
|
|
15
|
+
fontSize: void 0,
|
|
16
|
+
fontStyle: void 0,
|
|
17
|
+
fontWeight: void 0,
|
|
18
|
+
letterSpacing: void 0,
|
|
19
|
+
maxFontSizeMultiplier: void 0,
|
|
20
|
+
size: void 0,
|
|
21
|
+
textAlign: void 0,
|
|
22
|
+
variant: void 0
|
|
23
|
+
}), BUTTON_NAME = "Button", ButtonFrame = styled(ThemeableStack, {
|
|
24
|
+
name: BUTTON_NAME,
|
|
25
|
+
tag: "button",
|
|
26
|
+
context: ButtonContext,
|
|
27
|
+
role: "button",
|
|
28
|
+
focusable: !0,
|
|
29
|
+
variants: {
|
|
30
|
+
unstyled: {
|
|
31
|
+
false: {
|
|
32
|
+
size: "$true",
|
|
33
|
+
justifyContent: "center",
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
flexWrap: "nowrap",
|
|
36
|
+
flexDirection: "row",
|
|
37
|
+
cursor: "pointer",
|
|
38
|
+
hoverTheme: !0,
|
|
39
|
+
pressTheme: !0,
|
|
40
|
+
backgrounded: !0,
|
|
41
|
+
borderWidth: 1,
|
|
42
|
+
borderColor: "transparent",
|
|
43
|
+
focusVisibleStyle: {
|
|
44
|
+
outlineColor: "$outlineColor",
|
|
45
|
+
outlineStyle: "solid",
|
|
46
|
+
outlineWidth: 2
|
|
50
47
|
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
variant: {
|
|
51
|
+
outlined: {
|
|
52
|
+
backgroundColor: "transparent",
|
|
53
|
+
borderWidth: 2,
|
|
54
|
+
borderColor: "$borderColor",
|
|
55
|
+
hoverStyle: {
|
|
54
56
|
backgroundColor: "transparent",
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
focusVisibleStyle: {
|
|
66
|
-
backgroundColor: "transparent",
|
|
67
|
-
borderColor: "$borderColorFocus"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
size: {
|
|
72
|
-
"...size": getButtonSized,
|
|
73
|
-
":number": getButtonSized
|
|
74
|
-
},
|
|
75
|
-
disabled: {
|
|
76
|
-
true: {
|
|
77
|
-
pointerEvents: "none"
|
|
57
|
+
borderColor: "$borderColorHover"
|
|
58
|
+
},
|
|
59
|
+
pressStyle: {
|
|
60
|
+
backgroundColor: "transparent",
|
|
61
|
+
borderColor: "$borderColorPress"
|
|
62
|
+
},
|
|
63
|
+
focusVisibleStyle: {
|
|
64
|
+
backgroundColor: "transparent",
|
|
65
|
+
borderColor: "$borderColorFocus"
|
|
78
66
|
}
|
|
79
67
|
}
|
|
80
68
|
},
|
|
81
|
-
|
|
82
|
-
|
|
69
|
+
size: {
|
|
70
|
+
"...size": getButtonSized,
|
|
71
|
+
":number": getButtonSized
|
|
72
|
+
},
|
|
73
|
+
disabled: {
|
|
74
|
+
true: {
|
|
75
|
+
pointerEvents: "none"
|
|
76
|
+
}
|
|
83
77
|
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
81
|
+
}
|
|
82
|
+
}), ButtonText = styled(SizableText, {
|
|
83
|
+
name: "Button",
|
|
84
|
+
context: ButtonContext,
|
|
85
|
+
variants: {
|
|
86
|
+
unstyled: {
|
|
87
|
+
false: {
|
|
88
|
+
userSelect: "none",
|
|
89
|
+
cursor: "pointer",
|
|
90
|
+
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
91
|
+
flexGrow: 0,
|
|
92
|
+
flexShrink: 1,
|
|
93
|
+
ellipse: !0,
|
|
94
|
+
color: "$color"
|
|
99
95
|
}
|
|
100
|
-
},
|
|
101
|
-
defaultVariants: {
|
|
102
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
103
96
|
}
|
|
104
|
-
}),
|
|
105
|
-
ButtonIcon = function (props) {
|
|
106
|
-
var {
|
|
107
|
-
children,
|
|
108
|
-
scaleIcon = 1
|
|
109
|
-
} = props,
|
|
110
|
-
{
|
|
111
|
-
size,
|
|
112
|
-
color
|
|
113
|
-
} = useContext(ButtonContext),
|
|
114
|
-
iconSize = (typeof size == "number" ? size * 0.5 : getFontSize(size)) * scaleIcon,
|
|
115
|
-
getThemedIcon = useGetThemedIcon({
|
|
116
|
-
size: iconSize,
|
|
117
|
-
color
|
|
118
|
-
});
|
|
119
|
-
return getThemedIcon(children);
|
|
120
97
|
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
98
|
+
defaultVariants: {
|
|
99
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
100
|
+
}
|
|
101
|
+
}), ButtonIcon = function(props) {
|
|
102
|
+
var { children, scaleIcon = 1 } = props, { size, color } = useContext(ButtonContext), iconSize = (typeof size == "number" ? size * 0.5 : getFontSize(size)) * scaleIcon, getThemedIcon = useGetThemedIcon({
|
|
103
|
+
size: iconSize,
|
|
104
|
+
color
|
|
105
|
+
});
|
|
106
|
+
return getThemedIcon(children);
|
|
107
|
+
}, ButtonComponent = ButtonFrame.styleable(function(props, ref) {
|
|
108
|
+
var { props: buttonProps } = useButton(props);
|
|
109
|
+
return /* @__PURE__ */ _jsx(ButtonFrame, {
|
|
110
|
+
...buttonProps,
|
|
111
|
+
ref
|
|
112
|
+
});
|
|
113
|
+
}), buttonStaticConfig = {
|
|
114
|
+
inlineProps: /* @__PURE__ */ new Set([
|
|
132
115
|
// text props go here (can't really optimize them, but we never fully extract button anyway)
|
|
133
116
|
// may be able to remove this entirely, as the compiler / runtime have gotten better
|
|
134
|
-
"color",
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
117
|
+
"color",
|
|
118
|
+
"fontWeight",
|
|
119
|
+
"fontSize",
|
|
120
|
+
"fontFamily",
|
|
121
|
+
"fontStyle",
|
|
122
|
+
"letterSpacing",
|
|
123
|
+
"textAlign",
|
|
124
|
+
"unstyled"
|
|
125
|
+
])
|
|
126
|
+
}, Button2 = withStaticProperties(ButtonComponent, {
|
|
127
|
+
Text: ButtonText,
|
|
128
|
+
Icon: ButtonIcon
|
|
129
|
+
});
|
|
140
130
|
function useButton(param) {
|
|
141
|
-
var {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
131
|
+
var { textProps, ...propsIn } = param, { Text = Button2.Text } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
132
|
+
Text: Button2.Text
|
|
133
|
+
}, isNested = useContext(ButtonNestingContext), propsActive = useProps(propsIn, {
|
|
134
|
+
noNormalize: !0,
|
|
135
|
+
noExpand: !0
|
|
136
|
+
}), { icon, iconAfter, space, spaceFlex, scaleIcon = 1, scaleSpace = 0.66, separator, noTextWrap, fontFamily, fontSize, fontWeight, fontStyle, letterSpacing, tag, ellipse, maxFontSizeMultiplier, ...restProps } = propsActive, size = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size == "number" ? size * 0.5 : getFontSize(size, {
|
|
137
|
+
font: fontFamily?.[0] === "$" ? fontFamily : void 0
|
|
138
|
+
})) * scaleIcon, getThemedIcon = useGetThemedIcon({
|
|
139
|
+
size: iconSize,
|
|
140
|
+
color
|
|
141
|
+
}), [themedIcon, themedIconAfter] = [
|
|
142
|
+
icon,
|
|
143
|
+
iconAfter
|
|
144
|
+
].map(getThemedIcon), spaceSize = space ?? getVariableValue(iconSize) * scaleSpace, contents = noTextWrap ? [
|
|
145
|
+
propsIn.children
|
|
146
|
+
] : wrapChildrenInText(Text, {
|
|
147
|
+
children: propsIn.children,
|
|
148
|
+
fontFamily,
|
|
149
|
+
fontSize,
|
|
150
|
+
textProps,
|
|
151
|
+
fontWeight,
|
|
152
|
+
fontStyle,
|
|
153
|
+
letterSpacing,
|
|
154
|
+
ellipse,
|
|
155
|
+
maxFontSizeMultiplier
|
|
156
|
+
}, Text === ButtonText && propsActive.unstyled !== !0 ? {
|
|
157
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1",
|
|
158
|
+
size
|
|
159
|
+
} : void 0), inner = spacedChildren({
|
|
160
|
+
// a bit arbitrary but scaling to font size is necessary so long as button does
|
|
161
|
+
space: spaceSize,
|
|
162
|
+
spaceFlex,
|
|
163
|
+
ensureKeys: !0,
|
|
164
|
+
separator,
|
|
165
|
+
direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
|
|
166
|
+
// for keys to stay the same we keep indices as similar a possible
|
|
167
|
+
// so even if icons are undefined we still pass them
|
|
168
|
+
children: [
|
|
169
|
+
themedIcon,
|
|
170
|
+
...contents,
|
|
171
|
+
themedIconAfter
|
|
172
|
+
]
|
|
173
|
+
}), props = {
|
|
174
|
+
size,
|
|
175
|
+
...propsIn.disabled && {
|
|
176
|
+
// in rnw - false still has keyboard tabIndex, undefined = not actually focusable
|
|
177
|
+
focusable: void 0,
|
|
178
|
+
// even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
|
|
179
|
+
focusVisibleStyle: {
|
|
180
|
+
borderColor: "$background"
|
|
181
|
+
}
|
|
149
182
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
noNormalize: !0,
|
|
153
|
-
noExpand: !0
|
|
154
|
-
}),
|
|
155
|
-
{
|
|
156
|
-
icon,
|
|
157
|
-
iconAfter,
|
|
158
|
-
space,
|
|
159
|
-
spaceFlex,
|
|
160
|
-
scaleIcon = 1,
|
|
161
|
-
scaleSpace = 0.66,
|
|
162
|
-
separator,
|
|
163
|
-
noTextWrap,
|
|
164
|
-
fontFamily,
|
|
165
|
-
fontSize,
|
|
166
|
-
fontWeight,
|
|
167
|
-
fontStyle,
|
|
168
|
-
letterSpacing,
|
|
169
|
-
tag,
|
|
170
|
-
ellipse,
|
|
171
|
-
maxFontSizeMultiplier,
|
|
172
|
-
...restProps
|
|
173
|
-
} = propsActive,
|
|
174
|
-
size = propsActive.size || (propsActive.unstyled ? void 0 : "$true"),
|
|
175
|
-
color = propsActive.color,
|
|
176
|
-
iconSize = (typeof size == "number" ? size * 0.5 : getFontSize(size, {
|
|
177
|
-
font: fontFamily?.[0] === "$" ? fontFamily : void 0
|
|
178
|
-
})) * scaleIcon,
|
|
179
|
-
getThemedIcon = useGetThemedIcon({
|
|
180
|
-
size: iconSize,
|
|
181
|
-
color
|
|
182
|
-
}),
|
|
183
|
-
[themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon),
|
|
184
|
-
spaceSize = space ?? getVariableValue(iconSize) * scaleSpace,
|
|
185
|
-
contents = noTextWrap ? [propsIn.children] : wrapChildrenInText(Text, {
|
|
186
|
-
children: propsIn.children,
|
|
187
|
-
fontFamily,
|
|
188
|
-
fontSize,
|
|
189
|
-
textProps,
|
|
190
|
-
fontWeight,
|
|
191
|
-
fontStyle,
|
|
192
|
-
letterSpacing,
|
|
193
|
-
ellipse,
|
|
194
|
-
maxFontSizeMultiplier
|
|
195
|
-
}, Text === ButtonText && propsActive.unstyled !== !0 ? {
|
|
196
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1",
|
|
197
|
-
size
|
|
198
|
-
} : void 0),
|
|
199
|
-
inner = spacedChildren({
|
|
200
|
-
// a bit arbitrary but scaling to font size is necessary so long as button does
|
|
201
|
-
space: spaceSize,
|
|
202
|
-
spaceFlex,
|
|
203
|
-
ensureKeys: !0,
|
|
204
|
-
separator,
|
|
205
|
-
direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
|
|
206
|
-
// for keys to stay the same we keep indices as similar a possible
|
|
207
|
-
// so even if icons are undefined we still pass them
|
|
208
|
-
children: [themedIcon, ...contents, themedIconAfter]
|
|
209
|
-
}),
|
|
210
|
-
props = {
|
|
211
|
-
size,
|
|
212
|
-
...(propsIn.disabled && {
|
|
213
|
-
// in rnw - false still has keyboard tabIndex, undefined = not actually focusable
|
|
214
|
-
focusable: void 0,
|
|
215
|
-
// even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
|
|
216
|
-
focusVisibleStyle: {
|
|
217
|
-
borderColor: "$background"
|
|
218
|
-
}
|
|
219
|
-
}),
|
|
220
|
-
// fixes SSR issue + DOM nesting issue of not allowing button in button
|
|
221
|
-
tag: tag ?? (isNested ? "span" :
|
|
183
|
+
// fixes SSR issue + DOM nesting issue of not allowing button in button
|
|
184
|
+
tag: tag ?? (isNested ? "span" : (
|
|
222
185
|
// defaults to <a /> when accessibilityRole = link
|
|
223
186
|
// see https://github.com/tamagui/tamagui/issues/505
|
|
224
|
-
propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
187
|
+
propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"
|
|
188
|
+
)),
|
|
189
|
+
...restProps,
|
|
190
|
+
children: /* @__PURE__ */ _jsx(ButtonNestingContext.Provider, {
|
|
191
|
+
value: !0,
|
|
192
|
+
children: inner
|
|
193
|
+
}),
|
|
194
|
+
// forces it to be a runtime pressStyle so it passes through context text colors
|
|
195
|
+
disableClassName: !0
|
|
196
|
+
};
|
|
233
197
|
return {
|
|
234
198
|
spaceSize,
|
|
235
199
|
isNested,
|
|
236
200
|
props
|
|
237
201
|
};
|
|
238
202
|
}
|
|
239
|
-
export {
|
|
240
|
-
|
|
203
|
+
export {
|
|
204
|
+
Button2 as Button,
|
|
205
|
+
ButtonContext,
|
|
206
|
+
ButtonFrame,
|
|
207
|
+
ButtonIcon,
|
|
208
|
+
ButtonText,
|
|
209
|
+
buttonStaticConfig,
|
|
210
|
+
useButton
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/button/src/Button.tsx"],
|
|
4
|
+
"mappings": ";AAAA,SAASA,mBAAmB;AAC5B,SAASC,sBAAsB;AAC/B,SAASC,4BAA4B;AACrC,SAASC,wBAAwB;AACjC,SAASC,sBAAsBC,sBAAsB;AAErD,SAASC,aAAaC,0BAA0B;AAEhD,SACEC,qBACAC,kBACAC,gBACAC,QACAC,gBACK;AAEP,SAASC,kBAAkB;AAIpB,IAAMC,gBAAgBN,oBAO3B;;EAEAO,OAAOC;EACPC,SAASD;EACTE,YAAYF;EACZG,UAAUH;EACVI,WAAWJ;EACXK,YAAYL;EACZM,eAAeN;EACfO,uBAAuBP;EACvBQ,MAAMR;EACNS,WAAWT;EACXU,SAASV;AACX,CAAA,GAyCMW,cAAc,UAEdC,cAAcjB,OAAON,gBAAgB;EACzCwB,MAAMF;EACNG,KAAK;EACLC,SAASjB;EACTkB,MAAM;EACNC,WAAW;EAEXC,UAAU;IACRC,UAAU;MACRC,OAAO;QACLZ,MAAM;QACNa,gBAAgB;QAChBC,YAAY;QACZC,UAAU;QACVC,eAAe;QACfC,QAAQ;QACRC,YAAY;QACZC,YAAY;QACZC,cAAc;QACdC,aAAa;QACbC,aAAa;QAEbC,mBAAmB;UACjBC,cAAc;UACdC,cAAc;UACdC,cAAc;QAChB;MACF;IACF;IAEAxB,SAAS;MACPyB,UAAU;QACRC,iBAAiB;QACjBP,aAAa;QACbC,aAAa;QAEbO,YAAY;UACVD,iBAAiB;UACjBN,aAAa;QACf;QAEAQ,YAAY;UACVF,iBAAiB;UACjBN,aAAa;QACf;QAEAC,mBAAmB;UACjBK,iBAAiB;UACjBN,aAAa;QACf;MACF;IACF;IAEAtB,MAAM;MACJ,WAAWvB;MACX,WAAWA;IACb;IAEAsD,UAAU;MACRC,MAAM;QACJC,eAAe;MACjB;IACF;EACF;EAEAC,iBAAiB;IACfvB,UAAUwB,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEMC,aAAanD,OAA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,SAAO;IACLR;IACAhB;IACAlB;EACF;AACF;",
|
|
5
|
+
"names": ["getFontSize", "getButtonSized", "withStaticProperties", "useGetThemedIcon", "ButtonNestingContext", "ThemeableStack", "SizableText", "wrapChildrenInText", "createStyledContext", "getVariableValue", "spacedChildren", "styled", "useProps", "useContext", "ButtonContext", "color", "undefined", "ellipse", "fontFamily", "fontSize", "fontStyle", "fontWeight", "letterSpacing", "maxFontSizeMultiplier", "size", "textAlign", "variant", "BUTTON_NAME", "ButtonFrame", "name", "tag", "context", "role", "focusable", "variants", "unstyled", "false", "justifyContent", "alignItems", "flexWrap", "flexDirection", "cursor", "hoverTheme", "pressTheme", "backgrounded", "borderWidth", "borderColor", "focusVisibleStyle", "outlineColor", "outlineStyle", "outlineWidth", "outlined", "backgroundColor", "hoverStyle", "pressStyle", "disabled", "true", "pointerEvents", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "ButtonText", "userSelect", "flexGrow", "flexShrink", "ButtonIcon", "props", "children", "scaleIcon", "iconSize", "getThemedIcon", "ButtonComponent", "styleable", "ref", "buttonProps", "useButton", "buttonStaticConfig", "inlineProps", "Set", "Button", "Text", "Icon", "textProps", "propsIn", "isNested", "propsActive", "noNormalize", "noExpand", "icon", "iconAfter", "space", "spaceFlex", "scaleSpace", "separator", "noTextWrap", "restProps", "font", "themedIcon", "themedIconAfter", "map", "spaceSize", "contents", "inner", "ensureKeys", "direction", "accessibilityRole", "Provider", "value", "disableClassName"]
|
|
6
|
+
}
|
|
@@ -2,9 +2,9 @@ import { getDefaultTamaguiConfig } from "@tamagui/config-default";
|
|
|
2
2
|
import { createTamagui } from "@tamagui/core";
|
|
3
3
|
import { describe, expect, test } from "vitest";
|
|
4
4
|
var conf = createTamagui(getDefaultTamaguiConfig());
|
|
5
|
-
describe("Button", function
|
|
6
|
-
test("123", function
|
|
5
|
+
describe("Button", function() {
|
|
6
|
+
test("123", function() {
|
|
7
7
|
expect(!0).toBeTruthy();
|
|
8
8
|
});
|
|
9
9
|
});
|
|
10
|
-
//# sourceMappingURL=Button.test.
|
|
10
|
+
//# sourceMappingURL=Button.test.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/button/src/Button.test.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAASA,+BAA+B;AACxC,SAASC,qBAAqB;AAC9B,SAASC,UAAUC,QAAQC,YAAY;AAEvC,IAAMC,OAAOJ,cAAcD,wBAAAA,CAAAA;AAE3BE,SAAS,UAAU,WAAA;AACjBE,OAAK,OAAO,WAAA;AACVD,WAAO,EAAA,EAAMG,WAAU;EACzB,CAAA;AAWF,CAAA;",
|
|
5
|
+
"names": ["getDefaultTamaguiConfig", "createTamagui", "describe", "expect", "test", "conf", "toBeTruthy"]
|
|
6
|
+
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Button
|
|
2
|
-
//# sourceMappingURL=index.
|
|
1
|
+
export * from "./Button";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/button",
|
|
3
|
-
"version": "1.113.
|
|
3
|
+
"version": "1.113.2",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/font-size": "1.113.
|
|
37
|
-
"@tamagui/get-button-sized": "1.113.
|
|
38
|
-
"@tamagui/helpers": "1.113.
|
|
39
|
-
"@tamagui/helpers-tamagui": "1.113.
|
|
40
|
-
"@tamagui/stacks": "1.113.
|
|
41
|
-
"@tamagui/text": "1.113.
|
|
42
|
-
"@tamagui/web": "1.113.
|
|
36
|
+
"@tamagui/font-size": "1.113.2",
|
|
37
|
+
"@tamagui/get-button-sized": "1.113.2",
|
|
38
|
+
"@tamagui/helpers": "1.113.2",
|
|
39
|
+
"@tamagui/helpers-tamagui": "1.113.2",
|
|
40
|
+
"@tamagui/stacks": "1.113.2",
|
|
41
|
+
"@tamagui/text": "1.113.2",
|
|
42
|
+
"@tamagui/web": "1.113.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@tamagui/build": "1.113.
|
|
45
|
+
"@tamagui/build": "1.113.2",
|
|
46
46
|
"react": "^18.2.0 || ^19.0.0",
|
|
47
47
|
"vitest": "2.1.1"
|
|
48
48
|
},
|