@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
@@ -269,10 +269,10 @@ Object {
269
269
  }
270
270
 
271
271
  .emotion-10 {
272
- border: 0;
273
- margin: 0;
274
- border-bottom: 1px solid currentColor;
272
+ border-color: rgba(0, 0, 0, 0.1);
273
+ border-width: 0 0 1px 0;
275
274
  height: 0;
275
+ margin: 0;
276
276
  width: auto;
277
277
  box-sizing: border-box;
278
278
  display: block;
@@ -525,10 +525,10 @@ Object {
525
525
  }
526
526
 
527
527
  .emotion-10 {
528
- border: 0;
529
- margin: 0;
530
- border-bottom: 1px solid currentColor;
528
+ border-color: rgba(0, 0, 0, 0.1);
529
+ border-width: 0 0 1px 0;
531
530
  height: 0;
531
+ margin: 0;
532
532
  width: auto;
533
533
  box-sizing: border-box;
534
534
  display: block;
@@ -27,7 +27,7 @@ export default function CheckboxControl( {
27
27
  if ( heading ) {
28
28
  deprecated( '`heading` prop in `CheckboxControl`', {
29
29
  alternative: 'a separate element to implement a heading',
30
- since: '5.8',
30
+ plugin: 'Gutenberg',
31
31
  } );
32
32
  }
33
33
 
@@ -17,7 +17,7 @@ export default {
17
17
  title: 'Components/CheckboxControl',
18
18
  component: CheckboxControl,
19
19
  parameters: {
20
- knobs: { disable: false },
20
+ knobs: { disabled: false },
21
21
  },
22
22
  };
23
23
 
@@ -26,7 +26,8 @@ export default function ClipboardButton( {
26
26
  ...buttonProps
27
27
  } ) {
28
28
  deprecated( 'wp.components.ClipboardButton', {
29
- since: '5.8',
29
+ since: '10.3',
30
+ plugin: 'Gutenberg',
30
31
  alternative: 'wp.compose.useCopyToClipboard',
31
32
  } );
32
33
 
@@ -12,7 +12,7 @@ export default {
12
12
  title: 'Components/ColorIndicator',
13
13
  component: ColorIndicator,
14
14
  parameters: {
15
- knobs: { disable: false },
15
+ knobs: { disabled: false },
16
16
  },
17
17
  };
18
18
 
@@ -1,8 +1,11 @@
1
1
  .component-color-indicator {
2
- width: $grid-unit-50 * 0.5;
3
- height: $grid-unit-50 * 0.5;
4
- border-radius: 50%;
5
- border: $border-width solid $gray-300;
2
+ width: 25px;
3
+ height: 16px;
4
+ margin-left: 0.8rem;
5
+ border: 1px solid #dadada;
6
6
  display: inline-block;
7
- padding: 0;
7
+
8
+ & + & {
9
+ margin-left: 0.5rem;
10
+ }
8
11
  }
@@ -10,7 +10,7 @@ import classnames from 'classnames';
10
10
  /**
11
11
  * WordPress dependencies
12
12
  */
13
- import { __, sprintf, isRTL } from '@wordpress/i18n';
13
+ import { __, sprintf } from '@wordpress/i18n';
14
14
  import { useCallback, useMemo } from '@wordpress/element';
15
15
 
16
16
  /**
@@ -136,9 +136,10 @@ export default function ColorPalette( {
136
136
  __experimentalIsRenderedInSidebar = false,
137
137
  } ) {
138
138
  const clearColor = useCallback( () => onChange( undefined ), [ onChange ] );
139
- const Component = __experimentalHasMultipleOrigins
140
- ? MultiplePalettes
141
- : SinglePalette;
139
+ const Component =
140
+ __experimentalHasMultipleOrigins && colors?.length
141
+ ? MultiplePalettes
142
+ : SinglePalette;
142
143
 
143
144
  const renderCustomColorPicker = () => (
144
145
  <ColorPicker
@@ -148,23 +149,14 @@ export default function ColorPalette( {
148
149
  />
149
150
  );
150
151
 
151
- let dropdownPosition;
152
- let popoverProps;
153
- if ( __experimentalIsRenderedInSidebar ) {
154
- dropdownPosition = isRTL() ? 'bottom right' : 'bottom left';
155
- popoverProps = { __unstableForcePosition: true };
156
- }
157
-
158
152
  const colordColor = colord( value );
159
153
 
160
154
  return (
161
155
  <VStack spacing={ 3 } className={ className }>
162
156
  { ! disableCustomColors && (
163
157
  <CustomColorPickerDropdown
164
- position={ dropdownPosition }
165
158
  isRenderedInSidebar={ __experimentalIsRenderedInSidebar }
166
159
  renderContent={ renderCustomColorPicker }
167
- popoverProps={ popoverProps }
168
160
  renderToggle={ ( { isOpen, onToggle } ) => (
169
161
  <button
170
162
  className="components-color-palette__custom-color"
@@ -17,7 +17,7 @@ export default {
17
17
  title: 'Components/ColorPalette',
18
18
  component: ColorPalette,
19
19
  parameters: {
20
- knobs: { disable: false },
20
+ knobs: { disabled: false },
21
21
  },
22
22
  };
23
23
 
@@ -173,7 +173,6 @@ exports[`ColorPalette should render a dynamic toolbar of colors 1`] = `
173
173
  data-wp-component="VStack"
174
174
  isColumn={true}
175
175
  >
176
- <Noop />
177
176
  <div
178
177
  className="components-flex components-h-stack components-v-stack emotion-4 emotion-5"
179
178
  data-wp-c16t={true}
@@ -18,7 +18,6 @@ import { Flex, FlexItem } from '../flex';
18
18
  import { Tooltip } from '../ui/tooltip';
19
19
  import type { ColorType } from './types';
20
20
  import { space } from '../ui/utils/space';
21
- import { COLORS } from '../utils/colors-values';
22
21
 
23
22
  interface ColorDisplayProps {
24
23
  color: Colord;
@@ -42,7 +41,7 @@ const ValueDisplay = ( { values }: ValueDisplayProps ) => (
42
41
  { values.map( ( [ value, abbreviation ] ) => {
43
42
  return (
44
43
  <FlexItem key={ abbreviation } isBlock display="flex">
45
- <Text color={ COLORS.ui.theme }>{ abbreviation }</Text>
44
+ <Text color="blue">{ abbreviation }</Text>
46
45
  <Text>{ value }</Text>
47
46
  </FlexItem>
48
47
  );
@@ -85,7 +84,7 @@ const HexDisplay = ( { color }: DisplayProps ) => {
85
84
  const colorWithoutHash = color.toHex().slice( 1 ).toUpperCase();
86
85
  return (
87
86
  <FlexItem>
88
- <Text color={ COLORS.ui.theme }>#</Text>
87
+ <Text color="blue">#</Text>
89
88
  <Text>{ colorWithoutHash }</Text>
90
89
  </FlexItem>
91
90
  );
@@ -15,7 +15,6 @@ import { Text } from '../text';
15
15
  import { Spacer } from '../spacer';
16
16
  import { space } from '../ui/utils/space';
17
17
  import { ColorHexInputControl } from './styles';
18
- import { COLORS } from '../utils/colors-values';
19
18
 
20
19
  interface HexInputProps {
21
20
  color: Colord;
@@ -36,7 +35,7 @@ export const HexInput = ( { color, onChange, enableAlpha }: HexInputProps ) => {
36
35
  <Spacer
37
36
  as={ Text }
38
37
  marginLeft={ space( 3.5 ) }
39
- color={ COLORS.ui.theme }
38
+ color="blue"
40
39
  lineHeight={ 1 }
41
40
  >
42
41
  #
@@ -6,7 +6,6 @@ import { Text } from '../text';
6
6
  import { Spacer } from '../spacer';
7
7
  import { space } from '../ui/utils/space';
8
8
  import { RangeControl, NumberControlWrapper } from './styles';
9
- import { COLORS } from '../utils/colors-values';
10
9
 
11
10
  interface InputWithSliderProps {
12
11
  min: number;
@@ -38,7 +37,7 @@ export const InputWithSlider = ( {
38
37
  <Spacer
39
38
  as={ Text }
40
39
  paddingLeft={ space( 3.5 ) }
41
- color={ COLORS.ui.theme }
40
+ color="blue"
42
41
  lineHeight={ 1 }
43
42
  >
44
43
  { abbreviation }
@@ -20,7 +20,7 @@ export default {
20
20
  component: ColorPicker,
21
21
  title: 'Components/ColorPicker',
22
22
  parameters: {
23
- knobs: { disable: false },
23
+ knobs: { disabled: false },
24
24
  },
25
25
  };
26
26
 
@@ -21,7 +21,7 @@ These are the same as [the ones for `SelectControl`s](/packages/components/src/s
21
21
  * WordPress dependencies
22
22
  */
23
23
  import { ComboboxControl } from '@wordpress/components';
24
- import { useState } from '@wordpress/element';
24
+ import { useState } from '@wordpress/compose';
25
25
 
26
26
  const options = [
27
27
  {
@@ -51,7 +51,7 @@ function MyComboboxControl() {
51
51
  value={ fontSize }
52
52
  onChange={ setFontSize }
53
53
  options={ filteredOptions }
54
- onFilterValueChange={ ( inputValue ) =>
54
+ onInputChange={ ( inputValue ) =>
55
55
  setFilteredOptions(
56
56
  options.filter( ( option ) =>
57
57
  option.label
@@ -98,7 +98,6 @@ const GradientTypePicker = ( { gradientAST, hasGradient, onChange } ) => {
98
98
  labelPosition="top"
99
99
  onChange={ handleOnChange }
100
100
  options={ GRADIENT_OPTIONS }
101
- size="__unstable-large"
102
101
  value={ hasGradient && type }
103
102
  />
104
103
  );
@@ -111,6 +111,10 @@ $components-custom-gradient-picker__padding: $grid-unit-20; // 48px container, 1
111
111
 
112
112
  // All these styles should be made generic and changed on the inputs for all components.
113
113
  .components-custom-gradient-picker {
114
+ .components-select-control__input,
115
+ .components-input-control__input {
116
+ height: 40px !important;
117
+ }
114
118
  .components-input-control__label {
115
119
  line-height: 1;
116
120
  padding-bottom: $grid-unit-10 !important;
@@ -64,10 +64,3 @@ A callback function which receives a Date object representing a day as an argume
64
64
 
65
65
  - Type: `Function`
66
66
  - Required: No
67
-
68
- ### onMonthPreviewed
69
-
70
- A callback invoked when selecting the previous/next month in the date picker. The callback receives the new month date in the ISO format as an argument.
71
-
72
- - Type: `Function`
73
- - Required: No
@@ -11,14 +11,9 @@ import DayPickerSingleDateController from 'react-dates/lib/components/DayPickerS
11
11
  /**
12
12
  * WordPress dependencies
13
13
  */
14
- import { useEffect, useRef } from '@wordpress/element';
14
+ import { Component, createRef, useEffect, useRef } from '@wordpress/element';
15
15
  import { isRTL, _n, sprintf } from '@wordpress/i18n';
16
16
 
17
- /**
18
- * Internal dependencies
19
- */
20
- import { getMomentDate } from './utils';
21
-
22
17
  /**
23
18
  * Module Constants
24
19
  */
@@ -75,18 +70,21 @@ function DatePickerDay( { day, events = [] } ) {
75
70
  );
76
71
  }
77
72
 
78
- function DatePicker( {
79
- currentDate,
80
- onChange,
81
- events,
82
- isInvalidDate,
83
- onMonthPreviewed,
84
- } ) {
85
- const nodeRef = useRef();
86
- const onMonthPreviewedHandler = ( newMonthDate ) => {
87
- onMonthPreviewed?.( newMonthDate.toISOString() );
88
- keepFocusInside();
89
- };
73
+ class DatePicker extends Component {
74
+ constructor() {
75
+ super( ...arguments );
76
+
77
+ this.onChangeMoment = this.onChangeMoment.bind( this );
78
+ this.nodeRef = createRef();
79
+ this.onMonthPreviewedHandler = this.onMonthPreviewedHandler.bind(
80
+ this
81
+ );
82
+ }
83
+
84
+ onMonthPreviewedHandler( newMonthDate ) {
85
+ this.props.onMonthPreviewed?.( newMonthDate.toISOString() );
86
+ this.keepFocusInside();
87
+ }
90
88
 
91
89
  /*
92
90
  * Todo: We should remove this function ASAP.
@@ -94,21 +92,21 @@ function DatePicker( {
94
92
  * This focus loss closes the date picker popover.
95
93
  * Ideally we should add an upstream commit on react-dates to fix this issue.
96
94
  */
97
- const keepFocusInside = () => {
98
- if ( ! nodeRef.current ) {
95
+ keepFocusInside() {
96
+ if ( ! this.nodeRef.current ) {
99
97
  return;
100
98
  }
101
99
 
102
- const { ownerDocument } = nodeRef.current;
100
+ const { ownerDocument } = this.nodeRef.current;
103
101
  const { activeElement } = ownerDocument;
104
102
 
105
103
  // If focus was lost.
106
104
  if (
107
105
  ! activeElement ||
108
- ! nodeRef.current.contains( ownerDocument.activeElement )
106
+ ! this.nodeRef.current.contains( ownerDocument.activeElement )
109
107
  ) {
110
108
  // Retrieve the focus region div.
111
- const focusRegion = nodeRef.current.querySelector(
109
+ const focusRegion = this.nodeRef.current.querySelector(
112
110
  '.DayPicker_focusRegion'
113
111
  );
114
112
  if ( ! focusRegion ) {
@@ -117,9 +115,11 @@ function DatePicker( {
117
115
  // Keep the focus on focus region.
118
116
  focusRegion.focus();
119
117
  }
120
- };
118
+ }
119
+
120
+ onChangeMoment( newDate ) {
121
+ const { currentDate, onChange } = this.props;
121
122
 
122
- const onChangeMoment = ( newDate ) => {
123
123
  // If currentDate is null, use now as momentTime to designate hours, minutes, seconds.
124
124
  const momentDate = currentDate ? moment( currentDate ) : moment();
125
125
  const momentTime = {
@@ -131,54 +131,71 @@ function DatePicker( {
131
131
  onChange( newDate.set( momentTime ).format( TIMEZONELESS_FORMAT ) );
132
132
 
133
133
  // Keep focus on the date picker.
134
- keepFocusInside();
135
- };
134
+ this.keepFocusInside();
135
+ }
136
+
137
+ /**
138
+ * Create a Moment object from a date string. With no currentDate supplied, default to a Moment
139
+ * object representing now. If a null value is passed, return a null value.
140
+ *
141
+ * @param {?string} currentDate Date representing the currently selected date or null to signify no selection.
142
+ * @return {?moment.Moment} Moment object for selected date or null.
143
+ */
144
+ getMomentDate( currentDate ) {
145
+ if ( null === currentDate ) {
146
+ return null;
147
+ }
148
+ return currentDate ? moment( currentDate ) : moment();
149
+ }
136
150
 
137
- const getEventsPerDay = ( day ) => {
138
- if ( ! events?.length ) {
151
+ getEventsPerDay( day ) {
152
+ if ( ! this.props.events?.length ) {
139
153
  return [];
140
154
  }
141
155
 
142
- return events.filter( ( eventDay ) =>
156
+ return this.props.events.filter( ( eventDay ) =>
143
157
  day.isSame( eventDay.date, 'day' )
144
158
  );
145
- };
146
-
147
- const momentDate = getMomentDate( currentDate );
148
-
149
- return (
150
- <div className="components-datetime__date" ref={ nodeRef }>
151
- <DayPickerSingleDateController
152
- date={ momentDate }
153
- daySize={ 30 }
154
- focused
155
- hideKeyboardShortcutsPanel
156
- // This is a hack to force the calendar to update on month or year change
157
- // https://github.com/airbnb/react-dates/issues/240#issuecomment-361776665
158
- key={ `datepicker-controller-${
159
- momentDate ? momentDate.format( 'MM-YYYY' ) : 'null'
160
- }` }
161
- noBorder
162
- numberOfMonths={ 1 }
163
- onDateChange={ onChangeMoment }
164
- transitionDuration={ 0 }
165
- weekDayFormat="ddd"
166
- dayAriaLabelFormat={ ARIAL_LABEL_TIME_FORMAT }
167
- isRTL={ isRTL() }
168
- isOutsideRange={ ( date ) => {
169
- return isInvalidDate && isInvalidDate( date.toDate() );
170
- } }
171
- onPrevMonthClick={ onMonthPreviewedHandler }
172
- onNextMonthClick={ onMonthPreviewedHandler }
173
- renderDayContents={ ( day ) => (
174
- <DatePickerDay
175
- day={ day }
176
- events={ getEventsPerDay( day ) }
177
- />
178
- ) }
179
- />
180
- </div>
181
- );
159
+ }
160
+
161
+ render() {
162
+ const { currentDate, isInvalidDate } = this.props;
163
+ const momentDate = this.getMomentDate( currentDate );
164
+
165
+ return (
166
+ <div className="components-datetime__date" ref={ this.nodeRef }>
167
+ <DayPickerSingleDateController
168
+ date={ momentDate }
169
+ daySize={ 30 }
170
+ focused
171
+ hideKeyboardShortcutsPanel
172
+ // This is a hack to force the calendar to update on month or year change
173
+ // https://github.com/airbnb/react-dates/issues/240#issuecomment-361776665
174
+ key={ `datepicker-controller-${
175
+ momentDate ? momentDate.format( 'MM-YYYY' ) : 'null'
176
+ }` }
177
+ noBorder
178
+ numberOfMonths={ 1 }
179
+ onDateChange={ this.onChangeMoment }
180
+ transitionDuration={ 0 }
181
+ weekDayFormat="ddd"
182
+ dayAriaLabelFormat={ ARIAL_LABEL_TIME_FORMAT }
183
+ isRTL={ isRTL() }
184
+ isOutsideRange={ ( date ) => {
185
+ return isInvalidDate && isInvalidDate( date.toDate() );
186
+ } }
187
+ onPrevMonthClick={ this.onMonthPreviewedHandler }
188
+ onNextMonthClick={ this.onMonthPreviewedHandler }
189
+ renderDayContents={ ( day ) => (
190
+ <DatePickerDay
191
+ day={ day }
192
+ events={ this.getEventsPerDay( day ) }
193
+ />
194
+ ) }
195
+ />
196
+ </div>
197
+ );
198
+ }
182
199
  }
183
200
 
184
201
  export default DatePicker;
@@ -17,7 +17,7 @@ export default {
17
17
  title: 'Components/DateTimePicker',
18
18
  component: DateTimePicker,
19
19
  parameters: {
20
- knobs: { disable: false },
20
+ knobs: { disabled: false },
21
21
  },
22
22
  };
23
23
 
@@ -13,7 +13,7 @@ export default {
13
13
  title: 'Components/TimePicker',
14
14
  component: TimePicker,
15
15
  parameters: {
16
- knobs: { disable: false },
16
+ knobs: { disabled: false },
17
17
  },
18
18
  };
19
19
 
@@ -31,6 +31,32 @@ describe( 'DatePicker', () => {
31
31
  expect( moment.isMoment( date ) ).toBe( true );
32
32
  } );
33
33
 
34
+ describe( 'getMomentDate', () => {
35
+ it( 'should return a Moment object representing a given date string', () => {
36
+ const currentDate = '1986-10-18T23:00:00';
37
+ const wrapper = shallow( <DatePicker /> );
38
+ const momentDate = wrapper.instance().getMomentDate( currentDate );
39
+
40
+ expect( moment.isMoment( momentDate ) ).toBe( true );
41
+ expect( momentDate.isSame( moment( currentDate ) ) ).toBe( true );
42
+ } );
43
+
44
+ it( 'should return null when given a null agrument', () => {
45
+ const currentDate = null;
46
+ const wrapper = shallow( <DatePicker /> );
47
+ const momentDate = wrapper.instance().getMomentDate( currentDate );
48
+
49
+ expect( momentDate ).toBeNull();
50
+ } );
51
+
52
+ it( 'should return a Moment object representing now when given an undefined argument', () => {
53
+ const wrapper = shallow( <DatePicker /> );
54
+ const momentDate = wrapper.instance().getMomentDate();
55
+
56
+ expect( moment.isMoment( momentDate ) ).toBe( true );
57
+ } );
58
+ } );
59
+
34
60
  describe( 'onChangeMoment', () => {
35
61
  it( 'should call onChange with a formated date of the input', () => {
36
62
  const onChangeSpy = jest.fn();
@@ -43,7 +69,7 @@ describe( 'DatePicker', () => {
43
69
  );
44
70
  const newDate = moment();
45
71
 
46
- wrapper.childAt( 0 ).props().onDateChange( newDate );
72
+ wrapper.instance().onChangeMoment( newDate );
47
73
 
48
74
  expect( onChangeSpy ).toHaveBeenCalledWith(
49
75
  newDate.format( TIMEZONELESS_FORMAT )
@@ -61,7 +87,7 @@ describe( 'DatePicker', () => {
61
87
  minutes: current.minutes(),
62
88
  seconds: current.seconds(),
63
89
  } );
64
- wrapper.childAt( 0 ).props().onDateChange( newDate );
90
+ wrapper.instance().onChangeMoment( newDate );
65
91
 
66
92
  expect(
67
93
  moment( onChangeSpyArgument ).isSame(
@@ -84,7 +110,7 @@ describe( 'DatePicker', () => {
84
110
  minutes: current.minutes(),
85
111
  seconds: current.seconds(),
86
112
  } );
87
- wrapper.childAt( 0 ).props().onDateChange( newDate );
113
+ wrapper.instance().onChangeMoment( newDate );
88
114
 
89
115
  expect(
90
116
  moment( onChangeSpyArgument ).isSame(
@@ -13,7 +13,7 @@ In a block's `edit` implementation, render a `<DimensionControl />` component.
13
13
  ```jsx
14
14
  import { registerBlockType } from '@wordpress/blocks';
15
15
  import { __ } from '@wordpress/i18n';
16
- import { DimensionControl } from '@wordpress/components';
16
+ import { DimensionControl } from '@wordpress/block-editor';
17
17
 
18
18
  registerBlockType( 'my-plugin/my-block', {
19
19
  // ...
@@ -9,43 +9,15 @@ This feature is still experimental. “Experimental” means this is an early im
9
9
  ## Usage
10
10
 
11
11
  ```jsx
12
- import {
13
- __experimentalDivider as Divider,
14
- __experimentalText as Text,
15
- __experimentalVStack as VStack,
16
- } from `@wordpress/components`;
12
+ import { Divider, FormGroup, ListGroup } from '@wordpress/components/ui';
17
13
 
18
14
  function Example() {
19
15
  return (
20
- <VStack spacing={4}>
21
- <Text>Some text here</Text>
16
+ <ListGroup>
17
+ <FormGroup>...</FormGroup>
22
18
  <Divider />
23
- <Text>Some more text here</Text>
24
- </VStack>
19
+ <FormGroup>...</FormGroup>
20
+ </ListGroup>
25
21
  );
26
22
  }
27
23
  ```
28
-
29
- ## Props
30
-
31
- ### `margin`: `number`
32
-
33
- Adjusts all margins on the inline dimension.
34
-
35
- - Required: No
36
-
37
- ### `marginStart`: `number`
38
-
39
- Adjusts the inline-start margin.
40
-
41
- - Required: No
42
-
43
- ### `marginEnd`: `number`
44
-
45
- Adjusts the inline-end margin.
46
-
47
- - Required: No
48
-
49
- ### Inherited props
50
-
51
- `Divider` also inherits all of the [`Separator` props](https://reakit.io/docs/separator/).
@@ -38,18 +38,17 @@ function Divider(
38
38
  * @example
39
39
  * ```js
40
40
  * import {
41
- * __experimentalDivider as Divider,
42
- * __experimentalText as Text,
43
- * __experimentalVStack as VStack,
44
- * } from `@wordpress/components`;
41
+ * __experimentalDivider as Divider,
42
+ * __experimentalText as Text }
43
+ * from `@wordpress/components`;
45
44
  *
46
45
  * function Example() {
47
46
  * return (
48
- * <VStack spacing={4}>
49
- * <Text>Some text here</Text>
47
+ * <ListGroup>
48
+ * <FormGroup>...</FormGroup>
50
49
  * <Divider />
51
- * <Text>Some more text here</Text>
52
- * </VStack>
50
+ * <FormGroup>...</FormGroup>
51
+ * </ListGroup>
53
52
  * );
54
53
  * }
55
54
  * ```