@tamagui/button-next 1.113.1 → 1.113.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/esm/Button.native.js +93 -94
- package/dist/esm/Button.native.js.map +6 -1
- package/dist/esm/Button.test.native.js +3 -3
- package/dist/esm/Button.test.native.js.map +6 -1
- package/dist/esm/createButton.native.js +18 -21
- package/dist/esm/createButton.native.js.map +6 -1
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/index.native.js.map +6 -1
- package/package.json +6 -6
|
@@ -1,110 +1,109 @@
|
|
|
1
1
|
import { getButtonSized } from "@tamagui/get-button-sized";
|
|
2
2
|
import { SizableText } from "@tamagui/text";
|
|
3
3
|
import { createStyledContext, styled, View } from "@tamagui/web";
|
|
4
|
-
import { createButton } from "./createButton
|
|
4
|
+
import { createButton } from "./createButton";
|
|
5
5
|
var Frame = styled(View, {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
6
|
+
variants: {
|
|
7
|
+
unstyled: {
|
|
8
|
+
false: {
|
|
9
|
+
size: "$true",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
alignItems: "center",
|
|
12
|
+
flexWrap: "nowrap",
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
cursor: "pointer",
|
|
15
|
+
hoverTheme: !0,
|
|
16
|
+
pressTheme: !0,
|
|
17
|
+
backgrounded: !0,
|
|
18
|
+
borderWidth: 1,
|
|
19
|
+
borderColor: "transparent",
|
|
20
|
+
focusVisibleStyle: {
|
|
21
|
+
outlineColor: "$outlineColor",
|
|
22
|
+
outlineStyle: "solid",
|
|
23
|
+
outlineWidth: 2
|
|
25
24
|
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
outlined: {
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
borderWidth: 2,
|
|
31
|
+
borderColor: "$borderColor",
|
|
32
|
+
hoverStyle: {
|
|
29
33
|
backgroundColor: "transparent",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
focusVisibleStyle: {
|
|
41
|
-
backgroundColor: "transparent",
|
|
42
|
-
borderColor: "$borderColorFocus"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
size: {
|
|
47
|
-
"...size": getButtonSized,
|
|
48
|
-
":number": getButtonSized
|
|
49
|
-
},
|
|
50
|
-
disabled: {
|
|
51
|
-
true: {
|
|
52
|
-
pointerEvents: "none"
|
|
34
|
+
borderColor: "$borderColorHover"
|
|
35
|
+
},
|
|
36
|
+
pressStyle: {
|
|
37
|
+
backgroundColor: "transparent",
|
|
38
|
+
borderColor: "$borderColorPress"
|
|
39
|
+
},
|
|
40
|
+
focusVisibleStyle: {
|
|
41
|
+
backgroundColor: "transparent",
|
|
42
|
+
borderColor: "$borderColorFocus"
|
|
53
43
|
}
|
|
54
44
|
}
|
|
55
45
|
},
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
size: {
|
|
47
|
+
"...size": getButtonSized,
|
|
48
|
+
":number": getButtonSized
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
true: {
|
|
52
|
+
pointerEvents: "none"
|
|
53
|
+
}
|
|
58
54
|
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
58
|
+
}
|
|
59
|
+
}), Text = styled(SizableText, {
|
|
60
|
+
variants: {
|
|
61
|
+
unstyled: {
|
|
62
|
+
false: {
|
|
63
|
+
userSelect: "none",
|
|
64
|
+
cursor: "pointer",
|
|
65
|
+
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
66
|
+
flexGrow: 0,
|
|
67
|
+
flexShrink: 1,
|
|
68
|
+
ellipse: !0,
|
|
69
|
+
color: "$color"
|
|
72
70
|
}
|
|
73
|
-
},
|
|
74
|
-
defaultVariants: {
|
|
75
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
76
71
|
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
75
|
+
}
|
|
76
|
+
}), Icon = styled(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"
|
|
90
87
|
}
|
|
91
|
-
},
|
|
92
|
-
defaultVariants: {
|
|
93
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
94
88
|
}
|
|
95
|
-
}
|
|
96
|
-
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: {
|
|
91
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
92
|
+
}
|
|
93
|
+
}), ButtonContext = createStyledContext({
|
|
94
|
+
size: void 0,
|
|
95
|
+
variant: void 0
|
|
96
|
+
}), Button = createButton({
|
|
97
|
+
Frame,
|
|
98
|
+
Text,
|
|
99
|
+
Icon,
|
|
100
|
+
defaultVariants: {
|
|
97
101
|
size: void 0,
|
|
98
102
|
variant: void 0
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
variant: void 0
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
export { Button, ButtonContext };
|
|
110
|
-
//# sourceMappingURL=Button.native.js.map
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
Button,
|
|
107
|
+
ButtonContext
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/button-next/src/Button.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAASA,sBAAsB;AAC/B,SAASC,mBAAmB;AAE5B,SAASC,qBAAqBC,QAAQC,YAAY;AAClD,SAASC,oBAAoB;AAM7B,IAAMC,QAAQH,OAAOC,MAAM;EACzBG,UAAU;IACRC,UAAU;MACRC,OAAO;QACLC,MAAM;QACNC,gBAAgB;QAChBC,YAAY;QACZC,UAAU;QACVC,eAAe;QACfC,QAAQ;QACRC,YAAY;QACZC,YAAY;QACZC,cAAc;QACdC,aAAa;QACbC,aAAa;QAEbC,mBAAmB;UACjBC,cAAc;UACdC,cAAc;UACdC,cAAc;QAChB;MACF;IACF;IAEAC,SAAS;MACPC,UAAU;QACRC,iBAAiB;QACjBR,aAAa;QACbC,aAAa;QAEbQ,YAAY;UACVD,iBAAiB;UACjBP,aAAa;QACf;QAEAS,YAAY;UACVF,iBAAiB;UACjBP,aAAa;QACf;QAEAC,mBAAmB;UACjBM,iBAAiB;UACjBP,aAAa;QACf;MACF;IACF;IAEAV,MAAM;MACJ,WAAWV;MACX,WAAWA;IACb;IAEA8B,UAAU;MACRC,MAAM;QACJC,eAAe;MACjB;IACF;EACF;EAEAC,iBAAiB;IACfzB,UAAU0B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEMC,OAAOlC,OAAOF,aAAa;EAC/BM,UAAU;IACRC,UAAU;MACRC,OAAO;QACL6B,YAAY;QACZvB,QAAQ;;QAERwB,UAAU;QACVC,YAAY;QACZC,SAAS;QACTC,OAAO;MACT;IACF;EACF;EAEAT,iBAAiB;IACfzB,UAAU0B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEMO,OAAOxC,OAAOF,aAAa;EAC/BM,UAAU;IACRC,UAAU;MACRC,OAAO;QACL6B,YAAY;QACZvB,QAAQ;;QAERwB,UAAU;QACVC,YAAY;QACZC,SAAS;QACTC,OAAO;MACT;IACF;EACF;EAEAT,iBAAiB;IACfzB,UAAU0B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEaQ,gBAAgB1C,oBAG1B;EACDQ,MAAMmC;EACNpB,SAASoB;AACX,CAAA,GAEaC,SAASzC,aAGnB;EACDC;EACA+B;EACAM;EACAV,iBAAiB;IACfvB,MAAMmC;IACNpB,SAASoB;EACX;AACF,CAAA;",
|
|
5
|
+
"names": ["getButtonSized", "SizableText", "createStyledContext", "styled", "View", "createButton", "Frame", "variants", "unstyled", "false", "size", "justifyContent", "alignItems", "flexWrap", "flexDirection", "cursor", "hoverTheme", "pressTheme", "backgrounded", "borderWidth", "borderColor", "focusVisibleStyle", "outlineColor", "outlineStyle", "outlineWidth", "variant", "outlined", "backgroundColor", "hoverStyle", "pressStyle", "disabled", "true", "pointerEvents", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "Text", "userSelect", "flexGrow", "flexShrink", "ellipse", "color", "Icon", "ButtonContext", "undefined", "Button"]
|
|
6
|
+
}
|
|
@@ -2,9 +2,9 @@ import { getDefaultTamaguiConfig } from "@tamagui/config-default";
|
|
|
2
2
|
import { createTamagui } from "@tamagui/core";
|
|
3
3
|
import { describe, expect, test } from "vitest";
|
|
4
4
|
var conf = createTamagui(getDefaultTamaguiConfig());
|
|
5
|
-
describe("Button", function
|
|
6
|
-
test("123", function
|
|
5
|
+
describe("Button", function() {
|
|
6
|
+
test("123", function() {
|
|
7
7
|
expect(!0).toBeTruthy();
|
|
8
8
|
});
|
|
9
9
|
});
|
|
10
|
-
//# sourceMappingURL=Button.test.
|
|
10
|
+
//# sourceMappingURL=Button.test.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/button-next/src/Button.test.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAASA,+BAA+B;AACxC,SAASC,qBAAqB;AAC9B,SAASC,UAAUC,QAAQC,YAAY;AAEvC,IAAMC,OAAOJ,cAAcD,wBAAAA,CAAAA;AAE3BE,SAAS,UAAU,WAAA;AACjBE,OAAK,OAAO,WAAA;AACVD,WAAO,EAAA,EAAMG,WAAU;EACzB,CAAA;AAWF,CAAA;",
|
|
5
|
+
"names": ["getDefaultTamaguiConfig", "createTamagui", "describe", "expect", "test", "conf", "toBeTruthy"]
|
|
6
|
+
}
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { withStaticProperties } from "@tamagui/helpers";
|
|
2
2
|
import { createStyledContext, styled } from "@tamagui/web";
|
|
3
|
-
var createButton = function
|
|
4
|
-
var context = createStyledContext(options.defaultVariants),
|
|
5
|
-
|
|
6
|
-
name
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}),
|
|
18
|
-
Text = styled(options.Text, {
|
|
19
|
-
name,
|
|
20
|
-
context
|
|
21
|
-
});
|
|
3
|
+
var createButton = function(options) {
|
|
4
|
+
var context = createStyledContext(options.defaultVariants), _options_name, name = (_options_name = options.name) !== null && _options_name !== void 0 ? _options_name : "button", Frame = styled(options.Frame, {
|
|
5
|
+
context,
|
|
6
|
+
name,
|
|
7
|
+
group: name,
|
|
8
|
+
role: "button",
|
|
9
|
+
tag: "button"
|
|
10
|
+
}), Icon = styled(options.Icon, {
|
|
11
|
+
name,
|
|
12
|
+
context
|
|
13
|
+
}), Text = styled(options.Text, {
|
|
14
|
+
name,
|
|
15
|
+
context
|
|
16
|
+
});
|
|
22
17
|
return withStaticProperties(Frame, {
|
|
23
18
|
Apply: context.Provider,
|
|
24
19
|
Text,
|
|
25
20
|
Icon
|
|
26
21
|
});
|
|
27
22
|
};
|
|
28
|
-
export {
|
|
29
|
-
|
|
23
|
+
export {
|
|
24
|
+
createButton
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=createButton.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/button-next/src/createButton.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAASA,4BAA4B;AAMrC,SAASC,qBAAqBC,cAAc;AAErC,IAAMC,eAAe,SAAuCC,SAAAA;AAOjE,MAAMC,UAAUJ,oBAAoBG,QAAQE,eAAe,GAC9CF,eAAPG,QAAOH,gBAAAA,QAAQG,UAAI,QAAZH,kBAAAA,SAAAA,gBAAgB,UAEvBI,QAAQN,OAAOE,QAAQI,OAAO;IAClCH;IACAE;IACAE,OAAOF;IACPG,MAAM;IACNC,KAAK;EACP,CAAA,GAEMC,OAAOV,OAAOE,QAAQQ,MAAM;IAChCL;IACAF;EACF,CAAA,GAEMQ,OAAOX,OAAOE,QAAQS,MAAM;IAChCN;IACAF;EACF,CAAA;AAEA,SAAOL,qBAAqBQ,OAAO;IACjCM,OAAOT,QAAQU;IACfF;IACAD;EACF,CAAA;AACF;",
|
|
5
|
+
"names": ["withStaticProperties", "createStyledContext", "styled", "createButton", "options", "context", "defaultVariants", "name", "Frame", "group", "role", "tag", "Icon", "Text", "Apply", "Provider"]
|
|
6
|
+
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Button
|
|
2
|
-
//# sourceMappingURL=index.
|
|
1
|
+
export * from "./Button";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/button-next",
|
|
3
|
-
"version": "1.113.
|
|
3
|
+
"version": "1.113.2",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/get-button-sized": "1.113.
|
|
37
|
-
"@tamagui/stacks": "1.113.
|
|
38
|
-
"@tamagui/text": "1.113.
|
|
39
|
-
"@tamagui/web": "1.113.
|
|
36
|
+
"@tamagui/get-button-sized": "1.113.2",
|
|
37
|
+
"@tamagui/stacks": "1.113.2",
|
|
38
|
+
"@tamagui/text": "1.113.2",
|
|
39
|
+
"@tamagui/web": "1.113.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "1.113.
|
|
42
|
+
"@tamagui/build": "1.113.2",
|
|
43
43
|
"react": "^18.2.0 || ^19.0.0",
|
|
44
44
|
"vitest": "2.1.1"
|
|
45
45
|
},
|