@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.
Files changed (48) hide show
  1. package/dist/cjs/Button.cjs +180 -266
  2. package/dist/cjs/Button.native.cjs +224 -0
  3. package/dist/cjs/Button.native.js +200 -271
  4. package/dist/cjs/Button.native.js.map +1 -1
  5. package/dist/cjs/index.cjs +10 -11
  6. package/dist/cjs/index.native.cjs +21 -0
  7. package/dist/cjs/index.native.js +10 -10
  8. package/dist/cjs/index.native.js.map +1 -1
  9. package/dist/esm/Button.mjs +168 -255
  10. package/dist/esm/Button.mjs.map +1 -1
  11. package/dist/esm/Button.native.js +188 -261
  12. package/dist/esm/Button.native.js.map +1 -1
  13. package/dist/esm/index.js +1 -2
  14. package/dist/esm/index.mjs +1 -2
  15. package/dist/esm/index.native.js +1 -2
  16. package/dist/jsx/Button.mjs +168 -255
  17. package/dist/jsx/Button.mjs.map +1 -1
  18. package/dist/jsx/Button.native.cjs +224 -0
  19. package/dist/jsx/Button.native.js +200 -271
  20. package/dist/jsx/Button.native.js.map +1 -1
  21. package/dist/jsx/index.js +1 -2
  22. package/dist/jsx/index.mjs +1 -2
  23. package/dist/jsx/index.native.cjs +21 -0
  24. package/dist/jsx/index.native.js +10 -10
  25. package/dist/jsx/index.native.js.map +1 -1
  26. package/package.json +11 -12
  27. package/src/Button.tsx +222 -280
  28. package/types/Button.d.ts +218 -114
  29. package/types/Button.d.ts.map +1 -1
  30. package/dist/cjs/Button.test.cjs +0 -37
  31. package/dist/cjs/Button.test.native.js +0 -40
  32. package/dist/cjs/Button.test.native.js.map +0 -1
  33. package/dist/esm/Button.test.mjs +0 -38
  34. package/dist/esm/Button.test.mjs.map +0 -1
  35. package/dist/esm/Button.test.native.js +0 -38
  36. package/dist/esm/Button.test.native.js.map +0 -1
  37. package/dist/esm/index.js.map +0 -1
  38. package/dist/esm/index.mjs.map +0 -1
  39. package/dist/esm/index.native.js.map +0 -1
  40. package/dist/jsx/Button.test.mjs +0 -38
  41. package/dist/jsx/Button.test.mjs.map +0 -1
  42. package/dist/jsx/Button.test.native.js +0 -40
  43. package/dist/jsx/Button.test.native.js.map +0 -1
  44. package/dist/jsx/index.js.map +0 -1
  45. package/dist/jsx/index.mjs.map +0 -1
  46. package/src/Button.test.tsx +0 -45
  47. package/types/Button.test.d.ts +0 -2
  48. 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
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
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
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
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
- Button: () => Button,
28
- ButtonContext: () => ButtonContext
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 context = (0, import_web.createStyledContext)({
40
- size: void 0,
41
- variant: void 0,
42
- color: void 0,
43
- elevation: void 0,
44
- ellipsis: void 0,
45
- fontFamily: void 0,
46
- fontSize: void 0,
47
- fontStyle: void 0,
48
- fontWeight: void 0,
49
- letterSpacing: void 0,
50
- maxFontSizeMultiplier: void 0,
51
- textAlign: void 0
52
- });
53
- var Frame = (0, import_web.styled)(import_web.View, {
54
- context,
55
- name: "Button",
56
- role: "button",
57
- render: /* @__PURE__ */(0, import_jsx_runtime.jsx)("button", {
58
- type: "button"
59
- }),
60
- tabIndex: 0,
61
- variants: {
62
- unstyled: {
63
- true: {
64
- // reset browser <button> defaults
65
- outlineWidth: 0,
66
- borderWidth: 0,
67
- backgroundColor: "transparent"
68
- },
69
- false: {
70
- size: "$true",
71
- justifyContent: "center",
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 Text = (0, import_web.styled)(import_text.SizableText, {
148
- context,
149
- variants: {
150
- unstyled: {
151
- false: {
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 Icon = function (props) {
169
- var {
170
- children,
171
- scaleIcon = 1,
172
- size
173
- } = props;
174
- var styledContext = context.useStyledContext();
175
- if (!styledContext) {
176
- throw new Error("Button.Icon must be used within a Button");
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 ButtonContext = (0, import_web.createStyledContext)({
188
- size: void 0,
189
- variant: void 0,
190
- color: void 0
191
- });
192
- var ButtonComponent = Frame.styleable(function (propsIn, ref) {
193
- var isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);
194
- var processedProps = (0, import_web.useProps)(propsIn, {
195
- noNormalize: true,
196
- noExpand: true
197
- });
198
- var {
199
- children,
200
- iconSize,
201
- icon,
202
- iconAfter,
203
- scaleIcon = 1,
204
- noTextWrap,
205
- textProps,
206
- color,
207
- ellipsis,
208
- fontFamily,
209
- fontSize,
210
- fontStyle,
211
- fontWeight,
212
- letterSpacing,
213
- maxFontSizeMultiplier,
214
- textAlign,
215
- ...props
216
- } = processedProps;
217
- var size = propsIn.size || (propsIn.unstyled ? void 0 : "$true");
218
- var styledContext = context.useStyledContext();
219
- var _ref;
220
- var contextColor = (_ref = color !== null && color !== void 0 ? color : propsIn.color) !== null && _ref !== void 0 ? _ref : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;
221
- var iconColorProp = contextColor === "unset" || typeof contextColor === "number" ? void 0 : contextColor;
222
- var iconColor = (0, import_helpers_tamagui.useCurrentColor)(iconColorProp);
223
- var _ref1;
224
- var finalSize = (_ref1 = iconSize !== null && iconSize !== void 0 ? iconSize : size) !== null && _ref1 !== void 0 ? _ref1 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size;
225
- var iconSizeNumber = (typeof finalSize === "number" ? finalSize * 0.5 : (0, import_font_size.getFontSize)(finalSize)) * scaleIcon;
226
- var [themedIcon, themedIconAfter] = [icon, iconAfter].map(function (icon2) {
227
- if (!icon2) return null;
228
- return (0, import_helpers_tamagui.getIcon)(icon2, {
229
- size: iconSizeNumber,
230
- color: iconColor
231
- });
232
- });
233
- var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9;
234
- var wrappedChildren = (0, import_text.wrapChildrenInText)(Text, {
235
- children,
236
- color: contextColor,
237
- ellipsis: (_ref2 = ellipsis !== null && ellipsis !== void 0 ? ellipsis : propsIn.ellipsis) !== null && _ref2 !== void 0 ? _ref2 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,
238
- fontFamily: (_ref3 = fontFamily !== null && fontFamily !== void 0 ? fontFamily : propsIn.fontFamily) !== null && _ref3 !== void 0 ? _ref3 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,
239
- fontSize: (_ref4 = fontSize !== null && fontSize !== void 0 ? fontSize : propsIn.fontSize) !== null && _ref4 !== void 0 ? _ref4 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,
240
- fontStyle: (_ref5 = fontStyle !== null && fontStyle !== void 0 ? fontStyle : propsIn.fontStyle) !== null && _ref5 !== void 0 ? _ref5 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,
241
- fontWeight: (_ref6 = fontWeight !== null && fontWeight !== void 0 ? fontWeight : propsIn.fontWeight) !== null && _ref6 !== void 0 ? _ref6 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,
242
- letterSpacing: (_ref7 = letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : propsIn.letterSpacing) !== null && _ref7 !== void 0 ? _ref7 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,
243
- maxFontSizeMultiplier: (_ref8 = maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : propsIn.maxFontSizeMultiplier) !== null && _ref8 !== void 0 ? _ref8 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,
244
- noTextWrap: noTextWrap !== null && noTextWrap !== void 0 ? noTextWrap : propsIn.noTextWrap,
245
- textAlign: (_ref9 = textAlign !== null && textAlign !== void 0 ? textAlign : propsIn.textAlign) !== null && _ref9 !== void 0 ? _ref9 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign,
246
- textProps: textProps !== null && textProps !== void 0 ? textProps : propsIn.textProps
247
- }, {
248
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
249
- size: finalSize !== null && finalSize !== void 0 ? finalSize : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size
250
- });
251
- var _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17;
252
- var textContext = {
253
- color: contextColor,
254
- ellipsis: (_ref10 = ellipsis !== null && ellipsis !== void 0 ? ellipsis : propsIn.ellipsis) !== null && _ref10 !== void 0 ? _ref10 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.ellipsis,
255
- fontFamily: (_ref11 = fontFamily !== null && fontFamily !== void 0 ? fontFamily : propsIn.fontFamily) !== null && _ref11 !== void 0 ? _ref11 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontFamily,
256
- fontSize: (_ref12 = fontSize !== null && fontSize !== void 0 ? fontSize : propsIn.fontSize) !== null && _ref12 !== void 0 ? _ref12 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontSize,
257
- fontStyle: (_ref13 = fontStyle !== null && fontStyle !== void 0 ? fontStyle : propsIn.fontStyle) !== null && _ref13 !== void 0 ? _ref13 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontStyle,
258
- fontWeight: (_ref14 = fontWeight !== null && fontWeight !== void 0 ? fontWeight : propsIn.fontWeight) !== null && _ref14 !== void 0 ? _ref14 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.fontWeight,
259
- letterSpacing: (_ref15 = letterSpacing !== null && letterSpacing !== void 0 ? letterSpacing : propsIn.letterSpacing) !== null && _ref15 !== void 0 ? _ref15 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.letterSpacing,
260
- maxFontSizeMultiplier: (_ref16 = maxFontSizeMultiplier !== null && maxFontSizeMultiplier !== void 0 ? maxFontSizeMultiplier : propsIn.maxFontSizeMultiplier) !== null && _ref16 !== void 0 ? _ref16 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.maxFontSizeMultiplier,
261
- textAlign: (_ref17 = textAlign !== null && textAlign !== void 0 ? textAlign : propsIn.textAlign) !== null && _ref17 !== void 0 ? _ref17 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.textAlign
262
- };
263
- var _props_size, _ref18, _props_variant, _ref19, _props_elevation, _ref20;
264
- var buttonContext = {
265
- ...styledContext,
266
- ...textContext,
267
- size: (_ref18 = (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : propsIn.size) !== null && _ref18 !== void 0 ? _ref18 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size,
268
- variant: (_ref19 = (_props_variant = props.variant) !== null && _props_variant !== void 0 ? _props_variant : propsIn.variant) !== null && _ref19 !== void 0 ? _ref19 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.variant,
269
- elevation: (_ref20 = (_props_elevation = props.elevation) !== null && _props_elevation !== void 0 ? _props_elevation : propsIn.elevation) !== null && _ref20 !== void 0 ? _ref20 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.elevation
270
- };
271
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {
272
- value: true,
273
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(context.Provider, {
274
- ...buttonContext,
275
- children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(Frame, {
276
- ref,
277
- ...props,
278
- ...(isNested && {
279
- render: "span"
280
- }),
281
- // pass resolved size to circular variant when no explicit size provided
282
- ...(props.circular && !propsIn.size && {
283
- size
284
- }),
285
- tabIndex: 0,
286
- children: [themedIcon, wrappedChildren, themedIconAfter]
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 Button = (0, import_web.withStaticProperties)(ButtonComponent, {
292
- Apply: context.Provider,
293
- Frame,
294
- Text,
295
- Icon
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":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","Button_exports","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","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"],"sources":["../../src/Button.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAAsB;AAC/B,IAAAC,gBAAkB,GAAAF,MAAA,CAAAG,wBAAuB;AACzC,IAAAC,iBAAS,GAAAJ,MAAA,CAAsBK,mBAAc;AAE7C,IAAAC,YAAS,GAAAN,MAAa,CAAAO,SAAA,CAAAC,cAA0B;AAEhD,IAAAC,QAAA,GAAAA,CAAAC,MAA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AARwH,MAAqB,cACpBA,MAAA,GAAAtD,aAAA,aAAAA,aAAA,uBAAAA,aAAA,CAAAlE,IAAA;IAACC,OAAA,GAAAyH,MAAA,IAAAD,cAAA,GAAA1D,KAAA,CAAA9D,OAAA,cAAAwH,cAAA,cAAAA,cAAA,GAAA3C,OAAA,CAAA7E,OAAA,cAAAyH,MAAA,cAAAA,MAAA,GAAAxD,aAAA,aAAAA,aAAA,uBAAAA,aAAA,CAAAjE,OAAA;IAAAE,SAAA,GAAAyH,MAAA,IAAAD,gBAAA,GAAA5D,KAAA,CAAA5D,SAAA,cAAAwH,gBAAA,cAAAA,gBAAA,GAAA7C,OAAA,CAAA3E,SAAA,cAAAyH,MAAA,cAAAA,MAAA,GAAA1D,aAAA,aAAAA,aAAA,uBAAAA,aAAA,CAAA/D;EAAA;EACC,OACI,mBAAAd,kBAAA,CAAA4B,GAAA,EAAAvB,aAAA,CAAAwF,oBAAA,CAAA4C,QAAA;IAAA/I,KACC;IAA6BiF,QAE7B,iBAAmB,IAAA3E,kBAAuB,CAAA4B,GAAA,EAAAnB,OAAA,CAAAgI,QAAA;MAC/C,GAAAD,aAAU;MAET7D,QAAA,qBAAA3E,kBAAA,CAAA0I,IAAA,EAAAnH,KAAA;QAAAmE,GAAA;QACA,GAAAhB,KAAA;QACA,IAAAiB,QAAA;UAAAhE,MAAA;QAAA;QAGP;QAEH,IAAA+C,KAAA,CAAArB,QAAA,KAAAoC,OAAA,CAAA9E,IAAA;UAEYA;QACX,CAAO;QACPmB,QAAA;QACA6C,QAAA,GACAgC,UAAA,EACDY,eAAA,E","ignoreList":[]}
1
+ {"version":3,"file":"Button.native.js","names":[],"sources":["jsx/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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C,GAAG,mBAAmB,KAAK,UAAU;EAC9O,MAAM;EACN,UAAU;CACZ,CAAC,IAAI,KAAK;CACV,IAAI,QAAQ;EACV,GAAG;EACH,GAAG,YAAY;GACb,iBAAiB;GACjB,UAAU;GACV,UAAU,CAAC;EACb;EACA,GAAG,mBAAmB,KAAK,IAAI,OAAO,EACpC,QAAQ,eACV;EACA,GAAG,YAAY;GAMb,MAAM;GACN,UAAU,CAAC;GACX,iBAAiB,KAAK;GACtB,UAAU,KAAK;GACf,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,YAAY,KAAK;GACjB,aAAa,KAAK;GAClB,SAAS,KAAK;GACd,WAAW,KAAK;GAChB,SAAS,KAAK;EAChB;EACA,UAA0B,iBAAC,GAAG,mBAAmB,KAAK,cAAc,qBAAqB,UAAU;GACjG,OAAO;GACP,UAA0B,iBAAC,GAAG,mBAAmB,MAAM,cAAc,UAAU;IAC7E,GAAG;IACH,UAAU;KACR;KACA;KACA;IACF;GACF,CAAC;EACH,CAAC;CACH;CACA,OAAO;EACL;EACA;CACF;AACF;AACA,IAAI,mBAAmB,GAAG,WAAW,iBAAiB,aAAa,SAAS,OAAO,OAAO,KAAK;CAC7F,IAAI,EAAE,OAAO,gBAAgB,UAAU,KAAK;CAC5C,OAAuB,iBAAC,GAAG,mBAAmB,KAAK,aAAa;EAC9D;EACA,GAAG;CACL,CAAC;AACH,CAAC;AACD,IAAI,WAAW,GAAG,WAAW,sBAAsB,iBAAiB;CAClE,OAAO,cAAc;CACrB,OAAO;CACP,MAAM;CACN,MAAM;AACR,CAAC"}
package/dist/jsx/index.js CHANGED
@@ -1,2 +1 @@
1
- export * from "./Button.mjs";
2
- //# sourceMappingURL=index.js.map
1
+ export * from "./Button.mjs"
@@ -1,2 +1 @@
1
- export * from "./Button.mjs";
2
- //# sourceMappingURL=index.mjs.map
1
+ export * from "./Button.mjs"
@@ -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);
@@ -1,23 +1,23 @@
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 __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from === "object" || typeof from === "function") {
9
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
10
- get: () => from[key],
11
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
12
- });
13
- }
14
- return to;
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;
15
16
  };
16
17
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
18
- value: true
19
- }), mod);
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
19
  var index_exports = {};
21
20
  module.exports = __toCommonJS(index_exports);
22
21
  __reExport(index_exports, require("./Button.native.js"), module.exports);
22
+
23
23
  //# sourceMappingURL=index.native.js.map