tamagui 1.74.13 → 1.74.14
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/native.js +179 -152
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +179 -152
- package/dist/test.native.js.map +3 -3
- package/package.json +52 -52
- package/types/views/Anchor.d.ts +1 -24
- package/types/views/Anchor.d.ts.map +1 -1
- package/types/views/Input.d.ts +6 -3
- package/types/views/Input.d.ts.map +1 -1
- package/types/views/TextArea.d.ts +4 -1
- package/types/views/TextArea.d.ts.map +1 -1
- package/dist/cjs/views/Grid.js +0 -62
- package/dist/cjs/views/Grid.js.map +0 -6
- package/dist/cjs/views/Grid.native.js +0 -63
- package/dist/cjs/views/Grid.native.js.map +0 -6
- package/dist/esm/views/Grid.js +0 -37
- package/dist/esm/views/Grid.js.map +0 -6
- package/dist/esm/views/Grid.native.js +0 -37
- package/dist/esm/views/Grid.native.js.map +0 -6
- package/dist/jsx/views/Grid.js +0 -28
- package/dist/jsx/views/Grid.js.map +0 -6
- package/dist/jsx/views/Grid.native.js +0 -28
- package/dist/jsx/views/Grid.native.js.map +0 -6
package/dist/native.js
CHANGED
|
@@ -1177,7 +1177,19 @@ var require_useMedia_native = __commonJS({
|
|
|
1177
1177
|
}
|
|
1178
1178
|
}
|
|
1179
1179
|
) : {}
|
|
1180
|
-
), mediaQueryConfig3 = {}, getMedia3 = () => mediaState3, mediaKeys = /* @__PURE__ */ new Set(), isMediaKey = (key) =>
|
|
1180
|
+
), mediaQueryConfig3 = {}, getMedia3 = () => mediaState3, mediaKeys = /* @__PURE__ */ new Set(), isMediaKey = (key) => {
|
|
1181
|
+
if (mediaKeys.has(key))
|
|
1182
|
+
return !0;
|
|
1183
|
+
if (key[0] === "$") {
|
|
1184
|
+
if (key.startsWith("$platform-"))
|
|
1185
|
+
return "platform";
|
|
1186
|
+
if (key.startsWith("$theme-"))
|
|
1187
|
+
return "theme";
|
|
1188
|
+
if (key.startsWith("$group-"))
|
|
1189
|
+
return "group";
|
|
1190
|
+
}
|
|
1191
|
+
return !1;
|
|
1192
|
+
}, initState, defaultMediaImportance = Object.keys(import_pseudoDescriptors.pseudoDescriptors).length, mediaKeysOrdered, getMediaKeyImportance = (key) => {
|
|
1181
1193
|
if (process.env.NODE_ENV === "development" && key[0] === "$")
|
|
1182
1194
|
throw new Error("use short key");
|
|
1183
1195
|
return (0, import_config.getConfig)().settings.mediaPropOrder ? defaultMediaImportance : mediaKeysOrdered.indexOf(key) + 100;
|
|
@@ -1661,11 +1673,11 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
1661
1673
|
module2.exports = __toCommonJS2(createMediaStyle_exports);
|
|
1662
1674
|
var import_config = require_config_native(), import_useMedia = require_useMedia_native(), import_getGroupPropParts = require_getGroupPropParts_native(), MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMap = {
|
|
1663
1675
|
press: "active"
|
|
1664
|
-
}, createMediaStyle = (styleObject, mediaKeyIn, mediaQueries, negate, priority) => {
|
|
1665
|
-
let { property, identifier, rules } = styleObject, conf = (0, import_config.getConfig)(), enableMediaPropOrder = conf.settings.mediaPropOrder,
|
|
1676
|
+
}, createMediaStyle = (styleObject, mediaKeyIn, mediaQueries, type, negate, priority) => {
|
|
1677
|
+
let { property, identifier, rules } = styleObject, conf = (0, import_config.getConfig)(), enableMediaPropOrder = conf.settings.mediaPropOrder, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`, styleRule = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map((rule) => rule.replace(identifier, nextIdentifier)).join(";");
|
|
1666
1678
|
if (isNonWindowMedia) {
|
|
1667
1679
|
let precedenceImportancePrefix = new Array((priority || 0) + (isGroup ? 1 : 0)).fill(":root").join("");
|
|
1668
|
-
if (
|
|
1680
|
+
if (isTheme || isGroup) {
|
|
1669
1681
|
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), mediaName = groupInfo == null ? void 0 : groupInfo.name;
|
|
1670
1682
|
groupMediaKey = groupInfo == null ? void 0 : groupInfo.media, isGroup && (containerName = mediaName);
|
|
1671
1683
|
let name = (isGroup ? "group_" : "") + mediaName, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = conf.themeClassNameOnRoot ? "" : " ", pseudoSelectorName = groupInfo.pseudo ? groupPseudoToPseudoCSSMap[groupInfo.pseudo] || groupInfo.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${name}${pseudoSelector}`, nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
|
|
@@ -2879,7 +2891,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2879
2891
|
case "accessibilityRequired":
|
|
2880
2892
|
default:
|
|
2881
2893
|
}
|
|
2882
|
-
let isValidStyleKeyInit = keyInit in validStyleProps, isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = isMedia || isPseudo, isStyleProp = isMediaOrPseudo || isVariant && !styleProps.noExpand || isValidStyleKeyInit || isShorthand;
|
|
2894
|
+
let isValidStyleKeyInit = keyInit in validStyleProps, isShorthand = keyInit in shorthands, isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isShorthand || isValidStyleKeyInit || isVariant, isPseudo = keyInit in import_helpers.validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo && (0, import_useMedia.isMediaKey)(keyInit), isMediaOrPseudo = !!(isMedia || isPseudo), isStyleProp = isMediaOrPseudo || isVariant && !styleProps.noExpand || isValidStyleKeyInit || isShorthand;
|
|
2883
2895
|
if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
|
|
2884
2896
|
continue;
|
|
2885
2897
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
@@ -2926,7 +2938,7 @@ current`, {
|
|
|
2926
2938
|
if (expanded) {
|
|
2927
2939
|
for (let [key, val] of expanded)
|
|
2928
2940
|
if (!(val == null || key in usedKeys)) {
|
|
2929
|
-
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo = isMedia || isPseudo, isVariant = variants && key in variants, (inlineProps != null && inlineProps.has(key) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) && (viewProps[key] = props[key] ?? val), styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || ((_b = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _b[keyInit]))) {
|
|
2941
|
+
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key in variants, (inlineProps != null && inlineProps.has(key) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) && (viewProps[key] = props[key] ?? val), styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || ((_b = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _b[keyInit]))) {
|
|
2930
2942
|
passDownProp(viewProps, key, val, isMediaOrPseudo), process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(` - passing down prop ${key}`), console.info({ val, after: { ...viewProps[key] } }), console.groupEnd());
|
|
2931
2943
|
continue;
|
|
2932
2944
|
}
|
|
@@ -2991,8 +3003,7 @@ current`, {
|
|
|
2991
3003
|
} else if (isMedia) {
|
|
2992
3004
|
if (!val)
|
|
2993
3005
|
continue;
|
|
2994
|
-
|
|
2995
|
-
if (isPlatformMedia) {
|
|
3006
|
+
if (isMedia === "platform") {
|
|
2996
3007
|
let platform = key.slice(10);
|
|
2997
3008
|
if (
|
|
2998
3009
|
// supports web, ios, android
|
|
@@ -3037,14 +3048,15 @@ current`, {
|
|
|
3037
3048
|
style2,
|
|
3038
3049
|
mediaKeyShort,
|
|
3039
3050
|
import_useMedia.mediaQueryConfig,
|
|
3051
|
+
isMedia,
|
|
3040
3052
|
!1,
|
|
3041
3053
|
priority
|
|
3042
3054
|
);
|
|
3043
3055
|
`${style2.property}${PROP_SPLIT}${mediaKeyShort}` in usedKeys || out.identifier;
|
|
3044
3056
|
}
|
|
3045
3057
|
} else {
|
|
3046
|
-
let isThemeMedia =
|
|
3047
|
-
if (!isThemeMedia &&
|
|
3058
|
+
let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
|
|
3059
|
+
if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState3[mediaKeyShort])
|
|
3048
3060
|
continue;
|
|
3049
3061
|
let importanceBump = 0;
|
|
3050
3062
|
if (isThemeMedia) {
|
|
@@ -3821,6 +3833,7 @@ var require_Theme_native = __commonJS({
|
|
|
3821
3833
|
)), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), Theme_exports = {};
|
|
3822
3834
|
__export2(Theme_exports, {
|
|
3823
3835
|
Theme: () => Theme2,
|
|
3836
|
+
getThemeCNStyle: () => getThemeCNStyle,
|
|
3824
3837
|
useThemedChildren: () => useThemedChildren,
|
|
3825
3838
|
wrapThemeElements: () => wrapThemeElements
|
|
3826
3839
|
});
|
|
@@ -3843,7 +3856,7 @@ var require_Theme_native = __commonJS({
|
|
|
3843
3856
|
return useThemedChildren(themeState, children, props, isRoot);
|
|
3844
3857
|
});
|
|
3845
3858
|
Theme2.avoidForwardRef = !0;
|
|
3846
|
-
function useThemedChildren(themeState, children, props, isRoot = !1) {
|
|
3859
|
+
function useThemedChildren(themeState, children, props, isRoot = !1, avoidWrap = !1) {
|
|
3847
3860
|
let { themeManager, isNewTheme } = themeState, { shallow, forceClassName } = props, hasEverThemed = (0, import_react2.useRef)(!1);
|
|
3848
3861
|
if (isNewTheme && (hasEverThemed.current = !0), !(isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot))
|
|
3849
3862
|
return children;
|
|
@@ -3854,32 +3867,37 @@ var require_Theme_native = __commonJS({
|
|
|
3854
3867
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, { name: themeManager.state.parentName, children: child.props.children })
|
|
3855
3868
|
) : child));
|
|
3856
3869
|
let elementsWithContext = themeManager ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeManagerContext.ThemeManagerContext.Provider, { value: themeManager, children: next }) : next;
|
|
3857
|
-
return forceClassName === !1 ? elementsWithContext : import_constants.isWeb ? wrapThemeElements({
|
|
3870
|
+
return forceClassName === !1 ? elementsWithContext : import_constants.isWeb && !avoidWrap ? wrapThemeElements({
|
|
3858
3871
|
children: elementsWithContext,
|
|
3859
3872
|
themeState,
|
|
3860
3873
|
forceClassName,
|
|
3861
3874
|
isRoot
|
|
3862
3875
|
}) : elementsWithContext;
|
|
3863
3876
|
}
|
|
3877
|
+
function getThemeCNStyle(themeState, isRoot = !1) {
|
|
3878
|
+
var _a, _b;
|
|
3879
|
+
if (!themeState.isNewTheme)
|
|
3880
|
+
return;
|
|
3881
|
+
let themeColor = (_a = themeState.state) != null && _a.theme && themeState.isNewTheme ? (0, import_createVariable.variableToString)(themeState.state.theme.color) : "", style = themeColor ? {
|
|
3882
|
+
color: themeColor
|
|
3883
|
+
} : void 0, className = ((_b = themeState.state) == null ? void 0 : _b.className) || "";
|
|
3884
|
+
return isRoot && (className = className.replace("t_sub_theme", "")), { style, className };
|
|
3885
|
+
}
|
|
3864
3886
|
function wrapThemeElements({
|
|
3865
3887
|
children,
|
|
3866
3888
|
themeState,
|
|
3867
3889
|
forceClassName,
|
|
3868
3890
|
isRoot
|
|
3869
3891
|
}) {
|
|
3870
|
-
var _a, _b
|
|
3892
|
+
var _a, _b;
|
|
3871
3893
|
if (isRoot && forceClassName === !1)
|
|
3872
3894
|
return children;
|
|
3873
3895
|
let inverse = (_a = themeState.state) == null ? void 0 : _a.inverse;
|
|
3874
3896
|
if (!themeState.isNewTheme && !inverse && !forceClassName)
|
|
3875
3897
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "_dsp_contents is_Theme", children });
|
|
3876
|
-
let
|
|
3877
|
-
color: themeColor
|
|
3878
|
-
} : void 0, className = ((_c = themeState.state) == null ? void 0 : _c.className) || "";
|
|
3879
|
-
isRoot && (className = className.replace("t_sub_theme", ""));
|
|
3880
|
-
let themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: `${className} _dsp_contents is_Theme`, style: colorStyle, children });
|
|
3898
|
+
let { className, style } = getThemeCNStyle(themeState, isRoot), themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: `${className} _dsp_contents is_Theme`, style, children });
|
|
3881
3899
|
if (inverse != null || forceClassName) {
|
|
3882
|
-
let name = ((
|
|
3900
|
+
let name = ((_b = themeState.state) == null ? void 0 : _b.name) || "";
|
|
3883
3901
|
themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3884
3902
|
"span",
|
|
3885
3903
|
{
|
|
@@ -3897,7 +3915,7 @@ var require_Theme_native = __commonJS({
|
|
|
3897
3915
|
var require_themeable_native = __commonJS({
|
|
3898
3916
|
"../web/dist/cjs/helpers/themeable.native.js"(exports, module2) {
|
|
3899
3917
|
"use strict";
|
|
3900
|
-
var
|
|
3918
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
3901
3919
|
for (var name in all)
|
|
3902
3920
|
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
3903
3921
|
}, __copyProps2 = (to, from, except, desc) => {
|
|
@@ -3905,26 +3923,15 @@ var require_themeable_native = __commonJS({
|
|
|
3905
3923
|
for (let key of __getOwnPropNames2(from))
|
|
3906
3924
|
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
3907
3925
|
return to;
|
|
3908
|
-
},
|
|
3909
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
3910
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
3911
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
3912
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
3913
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
3914
|
-
mod
|
|
3915
|
-
)), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), themeable_exports = {};
|
|
3926
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), themeable_exports = {};
|
|
3916
3927
|
__export2(themeable_exports, {
|
|
3917
3928
|
themeable: () => themeable3
|
|
3918
3929
|
});
|
|
3919
3930
|
module2.exports = __toCommonJS2(themeable_exports);
|
|
3920
|
-
var import_react2 =
|
|
3921
|
-
function themeable3(
|
|
3931
|
+
var import_react2 = require("react"), import_Theme = require_Theme_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3932
|
+
function themeable3(Component, staticConfig) {
|
|
3922
3933
|
let withTheme = (0, import_react2.forwardRef)(function(props, ref) {
|
|
3923
|
-
let { themeInverse, theme, componentName, themeReset, ...rest } = props, element =
|
|
3924
|
-
...rest,
|
|
3925
|
-
ref,
|
|
3926
|
-
"data-disable-theme": !0
|
|
3927
|
-
});
|
|
3934
|
+
let { themeInverse, theme, componentName, themeReset, ...rest } = props, element = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Component, { ref, ...rest, "data-disable-theme": !0 });
|
|
3928
3935
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3929
3936
|
import_Theme.Theme,
|
|
3930
3937
|
{
|
|
@@ -3938,7 +3945,7 @@ var require_themeable_native = __commonJS({
|
|
|
3938
3945
|
}
|
|
3939
3946
|
);
|
|
3940
3947
|
});
|
|
3941
|
-
return withTheme.displayName = `Themed(${(
|
|
3948
|
+
return withTheme.displayName = `Themed(${(Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "Anonymous"})`, withTheme;
|
|
3942
3949
|
}
|
|
3943
3950
|
}
|
|
3944
3951
|
});
|
|
@@ -4304,6 +4311,8 @@ var require_createComponent_native = __commonJS({
|
|
|
4304
4311
|
onMouseDown,
|
|
4305
4312
|
onMouseEnter,
|
|
4306
4313
|
onMouseLeave,
|
|
4314
|
+
onFocus,
|
|
4315
|
+
onBlur,
|
|
4307
4316
|
separator,
|
|
4308
4317
|
// ignore from here on out
|
|
4309
4318
|
forceStyle: _forceStyle,
|
|
@@ -4387,7 +4396,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4387
4396
|
fontFamily && fontFamily[0] === "$" && (fontFamily = fontFamily.slice(1));
|
|
4388
4397
|
let fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "", style = avoidAnimationStyle ? splitStyles.style : animationStyles || splitStyles.style, className;
|
|
4389
4398
|
viewProps.style = style;
|
|
4390
|
-
let runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = runtimeHoverStyle || onHoverIn || onHoverOut, isHoverable = import_constants.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), handlesPressEvents = !(import_constants.isWeb || asChild), shouldAttach = !!(attachPress || isHoverable || runtimePressStyle || runtimeHoverStyle);
|
|
4399
|
+
let runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = runtimeHoverStyle || onHoverIn || onHoverOut, isHoverable = import_constants.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), handlesPressEvents = !(import_constants.isWeb || asChild), shouldAttach = !!(attachPress || isHoverable || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle);
|
|
4391
4400
|
process.env.NODE_ENV === "development" && time && time`events-setup`;
|
|
4392
4401
|
let events = shouldAttach && !isDisabled && !props.asChild ? {
|
|
4393
4402
|
onPressOut: attachPress ? (e) => {
|
|
@@ -4412,9 +4421,11 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4412
4421
|
onPress: attachPress ? (e) => {
|
|
4413
4422
|
unPress(), import_constants.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);
|
|
4414
4423
|
} : void 0,
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4424
|
+
...attachPress && onLongPress && {
|
|
4425
|
+
onLongPress: (e) => {
|
|
4426
|
+
unPress(), onLongPress == null || onLongPress(e);
|
|
4427
|
+
}
|
|
4428
|
+
}
|
|
4418
4429
|
} : null;
|
|
4419
4430
|
events && !asChild && Object.assign(events, {
|
|
4420
4431
|
cancelable: !viewProps.rejectResponderTermination,
|
|
@@ -4460,7 +4471,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4460
4471
|
}
|
|
4461
4472
|
};
|
|
4462
4473
|
}, [groupName]);
|
|
4463
|
-
if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, { groups: subGroupContext, children: content })), process.env.NODE_ENV === "development" && time && time`group-context`, content = disableThemeProp ? content : (0, import_Theme.useThemedChildren)(themeState, content, themeStateProps), process.env.NODE_ENV === "development" && time && time`themed-children`, process.env.NODE_ENV === "development" && props.debug === "visualize" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeDebug.ThemeDebug, { themeState, themeProps: props, children: content })), staticConfig.context) {
|
|
4474
|
+
if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, { groups: subGroupContext, children: content })), process.env.NODE_ENV === "development" && time && time`group-context`, content = disableThemeProp ? content : (0, import_Theme.useThemedChildren)(themeState, content, themeStateProps, !1), process.env.NODE_ENV === "development" && time && time`themed-children`, process.env.NODE_ENV === "development" && props.debug === "visualize" && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeDebug.ThemeDebug, { themeState, themeProps: props, children: content })), staticConfig.context) {
|
|
4464
4475
|
let contextProps = staticConfig.context.props;
|
|
4465
4476
|
for (let key in contextProps)
|
|
4466
4477
|
(key in style || key in viewProps) && (overriddenContextProps ||= {}, overriddenContextProps[key] = style[key] ?? viewProps[key]);
|
|
@@ -4527,12 +4538,12 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4527
4538
|
function extractable(Component2, extended) {
|
|
4528
4539
|
return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
|
|
4529
4540
|
}
|
|
4530
|
-
function styleable(Component2,
|
|
4541
|
+
function styleable(Component2, options) {
|
|
4531
4542
|
var _a2;
|
|
4532
4543
|
let ComponentForwardedRef = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (
|
|
4533
4544
|
// memo because theme changes otherwise would always re-render
|
|
4534
4545
|
(0, import_react2.memo)((0, import_react2.forwardRef)(Component2))
|
|
4535
|
-
), extendedConfig = extendStyledConfig(
|
|
4546
|
+
), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig), out = options != null && options.disableTheme ? ComponentForwardedRef : (0, import_themeable.themeable)(ComponentForwardedRef, extendedConfig);
|
|
4536
4547
|
return out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
4537
4548
|
}
|
|
4538
4549
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
@@ -5678,6 +5689,7 @@ var require_useProps_native = __commonJS({
|
|
|
5678
5689
|
mediaState: media,
|
|
5679
5690
|
noSkip: !0,
|
|
5680
5691
|
noClassNames: !0,
|
|
5692
|
+
resolveValues: "auto",
|
|
5681
5693
|
...opts
|
|
5682
5694
|
},
|
|
5683
5695
|
null,
|
|
@@ -11834,7 +11846,7 @@ var require_Button_native = __commonJS({
|
|
|
11834
11846
|
Text: ButtonText,
|
|
11835
11847
|
Icon: ButtonIcon
|
|
11836
11848
|
}), ButtonNestingContext = (0, import_react2.createContext)(!1);
|
|
11837
|
-
function useButton(propsIn, { Text: Text3 = Button2.Text } = { Text: Button2.Text }) {
|
|
11849
|
+
function useButton({ textProps, ...propsIn }, { Text: Text3 = Button2.Text } = { Text: Button2.Text }) {
|
|
11838
11850
|
let isNested = (0, import_react2.useContext)(ButtonNestingContext), didFinishSSR = (0, import_web.useDidFinishSSR)(), propsActive = (0, import_web.useProps)(propsIn), {
|
|
11839
11851
|
icon,
|
|
11840
11852
|
iconAfter,
|
|
@@ -11851,7 +11863,7 @@ var require_Button_native = __commonJS({
|
|
|
11851
11863
|
color: propsActive.color
|
|
11852
11864
|
}), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace, contents = noTextWrap ? [propsIn.children] : (0, import_text2.wrapChildrenInText)(
|
|
11853
11865
|
Text3,
|
|
11854
|
-
{ children: propsIn.children, fontFamily, fontSize },
|
|
11866
|
+
{ children: propsIn.children, fontFamily, fontSize, textProps },
|
|
11855
11867
|
Text3 === ButtonText && propsActive.unstyled !== !0 ? {
|
|
11856
11868
|
unstyled: !1,
|
|
11857
11869
|
size: size2
|
|
@@ -13423,52 +13435,51 @@ var require_ListItem_native = __commonJS({
|
|
|
13423
13435
|
ListItemSubtitle: () => ListItemSubtitle,
|
|
13424
13436
|
ListItemText: () => ListItemText,
|
|
13425
13437
|
ListItemTitle: () => ListItemTitle,
|
|
13426
|
-
listItemStaticConfig: () => listItemStaticConfig,
|
|
13427
|
-
listItemVariants: () => listItemVariants,
|
|
13428
13438
|
useListItem: () => useListItem
|
|
13429
13439
|
});
|
|
13430
13440
|
module2.exports = __toCommonJS2(ListItem_exports);
|
|
13431
|
-
var import_font_size = require_index_native40(), import_get_font_sized2 = require_index_native20(), import_get_token2 = require_index_native17(), import_helpers_tamagui = require_index_native41(), import_stacks3 = require_index_native19(), import_text2 = require_index_native21(), import_web = require_index_native9(), import_jsx_runtime6 = require("react/jsx-runtime"), NAME = "ListItem",
|
|
13432
|
-
|
|
13433
|
-
|
|
13434
|
-
|
|
13435
|
-
|
|
13436
|
-
|
|
13437
|
-
|
|
13438
|
-
|
|
13439
|
-
|
|
13440
|
-
|
|
13441
|
-
|
|
13442
|
-
|
|
13443
|
-
|
|
13444
|
-
|
|
13445
|
-
|
|
13446
|
-
"...size": (val, { tokens }) => ({
|
|
13447
|
-
minHeight: tokens.size[val],
|
|
13448
|
-
paddingHorizontal: tokens.space[val],
|
|
13449
|
-
paddingVertical: (0, import_get_token2.getSpace)(tokens.space[val], {
|
|
13450
|
-
shift: -4
|
|
13451
|
-
})
|
|
13452
|
-
})
|
|
13453
|
-
},
|
|
13454
|
-
active: {
|
|
13455
|
-
true: {
|
|
13456
|
-
hoverStyle: {
|
|
13441
|
+
var import_font_size = require_index_native40(), import_get_font_sized2 = require_index_native20(), import_get_token2 = require_index_native17(), import_helpers_tamagui = require_index_native41(), import_stacks3 = require_index_native19(), import_text2 = require_index_native21(), import_web = require_index_native9(), import_jsx_runtime6 = require("react/jsx-runtime"), NAME = "ListItem", ListItemFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
13442
|
+
name: NAME,
|
|
13443
|
+
tag: "li",
|
|
13444
|
+
variants: {
|
|
13445
|
+
unstyled: {
|
|
13446
|
+
false: {
|
|
13447
|
+
size: "$true",
|
|
13448
|
+
alignItems: "center",
|
|
13449
|
+
justifyContent: "space-between",
|
|
13450
|
+
flexWrap: "nowrap",
|
|
13451
|
+
width: "100%",
|
|
13452
|
+
borderColor: "$borderColor",
|
|
13453
|
+
maxWidth: "100%",
|
|
13454
|
+
overflow: "hidden",
|
|
13455
|
+
flexDirection: "row",
|
|
13457
13456
|
backgroundColor: "$background"
|
|
13458
13457
|
}
|
|
13458
|
+
},
|
|
13459
|
+
size: {
|
|
13460
|
+
"...size": (val, { tokens }) => ({
|
|
13461
|
+
minHeight: tokens.size[val],
|
|
13462
|
+
paddingHorizontal: tokens.space[val],
|
|
13463
|
+
paddingVertical: (0, import_get_token2.getSpace)(tokens.space[val], {
|
|
13464
|
+
shift: -4
|
|
13465
|
+
})
|
|
13466
|
+
})
|
|
13467
|
+
},
|
|
13468
|
+
active: {
|
|
13469
|
+
true: {
|
|
13470
|
+
hoverStyle: {
|
|
13471
|
+
backgroundColor: "$background"
|
|
13472
|
+
}
|
|
13473
|
+
}
|
|
13474
|
+
},
|
|
13475
|
+
disabled: {
|
|
13476
|
+
true: {
|
|
13477
|
+
opacity: 0.5,
|
|
13478
|
+
// TODO breaking types
|
|
13479
|
+
pointerEvents: "none"
|
|
13480
|
+
}
|
|
13459
13481
|
}
|
|
13460
13482
|
},
|
|
13461
|
-
disabled: {
|
|
13462
|
-
true: {
|
|
13463
|
-
opacity: 0.5,
|
|
13464
|
-
// TODO breaking types
|
|
13465
|
-
pointerEvents: "none"
|
|
13466
|
-
}
|
|
13467
|
-
}
|
|
13468
|
-
}, ListItemFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
13469
|
-
name: NAME,
|
|
13470
|
-
tag: "li",
|
|
13471
|
-
variants: listItemVariants,
|
|
13472
13483
|
defaultVariants: {
|
|
13473
13484
|
unstyled: !1
|
|
13474
13485
|
}
|
|
@@ -13577,19 +13588,8 @@ var require_ListItem_native = __commonJS({
|
|
|
13577
13588
|
};
|
|
13578
13589
|
}, ListItemComponent = ListItemFrame.styleable(function(props, ref) {
|
|
13579
13590
|
let { props: listItemProps } = useListItem(props);
|
|
13580
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ListItemFrame, { ref,
|
|
13581
|
-
}),
|
|
13582
|
-
inlineProps: /* @__PURE__ */ new Set([
|
|
13583
|
-
// text props go here (can't really optimize them, but we never fully extract listItem anyway)
|
|
13584
|
-
"color",
|
|
13585
|
-
"fontWeight",
|
|
13586
|
-
"fontSize",
|
|
13587
|
-
"fontFamily",
|
|
13588
|
-
"letterSpacing",
|
|
13589
|
-
"textAlign",
|
|
13590
|
-
"ellipse"
|
|
13591
|
-
])
|
|
13592
|
-
}, ListItem2 = (0, import_web.withStaticProperties)(ListItemComponent, {
|
|
13591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ListItemFrame, { ref, ...listItemProps });
|
|
13592
|
+
}), ListItem2 = (0, import_web.withStaticProperties)(ListItemComponent, {
|
|
13593
13593
|
Text: ListItemText,
|
|
13594
13594
|
Subtitle: ListItemSubtitle
|
|
13595
13595
|
});
|
|
@@ -16106,16 +16106,21 @@ var require_SelectItem_native = __commonJS({
|
|
|
16106
16106
|
useSelectItemContext: () => useSelectItemContext
|
|
16107
16107
|
});
|
|
16108
16108
|
module2.exports = __toCommonJS2(SelectItem_exports);
|
|
16109
|
-
var import_compose_refs = require_index_native5(), import_core13 = require_index_native15(), import_list_item = require_index_native51(), React2 = __toESM2(require("react")), import_context = require_context_native(), import_jsx_runtime6 = require("react/jsx-runtime"), ITEM_NAME = "SelectItem", [SelectItemContextProvider, useSelectItemContext] = (0, import_context.createSelectContext)(ITEM_NAME), SelectItem =
|
|
16110
|
-
(props, forwardedRef)
|
|
16109
|
+
var import_compose_refs = require_index_native5(), import_core13 = require_index_native15(), import_list_item = require_index_native51(), React2 = __toESM2(require("react")), import_context = require_context_native(), import_jsx_runtime6 = require("react/jsx-runtime"), ITEM_NAME = "SelectItem", [SelectItemContextProvider, useSelectItemContext] = (0, import_context.createSelectContext)(ITEM_NAME), SelectItem = import_list_item.ListItemFrame.styleable(
|
|
16110
|
+
function(props, forwardedRef) {
|
|
16111
16111
|
let {
|
|
16112
16112
|
__scopeSelect,
|
|
16113
16113
|
value,
|
|
16114
16114
|
disabled = !1,
|
|
16115
16115
|
textValue: textValueProp,
|
|
16116
16116
|
index,
|
|
16117
|
-
...
|
|
16118
|
-
} = props,
|
|
16117
|
+
...restProps
|
|
16118
|
+
} = props, { props: listItemProps } = (0, import_list_item.useListItem)({
|
|
16119
|
+
...!props.unstyled && {
|
|
16120
|
+
ellipse: !0
|
|
16121
|
+
},
|
|
16122
|
+
...restProps
|
|
16123
|
+
}), context = (0, import_context.useSelectItemParentContext)(ITEM_NAME, __scopeSelect), {
|
|
16119
16124
|
setSelectedIndex,
|
|
16120
16125
|
listRef,
|
|
16121
16126
|
setOpen,
|
|
@@ -16148,7 +16153,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
16148
16153
|
function handleSelect() {
|
|
16149
16154
|
setSelectedIndex(index), onChange(value), setOpen(!1);
|
|
16150
16155
|
}
|
|
16151
|
-
let selectItemProps = interactions ? interactions.getItemProps({
|
|
16156
|
+
let selectItemProps = React2.useMemo(() => interactions ? interactions.getItemProps({
|
|
16152
16157
|
onTouchMove() {
|
|
16153
16158
|
allowSelectRef.current = !0, allowMouseUpRef.current = !1;
|
|
16154
16159
|
},
|
|
@@ -16168,7 +16173,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
16168
16173
|
}
|
|
16169
16174
|
}) : {
|
|
16170
16175
|
onPress: handleSelect
|
|
16171
|
-
};
|
|
16176
|
+
}, [handleSelect]);
|
|
16172
16177
|
return (0, import_core13.useIsomorphicLayoutEffect)(() => {
|
|
16173
16178
|
var _a;
|
|
16174
16179
|
isActive && ((_a = listRef == null ? void 0 : listRef.current[index]) == null || _a.focus());
|
|
@@ -16180,7 +16185,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
16180
16185
|
textId: textId || "",
|
|
16181
16186
|
isSelected,
|
|
16182
16187
|
children: shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value, children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16183
|
-
import_list_item.
|
|
16188
|
+
import_list_item.ListItemFrame,
|
|
16184
16189
|
{
|
|
16185
16190
|
tag: "div",
|
|
16186
16191
|
componentName: ITEM_NAME,
|
|
@@ -16198,18 +16203,79 @@ var require_SelectItem_native = __commonJS({
|
|
|
16198
16203
|
focusTheme: !0,
|
|
16199
16204
|
cursor: "default",
|
|
16200
16205
|
outlineWidth: 0,
|
|
16201
|
-
size: size2
|
|
16202
|
-
ellipse: !0
|
|
16206
|
+
size: size2
|
|
16203
16207
|
},
|
|
16204
|
-
...
|
|
16208
|
+
...listItemProps,
|
|
16205
16209
|
...selectItemProps
|
|
16206
16210
|
}
|
|
16207
16211
|
)
|
|
16208
16212
|
}
|
|
16209
16213
|
);
|
|
16214
|
+
},
|
|
16215
|
+
{
|
|
16216
|
+
disableTheme: !0
|
|
16210
16217
|
}
|
|
16211
16218
|
);
|
|
16212
|
-
|
|
16219
|
+
}
|
|
16220
|
+
});
|
|
16221
|
+
|
|
16222
|
+
// ../select/dist/cjs/SelectItemText.native.js
|
|
16223
|
+
var require_SelectItemText_native = __commonJS({
|
|
16224
|
+
"../select/dist/cjs/SelectItemText.native.js"(exports, module2) {
|
|
16225
|
+
"use strict";
|
|
16226
|
+
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
16227
|
+
for (var name in all)
|
|
16228
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
16229
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
16230
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
16231
|
+
for (let key of __getOwnPropNames2(from))
|
|
16232
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
16233
|
+
return to;
|
|
16234
|
+
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
16235
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
16236
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
16237
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
16238
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
16239
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
16240
|
+
mod
|
|
16241
|
+
)), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), SelectItemText_exports = {};
|
|
16242
|
+
__export2(SelectItemText_exports, {
|
|
16243
|
+
ITEM_TEXT_NAME: () => ITEM_TEXT_NAME,
|
|
16244
|
+
SelectItemText: () => SelectItemText,
|
|
16245
|
+
SelectItemTextFrame: () => SelectItemTextFrame
|
|
16246
|
+
});
|
|
16247
|
+
module2.exports = __toCommonJS2(SelectItemText_exports);
|
|
16248
|
+
var import_compose_refs = require_index_native5(), import_core13 = require_index_native15(), import_text2 = require_index_native21(), React2 = __toESM2(require("react")), import_context = require_context_native(), import_SelectItem = require_SelectItem_native(), import_jsx_runtime6 = require("react/jsx-runtime"), ITEM_TEXT_NAME = "SelectItemText", SelectItemTextFrame = (0, import_core13.styled)(import_text2.SizableText, {
|
|
16249
|
+
name: ITEM_TEXT_NAME,
|
|
16250
|
+
variants: {
|
|
16251
|
+
unstyled: {
|
|
16252
|
+
false: {
|
|
16253
|
+
userSelect: "none",
|
|
16254
|
+
color: "$color",
|
|
16255
|
+
ellipse: !0
|
|
16256
|
+
}
|
|
16257
|
+
}
|
|
16258
|
+
},
|
|
16259
|
+
defaultVariants: {
|
|
16260
|
+
unstyled: !1
|
|
16261
|
+
}
|
|
16262
|
+
}), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
|
|
16263
|
+
let { __scopeSelect, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(ITEM_TEXT_NAME, __scopeSelect), ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_TEXT_NAME, __scopeSelect), contents = React2.useRef();
|
|
16264
|
+
return contents.current = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16265
|
+
SelectItemTextFrame,
|
|
16266
|
+
{
|
|
16267
|
+
className,
|
|
16268
|
+
size: itemParentContext.size,
|
|
16269
|
+
id: itemContext.textId,
|
|
16270
|
+
...itemTextProps,
|
|
16271
|
+
ref: composedRefs
|
|
16272
|
+
}
|
|
16273
|
+
), React2.useEffect(() => {
|
|
16274
|
+
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents.current);
|
|
16275
|
+
}, []), React2.useEffect(() => itemParentContext.valueSubscribe((val) => {
|
|
16276
|
+
val === itemContext.value && context.setSelectedItem(contents.current);
|
|
16277
|
+
}), [itemContext.value]), itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: contents.current });
|
|
16278
|
+
});
|
|
16213
16279
|
}
|
|
16214
16280
|
});
|
|
16215
16281
|
|
|
@@ -16394,11 +16460,10 @@ var require_Select_native = __commonJS({
|
|
|
16394
16460
|
Select: () => Select,
|
|
16395
16461
|
SelectGroupFrame: () => SelectGroupFrame,
|
|
16396
16462
|
SelectIcon: () => SelectIcon,
|
|
16397
|
-
SelectItemTextFrame: () => SelectItemTextFrame,
|
|
16398
16463
|
SelectSeparator: () => SelectSeparator
|
|
16399
16464
|
});
|
|
16400
16465
|
module2.exports = __toCommonJS2(Select_exports);
|
|
16401
|
-
var import_adapt = require_index_native24(), import_compose_refs = require_index_native5(), import_core13 = require_index_native15(), import_get_token2 = require_index_native17(), import_list_item = require_index_native51(), import_portal2 = require_index_native29(), import_separator = require_index_native58(), import_sheet = require_index_native34(), import_stacks3 = require_index_native19(), import_text2 = require_index_native21(), import_use_controllable_state = require_index_native12(), React2 = __toESM2(require("react")), import_constants = require_constants_native4(), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), import_jsx_runtime6 = require("react/jsx-runtime"), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core13.styled)(import_text2.SizableText, {
|
|
16466
|
+
var import_adapt = require_index_native24(), import_compose_refs = require_index_native5(), import_core13 = require_index_native15(), import_get_token2 = require_index_native17(), import_list_item = require_index_native51(), import_portal2 = require_index_native29(), import_separator = require_index_native58(), import_sheet = require_index_native34(), import_stacks3 = require_index_native19(), import_text2 = require_index_native21(), import_use_controllable_state = require_index_native12(), React2 = __toESM2(require("react")), import_constants = require_constants_native4(), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), import_jsx_runtime6 = require("react/jsx-runtime"), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core13.styled)(import_text2.SizableText, {
|
|
16402
16467
|
name: VALUE_NAME,
|
|
16403
16468
|
userSelect: "none"
|
|
16404
16469
|
}), SelectValue = SelectValueFrame.styleable(function({
|
|
@@ -16426,7 +16491,7 @@ var require_Select_native = __commonJS({
|
|
|
16426
16491
|
return React2.Children.map(selectValueChildren, (child) => {
|
|
16427
16492
|
var _a, _b, _c;
|
|
16428
16493
|
if (child) {
|
|
16429
|
-
if (((_b = (_a = child.type) == null ? void 0 : _a.staticConfig) == null ? void 0 : _b.componentName) === ITEM_TEXT_NAME)
|
|
16494
|
+
if (((_b = (_a = child.type) == null ? void 0 : _a.staticConfig) == null ? void 0 : _b.componentName) === import_SelectItemText.ITEM_TEXT_NAME)
|
|
16430
16495
|
return child.props.children;
|
|
16431
16496
|
if ((_c = child.props) != null && _c.children)
|
|
16432
16497
|
return unwrapSelectItem(child.props.children);
|
|
@@ -16439,46 +16504,8 @@ var require_Select_native = __commonJS({
|
|
|
16439
16504
|
// @ts-ignore
|
|
16440
16505
|
"aria-hidden": !0,
|
|
16441
16506
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_text2.Paragraph, { children: "\u25BC" })
|
|
16442
|
-
}),
|
|
16443
|
-
name: ITEM_TEXT_NAME
|
|
16444
|
-
variants: {
|
|
16445
|
-
unstyled: {
|
|
16446
|
-
false: {
|
|
16447
|
-
userSelect: "none",
|
|
16448
|
-
color: "$color",
|
|
16449
|
-
ellipse: !0
|
|
16450
|
-
}
|
|
16451
|
-
}
|
|
16452
|
-
},
|
|
16453
|
-
defaultVariants: {
|
|
16454
|
-
unstyled: !1
|
|
16455
|
-
}
|
|
16456
|
-
}), SelectItemText = React2.forwardRef(
|
|
16457
|
-
(props, forwardedRef) => {
|
|
16458
|
-
let { __scopeSelect, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(ITEM_TEXT_NAME, __scopeSelect), ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_TEXT_NAME, __scopeSelect), contents = React2.useMemo(
|
|
16459
|
-
() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16460
|
-
SelectItemTextFrame,
|
|
16461
|
-
{
|
|
16462
|
-
className,
|
|
16463
|
-
size: itemParentContext.size,
|
|
16464
|
-
id: itemContext.textId,
|
|
16465
|
-
...itemTextProps,
|
|
16466
|
-
ref: composedRefs
|
|
16467
|
-
}
|
|
16468
|
-
),
|
|
16469
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16470
|
-
[props, itemParentContext.size, className, itemContext.textId]
|
|
16471
|
-
);
|
|
16472
|
-
return React2.useEffect(() => {
|
|
16473
|
-
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents);
|
|
16474
|
-
}, []), React2.useEffect(() => itemParentContext.valueSubscribe((val) => {
|
|
16475
|
-
val === itemContext.value && context.setSelectedItem(contents);
|
|
16476
|
-
}), [itemContext.value]), itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: contents });
|
|
16477
|
-
}
|
|
16478
|
-
);
|
|
16479
|
-
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
16480
|
-
var ITEM_INDICATOR_NAME = "SelectItemIndicator", SelectItemIndicatorFrame = (0, import_core13.styled)(import_stacks3.XStack, {
|
|
16481
|
-
name: ITEM_TEXT_NAME
|
|
16507
|
+
}), ITEM_INDICATOR_NAME = "SelectItemIndicator", SelectItemIndicatorFrame = (0, import_core13.styled)(import_stacks3.XStack, {
|
|
16508
|
+
name: import_SelectItemText.ITEM_TEXT_NAME
|
|
16482
16509
|
}), SelectItemIndicator = React2.forwardRef(
|
|
16483
16510
|
(props, forwardedRef) => {
|
|
16484
16511
|
let { __scopeSelect, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(ITEM_INDICATOR_NAME, __scopeSelect), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
@@ -16695,7 +16722,7 @@ var require_Select_native = __commonJS({
|
|
|
16695
16722
|
Icon: SelectIcon,
|
|
16696
16723
|
Item: import_SelectItem.SelectItem,
|
|
16697
16724
|
ItemIndicator: SelectItemIndicator,
|
|
16698
|
-
ItemText: SelectItemText,
|
|
16725
|
+
ItemText: import_SelectItemText.SelectItemText,
|
|
16699
16726
|
Label: SelectLabel,
|
|
16700
16727
|
ScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,
|
|
16701
16728
|
ScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,
|