tamagui 1.118.1 → 1.118.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 +19 -10
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +19 -10
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -3907,7 +3907,8 @@ 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
|
-
|
|
3910
|
+
var parents = (manager == null ? void 0 : manager.getParents()) || [];
|
|
3911
|
+
return parents.slice(0, parents.length - 1).some(function(x) {
|
|
3911
3912
|
return x.state.isSchemeFixed;
|
|
3912
3913
|
});
|
|
3913
3914
|
}
|
|
@@ -21799,7 +21800,21 @@ var require_useCheckbox_native = __commonJS({
|
|
|
21799
21800
|
module2.exports = __toCommonJS2(useCheckbox_exports);
|
|
21800
21801
|
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
21802
|
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
|
|
21803
|
+
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() {
|
|
21804
|
+
return (0, import_helpers.composeEventHandlers)(parentKeyDown, function(event) {
|
|
21805
|
+
event.key === "Enter" && event.preventDefault();
|
|
21806
|
+
});
|
|
21807
|
+
}, [
|
|
21808
|
+
parentKeyDown
|
|
21809
|
+
]), handlePress = (0, import_react3.useMemo)(function() {
|
|
21810
|
+
return (0, import_helpers.composeEventHandlers)(props.onPress, function(event) {
|
|
21811
|
+
setChecked(function(prevChecked) {
|
|
21812
|
+
return (0, import_utils3.isIndeterminate)(prevChecked) ? !0 : !prevChecked;
|
|
21813
|
+
}), isFormControl && "isPropagationStopped" in event && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
|
|
21814
|
+
});
|
|
21815
|
+
}, [
|
|
21816
|
+
isFormControl
|
|
21817
|
+
]);
|
|
21803
21818
|
return {
|
|
21804
21819
|
bubbleInput: import_constants4.isWeb && isFormControl ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_BubbleInput.BubbleInput, {
|
|
21805
21820
|
isHidden: !0,
|
|
@@ -21823,15 +21838,9 @@ var require_useCheckbox_native = __commonJS({
|
|
|
21823
21838
|
"data-state": (0, import_utils3.getState)(checked),
|
|
21824
21839
|
"data-disabled": disabled ? "" : void 0,
|
|
21825
21840
|
disabled,
|
|
21826
|
-
onKeyDown:
|
|
21827
|
-
event.key === "Enter" && event.preventDefault();
|
|
21828
|
-
})
|
|
21841
|
+
onKeyDown: handleKeyDown
|
|
21829
21842
|
},
|
|
21830
|
-
onPress:
|
|
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
|
-
})
|
|
21843
|
+
onPress: handlePress
|
|
21835
21844
|
}
|
|
21836
21845
|
};
|
|
21837
21846
|
}
|