@react-spectrum/utils
Advanced tools
Comparing version 3.0.0-nightly-8228e4efd-241209 to 3.0.0-nightly-835f0aa1b-250107
@@ -47,5 +47,6 @@ var $iTRw5$reactariautils = require("@react-aria/utils"); | ||
function $e81916440cf6fd84$export$8107b24b91795686(props) { | ||
const emptyObj = (0, $iTRw5$react.useMemo)(()=>({}), []); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
let parentSlots = (0, $iTRw5$react.useContext)($e81916440cf6fd84$var$SlotContext) || {}; | ||
let { slots: slots = {}, children: children } = props; | ||
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 +66,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 +73,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 +76,0 @@ } |
@@ -34,5 +34,6 @@ import {mergeProps as $doF98$mergeProps} from "@react-aria/utils"; | ||
function $59d09bcc83651bf9$export$8107b24b91795686(props) { | ||
const emptyObj = (0, $doF98$useMemo)(()=>({}), []); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
let parentSlots = (0, $doF98$useContext)($59d09bcc83651bf9$var$SlotContext) || {}; | ||
let { slots: slots = {}, children: children } = props; | ||
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 +53,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 +60,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 +63,0 @@ } |
{ | ||
"name": "@react-spectrum/utils", | ||
"version": "3.0.0-nightly-8228e4efd-241209", | ||
"version": "3.0.0-nightly-835f0aa1b-250107", | ||
"description": "Spectrum UI components in React", | ||
@@ -27,6 +27,6 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-aria/i18n": "^3.0.0-nightly-8228e4efd-241209", | ||
"@react-aria/ssr": "^3.0.0-nightly-8228e4efd-241209", | ||
"@react-aria/utils": "^3.0.0-nightly-8228e4efd-241209", | ||
"@react-types/shared": "^3.0.0-nightly-8228e4efd-241209", | ||
"@react-aria/i18n": "3.0.0-nightly-835f0aa1b-250107", | ||
"@react-aria/ssr": "3.0.0-nightly-835f0aa1b-250107", | ||
"@react-aria/utils": "3.0.0-nightly-835f0aa1b-250107", | ||
"@react-types/shared": "3.0.0-nightly-835f0aa1b-250107", | ||
"@swc/helpers": "^0.5.0", | ||
@@ -40,4 +40,3 @@ "clsx": "^2.0.0" | ||
"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
226937
3170
+ Added@internationalized/date@3.0.0-nightly-835f0aa1b-250107(transitive)
+ Added@internationalized/message@3.0.0-nightly-835f0aa1b-250107(transitive)
+ Added@internationalized/number@3.0.0-nightly-835f0aa1b-250107(transitive)
+ Added@internationalized/string@3.0.0-nightly-835f0aa1b-250107(transitive)
+ Added@react-aria/i18n@3.0.0-nightly-835f0aa1b-250107(transitive)
+ Added@react-aria/ssr@3.0.0-nightly-835f0aa1b-250107(transitive)
+ Added@react-aria/utils@3.0.0-nightly-835f0aa1b-250107(transitive)
+ Added@react-stately/utils@3.0.0-nightly-835f0aa1b-250107(transitive)
+ Added@react-types/shared@3.0.0-nightly-835f0aa1b-250107(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)