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/test.native.js
CHANGED
|
@@ -1127,7 +1127,19 @@ var require_useMedia_native = __commonJS({
|
|
|
1127
1127
|
useMediaListeners: () => useMediaListeners
|
|
1128
1128
|
});
|
|
1129
1129
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
1130
|
-
var import_constants = require_index_native2(), import_react2 = require("react"), import_config = require_config_native(), import_createProxy = require_createProxy_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), mediaState3 = {}, mediaQueryConfig3 = {}, getMedia3 = () => mediaState3, mediaKeys = /* @__PURE__ */ new Set(), isMediaKey = (key) =>
|
|
1130
|
+
var import_constants = require_index_native2(), import_react2 = require("react"), import_config = require_config_native(), import_createProxy = require_createProxy_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), mediaState3 = {}, mediaQueryConfig3 = {}, getMedia3 = () => mediaState3, mediaKeys = /* @__PURE__ */ new Set(), isMediaKey = (key) => {
|
|
1131
|
+
if (mediaKeys.has(key))
|
|
1132
|
+
return !0;
|
|
1133
|
+
if (key[0] === "$") {
|
|
1134
|
+
if (key.startsWith("$platform-"))
|
|
1135
|
+
return "platform";
|
|
1136
|
+
if (key.startsWith("$theme-"))
|
|
1137
|
+
return "theme";
|
|
1138
|
+
if (key.startsWith("$group-"))
|
|
1139
|
+
return "group";
|
|
1140
|
+
}
|
|
1141
|
+
return !1;
|
|
1142
|
+
}, initState, defaultMediaImportance = Object.keys(import_pseudoDescriptors.pseudoDescriptors).length, mediaKeysOrdered, getMediaKeyImportance = (key) => (0, import_config.getConfig)().settings.mediaPropOrder ? defaultMediaImportance : mediaKeysOrdered.indexOf(key) + 100, dispose = /* @__PURE__ */ new Set(), mediaVersion = 0, configureMedia2 = (config) => {
|
|
1131
1143
|
let { media, mediaQueryDefaultActive } = config;
|
|
1132
1144
|
if (media) {
|
|
1133
1145
|
mediaVersion++;
|
|
@@ -1606,11 +1618,11 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
1606
1618
|
module2.exports = __toCommonJS2(createMediaStyle_exports);
|
|
1607
1619
|
var import_config = require_config_native(), import_useMedia = require_useMedia_native(), import_getGroupPropParts = require_getGroupPropParts_native(), MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMap = {
|
|
1608
1620
|
press: "active"
|
|
1609
|
-
}, createMediaStyle = (styleObject, mediaKeyIn, mediaQueries, negate, priority) => {
|
|
1610
|
-
let { property, identifier, rules } = styleObject, conf = (0, import_config.getConfig)(), enableMediaPropOrder = conf.settings.mediaPropOrder,
|
|
1621
|
+
}, createMediaStyle = (styleObject, mediaKeyIn, mediaQueries, type, negate, priority) => {
|
|
1622
|
+
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(";");
|
|
1611
1623
|
if (isNonWindowMedia) {
|
|
1612
1624
|
let precedenceImportancePrefix = new Array((priority || 0) + (isGroup ? 1 : 0)).fill(":root").join("");
|
|
1613
|
-
if (
|
|
1625
|
+
if (isTheme || isGroup) {
|
|
1614
1626
|
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), mediaName = groupInfo == null ? void 0 : groupInfo.name;
|
|
1615
1627
|
groupMediaKey = groupInfo == null ? void 0 : groupInfo.media, isGroup && (containerName = mediaName);
|
|
1616
1628
|
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(
|
|
@@ -2783,7 +2795,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2783
2795
|
case "accessibilityRequired":
|
|
2784
2796
|
default:
|
|
2785
2797
|
}
|
|
2786
|
-
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;
|
|
2798
|
+
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;
|
|
2787
2799
|
if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
|
|
2788
2800
|
continue;
|
|
2789
2801
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
@@ -2802,7 +2814,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2802
2814
|
if (expanded) {
|
|
2803
2815
|
for (let [key, val] of expanded)
|
|
2804
2816
|
if (!(val == null || key in usedKeys)) {
|
|
2805
|
-
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]))) {
|
|
2817
|
+
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]))) {
|
|
2806
2818
|
passDownProp(viewProps, key, val, isMediaOrPseudo);
|
|
2807
2819
|
continue;
|
|
2808
2820
|
}
|
|
@@ -2851,8 +2863,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2851
2863
|
} else if (isMedia) {
|
|
2852
2864
|
if (!val)
|
|
2853
2865
|
continue;
|
|
2854
|
-
|
|
2855
|
-
if (isPlatformMedia) {
|
|
2866
|
+
if (isMedia === "platform") {
|
|
2856
2867
|
let platform = key.slice(10);
|
|
2857
2868
|
if (
|
|
2858
2869
|
// supports web, ios, android
|
|
@@ -2886,14 +2897,15 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
2886
2897
|
style2,
|
|
2887
2898
|
mediaKeyShort,
|
|
2888
2899
|
import_useMedia.mediaQueryConfig,
|
|
2900
|
+
isMedia,
|
|
2889
2901
|
!1,
|
|
2890
2902
|
priority
|
|
2891
2903
|
);
|
|
2892
2904
|
`${style2.property}${PROP_SPLIT}${mediaKeyShort}` in usedKeys || out.identifier;
|
|
2893
2905
|
}
|
|
2894
2906
|
} else {
|
|
2895
|
-
let isThemeMedia =
|
|
2896
|
-
if (!isThemeMedia &&
|
|
2907
|
+
let isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group";
|
|
2908
|
+
if (!isThemeMedia && isMedia !== "platform" && !isGroupMedia && !mediaState3[mediaKeyShort])
|
|
2897
2909
|
continue;
|
|
2898
2910
|
let importanceBump = 0;
|
|
2899
2911
|
if (isThemeMedia) {
|
|
@@ -3599,6 +3611,7 @@ var require_Theme_native = __commonJS({
|
|
|
3599
3611
|
)), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), Theme_exports = {};
|
|
3600
3612
|
__export2(Theme_exports, {
|
|
3601
3613
|
Theme: () => Theme2,
|
|
3614
|
+
getThemeCNStyle: () => getThemeCNStyle,
|
|
3602
3615
|
useThemedChildren: () => useThemedChildren,
|
|
3603
3616
|
wrapThemeElements: () => wrapThemeElements
|
|
3604
3617
|
});
|
|
@@ -3621,7 +3634,7 @@ var require_Theme_native = __commonJS({
|
|
|
3621
3634
|
return useThemedChildren(themeState, children, props, isRoot);
|
|
3622
3635
|
});
|
|
3623
3636
|
Theme2.avoidForwardRef = !0;
|
|
3624
|
-
function useThemedChildren(themeState, children, props, isRoot = !1) {
|
|
3637
|
+
function useThemedChildren(themeState, children, props, isRoot = !1, avoidWrap = !1) {
|
|
3625
3638
|
let { themeManager, isNewTheme } = themeState, { shallow, forceClassName } = props, hasEverThemed = (0, import_react2.useRef)(!1);
|
|
3626
3639
|
if (isNewTheme && (hasEverThemed.current = !0), !(isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot))
|
|
3627
3640
|
return children;
|
|
@@ -3632,32 +3645,37 @@ var require_Theme_native = __commonJS({
|
|
|
3632
3645
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, { name: themeManager.state.parentName, children: child.props.children })
|
|
3633
3646
|
) : child));
|
|
3634
3647
|
let elementsWithContext = themeManager ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeManagerContext.ThemeManagerContext.Provider, { value: themeManager, children: next }) : next;
|
|
3635
|
-
return forceClassName === !1 ? elementsWithContext : import_constants.isWeb ? wrapThemeElements({
|
|
3648
|
+
return forceClassName === !1 ? elementsWithContext : import_constants.isWeb && !avoidWrap ? wrapThemeElements({
|
|
3636
3649
|
children: elementsWithContext,
|
|
3637
3650
|
themeState,
|
|
3638
3651
|
forceClassName,
|
|
3639
3652
|
isRoot
|
|
3640
3653
|
}) : elementsWithContext;
|
|
3641
3654
|
}
|
|
3655
|
+
function getThemeCNStyle(themeState, isRoot = !1) {
|
|
3656
|
+
var _a, _b;
|
|
3657
|
+
if (!themeState.isNewTheme)
|
|
3658
|
+
return;
|
|
3659
|
+
let themeColor = (_a = themeState.state) != null && _a.theme && themeState.isNewTheme ? (0, import_createVariable.variableToString)(themeState.state.theme.color) : "", style = themeColor ? {
|
|
3660
|
+
color: themeColor
|
|
3661
|
+
} : void 0, className = ((_b = themeState.state) == null ? void 0 : _b.className) || "";
|
|
3662
|
+
return isRoot && (className = className.replace("t_sub_theme", "")), { style, className };
|
|
3663
|
+
}
|
|
3642
3664
|
function wrapThemeElements({
|
|
3643
3665
|
children,
|
|
3644
3666
|
themeState,
|
|
3645
3667
|
forceClassName,
|
|
3646
3668
|
isRoot
|
|
3647
3669
|
}) {
|
|
3648
|
-
var _a, _b
|
|
3670
|
+
var _a, _b;
|
|
3649
3671
|
if (isRoot && forceClassName === !1)
|
|
3650
3672
|
return children;
|
|
3651
3673
|
let inverse = (_a = themeState.state) == null ? void 0 : _a.inverse;
|
|
3652
3674
|
if (!themeState.isNewTheme && !inverse && !forceClassName)
|
|
3653
3675
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "_dsp_contents is_Theme", children });
|
|
3654
|
-
let
|
|
3655
|
-
color: themeColor
|
|
3656
|
-
} : void 0, className = ((_c = themeState.state) == null ? void 0 : _c.className) || "";
|
|
3657
|
-
isRoot && (className = className.replace("t_sub_theme", ""));
|
|
3658
|
-
let themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: `${className} _dsp_contents is_Theme`, style: colorStyle, children });
|
|
3676
|
+
let { className, style } = getThemeCNStyle(themeState, isRoot), themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: `${className} _dsp_contents is_Theme`, style, children });
|
|
3659
3677
|
if (inverse != null || forceClassName) {
|
|
3660
|
-
let name = ((
|
|
3678
|
+
let name = ((_b = themeState.state) == null ? void 0 : _b.name) || "";
|
|
3661
3679
|
themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3662
3680
|
"span",
|
|
3663
3681
|
{
|
|
@@ -3675,7 +3693,7 @@ var require_Theme_native = __commonJS({
|
|
|
3675
3693
|
var require_themeable_native = __commonJS({
|
|
3676
3694
|
"../web/dist/cjs/helpers/themeable.native.js"(exports, module2) {
|
|
3677
3695
|
"use strict";
|
|
3678
|
-
var
|
|
3696
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
3679
3697
|
for (var name in all)
|
|
3680
3698
|
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
3681
3699
|
}, __copyProps2 = (to, from, except, desc) => {
|
|
@@ -3683,26 +3701,15 @@ var require_themeable_native = __commonJS({
|
|
|
3683
3701
|
for (let key of __getOwnPropNames2(from))
|
|
3684
3702
|
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
3685
3703
|
return to;
|
|
3686
|
-
},
|
|
3687
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
3688
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
3689
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
3690
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
3691
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
3692
|
-
mod
|
|
3693
|
-
)), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), themeable_exports = {};
|
|
3704
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), themeable_exports = {};
|
|
3694
3705
|
__export2(themeable_exports, {
|
|
3695
3706
|
themeable: () => themeable3
|
|
3696
3707
|
});
|
|
3697
3708
|
module2.exports = __toCommonJS2(themeable_exports);
|
|
3698
|
-
var import_react2 =
|
|
3699
|
-
function themeable3(
|
|
3709
|
+
var import_react2 = require("react"), import_Theme = require_Theme_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3710
|
+
function themeable3(Component, staticConfig) {
|
|
3700
3711
|
let withTheme = (0, import_react2.forwardRef)(function(props, ref) {
|
|
3701
|
-
let { themeInverse, theme, componentName, themeReset, ...rest } = props, element =
|
|
3702
|
-
...rest,
|
|
3703
|
-
ref,
|
|
3704
|
-
"data-disable-theme": !0
|
|
3705
|
-
});
|
|
3712
|
+
let { themeInverse, theme, componentName, themeReset, ...rest } = props, element = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Component, { ref, ...rest, "data-disable-theme": !0 });
|
|
3706
3713
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3707
3714
|
import_Theme.Theme,
|
|
3708
3715
|
{
|
|
@@ -3716,7 +3723,7 @@ var require_themeable_native = __commonJS({
|
|
|
3716
3723
|
}
|
|
3717
3724
|
);
|
|
3718
3725
|
});
|
|
3719
|
-
return withTheme.displayName = `Themed(${(
|
|
3726
|
+
return withTheme.displayName = `Themed(${(Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "Anonymous"})`, withTheme;
|
|
3720
3727
|
}
|
|
3721
3728
|
}
|
|
3722
3729
|
});
|
|
@@ -3992,6 +3999,8 @@ var require_createComponent_native = __commonJS({
|
|
|
3992
3999
|
onMouseDown,
|
|
3993
4000
|
onMouseEnter,
|
|
3994
4001
|
onMouseLeave,
|
|
4002
|
+
onFocus,
|
|
4003
|
+
onBlur,
|
|
3995
4004
|
separator,
|
|
3996
4005
|
// ignore from here on out
|
|
3997
4006
|
forceStyle: _forceStyle,
|
|
@@ -4064,7 +4073,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4064
4073
|
fontFamily && fontFamily[0] === "$" && (fontFamily = fontFamily.slice(1));
|
|
4065
4074
|
let fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "", style = avoidAnimationStyle ? splitStyles.style : animationStyles || splitStyles.style, className;
|
|
4066
4075
|
viewProps.style = style;
|
|
4067
|
-
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), events = !!(attachPress || isHoverable || runtimePressStyle || runtimeHoverStyle) && !isDisabled && !props.asChild ? {
|
|
4076
|
+
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), events = !!(attachPress || isHoverable || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle) && !isDisabled && !props.asChild ? {
|
|
4068
4077
|
onPressOut: attachPress ? (e) => {
|
|
4069
4078
|
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
4070
4079
|
} : void 0,
|
|
@@ -4087,9 +4096,11 @@ var require_createComponent_native = __commonJS({
|
|
|
4087
4096
|
onPress: attachPress ? (e) => {
|
|
4088
4097
|
unPress(), import_constants.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);
|
|
4089
4098
|
} : void 0,
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4099
|
+
...attachPress && onLongPress && {
|
|
4100
|
+
onLongPress: (e) => {
|
|
4101
|
+
unPress(), onLongPress == null || onLongPress(e);
|
|
4102
|
+
}
|
|
4103
|
+
}
|
|
4093
4104
|
} : null;
|
|
4094
4105
|
events && !asChild && Object.assign(events, {
|
|
4095
4106
|
cancelable: !viewProps.rejectResponderTermination,
|
|
@@ -4129,7 +4140,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4129
4140
|
}
|
|
4130
4141
|
};
|
|
4131
4142
|
}, [groupName]);
|
|
4132
|
-
if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, { groups: subGroupContext, children: content })), content = disableThemeProp ? content : (0, import_Theme.useThemedChildren)(themeState, content, themeStateProps), staticConfig.context) {
|
|
4143
|
+
if (groupName && subGroupContext && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, { groups: subGroupContext, children: content })), content = disableThemeProp ? content : (0, import_Theme.useThemedChildren)(themeState, content, themeStateProps, !1), staticConfig.context) {
|
|
4133
4144
|
let contextProps = staticConfig.context.props;
|
|
4134
4145
|
for (let key in contextProps)
|
|
4135
4146
|
(key in style || key in viewProps) && (overriddenContextProps ||= {}, overriddenContextProps[key] = style[key] ?? viewProps[key]);
|
|
@@ -4159,12 +4170,12 @@ var require_createComponent_native = __commonJS({
|
|
|
4159
4170
|
function extractable(Component2, extended) {
|
|
4160
4171
|
return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
|
|
4161
4172
|
}
|
|
4162
|
-
function styleable(Component2,
|
|
4173
|
+
function styleable(Component2, options) {
|
|
4163
4174
|
var _a2;
|
|
4164
4175
|
let ComponentForwardedRef = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (
|
|
4165
4176
|
// memo because theme changes otherwise would always re-render
|
|
4166
4177
|
(0, import_react2.memo)((0, import_react2.forwardRef)(Component2))
|
|
4167
|
-
), extendedConfig = extendStyledConfig(
|
|
4178
|
+
), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig), out = options != null && options.disableTheme ? ComponentForwardedRef : (0, import_themeable.themeable)(ComponentForwardedRef, extendedConfig);
|
|
4168
4179
|
return out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
4169
4180
|
}
|
|
4170
4181
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
@@ -5301,6 +5312,7 @@ var require_useProps_native = __commonJS({
|
|
|
5301
5312
|
mediaState: media,
|
|
5302
5313
|
noSkip: !0,
|
|
5303
5314
|
noClassNames: !0,
|
|
5315
|
+
resolveValues: "auto",
|
|
5304
5316
|
...opts
|
|
5305
5317
|
},
|
|
5306
5318
|
null,
|
|
@@ -11364,7 +11376,7 @@ var require_Button_native = __commonJS({
|
|
|
11364
11376
|
Text: ButtonText,
|
|
11365
11377
|
Icon: ButtonIcon
|
|
11366
11378
|
}), ButtonNestingContext = (0, import_react2.createContext)(!1);
|
|
11367
|
-
function useButton(propsIn, { Text: Text3 = Button2.Text } = { Text: Button2.Text }) {
|
|
11379
|
+
function useButton({ textProps, ...propsIn }, { Text: Text3 = Button2.Text } = { Text: Button2.Text }) {
|
|
11368
11380
|
let isNested = (0, import_react2.useContext)(ButtonNestingContext), didFinishSSR = (0, import_web.useDidFinishSSR)(), propsActive = (0, import_web.useProps)(propsIn), {
|
|
11369
11381
|
icon,
|
|
11370
11382
|
iconAfter,
|
|
@@ -11381,7 +11393,7 @@ var require_Button_native = __commonJS({
|
|
|
11381
11393
|
color: propsActive.color
|
|
11382
11394
|
}), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), spaceSize = space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace, contents = noTextWrap ? [propsIn.children] : (0, import_text2.wrapChildrenInText)(
|
|
11383
11395
|
Text3,
|
|
11384
|
-
{ children: propsIn.children, fontFamily, fontSize },
|
|
11396
|
+
{ children: propsIn.children, fontFamily, fontSize, textProps },
|
|
11385
11397
|
Text3 === ButtonText && propsActive.unstyled !== !0 ? {
|
|
11386
11398
|
unstyled: !1,
|
|
11387
11399
|
size: size2
|
|
@@ -12866,52 +12878,51 @@ var require_ListItem_native = __commonJS({
|
|
|
12866
12878
|
ListItemSubtitle: () => ListItemSubtitle,
|
|
12867
12879
|
ListItemText: () => ListItemText,
|
|
12868
12880
|
ListItemTitle: () => ListItemTitle,
|
|
12869
|
-
listItemStaticConfig: () => listItemStaticConfig,
|
|
12870
|
-
listItemVariants: () => listItemVariants,
|
|
12871
12881
|
useListItem: () => useListItem
|
|
12872
12882
|
});
|
|
12873
12883
|
module2.exports = __toCommonJS2(ListItem_exports);
|
|
12874
|
-
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",
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
"...size": (val, { tokens }) => ({
|
|
12890
|
-
minHeight: tokens.size[val],
|
|
12891
|
-
paddingHorizontal: tokens.space[val],
|
|
12892
|
-
paddingVertical: (0, import_get_token2.getSpace)(tokens.space[val], {
|
|
12893
|
-
shift: -4
|
|
12894
|
-
})
|
|
12895
|
-
})
|
|
12896
|
-
},
|
|
12897
|
-
active: {
|
|
12898
|
-
true: {
|
|
12899
|
-
hoverStyle: {
|
|
12884
|
+
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, {
|
|
12885
|
+
name: NAME,
|
|
12886
|
+
tag: "li",
|
|
12887
|
+
variants: {
|
|
12888
|
+
unstyled: {
|
|
12889
|
+
false: {
|
|
12890
|
+
size: "$true",
|
|
12891
|
+
alignItems: "center",
|
|
12892
|
+
justifyContent: "space-between",
|
|
12893
|
+
flexWrap: "nowrap",
|
|
12894
|
+
width: "100%",
|
|
12895
|
+
borderColor: "$borderColor",
|
|
12896
|
+
maxWidth: "100%",
|
|
12897
|
+
overflow: "hidden",
|
|
12898
|
+
flexDirection: "row",
|
|
12900
12899
|
backgroundColor: "$background"
|
|
12901
12900
|
}
|
|
12901
|
+
},
|
|
12902
|
+
size: {
|
|
12903
|
+
"...size": (val, { tokens }) => ({
|
|
12904
|
+
minHeight: tokens.size[val],
|
|
12905
|
+
paddingHorizontal: tokens.space[val],
|
|
12906
|
+
paddingVertical: (0, import_get_token2.getSpace)(tokens.space[val], {
|
|
12907
|
+
shift: -4
|
|
12908
|
+
})
|
|
12909
|
+
})
|
|
12910
|
+
},
|
|
12911
|
+
active: {
|
|
12912
|
+
true: {
|
|
12913
|
+
hoverStyle: {
|
|
12914
|
+
backgroundColor: "$background"
|
|
12915
|
+
}
|
|
12916
|
+
}
|
|
12917
|
+
},
|
|
12918
|
+
disabled: {
|
|
12919
|
+
true: {
|
|
12920
|
+
opacity: 0.5,
|
|
12921
|
+
// TODO breaking types
|
|
12922
|
+
pointerEvents: "none"
|
|
12923
|
+
}
|
|
12902
12924
|
}
|
|
12903
12925
|
},
|
|
12904
|
-
disabled: {
|
|
12905
|
-
true: {
|
|
12906
|
-
opacity: 0.5,
|
|
12907
|
-
// TODO breaking types
|
|
12908
|
-
pointerEvents: "none"
|
|
12909
|
-
}
|
|
12910
|
-
}
|
|
12911
|
-
}, ListItemFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
12912
|
-
name: NAME,
|
|
12913
|
-
tag: "li",
|
|
12914
|
-
variants: listItemVariants,
|
|
12915
12926
|
defaultVariants: {
|
|
12916
12927
|
unstyled: !1
|
|
12917
12928
|
}
|
|
@@ -13020,19 +13031,8 @@ var require_ListItem_native = __commonJS({
|
|
|
13020
13031
|
};
|
|
13021
13032
|
}, ListItemComponent = ListItemFrame.styleable(function(props, ref) {
|
|
13022
13033
|
let { props: listItemProps } = useListItem(props);
|
|
13023
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ListItemFrame, { ref,
|
|
13024
|
-
}),
|
|
13025
|
-
inlineProps: /* @__PURE__ */ new Set([
|
|
13026
|
-
// text props go here (can't really optimize them, but we never fully extract listItem anyway)
|
|
13027
|
-
"color",
|
|
13028
|
-
"fontWeight",
|
|
13029
|
-
"fontSize",
|
|
13030
|
-
"fontFamily",
|
|
13031
|
-
"letterSpacing",
|
|
13032
|
-
"textAlign",
|
|
13033
|
-
"ellipse"
|
|
13034
|
-
])
|
|
13035
|
-
}, ListItem2 = (0, import_web.withStaticProperties)(ListItemComponent, {
|
|
13034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ListItemFrame, { ref, ...listItemProps });
|
|
13035
|
+
}), ListItem2 = (0, import_web.withStaticProperties)(ListItemComponent, {
|
|
13036
13036
|
Text: ListItemText,
|
|
13037
13037
|
Subtitle: ListItemSubtitle
|
|
13038
13038
|
});
|
|
@@ -15549,16 +15549,21 @@ var require_SelectItem_native = __commonJS({
|
|
|
15549
15549
|
useSelectItemContext: () => useSelectItemContext
|
|
15550
15550
|
});
|
|
15551
15551
|
module2.exports = __toCommonJS2(SelectItem_exports);
|
|
15552
|
-
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 =
|
|
15553
|
-
(props, forwardedRef)
|
|
15552
|
+
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(
|
|
15553
|
+
function(props, forwardedRef) {
|
|
15554
15554
|
let {
|
|
15555
15555
|
__scopeSelect,
|
|
15556
15556
|
value,
|
|
15557
15557
|
disabled = !1,
|
|
15558
15558
|
textValue: textValueProp,
|
|
15559
15559
|
index,
|
|
15560
|
-
...
|
|
15561
|
-
} = props,
|
|
15560
|
+
...restProps
|
|
15561
|
+
} = props, { props: listItemProps } = (0, import_list_item.useListItem)({
|
|
15562
|
+
...!props.unstyled && {
|
|
15563
|
+
ellipse: !0
|
|
15564
|
+
},
|
|
15565
|
+
...restProps
|
|
15566
|
+
}), context = (0, import_context.useSelectItemParentContext)(ITEM_NAME, __scopeSelect), {
|
|
15562
15567
|
setSelectedIndex,
|
|
15563
15568
|
listRef,
|
|
15564
15569
|
setOpen,
|
|
@@ -15591,7 +15596,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
15591
15596
|
function handleSelect() {
|
|
15592
15597
|
setSelectedIndex(index), onChange(value), setOpen(!1);
|
|
15593
15598
|
}
|
|
15594
|
-
let selectItemProps = interactions ? interactions.getItemProps({
|
|
15599
|
+
let selectItemProps = React2.useMemo(() => interactions ? interactions.getItemProps({
|
|
15595
15600
|
onTouchMove() {
|
|
15596
15601
|
allowSelectRef.current = !0, allowMouseUpRef.current = !1;
|
|
15597
15602
|
},
|
|
@@ -15611,7 +15616,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
15611
15616
|
}
|
|
15612
15617
|
}) : {
|
|
15613
15618
|
onPress: handleSelect
|
|
15614
|
-
};
|
|
15619
|
+
}, [handleSelect]);
|
|
15615
15620
|
return (0, import_core13.useIsomorphicLayoutEffect)(() => {
|
|
15616
15621
|
var _a;
|
|
15617
15622
|
isActive && ((_a = listRef == null ? void 0 : listRef.current[index]) == null || _a.focus());
|
|
@@ -15623,7 +15628,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
15623
15628
|
textId: textId || "",
|
|
15624
15629
|
isSelected,
|
|
15625
15630
|
children: shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", { value, children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15626
|
-
import_list_item.
|
|
15631
|
+
import_list_item.ListItemFrame,
|
|
15627
15632
|
{
|
|
15628
15633
|
tag: "div",
|
|
15629
15634
|
componentName: ITEM_NAME,
|
|
@@ -15641,18 +15646,79 @@ var require_SelectItem_native = __commonJS({
|
|
|
15641
15646
|
focusTheme: !0,
|
|
15642
15647
|
cursor: "default",
|
|
15643
15648
|
outlineWidth: 0,
|
|
15644
|
-
size: size2
|
|
15645
|
-
ellipse: !0
|
|
15649
|
+
size: size2
|
|
15646
15650
|
},
|
|
15647
|
-
...
|
|
15651
|
+
...listItemProps,
|
|
15648
15652
|
...selectItemProps
|
|
15649
15653
|
}
|
|
15650
15654
|
)
|
|
15651
15655
|
}
|
|
15652
15656
|
);
|
|
15657
|
+
},
|
|
15658
|
+
{
|
|
15659
|
+
disableTheme: !0
|
|
15653
15660
|
}
|
|
15654
15661
|
);
|
|
15655
|
-
|
|
15662
|
+
}
|
|
15663
|
+
});
|
|
15664
|
+
|
|
15665
|
+
// ../select/dist/cjs/SelectItemText.native.js
|
|
15666
|
+
var require_SelectItemText_native = __commonJS({
|
|
15667
|
+
"../select/dist/cjs/SelectItemText.native.js"(exports, module2) {
|
|
15668
|
+
"use strict";
|
|
15669
|
+
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
15670
|
+
for (var name in all)
|
|
15671
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
15672
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
15673
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
15674
|
+
for (let key of __getOwnPropNames2(from))
|
|
15675
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
15676
|
+
return to;
|
|
15677
|
+
}, __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
15678
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
15679
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
15680
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
15681
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
15682
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
15683
|
+
mod
|
|
15684
|
+
)), __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), SelectItemText_exports = {};
|
|
15685
|
+
__export2(SelectItemText_exports, {
|
|
15686
|
+
ITEM_TEXT_NAME: () => ITEM_TEXT_NAME,
|
|
15687
|
+
SelectItemText: () => SelectItemText,
|
|
15688
|
+
SelectItemTextFrame: () => SelectItemTextFrame
|
|
15689
|
+
});
|
|
15690
|
+
module2.exports = __toCommonJS2(SelectItemText_exports);
|
|
15691
|
+
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, {
|
|
15692
|
+
name: ITEM_TEXT_NAME,
|
|
15693
|
+
variants: {
|
|
15694
|
+
unstyled: {
|
|
15695
|
+
false: {
|
|
15696
|
+
userSelect: "none",
|
|
15697
|
+
color: "$color",
|
|
15698
|
+
ellipse: !0
|
|
15699
|
+
}
|
|
15700
|
+
}
|
|
15701
|
+
},
|
|
15702
|
+
defaultVariants: {
|
|
15703
|
+
unstyled: !1
|
|
15704
|
+
}
|
|
15705
|
+
}), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
|
|
15706
|
+
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();
|
|
15707
|
+
return contents.current = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15708
|
+
SelectItemTextFrame,
|
|
15709
|
+
{
|
|
15710
|
+
className,
|
|
15711
|
+
size: itemParentContext.size,
|
|
15712
|
+
id: itemContext.textId,
|
|
15713
|
+
...itemTextProps,
|
|
15714
|
+
ref: composedRefs
|
|
15715
|
+
}
|
|
15716
|
+
), React2.useEffect(() => {
|
|
15717
|
+
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents.current);
|
|
15718
|
+
}, []), React2.useEffect(() => itemParentContext.valueSubscribe((val) => {
|
|
15719
|
+
val === itemContext.value && context.setSelectedItem(contents.current);
|
|
15720
|
+
}), [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 });
|
|
15721
|
+
});
|
|
15656
15722
|
}
|
|
15657
15723
|
});
|
|
15658
15724
|
|
|
@@ -15837,11 +15903,10 @@ var require_Select_native = __commonJS({
|
|
|
15837
15903
|
Select: () => Select,
|
|
15838
15904
|
SelectGroupFrame: () => SelectGroupFrame,
|
|
15839
15905
|
SelectIcon: () => SelectIcon,
|
|
15840
|
-
SelectItemTextFrame: () => SelectItemTextFrame,
|
|
15841
15906
|
SelectSeparator: () => SelectSeparator
|
|
15842
15907
|
});
|
|
15843
15908
|
module2.exports = __toCommonJS2(Select_exports);
|
|
15844
|
-
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, {
|
|
15909
|
+
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, {
|
|
15845
15910
|
name: VALUE_NAME,
|
|
15846
15911
|
userSelect: "none"
|
|
15847
15912
|
}), SelectValue = SelectValueFrame.styleable(function({
|
|
@@ -15869,7 +15934,7 @@ var require_Select_native = __commonJS({
|
|
|
15869
15934
|
return React2.Children.map(selectValueChildren, (child) => {
|
|
15870
15935
|
var _a, _b, _c;
|
|
15871
15936
|
if (child) {
|
|
15872
|
-
if (((_b = (_a = child.type) == null ? void 0 : _a.staticConfig) == null ? void 0 : _b.componentName) === ITEM_TEXT_NAME)
|
|
15937
|
+
if (((_b = (_a = child.type) == null ? void 0 : _a.staticConfig) == null ? void 0 : _b.componentName) === import_SelectItemText.ITEM_TEXT_NAME)
|
|
15873
15938
|
return child.props.children;
|
|
15874
15939
|
if ((_c = child.props) != null && _c.children)
|
|
15875
15940
|
return unwrapSelectItem(child.props.children);
|
|
@@ -15882,46 +15947,8 @@ var require_Select_native = __commonJS({
|
|
|
15882
15947
|
// @ts-ignore
|
|
15883
15948
|
"aria-hidden": !0,
|
|
15884
15949
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_text2.Paragraph, { children: "\u25BC" })
|
|
15885
|
-
}),
|
|
15886
|
-
name: ITEM_TEXT_NAME
|
|
15887
|
-
variants: {
|
|
15888
|
-
unstyled: {
|
|
15889
|
-
false: {
|
|
15890
|
-
userSelect: "none",
|
|
15891
|
-
color: "$color",
|
|
15892
|
-
ellipse: !0
|
|
15893
|
-
}
|
|
15894
|
-
}
|
|
15895
|
-
},
|
|
15896
|
-
defaultVariants: {
|
|
15897
|
-
unstyled: !1
|
|
15898
|
-
}
|
|
15899
|
-
}), SelectItemText = React2.forwardRef(
|
|
15900
|
-
(props, forwardedRef) => {
|
|
15901
|
-
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(
|
|
15902
|
-
() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15903
|
-
SelectItemTextFrame,
|
|
15904
|
-
{
|
|
15905
|
-
className,
|
|
15906
|
-
size: itemParentContext.size,
|
|
15907
|
-
id: itemContext.textId,
|
|
15908
|
-
...itemTextProps,
|
|
15909
|
-
ref: composedRefs
|
|
15910
|
-
}
|
|
15911
|
-
),
|
|
15912
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15913
|
-
[props, itemParentContext.size, className, itemContext.textId]
|
|
15914
|
-
);
|
|
15915
|
-
return React2.useEffect(() => {
|
|
15916
|
-
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents);
|
|
15917
|
-
}, []), React2.useEffect(() => itemParentContext.valueSubscribe((val) => {
|
|
15918
|
-
val === itemContext.value && context.setSelectedItem(contents);
|
|
15919
|
-
}), [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 });
|
|
15920
|
-
}
|
|
15921
|
-
);
|
|
15922
|
-
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
15923
|
-
var ITEM_INDICATOR_NAME = "SelectItemIndicator", SelectItemIndicatorFrame = (0, import_core13.styled)(import_stacks3.XStack, {
|
|
15924
|
-
name: ITEM_TEXT_NAME
|
|
15950
|
+
}), ITEM_INDICATOR_NAME = "SelectItemIndicator", SelectItemIndicatorFrame = (0, import_core13.styled)(import_stacks3.XStack, {
|
|
15951
|
+
name: import_SelectItemText.ITEM_TEXT_NAME
|
|
15925
15952
|
}), SelectItemIndicator = React2.forwardRef(
|
|
15926
15953
|
(props, forwardedRef) => {
|
|
15927
15954
|
let { __scopeSelect, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(ITEM_INDICATOR_NAME, __scopeSelect), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
@@ -16138,7 +16165,7 @@ var require_Select_native = __commonJS({
|
|
|
16138
16165
|
Icon: SelectIcon,
|
|
16139
16166
|
Item: import_SelectItem.SelectItem,
|
|
16140
16167
|
ItemIndicator: SelectItemIndicator,
|
|
16141
|
-
ItemText: SelectItemText,
|
|
16168
|
+
ItemText: import_SelectItemText.SelectItemText,
|
|
16142
16169
|
Label: SelectLabel,
|
|
16143
16170
|
ScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,
|
|
16144
16171
|
ScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,
|