@hanzogui/button 3.0.3 → 7.0.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 (77) hide show
  1. package/package.json +17 -17
  2. package/src/Button.test.tsx +5 -5
  3. package/src/Button.tsx +5 -5
  4. package/src/v1/Button.test.tsx +5 -5
  5. package/src/v1/Button.tsx +7 -7
  6. package/types/Button.d.ts +17 -17
  7. package/types/v1/Button.d.ts +26 -26
  8. package/dist/cjs/Button.cjs +0 -218
  9. package/dist/cjs/Button.native.js +0 -224
  10. package/dist/cjs/Button.native.js.map +0 -1
  11. package/dist/cjs/Button.test.cjs +0 -36
  12. package/dist/cjs/Button.test.native.js +0 -39
  13. package/dist/cjs/Button.test.native.js.map +0 -1
  14. package/dist/cjs/index.cjs +0 -18
  15. package/dist/cjs/index.native.js +0 -21
  16. package/dist/cjs/index.native.js.map +0 -1
  17. package/dist/cjs/v1/Button.cjs +0 -259
  18. package/dist/cjs/v1/Button.native.js +0 -265
  19. package/dist/cjs/v1/Button.native.js.map +0 -1
  20. package/dist/cjs/v1/Button.test.cjs +0 -9
  21. package/dist/cjs/v1/Button.test.native.js +0 -12
  22. package/dist/cjs/v1/Button.test.native.js.map +0 -1
  23. package/dist/cjs/v1/index.cjs +0 -18
  24. package/dist/cjs/v1/index.native.js +0 -21
  25. package/dist/cjs/v1/index.native.js.map +0 -1
  26. package/dist/esm/Button.mjs +0 -194
  27. package/dist/esm/Button.mjs.map +0 -1
  28. package/dist/esm/Button.native.js +0 -197
  29. package/dist/esm/Button.native.js.map +0 -1
  30. package/dist/esm/Button.test.mjs +0 -37
  31. package/dist/esm/Button.test.mjs.map +0 -1
  32. package/dist/esm/Button.test.native.js +0 -37
  33. package/dist/esm/Button.test.native.js.map +0 -1
  34. package/dist/esm/index.js +0 -2
  35. package/dist/esm/index.js.map +0 -1
  36. package/dist/esm/index.mjs +0 -2
  37. package/dist/esm/index.mjs.map +0 -1
  38. package/dist/esm/index.native.js +0 -2
  39. package/dist/esm/index.native.js.map +0 -1
  40. package/dist/esm/v1/Button.mjs +0 -231
  41. package/dist/esm/v1/Button.mjs.map +0 -1
  42. package/dist/esm/v1/Button.native.js +0 -234
  43. package/dist/esm/v1/Button.native.js.map +0 -1
  44. package/dist/esm/v1/Button.test.mjs +0 -10
  45. package/dist/esm/v1/Button.test.mjs.map +0 -1
  46. package/dist/esm/v1/Button.test.native.js +0 -10
  47. package/dist/esm/v1/Button.test.native.js.map +0 -1
  48. package/dist/esm/v1/index.mjs +0 -2
  49. package/dist/esm/v1/index.mjs.map +0 -1
  50. package/dist/esm/v1/index.native.js +0 -2
  51. package/dist/esm/v1/index.native.js.map +0 -1
  52. package/dist/jsx/Button.mjs +0 -194
  53. package/dist/jsx/Button.mjs.map +0 -1
  54. package/dist/jsx/Button.native.js +0 -224
  55. package/dist/jsx/Button.native.js.map +0 -1
  56. package/dist/jsx/Button.test.mjs +0 -37
  57. package/dist/jsx/Button.test.mjs.map +0 -1
  58. package/dist/jsx/Button.test.native.js +0 -39
  59. package/dist/jsx/Button.test.native.js.map +0 -1
  60. package/dist/jsx/index.js +0 -2
  61. package/dist/jsx/index.js.map +0 -1
  62. package/dist/jsx/index.mjs +0 -2
  63. package/dist/jsx/index.mjs.map +0 -1
  64. package/dist/jsx/index.native.js +0 -21
  65. package/dist/jsx/index.native.js.map +0 -1
  66. package/dist/jsx/v1/Button.mjs +0 -231
  67. package/dist/jsx/v1/Button.mjs.map +0 -1
  68. package/dist/jsx/v1/Button.native.js +0 -265
  69. package/dist/jsx/v1/Button.native.js.map +0 -1
  70. package/dist/jsx/v1/Button.test.mjs +0 -10
  71. package/dist/jsx/v1/Button.test.mjs.map +0 -1
  72. package/dist/jsx/v1/Button.test.native.js +0 -12
  73. package/dist/jsx/v1/Button.test.native.js.map +0 -1
  74. package/dist/jsx/v1/index.mjs +0 -2
  75. package/dist/jsx/v1/index.mjs.map +0 -1
  76. package/dist/jsx/v1/index.native.js +0 -21
  77. package/dist/jsx/v1/index.native.js.map +0 -1
@@ -1,231 +0,0 @@
1
- import { getFontSize } from "@hanzogui/font-size";
2
- import { getButtonSized } from "@hanzogui/get-button-sized";
3
- import { withStaticProperties } from "@hanzogui/component-helpers";
4
- import { useGetThemedIcon } from "@hanzogui/component-helpers";
5
- import { ButtonNestingContext, ThemeableStack } from "@hanzogui/stacks";
6
- import { SizableText, wrapChildrenInText } from "@hanzogui/text";
7
- import { createStyledContext, getVariableValue, styled, useProps } from "@hanzogui/web";
8
- import { useContext } from "react";
9
- import { spacedChildren } from "@hanzogui/spacer";
10
- import { jsx } from "react/jsx-runtime";
11
- const ButtonContext = createStyledContext({
12
- // keeping these here means they work with styled() passing down color to text
13
- color: void 0,
14
- ellipsis: void 0,
15
- fontFamily: void 0,
16
- fontSize: void 0,
17
- fontStyle: void 0,
18
- fontWeight: void 0,
19
- letterSpacing: void 0,
20
- maxFontSizeMultiplier: void 0,
21
- size: void 0,
22
- textAlign: void 0,
23
- variant: void 0
24
- }),
25
- BUTTON_NAME = "Button",
26
- ButtonFrame = styled(ThemeableStack, {
27
- name: BUTTON_NAME,
28
- render: "button",
29
- context: ButtonContext,
30
- role: "button",
31
- focusable: !0,
32
- variants: {
33
- unstyled: {
34
- false: {
35
- size: "$true",
36
- justifyContent: "center",
37
- alignItems: "center",
38
- flexWrap: "nowrap",
39
- flexDirection: "row",
40
- cursor: "pointer",
41
- hoverTheme: !0,
42
- pressTheme: !0,
43
- backgroundColor: "$background",
44
- borderWidth: 1,
45
- borderColor: "transparent",
46
- focusVisibleStyle: {
47
- outlineColor: "$outlineColor",
48
- outlineStyle: "solid",
49
- outlineWidth: 2
50
- }
51
- }
52
- },
53
- variant: {
54
- outlined: {
55
- backgroundColor: "transparent",
56
- borderWidth: 2,
57
- borderColor: "$borderColor",
58
- hoverStyle: {
59
- backgroundColor: "transparent",
60
- borderColor: "$borderColorHover"
61
- },
62
- pressStyle: {
63
- backgroundColor: "transparent",
64
- borderColor: "$borderColorPress"
65
- },
66
- focusVisibleStyle: {
67
- backgroundColor: "transparent",
68
- borderColor: "$borderColorFocus"
69
- }
70
- }
71
- },
72
- size: {
73
- "...size": getButtonSized,
74
- ":number": getButtonSized
75
- },
76
- disabled: {
77
- true: {
78
- pointerEvents: "none"
79
- }
80
- }
81
- },
82
- defaultVariants: {
83
- unstyled: process.env.HANZO_GUI_HEADLESS === "1"
84
- }
85
- }),
86
- ButtonText = styled(SizableText, {
87
- name: "Button",
88
- context: ButtonContext,
89
- variants: {
90
- unstyled: {
91
- false: {
92
- userSelect: "none",
93
- cursor: "pointer",
94
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
95
- flexGrow: 0,
96
- flexShrink: 1,
97
- ellipsis: !0,
98
- color: "$color"
99
- }
100
- }
101
- },
102
- defaultVariants: {
103
- unstyled: process.env.HANZO_GUI_HEADLESS === "1"
104
- }
105
- }),
106
- ButtonIcon = props => {
107
- const {
108
- children,
109
- scaleIcon = 1
110
- } = props,
111
- {
112
- size,
113
- color
114
- } = useContext(ButtonContext),
115
- iconSize = (typeof size == "number" ? size * 0.5 : getFontSize(size)) * scaleIcon;
116
- return useGetThemedIcon({
117
- size: iconSize,
118
- color
119
- })(children);
120
- },
121
- ButtonComponent = ButtonFrame.styleable(function (props, ref) {
122
- const {
123
- props: buttonProps
124
- } = useButton(props);
125
- return /* @__PURE__ */jsx(ButtonFrame, {
126
- "data-disable-theme": !0,
127
- ...buttonProps,
128
- ref
129
- });
130
- }),
131
- Button2 = withStaticProperties(ButtonComponent, {
132
- Text: ButtonText,
133
- Icon: ButtonIcon
134
- });
135
- function useButton({
136
- textProps,
137
- ...propsIn
138
- }, {
139
- Text = Button2.Text
140
- } = {
141
- Text: Button2.Text
142
- }) {
143
- const isNested = useContext(ButtonNestingContext),
144
- propsActive = useProps(propsIn, {
145
- noNormalize: !0,
146
- noExpand: !0
147
- }),
148
- {
149
- icon,
150
- iconAfter,
151
- gap,
152
- spaceFlex,
153
- scaleIcon = 1,
154
- scaleSpace = 0.66,
155
- noTextWrap,
156
- fontFamily,
157
- fontSize,
158
- fontWeight,
159
- fontStyle,
160
- letterSpacing,
161
- render,
162
- ellipsis,
163
- maxFontSizeMultiplier,
164
- ...restProps
165
- } = propsActive,
166
- size = propsActive.size || (propsActive.unstyled ? void 0 : "$true"),
167
- color = propsActive.color,
168
- iconSize = (typeof size == "number" ? size * 0.5 : getFontSize(size, {
169
- font: fontFamily?.[0] === "$" ? fontFamily : void 0
170
- })) * scaleIcon,
171
- getThemedIcon = useGetThemedIcon({
172
- size: iconSize,
173
- color
174
- }),
175
- [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon),
176
- spaceSize = gap ?? getVariableValue(iconSize) * scaleSpace,
177
- contents = noTextWrap ? [propsIn.children] : wrapChildrenInText(Text, {
178
- children: propsIn.children,
179
- fontFamily,
180
- fontSize,
181
- textProps,
182
- fontWeight,
183
- fontStyle,
184
- letterSpacing,
185
- ellipsis,
186
- maxFontSizeMultiplier
187
- }, Text === ButtonText && propsActive.unstyled !== !0 ? {
188
- unstyled: process.env.HANZO_GUI_HEADLESS === "1",
189
- size
190
- } : void 0),
191
- inner = spacedChildren({
192
- // a bit arbitrary but scaling to font size is necessary so long as button does
193
- space: spaceSize,
194
- spaceFlex,
195
- ensureKeys: !0,
196
- direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
197
- // for keys to stay the same we keep indices as similar a possible
198
- // so even if icons are undefined we still pass them
199
- children: [themedIcon, ...contents, themedIconAfter]
200
- }),
201
- props = {
202
- size,
203
- ...(propsIn.disabled && {
204
- // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
205
- focusable: void 0,
206
- // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
207
- focusVisibleStyle: {
208
- borderColor: "$background"
209
- }
210
- }),
211
- // fixes SSR issue + DOM nesting issue of not allowing button in button
212
- render: render ?? (isNested ? "span" :
213
- // defaults to <a /> when accessibilityRole = link
214
- // see https://github.com/tamagui/tamagui/issues/505
215
- propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"),
216
- ...restProps,
217
- children: /* @__PURE__ */jsx(ButtonNestingContext.Provider, {
218
- value: !0,
219
- children: inner
220
- }),
221
- // forces it to be a runtime pressStyle so it passes through context text colors
222
- disableClassName: !0
223
- };
224
- return {
225
- spaceSize,
226
- isNested,
227
- props
228
- };
229
- }
230
- export { Button2 as Button, ButtonContext, ButtonFrame, ButtonIcon, ButtonText, useButton };
231
- //# sourceMappingURL=Button.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getFontSize","getButtonSized","withStaticProperties","useGetThemedIcon","ButtonNestingContext","ThemeableStack","SizableText","wrapChildrenInText","createStyledContext","getVariableValue","styled","useProps","useContext","spacedChildren","jsx","ButtonContext","color","ellipsis","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","maxFontSizeMultiplier","size","textAlign","variant","BUTTON_NAME","ButtonFrame","name","render","context","role","focusable","variants","unstyled","false","justifyContent","alignItems","flexWrap","flexDirection","cursor","hoverTheme","pressTheme","backgroundColor","borderWidth","borderColor","focusVisibleStyle","outlineColor","outlineStyle","outlineWidth","outlined","hoverStyle","pressStyle","disabled","true","pointerEvents","defaultVariants","process","env","HANZO_GUI_HEADLESS","ButtonText","userSelect","flexGrow","flexShrink","ButtonIcon","props","children","scaleIcon","iconSize","ButtonComponent","styleable","ref","buttonProps","useButton","Button2","Text","Icon","textProps","propsIn","isNested","propsActive","noNormalize","noExpand","icon","iconAfter","gap","spaceFlex","scaleSpace","noTextWrap","restProps","font","getThemedIcon","themedIcon","themedIconAfter","map","spaceSize","contents","inner","space","ensureKeys","direction","accessibilityRole","Provider","value","disableClassName"],"sources":["../../../src/v1/Button.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,QAAmB;AAC5B,SAASC,cAAA,QAAsB;AAC/B,SAASC,oBAAA,QAA4B;AACrC,SAASC,gBAAA,QAAwB;AACjC,SAASC,oBAAA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QAAA;IACAd;EACF;AACF","ignoreList":[]}
@@ -1,265 +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: !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_gui_font_size = require("@hanzogui/font-size"),
35
- import_gui_get_button_sized = require("@hanzogui/get-button-sized"),
36
- import_gui_helpers = require("@hanzogui/helpers"),
37
- import_gui_helpers2 = require("@hanzogui/helpers"),
38
- import_gui_stacks = require("@hanzogui/stacks"),
39
- import_gui_text = require("@hanzogui/text"),
40
- import_gui_web = require("@hanzogui/web"),
41
- import_react = require("react"),
42
- import_gui_spacer = require("@hanzogui/spacer"),
43
- ButtonContext = (0, import_gui_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
- BUTTON_NAME = "Button",
58
- ButtonFrame = (0, import_gui_web.styled)(import_gui_stacks.ThemeableStack, {
59
- name: BUTTON_NAME,
60
- render: "button",
61
- context: ButtonContext,
62
- role: "button",
63
- focusable: !0,
64
- variants: {
65
- unstyled: {
66
- false: {
67
- size: "$true",
68
- justifyContent: "center",
69
- alignItems: "center",
70
- flexWrap: "nowrap",
71
- flexDirection: "row",
72
- cursor: "pointer",
73
- hoverTheme: !0,
74
- pressTheme: !0,
75
- backgroundColor: "$background",
76
- borderWidth: 1,
77
- borderColor: "transparent",
78
- focusVisibleStyle: {
79
- outlineColor: "$outlineColor",
80
- outlineStyle: "solid",
81
- outlineWidth: 2
82
- }
83
- }
84
- },
85
- variant: {
86
- outlined: {
87
- backgroundColor: "transparent",
88
- borderWidth: 2,
89
- borderColor: "$borderColor",
90
- hoverStyle: {
91
- backgroundColor: "transparent",
92
- borderColor: "$borderColorHover"
93
- },
94
- pressStyle: {
95
- backgroundColor: "transparent",
96
- borderColor: "$borderColorPress"
97
- },
98
- focusVisibleStyle: {
99
- backgroundColor: "transparent",
100
- borderColor: "$borderColorFocus"
101
- }
102
- }
103
- },
104
- size: {
105
- "...size": import_gui_get_button_sized.getButtonSized,
106
- ":number": import_gui_get_button_sized.getButtonSized
107
- },
108
- disabled: {
109
- true: {
110
- pointerEvents: "none"
111
- }
112
- }
113
- },
114
- defaultVariants: {
115
- unstyled: process.env.HANZO_GUI_HEADLESS === "1"
116
- }
117
- }),
118
- ButtonText = (0, import_gui_web.styled)(import_gui_text.SizableText, {
119
- name: "Button",
120
- context: ButtonContext,
121
- variants: {
122
- unstyled: {
123
- false: {
124
- userSelect: "none",
125
- cursor: "pointer",
126
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
127
- flexGrow: 0,
128
- flexShrink: 1,
129
- ellipsis: !0,
130
- color: "$color"
131
- }
132
- }
133
- },
134
- defaultVariants: {
135
- unstyled: process.env.HANZO_GUI_HEADLESS === "1"
136
- }
137
- }),
138
- ButtonIcon = function (props) {
139
- var {
140
- children,
141
- scaleIcon = 1
142
- } = props,
143
- {
144
- size,
145
- color
146
- } = (0, import_react.useContext)(ButtonContext),
147
- iconSize = (typeof size == "number" ? size * 0.5 : (0, import_gui_font_size.getFontSize)(size)) * scaleIcon,
148
- getThemedIcon = (0, import_gui_helpers2.useGetThemedIcon)({
149
- size: iconSize,
150
- color
151
- });
152
- return getThemedIcon(children);
153
- },
154
- ButtonComponent = ButtonFrame.styleable(function (props, ref) {
155
- var {
156
- props: buttonProps
157
- } = useButton(props);
158
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ButtonFrame, {
159
- "data-disable-theme": !0,
160
- ...buttonProps,
161
- ref
162
- });
163
- }),
164
- Button2 = (0, import_gui_helpers.withStaticProperties)(ButtonComponent, {
165
- Text: ButtonText,
166
- Icon: ButtonIcon
167
- });
168
- function useButton(param) {
169
- var {
170
- textProps,
171
- ...propsIn
172
- } = param,
173
- {
174
- Text = Button2.Text
175
- } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
176
- Text: Button2.Text
177
- },
178
- isNested = (0, import_react.useContext)(import_gui_stacks.ButtonNestingContext),
179
- propsActive = (0, import_gui_web.useProps)(propsIn, {
180
- noNormalize: !0,
181
- noExpand: !0
182
- }),
183
- {
184
- icon,
185
- iconAfter,
186
- gap,
187
- spaceFlex,
188
- scaleIcon = 1,
189
- scaleSpace = 0.66,
190
- noTextWrap,
191
- fontFamily,
192
- fontSize,
193
- fontWeight,
194
- fontStyle,
195
- letterSpacing,
196
- render,
197
- ellipsis,
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_gui_font_size.getFontSize)(size, {
204
- font: fontFamily?.[0] === "$" ? fontFamily : void 0
205
- })) * scaleIcon,
206
- getThemedIcon = (0, import_gui_helpers2.useGetThemedIcon)({
207
- size: iconSize,
208
- color
209
- }),
210
- [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon),
211
- spaceSize = gap ?? (0, import_gui_web.getVariableValue)(iconSize) * scaleSpace,
212
- contents = noTextWrap ? [propsIn.children] : (0, import_gui_text.wrapChildrenInText)(Text, {
213
- children: propsIn.children,
214
- fontFamily,
215
- fontSize,
216
- textProps,
217
- fontWeight,
218
- fontStyle,
219
- letterSpacing,
220
- ellipsis,
221
- maxFontSizeMultiplier
222
- }, Text === ButtonText && propsActive.unstyled !== !0 ? {
223
- unstyled: process.env.HANZO_GUI_HEADLESS === "1",
224
- size
225
- } : void 0),
226
- inner = (0, import_gui_spacer.spacedChildren)({
227
- // a bit arbitrary but scaling to font size is necessary so long as button does
228
- space: spaceSize,
229
- spaceFlex,
230
- ensureKeys: !0,
231
- direction: propsActive.flexDirection === "column" || propsActive.flexDirection === "column-reverse" ? "vertical" : "horizontal",
232
- // for keys to stay the same we keep indices as similar a possible
233
- // so even if icons are undefined we still pass them
234
- children: [themedIcon, ...contents, themedIconAfter]
235
- }),
236
- props = {
237
- size,
238
- ...(propsIn.disabled && {
239
- // in rnw - false still has keyboard tabIndex, undefined = not actually focusable
240
- focusable: void 0,
241
- // even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
242
- focusVisibleStyle: {
243
- borderColor: "$background"
244
- }
245
- }),
246
- // fixes SSR issue + DOM nesting issue of not allowing button in button
247
- render: render ?? (isNested ? "span" :
248
- // defaults to <a /> when accessibilityRole = link
249
- // see https://github.com/tamagui/tamagui/issues/505
250
- propsActive.accessibilityRole === "link" || propsActive.role === "link" ? "a" : "button"),
251
- ...restProps,
252
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_gui_stacks.ButtonNestingContext.Provider, {
253
- value: !0,
254
- children: inner
255
- }),
256
- // forces it to be a runtime pressStyle so it passes through context text colors
257
- disableClassName: !0
258
- };
259
- return {
260
- spaceSize,
261
- isNested,
262
- props
263
- };
264
- }
265
- //# sourceMappingURL=Button.native.js.map
@@ -1 +0,0 @@
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_gui_font_size","import_gui_get_button_sized","import_gui_helpers","import_gui_helpers2","import_gui_stacks","import_gui_text","import_gui_web","import_react","import_gui_spacer","createStyledContext","color","ellipsis","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","maxFontSizeMultiplier","size","textAlign","variant","BUTTON_NAME","styled","ThemeableStack","render","context","role","focusable","variants","unstyled","false","justifyContent","alignItems","flexWrap","flexDirection","cursor","hoverTheme","pressTheme","backgroundColor","borderWidth","borderColor","focusVisibleStyle","outlineColor","outlineStyle","outlineWidth","outlined","hoverStyle","pressStyle","getButtonSized","disabled","true","pointerEvents","defaultVariants","process","env","HANZO_GUI_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"],"sources":["../../../src/v1/Button.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAA,CAAAC,cAAsB;AAC/B,IAAAC,gBAAS,GAAAF,MAAA,CAAAG,wBAA4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AA6F,gBAAA,EAAAnC,QAAA,IAAA2B,UAAA;IAAAS,QAAA,GAAAR,UAAA,IAAAd,OACA,CAAAjB,QAAA,IACA,IAAAxD,eAAA,CAAAgG,kBAAA,EAAA3B,IAAA;MAAAb,QACA,EAAAiB,OAAA,CAAAjB,QAAA;MACFjD,UAAA;MACAC,QAAA;MACIgE,SACE;MAA6C9D,UAC7C;MACFD,SACA;MACNE,aAEU;MAAeL,QAAA;MAE3BM;IAAO,GACPyD,IAAA,KAAAhF,UAAA,IAAAyF,WAAA,CAAAtD,QAAA;MACAA,QAAA,EAAAwB,OAAY,CAAAC,GAAA,CAAAC,kBAAA;MACZrC;IAIM;IAAAoF,KAAA,OAAA9F,iBAAA,CAAA+F,cAAA;MAAA;MAGNC,KAAA,EAAAN,SAAW;MACZR,SAEK;MACJe,UAAA;MACAC,SAAI,EAAQvB,WAAA,CAAYjD,aAAA,iBAAAiD,WAAA,CAAAjD,aAAA;MAAA;MAAA;MAEX2B,QAAA,GAEXkC,UAAA,EAAmB,GACjBK,QAAA,EACFJ,eAAA;IACF;IAAApC,KAAA;MAEA1C,IAAA;MAGM,IAAA4D,OAAA,CAAA7B,QAAA;QAAA;QAGAtB,SAAA,OAAY;QAEV;QAERc,iBAAG;UAEHD,WACE;QAAmD;MAGrD;MACF;MAEAhB,MAAO,EAAAA,MAAA,KAAAyD,QAAA;MACL;MACA;MACAE,WAAA,CAAAwB,iBAAA,eAAAxB,WAAA,CAAAzD,IAAA,4BACF;MACF,GAAAmE,SAAA","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import { getDefaultGuiConfig } from "@hanzogui/config-default";
2
- import { createGui } from "@hanzogui/core";
3
- import { describe, expect, test } from "vitest";
4
- const conf = createGui(getDefaultGuiConfig());
5
- describe("Button", () => {
6
- test("123", () => {
7
- expect(!0).toBeTruthy();
8
- });
9
- });
10
- //# sourceMappingURL=Button.test.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getDefaultTamaguiConfig","createTamagui","describe","expect","test","conf","toBeTruthy"],"sources":["../../../src/v1/Button.test.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,uBAAA,QAA+B;AACxC,SAASC,aAAA,QAAqB;AAC9B,SAASC,QAAA,EAAUC,MAAA,EAAQC,IAAA,QAAY;AAEvC,MAAMC,IAAA,GAAOJ,aAAA,CAAcD,uBAAA,CAAwB,CAAC;AAEpDE,QAAA,CAAS,UAAU,MAAM;EACvBE,IAAA,CAAK,OAAO,MAAM;IAChBD,MAAA,CAAO,EAAI,EAAEG,UAAA,CAAW;EAC1B,CAAC;AAWH,CAAC","ignoreList":[]}
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- var import_gui_config_default = require("@hanzogui/config-default"),
4
- import_gui_core = require("@hanzogui/core"),
5
- import_vitest = require("vitest"),
6
- conf = (0, import_gui_core.createGui)((0, import_gui_config_default.getDefaultGuiConfig)());
7
- (0, import_vitest.describe)("Button", function () {
8
- (0, import_vitest.test)("123", function () {
9
- (0, import_vitest.expect)(!0).toBeTruthy();
10
- });
11
- });
12
- //# sourceMappingURL=Button.test.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["import_gui_config_default","require","import_gui_core","import_vitest","conf","createTamagui","getDefaultTamaguiConfig","describe","test","expect","toBeTruthy"],"sources":["../../../src/v1/Button.test.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,yBAAS,GAAqBC,OAAA;EAAAC,eAAA,GAAAD,OAAA;EAAAE,aAAA,GAAAF,OAAA;EAAAG,IAAA,OAAAF,eAAA,CAAAG,aAAA,MAAAL,yBAAA,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 +0,0 @@
1
- export * from "./Button.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -1,21 +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") 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 v1_exports = {};
19
- module.exports = __toCommonJS(v1_exports);
20
- __reExport(v1_exports, require("./Button.native.js"), module.exports);
21
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"AAAA","ignoreList":[]}