@tamagui/list-item 2.7.7 → 3.0.0-beta.643.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.
@@ -1,256 +1,185 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var ListItem_exports = {};
24
23
  __export(ListItem_exports, {
25
- ListItem: () => ListItem2
24
+ ListItem: () => ListItem2,
25
+ listItemSizeVariant: () => listItemSizeVariant
26
26
  });
27
27
  module.exports = __toCommonJS(ListItem_exports);
28
- var import_font_size = require("@tamagui/font-size");
29
28
  var import_get_font_sized = require("@tamagui/get-font-sized");
30
29
  var import_get_token = require("@tamagui/get-token");
31
30
  var import_helpers = require("@tamagui/helpers");
32
31
  var import_helpers_tamagui = require("@tamagui/helpers-tamagui");
33
32
  var import_stacks = require("@tamagui/stacks");
33
+ var import_size = require("@tamagui/size");
34
34
  var import_text = require("@tamagui/text");
35
35
  var import_web = require("@tamagui/web");
36
36
  var import_jsx_runtime = require("react/jsx-runtime");
37
37
  const NAME = "ListItem";
38
38
  const context = (0, import_web.createStyledContext)({
39
- size: void 0,
40
- variant: void 0,
41
- color: void 0
39
+ size: void 0,
40
+ variant: void 0,
41
+ color: void 0
42
42
  });
43
+ const listItemSizeVariant = (val, { tokens }) => {
44
+ const sizeToken = (0, import_size.resolveSizeToken)(val, "size");
45
+ const spaceToken = (0, import_size.resolveSizeToken)(val, "space");
46
+ const size = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken];
47
+ const sizeVal = (0, import_web.getVariableValue)(size);
48
+ return {
49
+ minHeight: size,
50
+ paddingHorizontal: tokens.space[spaceToken],
51
+ paddingVertical: Math.max(0, Math.round(sizeVal * .36 - 9)),
52
+ gap: (0, import_helpers_tamagui.getThemedIconSize)(sizeToken, .4)
53
+ };
54
+ };
55
+ const listItemSubtitleSizeVariant = (val, extras) => {
56
+ const fontSizeToken = (0, import_size.resolveSizeToken)(val, "fontSize");
57
+ const oneSmaller = (0, import_get_token.oneSizeTokenSmaller)(fontSizeToken);
58
+ return (0, import_get_font_sized.getFontSized)(oneSmaller, extras);
59
+ };
43
60
  const ListItemFrame = (0, import_web.styled)(import_web.View, {
44
- context,
45
- name: NAME,
46
- render: "li",
47
- role: "listitem",
48
- variants: {
49
- unstyled: {
50
- false: {
51
- size: "$true",
52
- alignItems: "center",
53
- justifyContent: "space-between",
54
- flexWrap: "nowrap",
55
- borderColor: "$borderColor",
56
- width: "100%",
57
- maxWidth: "100%",
58
- overflow: "hidden",
59
- flexDirection: "row",
60
- backgroundColor: "$background",
61
- cursor: "default",
62
- hoverStyle: {
63
- backgroundColor: "$backgroundHover",
64
- borderColor: "$borderColorHover"
65
- },
66
- pressStyle: {
67
- backgroundColor: "$backgroundPress",
68
- borderColor: "$borderColorPress"
69
- }
70
- }
71
- },
72
- variant: {
73
- outlined: process.env.TAMAGUI_HEADLESS === "1" ? {} : {
74
- backgroundColor: "transparent",
75
- borderWidth: 1,
76
- borderColor: "$borderColor",
77
- hoverStyle: {
78
- backgroundColor: "transparent",
79
- borderColor: "$borderColorHover"
80
- },
81
- pressStyle: {
82
- backgroundColor: "transparent",
83
- borderColor: "$borderColorPress"
84
- }
85
- }
86
- },
87
- size: {
88
- "...size": (val, {
89
- tokens
90
- }) => {
91
- return {
92
- minHeight: tokens.size[val],
93
- paddingHorizontal: tokens.space[val],
94
- paddingVertical: (0, import_get_token.getSpace)(tokens.space[val], {
95
- shift: -4
96
- })
97
- };
98
- }
99
- },
100
- active: {
101
- true: {
102
- hoverStyle: {
103
- backgroundColor: "$background"
104
- }
105
- }
106
- },
107
- disabled: {
108
- true: {
109
- opacity: 0.5,
110
- pointerEvents: "none"
111
- }
112
- }
113
- },
114
- defaultVariants: {
115
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
116
- }
61
+ context,
62
+ displayName: NAME,
63
+ render: "li",
64
+ role: "listitem",
65
+ size: true,
66
+ alignItems: "center",
67
+ justifyContent: "space-between",
68
+ flexWrap: "nowrap",
69
+ width: "100%",
70
+ maxWidth: "100%",
71
+ overflow: "hidden",
72
+ flexDirection: "row",
73
+ variants: {
74
+ size: {
75
+ true: listItemSizeVariant,
76
+ Size: listItemSizeVariant
77
+ },
78
+ disabled: { true: { pointerEvents: "none" } }
79
+ }
117
80
  });
118
81
  const ListItemText = (0, import_web.styled)(import_text.SizableText, {
119
- context,
120
- name: "ListItemText",
121
- variants: {
122
- unstyled: {
123
- false: {
124
- color: "$color",
125
- size: "$true",
126
- flexGrow: 1,
127
- flexShrink: 1,
128
- ellipsis: true,
129
- cursor: "inherit"
130
- }
131
- }
132
- },
133
- defaultVariants: {
134
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
135
- }
82
+ context,
83
+ displayName: "ListItemText",
84
+ size: true,
85
+ flexGrow: 1,
86
+ flexShrink: 1,
87
+ ellipsis: true,
88
+ cursor: "inherit"
136
89
  });
137
90
  const ListItemSubtitle = (0, import_web.styled)(ListItemText, {
138
- name: "ListItemSubtitle",
139
- context,
140
- variants: {
141
- unstyled: {
142
- false: {
143
- opacity: 0.6,
144
- maxWidth: "100%",
145
- color: "$color"
146
- }
147
- },
148
- size: {
149
- "...size": (val, extras) => {
150
- const oneSmaller = (0, import_get_token.getSize)(val, {
151
- shift: -1,
152
- excludeHalfSteps: true
153
- });
154
- const fontStyle = (0, import_get_font_sized.getFontSized)(oneSmaller.key, extras);
155
- return fontStyle;
156
- }
157
- }
158
- },
159
- defaultVariants: {
160
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
161
- }
91
+ displayName: "ListItemSubtitle",
92
+ context,
93
+ opacity: .6,
94
+ maxWidth: "100%",
95
+ variants: { size: {
96
+ true: listItemSubtitleSizeVariant,
97
+ Size: listItemSubtitleSizeVariant
98
+ } }
162
99
  });
163
100
  const ListItemTitle = (0, import_web.styled)(ListItemText, {
164
- name: "ListItemTitle",
165
- context,
166
- variants: {
167
- unstyled: {
168
- false: {}
169
- }
170
- },
171
- defaultVariants: {
172
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
173
- }
101
+ displayName: "ListItemTitle",
102
+ context
174
103
  });
175
- const ListItemIcon = props => {
176
- const {
177
- children,
178
- size,
179
- scaleIcon = 1
180
- } = props;
181
- const styledContext = context.useStyledContext();
182
- if (!styledContext) {
183
- throw new Error("ListItem.Icon must be used within a ListItem");
184
- }
185
- const sizeToken = size ?? styledContext.size ?? "$true";
186
- const iconColor = (0, import_helpers_tamagui.useCurrentColor)(styledContext.color);
187
- const iconSize = (0, import_font_size.getFontSize)(sizeToken) * scaleIcon;
188
- return (0, import_helpers_tamagui.getIcon)(children, {
189
- size: iconSize,
190
- color: iconColor
191
- });
104
+ const ListItemIcon = (props) => {
105
+ const { children, size, scaleIcon = 1 } = props;
106
+ const styledContext = context.useStyledContext();
107
+ if (!styledContext) {
108
+ throw new Error("ListItem.Icon must be used within a ListItem");
109
+ }
110
+ const sizeToken = size ?? styledContext.size ?? true;
111
+ const contextColor = styledContext.color;
112
+ const iconColorProp = contextColor === "unset" || typeof contextColor === "number" ? void 0 : contextColor;
113
+ const iconSize = (0, import_helpers_tamagui.getThemedIconSize)(sizeToken, scaleIcon);
114
+ const getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
115
+ size: iconSize,
116
+ color: iconColorProp
117
+ });
118
+ return getThemedIcon(children);
192
119
  };
193
- const ListItemComponent = ListItemFrame.styleable(function ListItem(propsIn, ref) {
194
- const {
195
- children,
196
- icon,
197
- iconAfter,
198
- scaleIcon = 1,
199
- unstyled = false,
200
- subTitle,
201
- title,
202
- iconSize,
203
- ...rest
204
- } = propsIn;
205
- const size = propsIn.size || "$true";
206
- const styledContext = context.useStyledContext();
207
- const iconColor = (0, import_helpers_tamagui.useCurrentColor)(styledContext?.color);
208
- const iconSizeNumber = (0, import_font_size.getFontSize)(iconSize || size) * scaleIcon;
209
- const iconSpacing = iconSizeNumber * 0.4;
210
- const themedIcon = icon ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_web.View, {
211
- marginRight: iconSpacing,
212
- children: (0, import_helpers_tamagui.getIcon)(icon, {
213
- size: iconSizeNumber,
214
- color: iconColor
215
- })
216
- }) : null;
217
- const themedIconAfter = iconAfter ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_web.View, {
218
- marginLeft: iconSpacing,
219
- children: (0, import_helpers_tamagui.getIcon)(iconAfter, {
220
- size: iconSizeNumber,
221
- color: iconColor
222
- })
223
- }) : null;
224
- const wrappedChildren = (0, import_text.wrapChildrenInText)(ListItemText, {
225
- children
226
- }, propsIn.unstyled !== true ? {
227
- unstyled: process.env.TAMAGUI_HEADLESS === "1",
228
- fontSize: propsIn.size
229
- } : void 0);
230
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(ListItemFrame, {
231
- ref,
232
- ...rest,
233
- children: [themedIcon, title || subTitle ? /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_stacks.YStack, {
234
- flex: 1,
235
- children: [title ? typeof title === "string" ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(ListItemTitle, {
236
- unstyled,
237
- size,
238
- children: title
239
- }) : title : null, subTitle ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
240
- children: typeof subTitle === "string" ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(ListItemSubtitle, {
241
- unstyled,
242
- size,
243
- children: subTitle
244
- }) : subTitle
245
- }) : null, wrappedChildren]
246
- }) : wrappedChildren, themedIconAfter]
247
- });
120
+ const ListItemComponent = (0, import_web.createStyledHOC)(ListItemFrame, function ListItem(propsIn, ref) {
121
+ const processedProps = (0, import_web.useProps)(propsIn, {
122
+ noNormalize: true,
123
+ noExpand: true
124
+ });
125
+ const { children, icon, iconAfter, scaleIcon = 1, subTitle, title, iconSize, color, ...rest } = processedProps;
126
+ const styledContext = context.useStyledContext();
127
+ const size = rest.size ?? propsIn.size ?? styledContext?.size ?? true;
128
+ const contextColor = color ?? propsIn.color ?? styledContext?.color;
129
+ const iconColorProp = contextColor === "unset" || typeof contextColor === "number" ? void 0 : contextColor;
130
+ const iconSizeNumber = (0, import_helpers_tamagui.getThemedIconSize)(iconSize ?? size, scaleIcon);
131
+ const getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
132
+ size: iconSizeNumber,
133
+ color: iconColorProp
134
+ });
135
+ const themedIcon = icon ? getThemedIcon(icon) : null;
136
+ const themedIconAfter = iconAfter ? getThemedIcon(iconAfter) : null;
137
+ const wrappedChildren = (0, import_text.wrapChildrenInText)(ListItemText, { children }, { size });
138
+ const listItemContext = {
139
+ ...styledContext,
140
+ color: contextColor,
141
+ size,
142
+ variant: rest.variant ?? propsIn.variant ?? styledContext?.variant
143
+ };
144
+ const frameProps = {
145
+ size,
146
+ variant: listItemContext.variant,
147
+ ...rest
148
+ };
149
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(context.Provider, {
150
+ ...listItemContext,
151
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListItemFrame, {
152
+ ref,
153
+ ...frameProps,
154
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(context.Provider, {
155
+ ...listItemContext,
156
+ children: [
157
+ themedIcon,
158
+ title || subTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.YStack, {
159
+ flex: 1,
160
+ children: [
161
+ title ? typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListItemTitle, {
162
+ size,
163
+ children: title
164
+ }) : title : null,
165
+ subTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: typeof subTitle === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListItemSubtitle, {
166
+ size,
167
+ children: subTitle
168
+ }) : subTitle }) : null,
169
+ wrappedChildren
170
+ ]
171
+ }) : wrappedChildren,
172
+ themedIconAfter
173
+ ]
174
+ })
175
+ })
176
+ });
248
177
  });
249
178
  const ListItem2 = (0, import_helpers.withStaticProperties)(ListItemComponent, {
250
- Apply: context.Provider,
251
- Frame: ListItemFrame,
252
- Text: ListItemText,
253
- Subtitle: ListItemSubtitle,
254
- Icon: ListItemIcon,
255
- Title: ListItemTitle
256
- });
179
+ Apply: context.Provider,
180
+ Frame: ListItemFrame,
181
+ Text: ListItemText,
182
+ Subtitle: ListItemSubtitle,
183
+ Icon: ListItemIcon,
184
+ Title: ListItemTitle
185
+ });
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var ListItem_exports = {};
25
+ __export(ListItem_exports, {
26
+ ListItem: () => ListItem2,
27
+ listItemSizeVariant: () => listItemSizeVariant
28
+ });
29
+ module.exports = __toCommonJS(ListItem_exports);
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var import_get_font_sized = require("@tamagui/get-font-sized");
32
+ var import_get_token = require("@tamagui/get-token");
33
+ var import_helpers = require("@tamagui/helpers");
34
+ var import_helpers_tamagui = require("@tamagui/helpers-tamagui");
35
+ var import_stacks = require("@tamagui/stacks");
36
+ var import_size = require("@tamagui/size");
37
+ var import_text = require("@tamagui/text");
38
+ var import_web = require("@tamagui/web");
39
+ var NAME = "ListItem";
40
+ var context = (0, import_web.createStyledContext)({
41
+ size: void 0,
42
+ variant: void 0,
43
+ color: void 0
44
+ });
45
+ var listItemSizeVariant = function(val, param) {
46
+ var { tokens } = param;
47
+ var sizeToken = (0, import_size.resolveSizeToken)(val, "size");
48
+ var spaceToken = (0, import_size.resolveSizeToken)(val, "space");
49
+ var size = typeof sizeToken === "number" ? sizeToken : tokens.size[sizeToken];
50
+ var sizeVal = (0, import_web.getVariableValue)(size);
51
+ return {
52
+ minHeight: size,
53
+ paddingHorizontal: tokens.space[spaceToken],
54
+ paddingVertical: Math.max(0, Math.round(sizeVal * .36 - 9)),
55
+ gap: (0, import_helpers_tamagui.getThemedIconSize)(sizeToken, .4)
56
+ };
57
+ };
58
+ var listItemSubtitleSizeVariant = function(val, extras) {
59
+ var fontSizeToken = (0, import_size.resolveSizeToken)(val, "fontSize");
60
+ var oneSmaller = (0, import_get_token.oneSizeTokenSmaller)(fontSizeToken);
61
+ return (0, import_get_font_sized.getFontSized)(oneSmaller, extras);
62
+ };
63
+ var ListItemFrame = (0, import_web.styled)(import_web.View, {
64
+ context,
65
+ displayName: NAME,
66
+ render: "li",
67
+ role: "listitem",
68
+ size: true,
69
+ alignItems: "center",
70
+ justifyContent: "space-between",
71
+ flexWrap: "nowrap",
72
+ width: "100%",
73
+ maxWidth: "100%",
74
+ overflow: "hidden",
75
+ flexDirection: "row",
76
+ variants: {
77
+ size: {
78
+ true: listItemSizeVariant,
79
+ Size: listItemSizeVariant
80
+ },
81
+ disabled: { true: { pointerEvents: "none" } }
82
+ }
83
+ });
84
+ var ListItemText = (0, import_web.styled)(import_text.SizableText, {
85
+ context,
86
+ displayName: "ListItemText",
87
+ size: true,
88
+ flexGrow: 1,
89
+ flexShrink: 1,
90
+ ellipsis: true,
91
+ cursor: "inherit"
92
+ });
93
+ var ListItemSubtitle = (0, import_web.styled)(ListItemText, {
94
+ displayName: "ListItemSubtitle",
95
+ context,
96
+ opacity: .6,
97
+ maxWidth: "100%",
98
+ variants: { size: {
99
+ true: listItemSubtitleSizeVariant,
100
+ Size: listItemSubtitleSizeVariant
101
+ } }
102
+ });
103
+ var ListItemTitle = (0, import_web.styled)(ListItemText, {
104
+ displayName: "ListItemTitle",
105
+ context
106
+ });
107
+ var ListItemIcon = function(props) {
108
+ var { children, size, scaleIcon = 1 } = props;
109
+ var styledContext = context.useStyledContext();
110
+ if (!styledContext) {
111
+ throw new Error("ListItem.Icon must be used within a ListItem");
112
+ }
113
+ var _ref;
114
+ var sizeToken = (_ref = size !== null && size !== void 0 ? size : styledContext.size) !== null && _ref !== void 0 ? _ref : true;
115
+ var contextColor = styledContext.color;
116
+ var iconColorProp = contextColor === "unset" || typeof contextColor === "number" ? void 0 : contextColor;
117
+ var iconSize = (0, import_helpers_tamagui.getThemedIconSize)(sizeToken, scaleIcon);
118
+ var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
119
+ size: iconSize,
120
+ color: iconColorProp
121
+ });
122
+ return getThemedIcon(children);
123
+ };
124
+ var ListItemComponent = (0, import_web.createStyledHOC)(ListItemFrame, function ListItem(propsIn, ref) {
125
+ var processedProps = (0, import_web.useProps)(propsIn, {
126
+ noNormalize: true,
127
+ noExpand: true
128
+ });
129
+ var { children, icon, iconAfter, scaleIcon = 1, subTitle, title, iconSize, color, ...rest } = processedProps;
130
+ var styledContext = context.useStyledContext();
131
+ var _rest_size, _ref, _ref1;
132
+ var size = (_ref1 = (_ref = (_rest_size = rest.size) !== null && _rest_size !== void 0 ? _rest_size : propsIn.size) !== null && _ref !== void 0 ? _ref : styledContext === null || styledContext === void 0 ? void 0 : styledContext.size) !== null && _ref1 !== void 0 ? _ref1 : true;
133
+ var _ref2;
134
+ var contextColor = (_ref2 = color !== null && color !== void 0 ? color : propsIn.color) !== null && _ref2 !== void 0 ? _ref2 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.color;
135
+ var iconColorProp = contextColor === "unset" || typeof contextColor === "number" ? void 0 : contextColor;
136
+ var iconSizeNumber = (0, import_helpers_tamagui.getThemedIconSize)(iconSize !== null && iconSize !== void 0 ? iconSize : size, scaleIcon);
137
+ var getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
138
+ size: iconSizeNumber,
139
+ color: iconColorProp
140
+ });
141
+ var themedIcon = icon ? getThemedIcon(icon) : null;
142
+ var themedIconAfter = iconAfter ? getThemedIcon(iconAfter) : null;
143
+ var wrappedChildren = (0, import_text.wrapChildrenInText)(ListItemText, { children }, { size });
144
+ var _rest_variant, _ref3;
145
+ var listItemContext = {
146
+ ...styledContext,
147
+ color: contextColor,
148
+ size,
149
+ variant: (_ref3 = (_rest_variant = rest.variant) !== null && _rest_variant !== void 0 ? _rest_variant : propsIn.variant) !== null && _ref3 !== void 0 ? _ref3 : styledContext === null || styledContext === void 0 ? void 0 : styledContext.variant
150
+ };
151
+ var frameProps = {
152
+ size,
153
+ variant: listItemContext.variant,
154
+ ...rest
155
+ };
156
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(context.Provider, {
157
+ ...listItemContext,
158
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListItemFrame, {
159
+ ref,
160
+ ...frameProps,
161
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(context.Provider, {
162
+ ...listItemContext,
163
+ children: [
164
+ themedIcon,
165
+ title || subTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stacks.YStack, {
166
+ flex: 1,
167
+ children: [
168
+ title ? typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListItemTitle, {
169
+ size,
170
+ children: title
171
+ }) : title : null,
172
+ subTitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: typeof subTitle === "string" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListItemSubtitle, {
173
+ size,
174
+ children: subTitle
175
+ }) : subTitle }) : null,
176
+ wrappedChildren
177
+ ]
178
+ }) : wrappedChildren,
179
+ themedIconAfter
180
+ ]
181
+ })
182
+ })
183
+ });
184
+ });
185
+ var ListItem2 = (0, import_helpers.withStaticProperties)(ListItemComponent, {
186
+ Apply: context.Provider,
187
+ Frame: ListItemFrame,
188
+ Text: ListItemText,
189
+ Subtitle: ListItemSubtitle,
190
+ Icon: ListItemIcon,
191
+ Title: ListItemTitle
192
+ });