@tamagui/core 3.0.0-beta.1432.1 → 3.0.0-beta.1444.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.cjs CHANGED
@@ -10892,7 +10892,7 @@ var stateModifierSelectors = Object.freeze([
10892
10892
  ":focus",
10893
10893
  ":focus-visible",
10894
10894
  ":active",
10895
- "[aria-disabled]",
10895
+ "[aria-disabled=\"true\"]",
10896
10896
  ".t_unmounted",
10897
10897
  ".t_exiting"
10898
10898
  ]);
@@ -15049,6 +15049,7 @@ var passFrontendContainerType = 27;
15049
15049
  var passSourceLayer = 28;
15050
15050
  var passParentCursor = 29;
15051
15051
  var passMapSourceKey = 30;
15052
+ var passVariantOutput = 31;
15052
15053
  var passFlags = 13;
15053
15054
  var sourceLayerBase = 0;
15054
15055
  var sourceLayerVariant = 1;
@@ -15298,6 +15299,7 @@ function contributeProp(pass, keyOg, valOg) {
15298
15299
  return;
15299
15300
  } else if (keyInit.startsWith("data-")) return;
15300
15301
  }
15302
+ if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in stylePropsAll) && !(keyInit in skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !(styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(keyInit)) && !(styledContext && keyInit in styledContext)) return;
15301
15303
  var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
15302
15304
  var isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
15303
15305
  if (isStyleProp && asChildExceptStyleLike) return;
@@ -16537,9 +16539,12 @@ function emitVariantStyle(state, key, value, original, condition, disabled) {
16537
16539
  ((_state = state).overriddenContextProps || (_state.overriddenContextProps = {}))[key] = ((_state1 = state).originalContextPropValues || (_state1.originalContextPropValues = {}))[key] = original;
16538
16540
  }
16539
16541
  var parent = pass[passParentCursor];
16542
+ var parentVariantOutput = pass[passVariantOutput];
16540
16543
  pass[passParentCursor] = condition;
16544
+ pass[passVariantOutput] = true;
16541
16545
  contributeProp(pass, key, value, original, disabled);
16542
16546
  pass[passParentCursor] = parent;
16547
+ pass[passVariantOutput] = parentVariantOutput;
16543
16548
  }
16544
16549
  //#endregion
16545
16550
  //#region ../web/dist/esm/helpers/NativeTextBinding.native.js
@@ -17092,7 +17097,6 @@ var _excluded2$2 = [
17092
17097
  "asChild",
17093
17098
  "children",
17094
17099
  "themeShallow",
17095
- "spaceDirection",
17096
17100
  "onPress",
17097
17101
  "onLongPress",
17098
17102
  "onPressIn",
@@ -17228,7 +17232,9 @@ function createComponent(staticConfig) {
17228
17232
  var elementType = BaseComponent;
17229
17233
  var isAnimatedCustomComponent = animationDriver && isAnimated && animationDriver.needsCustomComponent;
17230
17234
  if (isAnimatedCustomComponent) elementType = animationDriver[isText ? "Text" : "View"] || elementType;
17231
- var disableTheme = isHOC;
17235
+ var disableThemeProp = false;
17236
+ var hocThemesSelf = isHOC && "theme" in props;
17237
+ var disableTheme = disableThemeProp || isHOC && !hocThemesSelf;
17232
17238
  var themeStateProps = {
17233
17239
  disable: disableTheme,
17234
17240
  shallow: props.themeShallow,
@@ -17533,11 +17539,11 @@ function createComponent(staticConfig) {
17533
17539
  var groupSetRevision = useGroupSetRevision(pseudoGroups, mediaGroups);
17534
17540
  stateRef.current.prevStyle = splitStylesStyle || null;
17535
17541
  var propsWithAnimation = props;
17536
- var _ref6 = viewPropsIn || {}, { asChild, children, themeShallow, spaceDirection: _spaceDirection, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onTransition, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref6, nonTamaguiProps = _objectWithoutProperties(_ref6, _excluded2$2);
17542
+ var _ref6 = viewPropsIn || {}, { asChild, children, themeShallow, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onTransition, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref6, nonTamaguiProps = _objectWithoutProperties(_ref6, _excluded2$2);
17537
17543
  var viewProps = nonTamaguiProps;
17538
17544
  if (props.forceStyle) viewProps.forceStyle = props.forceStyle;
17539
17545
  if (isHOC) {
17540
- if (typeof _themeProp !== "undefined") viewProps.theme = _themeProp;
17546
+ if (typeof _themeProp !== "undefined" && !hocThemesSelf) viewProps.theme = _themeProp;
17541
17547
  if (typeof passThrough !== "undefined") viewProps.passThrough = passThrough;
17542
17548
  if (typeof asChild !== "undefined") viewProps.asChild = asChild;
17543
17549
  if (typeof onTransition !== "undefined") viewProps.onTransition = onTransition;
@@ -937,7 +937,7 @@ var stateModifierSelectors = Object.freeze([
937
937
  ":focus",
938
938
  ":focus-visible",
939
939
  ":active",
940
- "[aria-disabled]",
940
+ "[aria-disabled=\"true\"]",
941
941
  ".t_unmounted",
942
942
  ".t_exiting"
943
943
  ]);
@@ -5753,6 +5753,7 @@ var passFrontendContainerType = 27;
5753
5753
  var passSourceLayer = 28;
5754
5754
  var passParentCursor = 29;
5755
5755
  var passMapSourceKey = 30;
5756
+ var passVariantOutput = 31;
5756
5757
  var passFlags = 13;
5757
5758
  var sourceLayerBase = 0;
5758
5759
  var sourceLayerVariant = 1;
@@ -6020,6 +6021,10 @@ function contributeProp(pass, keyOg, valOg) {
6020
6021
  return;
6021
6022
  } else if (keyInit.startsWith("data-")) return;
6022
6023
  }
6024
+ if (pass[passVariantOutput] && !isValidStyleKeyInit && !keyInit.startsWith("aria-") && !(keyInit in stylePropsAll) && !(keyInit in skipProps) && !(variants && keyInit in variants) && !(parentVariants && keyInit in parentVariants) && !(styledContextKeys === null || styledContextKeys === void 0 ? void 0 : styledContextKeys.has(keyInit)) && !(styledContext && keyInit in styledContext)) {
6025
+ if (globalThis.process.env.NODE_ENV === "development") warnOnce(`variant-non-style:${keyInit}`, `a variant set "${keyInit}", which is not a style. Variants hold styles and aria/data attributes only: set "${keyInit}" on the component one level up.`);
6026
+ return;
6027
+ }
6023
6028
  var isVariant = !isValidStyleKeyInit && variants && keyInit in variants;
6024
6029
  var isStyleProp = isValidStyleKeyInit || isVariant && !noExpand;
6025
6030
  if (isStyleProp && asChildExceptStyleLike) return;
@@ -7451,9 +7456,12 @@ function emitVariantStyle(state, key, value, original, condition, disabled) {
7451
7456
  ((_state = state).overriddenContextProps || (_state.overriddenContextProps = {}))[key] = ((_state1 = state).originalContextPropValues || (_state1.originalContextPropValues = {}))[key] = original;
7452
7457
  }
7453
7458
  var parent = pass[passParentCursor];
7459
+ var parentVariantOutput = pass[passVariantOutput];
7454
7460
  pass[passParentCursor] = condition;
7461
+ pass[passVariantOutput] = true;
7455
7462
  contributeProp(pass, key, value, original, disabled);
7456
7463
  pass[passParentCursor] = parent;
7464
+ pass[passVariantOutput] = parentVariantOutput;
7457
7465
  }
7458
7466
  //#endregion
7459
7467
  //#region ../web/dist/esm/helpers/NativeTextBinding.native.js
@@ -8046,7 +8054,6 @@ var _excluded2$2 = [
8046
8054
  "asChild",
8047
8055
  "children",
8048
8056
  "themeShallow",
8049
- "spaceDirection",
8050
8057
  "onPress",
8051
8058
  "onLongPress",
8052
8059
  "onPressIn",
@@ -8251,7 +8258,9 @@ function createComponent(staticConfig) {
8251
8258
  var elementType = BaseComponent;
8252
8259
  var isAnimatedCustomComponent = animationDriver && isAnimated && animationDriver.needsCustomComponent;
8253
8260
  if (isAnimatedCustomComponent) elementType = animationDriver[isText ? "Text" : "View"] || elementType;
8254
- var disableTheme = isHOC;
8261
+ var disableThemeProp = false;
8262
+ var hocThemesSelf = isHOC && "theme" in props;
8263
+ var disableTheme = disableThemeProp || isHOC && !hocThemesSelf;
8255
8264
  if (globalThis.process.env.NODE_ENV === "development" && time$1) time$1`theme-props`;
8256
8265
  var themeStateProps = {
8257
8266
  disable: disableTheme,
@@ -8605,11 +8614,11 @@ ${banner}
8605
8614
  var groupSetRevision = useGroupSetRevision(pseudoGroups, mediaGroups);
8606
8615
  stateRef.current.prevStyle = splitStylesStyle || null;
8607
8616
  var propsWithAnimation = props;
8608
- var _ref6 = viewPropsIn || {}, { asChild, children, themeShallow, spaceDirection: _spaceDirection, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onTransition, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref6, nonTamaguiProps = _objectWithoutProperties(_ref6, _excluded2$2);
8617
+ var _ref6 = viewPropsIn || {}, { asChild, children, themeShallow, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onTransition, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref6, nonTamaguiProps = _objectWithoutProperties(_ref6, _excluded2$2);
8609
8618
  var viewProps = nonTamaguiProps;
8610
8619
  if (props.forceStyle) viewProps.forceStyle = props.forceStyle;
8611
8620
  if (isHOC) {
8612
- if (typeof _themeProp !== "undefined") viewProps.theme = _themeProp;
8621
+ if (typeof _themeProp !== "undefined" && !hocThemesSelf) viewProps.theme = _themeProp;
8613
8622
  if (typeof passThrough !== "undefined") viewProps.passThrough = passThrough;
8614
8623
  if (typeof asChild !== "undefined") viewProps.asChild = asChild;
8615
8624
  if (typeof onTransition !== "undefined") viewProps.onTransition = onTransition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "3.0.0-beta.1432.1",
3
+ "version": "3.0.0-beta.1444.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -137,19 +137,19 @@
137
137
  "clean:build": "tamagui-build clean:build"
138
138
  },
139
139
  "dependencies": {
140
- "@tamagui/compose-refs": "3.0.0-beta.1432.1",
141
- "@tamagui/constants": "3.0.0-beta.1432.1",
142
- "@tamagui/helpers": "3.0.0-beta.1432.1",
143
- "@tamagui/react-native-media-driver": "3.0.0-beta.1432.1",
144
- "@tamagui/react-native-use-pressable": "3.0.0-beta.1432.1",
145
- "@tamagui/use-element-layout": "3.0.0-beta.1432.1",
146
- "@tamagui/use-event": "3.0.0-beta.1432.1",
147
- "@tamagui/web": "3.0.0-beta.1432.1"
140
+ "@tamagui/compose-refs": "3.0.0-beta.1444.1",
141
+ "@tamagui/constants": "3.0.0-beta.1444.1",
142
+ "@tamagui/helpers": "3.0.0-beta.1444.1",
143
+ "@tamagui/react-native-media-driver": "3.0.0-beta.1444.1",
144
+ "@tamagui/react-native-use-pressable": "3.0.0-beta.1444.1",
145
+ "@tamagui/use-element-layout": "3.0.0-beta.1444.1",
146
+ "@tamagui/use-event": "3.0.0-beta.1444.1",
147
+ "@tamagui/web": "3.0.0-beta.1444.1"
148
148
  },
149
149
  "devDependencies": {
150
- "@tamagui/build": "3.0.0-beta.1432.1",
151
- "@tamagui/native-bundle": "3.0.0-beta.1432.1",
152
- "@tamagui/react-native-web-lite": "3.0.0-beta.1432.1",
150
+ "@tamagui/build": "3.0.0-beta.1444.1",
151
+ "@tamagui/native-bundle": "3.0.0-beta.1444.1",
152
+ "@tamagui/react-native-web-lite": "3.0.0-beta.1444.1",
153
153
  "@testing-library/react": "^16.1.0",
154
154
  "csstype": "^3.0.10",
155
155
  "react": "19.2.3",