@tamagui/list-item 1.114.4 → 1.115.1
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.
|
@@ -0,0 +1,235 @@
|
|
|
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) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
},
|
|
11
|
+
__copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
+
value: !0
|
|
20
|
+
}), mod);
|
|
21
|
+
var ListItem_exports = {};
|
|
22
|
+
__export(ListItem_exports, {
|
|
23
|
+
ListItem: () => ListItem2,
|
|
24
|
+
ListItemFrame: () => ListItemFrame,
|
|
25
|
+
ListItemSubtitle: () => ListItemSubtitle,
|
|
26
|
+
ListItemText: () => ListItemText,
|
|
27
|
+
ListItemTitle: () => ListItemTitle,
|
|
28
|
+
useListItem: () => useListItem
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(ListItem_exports);
|
|
31
|
+
var import_font_size = require("@tamagui/font-size"),
|
|
32
|
+
import_get_font_sized = require("@tamagui/get-font-sized"),
|
|
33
|
+
import_get_token = require("@tamagui/get-token"),
|
|
34
|
+
import_helpers = require("@tamagui/helpers"),
|
|
35
|
+
import_helpers_tamagui = require("@tamagui/helpers-tamagui"),
|
|
36
|
+
import_stacks = require("@tamagui/stacks"),
|
|
37
|
+
import_text = require("@tamagui/text"),
|
|
38
|
+
import_web = require("@tamagui/web"),
|
|
39
|
+
import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
const NAME = "ListItem",
|
|
41
|
+
ListItemFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
|
|
42
|
+
name: NAME,
|
|
43
|
+
tag: "li",
|
|
44
|
+
variants: {
|
|
45
|
+
unstyled: {
|
|
46
|
+
false: {
|
|
47
|
+
size: "$true",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
justifyContent: "space-between",
|
|
50
|
+
flexWrap: "nowrap",
|
|
51
|
+
width: "100%",
|
|
52
|
+
borderColor: "$borderColor",
|
|
53
|
+
maxWidth: "100%",
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
flexDirection: "row",
|
|
56
|
+
backgroundColor: "$background",
|
|
57
|
+
cursor: "default"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
61
|
+
"...size": (val, {
|
|
62
|
+
tokens
|
|
63
|
+
}) => ({
|
|
64
|
+
minHeight: tokens.size[val],
|
|
65
|
+
paddingHorizontal: tokens.space[val],
|
|
66
|
+
paddingVertical: (0, import_get_token.getSpace)(tokens.space[val], {
|
|
67
|
+
shift: -4
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
},
|
|
71
|
+
active: {
|
|
72
|
+
true: {
|
|
73
|
+
hoverStyle: {
|
|
74
|
+
backgroundColor: "$background"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
disabled: {
|
|
79
|
+
true: {
|
|
80
|
+
opacity: 0.5,
|
|
81
|
+
// TODO breaking types
|
|
82
|
+
pointerEvents: "none"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
defaultVariants: {
|
|
87
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
88
|
+
}
|
|
89
|
+
}),
|
|
90
|
+
ListItemText = (0, import_web.styled)(import_text.SizableText, {
|
|
91
|
+
name: "ListItemText",
|
|
92
|
+
variants: {
|
|
93
|
+
unstyled: {
|
|
94
|
+
false: {
|
|
95
|
+
color: "$color",
|
|
96
|
+
size: "$true",
|
|
97
|
+
flexGrow: 1,
|
|
98
|
+
flexShrink: 1,
|
|
99
|
+
ellipse: !0,
|
|
100
|
+
cursor: "inherit"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
defaultVariants: {
|
|
105
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
106
|
+
}
|
|
107
|
+
}),
|
|
108
|
+
ListItemSubtitle = (0, import_web.styled)(ListItemText, {
|
|
109
|
+
name: "ListItemSubtitle",
|
|
110
|
+
variants: {
|
|
111
|
+
unstyled: {
|
|
112
|
+
false: {
|
|
113
|
+
opacity: 0.6,
|
|
114
|
+
maxWidth: "100%",
|
|
115
|
+
color: "$color"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
size: {
|
|
119
|
+
"...size": (val, extras) => {
|
|
120
|
+
const oneSmaller = (0, import_get_token.getSize)(val, {
|
|
121
|
+
shift: -1,
|
|
122
|
+
excludeHalfSteps: !0
|
|
123
|
+
});
|
|
124
|
+
return (0, import_get_font_sized.getFontSized)(oneSmaller.key, extras);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
defaultVariants: {
|
|
129
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
130
|
+
}
|
|
131
|
+
}),
|
|
132
|
+
ListItemTitle = (0, import_web.styled)(ListItemText, {
|
|
133
|
+
name: "ListItemTitle"
|
|
134
|
+
}),
|
|
135
|
+
useListItem = (propsIn, {
|
|
136
|
+
Text = ListItemText,
|
|
137
|
+
Subtitle = ListItemSubtitle,
|
|
138
|
+
Title = ListItemTitle
|
|
139
|
+
} = {
|
|
140
|
+
Text: ListItemText,
|
|
141
|
+
Subtitle: ListItemSubtitle,
|
|
142
|
+
Title: ListItemTitle
|
|
143
|
+
}) => {
|
|
144
|
+
const props = (0, import_web.useProps)(propsIn, {
|
|
145
|
+
resolveValues: "none"
|
|
146
|
+
}),
|
|
147
|
+
{
|
|
148
|
+
children,
|
|
149
|
+
icon,
|
|
150
|
+
iconAfter,
|
|
151
|
+
noTextWrap,
|
|
152
|
+
theme: themeName,
|
|
153
|
+
space,
|
|
154
|
+
spaceFlex,
|
|
155
|
+
scaleIcon = 1,
|
|
156
|
+
scaleSpace = 1,
|
|
157
|
+
unstyled = !1,
|
|
158
|
+
subTitle,
|
|
159
|
+
title,
|
|
160
|
+
// text props
|
|
161
|
+
color,
|
|
162
|
+
fontWeight,
|
|
163
|
+
fontSize,
|
|
164
|
+
fontFamily,
|
|
165
|
+
letterSpacing,
|
|
166
|
+
textAlign,
|
|
167
|
+
ellipse,
|
|
168
|
+
...rest
|
|
169
|
+
} = props,
|
|
170
|
+
textProps = {
|
|
171
|
+
color,
|
|
172
|
+
fontWeight,
|
|
173
|
+
fontSize,
|
|
174
|
+
fontFamily,
|
|
175
|
+
letterSpacing,
|
|
176
|
+
textAlign,
|
|
177
|
+
ellipse,
|
|
178
|
+
children
|
|
179
|
+
},
|
|
180
|
+
size = props.size || "$true",
|
|
181
|
+
iconSize = (0, import_font_size.getFontSize)(size) * scaleIcon,
|
|
182
|
+
getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
183
|
+
size: iconSize,
|
|
184
|
+
color
|
|
185
|
+
}),
|
|
186
|
+
[themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon),
|
|
187
|
+
sizeToken = (0, import_web.getTokens)().space[props.space] ?? iconSize,
|
|
188
|
+
spaceSize = (0, import_web.getVariableValue)(sizeToken) * scaleSpace,
|
|
189
|
+
contents = (0, import_text.wrapChildrenInText)(Text, textProps);
|
|
190
|
+
return {
|
|
191
|
+
props: {
|
|
192
|
+
...rest,
|
|
193
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
194
|
+
children: [themedIcon ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
195
|
+
children: [themedIcon, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_web.Spacer, {
|
|
196
|
+
size: spaceSize
|
|
197
|
+
})]
|
|
198
|
+
}) : null, title || subTitle ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_stacks.YStack, {
|
|
199
|
+
flex: 1,
|
|
200
|
+
children: [noTextWrap === "all" ? title : /* @__PURE__ */(0, import_jsx_runtime.jsx)(Title, {
|
|
201
|
+
size,
|
|
202
|
+
children: title
|
|
203
|
+
}), subTitle ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
204
|
+
children: typeof subTitle == "string" && noTextWrap !== "all" ?
|
|
205
|
+
// TODO can use theme but we need to standardize to alt themes
|
|
206
|
+
// or standardize on subtle colors in themes
|
|
207
|
+
/* @__PURE__ */
|
|
208
|
+
(0, import_jsx_runtime.jsx)(Subtitle, {
|
|
209
|
+
unstyled,
|
|
210
|
+
size,
|
|
211
|
+
children: subTitle
|
|
212
|
+
}) : subTitle
|
|
213
|
+
}) : null, contents]
|
|
214
|
+
}) : contents, themedIconAfter ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
215
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_web.Spacer, {
|
|
216
|
+
size: spaceSize
|
|
217
|
+
}), themedIconAfter]
|
|
218
|
+
}) : null]
|
|
219
|
+
})
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
},
|
|
223
|
+
ListItemComponent = ListItemFrame.styleable(function (props, ref) {
|
|
224
|
+
const {
|
|
225
|
+
props: listItemProps
|
|
226
|
+
} = useListItem(props);
|
|
227
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(ListItemFrame, {
|
|
228
|
+
ref,
|
|
229
|
+
...listItemProps
|
|
230
|
+
});
|
|
231
|
+
}),
|
|
232
|
+
ListItem2 = (0, import_helpers.withStaticProperties)(ListItemComponent, {
|
|
233
|
+
Text: ListItemText,
|
|
234
|
+
Subtitle: ListItemSubtitle
|
|
235
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
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") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
7
|
+
get: () => from[key],
|
|
8
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
|
+
});
|
|
10
|
+
return to;
|
|
11
|
+
},
|
|
12
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
+
value: !0
|
|
15
|
+
}), mod);
|
|
16
|
+
var src_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(src_exports);
|
|
18
|
+
__reExport(src_exports, require("./ListItem.cjs"), module.exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/list-item",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.115.1",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -29,21 +29,22 @@
|
|
|
29
29
|
"react-native": "./dist/cjs/index.native.js",
|
|
30
30
|
"types": "./types/index.d.ts",
|
|
31
31
|
"import": "./dist/esm/index.mjs",
|
|
32
|
-
"require": "./dist/cjs/index.
|
|
32
|
+
"require": "./dist/cjs/index.cjs",
|
|
33
|
+
"default": "./dist/cjs/index.native.js"
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@tamagui/font-size": "1.
|
|
37
|
-
"@tamagui/get-font-sized": "1.
|
|
38
|
-
"@tamagui/get-token": "1.
|
|
39
|
-
"@tamagui/helpers": "1.
|
|
40
|
-
"@tamagui/helpers-tamagui": "1.
|
|
41
|
-
"@tamagui/stacks": "1.
|
|
42
|
-
"@tamagui/text": "1.
|
|
43
|
-
"@tamagui/web": "1.
|
|
37
|
+
"@tamagui/font-size": "1.115.1",
|
|
38
|
+
"@tamagui/get-font-sized": "1.115.1",
|
|
39
|
+
"@tamagui/get-token": "1.115.1",
|
|
40
|
+
"@tamagui/helpers": "1.115.1",
|
|
41
|
+
"@tamagui/helpers-tamagui": "1.115.1",
|
|
42
|
+
"@tamagui/stacks": "1.115.1",
|
|
43
|
+
"@tamagui/text": "1.115.1",
|
|
44
|
+
"@tamagui/web": "1.115.1"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
|
-
"@tamagui/build": "1.
|
|
47
|
+
"@tamagui/build": "1.115.1",
|
|
47
48
|
"react": "^18.2.0 || ^19.0.0"
|
|
48
49
|
},
|
|
49
50
|
"publishConfig": {
|
package/dist/cjs/ListItem.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
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 ListItem_exports = {};
|
|
16
|
-
__export(ListItem_exports, {
|
|
17
|
-
ListItem: () => ListItem2,
|
|
18
|
-
ListItemFrame: () => ListItemFrame,
|
|
19
|
-
ListItemSubtitle: () => ListItemSubtitle,
|
|
20
|
-
ListItemText: () => ListItemText,
|
|
21
|
-
ListItemTitle: () => ListItemTitle,
|
|
22
|
-
useListItem: () => useListItem
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(ListItem_exports);
|
|
25
|
-
var import_font_size = require("@tamagui/font-size"), import_get_font_sized = require("@tamagui/get-font-sized"), import_get_token = require("@tamagui/get-token"), import_helpers = require("@tamagui/helpers"), import_helpers_tamagui = require("@tamagui/helpers-tamagui"), import_stacks = require("@tamagui/stacks"), import_text = require("@tamagui/text"), import_web = require("@tamagui/web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
-
const NAME = "ListItem", ListItemFrame = (0, import_web.styled)(import_stacks.ThemeableStack, {
|
|
27
|
-
name: NAME,
|
|
28
|
-
tag: "li",
|
|
29
|
-
variants: {
|
|
30
|
-
unstyled: {
|
|
31
|
-
false: {
|
|
32
|
-
size: "$true",
|
|
33
|
-
alignItems: "center",
|
|
34
|
-
justifyContent: "space-between",
|
|
35
|
-
flexWrap: "nowrap",
|
|
36
|
-
width: "100%",
|
|
37
|
-
borderColor: "$borderColor",
|
|
38
|
-
maxWidth: "100%",
|
|
39
|
-
overflow: "hidden",
|
|
40
|
-
flexDirection: "row",
|
|
41
|
-
backgroundColor: "$background",
|
|
42
|
-
cursor: "default"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
size: {
|
|
46
|
-
"...size": (val, { tokens }) => ({
|
|
47
|
-
minHeight: tokens.size[val],
|
|
48
|
-
paddingHorizontal: tokens.space[val],
|
|
49
|
-
paddingVertical: (0, import_get_token.getSpace)(tokens.space[val], {
|
|
50
|
-
shift: -4
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
},
|
|
54
|
-
active: {
|
|
55
|
-
true: {
|
|
56
|
-
hoverStyle: {
|
|
57
|
-
backgroundColor: "$background"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
disabled: {
|
|
62
|
-
true: {
|
|
63
|
-
opacity: 0.5,
|
|
64
|
-
// TODO breaking types
|
|
65
|
-
pointerEvents: "none"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
defaultVariants: {
|
|
70
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
71
|
-
}
|
|
72
|
-
}), ListItemText = (0, import_web.styled)(import_text.SizableText, {
|
|
73
|
-
name: "ListItemText",
|
|
74
|
-
variants: {
|
|
75
|
-
unstyled: {
|
|
76
|
-
false: {
|
|
77
|
-
color: "$color",
|
|
78
|
-
size: "$true",
|
|
79
|
-
flexGrow: 1,
|
|
80
|
-
flexShrink: 1,
|
|
81
|
-
ellipse: !0,
|
|
82
|
-
cursor: "inherit"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
defaultVariants: {
|
|
87
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
88
|
-
}
|
|
89
|
-
}), ListItemSubtitle = (0, import_web.styled)(ListItemText, {
|
|
90
|
-
name: "ListItemSubtitle",
|
|
91
|
-
variants: {
|
|
92
|
-
unstyled: {
|
|
93
|
-
false: {
|
|
94
|
-
opacity: 0.6,
|
|
95
|
-
maxWidth: "100%",
|
|
96
|
-
color: "$color"
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
size: {
|
|
100
|
-
"...size": (val, extras) => {
|
|
101
|
-
const oneSmaller = (0, import_get_token.getSize)(val, {
|
|
102
|
-
shift: -1,
|
|
103
|
-
excludeHalfSteps: !0
|
|
104
|
-
});
|
|
105
|
-
return (0, import_get_font_sized.getFontSized)(oneSmaller.key, extras);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
defaultVariants: {
|
|
110
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
111
|
-
}
|
|
112
|
-
}), ListItemTitle = (0, import_web.styled)(ListItemText, {
|
|
113
|
-
name: "ListItemTitle"
|
|
114
|
-
}), useListItem = (propsIn, {
|
|
115
|
-
Text = ListItemText,
|
|
116
|
-
Subtitle = ListItemSubtitle,
|
|
117
|
-
Title = ListItemTitle
|
|
118
|
-
} = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }) => {
|
|
119
|
-
const props = (0, import_web.useProps)(propsIn, {
|
|
120
|
-
resolveValues: "none"
|
|
121
|
-
}), {
|
|
122
|
-
children,
|
|
123
|
-
icon,
|
|
124
|
-
iconAfter,
|
|
125
|
-
noTextWrap,
|
|
126
|
-
theme: themeName,
|
|
127
|
-
space,
|
|
128
|
-
spaceFlex,
|
|
129
|
-
scaleIcon = 1,
|
|
130
|
-
scaleSpace = 1,
|
|
131
|
-
unstyled = !1,
|
|
132
|
-
subTitle,
|
|
133
|
-
title,
|
|
134
|
-
// text props
|
|
135
|
-
color,
|
|
136
|
-
fontWeight,
|
|
137
|
-
fontSize,
|
|
138
|
-
fontFamily,
|
|
139
|
-
letterSpacing,
|
|
140
|
-
textAlign,
|
|
141
|
-
ellipse,
|
|
142
|
-
...rest
|
|
143
|
-
} = props, textProps = {
|
|
144
|
-
color,
|
|
145
|
-
fontWeight,
|
|
146
|
-
fontSize,
|
|
147
|
-
fontFamily,
|
|
148
|
-
letterSpacing,
|
|
149
|
-
textAlign,
|
|
150
|
-
ellipse,
|
|
151
|
-
children
|
|
152
|
-
}, size = props.size || "$true", iconSize = (0, import_font_size.getFontSize)(size) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({ size: iconSize, color }), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), sizeToken = (0, import_web.getTokens)().space[props.space] ?? iconSize, spaceSize = (0, import_web.getVariableValue)(sizeToken) * scaleSpace, contents = (0, import_text.wrapChildrenInText)(Text, textProps);
|
|
153
|
-
return {
|
|
154
|
-
props: {
|
|
155
|
-
...rest,
|
|
156
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
157
|
-
themedIcon ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
158
|
-
themedIcon,
|
|
159
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.Spacer, { size: spaceSize })
|
|
160
|
-
] }) : null,
|
|
161
|
-
title || subTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.YStack, { flex: 1, children: [
|
|
162
|
-
noTextWrap === "all" ? title : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Title, { size, children: title }),
|
|
163
|
-
subTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: typeof subTitle == "string" && noTextWrap !== "all" ? (
|
|
164
|
-
// TODO can use theme but we need to standardize to alt themes
|
|
165
|
-
// or standardize on subtle colors in themes
|
|
166
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Subtitle, { unstyled, size, children: subTitle })
|
|
167
|
-
) : subTitle }) : null,
|
|
168
|
-
contents
|
|
169
|
-
] }) : contents,
|
|
170
|
-
themedIconAfter ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
171
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.Spacer, { size: spaceSize }),
|
|
172
|
-
themedIconAfter
|
|
173
|
-
] }) : null
|
|
174
|
-
] })
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
}, ListItemComponent = ListItemFrame.styleable(
|
|
178
|
-
function(props, ref) {
|
|
179
|
-
const { props: listItemProps } = useListItem(props);
|
|
180
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListItemFrame, { ref, ...listItemProps });
|
|
181
|
-
}
|
|
182
|
-
), ListItem2 = (0, import_helpers.withStaticProperties)(ListItemComponent, {
|
|
183
|
-
Text: ListItemText,
|
|
184
|
-
Subtitle: ListItemSubtitle
|
|
185
|
-
});
|
|
186
|
-
//# sourceMappingURL=ListItem.js.map
|
package/dist/cjs/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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("./ListItem"), module.exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
File without changes
|
|
File without changes
|