@wordpress/components 19.2.3 → 19.4.1-next.f435e9e01b.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 (1000) hide show
  1. package/CHANGELOG.md +74 -5
  2. package/CONTRIBUTING.md +1 -1
  3. package/LICENSE.md +1 -1
  4. package/README.md +8 -4
  5. package/build/angle-picker-control/index.js +2 -0
  6. package/build/angle-picker-control/index.js.map +1 -1
  7. package/build/base-control/index.js +2 -3
  8. package/build/base-control/index.js.map +1 -1
  9. package/build/base-control/styles/base-control-styles.js +23 -13
  10. package/build/base-control/styles/base-control-styles.js.map +1 -1
  11. package/build/base-field/hook.js +1 -1
  12. package/build/base-field/hook.js.map +1 -1
  13. package/build/box-control/styles/box-control-styles.js +9 -9
  14. package/build/box-control/styles/box-control-styles.js.map +1 -1
  15. package/build/button/deprecated.js +2 -1
  16. package/build/button/deprecated.js.map +1 -1
  17. package/build/button/index.js +2 -1
  18. package/build/button/index.js.map +1 -1
  19. package/build/button/index.native.js +13 -3
  20. package/build/button/index.native.js.map +1 -1
  21. package/build/card/card/component.js +1 -1
  22. package/build/card/card/component.js.map +1 -1
  23. package/build/card/card/hook.js +1 -1
  24. package/build/card/card/hook.js.map +1 -1
  25. package/build/card/card-body/hook.js +1 -1
  26. package/build/card/card-body/hook.js.map +1 -1
  27. package/build/card/card-divider/hook.js +1 -1
  28. package/build/card/card-divider/hook.js.map +1 -1
  29. package/build/card/card-footer/hook.js +1 -1
  30. package/build/card/card-footer/hook.js.map +1 -1
  31. package/build/card/card-header/hook.js +1 -1
  32. package/build/card/card-header/hook.js.map +1 -1
  33. package/build/card/card-media/hook.js +1 -1
  34. package/build/card/card-media/hook.js.map +1 -1
  35. package/build/checkbox-control/index.js +1 -1
  36. package/build/checkbox-control/index.js.map +1 -1
  37. package/build/circular-option-picker/index.js +2 -0
  38. package/build/circular-option-picker/index.js.map +1 -1
  39. package/build/clipboard-button/index.js +1 -2
  40. package/build/clipboard-button/index.js.map +1 -1
  41. package/build/color-indicator/index.js +2 -0
  42. package/build/color-indicator/index.js.map +1 -1
  43. package/build/color-palette/index.js +2 -0
  44. package/build/color-palette/index.js.map +1 -1
  45. package/build/color-palette/index.native.js +4 -2
  46. package/build/color-palette/index.native.js.map +1 -1
  47. package/build/color-picker/color-display.js +4 -2
  48. package/build/color-picker/color-display.js.map +1 -1
  49. package/build/color-picker/color-input.js.map +1 -1
  50. package/build/color-picker/component.js +2 -5
  51. package/build/color-picker/component.js.map +1 -1
  52. package/build/color-picker/hex-input.js +3 -1
  53. package/build/color-picker/hex-input.js.map +1 -1
  54. package/build/color-picker/input-with-slider.js +3 -1
  55. package/build/color-picker/input-with-slider.js.map +1 -1
  56. package/build/color-picker/use-deprecated-props.js +2 -0
  57. package/build/color-picker/use-deprecated-props.js.map +1 -1
  58. package/build/confirm-dialog/component.js +107 -0
  59. package/build/confirm-dialog/component.js.map +1 -0
  60. package/build/confirm-dialog/index.js +16 -0
  61. package/build/confirm-dialog/index.js.map +1 -0
  62. package/build/confirm-dialog/styles.js +30 -0
  63. package/build/confirm-dialog/styles.js.map +1 -0
  64. package/build/confirm-dialog/types.js +6 -0
  65. package/build/confirm-dialog/types.js.map +1 -0
  66. package/build/custom-gradient-picker/index.js +1 -0
  67. package/build/custom-gradient-picker/index.js.map +1 -1
  68. package/build/date-time/date.js +63 -86
  69. package/build/date-time/date.js.map +1 -1
  70. package/build/date-time/time.js +1 -1
  71. package/build/date-time/time.js.map +1 -1
  72. package/build/date-time/utils.js +32 -0
  73. package/build/date-time/utils.js.map +1 -0
  74. package/build/divider/component.js +8 -7
  75. package/build/divider/component.js.map +1 -1
  76. package/build/divider/styles.js +38 -13
  77. package/build/divider/styles.js.map +1 -1
  78. package/build/drop-zone/index.js +14 -6
  79. package/build/drop-zone/index.js.map +1 -1
  80. package/build/drop-zone/provider.js +1 -0
  81. package/build/drop-zone/provider.js.map +1 -1
  82. package/build/dropdown/index.js +3 -3
  83. package/build/dropdown/index.js.map +1 -1
  84. package/build/elevation/hook.js +5 -5
  85. package/build/elevation/hook.js.map +1 -1
  86. package/build/external-link/styles/external-link-styles.js +5 -5
  87. package/build/external-link/styles/external-link-styles.js.map +1 -1
  88. package/build/flex/flex/hook.js +4 -4
  89. package/build/flex/flex/hook.js.map +1 -1
  90. package/build/flyout/styles.js +2 -2
  91. package/build/flyout/styles.js.map +1 -1
  92. package/build/focusable-iframe/index.js +1 -0
  93. package/build/focusable-iframe/index.js.map +1 -1
  94. package/build/form-token-field/suggestions-list.js +75 -81
  95. package/build/form-token-field/suggestions-list.js.map +1 -1
  96. package/build/grid/hook.js +2 -2
  97. package/build/grid/hook.js.map +1 -1
  98. package/build/heading/component.js +0 -1
  99. package/build/heading/component.js.map +1 -1
  100. package/build/higher-order/with-focus-outside/index.js +2 -0
  101. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  102. package/build/icon/index.js +0 -1
  103. package/build/icon/index.js.map +1 -1
  104. package/build/index.js +8 -0
  105. package/build/index.js.map +1 -1
  106. package/build/input-control/index.js.map +1 -1
  107. package/build/input-control/input-base.js +0 -1
  108. package/build/input-control/input-base.js.map +1 -1
  109. package/build/input-control/input-field.js.map +1 -1
  110. package/build/input-control/reducer/actions.js +0 -1
  111. package/build/input-control/reducer/actions.js.map +1 -1
  112. package/build/input-control/reducer/reducer.js.map +1 -1
  113. package/build/input-control/reducer/state.js +0 -1
  114. package/build/input-control/reducer/state.js.map +1 -1
  115. package/build/input-control/styles/input-control-styles.js +51 -37
  116. package/build/input-control/styles/input-control-styles.js.map +1 -1
  117. package/build/item-group/item/component.js +0 -1
  118. package/build/item-group/item/component.js.map +1 -1
  119. package/build/item-group/item/hook.js +1 -2
  120. package/build/item-group/item/hook.js.map +1 -1
  121. package/build/item-group/item-group/component.js +0 -1
  122. package/build/item-group/item-group/component.js.map +1 -1
  123. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +3 -1
  124. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  125. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -12
  126. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  127. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +23 -5
  128. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  129. package/build/mobile/bottom-sheet/cell.native.js +3 -5
  130. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  131. package/build/mobile/bottom-sheet/index.native.js +16 -16
  132. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  133. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +10 -3
  134. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  135. package/build/mobile/bottom-sheet/range-text-input.native.js +2 -3
  136. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  137. package/build/mobile/color-settings/index.native.js +6 -2
  138. package/build/mobile/color-settings/index.native.js.map +1 -1
  139. package/build/mobile/color-settings/palette.screen.native.js +12 -6
  140. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  141. package/build/mobile/color-settings/utils.native.js +9 -3
  142. package/build/mobile/color-settings/utils.native.js.map +1 -1
  143. package/build/mobile/global-styles-context/utils.native.js +1 -1
  144. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  145. package/build/mobile/gridicons/index.native.js +3 -1
  146. package/build/mobile/gridicons/index.native.js.map +1 -1
  147. package/build/mobile/keyboard-avoiding-view/index.ios.js +6 -8
  148. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  149. package/build/mobile/link-picker/index.native.js +47 -4
  150. package/build/mobile/link-picker/index.native.js.map +1 -1
  151. package/build/mobile/link-picker/link-picker-screen.native.js +18 -5
  152. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  153. package/build/mobile/link-settings/index.native.js +13 -1
  154. package/build/mobile/link-settings/index.native.js.map +1 -1
  155. package/build/mobile/readable-content-view/index.native.js +2 -2
  156. package/build/mobile/readable-content-view/index.native.js.map +1 -1
  157. package/build/mobile/utils/use-is-floating-keyboard.native.js +2 -2
  158. package/build/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
  159. package/build/mobile/utils/use-unit-converter-to-mobile.native.js +2 -2
  160. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  161. package/build/modal/aria-helper.js +2 -0
  162. package/build/modal/aria-helper.js.map +1 -1
  163. package/build/modal/index.js +18 -20
  164. package/build/modal/index.js.map +1 -1
  165. package/build/navigator/context.js +5 -1
  166. package/build/navigator/context.js.map +1 -1
  167. package/build/navigator/navigator-provider/component.js +42 -22
  168. package/build/navigator/navigator-provider/component.js.map +1 -1
  169. package/build/navigator/navigator-screen/component.js +57 -29
  170. package/build/navigator/navigator-screen/component.js.map +1 -1
  171. package/build/navigator/use-navigator.js +8 -8
  172. package/build/navigator/use-navigator.js.map +1 -1
  173. package/build/notice/index.native.js +2 -2
  174. package/build/notice/index.native.js.map +1 -1
  175. package/build/palette-edit/index.js +8 -3
  176. package/build/palette-edit/index.js.map +1 -1
  177. package/build/palette-edit/styles.js +11 -13
  178. package/build/palette-edit/styles.js.map +1 -1
  179. package/build/placeholder/index.js +4 -4
  180. package/build/placeholder/index.js.map +1 -1
  181. package/build/range-control/styles/range-control-styles.js +29 -29
  182. package/build/range-control/styles/range-control-styles.js.map +1 -1
  183. package/build/resizable-box/index.js.map +1 -1
  184. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  185. package/build/resizable-box/resize-tooltip/label.js +0 -1
  186. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  187. package/build/sandbox/index.native.js +5 -5
  188. package/build/sandbox/index.native.js.map +1 -1
  189. package/build/scrollable/hook.js +1 -1
  190. package/build/scrollable/hook.js.map +1 -1
  191. package/build/select-control/styles/select-control-styles.js +33 -9
  192. package/build/select-control/styles/select-control-styles.js.map +1 -1
  193. package/build/slot-fill/bubbles-virtually/fill.js +11 -2
  194. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  195. package/build/spacer/component.js +0 -1
  196. package/build/spacer/component.js.map +1 -1
  197. package/build/spinner/index.js +44 -5
  198. package/build/spinner/index.js.map +1 -1
  199. package/build/spinner/index.native.js +4 -2
  200. package/build/spinner/index.native.js.map +1 -1
  201. package/build/spinner/styles.js +56 -0
  202. package/build/spinner/styles.js.map +1 -0
  203. package/build/style-provider/index.js +2 -0
  204. package/build/style-provider/index.js.map +1 -1
  205. package/build/surface/hook.js +1 -1
  206. package/build/surface/hook.js.map +1 -1
  207. package/build/text/get-line-height.js +0 -1
  208. package/build/text/get-line-height.js.map +1 -1
  209. package/build/text/hook.js +5 -5
  210. package/build/text/hook.js.map +1 -1
  211. package/build/tip/index.js +4 -8
  212. package/build/tip/index.js.map +1 -1
  213. package/build/toggle-group-control/toggle-group-control/component.js +9 -14
  214. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  215. package/build/toggle-group-control/toggle-group-control/styles.js +3 -14
  216. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  217. package/build/toggle-group-control/toggle-group-control-option/component.js +0 -1
  218. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  219. package/build/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  220. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  221. package/build/tools-panel/styles.js +12 -10
  222. package/build/tools-panel/styles.js.map +1 -1
  223. package/build/tools-panel/tools-panel/component.js +6 -9
  224. package/build/tools-panel/tools-panel/component.js.map +1 -1
  225. package/build/tools-panel/tools-panel/hook.js +51 -44
  226. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  227. package/build/tools-panel/tools-panel-header/component.js +0 -1
  228. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  229. package/build/tools-panel/tools-panel-header/hook.js +3 -3
  230. package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
  231. package/build/tools-panel/tools-panel-item/component.js +0 -1
  232. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  233. package/build/tools-panel/tools-panel-item/hook.js +9 -3
  234. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  235. package/build/tree-grid/index.js +13 -6
  236. package/build/tree-grid/index.js.map +1 -1
  237. package/build/truncate/hook.js +2 -2
  238. package/build/truncate/hook.js.map +1 -1
  239. package/build/ui/shortcut/component.js +0 -1
  240. package/build/ui/shortcut/component.js.map +1 -1
  241. package/build/ui/utils/font-size.js +0 -1
  242. package/build/ui/utils/font-size.js.map +1 -1
  243. package/build/ui/utils/get-valid-children.js +0 -1
  244. package/build/ui/utils/get-valid-children.js.map +1 -1
  245. package/build/unit-control/index.js +0 -1
  246. package/build/unit-control/index.js.map +1 -1
  247. package/build/unit-control/styles/unit-control-styles.js +23 -41
  248. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  249. package/build/unit-control/unit-select-control.js.map +1 -1
  250. package/build/utils/colors-values.js +6 -3
  251. package/build/utils/colors-values.js.map +1 -1
  252. package/build/utils/config-values.js +1 -4
  253. package/build/utils/config-values.js.map +1 -1
  254. package/build/utils/hooks/use-combined-ref.js.map +1 -1
  255. package/build/utils/hooks/use-latest-ref.js +0 -1
  256. package/build/utils/hooks/use-latest-ref.js.map +1 -1
  257. package/build/z-stack/component.js +0 -1
  258. package/build/z-stack/component.js.map +1 -1
  259. package/build/z-stack/styles.js +10 -8
  260. package/build/z-stack/styles.js.map +1 -1
  261. package/build-module/angle-picker-control/index.js +2 -0
  262. package/build-module/angle-picker-control/index.js.map +1 -1
  263. package/build-module/base-control/index.js +3 -4
  264. package/build-module/base-control/index.js.map +1 -1
  265. package/build-module/base-control/styles/base-control-styles.js +20 -12
  266. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  267. package/build-module/base-field/hook.js +1 -1
  268. package/build-module/base-field/hook.js.map +1 -1
  269. package/build-module/box-control/styles/box-control-styles.js +9 -9
  270. package/build-module/box-control/styles/box-control-styles.js.map +1 -1
  271. package/build-module/button/deprecated.js +2 -1
  272. package/build-module/button/deprecated.js.map +1 -1
  273. package/build-module/button/index.js +2 -1
  274. package/build-module/button/index.js.map +1 -1
  275. package/build-module/button/index.native.js +13 -3
  276. package/build-module/button/index.native.js.map +1 -1
  277. package/build-module/card/card/component.js +1 -1
  278. package/build-module/card/card/component.js.map +1 -1
  279. package/build-module/card/card/hook.js +1 -1
  280. package/build-module/card/card/hook.js.map +1 -1
  281. package/build-module/card/card-body/hook.js +1 -1
  282. package/build-module/card/card-body/hook.js.map +1 -1
  283. package/build-module/card/card-divider/hook.js +1 -1
  284. package/build-module/card/card-divider/hook.js.map +1 -1
  285. package/build-module/card/card-footer/hook.js +1 -1
  286. package/build-module/card/card-footer/hook.js.map +1 -1
  287. package/build-module/card/card-header/hook.js +1 -1
  288. package/build-module/card/card-header/hook.js.map +1 -1
  289. package/build-module/card/card-media/hook.js +1 -1
  290. package/build-module/card/card-media/hook.js.map +1 -1
  291. package/build-module/checkbox-control/index.js +1 -1
  292. package/build-module/checkbox-control/index.js.map +1 -1
  293. package/build-module/circular-option-picker/index.js +1 -0
  294. package/build-module/circular-option-picker/index.js.map +1 -1
  295. package/build-module/clipboard-button/index.js +1 -2
  296. package/build-module/clipboard-button/index.js.map +1 -1
  297. package/build-module/color-indicator/index.js +1 -0
  298. package/build-module/color-indicator/index.js.map +1 -1
  299. package/build-module/color-palette/index.js +1 -0
  300. package/build-module/color-palette/index.js.map +1 -1
  301. package/build-module/color-palette/index.native.js +4 -2
  302. package/build-module/color-palette/index.native.js.map +1 -1
  303. package/build-module/color-picker/color-display.js +3 -2
  304. package/build-module/color-picker/color-display.js.map +1 -1
  305. package/build-module/color-picker/color-input.js.map +1 -1
  306. package/build-module/color-picker/component.js +2 -4
  307. package/build-module/color-picker/component.js.map +1 -1
  308. package/build-module/color-picker/hex-input.js +2 -1
  309. package/build-module/color-picker/hex-input.js.map +1 -1
  310. package/build-module/color-picker/input-with-slider.js +2 -1
  311. package/build-module/color-picker/input-with-slider.js.map +1 -1
  312. package/build-module/color-picker/use-deprecated-props.js +3 -2
  313. package/build-module/color-picker/use-deprecated-props.js.map +1 -1
  314. package/build-module/confirm-dialog/component.js +87 -0
  315. package/build-module/confirm-dialog/component.js.map +1 -0
  316. package/build-module/confirm-dialog/index.js +6 -0
  317. package/build-module/confirm-dialog/index.js.map +1 -0
  318. package/build-module/confirm-dialog/styles.js +25 -0
  319. package/build-module/confirm-dialog/styles.js.map +1 -0
  320. package/build-module/confirm-dialog/types.js +2 -0
  321. package/build-module/confirm-dialog/types.js.map +1 -0
  322. package/build-module/custom-gradient-picker/index.js +1 -0
  323. package/build-module/custom-gradient-picker/index.js.map +1 -1
  324. package/build-module/date-time/date.js +63 -87
  325. package/build-module/date-time/date.js.map +1 -1
  326. package/build-module/date-time/time.js +1 -1
  327. package/build-module/date-time/time.js.map +1 -1
  328. package/build-module/date-time/utils.js +20 -0
  329. package/build-module/date-time/utils.js.map +1 -0
  330. package/build-module/divider/component.js +9 -8
  331. package/build-module/divider/component.js.map +1 -1
  332. package/build-module/divider/styles.js +37 -13
  333. package/build-module/divider/styles.js.map +1 -1
  334. package/build-module/drop-zone/index.js +14 -6
  335. package/build-module/drop-zone/index.js.map +1 -1
  336. package/build-module/drop-zone/provider.js +1 -0
  337. package/build-module/drop-zone/provider.js.map +1 -1
  338. package/build-module/dropdown/index.js +3 -3
  339. package/build-module/dropdown/index.js.map +1 -1
  340. package/build-module/elevation/hook.js +5 -5
  341. package/build-module/elevation/hook.js.map +1 -1
  342. package/build-module/external-link/styles/external-link-styles.js +5 -5
  343. package/build-module/external-link/styles/external-link-styles.js.map +1 -1
  344. package/build-module/flex/flex/hook.js +4 -4
  345. package/build-module/flex/flex/hook.js.map +1 -1
  346. package/build-module/flyout/styles.js +2 -2
  347. package/build-module/flyout/styles.js.map +1 -1
  348. package/build-module/focusable-iframe/index.js +1 -0
  349. package/build-module/focusable-iframe/index.js.map +1 -1
  350. package/build-module/form-token-field/suggestions-list.js +73 -79
  351. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  352. package/build-module/grid/hook.js +2 -2
  353. package/build-module/grid/hook.js.map +1 -1
  354. package/build-module/heading/component.js +0 -1
  355. package/build-module/heading/component.js.map +1 -1
  356. package/build-module/higher-order/with-focus-outside/index.js +1 -0
  357. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  358. package/build-module/icon/index.js +0 -1
  359. package/build-module/icon/index.js.map +1 -1
  360. package/build-module/index.js +1 -0
  361. package/build-module/index.js.map +1 -1
  362. package/build-module/input-control/index.js +1 -1
  363. package/build-module/input-control/index.js.map +1 -1
  364. package/build-module/input-control/input-base.js +0 -1
  365. package/build-module/input-control/input-base.js.map +1 -1
  366. package/build-module/input-control/input-field.js +1 -1
  367. package/build-module/input-control/input-field.js.map +1 -1
  368. package/build-module/input-control/reducer/actions.js +0 -1
  369. package/build-module/input-control/reducer/actions.js.map +1 -1
  370. package/build-module/input-control/reducer/reducer.js +1 -1
  371. package/build-module/input-control/reducer/reducer.js.map +1 -1
  372. package/build-module/input-control/reducer/state.js +0 -1
  373. package/build-module/input-control/reducer/state.js.map +1 -1
  374. package/build-module/input-control/styles/input-control-styles.js +51 -37
  375. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  376. package/build-module/item-group/item/component.js +0 -1
  377. package/build-module/item-group/item/component.js.map +1 -1
  378. package/build-module/item-group/item/hook.js +1 -2
  379. package/build-module/item-group/item/hook.js.map +1 -1
  380. package/build-module/item-group/item-group/component.js +0 -1
  381. package/build-module/item-group/item-group/component.js.map +1 -1
  382. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +3 -1
  383. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  384. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +5 -13
  385. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  386. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +23 -5
  387. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  388. package/build-module/mobile/bottom-sheet/cell.native.js +3 -3
  389. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  390. package/build-module/mobile/bottom-sheet/index.native.js +16 -13
  391. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  392. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +10 -4
  393. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  394. package/build-module/mobile/bottom-sheet/range-text-input.native.js +2 -2
  395. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  396. package/build-module/mobile/color-settings/index.native.js +6 -2
  397. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  398. package/build-module/mobile/color-settings/palette.screen.native.js +12 -6
  399. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  400. package/build-module/mobile/color-settings/utils.native.js +7 -3
  401. package/build-module/mobile/color-settings/utils.native.js.map +1 -1
  402. package/build-module/mobile/global-styles-context/utils.native.js +1 -1
  403. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  404. package/build-module/mobile/gridicons/index.native.js +1 -0
  405. package/build-module/mobile/gridicons/index.native.js.map +1 -1
  406. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +6 -6
  407. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  408. package/build-module/mobile/link-picker/index.native.js +50 -7
  409. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  410. package/build-module/mobile/link-picker/link-picker-screen.native.js +13 -5
  411. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  412. package/build-module/mobile/link-settings/index.native.js +12 -1
  413. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  414. package/build-module/mobile/readable-content-view/index.native.js +2 -2
  415. package/build-module/mobile/readable-content-view/index.native.js.map +1 -1
  416. package/build-module/mobile/utils/use-is-floating-keyboard.native.js +2 -2
  417. package/build-module/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
  418. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +2 -2
  419. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  420. package/build-module/modal/aria-helper.js +2 -0
  421. package/build-module/modal/aria-helper.js.map +1 -1
  422. package/build-module/modal/index.js +16 -19
  423. package/build-module/modal/index.js.map +1 -1
  424. package/build-module/navigator/context.js +5 -1
  425. package/build-module/navigator/context.js.map +1 -1
  426. package/build-module/navigator/navigator-provider/component.js +43 -24
  427. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  428. package/build-module/navigator/navigator-screen/component.js +57 -32
  429. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  430. package/build-module/navigator/use-navigator.js +8 -8
  431. package/build-module/navigator/use-navigator.js.map +1 -1
  432. package/build-module/notice/index.native.js +2 -2
  433. package/build-module/notice/index.native.js.map +1 -1
  434. package/build-module/palette-edit/index.js +8 -3
  435. package/build-module/palette-edit/index.js.map +1 -1
  436. package/build-module/palette-edit/styles.js +11 -12
  437. package/build-module/palette-edit/styles.js.map +1 -1
  438. package/build-module/placeholder/index.js +4 -4
  439. package/build-module/placeholder/index.js.map +1 -1
  440. package/build-module/range-control/styles/range-control-styles.js +29 -29
  441. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  442. package/build-module/resizable-box/index.js.map +1 -1
  443. package/build-module/resizable-box/resize-tooltip/index.js +3 -3
  444. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  445. package/build-module/resizable-box/resize-tooltip/label.js +0 -1
  446. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  447. package/build-module/sandbox/index.native.js +5 -5
  448. package/build-module/sandbox/index.native.js.map +1 -1
  449. package/build-module/scrollable/hook.js +1 -1
  450. package/build-module/scrollable/hook.js.map +1 -1
  451. package/build-module/select-control/styles/select-control-styles.js +33 -9
  452. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  453. package/build-module/slot-fill/bubbles-virtually/fill.js +11 -2
  454. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  455. package/build-module/spacer/component.js +0 -1
  456. package/build-module/spacer/component.js.map +1 -1
  457. package/build-module/spinner/index.js +40 -5
  458. package/build-module/spinner/index.js.map +1 -1
  459. package/build-module/spinner/index.native.js +4 -2
  460. package/build-module/spinner/index.native.js.map +1 -1
  461. package/build-module/spinner/styles.js +49 -0
  462. package/build-module/spinner/styles.js.map +1 -0
  463. package/build-module/style-provider/index.js +1 -0
  464. package/build-module/style-provider/index.js.map +1 -1
  465. package/build-module/surface/hook.js +1 -1
  466. package/build-module/surface/hook.js.map +1 -1
  467. package/build-module/text/get-line-height.js +0 -1
  468. package/build-module/text/get-line-height.js.map +1 -1
  469. package/build-module/text/hook.js +5 -5
  470. package/build-module/text/hook.js.map +1 -1
  471. package/build-module/tip/index.js +4 -8
  472. package/build-module/tip/index.js.map +1 -1
  473. package/build-module/toggle-group-control/toggle-group-control/component.js +10 -13
  474. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  475. package/build-module/toggle-group-control/toggle-group-control/styles.js +3 -11
  476. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  477. package/build-module/toggle-group-control/toggle-group-control-option/component.js +0 -1
  478. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  479. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  480. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  481. package/build-module/tools-panel/styles.js +12 -11
  482. package/build-module/tools-panel/styles.js.map +1 -1
  483. package/build-module/tools-panel/tools-panel/component.js +5 -9
  484. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  485. package/build-module/tools-panel/tools-panel/hook.js +52 -45
  486. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  487. package/build-module/tools-panel/tools-panel-header/component.js +0 -1
  488. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  489. package/build-module/tools-panel/tools-panel-header/hook.js +3 -3
  490. package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
  491. package/build-module/tools-panel/tools-panel-item/component.js +0 -1
  492. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  493. package/build-module/tools-panel/tools-panel-item/hook.js +9 -3
  494. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  495. package/build-module/tree-grid/index.js +12 -6
  496. package/build-module/tree-grid/index.js.map +1 -1
  497. package/build-module/truncate/hook.js +2 -2
  498. package/build-module/truncate/hook.js.map +1 -1
  499. package/build-module/ui/shortcut/component.js +0 -1
  500. package/build-module/ui/shortcut/component.js.map +1 -1
  501. package/build-module/ui/utils/font-size.js +0 -1
  502. package/build-module/ui/utils/font-size.js.map +1 -1
  503. package/build-module/ui/utils/get-valid-children.js +0 -1
  504. package/build-module/ui/utils/get-valid-children.js.map +1 -1
  505. package/build-module/unit-control/index.js +0 -1
  506. package/build-module/unit-control/index.js.map +1 -1
  507. package/build-module/unit-control/styles/unit-control-styles.js +23 -41
  508. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  509. package/build-module/unit-control/unit-select-control.js +1 -2
  510. package/build-module/unit-control/unit-select-control.js.map +1 -1
  511. package/build-module/utils/colors-values.js +6 -3
  512. package/build-module/utils/colors-values.js.map +1 -1
  513. package/build-module/utils/config-values.js +1 -4
  514. package/build-module/utils/config-values.js.map +1 -1
  515. package/build-module/utils/hooks/use-combined-ref.js +0 -1
  516. package/build-module/utils/hooks/use-combined-ref.js.map +1 -1
  517. package/build-module/utils/hooks/use-latest-ref.js +0 -1
  518. package/build-module/utils/hooks/use-latest-ref.js.map +1 -1
  519. package/build-module/z-stack/component.js +0 -1
  520. package/build-module/z-stack/component.js.map +1 -1
  521. package/build-module/z-stack/styles.js +13 -8
  522. package/build-module/z-stack/styles.js.map +1 -1
  523. package/build-style/style-rtl.css +36 -15
  524. package/build-style/style.css +36 -15
  525. package/build-types/base-control/index.d.ts.map +1 -1
  526. package/build-types/base-control/styles/base-control-styles.d.ts +4 -0
  527. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  528. package/build-types/base-field/hook.d.ts +16 -16
  529. package/build-types/button/index.d.ts.map +1 -1
  530. package/build-types/card/card/hook.d.ts +16 -16
  531. package/build-types/card/card-body/hook.d.ts +16 -16
  532. package/build-types/card/card-divider/hook.d.ts +18 -18
  533. package/build-types/card/card-footer/hook.d.ts +17 -17
  534. package/build-types/card/card-header/hook.d.ts +16 -16
  535. package/build-types/card/card-media/hook.d.ts +16 -16
  536. package/build-types/card/types.d.ts.map +1 -1
  537. package/build-types/color-picker/color-display.d.ts +1 -0
  538. package/build-types/color-picker/color-display.d.ts.map +1 -1
  539. package/build-types/color-picker/color-input.d.ts +1 -0
  540. package/build-types/color-picker/color-input.d.ts.map +1 -1
  541. package/build-types/color-picker/hex-input.d.ts +1 -0
  542. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  543. package/build-types/color-picker/hsl-input.d.ts +1 -0
  544. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  545. package/build-types/color-picker/input-with-slider.d.ts +1 -0
  546. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  547. package/build-types/color-picker/legacy-adapter.d.ts +1 -0
  548. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  549. package/build-types/color-picker/picker.d.ts +1 -0
  550. package/build-types/color-picker/picker.d.ts.map +1 -1
  551. package/build-types/color-picker/rgb-input.d.ts +1 -0
  552. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  553. package/build-types/color-picker/styles.d.ts +1 -1
  554. package/build-types/confirm-dialog/component.d.ts +4 -4
  555. package/build-types/divider/component.d.ts +8 -7
  556. package/build-types/divider/component.d.ts.map +1 -1
  557. package/build-types/divider/styles.d.ts +2 -2
  558. package/build-types/divider/styles.d.ts.map +1 -1
  559. package/build-types/divider/types.d.ts +5 -5
  560. package/build-types/divider/types.d.ts.map +1 -1
  561. package/build-types/dropdown/index.d.ts +1 -13
  562. package/build-types/dropdown/index.d.ts.map +1 -1
  563. package/build-types/elevation/hook.d.ts +15 -15
  564. package/build-types/elevation/hook.d.ts.map +1 -1
  565. package/build-types/elevation/types.d.ts.map +1 -1
  566. package/build-types/flex/flex/hook.d.ts +16 -16
  567. package/build-types/flex/flex/hook.d.ts.map +1 -1
  568. package/build-types/flex/flex-block/hook.d.ts +16 -16
  569. package/build-types/flex/flex-item/hook.d.ts +16 -16
  570. package/build-types/flex/types.d.ts.map +1 -1
  571. package/build-types/flyout/flyout/hook.d.ts +17 -17
  572. package/build-types/flyout/styles.d.ts +7 -9
  573. package/build-types/flyout/styles.d.ts.map +1 -1
  574. package/build-types/flyout/types.d.ts.map +1 -1
  575. package/build-types/grid/hook.d.ts +16 -16
  576. package/build-types/grid/hook.d.ts.map +1 -1
  577. package/build-types/grid/types.d.ts.map +1 -1
  578. package/build-types/h-stack/hook.d.ts +17 -17
  579. package/build-types/h-stack/hook.d.ts.map +1 -1
  580. package/build-types/h-stack/types.d.ts.map +1 -1
  581. package/build-types/heading/component.d.ts.map +1 -1
  582. package/build-types/heading/hook.d.ts +16 -16
  583. package/build-types/icon/index.d.ts.map +1 -1
  584. package/build-types/input-control/index.d.ts +1 -1
  585. package/build-types/input-control/index.d.ts.map +1 -1
  586. package/build-types/input-control/input-base.d.ts.map +1 -1
  587. package/build-types/input-control/input-field.d.ts +1 -1
  588. package/build-types/input-control/input-field.d.ts.map +1 -1
  589. package/build-types/input-control/reducer/actions.d.ts.map +1 -1
  590. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  591. package/build-types/input-control/reducer/state.d.ts.map +1 -1
  592. package/build-types/input-control/styles/input-control-styles.d.ts +1 -2
  593. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  594. package/build-types/input-control/types.d.ts +2 -1
  595. package/build-types/input-control/types.d.ts.map +1 -1
  596. package/build-types/item-group/item/component.d.ts.map +1 -1
  597. package/build-types/item-group/item/hook.d.ts +16 -16
  598. package/build-types/item-group/item/hook.d.ts.map +1 -1
  599. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  600. package/build-types/item-group/item-group/hook.d.ts +16 -16
  601. package/build-types/navigator/context.d.ts.map +1 -1
  602. package/build-types/navigator/navigator-provider/component.d.ts +16 -17
  603. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  604. package/build-types/navigator/navigator-screen/component.d.ts +16 -16
  605. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  606. package/build-types/navigator/types.d.ts +10 -9
  607. package/build-types/navigator/types.d.ts.map +1 -1
  608. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  609. package/build-types/resizable-box/index.d.ts +1 -1
  610. package/build-types/resizable-box/index.d.ts.map +1 -1
  611. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  612. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  613. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  614. package/build-types/scrollable/hook.d.ts +16 -16
  615. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  616. package/build-types/select-control/types.d.ts +1 -1
  617. package/build-types/select-control/types.d.ts.map +1 -1
  618. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  619. package/build-types/spacer/component.d.ts.map +1 -1
  620. package/build-types/spacer/hook.d.ts +16 -16
  621. package/build-types/spacer/types.d.ts.map +1 -1
  622. package/build-types/spinner/index.d.ts +18 -1
  623. package/build-types/spinner/index.d.ts.map +1 -1
  624. package/build-types/surface/hook.d.ts +16 -16
  625. package/build-types/surface/hook.d.ts.map +1 -1
  626. package/build-types/text/get-line-height.d.ts.map +1 -1
  627. package/build-types/text/hook.d.ts +16 -16
  628. package/build-types/text/hook.d.ts.map +1 -1
  629. package/build-types/text/types.d.ts.map +1 -1
  630. package/build-types/tip/index.d.ts.map +1 -1
  631. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  632. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +0 -5
  633. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  634. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  635. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  636. package/build-types/toggle-group-control/types.d.ts +1 -7
  637. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  638. package/build-types/tools-panel/styles.d.ts.map +1 -1
  639. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  640. package/build-types/tools-panel/tools-panel/hook.d.ts +24 -20
  641. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  642. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  643. package/build-types/tools-panel/tools-panel-header/hook.d.ts +16 -16
  644. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  645. package/build-types/tools-panel/tools-panel-item/hook.d.ts +16 -16
  646. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  647. package/build-types/tools-panel/types.d.ts +14 -0
  648. package/build-types/tools-panel/types.d.ts.map +1 -1
  649. package/build-types/truncate/hook.d.ts +16 -16
  650. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  651. package/build-types/ui/control-group/hook.d.ts +18 -18
  652. package/build-types/ui/control-group/types.d.ts.map +1 -1
  653. package/build-types/ui/control-label/hook.d.ts +16 -16
  654. package/build-types/ui/form-group/form-group.d.ts +4 -4
  655. package/build-types/ui/form-group/types.d.ts.map +1 -1
  656. package/build-types/ui/form-group/use-form-group.d.ts +55 -55
  657. package/build-types/ui/shortcut/component.d.ts.map +1 -1
  658. package/build-types/ui/tooltip/types.d.ts.map +1 -1
  659. package/build-types/ui/utils/font-size.d.ts.map +1 -1
  660. package/build-types/ui/utils/get-valid-children.d.ts.map +1 -1
  661. package/build-types/unit-control/index.d.ts +3 -2
  662. package/build-types/unit-control/index.d.ts.map +1 -1
  663. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -0
  664. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  665. package/build-types/unit-control/types.d.ts +4 -3
  666. package/build-types/unit-control/types.d.ts.map +1 -1
  667. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  668. package/build-types/utils/colors-values.d.ts +1 -0
  669. package/build-types/utils/colors-values.d.ts.map +1 -1
  670. package/build-types/utils/config-values.d.ts +1 -5
  671. package/build-types/utils/config-values.d.ts.map +1 -1
  672. package/build-types/utils/hooks/use-combined-ref.d.ts.map +1 -1
  673. package/build-types/utils/hooks/use-latest-ref.d.ts.map +1 -1
  674. package/build-types/v-stack/hook.d.ts +16 -16
  675. package/build-types/v-stack/types.d.ts.map +1 -1
  676. package/build-types/z-stack/component.d.ts +1 -1
  677. package/build-types/z-stack/component.d.ts.map +1 -1
  678. package/build-types/z-stack/styles.d.ts.map +1 -1
  679. package/package.json +23 -22
  680. package/src/alignment-matrix-control/stories/index.js +1 -1
  681. package/src/angle-picker-control/index.js +2 -0
  682. package/src/base-control/index.js +11 -2
  683. package/src/base-control/stories/index.js +1 -1
  684. package/src/base-control/styles/base-control-styles.js +10 -1
  685. package/src/base-field/hook.js +1 -1
  686. package/src/box-control/styles/box-control-styles.js +1 -1
  687. package/src/button/deprecated.js +1 -0
  688. package/src/button/index.js +1 -0
  689. package/src/button/index.native.js +15 -1
  690. package/src/button/stories/index.js +1 -1
  691. package/src/button/style.scss +14 -0
  692. package/src/card/card/README.md +3 -3
  693. package/src/card/card/component.js +1 -1
  694. package/src/card/card/hook.js +1 -1
  695. package/src/card/card-body/hook.js +1 -1
  696. package/src/card/card-divider/hook.js +1 -1
  697. package/src/card/card-footer/hook.js +1 -1
  698. package/src/card/card-header/hook.js +1 -1
  699. package/src/card/card-media/hook.js +1 -1
  700. package/src/card/stories/index.js +1 -1
  701. package/src/card/test/__snapshots__/index.js.snap +6 -6
  702. package/src/card/types.ts +0 -1
  703. package/src/checkbox-control/index.js +1 -1
  704. package/src/checkbox-control/stories/index.js +1 -1
  705. package/src/circular-option-picker/index.js +1 -0
  706. package/src/clipboard-button/index.js +1 -2
  707. package/src/color-indicator/README.md +28 -0
  708. package/src/color-indicator/index.js +2 -0
  709. package/src/color-indicator/stories/index.js +1 -1
  710. package/src/color-indicator/style.scss +5 -8
  711. package/src/color-palette/index.js +1 -0
  712. package/src/color-palette/index.native.js +2 -0
  713. package/src/color-palette/stories/index.js +1 -1
  714. package/src/color-palette/test/__snapshots__/index.js.snap +1 -1
  715. package/src/color-picker/README.md +1 -1
  716. package/src/color-picker/color-display.tsx +4 -3
  717. package/src/color-picker/color-input.tsx +1 -1
  718. package/src/color-picker/component.tsx +3 -4
  719. package/src/color-picker/hex-input.tsx +2 -1
  720. package/src/color-picker/input-with-slider.tsx +2 -1
  721. package/src/color-picker/stories/index.js +1 -1
  722. package/src/color-picker/use-deprecated-props.ts +2 -1
  723. package/src/combobox-control/README.md +2 -2
  724. package/src/combobox-control/stories/index.js +6 -2
  725. package/src/combobox-control/style.scss +2 -2
  726. package/src/confirm-dialog/README.md +128 -0
  727. package/src/confirm-dialog/component.tsx +117 -0
  728. package/src/confirm-dialog/index.tsx +6 -0
  729. package/src/confirm-dialog/stories/index.js +123 -0
  730. package/src/confirm-dialog/styles.ts +18 -0
  731. package/src/confirm-dialog/test/index.js +302 -0
  732. package/src/confirm-dialog/types.ts +25 -0
  733. package/src/custom-gradient-picker/index.js +1 -0
  734. package/src/custom-gradient-picker/style.scss +0 -5
  735. package/src/custom-select-control/stories/index.js +27 -0
  736. package/src/date-time/README.md +9 -2
  737. package/src/date-time/date.js +67 -84
  738. package/src/date-time/stories/index.js +1 -1
  739. package/src/date-time/stories/time.js +1 -1
  740. package/src/date-time/test/date.js +3 -29
  741. package/src/date-time/test/time.js +2 -2
  742. package/src/date-time/test/utils.js +32 -0
  743. package/src/date-time/time.js +2 -2
  744. package/src/date-time/utils.js +18 -0
  745. package/src/dimension-control/README.md +3 -1
  746. package/src/divider/README.md +33 -5
  747. package/src/divider/component.tsx +8 -8
  748. package/src/divider/stories/index.js +43 -17
  749. package/src/divider/styles.ts +53 -16
  750. package/src/divider/test/__snapshots__/index.js.snap +11 -11
  751. package/src/divider/test/index.js +4 -4
  752. package/src/divider/types.ts +5 -5
  753. package/src/drop-zone/index.js +14 -6
  754. package/src/drop-zone/provider.js +1 -0
  755. package/src/dropdown/index.js +14 -13
  756. package/src/dropdown-menu/stories/index.js +1 -1
  757. package/src/duotone-picker/README.md +1 -1
  758. package/src/elevation/hook.js +1 -0
  759. package/src/elevation/stories/index.js +1 -1
  760. package/src/elevation/types.ts +0 -1
  761. package/src/external-link/stories/index.js +1 -1
  762. package/src/external-link/styles/external-link-styles.js +3 -3
  763. package/src/flex/flex/hook.js +1 -0
  764. package/src/flex/types.ts +0 -1
  765. package/src/flyout/styles.ts +4 -2
  766. package/src/flyout/types.ts +0 -1
  767. package/src/focusable-iframe/index.js +1 -0
  768. package/src/font-size-picker/stories/index.js +1 -1
  769. package/src/form-token-field/stories/index.js +1 -1
  770. package/src/form-token-field/style.scss +1 -1
  771. package/src/form-token-field/suggestions-list.js +109 -120
  772. package/src/form-token-field/test/index.js +4 -2
  773. package/src/gradient-picker/README.md +94 -0
  774. package/src/gradient-picker/stories/index.js +1 -1
  775. package/src/grid/hook.js +1 -0
  776. package/src/grid/stories/index.js +1 -1
  777. package/src/grid/types.ts +0 -1
  778. package/src/guide/stories/index.js +1 -1
  779. package/src/h-stack/types.ts +0 -1
  780. package/src/heading/component.tsx +0 -1
  781. package/src/higher-order/with-focus-outside/index.js +2 -0
  782. package/src/icon/index.tsx +0 -1
  783. package/src/icon/stories/index.js +1 -1
  784. package/src/index.js +1 -0
  785. package/src/input-control/index.tsx +0 -1
  786. package/src/input-control/input-base.tsx +0 -1
  787. package/src/input-control/input-field.tsx +0 -1
  788. package/src/input-control/reducer/actions.ts +0 -1
  789. package/src/input-control/reducer/reducer.ts +0 -1
  790. package/src/input-control/reducer/state.ts +0 -1
  791. package/src/input-control/stories/index.js +2 -1
  792. package/src/input-control/styles/input-control-styles.tsx +23 -13
  793. package/src/input-control/types.ts +3 -2
  794. package/src/item-group/item/component.tsx +0 -1
  795. package/src/item-group/item/hook.ts +1 -2
  796. package/src/item-group/item-group/component.tsx +0 -1
  797. package/src/item-group/stories/index.js +84 -2
  798. package/src/menu-item/README.md +2 -2
  799. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +2 -0
  800. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +8 -14
  801. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +33 -3
  802. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +162 -0
  803. package/src/mobile/bottom-sheet/cell.native.js +8 -6
  804. package/src/mobile/bottom-sheet/index.native.js +24 -14
  805. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +6 -2
  806. package/src/mobile/bottom-sheet/link-suggestion-styles.native.scss +3 -0
  807. package/src/mobile/bottom-sheet/range-text-input.native.js +5 -2
  808. package/src/mobile/bottom-sheet/styles.native.scss +4 -0
  809. package/src/mobile/bottom-sheet/test/index.native.js +24 -0
  810. package/src/mobile/color-settings/index.native.js +4 -0
  811. package/src/mobile/color-settings/palette.screen.native.js +13 -5
  812. package/src/mobile/color-settings/style.native.scss +1 -1
  813. package/src/mobile/color-settings/utils.native.js +8 -3
  814. package/src/mobile/global-styles-context/utils.native.js +1 -1
  815. package/src/mobile/gridicons/index.native.js +3 -3
  816. package/src/mobile/html-text-input/test/index.native.js +34 -35
  817. package/src/mobile/inserter-button/style.native.scss +1 -0
  818. package/src/mobile/keyboard-avoiding-view/index.ios.js +12 -9
  819. package/src/mobile/link-picker/index.native.js +41 -6
  820. package/src/mobile/link-picker/link-picker-screen.native.js +13 -5
  821. package/src/mobile/link-settings/index.native.js +13 -1
  822. package/src/mobile/link-settings/test/edit.native.js +368 -0
  823. package/src/mobile/link-settings/test/link-settings-navigation.native.js +97 -0
  824. package/src/mobile/readable-content-view/index.native.js +5 -2
  825. package/src/mobile/utils/use-is-floating-keyboard.native.js +2 -5
  826. package/src/mobile/utils/use-unit-converter-to-mobile.native.js +5 -2
  827. package/src/modal/README.md +10 -0
  828. package/src/modal/aria-helper.js +2 -0
  829. package/src/modal/index.js +71 -63
  830. package/src/modal/stories/index.js +6 -1
  831. package/src/modal/style.scss +9 -0
  832. package/src/modal/test/index.js +11 -0
  833. package/src/navigation/README.md +0 -9
  834. package/src/navigator/context.ts +5 -1
  835. package/src/navigator/navigator-provider/README.md +30 -20
  836. package/src/navigator/navigator-provider/component.tsx +69 -25
  837. package/src/navigator/navigator-screen/component.tsx +71 -34
  838. package/src/navigator/stories/index.js +26 -13
  839. package/src/navigator/test/index.js +167 -32
  840. package/src/navigator/types.ts +11 -11
  841. package/src/navigator/use-navigator.ts +4 -4
  842. package/src/notice/index.native.js +5 -2
  843. package/src/notice/stories/index.js +1 -1
  844. package/src/number-control/stories/index.js +1 -1
  845. package/src/palette-edit/index.js +9 -2
  846. package/src/palette-edit/styles.js +22 -3
  847. package/src/panel/stories/index.js +1 -1
  848. package/src/placeholder/index.js +8 -6
  849. package/src/placeholder/stories/index.js +1 -1
  850. package/src/placeholder/style.scss +12 -0
  851. package/src/placeholder/test/index.js +18 -1
  852. package/src/popover/stories/index.js +1 -1
  853. package/src/query-controls/README.md +138 -6
  854. package/src/radio-group/README.md +4 -1
  855. package/src/range-control/stories/index.js +1 -1
  856. package/src/range-control/styles/range-control-styles.js +1 -1
  857. package/src/resizable-box/index.tsx +0 -1
  858. package/src/resizable-box/resize-tooltip/index.tsx +1 -2
  859. package/src/resizable-box/resize-tooltip/label.tsx +0 -1
  860. package/src/resizable-box/stories/index.js +1 -1
  861. package/src/sandbox/index.native.js +8 -5
  862. package/src/scrollable/hook.js +1 -1
  863. package/src/scrollable/stories/index.js +7 -4
  864. package/src/search-control/stories/index.js +1 -1
  865. package/src/select-control/stories/index.js +2 -1
  866. package/src/select-control/styles/select-control-styles.ts +25 -2
  867. package/src/select-control/types.ts +1 -1
  868. package/src/slot-fill/bubbles-virtually/fill.js +12 -1
  869. package/src/slot-fill/stories/index.js +1 -1
  870. package/src/snackbar/stories/index.js +1 -1
  871. package/src/spacer/component.tsx +0 -1
  872. package/src/spacer/stories/index.js +1 -1
  873. package/src/spacer/types.ts +0 -1
  874. package/src/spinner/README.md +10 -10
  875. package/src/spinner/index.js +42 -3
  876. package/src/spinner/index.native.js +7 -2
  877. package/src/spinner/stories/index.js +36 -3
  878. package/src/spinner/styles.js +47 -0
  879. package/src/style-provider/index.js +2 -0
  880. package/src/surface/hook.js +1 -0
  881. package/src/surface/stories/index.js +1 -1
  882. package/src/tab-panel/stories/index.js +1 -1
  883. package/src/text/get-line-height.ts +0 -1
  884. package/src/text/hook.js +1 -0
  885. package/src/text/types.ts +0 -1
  886. package/src/text-control/stories/index.js +1 -1
  887. package/src/text-highlight/stories/index.js +1 -1
  888. package/src/textarea-control/stories/index.js +1 -1
  889. package/src/tip/index.js +2 -4
  890. package/src/tip/stories/index.js +1 -1
  891. package/src/toggle-control/stories/index.js +1 -1
  892. package/src/toggle-group-control/stories/index.js +1 -1
  893. package/src/toggle-group-control/test/__snapshots__/index.js.snap +25 -27
  894. package/src/toggle-group-control/toggle-group-control/component.tsx +8 -14
  895. package/src/toggle-group-control/toggle-group-control/styles.ts +0 -14
  896. package/src/toggle-group-control/toggle-group-control-option/component.tsx +0 -1
  897. package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -3
  898. package/src/toggle-group-control/types.ts +1 -9
  899. package/src/toolbar-button/stories/index.js +1 -1
  900. package/src/tools-panel/stories/index.js +75 -1
  901. package/src/tools-panel/stories/tools-panel-with-item-group-slot.js +244 -0
  902. package/src/tools-panel/styles.ts +40 -2
  903. package/src/tools-panel/test/__snapshots__/index.js.snap +219 -0
  904. package/src/tools-panel/test/index.js +81 -1
  905. package/src/tools-panel/tools-panel/README.md +9 -0
  906. package/src/tools-panel/tools-panel/component.tsx +2 -6
  907. package/src/tools-panel/tools-panel/hook.ts +164 -97
  908. package/src/tools-panel/tools-panel-header/component.tsx +0 -1
  909. package/src/tools-panel/tools-panel-header/hook.ts +3 -3
  910. package/src/tools-panel/tools-panel-item/component.tsx +0 -1
  911. package/src/tools-panel/tools-panel-item/hook.ts +25 -2
  912. package/src/tools-panel/types.ts +14 -1
  913. package/src/tooltip/stories/index.js +1 -1
  914. package/src/tooltip/test/index.native.js +3 -1
  915. package/src/tree-grid/index.js +19 -5
  916. package/src/tree-select/stories/index.js +1 -1
  917. package/src/truncate/hook.js +1 -1
  918. package/src/truncate/stories/index.js +1 -1
  919. package/src/ui/README.md +1 -1
  920. package/src/ui/context/wordpress-component.ts +0 -1
  921. package/src/ui/control-group/types.ts +0 -1
  922. package/src/ui/form-group/types.ts +0 -1
  923. package/src/ui/shortcut/component.tsx +0 -1
  924. package/src/ui/tooltip/types.ts +0 -1
  925. package/src/ui/utils/font-size.ts +0 -1
  926. package/src/ui/utils/get-valid-children.ts +0 -1
  927. package/src/unit-control/index.tsx +0 -1
  928. package/src/unit-control/stories/index.js +19 -1
  929. package/src/unit-control/styles/unit-control-styles.ts +33 -46
  930. package/src/unit-control/types.ts +7 -4
  931. package/src/unit-control/unit-select-control.tsx +0 -1
  932. package/src/utils/colors-values.js +4 -3
  933. package/src/utils/config-values.js +1 -5
  934. package/src/utils/hooks/stories/use-cx.js +121 -44
  935. package/src/utils/hooks/use-combined-ref.ts +0 -1
  936. package/src/utils/hooks/use-latest-ref.ts +0 -1
  937. package/src/v-stack/types.ts +0 -1
  938. package/src/z-stack/README.md +1 -1
  939. package/src/z-stack/component.tsx +1 -2
  940. package/src/z-stack/stories/index.js +1 -1
  941. package/src/z-stack/styles.ts +7 -2
  942. package/tsconfig.json +9 -2
  943. package/tsconfig.tsbuildinfo +1 -1
  944. package/build/spinner/styles/spinner-styles.js +0 -40
  945. package/build/spinner/styles/spinner-styles.js.map +0 -1
  946. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -90
  947. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  948. package/build-module/spinner/styles/spinner-styles.js +0 -28
  949. package/build-module/spinner/styles/spinner-styles.js.map +0 -1
  950. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -86
  951. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  952. package/build-types/spinner/styles/spinner-styles.d.ts +0 -5
  953. package/build-types/spinner/styles/spinner-styles.d.ts.map +0 -1
  954. package/build-types/toggle-group-control/component.d.ts +0 -4
  955. package/build-types/toggle-group-control/component.d.ts.map +0 -1
  956. package/build-types/toggle-group-control/styles.d.ts +0 -25
  957. package/build-types/toggle-group-control/styles.d.ts.map +0 -1
  958. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
  959. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
  960. package/build-types/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
  961. package/build-types/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
  962. package/build-types/toggle-group-control/toggle-group-control-button.d.ts +0 -6
  963. package/build-types/toggle-group-control/toggle-group-control-button.d.ts.map +0 -1
  964. package/build-types/toggle-group-control/toggle-group-control-context.d.ts +0 -9
  965. package/build-types/toggle-group-control/toggle-group-control-context.d.ts.map +0 -1
  966. package/build-types/toggle-group-control/toggle-group-control-option.d.ts +0 -4
  967. package/build-types/toggle-group-control/toggle-group-control-option.d.ts.map +0 -1
  968. package/build-types/ui/color-picker/color-display.d.ts +0 -13
  969. package/build-types/ui/color-picker/color-display.d.ts.map +0 -1
  970. package/build-types/ui/color-picker/color-input.d.ts +0 -13
  971. package/build-types/ui/color-picker/color-input.d.ts.map +0 -1
  972. package/build-types/ui/color-picker/component.d.ts +0 -12
  973. package/build-types/ui/color-picker/component.d.ts.map +0 -1
  974. package/build-types/ui/color-picker/hex-input.d.ts +0 -12
  975. package/build-types/ui/color-picker/hex-input.d.ts.map +0 -1
  976. package/build-types/ui/color-picker/hsl-input.d.ts +0 -12
  977. package/build-types/ui/color-picker/hsl-input.d.ts.map +0 -1
  978. package/build-types/ui/color-picker/index.d.ts +0 -2
  979. package/build-types/ui/color-picker/index.d.ts.map +0 -1
  980. package/build-types/ui/color-picker/input-with-slider.d.ts +0 -11
  981. package/build-types/ui/color-picker/input-with-slider.d.ts.map +0 -1
  982. package/build-types/ui/color-picker/legacy-adapter.d.ts +0 -5
  983. package/build-types/ui/color-picker/legacy-adapter.d.ts.map +0 -1
  984. package/build-types/ui/color-picker/picker.d.ts +0 -12
  985. package/build-types/ui/color-picker/picker.d.ts.map +0 -1
  986. package/build-types/ui/color-picker/rgb-input.d.ts +0 -12
  987. package/build-types/ui/color-picker/rgb-input.d.ts.map +0 -1
  988. package/build-types/ui/color-picker/styles.d.ts +0 -76
  989. package/build-types/ui/color-picker/styles.d.ts.map +0 -1
  990. package/build-types/ui/color-picker/types.d.ts +0 -2
  991. package/build-types/ui/color-picker/types.d.ts.map +0 -1
  992. package/build-types/ui/color-picker/use-deprecated-props.d.ts +0 -50
  993. package/build-types/ui/color-picker/use-deprecated-props.d.ts.map +0 -1
  994. package/build-types/ui/utils/create-component.d.ts +0 -21
  995. package/build-types/ui/utils/create-component.d.ts.map +0 -1
  996. package/build-types/utils/hooks/use-jump-step.d.ts +0 -25
  997. package/build-types/utils/hooks/use-jump-step.d.ts.map +0 -1
  998. package/src/spinner/styles/spinner-styles.js +0 -47
  999. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +0 -86
  1000. package/src/ui/visually-hidden/README.md +0 -21
@@ -278,7 +278,7 @@ describe( 'TimePicker', () => {
278
278
  screen.getByLabelText( 'Day' )
279
279
  );
280
280
 
281
- expect( monthInputIndex < dayInputIndex ).toBe( true );
281
+ expect( monthInputIndex > dayInputIndex ).toBe( true );
282
282
 
283
283
  rerender(
284
284
  <form aria-label="form">
@@ -299,7 +299,7 @@ describe( 'TimePicker', () => {
299
299
  screen.getByLabelText( 'Day' )
300
300
  );
301
301
 
302
- expect( monthInputIndex > dayInputIndex ).toBe( true );
302
+ expect( monthInputIndex < dayInputIndex ).toBe( true );
303
303
  } );
304
304
 
305
305
  it( 'Should set a time when passed a null currentTime', () => {
@@ -0,0 +1,32 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import moment from 'moment';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import { getMomentDate } from '../utils';
10
+
11
+ describe( 'getMomentDate', () => {
12
+ it( 'should return a Moment object representing a given date string', () => {
13
+ const currentDate = '1986-10-18T23:00:00';
14
+ const momentDate = getMomentDate( currentDate );
15
+
16
+ expect( moment.isMoment( momentDate ) ).toBe( true );
17
+ expect( momentDate.isSame( moment( currentDate ) ) ).toBe( true );
18
+ } );
19
+
20
+ it( 'should return null when given a null argument', () => {
21
+ const currentDate = null;
22
+ const momentDate = getMomentDate( currentDate );
23
+
24
+ expect( momentDate ).toBeNull();
25
+ } );
26
+
27
+ it( 'should return a Moment object representing now when given an undefined argument', () => {
28
+ const momentDate = getMomentDate();
29
+
30
+ expect( moment.isMoment( momentDate ) ).toBe( true );
31
+ } );
32
+ } );
@@ -196,13 +196,13 @@ export function TimePicker( { is12Hour, currentTime, onChange } ) {
196
196
 
197
197
  const dayMonthFormat = is12Hour ? (
198
198
  <>
199
- { dayFormat }
200
199
  { monthFormat }
200
+ { dayFormat }
201
201
  </>
202
202
  ) : (
203
203
  <>
204
- { monthFormat }
205
204
  { dayFormat }
205
+ { monthFormat }
206
206
  </>
207
207
  );
208
208
 
@@ -0,0 +1,18 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import moment from 'moment';
5
+
6
+ /**
7
+ * Create a Moment object from a date string. With no date supplied, default to a Moment
8
+ * object representing now. If a null value is passed, return a null value.
9
+ *
10
+ * @param {?string} date Date representing the currently selected date or null to signify no selection.
11
+ * @return {?moment.Moment} Moment object for selected date or null.
12
+ */
13
+ export const getMomentDate = ( date ) => {
14
+ if ( null === date ) {
15
+ return null;
16
+ }
17
+ return date ? moment( date ) : moment();
18
+ };
@@ -11,9 +11,11 @@ This feature is still experimental. “Experimental” means this is an early im
11
11
  In a block's `edit` implementation, render a `<DimensionControl />` component.
12
12
 
13
13
  ```jsx
14
+ import { partialRight } from 'lodash';
15
+
14
16
  import { registerBlockType } from '@wordpress/blocks';
15
17
  import { __ } from '@wordpress/i18n';
16
- import { DimensionControl } from '@wordpress/block-editor';
18
+ import { DimensionControl } from '@wordpress/components';
17
19
 
18
20
  registerBlockType( 'my-plugin/my-block', {
19
21
  // ...
@@ -9,15 +9,43 @@ This feature is still experimental. “Experimental” means this is an early im
9
9
  ## Usage
10
10
 
11
11
  ```jsx
12
- import { Divider, FormGroup, ListGroup } from '@wordpress/components/ui';
12
+ import {
13
+ __experimentalDivider as Divider,
14
+ __experimentalText as Text,
15
+ __experimentalVStack as VStack,
16
+ } from `@wordpress/components`;
13
17
 
14
18
  function Example() {
15
19
  return (
16
- <ListGroup>
17
- <FormGroup>...</FormGroup>
20
+ <VStack spacing={4}>
21
+ <Text>Some text here</Text>
18
22
  <Divider />
19
- <FormGroup>...</FormGroup>
20
- </ListGroup>
23
+ <Text>Some more text here</Text>
24
+ </VStack>
21
25
  );
22
26
  }
23
27
  ```
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/).
@@ -3,7 +3,6 @@
3
3
  */
4
4
  // eslint-disable-next-line no-restricted-imports
5
5
  import { Separator } from 'reakit';
6
- // eslint-disable-next-line no-restricted-imports
7
6
  import type { Ref } from 'react';
8
7
 
9
8
  /**
@@ -38,17 +37,18 @@ function Divider(
38
37
  * @example
39
38
  * ```js
40
39
  * import {
41
- * __experimentalDivider as Divider,
42
- * __experimentalText as Text }
43
- * from `@wordpress/components`;
40
+ * __experimentalDivider as Divider,
41
+ * __experimentalText as Text,
42
+ * __experimentalVStack as VStack,
43
+ * } from `@wordpress/components`;
44
44
  *
45
45
  * function Example() {
46
46
  * return (
47
- * <ListGroup>
48
- * <FormGroup>...</FormGroup>
47
+ * <VStack spacing={4}>
48
+ * <Text>Some text here</Text>
49
49
  * <Divider />
50
- * <FormGroup>...</FormGroup>
51
- * </ListGroup>
50
+ * <Text>Some more text here</Text>
51
+ * </VStack>
52
52
  * );
53
53
  * }
54
54
  * ```
@@ -1,38 +1,64 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import { number } from '@storybook/addon-knobs';
4
+ import { css } from '@emotion/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
+ import { useCx } from '../../utils';
10
+ import { Text } from '../../text';
9
11
  import { Divider } from '..';
10
12
 
11
13
  export default {
12
14
  component: Divider,
13
15
  title: 'Components (Experimental)/Divider',
14
- parameters: {
15
- knobs: { disabled: false },
16
+ argTypes: {
17
+ margin: {
18
+ control: { type: 'number' },
19
+ },
20
+ marginStart: {
21
+ control: { type: 'number' },
22
+ },
23
+ marginEnd: {
24
+ control: { type: 'number' },
25
+ },
16
26
  },
17
27
  };
18
28
 
19
- const BlackDivider = ( props ) => (
20
- <Divider { ...props } style={ { borderColor: 'black' } } />
29
+ const HorizontalTemplate = ( args ) => (
30
+ <div>
31
+ <Text>Some text before the divider</Text>
32
+ <Divider { ...args } />
33
+ <Text>Some text after the divider</Text>
34
+ </div>
21
35
  );
22
36
 
23
- export const _default = () => {
24
- const props = {
25
- margin: number( 'margin', 0 ),
26
- };
27
- // make the border color black to give higher contrast and help it appear in storybook better
28
- return <BlackDivider { ...props } />;
37
+ const VerticalTemplate = ( args ) => {
38
+ const cx = useCx();
39
+ const wrapperClassName = cx( css`
40
+ display: flex;
41
+ align-items: stretch;
42
+ justify-content: start;
43
+ ` );
44
+
45
+ return (
46
+ <div className={ wrapperClassName }>
47
+ <Text>Some text before the divider</Text>
48
+ <Divider orientation="vertical" { ...args } />
49
+ <Text>Some text after the divider</Text>
50
+ </div>
51
+ );
29
52
  };
30
53
 
31
- export const splitMargins = () => {
32
- const props = {
33
- marginTop: number( 'marginTop', 0 ),
34
- marginBottom: number( 'marginBottom', 0 ),
35
- };
54
+ export const Horizontal = HorizontalTemplate.bind( {} );
55
+ Horizontal.args = {
56
+ margin: 2,
57
+ marginStart: undefined,
58
+ marginEnd: undefined,
59
+ };
36
60
 
37
- return <BlackDivider { ...props } />;
61
+ export const Vertical = VerticalTemplate.bind( {} );
62
+ Vertical.args = {
63
+ ...Horizontal.args,
38
64
  };
@@ -8,29 +8,66 @@ import { css } from '@emotion/react';
8
8
  * Internal dependencies
9
9
  */
10
10
  import { space } from '../ui/utils/space';
11
- import CONFIG from '../utils/config-values';
12
- import type { OwnProps } from './types';
11
+ import { rtl } from '../utils';
12
+ import type { Props } from './types';
13
13
 
14
- const renderMargin = ( { margin, marginTop, marginBottom }: OwnProps ) => {
15
- if ( typeof margin !== 'undefined' ) {
16
- return css( {
17
- marginBottom: space( margin ),
18
- marginTop: space( margin ),
19
- } );
20
- }
14
+ const MARGIN_DIRECTIONS: Record<
15
+ NonNullable< Props[ 'orientation' ] >,
16
+ Record< 'start' | 'end', string >
17
+ > = {
18
+ vertical: {
19
+ start: 'marginLeft',
20
+ end: 'marginRight',
21
+ },
22
+ horizontal: {
23
+ start: 'marginTop',
24
+ end: 'marginBottom',
25
+ },
26
+ };
27
+
28
+ // Renders the correct margins given the Divider's `orientation` and the writing direction.
29
+ // When both the generic `margin` and the specific `marginStart|marginEnd` props are defined,
30
+ // the latter will take priority.
31
+ const renderMargin = ( {
32
+ 'aria-orientation': orientation = 'horizontal',
33
+ margin,
34
+ marginStart,
35
+ marginEnd,
36
+ }: Props ) =>
37
+ css(
38
+ rtl( {
39
+ [ MARGIN_DIRECTIONS[ orientation ].start ]: space(
40
+ marginStart ?? margin
41
+ ),
42
+ [ MARGIN_DIRECTIONS[ orientation ].end ]: space(
43
+ marginEnd ?? margin
44
+ ),
45
+ } )()
46
+ );
21
47
 
48
+ const renderBorder = ( {
49
+ 'aria-orientation': orientation = 'horizontal',
50
+ }: Props ) => {
22
51
  return css( {
23
- marginTop: space( marginTop ),
24
- marginBottom: space( marginBottom ),
52
+ [ orientation === 'vertical'
53
+ ? 'borderRight'
54
+ : 'borderBottom' ]: '1px solid currentColor',
25
55
  } );
26
56
  };
27
57
 
28
- export const DividerView = styled.hr< OwnProps >`
29
- border-color: ${ CONFIG.colorDivider };
30
- border-width: 0 0 1px 0;
31
- height: 0;
58
+ const renderSize = ( {
59
+ 'aria-orientation': orientation = 'horizontal',
60
+ }: Props ) =>
61
+ css( {
62
+ height: orientation === 'vertical' ? 'auto' : 0,
63
+ width: orientation === 'vertical' ? 0 : 'auto',
64
+ } );
65
+
66
+ export const DividerView = styled.hr< Props >`
67
+ border: 0;
32
68
  margin: 0;
33
- width: auto;
34
69
 
70
+ ${ renderBorder }
71
+ ${ renderSize }
35
72
  ${ renderMargin }
36
73
  `;
@@ -2,10 +2,10 @@
2
2
 
3
3
  exports[`props should render correctly 1`] = `
4
4
  .emotion-0 {
5
- border-color: rgba(0, 0, 0, 0.1);
6
- border-width: 0 0 1px 0;
7
- height: 0;
5
+ border: 0;
8
6
  margin: 0;
7
+ border-bottom: 1px solid currentColor;
8
+ height: 0;
9
9
  width: auto;
10
10
  }
11
11
 
@@ -25,8 +25,8 @@ Snapshot Diff:
25
25
 
26
26
  @@ -2,10 +2,8 @@
27
27
  Object {
28
- "border-color": "rgba(0, 0, 0, 0.1)",
29
- "border-width": "0 0 1px 0",
28
+ "border": "0",
29
+ "border-bottom": "1px solid currentColor",
30
30
  "height": "0",
31
31
  "margin": "0",
32
32
  - "margin-bottom": "calc(4px * 7)",
@@ -36,15 +36,15 @@ Snapshot Diff:
36
36
  ]
37
37
  `;
38
38
 
39
- exports[`props should render marginBottom 1`] = `
39
+ exports[`props should render marginEnd 1`] = `
40
40
  Snapshot Diff:
41
41
  - Received styles
42
42
  + Base styles
43
43
 
44
44
  @@ -2,9 +2,8 @@
45
45
  Object {
46
- "border-color": "rgba(0, 0, 0, 0.1)",
47
- "border-width": "0 0 1px 0",
46
+ "border": "0",
47
+ "border-bottom": "1px solid currentColor",
48
48
  "height": "0",
49
49
  "margin": "0",
50
50
  - "margin-bottom": "calc(4px * 5)",
@@ -53,15 +53,15 @@ Snapshot Diff:
53
53
  ]
54
54
  `;
55
55
 
56
- exports[`props should render marginTop 1`] = `
56
+ exports[`props should render marginStart 1`] = `
57
57
  Snapshot Diff:
58
58
  - Received styles
59
59
  + Base styles
60
60
 
61
61
  @@ -2,9 +2,8 @@
62
62
  Object {
63
- "border-color": "rgba(0, 0, 0, 0.1)",
64
- "border-width": "0 0 1px 0",
63
+ "border": "0",
64
+ "border-bottom": "1px solid currentColor",
65
65
  "height": "0",
66
66
  "margin": "0",
67
67
  - "margin-top": "calc(4px * 5)",
@@ -18,15 +18,15 @@ describe( 'props', () => {
18
18
  expect( base.container.firstChild ).toMatchSnapshot();
19
19
  } );
20
20
 
21
- test( 'should render marginTop', () => {
22
- const { container } = render( <Divider marginTop={ 5 } /> );
21
+ test( 'should render marginStart', () => {
22
+ const { container } = render( <Divider marginStart={ 5 } /> );
23
23
  expect( container.firstChild ).toMatchStyleDiffSnapshot(
24
24
  base.container.firstChild
25
25
  );
26
26
  } );
27
27
 
28
- test( 'should render marginBottom', () => {
29
- const { container } = render( <Divider marginBottom={ 5 } /> );
28
+ test( 'should render marginEnd', () => {
29
+ const { container } = render( <Divider marginEnd={ 5 } /> );
30
30
  expect( container.firstChild ).toMatchStyleDiffSnapshot(
31
31
  base.container.firstChild
32
32
  );
@@ -11,17 +11,17 @@ import type { SpaceInput } from '../ui/utils/space';
11
11
 
12
12
  export interface OwnProps {
13
13
  /**
14
- * Adjusts all margins.
14
+ * Adjusts all margins on the inline dimension.
15
15
  */
16
16
  margin?: SpaceInput;
17
17
  /**
18
- * Adjusts top margins.
18
+ * Adjusts the inline-start margin.
19
19
  */
20
- marginTop?: SpaceInput;
20
+ marginStart?: SpaceInput;
21
21
  /**
22
- * Adjusts bottom margins.
22
+ * Adjusts the inline-end margin.
23
23
  */
24
- marginBottom?: SpaceInput;
24
+ marginEnd?: SpaceInput;
25
25
  }
26
26
 
27
27
  export interface Props extends Omit< SeparatorProps, 'children' >, OwnProps {}
@@ -39,10 +39,14 @@ export default function DropZoneComponent( {
39
39
  const files = getFilesFromDataTransfer( event.dataTransfer );
40
40
  const html = event.dataTransfer.getData( 'text/html' );
41
41
 
42
- if ( files.length && onFilesDrop ) {
43
- onFilesDrop( files );
44
- } else if ( html && onHTMLDrop ) {
42
+ /**
43
+ * From Windows Chrome 96, the `event.dataTransfer` returns both file object and HTML.
44
+ * The order of the checks is important to recognise the HTML drop.
45
+ */
46
+ if ( html && onHTMLDrop ) {
45
47
  onHTMLDrop( html );
48
+ } else if ( files.length && onFilesDrop ) {
49
+ onFilesDrop( files );
46
50
  } else if ( onDrop ) {
47
51
  onDrop( event );
48
52
  }
@@ -52,15 +56,19 @@ export default function DropZoneComponent( {
52
56
 
53
57
  let _type = 'default';
54
58
 
55
- if (
59
+ /**
60
+ * From Windows Chrome 96, the `event.dataTransfer` returns both file object and HTML.
61
+ * The order of the checks is important to recognise the HTML drop.
62
+ */
63
+ if ( includes( event.dataTransfer.types, 'text/html' ) ) {
64
+ _type = 'html';
65
+ } else if (
56
66
  // Check for the types because sometimes the files themselves
57
67
  // are only available on drop.
58
68
  includes( event.dataTransfer.types, 'Files' ) ||
59
69
  getFilesFromDataTransfer( event.dataTransfer ).length > 0
60
70
  ) {
61
71
  _type = 'file';
62
- } else if ( includes( event.dataTransfer.types, 'text/html' ) ) {
63
- _type = 'html';
64
72
  }
65
73
 
66
74
  setType( _type );
@@ -5,6 +5,7 @@ import deprecated from '@wordpress/deprecated';
5
5
 
6
6
  export default function DropZoneProvider( { children } ) {
7
7
  deprecated( 'wp.components.DropZoneProvider', {
8
+ since: '5.8',
8
9
  hint:
9
10
  'wp.component.DropZone no longer needs a provider. wp.components.DropZoneProvider is safe to remove from your code.',
10
11
  } );
@@ -27,19 +27,20 @@ function useObservableState( initialState, onStateChange ) {
27
27
  ];
28
28
  }
29
29
 
30
- export default function Dropdown( {
31
- renderContent,
32
- renderToggle,
33
- position = 'bottom right',
34
- className,
35
- contentClassName,
36
- expandOnMobile,
37
- headerTitle,
38
- focusOnMount,
39
- popoverProps,
40
- onClose,
41
- onToggle,
42
- } ) {
30
+ export default function Dropdown( props ) {
31
+ const {
32
+ renderContent,
33
+ renderToggle,
34
+ position = 'bottom right',
35
+ className,
36
+ contentClassName,
37
+ expandOnMobile,
38
+ headerTitle,
39
+ focusOnMount,
40
+ popoverProps,
41
+ onClose,
42
+ onToggle,
43
+ } = props;
43
44
  const containerRef = useRef();
44
45
  const [ isOpen, setIsOpen ] = useObservableState( false, onToggle );
45
46
 
@@ -17,7 +17,7 @@ export default {
17
17
  title: 'Components/DropdownMenu',
18
18
  component: DropdownMenu,
19
19
  parameters: {
20
- knobs: { disabled: false },
20
+ knobs: { disable: false },
21
21
  },
22
22
  };
23
23
 
@@ -22,7 +22,7 @@ const Example = () => {
22
22
  const [ duotone, setDuotone ] = useState( [ '#000000', '#ffffff' ] );
23
23
  return (
24
24
  <>
25
- <DuotoneControl
25
+ <DuotonePicker
26
26
  duotonePalette={ DUOTONE_PALETTE }
27
27
  colorPalette={ COLOR_PALETTE }
28
28
  value={ duotone }
@@ -112,6 +112,7 @@ export function useElevation( props ) {
112
112
  active,
113
113
  borderRadius,
114
114
  className,
115
+ cx,
115
116
  focus,
116
117
  hover,
117
118
  isInteractive,
@@ -26,7 +26,7 @@ export default {
26
26
  component: Elevation,
27
27
  title: 'Components (Experimental)/Elevation',
28
28
  parameters: {
29
- knobs: { disabled: false },
29
+ knobs: { disable: false },
30
30
  },
31
31
  };
32
32
 
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- // eslint-disable-next-line no-restricted-imports
5
4
  import type { CSSProperties } from 'react';
6
5
 
7
6
  export type Props = {
@@ -11,7 +11,7 @@ export default {
11
11
  title: 'Components/ExternalLink',
12
12
  component: ExternalLink,
13
13
  parameters: {
14
- knobs: { disabled: false },
14
+ knobs: { disable: false },
15
15
  },
16
16
  };
17
17
 
@@ -9,9 +9,9 @@ import styled from '@emotion/styled';
9
9
  import { Icon } from '@wordpress/icons';
10
10
 
11
11
  export const StyledIcon = styled( Icon )`
12
- width: 1.4em;
13
- height: 1.4em;
14
- margin: -0.2em 0.1em 0;
12
+ width: 1em;
13
+ height: 1em;
14
+ margin: 0;
15
15
  vertical-align: middle;
16
16
  fill: currentColor;
17
17
  `;
@@ -126,6 +126,7 @@ export function useFlex( props ) {
126
126
  }, [
127
127
  align,
128
128
  className,
129
+ cx,
129
130
  direction,
130
131
  expanded,
131
132
  gap,
package/src/flex/types.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- // eslint-disable-next-line no-restricted-imports
5
4
  import type { CSSProperties } from 'react';
6
5
 
7
6
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import styled from '@emotion/styled';
4
+ import styled, { StyledComponent } from '@emotion/styled';
5
5
  // eslint-disable-next-line no-restricted-imports
6
6
  import { Popover as ReakitPopover } from 'reakit';
7
7
 
@@ -12,7 +12,9 @@ import { Card, CardBody } from '../card';
12
12
  import * as ZIndex from '../utils/z-index';
13
13
  import CONFIG from '../utils/config-values';
14
14
 
15
- export const FlyoutContentView = styled( ReakitPopover )`
15
+ export const FlyoutContentView: StyledComponent<
16
+ React.ComponentPropsWithoutRef< typeof ReakitPopover >
17
+ > = styled( ReakitPopover )`
16
18
  z-index: ${ ZIndex.Flyout };
17
19
  box-sizing: border-box;
18
20
  opacity: 0;
@@ -3,7 +3,6 @@
3
3
  */
4
4
  // eslint-disable-next-line no-restricted-imports
5
5
  import type { PopoverStateReturn } from 'reakit';
6
- // eslint-disable-next-line no-restricted-imports
7
6
  import type { CSSProperties, FunctionComponentElement } from 'react';
8
7
 
9
8
  /**