tamagui 1.118.1 → 1.118.2

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
@@ -3907,7 +3907,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
3907
3907
  return !1;
3908
3908
  }
3909
3909
  function hasFixedSchemeParent(manager) {
3910
- return manager == null ? void 0 : manager.getParents().some(function(x) {
3910
+ return manager == null ? void 0 : manager.getParents().slice(1).some(function(x) {
3911
3911
  return x.state.isSchemeFixed;
3912
3912
  });
3913
3913
  }
@@ -21799,7 +21799,21 @@ var require_useCheckbox_native = __commonJS({
21799
21799
  module2.exports = __toCommonJS2(useCheckbox_exports);
21800
21800
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_label = require_index_native45(), import_react3 = __toESM2(require("react")), import_BubbleInput = require_BubbleInput_native(), import_utils3 = require_utils_native2();
21801
21801
  function useCheckbox(props, param, ref) {
21802
- var [checked, setChecked] = param, { labelledBy: ariaLabelledby, name, required, disabled, value = "on", onCheckedChange, ...checkboxProps } = props, [button, setButton] = import_react3.default.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(ref, setButton), hasConsumerStoppedPropagationRef = import_react3.default.useRef(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
21802
+ var [checked, setChecked] = param, { labelledBy: ariaLabelledby, name, required, disabled, value = "on", onCheckedChange, ...checkboxProps } = props, [button, setButton] = import_react3.default.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(ref, setButton), hasConsumerStoppedPropagationRef = import_react3.default.useRef(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId, parentKeyDown = props.onKeyDown, handleKeyDown = (0, import_react3.useMemo)(function() {
21803
+ return (0, import_helpers.composeEventHandlers)(parentKeyDown, function(event) {
21804
+ event.key === "Enter" && event.preventDefault();
21805
+ });
21806
+ }, [
21807
+ parentKeyDown
21808
+ ]), handlePress = (0, import_react3.useMemo)(function() {
21809
+ return (0, import_helpers.composeEventHandlers)(props.onPress, function(event) {
21810
+ setChecked(function(prevChecked) {
21811
+ return (0, import_utils3.isIndeterminate)(prevChecked) ? !0 : !prevChecked;
21812
+ }), isFormControl && "isPropagationStopped" in event && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
21813
+ });
21814
+ }, [
21815
+ isFormControl
21816
+ ]);
21803
21817
  return {
21804
21818
  bubbleInput: import_constants4.isWeb && isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_BubbleInput.BubbleInput, {
21805
21819
  isHidden: !0,
@@ -21823,15 +21837,9 @@ var require_useCheckbox_native = __commonJS({
21823
21837
  "data-state": (0, import_utils3.getState)(checked),
21824
21838
  "data-disabled": disabled ? "" : void 0,
21825
21839
  disabled,
21826
- onKeyDown: (0, import_helpers.composeEventHandlers)(props.onKeyDown, function(event) {
21827
- event.key === "Enter" && event.preventDefault();
21828
- })
21840
+ onKeyDown: handleKeyDown
21829
21841
  },
21830
- onPress: (0, import_helpers.composeEventHandlers)(props.onPress, function(event) {
21831
- setChecked(function(prevChecked) {
21832
- return (0, import_utils3.isIndeterminate)(prevChecked) ? !0 : !prevChecked;
21833
- }), isFormControl && "isPropagationStopped" in event && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
21834
- })
21842
+ onPress: handlePress
21835
21843
  }
21836
21844
  };
21837
21845
  }