tamagui 1.93.3 → 1.94.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.js +12 -77
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +12 -77
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
- package/types/views/Input.d.ts +8 -8
package/dist/native.js
CHANGED
|
@@ -5264,57 +5264,7 @@ var require_accessibilityDirectMap_native = __commonJS({
|
|
|
5264
5264
|
}
|
|
5265
5265
|
});
|
|
5266
5266
|
module2.exports = __toCommonJS2(accessibilityDirectMap_native_exports);
|
|
5267
|
-
var accessibilityDirectMap = {}, webToNativeAccessibilityDirectMap = {
|
|
5268
|
-
"aria-label": "accessibilityLabel",
|
|
5269
|
-
"aria-labelledby": "accessibilityLabelledBy",
|
|
5270
|
-
"aria-live": "accessibilityLiveRegion",
|
|
5271
|
-
"aria-modal": "accessibilityViewIsModal",
|
|
5272
|
-
"aria-hidden": "accessibilityElementsHidden"
|
|
5273
|
-
}, nativeAccessibilityValue = {
|
|
5274
|
-
"aria-valuemin": "min",
|
|
5275
|
-
"aria-valuemax": "max",
|
|
5276
|
-
"aria-valuenow": "now",
|
|
5277
|
-
"aria-valuetext": "text"
|
|
5278
|
-
}, nativeAccessibilityState = {
|
|
5279
|
-
"aria-disabled": "disabled",
|
|
5280
|
-
"aria-selected": "selected",
|
|
5281
|
-
"aria-checked": "checked",
|
|
5282
|
-
"aria-busy": "busy",
|
|
5283
|
-
"aria-expanded": "expanded"
|
|
5284
|
-
}, accessibilityWebRoleToNativeRole = {
|
|
5285
|
-
alert: "alert",
|
|
5286
|
-
button: "button",
|
|
5287
|
-
checkbox: "checkbox",
|
|
5288
|
-
combobox: "combobox",
|
|
5289
|
-
grid: "grid",
|
|
5290
|
-
group: "none",
|
|
5291
|
-
heading: "header",
|
|
5292
|
-
imagebutton: "imagebutton",
|
|
5293
|
-
img: "image",
|
|
5294
|
-
keyboardkey: "keyboardkey",
|
|
5295
|
-
link: "link",
|
|
5296
|
-
menu: "menu",
|
|
5297
|
-
menubar: "menubar",
|
|
5298
|
-
menuitem: "menuitem",
|
|
5299
|
-
none: "none",
|
|
5300
|
-
presentation: "none",
|
|
5301
|
-
progressbar: "progressbar",
|
|
5302
|
-
radio: "radio",
|
|
5303
|
-
radiogroup: "radiogroup",
|
|
5304
|
-
region: "summary",
|
|
5305
|
-
scrollbar: "scrollbar",
|
|
5306
|
-
searchbox: "search",
|
|
5307
|
-
slider: "adjustable",
|
|
5308
|
-
spinbutton: "spinbutton",
|
|
5309
|
-
summary: "summary",
|
|
5310
|
-
switch: "switch",
|
|
5311
|
-
tab: "tab",
|
|
5312
|
-
tablist: "tablist",
|
|
5313
|
-
text: "text",
|
|
5314
|
-
timer: "timer",
|
|
5315
|
-
togglebutton: "togglebutton",
|
|
5316
|
-
toolbar: "toolbar"
|
|
5317
|
-
};
|
|
5267
|
+
var accessibilityDirectMap = {}, webToNativeAccessibilityDirectMap = {}, nativeAccessibilityValue = {}, nativeAccessibilityState = {}, accessibilityWebRoleToNativeRole = {};
|
|
5318
5268
|
}
|
|
5319
5269
|
});
|
|
5320
5270
|
|
|
@@ -7785,24 +7735,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7785
7735
|
continue;
|
|
7786
7736
|
if (keyInit === "userSelect")
|
|
7787
7737
|
keyInit = "selectable", valInit = valInit !== "none";
|
|
7788
|
-
else if (keyInit
|
|
7789
|
-
viewProps.accessibilityRole = import_accessibilityDirectMap.accessibilityWebRoleToNativeRole[valInit];
|
|
7790
|
-
continue;
|
|
7791
|
-
} else if (keyInit.startsWith("aria-")) {
|
|
7792
|
-
if (import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit]) {
|
|
7793
|
-
var nativeA11yProp = import_accessibilityDirectMap.webToNativeAccessibilityDirectMap[keyInit];
|
|
7794
|
-
keyInit === "aria-hidden" && (viewProps["aria-hidden"] = valInit), viewProps[nativeA11yProp] = valInit;
|
|
7795
|
-
continue;
|
|
7796
|
-
}
|
|
7797
|
-
if (import_accessibilityDirectMap.nativeAccessibilityValue[keyInit]) {
|
|
7798
|
-
var field = import_accessibilityDirectMap.nativeAccessibilityValue[keyInit];
|
|
7799
|
-
viewProps.accessibilityValue ? viewProps.accessibilityValue[field] = valInit : viewProps.accessibilityValue = _define_property9({}, field, valInit);
|
|
7800
|
-
} else if (import_accessibilityDirectMap.nativeAccessibilityState[keyInit]) {
|
|
7801
|
-
var field1 = import_accessibilityDirectMap.nativeAccessibilityState[keyInit];
|
|
7802
|
-
viewProps.accessibilityState ? viewProps.accessibilityState[field1] = valInit : viewProps.accessibilityState = _define_property9({}, field1, valInit);
|
|
7803
|
-
}
|
|
7804
|
-
continue;
|
|
7805
|
-
} else if (keyInit.startsWith("data-"))
|
|
7738
|
+
else if (keyInit.startsWith("data-"))
|
|
7806
7739
|
continue;
|
|
7807
7740
|
}
|
|
7808
7741
|
if (keyInit === "dataSet") {
|
|
@@ -7812,7 +7745,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7812
7745
|
}
|
|
7813
7746
|
if (0)
|
|
7814
7747
|
var didUseKeyInit;
|
|
7815
|
-
var 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), isMediaOrPseudo1 = !!(isMedia || isPseudo)
|
|
7748
|
+
var 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), isMediaOrPseudo1 = !!(isMedia || isPseudo);
|
|
7749
|
+
if (isMediaOrPseudo1 && keyInit.startsWith("$group-")) {
|
|
7750
|
+
var name = keyInit.split("-")[1];
|
|
7751
|
+
context != null && context.groups.subscribe && !(context != null && context.groups.state[name]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
|
|
7752
|
+
}
|
|
7753
|
+
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo1 || isVariant && !styleProps.noExpand || isShorthand;
|
|
7816
7754
|
if (!(isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))) {
|
|
7817
7755
|
var shouldPassProp = !isStyleProp || // is in parent variants
|
|
7818
7756
|
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
@@ -8171,7 +8109,7 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8171
8109
|
var cnStyles, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3;
|
|
8172
8110
|
try {
|
|
8173
8111
|
for (var _iterator3, _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = !0)
|
|
8174
|
-
var
|
|
8112
|
+
var name1;
|
|
8175
8113
|
} catch (err) {
|
|
8176
8114
|
} finally {
|
|
8177
8115
|
try {
|
|
@@ -9376,10 +9314,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9376
9314
|
var hasEnterState = hasEnterStyle || isEntering, needsToMount = !isHydrated || !curStateRef.host, initialState = hasEnterState ? needsToMount ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
9377
9315
|
disabled != null && (initialState.disabled = disabled);
|
|
9378
9316
|
var states = (0, import_react4.useState)(initialState), state = props.forceStyle ? _object_spread_props8(_object_spread9({}, states[0]), _define_property9({}, props.forceStyle, !0)) : states[0], setState = states[1];
|
|
9379
|
-
disabled !== state.disabled &&
|
|
9380
|
-
// removes any stale press state etc
|
|
9381
|
-
disabled
|
|
9382
|
-
}));
|
|
9317
|
+
disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState(_object_spread9({}, state)));
|
|
9383
9318
|
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, props.debug);
|
|
9384
9319
|
if (isHydrated && state.unmounted === "should-enter" && (state.unmounted = !0), presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
9385
9320
|
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn("has presenceState ".concat(JSON.stringify(presenceState)));
|
|
@@ -9677,7 +9612,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9677
9612
|
pseudoGroups ? Object.keys(_to_consumable_array2(pseudoGroups)).join("") : 0,
|
|
9678
9613
|
mediaGroups ? Object.keys(_to_consumable_array2(mediaGroups)).join("") : 0
|
|
9679
9614
|
]);
|
|
9680
|
-
var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || 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 ||
|
|
9615
|
+
var runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || 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 || runtimePressStyle);
|
|
9681
9616
|
process.env.NODE_ENV === "development" && time && time(_templateObject14());
|
|
9682
9617
|
var events = shouldAttach ? _object_spread9(_object_spread_props8(_object_spread9({
|
|
9683
9618
|
onPressOut: attachPress ? function(e) {
|
|
@@ -10036,7 +9971,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
10036
9971
|
group
|
|
10037
9972
|
});
|
|
10038
9973
|
};
|
|
10039
|
-
if (pseudo && pseudoGroups != null && pseudoGroups.has(name))
|
|
9974
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name)))
|
|
10040
9975
|
Object.assign(current.pseudo, pseudo), persist();
|
|
10041
9976
|
else if (layout && mediaGroups) {
|
|
10042
9977
|
var mediaState3 = getMediaState(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState3);
|