@wordpress/components 25.8.13 → 25.8.14

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.
@@ -66,10 +66,11 @@ const Slot = (0, _element.forwardRef)(({
66
66
  exports.Slot = Slot;
67
67
  function Provider({
68
68
  children,
69
+ passthrough = false,
69
70
  ...props
70
71
  }) {
71
72
  const parent = (0, _element.useContext)(_slotFillContext.default);
72
- if (!parent.isDefault) {
73
+ if (!parent.isDefault && passthrough) {
73
74
  return children;
74
75
  }
75
76
  return (0, _element.createElement)(_provider.default, {
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_fill","_interopRequireDefault","_slot","_fill2","_slot2","_slotFillProvider","_provider","_slotFillContext","_useSlot","_useSlotFills","Fill","props","createElement","Fragment","default","Slot","forwardRef","bubblesVirtually","ref","exports","Provider","children","parent","useContext","SlotFillContext","isDefault","createSlotFill","key","baseName","description","FillComponent","name","displayName","SlotComponent","__unstableName","createPrivateSlotFill","privateKey","Symbol","privateSlotFill"],"sources":["@wordpress/components/src/slot-fill/index.js"],"sourcesContent":["// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseFill from './fill';\nimport BaseSlot from './slot';\nimport BubblesVirtuallyFill from './bubbles-virtually/fill';\nimport BubblesVirtuallySlot from './bubbles-virtually/slot';\nimport BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';\nimport SlotFillProvider from './provider';\nimport SlotFillContext from './bubbles-virtually/slot-fill-context';\nexport { default as useSlot } from './bubbles-virtually/use-slot';\nexport { default as useSlotFills } from './bubbles-virtually/use-slot-fills';\n\nexport function Fill( props ) {\n\t// We're adding both Fills here so they can register themselves before\n\t// their respective slot has been registered. Only the Fill that has a slot\n\t// will render. The other one will return null.\n\treturn (\n\t\t<>\n\t\t\t<BaseFill { ...props } />\n\t\t\t<BubblesVirtuallyFill { ...props } />\n\t\t</>\n\t);\n}\nexport const Slot = forwardRef( ( { bubblesVirtually, ...props }, ref ) => {\n\tif ( bubblesVirtually ) {\n\t\treturn <BubblesVirtuallySlot { ...props } ref={ ref } />;\n\t}\n\treturn <BaseSlot { ...props } />;\n} );\n\nexport function Provider( { children, ...props } ) {\n\tconst parent = useContext( SlotFillContext );\n\tif ( ! parent.isDefault ) {\n\t\treturn children;\n\t}\n\treturn (\n\t\t<SlotFillProvider { ...props }>\n\t\t\t<BubblesVirtuallySlotFillProvider>\n\t\t\t\t{ children }\n\t\t\t</BubblesVirtuallySlotFillProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport function createSlotFill( key ) {\n\tconst baseName = typeof key === 'symbol' ? key.description : key;\n\tconst FillComponent = ( props ) => <Fill name={ key } { ...props } />;\n\tFillComponent.displayName = `${ baseName }Fill`;\n\n\tconst SlotComponent = ( props ) => <Slot name={ key } { ...props } />;\n\tSlotComponent.displayName = `${ baseName }Slot`;\n\tSlotComponent.__unstableName = key;\n\n\treturn {\n\t\tFill: FillComponent,\n\t\tSlot: SlotComponent,\n\t};\n}\n\nexport const createPrivateSlotFill = ( name ) => {\n\tconst privateKey = Symbol( name );\n\tconst privateSlotFill = createSlotFill( privateKey );\n\n\treturn { privateKey, ...privateSlotFill };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,MAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,iBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,gBAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,QAAA,GAAAP,sBAAA,CAAAF,O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C,GAAG,EAAG;EACrC,MAAMC,QAAQ,GAAG,OAAOD,GAAG,KAAK,QAAQ,GAAGA,GAAG,CAACE,WAAW,GAAGF,GAAG;EAChE,MAAMG,aAAa,GAAKnB,KAAK,IAAM,IAAAb,QAAA,CAAAc,aAAA,EAACF,IAAI;IAACqB,IAAI,EAAGJ,GAAK;IAAA,GAAMhB;EAAK,CAAI,CAAC;EACrEmB,aAAa,CAACE,WAAW,GAAI,GAAGJ,QAAU,MAAK;EAE/C,MAAMK,aAAa,GAAKtB,KAAK,IAAM,IAAAb,QAAA,CAAAc,aAAA,EAACG,IAAI;IAACgB,IAAI,EAAGJ,GAAK;IAAA,GAAMhB;EAAK,CAAI,CAAC;EACrEsB,aAAa,CAACD,WAAW,GAAI,GAAGJ,QAAU,MAAK;EAC/CK,aAAa,CAACC,cAAc,GAAGP,GAAG;EAElC,OAAO;IACNjB,IAAI,EAAEoB,aAAa;IACnBf,IAAI,EAAEkB;EACP,CAAC;AACF;AAEO,MAAME,qBAAqB,GAAKJ,IAAI,IAAM;EAChD,MAAMK,UAAU,GAAGC,MAAM,CAAEN,IAAK,CAAC;EACjC,MAAMO,eAAe,GAAGZ,cAAc,CAAEU,UAAW,CAAC;EAEpD,OAAO;IAAEA,UAAU;IAAE,GAAGE;EAAgB,CAAC;AAC1C,CAAC;AAACnB,OAAA,CAAAgB,qBAAA,GAAAA,qBAAA"}
1
+ {"version":3,"names":["_element","require","_fill","_interopRequireDefault","_slot","_fill2","_slot2","_slotFillProvider","_provider","_slotFillContext","_useSlot","_useSlotFills","Fill","props","createElement","Fragment","default","Slot","forwardRef","bubblesVirtually","ref","exports","Provider","children","passthrough","parent","useContext","SlotFillContext","isDefault","createSlotFill","key","baseName","description","FillComponent","name","displayName","SlotComponent","__unstableName","createPrivateSlotFill","privateKey","Symbol","privateSlotFill"],"sources":["@wordpress/components/src/slot-fill/index.js"],"sourcesContent":["// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseFill from './fill';\nimport BaseSlot from './slot';\nimport BubblesVirtuallyFill from './bubbles-virtually/fill';\nimport BubblesVirtuallySlot from './bubbles-virtually/slot';\nimport BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';\nimport SlotFillProvider from './provider';\nimport SlotFillContext from './bubbles-virtually/slot-fill-context';\nexport { default as useSlot } from './bubbles-virtually/use-slot';\nexport { default as useSlotFills } from './bubbles-virtually/use-slot-fills';\n\nexport function Fill( props ) {\n\t// We're adding both Fills here so they can register themselves before\n\t// their respective slot has been registered. Only the Fill that has a slot\n\t// will render. The other one will return null.\n\treturn (\n\t\t<>\n\t\t\t<BaseFill { ...props } />\n\t\t\t<BubblesVirtuallyFill { ...props } />\n\t\t</>\n\t);\n}\nexport const Slot = forwardRef( ( { bubblesVirtually, ...props }, ref ) => {\n\tif ( bubblesVirtually ) {\n\t\treturn <BubblesVirtuallySlot { ...props } ref={ ref } />;\n\t}\n\treturn <BaseSlot { ...props } />;\n} );\n\nexport function Provider( { children, passthrough = false, ...props } ) {\n\tconst parent = useContext( SlotFillContext );\n\tif ( ! parent.isDefault && passthrough ) {\n\t\treturn children;\n\t}\n\treturn (\n\t\t<SlotFillProvider { ...props }>\n\t\t\t<BubblesVirtuallySlotFillProvider>\n\t\t\t\t{ children }\n\t\t\t</BubblesVirtuallySlotFillProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport function createSlotFill( key ) {\n\tconst baseName = typeof key === 'symbol' ? key.description : key;\n\tconst FillComponent = ( props ) => <Fill name={ key } { ...props } />;\n\tFillComponent.displayName = `${ baseName }Fill`;\n\n\tconst SlotComponent = ( props ) => <Slot name={ key } { ...props } />;\n\tSlotComponent.displayName = `${ baseName }Slot`;\n\tSlotComponent.__unstableName = key;\n\n\treturn {\n\t\tFill: FillComponent,\n\t\tSlot: SlotComponent,\n\t};\n}\n\nexport const createPrivateSlotFill = ( name ) => {\n\tconst privateKey = Sym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,IAAK,CAAC;EACjC,MAAMO,eAAe,GAAGZ,cAAc,CAAEU,UAAW,CAAC;EAEpD,OAAO;IAAEA,UAAU;IAAE,GAAGE;EAAgB,CAAC;AAC1C,CAAC;AAACpB,OAAA,CAAAiB,qBAAA,GAAAA,qBAAA"}
@@ -43,10 +43,11 @@ export const Slot = forwardRef(({
43
43
  });
44
44
  export function Provider({
45
45
  children,
46
+ passthrough = false,
46
47
  ...props
47
48
  }) {
48
49
  const parent = useContext(SlotFillContext);
49
- if (!parent.isDefault) {
50
+ if (!parent.isDefault && passthrough) {
50
51
  return children;
51
52
  }
52
53
  return createElement(SlotFillProvider, {
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","useContext","BaseFill","BaseSlot","BubblesVirtuallyFill","BubblesVirtuallySlot","BubblesVirtuallySlotFillProvider","SlotFillProvider","SlotFillContext","default","useSlot","useSlotFills","Fill","props","createElement","Fragment","Slot","bubblesVirtually","ref","Provider","children","parent","isDefault","createSlotFill","key","baseName","description","FillComponent","name","displayName","SlotComponent","__unstableName","createPrivateSlotFill","privateKey","Symbol","privateSlotFill"],"sources":["@wordpress/components/src/slot-fill/index.js"],"sourcesContent":["// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseFill from './fill';\nimport BaseSlot from './slot';\nimport BubblesVirtuallyFill from './bubbles-virtually/fill';\nimport BubblesVirtuallySlot from './bubbles-virtually/slot';\nimport BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';\nimport SlotFillProvider from './provider';\nimport SlotFillContext from './bubbles-virtually/slot-fill-context';\nexport { default as useSlot } from './bubbles-virtually/use-slot';\nexport { default as useSlotFills } from './bubbles-virtually/use-slot-fills';\n\nexport function Fill( props ) {\n\t// We're adding both Fills here so they can register themselves before\n\t// their respective slot has been registered. Only the Fill that has a slot\n\t// will render. The other one will return null.\n\treturn (\n\t\t<>\n\t\t\t<BaseFill { ...props } />\n\t\t\t<BubblesVirtuallyFill { ...props } />\n\t\t</>\n\t);\n}\nexport const Slot = forwardRef( ( { bubblesVirtually, ...props }, ref ) => {\n\tif ( bubblesVirtually ) {\n\t\treturn <BubblesVirtuallySlot { ...props } ref={ ref } />;\n\t}\n\treturn <BaseSlot { ...props } />;\n} );\n\nexport function Provider( { children, ...props } ) {\n\tconst parent = useContext( SlotFillContext );\n\tif ( ! parent.isDefault ) {\n\t\treturn children;\n\t}\n\treturn (\n\t\t<SlotFillProvider { ...props }>\n\t\t\t<BubblesVirtuallySlotFillProvider>\n\t\t\t\t{ children }\n\t\t\t</BubblesVirtuallySlotFillProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport function createSlotFill( key ) {\n\tconst baseName = typeof key === 'symbol' ? key.description : key;\n\tconst FillComponent = ( props ) => <Fill name={ key } { ...props } />;\n\tFillComponent.displayName = `${ baseName }Fill`;\n\n\tconst SlotComponent = ( props ) => <Slot name={ key } { ...props } />;\n\tSlotComponent.displayName = `${ baseName }Slot`;\n\tSlotComponent.__unstableName = key;\n\n\treturn {\n\t\tFill: FillComponent,\n\t\tSlot: SlotComponent,\n\t};\n}\n\nexport const createPrivateSlotFill = ( name ) => {\n\tconst privateKey = Symbol( name );\n\tconst privateSlotFill = createSlotFill( privateKey );\n\n\treturn { privateKey, ...privateSlotFill };\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;;AAE3D;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,QAAQ;AAC7B,OAAOC,QAAQ,MAAM,QAAQ;AAC7B,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,gCAAgC,MAAM,wCAAwC;AACrF,OAAOC,gBAAgB,MAAM,YAAY;AACzC,OAAOC,eAAe,MAAM,uCAAuC;AACnE,SAASC,OAAO,IAAIC,OAAO,QAAQ,8BAA8B;AACj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AKjB,KAAK,IAAMC,aAAA,CAACE,IAAI;IAACY,IAAI,EAAGJ,GAAK;IAAA,GAAMX;EAAK,CAAI,CAAC;EACrEiB,aAAa,CAACD,WAAW,GAAI,GAAGJ,QAAU,MAAK;EAC/CK,aAAa,CAACC,cAAc,GAAGP,GAAG;EAElC,OAAO;IACNZ,IAAI,EAAEe,aAAa;IACnBX,IAAI,EAAEc;EACP,CAAC;AACF;AAEA,OAAO,MAAME,qBAAqB,GAAKJ,IAAI,IAAM;EAChD,MAAMK,UAAU,GAAGC,MAAM,CAAEN,IAAK,CAAC;EACjC,MAAMO,eAAe,GAAGZ,cAAc,CAAEU,UAAW,CAAC;EAEpD,OAAO;IAAEA,UAAU;IAAE,GAAGE;EAAgB,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"names":["forwardRef","useContext","BaseFill","BaseSlot","BubblesVirtuallyFill","BubblesVirtuallySlot","BubblesVirtuallySlotFillProvider","SlotFillProvider","SlotFillContext","default","useSlot","useSlotFills","Fill","props","createElement","Fragment","Slot","bubblesVirtually","ref","Provider","children","passthrough","parent","isDefault","createSlotFill","key","baseName","description","FillComponent","name","displayName","SlotComponent","__unstableName","createPrivateSlotFill","privateKey","Symbol","privateSlotFill"],"sources":["@wordpress/components/src/slot-fill/index.js"],"sourcesContent":["// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseFill from './fill';\nimport BaseSlot from './slot';\nimport BubblesVirtuallyFill from './bubbles-virtually/fill';\nimport BubblesVirtuallySlot from './bubbles-virtually/slot';\nimport BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';\nimport SlotFillProvider from './provider';\nimport SlotFillContext from './bubbles-virtually/slot-fill-context';\nexport { default as useSlot } from './bubbles-virtually/use-slot';\nexport { default as useSlotFills } from './bubbles-virtually/use-slot-fills';\n\nexport function Fill( props ) {\n\t// We're adding both Fills here so they can register themselves before\n\t// their respective slot has been registered. Only the Fill that has a slot\n\t// will render. The other one will return null.\n\treturn (\n\t\t<>\n\t\t\t<BaseFill { ...props } />\n\t\t\t<BubblesVirtuallyFill { ...props } />\n\t\t</>\n\t);\n}\nexport const Slot = forwardRef( ( { bubblesVirtually, ...props }, ref ) => {\n\tif ( bubblesVirtually ) {\n\t\treturn <BubblesVirtuallySlot { ...props } ref={ ref } />;\n\t}\n\treturn <BaseSlot { ...props } />;\n} );\n\nexport function Provider( { children, passthrough = false, ...props } ) {\n\tconst parent = useContext( SlotFillContext );\n\tif ( ! parent.isDefault && passthrough ) {\n\t\treturn children;\n\t}\n\treturn (\n\t\t<SlotFillProvider { ...props }>\n\t\t\t<BubblesVirtuallySlotFillProvider>\n\t\t\t\t{ children }\n\t\t\t</BubblesVirtuallySlotFillProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n\nexport function createSlotFill( key ) {\n\tconst baseName = typeof key === 'symbol' ? key.description : key;\n\tconst FillComponent = ( props ) => <Fill name={ key } { ...props } />;\n\tFillComponent.displayName = `${ baseName }Fill`;\n\n\tconst SlotComponent = ( props ) => <Slot name={ key } { ...props } />;\n\tSlotComponent.displayName = `${ baseName }Slot`;\n\tSlotComponent.__unstableName = key;\n\n\treturn {\n\t\tFill: FillComponent,\n\t\tSlot: SlotComponent,\n\t};\n}\n\nexport const createPrivateSlotFill = ( name ) => {\n\tconst privateKey = Symbol( name );\n\tconst privateSlotFill = createSlotFill( privateKey );\n\n\treturn { privateKey, ...privateSlotFill };\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;;AAE3D;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,QAAQ;AAC7B,OAAOC,QAAQ,MAAM,QAAQ;AAC7B,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,oBAAoB,MAAM,0BAA0B;AAC3D,OAAOC,gCAAgC,MAAM,wCAAwC;AACrF,OAAOC,gBAAgB,MAAM,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,IAAI,EAAGJ,GAAK;IAAA,GAAMZ;EAAK,CAAI,CAAC;EACrEe,aAAa,CAACE,WAAW,GAAI,GAAGJ,QAAU,MAAK;EAE/C,MAAMK,aAAa,GAAKlB,KAAK,IAAMC,aAAA,CAACE,IAAI;IAACa,IAAI,EAAGJ,GAAK;IAAA,GAAMZ;EAAK,CAAI,CAAC;EACrEkB,aAAa,CAACD,WAAW,GAAI,GAAGJ,QAAU,MAAK;EAC/CK,aAAa,CAACC,cAAc,GAAGP,GAAG;EAElC,OAAO;IACNb,IAAI,EAAEgB,aAAa;IACnBZ,IAAI,EAAEe;EACP,CAAC;AACF;AAEA,OAAO,MAAME,qBAAqB,GAAKJ,IAAI,IAAM;EAChD,MAAMK,UAAU,GAAGC,MAAM,CAAEN,IAAK,CAAC;EACjC,MAAMO,eAAe,GAAGZ,cAAc,CAAEU,UAAW,CAAC;EAEpD,OAAO;IAAEA,UAAU;IAAE,GAAGE;EAAgB,CAAC;AAC1C,CAAC"}
@@ -1,7 +1,8 @@
1
1
  export function Fill(props: any): JSX.Element;
2
- export function Provider({ children, ...props }: {
2
+ export function Provider({ children, passthrough, ...props }: {
3
3
  [x: string]: any;
4
4
  children: any;
5
+ passthrough?: boolean | undefined;
5
6
  }): any;
6
7
  export function createSlotFill(key: any): {
7
8
  Fill: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/slot-fill/index.js"],"names":[],"mappings":"AAmBA,8CAUC;AAQD;;;QAYC;AAED;;;;;;;;;;EAaC;;;AAlCD,iGAKI;AA+BG;;;;;;;;;;;EAKN"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/slot-fill/index.js"],"names":[],"mappings":"AAmBA,8CAUC;AAQD;;;;QAYC;AAED;;;;;;;;;;EAaC;;;AAlCD,iGAKI;AA+BG;;;;;;;;;;;EAKN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "25.8.13",
3
+ "version": "25.8.14",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -87,5 +87,5 @@
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  },
90
- "gitHead": "70b30e9461372ae518e3d0e50f7e5085eda8b46e"
90
+ "gitHead": "fb3a11411cc4cc3af8a3c2a629842d1c63d8edbc"
91
91
  }
@@ -35,9 +35,9 @@ export const Slot = forwardRef( ( { bubblesVirtually, ...props }, ref ) => {
35
35
  return <BaseSlot { ...props } />;
36
36
  } );
37
37
 
38
- export function Provider( { children, ...props } ) {
38
+ export function Provider( { children, passthrough = false, ...props } ) {
39
39
  const parent = useContext( SlotFillContext );
40
- if ( ! parent.isDefault ) {
40
+ if ( ! parent.isDefault && passthrough ) {
41
41
  return children;
42
42
  }
43
43
  return (