@tamagui/button 1.135.4-1761749240853 → 1.135.4

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.
@@ -1,25 +1,18 @@
1
1
  "use strict";
2
-
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: !0 });
9
+ }, __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from == "object" || typeof from == "function")
11
+ for (let key of __getOwnPropNames(from))
12
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ return to;
14
+ };
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
16
  var Button_exports = {};
24
17
  __export(Button_exports, {
25
18
  Button: () => Button2,
@@ -30,238 +23,195 @@ __export(Button_exports, {
30
23
  useButton: () => useButton
31
24
  });
32
25
  module.exports = __toCommonJS(Button_exports);
33
- var import_jsx_runtime = require("react/jsx-runtime"),
34
- import_font_size = require("@tamagui/font-size"),
35
- import_get_button_sized = require("@tamagui/get-button-sized"),
36
- import_helpers = require("@tamagui/helpers"),
37
- import_helpers_tamagui = require("@tamagui/helpers-tamagui"),
38
- import_stacks = require("@tamagui/stacks"),
39
- import_text = require("@tamagui/text"),
40
- import_web = require("@tamagui/web"),
41
- import_react = require("react"),
42
- ButtonContext = (0, import_web.createStyledContext)({
43
- // keeping these here means they work with styled() passing down color to text
44
- color: void 0,
45
- ellipse: void 0,
46
- fontFamily: void 0,
47
- fontSize: void 0,
48
- fontStyle: void 0,
49
- fontWeight: void 0,
50
- letterSpacing: void 0,
51
- maxFontSizeMultiplier: void 0,
52
- size: void 0,
53
- textAlign: void 0,
54
- variant: void 0
55
- }),
56
- BUTTON_NAME = "Button",
57
- ButtonFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
58
- name: BUTTON_NAME,
59
- tag: "button",
60
- context: ButtonContext,
61
- role: "button",
62
- focusable: !0,
63
- variants: {
64
- unstyled: {
65
- false: {
66
- size: "$true",
67
- justifyContent: "center",
68
- alignItems: "center",
69
- flexWrap: "nowrap",
70
- flexDirection: "row",
71
- cursor: "pointer",
72
- hoverTheme: !0,
73
- pressTheme: !0,
74
- backgrounded: !0,
75
- borderWidth: 1,
76
- borderColor: "transparent",
77
- focusVisibleStyle: {
78
- outlineColor: "$outlineColor",
79
- outlineStyle: "solid",
80
- outlineWidth: 2
81
- }
26
+ var import_jsx_runtime = require("react/jsx-runtime"), import_font_size = require("@tamagui/font-size"), import_get_button_sized = require("@tamagui/get-button-sized"), import_helpers = require("@tamagui/helpers"), import_helpers_tamagui = require("@tamagui/helpers-tamagui"), import_stacks = require("@tamagui/stacks"), import_text = require("@tamagui/text"), import_web = require("@tamagui/web"), import_react = require("react"), ButtonContext = (0, import_web.createStyledContext)({
27
+ // keeping these here means they work with styled() passing down color to text
28
+ color: void 0,
29
+ ellipse: void 0,
30
+ fontFamily: void 0,
31
+ fontSize: void 0,
32
+ fontStyle: void 0,
33
+ fontWeight: void 0,
34
+ letterSpacing: void 0,
35
+ maxFontSizeMultiplier: void 0,
36
+ size: void 0,
37
+ textAlign: void 0,
38
+ variant: void 0
39
+ }), BUTTON_NAME = "Button", ButtonFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
40
+ name: BUTTON_NAME,
41
+ tag: "button",
42
+ context: ButtonContext,
43
+ role: "button",
44
+ focusable: !0,
45
+ variants: {
46
+ unstyled: {
47
+ false: {
48
+ size: "$true",
49
+ justifyContent: "center",
50
+ alignItems: "center",
51
+ flexWrap: "nowrap",
52
+ flexDirection: "row",
53
+ cursor: "pointer",
54
+ hoverTheme: !0,
55
+ pressTheme: !0,
56
+ backgrounded: !0,
57
+ borderWidth: 1,
58
+ borderColor: "transparent",
59
+ focusVisibleStyle: {
60
+ outlineColor: "$outlineColor",
61
+ outlineStyle: "solid",
62
+ outlineWidth: 2
82
63
  }
83
- },
84
- variant: {
85
- outlined: {
64
+ }
65
+ },
66
+ variant: {
67
+ outlined: {
68
+ backgroundColor: "transparent",
69
+ borderWidth: 2,
70
+ borderColor: "$borderColor",
71
+ hoverStyle: {
86
72
  backgroundColor: "transparent",
87
- borderWidth: 2,
88
- borderColor: "$borderColor",
89
- hoverStyle: {
90
- backgroundColor: "transparent",
91
- borderColor: "$borderColorHover"
92
- },
93
- pressStyle: {
94
- backgroundColor: "transparent",
95
- borderColor: "$borderColorPress"
96
- },
97
- focusVisibleStyle: {
98
- backgroundColor: "transparent",
99
- borderColor: "$borderColorFocus"
100
- }
101
- }
102
- },
103
- size: {
104
- "...size": import_get_button_sized.getButtonSized,
105
- ":number": import_get_button_sized.getButtonSized
106
- },
107
- disabled: {
108
- true: {
109
- pointerEvents: "none"
73
+ borderColor: "$borderColorHover"
74
+ },
75
+ pressStyle: {
76
+ backgroundColor: "transparent",
77
+ borderColor: "$borderColorPress"
78
+ },
79
+ focusVisibleStyle: {
80
+ backgroundColor: "transparent",
81
+ borderColor: "$borderColorFocus"
110
82
  }
111
83
  }
112
84
  },
113
- defaultVariants: {
114
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
85
+ size: {
86
+ "...size": import_get_button_sized.getButtonSized,
87
+ ":number": import_get_button_sized.getButtonSized
88
+ },
89
+ disabled: {
90
+ true: {
91
+ pointerEvents: "none"
92
+ }
115
93
  }
116
- }),
117
- ButtonText = (0, import_web.styled)(import_text.SizableText, {
118
- name: "Button",
119
- context: ButtonContext,
120
- variants: {
121
- unstyled: {
122
- false: {
123
- userSelect: "none",
124
- cursor: "pointer",
125
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
126
- flexGrow: 0,
127
- flexShrink: 1,
128
- ellipse: !0,
129
- color: "$color"
130
- }
94
+ },
95
+ defaultVariants: {
96
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
97
+ }
98
+ }), ButtonText = (0, import_web.styled)(import_text.SizableText, {
99
+ name: "Button",
100
+ context: ButtonContext,
101
+ variants: {
102
+ unstyled: {
103
+ false: {
104
+ userSelect: "none",
105
+ cursor: "pointer",
106
+ // flexGrow 1 leads to inconsistent native style where text pushes to start of view
107
+ flexGrow: 0,
108
+ flexShrink: 1,
109
+ ellipse: !0,
110
+ color: "$color"
131
111
  }
132
- },
133
- defaultVariants: {
134
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
135
112
  }
136
- }),
137
- ButtonIcon = function (props) {
138
- var {
139
- children,
140
- scaleIcon = 1
141
- } = props,
142
- {
143
- size,
144
- color
145
- } = (0, import_react.useContext)(ButtonContext),
146
- iconSize = (typeof size == "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size)) * scaleIcon,
147
- getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
148
- size: iconSize,
149
- color
150
- });
151
- return getThemedIcon(children);
152
113
  },
153
- ButtonComponent = ButtonFrame.styleable(function (props, ref) {
154
- var {
155
- props: buttonProps
156
- } = useButton(props);
157
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ButtonFrame, {
158
- "data-disable-theme": !0,
159
- ...buttonProps,
160
- ref
161
- });
162
- }),
163
- Button2 = (0, import_helpers.withStaticProperties)(ButtonComponent, {
164
- Text: ButtonText,
165
- Icon: ButtonIcon
114
+ defaultVariants: {
115
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
116
+ }
117
+ }), ButtonIcon = function(props) {
118
+ var { children, scaleIcon = 1 } = props, { size, color } = (0, import_react.useContext)(ButtonContext), iconSize = (typeof size == "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size)) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
119
+ size: iconSize,
120
+ color
121
+ });
122
+ return getThemedIcon(children);
123
+ }, ButtonComponent = ButtonFrame.styleable(function(props, ref) {
124
+ var { props: buttonProps } = useButton(props);
125
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ButtonFrame, {
126
+ "data-disable-theme": !0,
127
+ ...buttonProps,
128
+ ref
166
129
  });
130
+ }), Button2 = (0, import_helpers.withStaticProperties)(ButtonComponent, {
131
+ Text: ButtonText,
132
+ Icon: ButtonIcon
133
+ });
167
134
  function useButton(param) {
168
- var {
169
- textProps,
170
- ...propsIn
171
- } = param,
172
- {
173
- Text = Button2.Text
174
- } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
175
- Text: Button2.Text
135
+ var { textProps, ...propsIn } = param, { Text = Button2.Text } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
136
+ Text: Button2.Text
137
+ }, isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext), propsActive = (0, import_web.useProps)(propsIn, {
138
+ noNormalize: !0,
139
+ noExpand: !0
140
+ }), { icon, iconAfter, space, spaceFlex, scaleIcon = 1, scaleSpace = 0.66, separator, noTextWrap, fontFamily, fontSize, fontWeight, fontStyle, letterSpacing, tag, ellipse, maxFontSizeMultiplier, ...restProps } = propsActive, size = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size == "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size, {
141
+ font: (fontFamily == null ? void 0 : fontFamily[0]) === "$" ? fontFamily : void 0
142
+ })) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
143
+ size: iconSize,
144
+ color
145
+ }), [themedIcon, themedIconAfter] = [
146
+ icon,
147
+ iconAfter
148
+ ].map(getThemedIcon), spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace, contents = noTextWrap ? [
149
+ propsIn.children
150
+ ] : (0, import_text.wrapChildrenInText)(Text, {
151
+ children: propsIn.children,
152
+ color,
153
+ fontFamily,
154
+ fontSize,
155
+ textProps,
156
+ fontWeight,
157
+ fontStyle,
158
+ letterSpacing,
159
+ ellipse,
160
+ maxFontSizeMultiplier
161
+ }, Text === ButtonText && propsActive.unstyled !== !0 ? {
162
+ unstyled: process.env.TAMAGUI_HEADLESS === "1",
163
+ size
164
+ } : void 0), inner = (0, import_web.spacedChildren)({
165
+ // a bit arbitrary but scaling to font size is necessary so long as button does
166
+ space: spaceSize === !1 ? 0 : spaceSize == !0 ? "$true" : spaceSize,
167
+ spaceFlex,
168
+ ensureKeys: !0,
169
+ separator,
170
+ direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
171
+ // for keys to stay the same we keep indices as similar a possible
172
+ // so even if icons are undefined we still pass them
173
+ children: [
174
+ themedIcon,
175
+ ...contents,
176
+ themedIconAfter
177
+ ]
178
+ }), props = {
179
+ size,
180
+ ...propsIn.disabled && {
181
+ // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
182
+ focusable: void 0,
183
+ // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
184
+ focusVisibleStyle: {
185
+ borderColor: "$background"
186
+ }
176
187
  },
177
- isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext),
178
- propsActive = (0, import_web.useProps)(propsIn, {
179
- noNormalize: !0,
180
- noExpand: !0
181
- }),
182
- {
183
- icon,
184
- iconAfter,
185
- space,
186
- spaceFlex,
187
- scaleIcon = 1,
188
- scaleSpace = 0.66,
189
- separator,
190
- noTextWrap,
191
- fontFamily,
192
- fontSize,
193
- fontWeight,
194
- fontStyle,
195
- letterSpacing,
196
- tag,
197
- ellipse,
198
- maxFontSizeMultiplier,
199
- ...restProps
200
- } = propsActive,
201
- size = propsActive.size || (propsActive.unstyled ? void 0 : "$true"),
202
- color = propsActive.color,
203
- iconSize = (typeof size == "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size, {
204
- font: fontFamily?.[0] === "$" ? fontFamily : void 0
205
- })) * scaleIcon,
206
- getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
207
- size: iconSize,
208
- color
209
- }),
210
- [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon),
211
- spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace,
212
- contents = noTextWrap ? [propsIn.children] : (0, import_text.wrapChildrenInText)(Text, {
213
- children: propsIn.children,
214
- color,
215
- fontFamily,
216
- fontSize,
217
- textProps,
218
- fontWeight,
219
- fontStyle,
220
- letterSpacing,
221
- ellipse,
222
- maxFontSizeMultiplier
223
- }, Text === ButtonText && propsActive.unstyled !== !0 ? {
224
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
225
- size
226
- } : void 0),
227
- inner = (0, import_web.spacedChildren)({
228
- // a bit arbitrary but scaling to font size is necessary so long as button does
229
- space: spaceSize === !1 ? 0 : spaceSize == !0 ? "$true" : spaceSize,
230
- spaceFlex,
231
- ensureKeys: !0,
232
- separator,
233
- direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
234
- // for keys to stay the same we keep indices as similar a possible
235
- // so even if icons are undefined we still pass them
236
- children: [themedIcon, ...contents, themedIconAfter]
237
- }),
238
- props = {
239
- size,
240
- ...(propsIn.disabled && {
241
- // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
242
- focusable: void 0,
243
- // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
244
- focusVisibleStyle: {
245
- borderColor: "$background"
246
- }
247
- }),
248
- // fixes SSR issue + DOM nesting issue of not allowing button in button
249
- tag: tag ?? (isNested ? "span" :
188
+ // fixes SSR issue + DOM nesting issue of not allowing button in button
189
+ tag: tag ?? (isNested ? "span" : (
250
190
  // defaults to <a /> when accessibilityRole = link
251
191
  // see https://github.com/tamagui/tamagui/issues/505
252
- propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"),
253
- ...restProps,
254
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {
255
- value: !0,
256
- children: inner
257
- }),
258
- // forces it to be a runtime pressStyle so it passes through context text colors
259
- disableClassName: !0
260
- };
192
+ propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"
193
+ )),
194
+ ...restProps,
195
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {
196
+ value: !0,
197
+ children: inner
198
+ }),
199
+ // forces it to be a runtime pressStyle so it passes through context text colors
200
+ disableClassName: !0
201
+ };
261
202
  return {
262
203
  spaceSize,
263
204
  isNested,
264
205
  props
265
206
  };
266
207
  }
267
- //# sourceMappingURL=Button.native.js.map
208
+ // Annotate the CommonJS export names for ESM import in node:
209
+ 0 && (module.exports = {
210
+ Button,
211
+ ButtonContext,
212
+ ButtonFrame,
213
+ ButtonIcon,
214
+ ButtonText,
215
+ useButton
216
+ });
217
+ //# sourceMappingURL=Button.js.map
@@ -1 +1,6 @@
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","createStyledContext","color","ellipse","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","maxFontSizeMultiplier","size","textAlign","variant","BUTTON_NAME","styled","ThemeableStack","name","tag","context","role","focusable","variants","unstyled","false","justifyContent","alignItems","flexWrap","flexDirection","cursor","hoverTheme","pressTheme","backgrounded","borderWidth","borderColor","focusVisibleStyle","outlineColor","outlineStyle","outlineWidth","outlined","backgroundColor","hoverStyle","pressStyle","getButtonSized","disabled","true","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","space","spaceFlex","scaleSpace","separator","noTextWrap","restProps","font","themedIcon","themedIconAfter","map","spaceSize","getVariableValue","contents","wrapChildrenInText","inner","spacedChildren","ensureKeys","direction","accessibilityRole","Provider","disableClassName"],"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,KAAAC,OAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,WAAA,EAAAA,CAAA,KAAAA,WAAA;EAAAC,UAAA,EAAAA,CAAA,KAAAA,UAAA;EAAAC,UAAA,EAAAA,CAAA,KAAAA,UAAA;EAAAC,SAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAf,YAA4B,CAAAK,cAAA;AAoBrB,IAAAW,kBAAM,GAAAC,OAAgB;EAAAC,gBAO3B,GAAAD,OAAA;EAAAE,uBAAA,GAAAF,OAAA;EAAAG,cAAA,GAAAH,OAAA;EAAAI,sBAAA,GAAAJ,OAAA;EAAAK,aAAA,GAAAL,OAAA;EAAAM,WAAA,GAAAN,OAAA;EAAAO,UAAA,GAAAP,OAAA;EAAAQ,YAAA,GAAAR,OAAA;EAAAR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aAAa,KAAO,UAAU;AAAA,IAC/D;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA,WAAW,YAAY,kBAAkB,YAAY,YAAY,kBAAkB,mBAAmB,aAAa;AAAA;AAAA;AAAA,IAGnH,UAAU;AAAA,MACN;AAAA,MACA,GAAG;AAAA,MACH;AAAA,IACJ;AAAA,EACJ,CAAC,GACG,QAAQ;AAAA,IACR;AAAA,IACA,GAAG,QAAQ,YAAY;AAAA;AAAA,MAEnB,WAAW;AAAA;AAAA,MAEX,mBAAmB;AAAA,QACf,aAAa;AAAA,MACjB;AAAA,IACJ;AAAA;AAAA,IAEA,KAAK,QAAuC,WAAW;AAAA;AAAA;AAAA,MAEvD,YAAY,sBAAsB,UAAU,YAAY,SAAS,SAAS,MAAM;AAAA;AAAA,IAChF,GAAG;AAAA,IACH,UAAwB,uCAAAC,KAAK,mCAAqB,UAAU;AAAA,MACxD,OAAO;AAAA,MACP,UAAU;AAAA,IACd,CAAC;AAAA;AAAA,IAED,kBAAkB;AAAA,EACtB;AACA,SAAO;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AACJ;",
5
+ "names": ["Button", "_jsx"]
6
+ }
@@ -1,12 +1,8 @@
1
1
  "use strict";
2
-
3
- var import_config_default = require("@tamagui/config-default"),
4
- import_core = require("@tamagui/core"),
5
- import_vitest = require("vitest"),
6
- conf = (0, import_core.createTamagui)((0, import_config_default.getDefaultTamaguiConfig)());
7
- (0, import_vitest.describe)("Button", function () {
8
- (0, import_vitest.test)("123", function () {
2
+ var import_config_default = require("@tamagui/config-default"), import_core = require("@tamagui/core"), import_vitest = require("vitest"), conf = (0, import_core.createTamagui)((0, import_config_default.getDefaultTamaguiConfig)());
3
+ (0, import_vitest.describe)("Button", function() {
4
+ (0, import_vitest.test)("123", function() {
9
5
  (0, import_vitest.expect)(!0).toBeTruthy();
10
6
  });
11
7
  });
12
- //# sourceMappingURL=Button.test.native.js.map
8
+ //# sourceMappingURL=Button.test.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["import_config_default","require","import_core","import_vitest","conf","createTamagui","getDefaultTamaguiConfig","describe","test","expect","toBeTruthy"],"sources":["../../src/Button.test.tsx"],"sourcesContent":[null],"mappings":"AAAA;;AAIA,IAAAA,qBAAa,GAAAC,OAAA,0BAAc;EAAAC,WAAA,GAAAD,OAAA,gBAAyB;EAAAE,aAAA,GAAAF,OAAA;EAAAG,IAAA,OAAAF,WAAA,CAAAG,aAAA,MAAAL,qBAAA,CAAAM,uBAAA;AAAA,IAEpDH,aAAA,CAAAI,QAAA,EAAS,UAAU,YAAM;EACvB,IAAAJ,aAAA,CAAAK,IAAA,EAAK,OAAO,YAAM;IAChB,IAAAL,aAAA,CAAAM,MAAA,EAAO,EAAI,EAAEC,UAAA,CAAW;EAC1B,CAAC;AAWH,CAAC","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Button.test.tsx"],
4
+ "mappings": ";AAAA,4BAAwC,oCACxC,cAA8B,0BAC9B,gBAAuC,mBACnC,WAAO,+BAAc,+CAAwB,CAAC;AAAA,IAClD,wBAAS,UAAU,WAAW;AAC1B,0BAAK,OAAO,WAAW;AACnB,8BAAO,EAAI,EAAE,WAAW;AAAA,EAC5B,CAAC;AACL,CAAC;",
5
+ "names": []
6
+ }
@@ -1,21 +1,20 @@
1
1
  "use strict";
2
-
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
6
  var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
17
- }), mod);
7
+ if (from && typeof from == "object" || typeof from == "function")
8
+ for (let key of __getOwnPropNames(from))
9
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ return to;
11
+ }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
12
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
18
13
  var index_exports = {};
19
14
  module.exports = __toCommonJS(index_exports);
20
- __reExport(index_exports, require("./Button.native.js"), module.exports);
21
- //# sourceMappingURL=index.native.js.map
15
+ __reExport(index_exports, require("./Button"), module.exports);
16
+ // Annotate the CommonJS export names for ESM import in node:
17
+ 0 && (module.exports = {
18
+ ...require("./Button")
19
+ });
20
+ //# sourceMappingURL=index.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,qBAAd;",
5
+ "names": []
6
+ }
@@ -1,267 +1,200 @@
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: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
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_jsx_runtime = require("react/jsx-runtime"),
34
- import_font_size = require("@tamagui/font-size"),
35
- import_get_button_sized = require("@tamagui/get-button-sized"),
36
- import_helpers = require("@tamagui/helpers"),
37
- import_helpers_tamagui = require("@tamagui/helpers-tamagui"),
38
- import_stacks = require("@tamagui/stacks"),
39
- import_text = require("@tamagui/text"),
40
- import_web = require("@tamagui/web"),
41
- import_react = require("react"),
42
- ButtonContext = (0, import_web.createStyledContext)({
43
- // keeping these here means they work with styled() passing down color to text
44
- color: void 0,
45
- ellipse: void 0,
46
- fontFamily: void 0,
47
- fontSize: void 0,
48
- fontStyle: void 0,
49
- fontWeight: void 0,
50
- letterSpacing: void 0,
51
- maxFontSizeMultiplier: void 0,
52
- size: void 0,
53
- textAlign: void 0,
54
- variant: void 0
55
- }),
56
- BUTTON_NAME = "Button",
57
- ButtonFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
58
- name: BUTTON_NAME,
59
- tag: "button",
60
- context: ButtonContext,
61
- role: "button",
62
- focusable: !0,
63
- variants: {
64
- unstyled: {
65
- false: {
66
- size: "$true",
67
- justifyContent: "center",
68
- alignItems: "center",
69
- flexWrap: "nowrap",
70
- flexDirection: "row",
71
- cursor: "pointer",
72
- hoverTheme: !0,
73
- pressTheme: !0,
74
- backgrounded: !0,
75
- borderWidth: 1,
76
- borderColor: "transparent",
77
- focusVisibleStyle: {
78
- outlineColor: "$outlineColor",
79
- outlineStyle: "solid",
80
- outlineWidth: 2
81
- }
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getFontSize } from "@tamagui/font-size";
3
+ import { getButtonSized } from "@tamagui/get-button-sized";
4
+ import { withStaticProperties } from "@tamagui/helpers";
5
+ import { useGetThemedIcon } from "@tamagui/helpers-tamagui";
6
+ import { ButtonNestingContext, ThemeableStack } from "@tamagui/stacks";
7
+ import { SizableText, wrapChildrenInText } from "@tamagui/text";
8
+ import { createStyledContext, getVariableValue, spacedChildren, styled, useProps } from "@tamagui/web";
9
+ import { useContext } from "react";
10
+ var ButtonContext = createStyledContext({
11
+ // keeping these here means they work with styled() passing down color to text
12
+ color: void 0,
13
+ ellipse: void 0,
14
+ fontFamily: void 0,
15
+ fontSize: void 0,
16
+ fontStyle: void 0,
17
+ fontWeight: void 0,
18
+ letterSpacing: void 0,
19
+ maxFontSizeMultiplier: void 0,
20
+ size: void 0,
21
+ textAlign: void 0,
22
+ variant: void 0
23
+ }), BUTTON_NAME = "Button", ButtonFrame = styled(ThemeableStack, {
24
+ name: BUTTON_NAME,
25
+ tag: "button",
26
+ context: ButtonContext,
27
+ role: "button",
28
+ focusable: !0,
29
+ variants: {
30
+ unstyled: {
31
+ false: {
32
+ size: "$true",
33
+ justifyContent: "center",
34
+ alignItems: "center",
35
+ flexWrap: "nowrap",
36
+ flexDirection: "row",
37
+ cursor: "pointer",
38
+ hoverTheme: !0,
39
+ pressTheme: !0,
40
+ backgrounded: !0,
41
+ borderWidth: 1,
42
+ borderColor: "transparent",
43
+ focusVisibleStyle: {
44
+ outlineColor: "$outlineColor",
45
+ outlineStyle: "solid",
46
+ outlineWidth: 2
82
47
  }
83
- },
84
- variant: {
85
- outlined: {
48
+ }
49
+ },
50
+ variant: {
51
+ outlined: {
52
+ backgroundColor: "transparent",
53
+ borderWidth: 2,
54
+ borderColor: "$borderColor",
55
+ hoverStyle: {
86
56
  backgroundColor: "transparent",
87
- borderWidth: 2,
88
- borderColor: "$borderColor",
89
- hoverStyle: {
90
- backgroundColor: "transparent",
91
- borderColor: "$borderColorHover"
92
- },
93
- pressStyle: {
94
- backgroundColor: "transparent",
95
- borderColor: "$borderColorPress"
96
- },
97
- focusVisibleStyle: {
98
- backgroundColor: "transparent",
99
- borderColor: "$borderColorFocus"
100
- }
101
- }
102
- },
103
- size: {
104
- "...size": import_get_button_sized.getButtonSized,
105
- ":number": import_get_button_sized.getButtonSized
106
- },
107
- disabled: {
108
- true: {
109
- pointerEvents: "none"
57
+ borderColor: "$borderColorHover"
58
+ },
59
+ pressStyle: {
60
+ backgroundColor: "transparent",
61
+ borderColor: "$borderColorPress"
62
+ },
63
+ focusVisibleStyle: {
64
+ backgroundColor: "transparent",
65
+ borderColor: "$borderColorFocus"
110
66
  }
111
67
  }
112
68
  },
113
- defaultVariants: {
114
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
69
+ size: {
70
+ "...size": getButtonSized,
71
+ ":number": getButtonSized
72
+ },
73
+ disabled: {
74
+ true: {
75
+ pointerEvents: "none"
76
+ }
115
77
  }
116
- }),
117
- ButtonText = (0, import_web.styled)(import_text.SizableText, {
118
- name: "Button",
119
- context: ButtonContext,
120
- variants: {
121
- unstyled: {
122
- false: {
123
- userSelect: "none",
124
- cursor: "pointer",
125
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
126
- flexGrow: 0,
127
- flexShrink: 1,
128
- ellipse: !0,
129
- color: "$color"
130
- }
78
+ },
79
+ defaultVariants: {
80
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
81
+ }
82
+ }), ButtonText = styled(SizableText, {
83
+ name: "Button",
84
+ context: ButtonContext,
85
+ variants: {
86
+ unstyled: {
87
+ false: {
88
+ userSelect: "none",
89
+ cursor: "pointer",
90
+ // flexGrow 1 leads to inconsistent native style where text pushes to start of view
91
+ flexGrow: 0,
92
+ flexShrink: 1,
93
+ ellipse: !0,
94
+ color: "$color"
131
95
  }
132
- },
133
- defaultVariants: {
134
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
135
96
  }
136
- }),
137
- ButtonIcon = function (props) {
138
- var {
139
- children,
140
- scaleIcon = 1
141
- } = props,
142
- {
143
- size,
144
- color
145
- } = (0, import_react.useContext)(ButtonContext),
146
- iconSize = (typeof size == "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size)) * scaleIcon,
147
- getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
148
- size: iconSize,
149
- color
150
- });
151
- return getThemedIcon(children);
152
97
  },
153
- ButtonComponent = ButtonFrame.styleable(function (props, ref) {
154
- var {
155
- props: buttonProps
156
- } = useButton(props);
157
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ButtonFrame, {
158
- "data-disable-theme": !0,
159
- ...buttonProps,
160
- ref
161
- });
162
- }),
163
- Button2 = (0, import_helpers.withStaticProperties)(ButtonComponent, {
164
- Text: ButtonText,
165
- Icon: ButtonIcon
98
+ defaultVariants: {
99
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
100
+ }
101
+ }), ButtonIcon = function(props) {
102
+ var { children, scaleIcon = 1 } = props, { size, color } = useContext(ButtonContext), iconSize = (typeof size == "number" ? size * 0.5 : getFontSize(size)) * scaleIcon, getThemedIcon = useGetThemedIcon({
103
+ size: iconSize,
104
+ color
105
+ });
106
+ return getThemedIcon(children);
107
+ }, ButtonComponent = ButtonFrame.styleable(function(props, ref) {
108
+ var { props: buttonProps } = useButton(props);
109
+ return /* @__PURE__ */ _jsx(ButtonFrame, {
110
+ "data-disable-theme": !0,
111
+ ...buttonProps,
112
+ ref
166
113
  });
114
+ }), Button2 = withStaticProperties(ButtonComponent, {
115
+ Text: ButtonText,
116
+ Icon: ButtonIcon
117
+ });
167
118
  function useButton(param) {
168
- var {
169
- textProps,
170
- ...propsIn
171
- } = param,
172
- {
173
- Text = Button2.Text
174
- } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
175
- Text: Button2.Text
119
+ var { textProps, ...propsIn } = param, { Text = Button2.Text } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
120
+ Text: Button2.Text
121
+ }, isNested = useContext(ButtonNestingContext), propsActive = useProps(propsIn, {
122
+ noNormalize: !0,
123
+ noExpand: !0
124
+ }), { icon, iconAfter, space, spaceFlex, scaleIcon = 1, scaleSpace = 0.66, separator, noTextWrap, fontFamily, fontSize, fontWeight, fontStyle, letterSpacing, tag, ellipse, maxFontSizeMultiplier, ...restProps } = propsActive, size = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size == "number" ? size * 0.5 : getFontSize(size, {
125
+ font: (fontFamily == null ? void 0 : fontFamily[0]) === "$" ? fontFamily : void 0
126
+ })) * scaleIcon, getThemedIcon = useGetThemedIcon({
127
+ size: iconSize,
128
+ color
129
+ }), [themedIcon, themedIconAfter] = [
130
+ icon,
131
+ iconAfter
132
+ ].map(getThemedIcon), spaceSize = space ?? getVariableValue(iconSize) * scaleSpace, contents = noTextWrap ? [
133
+ propsIn.children
134
+ ] : wrapChildrenInText(Text, {
135
+ children: propsIn.children,
136
+ color,
137
+ fontFamily,
138
+ fontSize,
139
+ textProps,
140
+ fontWeight,
141
+ fontStyle,
142
+ letterSpacing,
143
+ ellipse,
144
+ maxFontSizeMultiplier
145
+ }, Text === ButtonText && propsActive.unstyled !== !0 ? {
146
+ unstyled: process.env.TAMAGUI_HEADLESS === "1",
147
+ size
148
+ } : void 0), inner = spacedChildren({
149
+ // a bit arbitrary but scaling to font size is necessary so long as button does
150
+ space: spaceSize === !1 ? 0 : spaceSize == !0 ? "$true" : spaceSize,
151
+ spaceFlex,
152
+ ensureKeys: !0,
153
+ separator,
154
+ direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
155
+ // for keys to stay the same we keep indices as similar a possible
156
+ // so even if icons are undefined we still pass them
157
+ children: [
158
+ themedIcon,
159
+ ...contents,
160
+ themedIconAfter
161
+ ]
162
+ }), props = {
163
+ size,
164
+ ...propsIn.disabled && {
165
+ // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
166
+ focusable: void 0,
167
+ // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
168
+ focusVisibleStyle: {
169
+ borderColor: "$background"
170
+ }
176
171
  },
177
- isNested = (0, import_react.useContext)(import_stacks.ButtonNestingContext),
178
- propsActive = (0, import_web.useProps)(propsIn, {
179
- noNormalize: !0,
180
- noExpand: !0
181
- }),
182
- {
183
- icon,
184
- iconAfter,
185
- space,
186
- spaceFlex,
187
- scaleIcon = 1,
188
- scaleSpace = 0.66,
189
- separator,
190
- noTextWrap,
191
- fontFamily,
192
- fontSize,
193
- fontWeight,
194
- fontStyle,
195
- letterSpacing,
196
- tag,
197
- ellipse,
198
- maxFontSizeMultiplier,
199
- ...restProps
200
- } = propsActive,
201
- size = propsActive.size || (propsActive.unstyled ? void 0 : "$true"),
202
- color = propsActive.color,
203
- iconSize = (typeof size == "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size, {
204
- font: fontFamily?.[0] === "$" ? fontFamily : void 0
205
- })) * scaleIcon,
206
- getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
207
- size: iconSize,
208
- color
209
- }),
210
- [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon),
211
- spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace,
212
- contents = noTextWrap ? [propsIn.children] : (0, import_text.wrapChildrenInText)(Text, {
213
- children: propsIn.children,
214
- color,
215
- fontFamily,
216
- fontSize,
217
- textProps,
218
- fontWeight,
219
- fontStyle,
220
- letterSpacing,
221
- ellipse,
222
- maxFontSizeMultiplier
223
- }, Text === ButtonText && propsActive.unstyled !== !0 ? {
224
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
225
- size
226
- } : void 0),
227
- inner = (0, import_web.spacedChildren)({
228
- // a bit arbitrary but scaling to font size is necessary so long as button does
229
- space: spaceSize === !1 ? 0 : spaceSize == !0 ? "$true" : spaceSize,
230
- spaceFlex,
231
- ensureKeys: !0,
232
- separator,
233
- direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
234
- // for keys to stay the same we keep indices as similar a possible
235
- // so even if icons are undefined we still pass them
236
- children: [themedIcon, ...contents, themedIconAfter]
237
- }),
238
- props = {
239
- size,
240
- ...(propsIn.disabled && {
241
- // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
242
- focusable: void 0,
243
- // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
244
- focusVisibleStyle: {
245
- borderColor: "$background"
246
- }
247
- }),
248
- // fixes SSR issue + DOM nesting issue of not allowing button in button
249
- tag: tag ?? (isNested ? "span" :
172
+ // fixes SSR issue + DOM nesting issue of not allowing button in button
173
+ tag: tag ?? (isNested ? "span" : (
250
174
  // defaults to <a /> when accessibilityRole = link
251
175
  // see https://github.com/tamagui/tamagui/issues/505
252
- propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"),
253
- ...restProps,
254
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {
255
- value: !0,
256
- children: inner
257
- }),
258
- // forces it to be a runtime pressStyle so it passes through context text colors
259
- disableClassName: !0
260
- };
176
+ propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"
177
+ )),
178
+ ...restProps,
179
+ children: /* @__PURE__ */ _jsx(ButtonNestingContext.Provider, {
180
+ value: !0,
181
+ children: inner
182
+ }),
183
+ // forces it to be a runtime pressStyle so it passes through context text colors
184
+ disableClassName: !0
185
+ };
261
186
  return {
262
187
  spaceSize,
263
188
  isNested,
264
189
  props
265
190
  };
266
191
  }
267
- //# sourceMappingURL=Button.native.js.map
192
+ export {
193
+ Button2 as Button,
194
+ ButtonContext,
195
+ ButtonFrame,
196
+ ButtonIcon,
197
+ ButtonText,
198
+ useButton
199
+ };
200
+ //# sourceMappingURL=Button.js.map
@@ -1 +1,6 @@
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","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","createStyledContext","color","ellipse","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","maxFontSizeMultiplier","size","textAlign","variant","BUTTON_NAME","styled","ThemeableStack","tag","context","role","focusable","variants","unstyled","false","justifyContent","alignItems","flexWrap","flexDirection","cursor","hoverTheme","pressTheme","backgrounded","borderWidth","borderColor","focusVisibleStyle","outlineColor","outlineStyle","outlineWidth","outlined","backgroundColor","hoverStyle","pressStyle","getButtonSized","disabled","true","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","space","spaceFlex","scaleSpace","separator","noTextWrap","restProps","font","themedIcon","themedIconAfter","map","spaceSize","getVariableValue","contents","wrapChildrenInText","inner","spacedChildren","ensureKeys","direction","accessibilityRole","Provider","disableClassName"],"sources":["../../src/Button.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAAsB;AAC/B,IA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AO,UAAU;AAAA,IAC/D;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,IACA,WAAW,YAAY,kBAAkB,YAAY,YAAY,kBAAkB,mBAAmB,aAAa;AAAA;AAAA;AAAA,IAGnH,UAAU;AAAA,MACN;AAAA,MACA,GAAG;AAAA,MACH;AAAA,IACJ;AAAA,EACJ,CAAC,GACG,QAAQ;AAAA,IACR;AAAA,IACA,GAAG,QAAQ,YAAY;AAAA;AAAA,MAEnB,WAAW;AAAA;AAAA,MAEX,mBAAmB;AAAA,QACf,aAAa;AAAA,MACjB;AAAA,IACJ;AAAA;AAAA,IAEA,KAAK,QAAuC,WAAW;AAAA;AAAA;AAAA,MAEvD,YAAY,sBAAsB,UAAU,YAAY,SAAS,SAAS,MAAM;AAAA;AAAA,IAChF,GAAG;AAAA,IACH,UAAwB,qBAAK,qBAAqB,UAAU;AAAA,MACxD,OAAO;AAAA,MACP,UAAU;AAAA,IACd,CAAC;AAAA;AAAA,IAED,kBAAkB;AAAA,EACtB;AACA,SAAO;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AACJ;",
5
+ "names": ["Button"]
6
+ }
@@ -1,12 +1,10 @@
1
- "use strict";
2
-
3
- var import_config_default = require("@tamagui/config-default"),
4
- import_core = require("@tamagui/core"),
5
- import_vitest = require("vitest"),
6
- 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)(!0).toBeTruthy();
1
+ import { getDefaultTamaguiConfig } from "@tamagui/config-default";
2
+ import { createTamagui } from "@tamagui/core";
3
+ import { describe, expect, test } from "vitest";
4
+ var conf = createTamagui(getDefaultTamaguiConfig());
5
+ describe("Button", function() {
6
+ test("123", function() {
7
+ expect(!0).toBeTruthy();
10
8
  });
11
9
  });
12
- //# sourceMappingURL=Button.test.native.js.map
10
+ //# sourceMappingURL=Button.test.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":["import_config_default","require","import_core","import_vitest","conf","createTamagui","getDefaultTamaguiConfig","describe","test","expect","toBeTruthy"],"sources":["../../src/Button.test.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,qBAAS,GAAAC,OAAqB;EAAAC,WAAA,GAAAD,OAAA;EAAAE,aAAA,GAAAF,OAAA;EAAAG,IAAA,OAAAF,WAAA,CAAAG,aAAA,MAAAL,qBAAA,CAAAM,uBAAA;AAC9B,IAAAH,aAAS,CAAAI,QAAU,EAAQ,sBAAY;EAEvC,IAAMJ,aAAO,CAAAK,IAAA,OAAc;IAE3B,IAAAL,aAAmB,CAAAM,MAAM,MAAAC,UAAA;EACvB;AACE","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Button.test.tsx"],
4
+ "mappings": "AAAA,SAAS,+BAA+B;AACxC,SAAS,qBAAqB;AAC9B,SAAS,UAAU,QAAQ,YAAY;AACvC,IAAI,OAAO,cAAc,wBAAwB,CAAC;AAClD,SAAS,UAAU,WAAW;AAC1B,OAAK,OAAO,WAAW;AACnB,WAAO,EAAI,EAAE,WAAW;AAAA,EAC5B,CAAC;AACL,CAAC;",
5
+ "names": []
6
+ }
@@ -1,21 +1,2 @@
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") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
17
- }), mod);
18
- var index_exports = {};
19
- module.exports = __toCommonJS(index_exports);
20
- __reExport(index_exports, require("./Button.native.js"), module.exports);
21
- //# sourceMappingURL=index.native.js.map
1
+ export * from "./Button";
2
+ //# sourceMappingURL=index.js.map
@@ -1 +1,6 @@
1
- {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA","ignoreList":[]}
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "mappings": "AAAA,cAAc;",
5
+ "names": []
6
+ }
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/button",
3
- "version": "1.135.4-1761749240853",
4
- "type": "module",
3
+ "version": "1.135.4",
5
4
  "sideEffects": [
6
5
  "*.css"
7
6
  ],
@@ -37,20 +36,20 @@
37
36
  }
38
37
  },
39
38
  "dependencies": {
40
- "@tamagui/config-default": "1.135.4-1761749240853",
41
- "@tamagui/core": "1.135.4-1761749240853",
42
- "@tamagui/font-size": "1.135.4-1761749240853",
43
- "@tamagui/get-button-sized": "1.135.4-1761749240853",
44
- "@tamagui/helpers": "1.135.4-1761749240853",
45
- "@tamagui/helpers-tamagui": "1.135.4-1761749240853",
46
- "@tamagui/stacks": "1.135.4-1761749240853",
47
- "@tamagui/text": "1.135.4-1761749240853",
48
- "@tamagui/web": "1.135.4-1761749240853"
39
+ "@tamagui/config-default": "1.135.4",
40
+ "@tamagui/core": "1.135.4",
41
+ "@tamagui/font-size": "1.135.4",
42
+ "@tamagui/get-button-sized": "1.135.4",
43
+ "@tamagui/helpers": "1.135.4",
44
+ "@tamagui/helpers-tamagui": "1.135.4",
45
+ "@tamagui/stacks": "1.135.4",
46
+ "@tamagui/text": "1.135.4",
47
+ "@tamagui/web": "1.135.4"
49
48
  },
50
49
  "devDependencies": {
51
- "@tamagui/build": "1.135.4-1761749240853",
50
+ "@tamagui/build": "1.135.4",
52
51
  "react": "*",
53
- "vitest": "^4.0.4"
52
+ "vitest": "^3.2.4"
54
53
  },
55
54
  "publishConfig": {
56
55
  "access": "public"