@wordpress/components 19.1.2 → 19.2.1-next.33ec3857e2.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 (418) hide show
  1. package/CHANGELOG.md +53 -4
  2. package/README.md +0 -1
  3. package/build/angle-picker-control/index.js +2 -0
  4. package/build/angle-picker-control/index.js.map +1 -1
  5. package/build/button/index.native.js +13 -3
  6. package/build/button/index.native.js.map +1 -1
  7. package/build/checkbox-control/index.js +1 -1
  8. package/build/checkbox-control/index.js.map +1 -1
  9. package/build/clipboard-button/index.js +1 -2
  10. package/build/clipboard-button/index.js.map +1 -1
  11. package/build/color-palette/index.js +36 -9
  12. package/build/color-palette/index.js.map +1 -1
  13. package/build/color-picker/color-display.js +4 -2
  14. package/build/color-picker/color-display.js.map +1 -1
  15. package/build/color-picker/hex-input.js +3 -1
  16. package/build/color-picker/hex-input.js.map +1 -1
  17. package/build/color-picker/input-with-slider.js +3 -1
  18. package/build/color-picker/input-with-slider.js.map +1 -1
  19. package/build/confirm-dialog/component.js +103 -0
  20. package/build/confirm-dialog/component.js.map +1 -0
  21. package/build/confirm-dialog/index.js +16 -0
  22. package/build/confirm-dialog/index.js.map +1 -0
  23. package/build/confirm-dialog/types.js +6 -0
  24. package/build/confirm-dialog/types.js.map +1 -0
  25. package/build/custom-gradient-bar/constants.js +1 -6
  26. package/build/custom-gradient-bar/constants.js.map +1 -1
  27. package/build/custom-gradient-bar/control-points.js +52 -21
  28. package/build/custom-gradient-bar/control-points.js.map +1 -1
  29. package/build/custom-gradient-bar/index.js +5 -1
  30. package/build/custom-gradient-bar/index.js.map +1 -1
  31. package/build/custom-gradient-picker/index.js +4 -1
  32. package/build/custom-gradient-picker/index.js.map +1 -1
  33. package/build/date-time/date.js +63 -86
  34. package/build/date-time/date.js.map +1 -1
  35. package/build/date-time/utils.js +32 -0
  36. package/build/date-time/utils.js.map +1 -0
  37. package/build/divider/component.js +8 -7
  38. package/build/divider/component.js.map +1 -1
  39. package/build/divider/styles.js +38 -13
  40. package/build/divider/styles.js.map +1 -1
  41. package/build/drop-zone/index.js +14 -6
  42. package/build/drop-zone/index.js.map +1 -1
  43. package/build/drop-zone/provider.js +1 -0
  44. package/build/drop-zone/provider.js.map +1 -1
  45. package/build/flyout/styles.js +2 -2
  46. package/build/flyout/styles.js.map +1 -1
  47. package/build/focusable-iframe/index.js +1 -0
  48. package/build/focusable-iframe/index.js.map +1 -1
  49. package/build/font-size-picker/index.js +10 -9
  50. package/build/font-size-picker/index.js.map +1 -1
  51. package/build/font-size-picker/utils.js +28 -17
  52. package/build/font-size-picker/utils.js.map +1 -1
  53. package/build/gradient-picker/index.js +3 -1
  54. package/build/gradient-picker/index.js.map +1 -1
  55. package/build/higher-order/with-focus-outside/index.js +2 -0
  56. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  57. package/build/index.js +8 -0
  58. package/build/index.js.map +1 -1
  59. package/build/input-control/styles/input-control-styles.js +44 -32
  60. package/build/input-control/styles/input-control-styles.js.map +1 -1
  61. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +10 -3
  62. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  63. package/build/mobile/color-settings/index.native.js +4 -2
  64. package/build/mobile/color-settings/index.native.js.map +1 -1
  65. package/build/mobile/color-settings/palette.screen.native.js +7 -6
  66. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  67. package/build/mobile/global-styles-context/utils.native.js +1 -1
  68. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  69. package/build/mobile/gridicons/index.native.js +3 -1
  70. package/build/mobile/gridicons/index.native.js.map +1 -1
  71. package/build/mobile/link-picker/index.native.js +45 -4
  72. package/build/mobile/link-picker/index.native.js.map +1 -1
  73. package/build/mobile/link-settings/index.native.js +10 -0
  74. package/build/mobile/link-settings/index.native.js.map +1 -1
  75. package/build/modal/aria-helper.js +2 -0
  76. package/build/modal/aria-helper.js.map +1 -1
  77. package/build/modal/index.js +17 -8
  78. package/build/modal/index.js.map +1 -1
  79. package/build/palette-edit/index.js +13 -11
  80. package/build/palette-edit/index.js.map +1 -1
  81. package/build/select-control/styles/select-control-styles.js +33 -9
  82. package/build/select-control/styles/select-control-styles.js.map +1 -1
  83. package/build/style-provider/index.js +2 -0
  84. package/build/style-provider/index.js.map +1 -1
  85. package/build/toggle-group-control/toggle-group-control/component.js +7 -2
  86. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  87. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +25 -14
  88. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -1
  89. package/build/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  90. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  91. package/build/tools-panel/styles.js +12 -10
  92. package/build/tools-panel/styles.js.map +1 -1
  93. package/build/tools-panel/tools-panel/component.js +6 -8
  94. package/build/tools-panel/tools-panel/component.js.map +1 -1
  95. package/build/tools-panel/tools-panel/hook.js +48 -17
  96. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  97. package/build/tools-panel/tools-panel-item/hook.js +5 -1
  98. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  99. package/build/unit-control/styles/unit-control-styles.js +23 -41
  100. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  101. package/build/z-stack/component.js.map +1 -1
  102. package/build/z-stack/styles.js +10 -8
  103. package/build/z-stack/styles.js.map +1 -1
  104. package/build-module/angle-picker-control/index.js +2 -0
  105. package/build-module/angle-picker-control/index.js.map +1 -1
  106. package/build-module/button/index.native.js +13 -3
  107. package/build-module/button/index.native.js.map +1 -1
  108. package/build-module/checkbox-control/index.js +1 -1
  109. package/build-module/checkbox-control/index.js.map +1 -1
  110. package/build-module/clipboard-button/index.js +1 -2
  111. package/build-module/clipboard-button/index.js.map +1 -1
  112. package/build-module/color-palette/index.js +34 -10
  113. package/build-module/color-palette/index.js.map +1 -1
  114. package/build-module/color-picker/color-display.js +3 -2
  115. package/build-module/color-picker/color-display.js.map +1 -1
  116. package/build-module/color-picker/hex-input.js +2 -1
  117. package/build-module/color-picker/hex-input.js.map +1 -1
  118. package/build-module/color-picker/input-with-slider.js +2 -1
  119. package/build-module/color-picker/input-with-slider.js.map +1 -1
  120. package/build-module/confirm-dialog/component.js +84 -0
  121. package/build-module/confirm-dialog/component.js.map +1 -0
  122. package/build-module/confirm-dialog/index.js +6 -0
  123. package/build-module/confirm-dialog/index.js.map +1 -0
  124. package/build-module/confirm-dialog/types.js +2 -0
  125. package/build-module/confirm-dialog/types.js.map +1 -0
  126. package/build-module/custom-gradient-bar/constants.js +0 -4
  127. package/build-module/custom-gradient-bar/constants.js.map +1 -1
  128. package/build-module/custom-gradient-bar/control-points.js +54 -23
  129. package/build-module/custom-gradient-bar/control-points.js.map +1 -1
  130. package/build-module/custom-gradient-bar/index.js +5 -1
  131. package/build-module/custom-gradient-bar/index.js.map +1 -1
  132. package/build-module/custom-gradient-picker/index.js +4 -1
  133. package/build-module/custom-gradient-picker/index.js.map +1 -1
  134. package/build-module/date-time/date.js +63 -87
  135. package/build-module/date-time/date.js.map +1 -1
  136. package/build-module/date-time/utils.js +20 -0
  137. package/build-module/date-time/utils.js.map +1 -0
  138. package/build-module/divider/component.js +8 -7
  139. package/build-module/divider/component.js.map +1 -1
  140. package/build-module/divider/styles.js +37 -13
  141. package/build-module/divider/styles.js.map +1 -1
  142. package/build-module/drop-zone/index.js +14 -6
  143. package/build-module/drop-zone/index.js.map +1 -1
  144. package/build-module/drop-zone/provider.js +1 -0
  145. package/build-module/drop-zone/provider.js.map +1 -1
  146. package/build-module/flyout/styles.js +2 -2
  147. package/build-module/flyout/styles.js.map +1 -1
  148. package/build-module/focusable-iframe/index.js +1 -0
  149. package/build-module/focusable-iframe/index.js.map +1 -1
  150. package/build-module/font-size-picker/index.js +10 -9
  151. package/build-module/font-size-picker/index.js.map +1 -1
  152. package/build-module/font-size-picker/utils.js +28 -17
  153. package/build-module/font-size-picker/utils.js.map +1 -1
  154. package/build-module/gradient-picker/index.js +3 -1
  155. package/build-module/gradient-picker/index.js.map +1 -1
  156. package/build-module/higher-order/with-focus-outside/index.js +1 -0
  157. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  158. package/build-module/index.js +1 -0
  159. package/build-module/index.js.map +1 -1
  160. package/build-module/input-control/styles/input-control-styles.js +44 -32
  161. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  162. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +10 -4
  163. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  164. package/build-module/mobile/color-settings/index.native.js +4 -2
  165. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  166. package/build-module/mobile/color-settings/palette.screen.native.js +7 -6
  167. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  168. package/build-module/mobile/global-styles-context/utils.native.js +1 -1
  169. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  170. package/build-module/mobile/gridicons/index.native.js +1 -0
  171. package/build-module/mobile/gridicons/index.native.js.map +1 -1
  172. package/build-module/mobile/link-picker/index.native.js +50 -8
  173. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  174. package/build-module/mobile/link-settings/index.native.js +10 -0
  175. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  176. package/build-module/modal/aria-helper.js +2 -0
  177. package/build-module/modal/aria-helper.js.map +1 -1
  178. package/build-module/modal/index.js +15 -8
  179. package/build-module/modal/index.js.map +1 -1
  180. package/build-module/palette-edit/index.js +13 -11
  181. package/build-module/palette-edit/index.js.map +1 -1
  182. package/build-module/select-control/styles/select-control-styles.js +33 -9
  183. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  184. package/build-module/style-provider/index.js +1 -0
  185. package/build-module/style-provider/index.js.map +1 -1
  186. package/build-module/toggle-group-control/toggle-group-control/component.js +8 -3
  187. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  188. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +25 -14
  189. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -1
  190. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  191. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  192. package/build-module/tools-panel/styles.js +12 -11
  193. package/build-module/tools-panel/styles.js.map +1 -1
  194. package/build-module/tools-panel/tools-panel/component.js +5 -8
  195. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  196. package/build-module/tools-panel/tools-panel/hook.js +48 -17
  197. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  198. package/build-module/tools-panel/tools-panel-item/hook.js +5 -1
  199. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  200. package/build-module/unit-control/styles/unit-control-styles.js +23 -41
  201. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  202. package/build-module/z-stack/component.js.map +1 -1
  203. package/build-module/z-stack/styles.js +13 -8
  204. package/build-module/z-stack/styles.js.map +1 -1
  205. package/build-style/style-rtl.css +34 -12
  206. package/build-style/style.css +34 -12
  207. package/build-types/base-field/hook.d.ts +16 -16
  208. package/build-types/card/card/hook.d.ts +16 -16
  209. package/build-types/card/card-body/hook.d.ts +16 -16
  210. package/build-types/card/card-divider/hook.d.ts +18 -18
  211. package/build-types/card/card-footer/hook.d.ts +17 -17
  212. package/build-types/card/card-header/hook.d.ts +16 -16
  213. package/build-types/card/card-media/hook.d.ts +16 -16
  214. package/build-types/divider/component.d.ts +8 -7
  215. package/build-types/divider/component.d.ts.map +1 -1
  216. package/build-types/divider/styles.d.ts +2 -2
  217. package/build-types/divider/styles.d.ts.map +1 -1
  218. package/build-types/divider/types.d.ts +5 -5
  219. package/build-types/divider/types.d.ts.map +1 -1
  220. package/build-types/elevation/hook.d.ts +15 -15
  221. package/build-types/flex/flex/hook.d.ts +16 -16
  222. package/build-types/flex/flex-block/hook.d.ts +16 -16
  223. package/build-types/flex/flex-item/hook.d.ts +16 -16
  224. package/build-types/flyout/flyout/hook.d.ts +17 -17
  225. package/build-types/flyout/styles.d.ts +7 -9
  226. package/build-types/flyout/styles.d.ts.map +1 -1
  227. package/build-types/grid/hook.d.ts +16 -16
  228. package/build-types/h-stack/hook.d.ts +16 -16
  229. package/build-types/heading/hook.d.ts +16 -16
  230. package/build-types/input-control/index.d.ts +1 -1
  231. package/build-types/input-control/index.d.ts.map +1 -1
  232. package/build-types/input-control/input-field.d.ts +1 -1
  233. package/build-types/input-control/input-field.d.ts.map +1 -1
  234. package/build-types/input-control/styles/input-control-styles.d.ts +1 -2
  235. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  236. package/build-types/input-control/types.d.ts +2 -1
  237. package/build-types/input-control/types.d.ts.map +1 -1
  238. package/build-types/item-group/item/hook.d.ts +16 -16
  239. package/build-types/item-group/item-group/hook.d.ts +16 -16
  240. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  241. package/build-types/scrollable/hook.d.ts +16 -16
  242. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  243. package/build-types/select-control/types.d.ts +1 -1
  244. package/build-types/select-control/types.d.ts.map +1 -1
  245. package/build-types/spacer/hook.d.ts +16 -16
  246. package/build-types/surface/hook.d.ts +16 -16
  247. package/build-types/text/hook.d.ts +16 -16
  248. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  249. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +1 -1
  250. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  251. package/build-types/tools-panel/styles.d.ts.map +1 -1
  252. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  253. package/build-types/tools-panel/tools-panel/hook.d.ts +16 -16
  254. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  255. package/build-types/tools-panel/tools-panel-header/hook.d.ts +16 -16
  256. package/build-types/tools-panel/tools-panel-item/hook.d.ts +16 -16
  257. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  258. package/build-types/tools-panel/types.d.ts +2 -1
  259. package/build-types/tools-panel/types.d.ts.map +1 -1
  260. package/build-types/truncate/hook.d.ts +16 -16
  261. package/build-types/ui/control-group/hook.d.ts +18 -18
  262. package/build-types/ui/control-label/hook.d.ts +16 -16
  263. package/build-types/ui/form-group/form-group.d.ts +4 -4
  264. package/build-types/ui/form-group/use-form-group.d.ts +55 -55
  265. package/build-types/unit-control/index.d.ts +1 -1
  266. package/build-types/unit-control/index.d.ts.map +1 -1
  267. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -0
  268. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  269. package/build-types/unit-control/types.d.ts +2 -2
  270. package/build-types/unit-control/types.d.ts.map +1 -1
  271. package/build-types/v-stack/hook.d.ts +16 -16
  272. package/build-types/z-stack/component.d.ts +1 -1
  273. package/build-types/z-stack/styles.d.ts.map +1 -1
  274. package/package.json +21 -23
  275. package/src/alignment-matrix-control/stories/index.js +1 -1
  276. package/src/angle-picker-control/index.js +2 -0
  277. package/src/base-control/stories/index.js +1 -1
  278. package/src/button/index.native.js +15 -1
  279. package/src/button/stories/index.js +1 -1
  280. package/src/button/style.scss +14 -0
  281. package/src/card/card/README.md +3 -3
  282. package/src/card/stories/index.js +1 -1
  283. package/src/card/test/__snapshots__/index.js.snap +6 -6
  284. package/src/checkbox-control/index.js +1 -1
  285. package/src/checkbox-control/stories/index.js +1 -1
  286. package/src/clipboard-button/index.js +1 -2
  287. package/src/color-indicator/stories/index.js +1 -1
  288. package/src/color-indicator/style.scss +5 -8
  289. package/src/color-palette/index.js +37 -9
  290. package/src/color-palette/stories/index.js +1 -1
  291. package/src/color-palette/style.scss +10 -1
  292. package/src/color-palette/test/__snapshots__/index.js.snap +30 -21
  293. package/src/color-picker/color-display.tsx +3 -2
  294. package/src/color-picker/hex-input.tsx +2 -1
  295. package/src/color-picker/input-with-slider.tsx +2 -1
  296. package/src/color-picker/stories/index.js +1 -1
  297. package/src/combobox-control/README.md +2 -2
  298. package/src/confirm-dialog/README.md +128 -0
  299. package/src/confirm-dialog/component.tsx +114 -0
  300. package/src/confirm-dialog/index.tsx +6 -0
  301. package/src/confirm-dialog/stories/index.js +120 -0
  302. package/src/confirm-dialog/test/index.js +302 -0
  303. package/src/confirm-dialog/types.ts +26 -0
  304. package/src/custom-gradient-bar/constants.js +0 -5
  305. package/src/custom-gradient-bar/control-points.js +40 -9
  306. package/src/custom-gradient-bar/index.js +8 -0
  307. package/src/custom-gradient-picker/index.js +9 -1
  308. package/src/custom-gradient-picker/style.scss +0 -4
  309. package/src/date-time/README.md +7 -0
  310. package/src/date-time/date.js +67 -84
  311. package/src/date-time/stories/index.js +1 -1
  312. package/src/date-time/stories/time.js +1 -1
  313. package/src/date-time/test/date.js +3 -29
  314. package/src/date-time/test/utils.js +32 -0
  315. package/src/date-time/utils.js +18 -0
  316. package/src/dimension-control/README.md +1 -1
  317. package/src/divider/README.md +33 -5
  318. package/src/divider/component.tsx +8 -7
  319. package/src/divider/stories/index.js +43 -17
  320. package/src/divider/styles.ts +53 -16
  321. package/src/divider/test/__snapshots__/index.js.snap +11 -11
  322. package/src/divider/test/index.js +4 -4
  323. package/src/divider/types.ts +5 -5
  324. package/src/drop-zone/index.js +14 -6
  325. package/src/drop-zone/provider.js +1 -0
  326. package/src/dropdown-menu/stories/index.js +1 -1
  327. package/src/duotone-picker/README.md +1 -1
  328. package/src/elevation/stories/index.js +1 -1
  329. package/src/external-link/stories/index.js +1 -1
  330. package/src/flyout/styles.ts +4 -2
  331. package/src/focusable-iframe/index.js +1 -0
  332. package/src/font-size-picker/index.js +27 -13
  333. package/src/font-size-picker/stories/index.js +63 -1
  334. package/src/font-size-picker/test/index.js +87 -0
  335. package/src/font-size-picker/test/util.js +74 -0
  336. package/src/font-size-picker/utils.js +31 -17
  337. package/src/form-token-field/stories/index.js +1 -1
  338. package/src/gradient-picker/index.js +4 -0
  339. package/src/gradient-picker/stories/index.js +1 -1
  340. package/src/grid/stories/index.js +1 -1
  341. package/src/guide/stories/index.js +1 -1
  342. package/src/higher-order/with-focus-outside/index.js +2 -0
  343. package/src/icon/stories/index.js +1 -1
  344. package/src/index.js +1 -0
  345. package/src/input-control/stories/index.js +2 -1
  346. package/src/input-control/styles/input-control-styles.tsx +16 -6
  347. package/src/input-control/types.ts +3 -1
  348. package/src/item-group/stories/index.js +84 -2
  349. package/src/menu-item/README.md +2 -2
  350. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +6 -2
  351. package/src/mobile/color-settings/index.native.js +2 -0
  352. package/src/mobile/color-settings/palette.screen.native.js +8 -5
  353. package/src/mobile/color-settings/style.native.scss +1 -1
  354. package/src/mobile/global-styles-context/utils.native.js +1 -1
  355. package/src/mobile/gridicons/index.native.js +3 -3
  356. package/src/mobile/inserter-button/style.native.scss +1 -0
  357. package/src/mobile/link-picker/index.native.js +41 -7
  358. package/src/mobile/link-settings/index.native.js +11 -0
  359. package/src/mobile/link-settings/test/edit.native.js +432 -0
  360. package/src/modal/README.md +10 -0
  361. package/src/modal/aria-helper.js +2 -0
  362. package/src/modal/index.js +72 -55
  363. package/src/modal/stories/index.js +6 -1
  364. package/src/modal/style.scss +9 -0
  365. package/src/modal/test/index.js +11 -0
  366. package/src/navigation/README.md +0 -9
  367. package/src/notice/stories/index.js +1 -1
  368. package/src/number-control/stories/index.js +1 -1
  369. package/src/palette-edit/index.js +15 -16
  370. package/src/palette-edit/style.scss +5 -0
  371. package/src/panel/stories/index.js +1 -1
  372. package/src/placeholder/stories/index.js +1 -1
  373. package/src/popover/stories/index.js +1 -1
  374. package/src/query-controls/README.md +138 -6
  375. package/src/radio-group/README.md +4 -1
  376. package/src/range-control/stories/index.js +1 -1
  377. package/src/resizable-box/stories/index.js +1 -1
  378. package/src/scrollable/stories/index.js +1 -1
  379. package/src/search-control/stories/index.js +1 -1
  380. package/src/select-control/stories/index.js +2 -1
  381. package/src/select-control/styles/select-control-styles.ts +25 -2
  382. package/src/select-control/types.ts +1 -1
  383. package/src/slot-fill/stories/index.js +1 -1
  384. package/src/snackbar/stories/index.js +1 -1
  385. package/src/spacer/stories/index.js +1 -1
  386. package/src/style-provider/index.js +2 -0
  387. package/src/surface/stories/index.js +1 -1
  388. package/src/tab-panel/stories/index.js +1 -1
  389. package/src/text-control/stories/index.js +1 -1
  390. package/src/text-highlight/stories/index.js +1 -1
  391. package/src/textarea-control/stories/index.js +1 -1
  392. package/src/tip/stories/index.js +1 -1
  393. package/src/toggle-control/stories/index.js +1 -1
  394. package/src/toggle-group-control/stories/index.js +1 -1
  395. package/src/toggle-group-control/toggle-group-control/component.tsx +7 -2
  396. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +24 -9
  397. package/src/toggle-group-control/toggle-group-control-option/styles.ts +3 -0
  398. package/src/toolbar-button/stories/index.js +1 -1
  399. package/src/tools-panel/stories/index.js +237 -0
  400. package/src/tools-panel/styles.ts +41 -1
  401. package/src/tools-panel/test/index.js +234 -1
  402. package/src/tools-panel/tools-panel/README.md +9 -0
  403. package/src/tools-panel/tools-panel/component.tsx +2 -5
  404. package/src/tools-panel/tools-panel/hook.ts +50 -18
  405. package/src/tools-panel/tools-panel-item/hook.ts +5 -1
  406. package/src/tools-panel/types.ts +5 -1
  407. package/src/tooltip/stories/index.js +1 -1
  408. package/src/tree-select/stories/index.js +1 -1
  409. package/src/truncate/stories/index.js +1 -1
  410. package/src/unit-control/stories/index.js +19 -1
  411. package/src/unit-control/styles/unit-control-styles.ts +33 -46
  412. package/src/unit-control/types.ts +5 -2
  413. package/src/z-stack/README.md +1 -1
  414. package/src/z-stack/component.tsx +1 -1
  415. package/src/z-stack/stories/index.js +1 -1
  416. package/src/z-stack/styles.ts +7 -2
  417. package/tsconfig.json +6 -2
  418. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,432 @@
1
+ // noinspection DuplicatedCode
2
+
3
+ /**
4
+ * External dependencies
5
+ */
6
+ import { Clipboard } from 'react-native';
7
+ import { fireEvent, initializeEditor, waitFor } from 'test/helpers';
8
+ /**
9
+ * WordPress dependencies
10
+ */
11
+ import { registerCoreBlocks } from '@wordpress/block-library';
12
+ import { getBlockTypes, unregisterBlockType } from '@wordpress/blocks';
13
+ import { __ } from '@wordpress/i18n';
14
+
15
+ /**
16
+ * Utility function to unregister all core block types previously registered
17
+ * when staging the Redux Store `beforeAll` integration tests start running.
18
+ *
19
+ * This should probably be extracted into a utility module for future tests.
20
+ */
21
+ const unregisterBlocks = () => {
22
+ const blocks = getBlockTypes();
23
+
24
+ blocks.forEach( ( { name } ) => unregisterBlockType( name ) );
25
+ };
26
+
27
+ /**
28
+ * ### TODO
29
+ * + Try to figure out why I can't `console.log(JSON.stringify(subject.toJSON()))` anymore.
30
+ */
31
+ describe.each( [
32
+ [
33
+ {
34
+ type: 'core/button',
35
+ initialHtml: `
36
+ <!-- wp:button {"style":{"border":{"radius":"5px"}}} -->
37
+ <div class="wp-block-button">
38
+ <a class="wp-block-button__link" style="border-radius:5px">Link</a>
39
+ </div>
40
+ <!-- /wp:button -->
41
+ `,
42
+ toJSON: () => 'core/button',
43
+ },
44
+ ],
45
+ [
46
+ {
47
+ type: 'core/image',
48
+ initialHtml: `
49
+ <!-- wp:image {"id":20,"sizeSlug":"large","linkDestination":"custom"} -->
50
+ <figure class="wp-block-image size-large">
51
+ <img class="wp-image-20" src="https://tonytahmouchtest.files.wordpress.com/2021/10/img_0111-2.jpg?w=1024" alt="" />
52
+ </figure>
53
+ <!-- /wp:image -->
54
+ `,
55
+ toJSON: () => 'core/image',
56
+ },
57
+ ],
58
+ ] )( '<LinkSettings/> from %j', ( { type, initialHtml } ) => {
59
+ beforeAll( () => {
60
+ registerCoreBlocks();
61
+ } );
62
+
63
+ afterAll( () => {
64
+ unregisterBlocks();
65
+ } );
66
+
67
+ /**
68
+ * GIVEN an EDITOR is displayed with an EDIT IMAGE BLOCK or EDIT BUTTON BLOCK;
69
+ * GIVEN the CLIPBOARD has a URL copied;
70
+ * WHEN the USER selects the SETTINGS BUTTON on the EDIT IMAGE BLOCK or EDIT BUTTON BLOCK;
71
+ */
72
+ // eslint-disable-next-line jest/no-done-callback
73
+ it( 'should display the LINK SETTINGS with an EMPTY LINK TO field.', async ( done ) => {
74
+ // Arrange
75
+ const expectation =
76
+ 'The LINK SETTINGS > LINK TO field SHOULD be displayed WITHOUT a URL from the CLIPBOARD.';
77
+ const url = 'https://tonytahmouchtest.files.wordpress.com';
78
+ const subject = await initializeEditor( { initialHtml } );
79
+ Clipboard.getString.mockReturnValue( url );
80
+
81
+ // Act
82
+ try {
83
+ const block = await waitFor( () =>
84
+ subject.getByA11yLabel(
85
+ type === 'core/image' ? /Image Block/ : /Button Block/
86
+ )
87
+ );
88
+ fireEvent.press( block );
89
+ fireEvent.press( block );
90
+ fireEvent.press(
91
+ await waitFor( () => subject.getByA11yLabel( 'Open Settings' ) )
92
+ );
93
+ } catch ( error ) {
94
+ done.fail( error );
95
+ }
96
+
97
+ // Assert
98
+ try {
99
+ await waitFor( () =>
100
+ subject.getByA11yLabel(
101
+ `Link to, ${
102
+ type === 'core/image' ? 'None' : 'Search or type URL'
103
+ }`
104
+ )
105
+ );
106
+ done();
107
+ } catch ( error ) {
108
+ done.fail( expectation );
109
+ }
110
+ } );
111
+
112
+ describe( '<LinkPicker/>', () => {
113
+ describe( 'Hide Clipboard Link Suggestion - Invalid URL in Clipboard', () => {
114
+ /**
115
+ * GIVEN a SETTINGS BOTTOM SHEET is displayed;
116
+ * GIVEN the CLIPBOARD has a NON-URL copied;
117
+ * GIVEN the STATE has NO URL;
118
+ * WHEN the USER selects the LINK TO cell;
119
+ */
120
+ // eslint-disable-next-line jest/no-done-callback
121
+ it( 'should display the LINK PICKER with NO FROM CLIPBOARD CELL.', async ( done ) => {
122
+ // Arrange
123
+ const expectation =
124
+ 'The LINK PICKER > LINK SUGGESTION SHOULD NOT suggest the URL from the CLIPBOARD.';
125
+ const url = 'tonytahmouchtest.files.wordpress.com';
126
+ const subject = await initializeEditor( { initialHtml } );
127
+ Clipboard.getString.mockReturnValue( url );
128
+
129
+ // Act
130
+ try {
131
+ const block = await waitFor( () =>
132
+ subject.getByA11yLabel(
133
+ type === 'core/image'
134
+ ? /Image Block/
135
+ : /Button Block/
136
+ )
137
+ );
138
+ fireEvent.press( block );
139
+ fireEvent.press( block );
140
+ fireEvent.press(
141
+ await waitFor( () =>
142
+ subject.getByA11yLabel( 'Open Settings' )
143
+ )
144
+ );
145
+ fireEvent.press(
146
+ await waitFor( () =>
147
+ subject.getByA11yLabel(
148
+ `Link to, ${
149
+ type === 'core/image'
150
+ ? 'None'
151
+ : 'Search or type URL'
152
+ }`
153
+ )
154
+ )
155
+ );
156
+ if ( type === 'core/image' ) {
157
+ fireEvent.press(
158
+ await waitFor( () =>
159
+ subject.getByA11yLabel( /Custom URL/ )
160
+ )
161
+ );
162
+ }
163
+ await waitFor( () => subject.getByA11yLabel( 'Apply' ) );
164
+ } catch ( error ) {
165
+ done.fail( error );
166
+ }
167
+
168
+ // Assert
169
+ waitFor(
170
+ () =>
171
+ subject.getByA11yLabel(
172
+ /Copy URL from the clipboard[,]/
173
+ ),
174
+ { timeout: 50, interval: 10 }
175
+ )
176
+ .then( () => done.fail( expectation ) )
177
+ .catch( () => done() );
178
+ } );
179
+ } );
180
+
181
+ describe( 'Hide Clipboard Link Suggestion - Valid and Same URL in Clipboard', () => {
182
+ /**
183
+ * GIVEN a SETTINGS BOTTOM SHEET is displayed;
184
+ * GIVEN the CLIPBOARD has a URL copied;
185
+ * GIVEN the STATE has the SAME URL as the CLIPBOARD;
186
+ * WHEN the USER selects the LINK TO cell;
187
+ */
188
+ // eslint-disable-next-line jest/no-done-callback
189
+ it( 'should display the LINK PICKER with NO FROM CLIPBOARD CELL.', async ( done ) => {
190
+ // Arrange
191
+ const expectation =
192
+ 'The LINK PICKER > LINK SUGGESTION SHOULD NOT suggest the URL from the CLIPBOARD.';
193
+ const url = 'https://tonytahmouchtest.files.wordpress.com';
194
+ const subject = await initializeEditor( { initialHtml } );
195
+ Clipboard.getString.mockReturnValue( url );
196
+
197
+ // Act
198
+ try {
199
+ const block = await waitFor( () =>
200
+ subject.getByA11yLabel(
201
+ type === 'core/image'
202
+ ? /Image Block/
203
+ : /Button Block/
204
+ )
205
+ );
206
+ fireEvent.press( block );
207
+ fireEvent.press( block );
208
+ fireEvent.press(
209
+ await waitFor( () =>
210
+ subject.getByA11yLabel( 'Open Settings' )
211
+ )
212
+ );
213
+ fireEvent.press(
214
+ await waitFor( () =>
215
+ subject.getByA11yLabel(
216
+ `Link to, ${
217
+ type === 'core/image'
218
+ ? 'None'
219
+ : 'Search or type URL'
220
+ }`
221
+ )
222
+ )
223
+ );
224
+ if ( type === 'core/image' ) {
225
+ fireEvent.press(
226
+ await waitFor( () =>
227
+ subject.getByA11yLabel( 'Custom URL. Empty' )
228
+ )
229
+ );
230
+ }
231
+ fireEvent.press(
232
+ await waitFor( () =>
233
+ subject.getByA11yLabel(
234
+ `Copy URL from the clipboard, ${ url }`
235
+ )
236
+ )
237
+ );
238
+ fireEvent.press(
239
+ await waitFor( () =>
240
+ subject.getByA11yLabel(
241
+ `Link to, ${
242
+ type === 'core/image' ? 'Custom URL' : url
243
+ }`
244
+ )
245
+ )
246
+ );
247
+ if ( type === 'core/image' ) {
248
+ fireEvent.press(
249
+ await waitFor( () =>
250
+ subject.getByA11yLabel( `Custom URL, ${ url }` )
251
+ )
252
+ );
253
+ }
254
+ await waitFor( () => subject.getByA11yLabel( 'Apply' ) );
255
+ } catch ( error ) {
256
+ done.fail( error );
257
+ }
258
+
259
+ // Assert
260
+ waitFor(
261
+ () =>
262
+ subject.getByA11yLabel(
263
+ /Copy URL from the clipboard[,]/
264
+ ),
265
+ { timeout: 50, interval: 10 }
266
+ )
267
+ .then( () => done.fail( expectation ) )
268
+ .catch( () => done() );
269
+ } );
270
+ } );
271
+
272
+ describe( 'Show Clipboard Link Suggestion - Valid and Different URL in Clipboard', () => {
273
+ /**
274
+ * GIVEN a SETTINGS BOTTOM SHEET is displayed;
275
+ * GIVEN the CLIPBOARD has a URL copied;
276
+ * GIVEN the STATE has NO URL;
277
+ * WHEN the USER selects the LINK TO cell;
278
+ */
279
+ it(
280
+ 'should display the LINK PICKER with the FROM CLIPBOARD CELL populated' +
281
+ ' with the URL from the CLIPBOARD.',
282
+ // eslint-disable-next-line jest/no-done-callback
283
+ async ( done ) => {
284
+ // Arrange
285
+ const url = 'https://tonytahmouchtest.files.wordpress.com';
286
+ const expectation =
287
+ 'The LINK PICKER > LINK SUGGESTION SHOULD suggest the URL from the CLIPBOARD, e.g.,' +
288
+ `
289
+ ${ url }
290
+ ${ __( 'From clipboard' ) }
291
+ `;
292
+ const subject = await initializeEditor( { initialHtml } );
293
+ Clipboard.getString.mockReturnValue( url );
294
+
295
+ // Act
296
+ try {
297
+ const block = await waitFor( () =>
298
+ subject.getByA11yLabel(
299
+ type === 'core/image'
300
+ ? /Image Block/
301
+ : /Button Block/
302
+ )
303
+ );
304
+ fireEvent.press( block );
305
+ fireEvent.press( block );
306
+ fireEvent.press(
307
+ await waitFor( () =>
308
+ subject.getByA11yLabel( 'Open Settings' )
309
+ )
310
+ );
311
+ fireEvent.press(
312
+ await waitFor( () =>
313
+ subject.getByA11yLabel(
314
+ `Link to, ${
315
+ type === 'core/image'
316
+ ? 'None'
317
+ : 'Search or type URL'
318
+ }`
319
+ )
320
+ )
321
+ );
322
+ if ( type === 'core/image' ) {
323
+ fireEvent.press(
324
+ await waitFor( () =>
325
+ subject.getByA11yLabel( /Custom URL/ )
326
+ )
327
+ );
328
+ }
329
+ await waitFor( () =>
330
+ subject.getByA11yLabel(
331
+ `Copy URL from the clipboard, ${ url }`
332
+ )
333
+ );
334
+ } catch ( error ) {
335
+ done.fail( error );
336
+ }
337
+
338
+ // Assert
339
+ try {
340
+ await waitFor( () => subject.getByText( url ) );
341
+ await waitFor( () =>
342
+ subject.getByText( __( 'From clipboard' ) )
343
+ );
344
+ done();
345
+ } catch ( error ) {
346
+ done.fail( expectation );
347
+ }
348
+ }
349
+ );
350
+ } );
351
+
352
+ describe( 'Press Clipboard Link Suggestion', () => {
353
+ /**
354
+ * GIVEN a LINK PICKER SHEET is displayed;
355
+ * GIVEN the FROM CLIPBOARD CELL is displayed;
356
+ * WHEN the FROM CLIPBOARD CELL is pressed;
357
+ */
358
+ it(
359
+ 'should display the LINK SETTINGS with the URL from the CLIPBOARD' +
360
+ ' populated in the LINK TO field.',
361
+ // eslint-disable-next-line jest/no-done-callback
362
+ async ( done ) => {
363
+ // Arrange
364
+ const expectation =
365
+ 'The LINK SETTINGS > LINK TO field SHOULD be displayed WITH a URL from the CLIPBOARD.';
366
+ const url = 'https://tonytahmouchtest.files.wordpress.com';
367
+ const subject = await initializeEditor( { initialHtml } );
368
+ Clipboard.getString.mockReturnValue( url );
369
+
370
+ // Act
371
+ try {
372
+ const block = await waitFor( () =>
373
+ subject.getByA11yLabel(
374
+ type === 'core/image'
375
+ ? /Image Block/
376
+ : /Button Block/
377
+ )
378
+ );
379
+ fireEvent.press( block );
380
+ fireEvent.press( block );
381
+ fireEvent.press(
382
+ await waitFor( () =>
383
+ subject.getByA11yLabel( 'Open Settings' )
384
+ )
385
+ );
386
+ fireEvent.press(
387
+ await waitFor( () =>
388
+ subject.getByA11yLabel(
389
+ `Link to, ${
390
+ type === 'core/image'
391
+ ? 'None'
392
+ : 'Search or type URL'
393
+ }`
394
+ )
395
+ )
396
+ );
397
+ if ( type === 'core/image' ) {
398
+ fireEvent.press(
399
+ await waitFor( () =>
400
+ subject.getByA11yLabel( /Custom URL/ )
401
+ )
402
+ );
403
+ }
404
+ fireEvent.press(
405
+ await waitFor( () =>
406
+ subject.getByA11yLabel(
407
+ `Copy URL from the clipboard, ${ url }`
408
+ )
409
+ )
410
+ );
411
+ } catch ( error ) {
412
+ done.fail( error );
413
+ }
414
+
415
+ // Assert
416
+ try {
417
+ await waitFor( () =>
418
+ subject.getByA11yLabel(
419
+ `Link to, ${
420
+ type === 'core/image' ? 'Custom URL' : url
421
+ }`
422
+ )
423
+ );
424
+ done();
425
+ } catch ( error ) {
426
+ done.fail( expectation );
427
+ }
428
+ }
429
+ );
430
+ } );
431
+ } );
432
+ } );
@@ -255,6 +255,16 @@ This property when set to `true` will render a full screen modal.
255
255
  - Required: No
256
256
  - Default: `false`
257
257
 
258
+ #### __experimentalHideHeader
259
+
260
+ When set to `true`, the Modal's header (including the icon, title and close button) will not be rendered.
261
+
262
+ *Warning*: This property is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
263
+
264
+ - Type: `boolean`
265
+ - Required: No
266
+ - Default: `false`
267
+
258
268
  ## Related components
259
269
 
260
270
  - To notify a user with a message of medium importance, use `Notice`.
@@ -1,3 +1,5 @@
1
+ //@ts-nocheck
2
+
1
3
  /**
2
4
  * External dependencies
3
5
  */
@@ -1,3 +1,5 @@
1
+ //@ts-nocheck
2
+
1
3
  /**
2
4
  * External dependencies
3
5
  */
@@ -6,7 +8,12 @@ import classnames from 'classnames';
6
8
  /**
7
9
  * WordPress dependencies
8
10
  */
9
- import { createPortal, useEffect, useRef } from '@wordpress/element';
11
+ import {
12
+ createPortal,
13
+ useEffect,
14
+ useRef,
15
+ forwardRef,
16
+ } from '@wordpress/element';
10
17
  import {
11
18
  useInstanceId,
12
19
  useFocusReturn,
@@ -30,31 +37,34 @@ import StyleProvider from '../style-provider';
30
37
  // Used to count the number of open modals.
31
38
  let openModalCount = 0;
32
39
 
33
- export default function Modal( {
34
- bodyOpenClassName = 'modal-open',
35
- role = 'dialog',
36
- title = null,
37
- focusOnMount = true,
38
- shouldCloseOnEsc = true,
39
- shouldCloseOnClickOutside = true,
40
- isDismissable, // Deprecated
41
- isDismissible = isDismissable || true,
42
- /* accessibility */
43
- aria = {
44
- labelledby: null,
45
- describedby: null,
46
- },
47
- onRequestClose,
48
- icon,
49
- closeButtonLabel,
50
- children,
51
- style,
52
- overlayClassName,
53
- className,
54
- contentLabel,
55
- onKeyDown,
56
- isFullScreen = false,
57
- } ) {
40
+ function Modal( props, forwardedRef ) {
41
+ const {
42
+ bodyOpenClassName = 'modal-open',
43
+ role = 'dialog',
44
+ title = null,
45
+ focusOnMount = true,
46
+ shouldCloseOnEsc = true,
47
+ shouldCloseOnClickOutside = true,
48
+ isDismissable, // Deprecated
49
+ isDismissible = isDismissable || true,
50
+ /* accessibility */
51
+ aria = {
52
+ labelledby: null,
53
+ describedby: null,
54
+ },
55
+ onRequestClose,
56
+ icon,
57
+ closeButtonLabel,
58
+ children,
59
+ style,
60
+ overlayClassName,
61
+ className,
62
+ contentLabel,
63
+ onKeyDown,
64
+ isFullScreen = false,
65
+ __experimentalHideHeader = false,
66
+ } = props;
67
+
58
68
  const ref = useRef();
59
69
  const instanceId = useInstanceId( Modal );
60
70
  const headingId = title
@@ -106,7 +116,7 @@ export default function Modal( {
106
116
  return createPortal(
107
117
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
108
118
  <div
109
- ref={ ref }
119
+ ref={ useMergeRefs( [ ref, forwardedRef ] ) }
110
120
  className={ classnames(
111
121
  'components-modal__screen-overlay',
112
122
  overlayClassName
@@ -139,38 +149,43 @@ export default function Modal( {
139
149
  onKeyDown={ onKeyDown }
140
150
  >
141
151
  <div
142
- className={ 'components-modal__content' }
152
+ className={ classnames( 'components-modal__content', {
153
+ 'hide-header': __experimentalHideHeader,
154
+ } ) }
143
155
  role="document"
144
156
  >
145
- <div className="components-modal__header">
146
- <div className="components-modal__header-heading-container">
147
- { icon && (
148
- <span
149
- className="components-modal__icon-container"
150
- aria-hidden
151
- >
152
- { icon }
153
- </span>
154
- ) }
155
- { title && (
156
- <h1
157
- id={ headingId }
158
- className="components-modal__header-heading"
159
- >
160
- { title }
161
- </h1>
157
+ { ! __experimentalHideHeader && (
158
+ <div className="components-modal__header">
159
+ <div className="components-modal__header-heading-container">
160
+ { icon && (
161
+ <span
162
+ className="components-modal__icon-container"
163
+ aria-hidden
164
+ >
165
+ { icon }
166
+ </span>
167
+ ) }
168
+ { title && (
169
+ <h1
170
+ id={ headingId }
171
+ className="components-modal__header-heading"
172
+ >
173
+ { title }
174
+ </h1>
175
+ ) }
176
+ </div>
177
+ { isDismissible && (
178
+ <Button
179
+ onClick={ onRequestClose }
180
+ icon={ closeSmall }
181
+ label={
182
+ closeButtonLabel ||
183
+ __( 'Close dialog' )
184
+ }
185
+ />
162
186
  ) }
163
187
  </div>
164
- { isDismissible && (
165
- <Button
166
- onClick={ onRequestClose }
167
- icon={ closeSmall }
168
- label={
169
- closeButtonLabel || __( 'Close dialog' )
170
- }
171
- />
172
- ) }
173
- </div>
188
+ ) }
174
189
  { children }
175
190
  </div>
176
191
  </div>
@@ -179,3 +194,5 @@ export default function Modal( {
179
194
  document.body
180
195
  );
181
196
  }
197
+
198
+ export default forwardRef( Modal );
@@ -20,7 +20,7 @@ export default {
20
20
  title: 'Components/Modal',
21
21
  component: Modal,
22
22
  parameters: {
23
- knobs: { disabled: false },
23
+ knobs: { disable: false },
24
24
  },
25
25
  };
26
26
 
@@ -55,6 +55,10 @@ export const _default = () => {
55
55
  'shouldCloseOnClickOutside',
56
56
  true
57
57
  );
58
+ const __experimentalHideHeader = boolean(
59
+ '__experimentalHideHeader',
60
+ false
61
+ );
58
62
 
59
63
  const iconComponent = showIcon ? <Icon icon={ wordpress } /> : null;
60
64
 
@@ -65,6 +69,7 @@ export const _default = () => {
65
69
  shouldCloseOnEsc,
66
70
  shouldCloseOnClickOutside,
67
71
  title,
72
+ __experimentalHideHeader,
68
73
  };
69
74
 
70
75
  return <ModalExample { ...modalProps } />;
@@ -126,4 +126,13 @@
126
126
  display: block;
127
127
  margin-bottom: $grid-unit-30;
128
128
  }
129
+
130
+ &.hide-header {
131
+ margin-top: 0;
132
+ padding-top: $grid-unit-30;
133
+
134
+ &::before {
135
+ content: none;
136
+ }
137
+ }
129
138
  }
@@ -46,4 +46,15 @@ describe( 'Modal', () => {
46
46
  const titleId = within( dialog ).getByText( 'Test Title' ).id;
47
47
  expect( dialog ).toHaveAttribute( 'aria-labelledby', titleId );
48
48
  } );
49
+
50
+ it( 'hides the header when the `__experimentalHideHeader` prop is used', () => {
51
+ render(
52
+ <Modal title="Test Title" __experimentalHideHeader>
53
+ <p>Modal content</p>
54
+ </Modal>
55
+ );
56
+ const dialog = screen.getByRole( 'dialog' );
57
+ const title = within( dialog ).queryByText( 'Test Title' );
58
+ expect( title ).not.toBeInTheDocument();
59
+ } );
49
60
  } );
@@ -44,15 +44,6 @@ const MyNavigation = () => (
44
44
  </Navigation>
45
45
  );
46
46
  ```
47
- ## CSS Classes leveraged
48
-
49
- The structural CSS for the navigation block targets generic classnames across menu items of multiple types including those automatically generated by the Page List block. Here are some of the notable classnames and what they are used for:
50
-
51
- - `.wp-block-navigation__submenu-container` is applied to submenus to main menu items.
52
- - `.wp-block-navigation-item` is applied to every menu item.
53
- - `.wp-block-navigation-item__content` is applied to the link inside a menu item.
54
- - `.wp-block-navigation-item__label` is applied to the innermost container around the menu item text label.
55
- - `.wp-block-navigation__submenu-icon` is applied to the submenu indicator (chevron).
56
47
 
57
48
  ## Navigation Props
58
49
 
@@ -12,7 +12,7 @@ export default {
12
12
  title: 'Components/Notice',
13
13
  component: Notice,
14
14
  parameters: {
15
- knobs: { disabled: false },
15
+ knobs: { disable: false },
16
16
  },
17
17
  };
18
18