@wordpress/components 19.4.1 → 19.7.0-next.e230fbab09.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 (929) hide show
  1. package/CHANGELOG.md +34 -3
  2. package/CONTRIBUTING.md +69 -2
  3. package/build/alignment-matrix-control/utils.js +1 -1
  4. package/build/alignment-matrix-control/utils.js.map +1 -1
  5. package/build/angle-picker-control/angle-circle.js +1 -1
  6. package/build/angle-picker-control/angle-circle.js.map +1 -1
  7. package/build/animation/index.js +0 -6
  8. package/build/animation/index.js.map +1 -1
  9. package/build/autocomplete/get-default-use-items.js +3 -3
  10. package/build/autocomplete/get-default-use-items.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/icon.js +1 -1
  14. package/build/box-control/icon.js.map +1 -1
  15. package/build/box-control/index.js +4 -4
  16. package/build/box-control/index.js.map +1 -1
  17. package/build/box-control/unit-control.js +2 -2
  18. package/build/box-control/unit-control.js.map +1 -1
  19. package/build/box-control/utils.js +12 -8
  20. package/build/box-control/utils.js.map +1 -1
  21. package/build/button/index.js +5 -5
  22. package/build/button/index.js.map +1 -1
  23. package/build/button/index.native.js +7 -7
  24. package/build/button/index.native.js.map +1 -1
  25. package/build/card/card/component.js +2 -2
  26. package/build/card/card/component.js.map +1 -1
  27. package/build/card/card-body/component.js +1 -1
  28. package/build/card/card-body/component.js.map +1 -1
  29. package/build/card/card-divider/component.js +1 -1
  30. package/build/card/card-divider/component.js.map +1 -1
  31. package/build/card/card-footer/component.js +1 -1
  32. package/build/card/card-footer/component.js.map +1 -1
  33. package/build/card/card-header/component.js +1 -1
  34. package/build/card/card-header/component.js.map +1 -1
  35. package/build/card/card-media/component.js +1 -1
  36. package/build/card/card-media/component.js.map +1 -1
  37. package/build/color-palette/index.native.js +35 -30
  38. package/build/color-palette/index.native.js.map +1 -1
  39. package/build/color-picker/color-display.js +1 -1
  40. package/build/color-picker/color-display.js.map +1 -1
  41. package/build/color-picker/component.js.map +1 -1
  42. package/build/color-picker/hex-input.js +6 -9
  43. package/build/color-picker/hex-input.js.map +1 -1
  44. package/build/color-picker/styles.js +8 -8
  45. package/build/color-picker/styles.js.map +1 -1
  46. package/build/combobox-control/index.js +1 -1
  47. package/build/combobox-control/index.js.map +1 -1
  48. package/build/confirm-dialog/component.js +4 -2
  49. package/build/confirm-dialog/component.js.map +1 -1
  50. package/build/date-time/time.js +7 -4
  51. package/build/date-time/time.js.map +1 -1
  52. package/build/divider/component.js +5 -4
  53. package/build/divider/component.js.map +1 -1
  54. package/build/draggable/index.js +3 -3
  55. package/build/draggable/index.js.map +1 -1
  56. package/build/elevation/component.js +1 -1
  57. package/build/elevation/component.js.map +1 -1
  58. package/build/flex/flex/component.js +1 -1
  59. package/build/flex/flex/component.js.map +1 -1
  60. package/build/flex/flex-block/component.js +1 -1
  61. package/build/flex/flex-block/component.js.map +1 -1
  62. package/build/flex/flex-item/component.js +1 -1
  63. package/build/flex/flex-item/component.js.map +1 -1
  64. package/build/flyout/flyout/component.js +1 -1
  65. package/build/flyout/flyout/component.js.map +1 -1
  66. package/build/flyout/flyout-content/component.js +1 -1
  67. package/build/flyout/flyout-content/component.js.map +1 -1
  68. package/build/focal-point-picker/index.js +18 -12
  69. package/build/focal-point-picker/index.js.map +1 -1
  70. package/build/focal-point-picker/index.native.js +7 -7
  71. package/build/focal-point-picker/index.native.js.map +1 -1
  72. package/build/focal-point-picker/tooltip/index.native.js +1 -1
  73. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  74. package/build/font-size-picker/index.js +1 -2
  75. package/build/font-size-picker/index.js.map +1 -1
  76. package/build/form-token-field/index.js +6 -6
  77. package/build/form-token-field/index.js.map +1 -1
  78. package/build/form-token-field/suggestions-list.js +2 -2
  79. package/build/form-token-field/suggestions-list.js.map +1 -1
  80. package/build/grid/component.js +1 -1
  81. package/build/grid/component.js.map +1 -1
  82. package/build/h-stack/component.js +1 -1
  83. package/build/h-stack/component.js.map +1 -1
  84. package/build/heading/component.js +6 -5
  85. package/build/heading/component.js.map +1 -1
  86. package/build/heading/hook.js +1 -1
  87. package/build/heading/hook.js.map +1 -1
  88. package/build/higher-order/with-notices/index.js +1 -1
  89. package/build/higher-order/with-notices/index.js.map +1 -1
  90. package/build/index.js +14 -2
  91. package/build/index.js.map +1 -1
  92. package/build/index.native.js +15 -1
  93. package/build/index.native.js.map +1 -1
  94. package/build/input-control/index.js.map +1 -1
  95. package/build/input-control/input-base.js +1 -1
  96. package/build/input-control/input-base.js.map +1 -1
  97. package/build/input-control/input-field.js +19 -17
  98. package/build/input-control/input-field.js.map +1 -1
  99. package/build/input-control/reducer/reducer.js +3 -0
  100. package/build/input-control/reducer/reducer.js.map +1 -1
  101. package/build/input-control/styles/input-control-styles.js +25 -25
  102. package/build/input-control/styles/input-control-styles.js.map +1 -1
  103. package/build/isolated-event-container/index.js +1 -1
  104. package/build/isolated-event-container/index.js.map +1 -1
  105. package/build/item-group/item/component.js.map +1 -1
  106. package/build/item-group/item-group/component.js.map +1 -1
  107. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  108. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  109. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  110. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  111. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  112. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  113. package/build/mobile/bottom-sheet/cell.native.js +1 -1
  114. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  115. package/build/mobile/bottom-sheet/index.native.js +11 -11
  116. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  117. package/build/mobile/bottom-sheet/link-cell.native.js +1 -1
  118. package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  119. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  120. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  121. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  122. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  123. package/build/mobile/color-settings/palette.screen.native.js +26 -9
  124. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  125. package/build/mobile/global-styles-context/utils.native.js +73 -19
  126. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  127. package/build/mobile/gradient/index.native.js +2 -2
  128. package/build/mobile/gradient/index.native.js.map +1 -1
  129. package/build/mobile/html-text-input/container.ios.js +3 -3
  130. package/build/mobile/html-text-input/container.ios.js.map +1 -1
  131. package/build/mobile/html-text-input/index.native.js +1 -1
  132. package/build/mobile/html-text-input/index.native.js.map +1 -1
  133. package/build/mobile/image/index.native.js +1 -1
  134. package/build/mobile/image/index.native.js.map +1 -1
  135. package/build/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  136. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  137. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  138. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  139. package/build/mobile/link-picker/index.native.js +3 -3
  140. package/build/mobile/link-picker/index.native.js.map +1 -1
  141. package/build/mobile/link-picker/link-picker-results.native.js +8 -8
  142. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  143. package/build/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  144. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  145. package/build/mobile/link-settings/index.native.js +1 -1
  146. package/build/mobile/link-settings/index.native.js.map +1 -1
  147. package/build/modal/aria-helper.js +1 -1
  148. package/build/modal/aria-helper.js.map +1 -1
  149. package/build/modal/index.js +2 -2
  150. package/build/modal/index.js.map +1 -1
  151. package/build/navigable-container/container.js +2 -2
  152. package/build/navigable-container/container.js.map +1 -1
  153. package/build/navigable-container/tabbable.js +1 -1
  154. package/build/navigable-container/tabbable.js.map +1 -1
  155. package/build/navigation/item/index.js +1 -1
  156. package/build/navigation/item/index.js.map +1 -1
  157. package/build/navigation/menu/index.js +1 -1
  158. package/build/navigation/menu/index.js.map +1 -1
  159. package/build/navigator/index.js +16 -0
  160. package/build/navigator/index.js.map +1 -1
  161. package/build/navigator/navigator-back-button/component.js +72 -0
  162. package/build/navigator/navigator-back-button/component.js.map +1 -0
  163. package/build/navigator/navigator-back-button/hook.js +49 -0
  164. package/build/navigator/navigator-back-button/hook.js.map +1 -0
  165. package/build/navigator/navigator-back-button/index.js +16 -0
  166. package/build/navigator/navigator-back-button/index.js.map +1 -0
  167. package/build/navigator/navigator-button/component.js +71 -0
  168. package/build/navigator/navigator-button/component.js.map +1 -0
  169. package/build/navigator/navigator-button/hook.js +59 -0
  170. package/build/navigator/navigator-button/hook.js.map +1 -0
  171. package/build/navigator/navigator-button/index.js +16 -0
  172. package/build/navigator/navigator-button/index.js.map +1 -0
  173. package/build/navigator/navigator-provider/component.js +12 -22
  174. package/build/navigator/navigator-provider/component.js.map +1 -1
  175. package/build/navigator/navigator-screen/component.js +14 -22
  176. package/build/navigator/navigator-screen/component.js.map +1 -1
  177. package/build/number-control/index.js +1 -1
  178. package/build/number-control/index.js.map +1 -1
  179. package/build/panel/body.js +2 -2
  180. package/build/panel/body.js.map +1 -1
  181. package/build/popover/index.js +3 -3
  182. package/build/popover/index.js.map +1 -1
  183. package/build/popover/utils.js +6 -6
  184. package/build/popover/utils.js.map +1 -1
  185. package/build/radio-group/index.js +1 -1
  186. package/build/radio-group/index.js.map +1 -1
  187. package/build/range-control/styles/range-control-styles.js +29 -29
  188. package/build/range-control/styles/range-control-styles.js.map +1 -1
  189. package/build/resizable-box/index.js.map +1 -1
  190. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  191. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  192. package/build/sandbox/index.js +5 -5
  193. package/build/sandbox/index.js.map +1 -1
  194. package/build/sandbox/index.native.js +1 -1
  195. package/build/sandbox/index.native.js.map +1 -1
  196. package/build/scrollable/component.js +1 -1
  197. package/build/scrollable/component.js.map +1 -1
  198. package/build/select-control/index.js +1 -1
  199. package/build/select-control/index.js.map +1 -1
  200. package/build/select-control/styles/select-control-styles.js +5 -5
  201. package/build/select-control/styles/select-control-styles.js.map +1 -1
  202. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  203. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  204. package/build/slot-fill/bubbles-virtually/slot.js +1 -1
  205. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  206. package/build/slot-fill/fill.js +1 -1
  207. package/build/slot-fill/fill.js.map +1 -1
  208. package/build/slot-fill/provider.js +1 -1
  209. package/build/slot-fill/provider.js.map +1 -1
  210. package/build/snackbar/index.js +1 -1
  211. package/build/snackbar/index.js.map +1 -1
  212. package/build/snackbar/list.js +1 -1
  213. package/build/snackbar/list.js.map +1 -1
  214. package/build/spacer/component.js.map +1 -1
  215. package/build/style-provider/index.js +2 -2
  216. package/build/style-provider/index.js.map +1 -1
  217. package/build/surface/component.js +1 -1
  218. package/build/surface/component.js.map +1 -1
  219. package/build/text/component.js +1 -1
  220. package/build/text/component.js.map +1 -1
  221. package/build/text-control/index.js +2 -2
  222. package/build/text-control/index.js.map +1 -1
  223. package/build/toggle-group-control/toggle-group-control/component.js +2 -2
  224. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  225. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  226. package/build/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  227. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  228. package/build/toolbar/index.js +1 -1
  229. package/build/toolbar/index.js.map +1 -1
  230. package/build/tools-panel/tools-panel/component.js.map +1 -1
  231. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  232. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  233. package/build/tooltip/index.js +3 -3
  234. package/build/tooltip/index.js.map +1 -1
  235. package/build/tooltip/index.native.js +7 -7
  236. package/build/tooltip/index.native.js.map +1 -1
  237. package/build/tree-grid/index.js +50 -6
  238. package/build/tree-grid/index.js.map +1 -1
  239. package/build/truncate/component.js +1 -1
  240. package/build/truncate/component.js.map +1 -1
  241. package/build/truncate/utils.js +1 -1
  242. package/build/truncate/utils.js.map +1 -1
  243. package/build/ui/context/context-connect.js +8 -15
  244. package/build/ui/context/context-connect.js.map +1 -1
  245. package/build/ui/context/context-system-provider.js +2 -2
  246. package/build/ui/context/context-system-provider.js.map +1 -1
  247. package/build/ui/context/index.js.map +1 -1
  248. package/build/ui/control-group/component.js +1 -1
  249. package/build/ui/control-group/component.js.map +1 -1
  250. package/build/ui/control-label/component.js +1 -1
  251. package/build/ui/control-label/component.js.map +1 -1
  252. package/build/ui/form-group/form-group.js +1 -1
  253. package/build/ui/form-group/form-group.js.map +1 -1
  254. package/build/ui/shortcut/component.js.map +1 -1
  255. package/build/ui/spinner/component.js +1 -1
  256. package/build/ui/spinner/component.js.map +1 -1
  257. package/build/ui/tooltip/component.js +1 -1
  258. package/build/ui/tooltip/component.js.map +1 -1
  259. package/build/ui/tooltip/content.js +1 -1
  260. package/build/ui/tooltip/content.js.map +1 -1
  261. package/build/ui/utils/colors.js +2 -2
  262. package/build/ui/utils/colors.js.map +1 -1
  263. package/build/ui/utils/space.js +2 -2
  264. package/build/ui/utils/space.js.map +1 -1
  265. package/build/unit-control/index.js +38 -29
  266. package/build/unit-control/index.js.map +1 -1
  267. package/build/unit-control/index.native.js +4 -2
  268. package/build/unit-control/index.native.js.map +1 -1
  269. package/build/unit-control/unit-select-control.js +1 -1
  270. package/build/unit-control/unit-select-control.js.map +1 -1
  271. package/build/unit-control/utils.js +96 -104
  272. package/build/unit-control/utils.js.map +1 -1
  273. package/build/utils/breakpoint-values.js +1 -1
  274. package/build/utils/breakpoint-values.js.map +1 -1
  275. package/build/utils/colors-values.js +1 -1
  276. package/build/utils/colors-values.js.map +1 -1
  277. package/build/v-stack/component.js +1 -1
  278. package/build/v-stack/component.js.map +1 -1
  279. package/build/visually-hidden/component.js +1 -1
  280. package/build/visually-hidden/component.js.map +1 -1
  281. package/build/z-stack/component.js.map +1 -1
  282. package/build-module/alignment-matrix-control/utils.js +1 -1
  283. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  284. package/build-module/angle-picker-control/angle-circle.js +1 -1
  285. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  286. package/build-module/animation/index.js +1 -1
  287. package/build-module/animation/index.js.map +1 -1
  288. package/build-module/autocomplete/get-default-use-items.js +3 -3
  289. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  290. package/build-module/base-field/hook.js +1 -1
  291. package/build-module/base-field/hook.js.map +1 -1
  292. package/build-module/box-control/icon.js +1 -1
  293. package/build-module/box-control/icon.js.map +1 -1
  294. package/build-module/box-control/index.js +5 -5
  295. package/build-module/box-control/index.js.map +1 -1
  296. package/build-module/box-control/unit-control.js +1 -1
  297. package/build-module/box-control/unit-control.js.map +1 -1
  298. package/build-module/box-control/utils.js +13 -9
  299. package/build-module/box-control/utils.js.map +1 -1
  300. package/build-module/button/index.js +5 -5
  301. package/build-module/button/index.js.map +1 -1
  302. package/build-module/button/index.native.js +7 -7
  303. package/build-module/button/index.native.js.map +1 -1
  304. package/build-module/card/card/component.js +2 -2
  305. package/build-module/card/card/component.js.map +1 -1
  306. package/build-module/card/card-body/component.js +1 -1
  307. package/build-module/card/card-body/component.js.map +1 -1
  308. package/build-module/card/card-divider/component.js +1 -1
  309. package/build-module/card/card-divider/component.js.map +1 -1
  310. package/build-module/card/card-footer/component.js +1 -1
  311. package/build-module/card/card-footer/component.js.map +1 -1
  312. package/build-module/card/card-header/component.js +1 -1
  313. package/build-module/card/card-header/component.js.map +1 -1
  314. package/build-module/card/card-media/component.js +1 -1
  315. package/build-module/card/card-media/component.js.map +1 -1
  316. package/build-module/color-palette/index.native.js +36 -31
  317. package/build-module/color-palette/index.native.js.map +1 -1
  318. package/build-module/color-picker/color-display.js +1 -1
  319. package/build-module/color-picker/color-display.js.map +1 -1
  320. package/build-module/color-picker/component.js.map +1 -1
  321. package/build-module/color-picker/hex-input.js +6 -9
  322. package/build-module/color-picker/hex-input.js.map +1 -1
  323. package/build-module/color-picker/styles.js +8 -8
  324. package/build-module/color-picker/styles.js.map +1 -1
  325. package/build-module/combobox-control/index.js +1 -1
  326. package/build-module/combobox-control/index.js.map +1 -1
  327. package/build-module/confirm-dialog/component.js +4 -5
  328. package/build-module/confirm-dialog/component.js.map +1 -1
  329. package/build-module/date-time/time.js +7 -4
  330. package/build-module/date-time/time.js.map +1 -1
  331. package/build-module/divider/component.js +3 -3
  332. package/build-module/divider/component.js.map +1 -1
  333. package/build-module/draggable/index.js +3 -3
  334. package/build-module/draggable/index.js.map +1 -1
  335. package/build-module/elevation/component.js +1 -1
  336. package/build-module/elevation/component.js.map +1 -1
  337. package/build-module/flex/flex/component.js +1 -1
  338. package/build-module/flex/flex/component.js.map +1 -1
  339. package/build-module/flex/flex-block/component.js +1 -1
  340. package/build-module/flex/flex-block/component.js.map +1 -1
  341. package/build-module/flex/flex-item/component.js +1 -1
  342. package/build-module/flex/flex-item/component.js.map +1 -1
  343. package/build-module/flyout/flyout/component.js +1 -1
  344. package/build-module/flyout/flyout/component.js.map +1 -1
  345. package/build-module/flyout/flyout-content/component.js +1 -1
  346. package/build-module/flyout/flyout-content/component.js.map +1 -1
  347. package/build-module/focal-point-picker/index.js +18 -12
  348. package/build-module/focal-point-picker/index.js.map +1 -1
  349. package/build-module/focal-point-picker/index.native.js +7 -7
  350. package/build-module/focal-point-picker/index.native.js.map +1 -1
  351. package/build-module/focal-point-picker/tooltip/index.native.js +1 -1
  352. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  353. package/build-module/font-size-picker/index.js +1 -2
  354. package/build-module/font-size-picker/index.js.map +1 -1
  355. package/build-module/form-token-field/index.js +6 -6
  356. package/build-module/form-token-field/index.js.map +1 -1
  357. package/build-module/form-token-field/suggestions-list.js +2 -2
  358. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  359. package/build-module/grid/component.js +1 -1
  360. package/build-module/grid/component.js.map +1 -1
  361. package/build-module/h-stack/component.js +1 -1
  362. package/build-module/h-stack/component.js.map +1 -1
  363. package/build-module/heading/component.js +4 -4
  364. package/build-module/heading/component.js.map +1 -1
  365. package/build-module/heading/hook.js +1 -1
  366. package/build-module/heading/hook.js.map +1 -1
  367. package/build-module/higher-order/with-notices/index.js +1 -1
  368. package/build-module/higher-order/with-notices/index.js.map +1 -1
  369. package/build-module/index.js +5 -5
  370. package/build-module/index.js.map +1 -1
  371. package/build-module/index.native.js +5 -5
  372. package/build-module/index.native.js.map +1 -1
  373. package/build-module/input-control/index.js.map +1 -1
  374. package/build-module/input-control/input-base.js +1 -1
  375. package/build-module/input-control/input-base.js.map +1 -1
  376. package/build-module/input-control/input-field.js +19 -16
  377. package/build-module/input-control/input-field.js.map +1 -1
  378. package/build-module/input-control/reducer/reducer.js +3 -0
  379. package/build-module/input-control/reducer/reducer.js.map +1 -1
  380. package/build-module/input-control/styles/input-control-styles.js +25 -25
  381. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  382. package/build-module/isolated-event-container/index.js +1 -1
  383. package/build-module/isolated-event-container/index.js.map +1 -1
  384. package/build-module/item-group/item/component.js.map +1 -1
  385. package/build-module/item-group/item-group/component.js.map +1 -1
  386. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  387. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  388. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  389. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  390. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  391. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  392. package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
  393. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  394. package/build-module/mobile/bottom-sheet/index.native.js +11 -11
  395. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  396. package/build-module/mobile/bottom-sheet/link-cell.native.js +1 -1
  397. package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  398. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  399. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  400. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  401. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  402. package/build-module/mobile/color-settings/palette.screen.native.js +27 -10
  403. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  404. package/build-module/mobile/global-styles-context/utils.native.js +70 -20
  405. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  406. package/build-module/mobile/gradient/index.native.js +2 -2
  407. package/build-module/mobile/gradient/index.native.js.map +1 -1
  408. package/build-module/mobile/html-text-input/container.ios.js +3 -3
  409. package/build-module/mobile/html-text-input/container.ios.js.map +1 -1
  410. package/build-module/mobile/html-text-input/index.native.js +1 -1
  411. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  412. package/build-module/mobile/image/index.native.js +1 -1
  413. package/build-module/mobile/image/index.native.js.map +1 -1
  414. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  415. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  416. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  417. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  418. package/build-module/mobile/link-picker/index.native.js +3 -3
  419. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  420. package/build-module/mobile/link-picker/link-picker-results.native.js +8 -8
  421. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  422. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  423. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  424. package/build-module/mobile/link-settings/index.native.js +1 -1
  425. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  426. package/build-module/modal/aria-helper.js +1 -1
  427. package/build-module/modal/aria-helper.js.map +1 -1
  428. package/build-module/modal/index.js +2 -2
  429. package/build-module/modal/index.js.map +1 -1
  430. package/build-module/navigable-container/container.js +2 -2
  431. package/build-module/navigable-container/container.js.map +1 -1
  432. package/build-module/navigable-container/tabbable.js +1 -1
  433. package/build-module/navigable-container/tabbable.js.map +1 -1
  434. package/build-module/navigation/item/index.js +1 -1
  435. package/build-module/navigation/item/index.js.map +1 -1
  436. package/build-module/navigation/menu/index.js +1 -1
  437. package/build-module/navigation/menu/index.js.map +1 -1
  438. package/build-module/navigator/index.js +2 -0
  439. package/build-module/navigator/index.js.map +1 -1
  440. package/build-module/navigator/navigator-back-button/component.js +59 -0
  441. package/build-module/navigator/navigator-back-button/component.js.map +1 -0
  442. package/build-module/navigator/navigator-back-button/hook.js +36 -0
  443. package/build-module/navigator/navigator-back-button/hook.js.map +1 -0
  444. package/build-module/navigator/navigator-back-button/index.js +2 -0
  445. package/build-module/navigator/navigator-back-button/index.js.map +1 -0
  446. package/build-module/navigator/navigator-button/component.js +58 -0
  447. package/build-module/navigator/navigator-button/component.js.map +1 -0
  448. package/build-module/navigator/navigator-button/hook.js +46 -0
  449. package/build-module/navigator/navigator-button/hook.js.map +1 -0
  450. package/build-module/navigator/navigator-button/index.js +2 -0
  451. package/build-module/navigator/navigator-button/index.js.map +1 -0
  452. package/build-module/navigator/navigator-provider/component.js +12 -22
  453. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  454. package/build-module/navigator/navigator-screen/component.js +13 -22
  455. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  456. package/build-module/number-control/index.js +1 -1
  457. package/build-module/number-control/index.js.map +1 -1
  458. package/build-module/panel/body.js +2 -2
  459. package/build-module/panel/body.js.map +1 -1
  460. package/build-module/popover/index.js +3 -3
  461. package/build-module/popover/index.js.map +1 -1
  462. package/build-module/popover/utils.js +6 -6
  463. package/build-module/popover/utils.js.map +1 -1
  464. package/build-module/radio-group/index.js +1 -1
  465. package/build-module/radio-group/index.js.map +1 -1
  466. package/build-module/range-control/styles/range-control-styles.js +29 -29
  467. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  468. package/build-module/resizable-box/index.js.map +1 -1
  469. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  470. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  471. package/build-module/sandbox/index.js +5 -5
  472. package/build-module/sandbox/index.js.map +1 -1
  473. package/build-module/sandbox/index.native.js +1 -1
  474. package/build-module/sandbox/index.native.js.map +1 -1
  475. package/build-module/scrollable/component.js +1 -1
  476. package/build-module/scrollable/component.js.map +1 -1
  477. package/build-module/select-control/index.js +2 -2
  478. package/build-module/select-control/index.js.map +1 -1
  479. package/build-module/select-control/styles/select-control-styles.js +5 -5
  480. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  481. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  482. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  483. package/build-module/slot-fill/bubbles-virtually/slot.js +1 -1
  484. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  485. package/build-module/slot-fill/fill.js +1 -1
  486. package/build-module/slot-fill/fill.js.map +1 -1
  487. package/build-module/slot-fill/provider.js +1 -1
  488. package/build-module/slot-fill/provider.js.map +1 -1
  489. package/build-module/snackbar/index.js +1 -1
  490. package/build-module/snackbar/index.js.map +1 -1
  491. package/build-module/snackbar/list.js +1 -1
  492. package/build-module/snackbar/list.js.map +1 -1
  493. package/build-module/spacer/component.js.map +1 -1
  494. package/build-module/style-provider/index.js +2 -2
  495. package/build-module/style-provider/index.js.map +1 -1
  496. package/build-module/surface/component.js +1 -1
  497. package/build-module/surface/component.js.map +1 -1
  498. package/build-module/text/component.js +1 -1
  499. package/build-module/text/component.js.map +1 -1
  500. package/build-module/text-control/index.js +2 -2
  501. package/build-module/text-control/index.js.map +1 -1
  502. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -2
  503. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  504. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  505. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  506. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  507. package/build-module/toolbar/index.js +1 -1
  508. package/build-module/toolbar/index.js.map +1 -1
  509. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  510. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  511. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  512. package/build-module/tooltip/index.js +3 -3
  513. package/build-module/tooltip/index.js.map +1 -1
  514. package/build-module/tooltip/index.native.js +7 -7
  515. package/build-module/tooltip/index.native.js.map +1 -1
  516. package/build-module/tree-grid/index.js +51 -7
  517. package/build-module/tree-grid/index.js.map +1 -1
  518. package/build-module/truncate/component.js +1 -1
  519. package/build-module/truncate/component.js.map +1 -1
  520. package/build-module/truncate/utils.js +1 -1
  521. package/build-module/truncate/utils.js.map +1 -1
  522. package/build-module/ui/context/context-connect.js +9 -16
  523. package/build-module/ui/context/context-connect.js.map +1 -1
  524. package/build-module/ui/context/context-system-provider.js +2 -2
  525. package/build-module/ui/context/context-system-provider.js.map +1 -1
  526. package/build-module/ui/context/index.js.map +1 -1
  527. package/build-module/ui/control-group/component.js +1 -1
  528. package/build-module/ui/control-group/component.js.map +1 -1
  529. package/build-module/ui/control-label/component.js +1 -1
  530. package/build-module/ui/control-label/component.js.map +1 -1
  531. package/build-module/ui/form-group/form-group.js +1 -1
  532. package/build-module/ui/form-group/form-group.js.map +1 -1
  533. package/build-module/ui/shortcut/component.js.map +1 -1
  534. package/build-module/ui/spinner/component.js +1 -1
  535. package/build-module/ui/spinner/component.js.map +1 -1
  536. package/build-module/ui/tooltip/component.js +1 -1
  537. package/build-module/ui/tooltip/component.js.map +1 -1
  538. package/build-module/ui/tooltip/content.js +1 -1
  539. package/build-module/ui/tooltip/content.js.map +1 -1
  540. package/build-module/ui/utils/colors.js +2 -2
  541. package/build-module/ui/utils/colors.js.map +1 -1
  542. package/build-module/ui/utils/space.js +2 -2
  543. package/build-module/ui/utils/space.js.map +1 -1
  544. package/build-module/unit-control/index.js +39 -30
  545. package/build-module/unit-control/index.js.map +1 -1
  546. package/build-module/unit-control/index.native.js +5 -3
  547. package/build-module/unit-control/index.native.js.map +1 -1
  548. package/build-module/unit-control/unit-select-control.js +1 -1
  549. package/build-module/unit-control/unit-select-control.js.map +1 -1
  550. package/build-module/unit-control/utils.js +92 -100
  551. package/build-module/unit-control/utils.js.map +1 -1
  552. package/build-module/utils/breakpoint-values.js +1 -1
  553. package/build-module/utils/breakpoint-values.js.map +1 -1
  554. package/build-module/utils/colors-values.js +1 -1
  555. package/build-module/utils/colors-values.js.map +1 -1
  556. package/build-module/v-stack/component.js +1 -1
  557. package/build-module/v-stack/component.js.map +1 -1
  558. package/build-module/visually-hidden/component.js +1 -1
  559. package/build-module/visually-hidden/component.js.map +1 -1
  560. package/build-module/z-stack/component.js.map +1 -1
  561. package/build-style/style-rtl.css +8 -0
  562. package/build-style/style.css +8 -0
  563. package/build-types/base-field/hook.d.ts +2 -1
  564. package/build-types/base-field/hook.d.ts.map +1 -1
  565. package/build-types/card/card/hook.d.ts +2 -1
  566. package/build-types/card/card/hook.d.ts.map +1 -1
  567. package/build-types/card/card-body/hook.d.ts +2 -1
  568. package/build-types/card/card-body/hook.d.ts.map +1 -1
  569. package/build-types/card/card-divider/hook.d.ts +2 -3
  570. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  571. package/build-types/card/card-footer/hook.d.ts +2 -1
  572. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  573. package/build-types/card/card-header/hook.d.ts +2 -1
  574. package/build-types/card/card-header/hook.d.ts.map +1 -1
  575. package/build-types/card/card-media/hook.d.ts +2 -1
  576. package/build-types/card/card-media/hook.d.ts.map +1 -1
  577. package/build-types/color-picker/styles.d.ts +2 -4
  578. package/build-types/color-picker/styles.d.ts.map +1 -1
  579. package/build-types/confirm-dialog/component.d.ts +10 -6
  580. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  581. package/build-types/confirm-dialog/types.d.ts +2 -0
  582. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  583. package/build-types/divider/component.d.ts +2 -2
  584. package/build-types/divider/component.d.ts.map +1 -1
  585. package/build-types/divider/stories/index.d.ts +10 -0
  586. package/build-types/divider/stories/index.d.ts.map +1 -0
  587. package/build-types/divider/types.d.ts +1 -1
  588. package/build-types/divider/types.d.ts.map +1 -1
  589. package/build-types/elevation/hook.d.ts +2 -1
  590. package/build-types/elevation/hook.d.ts.map +1 -1
  591. package/build-types/flex/flex/hook.d.ts +2 -1
  592. package/build-types/flex/flex/hook.d.ts.map +1 -1
  593. package/build-types/flex/flex-block/hook.d.ts +2 -1
  594. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  595. package/build-types/flex/flex-item/hook.d.ts +2 -1
  596. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  597. package/build-types/flyout/flyout/hook.d.ts +2 -2
  598. package/build-types/grid/hook.d.ts +2 -1
  599. package/build-types/grid/hook.d.ts.map +1 -1
  600. package/build-types/h-stack/hook.d.ts +3 -2
  601. package/build-types/h-stack/hook.d.ts.map +1 -1
  602. package/build-types/heading/component.d.ts +3 -3
  603. package/build-types/heading/component.d.ts.map +1 -1
  604. package/build-types/heading/hook.d.ts +2 -1
  605. package/build-types/heading/hook.d.ts.map +1 -1
  606. package/build-types/heading/stories/index.d.ts +12 -0
  607. package/build-types/heading/stories/index.d.ts.map +1 -0
  608. package/build-types/input-control/index.d.ts +3 -3
  609. package/build-types/input-control/index.d.ts.map +1 -1
  610. package/build-types/input-control/input-base.d.ts +2 -2
  611. package/build-types/input-control/input-base.d.ts.map +1 -1
  612. package/build-types/input-control/input-field.d.ts +1 -3
  613. package/build-types/input-control/input-field.d.ts.map +1 -1
  614. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  615. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  616. package/build-types/input-control/types.d.ts +1 -1
  617. package/build-types/input-control/types.d.ts.map +1 -1
  618. package/build-types/item-group/item/hook.d.ts +2 -1
  619. package/build-types/item-group/item/hook.d.ts.map +1 -1
  620. package/build-types/item-group/item-group/hook.d.ts +2 -1
  621. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  622. package/build-types/navigator/index.d.ts +2 -0
  623. package/build-types/navigator/index.d.ts.map +1 -1
  624. package/build-types/navigator/navigator-back-button/component.d.ts +38 -0
  625. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -0
  626. package/build-types/navigator/navigator-back-button/hook.d.ts +283 -0
  627. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -0
  628. package/build-types/navigator/navigator-back-button/index.d.ts +2 -0
  629. package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -0
  630. package/build-types/navigator/navigator-button/component.d.ts +37 -0
  631. package/build-types/navigator/navigator-button/component.d.ts.map +1 -0
  632. package/build-types/navigator/navigator-button/hook.d.ts +283 -0
  633. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -0
  634. package/build-types/navigator/navigator-button/index.d.ts +2 -0
  635. package/build-types/navigator/navigator-button/index.d.ts.map +1 -0
  636. package/build-types/navigator/navigator-provider/component.d.ts +10 -20
  637. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  638. package/build-types/navigator/navigator-screen/component.d.ts +10 -20
  639. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  640. package/build-types/navigator/types.d.ts +21 -0
  641. package/build-types/navigator/types.d.ts.map +1 -1
  642. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  643. package/build-types/resizable-box/index.d.ts +2 -2
  644. package/build-types/resizable-box/index.d.ts.map +1 -1
  645. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  646. package/build-types/scrollable/hook.d.ts +2 -1
  647. package/build-types/scrollable/hook.d.ts.map +1 -1
  648. package/build-types/select-control/index.d.ts +1 -3
  649. package/build-types/select-control/index.d.ts.map +1 -1
  650. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  651. package/build-types/spacer/hook.d.ts +2 -1
  652. package/build-types/spacer/hook.d.ts.map +1 -1
  653. package/build-types/surface/hook.d.ts +2 -1
  654. package/build-types/surface/hook.d.ts.map +1 -1
  655. package/build-types/text/hook.d.ts +2 -1
  656. package/build-types/text/hook.d.ts.map +1 -1
  657. package/build-types/text/types.d.ts +1 -2
  658. package/build-types/text/types.d.ts.map +1 -1
  659. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  660. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
  661. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  662. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
  663. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  664. package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -1
  665. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  666. package/build-types/truncate/hook.d.ts +2 -1
  667. package/build-types/truncate/hook.d.ts.map +1 -1
  668. package/build-types/ui/context/context-connect.d.ts +18 -16
  669. package/build-types/ui/context/context-connect.d.ts.map +1 -1
  670. package/build-types/ui/context/index.d.ts +4 -4
  671. package/build-types/ui/context/index.d.ts.map +1 -1
  672. package/build-types/ui/context/wordpress-component.d.ts +3 -6
  673. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  674. package/build-types/ui/control-group/hook.d.ts +2 -1
  675. package/build-types/ui/control-group/hook.d.ts.map +1 -1
  676. package/build-types/ui/control-label/hook.d.ts +2 -1
  677. package/build-types/ui/control-label/hook.d.ts.map +1 -1
  678. package/build-types/ui/form-group/use-form-group.d.ts +6 -4
  679. package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
  680. package/build-types/unit-control/index.d.ts +3 -5
  681. package/build-types/unit-control/index.d.ts.map +1 -1
  682. package/build-types/unit-control/types.d.ts +4 -6
  683. package/build-types/unit-control/types.d.ts.map +1 -1
  684. package/build-types/unit-control/utils.d.ts +47 -38
  685. package/build-types/unit-control/utils.d.ts.map +1 -1
  686. package/build-types/v-stack/hook.d.ts +2 -1
  687. package/build-types/v-stack/hook.d.ts.map +1 -1
  688. package/build-types/z-stack/component.d.ts.map +1 -1
  689. package/package.json +19 -18
  690. package/src/alignment-matrix-control/README.md +4 -0
  691. package/src/alignment-matrix-control/stories/index.js +1 -1
  692. package/src/alignment-matrix-control/utils.js +1 -1
  693. package/src/angle-picker-control/angle-circle.js +1 -1
  694. package/src/animation/index.js +0 -1
  695. package/src/autocomplete/get-default-use-items.js +3 -3
  696. package/src/base-control/stories/index.js +65 -22
  697. package/src/base-field/hook.js +1 -1
  698. package/src/box-control/icon.js +1 -1
  699. package/src/box-control/index.js +5 -5
  700. package/src/box-control/stories/index.js +4 -1
  701. package/src/box-control/test/index.js +27 -7
  702. package/src/box-control/unit-control.js +1 -1
  703. package/src/box-control/utils.js +13 -9
  704. package/src/button/index.js +5 -5
  705. package/src/button/index.native.js +7 -7
  706. package/src/button/style.scss +1 -0
  707. package/src/card/card/component.js +1 -1
  708. package/src/card/card-body/component.js +1 -1
  709. package/src/card/card-divider/component.js +1 -1
  710. package/src/card/card-footer/component.js +1 -1
  711. package/src/card/card-header/component.js +1 -1
  712. package/src/card/card-media/component.js +1 -1
  713. package/src/color-palette/index.native.js +92 -75
  714. package/src/color-palette/style.native.scss +10 -5
  715. package/src/color-palette/style.scss +1 -0
  716. package/src/color-picker/color-display.tsx +1 -1
  717. package/src/color-picker/component.tsx +2 -2
  718. package/src/color-picker/hex-input.tsx +9 -9
  719. package/src/color-picker/styles.ts +1 -1
  720. package/src/color-picker/test/index.js +1 -1
  721. package/src/combobox-control/index.js +1 -1
  722. package/src/combobox-control/style.scss +1 -0
  723. package/src/confirm-dialog/README.md +56 -45
  724. package/src/confirm-dialog/component.tsx +6 -4
  725. package/src/confirm-dialog/stories/index.js +19 -0
  726. package/src/confirm-dialog/test/index.js +28 -0
  727. package/src/confirm-dialog/types.ts +2 -0
  728. package/src/date-time/style.scss +4 -0
  729. package/src/date-time/time.js +16 -5
  730. package/src/dimension-control/test/index.test.js +1 -1
  731. package/src/disabled/test/index.js +1 -1
  732. package/src/divider/component.tsx +5 -5
  733. package/src/divider/stories/index.tsx +70 -0
  734. package/src/divider/types.ts +3 -1
  735. package/src/draggable/index.js +3 -3
  736. package/src/draggable/stories/index.js +1 -1
  737. package/src/elevation/component.js +1 -1
  738. package/src/flex/flex/component.js +1 -1
  739. package/src/flex/flex-block/component.js +1 -1
  740. package/src/flex/flex-item/component.js +1 -1
  741. package/src/flyout/flyout/README.md +1 -1
  742. package/src/flyout/flyout/component.js +1 -1
  743. package/src/flyout/flyout-content/component.js +1 -1
  744. package/src/flyout/test/index.js +1 -1
  745. package/src/focal-point-picker/README.md +7 -0
  746. package/src/focal-point-picker/index.js +12 -7
  747. package/src/focal-point-picker/index.native.js +7 -7
  748. package/src/focal-point-picker/stories/index.js +30 -0
  749. package/src/focal-point-picker/test/index.js +44 -0
  750. package/src/focal-point-picker/tooltip/index.native.js +1 -1
  751. package/src/font-size-picker/README.md +1 -2
  752. package/src/font-size-picker/index.js +1 -2
  753. package/src/font-size-picker/stories/index.js +87 -108
  754. package/src/form-file-upload/README.md +1 -1
  755. package/src/form-file-upload/stories/index.js +51 -0
  756. package/src/form-token-field/index.js +6 -6
  757. package/src/form-token-field/style.scss +1 -0
  758. package/src/form-token-field/suggestions-list.js +2 -2
  759. package/src/form-token-field/test/index.js +6 -6
  760. package/src/grid/component.js +1 -1
  761. package/src/h-stack/component.js +1 -1
  762. package/src/heading/component.tsx +6 -6
  763. package/src/heading/hook.ts +1 -1
  764. package/src/heading/stories/index.tsx +37 -0
  765. package/src/higher-order/with-filters/test/index.js +1 -1
  766. package/src/higher-order/with-focus-outside/test/index.js +1 -1
  767. package/src/higher-order/with-notices/index.js +1 -1
  768. package/src/higher-order/with-notices/test/index.js +3 -3
  769. package/src/index.js +6 -4
  770. package/src/index.native.js +9 -5
  771. package/src/input-control/index.tsx +2 -2
  772. package/src/input-control/input-base.tsx +3 -3
  773. package/src/input-control/input-field.tsx +16 -15
  774. package/src/input-control/reducer/reducer.ts +3 -0
  775. package/src/input-control/stories/index.js +1 -1
  776. package/src/input-control/styles/input-control-styles.tsx +1 -0
  777. package/src/input-control/test/index.js +4 -4
  778. package/src/input-control/types.ts +1 -1
  779. package/src/isolated-event-container/index.js +1 -1
  780. package/src/item-group/item/component.tsx +2 -2
  781. package/src/item-group/item-group/component.tsx +2 -2
  782. package/src/item-group/test/index.js +0 -1
  783. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  784. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  785. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +10 -1
  786. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  787. package/src/mobile/bottom-sheet/index.native.js +11 -11
  788. package/src/mobile/bottom-sheet/link-cell.native.js +1 -1
  789. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  790. package/src/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  791. package/src/mobile/color-settings/palette.screen.native.js +39 -9
  792. package/src/mobile/color-settings/style.native.scss +4 -0
  793. package/src/mobile/global-styles-context/test/fixtures/theme.native.js +27 -0
  794. package/src/mobile/global-styles-context/test/utils.native.js +2 -2
  795. package/src/mobile/global-styles-context/utils.native.js +85 -16
  796. package/src/mobile/gradient/index.native.js +2 -2
  797. package/src/mobile/html-text-input/container.ios.js +3 -3
  798. package/src/mobile/html-text-input/index.native.js +1 -1
  799. package/src/mobile/html-text-input/test/index.native.js +14 -14
  800. package/src/mobile/image/index.native.js +1 -1
  801. package/src/mobile/image/style.native.scss +1 -0
  802. package/src/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  803. package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  804. package/src/mobile/link-picker/index.native.js +3 -3
  805. package/src/mobile/link-picker/link-picker-results.native.js +8 -8
  806. package/src/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  807. package/src/mobile/link-settings/index.native.js +1 -2
  808. package/src/mobile/link-settings/test/edit.native.js +15 -15
  809. package/src/modal/aria-helper.js +1 -1
  810. package/src/modal/index.js +2 -2
  811. package/src/navigable-container/container.js +2 -2
  812. package/src/navigable-container/tabbable.js +1 -1
  813. package/src/navigable-container/test/menu.js +5 -5
  814. package/src/navigable-container/test/tabbable.js +2 -2
  815. package/src/navigation/item/index.js +1 -1
  816. package/src/navigation/menu/index.js +1 -1
  817. package/src/navigation/stories/controlled-state.js +2 -2
  818. package/src/navigation/stories/index.js +1 -1
  819. package/src/navigator/index.ts +2 -0
  820. package/src/navigator/navigator-back-button/README.md +31 -0
  821. package/src/navigator/navigator-back-button/component.tsx +62 -0
  822. package/src/navigator/navigator-back-button/hook.ts +40 -0
  823. package/src/navigator/navigator-back-button/index.ts +1 -0
  824. package/src/navigator/navigator-button/README.md +38 -0
  825. package/src/navigator/navigator-button/component.tsx +61 -0
  826. package/src/navigator/navigator-button/hook.ts +55 -0
  827. package/src/navigator/navigator-button/index.ts +1 -0
  828. package/src/navigator/navigator-provider/README.md +20 -33
  829. package/src/navigator/navigator-provider/component.tsx +13 -23
  830. package/src/navigator/navigator-screen/README.md +1 -1
  831. package/src/navigator/navigator-screen/component.tsx +16 -25
  832. package/src/navigator/stories/index.js +24 -37
  833. package/src/navigator/test/index.js +105 -51
  834. package/src/navigator/types.ts +27 -1
  835. package/src/number-control/index.js +1 -1
  836. package/src/number-control/stories/index.js +1 -1
  837. package/src/panel/body.js +2 -2
  838. package/src/popover/index.js +3 -3
  839. package/src/popover/utils.js +6 -6
  840. package/src/radio/stories/index.js +1 -1
  841. package/src/radio-group/index.js +1 -1
  842. package/src/radio-group/stories/index.js +4 -1
  843. package/src/range-control/stories/index.js +1 -1
  844. package/src/range-control/styles/range-control-styles.js +1 -1
  845. package/src/range-control/test/index.js +2 -2
  846. package/src/resizable-box/index.tsx +2 -2
  847. package/src/resizable-box/resize-tooltip/index.tsx +2 -2
  848. package/src/resizable-box/resize-tooltip/label.tsx +2 -2
  849. package/src/sandbox/index.js +5 -5
  850. package/src/sandbox/index.native.js +1 -1
  851. package/src/scrollable/component.js +1 -1
  852. package/src/select-control/index.tsx +3 -4
  853. package/src/select-control/styles/select-control-styles.ts +1 -0
  854. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  855. package/src/slot-fill/bubbles-virtually/slot.js +1 -2
  856. package/src/slot-fill/fill.js +1 -1
  857. package/src/slot-fill/provider.js +1 -1
  858. package/src/snackbar/index.js +1 -1
  859. package/src/snackbar/list.js +1 -1
  860. package/src/spacer/component.tsx +2 -2
  861. package/src/style-provider/index.js +2 -2
  862. package/src/surface/component.js +1 -1
  863. package/src/tab-panel/test/index.js +1 -1
  864. package/src/text/component.js +1 -1
  865. package/src/text/test/index.js +2 -2
  866. package/src/text/types.ts +6 -8
  867. package/src/text-control/index.js +2 -2
  868. package/src/text-highlight/test/index.js +4 -4
  869. package/src/toggle-control/test/index.js +3 -3
  870. package/src/toggle-group-control/stories/index.js +1 -1
  871. package/src/toggle-group-control/test/__snapshots__/index.js.snap +1 -0
  872. package/src/toggle-group-control/toggle-group-control/component.tsx +4 -4
  873. package/src/toggle-group-control/toggle-group-control-option/component.tsx +2 -2
  874. package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -0
  875. package/src/toolbar/index.js +1 -1
  876. package/src/toolbar-group/test/index.js +2 -2
  877. package/src/tools-panel/stories/index.js +0 -1
  878. package/src/tools-panel/tools-panel/component.tsx +2 -2
  879. package/src/tools-panel/tools-panel-header/component.tsx +2 -2
  880. package/src/tools-panel/tools-panel-item/component.tsx +2 -2
  881. package/src/tooltip/index.js +3 -3
  882. package/src/tooltip/index.native.js +7 -7
  883. package/src/tooltip/test/index.js +2 -2
  884. package/src/tooltip/test/index.native.js +2 -2
  885. package/src/tree-grid/README.md +24 -1
  886. package/src/tree-grid/index.js +66 -7
  887. package/src/tree-grid/stories/index.js +4 -1
  888. package/src/tree-grid/test/__snapshots__/index.js.snap +1 -14
  889. package/src/tree-grid/test/index.js +259 -8
  890. package/src/truncate/component.js +1 -1
  891. package/src/truncate/utils.js +1 -1
  892. package/src/ui/context/{context-connect.js → context-connect.ts} +27 -16
  893. package/src/ui/context/context-system-provider.js +2 -2
  894. package/src/ui/context/{index.js → index.ts} +0 -0
  895. package/src/ui/context/wordpress-component.ts +3 -2
  896. package/src/ui/control-group/component.js +1 -1
  897. package/src/ui/control-label/component.js +1 -1
  898. package/src/ui/form-group/form-group.js +1 -1
  899. package/src/ui/shortcut/component.tsx +2 -2
  900. package/src/ui/spinner/component.js +1 -1
  901. package/src/ui/tooltip/component.js +1 -1
  902. package/src/ui/tooltip/content.js +1 -1
  903. package/src/ui/tooltip/test/index.js +4 -4
  904. package/src/ui/utils/colors.js +2 -2
  905. package/src/ui/utils/space.ts +2 -2
  906. package/src/unit-control/README.md +1 -1
  907. package/src/unit-control/index.native.js +5 -3
  908. package/src/unit-control/index.tsx +66 -37
  909. package/src/unit-control/stories/index.js +1 -1
  910. package/src/unit-control/test/index.js +102 -3
  911. package/src/unit-control/test/utils.js +56 -15
  912. package/src/unit-control/types.ts +5 -8
  913. package/src/unit-control/unit-select-control.tsx +1 -1
  914. package/src/unit-control/utils.ts +128 -125
  915. package/src/utils/breakpoint-values.js +1 -1
  916. package/src/utils/colors-values.js +1 -1
  917. package/src/utils/hooks/test/use-controlled-state.js +1 -1
  918. package/src/utils/hooks/test/use-controlled-value.js +3 -3
  919. package/src/utils/hooks/test/use-latest-ref.js +1 -1
  920. package/src/utils/test/math.js +2 -2
  921. package/src/utils/test/rtl.js +12 -12
  922. package/src/v-stack/component.js +1 -1
  923. package/src/visually-hidden/component.js +1 -1
  924. package/src/z-stack/component.tsx +2 -2
  925. package/tsconfig.json +1 -1
  926. package/tsconfig.tsbuildinfo +1 -1
  927. package/src/divider/stories/index.js +0 -64
  928. package/src/heading/stories/index.js +0 -24
  929. package/src/tools-panel/stories/typography-panel.js +0 -215
@@ -5,6 +5,7 @@
5
5
  display: block;
6
6
  border-radius: $radius-block-ui;
7
7
  height: $grid-unit-60;
8
+ font-family: inherit;
8
9
  text-align: right;
9
10
  width: 100%;
10
11
  background-image:
@@ -139,7 +139,7 @@ export const ColorDisplay = ( {
139
139
  }
140
140
  );
141
141
  useEffect( () => {
142
- // clear copyTimer on component unmount.
142
+ // Clear copyTimer on component unmount.
143
143
  return () => {
144
144
  if ( copyTimer.current ) {
145
145
  clearTimeout( copyTimer.current );
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { Ref } from 'react';
4
+ import type { ForwardedRef } from 'react';
5
5
  import { colord, extend, Colord } from 'colord';
6
6
  import namesPlugin from 'colord/plugins/names';
7
7
 
@@ -54,7 +54,7 @@ const options = [
54
54
 
55
55
  const ColorPicker = (
56
56
  props: WordPressComponentProps< ColorPickerProps, 'div', false >,
57
- forwardedRef: Ref< any >
57
+ forwardedRef: ForwardedRef< any >
58
58
  ) => {
59
59
  const {
60
60
  enableAlpha = false,
@@ -24,10 +24,13 @@ interface HexInputProps {
24
24
  }
25
25
 
26
26
  export const HexInput = ( { color, onChange, enableAlpha }: HexInputProps ) => {
27
- const handleValidate = ( value: string ) => {
28
- if ( ! colord( '#' + value ).isValid() ) {
29
- throw new Error( 'Invalid hex color input' );
30
- }
27
+ const handleChange = ( nextValue: string | undefined ) => {
28
+ if ( ! nextValue ) return;
29
+ const hexValue = nextValue.startsWith( '#' )
30
+ ? nextValue
31
+ : '#' + nextValue;
32
+
33
+ onChange( colord( hexValue ) );
31
34
  };
32
35
 
33
36
  return (
@@ -43,11 +46,8 @@ export const HexInput = ( { color, onChange, enableAlpha }: HexInputProps ) => {
43
46
  </Spacer>
44
47
  }
45
48
  value={ color.toHex().slice( 1 ).toUpperCase() }
46
- onChange={ ( nextValue ) => {
47
- onChange( colord( '#' + nextValue ) );
48
- } }
49
- onValidate={ handleValidate }
50
- maxLength={ enableAlpha ? 8 : 6 }
49
+ onChange={ handleChange }
50
+ maxLength={ enableAlpha ? 9 : 7 }
51
51
  label={ __( 'Hex color' ) }
52
52
  hideLabelFromVision
53
53
  />
@@ -50,7 +50,7 @@ const inputHeightStyle = `
50
50
  height: 40px;
51
51
  }`;
52
52
 
53
- // Make the Hue circle picker not go out of the bar
53
+ // Make the Hue circle picker not go out of the bar.
54
54
  const interactiveHueStyles = `
55
55
  .react-colorful__interactive {
56
56
  width: calc( 100% - ${ space( 2 ) } );
@@ -131,7 +131,7 @@ describe( 'ColorPicker', () => {
131
131
  h: 125,
132
132
  s: 0.2,
133
133
  l: 0.5,
134
- // add alpha to prove it's ignored
134
+ // Add alpha to prove it's ignored.
135
135
  a: 0.5,
136
136
  };
137
137
 
@@ -181,7 +181,7 @@ function ComboboxControl( {
181
181
  }
182
182
  }, [ matchingSuggestions, selectedSuggestion ] );
183
183
 
184
- // Announcements
184
+ // Announcements.
185
185
  useEffect( () => {
186
186
  const hasMatchingSuggestions = matchingSuggestions.length > 0;
187
187
  if ( isExpanded ) {
@@ -6,6 +6,7 @@ input.components-combobox-control__input[type="text"] {
6
6
  width: 100%;
7
7
  border: none;
8
8
  box-shadow: none;
9
+ font-family: inherit;
9
10
  font-size: 16px;
10
11
  padding: 2px;
11
12
  margin: 0;
@@ -15,61 +15,58 @@ The dialog is confirmed by clicking the _confirm_ button or by pressing the `Ent
15
15
  ### Uncontrolled mode
16
16
 
17
17
  Allows the component to be used standalone, just by declaring it as part of another React's component render method:
18
- * It will be automatically open (displayed) upon mounting;
19
- * It will be automatically closed when when clicking the _cancel_ button, by pressing the `ESC` key, or by clicking outside the dialog focus (i.e, the overlay);
20
- * `onCancel` is not mandatory but can be passed. Even if passed, the dialog will still be able to close itself.
18
+
19
+ - It will be automatically open (displayed) upon mounting;
20
+ - It will be automatically closed when when clicking the _cancel_ button, by pressing the `ESC` key, or by clicking outside the dialog focus (i.e, the overlay);
21
+ - `onCancel` is not mandatory but can be passed. Even if passed, the dialog will still be able to close itself.
21
22
 
22
23
  Activating this mode is as simple as omitting the `isOpen` prop. The only mandatory prop, in this case, is the `onConfirm` callback. The message is passed as the `children`. You can pass any JSX you'd like, which allows to further format the message or include sub-component if you'd like:
23
24
 
24
25
  ```jsx
25
- import {
26
- __experimentalConfirmDialog as ConfirmDialog
27
- } from '@wordpress/components';
26
+ import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';
28
27
 
29
28
  function Example() {
30
- return (
31
- <ConfirmDialog onConfirm={ () => console.debug(' Confirmed! ') }>
32
- Are you sure? <strong>This action cannot be undone!</strong>
33
- </ConfirmDialog>
34
- );
29
+ return (
30
+ <ConfirmDialog onConfirm={ () => console.debug( ' Confirmed! ' ) }>
31
+ Are you sure? <strong>This action cannot be undone!</strong>
32
+ </ConfirmDialog>
33
+ );
35
34
  }
36
35
  ```
37
36
 
38
37
  ### Controlled mode
39
38
 
40
39
  Let the parent component control when the dialog is open/closed. It's activated when a boolean value is passed to `isOpen`:
41
- * It will not be automatically closed. You need to let it know when to open/close by updating the value of the `isOpen` prop;
42
- * Both `onConfirm` and the `onCancel` callbacks are mandatory props in this mode;
43
- * You'll want to update the state that controls `isOpen` by updating it from the `onCancel` and `onConfirm` callbacks.
44
40
 
41
+ - It will not be automatically closed. You need to let it know when to open/close by updating the value of the `isOpen` prop;
42
+ - Both `onConfirm` and the `onCancel` callbacks are mandatory props in this mode;
43
+ - You'll want to update the state that controls `isOpen` by updating it from the `onCancel` and `onConfirm` callbacks.
45
44
 
46
45
  ```jsx
47
- import {
48
- __experimentalConfirmDialog as ConfirmDialog
49
- } from '@wordpress/components';
46
+ import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';
50
47
 
51
48
  function Example() {
52
- const [ isOpen, setIsOpen ] = useState( true );
53
-
54
- const handleConfirm = () => {
55
- console.debug( 'Confirmed!' );
56
- setIsOpen( false );
57
- }
58
-
59
- const handleCancel = () => {
60
- console.debug( 'Cancelled!' );
61
- setIsOpen( false );
62
- }
63
-
64
- return (
65
- <ConfirmDialog
66
- isOpen={ isOpen }
67
- onConfirm={ handleConfirm }
68
- onCancel={ handleCancel }
69
- >
70
- Are you sure? <strong>This action cannot be undone!</strong>
71
- </ConfirmDialog>
72
- );
49
+ const [ isOpen, setIsOpen ] = useState( true );
50
+
51
+ const handleConfirm = () => {
52
+ console.debug( 'Confirmed!' );
53
+ setIsOpen( false );
54
+ };
55
+
56
+ const handleCancel = () => {
57
+ console.debug( 'Cancelled!' );
58
+ setIsOpen( false );
59
+ };
60
+
61
+ return (
62
+ <ConfirmDialog
63
+ isOpen={ isOpen }
64
+ onConfirm={ handleConfirm }
65
+ onCancel={ handleCancel }
66
+ >
67
+ Are you sure? <strong>This action cannot be undone!</strong>
68
+ </ConfirmDialog>
69
+ );
73
70
  }
74
71
  ```
75
72
 
@@ -82,47 +79,61 @@ Multiple `ConfirmDialog's is an edge case that's currently not officially suppor
82
79
  ```ts
83
80
  type DialogInputEvent =
84
81
  | KeyboardEvent< HTMLDivElement >
85
- | MouseEvent< HTMLButtonElement >
82
+ | MouseEvent< HTMLButtonElement >;
86
83
  ```
87
84
 
88
85
  ## Props
89
86
 
90
87
  ### `title`: `string`
91
88
 
92
- - Required: No
89
+ - Required: No
93
90
 
94
91
  An optional `title` for the dialog. Setting a title will render it in a title bar at the top of the dialog, making it a bit taller. The bar will also include an `x` close button at the top-right corner.
95
92
 
96
93
  ### `children`: `React.ReactNode`
97
94
 
98
- - Required: Yes
95
+ - Required: Yes
99
96
 
100
97
  The actual message for the dialog. It's passed as children and any valid `ReactNode` is accepted:
101
98
 
102
99
  ```jsx
103
100
  <ConfirmDialog>
104
- Are you sure? <strong>This action cannot be undone!</strong>
101
+ Are you sure? <strong>This action cannot be undone!</strong>
105
102
  </ConfirmDialog>
106
103
  ```
107
104
 
108
105
  ### `isOpen`: `boolean`
109
106
 
110
- - Required: No
107
+ - Required: No
111
108
 
112
109
  Defines if the dialog is open (displayed) or closed (not rendered/displayed). It also implicitly toggles the controlled mode if set or the uncontrolled mode if it's not set.
113
110
 
114
111
  ### `onConfirm`: `( event: DialogInputEvent ) => void`
115
112
 
116
- - Required: Yes
113
+ - Required: Yes
117
114
 
118
115
  The callback that's called when the user confirms. A confirmation can happen when the `OK` button is clicked or when `Enter` is pressed.
119
116
 
120
117
  ### `onCancel`: `( event: DialogInputEvent ) => void`
121
118
 
122
- - Required: Only if `isOpen` is not set
119
+ - Required: Only if `isOpen` is not set
123
120
 
124
121
  The callback that's called when the user cancels. A cancellation can happen when the `Cancel` button is clicked, when the `ESC` key is pressed, or when a click outside of the dialog focus is detected (i.e. in the overlay).
125
122
 
126
123
  It's not required if `isOpen` is not set (uncontrolled mode), as the component will take care of closing itself, but you can still pass a callback if something must be done upon cancelling (the component will still close itself in this case).
127
124
 
128
125
  If `isOpen` is set (controlled mode), then it's required, and you need to set the state that defines `isOpen` to `false` as part of this callback if you want the dialog to close when the user cancels.
126
+
127
+ ### `confirmButtonText`: `string`
128
+
129
+ - Required: No
130
+ - Default: "OK"
131
+
132
+ The optional custom text to display as the confirmation button's label
133
+
134
+ ### `cancelButtonText`: `string`
135
+
136
+ - Required: No
137
+ - Default: "Cancel"
138
+
139
+ The optional custom text to display as the cancelation button's label
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { Ref, KeyboardEvent } from 'react';
4
+ import type { ForwardedRef, KeyboardEvent } from 'react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -28,13 +28,15 @@ import { useCx } from '../utils/hooks/use-cx';
28
28
 
29
29
  function ConfirmDialog(
30
30
  props: WordPressComponentProps< OwnProps, 'div', false >,
31
- forwardedRef: Ref< any >
31
+ forwardedRef: ForwardedRef< any >
32
32
  ) {
33
33
  const {
34
34
  isOpen: isOpenProp,
35
35
  onConfirm,
36
36
  onCancel,
37
37
  children,
38
+ confirmButtonText,
39
+ cancelButtonText,
38
40
  ...otherProps
39
41
  } = useContextSystem( props, 'ConfirmDialog' );
40
42
 
@@ -75,8 +77,8 @@ function ConfirmDialog(
75
77
  [ handleEvent, onConfirm ]
76
78
  );
77
79
 
78
- const cancelLabel = __( 'Cancel' );
79
- const confirmLabel = __( 'OK' );
80
+ const cancelLabel = cancelButtonText ?? __( 'Cancel' );
81
+ const confirmLabel = confirmButtonText ?? __( 'OK' );
80
82
 
81
83
  return (
82
84
  <>
@@ -25,6 +25,8 @@ export default {
25
25
 
26
26
  const daText = () =>
27
27
  text( 'message', 'Would you like to privately publish the post now?' );
28
+ const daCancelText = () => text( 'cancel button', 'No thanks' );
29
+ const daConfirmText = () => text( 'confirm button', 'Yes please!' );
28
30
 
29
31
  // Simplest usage: just declare the component with the required `onConfirm` prop.
30
32
  export const _default = () => {
@@ -40,6 +42,23 @@ export const _default = () => {
40
42
  );
41
43
  };
42
44
 
45
+ export const WithCustomButtonLabels = () => {
46
+ const [ confirmVal, setConfirmVal ] = useState( "Hasn't confirmed yet" );
47
+
48
+ return (
49
+ <>
50
+ <ConfirmDialog
51
+ onConfirm={ () => setConfirmVal( 'Confirmed!' ) }
52
+ cancelButtonText={ daCancelText() }
53
+ confirmButtonText={ daConfirmText() }
54
+ >
55
+ { daText() }
56
+ </ConfirmDialog>
57
+ <Heading level={ 1 }>{ confirmVal }</Heading>
58
+ </>
59
+ );
60
+ };
61
+
43
62
  export const WithJSXMessage = () => {
44
63
  const [ confirmVal, setConfirmVal ] = useState( "Hasn't confirmed yet" );
45
64
 
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import {
5
5
  render,
6
+ screen,
6
7
  fireEvent,
7
8
  waitForElementToBeRemoved,
8
9
  } from '@testing-library/react';
@@ -34,6 +35,33 @@ describe( 'Confirm', () => {
34
35
  expect( el ).toBeInTheDocument();
35
36
  } );
36
37
  } );
38
+ it( 'should render correctly with custom button labels', () => {
39
+ const cancelButtonText = 'No thanks';
40
+ const confirmButtonText = 'Yes please!';
41
+ render(
42
+ <ConfirmDialog
43
+ onConfirm={ noop }
44
+ onCancel={ noop }
45
+ cancelButtonText={ cancelButtonText }
46
+ confirmButtonText={ confirmButtonText }
47
+ >
48
+ Are you sure?
49
+ </ConfirmDialog>
50
+ );
51
+
52
+ const dialog = screen.getByRole( 'dialog' );
53
+ const elementsTexts = [ confirmButtonText, cancelButtonText ];
54
+
55
+ expect( dialog ).toBeInTheDocument();
56
+ expect(
57
+ screen.getByText( 'Are you sure?' )
58
+ ).toBeInTheDocument();
59
+
60
+ elementsTexts.forEach( ( txt ) => {
61
+ const el = screen.getByRole( 'button', { name: txt } );
62
+ expect( el ).toBeInTheDocument();
63
+ } );
64
+ } );
37
65
  } );
38
66
 
39
67
  describe( 'When uncontrolled', () => {
@@ -10,6 +10,8 @@ export type DialogInputEvent =
10
10
  type BaseProps = {
11
11
  children: ReactNode;
12
12
  onConfirm: ( event: DialogInputEvent ) => void;
13
+ confirmButtonText?: string;
14
+ cancelButtonText?: string;
13
15
  };
14
16
 
15
17
  type ControlledProps = BaseProps & {
@@ -237,6 +237,10 @@
237
237
  }
238
238
  }
239
239
 
240
+ .components-datetime__time-field-integer-field {
241
+ font-family: inherit;
242
+ }
243
+
240
244
  .components-datetime__time-field-hours-input,
241
245
  .components-datetime__time-field-minutes-input,
242
246
  .components-datetime__time-field-day-input {
@@ -36,12 +36,19 @@ function from12hTo24h( hours, isPm ) {
36
36
  * <UpdateOnBlurAsIntegerField>
37
37
  * A shared component to parse, validate, and handle remounting of the underlying form field element like <input> and <select>.
38
38
  *
39
- * @param {Object} props Component props.
40
- * @param {string} props.as Render the component as specific element tag, defaults to "input".
41
- * @param {number|string} props.value The default value of the component which will be parsed to integer.
42
- * @param {Function} props.onUpdate Call back when blurred and validated.
39
+ * @param {Object} props Component props.
40
+ * @param {string} props.as Render the component as specific element tag, defaults to "input".
41
+ * @param {number|string} props.value The default value of the component which will be parsed to integer.
42
+ * @param {Function} props.onUpdate Call back when blurred and validated.
43
+ * @param {string} [props.className]
43
44
  */
44
- function UpdateOnBlurAsIntegerField( { as, value, onUpdate, ...props } ) {
45
+ function UpdateOnBlurAsIntegerField( {
46
+ as,
47
+ value,
48
+ onUpdate,
49
+ className,
50
+ ...props
51
+ } ) {
45
52
  function handleBlur( event ) {
46
53
  const { target } = event;
47
54
 
@@ -70,6 +77,10 @@ function UpdateOnBlurAsIntegerField( { as, value, onUpdate, ...props } ) {
70
77
  key: value,
71
78
  defaultValue: value,
72
79
  onBlur: handleBlur,
80
+ className: classnames(
81
+ 'components-datetime__time-field-integer-field',
82
+ className
83
+ ),
73
84
  ...props,
74
85
  } );
75
86
  }
@@ -132,7 +132,7 @@ describe( 'DimensionControl', () => {
132
132
  .at( 0 )
133
133
  .simulate( 'change', {
134
134
  target: {
135
- value: '', // this happens when you select the "default" <option />
135
+ value: '', // This happens when you select the "default" <option />
136
136
  },
137
137
  } );
138
138
 
@@ -65,7 +65,7 @@ describe( 'Disabled', () => {
65
65
  </form>
66
66
  );
67
67
 
68
- // this is needed because TestUtils does not accept a stateless component.
68
+ // This is needed because TestUtils does not accept a stateless component.
69
69
  class DisabledComponent extends Component {
70
70
  render() {
71
71
  const { children, isDisabled } = this.props;
@@ -3,7 +3,7 @@
3
3
  */
4
4
  // eslint-disable-next-line no-restricted-imports
5
5
  import { Separator } from 'reakit';
6
- import type { Ref } from 'react';
6
+ import type { ForwardedRef } from 'react';
7
7
 
8
8
  /**
9
9
  * Internal dependencies
@@ -16,9 +16,9 @@ import {
16
16
  import { DividerView } from './styles';
17
17
  import type { Props } from './types';
18
18
 
19
- function Divider(
19
+ function UnconnectedDivider(
20
20
  props: WordPressComponentProps< Props, 'hr', false >,
21
- forwardedRef: Ref< any >
21
+ forwardedRef: ForwardedRef< any >
22
22
  ) {
23
23
  const contextProps = useContextSystem( props, 'Divider' );
24
24
 
@@ -53,6 +53,6 @@ function Divider(
53
53
  * }
54
54
  * ```
55
55
  */
56
- const ConnectedDivider = contextConnect( Divider, 'Divider' );
56
+ export const Divider = contextConnect( UnconnectedDivider, 'Divider' );
57
57
 
58
- export default ConnectedDivider;
58
+ export default Divider;
@@ -0,0 +1,70 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import { Text } from '../../text';
10
+ import { Divider } from '..';
11
+
12
+ const meta: ComponentMeta< typeof Divider > = {
13
+ component: Divider,
14
+ title: 'Components (Experimental)/Divider',
15
+ argTypes: {
16
+ margin: {
17
+ control: { type: 'number' },
18
+ },
19
+ marginStart: {
20
+ control: { type: 'number' },
21
+ },
22
+ marginEnd: {
23
+ control: { type: 'number' },
24
+ },
25
+ },
26
+ parameters: {
27
+ controls: { expanded: true },
28
+ docs: { source: { state: 'open' } },
29
+ },
30
+ };
31
+ export default meta;
32
+
33
+ const HorizontalTemplate: ComponentStory< typeof Divider > = ( args ) => (
34
+ <div>
35
+ <Text>Some text before the divider</Text>
36
+ <Divider { ...args } />
37
+ <Text>Some text after the divider</Text>
38
+ </div>
39
+ );
40
+
41
+ const VerticalTemplate: ComponentStory< typeof Divider > = ( args ) => {
42
+ const styles = {
43
+ display: 'flex',
44
+ alignItems: 'stretch',
45
+ justifyContent: 'start',
46
+ };
47
+
48
+ return (
49
+ <div style={ styles }>
50
+ <Text>Some text before the divider</Text>
51
+ <Divider { ...args } />
52
+ <Text>Some text after the divider</Text>
53
+ </div>
54
+ );
55
+ };
56
+
57
+ export const Horizontal: ComponentStory<
58
+ typeof Divider
59
+ > = HorizontalTemplate.bind( {} );
60
+ Horizontal.args = {
61
+ margin: 2,
62
+ };
63
+
64
+ export const Vertical: ComponentStory< typeof Divider > = VerticalTemplate.bind(
65
+ {}
66
+ );
67
+ Vertical.args = {
68
+ ...Horizontal.args,
69
+ orientation: 'vertical',
70
+ };
@@ -24,4 +24,6 @@ export interface OwnProps {
24
24
  marginEnd?: SpaceInput;
25
25
  }
26
26
 
27
- export interface Props extends Omit< SeparatorProps, 'children' >, OwnProps {}
27
+ export interface Props
28
+ extends Omit< SeparatorProps, 'children' | 'unstable_system' >,
29
+ OwnProps {}
@@ -143,7 +143,7 @@ export default function Draggable( {
143
143
  y = elementTopOffset - clonePadding;
144
144
  cloneWrapper.style.transform = `translate( ${ x }px, ${ y }px )`;
145
145
 
146
- // Hack: Remove iFrames as it's causing the embeds drag clone to freeze
146
+ // Hack: Remove iFrames as it's causing the embeds drag clone to freeze.
147
147
  Array.from(
148
148
  clone.querySelectorAll( 'iframe' )
149
149
  ).forEach( ( child ) => child.parentNode.removeChild( child ) );
@@ -162,7 +162,7 @@ export default function Draggable( {
162
162
  * @param {import('react').DragEvent<Element>} e
163
163
  */
164
164
  function over( e ) {
165
- //Skip doing any work if mouse has not moved.
165
+ // Skip doing any work if mouse has not moved.
166
166
  if ( cursorLeft === e.clientX && cursorTop === e.clientY ) {
167
167
  return;
168
168
  }
@@ -199,7 +199,7 @@ export default function Draggable( {
199
199
  }
200
200
 
201
201
  cleanup.current = () => {
202
- // Remove drag clone
202
+ // Remove drag clone.
203
203
  if ( cloneWrapper && cloneWrapper.parentNode ) {
204
204
  cloneWrapper.parentNode.removeChild( cloneWrapper );
205
205
  }
@@ -30,7 +30,7 @@ const Box = ( props ) => {
30
30
  const DraggalbeExample = () => {
31
31
  const [ isDragging, setDragging ] = useState( false );
32
32
 
33
- // Allow for the use of ID in the example
33
+ // Allow for the use of ID in the example.
34
34
  /* eslint-disable no-restricted-syntax */
35
35
  return (
36
36
  <div>
@@ -7,7 +7,7 @@ import { useElevation } from './hook';
7
7
 
8
8
  /**
9
9
  * @param {import('../ui/context').WordPressComponentProps<import('./types').Props, 'div'>} props
10
- * @param {import('react').Ref<any>} forwardedRef
10
+ * @param {import('react').ForwardedRef<any>} forwardedRef
11
11
  */
12
12
  function Elevation( props, forwardedRef ) {
13
13
  const elevationProps = useElevation( props );
@@ -8,7 +8,7 @@ import { View } from '../../view';
8
8
 
9
9
  /**
10
10
  * @param {import('../../ui/context').WordPressComponentProps<import('../types').FlexProps, 'div'>} props
11
- * @param {import('react').Ref<any>} forwardedRef
11
+ * @param {import('react').ForwardedRef<any>} forwardedRef
12
12
  */
13
13
  function Flex( props, forwardedRef ) {
14
14
  const { children, isColumn, ...otherProps } = useFlex( props );
@@ -7,7 +7,7 @@ import { useFlexBlock } from './hook';
7
7
 
8
8
  /**
9
9
  * @param {import('../../ui/context').WordPressComponentProps<import('../types').FlexBlockProps, 'div'>} props
10
- * @param {import('react').Ref<any>} forwardedRef
10
+ * @param {import('react').ForwardedRef<any>} forwardedRef
11
11
  */
12
12
  function FlexBlock( props, forwardedRef ) {
13
13
  const flexBlockProps = useFlexBlock( props );
@@ -7,7 +7,7 @@ import { useFlexItem } from './hook';
7
7
 
8
8
  /**
9
9
  * @param {import('../../ui/context').WordPressComponentProps<import('../types').FlexItemProps, 'div'>} props
10
- * @param {import('react').Ref<any>} forwardedRef
10
+ * @param {import('react').ForwardedRef<any>} forwardedRef
11
11
  */
12
12
  function FlexItem( props, forwardedRef ) {
13
13
  const flexItemProps = useFlexItem( props );
@@ -9,7 +9,7 @@ This feature is still experimental. “Experimental” means this is an early im
9
9
  ## Usage
10
10
 
11
11
  ```jsx
12
- import { Button, __experimentalFlyout as Flyout, __experimentalText as } from '@wordpress/components';
12
+ import { Button, __experimentalFlyout as Flyout, __experimentalText as Text } from '@wordpress/components';
13
13
 
14
14
  function Example() {
15
15
  return (