tamagui 1.68.2 → 1.68.4

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.
@@ -9511,7 +9511,7 @@ var require_SheetImplementationCustom_native = __commonJS({
9511
9511
  if (typeof point == "number")
9512
9512
  return screenSize - Math.min(screenSize, Math.max(0, point));
9513
9513
  if (point === "fit")
9514
- return screenSize - frameSize;
9514
+ return screenSize - Math.min(screenSize, frameSize);
9515
9515
  if (point.endsWith("%")) {
9516
9516
  let pct2 = Math.min(100, Math.max(0, Number(point.slice(0, -1)))) / 100;
9517
9517
  return Number.isNaN(pct2) ? (console.warn("Invalid snapPoint percentage string"), 0) : Math.round(screenSize - pct2 * screenSize);
@@ -11934,7 +11934,7 @@ var require_Checkbox_native = __commonJS({
11934
11934
  })
11935
11935
  ), size = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
11936
11936
  return React2.useEffect(() => {
11937
- if (props.id)
11937
+ if (props.id && !disabled)
11938
11938
  return (0, import_focusable2.registerFocusable)(props.id, {
11939
11939
  focusAndSelect: () => {
11940
11940
  setChecked((x) => !x);
@@ -11942,7 +11942,7 @@ var require_Checkbox_native = __commonJS({
11942
11942
  focus: () => {
11943
11943
  }
11944
11944
  });
11945
- }, [props.id, setChecked]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: import_core12.isWeb && native ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11945
+ }, [props.id, setChecked, disabled]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CheckboxProvider, { scope: __scopeCheckbox, state: checked, disabled, children: import_core12.isWeb && native ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
11946
11946
  BubbleInput,
11947
11947
  {
11948
11948
  control: button,
@@ -12046,7 +12046,7 @@ var require_Form_native = __commonJS({
12046
12046
  return to;
12047
12047
  }, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), Form_exports = {};
12048
12048
  __export2(Form_exports, {
12049
- Form: () => Form,
12049
+ Form: () => Form2,
12050
12050
  FormFrame: () => FormFrame,
12051
12051
  FormProvider: () => FormProvider,
12052
12052
  FormTrigger: () => FormTrigger,
@@ -12056,7 +12056,7 @@ var require_Form_native = __commonJS({
12056
12056
  var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_react2 = require("react"), import_jsx_runtime6 = require("react/jsx-runtime"), FORM_NAME = "Form", FormFrame = (0, import_core12.styled)(import_core12.Stack, {
12057
12057
  name: FORM_NAME,
12058
12058
  tag: "form"
12059
- }), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.Stack, {
12059
+ }), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.View, {
12060
12060
  name: TRIGGER_NAME
12061
12061
  }), FormTrigger = FormTriggerFrame.styleable(
12062
12062
  (props, forwardedRef) => {
@@ -12072,14 +12072,12 @@ var require_Form_native = __commonJS({
12072
12072
  }
12073
12073
  );
12074
12074
  }
12075
- );
12076
- function FormComponent({
12075
+ ), FormComponent = FormFrame.extractable(function({
12077
12076
  onSubmit,
12078
12077
  ...props
12079
12078
  }) {
12080
12079
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormProvider, { scope: props.__scopeForm, onSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FormFrame, { ...props, onSubmit: (e) => e.preventDefault() }) });
12081
- }
12082
- var Form = (0, import_core12.withStaticProperties)(FormFrame.extractable(FormComponent), {
12080
+ }), Form2 = (0, import_core12.withStaticProperties)(FormComponent, {
12083
12081
  Trigger: FormTrigger
12084
12082
  });
12085
12083
  }
@@ -14006,7 +14004,7 @@ var require_RadioGroup_native = __commonJS({
14006
14004
  };
14007
14005
  }
14008
14006
  }, []), React2.useEffect(() => {
14009
- if (props.id)
14007
+ if (props.id && !disabled)
14010
14008
  return (0, import_focusable2.registerFocusable)(props.id, {
14011
14009
  focusAndSelect: () => {
14012
14010
  onChange == null || onChange(value);
@@ -14014,7 +14012,7 @@ var require_RadioGroup_native = __commonJS({
14014
14012
  focus: () => {
14015
14013
  }
14016
14014
  });
14017
- }, [props.id, value]);
14015
+ }, [props.id, value, disabled]);
14018
14016
  let isDisabled = disabled || itemDisabled;
14019
14017
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RadioGroupItemProvider, { checked, scope: __scopeRadioGroup, children: import_core12.isWeb && native ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
14020
14018
  BubbleInput,
@@ -15858,7 +15856,7 @@ var require_createSwitch_native = __commonJS({
15858
15856
  }
15859
15857
  );
15860
15858
  }), SwitchComponent = Frame.extractable(
15861
- React2.forwardRef(function SwitchFrame2(propsIn, forwardedRef) {
15859
+ React2.forwardRef(function(propsIn, forwardedRef) {
15862
15860
  let styledContext = React2.useContext(import_SwitchContext.SwitchContext), props = (0, import_core12.useProps)(propsIn), {
15863
15861
  labeledBy: ariaLabelledby,
15864
15862
  name,
@@ -15878,7 +15876,7 @@ var require_createSwitch_native = __commonJS({
15878
15876
  let _;
15879
15877
  for (let key in switchProps)
15880
15878
  (key === "borderWidth" || key === "borderLeftWidth") && (_ = switchProps[key]);
15881
- return Frame === SwitchFrame2 && acceptsUnstyled && _ == null && unstyled === !1 && (_ = 2), typeof _ == "string" && (_ = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)(_))), typeof _ == "number" ? _ : 0;
15879
+ return Frame === import_Switch.SwitchFrame && acceptsUnstyled && _ == null && unstyled === !1 && (_ = 2), typeof _ == "string" && (_ = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)(_))), typeof _ == "number" ? _ : 0;
15882
15880
  })(), native = Array.isArray(nativeProp) ? nativeProp : [nativeProp], shouldRenderMobileNative = !import_core12.isWeb && nativeProp === !0 || !import_core12.isWeb && native.includes("mobile") || native.includes("android") && import_react_native4.Platform.OS === "android" || native.includes("ios") && import_react_native4.Platform.OS === "ios", [button, setButton] = React2.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (node) => setButton(node)), labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId, hasConsumerStoppedPropagationRef = React2.useRef(!1), isFormControl = import_core12.isWeb ? button ? !!button.closest("form") : !0 : !1, [frameWidth, setFrameWidth] = React2.useState(0), [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
15883
15881
  prop: checkedProp,
15884
15882
  defaultProp: defaultChecked || !1,