tamagui 1.102.1 → 1.102.3

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 CHANGED
@@ -12553,7 +12553,9 @@ var require_useProps_native = __commonJS({
12553
12553
  }
12554
12554
  function usePropsAndStyle2(props, opts) {
12555
12555
  var _opts_forComponent, _themeState_state, _opts_forComponent_staticConfig, staticConfig = (_opts_forComponent_staticConfig = opts == null || (_opts_forComponent = opts.forComponent) === null || _opts_forComponent === void 0 ? void 0 : _opts_forComponent.staticConfig) !== null && _opts_forComponent_staticConfig !== void 0 ? _opts_forComponent_staticConfig : import_Stack.Stack.staticConfig, _useThemeWithState = _sliced_to_array((0, import_useTheme.useThemeWithState)({
12556
- componentName: staticConfig.componentName
12556
+ componentName: staticConfig.componentName,
12557
+ name: "theme" in props ? props.theme : void 0,
12558
+ inverse: "themeInverse" in props ? props.themeInverse : void 0
12557
12559
  }), 2), themeState = _useThemeWithState[0], theme = _useThemeWithState[1], componentContext = (0, import_react4.useContext)(import_ComponentContext.ComponentContext), _useComponentState = (0, import_createComponent.useComponentState)(props, componentContext, staticConfig, (0, import_config.getConfig)()), state = _useComponentState.state, disabled = _useComponentState.disabled, setStateShallow = _useComponentState.setStateShallow, media = (0, import_useMedia.useMedia)(), splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, ((_themeState_state = themeState.state) === null || _themeState_state === void 0 ? void 0 : _themeState_state.name) || "", state, _object_spread9({
12558
12560
  isAnimated: !1,
12559
12561
  mediaState: media,
@@ -36751,7 +36753,7 @@ var require_createSwitch_native = __commonJS({
36751
36753
  }
36752
36754
  });
36753
36755
  module2.exports = __toCommonJS2(createSwitch_exports);
36754
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native16(), import_switch_headless = require_index_native67(), import_use_controllable_state = require_index_native9(), React2 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_StyledContext = require_StyledContext_native(), import_Switch = require_Switch_native();
36756
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native16(), import_focusable3 = require_index_native44(), import_switch_headless = require_index_native67(), import_use_controllable_state = require_index_native9(), React2 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_StyledContext = require_StyledContext_native(), import_Switch = require_Switch_native();
36755
36757
  function _array_like_to_array2(arr, len) {
36756
36758
  (len == null || len > arr.length) && (len = arr.length);
36757
36759
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
@@ -36901,7 +36903,22 @@ var require_createSwitch_native = __commonJS({
36901
36903
  setChecked
36902
36904
  ],
36903
36905
  forwardedRef
36904
- ), switchProps = _useSwitch.switchProps, bubbleInput = _useSwitch.bubbleInput, switchRef = _useSwitch.switchRef, renderNative = (0, import_core12.shouldRenderNativePlatform)(native);
36906
+ ), switchProps = _useSwitch.switchProps, bubbleInput = _useSwitch.bubbleInput, switchRef = _useSwitch.switchRef;
36907
+ React2.useEffect(function() {
36908
+ if (props.id && !props.disabled) return (0, import_focusable3.registerFocusable)(props.id, {
36909
+ focusAndSelect: function() {
36910
+ setChecked == null || setChecked(function(value) {
36911
+ return !value;
36912
+ });
36913
+ },
36914
+ focus: function() {
36915
+ }
36916
+ });
36917
+ }, [
36918
+ props.id,
36919
+ props.disabled
36920
+ ]);
36921
+ var renderNative = (0, import_core12.shouldRenderNativePlatform)(native);
36905
36922
  return renderNative === "android" || renderNative === "ios" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native4.Switch, _object_spread9({
36906
36923
  value: checked,
36907
36924
  onValueChange: setChecked