tamagui 1.91.4 → 1.92.0
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 +59 -25
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +57 -23
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/test.native.js
CHANGED
|
@@ -6886,7 +6886,7 @@ var require_propMapper_native = __commonJS({
|
|
|
6886
6886
|
get: function(_, k) {
|
|
6887
6887
|
return k === "curProps" ? subProps : Reflect.get(_, k);
|
|
6888
6888
|
}
|
|
6889
|
-
}) : styleStateIn, conf = styleState.conf, styleProps = styleState.styleProps, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, variants = staticConfig.variants;
|
|
6889
|
+
}) : styleStateIn, conf = styleState.conf, styleProps = styleState.styleProps, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, skipThemeTokenResolution = styleState.skipThemeTokenResolution, variants = staticConfig.variants;
|
|
6890
6890
|
if (!styleProps.noExpand && variants && key in variants) {
|
|
6891
6891
|
styleState.curProps[key] = value;
|
|
6892
6892
|
var variantValue = resolveVariants(key, value, styleProps, styleState, "");
|
|
@@ -7059,9 +7059,11 @@ var require_propMapper_native = __commonJS({
|
|
|
7059
7059
|
var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
|
|
7060
7060
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
7061
7061
|
}
|
|
7062
|
-
if (theme && value in theme)
|
|
7063
|
-
valOrVar = theme[value],
|
|
7064
|
-
|
|
7062
|
+
if (theme && value in theme) {
|
|
7063
|
+
if (valOrVar = theme[value], styleState.skipThemeTokenResolution && valOrVar != null && valOrVar.val)
|
|
7064
|
+
return value;
|
|
7065
|
+
hasSet = !0;
|
|
7066
|
+
} else {
|
|
7065
7067
|
if (value in conf.specificTokens)
|
|
7066
7068
|
hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
7067
7069
|
else {
|
|
@@ -7324,7 +7326,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7324
7326
|
var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
7325
7327
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
7326
7328
|
}
|
|
7327
|
-
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
|
|
7329
|
+
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
|
|
7328
7330
|
conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
7329
7331
|
var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
|
|
7330
7332
|
curProps: {},
|
|
@@ -7339,7 +7341,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7339
7341
|
usedKeys,
|
|
7340
7342
|
viewProps,
|
|
7341
7343
|
context,
|
|
7342
|
-
debug
|
|
7344
|
+
debug,
|
|
7345
|
+
skipThemeTokenResolution
|
|
7343
7346
|
};
|
|
7344
7347
|
for (var keyOg in props) {
|
|
7345
7348
|
var _parentStaticConfig_variants, keyInit = keyOg, valInit = props[keyOg];
|
|
@@ -8718,7 +8721,8 @@ var require_createComponent_native = __commonJS({
|
|
|
8718
8721
|
props.accessibilityDisabled || !1;
|
|
8719
8722
|
disabled != null && (initialState.disabled = disabled);
|
|
8720
8723
|
var states = (0, import_react2.useState)(initialState), state = props.forceStyle ? _object_spread_props8(_object_spread9({}, states[0]), _define_property9({}, props.forceStyle, !0)) : states[0], setState = states[1];
|
|
8721
|
-
disabled !== state.disabled && setState(_object_spread_props8(_object_spread9({}, state), {
|
|
8724
|
+
disabled !== state.disabled && setState(_object_spread_props8(_object_spread9({}, state, import_defaultComponentState.defaultComponentState), {
|
|
8725
|
+
// removes any stale press state etc
|
|
8722
8726
|
disabled
|
|
8723
8727
|
}));
|
|
8724
8728
|
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, debugProp);
|
|
@@ -19040,7 +19044,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
19040
19044
|
}
|
|
19041
19045
|
}
|
|
19042
19046
|
var hiddenSize = 10000.1, SheetImplementationCustom = (0, import_core12.themeable)(/* @__PURE__ */ (0, import_react2.forwardRef)(function(props, forwardedRef) {
|
|
19043
|
-
var parentSheet = (0, import_react2.useContext)(import_contexts.ParentSheetContext), animation = props.animation, animationConfigProp = props.animationConfig, _props_modal = props.modal, modal = _props_modal === void 0 ? !1 : _props_modal, _props_zIndex = props.zIndex, zIndex = _props_zIndex === void 0 ? parentSheet.zIndex + 1 : _props_zIndex, _props_moveOnKeyboardChange = props.moveOnKeyboardChange, moveOnKeyboardChange = _props_moveOnKeyboardChange === void 0 ? !1 : _props_moveOnKeyboardChange, _props_unmountChildrenWhenHidden = props.unmountChildrenWhenHidden, unmountChildrenWhenHidden = _props_unmountChildrenWhenHidden === void 0 ? !1 : _props_unmountChildrenWhenHidden, portalProps = props.portalProps, keyboardIsVisible = (0, import_use_keyboard_visible.useKeyboardVisible)(), state = (0, import_useSheetOpenState.useSheetOpenState)(props), _useState = _sliced_to_array((0, import_react2.useState)(null), 2), overlayComponent = _useState[0], setOverlayComponent = _useState[1], providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
|
|
19047
|
+
var parentSheet = (0, import_react2.useContext)(import_contexts.ParentSheetContext), animation = props.animation, animationConfigProp = props.animationConfig, _props_modal = props.modal, modal = _props_modal === void 0 ? !1 : _props_modal, _props_zIndex = props.zIndex, zIndex = _props_zIndex === void 0 ? parentSheet.zIndex + 1 : _props_zIndex, _props_moveOnKeyboardChange = props.moveOnKeyboardChange, moveOnKeyboardChange = _props_moveOnKeyboardChange === void 0 ? !1 : _props_moveOnKeyboardChange, _props_unmountChildrenWhenHidden = props.unmountChildrenWhenHidden, unmountChildrenWhenHidden = _props_unmountChildrenWhenHidden === void 0 ? !1 : _props_unmountChildrenWhenHidden, portalProps = props.portalProps, tmp = props.containerComponent, ContainerComponent = tmp === void 0 ? import_react2.Fragment : tmp, keyboardIsVisible = (0, import_use_keyboard_visible.useKeyboardVisible)(), state = (0, import_useSheetOpenState.useSheetOpenState)(props), _useState = _sliced_to_array((0, import_react2.useState)(null), 2), overlayComponent = _useState[0], setOverlayComponent = _useState[1], providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
|
|
19044
19048
|
onOverlayComponent: setOverlayComponent
|
|
19045
19049
|
}), frameSize = providerProps.frameSize, setFrameSize = providerProps.setFrameSize, snapPoints = providerProps.snapPoints, snapPointsMode = providerProps.snapPointsMode, hasFit = providerProps.hasFit, position = providerProps.position, setPosition = providerProps.setPosition, scrollBridge = providerProps.scrollBridge, screenSize = providerProps.screenSize, setMaxContentSize = providerProps.setMaxContentSize, maxSnapPoint = providerProps.maxSnapPoint, open = state.open, controller = state.controller, isHidden = state.isHidden, sheetRef = (0, import_react2.useRef)(null), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef), animationConfig = function() {
|
|
19046
19050
|
var _ref = _sliced_to_array(animation ? Array.isArray(animation) ? animation : [
|
|
@@ -19277,12 +19281,14 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
19277
19281
|
var modalContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, _object_spread_props8(_object_spread9({
|
|
19278
19282
|
zIndex
|
|
19279
19283
|
}, portalProps), {
|
|
19280
|
-
children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
19281
|
-
|
|
19282
|
-
|
|
19283
|
-
|
|
19284
|
-
|
|
19285
|
-
|
|
19284
|
+
children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContainerComponent, {
|
|
19285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
19286
|
+
forceClassName: !0,
|
|
19287
|
+
name: themeName,
|
|
19288
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParentContext.Provider, {
|
|
19289
|
+
value: adaptContext,
|
|
19290
|
+
children: contents
|
|
19291
|
+
})
|
|
19286
19292
|
})
|
|
19287
19293
|
})
|
|
19288
19294
|
}));
|
|
@@ -24536,7 +24542,7 @@ var require_createCheckbox_native = __commonJS({
|
|
|
24536
24542
|
}
|
|
24537
24543
|
});
|
|
24538
24544
|
module2.exports = __toCommonJS2(createCheckbox_exports);
|
|
24539
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_checkbox_headless = require_index_native47(), import_core12 = require_index_native16(), import_font_size = require_index_native40(), import_get_token2 = require_index_native18(), import_helpers_tamagui = require_index_native41(), import_use_controllable_state = require_index_native9(), import_react2 = __toESM2(require("react")), import_Checkbox = require_Checkbox_native(), import_CheckboxStyledContext = require_CheckboxStyledContext_native();
|
|
24545
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_focusable2 = require_index_native44(), import_checkbox_headless = require_index_native47(), import_core12 = require_index_native16(), import_font_size = require_index_native40(), import_get_token2 = require_index_native18(), import_helpers_tamagui = require_index_native41(), import_use_controllable_state = require_index_native9(), import_react2 = __toESM2(require("react")), import_Checkbox = require_Checkbox_native(), import_CheckboxStyledContext = require_CheckboxStyledContext_native();
|
|
24540
24546
|
function _array_like_to_array2(arr, len) {
|
|
24541
24547
|
(len == null || len > arr.length) && (len = arr.length);
|
|
24542
24548
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
@@ -24675,7 +24681,23 @@ var require_createCheckbox_native = __commonJS({
|
|
|
24675
24681
|
setChecked
|
|
24676
24682
|
],
|
|
24677
24683
|
forwardedRef
|
|
24678
|
-
), checkboxProps = _useCheckbox.checkboxProps, checkboxRef = _useCheckbox.checkboxRef, bubbleInput = _useCheckbox.bubbleInput
|
|
24684
|
+
), checkboxProps = _useCheckbox.checkboxProps, checkboxRef = _useCheckbox.checkboxRef, bubbleInput = _useCheckbox.bubbleInput;
|
|
24685
|
+
import_react2.default.useEffect(function() {
|
|
24686
|
+
if (props.id && !props.disabled)
|
|
24687
|
+
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
24688
|
+
focusAndSelect: function() {
|
|
24689
|
+
setChecked == null || setChecked(function(value) {
|
|
24690
|
+
return !value;
|
|
24691
|
+
});
|
|
24692
|
+
},
|
|
24693
|
+
focus: function() {
|
|
24694
|
+
}
|
|
24695
|
+
});
|
|
24696
|
+
}, [
|
|
24697
|
+
props.id,
|
|
24698
|
+
props.disabled
|
|
24699
|
+
]);
|
|
24700
|
+
var renderNative = (0, import_core12.shouldRenderNativePlatform)(native);
|
|
24679
24701
|
if (renderNative === "web")
|
|
24680
24702
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("input", {
|
|
24681
24703
|
type: "checkbox",
|
|
@@ -32727,7 +32749,7 @@ var require_Select_native = __commonJS({
|
|
|
32727
32749
|
}
|
|
32728
32750
|
});
|
|
32729
32751
|
module2.exports = __toCommonJS2(Select_exports);
|
|
32730
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native25(), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_core12 = require_index_native16(), import_get_token2 = require_index_native18(), import_helpers = require_index_native7(), import_list_item = require_index_native54(), import_portal2 = require_index_native30(), import_separator = require_index_native62(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native9(), React2 = __toESM2(require("react")), import_use_debounce = require_index_native63(), import_constants22 = require_constants_native4(), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native();
|
|
32752
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native25(), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_core12 = require_index_native16(), import_get_token2 = require_index_native18(), import_helpers = require_index_native7(), import_list_item = require_index_native54(), import_portal2 = require_index_native30(), import_separator = require_index_native62(), import_focusable2 = require_index_native44(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native9(), React2 = __toESM2(require("react")), import_use_debounce = require_index_native63(), import_constants22 = require_constants_native4(), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native();
|
|
32731
32753
|
function _array_like_to_array2(arr, len) {
|
|
32732
32754
|
(len == null || len > arr.length) && (len = arr.length);
|
|
32733
32755
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
@@ -33029,6 +33051,19 @@ var require_Select_native = __commonJS({
|
|
|
33029
33051
|
emitValue(value);
|
|
33030
33052
|
}, [
|
|
33031
33053
|
value
|
|
33054
|
+
]), React2.useEffect(function() {
|
|
33055
|
+
if (props.id)
|
|
33056
|
+
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
33057
|
+
focusAndSelect: function() {
|
|
33058
|
+
setOpen == null || setOpen(function(value2) {
|
|
33059
|
+
return !value2;
|
|
33060
|
+
});
|
|
33061
|
+
},
|
|
33062
|
+
focus: function() {
|
|
33063
|
+
}
|
|
33064
|
+
});
|
|
33065
|
+
}, [
|
|
33066
|
+
props.id
|
|
33032
33067
|
]);
|
|
33033
33068
|
var _React_useState1 = _sliced_to_array(React2.useState(0), 2), activeIndex = _React_useState1[0], setActiveIndex = _React_useState1[1], _useEmitter = _sliced_to_array(useEmitter(), 2), emitValue = _useEmitter[0], valueSubscribe = _useEmitter[1], _useEmitter1 = _sliced_to_array(useEmitter(), 2), emitActiveIndex = _useEmitter1[0], activeIndexSubscribe = _useEmitter1[1], selectedIndexRef = React2.useRef(null), activeIndexRef = React2.useRef(null), listContentRef = React2.useRef([]), _React_useState2 = _sliced_to_array(React2.useState(0), 2), selectedIndex = _React_useState2[0], setSelectedIndex = _React_useState2[1], _React_useState3 = _sliced_to_array(React2.useState(null), 2), valueNode = _React_useState3[0], setValueNode = _React_useState3[1];
|
|
33034
33069
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
@@ -35065,13 +35100,12 @@ var require_createSwitch_native = __commonJS({
|
|
|
35065
35100
|
noExpand: !0,
|
|
35066
35101
|
resolveValues: "none",
|
|
35067
35102
|
forComponent: Frame
|
|
35068
|
-
}), _styledContext_size, _ref
|
|
35069
|
-
propsActive.size = (_ref = (_styledContext_size = styledContext.size) !== null && _styledContext_size !== void 0 ? _styledContext_size : props.size) !== null && _ref !== void 0 ? _ref : "$true";
|
|
35070
|
-
var _styledContext_unstyled, _ref1;
|
|
35071
|
-
propsActive.unstyled = (_ref1 = (_styledContext_unstyled = styledContext.unstyled) !== null && _styledContext_unstyled !== void 0 ? _styledContext_unstyled : props.unstyled) !== null && _ref1 !== void 0 ? _ref1 : !1;
|
|
35072
|
-
var _useSwitch = (0, import_switch_headless.useSwitch)(
|
|
35103
|
+
}), _styledContext_size, _ref, _styledContext_unstyled, _ref1, _useSwitch = (0, import_switch_headless.useSwitch)(
|
|
35073
35104
|
// @ts-ignore
|
|
35074
|
-
|
|
35105
|
+
Object.assign({
|
|
35106
|
+
size: (_ref = (_styledContext_size = styledContext.size) !== null && _styledContext_size !== void 0 ? _styledContext_size : props.size) !== null && _ref !== void 0 ? _ref : "$true",
|
|
35107
|
+
unstyled: (_ref1 = (_styledContext_unstyled = styledContext.unstyled) !== null && _styledContext_unstyled !== void 0 ? _styledContext_unstyled : props.unstyled) !== null && _ref1 !== void 0 ? _ref1 : !1
|
|
35108
|
+
}, propsActive),
|
|
35075
35109
|
[
|
|
35076
35110
|
checked,
|
|
35077
35111
|
setChecked
|