@tamagui/button 2.5.3 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/package.json +12 -12
  2. package/dist/cjs/v1/Button.cjs +0 -268
  3. package/dist/cjs/v1/Button.native.js +0 -273
  4. package/dist/cjs/v1/Button.native.js.map +0 -1
  5. package/dist/cjs/v1/Button.test.cjs +0 -9
  6. package/dist/cjs/v1/Button.test.native.js +0 -12
  7. package/dist/cjs/v1/Button.test.native.js.map +0 -1
  8. package/dist/cjs/v1/index.cjs +0 -20
  9. package/dist/cjs/v1/index.native.js +0 -23
  10. package/dist/cjs/v1/index.native.js.map +0 -1
  11. package/dist/esm/v1/Button.mjs +0 -238
  12. package/dist/esm/v1/Button.mjs.map +0 -1
  13. package/dist/esm/v1/Button.native.js +0 -240
  14. package/dist/esm/v1/Button.native.js.map +0 -1
  15. package/dist/esm/v1/Button.test.mjs +0 -10
  16. package/dist/esm/v1/Button.test.mjs.map +0 -1
  17. package/dist/esm/v1/Button.test.native.js +0 -10
  18. package/dist/esm/v1/Button.test.native.js.map +0 -1
  19. package/dist/esm/v1/index.mjs +0 -2
  20. package/dist/esm/v1/index.mjs.map +0 -1
  21. package/dist/esm/v1/index.native.js +0 -2
  22. package/dist/esm/v1/index.native.js.map +0 -1
  23. package/dist/jsx/v1/Button.mjs +0 -238
  24. package/dist/jsx/v1/Button.mjs.map +0 -1
  25. package/dist/jsx/v1/Button.native.js +0 -273
  26. package/dist/jsx/v1/Button.native.js.map +0 -1
  27. package/dist/jsx/v1/Button.test.mjs +0 -10
  28. package/dist/jsx/v1/Button.test.mjs.map +0 -1
  29. package/dist/jsx/v1/Button.test.native.js +0 -12
  30. package/dist/jsx/v1/Button.test.native.js.map +0 -1
  31. package/dist/jsx/v1/index.mjs +0 -2
  32. package/dist/jsx/v1/index.mjs.map +0 -1
  33. package/dist/jsx/v1/index.native.js +0 -23
  34. package/dist/jsx/v1/index.native.js.map +0 -1
  35. package/src/v1/Button.test.tsx +0 -21
  36. package/src/v1/Button.tsx +0 -342
  37. package/src/v1/index.ts +0 -1
  38. package/types/v1/Button.d.ts +0 -302
  39. package/types/v1/Button.d.ts.map +0 -1
  40. package/types/v1/Button.test.d.ts +0 -2
  41. package/types/v1/Button.test.d.ts.map +0 -1
  42. package/types/v1/index.d.ts +0 -2
  43. package/types/v1/index.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/button",
3
- "version": "2.5.3",
3
+ "version": "2.6.0",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -35,19 +35,19 @@
35
35
  "clean:build": "tamagui-build clean:build"
36
36
  },
37
37
  "dependencies": {
38
- "@tamagui/config-default": "2.5.3",
39
- "@tamagui/core": "2.5.3",
40
- "@tamagui/get-button-sized": "2.5.3",
41
- "@tamagui/helpers": "2.5.3",
42
- "@tamagui/helpers-tamagui": "2.5.3",
43
- "@tamagui/spacer": "2.5.3",
44
- "@tamagui/stacks": "2.5.3",
45
- "@tamagui/text": "2.5.3",
46
- "@tamagui/font-size": "2.5.3",
47
- "@tamagui/web": "2.5.3"
38
+ "@tamagui/config-default": "2.6.0",
39
+ "@tamagui/core": "2.6.0",
40
+ "@tamagui/get-button-sized": "2.6.0",
41
+ "@tamagui/helpers": "2.6.0",
42
+ "@tamagui/helpers-tamagui": "2.6.0",
43
+ "@tamagui/spacer": "2.6.0",
44
+ "@tamagui/stacks": "2.6.0",
45
+ "@tamagui/text": "2.6.0",
46
+ "@tamagui/font-size": "2.6.0",
47
+ "@tamagui/web": "2.6.0"
48
48
  },
49
49
  "devDependencies": {
50
- "@tamagui/build": "2.5.3",
50
+ "@tamagui/build": "2.6.0",
51
51
  "react": ">=19",
52
52
  "vitest": "4.0.4"
53
53
  },
@@ -1,268 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var Button_exports = {};
24
- __export(Button_exports, {
25
- Button: () => Button2,
26
- ButtonContext: () => ButtonContext,
27
- ButtonFrame: () => ButtonFrame,
28
- ButtonIcon: () => ButtonIcon,
29
- ButtonText: () => ButtonText,
30
- useButton: () => useButton
31
- });
32
- module.exports = __toCommonJS(Button_exports);
33
- var import_font_size = require("@tamagui/font-size");
34
- var import_get_button_sized = require("@tamagui/get-button-sized");
35
- var import_helpers = require("@tamagui/helpers");
36
- var import_helpers_tamagui = require("@tamagui/helpers-tamagui");
37
- var import_stacks = require("@tamagui/stacks");
38
- var import_text = require("@tamagui/text");
39
- var import_web = require("@tamagui/web");
40
- var import_react = require("react");
41
- var import_spacer = require("@tamagui/spacer");
42
- var import_jsx_runtime = require("react/jsx-runtime");
43
- const ButtonContext = (0, import_web.createStyledContext)({
44
- // keeping these here means they work with styled() passing down color to text
45
- color: void 0,
46
- ellipsis: void 0,
47
- fontFamily: void 0,
48
- fontSize: void 0,
49
- fontStyle: void 0,
50
- fontWeight: void 0,
51
- letterSpacing: void 0,
52
- maxFontSizeMultiplier: void 0,
53
- size: void 0,
54
- textAlign: void 0,
55
- variant: void 0
56
- });
57
- const BUTTON_NAME = "Button";
58
- const ButtonFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
59
- name: BUTTON_NAME,
60
- render: "button",
61
- context: ButtonContext,
62
- role: "button",
63
- focusable: true,
64
- variants: {
65
- unstyled: {
66
- true: {
67
- // reset browser <button> defaults
68
- outlineWidth: 0,
69
- borderWidth: 0,
70
- backgroundColor: "transparent"
71
- },
72
- false: {
73
- size: "$true",
74
- justifyContent: "center",
75
- alignItems: "center",
76
- flexWrap: "nowrap",
77
- flexDirection: "row",
78
- cursor: "pointer",
79
- hoverTheme: true,
80
- pressTheme: true,
81
- backgroundColor: "$background",
82
- borderWidth: 1,
83
- borderColor: "transparent",
84
- focusVisibleStyle: {
85
- outlineColor: "$outlineColor",
86
- outlineStyle: "solid",
87
- outlineWidth: 2
88
- }
89
- }
90
- },
91
- variant: {
92
- outlined: {
93
- backgroundColor: "transparent",
94
- borderWidth: 2,
95
- borderColor: "$borderColor",
96
- hoverStyle: {
97
- backgroundColor: "transparent",
98
- borderColor: "$borderColorHover"
99
- },
100
- pressStyle: {
101
- backgroundColor: "transparent",
102
- borderColor: "$borderColorPress"
103
- },
104
- focusVisibleStyle: {
105
- backgroundColor: "transparent",
106
- borderColor: "$borderColorFocus"
107
- }
108
- }
109
- },
110
- size: {
111
- "...size": import_get_button_sized.getButtonSized,
112
- ":number": import_get_button_sized.getButtonSized
113
- },
114
- disabled: {
115
- true: {
116
- pointerEvents: "none"
117
- }
118
- }
119
- },
120
- defaultVariants: {
121
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
122
- }
123
- });
124
- const ButtonText = (0, import_web.styled)(import_text.SizableText, {
125
- name: "Button",
126
- context: ButtonContext,
127
- variants: {
128
- unstyled: {
129
- false: {
130
- userSelect: "none",
131
- cursor: "pointer",
132
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
133
- flexGrow: 0,
134
- flexShrink: 1,
135
- ellipsis: true,
136
- color: "$color"
137
- }
138
- }
139
- },
140
- defaultVariants: {
141
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
142
- }
143
- });
144
- const ButtonIcon = props => {
145
- const {
146
- children,
147
- scaleIcon = 1
148
- } = props;
149
- const {
150
- size,
151
- color
152
- } = (0, import_react.useContext)(ButtonContext);
153
- const iconSize = (typeof size === "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size)) * scaleIcon;
154
- const getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
155
- size: iconSize,
156
- color
157
- });
158
- return getThemedIcon(children);
159
- };
160
- const ButtonComponent = ButtonFrame.styleable(function Button(props, ref) {
161
- const {
162
- props: buttonProps
163
- } = useButton(props);
164
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ButtonFrame, {
165
- "data-disable-theme": true,
166
- ...buttonProps,
167
- ref
168
- });
169
- });
170
- const Button2 = (0, import_helpers.withStaticProperties)(ButtonComponent, {
171
- Text: ButtonText,
172
- Icon: ButtonIcon
173
- });
174
- function useButton({
175
- textProps,
176
- ...propsIn
177
- }, {
178
- Text = Button2.Text
179
- } = {
180
- Text: Button2.Text
181
- }) {
182
- const isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);
183
- const propsActive = (0, import_web.useProps)(propsIn, {
184
- noNormalize: true,
185
- noExpand: true
186
- });
187
- const {
188
- icon,
189
- iconAfter,
190
- gap,
191
- spaceFlex,
192
- scaleIcon = 1,
193
- scaleSpace = 0.66,
194
- noTextWrap,
195
- fontFamily,
196
- fontSize,
197
- fontWeight,
198
- fontStyle,
199
- letterSpacing,
200
- render,
201
- ellipsis,
202
- maxFontSizeMultiplier,
203
- ...restProps
204
- } = propsActive;
205
- const size = propsActive.size || (propsActive.unstyled ? void 0 : "$true");
206
- const color = propsActive.color;
207
- const iconSize = (typeof size === "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size, {
208
- font: fontFamily?.[0] === "$" ? fontFamily : void 0
209
- })) * scaleIcon;
210
- const getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
211
- size: iconSize,
212
- color
213
- });
214
- const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon);
215
- const spaceSize = gap ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace;
216
- const contents = noTextWrap ? [propsIn.children] : (0, import_text.wrapChildrenInText)(Text, {
217
- children: propsIn.children,
218
- fontFamily,
219
- fontSize,
220
- textProps,
221
- fontWeight,
222
- fontStyle,
223
- letterSpacing,
224
- ellipsis,
225
- maxFontSizeMultiplier
226
- }, Text === ButtonText && propsActive.unstyled !== true ? {
227
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
228
- size
229
- } : void 0);
230
- const inner = (0, import_spacer.spacedChildren)({
231
- // a bit arbitrary but scaling to font size is necessary so long as button does
232
- space: spaceSize,
233
- spaceFlex,
234
- ensureKeys: true,
235
- direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
236
- // for keys to stay the same we keep indices as similar a possible
237
- // so even if icons are undefined we still pass them
238
- children: [themedIcon, ...contents, themedIconAfter]
239
- });
240
- const props = {
241
- size,
242
- ...(propsIn.disabled && {
243
- // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
244
- focusable: void 0,
245
- // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
246
- focusVisibleStyle: {
247
- borderColor: "$background"
248
- }
249
- }),
250
- // fixes SSR issue + DOM nesting issue of not allowing button in button
251
- render: render ?? (isNested ? "span" :
252
- // defaults to <a /> when accessibilityRole = link
253
- // see https://github.com/tamagui/tamagui/issues/505
254
- propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"),
255
- ...restProps,
256
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {
257
- value: true,
258
- children: inner
259
- }),
260
- // forces it to be a runtime pressStyle so it passes through context text colors
261
- disableClassName: true
262
- };
263
- return {
264
- spaceSize,
265
- isNested,
266
- props
267
- };
268
- }
@@ -1,273 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
12
- };
13
- 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;
21
- };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
25
- var Button_exports = {};
26
- __export(Button_exports, {
27
- Button: () => Button2,
28
- ButtonContext: () => ButtonContext,
29
- ButtonFrame: () => ButtonFrame,
30
- ButtonIcon: () => ButtonIcon,
31
- ButtonText: () => ButtonText,
32
- useButton: () => useButton
33
- });
34
- module.exports = __toCommonJS(Button_exports);
35
- var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_font_size = require("@tamagui/font-size");
37
- var import_get_button_sized = require("@tamagui/get-button-sized");
38
- var import_helpers = require("@tamagui/helpers");
39
- var import_helpers_tamagui = require("@tamagui/helpers-tamagui");
40
- var import_stacks = require("@tamagui/stacks");
41
- var import_text = require("@tamagui/text");
42
- var import_web = require("@tamagui/web");
43
- var import_react = require("react");
44
- var import_spacer = require("@tamagui/spacer");
45
- var ButtonContext = (0, import_web.createStyledContext)({
46
- // keeping these here means they work with styled() passing down color to text
47
- color: void 0,
48
- ellipsis: void 0,
49
- fontFamily: void 0,
50
- fontSize: void 0,
51
- fontStyle: void 0,
52
- fontWeight: void 0,
53
- letterSpacing: void 0,
54
- maxFontSizeMultiplier: void 0,
55
- size: void 0,
56
- textAlign: void 0,
57
- variant: void 0
58
- });
59
- var BUTTON_NAME = "Button";
60
- var ButtonFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
61
- name: BUTTON_NAME,
62
- render: "button",
63
- context: ButtonContext,
64
- role: "button",
65
- focusable: true,
66
- variants: {
67
- unstyled: {
68
- true: {
69
- // reset browser <button> defaults
70
- outlineWidth: 0,
71
- borderWidth: 0,
72
- backgroundColor: "transparent"
73
- },
74
- false: {
75
- size: "$true",
76
- justifyContent: "center",
77
- alignItems: "center",
78
- flexWrap: "nowrap",
79
- flexDirection: "row",
80
- cursor: "pointer",
81
- hoverTheme: true,
82
- pressTheme: true,
83
- backgroundColor: "$background",
84
- borderWidth: 1,
85
- borderColor: "transparent",
86
- focusVisibleStyle: {
87
- outlineColor: "$outlineColor",
88
- outlineStyle: "solid",
89
- outlineWidth: 2
90
- }
91
- }
92
- },
93
- variant: {
94
- outlined: {
95
- backgroundColor: "transparent",
96
- borderWidth: 2,
97
- borderColor: "$borderColor",
98
- hoverStyle: {
99
- backgroundColor: "transparent",
100
- borderColor: "$borderColorHover"
101
- },
102
- pressStyle: {
103
- backgroundColor: "transparent",
104
- borderColor: "$borderColorPress"
105
- },
106
- focusVisibleStyle: {
107
- backgroundColor: "transparent",
108
- borderColor: "$borderColorFocus"
109
- }
110
- }
111
- },
112
- size: {
113
- "...size": import_get_button_sized.getButtonSized,
114
- ":number": import_get_button_sized.getButtonSized
115
- },
116
- disabled: {
117
- true: {
118
- pointerEvents: "none"
119
- }
120
- }
121
- },
122
- defaultVariants: {
123
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
124
- }
125
- });
126
- var ButtonText = (0, import_web.styled)(import_text.SizableText, {
127
- name: "Button",
128
- context: ButtonContext,
129
- variants: {
130
- unstyled: {
131
- false: {
132
- userSelect: "none",
133
- cursor: "pointer",
134
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
135
- flexGrow: 0,
136
- flexShrink: 1,
137
- ellipsis: true,
138
- color: "$color"
139
- }
140
- }
141
- },
142
- defaultVariants: {
143
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
144
- }
145
- });
146
- var ButtonIcon = function (props) {
147
- var {
148
- children,
149
- scaleIcon = 1
150
- } = props;
151
- var {
152
- size,
153
- color
154
- } = (0, import_react.useContext)(ButtonContext);
155
- var iconSize = (typeof size === "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size)) * scaleIcon;
156
- var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
157
- size: iconSize,
158
- color
159
- });
160
- return getThemedIcon(children);
161
- };
162
- var ButtonComponent = ButtonFrame.styleable(function Button(props, ref) {
163
- var {
164
- props: buttonProps
165
- } = useButton(props);
166
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ButtonFrame, {
167
- "data-disable-theme": true,
168
- ...buttonProps,
169
- ref
170
- });
171
- });
172
- var Button2 = (0, import_helpers.withStaticProperties)(ButtonComponent, {
173
- Text: ButtonText,
174
- Icon: ButtonIcon
175
- });
176
- function useButton(param) {
177
- var {
178
- textProps,
179
- ...propsIn
180
- } = param,
181
- {
182
- Text = Button2.Text
183
- } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
184
- Text: Button2.Text
185
- };
186
- var isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext);
187
- var propsActive = (0, import_web.useProps)(propsIn, {
188
- noNormalize: true,
189
- noExpand: true
190
- });
191
- var {
192
- icon,
193
- iconAfter,
194
- gap,
195
- spaceFlex,
196
- scaleIcon = 1,
197
- scaleSpace = 0.66,
198
- noTextWrap,
199
- fontFamily,
200
- fontSize,
201
- fontWeight,
202
- fontStyle,
203
- letterSpacing,
204
- render,
205
- ellipsis,
206
- maxFontSizeMultiplier,
207
- ...restProps
208
- } = propsActive;
209
- var size = propsActive.size || (propsActive.unstyled ? void 0 : "$true");
210
- var color = propsActive.color;
211
- var iconSize = (typeof size === "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size, {
212
- font: (fontFamily === null || fontFamily === void 0 ? void 0 : fontFamily[0]) === "$" ? fontFamily : void 0
213
- })) * scaleIcon;
214
- var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
215
- size: iconSize,
216
- color
217
- });
218
- var [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon);
219
- var spaceSize = gap !== null && gap !== void 0 ? gap : (0, import_web.getVariableValue)(iconSize) * scaleSpace;
220
- var contents = noTextWrap ? [propsIn.children] : (0, import_text.wrapChildrenInText)(Text, {
221
- children: propsIn.children,
222
- fontFamily,
223
- fontSize,
224
- textProps,
225
- fontWeight,
226
- fontStyle,
227
- letterSpacing,
228
- ellipsis,
229
- maxFontSizeMultiplier
230
- }, Text === ButtonText && propsActive.unstyled !== true ? {
231
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
232
- size
233
- } : void 0);
234
- var inner = (0, import_spacer.spacedChildren)({
235
- // a bit arbitrary but scaling to font size is necessary so long as button does
236
- space: spaceSize,
237
- spaceFlex,
238
- ensureKeys: true,
239
- direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
240
- // for keys to stay the same we keep indices as similar a possible
241
- // so even if icons are undefined we still pass them
242
- children: [themedIcon, ...contents, themedIconAfter]
243
- });
244
- var props = {
245
- size,
246
- ...(propsIn.disabled && {
247
- // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
248
- focusable: void 0,
249
- // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
250
- focusVisibleStyle: {
251
- borderColor: "$background"
252
- }
253
- }),
254
- // fixes SSR issue + DOM nesting issue of not allowing button in button
255
- render: render !== null && render !== void 0 ? render : isNested ? "span" :
256
- // defaults to <a /> when accessibilityRole = link
257
- // see https://github.com/tamagui/tamagui/issues/505
258
- propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button",
259
- ...restProps,
260
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {
261
- value: true,
262
- children: inner
263
- }),
264
- // forces it to be a runtime pressStyle so it passes through context text colors
265
- disableClassName: true
266
- };
267
- return {
268
- spaceSize,
269
- isNested,
270
- props
271
- };
272
- }
273
- //# sourceMappingURL=Button.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","Button_exports","__export","Button","Button2","ButtonContext","ButtonFrame","ButtonIcon","ButtonText","useButton","module","exports","import_jsx_runtime","require","import_font_size","import_get_button_sized","import_helpers","import_helpers_tamagui","import_stacks","import_text","import_web","import_react","import_spacer","createStyledContext","color","ellipsis","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","maxFontSizeMultiplier","size","textAlign","variant","BUTTON_NAME","styled","ThemeableStack","name","render","context","role","focusable","variants","unstyled","true","outlineWidth","borderWidth","backgroundColor","false","justifyContent","alignItems","flexWrap","flexDirection","cursor","hoverTheme","pressTheme","borderColor","focusVisibleStyle","outlineColor","outlineStyle","outlined","hoverStyle","pressStyle","getButtonSized","disabled","pointerEvents","defaultVariants","process","env","TAMAGUI_HEADLESS","SizableText","userSelect","flexGrow","flexShrink","props","children","scaleIcon","useContext","iconSize","getFontSize","getThemedIcon","useGetThemedIcon","ButtonComponent","styleable","ref","buttonProps","jsx","withStaticProperties","Text","Icon","param","textProps","propsIn","arguments","length","isNested","ButtonNestingContext","propsActive","useProps","noNormalize","noExpand","icon","iconAfter","gap","spaceFlex","scaleSpace","noTextWrap","restProps","font","themedIcon","themedIconAfter","map","spaceSize","getVariableValue","contents","wrapChildrenInText","inner","spacedChildren","space","ensureKeys","direction","accessibilityRole","Provider","disableClassName"],"sources":["../../../src/v1/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,KAAAC,OAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAA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MACA;MAAwBgB,iBAAA;QAEtBD,WAAW;MAAA;IAAA;IAEQ;IACJlB,MACf,EAAAA,MAAA,aAAAA,MAAA,cAAAA,MAAA,GAAAyD,QAAA;IACF;IAAA;IAEAE,WACE,CAAAwB,iBAEI,eAAAxB,WAAA,CAAAzD,IAAA;IAAA,GAAAmE,SAAA;IAAAhC,QAGA,iBAAY,IAAAhE,kBAAgC,CAAA2E,GAAA,EAAArE,aAAqB,CAAA+E,oBAE/D,CAAA0B,QAAA;MAAA3H,KAAA;MAER4E,QAAG,EAAAyC;IAEH;IACqD;IAGrDO,gBAAA,EAAkB;EACpB;EAEA,OAAO;IACLX,SAAA;IACAjB,QAAA;IACArB;EACF;AACF","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- var import_config_default = require("@tamagui/config-default");
2
- var import_core = require("@tamagui/core");
3
- var import_vitest = require("vitest");
4
- const conf = (0, import_core.createTamagui)((0, import_config_default.getDefaultTamaguiConfig)());
5
- (0, import_vitest.describe)("Button", () => {
6
- (0, import_vitest.test)(`123`, () => {
7
- (0, import_vitest.expect)(true).toBeTruthy();
8
- });
9
- });
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- var import_config_default = require("@tamagui/config-default");
4
- var import_core = require("@tamagui/core");
5
- var import_vitest = require("vitest");
6
- var conf = (0, import_core.createTamagui)((0, import_config_default.getDefaultTamaguiConfig)());
7
- (0, import_vitest.describe)("Button", function () {
8
- (0, import_vitest.test)(`123`, function () {
9
- (0, import_vitest.expect)(true).toBeTruthy();
10
- });
11
- });
12
- //# sourceMappingURL=Button.test.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["import_config_default","require","import_core","import_vitest","conf","createTamagui","getDefaultTamaguiConfig","describe","test","expect","toBeTruthy"],"sources":["../../../src/v1/Button.test.tsx"],"sourcesContent":[null],"mappings":"AAAA;;AACA,IAAAA,qBAA8B,GAAAC,OAAA;AAC9B,IAAAC,WAAA,GAAAD,OAAuC;AAEvC,IAAAE,aAAa,GAAAF,OAAA;AAAuC,IAEpDG,IAAA,OAAAF,WAAA,CAAAG,aAAmB,IAAM,EAAAL,qBAAA,CAAAM,uBAAA;AACvB,IAAAH,aAAA,CAAAI,QAAK,UAAO,cAAM;EAChB,IAAAJ,aAAA,CAAAK,IAAA,OAAO,cAAM;IACd,IAAAL,aAAA,CAAAM,MAAA,QAAAC,UAAA;EAWF","ignoreList":[]}
@@ -1,20 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
8
- get: () => from[key],
9
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
10
- });
11
- }
12
- return to;
13
- };
14
- 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);
18
- var v1_exports = {};
19
- module.exports = __toCommonJS(v1_exports);
20
- __reExport(v1_exports, require("./Button.cjs"), module.exports);
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- 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;
15
- };
16
- 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);
20
- var v1_exports = {};
21
- module.exports = __toCommonJS(v1_exports);
22
- __reExport(v1_exports, require("./Button.native.js"), module.exports);
23
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","v1_exports","module","exports"],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,UAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,UAAA","ignoreList":[]}