tamagui 1.125.19 → 1.125.20

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.
@@ -18806,22 +18806,26 @@ var require_Dialog_native = __commonJS({
18806
18806
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
18807
18807
  }
18808
18808
  }), DialogPortalItem = function(props) {
18809
- var { __scopeDialog, children, space, spaceDirection, separator } = props, themeName = (0, import_core12.useThemeName)(), context = useDialogContext(PORTAL_NAME, props.__scopeDialog), childrenSpaced = children;
18810
- return (space || separator) && (childrenSpaced = (0, import_core12.spacedChildren)({
18809
+ var { __scopeDialog, children, space, spaceDirection, separator } = props, themeName = (0, import_core12.useThemeName)(), context = useDialogContext(PORTAL_NAME, props.__scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)(), childrenSpaced = children;
18810
+ (space || separator) && (childrenSpaced = (0, import_core12.spacedChildren)({
18811
18811
  children,
18812
18812
  separator,
18813
18813
  space,
18814
18814
  direction: spaceDirection
18815
- })), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
18816
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
18817
- scope: __scopeDialog,
18818
- ...context,
18819
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
18820
- name: themeName,
18821
- children: childrenSpaced
18822
- })
18815
+ }));
18816
+ var content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
18817
+ scope: __scopeDialog,
18818
+ ...context,
18819
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
18820
+ name: themeName,
18821
+ children: childrenSpaced
18823
18822
  })
18824
18823
  });
18824
+ return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
18825
+ children: content
18826
+ }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
18827
+ children: content
18828
+ });
18825
18829
  }, DialogPortal = function(props) {
18826
18830
  var { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing), isAdapted = (0, import_adapt.useAdaptIsActive)();
18827
18831
  isShowing && isFullyHidden && setIsFullyHidden(!1);
@@ -18854,7 +18858,10 @@ var require_Dialog_native = __commonJS({
18854
18858
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
18855
18859
  children: framedContents
18856
18860
  })
18857
- }) : framedContents;
18861
+ }) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
18862
+ __scopeDialog,
18863
+ children: framedContents
18864
+ });
18858
18865
  }
18859
18866
  return children;
18860
18867
  }, PassthroughTheme = function(param) {
@@ -21128,31 +21135,42 @@ var require_focusableInputHOC_native = __commonJS({
21128
21135
  module2.exports = __toCommonJS2(focusableInputHOC_exports);
21129
21136
  var import_compose_refs = require_index_native11(), import_web = require_index_native14(), import_react3 = __toESM2(require("react")), import_registerFocusable = require_registerFocusable_native();
21130
21137
  function useFocusable2(param) {
21131
- var { isInput, props, ref } = param, { id, onChangeText, value, defaultValue } = props, inputValue = import_react3.default.useRef(value || defaultValue || ""), unregisterFocusable = import_react3.default.useRef(), inputRef = import_react3.default.useCallback(function(input) {
21138
+ var { isInput, props, ref } = param, { id, onChangeText, value, defaultValue } = props, inputValue = import_react3.default.useRef(value || defaultValue || ""), unregisterFocusable = import_react3.default.useRef(), focusAndSelect = import_react3.default.useCallback(function(input) {
21139
+ input.focus(), input.setSelection && typeof inputValue.current == "string" && input.setSelection(0, inputValue.current.length);
21140
+ }, []), registerFocusableHandler = import_react3.default.useCallback(function(input) {
21132
21141
  var _unregisterFocusable_current;
21133
- id && input && ((_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 || _unregisterFocusable_current.call(unregisterFocusable), unregisterFocusable.current = (0, import_registerFocusable.registerFocusable)(id, {
21142
+ !id || !input || ((_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 || _unregisterFocusable_current.call(unregisterFocusable), unregisterFocusable.current = (0, import_registerFocusable.registerFocusable)(id, {
21134
21143
  focus: input.focus,
21135
21144
  ...isInput && {
21136
- // react-native doesn't support programmatic .select()
21137
- focusAndSelect() {
21138
- input.focus(), input.setSelection && typeof inputValue.current == "string" && input.setSelection(0, inputValue.current.length);
21145
+ focusAndSelect: function() {
21146
+ return focusAndSelect(input);
21139
21147
  }
21140
21148
  }
21141
21149
  }));
21142
21150
  }, [
21151
+ id,
21143
21152
  isInput,
21144
- id
21145
- ]), combinedRefs = (0, import_compose_refs.composeRefs)(ref, inputRef);
21153
+ focusAndSelect
21154
+ ]), inputRef = import_react3.default.useCallback(function(input) {
21155
+ input && registerFocusableHandler(input);
21156
+ }, [
21157
+ registerFocusableHandler
21158
+ ]), handleChangeText = (0, import_web.useEvent)(function(value2) {
21159
+ inputValue.current = value2, onChangeText == null || onChangeText(value2);
21160
+ });
21146
21161
  return import_react3.default.useEffect(function() {
21147
21162
  return function() {
21148
21163
  var _unregisterFocusable_current;
21149
21164
  (_unregisterFocusable_current = unregisterFocusable.current) === null || _unregisterFocusable_current === void 0 || _unregisterFocusable_current.call(unregisterFocusable);
21150
21165
  };
21151
21166
  }, []), {
21152
- ref: combinedRefs,
21153
- onChangeText: (0, import_web.useEvent)(function(value2) {
21154
- inputValue.current = value2, onChangeText == null || onChangeText(value2);
21155
- })
21167
+ ref: import_react3.default.useMemo(function() {
21168
+ return (0, import_compose_refs.composeRefs)(ref, inputRef);
21169
+ }, [
21170
+ ref,
21171
+ inputRef
21172
+ ]),
21173
+ onChangeText: handleChangeText
21156
21174
  };
21157
21175
  }
21158
21176
  }
@@ -28337,7 +28355,8 @@ var require_Slider_native = __commonJS({
28337
28355
  var RANGE_NAME = "SliderTrackActive", SliderTrackActiveFrame = (0, import_core12.styled)(import_SliderImpl.SliderFrame, {
28338
28356
  name: "SliderTrackActive",
28339
28357
  backgroundColor: "$background",
28340
- position: "absolute"
28358
+ position: "absolute",
28359
+ pointerEvents: "box-none"
28341
28360
  }), SliderTrackActive = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
28342
28361
  var { __scopeSlider, ...rangeProps } = props, context = (0, import_constants22.useSliderContext)(RANGE_NAME, __scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(RANGE_NAME, __scopeSlider), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), valuesCount = context.values.length, percentages = context.values.map(function(value) {
28343
28362
  return (0, import_helpers3.convertValueToPercentage)(value, context.min, context.max);
@@ -30934,19 +30953,32 @@ var defaultStyles = {
30934
30953
  });
30935
30954
  });
30936
30955
  function useInputProps(props, ref) {
30937
- var _theme_placeholderColorProp, _theme_placeholderColor, theme = (0, import_core7.useTheme)(), { onChangeText, ref: combinedRef } = (0, import_focusable.useFocusable)({
30938
- // @ts-ignore
30956
+ var theme = (0, import_core7.useTheme)(), focusableProps = (0, import_focusable.useFocusable)({
30939
30957
  props,
30940
30958
  ref,
30941
30959
  isInput: !0
30942
- }), placeholderColorProp = props.placeholderTextColor, _theme_placeholderColorProp_get, _ref, placeholderTextColor = (_ref = (_theme_placeholderColorProp_get = (_theme_placeholderColorProp = theme[placeholderColorProp]) === null || _theme_placeholderColorProp === void 0 ? void 0 : _theme_placeholderColorProp.get()) !== null && _theme_placeholderColorProp_get !== void 0 ? _theme_placeholderColorProp_get : placeholderColorProp) !== null && _ref !== void 0 ? _ref : (_theme_placeholderColor = theme.placeholderColor) === null || _theme_placeholderColor === void 0 ? void 0 : _theme_placeholderColor.get();
30943
- return {
30944
- ref: combinedRef,
30945
- readOnly: props.disabled,
30946
- ...props,
30947
- placeholderTextColor,
30948
- onChangeText
30949
- };
30960
+ }), placeholderTextColor = import_react.default.useMemo(function() {
30961
+ var _theme_placeholderColorProp, _theme_placeholderColor, placeholderColorProp = props.placeholderTextColor, _theme_placeholderColorProp_get, _ref;
30962
+ return (_ref = (_theme_placeholderColorProp_get = (_theme_placeholderColorProp = theme[placeholderColorProp]) === null || _theme_placeholderColorProp === void 0 ? void 0 : _theme_placeholderColorProp.get()) !== null && _theme_placeholderColorProp_get !== void 0 ? _theme_placeholderColorProp_get : placeholderColorProp) !== null && _ref !== void 0 ? _ref : (_theme_placeholderColor = theme.placeholderColor) === null || _theme_placeholderColor === void 0 ? void 0 : _theme_placeholderColor.get();
30963
+ }, [
30964
+ props.placeholderTextColor,
30965
+ theme
30966
+ ]);
30967
+ return import_react.default.useMemo(function() {
30968
+ return {
30969
+ ref: focusableProps.ref,
30970
+ readOnly: props.disabled,
30971
+ ...props,
30972
+ placeholderTextColor,
30973
+ onChangeText: focusableProps.onChangeText
30974
+ };
30975
+ }, [
30976
+ focusableProps.ref,
30977
+ focusableProps.onChangeText,
30978
+ props.disabled,
30979
+ props,
30980
+ placeholderTextColor
30981
+ ]);
30950
30982
  }
30951
30983
 
30952
30984
  // src/views/Spinner.tsx