tamagui 1.88.19 → 1.88.21
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 +113 -75
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +108 -70
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
- package/dist/cjs/views/Layouts.js +0 -61
- package/dist/cjs/views/Layouts.js.map +0 -6
- package/dist/cjs/views/Layouts.native.js +0 -72
- package/dist/cjs/views/Layouts.native.js.map +0 -6
- package/dist/esm/views/Layouts.js +0 -45
- package/dist/esm/views/Layouts.js.map +0 -6
- package/dist/esm/views/Layouts.mjs +0 -43
- package/dist/esm/views/Layouts.native.js +0 -72
- package/dist/esm/views/Layouts.native.js.map +0 -6
- package/dist/jsx/views/Layouts.js +0 -45
- package/dist/jsx/views/Layouts.js.map +0 -6
- package/dist/jsx/views/Layouts.mjs +0 -43
- package/dist/jsx/views/Layouts.native.js +0 -72
- package/dist/jsx/views/Layouts.native.js.map +0 -6
package/dist/test.native.js
CHANGED
|
@@ -2349,6 +2349,55 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
2349
2349
|
}
|
|
2350
2350
|
});
|
|
2351
2351
|
|
|
2352
|
+
// ../web/dist/cjs/helpers/skipProps.native.js
|
|
2353
|
+
var require_skipProps_native = __commonJS({
|
|
2354
|
+
"../web/dist/cjs/helpers/skipProps.native.js"(exports2, module2) {
|
|
2355
|
+
"use strict";
|
|
2356
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
2357
|
+
for (var name in all)
|
|
2358
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
2359
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
2360
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
2361
|
+
for (let key of __getOwnPropNames2(from))
|
|
2362
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2363
|
+
return to;
|
|
2364
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), skipProps_exports = {};
|
|
2365
|
+
__export2(skipProps_exports, {
|
|
2366
|
+
skipProps: () => skipProps
|
|
2367
|
+
});
|
|
2368
|
+
module2.exports = __toCommonJS2(skipProps_exports);
|
|
2369
|
+
var skipProps = {
|
|
2370
|
+
untilMeasured: 1,
|
|
2371
|
+
animation: 1,
|
|
2372
|
+
space: 1,
|
|
2373
|
+
animateOnly: 1,
|
|
2374
|
+
disableClassName: 1,
|
|
2375
|
+
debug: 1,
|
|
2376
|
+
componentName: 1,
|
|
2377
|
+
disableOptimization: 1,
|
|
2378
|
+
tag: 1,
|
|
2379
|
+
style: 1,
|
|
2380
|
+
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
2381
|
+
group: 1
|
|
2382
|
+
};
|
|
2383
|
+
skipProps["data-test-renders"] = 1;
|
|
2384
|
+
Object.assign(skipProps, {
|
|
2385
|
+
whiteSpace: 1,
|
|
2386
|
+
wordWrap: 1,
|
|
2387
|
+
textOverflow: 1,
|
|
2388
|
+
textDecorationDistance: 1,
|
|
2389
|
+
cursor: 1,
|
|
2390
|
+
contain: 1,
|
|
2391
|
+
boxSizing: 1,
|
|
2392
|
+
boxShadow: 1,
|
|
2393
|
+
outlineStyle: 1,
|
|
2394
|
+
outlineOffset: 1,
|
|
2395
|
+
outlineWidth: 1,
|
|
2396
|
+
outlineColor: 1
|
|
2397
|
+
});
|
|
2398
|
+
}
|
|
2399
|
+
});
|
|
2400
|
+
|
|
2352
2401
|
// ../web/dist/cjs/constants/accessibilityDirectMap.native.js
|
|
2353
2402
|
var require_accessibilityDirectMap_native = __commonJS({
|
|
2354
2403
|
"../web/dist/cjs/constants/accessibilityDirectMap.native.js"(exports2, module2) {
|
|
@@ -3441,7 +3490,7 @@ var require_propMapper_native = __commonJS({
|
|
|
3441
3490
|
propMapper: () => propMapper
|
|
3442
3491
|
});
|
|
3443
3492
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
3444
|
-
var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
3493
|
+
var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
|
|
3445
3494
|
var _a;
|
|
3446
3495
|
if (lastFontFamilyToken = null, !import_constants4.isAndroid && key === "elevationAndroid")
|
|
3447
3496
|
return;
|
|
@@ -3522,37 +3571,39 @@ var require_propMapper_native = __commonJS({
|
|
|
3522
3571
|
let { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
3523
3572
|
for (let _key in value) {
|
|
3524
3573
|
let subKey = conf.shorthands[_key] || _key, val = value[_key];
|
|
3525
|
-
if (styleProps.
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
if (
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3574
|
+
if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
|
|
3575
|
+
if (styleProps.noExpand)
|
|
3576
|
+
res[subKey] = val;
|
|
3577
|
+
else if (variants && subKey in variants) {
|
|
3578
|
+
if (styleState.curProps[subKey] = val, parentVariantKey && parentVariantKey === key)
|
|
3579
|
+
res[subKey] = // SYNC WITH *1
|
|
3580
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val;
|
|
3581
|
+
else {
|
|
3582
|
+
let variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
|
|
3583
|
+
if (variantOut)
|
|
3584
|
+
for (let [key2, val2] of variantOut)
|
|
3585
|
+
val2 != null && (key2 in import_pseudoDescriptors.pseudoDescriptors ? (res[key2] ?? (res[key2] = {}), Object.assign(res[key2], val2)) : res[key2] = val2);
|
|
3586
|
+
}
|
|
3587
|
+
continue;
|
|
3536
3588
|
}
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3589
|
+
if ((0, import_createVariable.isVariable)(val)) {
|
|
3590
|
+
res[subKey] = resolveVariableValue(subKey, val, styleProps.resolveValues);
|
|
3591
|
+
continue;
|
|
3592
|
+
}
|
|
3593
|
+
if (typeof val == "string") {
|
|
3594
|
+
let fVal = (
|
|
3595
|
+
// SYNC WITH *1
|
|
3596
|
+
val[0] === "$" ? getTokenForKey(subKey, val, styleProps.resolveValues, styleState) : val
|
|
3597
|
+
);
|
|
3598
|
+
res[subKey] = fVal;
|
|
3599
|
+
continue;
|
|
3600
|
+
}
|
|
3601
|
+
if ((0, import_isObj.isObj)(val)) {
|
|
3602
|
+
let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
3603
|
+
res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
|
|
3604
|
+
} else
|
|
3605
|
+
res[subKey] = val;
|
|
3550
3606
|
}
|
|
3551
|
-
if ((0, import_isObj.isObj)(val)) {
|
|
3552
|
-
let subObject = resolveTokensAndVariants(subKey, val, styleProps, styleState, key);
|
|
3553
|
-
res[subKey] ?? (res[subKey] = {}), Object.assign(res[subKey], subObject);
|
|
3554
|
-
} else
|
|
3555
|
-
res[subKey] = val;
|
|
3556
3607
|
}
|
|
3557
3608
|
return res;
|
|
3558
3609
|
}, tokenCats = ["size", "color", "radius", "space", "zIndex"].map((name) => ({
|
|
@@ -3659,7 +3710,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3659
3710
|
useSplitStyles: () => useSplitStyles
|
|
3660
3711
|
});
|
|
3661
3712
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
3662
|
-
var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react2 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
|
|
3713
|
+
var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react2 = require("react"), import_config = require_config_native(), import_skipProps = require_skipProps_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
|
|
3663
3714
|
function isValidStyleKey(key, staticConfig) {
|
|
3664
3715
|
var _a;
|
|
3665
3716
|
return (staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles))[key] || ((_a = staticConfig.acceptTokens) == null ? void 0 : _a[key]);
|
|
@@ -3694,7 +3745,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3694
3745
|
};
|
|
3695
3746
|
for (let keyOg in props) {
|
|
3696
3747
|
let keyInit = keyOg, valInit = props[keyOg];
|
|
3697
|
-
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in skipProps && !styleProps.noSkip && !isHOC)
|
|
3748
|
+
if (styleProps.disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className" || keyInit in usedKeys || keyInit in import_skipProps.skipProps && !styleProps.noSkip && !isHOC)
|
|
3698
3749
|
continue;
|
|
3699
3750
|
let valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, staticConfig);
|
|
3700
3751
|
if (valInit !== props[keyInit] && (styleState.curProps[keyInit] = valInit), !isValidStyleKeyInit) {
|
|
@@ -3752,8 +3803,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3752
3803
|
if (isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))
|
|
3753
3804
|
continue;
|
|
3754
3805
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
3755
|
-
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps));
|
|
3756
|
-
if ((shouldPassProp || isHOCShouldPassThrough) && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in skipProps)
|
|
3806
|
+
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in import_skipProps.skipProps));
|
|
3807
|
+
if ((shouldPassProp || isHOCShouldPassThrough) && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || !styleProps.noSkip && keyInit in import_skipProps.skipProps)
|
|
3757
3808
|
continue;
|
|
3758
3809
|
if ((isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && valInit !== "unset" && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
|
|
3759
3810
|
style[keyInit] = valInit;
|
|
@@ -3990,7 +4041,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3990
4041
|
let val = styleIn[key];
|
|
3991
4042
|
key = conf2.shorthands[key] || key;
|
|
3992
4043
|
let expanded = (0, import_propMapper.propMapper)(key, val, styleState, { ...props, ...props[subKey] });
|
|
3993
|
-
if (!(!expanded || !staticConfig.isHOC && key in skipProps && !styleProps.noSkip))
|
|
4044
|
+
if (!(!expanded || !staticConfig.isHOC && key in import_skipProps.skipProps && !styleProps.noSkip))
|
|
3994
4045
|
for (let [skey, sval] of expanded)
|
|
3995
4046
|
!avoidMergeTransform && skey in import_helpers.stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(sval, key);
|
|
3996
4047
|
}
|
|
@@ -4010,35 +4061,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
4010
4061
|
}, mapTransformKeys = {
|
|
4011
4062
|
x: "translateX",
|
|
4012
4063
|
y: "translateY"
|
|
4013
|
-
}, skipProps = {
|
|
4014
|
-
untilMeasured: 1,
|
|
4015
|
-
animation: 1,
|
|
4016
|
-
space: 1,
|
|
4017
|
-
animateOnly: 1,
|
|
4018
|
-
disableClassName: 1,
|
|
4019
|
-
debug: 1,
|
|
4020
|
-
componentName: 1,
|
|
4021
|
-
disableOptimization: 1,
|
|
4022
|
-
tag: 1,
|
|
4023
|
-
style: 1,
|
|
4024
|
-
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
4025
|
-
group: 1
|
|
4026
4064
|
};
|
|
4027
|
-
skipProps["data-test-renders"] = 1;
|
|
4028
|
-
Object.assign(skipProps, {
|
|
4029
|
-
whiteSpace: 1,
|
|
4030
|
-
wordWrap: 1,
|
|
4031
|
-
textOverflow: 1,
|
|
4032
|
-
textDecorationDistance: 1,
|
|
4033
|
-
cursor: 1,
|
|
4034
|
-
contain: 1,
|
|
4035
|
-
boxSizing: 1,
|
|
4036
|
-
boxShadow: 1,
|
|
4037
|
-
outlineStyle: 1,
|
|
4038
|
-
outlineOffset: 1,
|
|
4039
|
-
outlineWidth: 1,
|
|
4040
|
-
outlineColor: 1
|
|
4041
|
-
});
|
|
4042
4065
|
function passDownProp(viewProps, key, val, shouldMergeObject = !1) {
|
|
4043
4066
|
if (shouldMergeObject) {
|
|
4044
4067
|
let next = {
|
|
@@ -10533,10 +10556,21 @@ var require_Dialog_native = __commonJS({
|
|
|
10533
10556
|
children: isShowing ? children : null
|
|
10534
10557
|
}
|
|
10535
10558
|
);
|
|
10536
|
-
|
|
10559
|
+
if (useShowDialogSheet(context))
|
|
10560
|
+
return children;
|
|
10561
|
+
if (context.modal) {
|
|
10562
|
+
if (isFullyHidden)
|
|
10563
|
+
return null;
|
|
10564
|
+
let framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, { scope: __scopeDialog, forceMount, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, { pointerEvents: isShowing ? "auto" : "none", ...frameProps, children: contents }) });
|
|
10565
|
+
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, { zIndex: props.zIndex ?? 1e5, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, { children: framedContents }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, { __scopeDialog, children: framedContents });
|
|
10566
|
+
}
|
|
10567
|
+
return contents;
|
|
10537
10568
|
};
|
|
10538
10569
|
DialogPortal.displayName = PORTAL_NAME;
|
|
10539
|
-
var
|
|
10570
|
+
var PassthroughTheme = ({ children }) => {
|
|
10571
|
+
let themeName = (0, import_core12.useThemeName)();
|
|
10572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, { name: themeName, forceClassName: !0, children });
|
|
10573
|
+
}, OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
|
|
10540
10574
|
name: OVERLAY_NAME
|
|
10541
10575
|
}), DialogOverlay = DialogOverlayFrame.extractable(
|
|
10542
10576
|
React2.forwardRef(
|
|
@@ -16597,6 +16631,8 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
16597
16631
|
{
|
|
16598
16632
|
componentName: TRIGGER_NAME,
|
|
16599
16633
|
unstyled,
|
|
16634
|
+
tag: "button",
|
|
16635
|
+
id: itemParentContext.id,
|
|
16600
16636
|
...!unstyled && {
|
|
16601
16637
|
backgrounded: !0,
|
|
16602
16638
|
radiused: !0,
|
|
@@ -16608,9 +16644,9 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
16608
16644
|
outlineWidth: 2,
|
|
16609
16645
|
outlineColor: "$outlineColor"
|
|
16610
16646
|
},
|
|
16611
|
-
borderWidth: 1
|
|
16647
|
+
borderWidth: 1,
|
|
16648
|
+
size: itemParentContext.size
|
|
16612
16649
|
},
|
|
16613
|
-
size: itemParentContext.size,
|
|
16614
16650
|
"aria-expanded": context.open,
|
|
16615
16651
|
"aria-autocomplete": "none",
|
|
16616
16652
|
dir: context.dir,
|
|
@@ -16893,8 +16929,9 @@ var require_Select_native = __commonJS({
|
|
|
16893
16929
|
disablePreventBodyScroll,
|
|
16894
16930
|
size: sizeProp = "$true",
|
|
16895
16931
|
onActiveChange,
|
|
16896
|
-
dir
|
|
16897
|
-
|
|
16932
|
+
dir,
|
|
16933
|
+
id
|
|
16934
|
+
} = props, internalId = React2.useId(), scopeKey = __scopeSelect ? Object.keys(__scopeSelect)[0] ?? internalId : internalId, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
16898
16935
|
Contents: React2.useCallback(
|
|
16899
16936
|
() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, { name: `${scopeKey}SheetContents` }),
|
|
16900
16937
|
[scopeKey]
|
|
@@ -16930,11 +16967,12 @@ var require_Select_native = __commonJS({
|
|
|
16930
16967
|
import_context.SelectItemParentProvider,
|
|
16931
16968
|
{
|
|
16932
16969
|
scope: __scopeSelect,
|
|
16933
|
-
initialValue: React2.useMemo(() => value, []),
|
|
16970
|
+
initialValue: React2.useMemo(() => value, [open]),
|
|
16934
16971
|
size: sizeProp,
|
|
16935
16972
|
activeIndexSubscribe,
|
|
16936
16973
|
valueSubscribe,
|
|
16937
16974
|
setOpen,
|
|
16975
|
+
id,
|
|
16938
16976
|
onChange: React2.useCallback((val) => {
|
|
16939
16977
|
setValue(val), emitValue(val);
|
|
16940
16978
|
}, []),
|