@wordpress/components 19.2.1-next.33ec3857e2.0 → 19.2.1

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 (368) hide show
  1. package/CHANGELOG.md +6 -29
  2. package/build/angle-picker-control/index.js +0 -2
  3. package/build/angle-picker-control/index.js.map +1 -1
  4. package/build/button/index.native.js +3 -13
  5. package/build/button/index.native.js.map +1 -1
  6. package/build/checkbox-control/index.js +1 -1
  7. package/build/checkbox-control/index.js.map +1 -1
  8. package/build/clipboard-button/index.js +2 -1
  9. package/build/clipboard-button/index.js.map +1 -1
  10. package/build/color-palette/index.js +1 -13
  11. package/build/color-palette/index.js.map +1 -1
  12. package/build/color-picker/color-display.js +2 -4
  13. package/build/color-picker/color-display.js.map +1 -1
  14. package/build/color-picker/hex-input.js +1 -3
  15. package/build/color-picker/hex-input.js.map +1 -1
  16. package/build/color-picker/input-with-slider.js +1 -3
  17. package/build/color-picker/input-with-slider.js.map +1 -1
  18. package/build/custom-gradient-picker/index.js +0 -1
  19. package/build/custom-gradient-picker/index.js.map +1 -1
  20. package/build/date-time/date.js +86 -63
  21. package/build/date-time/date.js.map +1 -1
  22. package/build/divider/component.js +7 -8
  23. package/build/divider/component.js.map +1 -1
  24. package/build/divider/styles.js +13 -38
  25. package/build/divider/styles.js.map +1 -1
  26. package/build/drop-zone/index.js +6 -14
  27. package/build/drop-zone/index.js.map +1 -1
  28. package/build/drop-zone/provider.js +0 -1
  29. package/build/drop-zone/provider.js.map +1 -1
  30. package/build/flyout/styles.js +2 -2
  31. package/build/flyout/styles.js.map +1 -1
  32. package/build/focusable-iframe/index.js +0 -1
  33. package/build/focusable-iframe/index.js.map +1 -1
  34. package/build/higher-order/with-focus-outside/index.js +0 -2
  35. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  36. package/build/index.js +0 -8
  37. package/build/index.js.map +1 -1
  38. package/build/input-control/styles/input-control-styles.js +32 -44
  39. package/build/input-control/styles/input-control-styles.js.map +1 -1
  40. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +3 -10
  41. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  42. package/build/mobile/color-settings/index.native.js +2 -4
  43. package/build/mobile/color-settings/index.native.js.map +1 -1
  44. package/build/mobile/color-settings/palette.screen.native.js +6 -7
  45. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  46. package/build/mobile/global-styles-context/utils.native.js +1 -1
  47. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  48. package/build/mobile/gridicons/index.native.js +1 -3
  49. package/build/mobile/gridicons/index.native.js.map +1 -1
  50. package/build/mobile/link-picker/index.native.js +4 -45
  51. package/build/mobile/link-picker/index.native.js.map +1 -1
  52. package/build/mobile/link-settings/index.native.js +0 -10
  53. package/build/mobile/link-settings/index.native.js.map +1 -1
  54. package/build/modal/aria-helper.js +0 -2
  55. package/build/modal/aria-helper.js.map +1 -1
  56. package/build/modal/index.js +8 -17
  57. package/build/modal/index.js.map +1 -1
  58. package/build/palette-edit/index.js +31 -27
  59. package/build/palette-edit/index.js.map +1 -1
  60. package/build/select-control/styles/select-control-styles.js +9 -33
  61. package/build/select-control/styles/select-control-styles.js.map +1 -1
  62. package/build/style-provider/index.js +0 -2
  63. package/build/style-provider/index.js.map +1 -1
  64. package/build/toggle-group-control/toggle-group-control/component.js +2 -7
  65. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  66. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +14 -25
  67. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -1
  68. package/build/tools-panel/styles.js +10 -12
  69. package/build/tools-panel/styles.js.map +1 -1
  70. package/build/tools-panel/tools-panel/component.js +8 -6
  71. package/build/tools-panel/tools-panel/component.js.map +1 -1
  72. package/build/tools-panel/tools-panel-item/hook.js +8 -6
  73. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  74. package/build/unit-control/styles/unit-control-styles.js +41 -23
  75. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  76. package/build/z-stack/component.js.map +1 -1
  77. package/build/z-stack/styles.js +8 -10
  78. package/build/z-stack/styles.js.map +1 -1
  79. package/build-module/angle-picker-control/index.js +0 -2
  80. package/build-module/angle-picker-control/index.js.map +1 -1
  81. package/build-module/button/index.native.js +3 -13
  82. package/build-module/button/index.native.js.map +1 -1
  83. package/build-module/checkbox-control/index.js +1 -1
  84. package/build-module/checkbox-control/index.js.map +1 -1
  85. package/build-module/clipboard-button/index.js +2 -1
  86. package/build-module/clipboard-button/index.js.map +1 -1
  87. package/build-module/color-palette/index.js +2 -14
  88. package/build-module/color-palette/index.js.map +1 -1
  89. package/build-module/color-picker/color-display.js +2 -3
  90. package/build-module/color-picker/color-display.js.map +1 -1
  91. package/build-module/color-picker/hex-input.js +1 -2
  92. package/build-module/color-picker/hex-input.js.map +1 -1
  93. package/build-module/color-picker/input-with-slider.js +1 -2
  94. package/build-module/color-picker/input-with-slider.js.map +1 -1
  95. package/build-module/custom-gradient-picker/index.js +0 -1
  96. package/build-module/custom-gradient-picker/index.js.map +1 -1
  97. package/build-module/date-time/date.js +87 -63
  98. package/build-module/date-time/date.js.map +1 -1
  99. package/build-module/divider/component.js +7 -8
  100. package/build-module/divider/component.js.map +1 -1
  101. package/build-module/divider/styles.js +13 -37
  102. package/build-module/divider/styles.js.map +1 -1
  103. package/build-module/drop-zone/index.js +6 -14
  104. package/build-module/drop-zone/index.js.map +1 -1
  105. package/build-module/drop-zone/provider.js +0 -1
  106. package/build-module/drop-zone/provider.js.map +1 -1
  107. package/build-module/flyout/styles.js +2 -2
  108. package/build-module/flyout/styles.js.map +1 -1
  109. package/build-module/focusable-iframe/index.js +0 -1
  110. package/build-module/focusable-iframe/index.js.map +1 -1
  111. package/build-module/higher-order/with-focus-outside/index.js +0 -1
  112. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  113. package/build-module/index.js +0 -1
  114. package/build-module/index.js.map +1 -1
  115. package/build-module/input-control/styles/input-control-styles.js +32 -44
  116. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  117. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +4 -10
  118. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  119. package/build-module/mobile/color-settings/index.native.js +2 -4
  120. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  121. package/build-module/mobile/color-settings/palette.screen.native.js +6 -7
  122. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  123. package/build-module/mobile/global-styles-context/utils.native.js +1 -1
  124. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  125. package/build-module/mobile/gridicons/index.native.js +0 -1
  126. package/build-module/mobile/gridicons/index.native.js.map +1 -1
  127. package/build-module/mobile/link-picker/index.native.js +8 -50
  128. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  129. package/build-module/mobile/link-settings/index.native.js +0 -10
  130. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  131. package/build-module/modal/aria-helper.js +0 -2
  132. package/build-module/modal/aria-helper.js.map +1 -1
  133. package/build-module/modal/index.js +8 -15
  134. package/build-module/modal/index.js.map +1 -1
  135. package/build-module/palette-edit/index.js +30 -27
  136. package/build-module/palette-edit/index.js.map +1 -1
  137. package/build-module/select-control/styles/select-control-styles.js +9 -33
  138. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  139. package/build-module/style-provider/index.js +0 -1
  140. package/build-module/style-provider/index.js.map +1 -1
  141. package/build-module/toggle-group-control/toggle-group-control/component.js +3 -8
  142. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  143. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +14 -25
  144. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -1
  145. package/build-module/tools-panel/styles.js +11 -12
  146. package/build-module/tools-panel/styles.js.map +1 -1
  147. package/build-module/tools-panel/tools-panel/component.js +8 -5
  148. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  149. package/build-module/tools-panel/tools-panel-item/hook.js +8 -6
  150. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  151. package/build-module/unit-control/styles/unit-control-styles.js +41 -23
  152. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  153. package/build-module/z-stack/component.js.map +1 -1
  154. package/build-module/z-stack/styles.js +8 -13
  155. package/build-module/z-stack/styles.js.map +1 -1
  156. package/build-style/style-rtl.css +11 -23
  157. package/build-style/style.css +11 -23
  158. package/build-types/base-field/hook.d.ts +16 -16
  159. package/build-types/card/card/hook.d.ts +16 -16
  160. package/build-types/card/card-body/hook.d.ts +16 -16
  161. package/build-types/card/card-divider/hook.d.ts +18 -18
  162. package/build-types/card/card-footer/hook.d.ts +17 -17
  163. package/build-types/card/card-header/hook.d.ts +16 -16
  164. package/build-types/card/card-media/hook.d.ts +16 -16
  165. package/build-types/divider/component.d.ts +7 -8
  166. package/build-types/divider/component.d.ts.map +1 -1
  167. package/build-types/divider/styles.d.ts +2 -2
  168. package/build-types/divider/styles.d.ts.map +1 -1
  169. package/build-types/divider/types.d.ts +5 -5
  170. package/build-types/divider/types.d.ts.map +1 -1
  171. package/build-types/elevation/hook.d.ts +15 -15
  172. package/build-types/flex/flex/hook.d.ts +16 -16
  173. package/build-types/flex/flex-block/hook.d.ts +16 -16
  174. package/build-types/flex/flex-item/hook.d.ts +16 -16
  175. package/build-types/flyout/flyout/hook.d.ts +17 -17
  176. package/build-types/flyout/styles.d.ts +9 -7
  177. package/build-types/flyout/styles.d.ts.map +1 -1
  178. package/build-types/grid/hook.d.ts +16 -16
  179. package/build-types/h-stack/hook.d.ts +16 -16
  180. package/build-types/heading/hook.d.ts +16 -16
  181. package/build-types/input-control/index.d.ts +1 -1
  182. package/build-types/input-control/index.d.ts.map +1 -1
  183. package/build-types/input-control/input-field.d.ts +1 -1
  184. package/build-types/input-control/input-field.d.ts.map +1 -1
  185. package/build-types/input-control/styles/input-control-styles.d.ts +2 -1
  186. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  187. package/build-types/input-control/types.d.ts +1 -2
  188. package/build-types/input-control/types.d.ts.map +1 -1
  189. package/build-types/item-group/item/hook.d.ts +16 -16
  190. package/build-types/item-group/item-group/hook.d.ts +16 -16
  191. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  192. package/build-types/scrollable/hook.d.ts +16 -16
  193. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  194. package/build-types/select-control/types.d.ts +1 -1
  195. package/build-types/select-control/types.d.ts.map +1 -1
  196. package/build-types/spacer/hook.d.ts +16 -16
  197. package/build-types/surface/hook.d.ts +16 -16
  198. package/build-types/text/hook.d.ts +16 -16
  199. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  200. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +1 -1
  201. package/build-types/tools-panel/styles.d.ts.map +1 -1
  202. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  203. package/build-types/tools-panel/tools-panel/hook.d.ts +16 -16
  204. package/build-types/tools-panel/tools-panel-header/hook.d.ts +16 -16
  205. package/build-types/tools-panel/tools-panel-item/hook.d.ts +16 -16
  206. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  207. package/build-types/truncate/hook.d.ts +16 -16
  208. package/build-types/ui/control-group/hook.d.ts +18 -18
  209. package/build-types/ui/control-label/hook.d.ts +16 -16
  210. package/build-types/ui/form-group/form-group.d.ts +4 -4
  211. package/build-types/ui/form-group/use-form-group.d.ts +55 -55
  212. package/build-types/unit-control/index.d.ts +1 -1
  213. package/build-types/unit-control/index.d.ts.map +1 -1
  214. package/build-types/unit-control/styles/unit-control-styles.d.ts +0 -1
  215. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  216. package/build-types/unit-control/types.d.ts +2 -2
  217. package/build-types/unit-control/types.d.ts.map +1 -1
  218. package/build-types/v-stack/hook.d.ts +16 -16
  219. package/build-types/z-stack/component.d.ts +1 -1
  220. package/build-types/z-stack/styles.d.ts.map +1 -1
  221. package/package.json +23 -21
  222. package/src/alignment-matrix-control/stories/index.js +1 -1
  223. package/src/angle-picker-control/index.js +0 -2
  224. package/src/base-control/stories/index.js +1 -1
  225. package/src/button/index.native.js +1 -15
  226. package/src/button/stories/index.js +1 -1
  227. package/src/button/style.scss +0 -14
  228. package/src/card/card/README.md +3 -3
  229. package/src/card/stories/index.js +1 -1
  230. package/src/card/test/__snapshots__/index.js.snap +6 -6
  231. package/src/checkbox-control/index.js +1 -1
  232. package/src/checkbox-control/stories/index.js +1 -1
  233. package/src/clipboard-button/index.js +2 -1
  234. package/src/color-indicator/stories/index.js +1 -1
  235. package/src/color-indicator/style.scss +8 -5
  236. package/src/color-palette/index.js +5 -13
  237. package/src/color-palette/stories/index.js +1 -1
  238. package/src/color-palette/test/__snapshots__/index.js.snap +0 -1
  239. package/src/color-picker/color-display.tsx +2 -3
  240. package/src/color-picker/hex-input.tsx +1 -2
  241. package/src/color-picker/input-with-slider.tsx +1 -2
  242. package/src/color-picker/stories/index.js +1 -1
  243. package/src/combobox-control/README.md +2 -2
  244. package/src/custom-gradient-picker/index.js +0 -1
  245. package/src/custom-gradient-picker/style.scss +4 -0
  246. package/src/date-time/README.md +0 -7
  247. package/src/date-time/date.js +84 -67
  248. package/src/date-time/stories/index.js +1 -1
  249. package/src/date-time/stories/time.js +1 -1
  250. package/src/date-time/test/date.js +29 -3
  251. package/src/dimension-control/README.md +1 -1
  252. package/src/divider/README.md +5 -33
  253. package/src/divider/component.tsx +7 -8
  254. package/src/divider/stories/index.js +17 -43
  255. package/src/divider/styles.ts +16 -53
  256. package/src/divider/test/__snapshots__/index.js.snap +11 -11
  257. package/src/divider/test/index.js +4 -4
  258. package/src/divider/types.ts +5 -5
  259. package/src/drop-zone/index.js +6 -14
  260. package/src/drop-zone/provider.js +0 -1
  261. package/src/dropdown-menu/stories/index.js +1 -1
  262. package/src/duotone-picker/README.md +1 -1
  263. package/src/elevation/stories/index.js +1 -1
  264. package/src/external-link/stories/index.js +1 -1
  265. package/src/flyout/styles.ts +2 -4
  266. package/src/focusable-iframe/index.js +0 -1
  267. package/src/font-size-picker/stories/index.js +1 -1
  268. package/src/form-token-field/stories/index.js +1 -1
  269. package/src/gradient-picker/stories/index.js +1 -1
  270. package/src/grid/stories/index.js +1 -1
  271. package/src/guide/stories/index.js +1 -1
  272. package/src/higher-order/with-focus-outside/index.js +0 -2
  273. package/src/icon/stories/index.js +1 -1
  274. package/src/index.js +0 -1
  275. package/src/input-control/stories/index.js +1 -2
  276. package/src/input-control/styles/input-control-styles.tsx +6 -16
  277. package/src/input-control/types.ts +1 -3
  278. package/src/item-group/stories/index.js +2 -84
  279. package/src/menu-item/README.md +2 -2
  280. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -6
  281. package/src/mobile/color-settings/index.native.js +0 -2
  282. package/src/mobile/color-settings/palette.screen.native.js +5 -8
  283. package/src/mobile/color-settings/style.native.scss +1 -1
  284. package/src/mobile/global-styles-context/utils.native.js +1 -1
  285. package/src/mobile/gridicons/index.native.js +3 -3
  286. package/src/mobile/inserter-button/style.native.scss +0 -1
  287. package/src/mobile/link-picker/index.native.js +7 -41
  288. package/src/mobile/link-settings/index.native.js +0 -11
  289. package/src/modal/README.md +0 -10
  290. package/src/modal/aria-helper.js +0 -2
  291. package/src/modal/index.js +55 -72
  292. package/src/modal/stories/index.js +1 -6
  293. package/src/modal/style.scss +0 -9
  294. package/src/modal/test/index.js +0 -11
  295. package/src/navigation/README.md +9 -0
  296. package/src/notice/stories/index.js +1 -1
  297. package/src/number-control/stories/index.js +1 -1
  298. package/src/palette-edit/index.js +106 -73
  299. package/src/panel/stories/index.js +1 -1
  300. package/src/placeholder/stories/index.js +1 -1
  301. package/src/popover/stories/index.js +1 -1
  302. package/src/query-controls/README.md +6 -138
  303. package/src/radio-group/README.md +1 -4
  304. package/src/range-control/stories/index.js +1 -1
  305. package/src/resizable-box/stories/index.js +1 -1
  306. package/src/scrollable/stories/index.js +1 -1
  307. package/src/search-control/stories/index.js +1 -1
  308. package/src/select-control/stories/index.js +1 -2
  309. package/src/select-control/styles/select-control-styles.ts +2 -25
  310. package/src/select-control/types.ts +1 -1
  311. package/src/slot-fill/stories/index.js +1 -1
  312. package/src/snackbar/stories/index.js +1 -1
  313. package/src/spacer/stories/index.js +1 -1
  314. package/src/style-provider/index.js +0 -2
  315. package/src/surface/stories/index.js +1 -1
  316. package/src/tab-panel/stories/index.js +1 -1
  317. package/src/text-control/stories/index.js +1 -1
  318. package/src/text-highlight/stories/index.js +1 -1
  319. package/src/textarea-control/stories/index.js +1 -1
  320. package/src/tip/stories/index.js +1 -1
  321. package/src/toggle-control/stories/index.js +1 -1
  322. package/src/toggle-group-control/stories/index.js +1 -1
  323. package/src/toggle-group-control/toggle-group-control/component.tsx +2 -7
  324. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +9 -24
  325. package/src/toolbar-button/stories/index.js +1 -1
  326. package/src/tools-panel/stories/index.js +0 -54
  327. package/src/tools-panel/styles.ts +1 -41
  328. package/src/tools-panel/test/index.js +137 -19
  329. package/src/tools-panel/tools-panel/README.md +3 -11
  330. package/src/tools-panel/tools-panel/component.tsx +5 -2
  331. package/src/tools-panel/tools-panel-item/hook.ts +14 -6
  332. package/src/tooltip/stories/index.js +1 -1
  333. package/src/tree-select/stories/index.js +1 -1
  334. package/src/truncate/stories/index.js +1 -1
  335. package/src/unit-control/stories/index.js +1 -19
  336. package/src/unit-control/styles/unit-control-styles.ts +46 -33
  337. package/src/unit-control/types.ts +2 -5
  338. package/src/z-stack/README.md +1 -1
  339. package/src/z-stack/component.tsx +1 -1
  340. package/src/z-stack/stories/index.js +1 -1
  341. package/src/z-stack/styles.ts +2 -7
  342. package/tsconfig.json +2 -6
  343. package/tsconfig.tsbuildinfo +1 -1
  344. package/build/confirm-dialog/component.js +0 -103
  345. package/build/confirm-dialog/component.js.map +0 -1
  346. package/build/confirm-dialog/index.js +0 -16
  347. package/build/confirm-dialog/index.js.map +0 -1
  348. package/build/confirm-dialog/types.js +0 -6
  349. package/build/confirm-dialog/types.js.map +0 -1
  350. package/build/date-time/utils.js +0 -32
  351. package/build/date-time/utils.js.map +0 -1
  352. package/build-module/confirm-dialog/component.js +0 -84
  353. package/build-module/confirm-dialog/component.js.map +0 -1
  354. package/build-module/confirm-dialog/index.js +0 -6
  355. package/build-module/confirm-dialog/index.js.map +0 -1
  356. package/build-module/confirm-dialog/types.js +0 -2
  357. package/build-module/confirm-dialog/types.js.map +0 -1
  358. package/build-module/date-time/utils.js +0 -20
  359. package/build-module/date-time/utils.js.map +0 -1
  360. package/src/confirm-dialog/README.md +0 -128
  361. package/src/confirm-dialog/component.tsx +0 -114
  362. package/src/confirm-dialog/index.tsx +0 -6
  363. package/src/confirm-dialog/stories/index.js +0 -120
  364. package/src/confirm-dialog/test/index.js +0 -302
  365. package/src/confirm-dialog/types.ts +0 -26
  366. package/src/date-time/test/utils.js +0 -32
  367. package/src/date-time/utils.js +0 -18
  368. package/src/mobile/link-settings/test/edit.native.js +0 -432
@@ -4,20 +4,15 @@
4
4
  * External dependencies
5
5
  */
6
6
  import { boolean, select } from '@storybook/addon-knobs';
7
- import { css } from '@emotion/react';
8
- import styled from '@emotion/styled';
9
7
 
10
8
  /**
11
9
  * WordPress dependencies
12
10
  */
13
- import { typography, chevronRight } from '@wordpress/icons';
14
- import { useMemo } from '@wordpress/element';
15
- import { isRTL } from '@wordpress/i18n';
11
+ import { typography } from '@wordpress/icons';
16
12
 
17
13
  /**
18
14
  * Internal dependencies
19
15
  */
20
- import { useCx } from '../../utils';
21
16
  import { ItemGroup, Item } from '..';
22
17
  import Button from '../../button';
23
18
  import { FlexItem, FlexBlock } from '../../flex';
@@ -32,7 +27,7 @@ export default {
32
27
  component: ItemGroup,
33
28
  title: 'Components (Experimental)/ItemGroup',
34
29
  parameters: {
35
- knobs: { disable: false },
30
+ knobs: { disabled: false },
36
31
  },
37
32
  };
38
33
 
@@ -122,58 +117,6 @@ const SimpleColorSwatch = ( { color, style } ) => (
122
117
  />
123
118
  );
124
119
 
125
- const ChevronWrapper = styled( FlexItem )`
126
- display: block;
127
- fill: currentColor;
128
- transition: transform 0.15s ease-out;
129
- `;
130
-
131
- const ItemWithChevron = ( {
132
- children,
133
- className,
134
- alwaysVisible,
135
- ...otherProps
136
- } ) => {
137
- const isRtlLayout = isRTL();
138
- const cx = useCx();
139
-
140
- const appearingChevron = css`
141
- &:not( :hover ):not( :focus ) ${ ChevronWrapper } {
142
- display: none;
143
- }
144
- `;
145
-
146
- const itemClassName = useMemo(
147
- () => cx( ! alwaysVisible && appearingChevron, className ),
148
- [ alwaysVisible, className ]
149
- );
150
-
151
- const chevronIconClassName = useMemo(
152
- () =>
153
- cx( css`
154
- display: block;
155
- fill: currentColor;
156
- transform: ${ isRtlLayout ? 'scaleX( -100% )' : 'none' };
157
- ` ),
158
- [ isRtlLayout ]
159
- );
160
-
161
- return (
162
- <Item { ...otherProps } className={ itemClassName }>
163
- <HStack justify="flex-start">
164
- <FlexBlock>{ children }</FlexBlock>
165
- <ChevronWrapper>
166
- <Icon
167
- className={ chevronIconClassName }
168
- icon={ chevronRight }
169
- size={ 24 }
170
- />
171
- </ChevronWrapper>
172
- </HStack>
173
- </Item>
174
- );
175
- };
176
-
177
120
  export const complexLayouts = () => {
178
121
  const colors = [
179
122
  {
@@ -234,31 +177,6 @@ export const complexLayouts = () => {
234
177
  </FlexItem>
235
178
  </HStack>
236
179
  </Item>
237
-
238
- <ItemWithChevron onClick={ () => alert( 'Single color setting' ) }>
239
- <HStack justify="flex-start">
240
- <SimpleColorSwatch
241
- color="#2FB63F"
242
- style={ { flexShrink: 0 } }
243
- />
244
-
245
- <Truncate>Chevron on hover and focus</Truncate>
246
- </HStack>
247
- </ItemWithChevron>
248
-
249
- <ItemWithChevron
250
- alwaysVisible
251
- onClick={ () => alert( 'Single color setting' ) }
252
- >
253
- <HStack justify="flex-start">
254
- <SimpleColorSwatch
255
- color="#D175D0"
256
- style={ { flexShrink: 0 } }
257
- />
258
-
259
- <Truncate>Chevron always visible</Truncate>
260
- </HStack>
261
- </ItemWithChevron>
262
180
  </ItemGroup>
263
181
  );
264
182
  };
@@ -67,10 +67,10 @@ Whether or not the menu item is currently selected.
67
67
 
68
68
  ### `shortcut`
69
69
 
70
- - Type: `string` or `object`
70
+ - Type: `string`
71
71
  - Required: No
72
72
 
73
- If shortcut is a string, it is expecting the display text. If shortcut is an object, it will accept the properties of `display` (string) and `ariaLabel` (string).
73
+ Refer to documentation for [Shortcut's `shortcut` prop](/packages/components/src/shortcut/README.md#shortcut).
74
74
 
75
75
  ### `role`
76
76
 
@@ -16,19 +16,16 @@ import { usePreferredColorSchemeStyle } from '@wordpress/compose';
16
16
  import Cell from './cell';
17
17
  import cellStyles from './styles.scss';
18
18
  import suggestionStyles from './link-suggestion-styles.scss';
19
- import { posts, pages, empty, clipboard } from '../gridicons';
19
+ import { posts, pages, empty } from '../gridicons';
20
20
 
21
21
  const icons = {
22
22
  URL: globe,
23
- clipboard,
24
23
  post: posts,
25
24
  page: pages,
26
25
  };
27
26
 
28
27
  const getSummaryForType = ( type ) => {
29
28
  switch ( type ) {
30
- case 'clipboard':
31
- return __( 'From clipboard' );
32
29
  case 'mailto':
33
30
  return __( 'Add this email link' );
34
31
  case 'tel':
@@ -39,7 +36,7 @@ const getSummaryForType = ( type ) => {
39
36
  };
40
37
 
41
38
  // we use some Cell styles here with a column flex-direction
42
- function LinkSuggestionItemCell( { suggestion, onLinkPicked, ...props } ) {
39
+ function LinkSuggestionItemCell( { suggestion, onLinkPicked } ) {
43
40
  const { title: contentTitle, url, type, isDirectEntry } = suggestion;
44
41
  const title = isDirectEntry ? url : contentTitle;
45
42
  const summary = isDirectEntry ? getSummaryForType( type ) : url;
@@ -61,7 +58,6 @@ function LinkSuggestionItemCell( { suggestion, onLinkPicked, ...props } ) {
61
58
 
62
59
  return (
63
60
  <Cell
64
- { ...props }
65
61
  icon={ icons[ type ] || empty }
66
62
  onPress={ pickLink }
67
63
  separatorType={ 'none' }
@@ -28,7 +28,6 @@ const ColorSettingsMemo = memo(
28
28
  gradientValue,
29
29
  onGradientChange,
30
30
  label,
31
- hideNavigation,
32
31
  } ) => {
33
32
  useEffect( () => {
34
33
  shouldEnableBottomSheetMaxHeight( true );
@@ -45,7 +44,6 @@ const ColorSettingsMemo = memo(
45
44
  gradientValue,
46
45
  onGradientChange,
47
46
  label,
48
- hideNavigation,
49
47
  } }
50
48
  >
51
49
  <PaletteScreen />
@@ -26,7 +26,7 @@ import { colorsUtils } from './utils';
26
26
 
27
27
  import styles from './style.scss';
28
28
 
29
- const HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 };
29
+ const HIT_SLOP = { top: 22, bottom: 22, left: 22, right: 22 };
30
30
 
31
31
  const PaletteScreen = () => {
32
32
  const route = useRoute();
@@ -38,7 +38,6 @@ const PaletteScreen = () => {
38
38
  onGradientChange,
39
39
  colorValue,
40
40
  defaultSettings,
41
- hideNavigation = false,
42
41
  } = route.params || {};
43
42
  const { segments, isGradient } = colorsUtils;
44
43
  const [ currentValue, setCurrentValue ] = useState( colorValue );
@@ -165,12 +164,10 @@ const PaletteScreen = () => {
165
164
  }
166
165
  return (
167
166
  <View>
168
- { ! hideNavigation && (
169
- <NavBar>
170
- <NavBar.BackButton onPress={ navigation.goBack } />
171
- <NavBar.Heading>{ label } </NavBar.Heading>
172
- </NavBar>
173
- ) }
167
+ <NavBar>
168
+ <NavBar.BackButton onPress={ navigation.goBack } />
169
+ <NavBar.Heading>{ label } </NavBar.Heading>
170
+ </NavBar>
174
171
  <ColorPalette
175
172
  setColor={ setColor }
176
173
  activeColor={ currentValue }
@@ -45,7 +45,7 @@
45
45
  }
46
46
 
47
47
  .clearButtonContainer {
48
- align-self: flex-end;
48
+ align-items: flex-end;
49
49
  }
50
50
 
51
51
  .clearButton {
@@ -162,7 +162,7 @@ export function getBlockTypography(
162
162
  }
163
163
  }
164
164
 
165
- if ( blockStyleAttributes?.fontSize && baseGlobalStyles ) {
165
+ if ( blockStyleAttributes?.fontSize ) {
166
166
  const mappedFontSize = find( fontSizes, {
167
167
  slug: blockStyleAttributes?.fontSize,
168
168
  } );
@@ -9,9 +9,6 @@ const fromPathData24x24 = ( pathData ) => (
9
9
  </SVG>
10
10
  );
11
11
 
12
- export const clipboard = fromPathData24x24(
13
- 'M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6a2 2 0 00-2 2v15a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2zm-4 2V4a2 2 0 10-4 0v1a2 2 0 00-2 2v1h8V7a2 2 0 00-2-2z'
14
- );
15
12
  export const posts = fromPathData24x24(
16
13
  'M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z'
17
14
  );
@@ -24,12 +21,15 @@ export const refresh = fromPathData24x24(
24
21
  export const noticeOutline = fromPathData24x24(
25
22
  'M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z'
26
23
  );
24
+
27
25
  export const empty = (
28
26
  <SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" />
29
27
  );
28
+
30
29
  export const search = fromPathData24x24(
31
30
  'M21,19l-5.154-5.154C16.574,12.742,17,11.421,17,10c0-3.866-3.134-7-7-7s-7,3.134-7,7c0,3.866,3.134,7,7,7 c1.421,0,2.742-0.426,3.846-1.154L19,21L21,19z M5,10c0-2.757,2.243-5,5-5s5,2.243,5,5s-2.243,5-5,5S5,12.757,5,10z'
32
31
  );
32
+
33
33
  export default {
34
34
  empty,
35
35
  posts,
@@ -42,7 +42,6 @@
42
42
  padding-top: 4;
43
43
  padding-bottom: 0;
44
44
  justify-content: center;
45
- text-align: center;
46
45
  font-size: 12;
47
46
  color: $gray-dark;
48
47
  }
@@ -1,16 +1,16 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { Clipboard, SafeAreaView, TouchableOpacity, View } from 'react-native';
4
+ import { SafeAreaView, TouchableOpacity, View } from 'react-native';
5
5
  import { lowerCase, startsWith } from 'lodash';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
9
9
  */
10
- import { useEffect, useState } from '@wordpress/element';
11
- import { __, sprintf } from '@wordpress/i18n';
10
+ import { useState } from '@wordpress/element';
11
+ import { __ } from '@wordpress/i18n';
12
12
  import { BottomSheet, Icon } from '@wordpress/components';
13
- import { getProtocol, isURL, prependHTTP } from '@wordpress/url';
13
+ import { getProtocol, prependHTTP } from '@wordpress/url';
14
14
  import { link, cancelCircleFilled } from '@wordpress/icons';
15
15
  import { usePreferredColorSchemeStyle } from '@wordpress/compose';
16
16
 
@@ -47,20 +47,12 @@ export const createDirectEntry = ( value ) => {
47
47
  };
48
48
  };
49
49
 
50
- const getURLFromClipboard = async () => {
51
- const text = await Clipboard.getString();
52
- return !! text && isURL( text ) ? text : '';
53
- };
54
-
55
50
  export const LinkPicker = ( {
56
51
  value: initialValue,
57
52
  onLinkPicked,
58
53
  onCancel: cancel,
59
54
  } ) => {
60
- const [ { value, clipboardUrl }, setValue ] = useState( {
61
- value: initialValue,
62
- clipboardUrl: '',
63
- } );
55
+ const [ value, setValue ] = useState( initialValue );
64
56
  const directEntry = createDirectEntry( value );
65
57
 
66
58
  // the title of a direct entry is displayed as the raw input value, but if we
@@ -74,7 +66,7 @@ export const LinkPicker = ( {
74
66
  };
75
67
 
76
68
  const clear = () => {
77
- setValue( { value: '', clipboardUrl } );
69
+ setValue( '' );
78
70
  };
79
71
 
80
72
  const omniCellStyle = usePreferredColorSchemeStyle(
@@ -87,14 +79,6 @@ export const LinkPicker = ( {
87
79
  styles.iconDark
88
80
  );
89
81
 
90
- useEffect( () => {
91
- getURLFromClipboard()
92
- .then( ( url ) => setValue( { value, clipboardUrl: url } ) )
93
- .catch( () => setValue( { value, clipboardUrl: '' } ) );
94
- }, [] );
95
-
96
- // TODO: Localize the accessibility label.
97
- // TODO: Decide on if `LinkSuggestionItemCell` with `isDirectEntry` makes sense.
98
82
  return (
99
83
  <SafeAreaView style={ styles.safeArea }>
100
84
  <NavBar>
@@ -112,9 +96,7 @@ export const LinkPicker = ( {
112
96
  autoCapitalize="none"
113
97
  autoCorrect={ false }
114
98
  keyboardType="url"
115
- onChangeValue={ ( newValue ) => {
116
- setValue( { value: newValue, clipboardUrl } );
117
- } }
99
+ onChangeValue={ setValue }
118
100
  onSubmit={ onSubmit }
119
101
  /* eslint-disable-next-line jsx-a11y/no-autofocus */
120
102
  autoFocus
@@ -133,22 +115,6 @@ export const LinkPicker = ( {
133
115
  </TouchableOpacity>
134
116
  ) }
135
117
  </BottomSheet.Cell>
136
- { !! clipboardUrl && clipboardUrl !== value && (
137
- <BottomSheet.LinkSuggestionItemCell
138
- accessible
139
- accessibilityLabel={ sprintf(
140
- /* translators: Copy URL from the clipboard, https://sample.url */
141
- __( 'Copy URL from the clipboard, %s' ),
142
- clipboardUrl
143
- ) }
144
- suggestion={ {
145
- type: 'clipboard',
146
- url: clipboardUrl,
147
- isDirectEntry: true,
148
- } }
149
- onLinkPicked={ pickLink }
150
- />
151
- ) }
152
118
  { !! value && (
153
119
  <LinkPickerResults
154
120
  query={ value }
@@ -93,7 +93,6 @@ function LinkSettings( {
93
93
  const [ urlInputValue, setUrlInputValue ] = useState( '' );
94
94
  const [ labelInputValue, setLabelInputValue ] = useState( '' );
95
95
  const [ linkRelInputValue, setLinkRelInputValue ] = useState( '' );
96
- const onCloseSettingsSheetConsumed = useRef( false );
97
96
  const prevEditorSidebarOpenedRef = useRef();
98
97
 
99
98
  const { onHandleClosingBottomSheet } = useContext( BottomSheetContext );
@@ -124,10 +123,6 @@ function LinkSettings( {
124
123
 
125
124
  useEffect( () => {
126
125
  const isSettingSheetOpen = isVisible || editorSidebarOpened;
127
- if ( isSettingSheetOpen ) {
128
- onCloseSettingsSheetConsumed.current = false;
129
- }
130
-
131
126
  if ( options.url.autoFill && isSettingSheetOpen && ! url ) {
132
127
  getURLFromClipboard();
133
128
  }
@@ -179,12 +174,6 @@ function LinkSettings( {
179
174
  }, [ urlInputValue, labelInputValue, linkRelInputValue, setAttributes ] );
180
175
 
181
176
  const onCloseSettingsSheet = useCallback( () => {
182
- if ( onCloseSettingsSheetConsumed.current ) {
183
- return;
184
- }
185
-
186
- onCloseSettingsSheetConsumed.current = true;
187
-
188
177
  onSetAttributes();
189
178
 
190
179
  if ( onClose ) {
@@ -255,16 +255,6 @@ 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
-
268
258
  ## Related components
269
259
 
270
260
  - To notify a user with a message of medium importance, use `Notice`.
@@ -1,5 +1,3 @@
1
- //@ts-nocheck
2
-
3
1
  /**
4
2
  * External dependencies
5
3
  */
@@ -1,5 +1,3 @@
1
- //@ts-nocheck
2
-
3
1
  /**
4
2
  * External dependencies
5
3
  */
@@ -8,12 +6,7 @@ import classnames from 'classnames';
8
6
  /**
9
7
  * WordPress dependencies
10
8
  */
11
- import {
12
- createPortal,
13
- useEffect,
14
- useRef,
15
- forwardRef,
16
- } from '@wordpress/element';
9
+ import { createPortal, useEffect, useRef } from '@wordpress/element';
17
10
  import {
18
11
  useInstanceId,
19
12
  useFocusReturn,
@@ -37,34 +30,31 @@ import StyleProvider from '../style-provider';
37
30
  // Used to count the number of open modals.
38
31
  let openModalCount = 0;
39
32
 
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
-
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
+ } ) {
68
58
  const ref = useRef();
69
59
  const instanceId = useInstanceId( Modal );
70
60
  const headingId = title
@@ -116,7 +106,7 @@ function Modal( props, forwardedRef ) {
116
106
  return createPortal(
117
107
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
118
108
  <div
119
- ref={ useMergeRefs( [ ref, forwardedRef ] ) }
109
+ ref={ ref }
120
110
  className={ classnames(
121
111
  'components-modal__screen-overlay',
122
112
  overlayClassName
@@ -149,43 +139,38 @@ function Modal( props, forwardedRef ) {
149
139
  onKeyDown={ onKeyDown }
150
140
  >
151
141
  <div
152
- className={ classnames( 'components-modal__content', {
153
- 'hide-header': __experimentalHideHeader,
154
- } ) }
142
+ className={ 'components-modal__content' }
155
143
  role="document"
156
144
  >
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
- />
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>
186
162
  ) }
187
163
  </div>
188
- ) }
164
+ { isDismissible && (
165
+ <Button
166
+ onClick={ onRequestClose }
167
+ icon={ closeSmall }
168
+ label={
169
+ closeButtonLabel || __( 'Close dialog' )
170
+ }
171
+ />
172
+ ) }
173
+ </div>
189
174
  { children }
190
175
  </div>
191
176
  </div>
@@ -194,5 +179,3 @@ function Modal( props, forwardedRef ) {
194
179
  document.body
195
180
  );
196
181
  }
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: { disable: false },
23
+ knobs: { disabled: false },
24
24
  },
25
25
  };
26
26
 
@@ -55,10 +55,6 @@ export const _default = () => {
55
55
  'shouldCloseOnClickOutside',
56
56
  true
57
57
  );
58
- const __experimentalHideHeader = boolean(
59
- '__experimentalHideHeader',
60
- false
61
- );
62
58
 
63
59
  const iconComponent = showIcon ? <Icon icon={ wordpress } /> : null;
64
60
 
@@ -69,7 +65,6 @@ export const _default = () => {
69
65
  shouldCloseOnEsc,
70
66
  shouldCloseOnClickOutside,
71
67
  title,
72
- __experimentalHideHeader,
73
68
  };
74
69
 
75
70
  return <ModalExample { ...modalProps } />;
@@ -126,13 +126,4 @@
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
- }
138
129
  }
@@ -46,15 +46,4 @@ 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
- } );
60
49
  } );
@@ -44,6 +44,15 @@ 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).
47
56
 
48
57
  ## Navigation Props
49
58