@wordpress/components 21.1.0 → 21.1.2-next.4d3b314fd5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/build/draggable/index.js +3 -6
  3. package/build/draggable/index.js.map +1 -1
  4. package/build/index.js +6 -0
  5. package/build/index.js.map +1 -1
  6. package/build/menu-item/index.js +4 -3
  7. package/build/menu-item/index.js.map +1 -1
  8. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +10 -3
  9. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  10. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +12 -3
  11. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  12. package/build/mobile/bottom-sheet/sub-sheet/index.native.js +4 -1
  13. package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  14. package/build/mobile/color-settings/index.native.js +3 -1
  15. package/build/mobile/color-settings/index.native.js.map +1 -1
  16. package/build/mobile/color-settings/picker-screen.native.js +3 -1
  17. package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
  18. package/build/mobile/image/index.native.js +3 -1
  19. package/build/mobile/image/index.native.js.map +1 -1
  20. package/build/mobile/keyboard-avoiding-view/index.ios.js +3 -1
  21. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  22. package/build/mobile/link-picker/index.native.js +3 -1
  23. package/build/mobile/link-picker/index.native.js.map +1 -1
  24. package/build/mobile/link-picker/link-picker-results.native.js +3 -1
  25. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  26. package/build/mobile/link-picker/link-picker-screen.native.js +3 -1
  27. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  28. package/build/mobile/link-settings/index.native.js +24 -6
  29. package/build/mobile/link-settings/index.native.js.map +1 -1
  30. package/build/mobile/link-settings/link-settings-screen.native.js +3 -1
  31. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  32. package/build/mobile/segmented-control/index.native.js +6 -2
  33. package/build/mobile/segmented-control/index.native.js.map +1 -1
  34. package/build/mobile/utils/use-unit-converter-to-mobile.native.js +6 -2
  35. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  36. package/build/notice/index.native.js +15 -19
  37. package/build/notice/index.native.js.map +1 -1
  38. package/build/notice/list.native.js +2 -3
  39. package/build/notice/list.native.js.map +1 -1
  40. package/build/palette-edit/index.js +1 -1
  41. package/build/palette-edit/index.js.map +1 -1
  42. package/build/popover/index.js +29 -32
  43. package/build/popover/index.js.map +1 -1
  44. package/build/popover/limit-shift.js +145 -0
  45. package/build/popover/limit-shift.js.map +1 -0
  46. package/build/popover/utils.js +55 -15
  47. package/build/popover/utils.js.map +1 -1
  48. package/build/tools-panel/styles.js +27 -12
  49. package/build/tools-panel/styles.js.map +1 -1
  50. package/build/tools-panel/tools-panel-header/component.js +19 -6
  51. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  52. package/build/tools-panel/tools-panel-header/hook.js +4 -0
  53. package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
  54. package/build-module/draggable/index.js +2 -5
  55. package/build-module/draggable/index.js.map +1 -1
  56. package/build-module/index.js +1 -1
  57. package/build-module/index.js.map +1 -1
  58. package/build-module/menu-item/index.js +4 -3
  59. package/build-module/menu-item/index.js.map +1 -1
  60. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +10 -3
  61. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  62. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +12 -3
  63. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  64. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +4 -1
  65. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  66. package/build-module/mobile/color-settings/index.native.js +3 -1
  67. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  68. package/build-module/mobile/color-settings/picker-screen.native.js +3 -1
  69. package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
  70. package/build-module/mobile/image/index.native.js +3 -1
  71. package/build-module/mobile/image/index.native.js.map +1 -1
  72. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +3 -1
  73. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  74. package/build-module/mobile/link-picker/index.native.js +3 -1
  75. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  76. package/build-module/mobile/link-picker/link-picker-results.native.js +3 -1
  77. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  78. package/build-module/mobile/link-picker/link-picker-screen.native.js +3 -1
  79. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  80. package/build-module/mobile/link-settings/index.native.js +24 -6
  81. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  82. package/build-module/mobile/link-settings/link-settings-screen.native.js +3 -1
  83. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  84. package/build-module/mobile/segmented-control/index.native.js +6 -2
  85. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  86. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +6 -2
  87. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  88. package/build-module/notice/index.native.js +16 -21
  89. package/build-module/notice/index.native.js.map +1 -1
  90. package/build-module/notice/list.native.js +3 -3
  91. package/build-module/notice/list.native.js.map +1 -1
  92. package/build-module/palette-edit/index.js +1 -1
  93. package/build-module/palette-edit/index.js.map +1 -1
  94. package/build-module/popover/index.js +31 -35
  95. package/build-module/popover/index.js.map +1 -1
  96. package/build-module/popover/limit-shift.js +136 -0
  97. package/build-module/popover/limit-shift.js.map +1 -0
  98. package/build-module/popover/utils.js +55 -15
  99. package/build-module/popover/utils.js.map +1 -1
  100. package/build-module/tools-panel/styles.js +23 -12
  101. package/build-module/tools-panel/styles.js.map +1 -1
  102. package/build-module/tools-panel/tools-panel-header/component.js +19 -7
  103. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  104. package/build-module/tools-panel/tools-panel-header/hook.js +4 -0
  105. package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
  106. package/build-style/style-rtl.css +13 -2
  107. package/build-style/style.css +13 -2
  108. package/build-types/draggable/index.d.ts.map +1 -1
  109. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  110. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +3 -3
  111. package/build-types/menu-item/index.d.ts.map +1 -1
  112. package/build-types/popover/index.d.ts.map +1 -1
  113. package/build-types/popover/limit-shift.d.ts +87 -0
  114. package/build-types/popover/limit-shift.d.ts.map +1 -0
  115. package/build-types/popover/test/index.d.ts +2 -0
  116. package/build-types/popover/test/index.d.ts.map +1 -0
  117. package/build-types/popover/types.d.ts +1 -1
  118. package/build-types/popover/types.d.ts.map +1 -1
  119. package/build-types/popover/utils.d.ts.map +1 -1
  120. package/build-types/range-control/types.d.ts +0 -32
  121. package/build-types/range-control/types.d.ts.map +1 -1
  122. package/build-types/spinner/index.d.ts +1 -1
  123. package/build-types/tools-panel/styles.d.ts +6 -0
  124. package/build-types/tools-panel/styles.d.ts.map +1 -1
  125. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  126. package/build-types/tools-panel/tools-panel-header/hook.d.ts +1 -0
  127. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  128. package/build-types/tools-panel/types.d.ts +1 -0
  129. package/build-types/tools-panel/types.d.ts.map +1 -1
  130. package/package.json +17 -17
  131. package/src/draggable/index.js +2 -5
  132. package/src/index.js +1 -1
  133. package/src/menu-item/README.md +7 -0
  134. package/src/menu-item/index.js +11 -5
  135. package/src/menu-item/style.scss +1 -0
  136. package/src/menu-item/test/index.js +36 -0
  137. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +9 -0
  138. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +11 -0
  139. package/src/mobile/bottom-sheet/sub-sheet/index.native.js +3 -0
  140. package/src/mobile/color-settings/index.native.js +3 -0
  141. package/src/mobile/color-settings/picker-screen.native.js +3 -0
  142. package/src/mobile/image/index.native.js +3 -0
  143. package/src/mobile/keyboard-avoiding-view/index.ios.js +3 -0
  144. package/src/mobile/link-picker/index.native.js +3 -0
  145. package/src/mobile/link-picker/link-picker-results.native.js +3 -0
  146. package/src/mobile/link-picker/link-picker-screen.native.js +3 -0
  147. package/src/mobile/link-settings/index.native.js +18 -0
  148. package/src/mobile/link-settings/link-settings-screen.native.js +3 -0
  149. package/src/mobile/segmented-control/index.native.js +6 -0
  150. package/src/mobile/utils/use-unit-converter-to-mobile.native.js +6 -0
  151. package/src/notice/index.native.js +17 -20
  152. package/src/notice/list.native.js +7 -3
  153. package/src/palette-edit/index.js +1 -1
  154. package/src/placeholder/style.scss +1 -1
  155. package/src/popover/index.tsx +26 -42
  156. package/src/popover/limit-shift.ts +205 -0
  157. package/src/popover/test/index.tsx +230 -0
  158. package/src/popover/types.ts +1 -0
  159. package/src/popover/utils.ts +58 -16
  160. package/src/range-control/types.ts +0 -33
  161. package/src/tools-panel/stories/index.js +27 -0
  162. package/src/tools-panel/styles.ts +28 -1
  163. package/src/tools-panel/tools-panel-header/component.tsx +12 -5
  164. package/src/tools-panel/tools-panel-header/hook.ts +5 -0
  165. package/src/tools-panel/types.ts +1 -0
  166. package/tsconfig.tsbuildinfo +1 -1
  167. package/src/popover/test/__snapshots__/index.js.snap +0 -34
  168. package/src/popover/test/index.js +0 -164
@@ -13,6 +13,6 @@ export declare function UnforwardedSpinner({ className, ...props }: WordPressCom
13
13
  * }
14
14
  * ```
15
15
  */
16
- export declare const Spinner: import("react").ForwardRefExoticComponent<Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "type" | "origin" | "children" | "style" | "clipPath" | "filter" | "mask" | "path" | "fill" | "values" | "name" | "cx" | "clip" | "color" | "cursor" | "direction" | "display" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "end" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "key" | "className" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "z" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "zoomAndPan">, "children" | "as"> & import("react").RefAttributes<any>>;
16
+ export declare const Spinner: import("react").ForwardRefExoticComponent<Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "type" | "origin" | "children" | "style" | "clipPath" | "filter" | "mask" | "path" | "fill" | "values" | "name" | "cx" | "clip" | "color" | "cursor" | "direction" | "display" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "offset" | "overflow" | "textDecoration" | "azimuth" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "end" | "local" | "x" | "y" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "key" | "className" | "id" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "max" | "media" | "method" | "min" | "target" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "href" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mode" | "numOctaves" | "operator" | "orient" | "orientation" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "to" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan">, "children" | "as"> & import("react").RefAttributes<any>>;
17
17
  export default Spinner;
18
18
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const ToolsPanel: (columns: number) => import("@emotion/utils").SerializedStyles;
2
3
  /**
3
4
  * Items injected into a ToolsPanel via a virtual bubbling slot will require
@@ -11,4 +12,9 @@ export declare const ToolsPanelHeading: import("@emotion/utils").SerializedStyle
11
12
  export declare const ToolsPanelItem: import("@emotion/utils").SerializedStyles;
12
13
  export declare const ToolsPanelItemPlaceholder: import("@emotion/utils").SerializedStyles;
13
14
  export declare const DropdownMenu: import("@emotion/utils").SerializedStyles;
15
+ export declare const ResetLabel: import("@emotion/styled").StyledComponent<{
16
+ theme?: import("@emotion/react").Theme | undefined;
17
+ as?: import("react").ElementType<any> | undefined;
18
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
19
+ export declare const DefaultControlsItem: import("@emotion/utils").SerializedStyles;
14
20
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tools-panel/styles.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,UAAU,YAAc,MAAM,8CAO1C,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,0BAA0B,YAAc,MAAM,8CAS1D,CAAC;AAEF,eAAO,MAAM,4BAA4B,2CAIxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,2CAmB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,2CAS7B,CAAC;AAEF,eAAO,MAAM,cAAc,2CA0C1B,CAAC;AAEF,eAAO,MAAM,yBAAyB,2CAErC,CAAC;AAEF,eAAO,MAAM,YAAY,2CAExB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tools-panel/styles.ts"],"names":[],"mappings":";AAiCA,eAAO,MAAM,UAAU,YAAc,MAAM,8CAO1C,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,0BAA0B,YAAc,MAAM,8CAS1D,CAAC;AAEF,eAAO,MAAM,4BAA4B,2CAIxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,2CAmB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,2CAS7B,CAAC;AAEF,eAAO,MAAM,cAAc,2CA0C1B,CAAC;AAEF,eAAO,MAAM,yBAAyB,2CAErC,CAAC;AAEF,eAAO,MAAM,YAAY,2CAExB,CAAC;AAEF,eAAO,MAAM,UAAU;;;2GAOtB,CAAC;AAEF,eAAO,MAAM,mBAAmB,2CAe/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel-header/component.tsx"],"names":[],"mappings":";AAsBA,OAAO,KAAK,EAEX,qBAAqB,EACrB,MAAM,UAAU,CAAC;AA4MlB,QAAA,MAAM,yBAAyB,uHAG9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel-header/component.tsx"],"names":[],"mappings":";AAuBA,OAAO,KAAK,EAEX,qBAAqB,EACrB,MAAM,UAAU,CAAC;AAkNlB,QAAA,MAAM,yBAAyB,uHAG9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -3,6 +3,7 @@ import { WordPressComponentProps } from '../../ui/context';
3
3
  import type { ToolsPanelHeaderProps } from '../types';
4
4
  export declare function useToolsPanelHeader(props: WordPressComponentProps<ToolsPanelHeaderProps, 'h2'>): {
5
5
  areAllOptionalControlsHidden: boolean;
6
+ defaultControlsItemClassName: string;
6
7
  dropdownMenuClassName: string;
7
8
  hasMenuItems: boolean;
8
9
  headingClassName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel-header/hook.ts"],"names":[],"mappings":";AAUA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,uBAAuB,CAAE,qBAAqB,EAAE,IAAI,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgC7D"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel-header/hook.ts"],"names":[],"mappings":";AAUA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,uBAAuB,CAAE,qBAAqB,EAAE,IAAI,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC7D"}
@@ -137,6 +137,7 @@ export declare type ToolsPanelContext = {
137
137
  __experimentalLastVisibleItemClass?: string;
138
138
  };
139
139
  export declare type ToolsPanelControlsGroupProps = {
140
+ itemClassName?: string;
140
141
  items: [string, boolean][];
141
142
  toggleItem: (label: string) => void;
142
143
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools-panel/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,aAAK,cAAc,GAAG,MAAM,IAAI,CAAC;AACjC,aAAK,QAAQ,GAAG,C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B,GAAG;KAC/B,WAAW,IAAI,qBAAqB,GAAI;QAAE,CAAE,GAAG,EAAE,MAAM,GAAI,OAAO,CAAA;KAAE;CACtE,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,CAAE,IAAI,EAAE,cAAc,KAAM,IAAI,CAAC;IACpD,mBAAmB,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IAC/C,qBAAqB,EAAE,CACtB,KAAK,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,qBAAqB,KACzB,IAAI,CAAC;IACV,WAAW,EAAE,OAAO,CAAC;IACrB,4BAA4B,EAAE,OAAO,CAAC;IACtC,4BAA4B,EAAE,OAAO,CAAC;IACtC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mCAAmC,CAAC,EAAE,MAAM,CAAC;IAC7C,kCAAkC,CAAC,EAAE,MAAM,CAAC;CAC5C,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,CAAE,MAAM,EAAE,OAAO,CAAE,EAAE,CAAC;IAC7B,UAAU,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;CACtC,CAAC;AAEF,oBAAY,yBAAyB,GAAG;IACvC,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;CACvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "21.1.0",
3
+ "version": "21.1.2-next.4d3b314fd5.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -38,21 +38,21 @@
38
38
  "@emotion/utils": "^1.0.0",
39
39
  "@floating-ui/react-dom": "^1.0.0",
40
40
  "@use-gesture/react": "^10.2.6",
41
- "@wordpress/a11y": "^3.18.0",
42
- "@wordpress/compose": "^5.16.0",
43
- "@wordpress/date": "^4.18.0",
44
- "@wordpress/deprecated": "^3.18.0",
45
- "@wordpress/dom": "^3.18.0",
46
- "@wordpress/element": "^4.16.0",
47
- "@wordpress/escape-html": "^2.18.0",
48
- "@wordpress/hooks": "^3.18.0",
49
- "@wordpress/i18n": "^4.18.0",
50
- "@wordpress/icons": "^9.9.0",
51
- "@wordpress/is-shallow-equal": "^4.18.0",
52
- "@wordpress/keycodes": "^3.18.0",
53
- "@wordpress/primitives": "^3.16.0",
54
- "@wordpress/rich-text": "^5.16.0",
55
- "@wordpress/warning": "^2.18.0",
41
+ "@wordpress/a11y": "^3.18.1-next.4d3b314fd5.0",
42
+ "@wordpress/compose": "^5.16.1-next.4d3b314fd5.0",
43
+ "@wordpress/date": "^4.18.1-next.4d3b314fd5.0",
44
+ "@wordpress/deprecated": "^3.18.1-next.4d3b314fd5.0",
45
+ "@wordpress/dom": "^3.18.1-next.4d3b314fd5.0",
46
+ "@wordpress/element": "^4.16.1-next.4d3b314fd5.0",
47
+ "@wordpress/escape-html": "^2.18.1-next.4d3b314fd5.0",
48
+ "@wordpress/hooks": "^3.18.1-next.4d3b314fd5.0",
49
+ "@wordpress/i18n": "^4.18.1-next.4d3b314fd5.0",
50
+ "@wordpress/icons": "^9.9.1-next.4d3b314fd5.0",
51
+ "@wordpress/is-shallow-equal": "^4.18.1-next.4d3b314fd5.0",
52
+ "@wordpress/keycodes": "^3.18.1-next.4d3b314fd5.0",
53
+ "@wordpress/primitives": "^3.16.1-next.4d3b314fd5.0",
54
+ "@wordpress/rich-text": "^5.16.1-next.4d3b314fd5.0",
55
+ "@wordpress/warning": "^2.18.1-next.4d3b314fd5.0",
56
56
  "change-case": "^4.1.2",
57
57
  "classnames": "^2.3.1",
58
58
  "colord": "^2.7.0",
@@ -78,5 +78,5 @@
78
78
  "publishConfig": {
79
79
  "access": "public"
80
80
  },
81
- "gitHead": "23e136283fa1d3b8d9d8b33869f871ad5eb77726"
81
+ "gitHead": "25054766423cb49d959eb656c2533530073ff5c2"
82
82
  }
@@ -1,13 +1,9 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
+ import { throttle } from '@wordpress/compose';
4
5
  import { useEffect, useRef } from '@wordpress/element';
5
6
 
6
- /**
7
- * External dependencies
8
- */
9
- import { throttle } from 'lodash';
10
-
11
7
  const dragImageClass = 'components-draggable__invisible-drag-image';
12
8
  const cloneWrapperClass = 'components-draggable__clone';
13
9
  const clonePadding = 0;
@@ -180,6 +176,7 @@ export default function Draggable( {
180
176
 
181
177
  // Aim for 60fps (16 ms per frame) for now. We can potentially use requestAnimationFrame (raf) instead,
182
178
  // note that browsers may throttle raf below 60fps in certain conditions.
179
+ // @ts-ignore
183
180
  const throttledDragOver = throttle( over, 16 );
184
181
 
185
182
  ownerDocument.addEventListener( 'dragover', throttledDragOver );
package/src/index.js CHANGED
@@ -16,7 +16,7 @@ export {
16
16
  default as Animate,
17
17
  getAnimateClassName as __unstableGetAnimateClassName,
18
18
  } from './animate';
19
- export { __unstableMotion } from './animation';
19
+ export { __unstableMotion, __unstableAnimatePresence } from './animation';
20
20
  export { default as AnglePickerControl } from './angle-picker-control';
21
21
  export {
22
22
  default as Autocomplete,
@@ -79,3 +79,10 @@ If shortcut is a string, it is expecting the display text. If shortcut is an obj
79
79
  - Default: `'menuitem'`
80
80
 
81
81
  [Aria Spec](https://www.w3.org/TR/wai-aria-1.1/#aria-checked). If you need to have selectable menu items use menuitemradio for single select, and menuitemcheckbox for multiselect.
82
+
83
+ ### `suffix`
84
+
85
+ - Type: `WPElement`
86
+ - Required: No
87
+
88
+ Allows for markup other than icons or shortcuts to be added to the menu item.
@@ -26,6 +26,7 @@ export function MenuItem( props, ref ) {
26
26
  shortcut,
27
27
  isSelected,
28
28
  role = 'menuitem',
29
+ suffix,
29
30
  ...buttonProps
30
31
  } = props;
31
32
 
@@ -63,11 +64,16 @@ export function MenuItem( props, ref ) {
63
64
  { ...buttonProps }
64
65
  >
65
66
  <span className="components-menu-item__item">{ children }</span>
66
- <Shortcut
67
- className="components-menu-item__shortcut"
68
- shortcut={ shortcut }
69
- />
70
- { icon && iconPosition === 'right' && <Icon icon={ icon } /> }
67
+ { ! suffix && (
68
+ <Shortcut
69
+ className="components-menu-item__shortcut"
70
+ shortcut={ shortcut }
71
+ />
72
+ ) }
73
+ { ! suffix && icon && iconPosition === 'right' && (
74
+ <Icon icon={ icon } />
75
+ ) }
76
+ { suffix }
71
77
  </Button>
72
78
  );
73
79
  }
@@ -8,6 +8,7 @@
8
8
  // Ensure unchecked items have clearance for consistency
9
9
  // with checked items containing an icon or shortcut.
10
10
  padding-right: $grid-unit-60;
11
+ box-sizing: initial;
11
12
  }
12
13
  }
13
14
 
@@ -107,4 +107,40 @@ describe( 'MenuItem', () => {
107
107
  expect( checkboxMenuItem ).toBeChecked();
108
108
  expect( checkboxMenuItem ).toHaveAttribute( 'aria-checked', 'true' );
109
109
  } );
110
+
111
+ it( 'should not render shortcut or right icon if suffix provided', () => {
112
+ render(
113
+ <MenuItem
114
+ icon={ <span>Icon</span> }
115
+ iconPosition="right"
116
+ role="menuitemcheckbox"
117
+ shortcut="Shortcut"
118
+ suffix="Suffix"
119
+ >
120
+ My item
121
+ </MenuItem>
122
+ );
123
+
124
+ expect( screen.getByText( 'Suffix' ) ).toBeInTheDocument();
125
+ expect( screen.queryByText( 'Shortcut' ) ).not.toBeInTheDocument();
126
+ expect( screen.queryByText( 'Icon' ) ).not.toBeInTheDocument();
127
+ } );
128
+
129
+ it( 'should render left icon despite suffix being provided', () => {
130
+ render(
131
+ <MenuItem
132
+ icon={ <span>Icon</span> }
133
+ iconPosition="left"
134
+ role="menuitemcheckbox"
135
+ shortcut="Shortcut"
136
+ suffix="Suffix"
137
+ >
138
+ My item
139
+ </MenuItem>
140
+ );
141
+
142
+ expect( screen.getByText( 'Icon' ) ).toBeInTheDocument();
143
+ expect( screen.getByText( 'Suffix' ) ).toBeInTheDocument();
144
+ expect( screen.queryByText( 'Shortcut' ) ).not.toBeInTheDocument();
145
+ } );
110
146
  } );
@@ -112,6 +112,9 @@ function BottomSheetNavigationContainer( {
112
112
  }
113
113
  }
114
114
  },
115
+ // Disable reason: deferring this refactor to the native team.
116
+ // see https://github.com/WordPress/gutenberg/pull/41166
117
+ // eslint-disable-next-line react-hooks/exhaustive-deps
115
118
  [ currentHeight ]
116
119
  );
117
120
 
@@ -133,6 +136,9 @@ function BottomSheetNavigationContainer( {
133
136
  />
134
137
  );
135
138
  } );
139
+ // Disable reason: deferring this refactor to the native team.
140
+ // see https://github.com/WordPress/gutenberg/pull/41166
141
+ // eslint-disable-next-line react-hooks/exhaustive-deps
136
142
  }, [ children ] );
137
143
 
138
144
  return useMemo( () => {
@@ -158,6 +164,9 @@ function BottomSheetNavigationContainer( {
158
164
  </BottomSheetNavigationProvider>
159
165
  </View>
160
166
  );
167
+ // Disable reason: deferring this refactor to the native team.
168
+ // see https://github.com/WordPress/gutenberg/pull/41166
169
+ // eslint-disable-next-line react-hooks/exhaustive-deps
161
170
  }, [ currentHeight, _theme ] );
162
171
  }
163
172
 
@@ -41,6 +41,9 @@ const BottomSheetNavigationScreen = ( {
41
41
 
42
42
  const { setHeight } = useContext( BottomSheetNavigationContext );
43
43
 
44
+ // Disable reason: deferring this refactor to the native team.
45
+ // see https://github.com/WordPress/gutenberg/pull/41166
46
+ // eslint-disable-next-line react-hooks/exhaustive-deps
44
47
  const setHeightDebounce = useCallback( debounce( setHeight, 10 ), [
45
48
  setHeight,
46
49
  ] );
@@ -70,6 +73,8 @@ const BottomSheetNavigationScreen = ( {
70
73
  *
71
74
  * Related: https://github.com/WordPress/gutenberg/pull/36328#discussion_r768897546
72
75
  */
76
+ // see https://github.com/WordPress/gutenberg/pull/41166
77
+ // eslint-disable-next-line react-hooks/exhaustive-deps
73
78
  }, [] )
74
79
  );
75
80
 
@@ -83,6 +88,9 @@ const BottomSheetNavigationScreen = ( {
83
88
  setHeight( heightRef.current.maxHeight );
84
89
  }
85
90
  return () => {};
91
+ // Disable reason: deferring this refactor to the native team.
92
+ // see https://github.com/WordPress/gutenberg/pull/41166
93
+ // eslint-disable-next-line react-hooks/exhaustive-deps
86
94
  }, [ setHeight ] )
87
95
  );
88
96
 
@@ -127,6 +135,9 @@ const BottomSheetNavigationScreen = ( {
127
135
  </TouchableHighlight>
128
136
  </ScrollView>
129
137
  );
138
+ // Disable reason: deferring this refactor to the native team.
139
+ // see https://github.com/WordPress/gutenberg/pull/41166
140
+ // eslint-disable-next-line react-hooks/exhaustive-deps
130
141
  }, [
131
142
  children,
132
143
  isFocused,
@@ -23,6 +23,9 @@ const BottomSheetSubSheet = ( {
23
23
  if ( showSheet ) {
24
24
  setIsFullScreen( isFullScreen );
25
25
  }
26
+ // Disable reason: deferring this refactor to the native team.
27
+ // see https://github.com/WordPress/gutenberg/pull/41166
28
+ // eslint-disable-next-line react-hooks/exhaustive-deps
26
29
  }, [ showSheet, isFullScreen ] );
27
30
 
28
31
  return (
@@ -34,6 +34,9 @@ const ColorSettingsMemo = memo(
34
34
  useEffect( () => {
35
35
  shouldEnableBottomSheetMaxHeight( true );
36
36
  onHandleClosingBottomSheet( null );
37
+ // Disable reason: deferring this refactor to the native team.
38
+ // see https://github.com/WordPress/gutenberg/pull/41166
39
+ // eslint-disable-next-line react-hooks/exhaustive-deps
37
40
  }, [] );
38
41
  return (
39
42
  <BottomSheet.NavigationContainer>
@@ -43,6 +43,9 @@ const PickerScreen = () => {
43
43
  onHandleHardwareButtonPress={ onHandleHardwareButtonPress }
44
44
  />
45
45
  );
46
+ // Disable reason: deferring this refactor to the native team.
47
+ // see https://github.com/WordPress/gutenberg/pull/41166
48
+ // eslint-disable-next-line react-hooks/exhaustive-deps
46
49
  }, [
47
50
  setColor,
48
51
  currentValue,
@@ -82,6 +82,9 @@ const ImageComponent = ( {
82
82
  } );
83
83
  }
84
84
  return () => ( isCurrent = false );
85
+ // Disable reason: deferring this refactor to the native team.
86
+ // see https://github.com/WordPress/gutenberg/pull/41166
87
+ // eslint-disable-next-line react-hooks/exhaustive-deps
85
88
  }, [ url ] );
86
89
 
87
90
  const onContainerLayout = ( event ) => {
@@ -69,6 +69,9 @@ export const KeyboardAvoidingView = ( {
69
69
  keyboardShowSubscription.remove();
70
70
  keyboardHideSubscription.remove();
71
71
  };
72
+ // Disable reason: deferring this refactor to the native team.
73
+ // see https://github.com/WordPress/gutenberg/pull/41166
74
+ // eslint-disable-next-line react-hooks/exhaustive-deps
72
75
  }, [] );
73
76
 
74
77
  function onSafeAreaInsetsUpdate( { safeAreaInsets } ) {
@@ -91,6 +91,9 @@ export const LinkPicker = ( {
91
91
  getURLFromClipboard()
92
92
  .then( ( url ) => setValue( { value, clipboardUrl: url } ) )
93
93
  .catch( () => setValue( { value, clipboardUrl: '' } ) );
94
+ // Disable reason: deferring this refactor to the native team.
95
+ // see https://github.com/WordPress/gutenberg/pull/41166
96
+ // eslint-disable-next-line react-hooks/exhaustive-deps
94
97
  }, [] );
95
98
 
96
99
  // TODO: Localize the accessibility label.
@@ -86,6 +86,9 @@ export default function LinkPickerResults( {
86
86
  setHasAllSuggestions( false );
87
87
  setLinks( [ directEntry ] );
88
88
  fetchMoreSuggestions( { query, links: [ directEntry ] } );
89
+ // Disable reason: deferring this refactor to the native team.
90
+ // see https://github.com/WordPress/gutenberg/pull/41166
91
+ // eslint-disable-next-line react-hooks/exhaustive-deps
89
92
  }, [ query ] );
90
93
 
91
94
  const onEndReached = () => fetchMoreSuggestions( { query, links } );
@@ -53,6 +53,9 @@ const LinkPickerScreen = ( { returnScreenName } ) => {
53
53
  onCancel={ onCancel }
54
54
  />
55
55
  );
56
+ // Disable reason: deferring this refactor to the native team.
57
+ // see https://github.com/WordPress/gutenberg/pull/41166
58
+ // eslint-disable-next-line react-hooks/exhaustive-deps
56
59
  }, [ inputValue ] );
57
60
  };
58
61
 
@@ -101,6 +101,9 @@ function LinkSettings( {
101
101
  if ( onHandleClosingBottomSheet ) {
102
102
  onHandleClosingBottomSheet( onCloseSettingsSheet );
103
103
  }
104
+ // Disable reason: deferring this refactor to the native team.
105
+ // see https://github.com/WordPress/gutenberg/pull/41166
106
+ // eslint-disable-next-line react-hooks/exhaustive-deps
104
107
  }, [ urlInputValue, labelInputValue, linkRelInputValue ] );
105
108
 
106
109
  useEffect( () => {
@@ -112,6 +115,9 @@ function LinkSettings( {
112
115
  if ( url !== urlInputValue ) {
113
116
  setUrlInputValue( url || '' );
114
117
  }
118
+ // Disable reason: deferring this refactor to the native team.
119
+ // see https://github.com/WordPress/gutenberg/pull/41166
120
+ // eslint-disable-next-line react-hooks/exhaustive-deps
115
121
  }, [ url ] );
116
122
 
117
123
  useEffect( () => {
@@ -135,6 +141,9 @@ function LinkSettings( {
135
141
  if ( prevEditorSidebarOpened && ! editorSidebarOpened ) {
136
142
  onSetAttributes();
137
143
  }
144
+ // Disable reason: deferring this refactor to the native team.
145
+ // see https://github.com/WordPress/gutenberg/pull/41166
146
+ // eslint-disable-next-line react-hooks/exhaustive-deps
138
147
  }, [ editorSidebarOpened, isVisible ] );
139
148
 
140
149
  useEffect( () => {
@@ -147,6 +156,9 @@ function LinkSettings( {
147
156
  url: prependHTTP( urlValue ),
148
157
  } );
149
158
  }
159
+ // Disable reason: deferring this refactor to the native team.
160
+ // see https://github.com/WordPress/gutenberg/pull/41166
161
+ // eslint-disable-next-line react-hooks/exhaustive-deps
150
162
  }, [ urlValue ] );
151
163
 
152
164
  const onChangeURL = useCallback(
@@ -176,6 +188,9 @@ function LinkSettings( {
176
188
  rel: linkRelInputValue,
177
189
  } );
178
190
  }
191
+ // Disable reason: deferring this refactor to the native team.
192
+ // see https://github.com/WordPress/gutenberg/pull/41166
193
+ // eslint-disable-next-line react-hooks/exhaustive-deps
179
194
  }, [ urlInputValue, labelInputValue, linkRelInputValue, setAttributes ] );
180
195
 
181
196
  const onCloseSettingsSheet = useCallback( () => {
@@ -208,6 +223,9 @@ function LinkSettings( {
208
223
  rel: updatedRel,
209
224
  } );
210
225
  },
226
+ // Disable reason: deferring this refactor to the native team.
227
+ // see https://github.com/WordPress/gutenberg/pull/41166
228
+ // eslint-disable-next-line react-hooks/exhaustive-deps
211
229
  [ linkRelInputValue ]
212
230
  );
213
231
 
@@ -37,6 +37,9 @@ const LinkSettingsScreen = ( props ) => {
37
37
  urlValue={ inputValue }
38
38
  />
39
39
  );
40
+ // Disable reason: deferring this refactor to the native team.
41
+ // see https://github.com/WordPress/gutenberg/pull/41166
42
+ // eslint-disable-next-line react-hooks/exhaustive-deps
40
43
  }, [ props, inputValue, navigation, route ] );
41
44
  };
42
45
 
@@ -74,12 +74,18 @@ const SegmentedControls = ( {
74
74
  useEffect( () => {
75
75
  setActiveSegmentIndex( selectedSegmentIndex );
76
76
  segmentHandler( segments[ selectedSegmentIndex ] );
77
+ // Disable reason: deferring this refactor to the native team.
78
+ // see https://github.com/WordPress/gutenberg/pull/41166
79
+ // eslint-disable-next-line react-hooks/exhaustive-deps
77
80
  }, [] );
78
81
 
79
82
  useEffect( () => {
80
83
  positionAnimationValue.setValue(
81
84
  calculateEndValue( activeSegmentIndex )
82
85
  );
86
+ // Disable reason: deferring this refactor to the native team.
87
+ // see https://github.com/WordPress/gutenberg/pull/41166
88
+ // eslint-disable-next-line react-hooks/exhaustive-deps
83
89
  }, [ segmentsDimensions ] );
84
90
 
85
91
  const containerStyle = usePreferredColorSchemeStyle(
@@ -78,6 +78,9 @@ const useConvertUnitToMobile = ( value, unit ) => {
78
78
  return () => {
79
79
  dimensionsChangeSubscription.remove();
80
80
  };
81
+ // Disable reason: deferring this refactor to the native team.
82
+ // see https://github.com/WordPress/gutenberg/pull/41166
83
+ // eslint-disable-next-line react-hooks/exhaustive-deps
81
84
  }, [] );
82
85
 
83
86
  const onDimensionsChange = useCallback( ( { window } ) => {
@@ -94,6 +97,9 @@ const useConvertUnitToMobile = ( value, unit ) => {
94
97
  valueToConvert,
95
98
  valueUnit
96
99
  );
100
+ // Disable reason: deferring this refactor to the native team.
101
+ // see https://github.com/WordPress/gutenberg/pull/41166
102
+ // eslint-disable-next-line react-hooks/exhaustive-deps
97
103
  }, [ windowSizes, value, unit ] );
98
104
  };
99
105
 
@@ -14,7 +14,7 @@ import { BlurView } from '@react-native-community/blur';
14
14
  /**
15
15
  * WordPress dependencies
16
16
  */
17
- import { useEffect, useRef, Platform } from '@wordpress/element';
17
+ import { useEffect, useRef, useCallback, Platform } from '@wordpress/element';
18
18
  import { usePreferredColorSchemeStyle } from '@wordpress/compose';
19
19
 
20
20
  /**
@@ -30,40 +30,37 @@ const Notice = ( { onNoticeHidden, content, id, status } ) => {
30
30
  const timer = useRef( null );
31
31
 
32
32
  useEffect( () => {
33
- startAnimation();
34
-
35
- return () => {
36
- clearTimeout( timer?.current );
37
- };
38
- }, [] );
39
-
40
- function onHide() {
33
+ // start animation
41
34
  Animated.timing( animationValue, {
42
- toValue: 0,
43
- duration: 150,
35
+ toValue: 1,
36
+ duration: 300,
44
37
  useNativeDriver: true,
45
38
  easing: Easing.out( Easing.quad ),
46
39
  } ).start( ( { finished } ) => {
47
40
  if ( finished && onNoticeHidden ) {
48
- onNoticeHidden( id );
41
+ timer.current = setTimeout( () => {
42
+ onHide();
43
+ }, HIDE_TIMER );
49
44
  }
50
45
  } );
51
- }
52
46
 
53
- function startAnimation() {
47
+ return () => {
48
+ clearTimeout( timer?.current );
49
+ };
50
+ }, [ animationValue, onHide, onNoticeHidden ] );
51
+
52
+ const onHide = useCallback( () => {
54
53
  Animated.timing( animationValue, {
55
- toValue: 1,
56
- duration: 300,
54
+ toValue: 0,
55
+ duration: 150,
57
56
  useNativeDriver: true,
58
57
  easing: Easing.out( Easing.quad ),
59
58
  } ).start( ( { finished } ) => {
60
59
  if ( finished && onNoticeHidden ) {
61
- timer.current = setTimeout( () => {
62
- onHide();
63
- }, HIDE_TIMER );
60
+ onNoticeHidden( id );
64
61
  }
65
62
  } );
66
- }
63
+ }, [ animationValue, onNoticeHidden, id ] );
67
64
 
68
65
  const noticeSolidStyles = usePreferredColorSchemeStyle(
69
66
  styles.noticeSolid,