@wordpress/block-library 7.0.1 → 7.0.2

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.
Files changed (230) hide show
  1. package/README.md +16 -0
  2. package/build/button/edit.native.js +2 -2
  3. package/build/button/edit.native.js.map +1 -1
  4. package/build/columns/index.js +12 -0
  5. package/build/columns/index.js.map +1 -1
  6. package/build/comment-author-avatar/edit.js +17 -4
  7. package/build/comment-author-avatar/edit.js.map +1 -1
  8. package/build/comment-template/edit.js +94 -36
  9. package/build/comment-template/edit.js.map +1 -1
  10. package/build/comment-template/hooks.js +175 -0
  11. package/build/comment-template/hooks.js.map +1 -0
  12. package/build/comment-template/index.js +1 -1
  13. package/build/comment-template/util.js.map +1 -1
  14. package/build/comments-pagination-next/index.js +1 -1
  15. package/build/comments-pagination-numbers/index.js +1 -1
  16. package/build/comments-query-loop/edit/comments-inspector-controls.js +20 -9
  17. package/build/comments-query-loop/edit/comments-inspector-controls.js.map +1 -1
  18. package/build/comments-query-loop/edit.js +1 -19
  19. package/build/comments-query-loop/edit.js.map +1 -1
  20. package/build/comments-query-loop/index.js +5 -0
  21. package/build/comments-query-loop/index.js.map +1 -1
  22. package/build/cover/edit.js +21 -22
  23. package/build/cover/edit.js.map +1 -1
  24. package/build/cover/edit.native.js +7 -5
  25. package/build/cover/edit.native.js.map +1 -1
  26. package/build/cover/overlay-color-settings.native.js +4 -3
  27. package/build/cover/overlay-color-settings.native.js.map +1 -1
  28. package/build/cover/transforms.js +4 -2
  29. package/build/cover/transforms.js.map +1 -1
  30. package/build/group/index.js +1 -0
  31. package/build/group/index.js.map +1 -1
  32. package/build/heading/edit.js +14 -2
  33. package/build/heading/edit.js.map +1 -1
  34. package/build/image/deprecated.js +89 -5
  35. package/build/image/deprecated.js.map +1 -1
  36. package/build/image/save.js +0 -7
  37. package/build/image/save.js.map +1 -1
  38. package/build/latest-posts/edit.js +1 -0
  39. package/build/latest-posts/edit.js.map +1 -1
  40. package/build/navigation/edit/index.js +17 -15
  41. package/build/navigation/edit/index.js.map +1 -1
  42. package/build/navigation/edit/navigation-menu-selector.js +44 -27
  43. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  44. package/build/navigation/edit/placeholder/index.js +8 -22
  45. package/build/navigation/edit/placeholder/index.js.map +1 -1
  46. package/build/navigation/use-navigation-menu.js +6 -6
  47. package/build/navigation/use-navigation-menu.js.map +1 -1
  48. package/build/navigation-submenu/edit.js +41 -9
  49. package/build/navigation-submenu/edit.js.map +1 -1
  50. package/build/page-list/edit.js +11 -17
  51. package/build/page-list/edit.js.map +1 -1
  52. package/build/social-links/deprecated.js +1 -62
  53. package/build/social-links/deprecated.js.map +1 -1
  54. package/build/template-part/edit/index.js +36 -64
  55. package/build/template-part/edit/index.js.map +1 -1
  56. package/build/template-part/edit/placeholder.js +64 -0
  57. package/build/template-part/edit/placeholder.js.map +1 -0
  58. package/build/template-part/edit/selection-modal.js +103 -0
  59. package/build/template-part/edit/selection-modal.js.map +1 -0
  60. package/build/template-part/edit/title-modal.js +54 -0
  61. package/build/template-part/edit/title-modal.js.map +1 -0
  62. package/build/template-part/edit/utils/hooks.js +156 -0
  63. package/build/template-part/edit/utils/hooks.js.map +1 -0
  64. package/build/template-part/index.js +3 -1
  65. package/build/template-part/index.js.map +1 -1
  66. package/build-module/button/edit.native.js +4 -4
  67. package/build-module/button/edit.native.js.map +1 -1
  68. package/build-module/columns/index.js +12 -0
  69. package/build-module/columns/index.js.map +1 -1
  70. package/build-module/comment-author-avatar/edit.js +18 -6
  71. package/build-module/comment-author-avatar/edit.js.map +1 -1
  72. package/build-module/comment-template/edit.js +95 -37
  73. package/build-module/comment-template/edit.js.map +1 -1
  74. package/build-module/comment-template/hooks.js +156 -0
  75. package/build-module/comment-template/hooks.js.map +1 -0
  76. package/build-module/comment-template/index.js +1 -1
  77. package/build-module/comment-template/util.js.map +1 -1
  78. package/build-module/comments-pagination-next/index.js +1 -1
  79. package/build-module/comments-pagination-numbers/index.js +1 -1
  80. package/build-module/comments-query-loop/edit/comments-inspector-controls.js +20 -9
  81. package/build-module/comments-query-loop/edit/comments-inspector-controls.js.map +1 -1
  82. package/build-module/comments-query-loop/edit.js +2 -19
  83. package/build-module/comments-query-loop/edit.js.map +1 -1
  84. package/build-module/comments-query-loop/index.js +5 -0
  85. package/build-module/comments-query-loop/index.js.map +1 -1
  86. package/build-module/cover/edit.js +23 -24
  87. package/build-module/cover/edit.js.map +1 -1
  88. package/build-module/cover/edit.native.js +10 -8
  89. package/build-module/cover/edit.native.js.map +1 -1
  90. package/build-module/cover/overlay-color-settings.native.js +4 -4
  91. package/build-module/cover/overlay-color-settings.native.js.map +1 -1
  92. package/build-module/cover/transforms.js +4 -2
  93. package/build-module/cover/transforms.js.map +1 -1
  94. package/build-module/group/index.js +1 -0
  95. package/build-module/group/index.js.map +1 -1
  96. package/build-module/heading/edit.js +15 -3
  97. package/build-module/heading/edit.js.map +1 -1
  98. package/build-module/image/deprecated.js +90 -7
  99. package/build-module/image/deprecated.js.map +1 -1
  100. package/build-module/image/save.js +0 -7
  101. package/build-module/image/save.js.map +1 -1
  102. package/build-module/latest-posts/edit.js +1 -0
  103. package/build-module/latest-posts/edit.js.map +1 -1
  104. package/build-module/navigation/edit/index.js +17 -15
  105. package/build-module/navigation/edit/index.js.map +1 -1
  106. package/build-module/navigation/edit/navigation-menu-selector.js +45 -27
  107. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  108. package/build-module/navigation/edit/placeholder/index.js +8 -21
  109. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  110. package/build-module/navigation/use-navigation-menu.js +6 -6
  111. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  112. package/build-module/navigation-submenu/edit.js +41 -10
  113. package/build-module/navigation-submenu/edit.js.map +1 -1
  114. package/build-module/page-list/edit.js +12 -18
  115. package/build-module/page-list/edit.js.map +1 -1
  116. package/build-module/social-links/deprecated.js +1 -62
  117. package/build-module/social-links/deprecated.js.map +1 -1
  118. package/build-module/template-part/edit/index.js +37 -65
  119. package/build-module/template-part/edit/index.js.map +1 -1
  120. package/build-module/template-part/edit/placeholder.js +52 -0
  121. package/build-module/template-part/edit/placeholder.js.map +1 -0
  122. package/build-module/template-part/edit/selection-modal.js +89 -0
  123. package/build-module/template-part/edit/selection-modal.js.map +1 -0
  124. package/build-module/template-part/edit/title-modal.js +46 -0
  125. package/build-module/template-part/edit/title-modal.js.map +1 -0
  126. package/build-module/template-part/edit/utils/hooks.js +135 -0
  127. package/build-module/template-part/edit/utils/hooks.js.map +1 -0
  128. package/build-module/template-part/index.js +2 -1
  129. package/build-module/template-part/index.js.map +1 -1
  130. package/build-style/comment-author-avatar/editor-rtl.css +83 -0
  131. package/build-style/comment-author-avatar/editor.css +83 -0
  132. package/build-style/cover/style-rtl.css +4 -0
  133. package/build-style/cover/style.css +4 -0
  134. package/build-style/editor-rtl.css +27 -81
  135. package/build-style/editor.css +27 -81
  136. package/build-style/image/editor-rtl.css +0 -16
  137. package/build-style/image/editor.css +0 -16
  138. package/build-style/image/style-rtl.css +2 -0
  139. package/build-style/image/style.css +2 -0
  140. package/build-style/navigation/style-rtl.css +14 -3
  141. package/build-style/navigation/style.css +14 -3
  142. package/build-style/page-list/editor-rtl.css +0 -9
  143. package/build-style/page-list/editor.css +0 -9
  144. package/build-style/style-rtl.css +20 -3
  145. package/build-style/style.css +20 -3
  146. package/build-style/template-part/editor-rtl.css +19 -56
  147. package/build-style/template-part/editor.css +19 -56
  148. package/package.json +15 -15
  149. package/src/archives/index.php +1 -1
  150. package/src/button/edit.native.js +3 -3
  151. package/src/columns/block.json +12 -0
  152. package/src/comment-author-avatar/edit.js +13 -8
  153. package/src/comment-author-avatar/editor.scss +7 -0
  154. package/src/comment-template/block.json +7 -1
  155. package/src/comment-template/edit.js +102 -40
  156. package/src/comment-template/hooks.js +151 -0
  157. package/src/comment-template/index.php +8 -0
  158. package/src/comment-template/util.js +1 -0
  159. package/src/comments-pagination-next/block.json +8 -1
  160. package/src/comments-pagination-next/index.php +6 -8
  161. package/src/comments-pagination-numbers/block.json +7 -1
  162. package/src/comments-pagination-numbers/index.php +3 -10
  163. package/src/comments-query-loop/block.json +5 -0
  164. package/src/comments-query-loop/edit/comments-inspector-controls.js +22 -4
  165. package/src/comments-query-loop/edit.js +1 -16
  166. package/src/cover/edit.js +15 -28
  167. package/src/cover/edit.native.js +15 -7
  168. package/src/cover/overlay-color-settings.native.js +3 -4
  169. package/src/cover/style.scss +4 -0
  170. package/src/cover/transforms.js +2 -0
  171. package/src/editor.scss +1 -0
  172. package/src/gallery/index.php +1 -8
  173. package/src/group/block.json +1 -0
  174. package/src/heading/edit.js +18 -5
  175. package/src/home-link/index.php +1 -19
  176. package/src/image/deprecated.js +105 -1
  177. package/src/image/editor.scss +0 -18
  178. package/src/image/save.js +0 -8
  179. package/src/image/style.scss +3 -0
  180. package/src/image/test/edit.native.js +0 -10
  181. package/src/latest-posts/edit.js +1 -0
  182. package/src/latest-posts/index.php +1 -1
  183. package/src/navigation/edit/index.js +25 -26
  184. package/src/navigation/edit/navigation-menu-selector.js +73 -28
  185. package/src/navigation/edit/placeholder/index.js +8 -32
  186. package/src/navigation/index.php +4 -4
  187. package/src/navigation/style.scss +22 -3
  188. package/src/navigation/use-navigation-menu.js +6 -6
  189. package/src/navigation-link/index.php +3 -22
  190. package/src/navigation-submenu/edit.js +50 -12
  191. package/src/navigation-submenu/index.php +3 -21
  192. package/src/page-list/edit.js +21 -25
  193. package/src/page-list/editor.scss +0 -10
  194. package/src/page-list/index.php +4 -4
  195. package/src/post-navigation-link/index.php +3 -3
  196. package/src/search/index.php +6 -3
  197. package/src/site-logo/index.php +1 -1
  198. package/src/social-links/deprecated.js +0 -59
  199. package/src/template-part/edit/index.js +61 -71
  200. package/src/template-part/edit/placeholder.js +78 -0
  201. package/src/template-part/edit/selection-modal.js +115 -0
  202. package/src/template-part/edit/title-modal.js +59 -0
  203. package/src/template-part/edit/utils/hooks.js +158 -0
  204. package/src/template-part/editor.scss +16 -74
  205. package/src/template-part/index.js +4 -1
  206. package/build/navigation/edit/existing-menus-options.js +0 -62
  207. package/build/navigation/edit/existing-menus-options.js.map +0 -1
  208. package/build/template-part/edit/placeholder/index.js +0 -141
  209. package/build/template-part/edit/placeholder/index.js.map +0 -1
  210. package/build/template-part/edit/placeholder/patterns-setup.js +0 -100
  211. package/build/template-part/edit/placeholder/patterns-setup.js.map +0 -1
  212. package/build/template-part/edit/selection/index.js +0 -45
  213. package/build/template-part/edit/selection/index.js.map +0 -1
  214. package/build/template-part/edit/selection/template-part-previews.js +0 -317
  215. package/build/template-part/edit/selection/template-part-previews.js.map +0 -1
  216. package/build-module/navigation/edit/existing-menus-options.js +0 -53
  217. package/build-module/navigation/edit/existing-menus-options.js.map +0 -1
  218. package/build-module/template-part/edit/placeholder/index.js +0 -124
  219. package/build-module/template-part/edit/placeholder/index.js.map +0 -1
  220. package/build-module/template-part/edit/placeholder/patterns-setup.js +0 -91
  221. package/build-module/template-part/edit/placeholder/patterns-setup.js.map +0 -1
  222. package/build-module/template-part/edit/selection/index.js +0 -35
  223. package/build-module/template-part/edit/selection/index.js.map +0 -1
  224. package/build-module/template-part/edit/selection/template-part-previews.js +0 -298
  225. package/build-module/template-part/edit/selection/template-part-previews.js.map +0 -1
  226. package/src/navigation/edit/existing-menus-options.js +0 -70
  227. package/src/template-part/edit/placeholder/index.js +0 -172
  228. package/src/template-part/edit/placeholder/patterns-setup.js +0 -124
  229. package/src/template-part/edit/selection/index.js +0 -37
  230. package/src/template-part/edit/selection/template-part-previews.js +0 -372
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/block-library/src/template-part/index.js"],"names":["startCase","store","coreDataStore","select","symbolFilled","addFilter","edit","enhanceTemplatePartVariations","name","metadata","settings","icon","__experimentalLabel","slug","theme","entity","getEntityRecord","title","rendered","DISALLOWED_PARENTS","can","blockType","rootClientId","getBlock","getBlockParentsByBlockName","disallowedParentType","hasDisallowedParent","length"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,SAAT,QAA0B,kBAA1B;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,SAASC,6BAAT,QAA8C,cAA9C;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAEP,YADiB;AAEvBQ,EAAAA,mBAAmB,EAAE,QAAuB;AAAA;;AAAA,QAArB;AAAEC,MAAAA,IAAF;AAAQC,MAAAA;AAAR,KAAqB;;AAC3C;AACA;AACA,QAAK,CAAED,IAAP,EAAc;AACb;AACA;;AAED,UAAME,MAAM,GAAGZ,MAAM,CAAED,aAAF,CAAN,CAAwBc,eAAxB,CACd,UADc,EAEd,kBAFc,EAGdF,KAAK,GAAG,IAAR,GAAeD,IAHD,CAAf;;AAKA,QAAK,CAAEE,MAAP,EAAgB;AACf;AACA;;AAED,WAAOf,SAAS,CAAE,kBAAAe,MAAM,CAACE,KAAP,gEAAcC,QAAd,KAA0BH,MAAM,CAACF,IAAnC,CAAhB;AACA,GAnBsB;AAoBvBP,EAAAA;AApBuB,CAAjB,C,CAuBP;;AACAD,SAAS,CACR,0BADQ,EAER,oBAFQ,EAGRE,6BAHQ,CAAT,C,CAMA;;AACA,MAAMY,kBAAkB,GAAG,CAAE,oBAAF,EAAwB,mBAAxB,CAA3B;AACAd,SAAS,CACR,0CADQ,EAER,sCAFQ,EAGR,CACCe,GADD,EAECC,SAFD,EAGCC,YAHD,YAKK;AAAA,MADJ;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GACI;;AACJ,MAAKH,SAAS,CAACb,IAAV,KAAmB,oBAAxB,EAA+C;AAC9C,WAAOY,GAAP;AACA;;AAED,OAAM,MAAMK,oBAAZ,IAAoCN,kBAApC,EAAyD;AAAA;;AACxD,UAAMO,mBAAmB,GACxB,cAAAH,QAAQ,CAAED,YAAF,CAAR,wDAA0Bd,IAA1B,MAAmCiB,oBAAnC,IACAD,0BAA0B,CAAEF,YAAF,EAAgBG,oBAAhB,CAA1B,CACEE,MAHH;;AAIA,QAAKD,mBAAL,EAA2B;AAC1B,aAAO,KAAP;AACA;AACD;;AACD,SAAO,IAAP;AACA,CAvBO,CAAT","sourcesContent":["/**\n * External dependencies\n */\nimport { startCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { select } from '@wordpress/data';\nimport { symbolFilled } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport { enhanceTemplatePartVariations } from './variations';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: symbolFilled,\n\t__experimentalLabel: ( { slug, theme } ) => {\n\t\t// Attempt to find entity title if block is a template part.\n\t\t// Require slug to request, otherwise entity is uncreated and will throw 404.\n\t\tif ( ! slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst entity = select( coreDataStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\ttheme + '//' + slug\n\t\t);\n\t\tif ( ! entity ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn startCase( entity.title?.rendered || entity.slug );\n\t},\n\tedit,\n};\n\n// Importing this file includes side effects. This is whitelisted in block-library/package.json under sideEffects\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/template-part',\n\tenhanceTemplatePartVariations\n);\n\n// Prevent adding template parts inside post templates.\nconst DISALLOWED_PARENTS = [ 'core/post-template', 'core/post-content' ];\naddFilter(\n\t'blockEditor.__unstableCanInsertBlockType',\n\t'removeTemplatePartsFromPostTemplates',\n\t(\n\t\tcan,\n\t\tblockType,\n\t\trootClientId,\n\t\t{ getBlock, getBlockParentsByBlockName }\n\t) => {\n\t\tif ( blockType.name !== 'core/template-part' ) {\n\t\t\treturn can;\n\t\t}\n\n\t\tfor ( const disallowedParentType of DISALLOWED_PARENTS ) {\n\t\t\tconst hasDisallowedParent =\n\t\t\t\tgetBlock( rootClientId )?.name === disallowedParentType ||\n\t\t\t\tgetBlockParentsByBlockName( rootClientId, disallowedParentType )\n\t\t\t\t\t.length;\n\t\t\tif ( hasDisallowedParent ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/block-library/src/template-part/index.js"],"names":["startCase","store","coreDataStore","select","symbolFilled","addFilter","decodeEntities","edit","enhanceTemplatePartVariations","name","metadata","settings","icon","__experimentalLabel","slug","theme","entity","getEntityRecord","title","rendered","DISALLOWED_PARENTS","can","blockType","rootClientId","getBlock","getBlockParentsByBlockName","disallowedParentType","hasDisallowedParent","length"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,QAA1B;AAEA;AACA;AACA;;AACA,SAASC,KAAK,IAAIC,aAAlB,QAAuC,sBAAvC;AACA,SAASC,MAAT,QAAuB,iBAAvB;AACA,SAASC,YAAT,QAA6B,kBAA7B;AACA,SAASC,SAAT,QAA0B,kBAA1B;AACA,SAASC,cAAT,QAA+B,0BAA/B;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAOC,IAAP,MAAiB,QAAjB;AACA,SAASC,6BAAT,QAA8C,cAA9C;AAEA,MAAM;AAAEC,EAAAA;AAAF,IAAWC,QAAjB;AACA,SAASA,QAAT,EAAmBD,IAAnB;AAEA,OAAO,MAAME,QAAQ,GAAG;AACvBC,EAAAA,IAAI,EAAER,YADiB;AAEvBS,EAAAA,mBAAmB,EAAE,QAAuB;AAAA;;AAAA,QAArB;AAAEC,MAAAA,IAAF;AAAQC,MAAAA;AAAR,KAAqB;;AAC3C;AACA;AACA,QAAK,CAAED,IAAP,EAAc;AACb;AACA;;AAED,UAAME,MAAM,GAAGb,MAAM,CAAED,aAAF,CAAN,CAAwBe,eAAxB,CACd,UADc,EAEd,kBAFc,EAGdF,KAAK,GAAG,IAAR,GAAeD,IAHD,CAAf;;AAKA,QAAK,CAAEE,MAAP,EAAgB;AACf;AACA;;AAED,WACCV,cAAc,kBAAEU,MAAM,CAACE,KAAT,kDAAE,cAAcC,QAAhB,CAAd,IAA4CnB,SAAS,CAAEgB,MAAM,CAACF,IAAT,CADtD;AAGA,GArBsB;AAsBvBP,EAAAA;AAtBuB,CAAjB,C,CAyBP;;AACAF,SAAS,CACR,0BADQ,EAER,oBAFQ,EAGRG,6BAHQ,CAAT,C,CAMA;;AACA,MAAMY,kBAAkB,GAAG,CAAE,oBAAF,EAAwB,mBAAxB,CAA3B;AACAf,SAAS,CACR,0CADQ,EAER,sCAFQ,EAGR,CACCgB,GADD,EAECC,SAFD,EAGCC,YAHD,YAKK;AAAA,MADJ;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GACI;;AACJ,MAAKH,SAAS,CAACb,IAAV,KAAmB,oBAAxB,EAA+C;AAC9C,WAAOY,GAAP;AACA;;AAED,OAAM,MAAMK,oBAAZ,IAAoCN,kBAApC,EAAyD;AAAA;;AACxD,UAAMO,mBAAmB,GACxB,cAAAH,QAAQ,CAAED,YAAF,CAAR,wDAA0Bd,IAA1B,MAAmCiB,oBAAnC,IACAD,0BAA0B,CAAEF,YAAF,EAAgBG,oBAAhB,CAA1B,CACEE,MAHH;;AAIA,QAAKD,mBAAL,EAA2B;AAC1B,aAAO,KAAP;AACA;AACD;;AACD,SAAO,IAAP;AACA,CAvBO,CAAT","sourcesContent":["/**\n * External dependencies\n */\nimport { startCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { select } from '@wordpress/data';\nimport { symbolFilled } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport metadata from './block.json';\nimport edit from './edit';\nimport { enhanceTemplatePartVariations } from './variations';\n\nconst { name } = metadata;\nexport { metadata, name };\n\nexport const settings = {\n\ticon: symbolFilled,\n\t__experimentalLabel: ( { slug, theme } ) => {\n\t\t// Attempt to find entity title if block is a template part.\n\t\t// Require slug to request, otherwise entity is uncreated and will throw 404.\n\t\tif ( ! slug ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst entity = select( coreDataStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template_part',\n\t\t\ttheme + '//' + slug\n\t\t);\n\t\tif ( ! entity ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\tdecodeEntities( entity.title?.rendered ) || startCase( entity.slug )\n\t\t);\n\t},\n\tedit,\n};\n\n// Importing this file includes side effects. This is whitelisted in block-library/package.json under sideEffects\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/template-part',\n\tenhanceTemplatePartVariations\n);\n\n// Prevent adding template parts inside post templates.\nconst DISALLOWED_PARENTS = [ 'core/post-template', 'core/post-content' ];\naddFilter(\n\t'blockEditor.__unstableCanInsertBlockType',\n\t'removeTemplatePartsFromPostTemplates',\n\t(\n\t\tcan,\n\t\tblockType,\n\t\trootClientId,\n\t\t{ getBlock, getBlockParentsByBlockName }\n\t) => {\n\t\tif ( blockType.name !== 'core/template-part' ) {\n\t\t\treturn can;\n\t\t}\n\n\t\tfor ( const disallowedParentType of DISALLOWED_PARENTS ) {\n\t\t\tconst hasDisallowedParent =\n\t\t\t\tgetBlock( rootClientId )?.name === disallowedParentType ||\n\t\t\t\tgetBlockParentsByBlockName( rootClientId, disallowedParentType )\n\t\t\t\t\t.length;\n\t\t\tif ( hasDisallowedParent ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n);\n"]}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Colors
3
+ */
4
+ /**
5
+ * Breakpoints & Media Queries
6
+ */
7
+ /**
8
+ * SCSS Variables.
9
+ *
10
+ * Please use variables from this sheet to ensure consistency across the UI.
11
+ * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
+ * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
+ */
14
+ /**
15
+ * Colors
16
+ */
17
+ /**
18
+ * Fonts & basic variables.
19
+ */
20
+ /**
21
+ * Grid System.
22
+ * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
23
+ */
24
+ /**
25
+ * Dimensions.
26
+ */
27
+ /**
28
+ * Shadows.
29
+ */
30
+ /**
31
+ * Editor widths.
32
+ */
33
+ /**
34
+ * Block & Editor UI.
35
+ */
36
+ /**
37
+ * Block paddings.
38
+ */
39
+ /**
40
+ * React Native specific.
41
+ * These variables do not appear to be used anywhere else.
42
+ */
43
+ /**
44
+ * Converts a hex value into the rgb equivalent.
45
+ *
46
+ * @param {string} hex - the hexadecimal value to convert
47
+ * @return {string} comma separated rgb values
48
+ */
49
+ /**
50
+ * Breakpoint mixins
51
+ */
52
+ /**
53
+ * Long content fade mixin
54
+ *
55
+ * Creates a fading overlay to signify that the content is longer
56
+ * than the space allows.
57
+ */
58
+ /**
59
+ * Focus styles.
60
+ */
61
+ /**
62
+ * Applies editor left position to the selector passed as argument
63
+ */
64
+ /**
65
+ * Styles that are reused verbatim in a few places
66
+ */
67
+ /**
68
+ * Allows users to opt-out of animations via OS-level preferences.
69
+ */
70
+ /**
71
+ * Reset default styles for JavaScript UI based pages.
72
+ * This is a WP-admin agnostic reset
73
+ */
74
+ /**
75
+ * Reset the WP Admin page styles for Gutenberg-like pages.
76
+ */
77
+ .wp-block-comment-author-avatar__placeholder {
78
+ border: currentColor 1px dashed;
79
+ width: 100%;
80
+ height: 100%;
81
+ stroke: currentColor;
82
+ stroke-dasharray: 3;
83
+ }
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Colors
3
+ */
4
+ /**
5
+ * Breakpoints & Media Queries
6
+ */
7
+ /**
8
+ * SCSS Variables.
9
+ *
10
+ * Please use variables from this sheet to ensure consistency across the UI.
11
+ * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
12
+ * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
13
+ */
14
+ /**
15
+ * Colors
16
+ */
17
+ /**
18
+ * Fonts & basic variables.
19
+ */
20
+ /**
21
+ * Grid System.
22
+ * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
23
+ */
24
+ /**
25
+ * Dimensions.
26
+ */
27
+ /**
28
+ * Shadows.
29
+ */
30
+ /**
31
+ * Editor widths.
32
+ */
33
+ /**
34
+ * Block & Editor UI.
35
+ */
36
+ /**
37
+ * Block paddings.
38
+ */
39
+ /**
40
+ * React Native specific.
41
+ * These variables do not appear to be used anywhere else.
42
+ */
43
+ /**
44
+ * Converts a hex value into the rgb equivalent.
45
+ *
46
+ * @param {string} hex - the hexadecimal value to convert
47
+ * @return {string} comma separated rgb values
48
+ */
49
+ /**
50
+ * Breakpoint mixins
51
+ */
52
+ /**
53
+ * Long content fade mixin
54
+ *
55
+ * Creates a fading overlay to signify that the content is longer
56
+ * than the space allows.
57
+ */
58
+ /**
59
+ * Focus styles.
60
+ */
61
+ /**
62
+ * Applies editor left position to the selector passed as argument
63
+ */
64
+ /**
65
+ * Styles that are reused verbatim in a few places
66
+ */
67
+ /**
68
+ * Allows users to opt-out of animations via OS-level preferences.
69
+ */
70
+ /**
71
+ * Reset default styles for JavaScript UI based pages.
72
+ * This is a WP-admin agnostic reset
73
+ */
74
+ /**
75
+ * Reset the WP Admin page styles for Gutenberg-like pages.
76
+ */
77
+ .wp-block-comment-author-avatar__placeholder {
78
+ border: currentColor 1px dashed;
79
+ width: 100%;
80
+ height: 100%;
81
+ stroke: currentColor;
82
+ stroke-dasharray: 3;
83
+ }
@@ -124,6 +124,10 @@
124
124
  .wp-block-cover .has-background-dim:not([class*=-background-color]) {
125
125
  background-color: #000;
126
126
  }
127
+ .wp-block-cover-image .has-background-dim.has-background-gradient,
128
+ .wp-block-cover .has-background-dim.has-background-gradient {
129
+ background-color: transparent;
130
+ }
127
131
  .wp-block-cover-image.has-background-dim::before,
128
132
  .wp-block-cover-image .has-background-dim::before,
129
133
  .wp-block-cover.has-background-dim::before,
@@ -124,6 +124,10 @@
124
124
  .wp-block-cover .has-background-dim:not([class*=-background-color]) {
125
125
  background-color: #000;
126
126
  }
127
+ .wp-block-cover-image .has-background-dim.has-background-gradient,
128
+ .wp-block-cover .has-background-dim.has-background-gradient {
129
+ background-color: transparent;
130
+ }
127
131
  .wp-block-cover-image.has-background-dim::before,
128
132
  .wp-block-cover-image .has-background-dim::before,
129
133
  .wp-block-cover.has-background-dim::before,
@@ -235,6 +235,14 @@ html :where(.wp-block-column) {
235
235
  margin-bottom: 0;
236
236
  }
237
237
 
238
+ .wp-block-comment-author-avatar__placeholder {
239
+ border: currentColor 1px dashed;
240
+ width: 100%;
241
+ height: 100%;
242
+ stroke: currentColor;
243
+ stroke-dasharray: 3;
244
+ }
245
+
238
246
  .block-library-comments-toolbar__popover .components-popover__content {
239
247
  min-width: 230px;
240
248
  }
@@ -1022,22 +1030,6 @@ figure.wp-block-image:not(.wp-block) {
1022
1030
  caption-side: bottom;
1023
1031
  }
1024
1032
 
1025
- *:not([data-align]) > .wp-block-image {
1026
- display: grid;
1027
- grid-template-columns: [image] minmax(0, max-content) [placeholder] auto;
1028
- }
1029
- *:not([data-align]) > .wp-block-image .components-placeholder {
1030
- grid-column: placeholder;
1031
- }
1032
- *:not([data-align]) > .wp-block-image > div:not(.components-placeholder) {
1033
- grid-column: image;
1034
- }
1035
- *:not([data-align]) > .wp-block-image > figcaption {
1036
- grid-column: image;
1037
- display: table-caption;
1038
- caption-side: bottom;
1039
- }
1040
-
1041
1033
  .wp-block[data-align=left] > .wp-block-image {
1042
1034
  margin-left: 1em;
1043
1035
  margin-right: 0;
@@ -1812,15 +1804,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
1812
1804
  pointer-events: none;
1813
1805
  }
1814
1806
 
1815
- .wp-block-page-list .components-placeholder {
1816
- min-height: 0;
1817
- padding: 0;
1818
- background-color: inherit;
1819
- }
1820
- .wp-block-page-list .components-placeholder .components-spinner {
1821
- margin: 0.5em;
1822
- }
1823
-
1824
1807
  @media (min-width: 600px) {
1825
1808
  .wp-block-page-list-modal {
1826
1809
  max-width: 480px;
@@ -2327,67 +2310,30 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2327
2310
  margin-bottom: 0;
2328
2311
  }
2329
2312
 
2330
- .wp-block-template-part__placeholder-preview-dropdown-content .components-popover__content,
2331
- .wp-block-template-part__preview-dropdown-content .components-popover__content {
2332
- min-width: 320px;
2333
- padding: 0;
2334
- }
2335
-
2336
- .wp-block-template-part__selection-preview-search-form {
2337
- border-bottom: 1px solid #ddd;
2338
- }
2339
-
2340
- .wp-block-template-part__selection-preview-container {
2341
- background: #fff;
2342
- padding-bottom: 16px;
2343
- }
2344
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item {
2345
- border-radius: 2px;
2346
- cursor: pointer;
2347
- margin-top: 16px;
2348
- transition: all 0.05s ease-in-out;
2349
- border: 1px solid #ddd;
2350
- width: 100%;
2351
- background-color: #fff;
2352
- }
2353
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item:hover {
2354
- border: 1px solid var(--wp-admin-theme-color);
2355
- }
2356
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item:focus {
2357
- box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2358
- outline: 2px solid transparent;
2359
- }
2360
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item.is-placeholder {
2361
- min-height: 100px;
2362
- }
2363
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item .block-editor-block-preview__container {
2364
- border-bottom: 1px solid #ddd;
2365
- }
2366
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item-title {
2367
- padding: 4px;
2368
- font-size: 12px;
2369
- text-align: right;
2370
- }
2371
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-panel-group-header {
2372
- padding: 16px 16px 0;
2313
+ @media (min-width: 600px) {
2314
+ .block-editor-template-part__selection-modal {
2315
+ width: calc(100% - 32px);
2316
+ height: calc(100% - 120px);
2317
+ }
2373
2318
  }
2374
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-panel-group-content {
2375
- padding: 0 16px;
2319
+ @media (min-width: 782px) {
2320
+ .block-editor-template-part__selection-modal {
2321
+ width: 750px;
2322
+ }
2376
2323
  }
2377
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-panel-group-title {
2378
- color: var(--wp-admin-theme-color);
2379
- text-transform: uppercase;
2380
- font-size: 11px;
2381
- font-weight: 500;
2324
+ @media (min-width: 960px) {
2325
+ .block-editor-template-part__selection-modal {
2326
+ height: 70%;
2327
+ }
2382
2328
  }
2383
2329
 
2384
- .wp-block-template-part__placeholder-create-new__title-form .wp-block-template-part__placeholder-create-new__title-form-actions {
2385
- padding-top: 12px;
2386
- display: flex;
2387
- justify-content: flex-end;
2330
+ .block-library-template-part__selection-content .block-editor-block-patterns-list {
2331
+ display: grid;
2332
+ grid-template-columns: 1fr 1fr;
2333
+ grid-gap: 8px;
2388
2334
  }
2389
- .wp-block-template-part__placeholder-create-new__title-form .wp-block-template-part__placeholder-create-new__title-form-actions .components-flex-item {
2390
- margin-right: 12px;
2335
+ .block-library-template-part__selection-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item {
2336
+ margin-bottom: 0;
2391
2337
  }
2392
2338
 
2393
2339
  .wp-block-text-columns .block-editor-rich-text__editable:focus {
@@ -236,6 +236,14 @@ html :where(.wp-block-column) {
236
236
  margin-bottom: 0;
237
237
  }
238
238
 
239
+ .wp-block-comment-author-avatar__placeholder {
240
+ border: currentColor 1px dashed;
241
+ width: 100%;
242
+ height: 100%;
243
+ stroke: currentColor;
244
+ stroke-dasharray: 3;
245
+ }
246
+
239
247
  .block-library-comments-toolbar__popover .components-popover__content {
240
248
  min-width: 230px;
241
249
  }
@@ -1030,22 +1038,6 @@ figure.wp-block-image:not(.wp-block) {
1030
1038
  caption-side: bottom;
1031
1039
  }
1032
1040
 
1033
- *:not([data-align]) > .wp-block-image {
1034
- display: grid;
1035
- grid-template-columns: [image] minmax(0, max-content) [placeholder] auto;
1036
- }
1037
- *:not([data-align]) > .wp-block-image .components-placeholder {
1038
- grid-column: placeholder;
1039
- }
1040
- *:not([data-align]) > .wp-block-image > div:not(.components-placeholder) {
1041
- grid-column: image;
1042
- }
1043
- *:not([data-align]) > .wp-block-image > figcaption {
1044
- grid-column: image;
1045
- display: table-caption;
1046
- caption-side: bottom;
1047
- }
1048
-
1049
1041
  .wp-block[data-align=left] > .wp-block-image {
1050
1042
  margin-right: 1em;
1051
1043
  margin-left: 0;
@@ -1820,15 +1812,6 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
1820
1812
  pointer-events: none;
1821
1813
  }
1822
1814
 
1823
- .wp-block-page-list .components-placeholder {
1824
- min-height: 0;
1825
- padding: 0;
1826
- background-color: inherit;
1827
- }
1828
- .wp-block-page-list .components-placeholder .components-spinner {
1829
- margin: 0.5em;
1830
- }
1831
-
1832
1815
  @media (min-width: 600px) {
1833
1816
  .wp-block-page-list-modal {
1834
1817
  max-width: 480px;
@@ -2335,67 +2318,30 @@ body.editor-styles-wrapper .wp-block-navigation__responsive-container.is-menu-op
2335
2318
  margin-bottom: 0;
2336
2319
  }
2337
2320
 
2338
- .wp-block-template-part__placeholder-preview-dropdown-content .components-popover__content,
2339
- .wp-block-template-part__preview-dropdown-content .components-popover__content {
2340
- min-width: 320px;
2341
- padding: 0;
2342
- }
2343
-
2344
- .wp-block-template-part__selection-preview-search-form {
2345
- border-bottom: 1px solid #ddd;
2346
- }
2347
-
2348
- .wp-block-template-part__selection-preview-container {
2349
- background: #fff;
2350
- padding-bottom: 16px;
2351
- }
2352
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item {
2353
- border-radius: 2px;
2354
- cursor: pointer;
2355
- margin-top: 16px;
2356
- transition: all 0.05s ease-in-out;
2357
- border: 1px solid #ddd;
2358
- width: 100%;
2359
- background-color: #fff;
2360
- }
2361
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item:hover {
2362
- border: 1px solid var(--wp-admin-theme-color);
2363
- }
2364
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item:focus {
2365
- box-shadow: inset 0 0 0 1px #fff, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
2366
- outline: 2px solid transparent;
2367
- }
2368
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item.is-placeholder {
2369
- min-height: 100px;
2370
- }
2371
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item .block-editor-block-preview__container {
2372
- border-bottom: 1px solid #ddd;
2373
- }
2374
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-preview-item-title {
2375
- padding: 4px;
2376
- font-size: 12px;
2377
- text-align: left;
2378
- }
2379
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-panel-group-header {
2380
- padding: 16px 16px 0;
2321
+ @media (min-width: 600px) {
2322
+ .block-editor-template-part__selection-modal {
2323
+ width: calc(100% - 32px);
2324
+ height: calc(100% - 120px);
2325
+ }
2381
2326
  }
2382
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-panel-group-content {
2383
- padding: 0 16px;
2327
+ @media (min-width: 782px) {
2328
+ .block-editor-template-part__selection-modal {
2329
+ width: 750px;
2330
+ }
2384
2331
  }
2385
- .wp-block-template-part__selection-preview-container .wp-block-template-part__selection-panel-group-title {
2386
- color: var(--wp-admin-theme-color);
2387
- text-transform: uppercase;
2388
- font-size: 11px;
2389
- font-weight: 500;
2332
+ @media (min-width: 960px) {
2333
+ .block-editor-template-part__selection-modal {
2334
+ height: 70%;
2335
+ }
2390
2336
  }
2391
2337
 
2392
- .wp-block-template-part__placeholder-create-new__title-form .wp-block-template-part__placeholder-create-new__title-form-actions {
2393
- padding-top: 12px;
2394
- display: flex;
2395
- justify-content: flex-end;
2338
+ .block-library-template-part__selection-content .block-editor-block-patterns-list {
2339
+ display: grid;
2340
+ grid-template-columns: 1fr 1fr;
2341
+ grid-gap: 8px;
2396
2342
  }
2397
- .wp-block-template-part__placeholder-create-new__title-form .wp-block-template-part__placeholder-create-new__title-form-actions .components-flex-item {
2398
- margin-left: 12px;
2343
+ .block-library-template-part__selection-content .block-editor-block-patterns-list .block-editor-block-patterns-list__list-item {
2344
+ margin-bottom: 0;
2399
2345
  }
2400
2346
 
2401
2347
  .wp-block-text-columns .block-editor-rich-text__editable:focus {
@@ -137,22 +137,6 @@ figure.wp-block-image:not(.wp-block) {
137
137
  caption-side: bottom;
138
138
  }
139
139
 
140
- *:not([data-align]) > .wp-block-image {
141
- display: grid;
142
- grid-template-columns: [image] minmax(0, max-content) [placeholder] auto;
143
- }
144
- *:not([data-align]) > .wp-block-image .components-placeholder {
145
- grid-column: placeholder;
146
- }
147
- *:not([data-align]) > .wp-block-image > div:not(.components-placeholder) {
148
- grid-column: image;
149
- }
150
- *:not([data-align]) > .wp-block-image > figcaption {
151
- grid-column: image;
152
- display: table-caption;
153
- caption-side: bottom;
154
- }
155
-
156
140
  .wp-block[data-align=left] > .wp-block-image {
157
141
  margin-left: 1em;
158
142
  margin-right: 0;
@@ -137,22 +137,6 @@ figure.wp-block-image:not(.wp-block) {
137
137
  caption-side: bottom;
138
138
  }
139
139
 
140
- *:not([data-align]) > .wp-block-image {
141
- display: grid;
142
- grid-template-columns: [image] minmax(0, max-content) [placeholder] auto;
143
- }
144
- *:not([data-align]) > .wp-block-image .components-placeholder {
145
- grid-column: placeholder;
146
- }
147
- *:not([data-align]) > .wp-block-image > div:not(.components-placeholder) {
148
- grid-column: image;
149
- }
150
- *:not([data-align]) > .wp-block-image > figcaption {
151
- grid-column: image;
152
- display: table-caption;
153
- caption-side: bottom;
154
- }
155
-
156
140
  .wp-block[data-align=left] > .wp-block-image {
157
141
  margin-right: 1em;
158
142
  margin-left: 0;
@@ -91,11 +91,13 @@
91
91
  height: auto;
92
92
  width: 100%;
93
93
  }
94
+ .wp-block-image.alignleft, .wp-block-image.alignright, .wp-block-image.aligncenter,
94
95
  .wp-block-image .alignleft,
95
96
  .wp-block-image .alignright,
96
97
  .wp-block-image .aligncenter {
97
98
  display: table;
98
99
  }
100
+ .wp-block-image.alignleft > figcaption, .wp-block-image.alignright > figcaption, .wp-block-image.aligncenter > figcaption,
99
101
  .wp-block-image .alignleft > figcaption,
100
102
  .wp-block-image .alignright > figcaption,
101
103
  .wp-block-image .aligncenter > figcaption {
@@ -91,11 +91,13 @@
91
91
  height: auto;
92
92
  width: 100%;
93
93
  }
94
+ .wp-block-image.alignleft, .wp-block-image.alignright, .wp-block-image.aligncenter,
94
95
  .wp-block-image .alignleft,
95
96
  .wp-block-image .alignright,
96
97
  .wp-block-image .aligncenter {
97
98
  display: table;
98
99
  }
100
+ .wp-block-image.alignleft > figcaption, .wp-block-image.alignright > figcaption, .wp-block-image.aligncenter > figcaption,
99
101
  .wp-block-image .alignleft > figcaption,
100
102
  .wp-block-image .alignright > figcaption,
101
103
  .wp-block-image .aligncenter > figcaption {
@@ -126,21 +126,21 @@
126
126
  align-self: center;
127
127
  line-height: 0;
128
128
  display: inline-block;
129
- vertical-align: middle;
130
129
  font-size: inherit;
131
130
  padding: 0;
132
131
  background-color: inherit;
133
132
  color: currentColor;
134
133
  border: none;
135
- margin-right: 0.25em;
136
134
  width: 0.6em;
137
135
  height: 0.6em;
136
+ margin-right: 0.25em;
138
137
  }
139
138
  .wp-block-navigation .wp-block-navigation__submenu-icon svg {
140
139
  display: inline-block;
141
140
  stroke: currentColor;
142
141
  width: inherit;
143
142
  height: inherit;
143
+ margin-top: 0.075em;
144
144
  }
145
145
  .wp-block-navigation.is-vertical {
146
146
  --navigation-layout-direction: column;
@@ -211,6 +211,9 @@
211
211
  width: 0.5em;
212
212
  background: transparent;
213
213
  }
214
+ .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation__submenu-icon {
215
+ margin-left: 0.25em;
216
+ }
214
217
  .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation__submenu-icon svg {
215
218
  transform: rotate(90deg);
216
219
  }
@@ -231,7 +234,7 @@
231
234
  height: auto;
232
235
  min-width: 200px;
233
236
  }
234
- .wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true] + .wp-block-navigation__submenu-container {
237
+ .wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true] ~ .wp-block-navigation__submenu-container {
235
238
  visibility: visible;
236
239
  overflow: visible;
237
240
  opacity: 1;
@@ -273,6 +276,14 @@ button.wp-block-navigation-item__content {
273
276
  cursor: pointer;
274
277
  }
275
278
 
279
+ .wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
280
+ padding-left: 0.85em;
281
+ }
282
+ .wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle + .wp-block-navigation__submenu-icon {
283
+ margin-right: -0.6em;
284
+ pointer-events: none;
285
+ }
286
+
276
287
  /**
277
288
  * Margins
278
289
  */
@@ -126,21 +126,21 @@
126
126
  align-self: center;
127
127
  line-height: 0;
128
128
  display: inline-block;
129
- vertical-align: middle;
130
129
  font-size: inherit;
131
130
  padding: 0;
132
131
  background-color: inherit;
133
132
  color: currentColor;
134
133
  border: none;
135
- margin-left: 0.25em;
136
134
  width: 0.6em;
137
135
  height: 0.6em;
136
+ margin-left: 0.25em;
138
137
  }
139
138
  .wp-block-navigation .wp-block-navigation__submenu-icon svg {
140
139
  display: inline-block;
141
140
  stroke: currentColor;
142
141
  width: inherit;
143
142
  height: inherit;
143
+ margin-top: 0.075em;
144
144
  }
145
145
  .wp-block-navigation.is-vertical {
146
146
  --navigation-layout-direction: column;
@@ -211,6 +211,9 @@
211
211
  width: 0.5em;
212
212
  background: transparent;
213
213
  }
214
+ .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation__submenu-icon {
215
+ margin-right: 0.25em;
216
+ }
214
217
  .wp-block-navigation .has-child :where(.wp-block-navigation__submenu-container) .wp-block-navigation__submenu-icon svg {
215
218
  transform: rotate(-90deg);
216
219
  }
@@ -231,7 +234,7 @@
231
234
  height: auto;
232
235
  min-width: 200px;
233
236
  }
234
- .wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true] + .wp-block-navigation__submenu-container {
237
+ .wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true] ~ .wp-block-navigation__submenu-container {
235
238
  visibility: visible;
236
239
  overflow: visible;
237
240
  opacity: 1;
@@ -273,6 +276,14 @@ button.wp-block-navigation-item__content {
273
276
  cursor: pointer;
274
277
  }
275
278
 
279
+ .wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle {
280
+ padding-right: 0.85em;
281
+ }
282
+ .wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle + .wp-block-navigation__submenu-icon {
283
+ margin-left: -0.6em;
284
+ pointer-events: none;
285
+ }
286
+
276
287
  /**
277
288
  * Margins
278
289
  */