@tamagui/web 1.98.0 → 1.98.1
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/cjs/views/Slot.js +5 -2
- package/dist/cjs/views/Slot.js.map +1 -1
- package/dist/cjs/views/Slot.native.js +2 -2
- package/dist/cjs/views/Slot.native.js.map +2 -2
- package/dist/esm/views/Slot.js +6 -3
- package/dist/esm/views/Slot.js.map +1 -1
- package/dist/esm/views/Slot.mjs +16 -15
- package/dist/esm/views/Slot.native.js +3 -3
- package/dist/esm/views/Slot.native.js.map +2 -2
- package/package.json +11 -14
- package/src/views/Slot.tsx +7 -2
- package/types/views/Slot.d.ts.map +1 -1
package/dist/cjs/views/Slot.js
CHANGED
|
@@ -19,7 +19,7 @@ __export(Slot_exports, {
|
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(Slot_exports);
|
|
21
21
|
var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_react = require("react"), import_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
-
const Slot = (0, import_react.forwardRef)(function(props, forwardedRef) {
|
|
22
|
+
const is19 = import_react.version.startsWith("19."), Slot = (0, import_react.forwardRef)(function(props, forwardedRef) {
|
|
23
23
|
const { children, ...slotProps } = props;
|
|
24
24
|
if ((0, import_react.isValidElement)(children)) {
|
|
25
25
|
const mergedProps = mergeSlotProps(children, slotProps);
|
|
@@ -27,7 +27,10 @@ const Slot = (0, import_react.forwardRef)(function(props, forwardedRef) {
|
|
|
27
27
|
children,
|
|
28
28
|
children.type.avoidForwardRef ? mergedProps : {
|
|
29
29
|
...mergedProps,
|
|
30
|
-
ref: (0, import_compose_refs.composeRefs)(
|
|
30
|
+
ref: (0, import_compose_refs.composeRefs)(
|
|
31
|
+
forwardedRef,
|
|
32
|
+
is19 ? children.props.ref : children.ref
|
|
33
|
+
)
|
|
31
34
|
}
|
|
32
35
|
);
|
|
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AI,UAAU,GAAG,GACxC,OAAO,UAAU,GAAG;AAK1B,WAAS,YAAY,YAAY;AAC/B,UAAM,gBAAgB,UAAU,QAAQ,GAClC,iBAAiB,WAAW,QAAQ;AAE1C,IAAI,eAAe,YAAY,aAC7B,WAAW,SAAS,QAAQ,GAC5B,OAAO,cAAc,QAAQ,IAGb,YAAY,KAAK,QAAQ,IAGzC,cAAc,QAAQ,QAAI,qCAAqB,gBAAgB,aAAa,IAGrE,aAAa,UACpB,cAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe,IACvD,aAAa,gBACtB,cAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAEtF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAEA,MAAM,cAAc;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -73,14 +73,14 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
73
73
|
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
74
74
|
return target;
|
|
75
75
|
}
|
|
76
|
-
var Slot = /* @__PURE__ */ (0, import_react.forwardRef)(function(props, forwardedRef) {
|
|
76
|
+
var is19 = import_react.version.startsWith("19."), Slot = /* @__PURE__ */ (0, import_react.forwardRef)(function(props, forwardedRef) {
|
|
77
77
|
var children = props.children, slotProps = _object_without_properties(props, [
|
|
78
78
|
"children"
|
|
79
79
|
]);
|
|
80
80
|
if (/* @__PURE__ */ (0, import_react.isValidElement)(children)) {
|
|
81
81
|
var mergedProps = mergeSlotProps(children, slotProps);
|
|
82
82
|
return /* @__PURE__ */ (0, import_react.cloneElement)(children, children.type.avoidForwardRef ? mergedProps : _object_spread_props(_object_spread({}, mergedProps), {
|
|
83
|
-
ref: (0, import_compose_refs.composeRefs)(forwardedRef, children.ref)
|
|
83
|
+
ref: (0, import_compose_refs.composeRefs)(forwardedRef, is19 ? children.props.ref : children.ref)
|
|
84
84
|
}));
|
|
85
85
|
}
|
|
86
86
|
return import_react.Children.count(children) > 1 ? import_react.Children.only(null) : null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Users/n8/tamagui/packages/web/src/views/Slot.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;uDAEA,sBAA4B,kCAC5B,mBAAsB,+BACtB,iBAAqC,6BAErC,
|
|
5
|
-
"names": ["Slot", "forwardRef", "props", "forwardedRef", "children", "slotProps", "isValidElement", "mergedProps", "mergeSlotProps", "cloneElement", "type", "ref", "composeRefs", "Children", "count", "only", "Slottable", "_jsx", "_Fragment", "pressMap", "isWeb", "onPress", "onPressOut", "onPressIn", "child", "childProps", "overrideProps", "isHTMLChild", "key", "propName", "slotPropValue", "childPropValue", "isHandler", "handleRegex", "test", "composeEventHandlers", "filter", "Boolean", "join"]
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;;uDAEA,sBAA4B,kCAC5B,mBAAsB,+BACtB,iBAAqC,6BAErC,eAA4E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAU5E,IAAMA,OAAOC,qBAAQC,WAAW,KAAA,GAEnBC,OAAOC,6CAA2B,SAAcC,OAAOC,cAAY;AAC9E,MAAQC,WAA2BF,MAA3BE,UAAaC,YAAAA,2BAAcH,OAAAA;IAA3BE;;AAER,MAAIE,iDAAeF,QAAAA,GAAW;AAC5B,QAAMG,cAAcC,eAAeJ,UAAUC,SAAAA;AAC7C,WAAOI,+CACLL,UACAA,SAASM,KAAK,kBACVH,cACA,qBAAA,eAAA,CAAA,GACKA,WAAAA,GAAAA;MACHI,SAAKC,iCACHT,cACAN,OAAQO,SAAiBF,MAAMS,MAAOP,SAAiBO,GAAG;;EAItE;AAEA,SAAOE,sBAASC,MAAMV,QAAAA,IAAY,IAAIS,sBAASE,KAAK,IAAA,IAAQ;AAC9D,CAAA;AAEAf,KAAK,cAAiB;AAMf,IAAMgB,YAAY,SAAA,OAAA;MAAGZ,WAAAA,MAAAA;AAC1B,SAAO,uCAAAa,KAAA,mBAAAC,UAAA;;;AACT;AAEAF,UAAU,cAAiB;AAI3B,IAAMG,WAAWC,yBACb;EACEC,SAAS;EACTC,YAAY;EACZC,WAAW;AACb,IACA,CAAC;AAEL,SAASf,eAAegB,OAAYnB,WAA8B;AAChE,MAAMoB,aAAaD,MAAMtB,OAGnBwB,gBAAgB,eAAA,CAAA,GAAKD,UAAAA,GACrBE,cAAc,OAAOH,MAAMd,QAAS;AAE1C,MAAIiB;AACF,aAAWC,OAAOT;AAChB,MAAIS,OAAOvB,cACTA,UAAUc,SAASS,GAAAA,CAAI,IAAIvB,UAAUuB,GAAAA,GACrC,OAAOvB,UAAUuB,GAAAA;AAKvB,WAASC,YAAYJ,YAAY;AAC/B,QAAMK,gBAAgBzB,UAAUwB,QAAAA,GAC1BE,iBAAiBN,WAAWI,QAAAA;AAElC,IAAIF,eAAeE,YAAYV,aAC7BU,WAAWV,SAASU,QAAAA,GACpB,OAAOH,cAAcG,QAAAA;AAGvB,QAAMG,YAAYC,YAAYC,KAAKL,QAAAA;AAEnC,IAAIG,YACFN,cAAcG,QAAAA,QAAYM,qCAAqBJ,gBAAgBD,aAAAA,IAGxDD,aAAa,UACpBH,cAAcG,QAAAA,IAAY,eAAA,CAAA,GAAKC,eAAkBC,cAAAA,IACxCF,aAAa,gBACtBH,cAAcG,QAAAA,IAAY;MAACC;MAAeC;MAAgBK,OAAOC,OAAAA,EAASC,KAAK,GAAA;EAEnF;AAEA,SAAO,eAAA,CAAA,GAAKjC,WAAcqB,aAAAA;AAC5B;AAEA,IAAMO,cAAc;",
|
|
5
|
+
"names": ["is19", "version", "startsWith", "Slot", "forwardRef", "props", "forwardedRef", "children", "slotProps", "isValidElement", "mergedProps", "mergeSlotProps", "cloneElement", "type", "ref", "composeRefs", "Children", "count", "only", "Slottable", "_jsx", "_Fragment", "pressMap", "isWeb", "onPress", "onPressOut", "onPressIn", "child", "childProps", "overrideProps", "isHTMLChild", "key", "propName", "slotPropValue", "childPropValue", "isHandler", "handleRegex", "test", "composeEventHandlers", "filter", "Boolean", "join"]
|
|
6
6
|
}
|
package/dist/esm/views/Slot.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { composeRefs } from "@tamagui/compose-refs";
|
|
2
2
|
import { isWeb } from "@tamagui/constants";
|
|
3
3
|
import { composeEventHandlers } from "@tamagui/helpers";
|
|
4
|
-
import { Children, cloneElement, forwardRef, isValidElement } from "react";
|
|
4
|
+
import { Children, cloneElement, forwardRef, isValidElement, version } from "react";
|
|
5
5
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
|
-
const Slot = forwardRef(function(props, forwardedRef) {
|
|
6
|
+
const is19 = version.startsWith("19."), Slot = forwardRef(function(props, forwardedRef) {
|
|
7
7
|
const { children, ...slotProps } = props;
|
|
8
8
|
if (isValidElement(children)) {
|
|
9
9
|
const mergedProps = mergeSlotProps(children, slotProps);
|
|
@@ -11,7 +11,10 @@ const Slot = forwardRef(function(props, forwardedRef) {
|
|
|
11
11
|
children,
|
|
12
12
|
children.type.avoidForwardRef ? mergedProps : {
|
|
13
13
|
...mergedProps,
|
|
14
|
-
ref: composeRefs(
|
|
14
|
+
ref: composeRefs(
|
|
15
|
+
forwardedRef,
|
|
16
|
+
is19 ? children.props.ref : children.ref
|
|
17
|
+
)
|
|
15
18
|
}
|
|
16
19
|
);
|
|
17
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Slot.tsx"],
|
|
4
|
-
"mappings": "AAEA,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AACtB,SAAS,4BAA4B;AAErC,SAAS,UAAU,cAAc,YAAY,
|
|
4
|
+
"mappings": "AAEA,SAAS,mBAAmB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ACpB,cAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe,IACvD,aAAa,gBACtB,cAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAEtF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAEA,MAAM,cAAc;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/dist/esm/views/Slot.mjs
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { composeRefs } from "@tamagui/compose-refs";
|
|
2
2
|
import { isWeb } from "@tamagui/constants";
|
|
3
3
|
import { composeEventHandlers } from "@tamagui/helpers";
|
|
4
|
-
import { Children, cloneElement, forwardRef, isValidElement } from "react";
|
|
4
|
+
import { Children, cloneElement, forwardRef, isValidElement, version } from "react";
|
|
5
5
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
6
|
+
const is19 = version.startsWith("19."),
|
|
7
|
+
Slot = forwardRef(function (props, forwardedRef) {
|
|
8
|
+
const {
|
|
9
|
+
children,
|
|
10
|
+
...slotProps
|
|
11
|
+
} = props;
|
|
12
|
+
if (isValidElement(children)) {
|
|
13
|
+
const mergedProps = mergeSlotProps(children, slotProps);
|
|
14
|
+
return cloneElement(children, children.type.avoidForwardRef ? mergedProps : {
|
|
15
|
+
...mergedProps,
|
|
16
|
+
ref: composeRefs(forwardedRef, is19 ? children.props.ref : children.ref)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return Children.count(children) > 1 ? Children.only(null) : null;
|
|
20
|
+
});
|
|
20
21
|
Slot.displayName = "Slot";
|
|
21
22
|
const Slottable = ({
|
|
22
23
|
children
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { composeRefs } from "@tamagui/compose-refs";
|
|
3
3
|
import { isWeb } from "@tamagui/constants";
|
|
4
4
|
import { composeEventHandlers } from "@tamagui/helpers";
|
|
5
|
-
import { Children, cloneElement, forwardRef, isValidElement } from "react";
|
|
5
|
+
import { Children, cloneElement, forwardRef, isValidElement, version } from "react";
|
|
6
6
|
function _define_property(obj, key, value) {
|
|
7
7
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
8
8
|
value,
|
|
@@ -56,14 +56,14 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
56
56
|
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
57
57
|
return target;
|
|
58
58
|
}
|
|
59
|
-
var Slot = /* @__PURE__ */ forwardRef(function(props, forwardedRef) {
|
|
59
|
+
var is19 = version.startsWith("19."), Slot = /* @__PURE__ */ forwardRef(function(props, forwardedRef) {
|
|
60
60
|
var children = props.children, slotProps = _object_without_properties(props, [
|
|
61
61
|
"children"
|
|
62
62
|
]);
|
|
63
63
|
if (/* @__PURE__ */ isValidElement(children)) {
|
|
64
64
|
var mergedProps = mergeSlotProps(children, slotProps);
|
|
65
65
|
return /* @__PURE__ */ cloneElement(children, children.type.avoidForwardRef ? mergedProps : _object_spread_props(_object_spread({}, mergedProps), {
|
|
66
|
-
ref: composeRefs(forwardedRef, children.ref)
|
|
66
|
+
ref: composeRefs(forwardedRef, is19 ? children.props.ref : children.ref)
|
|
67
67
|
}));
|
|
68
68
|
}
|
|
69
69
|
return Children.count(children) > 1 ? Children.only(null) : null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Users/n8/tamagui/packages/web/src/views/Slot.tsx"],
|
|
4
|
-
"mappings": ";AAEA,SAASA,mBAAmB;AAC5B,SAASC,aAAa;AACtB,SAASC,4BAA4B;AAErC,SAASC,UAAUC,cAAcC,YAAYC,
|
|
5
|
-
"names": ["composeRefs", "isWeb", "composeEventHandlers", "Children", "cloneElement", "forwardRef", "isValidElement", "Slot", "props", "forwardedRef", "children", "slotProps", "mergedProps", "mergeSlotProps", "type", "ref", "count", "only", "Slottable", "pressMap", "onPress", "onPressOut", "onPressIn", "child", "childProps", "overrideProps", "isHTMLChild", "key", "propName", "slotPropValue", "childPropValue", "isHandler", "handleRegex", "test", "filter", "Boolean", "join"]
|
|
4
|
+
"mappings": ";AAEA,SAASA,mBAAmB;AAC5B,SAASC,aAAa;AACtB,SAASC,4BAA4B;AAErC,SAASC,UAAUC,cAAcC,YAAYC,gBAAgBC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAU5E,IAAMC,OAAOD,QAAQE,WAAW,KAAA,GAEnBC,OAAOL,2BAA2B,SAAcM,OAAOC,cAAY;AAC9E,MAAQC,WAA2BF,MAA3BE,UAAaC,YAAAA,2BAAcH,OAAAA;IAA3BE;;AAER,MAAIP,+BAAeO,QAAAA,GAAW;AAC5B,QAAME,cAAcC,eAAeH,UAAUC,SAAAA;AAC7C,WAAOV,6BACLS,UACAA,SAASI,KAAK,kBACVF,cACA,qBAAA,eAAA,CAAA,GACKA,WAAAA,GAAAA;MACHG,KAAKlB,YACHY,cACAJ,OAAQK,SAAiBF,MAAMO,MAAOL,SAAiBK,GAAG;;EAItE;AAEA,SAAOf,SAASgB,MAAMN,QAAAA,IAAY,IAAIV,SAASiB,KAAK,IAAA,IAAQ;AAC9D,CAAA;AAEAV,KAAK,cAAiB;AAMf,IAAMW,YAAY,SAAA,OAAA;MAAGR,WAAAA,MAAAA;AAC1B,SAAO,qBAAA,WAAA;;;AACT;AAEAQ,UAAU,cAAiB;AAI3B,IAAMC,WAAWrB,QACb;EACEsB,SAAS;EACTC,YAAY;EACZC,WAAW;AACb,IACA,CAAC;AAEL,SAAST,eAAeU,OAAYZ,WAA8B;AAChE,MAAMa,aAAaD,MAAMf,OAGnBiB,gBAAgB,eAAA,CAAA,GAAKD,UAAAA,GACrBE,cAAc,OAAOH,MAAMT,QAAS;AAE1C,MAAIY;AACF,aAAWC,OAAOR;AAChB,MAAIQ,OAAOhB,cACTA,UAAUQ,SAASQ,GAAAA,CAAI,IAAIhB,UAAUgB,GAAAA,GACrC,OAAOhB,UAAUgB,GAAAA;AAKvB,WAASC,YAAYJ,YAAY;AAC/B,QAAMK,gBAAgBlB,UAAUiB,QAAAA,GAC1BE,iBAAiBN,WAAWI,QAAAA;AAElC,IAAIF,eAAeE,YAAYT,aAC7BS,WAAWT,SAASS,QAAAA,GACpB,OAAOH,cAAcG,QAAAA;AAGvB,QAAMG,YAAYC,YAAYC,KAAKL,QAAAA;AAEnC,IAAIG,YACFN,cAAcG,QAAAA,IAAY7B,qBAAqB+B,gBAAgBD,aAAAA,IAGxDD,aAAa,UACpBH,cAAcG,QAAAA,IAAY,eAAA,CAAA,GAAKC,eAAkBC,cAAAA,IACxCF,aAAa,gBACtBH,cAAcG,QAAAA,IAAY;MAACC;MAAeC;MAAgBI,OAAOC,OAAAA,EAASC,KAAK,GAAA;EAEnF;AAEA,SAAO,eAAA,CAAA,GAAKzB,WAAcc,aAAAA;AAC5B;AAEA,IAAMO,cAAc;",
|
|
5
|
+
"names": ["composeRefs", "isWeb", "composeEventHandlers", "Children", "cloneElement", "forwardRef", "isValidElement", "version", "is19", "startsWith", "Slot", "props", "forwardedRef", "children", "slotProps", "mergedProps", "mergeSlotProps", "type", "ref", "count", "only", "Slottable", "pressMap", "onPress", "onPressOut", "onPressIn", "child", "childProps", "overrideProps", "isHTMLChild", "key", "propName", "slotPropValue", "childPropValue", "isHandler", "handleRegex", "test", "filter", "Boolean", "join"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/web",
|
|
3
|
-
"version": "1.98.
|
|
3
|
+
"version": "1.98.1",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/cjs",
|
|
6
6
|
"module": "dist/esm",
|
|
@@ -27,21 +27,18 @@
|
|
|
27
27
|
"reset.css"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tamagui/compose-refs": "1.98.
|
|
31
|
-
"@tamagui/constants": "1.98.
|
|
32
|
-
"@tamagui/helpers": "1.98.
|
|
33
|
-
"@tamagui/normalize-css-color": "1.98.
|
|
34
|
-
"@tamagui/timer": "1.98.
|
|
35
|
-
"@tamagui/types": "1.98.
|
|
36
|
-
"@tamagui/use-did-finish-ssr": "1.98.
|
|
37
|
-
"@tamagui/use-event": "1.98.
|
|
38
|
-
"@tamagui/use-force-update": "1.98.
|
|
39
|
-
},
|
|
40
|
-
"peerDependencies": {
|
|
41
|
-
"react": "*"
|
|
30
|
+
"@tamagui/compose-refs": "1.98.1",
|
|
31
|
+
"@tamagui/constants": "1.98.1",
|
|
32
|
+
"@tamagui/helpers": "1.98.1",
|
|
33
|
+
"@tamagui/normalize-css-color": "1.98.1",
|
|
34
|
+
"@tamagui/timer": "1.98.1",
|
|
35
|
+
"@tamagui/types": "1.98.1",
|
|
36
|
+
"@tamagui/use-did-finish-ssr": "1.98.1",
|
|
37
|
+
"@tamagui/use-event": "1.98.1",
|
|
38
|
+
"@tamagui/use-force-update": "1.98.1"
|
|
42
39
|
},
|
|
43
40
|
"devDependencies": {
|
|
44
|
-
"@tamagui/build": "1.98.
|
|
41
|
+
"@tamagui/build": "1.98.1",
|
|
45
42
|
"@testing-library/react": "^14.0.0",
|
|
46
43
|
"csstype": "^3.0.10",
|
|
47
44
|
"react": "^18.2.0",
|
package/src/views/Slot.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { composeRefs } from '@tamagui/compose-refs'
|
|
|
4
4
|
import { isWeb } from '@tamagui/constants'
|
|
5
5
|
import { composeEventHandlers } from '@tamagui/helpers'
|
|
6
6
|
import type { ReactNode } from 'react'
|
|
7
|
-
import { Children, cloneElement, forwardRef, isValidElement } from 'react'
|
|
7
|
+
import { Children, cloneElement, forwardRef, isValidElement, version } from 'react'
|
|
8
8
|
|
|
9
9
|
/* -------------------------------------------------------------------------------------------------
|
|
10
10
|
* Slot
|
|
@@ -14,6 +14,8 @@ interface SlotProps {
|
|
|
14
14
|
children: ReactNode
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
const is19 = version.startsWith('19.')
|
|
18
|
+
|
|
17
19
|
export const Slot = forwardRef<any, SlotProps>(function Slot(props, forwardedRef) {
|
|
18
20
|
const { children, ...slotProps } = props
|
|
19
21
|
|
|
@@ -25,7 +27,10 @@ export const Slot = forwardRef<any, SlotProps>(function Slot(props, forwardedRef
|
|
|
25
27
|
? mergedProps
|
|
26
28
|
: {
|
|
27
29
|
...mergedProps,
|
|
28
|
-
ref: composeRefs(
|
|
30
|
+
ref: composeRefs(
|
|
31
|
+
forwardedRef,
|
|
32
|
+
is19 ? (children as any).props.ref : (children as any).ref
|
|
33
|
+
),
|
|
29
34
|
}
|
|
30
35
|
)
|
|
31
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slot.d.ts","sourceRoot":"","sources":["../../src/views/Slot.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;CACpB;
|
|
1
|
+
{"version":3,"file":"Slot.d.ts","sourceRoot":"","sources":["../../src/views/Slot.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOtC,UAAU,SAAS;IACjB,QAAQ,EAAE,SAAS,CAAA;CACpB;AAID,eAAO,MAAM,IAAI,2FAoBf,CAAA;AAQF,eAAO,MAAM,SAAS;mBAAkB;QAAE,QAAQ,EAAE,SAAS,CAAA;KAAE;;CAE9D,CAAA"}
|