@tamagui/button 2.7.7 → 3.0.0-beta.643.1
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.
- package/dist/cjs/Button.cjs +180 -266
- package/dist/cjs/Button.native.cjs +224 -0
- package/dist/cjs/Button.native.js +200 -271
- package/dist/cjs/Button.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +21 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Button.mjs +168 -255
- package/dist/esm/Button.mjs.map +1 -1
- package/dist/esm/Button.native.js +188 -261
- package/dist/esm/Button.native.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +1 -2
- package/dist/jsx/Button.mjs +168 -255
- package/dist/jsx/Button.mjs.map +1 -1
- package/dist/jsx/Button.native.cjs +224 -0
- package/dist/jsx/Button.native.js +200 -271
- package/dist/jsx/Button.native.js.map +1 -1
- package/dist/jsx/index.js +1 -2
- package/dist/jsx/index.mjs +1 -2
- package/dist/jsx/index.native.cjs +21 -0
- package/dist/jsx/index.native.js +10 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +11 -12
- package/src/Button.tsx +222 -280
- package/types/Button.d.ts +218 -114
- package/types/Button.d.ts.map +1 -1
- package/dist/cjs/Button.test.cjs +0 -37
- package/dist/cjs/Button.test.native.js +0 -40
- package/dist/cjs/Button.test.native.js.map +0 -1
- package/dist/esm/Button.test.mjs +0 -38
- package/dist/esm/Button.test.mjs.map +0 -1
- package/dist/esm/Button.test.native.js +0 -38
- package/dist/esm/Button.test.native.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/Button.test.mjs +0 -38
- package/dist/jsx/Button.test.mjs.map +0 -1
- package/dist/jsx/Button.test.native.js +0 -40
- package/dist/jsx/Button.test.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
- package/src/Button.test.tsx +0 -45
- package/types/Button.test.d.ts +0 -2
- package/types/Button.test.d.ts.map +0 -1
|
@@ -1,297 +1,226 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
-
value: true
|
|
24
|
-
}), mod);
|
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
24
|
var Button_exports = {};
|
|
26
25
|
__export(Button_exports, {
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
Button: () => Button2,
|
|
27
|
+
ButtonContext: () => ButtonContext,
|
|
28
|
+
ButtonFrame: () => ButtonFrame,
|
|
29
|
+
ButtonIcon: () => ButtonIcon,
|
|
30
|
+
ButtonText: () => ButtonText,
|
|
31
|
+
useButton: () => useButton
|
|
29
32
|
});
|
|
30
33
|
module.exports = __toCommonJS(Button_exports);
|
|
31
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
-
var import_font_size = require("@tamagui/font-size");
|
|
33
|
-
var import_get_button_sized = require("@tamagui/get-button-sized");
|
|
34
35
|
var import_helpers_tamagui = require("@tamagui/helpers-tamagui");
|
|
35
36
|
var import_stacks = require("@tamagui/stacks");
|
|
36
37
|
var import_text = require("@tamagui/text");
|
|
37
38
|
var import_web = require("@tamagui/web");
|
|
38
39
|
var import_react = require("react");
|
|
39
|
-
var
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
alignItems: "center",
|
|
73
|
-
flexWrap: "nowrap",
|
|
74
|
-
flexDirection: "row",
|
|
75
|
-
backgroundColor: "$background",
|
|
76
|
-
borderWidth: 1,
|
|
77
|
-
borderColor: "transparent",
|
|
78
|
-
"$platform-web": {
|
|
79
|
-
cursor: "pointer"
|
|
80
|
-
},
|
|
81
|
-
hoverStyle: {
|
|
82
|
-
backgroundColor: "$backgroundHover",
|
|
83
|
-
borderColor: "$borderColorHover"
|
|
84
|
-
},
|
|
85
|
-
pressStyle: {
|
|
86
|
-
backgroundColor: "$backgroundPress",
|
|
87
|
-
borderColor: "$borderColorHover"
|
|
88
|
-
},
|
|
89
|
-
focusVisibleStyle: {
|
|
90
|
-
outlineColor: "$outlineColor",
|
|
91
|
-
outlineStyle: "solid",
|
|
92
|
-
outlineWidth: 2
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
variant: {
|
|
97
|
-
outlined: process.env.TAMAGUI_HEADLESS === "1" ? {} : {
|
|
98
|
-
backgroundColor: "transparent",
|
|
99
|
-
borderWidth: 1,
|
|
100
|
-
borderColor: "$borderColor",
|
|
101
|
-
hoverStyle: {
|
|
102
|
-
backgroundColor: "transparent",
|
|
103
|
-
borderColor: "$borderColorHover"
|
|
104
|
-
},
|
|
105
|
-
pressStyle: {
|
|
106
|
-
backgroundColor: "transparent",
|
|
107
|
-
borderColor: "$borderColorPress"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
circular: import_stacks.themeableVariants.circular,
|
|
112
|
-
chromeless: import_stacks.themeableVariants.chromeless,
|
|
113
|
-
size: {
|
|
114
|
-
"...size": function (val, extras) {
|
|
115
|
-
var buttonStyle = (0, import_get_button_sized.getButtonSized)(val, extras);
|
|
116
|
-
var gap = (0, import_web.getTokenValue)(val);
|
|
117
|
-
return {
|
|
118
|
-
...buttonStyle,
|
|
119
|
-
gap
|
|
120
|
-
};
|
|
121
|
-
},
|
|
122
|
-
":number": function (val, extras) {
|
|
123
|
-
var buttonStyle = (0, import_get_button_sized.getButtonSized)(val, extras);
|
|
124
|
-
var gap = val * 0.4;
|
|
125
|
-
return {
|
|
126
|
-
...buttonStyle,
|
|
127
|
-
gap
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
elevation: {
|
|
132
|
-
"...size": import_stacks.getElevation,
|
|
133
|
-
":number": import_stacks.getElevation
|
|
134
|
-
},
|
|
135
|
-
disabled: {
|
|
136
|
-
true: {
|
|
137
|
-
pointerEvents: "none",
|
|
138
|
-
// @ts-ignore
|
|
139
|
-
"aria-disabled": true
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
defaultVariants: {
|
|
144
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
145
|
-
}
|
|
40
|
+
var buttonContextKeys = [
|
|
41
|
+
"color",
|
|
42
|
+
"ellipsis",
|
|
43
|
+
"fontFamily",
|
|
44
|
+
"fontSize",
|
|
45
|
+
"fontStyle",
|
|
46
|
+
"fontWeight",
|
|
47
|
+
"letterSpacing",
|
|
48
|
+
"maxFontSizeMultiplier",
|
|
49
|
+
"textAlign"
|
|
50
|
+
];
|
|
51
|
+
var ButtonContext = (0, import_web.createStyledContext)({
|
|
52
|
+
color: void 0,
|
|
53
|
+
ellipsis: void 0,
|
|
54
|
+
fontFamily: void 0,
|
|
55
|
+
fontSize: void 0,
|
|
56
|
+
fontStyle: void 0,
|
|
57
|
+
fontWeight: void 0,
|
|
58
|
+
letterSpacing: void 0,
|
|
59
|
+
maxFontSizeMultiplier: void 0,
|
|
60
|
+
textAlign: void 0
|
|
61
|
+
}, { keys: buttonContextKeys });
|
|
62
|
+
var ButtonFrame = (0, import_web.styled)(import_web.View, {
|
|
63
|
+
context: ButtonContext,
|
|
64
|
+
displayName: "ButtonFrame",
|
|
65
|
+
role: "button",
|
|
66
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button" }),
|
|
67
|
+
tabIndex: 0,
|
|
68
|
+
alignItems: "center",
|
|
69
|
+
flexDirection: "row",
|
|
70
|
+
flexWrap: "nowrap",
|
|
71
|
+
justifyContent: "center",
|
|
72
|
+
variants: { disabled: { true: { pointerEvents: "none" } } }
|
|
146
73
|
});
|
|
147
|
-
var
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
userSelect: "none",
|
|
153
|
-
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
154
|
-
flexGrow: 0,
|
|
155
|
-
flexShrink: 1,
|
|
156
|
-
ellipsis: true,
|
|
157
|
-
color: "$color",
|
|
158
|
-
"$platform-web": {
|
|
159
|
-
cursor: "pointer"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
defaultVariants: {
|
|
165
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
166
|
-
}
|
|
74
|
+
var ButtonText = (0, import_web.styled)(import_web.Text, {
|
|
75
|
+
context: ButtonContext,
|
|
76
|
+
displayName: "ButtonText",
|
|
77
|
+
flexGrow: 0,
|
|
78
|
+
flexShrink: 1
|
|
167
79
|
});
|
|
168
|
-
var
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
var sizeToken = size !== null && size !== void 0 ? size : styledContext.size;
|
|
179
|
-
var iconColorProp = styledContext.color === "unset" || typeof styledContext.color === "number" ? void 0 : styledContext.color;
|
|
180
|
-
var iconColor = (0, import_helpers_tamagui.useCurrentColor)(iconColorProp);
|
|
181
|
-
var iconSize = (typeof sizeToken === "number" ? sizeToken * 0.5 : (0, import_font_size.getFontSize)(sizeToken)) * scaleIcon;
|
|
182
|
-
return (0, import_helpers_tamagui.getIcon)(children, {
|
|
183
|
-
size: iconSize,
|
|
184
|
-
color: iconColor
|
|
185
|
-
});
|
|
80
|
+
var ButtonIcon = function(param) {
|
|
81
|
+
var { children, color, scaleIcon = 1, size } = param;
|
|
82
|
+
var styledContext = ButtonContext.useStyledContext();
|
|
83
|
+
var iconColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;
|
|
84
|
+
var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
85
|
+
color: iconColor === "unset" || typeof iconColor === "number" ? void 0 : iconColor,
|
|
86
|
+
size: size === void 0 ? void 0 : size * scaleIcon
|
|
87
|
+
});
|
|
88
|
+
return getThemedIcon(children);
|
|
186
89
|
};
|
|
187
|
-
var
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
90
|
+
var buttonInternalPropNames = [
|
|
91
|
+
"children",
|
|
92
|
+
"color",
|
|
93
|
+
"disabled",
|
|
94
|
+
"ellipsis",
|
|
95
|
+
"fontFamily",
|
|
96
|
+
"fontSize",
|
|
97
|
+
"fontStyle",
|
|
98
|
+
"fontWeight",
|
|
99
|
+
"icon",
|
|
100
|
+
"iconAfter",
|
|
101
|
+
"iconSize",
|
|
102
|
+
"letterSpacing",
|
|
103
|
+
"maxFontSizeMultiplier",
|
|
104
|
+
"noTextWrap",
|
|
105
|
+
"render",
|
|
106
|
+
"scaleIcon",
|
|
107
|
+
"textAlign",
|
|
108
|
+
"textProps"
|
|
109
|
+
];
|
|
110
|
+
function useButton(propsIn) {
|
|
111
|
+
var { Text: _$Text = ButtonText, iconColor: iconColorOption, iconSize: iconSizeOption, textProps: textPropsOption } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
112
|
+
var isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);
|
|
113
|
+
var styledContext = ButtonContext.useStyledContext();
|
|
114
|
+
var processedProps = (0, import_web.useProps)(propsIn, {
|
|
115
|
+
noNormalize: true,
|
|
116
|
+
noExpand: true
|
|
117
|
+
});
|
|
118
|
+
var { children, color, disabled, ellipsis, fontFamily, fontSize, fontStyle, fontWeight, icon, iconAfter, iconSize, letterSpacing, maxFontSizeMultiplier, noTextWrap, render, scaleIcon = 1, textAlign, textProps } = processedProps;
|
|
119
|
+
var frameProps = { ...propsIn };
|
|
120
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
121
|
+
try {
|
|
122
|
+
for (var _iterator = buttonInternalPropNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
123
|
+
var key = _step.value;
|
|
124
|
+
delete frameProps[key];
|
|
125
|
+
}
|
|
126
|
+
} catch (err) {
|
|
127
|
+
_didIteratorError = true;
|
|
128
|
+
_iteratorError = err;
|
|
129
|
+
} finally {
|
|
130
|
+
try {
|
|
131
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
132
|
+
_iterator.return();
|
|
133
|
+
}
|
|
134
|
+
} finally {
|
|
135
|
+
if (_didIteratorError) {
|
|
136
|
+
throw _iteratorError;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
var contextColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;
|
|
141
|
+
var iconColor = iconColorOption !== null && iconColorOption !== void 0 ? iconColorOption : contextColor;
|
|
142
|
+
var resolvedIconSize = iconSize !== null && iconSize !== void 0 ? iconSize : iconSizeOption;
|
|
143
|
+
var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
144
|
+
color: iconColor === "unset" || typeof iconColor === "number" ? void 0 : iconColor,
|
|
145
|
+
size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon
|
|
146
|
+
});
|
|
147
|
+
var [themedIcon, themedIconAfter] = [icon, iconAfter].map(function(item) {
|
|
148
|
+
return item ? getThemedIcon(item) : null;
|
|
149
|
+
});
|
|
150
|
+
var textContext = {
|
|
151
|
+
color: contextColor,
|
|
152
|
+
ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,
|
|
153
|
+
fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,
|
|
154
|
+
fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,
|
|
155
|
+
fontStyle: fontStyle !== null && fontStyle !== void 0 ? fontStyle : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,
|
|
156
|
+
fontWeight: fontWeight !== null && fontWeight !== void 0 ? fontWeight : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,
|
|
157
|
+
letterSpacing: letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,
|
|
158
|
+
maxFontSizeMultiplier: maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,
|
|
159
|
+
textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign
|
|
160
|
+
};
|
|
161
|
+
var wrappedChildren = (0, import_text.wrapChildrenInText)(_$Text, {
|
|
162
|
+
children,
|
|
163
|
+
...textContext,
|
|
164
|
+
noTextWrap,
|
|
165
|
+
textProps
|
|
166
|
+
}, {
|
|
167
|
+
...textPropsOption,
|
|
168
|
+
...processedProps.size === void 0 ? null : { size: processedProps.size }
|
|
169
|
+
});
|
|
170
|
+
var resolvedRender = render !== null && render !== void 0 ? render : isNested ? "span" : processedProps.accessibilityRole === "link" || processedProps.role === "link" ? "a" : disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
|
171
|
+
type: "button",
|
|
172
|
+
disabled: true
|
|
173
|
+
}) : void 0;
|
|
174
|
+
var props = {
|
|
175
|
+
...frameProps,
|
|
176
|
+
...disabled && {
|
|
177
|
+
"aria-disabled": true,
|
|
178
|
+
disabled: true,
|
|
179
|
+
tabIndex: -1
|
|
180
|
+
},
|
|
181
|
+
...resolvedRender === void 0 ? null : { render: resolvedRender },
|
|
182
|
+
...isNested && {
|
|
183
|
+
role: "none",
|
|
184
|
+
tabIndex: -1,
|
|
185
|
+
"aria-disabled": void 0,
|
|
186
|
+
disabled: void 0,
|
|
187
|
+
onPress: void 0,
|
|
188
|
+
onPressIn: void 0,
|
|
189
|
+
onPressOut: void 0,
|
|
190
|
+
onLongPress: void 0,
|
|
191
|
+
onClick: void 0,
|
|
192
|
+
onKeyDown: void 0,
|
|
193
|
+
onKeyUp: void 0
|
|
194
|
+
},
|
|
195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {
|
|
196
|
+
value: true,
|
|
197
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ButtonContext.Provider, {
|
|
198
|
+
...textContext,
|
|
199
|
+
children: [
|
|
200
|
+
themedIcon,
|
|
201
|
+
wrappedChildren,
|
|
202
|
+
themedIconAfter
|
|
203
|
+
]
|
|
204
|
+
})
|
|
205
|
+
})
|
|
206
|
+
};
|
|
207
|
+
return {
|
|
208
|
+
isNested,
|
|
209
|
+
props
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
var ButtonComponent = (0, import_web.createStyledHOC)(ButtonFrame, function Button(props, ref) {
|
|
213
|
+
var { props: buttonProps } = useButton(props);
|
|
214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonFrame, {
|
|
215
|
+
ref,
|
|
216
|
+
...buttonProps
|
|
217
|
+
});
|
|
290
218
|
});
|
|
291
|
-
var
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
219
|
+
var Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {
|
|
220
|
+
Apply: ButtonContext.Provider,
|
|
221
|
+
Frame: ButtonFrame,
|
|
222
|
+
Icon: ButtonIcon,
|
|
223
|
+
Text: ButtonText
|
|
296
224
|
});
|
|
225
|
+
|
|
297
226
|
//# sourceMappingURL=Button.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Button_exports","__export","Button","ButtonContext","module","exports","import_jsx_runtime","require","import_font_size","import_get_button_sized","import_helpers_tamagui","import_stacks","import_text","import_web","import_react","context","createStyledContext","size","variant","color","elevation","ellipsis","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","maxFontSizeMultiplier","textAlign","Frame","styled","View","name","role","render","jsx","type","tabIndex","variants","unstyled","true","outlineWidth","borderWidth","backgroundColor","false","justifyContent","alignItems","flexWrap","flexDirection","borderColor","cursor","hoverStyle","pressStyle","focusVisibleStyle","outlineColor","outlineStyle","outlined","process","env","TAMAGUI_HEADLESS","circular","themeableVariants","chromeless","...size","val","extras","buttonStyle","getButtonSized","gap","getTokenValue",":number","getElevation","disabled","pointerEvents","defaultVariants","Text","SizableText","userSelect","flexGrow","flexShrink","Icon","props","children","scaleIcon","styledContext","useStyledContext","Error","sizeToken","iconColorProp","iconColor","useCurrentColor","iconSize","getFontSize","getIcon","ButtonComponent","styleable","propsIn","ref","isNested","useContext","ButtonNestingContext","processedProps","useProps","noNormalize","noExpand","icon","iconAfter","noTextWrap","textProps","_ref","contextColor","_ref1","finalSize","iconSizeNumber","themedIcon","themedIconAfter","map","icon2","_ref2","_ref3","_ref4","_ref5","_ref6","_ref7","_ref8","_ref9","wrappedChildren","wrapChildrenInText","_ref10","_ref11","_ref12","_ref13","_ref14","_ref15","_ref16","_ref17","textContext","_props_size","_ref18","_props_variant","_ref19","_props_elevation","_ref20","buttonContext","Provider","jsxs","withStaticProperties","Apply"],"sources":["../../src/Button.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,cAAA;AAAAC,QAAA,CAAAD,cAAA;EAAAE,MAAA,EAAAA,CAAA,KAAAA,MAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAV,YAA4B,CAAAK,cAAA;AAC5B,IAAAM,kBAAA,GAAAC,OAA+B;AAC/B,IAAAC,gBAAA,GAAAD,OAAyC;AACzC,IAAAE,uBAAsE,GAAAF,OAAA;AAEtE,IAAAG,sBAAgD,GAAAH,OAAA;AAEhD,IAAAI,aAOO,GAAAJ,OAA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cjs/Button.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Button_exports = {};\n__export(Button_exports, {\n Button: () => Button2,\n ButtonContext: () => ButtonContext,\n ButtonFrame: () => ButtonFrame,\n ButtonIcon: () => ButtonIcon,\n ButtonText: () => ButtonText,\n useButton: () => useButton\n});\nmodule.exports = __toCommonJS(Button_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_helpers_tamagui = require(\"@tamagui/helpers-tamagui\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_web = require(\"@tamagui/web\");\nvar import_react = require(\"react\");\nvar buttonContextKeys = [\n \"color\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"textAlign\"\n];\nvar ButtonContext = (0, import_web.createStyledContext)({\n color: void 0,\n ellipsis: void 0,\n fontFamily: void 0,\n fontSize: void 0,\n fontStyle: void 0,\n fontWeight: void 0,\n letterSpacing: void 0,\n maxFontSizeMultiplier: void 0,\n textAlign: void 0\n}, {\n keys: buttonContextKeys\n});\nvar ButtonFrame = (0, import_web.styled)(import_web.View, {\n context: ButtonContext,\n displayName: \"ButtonFrame\",\n role: \"button\",\n render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\"\n }),\n tabIndex: 0,\n alignItems: \"center\",\n flexDirection: \"row\",\n flexWrap: \"nowrap\",\n justifyContent: \"center\",\n variants: {\n disabled: {\n true: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar ButtonText = (0, import_web.styled)(import_web.Text, {\n context: ButtonContext,\n displayName: \"ButtonText\",\n // flexGrow 1 pushes text to the start of its parent on native\n flexGrow: 0,\n flexShrink: 1\n});\nvar ButtonIcon = function(param) {\n var { children, color, scaleIcon = 1, size } = param;\n var styledContext = ButtonContext.useStyledContext();\n var iconColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: size === void 0 ? void 0 : size * scaleIcon\n });\n return getThemedIcon(children);\n};\nvar buttonInternalPropNames = [\n \"children\",\n \"color\",\n \"disabled\",\n \"ellipsis\",\n \"fontFamily\",\n \"fontSize\",\n \"fontStyle\",\n \"fontWeight\",\n \"icon\",\n \"iconAfter\",\n \"iconSize\",\n \"letterSpacing\",\n \"maxFontSizeMultiplier\",\n \"noTextWrap\",\n \"render\",\n \"scaleIcon\",\n \"textAlign\",\n \"textProps\"\n];\nfunction useButton(propsIn) {\n var { Text: _$Text = ButtonText, iconColor: iconColorOption, iconSize: iconSizeOption, textProps: textPropsOption } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);\n var styledContext = ButtonContext.useStyledContext();\n var processedProps = (0, import_web.useProps)(propsIn, {\n noNormalize: true,\n noExpand: true\n });\n var { children, color, disabled, ellipsis, fontFamily, fontSize, fontStyle, fontWeight, icon, iconAfter, iconSize, letterSpacing, maxFontSizeMultiplier, noTextWrap, render, scaleIcon = 1, textAlign, textProps } = processedProps;\n var frameProps = {\n ...propsIn\n };\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = buttonInternalPropNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var key = _step.value;\n delete frameProps[key];\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n var contextColor = color !== null && color !== void 0 ? color : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;\n var iconColor = iconColorOption !== null && iconColorOption !== void 0 ? iconColorOption : contextColor;\n var resolvedIconSize = iconSize !== null && iconSize !== void 0 ? iconSize : iconSizeOption;\n var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({\n color: iconColor === \"unset\" || typeof iconColor === \"number\" ? void 0 : iconColor,\n size: resolvedIconSize === void 0 ? void 0 : resolvedIconSize * scaleIcon\n });\n var [themedIcon, themedIconAfter] = [\n icon,\n iconAfter\n ].map(function(item) {\n return item ? getThemedIcon(item) : null;\n });\n var textContext = {\n color: contextColor,\n ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,\n fontFamily: fontFamily !== null && fontFamily !== void 0 ? fontFamily : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,\n fontSize: fontSize !== null && fontSize !== void 0 ? fontSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,\n fontStyle: fontStyle !== null && fontStyle !== void 0 ? fontStyle : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,\n fontWeight: fontWeight !== null && fontWeight !== void 0 ? fontWeight : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,\n letterSpacing: letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,\n maxFontSizeMultiplier: maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,\n textAlign: textAlign !== null && textAlign !== void 0 ? textAlign : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign\n };\n var wrappedChildren = (0, import_text.wrapChildrenInText)(_$Text, {\n children,\n ...textContext,\n noTextWrap,\n textProps\n }, {\n ...textPropsOption,\n ...processedProps.size === void 0 ? null : {\n size: processedProps.size\n }\n });\n var resolvedRender = render !== null && render !== void 0 ? render : isNested ? \"span\" : processedProps.accessibilityRole === \"link\" || processedProps.role === \"link\" ? \"a\" : disabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"button\", {\n type: \"button\",\n disabled: true\n }) : void 0;\n var props = {\n ...frameProps,\n ...disabled && {\n \"aria-disabled\": true,\n disabled: true,\n tabIndex: -1\n },\n ...resolvedRender === void 0 ? null : {\n render: resolvedRender\n },\n ...isNested && {\n // a nested Button is a presentation part, not a control: strip the\n // interactive semantics so we never place a focusable role=button (with\n // its own press/keyboard handlers) inside the outer native <button>. that\n // nesting is invalid html, adds an extra focus stop, and bubbles\n // activation to the outer control. resolvedRender already makes it a span.\n role: \"none\",\n tabIndex: -1,\n \"aria-disabled\": void 0,\n disabled: void 0,\n onPress: void 0,\n onPressIn: void 0,\n onPressOut: void 0,\n onLongPress: void 0,\n onClick: void 0,\n onKeyDown: void 0,\n onKeyUp: void 0\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ButtonContext.Provider, {\n ...textContext,\n children: [\n themedIcon,\n wrappedChildren,\n themedIconAfter\n ]\n })\n })\n };\n return {\n isNested,\n props\n };\n}\nvar ButtonComponent = (0, import_web.createStyledHOC)(ButtonFrame, function Button(props, ref) {\n var { props: buttonProps } = useButton(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonFrame, {\n ref,\n ...buttonProps\n });\n});\nvar Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {\n Apply: ButtonContext.Provider,\n Frame: ButtonFrame,\n Icon: ButtonIcon,\n Text: ButtonText\n});\n//# sourceMappingURL=Button.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iBAAiB,CAAC;AACtB,SAAS,gBAAgB;CACvB,cAAc;CACd,qBAAqB;CACrB,mBAAmB;CACnB,kBAAkB;CAClB,kBAAkB;CAClB,iBAAiB;AACnB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,yBAAyB,QAAQ,0BAA0B;AAC/D,IAAI,gBAAgB,QAAQ,iBAAiB;AAC7C,IAAI,cAAc,QAAQ,eAAe;AACzC,IA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1
|
+
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
6
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
13
14
|
};
|
|
14
15
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: true
|
|
17
|
-
}), mod);
|
|
16
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
17
|
var index_exports = {};
|
|
19
18
|
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("./Button.cjs"), module.exports);
|
|
19
|
+
__reExport(index_exports, require("./Button.cjs"), module.exports);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
11
|
+
get: () => from[key],
|
|
12
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(index_exports);
|
|
21
|
+
__reExport(index_exports, require("./Button.native.js"), module.exports);
|