@tamagui/list-item 1.0.1-beta.43
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 +249 -0
- package/dist/cjs/Button.js.map +7 -0
- package/dist/cjs/ListItem.js +182 -0
- package/dist/cjs/ListItem.js.map +7 -0
- package/dist/cjs/index.js +18 -0
- package/dist/cjs/index.js.map +7 -0
- package/dist/cjs/useCurrentColor.js +41 -0
- package/dist/cjs/useCurrentColor.js.map +7 -0
- package/dist/cjs/useGetThemedIcon.js +45 -0
- package/dist/cjs/useGetThemedIcon.js.map +7 -0
- package/dist/cjs/wrapStringChildrenInText.js +111 -0
- package/dist/cjs/wrapStringChildrenInText.js.map +7 -0
- package/dist/esm/Button.js +190 -0
- package/dist/esm/Button.js.map +7 -0
- package/dist/esm/ListItem.js +121 -0
- package/dist/esm/ListItem.js.map +7 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +7 -0
- package/dist/esm/useCurrentColor.js +19 -0
- package/dist/esm/useCurrentColor.js.map +7 -0
- package/dist/esm/useGetThemedIcon.js +20 -0
- package/dist/esm/useGetThemedIcon.js.map +7 -0
- package/dist/esm/wrapStringChildrenInText.js +53 -0
- package/dist/esm/wrapStringChildrenInText.js.map +7 -0
- package/dist/jsx/Button.js +177 -0
- package/dist/jsx/ListItem.js +121 -0
- package/dist/jsx/index.js +1 -0
- package/dist/jsx/useCurrentColor.js +18 -0
- package/dist/jsx/useGetThemedIcon.js +19 -0
- package/dist/jsx/wrapStringChildrenInText.js +47 -0
- package/package.json +36 -0
- package/types/Button.d.ts +127 -0
- package/types/Button.d.ts.map +1 -0
- package/types/ListItem.d.ts +187 -0
- package/types/ListItem.d.ts.map +1 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -0
- package/types/useCurrentColor.d.ts +5 -0
- package/types/useCurrentColor.d.ts.map +1 -0
- package/types/useGetThemedIcon.d.ts +6 -0
- package/types/useGetThemedIcon.d.ts.map +1 -0
- package/types/wrapStringChildrenInText.d.ts +8 -0
- package/types/wrapStringChildrenInText.d.ts.map +1 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import {
|
|
4
|
+
ButtonInsideButtonContext,
|
|
5
|
+
getButtonSize,
|
|
6
|
+
getVariableValue,
|
|
7
|
+
spacedChildren,
|
|
8
|
+
styled,
|
|
9
|
+
themeable,
|
|
10
|
+
useTheme
|
|
11
|
+
} from "@tamagui/core";
|
|
12
|
+
import { getFontSize } from "@tamagui/font-size";
|
|
13
|
+
import { ThemeableStack } from "@tamagui/stacks";
|
|
14
|
+
import { SizableText } from "@tamagui/text";
|
|
15
|
+
import React, { forwardRef, isValidElement, useContext } from "react";
|
|
16
|
+
React["createElement"];
|
|
17
|
+
const ButtonFrame = styled(ThemeableStack, {
|
|
18
|
+
name: "Button",
|
|
19
|
+
tag: "button",
|
|
20
|
+
hoverable: true,
|
|
21
|
+
pressable: true,
|
|
22
|
+
backgrounded: true,
|
|
23
|
+
borderWidth: 1,
|
|
24
|
+
borderColor: "transparent",
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
flexWrap: "nowrap",
|
|
28
|
+
flexDirection: "row",
|
|
29
|
+
cursor: "pointer",
|
|
30
|
+
pressStyle: {
|
|
31
|
+
borderColor: "transparent"
|
|
32
|
+
},
|
|
33
|
+
hoverStyle: {
|
|
34
|
+
borderColor: "transparent"
|
|
35
|
+
},
|
|
36
|
+
focusStyle: {
|
|
37
|
+
borderColor: "$borderColorFocus"
|
|
38
|
+
},
|
|
39
|
+
variants: {
|
|
40
|
+
size: {
|
|
41
|
+
"...size": getButtonSize
|
|
42
|
+
},
|
|
43
|
+
active: {
|
|
44
|
+
true: {
|
|
45
|
+
hoverStyle: {
|
|
46
|
+
backgroundColor: "$background"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
disabled: {
|
|
51
|
+
true: {
|
|
52
|
+
opacity: 0.5,
|
|
53
|
+
pointerEvents: "none"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
defaultVariants: {
|
|
58
|
+
size: "$4"
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const ButtonText = styled(SizableText, {
|
|
62
|
+
color: "$color",
|
|
63
|
+
selectable: false,
|
|
64
|
+
flexGrow: 1,
|
|
65
|
+
flexShrink: 1,
|
|
66
|
+
ellipse: true
|
|
67
|
+
});
|
|
68
|
+
const ButtonComponent = forwardRef((props, ref) => {
|
|
69
|
+
const {
|
|
70
|
+
children,
|
|
71
|
+
icon,
|
|
72
|
+
iconAfter,
|
|
73
|
+
noTextWrap,
|
|
74
|
+
theme: themeName,
|
|
75
|
+
space,
|
|
76
|
+
spaceFlex,
|
|
77
|
+
scaleIcon = 1,
|
|
78
|
+
scaleSpace = 0.5,
|
|
79
|
+
color: colorProp,
|
|
80
|
+
fontWeight,
|
|
81
|
+
letterSpacing,
|
|
82
|
+
fontSize,
|
|
83
|
+
fontFamily,
|
|
84
|
+
textAlign,
|
|
85
|
+
textProps,
|
|
86
|
+
...rest
|
|
87
|
+
} = props;
|
|
88
|
+
const isInsideButton = useContext(ButtonInsideButtonContext);
|
|
89
|
+
const theme = useTheme();
|
|
90
|
+
const size = props.size || "$4";
|
|
91
|
+
let color;
|
|
92
|
+
if (theme && colorProp && colorProp in theme) {
|
|
93
|
+
color = theme[colorProp];
|
|
94
|
+
} else if (colorProp) {
|
|
95
|
+
color = colorProp;
|
|
96
|
+
} else {
|
|
97
|
+
color = theme == null ? void 0 : theme.color;
|
|
98
|
+
}
|
|
99
|
+
color = color == null ? void 0 : color.toString();
|
|
100
|
+
const iconSize = getFontSize(size) * scaleIcon;
|
|
101
|
+
const addTheme = /* @__PURE__ */ __name((el) => {
|
|
102
|
+
if (isValidElement(el)) {
|
|
103
|
+
return el;
|
|
104
|
+
}
|
|
105
|
+
if (el) {
|
|
106
|
+
return React.createElement(el, {
|
|
107
|
+
color,
|
|
108
|
+
size: iconSize
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return el;
|
|
112
|
+
}, "addTheme");
|
|
113
|
+
const themedIcon = icon ? addTheme(icon) : null;
|
|
114
|
+
const themedIconAfter = iconAfter ? addTheme(iconAfter) : null;
|
|
115
|
+
let contents = children;
|
|
116
|
+
if (!noTextWrap && children) {
|
|
117
|
+
let concatStringChildren = function() {
|
|
118
|
+
if (!lastIsString)
|
|
119
|
+
return;
|
|
120
|
+
const index = nextChildren.length - 1;
|
|
121
|
+
const childrenStrings = nextChildren[index];
|
|
122
|
+
nextChildren[index] = <ButtonText key={index} {...{
|
|
123
|
+
fontWeight,
|
|
124
|
+
letterSpacing,
|
|
125
|
+
fontSize,
|
|
126
|
+
fontFamily,
|
|
127
|
+
textAlign,
|
|
128
|
+
size
|
|
129
|
+
}} {...colorProp && {
|
|
130
|
+
color: colorProp
|
|
131
|
+
}} {...textProps}>{childrenStrings}</ButtonText>;
|
|
132
|
+
};
|
|
133
|
+
__name(concatStringChildren, "concatStringChildren");
|
|
134
|
+
let allChildren = React.Children.toArray(children);
|
|
135
|
+
let nextChildren = [];
|
|
136
|
+
let lastIsString = false;
|
|
137
|
+
for (const child of allChildren) {
|
|
138
|
+
const last = nextChildren[nextChildren.length - 1];
|
|
139
|
+
const isString = typeof child === "string";
|
|
140
|
+
if (isString) {
|
|
141
|
+
if (lastIsString) {
|
|
142
|
+
last.push(child);
|
|
143
|
+
} else {
|
|
144
|
+
nextChildren.push([child]);
|
|
145
|
+
}
|
|
146
|
+
} else {
|
|
147
|
+
concatStringChildren();
|
|
148
|
+
nextChildren.push(child);
|
|
149
|
+
}
|
|
150
|
+
lastIsString = isString;
|
|
151
|
+
}
|
|
152
|
+
concatStringChildren();
|
|
153
|
+
contents = nextChildren;
|
|
154
|
+
}
|
|
155
|
+
return <ButtonInsideButtonContext.Provider value={true}><ButtonFrame fontFamily={fontFamily} {...isInsideButton && {
|
|
156
|
+
tag: "span"
|
|
157
|
+
}} ref={ref} {...rest}>{themedIcon || themedIconAfter ? spacedChildren({
|
|
158
|
+
space: getVariableValue(iconSize) * scaleSpace,
|
|
159
|
+
spaceFlex,
|
|
160
|
+
direction: props.flexDirection || "row",
|
|
161
|
+
children: [themedIcon, contents, themedIconAfter]
|
|
162
|
+
}) : contents}</ButtonFrame></ButtonInsideButtonContext.Provider>;
|
|
163
|
+
});
|
|
164
|
+
const Button = ButtonFrame.extractable(themeable(ButtonComponent), {
|
|
165
|
+
inlineProps: /* @__PURE__ */ new Set([
|
|
166
|
+
"color",
|
|
167
|
+
"fontWeight",
|
|
168
|
+
"fontSize",
|
|
169
|
+
"fontFamily",
|
|
170
|
+
"letterSpacing",
|
|
171
|
+
"textAlign"
|
|
172
|
+
])
|
|
173
|
+
});
|
|
174
|
+
export {
|
|
175
|
+
Button,
|
|
176
|
+
ButtonText
|
|
177
|
+
};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Spacer,
|
|
3
|
+
getSize,
|
|
4
|
+
getVariableValue,
|
|
5
|
+
styled,
|
|
6
|
+
themeable
|
|
7
|
+
} from "@tamagui/core";
|
|
8
|
+
import { getFontSize } from "@tamagui/font-size";
|
|
9
|
+
import {
|
|
10
|
+
useGetThemedIcon,
|
|
11
|
+
wrapStringChildrenInText
|
|
12
|
+
} from "@tamagui/helpers-tamagui";
|
|
13
|
+
import { ThemeableStack, YStack } from "@tamagui/stacks";
|
|
14
|
+
import { SizableText } from "@tamagui/text";
|
|
15
|
+
import React, { forwardRef } from "react";
|
|
16
|
+
React["createElement"];
|
|
17
|
+
const ListItemFrame = styled(ThemeableStack, {
|
|
18
|
+
name: "ListItem",
|
|
19
|
+
tag: "li",
|
|
20
|
+
alignItems: "center",
|
|
21
|
+
flexWrap: "nowrap",
|
|
22
|
+
width: "100%",
|
|
23
|
+
maxWidth: "100%",
|
|
24
|
+
overflow: "hidden",
|
|
25
|
+
flexDirection: "row",
|
|
26
|
+
variants: {
|
|
27
|
+
size: {
|
|
28
|
+
"...size": (val, { tokens }) => {
|
|
29
|
+
return {
|
|
30
|
+
paddingVertical: getSize(val, -1),
|
|
31
|
+
paddingHorizontal: tokens.size[val]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
active: {
|
|
36
|
+
true: {
|
|
37
|
+
hoverStyle: {
|
|
38
|
+
backgroundColor: "$background"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
disabled: {
|
|
43
|
+
true: {
|
|
44
|
+
opacity: 0.5,
|
|
45
|
+
pointerEvents: "none"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
defaultVariants: {
|
|
50
|
+
size: "$4"
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const ListItemText = styled(SizableText, {
|
|
54
|
+
color: "$color",
|
|
55
|
+
selectable: false,
|
|
56
|
+
flexGrow: 1,
|
|
57
|
+
flexShrink: 1,
|
|
58
|
+
ellipse: true
|
|
59
|
+
});
|
|
60
|
+
const ListItemSubtitle = styled(ListItemText, {
|
|
61
|
+
color: "$colorPress"
|
|
62
|
+
});
|
|
63
|
+
const ListItemComponent = forwardRef((props, ref) => {
|
|
64
|
+
const {
|
|
65
|
+
children,
|
|
66
|
+
icon,
|
|
67
|
+
iconAfter,
|
|
68
|
+
noTextWrap,
|
|
69
|
+
theme: themeName,
|
|
70
|
+
space,
|
|
71
|
+
spaceFlex,
|
|
72
|
+
scaleIcon = 1,
|
|
73
|
+
scaleSpace = 1,
|
|
74
|
+
subTitle,
|
|
75
|
+
color,
|
|
76
|
+
fontWeight,
|
|
77
|
+
letterSpacing,
|
|
78
|
+
fontSize,
|
|
79
|
+
fontFamily,
|
|
80
|
+
textAlign,
|
|
81
|
+
textProps,
|
|
82
|
+
...rest
|
|
83
|
+
} = props;
|
|
84
|
+
const size = props.size || "$4";
|
|
85
|
+
const subtitleSizeToken = getSize(size, -2);
|
|
86
|
+
const subtitleSize = `$${subtitleSizeToken.key}`;
|
|
87
|
+
const iconSize = getFontSize(size) * scaleIcon;
|
|
88
|
+
const getThemedIcon = useGetThemedIcon({ size: iconSize, color });
|
|
89
|
+
const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon);
|
|
90
|
+
const spaceSize = getVariableValue(iconSize) * scaleSpace;
|
|
91
|
+
const contents = wrapStringChildrenInText(ListItemText, props);
|
|
92
|
+
return <ListItemFrame fontFamily={fontFamily} ref={ref} {...rest}>{themedIcon || themedIconAfter ? <>
|
|
93
|
+
{themedIcon ? <>
|
|
94
|
+
{themedIcon}
|
|
95
|
+
<Spacer size={spaceSize} />
|
|
96
|
+
</> : null}
|
|
97
|
+
<YStack>
|
|
98
|
+
{contents}
|
|
99
|
+
{subTitle ? typeof subTitle === "string" ? <ListItemSubtitle opacity={0.65} size={subtitleSize}>{subTitle}</ListItemSubtitle> : subTitle : null}
|
|
100
|
+
</YStack>
|
|
101
|
+
{themedIconAfter ? <>
|
|
102
|
+
<Spacer flex size={spaceSize} />
|
|
103
|
+
{themedIconAfter}
|
|
104
|
+
</> : null}
|
|
105
|
+
</> : contents}</ListItemFrame>;
|
|
106
|
+
});
|
|
107
|
+
const ListItem = ListItemFrame.extractable(themeable(ListItemComponent), {
|
|
108
|
+
inlineProps: /* @__PURE__ */ new Set([
|
|
109
|
+
"color",
|
|
110
|
+
"fontWeight",
|
|
111
|
+
"fontSize",
|
|
112
|
+
"fontFamily",
|
|
113
|
+
"letterSpacing",
|
|
114
|
+
"textAlign"
|
|
115
|
+
])
|
|
116
|
+
});
|
|
117
|
+
export {
|
|
118
|
+
ListItem,
|
|
119
|
+
ListItemSubtitle,
|
|
120
|
+
ListItemText
|
|
121
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ListItem";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { useTheme } from "@tamagui/core";
|
|
4
|
+
const useCurrentColor = /* @__PURE__ */ __name((colorProp) => {
|
|
5
|
+
const theme = useTheme();
|
|
6
|
+
let color;
|
|
7
|
+
if (theme && colorProp && colorProp in theme) {
|
|
8
|
+
color = theme[colorProp];
|
|
9
|
+
} else if (colorProp) {
|
|
10
|
+
color = colorProp;
|
|
11
|
+
} else {
|
|
12
|
+
color = theme == null ? void 0 : theme.color;
|
|
13
|
+
}
|
|
14
|
+
return (color == null ? void 0 : color.toString()) || "";
|
|
15
|
+
}, "useCurrentColor");
|
|
16
|
+
export {
|
|
17
|
+
useCurrentColor
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React, { isValidElement } from "react";
|
|
4
|
+
import { useCurrentColor } from "./useCurrentColor";
|
|
5
|
+
const useGetThemedIcon = /* @__PURE__ */ __name((props) => {
|
|
6
|
+
const color = useCurrentColor(props.color);
|
|
7
|
+
return (el) => {
|
|
8
|
+
if (isValidElement(el)) {
|
|
9
|
+
return el;
|
|
10
|
+
}
|
|
11
|
+
if (el) {
|
|
12
|
+
return React.createElement(el, props);
|
|
13
|
+
}
|
|
14
|
+
return el;
|
|
15
|
+
};
|
|
16
|
+
}, "useGetThemedIcon");
|
|
17
|
+
export {
|
|
18
|
+
useGetThemedIcon
|
|
19
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { ListItemText } from "./ListItem";
|
|
5
|
+
function wrapStringChildrenInText({
|
|
6
|
+
children,
|
|
7
|
+
textProps,
|
|
8
|
+
size,
|
|
9
|
+
noTextWrap,
|
|
10
|
+
...directTextProps
|
|
11
|
+
}) {
|
|
12
|
+
if (noTextWrap || !children) {
|
|
13
|
+
return children;
|
|
14
|
+
}
|
|
15
|
+
let allChildren = React.Children.toArray(children);
|
|
16
|
+
let nextChildren = [];
|
|
17
|
+
let lastIsString = false;
|
|
18
|
+
function concatStringChildren() {
|
|
19
|
+
if (!lastIsString)
|
|
20
|
+
return;
|
|
21
|
+
const index = nextChildren.length - 1;
|
|
22
|
+
const childrenStrings = nextChildren[index];
|
|
23
|
+
nextChildren[index] = <ListItemText key={index} {...directTextProps} size={size} {...textProps}>{childrenStrings}</ListItemText>;
|
|
24
|
+
}
|
|
25
|
+
__name(concatStringChildren, "concatStringChildren");
|
|
26
|
+
for (const child of allChildren) {
|
|
27
|
+
const last = nextChildren[nextChildren.length - 1];
|
|
28
|
+
const isString = typeof child === "string";
|
|
29
|
+
if (isString) {
|
|
30
|
+
if (lastIsString) {
|
|
31
|
+
last.push(child);
|
|
32
|
+
} else {
|
|
33
|
+
nextChildren.push([child]);
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
concatStringChildren();
|
|
37
|
+
nextChildren.push(child);
|
|
38
|
+
}
|
|
39
|
+
lastIsString = isString;
|
|
40
|
+
}
|
|
41
|
+
concatStringChildren();
|
|
42
|
+
return nextChildren;
|
|
43
|
+
}
|
|
44
|
+
__name(wrapStringChildrenInText, "wrapStringChildrenInText");
|
|
45
|
+
export {
|
|
46
|
+
wrapStringChildrenInText
|
|
47
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tamagui/list-item",
|
|
3
|
+
"version": "1.0.1-beta.43",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"source": "src/index.ts",
|
|
6
|
+
"types": "./types/index.d.ts",
|
|
7
|
+
"main": "dist/cjs",
|
|
8
|
+
"module": "dist/esm",
|
|
9
|
+
"module:jsx": "dist/jsx",
|
|
10
|
+
"files": [
|
|
11
|
+
"types",
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tamagui-build",
|
|
16
|
+
"watch": "tamagui-build --watch"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@tamagui/core": "^1.0.1-beta.43",
|
|
20
|
+
"@tamagui/font-size": "^1.0.1-beta.43",
|
|
21
|
+
"@tamagui/helpers-tamagui": "^1.0.1-beta.43"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": "*",
|
|
25
|
+
"react-dom": "*"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@tamagui/build": "^1.0.1-beta.43",
|
|
29
|
+
"react": "*",
|
|
30
|
+
"react-dom": "*"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14"
|
|
36
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { GetProps, ReactComponentWithRef, ThemeableProps } from '@tamagui/core';
|
|
2
|
+
import { SizableTextProps } from '@tamagui/text';
|
|
3
|
+
import { FunctionComponent } from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
declare type ButtonIconProps = {
|
|
6
|
+
color?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
};
|
|
9
|
+
declare type IconProp = JSX.Element | FunctionComponent<ButtonIconProps> | null;
|
|
10
|
+
export declare type ButtonProps = GetProps<typeof ButtonFrame> & ThemeableProps & {
|
|
11
|
+
icon?: IconProp;
|
|
12
|
+
iconAfter?: IconProp;
|
|
13
|
+
scaleIcon?: number;
|
|
14
|
+
noTextWrap?: boolean;
|
|
15
|
+
spaceFlex?: number | boolean;
|
|
16
|
+
scaleSpace?: number;
|
|
17
|
+
color?: SizableTextProps['color'];
|
|
18
|
+
fontWeight?: SizableTextProps['fontWeight'];
|
|
19
|
+
fontSize?: SizableTextProps['fontSize'];
|
|
20
|
+
fontFamily?: SizableTextProps['fontFamily'];
|
|
21
|
+
letterSpacing?: SizableTextProps['letterSpacing'];
|
|
22
|
+
textAlign?: SizableTextProps['textAlign'];
|
|
23
|
+
textProps?: Partial<SizableTextProps>;
|
|
24
|
+
};
|
|
25
|
+
declare const ButtonFrame: import("@tamagui/core").TamaguiComponent<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
|
|
26
|
+
fullscreen?: boolean | undefined;
|
|
27
|
+
elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
28
|
+
} & {
|
|
29
|
+
fontFamily?: unknown;
|
|
30
|
+
backgrounded?: boolean | undefined;
|
|
31
|
+
hoverable?: boolean | undefined;
|
|
32
|
+
pressable?: boolean | undefined;
|
|
33
|
+
focusable?: boolean | undefined;
|
|
34
|
+
circular?: boolean | undefined;
|
|
35
|
+
pad?: boolean | undefined;
|
|
36
|
+
elevate?: boolean | undefined;
|
|
37
|
+
bordered?: number | boolean | undefined;
|
|
38
|
+
transparent?: boolean | undefined;
|
|
39
|
+
chromeless?: boolean | undefined;
|
|
40
|
+
}, "disabled" | "size" | "active"> & {
|
|
41
|
+
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
42
|
+
active?: boolean | undefined;
|
|
43
|
+
disabled?: boolean | undefined;
|
|
44
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
|
|
45
|
+
fullscreen?: boolean | undefined;
|
|
46
|
+
elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
47
|
+
} & {
|
|
48
|
+
fontFamily?: unknown;
|
|
49
|
+
backgrounded?: boolean | undefined;
|
|
50
|
+
hoverable?: boolean | undefined;
|
|
51
|
+
pressable?: boolean | undefined;
|
|
52
|
+
focusable?: boolean | undefined;
|
|
53
|
+
circular?: boolean | undefined;
|
|
54
|
+
pad?: boolean | undefined;
|
|
55
|
+
elevate?: boolean | undefined;
|
|
56
|
+
bordered?: number | boolean | undefined;
|
|
57
|
+
transparent?: boolean | undefined;
|
|
58
|
+
chromeless?: boolean | undefined;
|
|
59
|
+
}, "disabled" | "size" | "active"> & {
|
|
60
|
+
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
61
|
+
active?: boolean | undefined;
|
|
62
|
+
disabled?: boolean | undefined;
|
|
63
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").ViewProps, "display" | "children"> & import("@tamagui/core").RNWViewProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStylePropsBase>> & Omit<{
|
|
64
|
+
fullscreen?: boolean | undefined;
|
|
65
|
+
elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
66
|
+
} & {
|
|
67
|
+
fontFamily?: unknown;
|
|
68
|
+
backgrounded?: boolean | undefined;
|
|
69
|
+
hoverable?: boolean | undefined;
|
|
70
|
+
pressable?: boolean | undefined;
|
|
71
|
+
focusable?: boolean | undefined;
|
|
72
|
+
circular?: boolean | undefined;
|
|
73
|
+
pad?: boolean | undefined;
|
|
74
|
+
elevate?: boolean | undefined;
|
|
75
|
+
bordered?: number | boolean | undefined;
|
|
76
|
+
transparent?: boolean | undefined;
|
|
77
|
+
chromeless?: boolean | undefined;
|
|
78
|
+
}, "disabled" | "size" | "active"> & {
|
|
79
|
+
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
80
|
+
active?: boolean | undefined;
|
|
81
|
+
disabled?: boolean | undefined;
|
|
82
|
+
}>>, any, import("@tamagui/core").StackPropsBase, {
|
|
83
|
+
fullscreen?: boolean | undefined;
|
|
84
|
+
elevation?: import("@tamagui/core").SizeTokens | undefined;
|
|
85
|
+
} & {
|
|
86
|
+
fontFamily?: unknown;
|
|
87
|
+
backgrounded?: boolean | undefined;
|
|
88
|
+
hoverable?: boolean | undefined;
|
|
89
|
+
pressable?: boolean | undefined;
|
|
90
|
+
focusable?: boolean | undefined;
|
|
91
|
+
circular?: boolean | undefined;
|
|
92
|
+
pad?: boolean | undefined;
|
|
93
|
+
elevate?: boolean | undefined;
|
|
94
|
+
bordered?: number | boolean | undefined;
|
|
95
|
+
transparent?: boolean | undefined;
|
|
96
|
+
chromeless?: boolean | undefined;
|
|
97
|
+
} & {
|
|
98
|
+
size?: import("@tamagui/core").SizeTokens | undefined;
|
|
99
|
+
active?: boolean | undefined;
|
|
100
|
+
disabled?: boolean | undefined;
|
|
101
|
+
}>;
|
|
102
|
+
export declare const ButtonText: import("@tamagui/core").TamaguiComponent<(Omit<import("react-native").TextProps, "children"> & import("@tamagui/core").RNWTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{}, "size"> & {
|
|
103
|
+
size?: import("@tamagui/core").FontSizeTokens | undefined;
|
|
104
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").TextProps, "children"> & import("@tamagui/core").RNWTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{}, "size"> & {
|
|
105
|
+
size?: import("@tamagui/core").FontSizeTokens | undefined;
|
|
106
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").TextProps, "children"> & import("@tamagui/core").RNWTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{}, "size"> & {
|
|
107
|
+
size?: import("@tamagui/core").FontSizeTokens | undefined;
|
|
108
|
+
}>>) | (Omit<import("react-native").TextProps, "children"> & import("@tamagui/core").RNWTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
109
|
+
size?: import("@tamagui/core").FontSizeTokens | undefined;
|
|
110
|
+
}, string | number> & {
|
|
111
|
+
[x: string]: undefined;
|
|
112
|
+
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").TextProps, "children"> & import("@tamagui/core").RNWTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
113
|
+
size?: import("@tamagui/core").FontSizeTokens | undefined;
|
|
114
|
+
}, string | number> & {
|
|
115
|
+
[x: string]: undefined;
|
|
116
|
+
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").TextProps, "children"> & import("@tamagui/core").RNWTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
117
|
+
size?: import("@tamagui/core").FontSizeTokens | undefined;
|
|
118
|
+
}, string | number> & {
|
|
119
|
+
[x: string]: undefined;
|
|
120
|
+
}>>), any, import("@tamagui/core").TextPropsBase, {
|
|
121
|
+
size?: import("@tamagui/core").FontSizeTokens | undefined;
|
|
122
|
+
} & ({} | {
|
|
123
|
+
[x: string]: undefined;
|
|
124
|
+
})>;
|
|
125
|
+
export declare const Button: ReactComponentWithRef<ButtonProps, HTMLButtonElement | View>;
|
|
126
|
+
export {};
|
|
127
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EACR,qBAAqB,EACrB,cAAc,EAOf,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAe,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAc,EAAE,iBAAiB,EAA0C,MAAM,OAAO,CAAA;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAKnC,aAAK,eAAe,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AACxD,aAAK,QAAQ,GAAG,GAAG,CAAC,OAAO,GAAG,iBAAiB,CAAC,eAAe,CAAC,GAAG,IAAI,CAAA;AAEvE,oBAAY,WAAW,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,GACpD,cAAc,GAAG;IAEf,IAAI,CAAC,EAAE,QAAQ,CAAA;IAEf,SAAS,CAAC,EAAE,QAAQ,CAAA;IAGpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAE5B,UAAU,CAAC,EAAE,MAAM,CAAA;IAGnB,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACjC,UAAU,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC3C,aAAa,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAA;IACjD,SAAS,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IAGzC,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACtC,CAAA;AAEH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDf,CAAA;AAMF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;GAMrB,CAAA;AA+IF,eAAO,MAAM,MAAM,EAAE,qBAAqB,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAW5E,CAAA"}
|