@wordpress/block-library 8.30.0 → 8.31.0

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 (254) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/build/block/edit.js +17 -8
  3. package/build/block/edit.js.map +1 -1
  4. package/build/code/save.js +3 -1
  5. package/build/code/save.js.map +1 -1
  6. package/build/cover/edit/index.js +2 -1
  7. package/build/cover/edit/index.js.map +1 -1
  8. package/build/details/edit.js +1 -0
  9. package/build/details/edit.js.map +1 -1
  10. package/build/file/edit.js +2 -0
  11. package/build/file/edit.js.map +1 -1
  12. package/build/heading/index.js +4 -3
  13. package/build/heading/index.js.map +1 -1
  14. package/build/media-text/edit.js +33 -9
  15. package/build/media-text/edit.js.map +1 -1
  16. package/build/media-text/index.js +5 -0
  17. package/build/media-text/index.js.map +1 -1
  18. package/build/media-text/media-container.js +30 -11
  19. package/build/media-text/media-container.js.map +1 -1
  20. package/build/media-text/save.js +2 -2
  21. package/build/media-text/save.js.map +1 -1
  22. package/build/navigation/edit/index.js +23 -29
  23. package/build/navigation/edit/index.js.map +1 -1
  24. package/build/navigation/edit/navigation-menu-delete-control.js +12 -20
  25. package/build/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  26. package/build/navigation/edit/navigation-menu-selector.js +24 -23
  27. package/build/navigation/edit/navigation-menu-selector.js.map +1 -1
  28. package/build/navigation/edit/placeholder/index.js +4 -4
  29. package/build/navigation/edit/placeholder/index.js.map +1 -1
  30. package/build/navigation/use-navigation-menu.js +15 -12
  31. package/build/navigation/use-navigation-menu.js.map +1 -1
  32. package/build/navigation-link/edit.js +12 -10
  33. package/build/navigation-link/edit.js.map +1 -1
  34. package/build/navigation-submenu/edit.js +4 -0
  35. package/build/navigation-submenu/edit.js.map +1 -1
  36. package/build/post-author/edit.js +1 -0
  37. package/build/post-author/edit.js.map +1 -1
  38. package/build/post-excerpt/edit.js +1 -0
  39. package/build/post-excerpt/edit.js.map +1 -1
  40. package/build/post-featured-image/edit.js +4 -1
  41. package/build/post-featured-image/edit.js.map +1 -1
  42. package/build/post-featured-image/index.js +6 -0
  43. package/build/post-featured-image/index.js.map +1 -1
  44. package/build/post-navigation-link/edit.js +1 -0
  45. package/build/post-navigation-link/edit.js.map +1 -1
  46. package/build/post-terms/edit.js +2 -0
  47. package/build/post-terms/edit.js.map +1 -1
  48. package/build/quote/edit.js +2 -2
  49. package/build/quote/edit.js.map +1 -1
  50. package/build/read-more/edit.js +1 -0
  51. package/build/read-more/edit.js.map +1 -1
  52. package/build/search/edit.js +2 -0
  53. package/build/search/edit.js.map +1 -1
  54. package/build/search/edit.native.js +2 -2
  55. package/build/search/edit.native.js.map +1 -1
  56. package/build/social-link/edit.js +1 -1
  57. package/build/social-link/edit.js.map +1 -1
  58. package/build/social-link/icons/medium.js +1 -1
  59. package/build/social-link/icons/medium.js.map +1 -1
  60. package/build/social-link/icons/reddit.js +1 -1
  61. package/build/social-link/icons/reddit.js.map +1 -1
  62. package/build/table/deprecated.js +285 -175
  63. package/build/table/deprecated.js.map +1 -1
  64. package/build/table/index.js +1 -1
  65. package/build/template-part/edit/index.js +1 -1
  66. package/build/template-part/edit/index.js.map +1 -1
  67. package/build/video/edit.native.js +1 -1
  68. package/build/video/edit.native.js.map +1 -1
  69. package/build-module/block/edit.js +18 -9
  70. package/build-module/block/edit.js.map +1 -1
  71. package/build-module/code/save.js +3 -1
  72. package/build-module/code/save.js.map +1 -1
  73. package/build-module/cover/edit/index.js +2 -1
  74. package/build-module/cover/edit/index.js.map +1 -1
  75. package/build-module/details/edit.js +1 -0
  76. package/build-module/details/edit.js.map +1 -1
  77. package/build-module/file/edit.js +2 -0
  78. package/build-module/file/edit.js.map +1 -1
  79. package/build-module/heading/index.js +4 -3
  80. package/build-module/heading/index.js.map +1 -1
  81. package/build-module/media-text/edit.js +34 -10
  82. package/build-module/media-text/edit.js.map +1 -1
  83. package/build-module/media-text/index.js +5 -0
  84. package/build-module/media-text/index.js.map +1 -1
  85. package/build-module/media-text/media-container.js +31 -12
  86. package/build-module/media-text/media-container.js.map +1 -1
  87. package/build-module/media-text/save.js +2 -2
  88. package/build-module/media-text/save.js.map +1 -1
  89. package/build-module/navigation/edit/index.js +24 -30
  90. package/build-module/navigation/edit/index.js.map +1 -1
  91. package/build-module/navigation/edit/navigation-menu-delete-control.js +15 -23
  92. package/build-module/navigation/edit/navigation-menu-delete-control.js.map +1 -1
  93. package/build-module/navigation/edit/navigation-menu-selector.js +24 -23
  94. package/build-module/navigation/edit/navigation-menu-selector.js.map +1 -1
  95. package/build-module/navigation/edit/placeholder/index.js +4 -4
  96. package/build-module/navigation/edit/placeholder/index.js.map +1 -1
  97. package/build-module/navigation/use-navigation-menu.js +15 -12
  98. package/build-module/navigation/use-navigation-menu.js.map +1 -1
  99. package/build-module/navigation-link/edit.js +13 -11
  100. package/build-module/navigation-link/edit.js.map +1 -1
  101. package/build-module/navigation-submenu/edit.js +4 -0
  102. package/build-module/navigation-submenu/edit.js.map +1 -1
  103. package/build-module/post-author/edit.js +1 -0
  104. package/build-module/post-author/edit.js.map +1 -1
  105. package/build-module/post-excerpt/edit.js +1 -0
  106. package/build-module/post-excerpt/edit.js.map +1 -1
  107. package/build-module/post-featured-image/edit.js +5 -2
  108. package/build-module/post-featured-image/edit.js.map +1 -1
  109. package/build-module/post-featured-image/index.js +6 -0
  110. package/build-module/post-featured-image/index.js.map +1 -1
  111. package/build-module/post-navigation-link/edit.js +1 -0
  112. package/build-module/post-navigation-link/edit.js.map +1 -1
  113. package/build-module/post-terms/edit.js +2 -0
  114. package/build-module/post-terms/edit.js.map +1 -1
  115. package/build-module/quote/edit.js +2 -2
  116. package/build-module/quote/edit.js.map +1 -1
  117. package/build-module/read-more/edit.js +1 -0
  118. package/build-module/read-more/edit.js.map +1 -1
  119. package/build-module/search/edit.js +2 -0
  120. package/build-module/search/edit.js.map +1 -1
  121. package/build-module/search/edit.native.js +2 -2
  122. package/build-module/search/edit.native.js.map +1 -1
  123. package/build-module/social-link/edit.js +1 -1
  124. package/build-module/social-link/edit.js.map +1 -1
  125. package/build-module/social-link/icons/medium.js +1 -1
  126. package/build-module/social-link/icons/medium.js.map +1 -1
  127. package/build-module/social-link/icons/reddit.js +1 -1
  128. package/build-module/social-link/icons/reddit.js.map +1 -1
  129. package/build-module/table/deprecated.js +286 -176
  130. package/build-module/table/deprecated.js.map +1 -1
  131. package/build-module/table/index.js +1 -1
  132. package/build-module/template-part/edit/index.js +1 -1
  133. package/build-module/template-part/edit/index.js.map +1 -1
  134. package/build-module/video/edit.native.js +1 -1
  135. package/build-module/video/edit.native.js.map +1 -1
  136. package/build-style/editor-rtl.css +10 -4
  137. package/build-style/editor.css +10 -4
  138. package/build-style/file/editor-rtl.css +3 -0
  139. package/build-style/file/editor.css +3 -0
  140. package/build-style/image/editor-rtl.css +0 -3
  141. package/build-style/image/editor.css +0 -3
  142. package/build-style/media-text/editor-rtl.css +7 -1
  143. package/build-style/media-text/editor.css +7 -1
  144. package/build-style/social-links/style-rtl.css +2 -2
  145. package/build-style/social-links/style.css +2 -2
  146. package/build-style/style-rtl.css +2 -2
  147. package/build-style/style.css +2 -2
  148. package/package.json +34 -34
  149. package/src/archives/index.php +4 -0
  150. package/src/avatar/index.php +6 -0
  151. package/src/block/edit.js +38 -15
  152. package/src/block/index.php +4 -0
  153. package/src/block/test/edit.native.js +67 -0
  154. package/src/calendar/index.php +12 -0
  155. package/src/categories/index.php +6 -0
  156. package/src/code/save.js +7 -1
  157. package/src/comment-author-name/index.php +4 -0
  158. package/src/comment-content/index.php +4 -0
  159. package/src/comment-date/index.php +4 -0
  160. package/src/comment-edit-link/index.php +4 -0
  161. package/src/comment-reply-link/index.php +4 -0
  162. package/src/comment-template/index.php +4 -0
  163. package/src/comments/index.php +10 -0
  164. package/src/comments-pagination/index.php +4 -0
  165. package/src/comments-pagination-next/index.php +4 -0
  166. package/src/comments-pagination-numbers/index.php +4 -0
  167. package/src/comments-pagination-previous/index.php +4 -0
  168. package/src/comments-title/index.php +4 -0
  169. package/src/cover/edit/index.js +4 -1
  170. package/src/cover/index.php +4 -0
  171. package/src/details/edit.js +1 -0
  172. package/src/file/edit.js +2 -0
  173. package/src/file/editor.scss +3 -0
  174. package/src/file/index.php +4 -0
  175. package/src/gallery/index.php +6 -0
  176. package/src/heading/index.js +4 -3
  177. package/src/heading/index.php +4 -0
  178. package/src/home-link/index.php +10 -0
  179. package/src/image/editor.scss +0 -5
  180. package/src/image/index.php +12 -1
  181. package/src/latest-comments/index.php +4 -0
  182. package/src/latest-posts/index.php +8 -0
  183. package/src/loginout/index.php +4 -0
  184. package/src/media-text/block.json +5 -0
  185. package/src/media-text/edit.js +70 -19
  186. package/src/media-text/editor.scss +7 -1
  187. package/src/media-text/index.php +70 -0
  188. package/src/media-text/media-container.js +49 -9
  189. package/src/media-text/save.js +2 -2
  190. package/src/navigation/edit/index.js +67 -71
  191. package/src/navigation/edit/navigation-menu-delete-control.js +22 -49
  192. package/src/navigation/edit/navigation-menu-selector.js +39 -21
  193. package/src/navigation/edit/placeholder/index.js +4 -4
  194. package/src/navigation/edit/test/navigation-menu-selector.js +75 -53
  195. package/src/navigation/index.php +101 -26
  196. package/src/navigation/test/use-navigation-menu.js +21 -21
  197. package/src/navigation/use-navigation-menu.js +23 -9
  198. package/src/navigation-link/edit.js +12 -13
  199. package/src/navigation-link/index.php +14 -0
  200. package/src/navigation-submenu/edit.js +4 -0
  201. package/src/navigation-submenu/index.php +8 -0
  202. package/src/page-list/index.php +12 -0
  203. package/src/page-list-item/index.php +2 -0
  204. package/src/pattern/index.php +2 -0
  205. package/src/post-author/edit.js +1 -0
  206. package/src/post-author/index.php +4 -0
  207. package/src/post-author-biography/index.php +4 -0
  208. package/src/post-author-name/index.php +4 -0
  209. package/src/post-comments-form/index.php +6 -0
  210. package/src/post-content/index.php +4 -0
  211. package/src/post-date/index.php +4 -0
  212. package/src/post-excerpt/edit.js +1 -0
  213. package/src/post-excerpt/index.php +4 -0
  214. package/src/post-featured-image/block.json +6 -0
  215. package/src/post-featured-image/edit.js +4 -0
  216. package/src/post-featured-image/index.php +15 -0
  217. package/src/post-navigation-link/edit.js +1 -0
  218. package/src/post-navigation-link/index.php +4 -0
  219. package/src/post-template/index.php +4 -0
  220. package/src/post-terms/edit.js +2 -0
  221. package/src/post-terms/index.php +6 -0
  222. package/src/post-title/index.php +2 -0
  223. package/src/query/index.php +2 -0
  224. package/src/query-no-results/index.php +4 -0
  225. package/src/query-pagination/index.php +4 -0
  226. package/src/query-pagination-next/index.php +4 -0
  227. package/src/query-pagination-numbers/index.php +4 -0
  228. package/src/query-pagination-previous/index.php +4 -0
  229. package/src/query-title/index.php +4 -0
  230. package/src/quote/edit.js +11 -5
  231. package/src/read-more/edit.js +1 -0
  232. package/src/read-more/index.php +4 -0
  233. package/src/rss/index.php +4 -0
  234. package/src/search/edit.js +2 -0
  235. package/src/search/edit.native.js +2 -2
  236. package/src/search/index.php +19 -1
  237. package/src/shortcode/index.php +4 -0
  238. package/src/site-logo/index.php +20 -0
  239. package/src/site-tagline/index.php +4 -0
  240. package/src/site-title/index.php +4 -0
  241. package/src/social-link/edit.js +1 -1
  242. package/src/social-link/icons/medium.js +1 -1
  243. package/src/social-link/icons/reddit.js +1 -1
  244. package/src/social-link/index.php +22 -9
  245. package/src/social-link/socials-with-bg.scss +1 -1
  246. package/src/social-link/socials-without-bg.scss +1 -1
  247. package/src/table/block.json +1 -1
  248. package/src/table/deprecated.js +308 -175
  249. package/src/tag-cloud/index.php +4 -0
  250. package/src/template-part/edit/index.js +1 -1
  251. package/src/template-part/index.php +10 -0
  252. package/src/term-description/index.php +4 -0
  253. package/src/video/edit.native.js +2 -0
  254. package/tsconfig.json +1 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_blockEditor","_data","_element","_components","_compose","_icons","_i18n","_dom","_icons2","_utils","DEFAULT_INNER_PADDING","SearchEdit","className","attributes","setAttributes","toggleSelection","isSelected","clientId","label","showLabel","placeholder","width","widthUnit","align","buttonText","buttonPosition","buttonUseIcon","isSearchFieldHidden","style","wasJustInsertedIntoNavigationBlock","useSelect","select","getBlockParentsByBlockName","wasBlockJustInserted","blockEditorStore","length","__unstableMarkNextChangeAsNotPersistent","useDispatch","useEffect","borderRadius","border","radius","borderProps","useBorderProps","colorProps","useColorProps","fluidTypographySettings","layout","useSettings","typographyProps","useTypographyProps","typography","fluid","wideSize","unitControlInstanceId","useInstanceId","UnitControl","unitControlInputId","isButtonPositionInside","isButtonPositionOutside","hasNoButton","hasOnlyButton","searchFieldRef","useRef","buttonRef","units","useCustomUnits","availableUnits","defaultValues","PC_WIDTH_DEFAULT","px","PX_WIDTH_DEFAULT","getBlockClassNames","classnames","undefined","buttonPositionControls","role","title","__","isActive","icon","buttonOutside","onClick","buttonInside","noButton","buttonOnly","getButtonPositionIcon","getResizableSides","right","left","renderTextField","textFieldClasses","textFieldStyles","textDecoration","_react","createElement","type","value","onChange","event","target","ref","renderButton","buttonClasses","__experimentalGetElementClassName","buttonStyles","handleButtonClick","Fragment","stripHTML","Icon","search","RichText","withoutInteractiveFormatting","html","controls","BlockControls","ToolbarGroup","ToolbarButton","toggleLabel","ToolbarDropdownMenu","buttonWithIcon","InspectorControls","PanelBody","BaseControl","id","__experimentalUnitControl","min","isPercentageUnit","MIN_WIDTH","max","step","newWidth","filteredWidth","parseInt","onUnitChange","newUnit","__unstableInputWidth","ButtonGroup","map","widthValue","Button","key","size","variant","padBorderRadius","getWrapperStyles","styles","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","isNonZeroBorderRadius","topLeft","topRight","bottomLeft","bottomRight","Number","isInteger","blockProps","useBlockProps","labelClassnames","ResizableBox","minWidth","enable","onResizeStart","direction","elt","offsetWidth","onResizeStop","delta","showHandle"],"sources":["@wordpress/block-library/src/search/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\tgetTypographyClassesAndStyles as useTypographyProps,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n\tuseSettings,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tButton,\n\tButtonGroup,\n\tToolbarButton,\n\tResizableBox,\n\tPanelBody,\n\tBaseControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, search } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport {\n\tbuttonOnly,\n\tbuttonOutside,\n\tbuttonInside,\n\tnoButton,\n\tbuttonWithIcon,\n\ttoggleLabel,\n} from './icons';\nimport {\n\tPC_WIDTH_DEFAULT,\n\tPX_WIDTH_DEFAULT,\n\tMIN_WIDTH,\n\tisPercentageUnit,\n} from './utils.js';\n\n// Used to calculate border radius adjustment to avoid \"fat\" corners when\n// button is placed inside wrapper.\nconst DEFAULT_INNER_PADDING = '4px';\n\nexport default function SearchEdit( {\n\tclassName,\n\tattributes,\n\tsetAttributes,\n\ttoggleSelection,\n\tisSelected,\n\tclientId,\n} ) {\n\tconst {\n\t\tlabel,\n\t\tshowLabel,\n\t\tplaceholder,\n\t\twidth,\n\t\twidthUnit,\n\t\talign,\n\t\tbuttonText,\n\t\tbuttonPosition,\n\t\tbuttonUseIcon,\n\t\tisSearchFieldHidden,\n\t\tstyle,\n\t} = attributes;\n\n\tconst wasJustInsertedIntoNavigationBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParentsByBlockName, wasBlockJustInserted } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\t!! getBlockParentsByBlockName( clientId, 'core/navigation' )\n\t\t\t\t\t?.length && wasBlockJustInserted( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( wasJustInsertedIntoNavigationBlock ) {\n\t\t\t// This side-effect should not create an undo level.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( {\n\t\t\t\tshowLabel: false,\n\t\t\t\tbuttonUseIcon: true,\n\t\t\t\tbuttonPosition: 'button-inside',\n\t\t\t} );\n\t\t}\n\t}, [\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\twasJustInsertedIntoNavigationBlock,\n\t\tsetAttributes,\n\t] );\n\n\tconst borderRadius = style?.border?.radius;\n\tconst borderProps = useBorderProps( attributes );\n\n\t// Check for old deprecated numerical border radius. Done as a separate\n\t// check so that a borderRadius style won't overwrite the longhand\n\t// per-corner styles.\n\tif ( typeof borderRadius === 'number' ) {\n\t\tborderProps.style.borderRadius = `${ borderRadius }px`;\n\t}\n\n\tconst colorProps = useColorProps( attributes );\n\tconst [ fluidTypographySettings, layout ] = useSettings(\n\t\t'typography.fluid',\n\t\t'layout'\n\t);\n\tconst typographyProps = useTypographyProps( attributes, {\n\t\ttypography: {\n\t\t\tfluid: fluidTypographySettings,\n\t\t},\n\t\tlayout: {\n\t\t\twideSize: layout?.wideSize,\n\t\t},\n\t} );\n\tconst unitControlInstanceId = useInstanceId( UnitControl );\n\tconst unitControlInputId = `wp-block-search__width-${ unitControlInstanceId }`;\n\tconst isButtonPositionInside = 'button-inside' === buttonPosition;\n\tconst isButtonPositionOutside = 'button-outside' === buttonPosition;\n\tconst hasNoButton = 'no-button' === buttonPosition;\n\tconst hasOnlyButton = 'button-only' === buttonPosition;\n\tconst searchFieldRef = useRef();\n\tconst buttonRef = useRef();\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: [ '%', 'px' ],\n\t\tdefaultValues: { '%': PC_WIDTH_DEFAULT, px: PX_WIDTH_DEFAULT },\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( hasOnlyButton && ! isSelected ) {\n\t\t\tsetAttributes( {\n\t\t\t\tisSearchFieldHidden: true,\n\t\t\t} );\n\t\t}\n\t}, [ hasOnlyButton, isSelected, setAttributes ] );\n\n\t// Show the search field when width changes.\n\tuseEffect( () => {\n\t\tif ( ! hasOnlyButton || ! isSelected ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\tisSearchFieldHidden: false,\n\t\t} );\n\t}, [ hasOnlyButton, isSelected, setAttributes, width ] );\n\n\tconst getBlockClassNames = () => {\n\t\treturn classnames(\n\t\t\tclassName,\n\t\t\tisButtonPositionInside\n\t\t\t\t? 'wp-block-search__button-inside'\n\t\t\t\t: undefined,\n\t\t\tisButtonPositionOutside\n\t\t\t\t? 'wp-block-search__button-outside'\n\t\t\t\t: undefined,\n\t\t\thasNoButton ? 'wp-block-search__no-button' : undefined,\n\t\t\thasOnlyButton ? 'wp-block-search__button-only' : undefined,\n\t\t\t! buttonUseIcon && ! hasNoButton\n\t\t\t\t? 'wp-block-search__text-button'\n\t\t\t\t: undefined,\n\t\t\tbuttonUseIcon && ! hasNoButton\n\t\t\t\t? 'wp-block-search__icon-button'\n\t\t\t\t: undefined,\n\t\t\thasOnlyButton && isSearchFieldHidden\n\t\t\t\t? 'wp-block-search__searchfield-hidden'\n\t\t\t\t: undefined\n\t\t);\n\t};\n\n\tconst buttonPositionControls = [\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button outside' ),\n\t\t\tisActive: buttonPosition === 'button-outside',\n\t\t\ticon: buttonOutside,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-outside',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button inside' ),\n\t\t\tisActive: buttonPosition === 'button-inside',\n\t\t\ticon: buttonInside,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-inside',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'No button' ),\n\t\t\tisActive: buttonPosition === 'no-button',\n\t\t\ticon: noButton,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'no-button',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button only' ),\n\t\t\tisActive: buttonPosition === 'button-only',\n\t\t\ticon: buttonOnly,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-only',\n\t\t\t\t\tisSearchFieldHidden: true,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst getButtonPositionIcon = () => {\n\t\tswitch ( buttonPosition ) {\n\t\t\tcase 'button-inside':\n\t\t\t\treturn buttonInside;\n\t\t\tcase 'button-outside':\n\t\t\t\treturn buttonOutside;\n\t\t\tcase 'no-button':\n\t\t\t\treturn noButton;\n\t\t\tcase 'button-only':\n\t\t\t\treturn buttonOnly;\n\t\t}\n\t};\n\n\tconst getResizableSides = () => {\n\t\tif ( hasOnlyButton ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn {\n\t\t\tright: align !== 'right',\n\t\t\tleft: align === 'right',\n\t\t};\n\t};\n\n\tconst renderTextField = () => {\n\t\t// If the input is inside the wrapper, the wrapper gets the border color styles/classes, not the input control.\n\t\tconst textFieldClasses = classnames(\n\t\t\t'wp-block-search__input',\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\ttypographyProps.className\n\t\t);\n\t\tconst textFieldStyles = {\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? { borderRadius }\n\t\t\t\t: borderProps.style ),\n\t\t\t...typographyProps.style,\n\t\t\ttextDecoration: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype=\"search\"\n\t\t\t\tclassName={ textFieldClasses }\n\t\t\t\tstyle={ textFieldStyles }\n\t\t\t\taria-label={ __( 'Optional placeholder text' ) }\n\t\t\t\t// We hide the placeholder field's placeholder when there is a value. This\n\t\t\t\t// stops screen readers from reading the placeholder field's placeholder\n\t\t\t\t// which is confusing.\n\t\t\t\tplaceholder={\n\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t}\n\t\t\t\tvalue={ placeholder }\n\t\t\t\tonChange={ ( event ) =>\n\t\t\t\t\tsetAttributes( { placeholder: event.target.value } )\n\t\t\t\t}\n\t\t\t\tref={ searchFieldRef }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst renderButton = () => {\n\t\t// If the button is inside the wrapper, the wrapper gets the border color styles/classes, not the button.\n\t\tconst buttonClasses = classnames(\n\t\t\t'wp-block-search__button',\n\t\t\tcolorProps.className,\n\t\t\ttypographyProps.className,\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\tbuttonUseIcon ? 'has-icon' : undefined,\n\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t);\n\t\tconst buttonStyles = {\n\t\t\t...colorProps.style,\n\t\t\t...typographyProps.style,\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? { borderRadius }\n\t\t\t\t: borderProps.style ),\n\t\t};\n\t\tconst handleButtonClick = () => {\n\t\t\tif ( hasOnlyButton ) {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tisSearchFieldHidden: ! isSearchFieldHidden,\n\t\t\t\t} );\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ buttonUseIcon && (\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\tstyle={ buttonStyles }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\tbuttonText\n\t\t\t\t\t\t\t\t? stripHTML( buttonText )\n\t\t\t\t\t\t\t\t: __( 'Search' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ handleButtonClick }\n\t\t\t\t\t\tref={ buttonRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon icon={ search } />\n\t\t\t\t\t</button>\n\t\t\t\t) }\n\n\t\t\t\t{ ! buttonUseIcon && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\tstyle={ buttonStyles }\n\t\t\t\t\t\taria-label={ __( 'Button text' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Add button text…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ buttonText }\n\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\tsetAttributes( { buttonText: html } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ handleButtonClick }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n\n\tconst controls = (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ttitle={ __( 'Toggle search label' ) }\n\t\t\t\t\t\ticon={ toggleLabel }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tclassName={ showLabel ? 'is-pressed' : undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarDropdownMenu\n\t\t\t\t\t\ticon={ getButtonPositionIcon() }\n\t\t\t\t\t\tlabel={ __( 'Change button position' ) }\n\t\t\t\t\t\tcontrols={ buttonPositionControls }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! hasNoButton && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ttitle={ __( 'Use button with icon' ) }\n\t\t\t\t\t\t\ticon={ buttonWithIcon }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tbuttonUseIcon: ! buttonUseIcon,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\tbuttonUseIcon ? 'is-pressed' : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tid={ unitControlInputId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tid={ unitControlInputId }\n\t\t\t\t\t\t\tmin={\n\t\t\t\t\t\t\t\tisPercentageUnit( widthUnit ) ? 0 : MIN_WIDTH\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmax={\n\t\t\t\t\t\t\t\tisPercentageUnit( widthUnit ) ? 100 : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\t\tonChange={ ( newWidth ) => {\n\t\t\t\t\t\t\t\tconst filteredWidth =\n\t\t\t\t\t\t\t\t\twidthUnit === '%' &&\n\t\t\t\t\t\t\t\t\tparseInt( newWidth, 10 ) > 100\n\t\t\t\t\t\t\t\t\t\t? 100\n\t\t\t\t\t\t\t\t\t\t: newWidth;\n\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\twidth: parseInt( filteredWidth, 10 ),\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonUnitChange={ ( newUnit ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t'%' === newUnit\n\t\t\t\t\t\t\t\t\t\t\t? PC_WIDTH_DEFAULT\n\t\t\t\t\t\t\t\t\t\t\t: PX_WIDTH_DEFAULT,\n\t\t\t\t\t\t\t\t\twidthUnit: newUnit,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t__unstableInputWidth={ '80px' }\n\t\t\t\t\t\t\tvalue={ `${ width }${ widthUnit }` }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<ButtonGroup\n\t\t\t\t\t\t\tclassName=\"wp-block-search__components-button-group\"\n\t\t\t\t\t\t\taria-label={ __( 'Percentage Width' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ [ 25, 50, 75, 100 ].map( ( widthValue ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tkey={ widthValue }\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\twidthValue === width &&\n\t\t\t\t\t\t\t\t\t\t\twidthUnit === '%'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'primary'\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: widthValue,\n\t\t\t\t\t\t\t\t\t\t\t\twidthUnit: '%',\n\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ widthValue }%\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</ButtonGroup>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tconst padBorderRadius = ( radius ) =>\n\t\tradius ? `calc(${ radius } + ${ DEFAULT_INNER_PADDING })` : undefined;\n\n\tconst getWrapperStyles = () => {\n\t\tconst styles = isButtonPositionInside\n\t\t\t? borderProps.style\n\t\t\t: {\n\t\t\t\t\tborderRadius: borderProps.style?.borderRadius,\n\t\t\t\t\tborderTopLeftRadius: borderProps.style?.borderTopLeftRadius,\n\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\tborderProps.style?.borderTopRightRadius,\n\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\tborderProps.style?.borderBottomLeftRadius,\n\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\tborderProps.style?.borderBottomRightRadius,\n\t\t\t };\n\n\t\tconst isNonZeroBorderRadius =\n\t\t\tborderRadius !== undefined && parseInt( borderRadius, 10 ) !== 0;\n\n\t\tif ( isButtonPositionInside && isNonZeroBorderRadius ) {\n\t\t\t// We have button inside wrapper and a border radius value to apply.\n\t\t\t// Add default padding so we don't get \"fat\" corners.\n\t\t\t//\n\t\t\t// CSS calc() is used here to support non-pixel units. The inline\n\t\t\t// style using calc() will only apply if both values have units.\n\n\t\t\tif ( typeof borderRadius === 'object' ) {\n\t\t\t\t// Individual corner border radii present.\n\t\t\t\tconst { topLeft, topRight, bottomLeft, bottomRight } =\n\t\t\t\t\tborderRadius;\n\n\t\t\t\treturn {\n\t\t\t\t\t...styles,\n\t\t\t\t\tborderTopLeftRadius: padBorderRadius( topLeft ),\n\t\t\t\t\tborderTopRightRadius: padBorderRadius( topRight ),\n\t\t\t\t\tborderBottomLeftRadius: padBorderRadius( bottomLeft ),\n\t\t\t\t\tborderBottomRightRadius: padBorderRadius( bottomRight ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// The inline style using calc() will only apply if both values\n\t\t\t// supplied to calc() have units. Deprecated block's may have\n\t\t\t// unitless integer.\n\t\t\tconst radius = Number.isInteger( borderRadius )\n\t\t\t\t? `${ borderRadius }px`\n\t\t\t\t: borderRadius;\n\n\t\t\tstyles.borderRadius = `calc(${ radius } + ${ DEFAULT_INNER_PADDING })`;\n\t\t}\n\n\t\treturn styles;\n\t};\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: getBlockClassNames(),\n\t\tstyle: {\n\t\t\t...typographyProps.style,\n\t\t\t// Input opts out of text decoration.\n\t\t\ttextDecoration: undefined,\n\t\t},\n\t} );\n\n\tconst labelClassnames = classnames(\n\t\t'wp-block-search__label',\n\t\ttypographyProps.className\n\t);\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ controls }\n\n\t\t\t{ showLabel && (\n\t\t\t\t<RichText\n\t\t\t\t\tclassName={ labelClassnames }\n\t\t\t\t\taria-label={ __( 'Label text' ) }\n\t\t\t\t\tplaceholder={ __( 'Add label…' ) }\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( html ) => setAttributes( { label: html } ) }\n\t\t\t\t\tstyle={ typographyProps.style }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<ResizableBox\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: `${ width }${ widthUnit }`,\n\t\t\t\t} }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'wp-block-search__inside-wrapper',\n\t\t\t\t\tisButtonPositionInside ? borderProps.className : undefined\n\t\t\t\t) }\n\t\t\t\tstyle={ getWrapperStyles() }\n\t\t\t\tminWidth={ MIN_WIDTH }\n\t\t\t\tenable={ getResizableSides() }\n\t\t\t\tonResizeStart={ ( event, direction, elt ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( elt.offsetWidth, 10 ),\n\t\t\t\t\t\twidthUnit: 'px',\n\t\t\t\t\t} );\n\t\t\t\t\ttoggleSelection( false );\n\t\t\t\t} }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( width + delta.width, 10 ),\n\t\t\t\t\t} );\n\t\t\t\t\ttoggleSelection( true );\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSelected }\n\t\t\t>\n\t\t\t\t{ ( isButtonPositionInside ||\n\t\t\t\t\tisButtonPositionOutside ||\n\t\t\t\t\thasOnlyButton ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t\t{ renderButton() }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t{ hasNoButton && renderTextField() }\n\t\t\t</ResizableBox>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAYA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAKA,IAAAS,OAAA,GAAAT,OAAA;AAQA,IAAAU,MAAA,GAAAV,OAAA;AAlDA;AACA;AACA;;AAGA;AACA;AACA;;AAgCA;AACA;AACA;;AAgBA;AACA;AACA,MAAMW,qBAAqB,GAAG,KAAK;AAEpB,SA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;IAC9B6E,aAAa,EAAGA,CAAEjE,KAAK,EAAEkE,SAAS,EAAEC,GAAG,KAAM;MAC5CxJ,aAAa,CAAE;QACdO,KAAK,EAAEgH,QAAQ,CAAEiC,GAAG,CAACC,WAAW,EAAE,EAAG,CAAC;QACtCjJ,SAAS,EAAE;MACZ,CAAE,CAAC;MACHP,eAAe,CAAE,KAAM,CAAC;IACzB,CAAG;IACHyJ,YAAY,EAAGA,CAAErE,KAAK,EAAEkE,SAAS,EAAEC,GAAG,EAAEG,KAAK,KAAM;MAClD3J,aAAa,CAAE;QACdO,KAAK,EAAEgH,QAAQ,CAAEhH,KAAK,GAAGoJ,KAAK,CAACpJ,KAAK,EAAE,EAAG;MAC1C,CAAE,CAAC;MACHN,eAAe,CAAE,IAAK,CAAC;IACxB,CAAG;IACH2J,UAAU,EAAG1J;EAAY,GAEvB,CAAE0C,sBAAsB,IACzBC,uBAAuB,IACvBE,aAAa,KACb,IAAAiC,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAa,QAAA,QACGjB,eAAe,CAAC,CAAC,EACjBY,YAAY,CAAC,CACd,CACF,EAEC1C,WAAW,IAAI8B,eAAe,CAAC,CACpB,CACV,CAAC;AAER"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_blockEditor","_data","_element","_components","_compose","_icons","_i18n","_dom","_icons2","_utils","DEFAULT_INNER_PADDING","SearchEdit","className","attributes","setAttributes","toggleSelection","isSelected","clientId","label","showLabel","placeholder","width","widthUnit","align","buttonText","buttonPosition","buttonUseIcon","isSearchFieldHidden","style","wasJustInsertedIntoNavigationBlock","useSelect","select","getBlockParentsByBlockName","wasBlockJustInserted","blockEditorStore","length","__unstableMarkNextChangeAsNotPersistent","useDispatch","useEffect","borderRadius","border","radius","borderProps","useBorderProps","colorProps","useColorProps","fluidTypographySettings","layout","useSettings","typographyProps","useTypographyProps","typography","fluid","wideSize","unitControlInstanceId","useInstanceId","UnitControl","unitControlInputId","isButtonPositionInside","isButtonPositionOutside","hasNoButton","hasOnlyButton","searchFieldRef","useRef","buttonRef","units","useCustomUnits","availableUnits","defaultValues","PC_WIDTH_DEFAULT","px","PX_WIDTH_DEFAULT","getBlockClassNames","classnames","undefined","buttonPositionControls","role","title","__","isActive","icon","buttonOutside","onClick","buttonInside","noButton","buttonOnly","getButtonPositionIcon","getResizableSides","right","left","renderTextField","textFieldClasses","textFieldStyles","textDecoration","_react","createElement","type","value","onChange","event","target","ref","renderButton","buttonClasses","__experimentalGetElementClassName","buttonStyles","handleButtonClick","Fragment","stripHTML","Icon","search","RichText","identifier","withoutInteractiveFormatting","html","controls","BlockControls","ToolbarGroup","ToolbarButton","toggleLabel","ToolbarDropdownMenu","buttonWithIcon","InspectorControls","PanelBody","BaseControl","id","__experimentalUnitControl","min","isPercentageUnit","MIN_WIDTH","max","step","newWidth","filteredWidth","parseInt","onUnitChange","newUnit","__unstableInputWidth","ButtonGroup","map","widthValue","Button","key","size","variant","padBorderRadius","getWrapperStyles","styles","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","isNonZeroBorderRadius","topLeft","topRight","bottomLeft","bottomRight","Number","isInteger","blockProps","useBlockProps","labelClassnames","ResizableBox","minWidth","enable","onResizeStart","direction","elt","offsetWidth","onResizeStop","delta","showHandle"],"sources":["@wordpress/block-library/src/search/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\n\tBlockControls,\n\tInspectorControls,\n\tRichText,\n\t__experimentalUseBorderProps as useBorderProps,\n\t__experimentalUseColorProps as useColorProps,\n\tgetTypographyClassesAndStyles as useTypographyProps,\n\tstore as blockEditorStore,\n\t__experimentalGetElementClassName,\n\tuseSettings,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tButton,\n\tButtonGroup,\n\tToolbarButton,\n\tResizableBox,\n\tPanelBody,\n\tBaseControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, search } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport {\n\tbuttonOnly,\n\tbuttonOutside,\n\tbuttonInside,\n\tnoButton,\n\tbuttonWithIcon,\n\ttoggleLabel,\n} from './icons';\nimport {\n\tPC_WIDTH_DEFAULT,\n\tPX_WIDTH_DEFAULT,\n\tMIN_WIDTH,\n\tisPercentageUnit,\n} from './utils.js';\n\n// Used to calculate border radius adjustment to avoid \"fat\" corners when\n// button is placed inside wrapper.\nconst DEFAULT_INNER_PADDING = '4px';\n\nexport default function SearchEdit( {\n\tclassName,\n\tattributes,\n\tsetAttributes,\n\ttoggleSelection,\n\tisSelected,\n\tclientId,\n} ) {\n\tconst {\n\t\tlabel,\n\t\tshowLabel,\n\t\tplaceholder,\n\t\twidth,\n\t\twidthUnit,\n\t\talign,\n\t\tbuttonText,\n\t\tbuttonPosition,\n\t\tbuttonUseIcon,\n\t\tisSearchFieldHidden,\n\t\tstyle,\n\t} = attributes;\n\n\tconst wasJustInsertedIntoNavigationBlock = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParentsByBlockName, wasBlockJustInserted } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\t!! getBlockParentsByBlockName( clientId, 'core/navigation' )\n\t\t\t\t\t?.length && wasBlockJustInserted( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( wasJustInsertedIntoNavigationBlock ) {\n\t\t\t// This side-effect should not create an undo level.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( {\n\t\t\t\tshowLabel: false,\n\t\t\t\tbuttonUseIcon: true,\n\t\t\t\tbuttonPosition: 'button-inside',\n\t\t\t} );\n\t\t}\n\t}, [\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\twasJustInsertedIntoNavigationBlock,\n\t\tsetAttributes,\n\t] );\n\n\tconst borderRadius = style?.border?.radius;\n\tconst borderProps = useBorderProps( attributes );\n\n\t// Check for old deprecated numerical border radius. Done as a separate\n\t// check so that a borderRadius style won't overwrite the longhand\n\t// per-corner styles.\n\tif ( typeof borderRadius === 'number' ) {\n\t\tborderProps.style.borderRadius = `${ borderRadius }px`;\n\t}\n\n\tconst colorProps = useColorProps( attributes );\n\tconst [ fluidTypographySettings, layout ] = useSettings(\n\t\t'typography.fluid',\n\t\t'layout'\n\t);\n\tconst typographyProps = useTypographyProps( attributes, {\n\t\ttypography: {\n\t\t\tfluid: fluidTypographySettings,\n\t\t},\n\t\tlayout: {\n\t\t\twideSize: layout?.wideSize,\n\t\t},\n\t} );\n\tconst unitControlInstanceId = useInstanceId( UnitControl );\n\tconst unitControlInputId = `wp-block-search__width-${ unitControlInstanceId }`;\n\tconst isButtonPositionInside = 'button-inside' === buttonPosition;\n\tconst isButtonPositionOutside = 'button-outside' === buttonPosition;\n\tconst hasNoButton = 'no-button' === buttonPosition;\n\tconst hasOnlyButton = 'button-only' === buttonPosition;\n\tconst searchFieldRef = useRef();\n\tconst buttonRef = useRef();\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: [ '%', 'px' ],\n\t\tdefaultValues: { '%': PC_WIDTH_DEFAULT, px: PX_WIDTH_DEFAULT },\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( hasOnlyButton && ! isSelected ) {\n\t\t\tsetAttributes( {\n\t\t\t\tisSearchFieldHidden: true,\n\t\t\t} );\n\t\t}\n\t}, [ hasOnlyButton, isSelected, setAttributes ] );\n\n\t// Show the search field when width changes.\n\tuseEffect( () => {\n\t\tif ( ! hasOnlyButton || ! isSelected ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetAttributes( {\n\t\t\tisSearchFieldHidden: false,\n\t\t} );\n\t}, [ hasOnlyButton, isSelected, setAttributes, width ] );\n\n\tconst getBlockClassNames = () => {\n\t\treturn classnames(\n\t\t\tclassName,\n\t\t\tisButtonPositionInside\n\t\t\t\t? 'wp-block-search__button-inside'\n\t\t\t\t: undefined,\n\t\t\tisButtonPositionOutside\n\t\t\t\t? 'wp-block-search__button-outside'\n\t\t\t\t: undefined,\n\t\t\thasNoButton ? 'wp-block-search__no-button' : undefined,\n\t\t\thasOnlyButton ? 'wp-block-search__button-only' : undefined,\n\t\t\t! buttonUseIcon && ! hasNoButton\n\t\t\t\t? 'wp-block-search__text-button'\n\t\t\t\t: undefined,\n\t\t\tbuttonUseIcon && ! hasNoButton\n\t\t\t\t? 'wp-block-search__icon-button'\n\t\t\t\t: undefined,\n\t\t\thasOnlyButton && isSearchFieldHidden\n\t\t\t\t? 'wp-block-search__searchfield-hidden'\n\t\t\t\t: undefined\n\t\t);\n\t};\n\n\tconst buttonPositionControls = [\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button outside' ),\n\t\t\tisActive: buttonPosition === 'button-outside',\n\t\t\ticon: buttonOutside,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-outside',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button inside' ),\n\t\t\tisActive: buttonPosition === 'button-inside',\n\t\t\ticon: buttonInside,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-inside',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'No button' ),\n\t\t\tisActive: buttonPosition === 'no-button',\n\t\t\ticon: noButton,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'no-button',\n\t\t\t\t\tisSearchFieldHidden: false,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\trole: 'menuitemradio',\n\t\t\ttitle: __( 'Button only' ),\n\t\t\tisActive: buttonPosition === 'button-only',\n\t\t\ticon: buttonOnly,\n\t\t\tonClick: () => {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tbuttonPosition: 'button-only',\n\t\t\t\t\tisSearchFieldHidden: true,\n\t\t\t\t} );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst getButtonPositionIcon = () => {\n\t\tswitch ( buttonPosition ) {\n\t\t\tcase 'button-inside':\n\t\t\t\treturn buttonInside;\n\t\t\tcase 'button-outside':\n\t\t\t\treturn buttonOutside;\n\t\t\tcase 'no-button':\n\t\t\t\treturn noButton;\n\t\t\tcase 'button-only':\n\t\t\t\treturn buttonOnly;\n\t\t}\n\t};\n\n\tconst getResizableSides = () => {\n\t\tif ( hasOnlyButton ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn {\n\t\t\tright: align !== 'right',\n\t\t\tleft: align === 'right',\n\t\t};\n\t};\n\n\tconst renderTextField = () => {\n\t\t// If the input is inside the wrapper, the wrapper gets the border color styles/classes, not the input control.\n\t\tconst textFieldClasses = classnames(\n\t\t\t'wp-block-search__input',\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\ttypographyProps.className\n\t\t);\n\t\tconst textFieldStyles = {\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? { borderRadius }\n\t\t\t\t: borderProps.style ),\n\t\t\t...typographyProps.style,\n\t\t\ttextDecoration: undefined,\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype=\"search\"\n\t\t\t\tclassName={ textFieldClasses }\n\t\t\t\tstyle={ textFieldStyles }\n\t\t\t\taria-label={ __( 'Optional placeholder text' ) }\n\t\t\t\t// We hide the placeholder field's placeholder when there is a value. This\n\t\t\t\t// stops screen readers from reading the placeholder field's placeholder\n\t\t\t\t// which is confusing.\n\t\t\t\tplaceholder={\n\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t}\n\t\t\t\tvalue={ placeholder }\n\t\t\t\tonChange={ ( event ) =>\n\t\t\t\t\tsetAttributes( { placeholder: event.target.value } )\n\t\t\t\t}\n\t\t\t\tref={ searchFieldRef }\n\t\t\t/>\n\t\t);\n\t};\n\n\tconst renderButton = () => {\n\t\t// If the button is inside the wrapper, the wrapper gets the border color styles/classes, not the button.\n\t\tconst buttonClasses = classnames(\n\t\t\t'wp-block-search__button',\n\t\t\tcolorProps.className,\n\t\t\ttypographyProps.className,\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\tbuttonUseIcon ? 'has-icon' : undefined,\n\t\t\t__experimentalGetElementClassName( 'button' )\n\t\t);\n\t\tconst buttonStyles = {\n\t\t\t...colorProps.style,\n\t\t\t...typographyProps.style,\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? { borderRadius }\n\t\t\t\t: borderProps.style ),\n\t\t};\n\t\tconst handleButtonClick = () => {\n\t\t\tif ( hasOnlyButton ) {\n\t\t\t\tsetAttributes( {\n\t\t\t\t\tisSearchFieldHidden: ! isSearchFieldHidden,\n\t\t\t\t} );\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ buttonUseIcon && (\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\tstyle={ buttonStyles }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\tbuttonText\n\t\t\t\t\t\t\t\t? stripHTML( buttonText )\n\t\t\t\t\t\t\t\t: __( 'Search' )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ handleButtonClick }\n\t\t\t\t\t\tref={ buttonRef }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon icon={ search } />\n\t\t\t\t\t</button>\n\t\t\t\t) }\n\n\t\t\t\t{ ! buttonUseIcon && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"buttonText\"\n\t\t\t\t\t\tclassName={ buttonClasses }\n\t\t\t\t\t\tstyle={ buttonStyles }\n\t\t\t\t\t\taria-label={ __( 'Button text' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Add button text…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ buttonText }\n\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\tsetAttributes( { buttonText: html } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ handleButtonClick }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n\n\tconst controls = (\n\t\t<>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\ttitle={ __( 'Toggle search label' ) }\n\t\t\t\t\t\ticon={ toggleLabel }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tclassName={ showLabel ? 'is-pressed' : undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToolbarDropdownMenu\n\t\t\t\t\t\ticon={ getButtonPositionIcon() }\n\t\t\t\t\t\tlabel={ __( 'Change button position' ) }\n\t\t\t\t\t\tcontrols={ buttonPositionControls }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! hasNoButton && (\n\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\ttitle={ __( 'Use button with icon' ) }\n\t\t\t\t\t\t\ticon={ buttonWithIcon }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tbuttonUseIcon: ! buttonUseIcon,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\tbuttonUseIcon ? 'is-pressed' : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Settings' ) }>\n\t\t\t\t\t<BaseControl\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tid={ unitControlInputId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tid={ unitControlInputId }\n\t\t\t\t\t\t\tmin={\n\t\t\t\t\t\t\t\tisPercentageUnit( widthUnit ) ? 0 : MIN_WIDTH\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmax={\n\t\t\t\t\t\t\t\tisPercentageUnit( widthUnit ) ? 100 : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\t\tonChange={ ( newWidth ) => {\n\t\t\t\t\t\t\t\tconst filteredWidth =\n\t\t\t\t\t\t\t\t\twidthUnit === '%' &&\n\t\t\t\t\t\t\t\t\tparseInt( newWidth, 10 ) > 100\n\t\t\t\t\t\t\t\t\t\t? 100\n\t\t\t\t\t\t\t\t\t\t: newWidth;\n\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\twidth: parseInt( filteredWidth, 10 ),\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonUnitChange={ ( newUnit ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t'%' === newUnit\n\t\t\t\t\t\t\t\t\t\t\t? PC_WIDTH_DEFAULT\n\t\t\t\t\t\t\t\t\t\t\t: PX_WIDTH_DEFAULT,\n\t\t\t\t\t\t\t\t\twidthUnit: newUnit,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t__unstableInputWidth={ '80px' }\n\t\t\t\t\t\t\tvalue={ `${ width }${ widthUnit }` }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<ButtonGroup\n\t\t\t\t\t\t\tclassName=\"wp-block-search__components-button-group\"\n\t\t\t\t\t\t\taria-label={ __( 'Percentage Width' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ [ 25, 50, 75, 100 ].map( ( widthValue ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tkey={ widthValue }\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\twidthValue === width &&\n\t\t\t\t\t\t\t\t\t\t\twidthUnit === '%'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'primary'\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: widthValue,\n\t\t\t\t\t\t\t\t\t\t\t\twidthUnit: '%',\n\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ widthValue }%\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</ButtonGroup>\n\t\t\t\t\t</BaseControl>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tconst padBorderRadius = ( radius ) =>\n\t\tradius ? `calc(${ radius } + ${ DEFAULT_INNER_PADDING })` : undefined;\n\n\tconst getWrapperStyles = () => {\n\t\tconst styles = isButtonPositionInside\n\t\t\t? borderProps.style\n\t\t\t: {\n\t\t\t\t\tborderRadius: borderProps.style?.borderRadius,\n\t\t\t\t\tborderTopLeftRadius: borderProps.style?.borderTopLeftRadius,\n\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\tborderProps.style?.borderTopRightRadius,\n\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\tborderProps.style?.borderBottomLeftRadius,\n\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\tborderProps.style?.borderBottomRightRadius,\n\t\t\t };\n\n\t\tconst isNonZeroBorderRadius =\n\t\t\tborderRadius !== undefined && parseInt( borderRadius, 10 ) !== 0;\n\n\t\tif ( isButtonPositionInside && isNonZeroBorderRadius ) {\n\t\t\t// We have button inside wrapper and a border radius value to apply.\n\t\t\t// Add default padding so we don't get \"fat\" corners.\n\t\t\t//\n\t\t\t// CSS calc() is used here to support non-pixel units. The inline\n\t\t\t// style using calc() will only apply if both values have units.\n\n\t\t\tif ( typeof borderRadius === 'object' ) {\n\t\t\t\t// Individual corner border radii present.\n\t\t\t\tconst { topLeft, topRight, bottomLeft, bottomRight } =\n\t\t\t\t\tborderRadius;\n\n\t\t\t\treturn {\n\t\t\t\t\t...styles,\n\t\t\t\t\tborderTopLeftRadius: padBorderRadius( topLeft ),\n\t\t\t\t\tborderTopRightRadius: padBorderRadius( topRight ),\n\t\t\t\t\tborderBottomLeftRadius: padBorderRadius( bottomLeft ),\n\t\t\t\t\tborderBottomRightRadius: padBorderRadius( bottomRight ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// The inline style using calc() will only apply if both values\n\t\t\t// supplied to calc() have units. Deprecated block's may have\n\t\t\t// unitless integer.\n\t\t\tconst radius = Number.isInteger( borderRadius )\n\t\t\t\t? `${ borderRadius }px`\n\t\t\t\t: borderRadius;\n\n\t\t\tstyles.borderRadius = `calc(${ radius } + ${ DEFAULT_INNER_PADDING })`;\n\t\t}\n\n\t\treturn styles;\n\t};\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: getBlockClassNames(),\n\t\tstyle: {\n\t\t\t...typographyProps.style,\n\t\t\t// Input opts out of text decoration.\n\t\t\ttextDecoration: undefined,\n\t\t},\n\t} );\n\n\tconst labelClassnames = classnames(\n\t\t'wp-block-search__label',\n\t\ttypographyProps.className\n\t);\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t{ controls }\n\n\t\t\t{ showLabel && (\n\t\t\t\t<RichText\n\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\tclassName={ labelClassnames }\n\t\t\t\t\taria-label={ __( 'Label text' ) }\n\t\t\t\t\tplaceholder={ __( 'Add label…' ) }\n\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\tvalue={ label }\n\t\t\t\t\tonChange={ ( html ) => setAttributes( { label: html } ) }\n\t\t\t\t\tstyle={ typographyProps.style }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<ResizableBox\n\t\t\t\tsize={ {\n\t\t\t\t\twidth: `${ width }${ widthUnit }`,\n\t\t\t\t} }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'wp-block-search__inside-wrapper',\n\t\t\t\t\tisButtonPositionInside ? borderProps.className : undefined\n\t\t\t\t) }\n\t\t\t\tstyle={ getWrapperStyles() }\n\t\t\t\tminWidth={ MIN_WIDTH }\n\t\t\t\tenable={ getResizableSides() }\n\t\t\t\tonResizeStart={ ( event, direction, elt ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( elt.offsetWidth, 10 ),\n\t\t\t\t\t\twidthUnit: 'px',\n\t\t\t\t\t} );\n\t\t\t\t\ttoggleSelection( false );\n\t\t\t\t} }\n\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\twidth: parseInt( width + delta.width, 10 ),\n\t\t\t\t\t} );\n\t\t\t\t\ttoggleSelection( true );\n\t\t\t\t} }\n\t\t\t\tshowHandle={ isSelected }\n\t\t\t>\n\t\t\t\t{ ( isButtonPositionInside ||\n\t\t\t\t\tisButtonPositionOutside ||\n\t\t\t\t\thasOnlyButton ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t\t{ renderButton() }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t{ hasNoButton && renderTextField() }\n\t\t\t</ResizableBox>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAYA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,KAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAKA,IAAAS,OAAA,GAAAT,OAAA;AAQA,IAAAU,MAAA,GAAAV,OAAA;AAlDA;AACA;AACA;;AAGA;AACA;AACA;;AAgCA;AACA;AACA;;AAgBA;AACA;AACA,MAAMW,qBAAqB,GAAG,KAAK;AAEpB,SAASC,UAAUA,CAAE;EACnCC,SAAS;EACTC,UAAU;EACVC,aAAa;EACbC,eAAe;EACfC,UAAU;EACVC;AACD,CAAC,EAAG;EACH,MAAM;IACLC,KAAK;IACLC,SAAS;IACTC,WAAW;IACXC,KAAK;IACLC,SAAS;IACTC,KAAK;IACLC,UAAU;IACVC,cAAc;IACdC,aAAa;IACbC,mBAAmB;IACnBC;EACD,CAAC,GAAGf,UAAU;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Ae,CAAE,KAAM,CAAC;IACzB,CAAG;IACH0J,YAAY,EAAGA,CAAEtE,KAAK,EAAEmE,SAAS,EAAEC,GAAG,EAAEG,KAAK,KAAM;MAClD5J,aAAa,CAAE;QACdO,KAAK,EAAEiH,QAAQ,CAAEjH,KAAK,GAAGqJ,KAAK,CAACrJ,KAAK,EAAE,EAAG;MAC1C,CAAE,CAAC;MACHN,eAAe,CAAE,IAAK,CAAC;IACxB,CAAG;IACH4J,UAAU,EAAG3J;EAAY,GAEvB,CAAE0C,sBAAsB,IACzBC,uBAAuB,IACvBE,aAAa,KACb,IAAAiC,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAa,QAAA,QACGjB,eAAe,CAAC,CAAC,EACjBY,YAAY,CAAC,CACd,CACF,EAEC1C,WAAW,IAAI8B,eAAe,CAAC,CACpB,CACV,CAAC;AAER"}
@@ -292,7 +292,7 @@ function SearchEdit({
292
292
  onLayout: onLayoutButton
293
293
  }, (0, _react.createElement)(_blockEditor.RichText, {
294
294
  className: "wp-block-search__button",
295
- identifier: "text",
295
+ identifier: "buttonText",
296
296
  tagName: "p",
297
297
  style: richTextButtonStyle,
298
298
  placeholder: buttonPlaceholderText,
@@ -327,7 +327,7 @@ function SearchEdit({
327
327
  accessibilityLabel: getAccessibilityLabelForLabel()
328
328
  }, (0, _react.createElement)(_blockEditor.RichText, {
329
329
  className: "wp-block-search__label",
330
- identifier: "text",
330
+ identifier: "label",
331
331
  tagName: "p",
332
332
  style: _style.default.richTextLabel,
333
333
  placeholder: (0, _i18n.__)('Add label…'),
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_classnames","_interopRequireDefault","_blockEditor","_components","_i18n","_icons","_element","_compose","_style","MIN_BUTTON_WIDTH","MARGINS","styles","widthMargin","marginLeft","paddingLeft","BUTTON_OPTIONS","value","label","__","useIsScreenReaderEnabled","isScreenReaderEnabled","setIsScreenReaderEnabled","useState","useEffect","mounted","changeListener","AccessibilityInfo","addEventListener","enabled","then","screenReaderEnabled","remove","SearchEdit","onFocus","isSelected","attributes","setAttributes","className","blockWidth","style","isButtonSelected","setIsButtonSelected","isLabelSelected","setIsLabelSelected","isPlaceholderSelected","setIsPlaceholderSelected","isLongButton","setIsLongButton","buttonWidth","setButtonWidth","textInputRef","useRef","showLabel","buttonPosition","buttonUseIcon","placeholder","buttonText","hasTextInput","current","blur","maxButtonWidth","Math","floor","tempIsLongButton","onLayoutButton","nativeEvent","width","layout","getBlockClassNames","classnames","undefined","getSelectedButtonPositionLabel","option","blockProps","useBlockProps","controls","_react","createElement","InspectorControls","PanelBody","title","ToggleControl","checked","onChange","SelectControl","position","options","hideCancelButton","isButtonInside","borderStyle","usePreferredColorSchemeStyle","border","borderDark","inputStyle","plainTextInput","plainTextInputDark","baseColors","color","text","placeholderStyle","plainTextPlaceholder","plainTextPlaceholderDark","searchBarStyle","searchBarContainer","flexDirection","getAccessibilityLabelForButton","getAccessibilityLabelForPlaceholder","description","getAccessibilityLabelForLabel","renderTextField","View","searchInputContainer","accessible","accessibilityRole","accessibilityHint","accessibilityLabel","PlainText","ref","numberOfLines","ellipsizeMode","newVal","onBlur","placeholderTextColor","buttonPlaceholderText","baseButtonStyles","blocks","richTextButtonContainerStyle","buttonContainer","buttonContainerWide","background","backgroundColor","borderWidth","richTextButtonStyle","richTextButton","placeholderColor","iconStyles","icon","fill","renderButton","Icon","search","onLayout","RichText","identifier","tagName","withoutInteractiveFormatting","html","minWidth","maxWidth","textAlign","__unstableMobileNoFocusOnMount","unstableOnFocus","selectionColor","richTextButtonCursor","searchBlockContainer","importantForAccessibility","accessibilityElementsHidden","richTextLabel"],"sources":["@wordpress/block-library/src/search/edit.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, AccessibilityInfo } from 'react-native';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tPlainText,\n\tuseBlockProps,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport {\n\tPanelBody,\n\tSelectControl,\n\tToggleControl,\n\tIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { search } from '@wordpress/icons';\nimport { useRef, useEffect, useState } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\n/**\n * Constants\n */\nconst MIN_BUTTON_WIDTH = 75;\nconst MARGINS =\n\tstyles.widthMargin?.marginLeft + styles.widthMargin?.paddingLeft;\n\nconst BUTTON_OPTIONS = [\n\t{ value: 'button-inside', label: __( 'Button inside' ) },\n\t{ value: 'button-outside', label: __( 'Button outside' ) },\n\t{ value: 'no-button', label: __( 'No button' ) },\n];\n\nfunction useIsScreenReaderEnabled() {\n\tconst [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tlet mounted = true;\n\n\t\tconst changeListener = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\t( enabled ) => setIsScreenReaderEnabled( enabled )\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( screenReaderEnabled ) => {\n\t\t\t\tif ( mounted && screenReaderEnabled ) {\n\t\t\t\t\tsetIsScreenReaderEnabled( screenReaderEnabled );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tmounted = false;\n\n\t\t\tchangeListener.remove();\n\t\t};\n\t}, [] );\n\n\treturn isScreenReaderEnabled;\n}\n\nexport default function SearchEdit( {\n\tonFocus,\n\tisSelected,\n\tattributes,\n\tsetAttributes,\n\tclassName,\n\tblockWidth,\n\tstyle,\n} ) {\n\tconst [ isButtonSelected, setIsButtonSelected ] = useState( false );\n\tconst [ isLabelSelected, setIsLabelSelected ] = useState( false );\n\tconst [ isPlaceholderSelected, setIsPlaceholderSelected ] =\n\t\tuseState( false );\n\tconst [ isLongButton, setIsLongButton ] = useState( false );\n\tconst [ buttonWidth, setButtonWidth ] = useState( MIN_BUTTON_WIDTH );\n\tconst isScreenReaderEnabled = useIsScreenReaderEnabled();\n\n\tconst textInputRef = useRef( null );\n\n\tconst {\n\t\tlabel,\n\t\tshowLabel,\n\t\tbuttonPosition,\n\t\tbuttonUseIcon,\n\t\tplaceholder,\n\t\tbuttonText,\n\t} = attributes;\n\n\t/*\n\t * Called when the value of isSelected changes. Blurs the PlainText component\n\t * used by the placeholder when this block loses focus.\n\t */\n\tuseEffect( () => {\n\t\tif ( hasTextInput() && isPlaceholderSelected && ! isSelected ) {\n\t\t\ttextInputRef.current.blur();\n\t\t}\n\t}, [ isSelected ] );\n\n\tuseEffect( () => {\n\t\tconst maxButtonWidth = Math.floor( blockWidth / 2 - MARGINS );\n\t\tconst tempIsLongButton = buttonWidth > maxButtonWidth;\n\n\t\t// Update this value only if it has changed to avoid flickering.\n\t\tif ( isLongButton !== tempIsLongButton ) {\n\t\t\tsetIsLongButton( tempIsLongButton );\n\t\t}\n\t}, [ blockWidth, buttonWidth ] );\n\n\tconst hasTextInput = () => {\n\t\treturn textInputRef && textInputRef.current;\n\t};\n\n\tconst onLayoutButton = ( { nativeEvent } ) => {\n\t\tconst { width } = nativeEvent?.layout;\n\n\t\tif ( width ) {\n\t\t\tsetButtonWidth( width );\n\t\t}\n\t};\n\n\tconst getBlockClassNames = () => {\n\t\treturn classnames(\n\t\t\tclassName,\n\t\t\t'button-inside' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-inside'\n\t\t\t\t: undefined,\n\t\t\t'button-outside' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-outside'\n\t\t\t\t: undefined,\n\t\t\t'no-button' === buttonPosition\n\t\t\t\t? 'wp-block-search__no-button'\n\t\t\t\t: undefined,\n\t\t\t'button-only' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-only'\n\t\t\t\t: undefined,\n\t\t\t! buttonUseIcon && 'no-button' !== buttonPosition\n\t\t\t\t? 'wp-block-search__text-button'\n\t\t\t\t: undefined,\n\t\t\tbuttonUseIcon && 'no-button' !== buttonPosition\n\t\t\t\t? 'wp-block-search__icon-button'\n\t\t\t\t: undefined\n\t\t);\n\t};\n\n\tconst getSelectedButtonPositionLabel = ( option ) => {\n\t\tswitch ( option ) {\n\t\t\tcase 'button-inside':\n\t\t\t\treturn __( 'Inside' );\n\t\t\tcase 'button-outside':\n\t\t\t\treturn __( 'Outside' );\n\t\t\tcase 'no-button':\n\t\t\t\treturn __( 'No button' );\n\t\t}\n\t};\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: getBlockClassNames(),\n\t} );\n\n\tconst controls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Search settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Hide search heading' ) }\n\t\t\t\t\tchecked={ ! showLabel }\n\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Button position' ) }\n\t\t\t\t\tvalue={ getSelectedButtonPositionLabel( buttonPosition ) }\n\t\t\t\t\tonChange={ ( position ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tbuttonPosition: position,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\toptions={ BUTTON_OPTIONS }\n\t\t\t\t\thideCancelButton\n\t\t\t\t/>\n\t\t\t\t{ buttonPosition !== 'no-button' && (\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Use icon button' ) }\n\t\t\t\t\t\tchecked={ buttonUseIcon }\n\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tbuttonUseIcon: ! buttonUseIcon,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst isButtonInside = buttonPosition === 'button-inside';\n\n\tconst borderStyle = usePreferredColorSchemeStyle(\n\t\tstyles.border,\n\t\tstyles.borderDark\n\t);\n\n\tconst inputStyle = [\n\t\t! isButtonInside && borderStyle,\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles.plainTextInput,\n\t\t\tstyles.plainTextInputDark\n\t\t),\n\t\tstyle?.baseColors?.color && { color: style?.baseColors?.color?.text },\n\t];\n\n\tconst placeholderStyle = {\n\t\t...usePreferredColorSchemeStyle(\n\t\t\tstyles.plainTextPlaceholder,\n\t\t\tstyles.plainTextPlaceholderDark\n\t\t),\n\t\t...( style?.baseColors?.color && {\n\t\t\tcolor: style?.baseColors?.color?.text,\n\t\t} ),\n\t};\n\n\tconst searchBarStyle = [\n\t\tstyles.searchBarContainer,\n\t\tisButtonInside && borderStyle,\n\t\tisLongButton && { flexDirection: 'column' },\n\t];\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Button\n\t */\n\tconst getAccessibilityLabelForButton = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-button';\n\t\t}\n\n\t\treturn `${ __(\n\t\t\t'Search button. Current button text is'\n\t\t) } ${ buttonText }`;\n\t};\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Input\n\t * \t\t\t\t\t placeholder field.\n\t */\n\tconst getAccessibilityLabelForPlaceholder = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-input';\n\t\t}\n\n\t\tconst title = __( 'Search input field.' );\n\t\tconst description = placeholder\n\t\t\t? `${ __( 'Current placeholder text is' ) } ${ placeholder }`\n\t\t\t: __( 'No custom placeholder set' );\n\t\treturn `${ title } ${ description }`;\n\t};\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Label field\n\t */\n\tconst getAccessibilityLabelForLabel = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-label';\n\t\t}\n\n\t\treturn `${ __( 'Search block label. Current text is' ) } ${ label }`;\n\t};\n\n\tconst renderTextField = () => {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={ styles.searchInputContainer }\n\t\t\t\taccessible\n\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t? __( 'Double tap to edit placeholder text' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabelForPlaceholder() }\n\t\t\t>\n\t\t\t\t<PlainText\n\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\tisSelected={ isPlaceholderSelected }\n\t\t\t\t\tclassName=\"wp-block-search__input\"\n\t\t\t\t\tstyle={ inputStyle }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode=\"tail\" // Currently only works on ios.\n\t\t\t\t\tlabel={ null }\n\t\t\t\t\tvalue={ placeholder }\n\t\t\t\t\tplaceholder={\n\t\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( newVal ) =>\n\t\t\t\t\t\tsetAttributes( { placeholder: newVal } )\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ () => {\n\t\t\t\t\t\tsetIsPlaceholderSelected( true );\n\t\t\t\t\t\tonFocus();\n\t\t\t\t\t} }\n\t\t\t\t\tonBlur={ () => setIsPlaceholderSelected( false ) }\n\t\t\t\t\tplaceholderTextColor={ placeholderStyle?.color }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t};\n\n\t// To achieve proper expanding and shrinking `RichText` on Android, there is a need to set\n\t// a `placeholder` as an empty string when `RichText` is focused,\n\t// because `AztecView` is calculating a `minWidth` based on placeholder text.\n\tconst buttonPlaceholderText =\n\t\tisButtonSelected ||\n\t\t( ! isButtonSelected && buttonText && buttonText !== '' )\n\t\t\t? ''\n\t\t\t: __( 'Add button text' );\n\n\tconst baseButtonStyles = {\n\t\t...style?.baseColors?.blocks?.[ 'core/button' ]?.color,\n\t\t...attributes?.style?.color,\n\t\t...( style?.color && { text: style.color } ),\n\t};\n\n\tconst richTextButtonContainerStyle = [\n\t\tstyles.buttonContainer,\n\t\tisLongButton && styles.buttonContainerWide,\n\t\tbaseButtonStyles?.background && {\n\t\t\tbackgroundColor: baseButtonStyles.background,\n\t\t\tborderWidth: 0,\n\t\t},\n\t\tstyle?.backgroundColor && {\n\t\t\tbackgroundColor: style.backgroundColor,\n\t\t\tborderWidth: 0,\n\t\t},\n\t];\n\n\tconst richTextButtonStyle = {\n\t\t...styles.richTextButton,\n\t\t...( baseButtonStyles?.text && {\n\t\t\tcolor: baseButtonStyles.text,\n\t\t\tplaceholderColor: baseButtonStyles.text,\n\t\t} ),\n\t};\n\n\tconst iconStyles = {\n\t\t...styles.icon,\n\t\t...( baseButtonStyles?.text && { fill: baseButtonStyles.text } ),\n\t};\n\n\tconst renderButton = () => {\n\t\treturn (\n\t\t\t<View style={ richTextButtonContainerStyle }>\n\t\t\t\t{ buttonUseIcon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t{ ...iconStyles }\n\t\t\t\t\t\tonLayout={ onLayoutButton }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! buttonUseIcon && (\n\t\t\t\t\t<View\n\t\t\t\t\t\taccessible\n\t\t\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\t\t\taccessibilityHint={\n\t\t\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t\t\t? __( 'Double tap to edit button text' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taccessibilityLabel={ getAccessibilityLabelForButton() }\n\t\t\t\t\t\tonLayout={ onLayoutButton }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tclassName=\"wp-block-search__button\"\n\t\t\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\t\tstyle={ richTextButtonStyle }\n\t\t\t\t\t\t\tplaceholder={ buttonPlaceholderText }\n\t\t\t\t\t\t\tvalue={ buttonText }\n\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { buttonText: html } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tminWidth={ MIN_BUTTON_WIDTH }\n\t\t\t\t\t\t\tmaxWidth={ blockWidth - MARGINS }\n\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\tisSelected={ isButtonSelected }\n\t\t\t\t\t\t\t__unstableMobileNoFocusOnMount={ ! isSelected }\n\t\t\t\t\t\t\tunstableOnFocus={ () => {\n\t\t\t\t\t\t\t\tsetIsButtonSelected( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\t\tsetIsButtonSelected( false );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tselectionColor={\n\t\t\t\t\t\t\t\tstyles.richTextButtonCursor?.color\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t);\n\t};\n\n\treturn (\n\t\t<View\n\t\t\t{ ...blockProps }\n\t\t\tstyle={ styles.searchBlockContainer }\n\t\t\timportantForAccessibility={\n\t\t\t\tisSelected ? 'yes' : 'no-hide-descendants'\n\t\t\t}\n\t\t\taccessibilityElementsHidden={ isSelected ? false : true }\n\t\t>\n\t\t\t{ isSelected && controls }\n\n\t\t\t{ showLabel && (\n\t\t\t\t<View\n\t\t\t\t\taccessible\n\t\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\t\taccessibilityHint={\n\t\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t\t? __( 'Double tap to edit label text' )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\taccessibilityLabel={ getAccessibilityLabelForLabel() }\n\t\t\t\t>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tclassName=\"wp-block-search__label\"\n\t\t\t\t\t\tidentifier=\"text\"\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tstyle={ styles.richTextLabel }\n\t\t\t\t\t\tplaceholder={ __( 'Add label…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\tsetAttributes( { label: html } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisSelected={ isLabelSelected }\n\t\t\t\t\t\t__unstableMobileNoFocusOnMount={ ! isSelected }\n\t\t\t\t\t\tunstableOnFocus={ () => {\n\t\t\t\t\t\t\tsetIsLabelSelected( true );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\tsetIsLabelSelected( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tselectionColor={ styles.richTextButtonCursor?.color }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t) }\n\n\t\t\t{ ( 'button-inside' === buttonPosition ||\n\t\t\t\t'button-outside' === buttonPosition ) && (\n\t\t\t\t<View style={ searchBarStyle }>\n\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t{ renderButton() }\n\t\t\t\t</View>\n\t\t\t) }\n\n\t\t\t{ 'button-only' === buttonPosition && renderButton() }\n\t\t\t{ 'no-button' === buttonP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AAK,EAAEiI;IAAK,CAAE,CAC/B;IACDhH,UAAU,EAAGQ,eAAiB;IAC9B4G,8BAA8B,EAAG,CAAEpH,UAAY;IAC/CqH,eAAe,EAAGA,CAAA,KAAM;MACvB5G,kBAAkB,CAAE,IAAK,CAAC;IAC3B,CAAG;IACH8E,MAAM,EAAGA,CAAA,KAAM;MACd9E,kBAAkB,CAAE,KAAM,CAAC;IAC5B,CAAG;IACH6G,cAAc,EAAG7I,cAAM,CAAC8I,oBAAoB,EAAExD;EAAO,CACrD,CACI,CACN,EAEC,CAAE,eAAe,KAAK5C,cAAc,IACrC,gBAAgB,KAAKA,cAAc,KACnC,IAAAuB,MAAA,CAAAC,aAAA,EAAC/E,YAAA,CAAAgH,IAAI;IAACvE,KAAK,EAAG+D;EAAgB,GAC3BO,eAAe,CAAC,CAAC,EACjB6B,YAAY,CAAC,CACV,CACN,EAEC,aAAa,KAAKrF,cAAc,IAAIqF,YAAY,CAAC,CAAC,EAClD,WAAW,KAAKrF,cAAc,IAAIwD,eAAe,CAAC,CAC/C,CAAC;AAET"}
1
+ {"version":3,"names":["_reactNative","require","_classnames","_interopRequireDefault","_blockEditor","_components","_i18n","_icons","_element","_compose","_style","MIN_BUTTON_WIDTH","MARGINS","styles","widthMargin","marginLeft","paddingLeft","BUTTON_OPTIONS","value","label","__","useIsScreenReaderEnabled","isScreenReaderEnabled","setIsScreenReaderEnabled","useState","useEffect","mounted","changeListener","AccessibilityInfo","addEventListener","enabled","then","screenReaderEnabled","remove","SearchEdit","onFocus","isSelected","attributes","setAttributes","className","blockWidth","style","isButtonSelected","setIsButtonSelected","isLabelSelected","setIsLabelSelected","isPlaceholderSelected","setIsPlaceholderSelected","isLongButton","setIsLongButton","buttonWidth","setButtonWidth","textInputRef","useRef","showLabel","buttonPosition","buttonUseIcon","placeholder","buttonText","hasTextInput","current","blur","maxButtonWidth","Math","floor","tempIsLongButton","onLayoutButton","nativeEvent","width","layout","getBlockClassNames","classnames","undefined","getSelectedButtonPositionLabel","option","blockProps","useBlockProps","controls","_react","createElement","InspectorControls","PanelBody","title","ToggleControl","checked","onChange","SelectControl","position","options","hideCancelButton","isButtonInside","borderStyle","usePreferredColorSchemeStyle","border","borderDark","inputStyle","plainTextInput","plainTextInputDark","baseColors","color","text","placeholderStyle","plainTextPlaceholder","plainTextPlaceholderDark","searchBarStyle","searchBarContainer","flexDirection","getAccessibilityLabelForButton","getAccessibilityLabelForPlaceholder","description","getAccessibilityLabelForLabel","renderTextField","View","searchInputContainer","accessible","accessibilityRole","accessibilityHint","accessibilityLabel","PlainText","ref","numberOfLines","ellipsizeMode","newVal","onBlur","placeholderTextColor","buttonPlaceholderText","baseButtonStyles","blocks","richTextButtonContainerStyle","buttonContainer","buttonContainerWide","background","backgroundColor","borderWidth","richTextButtonStyle","richTextButton","placeholderColor","iconStyles","icon","fill","renderButton","Icon","search","onLayout","RichText","identifier","tagName","withoutInteractiveFormatting","html","minWidth","maxWidth","textAlign","__unstableMobileNoFocusOnMount","unstableOnFocus","selectionColor","richTextButtonCursor","searchBlockContainer","importantForAccessibility","accessibilityElementsHidden","richTextLabel"],"sources":["@wordpress/block-library/src/search/edit.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, AccessibilityInfo } from 'react-native';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRichText,\n\tPlainText,\n\tuseBlockProps,\n\tInspectorControls,\n} from '@wordpress/block-editor';\nimport {\n\tPanelBody,\n\tSelectControl,\n\tToggleControl,\n\tIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { search } from '@wordpress/icons';\nimport { useRef, useEffect, useState } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\n/**\n * Constants\n */\nconst MIN_BUTTON_WIDTH = 75;\nconst MARGINS =\n\tstyles.widthMargin?.marginLeft + styles.widthMargin?.paddingLeft;\n\nconst BUTTON_OPTIONS = [\n\t{ value: 'button-inside', label: __( 'Button inside' ) },\n\t{ value: 'button-outside', label: __( 'Button outside' ) },\n\t{ value: 'no-button', label: __( 'No button' ) },\n];\n\nfunction useIsScreenReaderEnabled() {\n\tconst [ isScreenReaderEnabled, setIsScreenReaderEnabled ] =\n\t\tuseState( false );\n\n\tuseEffect( () => {\n\t\tlet mounted = true;\n\n\t\tconst changeListener = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\t( enabled ) => setIsScreenReaderEnabled( enabled )\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( screenReaderEnabled ) => {\n\t\t\t\tif ( mounted && screenReaderEnabled ) {\n\t\t\t\t\tsetIsScreenReaderEnabled( screenReaderEnabled );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tmounted = false;\n\n\t\t\tchangeListener.remove();\n\t\t};\n\t}, [] );\n\n\treturn isScreenReaderEnabled;\n}\n\nexport default function SearchEdit( {\n\tonFocus,\n\tisSelected,\n\tattributes,\n\tsetAttributes,\n\tclassName,\n\tblockWidth,\n\tstyle,\n} ) {\n\tconst [ isButtonSelected, setIsButtonSelected ] = useState( false );\n\tconst [ isLabelSelected, setIsLabelSelected ] = useState( false );\n\tconst [ isPlaceholderSelected, setIsPlaceholderSelected ] =\n\t\tuseState( false );\n\tconst [ isLongButton, setIsLongButton ] = useState( false );\n\tconst [ buttonWidth, setButtonWidth ] = useState( MIN_BUTTON_WIDTH );\n\tconst isScreenReaderEnabled = useIsScreenReaderEnabled();\n\n\tconst textInputRef = useRef( null );\n\n\tconst {\n\t\tlabel,\n\t\tshowLabel,\n\t\tbuttonPosition,\n\t\tbuttonUseIcon,\n\t\tplaceholder,\n\t\tbuttonText,\n\t} = attributes;\n\n\t/*\n\t * Called when the value of isSelected changes. Blurs the PlainText component\n\t * used by the placeholder when this block loses focus.\n\t */\n\tuseEffect( () => {\n\t\tif ( hasTextInput() && isPlaceholderSelected && ! isSelected ) {\n\t\t\ttextInputRef.current.blur();\n\t\t}\n\t}, [ isSelected ] );\n\n\tuseEffect( () => {\n\t\tconst maxButtonWidth = Math.floor( blockWidth / 2 - MARGINS );\n\t\tconst tempIsLongButton = buttonWidth > maxButtonWidth;\n\n\t\t// Update this value only if it has changed to avoid flickering.\n\t\tif ( isLongButton !== tempIsLongButton ) {\n\t\t\tsetIsLongButton( tempIsLongButton );\n\t\t}\n\t}, [ blockWidth, buttonWidth ] );\n\n\tconst hasTextInput = () => {\n\t\treturn textInputRef && textInputRef.current;\n\t};\n\n\tconst onLayoutButton = ( { nativeEvent } ) => {\n\t\tconst { width } = nativeEvent?.layout;\n\n\t\tif ( width ) {\n\t\t\tsetButtonWidth( width );\n\t\t}\n\t};\n\n\tconst getBlockClassNames = () => {\n\t\treturn classnames(\n\t\t\tclassName,\n\t\t\t'button-inside' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-inside'\n\t\t\t\t: undefined,\n\t\t\t'button-outside' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-outside'\n\t\t\t\t: undefined,\n\t\t\t'no-button' === buttonPosition\n\t\t\t\t? 'wp-block-search__no-button'\n\t\t\t\t: undefined,\n\t\t\t'button-only' === buttonPosition\n\t\t\t\t? 'wp-block-search__button-only'\n\t\t\t\t: undefined,\n\t\t\t! buttonUseIcon && 'no-button' !== buttonPosition\n\t\t\t\t? 'wp-block-search__text-button'\n\t\t\t\t: undefined,\n\t\t\tbuttonUseIcon && 'no-button' !== buttonPosition\n\t\t\t\t? 'wp-block-search__icon-button'\n\t\t\t\t: undefined\n\t\t);\n\t};\n\n\tconst getSelectedButtonPositionLabel = ( option ) => {\n\t\tswitch ( option ) {\n\t\t\tcase 'button-inside':\n\t\t\t\treturn __( 'Inside' );\n\t\t\tcase 'button-outside':\n\t\t\t\treturn __( 'Outside' );\n\t\t\tcase 'no-button':\n\t\t\t\treturn __( 'No button' );\n\t\t}\n\t};\n\n\tconst blockProps = useBlockProps( {\n\t\tclassName: getBlockClassNames(),\n\t} );\n\n\tconst controls = (\n\t\t<InspectorControls>\n\t\t\t<PanelBody title={ __( 'Search settings' ) }>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Hide search heading' ) }\n\t\t\t\t\tchecked={ ! showLabel }\n\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tshowLabel: ! showLabel,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Button position' ) }\n\t\t\t\t\tvalue={ getSelectedButtonPositionLabel( buttonPosition ) }\n\t\t\t\t\tonChange={ ( position ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tbuttonPosition: position,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\toptions={ BUTTON_OPTIONS }\n\t\t\t\t\thideCancelButton\n\t\t\t\t/>\n\t\t\t\t{ buttonPosition !== 'no-button' && (\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Use icon button' ) }\n\t\t\t\t\t\tchecked={ buttonUseIcon }\n\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tbuttonUseIcon: ! buttonUseIcon,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</PanelBody>\n\t\t</InspectorControls>\n\t);\n\n\tconst isButtonInside = buttonPosition === 'button-inside';\n\n\tconst borderStyle = usePreferredColorSchemeStyle(\n\t\tstyles.border,\n\t\tstyles.borderDark\n\t);\n\n\tconst inputStyle = [\n\t\t! isButtonInside && borderStyle,\n\t\tusePreferredColorSchemeStyle(\n\t\t\tstyles.plainTextInput,\n\t\t\tstyles.plainTextInputDark\n\t\t),\n\t\tstyle?.baseColors?.color && { color: style?.baseColors?.color?.text },\n\t];\n\n\tconst placeholderStyle = {\n\t\t...usePreferredColorSchemeStyle(\n\t\t\tstyles.plainTextPlaceholder,\n\t\t\tstyles.plainTextPlaceholderDark\n\t\t),\n\t\t...( style?.baseColors?.color && {\n\t\t\tcolor: style?.baseColors?.color?.text,\n\t\t} ),\n\t};\n\n\tconst searchBarStyle = [\n\t\tstyles.searchBarContainer,\n\t\tisButtonInside && borderStyle,\n\t\tisLongButton && { flexDirection: 'column' },\n\t];\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Button\n\t */\n\tconst getAccessibilityLabelForButton = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-button';\n\t\t}\n\n\t\treturn `${ __(\n\t\t\t'Search button. Current button text is'\n\t\t) } ${ buttonText }`;\n\t};\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Input\n\t * \t\t\t\t\t placeholder field.\n\t */\n\tconst getAccessibilityLabelForPlaceholder = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-input';\n\t\t}\n\n\t\tconst title = __( 'Search input field.' );\n\t\tconst description = placeholder\n\t\t\t? `${ __( 'Current placeholder text is' ) } ${ placeholder }`\n\t\t\t: __( 'No custom placeholder set' );\n\t\treturn `${ title } ${ description }`;\n\t};\n\n\t/**\n\t * If a screenreader is enabled, create a descriptive label for this field. If\n\t * not, return a label that is used during automated UI tests.\n\t *\n\t * @return {string} The accessibilityLabel for the Search Label field\n\t */\n\tconst getAccessibilityLabelForLabel = () => {\n\t\tif ( ! isScreenReaderEnabled ) {\n\t\t\treturn 'search-block-label';\n\t\t}\n\n\t\treturn `${ __( 'Search block label. Current text is' ) } ${ label }`;\n\t};\n\n\tconst renderTextField = () => {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tstyle={ styles.searchInputContainer }\n\t\t\t\taccessible\n\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t? __( 'Double tap to edit placeholder text' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabelForPlaceholder() }\n\t\t\t>\n\t\t\t\t<PlainText\n\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\tisSelected={ isPlaceholderSelected }\n\t\t\t\t\tclassName=\"wp-block-search__input\"\n\t\t\t\t\tstyle={ inputStyle }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode=\"tail\" // Currently only works on ios.\n\t\t\t\t\tlabel={ null }\n\t\t\t\t\tvalue={ placeholder }\n\t\t\t\t\tplaceholder={\n\t\t\t\t\t\tplaceholder ? undefined : __( 'Optional placeholder…' )\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( newVal ) =>\n\t\t\t\t\t\tsetAttributes( { placeholder: newVal } )\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ () => {\n\t\t\t\t\t\tsetIsPlaceholderSelected( true );\n\t\t\t\t\t\tonFocus();\n\t\t\t\t\t} }\n\t\t\t\t\tonBlur={ () => setIsPlaceholderSelected( false ) }\n\t\t\t\t\tplaceholderTextColor={ placeholderStyle?.color }\n\t\t\t\t/>\n\t\t\t</View>\n\t\t);\n\t};\n\n\t// To achieve proper expanding and shrinking `RichText` on Android, there is a need to set\n\t// a `placeholder` as an empty string when `RichText` is focused,\n\t// because `AztecView` is calculating a `minWidth` based on placeholder text.\n\tconst buttonPlaceholderText =\n\t\tisButtonSelected ||\n\t\t( ! isButtonSelected && buttonText && buttonText !== '' )\n\t\t\t? ''\n\t\t\t: __( 'Add button text' );\n\n\tconst baseButtonStyles = {\n\t\t...style?.baseColors?.blocks?.[ 'core/button' ]?.color,\n\t\t...attributes?.style?.color,\n\t\t...( style?.color && { text: style.color } ),\n\t};\n\n\tconst richTextButtonContainerStyle = [\n\t\tstyles.buttonContainer,\n\t\tisLongButton && styles.buttonContainerWide,\n\t\tbaseButtonStyles?.background && {\n\t\t\tbackgroundColor: baseButtonStyles.background,\n\t\t\tborderWidth: 0,\n\t\t},\n\t\tstyle?.backgroundColor && {\n\t\t\tbackgroundColor: style.backgroundColor,\n\t\t\tborderWidth: 0,\n\t\t},\n\t];\n\n\tconst richTextButtonStyle = {\n\t\t...styles.richTextButton,\n\t\t...( baseButtonStyles?.text && {\n\t\t\tcolor: baseButtonStyles.text,\n\t\t\tplaceholderColor: baseButtonStyles.text,\n\t\t} ),\n\t};\n\n\tconst iconStyles = {\n\t\t...styles.icon,\n\t\t...( baseButtonStyles?.text && { fill: baseButtonStyles.text } ),\n\t};\n\n\tconst renderButton = () => {\n\t\treturn (\n\t\t\t<View style={ richTextButtonContainerStyle }>\n\t\t\t\t{ buttonUseIcon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t{ ...iconStyles }\n\t\t\t\t\t\tonLayout={ onLayoutButton }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ ! buttonUseIcon && (\n\t\t\t\t\t<View\n\t\t\t\t\t\taccessible\n\t\t\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\t\t\taccessibilityHint={\n\t\t\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t\t\t? __( 'Double tap to edit button text' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taccessibilityLabel={ getAccessibilityLabelForButton() }\n\t\t\t\t\t\tonLayout={ onLayoutButton }\n\t\t\t\t\t>\n\t\t\t\t\t\t<RichText\n\t\t\t\t\t\t\tclassName=\"wp-block-search__button\"\n\t\t\t\t\t\t\tidentifier=\"buttonText\"\n\t\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\t\tstyle={ richTextButtonStyle }\n\t\t\t\t\t\t\tplaceholder={ buttonPlaceholderText }\n\t\t\t\t\t\t\tvalue={ buttonText }\n\t\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { buttonText: html } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tminWidth={ MIN_BUTTON_WIDTH }\n\t\t\t\t\t\t\tmaxWidth={ blockWidth - MARGINS }\n\t\t\t\t\t\t\ttextAlign=\"center\"\n\t\t\t\t\t\t\tisSelected={ isButtonSelected }\n\t\t\t\t\t\t\t__unstableMobileNoFocusOnMount={ ! isSelected }\n\t\t\t\t\t\t\tunstableOnFocus={ () => {\n\t\t\t\t\t\t\t\tsetIsButtonSelected( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\t\tsetIsButtonSelected( false );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tselectionColor={\n\t\t\t\t\t\t\t\tstyles.richTextButtonCursor?.color\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t</View>\n\t\t);\n\t};\n\n\treturn (\n\t\t<View\n\t\t\t{ ...blockProps }\n\t\t\tstyle={ styles.searchBlockContainer }\n\t\t\timportantForAccessibility={\n\t\t\t\tisSelected ? 'yes' : 'no-hide-descendants'\n\t\t\t}\n\t\t\taccessibilityElementsHidden={ isSelected ? false : true }\n\t\t>\n\t\t\t{ isSelected && controls }\n\n\t\t\t{ showLabel && (\n\t\t\t\t<View\n\t\t\t\t\taccessible\n\t\t\t\t\taccessibilityRole=\"none\"\n\t\t\t\t\taccessibilityHint={\n\t\t\t\t\t\tisScreenReaderEnabled\n\t\t\t\t\t\t\t? __( 'Double tap to edit label text' )\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\taccessibilityLabel={ getAccessibilityLabelForLabel() }\n\t\t\t\t>\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tclassName=\"wp-block-search__label\"\n\t\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\t\ttagName=\"p\"\n\t\t\t\t\t\tstyle={ styles.richTextLabel }\n\t\t\t\t\t\tplaceholder={ __( 'Add label…' ) }\n\t\t\t\t\t\twithoutInteractiveFormatting\n\t\t\t\t\t\tvalue={ label }\n\t\t\t\t\t\tonChange={ ( html ) =>\n\t\t\t\t\t\t\tsetAttributes( { label: html } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tisSelected={ isLabelSelected }\n\t\t\t\t\t\t__unstableMobileNoFocusOnMount={ ! isSelected }\n\t\t\t\t\t\tunstableOnFocus={ () => {\n\t\t\t\t\t\t\tsetIsLabelSelected( true );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\tsetIsLabelSelected( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tselectionColor={ styles.richTextButtonCursor?.color }\n\t\t\t\t\t/>\n\t\t\t\t</View>\n\t\t\t) }\n\n\t\t\t{ ( 'button-inside' === buttonPosition ||\n\t\t\t\t'button-outside' === buttonPosition ) && (\n\t\t\t\t<View style={ searchBarStyle }>\n\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t{ renderButton() }\n\t\t\t\t</View>\n\t\t\t) }\n\n\t\t\t{ 'button-only' === buttonPosition && renderButton() }\n\t\t\t{ 'no-button' === buttonPosition && renderTextField() }\n\t\t</View>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,YAAA,GAAAH,OAAA;AAMA,IAAAI,WAAA,GAAAJ,OAAA;AAMA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,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D;EAAO,CACrD,CACI,CACN,EAEC,CAAE,eAAe,KAAK5C,cAAc,IACrC,gBAAgB,KAAKA,cAAc,KACnC,IAAAuB,MAAA,CAAAC,aAAA,EAAC/E,YAAA,CAAAgH,IAAI;IAACvE,KAAK,EAAG+D;EAAgB,GAC3BO,eAAe,CAAC,CAAC,EACjB6B,YAAY,CAAC,CACV,CACN,EAEC,aAAa,KAAKrF,cAAc,IAAIqF,YAAY,CAAC,CAAC,EAClD,WAAW,KAAKrF,cAAc,IAAIwD,eAAe,CAAC,CAC/C,CAAC;AAET"}
@@ -118,7 +118,7 @@ const SocialLinkEdit = ({
118
118
  help: (0, _i18n.__)('Briefly describe the link to help screen reader users.'),
119
119
  value: label || '',
120
120
  onChange: value => setAttributes({
121
- label: value
121
+ label: value || undefined
122
122
  })
123
123
  })))), (0, _react.createElement)(_blockEditor.InspectorControls, {
124
124
  group: "advanced"
@@ -1 +1 @@
1
- {"version":3,"names":["_classnames","_interopRequireDefault","require","_keycodes","_data","_blockEditor","_element","_components","_i18n","_icons","_socialList","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","useDispatch","blockEditorStore","_react","createElement","URLPopover","anchor","onClose","className","onSubmit","event","preventDefault","URLInput","__nextHasNoMarginBottom","value","onChange","nextURL","placeholder","__","disableSuggestions","onKeyDown","defaultPrevented","BACKSPACE","DELETE","includes","keyCode","Button","icon","keyboardReturn","label","type","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","useState","classes","classNames","setPopoverAnchor","IconComponent","getIconBySite","socialLinkName","getNameBySite","socialLinkLabel","blockProps","useBlockProps","style","color","backgroundColor","Fragment","InspectorControls","PanelBody","title","sprintf","initialOpen","PanelRow","TextControl","help","group","ref","onClick","_default","exports","default"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\tonClose={ () => setPopover( false ) }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter address' ) }\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t/>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label, rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst classes = classNames( 'wp-social-link', 'wp-social-link-' + service, {\n\t\t'wp-social-link__is-incomplete': ! url,\n\t\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\ticonBackgroundColor,\n\t} );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\tconst socialLinkLabel = label ?? socialLinkName;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: {\n\t\t\tcolor: iconColorValue,\n\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody\n\t\t\t\t\ttitle={ sprintf(\n\t\t\t\t\t\t/* translators: %s: name of the social service. */\n\t\t\t\t\t\t__( '%s label' ),\n\t\t\t\t\t\tsocialLinkName\n\t\t\t\t\t) }\n\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Link label' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Briefly describe the link to help screen reader users.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label || '' }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<li { ...blockProps }>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"wp-block-social-link-anchor\"\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t\tonClick={ () => setPopover( true ) }\n\t\t\t\t>\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classNames( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkLabel }\n\t\t\t\t\t</span>\n\t\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\t\tclientId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AK,EAAG,IAAAX,QAAE,EAAE,UAAW,CAAG;IAC1BJ,KAAK,EAAGsB,GAAG,IAAI,EAAI;IACnBrB,QAAQ,EAAKD,KAAK,IAAMlB,aAAa,CAAE;MAAEwC,GAAG,EAAEtB;IAAM,CAAE;EAAG,CACzD,CACiB,CAAC,EACpB,IAAAX,MAAA,CAAAC,aAAA;IAAA,GAASgD;EAAU,GAClB,IAAAjD,MAAA,CAAAC,aAAA,EAACd,WAAA,CAAAoC,MAAM;IACNlB,SAAS,EAAC,6BAA6B;IACvC2D,GAAG,EAAGrB,gBAAkB;IACxBsB,OAAO,EAAGA,CAAA,KAAMvE,UAAU,CAAE,IAAK;EAAG,GAEpC,IAAAM,MAAA,CAAAC,aAAA,EAAC2C,aAAa,MAAE,CAAC,EACjB,IAAA5C,MAAA,CAAAC,aAAA;IACCI,SAAS,EAAG,IAAAqC,mBAAU,EAAE,4BAA4B,EAAE;MACrD,oBAAoB,EAAE,CAAER;IACzB,CAAE;EAAG,GAEHc,eACG,CAAC,EACLjB,UAAU,IAAIQ,cAAc,IAC7B,IAAAvC,MAAA,CAAAC,aAAA,EAACV,oBAAoB;IACpBC,GAAG,EAAGA,GAAK;IACXC,aAAa,EAAGA,aAAe;IAC/BC,UAAU,EAAGA,UAAY;IACzBC,aAAa,EAAGA,aAAe;IAC/BC,QAAQ,EAAGA;EAAU,CACrB,CAEK,CACL,CACH,CAAC;AAEL,CAAC;AAAC,IAAAsE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaxC,cAAc"}
1
+ {"version":3,"names":["_classnames","_interopRequireDefault","require","_keycodes","_data","_blockEditor","_element","_components","_i18n","_icons","_socialList","SocialLinkURLPopover","url","setAttributes","setPopover","popoverAnchor","clientId","removeBlock","useDispatch","blockEditorStore","_react","createElement","URLPopover","anchor","onClose","className","onSubmit","event","preventDefault","URLInput","__nextHasNoMarginBottom","value","onChange","nextURL","placeholder","__","disableSuggestions","onKeyDown","defaultPrevented","BACKSPACE","DELETE","includes","keyCode","Button","icon","keyboardReturn","label","type","SocialLinkEdit","attributes","context","isSelected","service","rel","showLabels","iconColor","iconColorValue","iconBackgroundColor","iconBackgroundColorValue","showURLPopover","useState","classes","classNames","setPopoverAnchor","IconComponent","getIconBySite","socialLinkName","getNameBySite","socialLinkLabel","blockProps","useBlockProps","style","color","backgroundColor","Fragment","InspectorControls","PanelBody","title","sprintf","initialOpen","PanelRow","TextControl","help","undefined","group","ref","onClick","_default","exports","default"],"sources":["@wordpress/block-library/src/social-link/edit.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { DELETE, BACKSPACE } from '@wordpress/keycodes';\nimport { useDispatch } from '@wordpress/data';\n\nimport {\n\tInspectorControls,\n\tURLPopover,\n\tURLInput,\n\tuseBlockProps,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\tPanelBody,\n\tPanelRow,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { getIconBySite, getNameBySite } from './social-list';\n\nconst SocialLinkURLPopover = ( {\n\turl,\n\tsetAttributes,\n\tsetPopover,\n\tpopoverAnchor,\n\tclientId,\n} ) => {\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<URLPopover\n\t\t\tanchor={ popoverAnchor }\n\t\t\tonClose={ () => setPopover( false ) }\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"block-editor-url-popover__link-editor\"\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetPopover( false );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-url-input\">\n\t\t\t\t\t<URLInput\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tvalue={ url }\n\t\t\t\t\t\tonChange={ ( nextURL ) =>\n\t\t\t\t\t\t\tsetAttributes( { url: nextURL } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tplaceholder={ __( 'Enter address' ) }\n\t\t\t\t\t\tdisableSuggestions\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t!! url ||\n\t\t\t\t\t\t\t\tevent.defaultPrevented ||\n\t\t\t\t\t\t\t\t! [ BACKSPACE, DELETE ].includes(\n\t\t\t\t\t\t\t\t\tevent.keyCode\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<Button\n\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t/>\n\t\t\t</form>\n\t\t</URLPopover>\n\t);\n};\n\nconst SocialLinkEdit = ( {\n\tattributes,\n\tcontext,\n\tisSelected,\n\tsetAttributes,\n\tclientId,\n} ) => {\n\tconst { url, service, label, rel } = attributes;\n\tconst {\n\t\tshowLabels,\n\t\ticonColor,\n\t\ticonColorValue,\n\t\ticonBackgroundColor,\n\t\ticonBackgroundColorValue,\n\t} = context;\n\tconst [ showURLPopover, setPopover ] = useState( false );\n\tconst classes = classNames( 'wp-social-link', 'wp-social-link-' + service, {\n\t\t'wp-social-link__is-incomplete': ! url,\n\t\t[ `has-${ iconColor }-color` ]: iconColor,\n\t\t[ `has-${ iconBackgroundColor }-background-color` ]:\n\t\t\ticonBackgroundColor,\n\t} );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\n\tconst IconComponent = getIconBySite( service );\n\tconst socialLinkName = getNameBySite( service );\n\tconst socialLinkLabel = label ?? socialLinkName;\n\tconst blockProps = useBlockProps( {\n\t\tclassName: classes,\n\t\tstyle: {\n\t\t\tcolor: iconColorValue,\n\t\t\tbackgroundColor: iconBackgroundColorValue,\n\t\t},\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody\n\t\t\t\t\ttitle={ sprintf(\n\t\t\t\t\t\t/* translators: %s: name of the social service. */\n\t\t\t\t\t\t__( '%s label' ),\n\t\t\t\t\t\tsocialLinkName\n\t\t\t\t\t) }\n\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t>\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Link label' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Briefly describe the link to help screen reader users.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ label || '' }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( { label: value || undefined } )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\t\tvalue={ rel || '' }\n\t\t\t\t\tonChange={ ( value ) => setAttributes( { rel: value } ) }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t\t<li { ...blockProps }>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"wp-block-social-link-anchor\"\n\t\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\t\tonClick={ () => setPopover( true ) }\n\t\t\t\t>\n\t\t\t\t\t<IconComponent />\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classNames( 'wp-block-social-link-label', {\n\t\t\t\t\t\t\t'screen-reader-text': ! showLabels,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ socialLinkLabel }\n\t\t\t\t\t</span>\n\t\t\t\t\t{ isSelected && showURLPopover && (\n\t\t\t\t\t\t<SocialLinkURLPopover\n\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\t\t\tsetPopover={ setPopover }\n\t\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</li>\n\t\t</>\n\t);\n};\n\nexport default SocialLinkEdit;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAMA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAKA,IAAAQ,WAAA,GAAAR,OAAA;AA/BA;AACA;AACA;;AAGA;AACA;AACA;;AAqBA;AACA;AACA;;AAGA,MAAMS,oBAAoB,GAAGA,CAAE;EAC9BC,GAAG;EACHC,aAAa;EACbC,UAAU;EACVC,aAAa;EACbC;AACD,CAAC,KAAM;EACN,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,iBAAW,EAAEC,kBAAiB,CAAC;EACvD,OACC,IAAAC,MAAA,CAAAC,aAAA,EAAChB,YAAA,CAAAiB,UAAU;IACVC,MAAM,EAAGR,aAAe;IACxBS,OAAO,EAAGA,CAAA,KAAMV,UAAU,CAAE,KAAM;EAAG,GAErC,IAAAM,MAAA,CAAAC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,EAAGA;EAAU,CACrB,CAEK,CACL,CACH,CAAC;AAEL,CAAC;AAAC,IAAAuE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEazC,cAAc"}
@@ -16,7 +16,7 @@ const MediumIcon = () => (0, _react.createElement)(_primitives.SVG, {
16
16
  viewBox: "0 0 24 24",
17
17
  version: "1.1"
18
18
  }, (0, _react.createElement)(_primitives.Path, {
19
- d: "M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z"
19
+ d: "M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12"
20
20
  }));
21
21
  exports.MediumIcon = MediumIcon;
22
22
  //# sourceMappingURL=medium.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_primitives","require","MediumIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/medium.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const MediumIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M20.962,7.257l-5.457,8.867l-3.923-6.375l3.126-5.08c0.112-0.182,0.319-0.286,0.527-0.286c0.05,0,0.1,0.008,0.149,0.02 c0.039,0.01,0.078,0.023,0.114,0.041l5.43,2.715l0.006,0.003c0.004,0.002,0.007,0.006,0.011,0.008 C20.971,7.191,20.98,7.227,20.962,7.257z M9.86,8.592v5.783l5.14,2.57L9.86,8.592z M15.772,17.331l4.231,2.115 C20.554,19.721,21,19.529,21,19.016V8.835L15.772,17.331z M8.968,7.178L3.665,4.527C3.569,4.479,3.478,4.456,3.395,4.456 C3.163,4.456,3,4.636,3,4.938v11.45c0,0.306,0.224,0.669,0.498,0.806l4.671,2.335c0.12,0.06,0.234,0.088,0.337,0.088 c0.29,0,0.494-0.225,0.494-0.602V7.231C9,7.208,8.988,7.188,8.968,7.178z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAA2mB,CAAE,CACjnB,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"names":["_primitives","require","MediumIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/medium.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const MediumIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M13.2,12c0,3-2.4,5.4-5.3,5.4S2.6,15,2.6,12s2.4-5.4,5.3-5.4S13.2,9,13.2,12 M19.1,12c0,2.8-1.2,5-2.7,5s-2.7-2.3-2.7-5s1.2-5,2.7-5C17.9,7,19.1,9.2,19.1,12 M21.4,12c0,2.5-0.4,4.5-0.9,4.5c-0.5,0-0.9-2-0.9-4.5s0.4-4.5,0.9-4.5C21,7.5,21.4,9.5,21.4,12\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAAqP,CAAE,CAC3P,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
@@ -16,7 +16,7 @@ const RedditIcon = () => (0, _react.createElement)(_primitives.SVG, {
16
16
  viewBox: "0 0 24 24",
17
17
  version: "1.1"
18
18
  }, (0, _react.createElement)(_primitives.Path, {
19
- d: "M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z"
19
+ d: "M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z"
20
20
  }));
21
21
  exports.RedditIcon = RedditIcon;
22
22
  //# sourceMappingURL=reddit.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_primitives","require","RedditIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/reddit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const RedditIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M22 12.068a2.184 2.184 0 0 0-2.186-2.186c-.592 0-1.13.233-1.524.609-1.505-1.075-3.566-1.774-5.86-1.864l1.004-4.695 3.261.699A1.56 1.56 0 1 0 18.255 3c-.61-.001-1.147.357-1.398.877l-3.638-.77a.382.382 0 0 0-.287.053.348.348 0 0 0-.161.251l-1.112 5.233c-2.33.072-4.426.77-5.95 1.864a2.201 2.201 0 0 0-1.523-.61 2.184 2.184 0 0 0-.896 4.176c-.036.215-.053.43-.053.663 0 3.37 3.924 6.111 8.763 6.111s8.763-2.724 8.763-6.11c0-.216-.017-.449-.053-.664A2.207 2.207 0 0 0 22 12.068Zm-15.018 1.56a1.56 1.56 0 0 1 3.118 0c0 .86-.699 1.558-1.559 1.558-.86.018-1.559-.699-1.559-1.559Zm8.728 4.139c-1.076 1.075-3.119 1.147-3.71 1.147-.61 0-2.652-.09-3.71-1.147a.4.4 0 0 1 0-.573.4.4 0 0 1 .574 0c.68.68 2.114.914 3.136.914 1.022 0 2.473-.233 3.136-.914a.4.4 0 0 1 .574 0 .436.436 0 0 1 0 .573Zm-.287-2.563a1.56 1.56 0 0 1 0-3.118c.86 0 1.56.699 1.56 1.56 0 .841-.7 1.558-1.56 1.558Z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAAu2B,CAAE,CAC72B,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}
1
+ {"version":3,"names":["_primitives","require","RedditIcon","_react","createElement","SVG","width","height","viewBox","version","Path","d","exports"],"sources":["@wordpress/block-library/src/social-link/icons/reddit.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const RedditIcon = () => (\n\t<SVG width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" version=\"1.1\">\n\t\t<Path d=\"M5.27 9.221A2.775 2.775 0 0 0 2.498 11.993a2.785 2.785 0 0 0 1.6 2.511 5.337 5.337 0 0 0 2.374 4.11 9.386 9.386 0 0 0 5.539 1.7 9.386 9.386 0 0 0 5.541-1.7 5.331 5.331 0 0 0 2.372-4.114 2.787 2.787 0 0 0 1.583-2.5 2.775 2.775 0 0 0-2.772-2.772 2.742 2.742 0 0 0-1.688.574 9.482 9.482 0 0 0-4.637-1.348v-.008a2.349 2.349 0 0 1 2.011-2.316 1.97 1.97 0 0 0 1.926 1.521 1.98 1.98 0 0 0 1.978-1.978 1.98 1.98 0 0 0-1.978-1.978 1.985 1.985 0 0 0-1.938 1.578 3.183 3.183 0 0 0-2.849 3.172v.011a9.463 9.463 0 0 0-4.59 1.35 2.741 2.741 0 0 0-1.688-.574Zm6.736 9.1a3.162 3.162 0 0 1-2.921-1.944.215.215 0 0 1 .014-.2.219.219 0 0 1 .168-.106 27.327 27.327 0 0 1 2.74-.133 27.357 27.357 0 0 1 2.74.133.219.219 0 0 1 .168.106.215.215 0 0 1 .014.2 3.158 3.158 0 0 1-2.921 1.944Zm3.743-3.157a1.265 1.265 0 0 1-1.4-1.371 1.954 1.954 0 0 1 .482-1.442 1.15 1.15 0 0 1 .842-.379 1.7 1.7 0 0 1 1.49 1.777 1.323 1.323 0 0 1-.325 1.015 1.476 1.476 0 0 1-1.089.4Zm-7.485 0a1.476 1.476 0 0 1-1.086-.4 1.323 1.323 0 0 1-.325-1.016 1.7 1.7 0 0 1 1.49-1.777 1.151 1.151 0 0 1 .843.379 1.951 1.951 0 0 1 .481 1.441 1.276 1.276 0 0 1-1.403 1.373Z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,UAAU,GAAGA,CAAA,KACzB,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,KAAK,EAAC,IAAI;EAACC,MAAM,EAAC,IAAI;EAACC,OAAO,EAAC,WAAW;EAACC,OAAO,EAAC;AAAK,GAC5D,IAAAN,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAU,IAAI;EAACC,CAAC,EAAC;AAA+lC,CAAE,CACrmC,CACL;AAACC,OAAA,CAAAV,UAAA,GAAAA,UAAA"}