@tamagui/web 3.0.0-beta.1604.1 → 3.0.0-beta.1670.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/cjs/createComponent.native.cjs +1 -1
- package/dist/cjs/createComponent.native.js +1 -1
- package/dist/cjs/createComponent.native.js.map +1 -1
- package/dist/cjs/createTamagui.cjs +10 -8
- package/dist/cjs/createTamagui.native.cjs +10 -8
- package/dist/cjs/createTamagui.native.js +10 -8
- package/dist/cjs/createTamagui.native.js.map +1 -1
- package/dist/cjs/eventHandling.native.cjs +28 -4
- package/dist/cjs/eventHandling.native.js +28 -4
- package/dist/cjs/eventHandling.native.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.cjs +5 -7
- package/dist/cjs/helpers/getSplitStyles.native.cjs +6 -8
- package/dist/cjs/helpers/getSplitStyles.native.js +6 -8
- package/dist/cjs/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeToParents.cjs +2 -1
- package/dist/cjs/helpers/proxyThemeToParents.native.cjs +2 -1
- package/dist/cjs/helpers/proxyThemeToParents.native.js +2 -1
- package/dist/cjs/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/cjs/helpers/themes.cjs +19 -11
- package/dist/cjs/helpers/themes.native.cjs +19 -11
- package/dist/cjs/helpers/themes.native.js +19 -11
- package/dist/cjs/helpers/themes.native.js.map +1 -1
- package/dist/cjs/hooks/useThemeState.cjs +9 -19
- package/dist/cjs/hooks/useThemeState.native.cjs +16 -22
- package/dist/cjs/hooks/useThemeState.native.js +16 -22
- package/dist/cjs/hooks/useThemeState.native.js.map +1 -1
- package/dist/cjs/internal-runtime.cjs +2 -0
- package/dist/cjs/internal-runtime.native.cjs +2 -0
- package/dist/cjs/internal-runtime.native.js +2 -0
- package/dist/cjs/internal-runtime.native.js.map +1 -1
- package/dist/esm/createComponent.native.js +1 -1
- package/dist/esm/createComponent.native.js.map +1 -1
- package/dist/esm/createTamagui.mjs +11 -9
- package/dist/esm/createTamagui.mjs.map +1 -1
- package/dist/esm/createTamagui.native.js +11 -9
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/eventHandling.native.js +28 -4
- package/dist/esm/eventHandling.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.mjs +5 -7
- package/dist/esm/helpers/getSplitStyles.mjs.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +6 -8
- package/dist/esm/helpers/getSplitStyles.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.mjs +3 -1
- package/dist/esm/helpers/proxyThemeToParents.mjs.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +3 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/themes.mjs +15 -11
- package/dist/esm/helpers/themes.mjs.map +1 -1
- package/dist/esm/helpers/themes.native.js +15 -11
- package/dist/esm/helpers/themes.native.js.map +1 -1
- package/dist/esm/hooks/useThemeState.mjs +8 -20
- package/dist/esm/hooks/useThemeState.mjs.map +1 -1
- package/dist/esm/hooks/useThemeState.native.js +16 -22
- package/dist/esm/hooks/useThemeState.native.js.map +1 -1
- package/dist/esm/internal-runtime.mjs +3 -2
- package/dist/esm/internal-runtime.mjs.map +1 -1
- package/dist/esm/internal-runtime.native.js +3 -2
- package/dist/esm/internal-runtime.native.js.map +1 -1
- package/package.json +17 -17
- package/src/createComponent.tsx +1 -1
- package/src/createTamagui.ts +17 -21
- package/src/eventHandling.native.ts +24 -3
- package/src/helpers/getSplitStyles.tsx +13 -8
- package/src/helpers/proxyThemeToParents.ts +2 -1
- package/src/helpers/themes.ts +17 -11
- package/src/hooks/useThemeState.ts +15 -35
- package/src/internal-runtime.ts +6 -1
- package/types/createTamagui.d.ts.map +1 -1
- package/types/eventHandling.native.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/proxyThemeToParents.d.ts.map +1 -1
- package/types/helpers/themes.d.ts +2 -0
- package/types/helpers/themes.d.ts.map +1 -1
- package/types/hooks/useThemeState.d.ts.map +1 -1
- package/types/internal-runtime.d.ts +1 -0
- package/types/internal-runtime.d.ts.map +1 -1
|
@@ -293,7 +293,6 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
293
293
|
var shouldCheckSkipProps = !noSkip;
|
|
294
294
|
var asChildExceptStyleLike = Boolean(flags & passAsChildStyleFlag);
|
|
295
295
|
var isTextOrInput = isText || isInput;
|
|
296
|
-
var hocParentVariants = isHOC ? parentVariants : void 0;
|
|
297
296
|
var keyInit = keyOg;
|
|
298
297
|
var valInit = valOg;
|
|
299
298
|
if (keyInit === "children") {
|
|
@@ -515,9 +514,8 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
515
514
|
var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
|
|
516
515
|
var isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
|
|
517
516
|
if (isStyleProp && asChildExceptStyleLike) return;
|
|
518
|
-
var shouldPassProp = !isStyleProp && isHOC ||
|
|
519
|
-
var
|
|
520
|
-
var isHOCShouldPassThrough = Boolean(isHOC && (parentVariant || keyInit in skipProps));
|
|
517
|
+
var shouldPassProp = !isStyleProp && isHOC || parentVariants && keyInit in parentVariants || (inlineProps === null || inlineProps === void 0 ? void 0 : inlineProps.has(keyInit));
|
|
518
|
+
var isHOCShouldPassThrough = isHOC && keyInit in skipProps;
|
|
521
519
|
var shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
522
520
|
if (process.env.NODE_ENV === "development" && debug === "verbose") {
|
|
523
521
|
console.groupCollapsed(` \u{1F511} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""}`);
|
|
@@ -605,7 +603,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
605
603
|
}
|
|
606
604
|
}
|
|
607
605
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver, styleStaticConfig) {
|
|
608
|
-
var _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_flatGroupKeys1, _styleState_flatGroupMedia1, _styleState_style;
|
|
606
|
+
var _staticConfig_Component_staticConfig, _staticConfig_Component, _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_flatGroupKeys1, _styleState_flatGroupMedia1, _styleState_style;
|
|
609
607
|
var conf = getConfig();
|
|
610
608
|
styleStaticConfig || (styleStaticConfig = getStyleStaticConfig(staticConfig, conf));
|
|
611
609
|
var driver = animationDriver || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
@@ -681,7 +679,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
681
679
|
var frontendContainer;
|
|
682
680
|
var frontendContainerType;
|
|
683
681
|
var processedProps = props;
|
|
684
|
-
var parentVariants =
|
|
682
|
+
var parentVariants = isHOC ? (_staticConfig_Component = staticConfig.Component) === null || _staticConfig_Component === void 0 ? void 0 : (_staticConfig_Component_staticConfig = _staticConfig_Component.staticConfig) === null || _staticConfig_Component_staticConfig === void 0 ? void 0 : _staticConfig_Component_staticConfig.variants : void 0;
|
|
685
683
|
var defaultProps = asChild ? styleStaticConfig.defaultProps : void 0;
|
|
686
684
|
var asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
|
|
687
685
|
var containerValue;
|
|
@@ -703,7 +701,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
703
701
|
styledContextKeys,
|
|
704
702
|
(noSkip ? passNoSkipFlag : 0) | (disableExpandShorthands ? passDisableShorthandsFlag : 0) | (noExpand ? passNoExpandFlag : 0) | (noMergeStyle ? passNoMergeFlag : 0) | (isHOC ? passHocFlag : 0) | (isText ? passTextFlag : 0) | (isInput ? passInputFlag : 0) | (asChildExceptStyleLike ? passAsChildStyleFlag : 0),
|
|
705
703
|
debug,
|
|
706
|
-
parentStaticConfig,
|
|
704
|
+
process.env.NODE_ENV === "development" ? parentStaticConfig : void 0,
|
|
707
705
|
defaultProps,
|
|
708
706
|
driverAnimations,
|
|
709
707
|
driverOutputStyle,
|
|
@@ -1760,7 +1758,7 @@ function emitValue(state, property, raw, cursor, originalValue, contextOnly) {
|
|
|
1760
1758
|
}
|
|
1761
1759
|
if (typeof raw === "string" && property === "background") {
|
|
1762
1760
|
var parts = splitComponents(raw);
|
|
1763
|
-
if (parts.length === 1 && !startsValueFunction(parts[0])) {
|
|
1761
|
+
if (parts.length === 1 && (!startsValueFunction(parts[0]) || classifyBorderComponents(parts[0]).color)) {
|
|
1764
1762
|
emitResolved(state, "backgroundColor", parts[0], cursor, originalValue, contextOnly);
|
|
1765
1763
|
return;
|
|
1766
1764
|
}
|