tamagui 1.79.9 → 1.79.10
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 +87 -60
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +61 -31
- package/dist/test.native.js.map +3 -3
- package/package.json +53 -53
package/dist/native.js
CHANGED
|
@@ -4175,7 +4175,8 @@ var require_createComponent_native = __commonJS({
|
|
|
4175
4175
|
defaultPropsKeyOrder: defaultProps ? Object.keys(defaultProps) : []
|
|
4176
4176
|
});
|
|
4177
4177
|
let component = (0, import_react2.forwardRef)((propsIn, forwardedRef) => {
|
|
4178
|
-
var _a2, _b, _c, _d, _e, _f, _i, _j, _k, _l, _m;
|
|
4178
|
+
var _a2, _b, _c, _d, _e, _f, _i, _j, _k, _l, _m, _n;
|
|
4179
|
+
let internalID = process.env.NODE_ENV === "development" ? (0, import_react2.useId)() : "";
|
|
4179
4180
|
if (process.env.NODE_ENV === "development" && startVisualizer && (startVisualizer(), startVisualizer = void 0), !hasSetupBaseViews) {
|
|
4180
4181
|
hasSetupBaseViews = !0;
|
|
4181
4182
|
let baseViews = (_b = (_a2 = import_setupHooks.hooks).getBaseViews) == null ? void 0 : _b.call(_a2);
|
|
@@ -4266,32 +4267,29 @@ var require_createComponent_native = __commonJS({
|
|
|
4266
4267
|
};
|
|
4267
4268
|
typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = () => stateRef.current.isListeningToTheme), themeStateProps.deopt = willBeAnimated;
|
|
4268
4269
|
let isExiting = !state.unmounted && (presence == null ? void 0 : presence[0]) === !1;
|
|
4269
|
-
if (process.env.NODE_ENV === "development") {
|
|
4270
|
-
let
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
propsOrder: Object.keys(props)
|
|
4293
|
-
}), console.groupEnd());
|
|
4294
|
-
}
|
|
4270
|
+
if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
4271
|
+
let name = `${componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = isAnimatedReactNative ? "(animated)" : isReactNative ? "(rnw)" : "", dataIs = propsIn["data-is"] || "", banner = `${name}${dataIs ? ` ${dataIs}` : ""} ${type} id ${internalID}`;
|
|
4272
|
+
console.group(
|
|
4273
|
+
`%c ${banner} (unmounted: ${state.unmounted})${presence ? ` (presence: ${presence[0]})` : ""} ${isHydrated ? "\u{1F4A6}" : "\u{1F3DC}\uFE0F"}`,
|
|
4274
|
+
"background: green; color: white;"
|
|
4275
|
+
), import_constants.isServer || (console.groupCollapsed(
|
|
4276
|
+
`Info (collapsed): ${state.press || state.pressIn ? "PRESSED " : ""}${state.hover ? "HOVERED " : ""}${state.focus ? "FOCUSED" : " "}`
|
|
4277
|
+
), (0, import_log.log)({
|
|
4278
|
+
propsIn,
|
|
4279
|
+
props,
|
|
4280
|
+
state,
|
|
4281
|
+
staticConfig,
|
|
4282
|
+
elementType,
|
|
4283
|
+
themeStateProps,
|
|
4284
|
+
styledContext: { contextProps: styledContextProps, overriddenContextProps },
|
|
4285
|
+
presence,
|
|
4286
|
+
isAnimated,
|
|
4287
|
+
isHOC,
|
|
4288
|
+
hasAnimationProp,
|
|
4289
|
+
useAnimations,
|
|
4290
|
+
propsInOrder: Object.keys(propsIn),
|
|
4291
|
+
propsOrder: Object.keys(props)
|
|
4292
|
+
}), console.groupEnd());
|
|
4295
4293
|
}
|
|
4296
4294
|
process.env.NODE_ENV === "development" && time && time`pre-theme-media`;
|
|
4297
4295
|
let [themeState, theme] = (0, import_useTheme.useThemeWithState)(themeStateProps);
|
|
@@ -4517,8 +4515,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4517
4515
|
direction,
|
|
4518
4516
|
isZStack,
|
|
4519
4517
|
debug: debugProp
|
|
4520
|
-
});
|
|
4521
|
-
asChild && (elementType = import_Slot.Slot, Object.assign(viewProps, { onPress, onLongPress })), process.env.NODE_ENV === "development" && time && time`spaced-as-child`;
|
|
4518
|
+
}), ResetPresence = (_l = config == null ? void 0 : config.animations) == null ? void 0 : _l.ResetPresence;
|
|
4519
|
+
willBeAnimated && presence && ResetPresence && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence, { children: content })), asChild && (elementType = import_Slot.Slot, Object.assign(viewProps, { onPress, onLongPress })), process.env.NODE_ENV === "development" && time && time`spaced-as-child`;
|
|
4522
4520
|
let useChildrenResult;
|
|
4523
4521
|
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(
|
|
4524
4522
|
elementType,
|
|
@@ -4556,7 +4554,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4556
4554
|
content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider, { ...contextValue, ...overriddenContextProps, children: content });
|
|
4557
4555
|
}
|
|
4558
4556
|
if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
4559
|
-
console.groupCollapsed(`render <${typeof elementType == "string" ? elementType : "Component"} /> with props`);
|
|
4557
|
+
console.groupCollapsed(`render <${typeof elementType == "string" ? elementType : "Component"} /> (${internalID}) with props`);
|
|
4560
4558
|
try {
|
|
4561
4559
|
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("viewPropsOrder", Object.keys(viewProps));
|
|
4562
4560
|
for (let key in viewProps)
|
|
@@ -4574,8 +4572,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4574
4572
|
handlesPressEvents,
|
|
4575
4573
|
willBeAnimated,
|
|
4576
4574
|
isStringElement,
|
|
4577
|
-
classNamesIn: (
|
|
4578
|
-
classNamesOut: (
|
|
4575
|
+
classNamesIn: (_m = props.className) == null ? void 0 : _m.split(" "),
|
|
4576
|
+
classNamesOut: (_n = viewProps.className) == null ? void 0 : _n.split(" "),
|
|
4579
4577
|
events,
|
|
4580
4578
|
shouldAttach,
|
|
4581
4579
|
pseudos,
|
|
@@ -6189,10 +6187,11 @@ var require_PresenceContext_native = __commonJS({
|
|
|
6189
6187
|
return to;
|
|
6190
6188
|
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), PresenceContext_exports = {};
|
|
6191
6189
|
__export2(PresenceContext_exports, {
|
|
6192
|
-
PresenceContext: () => PresenceContext
|
|
6190
|
+
PresenceContext: () => PresenceContext,
|
|
6191
|
+
ResetPresence: () => ResetPresence
|
|
6193
6192
|
});
|
|
6194
6193
|
module2.exports = __toCommonJS2(PresenceContext_exports);
|
|
6195
|
-
var import_react2 = require("react"), PresenceContext = (0, import_react2.createContext)(null);
|
|
6194
|
+
var import_react2 = require("react"), import_jsx_runtime6 = require("react/jsx-runtime"), PresenceContext = (0, import_react2.createContext)(null), ResetPresence = (props) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PresenceContext.Provider, { value: null, children: props.children });
|
|
6196
6195
|
}
|
|
6197
6196
|
});
|
|
6198
6197
|
|
|
@@ -8415,6 +8414,27 @@ var require_ThemeableStack_native = __commonJS({
|
|
|
8415
8414
|
}
|
|
8416
8415
|
});
|
|
8417
8416
|
|
|
8417
|
+
// ../stacks/dist/cjs/NestingContext.native.js
|
|
8418
|
+
var require_NestingContext_native = __commonJS({
|
|
8419
|
+
"../stacks/dist/cjs/NestingContext.native.js"(exports, module2) {
|
|
8420
|
+
"use strict";
|
|
8421
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
8422
|
+
for (var name in all)
|
|
8423
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
8424
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
8425
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8426
|
+
for (let key of __getOwnPropNames2(from))
|
|
8427
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
8428
|
+
return to;
|
|
8429
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), NestingContext_exports = {};
|
|
8430
|
+
__export2(NestingContext_exports, {
|
|
8431
|
+
ButtonNestingContext: () => ButtonNestingContext
|
|
8432
|
+
});
|
|
8433
|
+
module2.exports = __toCommonJS2(NestingContext_exports);
|
|
8434
|
+
var import_react2 = require("react"), ButtonNestingContext = (0, import_react2.createContext)(!1);
|
|
8435
|
+
}
|
|
8436
|
+
});
|
|
8437
|
+
|
|
8418
8438
|
// ../stacks/dist/cjs/index.native.js
|
|
8419
8439
|
var require_index_native19 = __commonJS({
|
|
8420
8440
|
"../stacks/dist/cjs/index.native.js"(exports, module2) {
|
|
@@ -8429,6 +8449,7 @@ var require_index_native19 = __commonJS({
|
|
|
8429
8449
|
__reExport2(src_exports2, require_Stacks_native(), module2.exports);
|
|
8430
8450
|
__reExport2(src_exports2, require_SizableStack_native(), module2.exports);
|
|
8431
8451
|
__reExport2(src_exports2, require_ThemeableStack_native(), module2.exports);
|
|
8452
|
+
__reExport2(src_exports2, require_NestingContext_native(), module2.exports);
|
|
8432
8453
|
}
|
|
8433
8454
|
});
|
|
8434
8455
|
|
|
@@ -10883,11 +10904,11 @@ var require_Dialog_native = __commonJS({
|
|
|
10883
10904
|
name: TRIGGER_NAME
|
|
10884
10905
|
}), DialogTrigger = DialogTriggerFrame.styleable(
|
|
10885
10906
|
(props, forwardedRef) => {
|
|
10886
|
-
let { __scopeDialog, ...triggerProps } = props, context = useDialogContext(TRIGGER_NAME, __scopeDialog), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
10887
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10907
|
+
let { __scopeDialog, ...triggerProps } = props, isInsideButton = React2.useContext(import_stacks3.ButtonNestingContext), context = useDialogContext(TRIGGER_NAME, __scopeDialog), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
10908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.ButtonNestingContext.Provider, { value: !0, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10888
10909
|
DialogTriggerFrame,
|
|
10889
10910
|
{
|
|
10890
|
-
tag: "button",
|
|
10911
|
+
tag: isInsideButton ? "span" : "button",
|
|
10891
10912
|
"aria-haspopup": "dialog",
|
|
10892
10913
|
"aria-expanded": context.open,
|
|
10893
10914
|
"aria-controls": context.contentId,
|
|
@@ -10896,7 +10917,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10896
10917
|
ref: composedTriggerRef,
|
|
10897
10918
|
onPress: (0, import_core13.composeEventHandlers)(props.onPress, context.onOpenToggle)
|
|
10898
10919
|
}
|
|
10899
|
-
);
|
|
10920
|
+
) });
|
|
10900
10921
|
}
|
|
10901
10922
|
);
|
|
10902
10923
|
DialogTrigger.displayName = TRIGGER_NAME;
|
|
@@ -12033,7 +12054,6 @@ var require_Button_native = __commonJS({
|
|
|
12033
12054
|
ButtonContext: () => ButtonContext,
|
|
12034
12055
|
ButtonFrame: () => ButtonFrame,
|
|
12035
12056
|
ButtonIcon: () => ButtonIcon,
|
|
12036
|
-
ButtonNestingContext: () => ButtonNestingContext,
|
|
12037
12057
|
ButtonText: () => ButtonText,
|
|
12038
12058
|
buttonStaticConfig: () => buttonStaticConfig,
|
|
12039
12059
|
useButton: () => useButton
|
|
@@ -12151,9 +12171,9 @@ var require_Button_native = __commonJS({
|
|
|
12151
12171
|
}, Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {
|
|
12152
12172
|
Text: ButtonText,
|
|
12153
12173
|
Icon: ButtonIcon
|
|
12154
|
-
})
|
|
12174
|
+
});
|
|
12155
12175
|
function useButton({ textProps, ...propsIn }, { Text: Text3 = Button2.Text } = { Text: Button2.Text }) {
|
|
12156
|
-
let isNested = (0, import_react2.useContext)(ButtonNestingContext), didFinishSSR = (0, import_web.useDidFinishSSR)(), propsActive = (0, import_web.useProps)(propsIn), {
|
|
12176
|
+
let isNested = (0, import_react2.useContext)(import_stacks3.ButtonNestingContext), didFinishSSR = (0, import_web.useDidFinishSSR)(), propsActive = (0, import_web.useProps)(propsIn), {
|
|
12157
12177
|
icon,
|
|
12158
12178
|
iconAfter,
|
|
12159
12179
|
space,
|
|
@@ -12163,7 +12183,8 @@ var require_Button_native = __commonJS({
|
|
|
12163
12183
|
separator,
|
|
12164
12184
|
noTextWrap,
|
|
12165
12185
|
fontFamily,
|
|
12166
|
-
fontSize
|
|
12186
|
+
fontSize,
|
|
12187
|
+
...restProps
|
|
12167
12188
|
} = propsActive, size2 = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), color = propsActive.color, iconSize = (typeof size2 == "number" ? size2 * 0.5 : (0, import_font_size.getFontSize)(size2)) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({
|
|
12168
12189
|
size: iconSize,
|
|
12169
12190
|
color
|
|
@@ -12185,7 +12206,7 @@ var require_Button_native = __commonJS({
|
|
|
12185
12206
|
// defaults to <a /> when accessibilityRole = link
|
|
12186
12207
|
// see https://github.com/tamagui/tamagui/issues/505
|
|
12187
12208
|
propsActive.accessibilityRole === "link" ? "a" : void 0
|
|
12188
|
-
),
|
|
12209
|
+
), props = {
|
|
12189
12210
|
size: size2,
|
|
12190
12211
|
...propsIn.disabled && {
|
|
12191
12212
|
// in rnw - false still has keyboard tabIndex, undefined = not actually focusable
|
|
@@ -12199,7 +12220,7 @@ var require_Button_native = __commonJS({
|
|
|
12199
12220
|
tag
|
|
12200
12221
|
},
|
|
12201
12222
|
...restProps,
|
|
12202
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonNestingContext.Provider, { value: !0, children: inner }),
|
|
12223
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.ButtonNestingContext.Provider, { value: !0, children: inner }),
|
|
12203
12224
|
// forces it to be a runtime pressStyle so it passes through context text colors
|
|
12204
12225
|
disableClassName: didFinishSSR
|
|
12205
12226
|
};
|
|
@@ -12808,7 +12829,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
12808
12829
|
native,
|
|
12809
12830
|
scaleIcon,
|
|
12810
12831
|
...checkboxProps
|
|
12811
|
-
} = props, [button, setButton] = React2.useState(null), composedRefs = (0, import_core13.useComposedRefs)(forwardedRef, (node) => setButton(node)), hasConsumerStoppedPropagationRef = React2.useRef(!1), propsActive = (0, import_core13.useProps)(props), isFormControl = import_core13.isWeb ? button ? !!button.closest("form") : !0 : !1, [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
12832
|
+
} = props, isInsideButton = React2.useContext(import_stacks3.ButtonNestingContext), [button, setButton] = React2.useState(null), composedRefs = (0, import_core13.useComposedRefs)(forwardedRef, (node) => setButton(node)), hasConsumerStoppedPropagationRef = React2.useRef(!1), propsActive = (0, import_core13.useProps)(props), isFormControl = import_core13.isWeb ? button ? !!button.closest("form") : !0 : !1, [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
12812
12833
|
prop: checkedProp,
|
|
12813
12834
|
defaultProp: defaultChecked,
|
|
12814
12835
|
onChange: onCheckedChange
|
|
@@ -12844,7 +12865,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
12844
12865
|
{
|
|
12845
12866
|
width: size2,
|
|
12846
12867
|
height: size2,
|
|
12847
|
-
tag: "button",
|
|
12868
|
+
tag: isInsideButton ? "span" : "button",
|
|
12848
12869
|
role: "checkbox",
|
|
12849
12870
|
"aria-labelledby": labelledBy,
|
|
12850
12871
|
"aria-checked": isIndeterminate(checked) ? "mixed" : checked,
|
|
@@ -16930,7 +16951,9 @@ var require_Select_native = __commonJS({
|
|
|
16930
16951
|
});
|
|
16931
16952
|
React2.useEffect(() => {
|
|
16932
16953
|
open && emitValue(value);
|
|
16933
|
-
}, [open])
|
|
16954
|
+
}, [open]), React2.useEffect(() => {
|
|
16955
|
+
emitValue(value);
|
|
16956
|
+
}, [value]);
|
|
16934
16957
|
let [activeIndex, setActiveIndex] = React2.useState(0), [emitValue, valueSubscribe] = useEmitter(), [emitActiveIndex, activeIndexSubscribe] = useEmitter(), selectedIndexRef = React2.useRef(null), activeIndexRef = React2.useRef(null), listContentRef = React2.useRef([]), [selectedIndex, setSelectedIndex] = React2.useState(0), [valueNode, setValueNode] = React2.useState(null);
|
|
16935
16958
|
(0, import_core13.useIsomorphicLayoutEffect)(() => {
|
|
16936
16959
|
selectedIndexRef.current = selectedIndex, activeIndexRef.current = activeIndex;
|
|
@@ -17917,25 +17940,29 @@ var require_createSwitch_native = __commonJS({
|
|
|
17917
17940
|
onChange: onCheckedChange,
|
|
17918
17941
|
transition: !0
|
|
17919
17942
|
});
|
|
17920
|
-
|
|
17921
|
-
|
|
17922
|
-
|
|
17923
|
-
|
|
17924
|
-
|
|
17925
|
-
|
|
17926
|
-
|
|
17927
|
-
|
|
17943
|
+
if (shouldRenderMobileNative)
|
|
17944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
17945
|
+
import_react_native4.Switch,
|
|
17946
|
+
{
|
|
17947
|
+
value: checkedProp,
|
|
17948
|
+
onValueChange: onCheckedChange,
|
|
17949
|
+
...nativeProps
|
|
17950
|
+
}
|
|
17951
|
+
);
|
|
17952
|
+
import_core13.isWeb || React2.useEffect(() => {
|
|
17928
17953
|
if (props.id)
|
|
17929
17954
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
17930
17955
|
focus: () => {
|
|
17931
17956
|
setChecked((x) => !x);
|
|
17932
17957
|
}
|
|
17933
17958
|
});
|
|
17934
|
-
}, [props.id, setChecked])
|
|
17935
|
-
|
|
17959
|
+
}, [props.id, setChecked]);
|
|
17960
|
+
let isInsideButton = React2.useContext(import_stacks3.ButtonNestingContext);
|
|
17961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
17962
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.ButtonNestingContext.Provider, { value: !0, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
17936
17963
|
Frame,
|
|
17937
17964
|
{
|
|
17938
|
-
tag: "button",
|
|
17965
|
+
tag: isInsideButton ? "span" : "button",
|
|
17939
17966
|
unstyled,
|
|
17940
17967
|
size: size2,
|
|
17941
17968
|
checked,
|
|
@@ -17971,7 +17998,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
17971
17998
|
}
|
|
17972
17999
|
)
|
|
17973
18000
|
}
|
|
17974
|
-
),
|
|
18001
|
+
) }),
|
|
17975
18002
|
import_core13.isWeb && isFormControl && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
17976
18003
|
BubbleInput,
|
|
17977
18004
|
{
|
|
@@ -17985,7 +18012,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
17985
18012
|
style: { transform: "translateX(-100%)" }
|
|
17986
18013
|
}
|
|
17987
18014
|
)
|
|
17988
|
-
] })
|
|
18015
|
+
] });
|
|
17989
18016
|
}), BubbleInput = (props) => {
|
|
17990
18017
|
let { control, checked, bubbles = !0, ...inputProps } = props, ref = React2.useRef(null), prevChecked = (0, import_use_previous.usePrevious)(checked);
|
|
17991
18018
|
return React2.useEffect(() => {
|