@tamagui/button-next 1.105.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/LICENSE +21 -0
- package/dist/cjs/Button.js +122 -0
- package/dist/cjs/Button.js.map +6 -0
- package/dist/cjs/Button.native.js +127 -0
- package/dist/cjs/Button.native.js.map +6 -0
- package/dist/cjs/Button.test.js +8 -0
- package/dist/cjs/Button.test.js.map +6 -0
- package/dist/cjs/Button.test.native.js +8 -0
- package/dist/cjs/Button.test.native.js.map +6 -0
- package/dist/cjs/createButton.js +41 -0
- package/dist/cjs/createButton.js.map +6 -0
- package/dist/cjs/createButton.native.js +45 -0
- package/dist/cjs/createButton.native.js.map +6 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +6 -0
- package/dist/cjs/index.native.js +20 -0
- package/dist/cjs/index.native.js.map +6 -0
- package/dist/esm/Button.js +109 -0
- package/dist/esm/Button.js.map +6 -0
- package/dist/esm/Button.mjs +110 -0
- package/dist/esm/Button.mjs.map +1 -0
- package/dist/esm/Button.native.js +109 -0
- package/dist/esm/Button.native.js.map +6 -0
- package/dist/esm/Button.test.js +10 -0
- package/dist/esm/Button.test.js.map +6 -0
- package/dist/esm/Button.test.mjs +10 -0
- package/dist/esm/Button.test.mjs.map +1 -0
- package/dist/esm/Button.test.native.js +10 -0
- package/dist/esm/Button.test.native.js.map +6 -0
- package/dist/esm/createButton.js +26 -0
- package/dist/esm/createButton.js.map +6 -0
- package/dist/esm/createButton.mjs +28 -0
- package/dist/esm/createButton.mjs.map +1 -0
- package/dist/esm/createButton.native.js +26 -0
- package/dist/esm/createButton.native.js.map +6 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +6 -0
- package/dist/esm/index.mjs +2 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +2 -0
- package/dist/esm/index.native.js.map +6 -0
- package/dist/jsx/Button.js +109 -0
- package/dist/jsx/Button.js.map +6 -0
- package/dist/jsx/Button.mjs +110 -0
- package/dist/jsx/Button.mjs.map +1 -0
- package/dist/jsx/Button.native.js +109 -0
- package/dist/jsx/Button.native.js.map +6 -0
- package/dist/jsx/Button.test.js +10 -0
- package/dist/jsx/Button.test.js.map +6 -0
- package/dist/jsx/Button.test.mjs +10 -0
- package/dist/jsx/Button.test.mjs.map +1 -0
- package/dist/jsx/Button.test.native.js +10 -0
- package/dist/jsx/Button.test.native.js.map +6 -0
- package/dist/jsx/createButton.js +26 -0
- package/dist/jsx/createButton.js.map +6 -0
- package/dist/jsx/createButton.mjs +28 -0
- package/dist/jsx/createButton.mjs.map +1 -0
- package/dist/jsx/createButton.native.js +26 -0
- package/dist/jsx/createButton.native.js.map +6 -0
- package/dist/jsx/index.js +2 -0
- package/dist/jsx/index.js.map +6 -0
- package/dist/jsx/index.mjs +2 -0
- package/dist/jsx/index.mjs.map +1 -0
- package/dist/jsx/index.native.js +2 -0
- package/dist/jsx/index.native.js.map +6 -0
- package/package.json +52 -0
- package/src/Button.test.tsx +21 -0
- package/src/Button.tsx +134 -0
- package/src/createButton.tsx +42 -0
- package/src/index.ts +1 -0
- package/types/Button.d.ts +43 -0
- package/types/Button.d.ts.map +1 -0
- package/types/Button.test.d.ts +2 -0
- package/types/Button.test.d.ts.map +1 -0
- package/types/createButton.d.ts +18 -0
- package/types/createButton.d.ts.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { getButtonSized } from "@tamagui/get-button-sized";
|
|
2
|
+
import { SizableText } from "@tamagui/text";
|
|
3
|
+
import { createStyledContext, styled, View } from "@tamagui/web";
|
|
4
|
+
import { createButton } from "./createButton.mjs";
|
|
5
|
+
const Frame = styled(View, {
|
|
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
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
outlined: {
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
borderWidth: 2,
|
|
31
|
+
borderColor: "$borderColor",
|
|
32
|
+
hoverStyle: {
|
|
33
|
+
backgroundColor: "transparent",
|
|
34
|
+
borderColor: "$borderColorHover"
|
|
35
|
+
},
|
|
36
|
+
pressStyle: {
|
|
37
|
+
backgroundColor: "transparent",
|
|
38
|
+
borderColor: "$borderColorPress"
|
|
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"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
Text = styled(SizableText, {
|
|
61
|
+
variants: {
|
|
62
|
+
unstyled: {
|
|
63
|
+
false: {
|
|
64
|
+
userSelect: "none",
|
|
65
|
+
cursor: "pointer",
|
|
66
|
+
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
67
|
+
flexGrow: 0,
|
|
68
|
+
flexShrink: 1,
|
|
69
|
+
ellipse: !0,
|
|
70
|
+
color: "$color"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
defaultVariants: {
|
|
75
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
Icon = styled(SizableText, {
|
|
79
|
+
variants: {
|
|
80
|
+
unstyled: {
|
|
81
|
+
false: {
|
|
82
|
+
userSelect: "none",
|
|
83
|
+
cursor: "pointer",
|
|
84
|
+
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
85
|
+
flexGrow: 0,
|
|
86
|
+
flexShrink: 1,
|
|
87
|
+
ellipse: !0,
|
|
88
|
+
color: "$color"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
defaultVariants: {
|
|
93
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
94
|
+
}
|
|
95
|
+
}),
|
|
96
|
+
ButtonContext = createStyledContext({
|
|
97
|
+
size: void 0,
|
|
98
|
+
variant: void 0
|
|
99
|
+
}),
|
|
100
|
+
Button = createButton({
|
|
101
|
+
Frame,
|
|
102
|
+
Text,
|
|
103
|
+
Icon,
|
|
104
|
+
defaultVariants: {
|
|
105
|
+
size: void 0,
|
|
106
|
+
variant: void 0
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export { Button, ButtonContext };
|
|
110
|
+
//# sourceMappingURL=Button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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","Button"],"sources":["../../src/Button.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,cAAA,QAAsB;AAC/B,SAASC,WAAA,QAAmB;AAE5B,SAASC,mBAAA,EAAqBC,MAAA,EAAQC,IAAA,QAAY;AAClD,SAASC,YAAA,QAAoB;AAM7B,MAAMC,KAAA,GAAQH,MAAA,CAAOC,IAAA,EAAM;IACzBG,QAAA,EAAU;MACRC,QAAA,EAAU;QACRC,KAAA,EAAO;UACLC,IAAA,EAAM;UACNC,cAAA,EAAgB;UAChBC,UAAA,EAAY;UACZC,QAAA,EAAU;UACVC,aAAA,EAAe;UACfC,MAAA,EAAQ;UACRC,UAAA,EAAY;UACZC,UAAA,EAAY;UACZC,YAAA,EAAc;UACdC,WAAA,EAAa;UACbC,WAAA,EAAa;UAEbC,iBAAA,EAAmB;YACjBC,YAAA,EAAc;YACdC,YAAA,EAAc;YACdC,YAAA,EAAc;UAChB;QACF;MACF;MAEAC,OAAA,EAAS;QACPC,QAAA,EAAU;UACRC,eAAA,EAAiB;UACjBR,WAAA,EAAa;UACbC,WAAA,EAAa;UAEbQ,UAAA,EAAY;YACVD,eAAA,EAAiB;YACjBP,WAAA,EAAa;UACf;UAEAS,UAAA,EAAY;YACVF,eAAA,EAAiB;YACjBP,WAAA,EAAa;UACf;UAEAC,iBAAA,EAAmB;YACjBM,eAAA,EAAiB;YACjBP,WAAA,EAAa;UACf;QACF;MACF;MAEAV,IAAA,EAAM;QACJ,WAAWV,cAAA;QACX,WAAWA;MACb;MAEA8B,QAAA,EAAU;QACRC,IAAA,EAAM;UACJC,aAAA,EAAe;QACjB;MACF;IACF;IAEAC,eAAA,EAAiB;MACfzB,QAAA,EAAU0B,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;IAC7C;EACF,CAAC;EAEKC,IAAA,GAAOlC,MAAA,CAAOF,WAAA,EAAa;IAC/BM,QAAA,EAAU;MACRC,QAAA,EAAU;QACRC,KAAA,EAAO;UACL6B,UAAA,EAAY;UACZvB,MAAA,EAAQ;UAAA;UAERwB,QAAA,EAAU;UACVC,UAAA,EAAY;UACZC,OAAA,EAAS;UACTC,KAAA,EAAO;QACT;MACF;IACF;IAEAT,eAAA,EAAiB;MACfzB,QAAA,EAAU0B,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;IAC7C;EACF,CAAC;EAEKO,IAAA,GAAOxC,MAAA,CAAOF,WAAA,EAAa;IAC/BM,QAAA,EAAU;MACRC,QAAA,EAAU;QACRC,KAAA,EAAO;UACL6B,UAAA,EAAY;UACZvB,MAAA,EAAQ;UAAA;UAERwB,QAAA,EAAU;UACVC,UAAA,EAAY;UACZC,OAAA,EAAS;UACTC,KAAA,EAAO;QACT;MACF;IACF;IAEAT,eAAA,EAAiB;MACfzB,QAAA,EAAU0B,OAAA,CAAQC,GAAA,CAAIC,gBAAA,KAAqB;IAC7C;EACF,CAAC;EAEYQ,aAAA,GAAgB1C,mBAAA,CAG1B;IACDQ,IAAA,EAAM;IACNe,OAAA,EAAS;EACX,CAAC;EAEYoB,MAAA,GAASxC,YAAA,CAGnB;IACDC,KAAA;IACA+B,IAAA;IACAM,IAAA;IACAV,eAAA,EAAiB;MACfvB,IAAA,EAAM;MACNe,OAAA,EAAS;IACX;EACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { getButtonSized } from "@tamagui/get-button-sized";
|
|
2
|
+
import { SizableText } from "@tamagui/text";
|
|
3
|
+
import { createStyledContext, styled, View } from "@tamagui/web";
|
|
4
|
+
import { createButton } from "./createButton";
|
|
5
|
+
var Frame = styled(View, {
|
|
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
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
outlined: {
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
borderWidth: 2,
|
|
31
|
+
borderColor: "$borderColor",
|
|
32
|
+
hoverStyle: {
|
|
33
|
+
backgroundColor: "transparent",
|
|
34
|
+
borderColor: "$borderColorHover"
|
|
35
|
+
},
|
|
36
|
+
pressStyle: {
|
|
37
|
+
backgroundColor: "transparent",
|
|
38
|
+
borderColor: "$borderColorPress"
|
|
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"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
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"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
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"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
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: {
|
|
101
|
+
size: void 0,
|
|
102
|
+
variant: void 0
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
Button,
|
|
107
|
+
ButtonContext
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
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;QAC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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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getDefaultTamaguiConfig } from "@tamagui/config-default";
|
|
2
|
+
import { createTamagui } from "@tamagui/core";
|
|
3
|
+
import { describe, expect, test } from "vitest";
|
|
4
|
+
const conf = createTamagui(getDefaultTamaguiConfig());
|
|
5
|
+
describe("Button", () => {
|
|
6
|
+
test("123", () => {
|
|
7
|
+
expect(!0).toBeTruthy();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=Button.test.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Button.test.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,+BAA+B;AACxC,SAAS,qBAAqB;AAC9B,SAAS,UAAU,QAAQ,YAAY;AAEvC,MAAM,OAAO,cAAc,wBAAwB,CAAC;AAEpD,SAAS,UAAU,MAAM;AACvB,OAAK,OAAO,MAAM;AAChB,WAAO,EAAI,EAAE,WAAW;AAAA,EAC1B,CAAC;AAWH,CAAC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getDefaultTamaguiConfig } from "@tamagui/config-default";
|
|
2
|
+
import { createTamagui } from "@tamagui/core";
|
|
3
|
+
import { describe, expect, test } from "vitest";
|
|
4
|
+
const conf = createTamagui(getDefaultTamaguiConfig());
|
|
5
|
+
describe("Button", () => {
|
|
6
|
+
test("123", () => {
|
|
7
|
+
expect(!0).toBeTruthy();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=Button.test.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getDefaultTamaguiConfig","createTamagui","describe","expect","test","conf","toBeTruthy"],"sources":["../../src/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":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
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();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=Button.test.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
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,OAAM,OAAM,WAAA;AACVD,WAAO,EAAA,EAAMG,WAAU;EACzB,CAAA;AAWF,CAAA;",
|
|
5
|
+
"names": ["getDefaultTamaguiConfig", "createTamagui", "describe", "expect", "test", "conf", "toBeTruthy"]
|
|
6
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { withStaticProperties } from "@tamagui/helpers";
|
|
2
|
+
import { createStyledContext, styled } from "@tamagui/web";
|
|
3
|
+
const createButton = (options) => {
|
|
4
|
+
const context = createStyledContext(options.defaultVariants), name = 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
|
+
});
|
|
17
|
+
return withStaticProperties(Frame, {
|
|
18
|
+
Apply: context.Provider,
|
|
19
|
+
Text,
|
|
20
|
+
Icon
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
createButton
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=createButton.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/createButton.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,4BAA4B;AAMrC,SAAS,qBAAqB,cAAc;AAErC,MAAM,eAAe,CAAuC,YAM7D;AACJ,QAAM,UAAU,oBAAoB,QAAQ,eAAe,GACrD,OAAO,QAAQ,QAAQ,UAEvB,QAAQ,OAAO,QAAQ,OAAO;AAAA,IAClC;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,EACP,CAAC,GAEK,OAAO,OAAO,QAAQ,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC,GAEK,OAAO,OAAO,QAAQ,MAAM;AAAA,IAChC;AAAA,IACA;AAAA,EACF,CAAC;AAED,SAAO,qBAAqB,OAAO;AAAA,IACjC,OAAO,QAAQ;AAAA,IACf;AAAA,IACA;AAAA,EACF,CAAC;AACH;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { withStaticProperties } from "@tamagui/helpers";
|
|
2
|
+
import { createStyledContext, styled } from "@tamagui/web";
|
|
3
|
+
const createButton = options => {
|
|
4
|
+
const context = createStyledContext(options.defaultVariants),
|
|
5
|
+
name = options.name ?? "button",
|
|
6
|
+
Frame = styled(options.Frame, {
|
|
7
|
+
context,
|
|
8
|
+
name,
|
|
9
|
+
group: name,
|
|
10
|
+
role: "button",
|
|
11
|
+
tag: "button"
|
|
12
|
+
}),
|
|
13
|
+
Icon = styled(options.Icon, {
|
|
14
|
+
name,
|
|
15
|
+
context
|
|
16
|
+
}),
|
|
17
|
+
Text = styled(options.Text, {
|
|
18
|
+
name,
|
|
19
|
+
context
|
|
20
|
+
});
|
|
21
|
+
return withStaticProperties(Frame, {
|
|
22
|
+
Apply: context.Provider,
|
|
23
|
+
Text,
|
|
24
|
+
Icon
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
export { createButton };
|
|
28
|
+
//# sourceMappingURL=createButton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withStaticProperties","createStyledContext","styled","createButton","options","context","defaultVariants","name","Frame","group","role","tag","Icon","Text","Apply","Provider"],"sources":["../../src/createButton.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,oBAAA,QAA4B;AAMrC,SAASC,mBAAA,EAAqBC,MAAA,QAAc;AAErC,MAAMC,YAAA,GAAsDC,OAAA,IAM7D;EACJ,MAAMC,OAAA,GAAUJ,mBAAA,CAAoBG,OAAA,CAAQE,eAAe;IACrDC,IAAA,GAAOH,OAAA,CAAQG,IAAA,IAAQ;IAEvBC,KAAA,GAAQN,MAAA,CAAOE,OAAA,CAAQI,KAAA,EAAO;MAClCH,OAAA;MACAE,IAAA;MACAE,KAAA,EAAOF,IAAA;MACPG,IAAA,EAAM;MACNC,GAAA,EAAK;IACP,CAAC;IAEKC,IAAA,GAAOV,MAAA,CAAOE,OAAA,CAAQQ,IAAA,EAAM;MAChCL,IAAA;MACAF;IACF,CAAC;IAEKQ,IAAA,GAAOX,MAAA,CAAOE,OAAA,CAAQS,IAAA,EAAM;MAChCN,IAAA;MACAF;IACF,CAAC;EAED,OAAOL,oBAAA,CAAqBQ,KAAA,EAAO;IACjCM,KAAA,EAAOT,OAAA,CAAQU,QAAA;IACfF,IAAA;IACAD;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { withStaticProperties } from "@tamagui/helpers";
|
|
2
|
+
import { createStyledContext, styled } from "@tamagui/web";
|
|
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
|
+
});
|
|
17
|
+
return withStaticProperties(Frame, {
|
|
18
|
+
Apply: context.Provider,
|
|
19
|
+
Text,
|
|
20
|
+
Icon
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
createButton
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=createButton.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { getButtonSized } from "@tamagui/get-button-sized";
|
|
2
|
+
import { SizableText } from "@tamagui/text";
|
|
3
|
+
import { createStyledContext, styled, View } from "@tamagui/web";
|
|
4
|
+
import { createButton } from "./createButton";
|
|
5
|
+
const Frame = styled(View, {
|
|
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
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
outlined: {
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
borderWidth: 2,
|
|
31
|
+
borderColor: "$borderColor",
|
|
32
|
+
hoverStyle: {
|
|
33
|
+
backgroundColor: "transparent",
|
|
34
|
+
borderColor: "$borderColorHover"
|
|
35
|
+
},
|
|
36
|
+
pressStyle: {
|
|
37
|
+
backgroundColor: "transparent",
|
|
38
|
+
borderColor: "$borderColorPress"
|
|
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"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
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"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
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"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
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: {
|
|
101
|
+
size: void 0,
|
|
102
|
+
variant: void 0
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
export {
|
|
106
|
+
Button,
|
|
107
|
+
ButtonContext
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Button.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAE5B,SAAS,qBAAqB,QAAQ,YAAY;AAClD,SAAS,oBAAoB;AAM7B,MAAM,QAAQ,OAAO,MAAM;AAAA,EACzB,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,MAAM;AAAA,QACN,gBAAgB;AAAA,QAChB,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,eAAe;AAA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,QACT,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAC7C;AACF,CAAC,GAEY,gBAAgB,oBAG1B;AAAA,EACD,MAAM;AAAA,EACN,SAAS;AACX,CAAC,GAEY,SAAS,aAGnB;AAAA,EACD;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF,CAAC;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { getButtonSized } from "@tamagui/get-button-sized";
|
|
2
|
+
import { SizableText } from "@tamagui/text";
|
|
3
|
+
import { createStyledContext, styled, View } from "@tamagui/web";
|
|
4
|
+
import { createButton } from "./createButton.mjs";
|
|
5
|
+
const Frame = styled(View, {
|
|
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
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
variant: {
|
|
28
|
+
outlined: {
|
|
29
|
+
backgroundColor: "transparent",
|
|
30
|
+
borderWidth: 2,
|
|
31
|
+
borderColor: "$borderColor",
|
|
32
|
+
hoverStyle: {
|
|
33
|
+
backgroundColor: "transparent",
|
|
34
|
+
borderColor: "$borderColorHover"
|
|
35
|
+
},
|
|
36
|
+
pressStyle: {
|
|
37
|
+
backgroundColor: "transparent",
|
|
38
|
+
borderColor: "$borderColorPress"
|
|
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"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
Text = styled(SizableText, {
|
|
61
|
+
variants: {
|
|
62
|
+
unstyled: {
|
|
63
|
+
false: {
|
|
64
|
+
userSelect: "none",
|
|
65
|
+
cursor: "pointer",
|
|
66
|
+
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
67
|
+
flexGrow: 0,
|
|
68
|
+
flexShrink: 1,
|
|
69
|
+
ellipse: !0,
|
|
70
|
+
color: "$color"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
defaultVariants: {
|
|
75
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
76
|
+
}
|
|
77
|
+
}),
|
|
78
|
+
Icon = styled(SizableText, {
|
|
79
|
+
variants: {
|
|
80
|
+
unstyled: {
|
|
81
|
+
false: {
|
|
82
|
+
userSelect: "none",
|
|
83
|
+
cursor: "pointer",
|
|
84
|
+
// flexGrow 1 leads to inconsistent native style where text pushes to start of view
|
|
85
|
+
flexGrow: 0,
|
|
86
|
+
flexShrink: 1,
|
|
87
|
+
ellipse: !0,
|
|
88
|
+
color: "$color"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
defaultVariants: {
|
|
93
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
94
|
+
}
|
|
95
|
+
}),
|
|
96
|
+
ButtonContext = createStyledContext({
|
|
97
|
+
size: void 0,
|
|
98
|
+
variant: void 0
|
|
99
|
+
}),
|
|
100
|
+
Button = createButton({
|
|
101
|
+
Frame,
|
|
102
|
+
Text,
|
|
103
|
+
Icon,
|
|
104
|
+
defaultVariants: {
|
|
105
|
+
size: void 0,
|
|
106
|
+
variant: void 0
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export { Button, ButtonContext };
|
|
110
|
+
//# sourceMappingURL=Button.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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","Button"],"sources":["../../src/Button.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,cAAA,QAAsB;AAC/B,SAASC,WAAA,QAAmB;AAE5B,SAASC,mBAAA,EAAqBC,MAAA,EAAQC,IAAA,QAAY;AAClD,SAASC,YAAA,QAAoB;AAM7B,MAAMC,KAAA,GAAQH,MAAA,CAAOC,IAAA,EAAM;IACzBG,QAAA,EAAU;MACRC,QAAA,EAAU;QACRC,KAAA,EAAO;UACLC,IAAA,EAAM;UACNC,cAAA,EAAgB;UAChBC,UAAA,EAAY;UACZC,QAAA,EAAU;UACVC,aAAA,EAAe;UACfC,MAAA,EAAQ;UACRC,UAAA,EAAY;UACZC,UAAA,EAAY;UACZC,YAAA,EAAc;UACdC,WAAA,EAAa;UACbC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