@wordpress/block-editor 14.3.4 → 14.3.5

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 (103) hide show
  1. package/build/components/block-variation-picker/index.js +2 -4
  2. package/build/components/block-variation-picker/index.js.map +1 -1
  3. package/build/components/block-variation-transforms/index.js +3 -4
  4. package/build/components/block-variation-transforms/index.js.map +1 -1
  5. package/build/components/button-block-appender/index.js +2 -4
  6. package/build/components/button-block-appender/index.js.map +1 -1
  7. package/build/components/colors-gradients/dropdown.js +2 -4
  8. package/build/components/colors-gradients/dropdown.js.map +1 -1
  9. package/build/components/global-styles/color-panel.js +2 -4
  10. package/build/components/global-styles/color-panel.js.map +1 -1
  11. package/build/components/global-styles/filters-panel.js +2 -4
  12. package/build/components/global-styles/filters-panel.js.map +1 -1
  13. package/build/components/global-styles/shadow-panel-components.js +24 -29
  14. package/build/components/global-styles/shadow-panel-components.js.map +1 -1
  15. package/build/components/inspector-controls-tabs/index.js +11 -8
  16. package/build/components/inspector-controls-tabs/index.js.map +1 -1
  17. package/build/components/inspector-popover-header/index.js +4 -8
  18. package/build/components/inspector-popover-header/index.js.map +1 -1
  19. package/build/components/link-control/index.js +4 -8
  20. package/build/components/link-control/index.js.map +1 -1
  21. package/build/components/link-control/settings-drawer.js +2 -4
  22. package/build/components/link-control/settings-drawer.js.map +1 -1
  23. package/build/components/list-view/block-select-button.js +1 -4
  24. package/build/components/list-view/block-select-button.js.map +1 -1
  25. package/build/components/media-placeholder/index.js +12 -24
  26. package/build/components/media-placeholder/index.js.map +1 -1
  27. package/build/components/skip-to-selected-block/index.js +2 -4
  28. package/build/components/skip-to-selected-block/index.js.map +1 -1
  29. package/build/components/tool-selector/index.js +2 -4
  30. package/build/components/tool-selector/index.js.map +1 -1
  31. package/build/components/url-input/button.js +14 -16
  32. package/build/components/url-input/button.js.map +1 -1
  33. package/build/components/url-input/index.js +2 -4
  34. package/build/components/url-input/index.js.map +1 -1
  35. package/build/layouts/flex.js +6 -38
  36. package/build/layouts/flex.js.map +1 -1
  37. package/build-module/components/block-variation-picker/index.js +2 -4
  38. package/build-module/components/block-variation-picker/index.js.map +1 -1
  39. package/build-module/components/block-variation-transforms/index.js +3 -4
  40. package/build-module/components/block-variation-transforms/index.js.map +1 -1
  41. package/build-module/components/button-block-appender/index.js +2 -4
  42. package/build-module/components/button-block-appender/index.js.map +1 -1
  43. package/build-module/components/colors-gradients/dropdown.js +2 -4
  44. package/build-module/components/colors-gradients/dropdown.js.map +1 -1
  45. package/build-module/components/global-styles/color-panel.js +2 -4
  46. package/build-module/components/global-styles/color-panel.js.map +1 -1
  47. package/build-module/components/global-styles/filters-panel.js +2 -4
  48. package/build-module/components/global-styles/filters-panel.js.map +1 -1
  49. package/build-module/components/global-styles/shadow-panel-components.js +25 -30
  50. package/build-module/components/global-styles/shadow-panel-components.js.map +1 -1
  51. package/build-module/components/inspector-controls-tabs/index.js +12 -9
  52. package/build-module/components/inspector-controls-tabs/index.js.map +1 -1
  53. package/build-module/components/inspector-popover-header/index.js +4 -8
  54. package/build-module/components/inspector-popover-header/index.js.map +1 -1
  55. package/build-module/components/link-control/index.js +4 -8
  56. package/build-module/components/link-control/index.js.map +1 -1
  57. package/build-module/components/link-control/settings-drawer.js +2 -4
  58. package/build-module/components/link-control/settings-drawer.js.map +1 -1
  59. package/build-module/components/list-view/block-select-button.js +2 -5
  60. package/build-module/components/list-view/block-select-button.js.map +1 -1
  61. package/build-module/components/media-placeholder/index.js +12 -24
  62. package/build-module/components/media-placeholder/index.js.map +1 -1
  63. package/build-module/components/skip-to-selected-block/index.js +2 -4
  64. package/build-module/components/skip-to-selected-block/index.js.map +1 -1
  65. package/build-module/components/tool-selector/index.js +2 -4
  66. package/build-module/components/tool-selector/index.js.map +1 -1
  67. package/build-module/components/url-input/button.js +15 -17
  68. package/build-module/components/url-input/button.js.map +1 -1
  69. package/build-module/components/url-input/index.js +2 -4
  70. package/build-module/components/url-input/index.js.map +1 -1
  71. package/build-module/layouts/flex.js +7 -39
  72. package/build-module/layouts/flex.js.map +1 -1
  73. package/build-style/content-rtl.css +0 -3
  74. package/build-style/content.css +0 -3
  75. package/build-style/style-rtl.css +18 -25
  76. package/build-style/style.css +18 -25
  77. package/package.json +5 -5
  78. package/src/components/block-inspector/style.scss +2 -0
  79. package/src/components/block-tools/style.scss +5 -0
  80. package/src/components/block-variation-picker/index.js +1 -2
  81. package/src/components/block-variation-transforms/index.js +2 -2
  82. package/src/components/button-block-appender/content.scss +0 -5
  83. package/src/components/button-block-appender/index.js +1 -2
  84. package/src/components/colors-gradients/dropdown.js +1 -5
  85. package/src/components/global-styles/color-panel.js +1 -5
  86. package/src/components/global-styles/filters-panel.js +1 -2
  87. package/src/components/global-styles/shadow-panel-components.js +28 -33
  88. package/src/components/global-styles/style.scss +5 -0
  89. package/src/components/inspector-controls-tabs/index.js +21 -20
  90. package/src/components/inspector-popover-header/index.js +2 -4
  91. package/src/components/inspector-popover-header/style.scss +0 -13
  92. package/src/components/link-control/index.js +2 -4
  93. package/src/components/link-control/settings-drawer.js +1 -2
  94. package/src/components/list-view/block-select-button.js +2 -5
  95. package/src/components/list-view/style.scss +9 -0
  96. package/src/components/media-placeholder/index.js +6 -12
  97. package/src/components/skip-to-selected-block/index.js +1 -2
  98. package/src/components/skip-to-selected-block/style.scss +0 -9
  99. package/src/components/tool-selector/index.js +1 -2
  100. package/src/components/url-input/button.js +16 -12
  101. package/src/components/url-input/index.js +1 -2
  102. package/src/components/url-input/style.scss +0 -6
  103. package/src/layouts/flex.js +10 -53
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import { Component } from '@wordpress/element';
6
- import { Button } from '@wordpress/components';
6
+ import { Button, __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper } from '@wordpress/components';
7
7
  import { link, keyboardReturn, arrowLeft } from '@wordpress/icons';
8
8
 
9
9
  /**
@@ -41,10 +41,8 @@ class URLInputButton extends Component {
41
41
  const buttonLabel = url ? __('Edit link') : __('Insert link');
42
42
  return /*#__PURE__*/_jsxs("div", {
43
43
  className: "block-editor-url-input__button",
44
- children: [/*#__PURE__*/_jsx(Button
45
- // TODO: Switch to `true` (40px size) if possible
46
- , {
47
- __next40pxDefaultSize: false,
44
+ children: [/*#__PURE__*/_jsx(Button, {
45
+ size: "compact",
48
46
  icon: link,
49
47
  label: buttonLabel,
50
48
  onClick: this.toggle,
@@ -55,24 +53,24 @@ class URLInputButton extends Component {
55
53
  onSubmit: this.submitLink,
56
54
  children: /*#__PURE__*/_jsxs("div", {
57
55
  className: "block-editor-url-input__button-modal-line",
58
- children: [/*#__PURE__*/_jsx(Button
59
- // TODO: Switch to `true` (40px size) if possible
60
- , {
61
- __next40pxDefaultSize: false,
56
+ children: [/*#__PURE__*/_jsx(Button, {
57
+ __next40pxDefaultSize: true,
62
58
  className: "block-editor-url-input__back",
63
59
  icon: arrowLeft,
64
60
  label: __('Close'),
65
61
  onClick: this.toggle
66
62
  }), /*#__PURE__*/_jsx(URLInput, {
67
63
  value: url || '',
68
- onChange: onChange
69
- }), /*#__PURE__*/_jsx(Button
70
- // TODO: Switch to `true` (40px size) if possible
71
- , {
72
- __next40pxDefaultSize: false,
73
- icon: keyboardReturn,
74
- label: __('Submit'),
75
- type: "submit"
64
+ onChange: onChange,
65
+ suffix: /*#__PURE__*/_jsx(InputControlSuffixWrapper, {
66
+ variant: "control",
67
+ children: /*#__PURE__*/_jsx(Button, {
68
+ size: "small",
69
+ icon: keyboardReturn,
70
+ label: __('Submit'),
71
+ type: "submit"
72
+ })
73
+ })
76
74
  })]
77
75
  })
78
76
  })]
@@ -1 +1 @@
1
- {"version":3,"names":["__","Component","Button","link","keyboardReturn","arrowLeft","URLInput","jsx","_jsx","jsxs","_jsxs","URLInputButton","constructor","arguments","toggle","bind","submitLink","state","expanded","setState","event","preventDefault","render","url","onChange","props","buttonLabel","className","children","__next40pxDefaultSize","icon","label","onClick","isPressed","onSubmit","value","type"],"sources":["@wordpress/block-editor/src/components/url-input/button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { Button } from '@wordpress/components';\nimport { link, keyboardReturn, arrowLeft } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport URLInput from './';\n\nclass URLInputButton extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.toggle = this.toggle.bind( this );\n\t\tthis.submitLink = this.submitLink.bind( this );\n\t\tthis.state = {\n\t\t\texpanded: false,\n\t\t};\n\t}\n\n\ttoggle() {\n\t\tthis.setState( { expanded: ! this.state.expanded } );\n\t}\n\n\tsubmitLink( event ) {\n\t\tevent.preventDefault();\n\t\tthis.toggle();\n\t}\n\n\trender() {\n\t\tconst { url, onChange } = this.props;\n\t\tconst { expanded } = this.state;\n\t\tconst buttonLabel = url ? __( 'Edit link' ) : __( 'Insert link' );\n\n\t\treturn (\n\t\t\t<div className=\"block-editor-url-input__button\">\n\t\t\t\t<Button\n\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\ticon={ link }\n\t\t\t\t\tlabel={ buttonLabel }\n\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\tclassName=\"components-toolbar__control\"\n\t\t\t\t\tisPressed={ !! url }\n\t\t\t\t/>\n\t\t\t\t{ expanded && (\n\t\t\t\t\t<form\n\t\t\t\t\t\tclassName=\"block-editor-url-input__button-modal\"\n\t\t\t\t\t\tonSubmit={ this.submitLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-editor-url-input__button-modal-line\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-url-input__back\"\n\t\t\t\t\t\t\t\ticon={ arrowLeft }\n\t\t\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<URLInput\n\t\t\t\t\t\t\t\tvalue={ url || '' }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md\n */\nexport default URLInputButton;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,IAAI,EAAEC,cAAc,EAAEC,SAAS,QAAQ,kBAAkB;;AAElE;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,IAAI;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE1B,MAAMC,cAAc,SAASV,SAAS,CAAC;EACtCW,WAAWA,CAAA,EAAG;IACb,KAAK,CAAE,GAAGC,SAAU,CAAC;IACrB,IAAI,CAACC,MAAM,GAAG,IAAI,CAACA,MAAM,CAACC,IAAI,CAAE,IAAK,CAAC;IACtC,IAAI,CAACC,UAAU,GAAG,IAAI,CAACA,UAAU,CAACD,IAAI,CAAE,IAAK,CAAC;IAC9C,IAAI,CAACE,KAAK,GAAG;MACZC,QAAQ,EAAE;IACX,CA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IAAI,EAAI;YACnBC,QAAQ,EAAGA;UAAU,CACrB,CAAC,eACFhB,IAAA,CAACN;UACA;UAAA;YACA2B,qBAAqB,EAAG,KAAO;YAC/BC,IAAI,EAAG1B,cAAgB;YACvB2B,KAAK,EAAG/B,EAAE,CAAE,QAAS,CAAG;YACxBoC,IAAI,EAAC;UAAQ,CACb,CAAC;QAAA,CACE;MAAC,CACD,CACN;IAAA,CACG,CAAC;EAER;AACD;;AAEA;AACA;AACA;AACA,eAAezB,cAAc","ignoreList":[]}
1
+ {"version":3,"names":["__","Component","Button","__experimentalInputControlSuffixWrapper","InputControlSuffixWrapper","link","keyboardReturn","arrowLeft","URLInput","jsx","_jsx","jsxs","_jsxs","URLInputButton","constructor","arguments","toggle","bind","submitLink","state","expanded","setState","event","preventDefault","render","url","onChange","props","buttonLabel","className","children","size","icon","label","onClick","isPressed","onSubmit","__next40pxDefaultSize","value","suffix","variant","type"],"sources":["@wordpress/block-editor/src/components/url-input/button.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n} from '@wordpress/components';\nimport { link, keyboardReturn, arrowLeft } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport URLInput from './';\n\nclass URLInputButton extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.toggle = this.toggle.bind( this );\n\t\tthis.submitLink = this.submitLink.bind( this );\n\t\tthis.state = {\n\t\t\texpanded: false,\n\t\t};\n\t}\n\n\ttoggle() {\n\t\tthis.setState( { expanded: ! this.state.expanded } );\n\t}\n\n\tsubmitLink( event ) {\n\t\tevent.preventDefault();\n\t\tthis.toggle();\n\t}\n\n\trender() {\n\t\tconst { url, onChange } = this.props;\n\t\tconst { expanded } = this.state;\n\t\tconst buttonLabel = url ? __( 'Edit link' ) : __( 'Insert link' );\n\n\t\treturn (\n\t\t\t<div className=\"block-editor-url-input__button\">\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\ticon={ link }\n\t\t\t\t\tlabel={ buttonLabel }\n\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\tclassName=\"components-toolbar__control\"\n\t\t\t\t\tisPressed={ !! url }\n\t\t\t\t/>\n\t\t\t\t{ expanded && (\n\t\t\t\t\t<form\n\t\t\t\t\t\tclassName=\"block-editor-url-input__button-modal\"\n\t\t\t\t\t\tonSubmit={ this.submitLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-editor-url-input__button-modal-line\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tclassName=\"block-editor-url-input__back\"\n\t\t\t\t\t\t\t\ticon={ arrowLeft }\n\t\t\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<URLInput\n\t\t\t\t\t\t\t\tvalue={ url || '' }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t\t<InputControlSuffixWrapper variant=\"control\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</InputControlSuffixWrapper>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages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AgC;MAAAC,QAAA,gBAC9CpB,IAAA,CAACR,MAAM;QACN6B,IAAI,EAAC,SAAS;QACdC,IAAI,EAAG3B,IAAM;QACb4B,KAAK,EAAGL,WAAa;QACrBM,OAAO,EAAG,IAAI,CAAClB,MAAQ;QACvBa,SAAS,EAAC,6BAA6B;QACvCM,SAAS,EAAG,CAAC,CAAEV;MAAK,CACpB,CAAC,EACAL,QAAQ,iBACTV,IAAA;QACCmB,SAAS,EAAC,sCAAsC;QAChDO,QAAQ,EAAG,IAAI,CAAClB,UAAY;QAAAY,QAAA,eAE5BlB,KAAA;UAAKiB,SAAS,EAAC,2CAA2C;UAAAC,QAAA,gBACzDpB,IAAA,CAACR,MAAM;YACNmC,qBAAqB;YACrBR,SAAS,EAAC,8BAA8B;YACxCG,IAAI,EAAGzB,SAAW;YAClB0B,KAAK,EAAGjC,EAAE,CAAE,OAAQ,CAAG;YACvBkC,OAAO,EAAG,IAAI,CAAClB;UAAQ,CACvB,CAAC,eACFN,IAAA,CAACF,QAAQ;YACR8B,KAAK,EAAGb,GAAG,IAAI,EAAI;YACnBC,QAAQ,EAAGA,QAAU;YACrBa,MAAM,eACL7B,IAAA,CAACN,yBAAyB;cAACoC,OAAO,EAAC,SAAS;cAAAV,QAAA,eAC3CpB,IAAA,CAACR,MAAM;gBACN6B,IAAI,EAAC,OAAO;gBACZC,IAAI,EAAG1B,cAAgB;gBACvB2B,KAAK,EAAGjC,EAAE,CAAE,QAAS,CAAG;gBACxByC,IAAI,EAAC;cAAQ,CACb;YAAC,CACwB;UAC3B,CACD,CAAC;QAAA,CACE;MAAC,CACD,CACN;IAAA,CACG,CAAC;EAER;AACD;;AAEA;AACA;AACA;AACA,eAAe5B,cAAc","ignoreList":[]}
@@ -451,10 +451,8 @@ class URLInput extends Component {
451
451
  children: /*#__PURE__*/_jsx("div", {
452
452
  ...suggestionsListProps,
453
453
  className: clsx('block-editor-url-input__suggestions', `${className}__suggestions`),
454
- children: suggestions.map((suggestion, index) => /*#__PURE__*/_createElement(Button
455
- // TODO: Switch to `true` (40px size) if possible
456
- , {
457
- __next40pxDefaultSize: false,
454
+ children: suggestions.map((suggestion, index) => /*#__PURE__*/_createElement(Button, {
455
+ __next40pxDefaultSize: true,
458
456
  ...buildSuggestionItemProps(suggestion, index),
459
457
  key: suggestion.id,
460
458
  className: clsx('block-editor-url-input__suggestion', {
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","__","sprintf","_n","Component","createRef","UP","DOWN","ENTER","TAB","BaseControl","Button","__experimentalInputControl","InputControl","Spinner","withSpokenMessages","Popover","compose","debounce","withInstanceId","withSafeTimeout","withSelect","isURL","store","blockEditorStore","Fragment","_Fragment","jsxs","_jsxs","jsx","_jsx","createElement","_createElement","isFunction","maybeFunc","URLInput","constructor","props","onChange","bind","onFocus","onKeyDown","selectLink","handleOnClick","bindSuggestionNode","autocompleteRef","inputRef","updateSuggestions","suggestionNodes","suggestionsRequest","state","suggestions","showSuggestions","suggestionsValue","selectedSuggestion","suggestionsListboxId","suggestionOptionIdPrefix","componentDidUpdate","prevProps","value","__experimentalShowInitialSuggestions","scrollIntoView","behavior","block","inline","disableSuggestions","length","componentDidMount","shouldShowInitialSuggestions","componentWillUnmount","cancel","index","ref","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalHandleURLSuggestions","handleURLSuggestions","isInitialSuggestions","trim","setState","loading","request","then","debouncedSpeak","catch","finally","newValue","event","keyCode","target","selectionStart","preventDefault","setSelectionRange","onSubmit","suggestion","previousIndex","nextIndex","speak","url","current","focus","getDerivedStateFromProps","instanceId","shouldShowSuggestions","hasValue","render","children","renderControl","renderSuggestions","label","className","isFullWidth","placeholder","__experimentalRenderControl","hideLabelFromVision","inputId","controlProps","id","inputProps","required","type","role","undefined","suffix","__nextHasNoMarginBottom","__next40pxDefaultSize","__experimentalRenderSuggestions","suggestionsListProps","buildSuggestionItemProps","tabIndex","isLoading","handleSuggestionClick","currentInputValue","placement","focusOnMount","map","key","onClick","title","select","getSettings"],"sources":["@wordpress/block-editor/src/components/url-input/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';\nimport {\n\tBaseControl,\n\tButton,\n\t__experimentalInputControl as InputControl,\n\tSpinner,\n\twithSpokenMessages,\n\tPopover,\n} from '@wordpress/components';\nimport {\n\tcompose,\n\tdebounce,\n\twithInstanceId,\n\twithSafeTimeout,\n} from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Whether the argument is a function.\n *\n * @param {*} maybeFunc The argument to check.\n * @return {boolean} True if the argument is a function, false otherwise.\n */\nfunction isFunction( maybeFunc ) {\n\treturn typeof maybeFunc === 'function';\n}\n\nclass URLInput extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.selectLink = this.selectLink.bind( this );\n\t\tthis.handleOnClick = this.handleOnClick.bind( this );\n\t\tthis.bindSuggestionNode = this.bindSuggestionNode.bind( this );\n\t\tthis.autocompleteRef = props.autocompleteRef || createRef();\n\t\tthis.inputRef = createRef();\n\t\tthis.updateSuggestions = debounce(\n\t\t\tthis.updateSuggestions.bind( this ),\n\t\t\t200\n\t\t);\n\n\t\tthis.suggestionNodes = [];\n\n\t\tthis.suggestionsRequest = null;\n\n\t\tthis.state = {\n\t\t\tsuggestions: [],\n\t\t\tshowSuggestions: false,\n\t\t\tsuggestionsValue: null,\n\t\t\tselectedSuggestion: null,\n\t\t\tsuggestionsListboxId: '',\n\t\t\tsuggestionOptionIdPrefix: '',\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { showSuggestions, selectedSuggestion } = this.state;\n\t\tconst { value, __experimentalShowInitialSuggestions = false } =\n\t\t\tthis.props;\n\n\t\t// Only have to worry about scrolling selected suggestion into view\n\t\t// when already expanded.\n\t\tif (\n\t\t\tshowSuggestions &&\n\t\t\tselectedSuggestion !== null &&\n\t\t\tthis.suggestionNodes[ selectedSuggestion ]\n\t\t) {\n\t\t\tthis.suggestionNodes[ selectedSuggestion ].scrollIntoView( {\n\t\t\t\tbehavior: 'instant',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tinline: 'nearest',\n\t\t\t} );\n\t\t}\n\n\t\t// Update suggestions when the value changes.\n\t\tif ( prevProps.value !== value && ! this.props.disableSuggestions ) {\n\t\t\tif ( value?.length ) {\n\t\t\t\t// If the new value is not empty we need to update with suggestions for it.\n\t\t\t\tthis.updateSuggestions( value );\n\t\t\t} else if ( __experimentalShowInitialSuggestions ) {\n\t\t\t\t// If the new value is empty and we can show initial suggestions, then show initial suggestions.\n\t\t\t\tthis.updateSuggestions();\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.shouldShowInitialSuggestions() ) {\n\t\t\tthis.updateSuggestions();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.suggestionsRequest?.cancel?.();\n\t\tthis.suggestionsRequest = null;\n\t}\n\n\tbindSuggestionNode( index ) {\n\t\treturn ( ref ) => {\n\t\t\tthis.suggestionNodes[ index ] = ref;\n\t\t};\n\t}\n\n\tshouldShowInitialSuggestions() {\n\t\tconst { __experimentalShowInitialSuggestions = false, value } =\n\t\t\tthis.props;\n\t\treturn (\n\t\t\t__experimentalShowInitialSuggestions && ! ( value && value.length )\n\t\t);\n\t}\n\n\tupdateSuggestions( value = '' ) {\n\t\tconst {\n\t\t\t__experimentalFetchLinkSuggestions: fetchLinkSuggestions,\n\t\t\t__experimentalHandleURLSuggestions: handleURLSuggestions,\n\t\t} = this.props;\n\n\t\tif ( ! fetchLinkSuggestions ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Initial suggestions may only show if there is no value\n\t\t// (note: this includes whitespace).\n\t\tconst isInitialSuggestions = ! value?.length;\n\n\t\t// Trim only now we've determined whether or not it originally had a \"length\"\n\t\t// (even if that value was all whitespace).\n\t\tvalue = value.trim();\n\n\t\t// Allow a suggestions request if:\n\t\t// - there are at least 2 characters in the search input (except manual searches where\n\t\t// search input length is not required to trigger a fetch)\n\t\t// - this is a direct entry (eg: a URL)\n\t\tif (\n\t\t\t! isInitialSuggestions &&\n\t\t\t( value.length < 2 || ( ! handleURLSuggestions && isURL( value ) ) )\n\t\t) {\n\t\t\tthis.suggestionsRequest?.cancel?.();\n\t\t\tthis.suggestionsRequest = null;\n\n\t\t\tthis.setState( {\n\t\t\t\tsuggestions: [],\n\t\t\t\tshowSuggestions: false,\n\t\t\t\tsuggestionsValue: value,\n\t\t\t\tselectedSuggestion: null,\n\t\t\t\tloading: false,\n\t\t\t} );\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState( {\n\t\t\tselectedSuggestion: null,\n\t\t\tloading: true,\n\t\t} );\n\n\t\tconst request = fetchLinkSuggestions( value, {\n\t\t\tisInitialSuggestions,\n\t\t} );\n\n\t\trequest\n\t\t\t.then( ( suggestions ) => {\n\t\t\t\t// A fetch Promise doesn't have an abort option. It's mimicked by\n\t\t\t\t// comparing the request reference in on the instance, which is\n\t\t\t\t// reset or deleted on subsequent requests or unmounting.\n\t\t\t\tif ( this.suggestionsRequest !== request ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.setState( {\n\t\t\t\t\tsuggestions,\n\t\t\t\t\tsuggestionsValue: value,\n\t\t\t\t\tloading: false,\n\t\t\t\t\tshowSuggestions: !! suggestions.length,\n\t\t\t\t} );\n\n\t\t\t\tif ( !! suggestions.length ) {\n\t\t\t\t\tthis.props.debouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\tsuggestions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tsuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.props.debouncedSpeak(\n\t\t\t\t\t\t__( 'No results.' ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tif ( this.suggestionsRequest !== request ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.setState( {\n\t\t\t\t\tloading: false,\n\t\t\t\t} );\n\t\t\t} )\n\t\t\t.finally( () => {\n\t\t\t\t// If this is the current promise then reset the reference\n\t\t\t\t// to allow for checking if a new request is made.\n\t\t\t\tif ( this.suggestionsRequest === request ) {\n\t\t\t\t\tthis.suggestionsRequest = null;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t// Note that this assignment is handled *before* the async search request\n\t\t// as a Promise always resolves on the next tick of the event loop.\n\t\tthis.suggestionsRequest = request;\n\t}\n\n\tonChange( newValue ) {\n\t\tthis.props.onChange( newValue );\n\t}\n\n\tonFocus() {\n\t\tconst { suggestions } = this.state;\n\t\tconst { disableSuggestions, value } = this.props;\n\n\t\t// When opening the link editor, if there's a value present, we want to load the suggestions pane with the results for this input search value\n\t\t// Don't re-run the suggestions on focus if there are already suggestions present (prevents searching again when tabbing between the input and buttons)\n\t\t// or there is already a request in progress.\n\t\tif (\n\t\t\tvalue &&\n\t\t\t! disableSuggestions &&\n\t\t\t! ( suggestions && suggestions.length ) &&\n\t\t\tthis.suggestionsRequest === null\n\t\t) {\n\t\t\t// Ensure the suggestions are updated with the current input value.\n\t\t\tthis.updateSuggestions( value );\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tthis.props.onKeyDown?.( event );\n\t\tconst { showSuggestions, selectedSuggestion, suggestions, loading } =\n\t\t\tthis.state;\n\n\t\t// If the suggestions are not shown or loading, we shouldn't handle the arrow keys\n\t\t// We shouldn't preventDefault to allow block arrow keys navigation.\n\t\tif ( ! showSuggestions || ! suggestions.length || loading ) {\n\t\t\t// In the Windows version of Firefox the up and down arrows don't move the caret\n\t\t\t// within an input field like they do for Mac Firefox/Chrome/Safari. This causes\n\t\t\t// a form of focus trapping that is disruptive to the user experience. This disruption\n\t\t\t// only happens if the caret is not in the first or last position in the text input.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/5693#issuecomment-436684747\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t// When UP is pressed, if the caret is at the start of the text, move it to the 0\n\t\t\t\t// position.\n\t\t\t\tcase UP: {\n\t\t\t\t\tif ( 0 !== event.target.selectionStart ) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to position 0.\n\t\t\t\t\t\tevent.target.setSelectionRange( 0, 0 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// When DOWN is pressed, if the caret is not at the end of the text, move it to the\n\t\t\t\t// last position.\n\t\t\t\tcase DOWN: {\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.props.value.length !== event.target.selectionStart\n\t\t\t\t\t) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to the last position.\n\t\t\t\t\t\tevent.target.setSelectionRange(\n\t\t\t\t\t\t\tthis.props.value.length,\n\t\t\t\t\t\t\tthis.props.value.length\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Submitting while loading should trigger onSubmit.\n\t\t\t\tcase ENTER: {\n\t\t\t\t\tif ( this.props.onSubmit ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.props.onSubmit( null, event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst suggestion =\n\t\t\tthis.state.suggestions[ this.state.selectedSuggestion ];\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase UP: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst previousIndex = ! selectedSuggestion\n\t\t\t\t\t? suggestions.length - 1\n\t\t\t\t\t: selectedSuggestion - 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: previousIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DOWN: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst nextIndex =\n\t\t\t\t\tselectedSuggestion === null ||\n\t\t\t\t\tselectedSuggestion === suggestions.length - 1\n\t\t\t\t\t\t? 0\n\t\t\t\t\t\t: selectedSuggestion + 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: nextIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase TAB: {\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tthis.selectLink( suggestion );\n\t\t\t\t\t// Announce a link has been selected when tabbing away from the input field.\n\t\t\t\t\tthis.props.speak( __( 'Link selected.' ) );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ENTER: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tthis.selectLink( suggestion );\n\n\t\t\t\t\tif ( this.props.onSubmit ) {\n\t\t\t\t\t\tthis.props.onSubmit( suggestion, event );\n\t\t\t\t\t}\n\t\t\t\t} else if ( this.props.onSubmit ) {\n\t\t\t\t\tthis.props.onSubmit( null, event );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tselectLink( suggestion ) {\n\t\tthis.props.onChange( suggestion.url, suggestion );\n\t\tthis.setState( {\n\t\t\tselectedSuggestion: null,\n\t\t\tshowSuggestions: false,\n\t\t} );\n\t}\n\n\thandleOnClick( suggestion ) {\n\t\tthis.selectLink( suggestion );\n\t\t// Move focus to the input field when a link suggestion is clicked.\n\t\tthis.inputRef.current.focus();\n\t}\n\n\tstatic getDerivedStateFromProps(\n\t\t{\n\t\t\tvalue,\n\t\t\tinstanceId,\n\t\t\tdisableSuggestions,\n\t\t\t__experimentalShowInitialSuggestions = false,\n\t\t},\n\t\t{ showSuggestions }\n\t) {\n\t\tlet shouldShowSuggestions = showSuggestions;\n\n\t\tconst hasValue = value && value.length;\n\n\t\tif ( ! __experimentalShowInitialSuggestions && ! hasValue ) {\n\t\t\tshouldShowSuggestions = false;\n\t\t}\n\n\t\tif ( disableSuggestions === true ) {\n\t\t\tshouldShowSuggestions = false;\n\t\t}\n\n\t\treturn {\n\t\t\tshowSuggestions: shouldShowSuggestions,\n\t\t\tsuggestionsListboxId: `block-editor-url-input-suggestions-${ instanceId }`,\n\t\t\tsuggestionOptionIdPrefix: `block-editor-url-input-suggestion-${ instanceId }`,\n\t\t};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ this.renderControl() }\n\t\t\t\t{ this.renderSuggestions() }\n\t\t\t</>\n\t\t);\n\t}\n\n\trenderControl() {\n\t\tconst {\n\t\t\tlabel = null,\n\t\t\tclassName,\n\t\t\tisFullWidth,\n\t\t\tinstanceId,\n\t\t\tplaceholder = __( 'Paste URL or type to search' ),\n\t\t\t__experimentalRenderControl: renderControl,\n\t\t\tvalue = '',\n\t\t\thideLabelFromVision = false,\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tloading,\n\t\t\tshowSuggestions,\n\t\t\tselectedSuggestion,\n\t\t\tsuggestionsListboxId,\n\t\t\tsuggestionOptionIdPrefix,\n\t\t} = this.state;\n\n\t\tconst inputId = `url-input-control-${ instanceId }`;\n\n\t\tconst controlProps = {\n\t\t\tid: inputId, // Passes attribute to label for the for attribute\n\t\t\tlabel,\n\t\t\tclassName: clsx( 'block-editor-url-input', className, {\n\t\t\t\t'is-full-width': isFullWidth,\n\t\t\t} ),\n\t\t\thideLabelFromVision,\n\t\t};\n\n\t\tconst inputProps = {\n\t\t\tid: inputId,\n\t\t\tvalue,\n\t\t\trequired: true,\n\t\t\ttype: 'text',\n\t\t\tonChange: this.onChange,\n\t\t\tonFocus: this.onFocus,\n\t\t\tplaceholder,\n\t\t\tonKeyDown: this.onKeyDown,\n\t\t\trole: 'combobox',\n\t\t\t'aria-label': label ? undefined : __( 'URL' ), // Ensure input always has an accessible label\n\t\t\t'aria-expanded': showSuggestions,\n\t\t\t'aria-autocomplete': 'list',\n\t\t\t'aria-owns': suggestionsListboxId,\n\t\t\t'aria-activedescendant':\n\t\t\t\tselectedSuggestion !== null\n\t\t\t\t\t? `${ suggestionOptionIdPrefix }-${ selectedSuggestion }`\n\t\t\t\t\t: undefined,\n\t\t\tref: this.inputRef,\n\t\t\tsuffix: this.props.suffix,\n\t\t};\n\n\t\tif ( renderControl ) {\n\t\t\treturn renderControl( controlProps, inputProps, loading );\n\t\t}\n\n\t\treturn (\n\t\t\t<BaseControl __nextHasNoMarginBottom { ...controlProps }>\n\t\t\t\t<InputControl { ...inputProps } __next40pxDefaultSize />\n\t\t\t\t{ loading && <Spinner /> }\n\t\t\t</BaseControl>\n\t\t);\n\t}\n\n\trenderSuggestions() {\n\t\tconst {\n\t\t\tclassName,\n\t\t\t__experimentalRenderSuggestions: renderSuggestions,\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tshowSuggestions,\n\t\t\tsuggestions,\n\t\t\tsuggestionsValue,\n\t\t\tselectedSuggestion,\n\t\t\tsuggestionsListboxId,\n\t\t\tsuggestionOptionIdPrefix,\n\t\t\tloading,\n\t\t} = this.state;\n\n\t\tif ( ! showSuggestions || suggestions.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst suggestionsListProps = {\n\t\t\tid: suggestionsListboxId,\n\t\t\tref: this.autocompleteRef,\n\t\t\trole: 'listbox',\n\t\t};\n\n\t\tconst buildSuggestionItemProps = ( suggestion, index ) => {\n\t\t\treturn {\n\t\t\t\trole: 'option',\n\t\t\t\ttabIndex: '-1',\n\t\t\t\tid: `${ suggestionOptionIdPrefix }-${ index }`,\n\t\t\t\tref: this.bindSuggestionNode( index ),\n\t\t\t\t'aria-selected':\n\t\t\t\t\tindex === selectedSuggestion ? true : undefined,\n\t\t\t};\n\t\t};\n\n\t\tif ( isFunction( renderSuggestions ) ) {\n\t\t\treturn renderSuggestions( {\n\t\t\t\tsuggestions,\n\t\t\t\tselectedSuggestion,\n\t\t\t\tsuggestionsListProps,\n\t\t\t\tbuildSuggestionItemProps,\n\t\t\t\tisLoading: loading,\n\t\t\t\thandleSuggestionClick: this.handleOnClick,\n\t\t\t\tisInitialSuggestions: ! suggestionsValue?.length,\n\t\t\t\tcurrentInputValue: suggestionsValue,\n\t\t\t} );\n\t\t}\n\n\t\treturn (\n\t\t\t<Popover placement=\"bottom\" focusOnMount={ false }>\n\t\t\t\t<div\n\t\t\t\t\t{ ...suggestionsListProps }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'block-editor-url-input__suggestions',\n\t\t\t\t\t\t`${ className }__suggestions`\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ suggestions.map( ( suggestion, index ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\t{ ...buildSuggestionItemProps( suggestion, index ) }\n\t\t\t\t\t\t\tkey={ suggestion.id }\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'block-editor-url-input__suggestion',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-selected': index === selectedSuggestion,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ () => this.handleOnClick( suggestion ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ suggestion.title }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) ) }\n\t\t\t\t</div>\n\t\t\t</Popover>\n\t\t);\n\t}\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md\n */\nexport default compose(\n\twithSafeTimeout,\n\twithSpokenMessages,\n\twithInstanceId,\n\twithSelect( ( select, props ) => {\n\t\t// If a link suggestions handler is already provided then\n\t\t// bail.\n\t\tif ( isFunction( props.__experimentalFetchLinkSuggestions ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\t__experimentalFetchLinkSuggestions:\n\t\t\t\tgetSettings().__experimentalFetchLinkSuggestions,\n\t\t};\n\t} )\n)( URLInput );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,OAAO,EAAEC,EAAE,QAAQ,iBAAiB;AACjD,SAASC,SAAS,EAAEC,SAAS,QAAQ,oBAAoB;AACzD,SAASC,EAAE,EAAEC,IAAI,EAAEC,KAAK,EAAEC,GAAG,QAAQ,qBAAqB;AAC1D,SACCC,WAAW,EACXC,MAAM,EACNC,0BAA0B,IAAIC,YAAY,EAC1CC,OAAO,EACPC,kBAAkB,EAClBC,OAAO,QACD,uBAAuB;AAC9B,SACCC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,eAAe,QACT,oBAAoB;AAC3B,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AAC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D;EACD;EACA,MAAM;IAAEmE;EAAY,CAAC,GAAGD,MAAM,CAAEnH,gBAAiB,CAAC;EAClD,OAAO;IACNiD,kCAAkC,EACjCmE,WAAW,CAAC,CAAC,CAACnE;EAChB,CAAC;AACF,CAAE,CACH,CAAC,CAAEtC,QAAS,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","sprintf","_n","Component","createRef","UP","DOWN","ENTER","TAB","BaseControl","Button","__experimentalInputControl","InputControl","Spinner","withSpokenMessages","Popover","compose","debounce","withInstanceId","withSafeTimeout","withSelect","isURL","store","blockEditorStore","Fragment","_Fragment","jsxs","_jsxs","jsx","_jsx","createElement","_createElement","isFunction","maybeFunc","URLInput","constructor","props","onChange","bind","onFocus","onKeyDown","selectLink","handleOnClick","bindSuggestionNode","autocompleteRef","inputRef","updateSuggestions","suggestionNodes","suggestionsRequest","state","suggestions","showSuggestions","suggestionsValue","selectedSuggestion","suggestionsListboxId","suggestionOptionIdPrefix","componentDidUpdate","prevProps","value","__experimentalShowInitialSuggestions","scrollIntoView","behavior","block","inline","disableSuggestions","length","componentDidMount","shouldShowInitialSuggestions","componentWillUnmount","cancel","index","ref","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalHandleURLSuggestions","handleURLSuggestions","isInitialSuggestions","trim","setState","loading","request","then","debouncedSpeak","catch","finally","newValue","event","keyCode","target","selectionStart","preventDefault","setSelectionRange","onSubmit","suggestion","previousIndex","nextIndex","speak","url","current","focus","getDerivedStateFromProps","instanceId","shouldShowSuggestions","hasValue","render","children","renderControl","renderSuggestions","label","className","isFullWidth","placeholder","__experimentalRenderControl","hideLabelFromVision","inputId","controlProps","id","inputProps","required","type","role","undefined","suffix","__nextHasNoMarginBottom","__next40pxDefaultSize","__experimentalRenderSuggestions","suggestionsListProps","buildSuggestionItemProps","tabIndex","isLoading","handleSuggestionClick","currentInputValue","placement","focusOnMount","map","key","onClick","title","select","getSettings"],"sources":["@wordpress/block-editor/src/components/url-input/index.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';\nimport {\n\tBaseControl,\n\tButton,\n\t__experimentalInputControl as InputControl,\n\tSpinner,\n\twithSpokenMessages,\n\tPopover,\n} from '@wordpress/components';\nimport {\n\tcompose,\n\tdebounce,\n\twithInstanceId,\n\twithSafeTimeout,\n} from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Whether the argument is a function.\n *\n * @param {*} maybeFunc The argument to check.\n * @return {boolean} True if the argument is a function, false otherwise.\n */\nfunction isFunction( maybeFunc ) {\n\treturn typeof maybeFunc === 'function';\n}\n\nclass URLInput extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.selectLink = this.selectLink.bind( this );\n\t\tthis.handleOnClick = this.handleOnClick.bind( this );\n\t\tthis.bindSuggestionNode = this.bindSuggestionNode.bind( this );\n\t\tthis.autocompleteRef = props.autocompleteRef || createRef();\n\t\tthis.inputRef = createRef();\n\t\tthis.updateSuggestions = debounce(\n\t\t\tthis.updateSuggestions.bind( this ),\n\t\t\t200\n\t\t);\n\n\t\tthis.suggestionNodes = [];\n\n\t\tthis.suggestionsRequest = null;\n\n\t\tthis.state = {\n\t\t\tsuggestions: [],\n\t\t\tshowSuggestions: false,\n\t\t\tsuggestionsValue: null,\n\t\t\tselectedSuggestion: null,\n\t\t\tsuggestionsListboxId: '',\n\t\t\tsuggestionOptionIdPrefix: '',\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { showSuggestions, selectedSuggestion } = this.state;\n\t\tconst { value, __experimentalShowInitialSuggestions = false } =\n\t\t\tthis.props;\n\n\t\t// Only have to worry about scrolling selected suggestion into view\n\t\t// when already expanded.\n\t\tif (\n\t\t\tshowSuggestions &&\n\t\t\tselectedSuggestion !== null &&\n\t\t\tthis.suggestionNodes[ selectedSuggestion ]\n\t\t) {\n\t\t\tthis.suggestionNodes[ selectedSuggestion ].scrollIntoView( {\n\t\t\t\tbehavior: 'instant',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tinline: 'nearest',\n\t\t\t} );\n\t\t}\n\n\t\t// Update suggestions when the value changes.\n\t\tif ( prevProps.value !== value && ! this.props.disableSuggestions ) {\n\t\t\tif ( value?.length ) {\n\t\t\t\t// If the new value is not empty we need to update with suggestions for it.\n\t\t\t\tthis.updateSuggestions( value );\n\t\t\t} else if ( __experimentalShowInitialSuggestions ) {\n\t\t\t\t// If the new value is empty and we can show initial suggestions, then show initial suggestions.\n\t\t\t\tthis.updateSuggestions();\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.shouldShowInitialSuggestions() ) {\n\t\t\tthis.updateSuggestions();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.suggestionsRequest?.cancel?.();\n\t\tthis.suggestionsRequest = null;\n\t}\n\n\tbindSuggestionNode( index ) {\n\t\treturn ( ref ) => {\n\t\t\tthis.suggestionNodes[ index ] = ref;\n\t\t};\n\t}\n\n\tshouldShowInitialSuggestions() {\n\t\tconst { __experimentalShowInitialSuggestions = false, value } =\n\t\t\tthis.props;\n\t\treturn (\n\t\t\t__experimentalShowInitialSuggestions && ! ( value && value.length )\n\t\t);\n\t}\n\n\tupdateSuggestions( value = '' ) {\n\t\tconst {\n\t\t\t__experimentalFetchLinkSuggestions: fetchLinkSuggestions,\n\t\t\t__experimentalHandleURLSuggestions: handleURLSuggestions,\n\t\t} = this.props;\n\n\t\tif ( ! fetchLinkSuggestions ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Initial suggestions may only show if there is no value\n\t\t// (note: this includes whitespace).\n\t\tconst isInitialSuggestions = ! value?.length;\n\n\t\t// Trim only now we've determined whether or not it originally had a \"length\"\n\t\t// (even if that value was all whitespace).\n\t\tvalue = value.trim();\n\n\t\t// Allow a suggestions request if:\n\t\t// - there are at least 2 characters in the search input (except manual searches where\n\t\t// search input length is not required to trigger a fetch)\n\t\t// - this is a direct entry (eg: a URL)\n\t\tif (\n\t\t\t! isInitialSuggestions &&\n\t\t\t( value.length < 2 || ( ! handleURLSuggestions && isURL( value ) ) )\n\t\t) {\n\t\t\tthis.suggestionsRequest?.cancel?.();\n\t\t\tthis.suggestionsRequest = null;\n\n\t\t\tthis.setState( {\n\t\t\t\tsuggestions: [],\n\t\t\t\tshowSuggestions: false,\n\t\t\t\tsuggestionsValue: value,\n\t\t\t\tselectedSuggestion: null,\n\t\t\t\tloading: false,\n\t\t\t} );\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState( {\n\t\t\tselectedSuggestion: null,\n\t\t\tloading: true,\n\t\t} );\n\n\t\tconst request = fetchLinkSuggestions( value, {\n\t\t\tisInitialSuggestions,\n\t\t} );\n\n\t\trequest\n\t\t\t.then( ( suggestions ) => {\n\t\t\t\t// A fetch Promise doesn't have an abort option. It's mimicked by\n\t\t\t\t// comparing the request reference in on the instance, which is\n\t\t\t\t// reset or deleted on subsequent requests or unmounting.\n\t\t\t\tif ( this.suggestionsRequest !== request ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.setState( {\n\t\t\t\t\tsuggestions,\n\t\t\t\t\tsuggestionsValue: value,\n\t\t\t\t\tloading: false,\n\t\t\t\t\tshowSuggestions: !! suggestions.length,\n\t\t\t\t} );\n\n\t\t\t\tif ( !! suggestions.length ) {\n\t\t\t\t\tthis.props.debouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\tsuggestions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tsuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.props.debouncedSpeak(\n\t\t\t\t\t\t__( 'No results.' ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tif ( this.suggestionsRequest !== request ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.setState( {\n\t\t\t\t\tloading: false,\n\t\t\t\t} );\n\t\t\t} )\n\t\t\t.finally( () => {\n\t\t\t\t// If this is the current promise then reset the reference\n\t\t\t\t// to allow for checking if a new request is made.\n\t\t\t\tif ( this.suggestionsRequest === request ) {\n\t\t\t\t\tthis.suggestionsRequest = null;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t// Note that this assignment is handled *before* the async search request\n\t\t// as a Promise always resolves on the next tick of the event loop.\n\t\tthis.suggestionsRequest = request;\n\t}\n\n\tonChange( newValue ) {\n\t\tthis.props.onChange( newValue );\n\t}\n\n\tonFocus() {\n\t\tconst { suggestions } = this.state;\n\t\tconst { disableSuggestions, value } = this.props;\n\n\t\t// When opening the link editor, if there's a value present, we want to load the suggestions pane with the results for this input search value\n\t\t// Don't re-run the suggestions on focus if there are already suggestions present (prevents searching again when tabbing between the input and buttons)\n\t\t// or there is already a request in progress.\n\t\tif (\n\t\t\tvalue &&\n\t\t\t! disableSuggestions &&\n\t\t\t! ( suggestions && suggestions.length ) &&\n\t\t\tthis.suggestionsRequest === null\n\t\t) {\n\t\t\t// Ensure the suggestions are updated with the current input value.\n\t\t\tthis.updateSuggestions( value );\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tthis.props.onKeyDown?.( event );\n\t\tconst { showSuggestions, selectedSuggestion, suggestions, loading } =\n\t\t\tthis.state;\n\n\t\t// If the suggestions are not shown or loading, we shouldn't handle the arrow keys\n\t\t// We shouldn't preventDefault to allow block arrow keys navigation.\n\t\tif ( ! showSuggestions || ! suggestions.length || loading ) {\n\t\t\t// In the Windows version of Firefox the up and down arrows don't move the caret\n\t\t\t// within an input field like they do for Mac Firefox/Chrome/Safari. This causes\n\t\t\t// a form of focus trapping that is disruptive to the user experience. This disruption\n\t\t\t// only happens if the caret is not in the first or last position in the text input.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/5693#issuecomment-436684747\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t// When UP is pressed, if the caret is at the start of the text, move it to the 0\n\t\t\t\t// position.\n\t\t\t\tcase UP: {\n\t\t\t\t\tif ( 0 !== event.target.selectionStart ) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to position 0.\n\t\t\t\t\t\tevent.target.setSelectionRange( 0, 0 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// When DOWN is pressed, if the caret is not at the end of the text, move it to the\n\t\t\t\t// last position.\n\t\t\t\tcase DOWN: {\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.props.value.length !== event.target.selectionStart\n\t\t\t\t\t) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to the last position.\n\t\t\t\t\t\tevent.target.setSelectionRange(\n\t\t\t\t\t\t\tthis.props.value.length,\n\t\t\t\t\t\t\tthis.props.value.length\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Submitting while loading should trigger onSubmit.\n\t\t\t\tcase ENTER: {\n\t\t\t\t\tif ( this.props.onSubmit ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.props.onSubmit( null, event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst suggestion =\n\t\t\tthis.state.suggestions[ this.state.selectedSuggestion ];\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase UP: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst previousIndex = ! selectedSuggestion\n\t\t\t\t\t? suggestions.length - 1\n\t\t\t\t\t: selectedSuggestion - 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: previousIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DOWN: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst nextIndex =\n\t\t\t\t\tselectedSuggestion === null ||\n\t\t\t\t\tselectedSuggestion === suggestions.length - 1\n\t\t\t\t\t\t? 0\n\t\t\t\t\t\t: selectedSuggestion + 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: nextIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase TAB: {\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tthis.selectLink( suggestion );\n\t\t\t\t\t// Announce a link has been selected when tabbing away from the input field.\n\t\t\t\t\tthis.props.speak( __( 'Link selected.' ) );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ENTER: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tthis.selectLink( suggestion );\n\n\t\t\t\t\tif ( this.props.onSubmit ) {\n\t\t\t\t\t\tthis.props.onSubmit( suggestion, event );\n\t\t\t\t\t}\n\t\t\t\t} else if ( this.props.onSubmit ) {\n\t\t\t\t\tthis.props.onSubmit( null, event );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tselectLink( suggestion ) {\n\t\tthis.props.onChange( suggestion.url, suggestion );\n\t\tthis.setState( {\n\t\t\tselectedSuggestion: null,\n\t\t\tshowSuggestions: false,\n\t\t} );\n\t}\n\n\thandleOnClick( suggestion ) {\n\t\tthis.selectLink( suggestion );\n\t\t// Move focus to the input field when a link suggestion is clicked.\n\t\tthis.inputRef.current.focus();\n\t}\n\n\tstatic getDerivedStateFromProps(\n\t\t{\n\t\t\tvalue,\n\t\t\tinstanceId,\n\t\t\tdisableSuggestions,\n\t\t\t__experimentalShowInitialSuggestions = false,\n\t\t},\n\t\t{ showSuggestions }\n\t) {\n\t\tlet shouldShowSuggestions = showSuggestions;\n\n\t\tconst hasValue = value && value.length;\n\n\t\tif ( ! __experimentalShowInitialSuggestions && ! hasValue ) {\n\t\t\tshouldShowSuggestions = false;\n\t\t}\n\n\t\tif ( disableSuggestions === true ) {\n\t\t\tshouldShowSuggestions = false;\n\t\t}\n\n\t\treturn {\n\t\t\tshowSuggestions: shouldShowSuggestions,\n\t\t\tsuggestionsListboxId: `block-editor-url-input-suggestions-${ instanceId }`,\n\t\t\tsuggestionOptionIdPrefix: `block-editor-url-input-suggestion-${ instanceId }`,\n\t\t};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ this.renderControl() }\n\t\t\t\t{ this.renderSuggestions() }\n\t\t\t</>\n\t\t);\n\t}\n\n\trenderControl() {\n\t\tconst {\n\t\t\tlabel = null,\n\t\t\tclassName,\n\t\t\tisFullWidth,\n\t\t\tinstanceId,\n\t\t\tplaceholder = __( 'Paste URL or type to search' ),\n\t\t\t__experimentalRenderControl: renderControl,\n\t\t\tvalue = '',\n\t\t\thideLabelFromVision = false,\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tloading,\n\t\t\tshowSuggestions,\n\t\t\tselectedSuggestion,\n\t\t\tsuggestionsListboxId,\n\t\t\tsuggestionOptionIdPrefix,\n\t\t} = this.state;\n\n\t\tconst inputId = `url-input-control-${ instanceId }`;\n\n\t\tconst controlProps = {\n\t\t\tid: inputId, // Passes attribute to label for the for attribute\n\t\t\tlabel,\n\t\t\tclassName: clsx( 'block-editor-url-input', className, {\n\t\t\t\t'is-full-width': isFullWidth,\n\t\t\t} ),\n\t\t\thideLabelFromVision,\n\t\t};\n\n\t\tconst inputProps = {\n\t\t\tid: inputId,\n\t\t\tvalue,\n\t\t\trequired: true,\n\t\t\ttype: 'text',\n\t\t\tonChange: this.onChange,\n\t\t\tonFocus: this.onFocus,\n\t\t\tplaceholder,\n\t\t\tonKeyDown: this.onKeyDown,\n\t\t\trole: 'combobox',\n\t\t\t'aria-label': label ? undefined : __( 'URL' ), // Ensure input always has an accessible label\n\t\t\t'aria-expanded': showSuggestions,\n\t\t\t'aria-autocomplete': 'list',\n\t\t\t'aria-owns': suggestionsListboxId,\n\t\t\t'aria-activedescendant':\n\t\t\t\tselectedSuggestion !== null\n\t\t\t\t\t? `${ suggestionOptionIdPrefix }-${ selectedSuggestion }`\n\t\t\t\t\t: undefined,\n\t\t\tref: this.inputRef,\n\t\t\tsuffix: this.props.suffix,\n\t\t};\n\n\t\tif ( renderControl ) {\n\t\t\treturn renderControl( controlProps, inputProps, loading );\n\t\t}\n\n\t\treturn (\n\t\t\t<BaseControl __nextHasNoMarginBottom { ...controlProps }>\n\t\t\t\t<InputControl { ...inputProps } __next40pxDefaultSize />\n\t\t\t\t{ loading && <Spinner /> }\n\t\t\t</BaseControl>\n\t\t);\n\t}\n\n\trenderSuggestions() {\n\t\tconst {\n\t\t\tclassName,\n\t\t\t__experimentalRenderSuggestions: renderSuggestions,\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tshowSuggestions,\n\t\t\tsuggestions,\n\t\t\tsuggestionsValue,\n\t\t\tselectedSuggestion,\n\t\t\tsuggestionsListboxId,\n\t\t\tsuggestionOptionIdPrefix,\n\t\t\tloading,\n\t\t} = this.state;\n\n\t\tif ( ! showSuggestions || suggestions.length === 0 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst suggestionsListProps = {\n\t\t\tid: suggestionsListboxId,\n\t\t\tref: this.autocompleteRef,\n\t\t\trole: 'listbox',\n\t\t};\n\n\t\tconst buildSuggestionItemProps = ( suggestion, index ) => {\n\t\t\treturn {\n\t\t\t\trole: 'option',\n\t\t\t\ttabIndex: '-1',\n\t\t\t\tid: `${ suggestionOptionIdPrefix }-${ index }`,\n\t\t\t\tref: this.bindSuggestionNode( index ),\n\t\t\t\t'aria-selected':\n\t\t\t\t\tindex === selectedSuggestion ? true : undefined,\n\t\t\t};\n\t\t};\n\n\t\tif ( isFunction( renderSuggestions ) ) {\n\t\t\treturn renderSuggestions( {\n\t\t\t\tsuggestions,\n\t\t\t\tselectedSuggestion,\n\t\t\t\tsuggestionsListProps,\n\t\t\t\tbuildSuggestionItemProps,\n\t\t\t\tisLoading: loading,\n\t\t\t\thandleSuggestionClick: this.handleOnClick,\n\t\t\t\tisInitialSuggestions: ! suggestionsValue?.length,\n\t\t\t\tcurrentInputValue: suggestionsValue,\n\t\t\t} );\n\t\t}\n\n\t\treturn (\n\t\t\t<Popover placement=\"bottom\" focusOnMount={ false }>\n\t\t\t\t<div\n\t\t\t\t\t{ ...suggestionsListProps }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'block-editor-url-input__suggestions',\n\t\t\t\t\t\t`${ className }__suggestions`\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ suggestions.map( ( suggestion, index ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t{ ...buildSuggestionItemProps( suggestion, index ) }\n\t\t\t\t\t\t\tkey={ suggestion.id }\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'block-editor-url-input__suggestion',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-selected': index === selectedSuggestion,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ () => this.handleOnClick( suggestion ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ suggestion.title }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) ) }\n\t\t\t\t</div>\n\t\t\t</Popover>\n\t\t);\n\t}\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md\n */\nexport default compose(\n\twithSafeTimeout,\n\twithSpokenMessages,\n\twithInstanceId,\n\twithSelect( ( select, props ) => {\n\t\t// If a link suggestions handler is already provided then\n\t\t// bail.\n\t\tif ( isFunction( props.__experimentalFetchLinkSuggestions ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\t__experimentalFetchLinkSuggestions:\n\t\t\t\tgetSettings().__experimentalFetchLinkSuggestions,\n\t\t};\n\t} )\n)( URLInput );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,OAAO,EAAEC,EAAE,QAAQ,iBAAiB;AACjD,SAASC,SAAS,EAAEC,SAAS,QAAQ,oBAAoB;AACzD,SAASC,EAAE,EAAEC,IAAI,EAAEC,KAAK,EAAEC,GAAG,QAAQ,qBAAqB;AAC1D,SACCC,WAAW,EACXC,MAAM,EACNC,0BAA0B,IAAIC,YAAY,EAC1CC,OAAO,EACPC,kBAAkB,EAClBC,OAAO,QACD,uBAAuB;AAC9B,SACCC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,eAAe,QACT,oBAAoB;AAC3B,SAASC,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;AACA,SAASC,KAAK,IAAIC,gBAAgB,QAAQ,aAAa;;AAEvD;AACA;AACA;AACA;AACA;AACA;AALA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,GAAA,IA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CmE,WAAW,CAAC,CAAC,CAACnE;EAChB,CAAC;AACF,CAAE,CACH,CAAC,CAAEtC,QAAS,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { __ } from '@wordpress/i18n';
5
5
  import { justifyLeft, justifyCenter, justifyRight, justifySpaceBetween, justifyStretch, arrowRight, arrowDown } from '@wordpress/icons';
6
- import { Button, ToggleControl, Flex, FlexItem, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon } from '@wordpress/components';
6
+ import { ToggleControl, Flex, FlexItem, __experimentalToggleGroupControl as ToggleGroupControl, __experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon } from '@wordpress/components';
7
7
 
8
8
  /**
9
9
  * Internal dependencies
@@ -90,8 +90,7 @@ export default {
90
90
  isToolbar: true
91
91
  }), allowVerticalAlignment && /*#__PURE__*/_jsx(FlexLayoutVerticalAlignmentControl, {
92
92
  layout: layout,
93
- onChange: onChange,
94
- isToolbar: true
93
+ onChange: onChange
95
94
  })]
96
95
  });
97
96
  },
@@ -157,8 +156,7 @@ export default {
157
156
  };
158
157
  function FlexLayoutVerticalAlignmentControl({
159
158
  layout,
160
- onChange,
161
- isToolbar = false
159
+ onChange
162
160
  }) {
163
161
  const {
164
162
  orientation = 'horizontal'
@@ -173,40 +171,10 @@ function FlexLayoutVerticalAlignmentControl({
173
171
  verticalAlignment: value
174
172
  });
175
173
  };
176
- if (isToolbar) {
177
- return /*#__PURE__*/_jsx(BlockVerticalAlignmentControl, {
178
- onChange: onVerticalAlignmentChange,
179
- value: verticalAlignment,
180
- controls: orientation === 'horizontal' ? ['top', 'center', 'bottom', 'stretch'] : ['top', 'center', 'bottom', 'space-between']
181
- });
182
- }
183
- const verticalAlignmentOptions = [{
184
- value: 'flex-start',
185
- label: __('Align items top')
186
- }, {
187
- value: 'center',
188
- label: __('Align items center')
189
- }, {
190
- value: 'flex-end',
191
- label: __('Align items bottom')
192
- }];
193
- return /*#__PURE__*/_jsxs("fieldset", {
194
- className: "block-editor-hooks__flex-layout-vertical-alignment-control",
195
- children: [/*#__PURE__*/_jsx("legend", {
196
- children: __('Vertical alignment')
197
- }), /*#__PURE__*/_jsx("div", {
198
- children: verticalAlignmentOptions.map((value, icon, label) => {
199
- return /*#__PURE__*/_jsx(Button
200
- // TODO: Switch to `true` (40px size) if possible
201
- , {
202
- __next40pxDefaultSize: false,
203
- label: label,
204
- icon: icon,
205
- isPressed: verticalAlignment === value,
206
- onClick: () => onVerticalAlignmentChange(value)
207
- }, value);
208
- })
209
- })]
174
+ return /*#__PURE__*/_jsx(BlockVerticalAlignmentControl, {
175
+ onChange: onVerticalAlignmentChange,
176
+ value: verticalAlignment,
177
+ controls: orientation === 'horizontal' ? ['top', 'center', 'bottom', 'stretch'] : ['top', 'center', 'bottom', 'space-between']
210
178
  });
211
179
  }
212
180
  const POPOVER_PROPS = {
@@ -1 +1 @@
1
- {"version":3,"names":["__","justifyLeft","justifyCenter","justifyRight","justifySpaceBetween","justifyStretch","arrowRight","arrowDown","Button","ToggleControl","Flex","FlexItem","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","appendSelectors","getBlockGapCSS","getGapCSSValue","BlockControls","JustifyContentControl","BlockVerticalAlignmentControl","shouldSkipSerialization","LAYOUT_DEFINITIONS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","justifyContentMap","left","right","center","alignItemsMap","stretch","verticalAlignmentMap","top","bottom","flexWrapOptions","name","label","inspectorControls","FlexLayoutInspectorControls","layout","onChange","layoutBlockSupport","allowOrientation","children","FlexLayoutJustifyContentControl","OrientationControl","FlexWrapControl","toolBarControls","FlexLayoutToolbarControls","allowSwitching","allowVerticalAlignment","group","__experimentalShareWithChildBlocks","isToolbar","FlexLayoutVerticalAlignmentControl","getLayoutStyle","selector","style","blockName","hasBlockGapSupport","layoutDefinitions","orientation","blockGapValue","spacing","blockGap","undefined","justifyContent","flexWrap","includes","verticalAlignment","alignItems","output","rules","push","length","join","getOrientation","getAlignments","defaultVerticalAlignment","onVerticalAlignmentChange","value","controls","verticalAlignmentOptions","className","map","icon","__next40pxDefaultSize","isPressed","onClick","POPOVER_PROPS","placement","onJustificationChange","allowedControls","popoverProps","justificationOptions","__nextHasNoMarginBottom","checked","newVerticalAlignment","newJustification"],"sources":["@wordpress/block-editor/src/layouts/flex.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n\tjustifySpaceBetween,\n\tjustifyStretch,\n\tarrowRight,\n\tarrowDown,\n} from '@wordpress/icons';\nimport {\n\tButton,\n\tToggleControl,\n\tFlex,\n\tFlexItem,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { appendSelectors, getBlockGapCSS } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport {\n\tBlockControls,\n\tJustifyContentControl,\n\tBlockVerticalAlignmentControl,\n} from '../components';\nimport { shouldSkipSerialization } from '../hooks/utils';\nimport { LAYOUT_DEFINITIONS } from './definitions';\n\n// Used with the default, horizontal flex orientation.\nconst justifyContentMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\t'space-between': 'space-between',\n};\n\n// Used with the vertical (column) flex orientation.\nconst alignItemsMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\tstretch: 'stretch',\n};\n\nconst verticalAlignmentMap = {\n\ttop: 'flex-start',\n\tcenter: 'center',\n\tbottom: 'flex-end',\n\tstretch: 'stretch',\n\t'space-between': 'space-between',\n};\n\nconst flexWrapOptions = [ 'wrap', 'nowrap' ];\n\nexport default {\n\tname: 'flex',\n\tlabel: __( 'Flex' ),\n\tinspectorControls: function FlexLayoutInspectorControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport = {},\n\t} ) {\n\t\tconst { allowOrientation = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Flex>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t{ allowOrientation && (\n\t\t\t\t\t\t\t<OrientationControl\n\t\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t\t<FlexWrapControl layout={ layout } onChange={ onChange } />\n\t\t\t</>\n\t\t);\n\t},\n\ttoolBarControls: function FlexLayoutToolbarControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport,\n\t} ) {\n\t\tif ( layoutBlockSupport?.allowSwitching ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { allowVerticalAlignment = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\tlayout={ layout }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tisToolbar\n\t\t\t\t/>\n\t\t\t\t{ allowVerticalAlignment && (\n\t\t\t\t\t<FlexLayoutVerticalAlignmentControl\n\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tisToolbar\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t);\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\t} ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\n\t\t// If a block's block.json skips serialization for spacing or spacing.blockGap,\n\t\t// don't apply the user-defined value to the styles.\n\t\tconst blockGapValue =\n\t\t\tstyle?.spacing?.blockGap &&\n\t\t\t! shouldSkipSerialization( blockName, 'spacing', 'blockGap' )\n\t\t\t\t? getGapCSSValue( style?.spacing?.blockGap, '0.5em' )\n\t\t\t\t: undefined;\n\t\tconst justifyContent = justifyContentMap[ layout.justifyContent ];\n\t\tconst flexWrap = flexWrapOptions.includes( layout.flexWrap )\n\t\t\t? layout.flexWrap\n\t\t\t: 'wrap';\n\t\tconst verticalAlignment =\n\t\t\tverticalAlignmentMap[ layout.verticalAlignment ];\n\t\tconst alignItems =\n\t\t\talignItemsMap[ layout.justifyContent ] || alignItemsMap.left;\n\n\t\tlet output = '';\n\t\tconst rules = [];\n\n\t\tif ( flexWrap && flexWrap !== 'wrap' ) {\n\t\t\trules.push( `flex-wrap: ${ flexWrap }` );\n\t\t}\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `align-items: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\tif ( justifyContent ) {\n\t\t\t\trules.push( `justify-content: ${ justifyContent }` );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `justify-content: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\trules.push( 'flex-direction: column' );\n\t\t\trules.push( `align-items: ${ alignItems }` );\n\t\t}\n\n\t\tif ( rules.length ) {\n\t\t\toutput = `${ appendSelectors( selector ) } {\n\t\t\t\t${ rules.join( '; ' ) };\n\t\t\t}`;\n\t\t}\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'flex',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation( layout ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\t\treturn orientation;\n\t},\n\tgetAlignments() {\n\t\treturn [];\n\t},\n};\n\nfunction FlexLayoutVerticalAlignmentControl( {\n\tlayout,\n\tonChange,\n\tisToolbar = false,\n} ) {\n\tconst { orientation = 'horizontal' } = layout;\n\n\tconst defaultVerticalAlignment =\n\t\torientation === 'horizontal'\n\t\t\t? verticalAlignmentMap.center\n\t\t\t: verticalAlignmentMap.top;\n\n\tconst { verticalAlignment = defaultVerticalAlignment } = layout;\n\n\tconst onVerticalAlignmentChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tverticalAlignment: value,\n\t\t} );\n\t};\n\tif ( isToolbar ) {\n\t\treturn (\n\t\t\t<BlockVerticalAlignmentControl\n\t\t\t\tonChange={ onVerticalAlignmentChange }\n\t\t\t\tvalue={ verticalAlignment }\n\t\t\t\tcontrols={\n\t\t\t\t\torientation === 'horizontal'\n\t\t\t\t\t\t? [ 'top', 'center', 'bottom', 'stretch' ]\n\t\t\t\t\t\t: [ 'top', 'center', 'bottom', 'space-between' ]\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst verticalAlignmentOptions = [\n\t\t{\n\t\t\tvalue: 'flex-start',\n\t\t\tlabel: __( 'Align items top' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'center',\n\t\t\tlabel: __( 'Align items center' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'flex-end',\n\t\t\tlabel: __( 'Align items bottom' ),\n\t\t},\n\t];\n\n\treturn (\n\t\t<fieldset className=\"block-editor-hooks__flex-layout-vertical-alignment-control\">\n\t\t\t<legend>{ __( 'Vertical alignment' ) }</legend>\n\t\t\t<div>\n\t\t\t\t{ verticalAlignmentOptions.map( ( value, icon, label ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t// TODO: Switch to `true` (40px size) if possible\n\t\t\t\t\t\t\t__next40pxDefaultSize={ false }\n\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisPressed={ verticalAlignment === value }\n\t\t\t\t\t\t\tonClick={ () => onVerticalAlignmentChange( value ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n\nconst POPOVER_PROPS = {\n\tplacement: 'bottom-start',\n};\n\nfunction FlexLayoutJustifyContentControl( {\n\tlayout,\n\tonChange,\n\tisToolbar = false,\n} ) {\n\tconst { justifyContent = 'left', orientation = 'horizontal' } = layout;\n\tconst onJustificationChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tjustifyContent: value,\n\t\t} );\n\t};\n\tconst allowedControls = [ 'left', 'center', 'right' ];\n\tif ( orientation === 'horizontal' ) {\n\t\tallowedControls.push( 'space-between' );\n\t} else {\n\t\tallowedControls.push( 'stretch' );\n\t}\n\tif ( isToolbar ) {\n\t\treturn (\n\t\t\t<JustifyContentControl\n\t\t\t\tallowedControls={ allowedControls }\n\t\t\t\tvalue={ justifyContent }\n\t\t\t\tonChange={ onJustificationChange }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst justificationOptions = [\n\t\t{\n\t\t\tvalue: 'left',\n\t\t\ticon: justifyLeft,\n\t\t\tlabel: __( 'Justify items left' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'center',\n\t\t\ticon: justifyCenter,\n\t\t\tlabel: __( 'Justify items center' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'right',\n\t\t\ticon: justifyRight,\n\t\t\tlabel: __( 'Justify items right' ),\n\t\t},\n\t];\n\tif ( orientation === 'horizontal' ) {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'space-between',\n\t\t\ticon: justifySpaceBetween,\n\t\t\tlabel: __( 'Space between items' ),\n\t\t} );\n\t} else {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'stretch',\n\t\t\ticon: justifyStretch,\n\t\t\tlabel: __( 'Stretch items' ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Justification' ) }\n\t\t\tvalue={ justifyContent }\n\t\t\tonChange={ onJustificationChange }\n\t\t\tclassName=\"block-editor-hooks__flex-layout-justification-controls\"\n\t\t>\n\t\t\t{ justificationOptions.map( ( { value, icon, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n\nfunction FlexWrapControl( { layout, onChange } ) {\n\tconst { flexWrap = 'wrap' } = layout;\n\treturn (\n\t\t<ToggleControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Allow to wrap to multiple lines' ) }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tonChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\tflexWrap: value ? 'wrap' : 'nowrap',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tchecked={ flexWrap === 'wrap' }\n\t\t/>\n\t);\n}\n\nfunction OrientationControl( { layout, onChange } ) {\n\tconst {\n\t\torientation = 'horizontal',\n\t\tverticalAlignment,\n\t\tjustifyContent,\n\t} = layout;\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"block-editor-hooks__flex-layout-orientation-controls\"\n\t\t\tlabel={ __( 'Orientation' ) }\n\t\t\tvalue={ orientation }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\t// Make sure the vertical alignment and justification are compatible with the new orientation.\n\t\t\t\tlet newVerticalAlignment = verticalAlignment;\n\t\t\t\tlet newJustification = justifyContent;\n\t\t\t\tif ( value === 'horizontal' ) {\n\t\t\t\t\tif ( verticalAlignment === 'space-between' ) {\n\t\t\t\t\t\tnewVerticalAlignment = 'center';\n\t\t\t\t\t}\n\t\t\t\t\tif ( justifyContent === 'stretch' ) {\n\t\t\t\t\t\tnewJustification = 'left';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( verticalAlignment === 'stretch' ) {\n\t\t\t\t\t\tnewVerticalAlignment = 'top';\n\t\t\t\t\t}\n\t\t\t\t\tif ( justifyContent === 'space-between' ) {\n\t\t\t\t\t\tnewJustification = 'left';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn onChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\torientation: value,\n\t\t\t\t\tverticalAlignment: newVerticalAlignment,\n\t\t\t\t\tjustifyContent: newJustification,\n\t\t\t\t} );\n\t\t\t} }\n\t\t>\n\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\ticon={ arrowRight }\n\t\t\t\tvalue=\"horizontal\"\n\t\t\t\tlabel={ __( 'Horizontal' ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\ticon={ arrowDown }\n\t\t\t\tvalue=\"vertical\"\n\t\t\t\tlabel={ __( 'Vertical' ) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,mBAAmB,EACnBC,cAAc,EACdC,UAAU,EACVC,SAAS,QACH,kBAAkB;AACzB,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GzC,EAAE,CAAE,aAAc,CAAG;IAC7BqF,KAAK,EAAGnB,WAAa;IACrBrB,QAAQ,EAAKwC,KAAK,IAAM;MACvB;MACA,IAAIiB,oBAAoB,GAAG5B,iBAAiB;MAC5C,IAAI6B,gBAAgB,GAAGhC,cAAc;MACrC,IAAKc,KAAK,KAAK,YAAY,EAAG;QAC7B,IAAKX,iBAAiB,KAAK,eAAe,EAAG;UAC5C4B,oBAAoB,GAAG,QAAQ;QAChC;QACA,IAAK/B,cAAc,KAAK,SAAS,EAAG;UACnCgC,gBAAgB,GAAG,MAAM;QAC1B;MACD,CAAC,MAAM;QACN,IAAK7B,iBAAiB,KAAK,SAAS,EAAG;UACtC4B,oBAAoB,GAAG,KAAK;QAC7B;QACA,IAAK/B,cAAc,KAAK,eAAe,EAAG;UACzCgC,gBAAgB,GAAG,MAAM;QAC1B;MACD;MACA,OAAO1D,QAAQ,CAAE;QAChB,GAAGD,MAAM;QACTsB,WAAW,EAAEmB,KAAK;QAClBX,iBAAiB,EAAE4B,oBAAoB;QACvC/B,cAAc,EAAEgC;MACjB,CAAE,CAAC;IACJ,CAAG;IAAAvD,QAAA,gBAEHvB,IAAA,CAACV,4BAA4B;MAC5B2E,IAAI,EAAGpF,UAAY;MACnB+E,KAAK,EAAC,YAAY;MAClB5C,KAAK,EAAGzC,EAAE,CAAE,YAAa;IAAG,CAC5B,CAAC,eACFyB,IAAA,CAACV,4BAA4B;MAC5B2E,IAAI,EAAGnF,SAAW;MAClB8E,KAAK,EAAC,UAAU;MAChB5C,KAAK,EAAGzC,EAAE,CAAE,UAAW;IAAG,CAC1B,CAAC;EAAA,CACiB,CAAC;AAEvB","ignoreList":[]}
1
+ {"version":3,"names":["__","justifyLeft","justifyCenter","justifyRight","justifySpaceBetween","justifyStretch","arrowRight","arrowDown","ToggleControl","Flex","FlexItem","__experimentalToggleGroupControl","ToggleGroupControl","__experimentalToggleGroupControlOptionIcon","ToggleGroupControlOptionIcon","appendSelectors","getBlockGapCSS","getGapCSSValue","BlockControls","JustifyContentControl","BlockVerticalAlignmentControl","shouldSkipSerialization","LAYOUT_DEFINITIONS","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","justifyContentMap","left","right","center","alignItemsMap","stretch","verticalAlignmentMap","top","bottom","flexWrapOptions","name","label","inspectorControls","FlexLayoutInspectorControls","layout","onChange","layoutBlockSupport","allowOrientation","children","FlexLayoutJustifyContentControl","OrientationControl","FlexWrapControl","toolBarControls","FlexLayoutToolbarControls","allowSwitching","allowVerticalAlignment","group","__experimentalShareWithChildBlocks","isToolbar","FlexLayoutVerticalAlignmentControl","getLayoutStyle","selector","style","blockName","hasBlockGapSupport","layoutDefinitions","orientation","blockGapValue","spacing","blockGap","undefined","justifyContent","flexWrap","includes","verticalAlignment","alignItems","output","rules","push","length","join","getOrientation","getAlignments","defaultVerticalAlignment","onVerticalAlignmentChange","value","controls","POPOVER_PROPS","placement","onJustificationChange","allowedControls","popoverProps","justificationOptions","icon","__next40pxDefaultSize","__nextHasNoMarginBottom","className","map","checked","newVerticalAlignment","newJustification"],"sources":["@wordpress/block-editor/src/layouts/flex.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n\tjustifySpaceBetween,\n\tjustifyStretch,\n\tarrowRight,\n\tarrowDown,\n} from '@wordpress/icons';\nimport {\n\tToggleControl,\n\tFlex,\n\tFlexItem,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { appendSelectors, getBlockGapCSS } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport {\n\tBlockControls,\n\tJustifyContentControl,\n\tBlockVerticalAlignmentControl,\n} from '../components';\nimport { shouldSkipSerialization } from '../hooks/utils';\nimport { LAYOUT_DEFINITIONS } from './definitions';\n\n// Used with the default, horizontal flex orientation.\nconst justifyContentMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\t'space-between': 'space-between',\n};\n\n// Used with the vertical (column) flex orientation.\nconst alignItemsMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\tstretch: 'stretch',\n};\n\nconst verticalAlignmentMap = {\n\ttop: 'flex-start',\n\tcenter: 'center',\n\tbottom: 'flex-end',\n\tstretch: 'stretch',\n\t'space-between': 'space-between',\n};\n\nconst flexWrapOptions = [ 'wrap', 'nowrap' ];\n\nexport default {\n\tname: 'flex',\n\tlabel: __( 'Flex' ),\n\tinspectorControls: function FlexLayoutInspectorControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport = {},\n\t} ) {\n\t\tconst { allowOrientation = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Flex>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t{ allowOrientation && (\n\t\t\t\t\t\t\t<OrientationControl\n\t\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t\t<FlexWrapControl layout={ layout } onChange={ onChange } />\n\t\t\t</>\n\t\t);\n\t},\n\ttoolBarControls: function FlexLayoutToolbarControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport,\n\t} ) {\n\t\tif ( layoutBlockSupport?.allowSwitching ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { allowVerticalAlignment = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\tlayout={ layout }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tisToolbar\n\t\t\t\t/>\n\t\t\t\t{ allowVerticalAlignment && (\n\t\t\t\t\t<FlexLayoutVerticalAlignmentControl\n\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t);\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions = LAYOUT_DEFINITIONS,\n\t} ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\n\t\t// If a block's block.json skips serialization for spacing or spacing.blockGap,\n\t\t// don't apply the user-defined value to the styles.\n\t\tconst blockGapValue =\n\t\t\tstyle?.spacing?.blockGap &&\n\t\t\t! shouldSkipSerialization( blockName, 'spacing', 'blockGap' )\n\t\t\t\t? getGapCSSValue( style?.spacing?.blockGap, '0.5em' )\n\t\t\t\t: undefined;\n\t\tconst justifyContent = justifyContentMap[ layout.justifyContent ];\n\t\tconst flexWrap = flexWrapOptions.includes( layout.flexWrap )\n\t\t\t? layout.flexWrap\n\t\t\t: 'wrap';\n\t\tconst verticalAlignment =\n\t\t\tverticalAlignmentMap[ layout.verticalAlignment ];\n\t\tconst alignItems =\n\t\t\talignItemsMap[ layout.justifyContent ] || alignItemsMap.left;\n\n\t\tlet output = '';\n\t\tconst rules = [];\n\n\t\tif ( flexWrap && flexWrap !== 'wrap' ) {\n\t\t\trules.push( `flex-wrap: ${ flexWrap }` );\n\t\t}\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `align-items: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\tif ( justifyContent ) {\n\t\t\t\trules.push( `justify-content: ${ justifyContent }` );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `justify-content: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\trules.push( 'flex-direction: column' );\n\t\t\trules.push( `align-items: ${ alignItems }` );\n\t\t}\n\n\t\tif ( rules.length ) {\n\t\t\toutput = `${ appendSelectors( selector ) } {\n\t\t\t\t${ rules.join( '; ' ) };\n\t\t\t}`;\n\t\t}\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'flex',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation( layout ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\t\treturn orientation;\n\t},\n\tgetAlignments() {\n\t\treturn [];\n\t},\n};\n\nfunction FlexLayoutVerticalAlignmentControl( { layout, onChange } ) {\n\tconst { orientation = 'horizontal' } = layout;\n\n\tconst defaultVerticalAlignment =\n\t\torientation === 'horizontal'\n\t\t\t? verticalAlignmentMap.center\n\t\t\t: verticalAlignmentMap.top;\n\n\tconst { verticalAlignment = defaultVerticalAlignment } = layout;\n\n\tconst onVerticalAlignmentChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tverticalAlignment: value,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<BlockVerticalAlignmentControl\n\t\t\tonChange={ onVerticalAlignmentChange }\n\t\t\tvalue={ verticalAlignment }\n\t\t\tcontrols={\n\t\t\t\torientation === 'horizontal'\n\t\t\t\t\t? [ 'top', 'center', 'bottom', 'stretch' ]\n\t\t\t\t\t: [ 'top', 'center', 'bottom', 'space-between' ]\n\t\t\t}\n\t\t/>\n\t);\n}\n\nconst POPOVER_PROPS = {\n\tplacement: 'bottom-start',\n};\n\nfunction FlexLayoutJustifyContentControl( {\n\tlayout,\n\tonChange,\n\tisToolbar = false,\n} ) {\n\tconst { justifyContent = 'left', orientation = 'horizontal' } = layout;\n\tconst onJustificationChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tjustifyContent: value,\n\t\t} );\n\t};\n\tconst allowedControls = [ 'left', 'center', 'right' ];\n\tif ( orientation === 'horizontal' ) {\n\t\tallowedControls.push( 'space-between' );\n\t} else {\n\t\tallowedControls.push( 'stretch' );\n\t}\n\tif ( isToolbar ) {\n\t\treturn (\n\t\t\t<JustifyContentControl\n\t\t\t\tallowedControls={ allowedControls }\n\t\t\t\tvalue={ justifyContent }\n\t\t\t\tonChange={ onJustificationChange }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst justificationOptions = [\n\t\t{\n\t\t\tvalue: 'left',\n\t\t\ticon: justifyLeft,\n\t\t\tlabel: __( 'Justify items left' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'center',\n\t\t\ticon: justifyCenter,\n\t\t\tlabel: __( 'Justify items center' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'right',\n\t\t\ticon: justifyRight,\n\t\t\tlabel: __( 'Justify items right' ),\n\t\t},\n\t];\n\tif ( orientation === 'horizontal' ) {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'space-between',\n\t\t\ticon: justifySpaceBetween,\n\t\t\tlabel: __( 'Space between items' ),\n\t\t} );\n\t} else {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'stretch',\n\t\t\ticon: justifyStretch,\n\t\t\tlabel: __( 'Stretch items' ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Justification' ) }\n\t\t\tvalue={ justifyContent }\n\t\t\tonChange={ onJustificationChange }\n\t\t\tclassName=\"block-editor-hooks__flex-layout-justification-controls\"\n\t\t>\n\t\t\t{ justificationOptions.map( ( { value, icon, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ToggleGroupControl>\n\t);\n}\n\nfunction FlexWrapControl( { layout, onChange } ) {\n\tconst { flexWrap = 'wrap' } = layout;\n\treturn (\n\t\t<ToggleControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Allow to wrap to multiple lines' ) }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tonChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\tflexWrap: value ? 'wrap' : 'nowrap',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tchecked={ flexWrap === 'wrap' }\n\t\t/>\n\t);\n}\n\nfunction OrientationControl( { layout, onChange } ) {\n\tconst {\n\t\torientation = 'horizontal',\n\t\tverticalAlignment,\n\t\tjustifyContent,\n\t} = layout;\n\treturn (\n\t\t<ToggleGroupControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"block-editor-hooks__flex-layout-orientation-controls\"\n\t\t\tlabel={ __( 'Orientation' ) }\n\t\t\tvalue={ orientation }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\t// Make sure the vertical alignment and justification are compatible with the new orientation.\n\t\t\t\tlet newVerticalAlignment = verticalAlignment;\n\t\t\t\tlet newJustification = justifyContent;\n\t\t\t\tif ( value === 'horizontal' ) {\n\t\t\t\t\tif ( verticalAlignment === 'space-between' ) {\n\t\t\t\t\t\tnewVerticalAlignment = 'center';\n\t\t\t\t\t}\n\t\t\t\t\tif ( justifyContent === 'stretch' ) {\n\t\t\t\t\t\tnewJustification = 'left';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( verticalAlignment === 'stretch' ) {\n\t\t\t\t\t\tnewVerticalAlignment = 'top';\n\t\t\t\t\t}\n\t\t\t\t\tif ( justifyContent === 'space-between' ) {\n\t\t\t\t\t\tnewJustification = 'left';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn onChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\torientation: value,\n\t\t\t\t\tverticalAlignment: newVerticalAlignment,\n\t\t\t\t\tjustifyContent: newJustification,\n\t\t\t\t} );\n\t\t\t} }\n\t\t>\n\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\ticon={ arrowRight }\n\t\t\t\tvalue=\"horizontal\"\n\t\t\t\tlabel={ __( 'Horizontal' ) }\n\t\t\t/>\n\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\ticon={ arrowDown }\n\t\t\t\tvalue=\"vertical\"\n\t\t\t\tlabel={ __( 'Vertical' ) }\n\t\t\t/>\n\t\t</ToggleGroupControl>\n\t);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SACCC,WAAW,EACXC,aAAa,EACbC,YAAY,EACZC,mBAAmB,EACnBC,cAAc,EACdC,UAAU,EACVC,SAAS,QACH,kBAAkB;AACzB,SACCC,aAAa,EACbC,IAAI,EACJC,QAAQ,EACRC,gCAAgC,IAAIC,kBAAkB,EACtDC,0CAA0C,IAAIC,4BAA4B,QACpE,uBAAuB;;AAE9B;AACA;AACA;AACA,SAASC,eAAe,EAAEC,cAAc,QAAQ,SAAS;AACzD,SAASC,cAAc,QAAQ,cAAc;AAC7C,SACCC,aAAa,EACbC,qBAAqB,EACrBC,6BAA6B,QACvB,eAAe;AACtB,SAASC,uBAAuB,QAAQ,gBAAgB;AACxD,SAASC,kBAAkB,QAAQ,eAAe;;AAElD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AACA,MAAMC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I0B,gBAAgB,GAAG7B,cAAc;MACrC,IAAKc,KAAK,KAAK,YAAY,EAAG;QAC7B,IAAKX,iBAAiB,KAAK,eAAe,EAAG;UAC5CyB,oBAAoB,GAAG,QAAQ;QAChC;QACA,IAAK5B,cAAc,KAAK,SAAS,EAAG;UACnC6B,gBAAgB,GAAG,MAAM;QAC1B;MACD,CAAC,MAAM;QACN,IAAK1B,iBAAiB,KAAK,SAAS,EAAG;UACtCyB,oBAAoB,GAAG,KAAK;QAC7B;QACA,IAAK5B,cAAc,KAAK,eAAe,EAAG;UACzC6B,gBAAgB,GAAG,MAAM;QAC1B;MACD;MACA,OAAOvD,QAAQ,CAAE;QAChB,GAAGD,MAAM;QACTsB,WAAW,EAAEmB,KAAK;QAClBX,iBAAiB,EAAEyB,oBAAoB;QACvC5B,cAAc,EAAE6B;MACjB,CAAE,CAAC;IACJ,CAAG;IAAApD,QAAA,gBAEHvB,IAAA,CAACV,4BAA4B;MAC5B8E,IAAI,EAAGtF,UAAY;MACnB8E,KAAK,EAAC,YAAY;MAClB5C,KAAK,EAAGxC,EAAE,CAAE,YAAa;IAAG,CAC5B,CAAC,eACFwB,IAAA,CAACV,4BAA4B;MAC5B8E,IAAI,EAAGrF,SAAW;MAClB6E,KAAK,EAAC,UAAU;MAChB5C,KAAK,EAAGxC,EAAE,CAAE,UAAW;IAAG,CAC1B,CAAC;EAAA,CACiB,CAAC;AAEvB","ignoreList":[]}
@@ -631,9 +631,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
631
631
  color: #1e1e1e;
632
632
  box-shadow: inset 0 0 0 1px #1e1e1e;
633
633
  }
634
- .block-editor-button-block-appender.components-button.components-button {
635
- padding: 12px;
636
- }
637
634
  .is-dark-theme .block-editor-button-block-appender {
638
635
  color: rgba(255, 255, 255, 0.65);
639
636
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
@@ -631,9 +631,6 @@ _::-webkit-full-page-media, _:future, :root .has-multi-selection .block-editor-b
631
631
  color: #1e1e1e;
632
632
  box-shadow: inset 0 0 0 1px #1e1e1e;
633
633
  }
634
- .block-editor-button-block-appender.components-button.components-button {
635
- padding: 12px;
636
- }
637
634
  .is-dark-theme .block-editor-button-block-appender {
638
635
  color: rgba(255, 255, 255, 0.65);
639
636
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
@@ -339,6 +339,8 @@ iframe[name=editor-canvas] {
339
339
 
340
340
  .block-editor-block-inspector__tab-item {
341
341
  flex: 1 1 0px;
342
+ display: flex;
343
+ justify-content: center;
342
344
  }
343
345
 
344
346
  /**
@@ -562,6 +564,9 @@ iframe[name=editor-canvas] {
562
564
  background: none;
563
565
  border: none;
564
566
  }
567
+ .zoom-out-toolbar .zoom-out-toolbar-button {
568
+ height: 40px;
569
+ }
565
570
 
566
571
  .block-editor-block-tools__zoom-out-mode-inserter-button {
567
572
  visibility: hidden;
@@ -1668,10 +1673,14 @@ iframe[name=editor-canvas] {
1668
1673
  }
1669
1674
 
1670
1675
  .block-editor-global-styles__shadow-indicator {
1676
+ appearance: none;
1677
+ background: none;
1671
1678
  color: #2f2f2f;
1672
1679
  border: #e0e0e0 1px solid;
1673
1680
  border-radius: 2px;
1674
1681
  cursor: pointer;
1682
+ display: inline-flex;
1683
+ align-items: center;
1675
1684
  padding: 0;
1676
1685
  height: 26px;
1677
1686
  width: 26px;
@@ -2036,17 +2045,6 @@ iframe[name=editor-canvas] {
2036
2045
  margin-bottom: 16px;
2037
2046
  }
2038
2047
 
2039
- [class].block-editor-inspector-popover-header__action {
2040
- height: 24px;
2041
- }
2042
- [class].block-editor-inspector-popover-header__action.has-icon {
2043
- min-width: 24px;
2044
- padding: 0;
2045
- }
2046
- [class].block-editor-inspector-popover-header__action:not(.has-icon) {
2047
- text-decoration: underline;
2048
- }
2049
-
2050
2048
  .items-justified-left {
2051
2049
  justify-content: flex-start;
2052
2050
  }
@@ -2574,6 +2572,15 @@ iframe[name=editor-canvas] {
2574
2572
  text-align: right;
2575
2573
  position: relative;
2576
2574
  white-space: nowrap;
2575
+ border-radius: 2px;
2576
+ box-sizing: border-box;
2577
+ color: inherit;
2578
+ font-family: inherit;
2579
+ font-size: 13px;
2580
+ font-weight: 400;
2581
+ margin: 0;
2582
+ text-decoration: none;
2583
+ transition: box-shadow 0.1s linear;
2577
2584
  }
2578
2585
  .block-editor-list-view-leaf .block-editor-list-view-block-contents.is-dropping-before::before {
2579
2586
  content: "";
@@ -3077,18 +3084,9 @@ iframe[name=editor-canvas] {
3077
3084
  top: -9999em;
3078
3085
  }
3079
3086
  .block-editor-skip-to-selected-block:focus {
3080
- height: auto;
3081
- width: auto;
3082
- display: block;
3083
3087
  font-size: 14px;
3084
3088
  font-weight: 600;
3085
- padding: 15px 23px 14px;
3086
3089
  background: #f1f1f1;
3087
- color: var(--wp-admin-theme-color);
3088
- line-height: normal;
3089
- box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
3090
- text-decoration: none;
3091
- outline: none;
3092
3090
  z-index: 100000;
3093
3091
  }
3094
3092
 
@@ -3252,11 +3250,6 @@ iframe[name=editor-canvas] {
3252
3250
  min-width: 0;
3253
3251
  align-items: flex-start;
3254
3252
  }
3255
- .block-editor-url-input__button-modal-line .components-button {
3256
- flex-shrink: 0;
3257
- width: 36px;
3258
- height: 36px;
3259
- }
3260
3253
 
3261
3254
  .block-editor-url-popover__additional-controls {
3262
3255
  border-top: 1px solid #1e1e1e;