tamagui 1.68.3 → 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.
- package/dist/native.js +10 -15
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +10 -15
- package/dist/test.native.js.map +2 -2
- package/package.json +52 -52
package/dist/native.js
CHANGED
|
@@ -9912,7 +9912,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9912
9912
|
if (typeof point == "number")
|
|
9913
9913
|
return screenSize - Math.min(screenSize, Math.max(0, point));
|
|
9914
9914
|
if (point === "fit")
|
|
9915
|
-
return screenSize - frameSize;
|
|
9915
|
+
return screenSize - Math.min(screenSize, frameSize);
|
|
9916
9916
|
if (point.endsWith("%")) {
|
|
9917
9917
|
let pct2 = Math.min(100, Math.max(0, Number(point.slice(0, -1)))) / 100;
|
|
9918
9918
|
return Number.isNaN(pct2) ? (console.warn("Invalid snapPoint percentage string"), 0) : Math.round(screenSize - pct2 * screenSize);
|
|
@@ -12396,7 +12396,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
12396
12396
|
})
|
|
12397
12397
|
), size = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
|
|
12398
12398
|
return React2.useEffect(() => {
|
|
12399
|
-
if (props.id)
|
|
12399
|
+
if (props.id && !disabled)
|
|
12400
12400
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
12401
12401
|
focusAndSelect: () => {
|
|
12402
12402
|
setChecked((x) => !x);
|
|
@@ -12404,7 +12404,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
12404
12404
|
focus: () => {
|
|
12405
12405
|
}
|
|
12406
12406
|
});
|
|
12407
|
-
}, [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)(
|
|
12407
|
+
}, [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)(
|
|
12408
12408
|
BubbleInput,
|
|
12409
12409
|
{
|
|
12410
12410
|
control: button,
|
|
@@ -12508,7 +12508,7 @@ var require_Form_native = __commonJS({
|
|
|
12508
12508
|
return to;
|
|
12509
12509
|
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), Form_exports = {};
|
|
12510
12510
|
__export2(Form_exports, {
|
|
12511
|
-
Form: () =>
|
|
12511
|
+
Form: () => Form2,
|
|
12512
12512
|
FormFrame: () => FormFrame,
|
|
12513
12513
|
FormProvider: () => FormProvider,
|
|
12514
12514
|
FormTrigger: () => FormTrigger,
|
|
@@ -12518,7 +12518,7 @@ var require_Form_native = __commonJS({
|
|
|
12518
12518
|
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, {
|
|
12519
12519
|
name: FORM_NAME,
|
|
12520
12520
|
tag: "form"
|
|
12521
|
-
}), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.
|
|
12521
|
+
}), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
12522
12522
|
name: TRIGGER_NAME
|
|
12523
12523
|
}), FormTrigger = FormTriggerFrame.styleable(
|
|
12524
12524
|
(props, forwardedRef) => {
|
|
@@ -12534,14 +12534,12 @@ var require_Form_native = __commonJS({
|
|
|
12534
12534
|
}
|
|
12535
12535
|
);
|
|
12536
12536
|
}
|
|
12537
|
-
)
|
|
12538
|
-
function FormComponent({
|
|
12537
|
+
), FormComponent = FormFrame.extractable(function({
|
|
12539
12538
|
onSubmit,
|
|
12540
12539
|
...props
|
|
12541
12540
|
}) {
|
|
12542
12541
|
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() }) });
|
|
12543
|
-
}
|
|
12544
|
-
var Form = (0, import_core12.withStaticProperties)(FormFrame.extractable(FormComponent), {
|
|
12542
|
+
}), Form2 = (0, import_core12.withStaticProperties)(FormComponent, {
|
|
12545
12543
|
Trigger: FormTrigger
|
|
12546
12544
|
});
|
|
12547
12545
|
}
|
|
@@ -14547,7 +14545,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14547
14545
|
};
|
|
14548
14546
|
}
|
|
14549
14547
|
}, []), React2.useEffect(() => {
|
|
14550
|
-
if (props.id)
|
|
14548
|
+
if (props.id && !disabled)
|
|
14551
14549
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
14552
14550
|
focusAndSelect: () => {
|
|
14553
14551
|
onChange == null || onChange(value);
|
|
@@ -14555,7 +14553,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14555
14553
|
focus: () => {
|
|
14556
14554
|
}
|
|
14557
14555
|
});
|
|
14558
|
-
}, [props.id, value]);
|
|
14556
|
+
}, [props.id, value, disabled]);
|
|
14559
14557
|
let isDisabled = disabled || itemDisabled;
|
|
14560
14558
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RadioGroupItemProvider, { checked, scope: __scopeRadioGroup, children: import_core12.isWeb && native ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14561
14559
|
BubbleInput,
|
|
@@ -16423,10 +16421,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
16423
16421
|
let _;
|
|
16424
16422
|
for (let key in switchProps)
|
|
16425
16423
|
(key === "borderWidth" || key === "borderLeftWidth") && (_ = switchProps[key]);
|
|
16426
|
-
return (
|
|
16427
|
-
// Frame === SwitchFrame &&
|
|
16428
|
-
acceptsUnstyled && _ == null && unstyled === !1 && (_ = 2), typeof _ == "string" && (_ = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)(_))), typeof _ == "number" ? _ : 0
|
|
16429
|
-
);
|
|
16424
|
+
return Frame === import_Switch.SwitchFrame && acceptsUnstyled && _ == null && unstyled === !1 && (_ = 2), typeof _ == "string" && (_ = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)(_))), typeof _ == "number" ? _ : 0;
|
|
16430
16425
|
})(), 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)({
|
|
16431
16426
|
prop: checkedProp,
|
|
16432
16427
|
defaultProp: defaultChecked || !1,
|