@tamagui/button-next 1.116.1 → 1.116.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Button.js +122 -0
- package/dist/cjs/Button.test.js +8 -0
- package/dist/cjs/createButton.js +41 -0
- package/dist/cjs/index.js +15 -0
- package/package.json +6 -6
- /package/dist/cjs/{Button.cjs.map → Button.js.map} +0 -0
- /package/dist/cjs/{Button.test.cjs.map → Button.test.js.map} +0 -0
- /package/dist/cjs/{createButton.cjs.map → createButton.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
|
@@ -0,0 +1,122 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var Button_exports = {};
|
|
16
|
+
__export(Button_exports, {
|
|
17
|
+
Button: () => Button,
|
|
18
|
+
ButtonContext: () => ButtonContext
|
|
19
|
+
});
|
|
20
|
+
module.exports = __toCommonJS(Button_exports);
|
|
21
|
+
var import_get_button_sized = require("@tamagui/get-button-sized"), import_text = require("@tamagui/text"), import_web = require("@tamagui/web"), import_createButton = require("./createButton");
|
|
22
|
+
const Frame = (0, import_web.styled)(import_web.View, {
|
|
23
|
+
variants: {
|
|
24
|
+
unstyled: {
|
|
25
|
+
false: {
|
|
26
|
+
size: "$true",
|
|
27
|
+
justifyContent: "center",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
flexWrap: "nowrap",
|
|
30
|
+
flexDirection: "row",
|
|
31
|
+
cursor: "pointer",
|
|
32
|
+
hoverTheme: !0,
|
|
33
|
+
pressTheme: !0,
|
|
34
|
+
backgrounded: !0,
|
|
35
|
+
borderWidth: 1,
|
|
36
|
+
borderColor: "transparent",
|
|
37
|
+
focusVisibleStyle: {
|
|
38
|
+
outlineColor: "$outlineColor",
|
|
39
|
+
outlineStyle: "solid",
|
|
40
|
+
outlineWidth: 2
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
variant: {
|
|
45
|
+
outlined: {
|
|
46
|
+
backgroundColor: "transparent",
|
|
47
|
+
borderWidth: 2,
|
|
48
|
+
borderColor: "$borderColor",
|
|
49
|
+
hoverStyle: {
|
|
50
|
+
backgroundColor: "transparent",
|
|
51
|
+
borderColor: "$borderColorHover"
|
|
52
|
+
},
|
|
53
|
+
pressStyle: {
|
|
54
|
+
backgroundColor: "transparent",
|
|
55
|
+
borderColor: "$borderColorPress"
|
|
56
|
+
},
|
|
57
|
+
focusVisibleStyle: {
|
|
58
|
+
backgroundColor: "transparent",
|
|
59
|
+
borderColor: "$borderColorFocus"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
size: {
|
|
64
|
+
"...size": import_get_button_sized.getButtonSized,
|
|
65
|
+
":number": import_get_button_sized.getButtonSized
|
|
66
|
+
},
|
|
67
|
+
disabled: {
|
|
68
|
+
true: {
|
|
69
|
+
pointerEvents: "none"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
75
|
+
}
|
|
76
|
+
}), Text = (0, import_web.styled)(import_text.SizableText, {
|
|
77
|
+
variants: {
|
|
78
|
+
unstyled: {
|
|
79
|
+
false: {
|
|
80
|
+
userSelect: "none",
|
|
81
|
+
cursor: "pointer",
|
|
82
|
+
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
83
|
+
flexGrow: 0,
|
|
84
|
+
flexShrink: 1,
|
|
85
|
+
ellipse: !0,
|
|
86
|
+
color: "$color"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: {
|
|
91
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
92
|
+
}
|
|
93
|
+
}), Icon = (0, import_web.styled)(import_text.SizableText, {
|
|
94
|
+
variants: {
|
|
95
|
+
unstyled: {
|
|
96
|
+
false: {
|
|
97
|
+
userSelect: "none",
|
|
98
|
+
cursor: "pointer",
|
|
99
|
+
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
100
|
+
flexGrow: 0,
|
|
101
|
+
flexShrink: 1,
|
|
102
|
+
ellipse: !0,
|
|
103
|
+
color: "$color"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
defaultVariants: {
|
|
108
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
109
|
+
}
|
|
110
|
+
}), ButtonContext = (0, import_web.createStyledContext)({
|
|
111
|
+
size: void 0,
|
|
112
|
+
variant: void 0
|
|
113
|
+
}), Button = (0, import_createButton.createButton)({
|
|
114
|
+
Frame,
|
|
115
|
+
Text,
|
|
116
|
+
Icon,
|
|
117
|
+
defaultVariants: {
|
|
118
|
+
size: void 0,
|
|
119
|
+
variant: void 0
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var import_config_default = require("@tamagui/config-default"), import_core = require("@tamagui/core"), import_vitest = require("vitest");
|
|
2
|
+
const conf = (0, import_core.createTamagui)((0, import_config_default.getDefaultTamaguiConfig)());
|
|
3
|
+
(0, import_vitest.describe)("Button", () => {
|
|
4
|
+
(0, import_vitest.test)("123", () => {
|
|
5
|
+
(0, import_vitest.expect)(!0).toBeTruthy();
|
|
6
|
+
});
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=Button.test.js.map
|
|
@@ -0,0 +1,41 @@
|
|
|
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)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
8
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
15
|
+
var createButton_exports = {};
|
|
16
|
+
__export(createButton_exports, {
|
|
17
|
+
createButton: () => createButton
|
|
18
|
+
});
|
|
19
|
+
module.exports = __toCommonJS(createButton_exports);
|
|
20
|
+
var import_helpers = require("@tamagui/helpers"), import_web = require("@tamagui/web");
|
|
21
|
+
const createButton = (options) => {
|
|
22
|
+
const context = (0, import_web.createStyledContext)(options.defaultVariants), name = options.name ?? "button", Frame = (0, import_web.styled)(options.Frame, {
|
|
23
|
+
context,
|
|
24
|
+
name,
|
|
25
|
+
group: name,
|
|
26
|
+
role: "button",
|
|
27
|
+
tag: "button"
|
|
28
|
+
}), Icon = (0, import_web.styled)(options.Icon, {
|
|
29
|
+
name,
|
|
30
|
+
context
|
|
31
|
+
}), Text = (0, import_web.styled)(options.Text, {
|
|
32
|
+
name,
|
|
33
|
+
context
|
|
34
|
+
});
|
|
35
|
+
return (0, import_helpers.withStaticProperties)(Frame, {
|
|
36
|
+
Apply: context.Provider,
|
|
37
|
+
Text,
|
|
38
|
+
Icon
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=createButton.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
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))
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
+
return to;
|
|
10
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
+
var src_exports = {};
|
|
13
|
+
module.exports = __toCommonJS(src_exports);
|
|
14
|
+
__reExport(src_exports, require("./Button"), module.exports);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/button-next",
|
|
3
|
-
"version": "1.116.
|
|
3
|
+
"version": "1.116.2",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@tamagui/get-button-sized": "1.116.
|
|
38
|
-
"@tamagui/stacks": "1.116.
|
|
39
|
-
"@tamagui/text": "1.116.
|
|
40
|
-
"@tamagui/web": "1.116.
|
|
37
|
+
"@tamagui/get-button-sized": "1.116.2",
|
|
38
|
+
"@tamagui/stacks": "1.116.2",
|
|
39
|
+
"@tamagui/text": "1.116.2",
|
|
40
|
+
"@tamagui/web": "1.116.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@tamagui/build": "1.116.
|
|
43
|
+
"@tamagui/build": "1.116.2",
|
|
44
44
|
"react": "^18.2.0 || ^19.0.0",
|
|
45
45
|
"vitest": "^2.1.3"
|
|
46
46
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|