tamagui 1.90.16 → 1.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/views/Input.js +5 -3
- package/dist/cjs/views/Input.js.map +1 -1
- package/dist/cjs/views/Input.native.js +5 -3
- package/dist/cjs/views/Input.native.js.map +2 -2
- package/dist/esm/views/Input.js +5 -3
- package/dist/esm/views/Input.js.map +1 -1
- package/dist/esm/views/Input.mjs +5 -3
- package/dist/esm/views/Input.native.js +5 -3
- package/dist/esm/views/Input.native.js.map +2 -2
- package/dist/jsx/views/Input.js +5 -3
- package/dist/jsx/views/Input.js.map +1 -1
- package/dist/jsx/views/Input.mjs +5 -3
- package/dist/jsx/views/Input.native.js +5 -3
- package/dist/jsx/views/Input.native.js.map +2 -2
- package/dist/native.js +156 -109
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +149 -105
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
- package/src/views/Input.tsx +6 -2
- package/types/views/Input.d.ts +57 -31
- package/types/views/Input.d.ts.map +1 -1
- package/types/views/TextArea.d.ts +8 -8
package/dist/native.js
CHANGED
|
@@ -1094,7 +1094,9 @@ var require_concatClassName_native = __commonJS({
|
|
|
1094
1094
|
var pseudoInvert = {
|
|
1095
1095
|
hover: "hoverStyle",
|
|
1096
1096
|
focus: "focusStyle",
|
|
1097
|
-
press: "pressStyle"
|
|
1097
|
+
press: "pressStyle",
|
|
1098
|
+
focusVisible: "focusVisibleStyle",
|
|
1099
|
+
disabled: "disabledStyle"
|
|
1098
1100
|
};
|
|
1099
1101
|
}
|
|
1100
1102
|
});
|
|
@@ -1644,13 +1646,18 @@ var require_validStyleProps_native = __commonJS({
|
|
|
1644
1646
|
}),
|
|
1645
1647
|
// allow some web only ones
|
|
1646
1648
|
!1
|
|
1647
|
-
), stylePropsText = _object_spread9({}, stylePropsView, stylePropsTextOnly), stylePropsAll = stylePropsText, validPseudoKeys =
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1649
|
+
), stylePropsText = _object_spread9({}, stylePropsView, stylePropsTextOnly), stylePropsAll = stylePropsText, validPseudoKeys = _object_spread9(
|
|
1650
|
+
{
|
|
1651
|
+
enterStyle: !0,
|
|
1652
|
+
exitStyle: !0,
|
|
1653
|
+
hoverStyle: !0,
|
|
1654
|
+
pressStyle: !0,
|
|
1655
|
+
focusStyle: !0,
|
|
1656
|
+
disabledStyle: !0
|
|
1657
|
+
},
|
|
1658
|
+
// allow some web only ones
|
|
1659
|
+
!1
|
|
1660
|
+
), validStyles = _object_spread9({}, validPseudoKeys, stylePropsView);
|
|
1654
1661
|
}
|
|
1655
1662
|
});
|
|
1656
1663
|
|
|
@@ -2318,7 +2325,8 @@ var require_config_native = __commonJS({
|
|
|
2318
2325
|
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants4.isWeb, token = getTokenObject(value, group);
|
|
2319
2326
|
return useVariable ? token == null ? void 0 : token.variable : token == null ? void 0 : token.val;
|
|
2320
2327
|
}, getTokenValue3 = function(value, group) {
|
|
2321
|
-
|
|
2328
|
+
if (!(value === "unset" || value === "auto"))
|
|
2329
|
+
return getToken3(value, group, !1);
|
|
2322
2330
|
}, useTokens = getTokens3, getThemes3 = function() {
|
|
2323
2331
|
return conf.themes;
|
|
2324
2332
|
}, configListeners = /* @__PURE__ */ new Set(), onConfiguredOnce = function(cb) {
|
|
@@ -3081,14 +3089,26 @@ var require_pseudoDescriptors_native = __commonJS({
|
|
|
3081
3089
|
stateKey: "press",
|
|
3082
3090
|
priority: 2
|
|
3083
3091
|
},
|
|
3092
|
+
focusVisibleStyle: {
|
|
3093
|
+
name: "focus-visible",
|
|
3094
|
+
priority: 3,
|
|
3095
|
+
stateKey: "focusVisible"
|
|
3096
|
+
},
|
|
3084
3097
|
focusStyle: {
|
|
3085
3098
|
name: "focus",
|
|
3086
3099
|
priority: 3
|
|
3100
|
+
},
|
|
3101
|
+
disabledStyle: {
|
|
3102
|
+
name: "disabled",
|
|
3103
|
+
priority: 4,
|
|
3104
|
+
stateKey: "disabled"
|
|
3087
3105
|
}
|
|
3088
3106
|
}, pseudoPriorities = {
|
|
3089
3107
|
hover: 1,
|
|
3090
3108
|
press: 2,
|
|
3091
|
-
focus: 3
|
|
3109
|
+
focus: 3,
|
|
3110
|
+
focusVisible: 3,
|
|
3111
|
+
disabled: 4
|
|
3092
3112
|
}, pseudoDescriptors = _object_spread_props8(_object_spread9({}, pseudoDescriptorsBase), {
|
|
3093
3113
|
enterStyle: {
|
|
3094
3114
|
name: "enter",
|
|
@@ -4008,18 +4028,22 @@ var require_createShallowSetState_native = __commonJS({
|
|
|
4008
4028
|
}
|
|
4009
4029
|
return target;
|
|
4010
4030
|
}
|
|
4011
|
-
function createShallowSetState(setter, debug) {
|
|
4031
|
+
function createShallowSetState(setter, isDisabled, debug) {
|
|
4012
4032
|
return function(next) {
|
|
4013
4033
|
return setter(function(prev) {
|
|
4014
|
-
return mergeIfNotShallowEqual(prev, next, debug);
|
|
4034
|
+
return mergeIfNotShallowEqual(prev, next, isDisabled, debug);
|
|
4015
4035
|
});
|
|
4016
4036
|
};
|
|
4017
4037
|
}
|
|
4018
|
-
function mergeIfNotShallowEqual(prev, next, debug) {
|
|
4019
|
-
|
|
4038
|
+
function mergeIfNotShallowEqual(prev, next, isDisabled, debug) {
|
|
4039
|
+
if (isDisabled || !prev || !next || isEqualShallow(prev, next))
|
|
4040
|
+
return prev;
|
|
4041
|
+
if (process.env.NODE_ENV === "development" && debug && (console.warn("setStateShallow CHANGE", {
|
|
4020
4042
|
prev,
|
|
4021
4043
|
next
|
|
4022
|
-
}),
|
|
4044
|
+
}), debug === "break"))
|
|
4045
|
+
debugger;
|
|
4046
|
+
return _object_spread9({}, prev, next);
|
|
4023
4047
|
}
|
|
4024
4048
|
function isEqualShallow(prev, next) {
|
|
4025
4049
|
for (var key in next)
|
|
@@ -5162,7 +5186,9 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
5162
5186
|
press: !1,
|
|
5163
5187
|
pressIn: !1,
|
|
5164
5188
|
focus: !1,
|
|
5165
|
-
|
|
5189
|
+
focusVisible: !1,
|
|
5190
|
+
unmounted: !0,
|
|
5191
|
+
disabled: !1
|
|
5166
5192
|
}, defaultComponentStateMounted = _object_spread_props8(_object_spread9({}, defaultComponentState), {
|
|
5167
5193
|
unmounted: !1
|
|
5168
5194
|
}), defaultComponentStateShouldEnter = _object_spread_props8(_object_spread9({}, defaultComponentState), {
|
|
@@ -7428,10 +7454,10 @@ var require_propMapper_native = __commonJS({
|
|
|
7428
7454
|
fontSize: "size",
|
|
7429
7455
|
fontWeight: "weight"
|
|
7430
7456
|
}, lastFontFamilyToken = null, getTokenForKey = function(key, value) {
|
|
7431
|
-
var resolveAs = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "none", styleState = arguments.length > 3 ? arguments[3] : void 0,
|
|
7457
|
+
var resolveAs = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "none", styleState = arguments.length > 3 ? arguments[3] : void 0, _staticConfig_accept;
|
|
7432
7458
|
if (resolveAs === "none")
|
|
7433
7459
|
return value;
|
|
7434
|
-
var theme = styleState.theme, _styleState_conf = styleState.conf, conf = _styleState_conf === void 0 ? (0, import_config.getConfig)() : _styleState_conf, context = styleState.context, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (
|
|
7460
|
+
var theme = styleState.theme, _styleState_conf = styleState.conf, conf = _styleState_conf === void 0 ? (0, import_config.getConfig)() : _styleState_conf, context = styleState.context, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
|
|
7435
7461
|
if (customTokenAccept) {
|
|
7436
7462
|
var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
|
|
7437
7463
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
@@ -7699,8 +7725,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7699
7725
|
}
|
|
7700
7726
|
var IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
|
|
7701
7727
|
function isValidStyleKey(key, staticConfig) {
|
|
7702
|
-
var
|
|
7703
|
-
return validStyleProps[key] || ((
|
|
7728
|
+
var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
7729
|
+
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
7704
7730
|
}
|
|
7705
7731
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
|
|
7706
7732
|
conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
@@ -7730,6 +7756,11 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7730
7756
|
}), console.groupEnd());
|
|
7731
7757
|
for (var keyOg in props) {
|
|
7732
7758
|
var _parentStaticConfig_variants, keyInit = keyOg, valInit = props[keyOg];
|
|
7759
|
+
if (staticConfig.accept && (staticConfig.accept[keyInit] === "style" || staticConfig.accept[keyInit] === "textStyle") && typeof valInit == "object") {
|
|
7760
|
+
var styleObject = getSubStyle(styleState, keyInit, valInit, styleProps.noClassNames);
|
|
7761
|
+
viewProps[keyInit] = styleObject;
|
|
7762
|
+
continue;
|
|
7763
|
+
}
|
|
7733
7764
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && console.groupEnd(), styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit !== "className" && !(keyInit in usedKeys)) {
|
|
7734
7765
|
if (keyInit in import_skipProps.skipProps && !styleProps.noSkip && !isHOC) {
|
|
7735
7766
|
if (keyInit === "group" && !1)
|
|
@@ -8102,33 +8133,21 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8102
8133
|
if (!isReactNative && viewProps.tabIndex == null)
|
|
8103
8134
|
var _viewProps_focusable, isFocusable, role;
|
|
8104
8135
|
}
|
|
8105
|
-
|
|
8136
|
+
var styleProp = props.style;
|
|
8137
|
+
if (styleProp)
|
|
8106
8138
|
if (isHOC)
|
|
8107
|
-
viewProps.style = normalizeStyle(
|
|
8108
|
-
else
|
|
8109
|
-
var
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
(_styleState4 = styleState).style || (_styleState4.style = {}), Object.assign(styleState.style, normalizeStyle(style1));
|
|
8119
|
-
}
|
|
8120
|
-
}
|
|
8121
|
-
} catch (err) {
|
|
8122
|
-
_didIteratorError3 = !0, _iteratorError3 = err;
|
|
8123
|
-
} finally {
|
|
8124
|
-
try {
|
|
8125
|
-
!_iteratorNormalCompletion3 && _iterator3.return != null && _iterator3.return();
|
|
8126
|
-
} finally {
|
|
8127
|
-
if (_didIteratorError3)
|
|
8128
|
-
throw _iteratorError3;
|
|
8129
|
-
}
|
|
8139
|
+
viewProps.style = normalizeStyle(styleProp);
|
|
8140
|
+
else
|
|
8141
|
+
for (var isArray = Array.isArray(styleProp), len = isArray ? props.length : 1, i1 = 0; i1 < len; i1++) {
|
|
8142
|
+
var style1 = isArray ? styleProp[i1] : styleProp;
|
|
8143
|
+
if (style1)
|
|
8144
|
+
if (style1.$$css)
|
|
8145
|
+
Object.assign(styleState.classNames, style1);
|
|
8146
|
+
else {
|
|
8147
|
+
var _styleState4;
|
|
8148
|
+
(_styleState4 = styleState).style || (_styleState4.style = {}), Object.assign(styleState.style, normalizeStyle(style1));
|
|
8149
|
+
}
|
|
8130
8150
|
}
|
|
8131
|
-
}
|
|
8132
8151
|
var result = {
|
|
8133
8152
|
space,
|
|
8134
8153
|
hasMedia,
|
|
@@ -8156,9 +8175,9 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8156
8175
|
if (0) {
|
|
8157
8176
|
var _staticConfig_defaultProps, fontFamily, fontFamilyClassName, groupClassName, componentNameFinal, componentClassName, classList, finalClassName;
|
|
8158
8177
|
if (!styleProps.noMergeStyle && !(styleProps.isAnimated && !conf.animations.supportsCSSVars && isReactNative) && isReactNative) {
|
|
8159
|
-
var cnStyles,
|
|
8178
|
+
var cnStyles, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3;
|
|
8160
8179
|
try {
|
|
8161
|
-
for (var
|
|
8180
|
+
for (var _iterator3, _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = !0)
|
|
8162
8181
|
var name;
|
|
8163
8182
|
} catch (err) {
|
|
8164
8183
|
} finally {
|
|
@@ -8205,8 +8224,8 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8205
8224
|
} else {
|
|
8206
8225
|
var shouldNormalize = import_constants4.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
8207
8226
|
if (
|
|
8208
|
-
//
|
|
8209
|
-
staticConfig.
|
|
8227
|
+
// accept is for props not styles
|
|
8228
|
+
staticConfig.accept && key in staticConfig.accept
|
|
8210
8229
|
)
|
|
8211
8230
|
viewProps[key] = out;
|
|
8212
8231
|
else {
|
|
@@ -9360,7 +9379,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9360
9379
|
defaultPropsKeyOrder: defaultProps ? Object.keys(defaultProps) : []
|
|
9361
9380
|
});
|
|
9362
9381
|
var component = /* @__PURE__ */ (0, import_react2.forwardRef)(function(propsIn, forwardedRef) {
|
|
9363
|
-
var _animationsConfig_usePresence, _props_accessibilityState, _themeState_state,
|
|
9382
|
+
var _animationsConfig_usePresence, _props_accessibilityState, _themeState_state, _hooks_usePropsTransform, _hooks_useEvents, _config_animations, internalID = process.env.NODE_ENV === "development" ? (0, import_react2.useId)() : "";
|
|
9364
9383
|
if (process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), !hasSetupBaseViews) {
|
|
9365
9384
|
var _hooks_getBaseViews;
|
|
9366
9385
|
hasSetupBaseViews = !0;
|
|
@@ -9408,7 +9427,9 @@ var require_createComponent_native = __commonJS({
|
|
|
9408
9427
|
]), !1)
|
|
9409
9428
|
var timer;
|
|
9410
9429
|
process.env.NODE_ENV === "development" && time && time(_templateObject()), process.env.NODE_ENV === "development" && time && time(_templateObject1());
|
|
9411
|
-
var stateRef = (0, import_react2.useRef)({
|
|
9430
|
+
var stateRef = (0, import_react2.useRef)({
|
|
9431
|
+
handleFocusVisible: !0
|
|
9432
|
+
});
|
|
9412
9433
|
process.env.NODE_ENV === "development" && time && time(_templateObject2());
|
|
9413
9434
|
var animationsConfig = componentContext.animationDriver, useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations, hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationsConfig == null ? void 0 : animationsConfig.supportsCSSVars, curState = stateRef.current, willBeAnimatedClient = function() {
|
|
9414
9435
|
var next = !!(hasAnimationProp && !isHOC && useAnimations);
|
|
@@ -9417,7 +9438,14 @@ var require_createComponent_native = __commonJS({
|
|
|
9417
9438
|
willBeAnimated && !curState.hasAnimated && (curState.hasAnimated = !0);
|
|
9418
9439
|
var isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)(), presence = willBeAnimated && props.animatePresence !== !1 && (animationsConfig == null || (_animationsConfig_usePresence = animationsConfig.usePresence) === null || _animationsConfig_usePresence === void 0 ? void 0 : _animationsConfig_usePresence.call(animationsConfig)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasRNAnimation = hasAnimationProp && (animationsConfig == null ? void 0 : animationsConfig.isReactNative), isReactNative = staticConfig.isReactNative, isAnimated = willBeAnimated;
|
|
9419
9440
|
!isReactNative && hasRNAnimation && !isHOC && !isHydrated && (isAnimated = !1, curState.willHydrate = !0), process.env.NODE_ENV === "development" && time && time(_templateObject3());
|
|
9420
|
-
var hasEnterState = hasEnterStyle || isEntering, needsToMount = !isHydrated || !curState.host, initialState = hasEnterState ? needsToMount ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted,
|
|
9441
|
+
var hasEnterState = hasEnterStyle || isEntering, needsToMount = !isHydrated || !curState.host, initialState = hasEnterState ? needsToMount ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, disabled = props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || // @ts-expect-error (comes from core)
|
|
9442
|
+
props.accessibilityDisabled || !1;
|
|
9443
|
+
disabled != null && (initialState.disabled = disabled);
|
|
9444
|
+
var states = (0, import_react2.useState)(initialState), state = props.forceStyle ? _object_spread_props8(_object_spread9({}, states[0]), _define_property9({}, props.forceStyle, !0)) : states[0], setState = states[1];
|
|
9445
|
+
disabled !== state.disabled && setState(_object_spread_props8(_object_spread9({}, state), {
|
|
9446
|
+
disabled
|
|
9447
|
+
}));
|
|
9448
|
+
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, debugProp);
|
|
9421
9449
|
if (isHydrated && state.unmounted === "should-enter" && (state.unmounted = !0), presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
9422
9450
|
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.warn("has presenceState ".concat(JSON.stringify(presenceState)));
|
|
9423
9451
|
var enterVariant = presenceState.enterVariant, exitVariant = presenceState.exitVariant, enterExitVariant = presenceState.enterExitVariant, custom = presenceState.custom;
|
|
@@ -9457,7 +9485,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9457
9485
|
};
|
|
9458
9486
|
}
|
|
9459
9487
|
process.env.NODE_ENV === "development" && time && time(_templateObject4());
|
|
9460
|
-
var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText)
|
|
9488
|
+
var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText);
|
|
9461
9489
|
process.env.NODE_ENV === "development" && time && time(_templateObject5());
|
|
9462
9490
|
var isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
9463
9491
|
animationsConfig && isAnimated && (elementType = animationsConfig[isText ? "Text" : "View"] || elementType);
|
|
@@ -9576,10 +9604,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9576
9604
|
}
|
|
9577
9605
|
process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
|
|
9578
9606
|
|
|
9579
|
-
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time && time(_templateObject12())
|
|
9580
|
-
var disabled = ((_props_accessibilityState1 = props.accessibilityState) === null || _props_accessibilityState1 === void 0 ? void 0 : _props_accessibilityState1.disabled) || // @ts-expect-error (comes from core)
|
|
9581
|
-
props.accessibilityDisabled;
|
|
9582
|
-
groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
9607
|
+
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time && time(_templateObject12()), groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
9583
9608
|
stateRef.current.group.emit(groupName, {
|
|
9584
9609
|
layout: e.nativeEvent.layout
|
|
9585
9610
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
@@ -9600,46 +9625,49 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9600
9625
|
});
|
|
9601
9626
|
var unPress = curState.unPress, shouldEnter = state.unmounted;
|
|
9602
9627
|
(0, import_react2.useEffect)(function() {
|
|
9603
|
-
if (
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
disposeGroupsListener = componentContext.groups.subscribe(function(name2, param) {
|
|
9616
|
-
var layout = param.layout, pseudo = param.pseudo, persist = function() {
|
|
9617
|
-
var group = _object_spread_props8(_object_spread9({}, state.group), _define_property9({}, name2, current));
|
|
9618
|
-
setStateShallow({
|
|
9619
|
-
group
|
|
9620
|
-
});
|
|
9628
|
+
if (!disabled) {
|
|
9629
|
+
if (shouldEnter) {
|
|
9630
|
+
setStateShallow({
|
|
9631
|
+
unmounted: !1
|
|
9632
|
+
});
|
|
9633
|
+
return;
|
|
9634
|
+
}
|
|
9635
|
+
var disposeGroupsListener;
|
|
9636
|
+
if (pseudoGroups || mediaGroups) {
|
|
9637
|
+
var current = {
|
|
9638
|
+
pseudo: {},
|
|
9639
|
+
media: {}
|
|
9621
9640
|
};
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9641
|
+
disposeGroupsListener = componentContext.groups.subscribe(function(name2, param) {
|
|
9642
|
+
var layout = param.layout, pseudo = param.pseudo, persist = function() {
|
|
9643
|
+
var group = _object_spread_props8(_object_spread9({}, state.group), _define_property9({}, name2, current));
|
|
9644
|
+
setStateShallow({
|
|
9645
|
+
group
|
|
9646
|
+
});
|
|
9647
|
+
};
|
|
9648
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(name2))
|
|
9649
|
+
Object.assign(current.pseudo, pseudo), persist();
|
|
9650
|
+
else if (layout && mediaGroups) {
|
|
9651
|
+
var mediaState22 = getMediaState(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState22);
|
|
9652
|
+
next !== current.media && (Object.assign(current.media, next), persist());
|
|
9653
|
+
}
|
|
9654
|
+
});
|
|
9655
|
+
}
|
|
9656
|
+
return function() {
|
|
9657
|
+
disposeGroupsListener == null || disposeGroupsListener(), mouseUps.delete(unPress);
|
|
9658
|
+
};
|
|
9629
9659
|
}
|
|
9630
|
-
return function() {
|
|
9631
|
-
disposeGroupsListener == null || disposeGroupsListener(), mouseUps.delete(unPress);
|
|
9632
|
-
};
|
|
9633
9660
|
}, [
|
|
9661
|
+
disabled,
|
|
9634
9662
|
shouldEnter,
|
|
9635
9663
|
pseudoGroups ? Object.keys(_to_consumable_array2(pseudoGroups)).join("") : 0,
|
|
9636
9664
|
mediaGroups ? Object.keys(_to_consumable_array2(mediaGroups)).join("") : 0
|
|
9637
9665
|
]);
|
|
9638
|
-
var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimeHoverStyle);
|
|
9666
|
+
var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimeHoverStyle);
|
|
9639
9667
|
process.env.NODE_ENV === "development" && time && time(_templateObject14());
|
|
9640
|
-
var events = shouldAttach
|
|
9668
|
+
var events = shouldAttach ? _object_spread9(_object_spread_props8(_object_spread9({
|
|
9641
9669
|
onPressOut: attachPress ? function(e) {
|
|
9642
|
-
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
9670
|
+
stateRef.current.handleFocusVisible = !0, unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
9643
9671
|
} : void 0
|
|
9644
9672
|
}, (attachHover || attachPress) && {
|
|
9645
9673
|
onMouseEnter: function(e) {
|
|
@@ -9652,7 +9680,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9652
9680
|
}
|
|
9653
9681
|
}), {
|
|
9654
9682
|
onPressIn: attachPress ? function(e) {
|
|
9655
|
-
runtimePressStyle && setStateShallow({
|
|
9683
|
+
stateRef.current.handleFocusVisible = !1, runtimePressStyle && setStateShallow({
|
|
9656
9684
|
press: !0,
|
|
9657
9685
|
pressIn: !0
|
|
9658
9686
|
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants4.isWeb && mouseUps.add(unPress);
|
|
@@ -9666,13 +9694,20 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9666
9694
|
}
|
|
9667
9695
|
}, attachFocus && {
|
|
9668
9696
|
onFocus: function(e) {
|
|
9669
|
-
|
|
9670
|
-
|
|
9697
|
+
pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
|
|
9698
|
+
setStateShallow({
|
|
9699
|
+
focus: !0,
|
|
9700
|
+
focusVisible: !!stateRef.current.handleFocusVisible
|
|
9701
|
+
});
|
|
9702
|
+
}, 0) : setStateShallow({
|
|
9703
|
+
focus: !0,
|
|
9704
|
+
focusVisible: !1
|
|
9671
9705
|
}), onFocus == null || onFocus(e);
|
|
9672
9706
|
},
|
|
9673
9707
|
onBlur: function(e) {
|
|
9674
|
-
setStateShallow({
|
|
9675
|
-
focus: !1
|
|
9708
|
+
stateRef.current.handleFocusVisible = !0, setStateShallow({
|
|
9709
|
+
focus: !1,
|
|
9710
|
+
focusVisible: !1
|
|
9676
9711
|
}), onBlur == null || onBlur(e);
|
|
9677
9712
|
}
|
|
9678
9713
|
}) : null;
|
|
@@ -9680,7 +9715,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9680
9715
|
var _viewProps_focusable;
|
|
9681
9716
|
Object.assign(events, {
|
|
9682
9717
|
cancelable: !viewProps.rejectResponderTermination,
|
|
9683
|
-
disabled
|
|
9718
|
+
disabled,
|
|
9684
9719
|
hitSlop: viewProps.hitSlop,
|
|
9685
9720
|
delayLongPress: viewProps.delayLongPress,
|
|
9686
9721
|
delayPressIn: viewProps.delayPressIn,
|
|
@@ -20209,6 +20244,10 @@ var require_ScrollView_native = __commonJS({
|
|
|
20209
20244
|
true: import_stacks3.fullscreenStyle
|
|
20210
20245
|
}
|
|
20211
20246
|
}
|
|
20247
|
+
}, {
|
|
20248
|
+
accept: {
|
|
20249
|
+
contentContainerStyle: "style"
|
|
20250
|
+
}
|
|
20212
20251
|
});
|
|
20213
20252
|
}
|
|
20214
20253
|
});
|
|
@@ -23671,7 +23710,7 @@ var require_Button_native = __commonJS({
|
|
|
23671
23710
|
backgrounded: !0,
|
|
23672
23711
|
borderWidth: 1,
|
|
23673
23712
|
borderColor: "transparent",
|
|
23674
|
-
|
|
23713
|
+
focusVisibleStyle: {
|
|
23675
23714
|
outlineColor: "$outlineColor",
|
|
23676
23715
|
outlineStyle: "solid",
|
|
23677
23716
|
outlineWidth: 2
|
|
@@ -23691,7 +23730,7 @@ var require_Button_native = __commonJS({
|
|
|
23691
23730
|
backgroundColor: "transparent",
|
|
23692
23731
|
borderColor: "$borderColorPress"
|
|
23693
23732
|
},
|
|
23694
|
-
|
|
23733
|
+
focusVisibleStyle: {
|
|
23695
23734
|
backgroundColor: "transparent",
|
|
23696
23735
|
borderColor: "$borderColorFocus"
|
|
23697
23736
|
}
|
|
@@ -23818,8 +23857,8 @@ var require_Button_native = __commonJS({
|
|
|
23818
23857
|
}, propsIn.disabled && {
|
|
23819
23858
|
// in rnw - false still has keyboard tabIndex, undefined = not actually focusable
|
|
23820
23859
|
focusable: void 0,
|
|
23821
|
-
// even with tabIndex unset, it will keep
|
|
23822
|
-
|
|
23860
|
+
// even with tabIndex unset, it will keep focusVisibleStyle on web so disable it here
|
|
23861
|
+
focusVisibleStyle: {
|
|
23823
23862
|
borderColor: "$background"
|
|
23824
23863
|
}
|
|
23825
23864
|
}), {
|
|
@@ -24206,7 +24245,9 @@ var require_Checkbox_native = __commonJS({
|
|
|
24206
24245
|
borderColor: "$borderColorHover"
|
|
24207
24246
|
},
|
|
24208
24247
|
focusStyle: {
|
|
24209
|
-
borderColor: "$borderColorFocus"
|
|
24248
|
+
borderColor: "$borderColorFocus"
|
|
24249
|
+
},
|
|
24250
|
+
focusVisibleStyle: {
|
|
24210
24251
|
outlineStyle: "solid",
|
|
24211
24252
|
outlineWidth: 2,
|
|
24212
24253
|
outlineColor: "$outlineColor"
|
|
@@ -31109,7 +31150,7 @@ var require_Popover_native = __commonJS({
|
|
|
31109
31150
|
disable: sheetActive,
|
|
31110
31151
|
hoverable,
|
|
31111
31152
|
disableFocus
|
|
31112
|
-
}), _React_useState1 = _sliced_to_array(React2.useState(), 2), anchorTo = _React_useState1[0],
|
|
31153
|
+
}), _React_useState1 = _sliced_to_array(React2.useState(), 2), anchorTo = _React_useState1[0], setAnchorToRaw = _React_useState1[1], setAnchorTo = (0, import_core12.createShallowSetState)(setAnchorToRaw);
|
|
31113
31154
|
React2.useImperativeHandle(forwardedRef, function() {
|
|
31114
31155
|
return {
|
|
31115
31156
|
anchorTo: setAnchorTo
|
|
@@ -31965,7 +32006,9 @@ var require_RadioGroup_native = __commonJS({
|
|
|
31965
32006
|
},
|
|
31966
32007
|
focusStyle: {
|
|
31967
32008
|
borderColor: "$borderColorHover",
|
|
31968
|
-
backgroundColor: "$backgroundHover"
|
|
32009
|
+
backgroundColor: "$backgroundHover"
|
|
32010
|
+
},
|
|
32011
|
+
focusVisibleStyle: {
|
|
31969
32012
|
outlineStyle: "solid",
|
|
31970
32013
|
outlineWidth: 2,
|
|
31971
32014
|
outlineColor: "$outlineColor"
|
|
@@ -31989,7 +32032,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
31989
32032
|
borderColor: "$borderColor",
|
|
31990
32033
|
backgroundColor: "$backgroundColor"
|
|
31991
32034
|
},
|
|
31992
|
-
|
|
32035
|
+
focusVisibleStyle: {
|
|
31993
32036
|
outlineWidth: 0
|
|
31994
32037
|
}
|
|
31995
32038
|
}
|
|
@@ -33132,7 +33175,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
33132
33175
|
cursor: "default",
|
|
33133
33176
|
size: size3,
|
|
33134
33177
|
outlineOffset: -0.5,
|
|
33135
|
-
|
|
33178
|
+
focusVisibleStyle: {
|
|
33136
33179
|
outlineColor: "$outlineColor",
|
|
33137
33180
|
outlineWidth: 1,
|
|
33138
33181
|
outlineStyle: "solid"
|
|
@@ -33491,7 +33534,7 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
33491
33534
|
hoverTheme: !0,
|
|
33492
33535
|
pressTheme: !0,
|
|
33493
33536
|
focusable: !0,
|
|
33494
|
-
|
|
33537
|
+
focusVisibleStyle: {
|
|
33495
33538
|
outlineStyle: "solid",
|
|
33496
33539
|
outlineWidth: 2,
|
|
33497
33540
|
outlineColor: "$outlineColor"
|
|
@@ -35821,7 +35864,7 @@ var require_Switch_native = __commonJS({
|
|
|
35821
35864
|
backgroundColor: "$background",
|
|
35822
35865
|
borderWidth: 2,
|
|
35823
35866
|
borderColor: "$background",
|
|
35824
|
-
|
|
35867
|
+
focusVisibleStyle: {
|
|
35825
35868
|
outlineColor: "$outlineColor",
|
|
35826
35869
|
outlineStyle: "solid",
|
|
35827
35870
|
outlineWidth: 2
|
|
@@ -37331,7 +37374,9 @@ var require_Toggle_native = __commonJS({
|
|
|
37331
37374
|
backgroundColor: "$backgroundPress"
|
|
37332
37375
|
},
|
|
37333
37376
|
focusStyle: {
|
|
37334
|
-
borderColor: "$borderColorFocus"
|
|
37377
|
+
borderColor: "$borderColorFocus"
|
|
37378
|
+
},
|
|
37379
|
+
focusVisibleStyle: {
|
|
37335
37380
|
outlineColor: "$outlineColor",
|
|
37336
37381
|
outlineWidth: 2,
|
|
37337
37382
|
outlineStyle: "solid"
|
|
@@ -38656,10 +38701,12 @@ var defaultStyles = _object_spread_props6(_object_spread6({
|
|
|
38656
38701
|
borderColor: "$borderColorHover"
|
|
38657
38702
|
},
|
|
38658
38703
|
focusStyle: {
|
|
38704
|
+
borderColor: "$borderColorFocus"
|
|
38705
|
+
},
|
|
38706
|
+
focusVisibleStyle: {
|
|
38659
38707
|
outlineColor: "$outlineColor",
|
|
38660
38708
|
outlineWidth: 2,
|
|
38661
|
-
outlineStyle: "solid"
|
|
38662
|
-
borderColor: "$borderColorFocus"
|
|
38709
|
+
outlineStyle: "solid"
|
|
38663
38710
|
}
|
|
38664
38711
|
}), InputFrame = (0, import_core7.styled)(import_react_native2.TextInput, {
|
|
38665
38712
|
name: "Input",
|
|
@@ -38679,7 +38726,7 @@ var defaultStyles = _object_spread_props6(_object_spread6({
|
|
|
38679
38726
|
}
|
|
38680
38727
|
}, {
|
|
38681
38728
|
isInput: !0,
|
|
38682
|
-
|
|
38729
|
+
accept: {
|
|
38683
38730
|
placeholderTextColor: "color",
|
|
38684
38731
|
selectionColor: "color"
|
|
38685
38732
|
}
|