@wordpress/block-library 10.0.1-next.v.202606191442.0 → 10.1.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 (249) hide show
  1. package/CHANGELOG.md +4 -1
  2. package/build/audio/edit.cjs +8 -1
  3. package/build/audio/edit.cjs.map +2 -2
  4. package/build/breadcrumbs/edit.cjs +0 -1
  5. package/build/breadcrumbs/edit.cjs.map +2 -2
  6. package/build/button/edit.cjs +0 -1
  7. package/build/button/edit.cjs.map +2 -2
  8. package/build/cover/edit/embed-video-url-input.cjs +0 -1
  9. package/build/cover/edit/embed-video-url-input.cjs.map +2 -2
  10. package/build/details/edit.cjs +0 -1
  11. package/build/details/edit.cjs.map +2 -2
  12. package/build/form/edit.cjs +0 -2
  13. package/build/form/edit.cjs.map +2 -2
  14. package/build/form-input/edit.cjs +0 -2
  15. package/build/form-input/edit.cjs.map +2 -2
  16. package/build/freeform/edit.cjs +5 -14
  17. package/build/freeform/edit.cjs.map +3 -3
  18. package/build/freeform/migration-notice.cjs.map +2 -2
  19. package/build/home-link/edit.cjs +0 -1
  20. package/build/home-link/edit.cjs.map +2 -2
  21. package/build/html/modal.cjs +6 -3
  22. package/build/html/modal.cjs.map +2 -2
  23. package/build/icon/edit.cjs +2 -4
  24. package/build/icon/edit.cjs.map +2 -2
  25. package/build/image/image.cjs +0 -2
  26. package/build/image/image.cjs.map +2 -2
  27. package/build/image/use-open-image-media-editor-modal.cjs +5 -25
  28. package/build/image/use-open-image-media-editor-modal.cjs.map +2 -2
  29. package/build/list/ordered-list-settings.cjs +0 -1
  30. package/build/list/ordered-list-settings.cjs.map +2 -2
  31. package/build/navigation/edit/index.cjs +9 -9
  32. package/build/navigation/edit/index.cjs.map +2 -2
  33. package/build/navigation/edit/navigation-menu-name-control.cjs +0 -1
  34. package/build/navigation/edit/navigation-menu-name-control.cjs.map +2 -2
  35. package/build/navigation-link/block.json +1 -1
  36. package/build/navigation-link/link-ui/page-creator.cjs +0 -1
  37. package/build/navigation-link/link-ui/page-creator.cjs.map +2 -2
  38. package/build/navigation-link/shared/controls.cjs +0 -2
  39. package/build/navigation-link/shared/controls.cjs.map +2 -2
  40. package/build/playlist-track/edit.cjs +0 -3
  41. package/build/playlist-track/edit.cjs.map +2 -2
  42. package/build/post-comment/edit.cjs +0 -1
  43. package/build/post-comment/edit.cjs.map +2 -2
  44. package/build/post-featured-image/edit.cjs +0 -1
  45. package/build/post-featured-image/edit.cjs.map +2 -2
  46. package/build/post-terms/edit.cjs +0 -1
  47. package/build/post-terms/edit.cjs.map +2 -2
  48. package/build/post-title/edit.cjs +0 -1
  49. package/build/post-title/edit.cjs.map +2 -2
  50. package/build/query/edit/enhanced-pagination-modal.cjs +10 -1
  51. package/build/query/edit/enhanced-pagination-modal.cjs.map +3 -3
  52. package/build/query/edit/inspector-controls/index.cjs +0 -1
  53. package/build/query/edit/inspector-controls/index.cjs.map +2 -2
  54. package/build/rss/edit.cjs +0 -1
  55. package/build/rss/edit.cjs.map +2 -2
  56. package/build/search/block.json +4 -0
  57. package/build/search/edit.cjs +242 -204
  58. package/build/search/edit.cjs.map +2 -2
  59. package/build/site-logo/edit.cjs +2 -1
  60. package/build/site-logo/edit.cjs.map +2 -2
  61. package/build/social-link/edit.cjs +0 -3
  62. package/build/social-link/edit.cjs.map +2 -2
  63. package/build/tab-list/block.json +2 -2
  64. package/build/tab-list/edit.cjs +14 -8
  65. package/build/tab-list/edit.cjs.map +2 -2
  66. package/build/tab-list/init.cjs +28 -0
  67. package/build/tab-list/init.cjs.map +7 -0
  68. package/build/tab-panel/edit.cjs +0 -9
  69. package/build/tab-panel/edit.cjs.map +2 -2
  70. package/build/tab-panel/save.cjs +2 -1
  71. package/build/tab-panel/save.cjs.map +2 -2
  72. package/build/tab-panels/block.json +0 -1
  73. package/build/tab-panels/init.cjs +28 -0
  74. package/build/tab-panels/init.cjs.map +7 -0
  75. package/build/table/edit.cjs +0 -2
  76. package/build/table/edit.cjs.map +2 -2
  77. package/build/tabs/view.cjs +20 -94
  78. package/build/tabs/view.cjs.map +2 -2
  79. package/build/template-part/edit/advanced-controls.cjs +0 -1
  80. package/build/template-part/edit/advanced-controls.cjs.map +2 -2
  81. package/build/template-part/edit/title-modal.cjs +1 -2
  82. package/build/template-part/edit/title-modal.cjs.map +2 -2
  83. package/build/video/edit.cjs +3 -2
  84. package/build/video/edit.cjs.map +2 -2
  85. package/build/video/tracks-editor.cjs +0 -2
  86. package/build/video/tracks-editor.cjs.map +2 -2
  87. package/build-module/audio/edit.mjs +8 -2
  88. package/build-module/audio/edit.mjs.map +2 -2
  89. package/build-module/breadcrumbs/edit.mjs +0 -1
  90. package/build-module/breadcrumbs/edit.mjs.map +2 -2
  91. package/build-module/button/edit.mjs +0 -1
  92. package/build-module/button/edit.mjs.map +2 -2
  93. package/build-module/cover/edit/embed-video-url-input.mjs +0 -1
  94. package/build-module/cover/edit/embed-video-url-input.mjs.map +2 -2
  95. package/build-module/details/edit.mjs +0 -1
  96. package/build-module/details/edit.mjs.map +2 -2
  97. package/build-module/form/edit.mjs +0 -2
  98. package/build-module/form/edit.mjs.map +2 -2
  99. package/build-module/form-input/edit.mjs +0 -2
  100. package/build-module/form-input/edit.mjs.map +2 -2
  101. package/build-module/freeform/edit.mjs +5 -14
  102. package/build-module/freeform/edit.mjs.map +2 -2
  103. package/build-module/freeform/migration-notice.mjs.map +2 -2
  104. package/build-module/home-link/edit.mjs +0 -1
  105. package/build-module/home-link/edit.mjs.map +2 -2
  106. package/build-module/html/modal.mjs +6 -3
  107. package/build-module/html/modal.mjs.map +2 -2
  108. package/build-module/icon/edit.mjs +2 -4
  109. package/build-module/icon/edit.mjs.map +2 -2
  110. package/build-module/image/image.mjs +0 -2
  111. package/build-module/image/image.mjs.map +2 -2
  112. package/build-module/image/use-open-image-media-editor-modal.mjs +5 -25
  113. package/build-module/image/use-open-image-media-editor-modal.mjs.map +2 -2
  114. package/build-module/list/ordered-list-settings.mjs +0 -1
  115. package/build-module/list/ordered-list-settings.mjs.map +2 -2
  116. package/build-module/navigation/edit/index.mjs +9 -9
  117. package/build-module/navigation/edit/index.mjs.map +2 -2
  118. package/build-module/navigation/edit/navigation-menu-name-control.mjs +0 -1
  119. package/build-module/navigation/edit/navigation-menu-name-control.mjs.map +2 -2
  120. package/build-module/navigation-link/block.json +1 -1
  121. package/build-module/navigation-link/link-ui/page-creator.mjs +0 -1
  122. package/build-module/navigation-link/link-ui/page-creator.mjs.map +2 -2
  123. package/build-module/navigation-link/shared/controls.mjs +0 -2
  124. package/build-module/navigation-link/shared/controls.mjs.map +2 -2
  125. package/build-module/playlist-track/edit.mjs +0 -3
  126. package/build-module/playlist-track/edit.mjs.map +2 -2
  127. package/build-module/post-comment/edit.mjs +0 -1
  128. package/build-module/post-comment/edit.mjs.map +2 -2
  129. package/build-module/post-featured-image/edit.mjs +0 -1
  130. package/build-module/post-featured-image/edit.mjs.map +2 -2
  131. package/build-module/post-terms/edit.mjs +0 -1
  132. package/build-module/post-terms/edit.mjs.map +2 -2
  133. package/build-module/post-title/edit.mjs +0 -1
  134. package/build-module/post-title/edit.mjs.map +2 -2
  135. package/build-module/query/edit/enhanced-pagination-modal.mjs +10 -1
  136. package/build-module/query/edit/enhanced-pagination-modal.mjs.map +2 -2
  137. package/build-module/query/edit/inspector-controls/index.mjs +0 -1
  138. package/build-module/query/edit/inspector-controls/index.mjs.map +2 -2
  139. package/build-module/rss/edit.mjs +0 -1
  140. package/build-module/rss/edit.mjs.map +2 -2
  141. package/build-module/search/block.json +4 -0
  142. package/build-module/search/edit.mjs +242 -204
  143. package/build-module/search/edit.mjs.map +2 -2
  144. package/build-module/site-logo/edit.mjs +2 -1
  145. package/build-module/site-logo/edit.mjs.map +2 -2
  146. package/build-module/social-link/edit.mjs +0 -3
  147. package/build-module/social-link/edit.mjs.map +2 -2
  148. package/build-module/tab-list/block.json +2 -2
  149. package/build-module/tab-list/edit.mjs +15 -9
  150. package/build-module/tab-list/edit.mjs.map +2 -2
  151. package/build-module/tab-list/init.mjs +7 -0
  152. package/build-module/tab-list/init.mjs.map +7 -0
  153. package/build-module/tab-panel/edit.mjs +1 -10
  154. package/build-module/tab-panel/edit.mjs.map +2 -2
  155. package/build-module/tab-panel/save.mjs +2 -1
  156. package/build-module/tab-panel/save.mjs.map +2 -2
  157. package/build-module/tab-panels/block.json +0 -1
  158. package/build-module/tab-panels/init.mjs +7 -0
  159. package/build-module/tab-panels/init.mjs.map +7 -0
  160. package/build-module/table/edit.mjs +0 -2
  161. package/build-module/table/edit.mjs.map +2 -2
  162. package/build-module/tabs/view.mjs +20 -94
  163. package/build-module/tabs/view.mjs.map +2 -2
  164. package/build-module/template-part/edit/advanced-controls.mjs +0 -1
  165. package/build-module/template-part/edit/advanced-controls.mjs.map +2 -2
  166. package/build-module/template-part/edit/title-modal.mjs +1 -2
  167. package/build-module/template-part/edit/title-modal.mjs.map +2 -2
  168. package/build-module/video/edit.mjs +3 -3
  169. package/build-module/video/edit.mjs.map +2 -2
  170. package/build-module/video/tracks-editor.mjs +0 -2
  171. package/build-module/video/tracks-editor.mjs.map +2 -2
  172. package/build-style/editor-rtl.css +0 -15
  173. package/build-style/editor.css +0 -15
  174. package/build-style/style-rtl.css +1 -1
  175. package/build-style/style.css +1 -1
  176. package/build-style/tab-list/style-rtl.css +1 -1
  177. package/build-style/tab-list/style.css +1 -1
  178. package/package.json +40 -40
  179. package/src/audio/edit.js +5 -9
  180. package/src/breadcrumbs/edit.js +0 -1
  181. package/src/button/edit.js +0 -1
  182. package/src/cover/edit/embed-video-url-input.js +0 -1
  183. package/src/cover/test/edit.js +51 -40
  184. package/src/details/edit.js +0 -1
  185. package/src/editor.scss +0 -1
  186. package/src/form/edit.js +0 -2
  187. package/src/form-input/edit.js +0 -2
  188. package/src/freeform/edit.js +6 -29
  189. package/src/freeform/migration-notice.js +2 -4
  190. package/src/home-link/edit.js +0 -1
  191. package/src/html/modal.js +3 -0
  192. package/src/icon/edit.js +0 -2
  193. package/src/image/image.js +0 -2
  194. package/src/image/test/use-open-image-media-editor-modal.js +20 -26
  195. package/src/image/use-open-image-media-editor-modal.js +24 -42
  196. package/src/list/ordered-list-settings.js +0 -1
  197. package/src/navigation/edit/index.js +9 -13
  198. package/src/navigation/edit/navigation-menu-name-control.js +0 -1
  199. package/src/navigation-link/README.md +1 -1
  200. package/src/navigation-link/block.json +1 -1
  201. package/src/navigation-link/link-ui/page-creator.js +0 -1
  202. package/src/navigation-link/shared/controls.js +0 -2
  203. package/src/navigation-link/test/__snapshots__/hooks.js.snap +5 -0
  204. package/src/playlist-track/edit.js +0 -3
  205. package/src/post-comment/edit.js +0 -1
  206. package/src/post-featured-image/edit.js +0 -1
  207. package/src/post-terms/edit.js +0 -1
  208. package/src/post-title/edit.js +0 -1
  209. package/src/query/edit/enhanced-pagination-modal.js +11 -1
  210. package/src/query/edit/inspector-controls/index.js +0 -1
  211. package/src/rss/edit.js +0 -1
  212. package/src/search/README.md +1 -0
  213. package/src/search/block.json +4 -0
  214. package/src/search/edit.js +106 -55
  215. package/src/search/index.php +25 -1
  216. package/src/site-logo/edit.js +3 -1
  217. package/src/social-link/edit.js +0 -3
  218. package/src/tab-list/README.md +1 -1
  219. package/src/tab-list/block.json +2 -2
  220. package/src/tab-list/edit.js +14 -8
  221. package/src/tab-list/index.php +4 -6
  222. package/src/tab-list/init.js +6 -0
  223. package/src/tab-list/style.scss +1 -2
  224. package/src/tab-panel/edit.js +1 -14
  225. package/src/tab-panel/index.php +2 -25
  226. package/src/tab-panel/save.js +1 -0
  227. package/src/tab-panels/block.json +0 -1
  228. package/src/tab-panels/init.js +6 -0
  229. package/src/table/edit.js +0 -2
  230. package/src/tabs/index.php +12 -19
  231. package/src/tabs/view.js +20 -100
  232. package/src/template-part/edit/advanced-controls.js +0 -1
  233. package/src/template-part/edit/title-modal.js +0 -1
  234. package/src/utils/test/style-state.js +26 -26
  235. package/src/video/edit.js +9 -16
  236. package/src/video/tracks-editor.js +0 -2
  237. package/build/freeform/convert-to-blocks-button.cjs +0 -40
  238. package/build/freeform/convert-to-blocks-button.cjs.map +0 -7
  239. package/build/list-item/utils.cjs +0 -57
  240. package/build/list-item/utils.cjs.map +0 -7
  241. package/build-module/freeform/convert-to-blocks-button.mjs +0 -19
  242. package/build-module/freeform/convert-to-blocks-button.mjs.map +0 -7
  243. package/build-module/list-item/utils.mjs +0 -32
  244. package/build-module/list-item/utils.mjs.map +0 -7
  245. package/build-style/tab-list/editor-rtl.css +0 -14
  246. package/build-style/tab-list/editor.css +0 -14
  247. package/src/freeform/convert-to-blocks-button.js +0 -18
  248. package/src/list-item/utils.js +0 -34
  249. package/src/tab-list/editor.scss +0 -17
@@ -42,9 +42,21 @@ var import_compose = require("@wordpress/compose");
42
42
  var import_icons = require("@wordpress/icons");
43
43
  var import_i18n = require("@wordpress/i18n");
44
44
  var import_dom = require("@wordpress/dom");
45
+ var import_a11y = require("@wordpress/a11y");
45
46
  var import_utils = require("./utils.cjs");
46
47
  var import_hooks = require("../utils/hooks.cjs");
47
48
  var import_jsx_runtime = require("react/jsx-runtime");
49
+ var TAG_NAME_MESSAGES = {
50
+ "": (0, import_i18n.__)(
51
+ "Lets the theme decide. Uses the <search> landmark element if the theme opts in, otherwise a <form>."
52
+ ),
53
+ search: (0, import_i18n.__)(
54
+ "Wraps the block in a <search> landmark, announced as a search region by assistive technologies."
55
+ ),
56
+ form: (0, import_i18n.__)(
57
+ 'Uses a <form role="search"> wrapper for backward compatibility with existing theme styles.'
58
+ )
59
+ };
48
60
  var DEFAULT_INNER_PADDING = "4px";
49
61
  var PERCENTAGE_WIDTHS = [25, 50, 75, 100];
50
62
  function SearchEdit({
@@ -65,6 +77,7 @@ function SearchEdit({
65
77
  buttonText,
66
78
  buttonPosition,
67
79
  buttonUseIcon,
80
+ tagName,
68
81
  style
69
82
  } = attributes;
70
83
  const wasJustInsertedIntoNavigationBlock = (0, import_data.useSelect)(
@@ -246,169 +259,191 @@ function SearchEdit({
246
259
  ] });
247
260
  };
248
261
  const dropdownMenuProps = (0, import_hooks.useToolsPanelDropdownMenuProps)();
249
- const controls = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
250
- import_components.__experimentalToolsPanel,
251
- {
252
- label: (0, import_i18n.__)("Settings"),
253
- resetAll: () => {
254
- setAttributes({
255
- width: void 0,
256
- widthUnit: void 0,
257
- showLabel: true,
258
- buttonUseIcon: false,
259
- buttonPosition: "button-outside"
260
- });
261
- },
262
- dropdownMenuProps,
263
- children: [
264
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
265
- import_components.__experimentalToolsPanelItem,
266
- {
267
- hasValue: () => !showLabel,
268
- label: (0, import_i18n.__)("Show label"),
269
- onDeselect: () => {
270
- setAttributes({
271
- showLabel: true
272
- });
273
- },
274
- isShownByDefault: true,
275
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
276
- import_components.ToggleControl,
277
- {
278
- checked: showLabel,
279
- label: (0, import_i18n.__)("Show label"),
280
- onChange: (value) => setAttributes({
281
- showLabel: value
282
- })
283
- }
284
- )
285
- }
286
- ),
287
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
288
- import_components.__experimentalToolsPanelItem,
289
- {
290
- hasValue: () => buttonPosition !== "button-outside",
291
- label: (0, import_i18n.__)("Button position"),
292
- onDeselect: () => {
293
- setAttributes({
294
- buttonPosition: "button-outside"
295
- });
296
- },
297
- isShownByDefault: true,
298
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
299
- import_components.SelectControl,
300
- {
301
- value: buttonPosition,
302
- __next40pxDefaultSize: true,
303
- label: (0, import_i18n.__)("Button position"),
304
- onChange: (value) => {
305
- setAttributes({
306
- buttonPosition: value
307
- });
308
- },
309
- options: buttonPositionControls
310
- }
311
- )
312
- }
313
- ),
314
- buttonPosition !== "no-button" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
315
- import_components.__experimentalToolsPanelItem,
316
- {
317
- hasValue: () => !!buttonUseIcon,
318
- label: (0, import_i18n.__)("Use button with icon"),
319
- onDeselect: () => {
320
- setAttributes({
321
- buttonUseIcon: false
322
- });
323
- },
324
- isShownByDefault: true,
325
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
326
- import_components.ToggleControl,
327
- {
328
- checked: buttonUseIcon,
329
- label: (0, import_i18n.__)("Use button with icon"),
330
- onChange: (value) => setAttributes({
331
- buttonUseIcon: value
332
- })
333
- }
334
- )
335
- }
336
- ),
337
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
338
- import_components.__experimentalToolsPanelItem,
339
- {
340
- hasValue: () => !!width,
341
- label: (0, import_i18n.__)("Width"),
342
- onDeselect: () => {
343
- setAttributes({
344
- width: void 0,
345
- widthUnit: void 0
346
- });
347
- },
348
- isShownByDefault: true,
349
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { children: [
350
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
351
- import_components.__experimentalUnitControl,
262
+ const controls = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
263
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.InspectorControls, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
264
+ import_components.__experimentalToolsPanel,
265
+ {
266
+ label: (0, import_i18n.__)("Settings"),
267
+ resetAll: () => {
268
+ setAttributes({
269
+ width: void 0,
270
+ widthUnit: void 0,
271
+ showLabel: true,
272
+ buttonUseIcon: false,
273
+ buttonPosition: "button-outside"
274
+ });
275
+ },
276
+ dropdownMenuProps,
277
+ children: [
278
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
279
+ import_components.__experimentalToolsPanelItem,
280
+ {
281
+ hasValue: () => !showLabel,
282
+ label: (0, import_i18n.__)("Show label"),
283
+ onDeselect: () => {
284
+ setAttributes({
285
+ showLabel: true
286
+ });
287
+ },
288
+ isShownByDefault: true,
289
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
290
+ import_components.ToggleControl,
352
291
  {
292
+ checked: showLabel,
293
+ label: (0, import_i18n.__)("Show label"),
294
+ onChange: (value) => setAttributes({
295
+ showLabel: value
296
+ })
297
+ }
298
+ )
299
+ }
300
+ ),
301
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
302
+ import_components.__experimentalToolsPanelItem,
303
+ {
304
+ hasValue: () => buttonPosition !== "button-outside",
305
+ label: (0, import_i18n.__)("Button position"),
306
+ onDeselect: () => {
307
+ setAttributes({
308
+ buttonPosition: "button-outside"
309
+ });
310
+ },
311
+ isShownByDefault: true,
312
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
313
+ import_components.SelectControl,
314
+ {
315
+ value: buttonPosition,
353
316
  __next40pxDefaultSize: true,
354
- label: (0, import_i18n.__)("Width"),
355
- id: unitControlInputId,
356
- min: (0, import_utils.isPercentageUnit)(widthUnit) ? 0 : import_utils.MIN_WIDTH,
357
- max: (0, import_utils.isPercentageUnit)(widthUnit) ? 100 : void 0,
358
- step: 1,
359
- onChange: (newWidth) => {
360
- const parsedNewWidth = newWidth === "" ? void 0 : parseInt(newWidth, 10);
361
- setAttributes({
362
- width: parsedNewWidth
363
- });
364
- },
365
- onUnitChange: (newUnit) => {
317
+ label: (0, import_i18n.__)("Button position"),
318
+ onChange: (value) => {
366
319
  setAttributes({
367
- width: "%" === newUnit ? import_utils.PC_WIDTH_DEFAULT : import_utils.PX_WIDTH_DEFAULT,
368
- widthUnit: newUnit
320
+ buttonPosition: value
369
321
  });
370
322
  },
371
- __unstableInputWidth: "80px",
372
- value: `${width}${widthUnit}`,
373
- units
323
+ options: buttonPositionControls
374
324
  }
375
- ),
376
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
377
- import_components.__experimentalToggleGroupControl,
325
+ )
326
+ }
327
+ ),
328
+ buttonPosition !== "no-button" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
329
+ import_components.__experimentalToolsPanelItem,
330
+ {
331
+ hasValue: () => !!buttonUseIcon,
332
+ label: (0, import_i18n.__)("Use button with icon"),
333
+ onDeselect: () => {
334
+ setAttributes({
335
+ buttonUseIcon: false
336
+ });
337
+ },
338
+ isShownByDefault: true,
339
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
340
+ import_components.ToggleControl,
378
341
  {
379
- label: (0, import_i18n.__)("Percentage Width"),
380
- value: PERCENTAGE_WIDTHS.includes(width) && widthUnit === "%" ? width : void 0,
381
- hideLabelFromVision: true,
382
- onChange: (newWidth) => {
383
- setAttributes({
384
- width: newWidth,
385
- widthUnit: "%"
386
- });
387
- },
388
- isBlock: true,
389
- __next40pxDefaultSize: true,
390
- children: PERCENTAGE_WIDTHS.map((widthValue) => {
391
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
392
- import_components.__experimentalToggleGroupControlOption,
393
- {
394
- value: widthValue,
395
- label: (0, import_i18n.sprintf)(
396
- /* translators: %d: Percentage value. */
397
- (0, import_i18n.__)("%d%%"),
398
- widthValue
399
- )
400
- },
401
- widthValue
402
- );
342
+ checked: buttonUseIcon,
343
+ label: (0, import_i18n.__)("Use button with icon"),
344
+ onChange: (value) => setAttributes({
345
+ buttonUseIcon: value
403
346
  })
404
347
  }
405
348
  )
406
- ] })
407
- }
408
- )
409
- ]
410
- }
411
- ) }) });
349
+ }
350
+ ),
351
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
352
+ import_components.__experimentalToolsPanelItem,
353
+ {
354
+ hasValue: () => !!width,
355
+ label: (0, import_i18n.__)("Width"),
356
+ onDeselect: () => {
357
+ setAttributes({
358
+ width: void 0,
359
+ widthUnit: void 0
360
+ });
361
+ },
362
+ isShownByDefault: true,
363
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components.__experimentalVStack, { children: [
364
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
365
+ import_components.__experimentalUnitControl,
366
+ {
367
+ __next40pxDefaultSize: true,
368
+ label: (0, import_i18n.__)("Width"),
369
+ id: unitControlInputId,
370
+ min: (0, import_utils.isPercentageUnit)(widthUnit) ? 0 : import_utils.MIN_WIDTH,
371
+ max: (0, import_utils.isPercentageUnit)(widthUnit) ? 100 : void 0,
372
+ step: 1,
373
+ onChange: (newWidth) => {
374
+ const parsedNewWidth = newWidth === "" ? void 0 : parseInt(newWidth, 10);
375
+ setAttributes({
376
+ width: parsedNewWidth
377
+ });
378
+ },
379
+ onUnitChange: (newUnit) => {
380
+ setAttributes({
381
+ width: "%" === newUnit ? import_utils.PC_WIDTH_DEFAULT : import_utils.PX_WIDTH_DEFAULT,
382
+ widthUnit: newUnit
383
+ });
384
+ },
385
+ __unstableInputWidth: "80px",
386
+ value: `${width}${widthUnit}`,
387
+ units
388
+ }
389
+ ),
390
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
391
+ import_components.__experimentalToggleGroupControl,
392
+ {
393
+ label: (0, import_i18n.__)("Percentage Width"),
394
+ value: PERCENTAGE_WIDTHS.includes(width) && widthUnit === "%" ? width : void 0,
395
+ hideLabelFromVision: true,
396
+ onChange: (newWidth) => {
397
+ setAttributes({
398
+ width: newWidth,
399
+ widthUnit: "%"
400
+ });
401
+ },
402
+ isBlock: true,
403
+ __next40pxDefaultSize: true,
404
+ children: PERCENTAGE_WIDTHS.map((widthValue) => {
405
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
406
+ import_components.__experimentalToggleGroupControlOption,
407
+ {
408
+ value: widthValue,
409
+ label: (0, import_i18n.sprintf)(
410
+ /* translators: %d: Percentage value. */
411
+ (0, import_i18n.__)("%d%%"),
412
+ widthValue
413
+ )
414
+ },
415
+ widthValue
416
+ );
417
+ })
418
+ }
419
+ )
420
+ ] })
421
+ }
422
+ )
423
+ ]
424
+ }
425
+ ) }),
426
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_block_editor.InspectorControls, { group: "advanced", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
427
+ import_components.SelectControl,
428
+ {
429
+ __next40pxDefaultSize: true,
430
+ label: (0, import_i18n.__)("HTML element"),
431
+ value: tagName ?? "",
432
+ options: [
433
+ { label: (0, import_i18n.__)("Default"), value: "" },
434
+ { label: "<search>", value: "search" },
435
+ { label: "<form>", value: "form" }
436
+ ],
437
+ onChange: (value) => {
438
+ setAttributes({ tagName: value });
439
+ (0, import_a11y.speak)(
440
+ TAG_NAME_MESSAGES[value].replace(/[<>]/g, "")
441
+ );
442
+ },
443
+ help: TAG_NAME_MESSAGES[tagName ?? ""]
444
+ }
445
+ ) })
446
+ ] });
412
447
  const isNonZeroBorderRadius = (radius) => radius !== void 0 && parseInt(radius, 10) !== 0;
413
448
  const padBorderRadius = (radius) => isNonZeroBorderRadius(radius) ? `calc(${radius} + ${DEFAULT_INNER_PADDING})` : void 0;
414
449
  const getWrapperStyles = () => {
@@ -456,58 +491,61 @@ function SearchEdit({
456
491
  "wp-block-search__label",
457
492
  typographyProps.className
458
493
  );
459
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...blockProps, children: [
494
+ const Wrapper = "search" === tagName ? "search" : "div";
495
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
460
496
  controls,
461
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
462
- import_block_editor.RichText,
463
- {
464
- identifier: "label",
465
- className: labelClassnames,
466
- "aria-label": (0, import_i18n.__)("Label text"),
467
- placeholder: (0, import_i18n.__)("Add label…"),
468
- withoutInteractiveFormatting: true,
469
- value: label,
470
- onChange: (html) => setAttributes({ label: html }),
471
- style: typographyProps.style
472
- }
473
- ),
474
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
475
- import_components.ResizableBox,
476
- {
477
- size: {
478
- width: width === void 0 ? "auto" : `${width}${widthUnit}`,
479
- height: "auto"
480
- },
481
- className: (0, import_clsx.default)(
482
- "wp-block-search__inside-wrapper",
483
- isButtonPositionInside ? borderProps.className : void 0
484
- ),
485
- style: getWrapperStyles(),
486
- minWidth: import_utils.MIN_WIDTH,
487
- enable: getResizableSides(),
488
- onResizeStart: (event, direction, elt) => {
489
- setAttributes({
490
- width: parseInt(elt.offsetWidth, 10),
491
- widthUnit: "px"
492
- });
493
- toggleSelection(false);
494
- },
495
- onResizeStop: (event, direction, elt, delta) => {
496
- setAttributes({
497
- width: parseInt(width + delta.width, 10)
498
- });
499
- toggleSelection(true);
500
- },
501
- showHandle: isSelected,
502
- children: [
503
- (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
504
- renderTextField(),
505
- renderButton()
506
- ] }),
507
- hasNoButton && renderTextField()
508
- ]
509
- }
510
- )
497
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Wrapper, { ...blockProps, children: [
498
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
499
+ import_block_editor.RichText,
500
+ {
501
+ identifier: "label",
502
+ className: labelClassnames,
503
+ "aria-label": (0, import_i18n.__)("Label text"),
504
+ placeholder: (0, import_i18n.__)("Add label…"),
505
+ withoutInteractiveFormatting: true,
506
+ value: label,
507
+ onChange: (html) => setAttributes({ label: html }),
508
+ style: typographyProps.style
509
+ }
510
+ ),
511
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
512
+ import_components.ResizableBox,
513
+ {
514
+ size: {
515
+ width: width === void 0 ? "auto" : `${width}${widthUnit}`,
516
+ height: "auto"
517
+ },
518
+ className: (0, import_clsx.default)(
519
+ "wp-block-search__inside-wrapper",
520
+ isButtonPositionInside ? borderProps.className : void 0
521
+ ),
522
+ style: getWrapperStyles(),
523
+ minWidth: import_utils.MIN_WIDTH,
524
+ enable: getResizableSides(),
525
+ onResizeStart: (event, direction, elt) => {
526
+ setAttributes({
527
+ width: parseInt(elt.offsetWidth, 10),
528
+ widthUnit: "px"
529
+ });
530
+ toggleSelection(false);
531
+ },
532
+ onResizeStop: (event, direction, elt, delta) => {
533
+ setAttributes({
534
+ width: parseInt(width + delta.width, 10)
535
+ });
536
+ toggleSelection(true);
537
+ },
538
+ showHandle: isSelected,
539
+ children: [
540
+ (isButtonPositionInside || isButtonPositionOutside || hasOnlyButton) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
541
+ renderTextField(),
542
+ renderButton()
543
+ ] }),
544
+ hasNoButton && renderTextField()
545
+ ]
546
+ }
547
+ )
548
+ ] })
511
549
  ] });
512
550
  }
513
551
  //# sourceMappingURL=edit.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/search/edit.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\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\tSelectControl,\n\tToggleControl,\n\tResizableBox,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, search } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport {\n\tPC_WIDTH_DEFAULT,\n\tPX_WIDTH_DEFAULT,\n\tMIN_WIDTH,\n\tisPercentageUnit,\n} from './utils.js';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\n// Used to calculate border radius adjustment to avoid \"fat\" corners when\n// button is placed inside wrapper.\nconst DEFAULT_INNER_PADDING = '4px';\nconst PERCENTAGE_WIDTHS = [ 25, 50, 75, 100 ];\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\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\tlet 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 = {\n\t\t\t...borderProps,\n\t\t\tstyle: {\n\t\t\t\t...borderProps.style,\n\t\t\t\tborderRadius: `${ borderRadius }px`,\n\t\t\t},\n\t\t};\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 isSearchFieldHidden = hasOnlyButton && ! isSelected;\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\tconst getBlockClassNames = () => {\n\t\treturn clsx(\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\tisSearchFieldHidden\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\tlabel: __( 'Button outside' ),\n\t\t\tvalue: 'button-outside',\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'Button inside' ),\n\t\t\tvalue: 'button-inside',\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'No button' ),\n\t\t\tvalue: 'no-button',\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'Button only' ),\n\t\t\tvalue: 'button-only',\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 = clsx(\n\t\t\t'wp-block-search__input',\n\t\t\thasNoButton ? colorProps.className : undefined,\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\ttypographyProps.className\n\t\t);\n\t\tconst textFieldStyles = {\n\t\t\t...( hasNoButton ? colorProps.style : {} ),\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? {\n\t\t\t\t\t\tborderRadius: borderProps.style?.borderRadius,\n\t\t\t\t\t\tborderTopLeftRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderTopLeftRadius,\n\t\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderTopRightRadius,\n\t\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderBottomLeftRadius,\n\t\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderBottomRightRadius,\n\t\t\t\t }\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 = clsx(\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? {\n\t\t\t\t\t\tborderRadius: borderProps.style?.borderRadius,\n\t\t\t\t\t\tborderTopLeftRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderTopLeftRadius,\n\t\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderTopRightRadius,\n\t\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderBottomLeftRadius,\n\t\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderBottomRightRadius,\n\t\t\t\t }\n\t\t\t\t: borderProps.style ),\n\t\t};\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\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/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst controls = (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\twidthUnit: undefined,\n\t\t\t\t\t\t\tshowLabel: true,\n\t\t\t\t\t\t\tbuttonUseIcon: false,\n\t\t\t\t\t\t\tbuttonPosition: 'button-outside',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => ! showLabel }\n\t\t\t\t\t\tlabel={ __( 'Show label' ) }\n\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowLabel: true,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tchecked={ showLabel }\n\t\t\t\t\t\t\tlabel={ __( 'Show label' ) }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tshowLabel: value,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => buttonPosition !== 'button-outside' }\n\t\t\t\t\t\tlabel={ __( 'Button position' ) }\n\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tbuttonPosition: 'button-outside',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\tvalue={ buttonPosition }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ __( 'Button position' ) }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tbuttonPosition: value,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\toptions={ buttonPositionControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ buttonPosition !== 'no-button' && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! buttonUseIcon }\n\t\t\t\t\t\t\tlabel={ __( 'Use button with icon' ) }\n\t\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tbuttonUseIcon: false,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tchecked={ buttonUseIcon }\n\t\t\t\t\t\t\t\tlabel={ __( 'Use button with icon' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tbuttonUseIcon: value,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => !! width }\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\t\twidthUnit: undefined,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\t\t\tid={ unitControlInputId } // Unused, kept for backwards compatibility\n\t\t\t\t\t\t\t\tmin={\n\t\t\t\t\t\t\t\t\tisPercentageUnit( widthUnit )\n\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t: MIN_WIDTH\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmax={\n\t\t\t\t\t\t\t\t\tisPercentageUnit( widthUnit )\n\t\t\t\t\t\t\t\t\t\t? 100\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\t\t\tonChange={ ( newWidth ) => {\n\t\t\t\t\t\t\t\t\tconst parsedNewWidth =\n\t\t\t\t\t\t\t\t\t\tnewWidth === ''\n\t\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t\t: parseInt( newWidth, 10 );\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\twidth: parsedNewWidth,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tonUnitChange={ ( newUnit ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t\t'%' === newUnit\n\t\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\t: PX_WIDTH_DEFAULT,\n\t\t\t\t\t\t\t\t\t\twidthUnit: newUnit,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\t\tvalue={ `${ width }${ widthUnit }` }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Percentage Width' ) }\n\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\tPERCENTAGE_WIDTHS.includes( width ) &&\n\t\t\t\t\t\t\t\t\twidthUnit === '%'\n\t\t\t\t\t\t\t\t\t\t? width\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\tonChange={ ( newWidth ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\twidth: newWidth,\n\t\t\t\t\t\t\t\t\t\twidthUnit: '%',\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ PERCENTAGE_WIDTHS.map( ( widthValue ) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\t\tkey={ widthValue }\n\t\t\t\t\t\t\t\t\t\t\tvalue={ widthValue }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %d: Percentage value. */\n\t\t\t\t\t\t\t\t\t\t\t\t__( '%d%%' ),\n\t\t\t\t\t\t\t\t\t\t\t\twidthValue\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} ) }\n\t\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tconst isNonZeroBorderRadius = ( radius ) =>\n\t\tradius !== undefined && parseInt( radius, 10 ) !== 0;\n\n\tconst padBorderRadius = ( radius ) =>\n\t\tisNonZeroBorderRadius( radius )\n\t\t\t? `calc(${ radius } + ${ DEFAULT_INNER_PADDING })`\n\t\t\t: 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\tif ( isButtonPositionInside ) {\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 {\n\t\t\t\t\tborderTopLeftRadius,\n\t\t\t\t\tborderTopRightRadius,\n\t\t\t\t\tborderBottomLeftRadius,\n\t\t\t\t\tborderBottomRightRadius,\n\t\t\t\t} = borderProps.style;\n\n\t\t\t\treturn {\n\t\t\t\t\t...styles,\n\t\t\t\t\tborderTopLeftRadius: padBorderRadius( borderTopLeftRadius ),\n\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\tpadBorderRadius( borderTopRightRadius ),\n\t\t\t\t\tborderBottomLeftRadius: padBorderRadius(\n\t\t\t\t\t\tborderBottomLeftRadius\n\t\t\t\t\t),\n\t\t\t\t\tborderBottomRightRadius: padBorderRadius(\n\t\t\t\t\t\tborderBottomRightRadius\n\t\t\t\t\t),\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 = clsx(\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:\n\t\t\t\t\t\twidth === undefined\n\t\t\t\t\t\t\t? 'auto'\n\t\t\t\t\t\t\t: `${ width }${ widthUnit }`,\n\t\t\t\t\theight: 'auto',\n\t\t\t\t} }\n\t\t\t\tclassName={ clsx(\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"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,0BAUO;AACP,kBAAuC;AACvC,qBAAkC;AAClC,wBAWO;AACP,qBAA8B;AAC9B,mBAA6B;AAC7B,kBAA4B;AAC5B,iBAAiD;AAKjD,mBAKO;AACP,mBAA+C;AAuL5C;AAnLH,IAAM,wBAAwB;AAC9B,IAAM,oBAAoB,CAAE,IAAI,IAAI,IAAI,GAAI;AAE7B,SAAR,WAA6B;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAI;AACH,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,IAAI;AAEJ,QAAM,yCAAqC;AAAA,IAC1C,CAAE,WAAY;AACb,YAAM,EAAE,4BAA4B,qBAAqB,IACxD,OAAQ,oBAAAA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AAY;AAAA,QAClD;AAAA,QACA,OAAQ,iBAAiB;AAAA,QACzB,UAAW;AAAA,QACX,QAAS,kBAAkB;AAAA,QAC3B,eAAgB,CAAE,OAAO,WAAW,QAAS;AAC5C,wBAAe;AAAA,YACd,OAAO,SAAU,IAAI,aAAa,EAAG;AAAA,YACrC,WAAW;AAAA,UACZ,CAAE;AACF,0BAAiB,KAAM;AAAA,QACxB;AAAA,QACA,cAAe,CAAE,OAAO,WAAW,KAAK,UAAW;AAClD,wBAAe;AAAA,YACd,OAAO,SAAU,QAAQ,MAAM,OAAO,EAAG;AAAA,UAC1C,CAAE;AACF,0BAAiB,IAAK;AAAA,QACvB;AAAA,QACA,YAAa;AAAA,QAET;AAAA,qCACH,2BACA,kBACA,4EACG;AAAA,4BAAgB;AAAA,YAChB,aAAa;AAAA,aAChB;AAAA,UAGC,eAAe,gBAAgB;AAAA;AAAA;AAAA,IAClC;AAAA,KACD;AAEF;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseBlockProps,\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\tSelectControl,\n\tToggleControl,\n\tResizableBox,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalToolsPanel as ToolsPanel,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { Icon, search } from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport {\n\tPC_WIDTH_DEFAULT,\n\tPX_WIDTH_DEFAULT,\n\tMIN_WIDTH,\n\tisPercentageUnit,\n} from './utils.js';\nimport { useToolsPanelDropdownMenuProps } from '../utils/hooks';\n\n// Help text describing each wrapper element option. Kept local to the block\n// because the choices and their guidance are specific to the Search block.\nconst TAG_NAME_MESSAGES = {\n\t'': __(\n\t\t'Lets the theme decide. Uses the <search> landmark element if the theme opts in, otherwise a <form>.'\n\t),\n\tsearch: __(\n\t\t'Wraps the block in a <search> landmark, announced as a search region by assistive technologies.'\n\t),\n\tform: __(\n\t\t'Uses a <form role=\"search\"> wrapper for backward compatibility with existing theme styles.'\n\t),\n};\n\n// Used to calculate border radius adjustment to avoid \"fat\" corners when\n// button is placed inside wrapper.\nconst DEFAULT_INNER_PADDING = '4px';\nconst PERCENTAGE_WIDTHS = [ 25, 50, 75, 100 ];\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\ttagName,\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\tlet 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 = {\n\t\t\t...borderProps,\n\t\t\tstyle: {\n\t\t\t\t...borderProps.style,\n\t\t\t\tborderRadius: `${ borderRadius }px`,\n\t\t\t},\n\t\t};\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 isSearchFieldHidden = hasOnlyButton && ! isSelected;\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\tconst getBlockClassNames = () => {\n\t\treturn clsx(\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\tisSearchFieldHidden\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\tlabel: __( 'Button outside' ),\n\t\t\tvalue: 'button-outside',\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'Button inside' ),\n\t\t\tvalue: 'button-inside',\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'No button' ),\n\t\t\tvalue: 'no-button',\n\t\t},\n\t\t{\n\t\t\tlabel: __( 'Button only' ),\n\t\t\tvalue: 'button-only',\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 = clsx(\n\t\t\t'wp-block-search__input',\n\t\t\thasNoButton ? colorProps.className : undefined,\n\t\t\tisButtonPositionInside ? undefined : borderProps.className,\n\t\t\ttypographyProps.className\n\t\t);\n\t\tconst textFieldStyles = {\n\t\t\t...( hasNoButton ? colorProps.style : {} ),\n\t\t\t...( isButtonPositionInside\n\t\t\t\t? {\n\t\t\t\t\t\tborderRadius: borderProps.style?.borderRadius,\n\t\t\t\t\t\tborderTopLeftRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderTopLeftRadius,\n\t\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderTopRightRadius,\n\t\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderBottomLeftRadius,\n\t\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderBottomRightRadius,\n\t\t\t\t }\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 = clsx(\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? {\n\t\t\t\t\t\tborderRadius: borderProps.style?.borderRadius,\n\t\t\t\t\t\tborderTopLeftRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderTopLeftRadius,\n\t\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderTopRightRadius,\n\t\t\t\t\t\tborderBottomLeftRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderBottomLeftRadius,\n\t\t\t\t\t\tborderBottomRightRadius:\n\t\t\t\t\t\t\tborderProps.style?.borderBottomRightRadius,\n\t\t\t\t }\n\t\t\t\t: borderProps.style ),\n\t\t};\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\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/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n\tconst dropdownMenuProps = useToolsPanelDropdownMenuProps();\n\n\tconst controls = (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<ToolsPanel\n\t\t\t\t\tlabel={ __( 'Settings' ) }\n\t\t\t\t\tresetAll={ () => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\twidthUnit: undefined,\n\t\t\t\t\t\t\tshowLabel: true,\n\t\t\t\t\t\t\tbuttonUseIcon: false,\n\t\t\t\t\t\t\tbuttonPosition: 'button-outside',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => ! showLabel }\n\t\t\t\t\t\tlabel={ __( 'Show label' ) }\n\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tshowLabel: true,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tchecked={ showLabel }\n\t\t\t\t\t\t\tlabel={ __( 'Show label' ) }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tshowLabel: value,\n\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => buttonPosition !== 'button-outside' }\n\t\t\t\t\t\tlabel={ __( 'Button position' ) }\n\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\tbuttonPosition: 'button-outside',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\tvalue={ buttonPosition }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tlabel={ __( 'Button position' ) }\n\t\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tbuttonPosition: value,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\toptions={ buttonPositionControls }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t{ buttonPosition !== 'no-button' && (\n\t\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\t\thasValue={ () => !! buttonUseIcon }\n\t\t\t\t\t\t\tlabel={ __( 'Use button with icon' ) }\n\t\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\tbuttonUseIcon: false,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tchecked={ buttonUseIcon }\n\t\t\t\t\t\t\t\tlabel={ __( 'Use button with icon' ) }\n\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tbuttonUseIcon: value,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t\t) }\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\thasValue={ () => !! width }\n\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\tonDeselect={ () => {\n\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\twidth: undefined,\n\t\t\t\t\t\t\t\twidthUnit: undefined,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisShownByDefault\n\t\t\t\t\t>\n\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\t\t\tid={ unitControlInputId } // Unused, kept for backwards compatibility\n\t\t\t\t\t\t\t\tmin={\n\t\t\t\t\t\t\t\t\tisPercentageUnit( widthUnit )\n\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t: MIN_WIDTH\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmax={\n\t\t\t\t\t\t\t\t\tisPercentageUnit( widthUnit )\n\t\t\t\t\t\t\t\t\t\t? 100\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tstep={ 1 }\n\t\t\t\t\t\t\t\tonChange={ ( newWidth ) => {\n\t\t\t\t\t\t\t\t\tconst parsedNewWidth =\n\t\t\t\t\t\t\t\t\t\tnewWidth === ''\n\t\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t\t: parseInt( newWidth, 10 );\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\twidth: parsedNewWidth,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tonUnitChange={ ( newUnit ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t\t'%' === newUnit\n\t\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\t: PX_WIDTH_DEFAULT,\n\t\t\t\t\t\t\t\t\t\twidthUnit: newUnit,\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\t\tvalue={ `${ width }${ widthUnit }` }\n\t\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Percentage Width' ) }\n\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\tPERCENTAGE_WIDTHS.includes( width ) &&\n\t\t\t\t\t\t\t\t\twidthUnit === '%'\n\t\t\t\t\t\t\t\t\t\t? width\n\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\tonChange={ ( newWidth ) => {\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\twidth: newWidth,\n\t\t\t\t\t\t\t\t\t\twidthUnit: '%',\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ PERCENTAGE_WIDTHS.map( ( widthValue ) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\t\t\t\t\tkey={ widthValue }\n\t\t\t\t\t\t\t\t\t\t\tvalue={ widthValue }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %d: Percentage value. */\n\t\t\t\t\t\t\t\t\t\t\t\t__( '%d%%' ),\n\t\t\t\t\t\t\t\t\t\t\t\twidthValue\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} ) }\n\t\t\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t</ToolsPanel>\n\t\t\t</InspectorControls>\n\t\t\t<InspectorControls group=\"advanced\">\n\t\t\t\t<SelectControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'HTML element' ) }\n\t\t\t\t\tvalue={ tagName ?? '' }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t{ label: __( 'Default' ), value: '' },\n\t\t\t\t\t\t{ label: '<search>', value: 'search' },\n\t\t\t\t\t\t{ label: '<form>', value: 'form' },\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tsetAttributes( { tagName: value } );\n\t\t\t\t\t\t// The help text is updated via aria-describedby, which\n\t\t\t\t\t\t// is not re-announced while focus remains on the select.\n\t\t\t\t\t\t// Announce the new description so it is not missed.\n\t\t\t\t\t\t// speak() strips HTML-like tags, which would drop the\n\t\t\t\t\t\t// element names (e.g. <search>) entirely. Remove only the\n\t\t\t\t\t\t// angle brackets so the words are retained when spoken.\n\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\tTAG_NAME_MESSAGES[ value ].replace( /[<>]/g, '' )\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t\thelp={ TAG_NAME_MESSAGES[ tagName ?? '' ] }\n\t\t\t\t/>\n\t\t\t</InspectorControls>\n\t\t</>\n\t);\n\n\tconst isNonZeroBorderRadius = ( radius ) =>\n\t\tradius !== undefined && parseInt( radius, 10 ) !== 0;\n\n\tconst padBorderRadius = ( radius ) =>\n\t\tisNonZeroBorderRadius( radius )\n\t\t\t? `calc(${ radius } + ${ DEFAULT_INNER_PADDING })`\n\t\t\t: 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\tif ( isButtonPositionInside ) {\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 {\n\t\t\t\t\tborderTopLeftRadius,\n\t\t\t\t\tborderTopRightRadius,\n\t\t\t\t\tborderBottomLeftRadius,\n\t\t\t\t\tborderBottomRightRadius,\n\t\t\t\t} = borderProps.style;\n\n\t\t\t\treturn {\n\t\t\t\t\t...styles,\n\t\t\t\t\tborderTopLeftRadius: padBorderRadius( borderTopLeftRadius ),\n\t\t\t\t\tborderTopRightRadius:\n\t\t\t\t\t\tpadBorderRadius( borderTopRightRadius ),\n\t\t\t\t\tborderBottomLeftRadius: padBorderRadius(\n\t\t\t\t\t\tborderBottomLeftRadius\n\t\t\t\t\t),\n\t\t\t\t\tborderBottomRightRadius: padBorderRadius(\n\t\t\t\t\t\tborderBottomRightRadius\n\t\t\t\t\t),\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 = clsx(\n\t\t'wp-block-search__label',\n\t\ttypographyProps.className\n\t);\n\n\t// Reflect an explicit <search> choice in the editor markup so wrapper\n\t// styles match the front end. The <form> and theme-deferred default keep\n\t// the historical <div> to avoid nesting a live <form> in the editor.\n\tconst Wrapper = 'search' === tagName ? 'search' : 'div';\n\n\treturn (\n\t\t<>\n\t\t\t{ controls }\n\t\t\t<Wrapper { ...blockProps }>\n\t\t\t\t{ showLabel && (\n\t\t\t\t\t<RichText\n\t\t\t\t\t\tidentifier=\"label\"\n\t\t\t\t\t\tclassName={ labelClassnames }\n\t\t\t\t\t\taria-label={ __( 'Label text' ) }\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\tstyle={ typographyProps.style }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t<ResizableBox\n\t\t\t\t\tsize={ {\n\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\twidth === undefined\n\t\t\t\t\t\t\t\t? 'auto'\n\t\t\t\t\t\t\t\t: `${ width }${ widthUnit }`,\n\t\t\t\t\t\theight: 'auto',\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'wp-block-search__inside-wrapper',\n\t\t\t\t\t\tisButtonPositionInside\n\t\t\t\t\t\t\t? borderProps.className\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ getWrapperStyles() }\n\t\t\t\t\tminWidth={ MIN_WIDTH }\n\t\t\t\t\tenable={ getResizableSides() }\n\t\t\t\t\tonResizeStart={ ( event, direction, elt ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\twidth: parseInt( elt.offsetWidth, 10 ),\n\t\t\t\t\t\t\twidthUnit: 'px',\n\t\t\t\t\t\t} );\n\t\t\t\t\t\ttoggleSelection( false );\n\t\t\t\t\t} }\n\t\t\t\t\tonResizeStop={ ( event, direction, elt, delta ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\twidth: parseInt( width + delta.width, 10 ),\n\t\t\t\t\t\t} );\n\t\t\t\t\t\ttoggleSelection( true );\n\t\t\t\t\t} }\n\t\t\t\t\tshowHandle={ isSelected }\n\t\t\t\t>\n\t\t\t\t\t{ ( isButtonPositionInside ||\n\t\t\t\t\t\tisButtonPositionOutside ||\n\t\t\t\t\t\thasOnlyButton ) && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ renderTextField() }\n\t\t\t\t\t\t\t{ renderButton() }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ hasNoButton && renderTextField() }\n\t\t\t\t</ResizableBox>\n\t\t\t</Wrapper>\n\t\t</>\n\t);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,0BAUO;AACP,kBAAuC;AACvC,qBAAkC;AAClC,wBAWO;AACP,qBAA8B;AAC9B,mBAA6B;AAC7B,kBAA4B;AAC5B,iBAAiD;AACjD,kBAAsB;AAKtB,mBAKO;AACP,mBAA+C;AAsM5C;AAlMH,IAAM,oBAAoB;AAAA,EACzB,QAAI;AAAA,IACH;AAAA,EACD;AAAA,EACA,YAAQ;AAAA,IACP;AAA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AG;AAAA,cACrC,WAAW;AAAA,YACZ,CAAE;AACF,4BAAiB,KAAM;AAAA,UACxB;AAAA,UACA,cAAe,CAAE,OAAO,WAAW,KAAK,UAAW;AAClD,0BAAe;AAAA,cACd,OAAO,SAAU,QAAQ,MAAM,OAAO,EAAG;AAAA,YAC1C,CAAE;AACF,4BAAiB,IAAK;AAAA,UACvB;AAAA,UACA,YAAa;AAAA,UAET;AAAA,uCACH,2BACA,kBACA,4EACG;AAAA,8BAAgB;AAAA,cAChB,aAAa;AAAA,eAChB;AAAA,YAGC,eAAe,gBAAgB;AAAA;AAAA;AAAA,MAClC;AAAA,OACD;AAAA,KACD;AAEF;",
6
6
  "names": ["blockEditorStore", "useBorderProps", "useColorProps", "useTypographyProps", "UnitControl", "useCustomUnits", "clsx", "stripHTML", "ToolsPanel", "ToolsPanelItem", "VStack", "ToggleGroupControl", "ToggleGroupControlOption"]
7
7
  }