@react-spectrum/utils
Advanced tools
Comparing version 3.0.0-nightly-10a43de88-241127 to 3.0.0-nightly-1286a652e-250116
@@ -47,5 +47,5 @@ var $iTRw5$reactariautils = require("@react-aria/utils"); | ||
function $e81916440cf6fd84$export$8107b24b91795686(props) { | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
let parentSlots = (0, $iTRw5$react.useContext)($e81916440cf6fd84$var$SlotContext) || {}; | ||
let { slots: slots = {}, children: children } = props; | ||
const emptyObj = (0, $iTRw5$react.useMemo)(()=>({}), []); | ||
let parentSlots = (0, $iTRw5$react.useContext)($e81916440cf6fd84$var$SlotContext) || emptyObj; | ||
let { slots: slots = emptyObj, children: children } = props; | ||
// Merge props for each slot from parent context and props | ||
@@ -65,2 +65,3 @@ let value = (0, $iTRw5$react.useMemo)(()=>Object.keys(parentSlots).concat(Object.keys(slots)).reduce((o, p)=>({ | ||
let { children: children, ...otherProps } = props; | ||
const emptyObj = (0, $iTRw5$react.useMemo)(()=>({}), []); | ||
let content = children; | ||
@@ -71,3 +72,3 @@ if ((0, ($parcel$interopDefault($iTRw5$react))).Children.toArray(children).length <= 1) { | ||
return /*#__PURE__*/ (0, ($parcel$interopDefault($iTRw5$react))).createElement($e81916440cf6fd84$var$SlotContext.Provider, { | ||
value: {} | ||
value: emptyObj | ||
}, content); | ||
@@ -74,0 +75,0 @@ } |
@@ -34,5 +34,5 @@ import {mergeProps as $doF98$mergeProps} from "@react-aria/utils"; | ||
function $59d09bcc83651bf9$export$8107b24b91795686(props) { | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
let parentSlots = (0, $doF98$useContext)($59d09bcc83651bf9$var$SlotContext) || {}; | ||
let { slots: slots = {}, children: children } = props; | ||
const emptyObj = (0, $doF98$useMemo)(()=>({}), []); | ||
let parentSlots = (0, $doF98$useContext)($59d09bcc83651bf9$var$SlotContext) || emptyObj; | ||
let { slots: slots = emptyObj, children: children } = props; | ||
// Merge props for each slot from parent context and props | ||
@@ -52,2 +52,3 @@ let value = (0, $doF98$useMemo)(()=>Object.keys(parentSlots).concat(Object.keys(slots)).reduce((o, p)=>({ | ||
let { children: children, ...otherProps } = props; | ||
const emptyObj = (0, $doF98$useMemo)(()=>({}), []); | ||
let content = children; | ||
@@ -58,3 +59,3 @@ if ((0, $doF98$react).Children.toArray(children).length <= 1) { | ||
return /*#__PURE__*/ (0, $doF98$react).createElement($59d09bcc83651bf9$var$SlotContext.Provider, { | ||
value: {} | ||
value: emptyObj | ||
}, content); | ||
@@ -61,0 +62,0 @@ } |
{ | ||
"name": "@react-spectrum/utils", | ||
"version": "3.0.0-nightly-10a43de88-241127", | ||
"version": "3.0.0-nightly-1286a652e-250116", | ||
"description": "Spectrum UI components in React", | ||
@@ -27,6 +27,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/i18n": "^3.0.0-nightly-10a43de88-241127", | ||
"@react-aria/ssr": "^3.0.0-nightly-10a43de88-241127", | ||
"@react-aria/utils": "^3.0.0-nightly-10a43de88-241127", | ||
"@react-types/shared": "^3.0.0-nightly-10a43de88-241127", | ||
"@react-aria/i18n": "3.0.0-nightly-1286a652e-250116", | ||
"@react-aria/ssr": "3.0.0-nightly-1286a652e-250116", | ||
"@react-aria/utils": "3.0.0-nightly-1286a652e-250116", | ||
"@react-types/shared": "3.0.0-nightly-1286a652e-250116", | ||
"@swc/helpers": "^0.5.0", | ||
@@ -36,8 +36,8 @@ "clsx": "^2.0.0" | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", | ||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"stableVersion": "3.12.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
226640
3166
8
+ Added@internationalized/date@3.0.0-nightly-1286a652e-250116(transitive)
+ Added@internationalized/message@3.0.0-nightly-1286a652e-250116(transitive)
+ Added@internationalized/number@3.0.0-nightly-1286a652e-250116(transitive)
+ Added@internationalized/string@3.0.0-nightly-1286a652e-250116(transitive)
+ Added@react-aria/i18n@3.0.0-nightly-1286a652e-250116(transitive)
+ Added@react-aria/ssr@3.0.0-nightly-1286a652e-250116(transitive)
+ Added@react-aria/utils@3.0.0-nightly-1286a652e-250116(transitive)
+ Added@react-stately/utils@3.0.0-nightly-1286a652e-250116(transitive)
+ Added@react-types/shared@3.0.0-nightly-1286a652e-250116(transitive)
- Removed@internationalized/date@3.7.0(transitive)
- Removed@internationalized/message@3.1.6(transitive)
- Removed@internationalized/number@3.6.0(transitive)
- Removed@internationalized/string@3.2.5(transitive)
- Removed@react-aria/i18n@3.12.5(transitive)
- Removed@react-aria/ssr@3.9.7(transitive)
- Removed@react-aria/utils@3.27.0(transitive)
- Removed@react-stately/utils@3.10.5(transitive)
- Removed@react-types/shared@3.27.0(transitive)