@wordpress/components 19.10.0 → 19.13.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 (1279) hide show
  1. package/CHANGELOG.md +97 -6
  2. package/CONTRIBUTING.md +94 -12
  3. package/README.md +1 -1
  4. package/build/alignment-matrix-control/index.js +8 -5
  5. package/build/alignment-matrix-control/index.js.map +1 -1
  6. package/build/angle-picker-control/index.js +2 -2
  7. package/build/angle-picker-control/index.js.map +1 -1
  8. package/build/autocomplete/autocompleter-ui.js +1 -1
  9. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  10. package/build/autocomplete/autocompleter-ui.native.js +2 -2
  11. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  12. package/build/autocomplete/index.js +12 -10
  13. package/build/autocomplete/index.js.map +1 -1
  14. package/build/border-box-control/border-box-control/component.js +22 -7
  15. package/build/border-box-control/border-box-control/component.js.map +1 -1
  16. package/build/border-box-control/border-box-control/hook.js +2 -2
  17. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  18. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  19. package/build/border-box-control/border-box-control-linked-button/hook.js +3 -2
  20. package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  21. package/build/border-box-control/border-box-control-split-controls/component.js +23 -8
  22. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  23. package/build/border-box-control/border-box-control-split-controls/hook.js +13 -4
  24. package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  25. package/build/border-box-control/border-box-control-visualizer/hook.js +7 -2
  26. package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  27. package/build/border-box-control/styles.js +25 -19
  28. package/build/border-box-control/styles.js.map +1 -1
  29. package/build/border-box-control/utils.js.map +1 -1
  30. package/build/border-control/border-control/component.js +5 -3
  31. package/build/border-control/border-control/component.js.map +1 -1
  32. package/build/border-control/border-control/hook.js +8 -5
  33. package/build/border-control/border-control/hook.js.map +1 -1
  34. package/build/border-control/border-control-dropdown/component.js +6 -2
  35. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  36. package/build/border-control/border-control-dropdown/hook.js +5 -5
  37. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  38. package/build/border-control/styles.js +58 -29
  39. package/build/border-control/styles.js.map +1 -1
  40. package/build/box-control/all-input-control.js +6 -10
  41. package/build/box-control/all-input-control.js.map +1 -1
  42. package/build/box-control/axial-input-controls.js.map +1 -1
  43. package/build/box-control/index.js +3 -7
  44. package/build/box-control/index.js.map +1 -1
  45. package/build/box-control/input-controls.js +6 -10
  46. package/build/box-control/input-controls.js.map +1 -1
  47. package/build/box-control/unit-control.js +4 -4
  48. package/build/box-control/unit-control.js.map +1 -1
  49. package/build/button/index.native.js +16 -4
  50. package/build/button/index.native.js.map +1 -1
  51. package/build/button-group/index.js +24 -7
  52. package/build/button-group/index.js.map +1 -1
  53. package/build/{flyout → button-group}/types.js +0 -0
  54. package/build/button-group/types.js.map +1 -0
  55. package/build/checkbox-control/index.js +34 -7
  56. package/build/checkbox-control/index.js.map +1 -1
  57. package/build/checkbox-control/types.js +6 -0
  58. package/build/checkbox-control/types.js.map +1 -0
  59. package/build/color-palette/index.js +14 -14
  60. package/build/color-palette/index.js.map +1 -1
  61. package/build/color-palette/index.native.js +4 -1
  62. package/build/color-palette/index.native.js.map +1 -1
  63. package/build/color-picker/color-copy-button.js +87 -0
  64. package/build/color-picker/color-copy-button.js.map +1 -0
  65. package/build/color-picker/component.js +5 -15
  66. package/build/color-picker/component.js.map +1 -1
  67. package/build/color-picker/hex-input.js +18 -1
  68. package/build/color-picker/hex-input.js.map +1 -1
  69. package/build/color-picker/index.native.js.map +1 -1
  70. package/build/color-picker/styles.js +11 -11
  71. package/build/color-picker/styles.js.map +1 -1
  72. package/build/combobox-control/index.js +4 -2
  73. package/build/combobox-control/index.js.map +1 -1
  74. package/build/confirm-dialog/component.js.map +1 -1
  75. package/build/custom-gradient-bar/constants.js +1 -3
  76. package/build/custom-gradient-bar/constants.js.map +1 -1
  77. package/build/custom-gradient-bar/control-points.js +15 -8
  78. package/build/custom-gradient-bar/control-points.js.map +1 -1
  79. package/build/custom-gradient-bar/index.js +5 -5
  80. package/build/custom-gradient-bar/index.js.map +1 -1
  81. package/build/custom-gradient-bar/utils.js +5 -7
  82. package/build/custom-gradient-bar/utils.js.map +1 -1
  83. package/build/custom-gradient-picker/utils.js +1 -1
  84. package/build/custom-gradient-picker/utils.js.map +1 -1
  85. package/build/custom-select-control/index.js.map +1 -1
  86. package/build/date-time/{date.js → date/index.js} +84 -21
  87. package/build/date-time/date/index.js.map +1 -0
  88. package/build/date-time/date/styles.js +70 -0
  89. package/build/date-time/date/styles.js.map +1 -0
  90. package/build/date-time/{utils.js → date/utils.js} +6 -4
  91. package/build/date-time/date/utils.js.map +1 -0
  92. package/build/date-time/date-time/index.js +175 -0
  93. package/build/date-time/date-time/index.js.map +1 -0
  94. package/build/date-time/date-time/styles.js +32 -0
  95. package/build/date-time/date-time/styles.js.map +1 -0
  96. package/build/date-time/index.js +2 -84
  97. package/build/date-time/index.js.map +1 -1
  98. package/build/date-time/time/index.js +322 -0
  99. package/build/date-time/time/index.js.map +1 -0
  100. package/build/date-time/time/styles.js +139 -0
  101. package/build/date-time/time/styles.js.map +1 -0
  102. package/build/date-time/{timezone.js → time/timezone.js} +8 -5
  103. package/build/date-time/time/timezone.js.map +1 -0
  104. package/build/date-time/types.js +6 -0
  105. package/build/date-time/types.js.map +1 -0
  106. package/build/dimension-control/index.js +1 -3
  107. package/build/dimension-control/index.js.map +1 -1
  108. package/build/disabled/index.js +1 -1
  109. package/build/disabled/index.js.map +1 -1
  110. package/build/divider/styles.js +5 -5
  111. package/build/divider/styles.js.map +1 -1
  112. package/build/draggable/index.js.map +1 -1
  113. package/build/draggable/index.native.js +233 -0
  114. package/build/draggable/index.native.js.map +1 -0
  115. package/build/drop-zone/provider.js.map +1 -1
  116. package/build/dropdown/index.js +11 -6
  117. package/build/dropdown/index.js.map +1 -1
  118. package/build/dropdown-menu/index.js +13 -2
  119. package/build/dropdown-menu/index.js.map +1 -1
  120. package/build/dropdown-menu/index.native.js +13 -2
  121. package/build/dropdown-menu/index.native.js.map +1 -1
  122. package/build/external-link/index.js +20 -8
  123. package/build/external-link/index.js.map +1 -1
  124. package/build/external-link/styles/external-link-styles.js +3 -3
  125. package/build/external-link/styles/external-link-styles.js.map +1 -1
  126. package/build/external-link/types.js +6 -0
  127. package/build/external-link/types.js.map +1 -0
  128. package/build/flex/flex/hook.js +9 -5
  129. package/build/flex/flex/hook.js.map +1 -1
  130. package/build/focal-point-picker/controls.js +3 -7
  131. package/build/focal-point-picker/controls.js.map +1 -1
  132. package/build/focal-point-picker/index.js.map +1 -1
  133. package/build/focal-point-picker/index.native.js +3 -3
  134. package/build/focal-point-picker/index.native.js.map +1 -1
  135. package/build/focal-point-picker/media.js +4 -8
  136. package/build/focal-point-picker/media.js.map +1 -1
  137. package/build/font-size-picker/index.js +1 -1
  138. package/build/font-size-picker/index.js.map +1 -1
  139. package/build/form-toggle/index.js +6 -4
  140. package/build/form-toggle/index.js.map +1 -1
  141. package/build/form-token-field/index.js +328 -359
  142. package/build/form-token-field/index.js.map +1 -1
  143. package/build/form-token-field/suggestions-list.js +26 -20
  144. package/build/form-token-field/suggestions-list.js.map +1 -1
  145. package/build/form-token-field/token-input.js +39 -53
  146. package/build/form-token-field/token-input.js.map +1 -1
  147. package/build/form-token-field/token.js +3 -3
  148. package/build/form-token-field/token.js.map +1 -1
  149. package/build/form-token-field/types.js +6 -0
  150. package/build/form-token-field/types.js.map +1 -0
  151. package/build/gradient-picker/index.js.map +1 -1
  152. package/build/heading/hook.js.map +1 -1
  153. package/build/higher-order/navigate-regions/index.js.map +1 -1
  154. package/build/higher-order/with-focus-return/index.js.map +1 -1
  155. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  156. package/build/icon/index.js.map +1 -1
  157. package/build/index.js +0 -8
  158. package/build/index.js.map +1 -1
  159. package/build/index.native.js +16 -0
  160. package/build/index.native.js.map +1 -1
  161. package/build/input-control/index.js +14 -9
  162. package/build/input-control/index.js.map +1 -1
  163. package/build/input-control/input-field.js +11 -36
  164. package/build/input-control/input-field.js.map +1 -1
  165. package/build/input-control/reducer/reducer.js +36 -24
  166. package/build/input-control/reducer/reducer.js.map +1 -1
  167. package/build/input-control/reducer/state.js +0 -1
  168. package/build/input-control/reducer/state.js.map +1 -1
  169. package/build/input-control/utils.js +46 -1
  170. package/build/input-control/utils.js.map +1 -1
  171. package/build/menu-items-choice/index.js +3 -7
  172. package/build/menu-items-choice/index.js.map +1 -1
  173. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  174. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  175. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  176. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  177. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +1 -7
  178. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  179. package/build/mobile/bottom-sheet/index.native.js +1 -1
  180. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  181. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  182. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  183. package/build/mobile/bottom-sheet-select-control/index.native.js +3 -2
  184. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  185. package/build/mobile/color-settings/index.native.js.map +1 -1
  186. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  187. package/build/mobile/gradient/index.native.js.map +1 -1
  188. package/build/mobile/html-text-input/index.native.js +19 -8
  189. package/build/mobile/html-text-input/index.native.js.map +1 -1
  190. package/build/mobile/inserter-button/index.native.js.map +1 -1
  191. package/build/mobile/keyboard-aware-flat-list/index.android.js +28 -5
  192. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  193. package/build/mobile/keyboard-aware-flat-list/index.ios.js +47 -24
  194. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  195. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  196. package/build/mobile/media-edit/index.native.js.map +1 -1
  197. package/build/mobile/segmented-control/index.native.js +1 -1
  198. package/build/mobile/segmented-control/index.native.js.map +1 -1
  199. package/build/modal/index.js +1 -1
  200. package/build/modal/index.js.map +1 -1
  201. package/build/navigable-container/container.js +4 -2
  202. package/build/navigable-container/container.js.map +1 -1
  203. package/build/navigation/context.js +12 -16
  204. package/build/navigation/context.js.map +1 -1
  205. package/build/navigation/index.js +3 -3
  206. package/build/navigation/index.js.map +1 -1
  207. package/build/navigation/item/index.js +3 -3
  208. package/build/navigation/item/index.js.map +1 -1
  209. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  210. package/build/navigator/navigator-button/hook.js.map +1 -1
  211. package/build/navigator/navigator-provider/component.js +1 -1
  212. package/build/navigator/navigator-provider/component.js.map +1 -1
  213. package/build/navigator/navigator-screen/component.js +1 -1
  214. package/build/navigator/navigator-screen/component.js.map +1 -1
  215. package/build/notice/index.js +5 -5
  216. package/build/notice/index.js.map +1 -1
  217. package/build/notice/list.js +4 -2
  218. package/build/notice/list.js.map +1 -1
  219. package/build/palette-edit/index.js +38 -7
  220. package/build/palette-edit/index.js.map +1 -1
  221. package/build/panel/body.js +3 -3
  222. package/build/panel/body.js.map +1 -1
  223. package/build/placeholder/index.js +26 -12
  224. package/build/placeholder/index.js.map +1 -1
  225. package/build/popover/index.js +228 -275
  226. package/build/popover/index.js.map +1 -1
  227. package/build/radio-control/index.js +43 -7
  228. package/build/radio-control/index.js.map +1 -1
  229. package/build/radio-control/types.js +6 -0
  230. package/build/radio-control/types.js.map +1 -0
  231. package/build/range-control/index.js +8 -6
  232. package/build/range-control/index.js.map +1 -1
  233. package/build/range-control/input-range.js +6 -10
  234. package/build/range-control/input-range.js.map +1 -1
  235. package/build/range-control/utils.js +7 -5
  236. package/build/range-control/utils.js.map +1 -1
  237. package/build/resizable-box/resize-tooltip/index.js +3 -3
  238. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  239. package/build/resizable-box/resize-tooltip/utils.js +8 -14
  240. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  241. package/build/responsive-wrapper/index.js.map +1 -1
  242. package/build/sandbox/index.native.js +1 -1
  243. package/build/sandbox/index.native.js.map +1 -1
  244. package/build/search-control/index.js +4 -6
  245. package/build/search-control/index.js.map +1 -1
  246. package/build/select-control/index.js +8 -4
  247. package/build/select-control/index.js.map +1 -1
  248. package/build/select-control/styles/select-control-styles.js +14 -11
  249. package/build/select-control/styles/select-control-styles.js.map +1 -1
  250. package/build/slot-fill/fill.js +1 -7
  251. package/build/slot-fill/fill.js.map +1 -1
  252. package/build/slot-fill/slot.js +14 -3
  253. package/build/slot-fill/slot.js.map +1 -1
  254. package/build/snackbar/index.js +7 -7
  255. package/build/snackbar/index.js.map +1 -1
  256. package/build/snackbar/list.js +3 -1
  257. package/build/snackbar/list.js.map +1 -1
  258. package/build/spacer/hook.js +11 -3
  259. package/build/spacer/hook.js.map +1 -1
  260. package/build/surface/component.js +7 -7
  261. package/build/surface/component.js.map +1 -1
  262. package/build/surface/hook.js +8 -11
  263. package/build/surface/hook.js.map +1 -1
  264. package/build/surface/index.js.map +1 -1
  265. package/build/surface/styles.js +8 -48
  266. package/build/surface/styles.js.map +1 -1
  267. package/build/tab-panel/index.js +3 -1
  268. package/build/tab-panel/index.js.map +1 -1
  269. package/build/text/hook.js +4 -4
  270. package/build/text/hook.js.map +1 -1
  271. package/build/text/utils.js.map +1 -1
  272. package/build/textarea-control/index.js +40 -6
  273. package/build/textarea-control/index.js.map +1 -1
  274. package/build/textarea-control/styles/textarea-control-styles.js +3 -3
  275. package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
  276. package/build/textarea-control/types.js +6 -0
  277. package/build/textarea-control/types.js.map +1 -0
  278. package/build/toggle-control/index.js +1 -3
  279. package/build/toggle-control/index.js.map +1 -1
  280. package/build/toggle-control/index.native.js +1 -7
  281. package/build/toggle-control/index.native.js.map +1 -1
  282. package/build/toggle-group-control/toggle-group-control/component.js +1 -3
  283. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  284. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -1
  285. package/build/toolbar/index.js.map +1 -1
  286. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  287. package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
  288. package/build/tooltip/index.js +3 -2
  289. package/build/tooltip/index.js.map +1 -1
  290. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  291. package/build/tree-select/index.js +57 -4
  292. package/build/tree-select/index.js.map +1 -1
  293. package/build/tree-select/types.js +6 -0
  294. package/build/tree-select/types.js.map +1 -0
  295. package/build/ui/form-group/form-group-content.js.map +1 -1
  296. package/build/unit-control/index.js.map +1 -1
  297. package/build/utils/hooks/index.js +0 -8
  298. package/build/utils/hooks/index.js.map +1 -1
  299. package/build/utils/unit-values.js.map +1 -1
  300. package/build/utils/values.js.map +1 -1
  301. package/build/z-stack/component.js +22 -3
  302. package/build/z-stack/component.js.map +1 -1
  303. package/build/z-stack/types.js +6 -0
  304. package/build/z-stack/types.js.map +1 -0
  305. package/build-module/alignment-matrix-control/index.js +7 -3
  306. package/build-module/alignment-matrix-control/index.js.map +1 -1
  307. package/build-module/angle-picker-control/index.js +1 -1
  308. package/build-module/angle-picker-control/index.js.map +1 -1
  309. package/build-module/autocomplete/autocompleter-ui.js +1 -1
  310. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  311. package/build-module/autocomplete/autocompleter-ui.native.js +2 -2
  312. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  313. package/build-module/autocomplete/index.js +13 -11
  314. package/build-module/autocomplete/index.js.map +1 -1
  315. package/build-module/border-box-control/border-box-control/component.js +22 -7
  316. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  317. package/build-module/border-box-control/border-box-control/hook.js +2 -2
  318. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  319. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  320. package/build-module/border-box-control/border-box-control-linked-button/hook.js +3 -2
  321. package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  322. package/build-module/border-box-control/border-box-control-split-controls/component.js +23 -8
  323. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  324. package/build-module/border-box-control/border-box-control-split-controls/hook.js +11 -4
  325. package/build-module/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  326. package/build-module/border-box-control/border-box-control-visualizer/hook.js +5 -2
  327. package/build-module/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  328. package/build-module/border-box-control/styles.js +15 -16
  329. package/build-module/border-box-control/styles.js.map +1 -1
  330. package/build-module/border-box-control/utils.js.map +1 -1
  331. package/build-module/border-control/border-control/component.js +5 -3
  332. package/build-module/border-control/border-control/component.js.map +1 -1
  333. package/build-module/border-control/border-control/hook.js +8 -5
  334. package/build-module/border-control/border-control/hook.js.map +1 -1
  335. package/build-module/border-control/border-control-dropdown/component.js +6 -2
  336. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  337. package/build-module/border-control/border-control-dropdown/hook.js +5 -5
  338. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  339. package/build-module/border-control/styles.js +56 -29
  340. package/build-module/border-control/styles.js.map +1 -1
  341. package/build-module/box-control/all-input-control.js +3 -5
  342. package/build-module/box-control/all-input-control.js.map +1 -1
  343. package/build-module/box-control/axial-input-controls.js.map +1 -1
  344. package/build-module/box-control/index.js +2 -5
  345. package/build-module/box-control/index.js.map +1 -1
  346. package/build-module/box-control/input-controls.js +3 -5
  347. package/build-module/box-control/input-controls.js.map +1 -1
  348. package/build-module/box-control/unit-control.js +3 -1
  349. package/build-module/box-control/unit-control.js.map +1 -1
  350. package/build-module/button/index.native.js +17 -5
  351. package/build-module/button/index.native.js.map +1 -1
  352. package/build-module/button-group/index.js +27 -7
  353. package/build-module/button-group/index.js.map +1 -1
  354. package/build-module/{flyout → button-group}/types.js +0 -0
  355. package/build-module/{flyout → button-group}/types.js.map +0 -0
  356. package/build-module/checkbox-control/index.js +31 -7
  357. package/build-module/checkbox-control/index.js.map +1 -1
  358. package/build-module/checkbox-control/types.js +2 -0
  359. package/{build/flyout → build-module/checkbox-control}/types.js.map +0 -0
  360. package/build-module/color-palette/index.js +12 -16
  361. package/build-module/color-palette/index.js.map +1 -1
  362. package/build-module/color-palette/index.native.js +4 -1
  363. package/build-module/color-palette/index.native.js.map +1 -1
  364. package/build-module/color-picker/color-copy-button.js +73 -0
  365. package/build-module/color-picker/color-copy-button.js.map +1 -0
  366. package/build-module/color-picker/component.js +6 -15
  367. package/build-module/color-picker/component.js.map +1 -1
  368. package/build-module/color-picker/hex-input.js +18 -1
  369. package/build-module/color-picker/hex-input.js.map +1 -1
  370. package/build-module/color-picker/index.native.js.map +1 -1
  371. package/build-module/color-picker/styles.js +9 -9
  372. package/build-module/color-picker/styles.js.map +1 -1
  373. package/build-module/combobox-control/index.js +5 -2
  374. package/build-module/combobox-control/index.js.map +1 -1
  375. package/build-module/confirm-dialog/component.js.map +1 -1
  376. package/build-module/custom-gradient-bar/constants.js +0 -1
  377. package/build-module/custom-gradient-bar/constants.js.map +1 -1
  378. package/build-module/custom-gradient-bar/control-points.js +16 -9
  379. package/build-module/custom-gradient-bar/control-points.js.map +1 -1
  380. package/build-module/custom-gradient-bar/index.js +6 -6
  381. package/build-module/custom-gradient-bar/index.js.map +1 -1
  382. package/build-module/custom-gradient-bar/utils.js +6 -8
  383. package/build-module/custom-gradient-bar/utils.js.map +1 -1
  384. package/build-module/custom-gradient-picker/utils.js +1 -1
  385. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  386. package/build-module/custom-select-control/index.js.map +1 -1
  387. package/build-module/date-time/{date.js → date/index.js} +81 -23
  388. package/build-module/date-time/date/index.js.map +1 -0
  389. package/build-module/date-time/date/styles.js +61 -0
  390. package/build-module/date-time/date/styles.js.map +1 -0
  391. package/build-module/date-time/date/utils.js +22 -0
  392. package/build-module/date-time/date/utils.js.map +1 -0
  393. package/build-module/date-time/date-time/index.js +145 -0
  394. package/build-module/date-time/date-time/index.js.map +1 -0
  395. package/build-module/date-time/date-time/styles.js +22 -0
  396. package/build-module/date-time/date-time/styles.js.map +1 -0
  397. package/build-module/date-time/index.js +2 -82
  398. package/build-module/date-time/index.js.map +1 -1
  399. package/build-module/date-time/time/index.js +302 -0
  400. package/build-module/date-time/time/index.js.map +1 -0
  401. package/build-module/date-time/time/styles.js +118 -0
  402. package/build-module/date-time/time/styles.js.map +1 -0
  403. package/build-module/date-time/{timezone.js → time/timezone.js} +7 -5
  404. package/build-module/date-time/time/timezone.js.map +1 -0
  405. package/build-module/date-time/types.js +2 -0
  406. package/build-module/date-time/types.js.map +1 -0
  407. package/build-module/dimension-control/index.js +1 -2
  408. package/build-module/dimension-control/index.js.map +1 -1
  409. package/build-module/disabled/index.js +1 -1
  410. package/build-module/disabled/index.js.map +1 -1
  411. package/build-module/divider/styles.js +5 -5
  412. package/build-module/divider/styles.js.map +1 -1
  413. package/build-module/draggable/index.js.map +1 -1
  414. package/build-module/draggable/index.native.js +216 -0
  415. package/build-module/draggable/index.native.js.map +1 -0
  416. package/build-module/drop-zone/provider.js.map +1 -1
  417. package/build-module/dropdown/index.js +11 -6
  418. package/build-module/dropdown/index.js.map +1 -1
  419. package/build-module/dropdown-menu/index.js +12 -1
  420. package/build-module/dropdown-menu/index.js.map +1 -1
  421. package/build-module/dropdown-menu/index.native.js +12 -1
  422. package/build-module/dropdown-menu/index.native.js.map +1 -1
  423. package/build-module/external-link/index.js +22 -7
  424. package/build-module/external-link/index.js.map +1 -1
  425. package/build-module/external-link/styles/external-link-styles.js +3 -3
  426. package/build-module/external-link/styles/external-link-styles.js.map +1 -1
  427. package/build-module/external-link/types.js +2 -0
  428. package/build-module/external-link/types.js.map +1 -0
  429. package/build-module/flex/flex/hook.js +7 -5
  430. package/build-module/flex/flex/hook.js.map +1 -1
  431. package/build-module/focal-point-picker/controls.js +3 -5
  432. package/build-module/focal-point-picker/controls.js.map +1 -1
  433. package/build-module/focal-point-picker/index.js.map +1 -1
  434. package/build-module/focal-point-picker/index.native.js +3 -3
  435. package/build-module/focal-point-picker/index.native.js.map +1 -1
  436. package/build-module/focal-point-picker/media.js +3 -5
  437. package/build-module/focal-point-picker/media.js.map +1 -1
  438. package/build-module/font-size-picker/index.js +1 -1
  439. package/build-module/font-size-picker/index.js.map +1 -1
  440. package/build-module/form-toggle/index.js +1 -1
  441. package/build-module/form-toggle/index.js.map +1 -1
  442. package/build-module/form-token-field/index.js +329 -361
  443. package/build-module/form-token-field/index.js.map +1 -1
  444. package/build-module/form-token-field/suggestions-list.js +32 -23
  445. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  446. package/build-module/form-token-field/token-input.js +43 -58
  447. package/build-module/form-token-field/token-input.js.map +1 -1
  448. package/build-module/form-token-field/token.js +3 -1
  449. package/build-module/form-token-field/token.js.map +1 -1
  450. package/build-module/form-token-field/types.js +2 -0
  451. package/build-module/form-token-field/types.js.map +1 -0
  452. package/build-module/gradient-picker/index.js.map +1 -1
  453. package/build-module/heading/hook.js.map +1 -1
  454. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  455. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  456. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  457. package/build-module/icon/index.js.map +1 -1
  458. package/build-module/index.js +0 -1
  459. package/build-module/index.js.map +1 -1
  460. package/build-module/index.native.js +2 -1
  461. package/build-module/index.native.js.map +1 -1
  462. package/build-module/input-control/index.js +10 -5
  463. package/build-module/input-control/index.js.map +1 -1
  464. package/build-module/input-control/input-field.js +3 -26
  465. package/build-module/input-control/input-field.js.map +1 -1
  466. package/build-module/input-control/reducer/reducer.js +38 -26
  467. package/build-module/input-control/reducer/reducer.js.map +1 -1
  468. package/build-module/input-control/reducer/state.js +0 -1
  469. package/build-module/input-control/reducer/state.js.map +1 -1
  470. package/build-module/input-control/utils.js +49 -3
  471. package/build-module/input-control/utils.js.map +1 -1
  472. package/build-module/menu-items-choice/index.js +3 -5
  473. package/build-module/menu-items-choice/index.js.map +1 -1
  474. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  475. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  476. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  477. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  478. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +1 -6
  479. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  480. package/build-module/mobile/bottom-sheet/index.native.js +1 -1
  481. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  482. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  483. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  484. package/build-module/mobile/bottom-sheet-select-control/index.native.js +3 -2
  485. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  486. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  487. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  488. package/build-module/mobile/gradient/index.native.js.map +1 -1
  489. package/build-module/mobile/html-text-input/index.native.js +20 -9
  490. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  491. package/build-module/mobile/inserter-button/index.native.js.map +1 -1
  492. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +21 -5
  493. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  494. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +42 -25
  495. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  496. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  497. package/build-module/mobile/media-edit/index.native.js.map +1 -1
  498. package/build-module/mobile/segmented-control/index.native.js +2 -2
  499. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  500. package/build-module/modal/index.js +1 -1
  501. package/build-module/modal/index.js.map +1 -1
  502. package/build-module/navigable-container/container.js +5 -2
  503. package/build-module/navigable-container/container.js.map +1 -1
  504. package/build-module/navigation/context.js +3 -5
  505. package/build-module/navigation/context.js.map +1 -1
  506. package/build-module/navigation/index.js +3 -1
  507. package/build-module/navigation/index.js.map +1 -1
  508. package/build-module/navigation/item/index.js +3 -1
  509. package/build-module/navigation/item/index.js.map +1 -1
  510. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  511. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  512. package/build-module/navigator/navigator-provider/component.js +1 -1
  513. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  514. package/build-module/navigator/navigator-screen/component.js +1 -1
  515. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  516. package/build-module/notice/index.js +2 -1
  517. package/build-module/notice/index.js.map +1 -1
  518. package/build-module/notice/list.js +4 -1
  519. package/build-module/notice/list.js.map +1 -1
  520. package/build-module/palette-edit/index.js +37 -7
  521. package/build-module/palette-edit/index.js.map +1 -1
  522. package/build-module/panel/body.js +3 -1
  523. package/build-module/panel/body.js.map +1 -1
  524. package/build-module/placeholder/index.js +24 -11
  525. package/build-module/placeholder/index.js.map +1 -1
  526. package/build-module/popover/index.js +230 -277
  527. package/build-module/popover/index.js.map +1 -1
  528. package/build-module/radio-control/index.js +40 -7
  529. package/build-module/radio-control/index.js.map +1 -1
  530. package/build-module/radio-control/types.js +2 -0
  531. package/build-module/radio-control/types.js.map +1 -0
  532. package/build-module/range-control/index.js +4 -2
  533. package/build-module/range-control/index.js.map +1 -1
  534. package/build-module/range-control/input-range.js +2 -5
  535. package/build-module/range-control/input-range.js.map +1 -1
  536. package/build-module/range-control/utils.js +4 -1
  537. package/build-module/range-control/utils.js.map +1 -1
  538. package/build-module/resizable-box/resize-tooltip/index.js +2 -1
  539. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  540. package/build-module/resizable-box/resize-tooltip/utils.js +7 -10
  541. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  542. package/build-module/responsive-wrapper/index.js.map +1 -1
  543. package/build-module/sandbox/index.native.js +1 -1
  544. package/build-module/sandbox/index.native.js.map +1 -1
  545. package/build-module/search-control/index.js +6 -7
  546. package/build-module/search-control/index.js.map +1 -1
  547. package/build-module/select-control/index.js +6 -2
  548. package/build-module/select-control/index.js.map +1 -1
  549. package/build-module/select-control/styles/select-control-styles.js +14 -11
  550. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  551. package/build-module/slot-fill/fill.js +1 -6
  552. package/build-module/slot-fill/fill.js.map +1 -1
  553. package/build-module/slot-fill/slot.js +12 -2
  554. package/build-module/slot-fill/slot.js.map +1 -1
  555. package/build-module/snackbar/index.js +3 -1
  556. package/build-module/snackbar/index.js.map +1 -1
  557. package/build-module/snackbar/list.js +4 -1
  558. package/build-module/snackbar/list.js.map +1 -1
  559. package/build-module/spacer/hook.js +10 -2
  560. package/build-module/spacer/hook.js.map +1 -1
  561. package/build-module/surface/component.js +7 -7
  562. package/build-module/surface/component.js.map +1 -1
  563. package/build-module/surface/hook.js +8 -11
  564. package/build-module/surface/hook.js.map +1 -1
  565. package/build-module/surface/index.js.map +1 -1
  566. package/build-module/surface/styles.js +8 -48
  567. package/build-module/surface/styles.js.map +1 -1
  568. package/build-module/tab-panel/index.js +3 -1
  569. package/build-module/tab-panel/index.js.map +1 -1
  570. package/build-module/text/hook.js +4 -4
  571. package/build-module/text/hook.js.map +1 -1
  572. package/build-module/text/utils.js.map +1 -1
  573. package/build-module/textarea-control/index.js +36 -5
  574. package/build-module/textarea-control/index.js.map +1 -1
  575. package/build-module/textarea-control/styles/textarea-control-styles.js +3 -3
  576. package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
  577. package/build-module/textarea-control/types.js +2 -0
  578. package/build-module/textarea-control/types.js.map +1 -0
  579. package/build-module/toggle-control/index.js +1 -2
  580. package/build-module/toggle-control/index.js.map +1 -1
  581. package/build-module/toggle-control/index.native.js +1 -6
  582. package/build-module/toggle-control/index.native.js.map +1 -1
  583. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -3
  584. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  585. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +1 -1
  586. package/build-module/toolbar/index.js.map +1 -1
  587. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  588. package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
  589. package/build-module/tooltip/index.js +3 -2
  590. package/build-module/tooltip/index.js.map +1 -1
  591. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  592. package/build-module/tree-select/index.js +53 -3
  593. package/build-module/tree-select/index.js.map +1 -1
  594. package/build-module/tree-select/types.js +2 -0
  595. package/build-module/tree-select/types.js.map +1 -0
  596. package/build-module/ui/form-group/form-group-content.js.map +1 -1
  597. package/build-module/unit-control/index.js.map +1 -1
  598. package/build-module/utils/hooks/index.js +0 -1
  599. package/build-module/utils/hooks/index.js.map +1 -1
  600. package/build-module/utils/unit-values.js.map +1 -1
  601. package/build-module/utils/values.js.map +1 -1
  602. package/build-module/z-stack/component.js +21 -2
  603. package/build-module/z-stack/component.js.map +1 -1
  604. package/build-module/z-stack/types.js +2 -0
  605. package/build-module/z-stack/types.js.map +1 -0
  606. package/build-style/style-rtl.css +75 -360
  607. package/build-style/style.css +71 -364
  608. package/build-types/base-control/stories/index.d.ts.map +1 -1
  609. package/build-types/base-field/hook.d.ts +0 -1
  610. package/build-types/base-field/hook.d.ts.map +1 -1
  611. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  612. package/build-types/border-box-control/border-box-control/hook.d.ts +3 -2
  613. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  614. package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
  615. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +0 -1
  616. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  617. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  618. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +4 -2
  619. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  620. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +0 -1
  621. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  622. package/build-types/border-box-control/styles.d.ts +4 -3
  623. package/build-types/border-box-control/styles.d.ts.map +1 -1
  624. package/build-types/border-box-control/types.d.ts +40 -13
  625. package/build-types/border-box-control/types.d.ts.map +1 -1
  626. package/build-types/border-box-control/utils.d.ts.map +1 -1
  627. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  628. package/build-types/border-control/border-control/hook.d.ts +2 -2
  629. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  630. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  631. package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -1
  632. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  633. package/build-types/border-control/border-control-style-picker/hook.d.ts +0 -1
  634. package/build-types/border-control/border-control-style-picker/hook.d.ts.map +1 -1
  635. package/build-types/border-control/styles.d.ts +2 -1
  636. package/build-types/border-control/styles.d.ts.map +1 -1
  637. package/build-types/border-control/types.d.ts +18 -6
  638. package/build-types/border-control/types.d.ts.map +1 -1
  639. package/build-types/button-group/index.d.ts +25 -0
  640. package/build-types/button-group/index.d.ts.map +1 -0
  641. package/build-types/button-group/stories/index.d.ts +12 -0
  642. package/build-types/button-group/stories/index.d.ts.map +1 -0
  643. package/build-types/button-group/types.d.ts +11 -0
  644. package/build-types/button-group/types.d.ts.map +1 -0
  645. package/build-types/card/card/hook.d.ts +0 -1
  646. package/build-types/card/card/hook.d.ts.map +1 -1
  647. package/build-types/card/card-body/hook.d.ts +0 -1
  648. package/build-types/card/card-body/hook.d.ts.map +1 -1
  649. package/build-types/card/card-divider/hook.d.ts +0 -1
  650. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  651. package/build-types/card/card-footer/hook.d.ts +0 -1
  652. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  653. package/build-types/card/card-header/hook.d.ts +0 -1
  654. package/build-types/card/card-header/hook.d.ts.map +1 -1
  655. package/build-types/card/card-media/hook.d.ts +0 -1
  656. package/build-types/card/card-media/hook.d.ts.map +1 -1
  657. package/build-types/card/types.d.ts +1 -1
  658. package/build-types/card/types.d.ts.map +1 -1
  659. package/build-types/checkbox-control/index.d.ts +26 -0
  660. package/build-types/checkbox-control/index.d.ts.map +1 -0
  661. package/build-types/checkbox-control/stories/index.d.ts +13 -0
  662. package/build-types/checkbox-control/stories/index.d.ts.map +1 -0
  663. package/build-types/checkbox-control/test/index.d.ts +2 -0
  664. package/build-types/checkbox-control/test/index.d.ts.map +1 -0
  665. package/build-types/checkbox-control/types.d.ts +35 -0
  666. package/build-types/checkbox-control/types.d.ts.map +1 -0
  667. package/build-types/color-palette/index.d.ts +1 -0
  668. package/build-types/color-palette/index.d.ts.map +1 -1
  669. package/build-types/color-palette/test/utils.d.ts +2 -0
  670. package/build-types/color-palette/test/utils.d.ts.map +1 -0
  671. package/build-types/color-picker/color-copy-button.d.ts +4 -0
  672. package/build-types/color-picker/color-copy-button.d.ts.map +1 -0
  673. package/build-types/color-picker/component.d.ts.map +1 -1
  674. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  675. package/build-types/color-picker/styles.d.ts +8 -8
  676. package/build-types/color-picker/styles.d.ts.map +1 -1
  677. package/build-types/color-picker/types.d.ts +8 -0
  678. package/build-types/color-picker/types.d.ts.map +1 -1
  679. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  680. package/build-types/date-time/date/index.d.ts +25 -0
  681. package/build-types/date-time/date/index.d.ts.map +1 -0
  682. package/build-types/date-time/date/styles.d.ts +23 -0
  683. package/build-types/date-time/date/styles.d.ts.map +1 -0
  684. package/build-types/date-time/date/test/index.d.ts +2 -0
  685. package/build-types/date-time/date/test/index.d.ts.map +1 -0
  686. package/build-types/date-time/date/test/utils.d.ts +2 -0
  687. package/build-types/date-time/date/test/utils.d.ts.map +1 -0
  688. package/build-types/date-time/date/utils.d.ts +15 -0
  689. package/build-types/date-time/date/utils.d.ts.map +1 -0
  690. package/build-types/date-time/date-time/index.d.ts +33 -0
  691. package/build-types/date-time/date-time/index.d.ts.map +1 -0
  692. package/build-types/date-time/date-time/styles.d.ts +6 -0
  693. package/build-types/date-time/date-time/styles.d.ts.map +1 -0
  694. package/build-types/date-time/index.d.ts +9 -0
  695. package/build-types/date-time/index.d.ts.map +1 -0
  696. package/build-types/date-time/stories/date-time.d.ts +14 -0
  697. package/build-types/date-time/stories/date-time.d.ts.map +1 -0
  698. package/build-types/date-time/stories/date.d.ts +14 -0
  699. package/build-types/date-time/stories/date.d.ts.map +1 -0
  700. package/build-types/date-time/stories/time.d.ts +12 -0
  701. package/build-types/date-time/stories/time.d.ts.map +1 -0
  702. package/build-types/date-time/stories/utils.d.ts +3 -0
  703. package/build-types/date-time/stories/utils.d.ts.map +1 -0
  704. package/build-types/date-time/time/index.d.ts +25 -0
  705. package/build-types/date-time/time/index.d.ts.map +1 -0
  706. package/build-types/date-time/time/styles.d.ts +111 -0
  707. package/build-types/date-time/time/styles.d.ts.map +1 -0
  708. package/build-types/date-time/time/test/index.d.ts +2 -0
  709. package/build-types/date-time/time/test/index.d.ts.map +1 -0
  710. package/build-types/date-time/time/timezone.d.ts +8 -0
  711. package/build-types/date-time/time/timezone.d.ts.map +1 -0
  712. package/build-types/date-time/types.d.ts +90 -0
  713. package/build-types/date-time/types.d.ts.map +1 -0
  714. package/build-types/divider/styles.d.ts.map +1 -1
  715. package/build-types/dropdown/index.d.ts.map +1 -1
  716. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  717. package/build-types/elevation/hook.d.ts +0 -1
  718. package/build-types/elevation/hook.d.ts.map +1 -1
  719. package/build-types/external-link/index.d.ts +17 -0
  720. package/build-types/external-link/index.d.ts.map +1 -0
  721. package/build-types/external-link/stories/index.d.ts +12 -0
  722. package/build-types/external-link/stories/index.d.ts.map +1 -0
  723. package/build-types/external-link/styles/external-link-styles.d.ts +10 -0
  724. package/build-types/external-link/styles/external-link-styles.d.ts.map +1 -0
  725. package/build-types/external-link/types.d.ts +15 -0
  726. package/build-types/external-link/types.d.ts.map +1 -0
  727. package/build-types/flex/flex/hook.d.ts +0 -1
  728. package/build-types/flex/flex/hook.d.ts.map +1 -1
  729. package/build-types/flex/flex-block/hook.d.ts +0 -1
  730. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  731. package/build-types/flex/flex-item/hook.d.ts +0 -1
  732. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  733. package/build-types/form-token-field/index.d.ts +15 -0
  734. package/build-types/form-token-field/index.d.ts.map +1 -0
  735. package/build-types/form-token-field/stories/index.d.ts +13 -0
  736. package/build-types/form-token-field/stories/index.d.ts.map +1 -0
  737. package/build-types/form-token-field/suggestions-list.d.ts +10 -0
  738. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -0
  739. package/build-types/form-token-field/test/lib/fixtures.d.ts +26 -0
  740. package/build-types/form-token-field/test/lib/fixtures.d.ts.map +1 -0
  741. package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts +18 -0
  742. package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts.map +1 -0
  743. package/build-types/form-token-field/token-input.d.ts +12 -0
  744. package/build-types/form-token-field/token-input.d.ts.map +1 -0
  745. package/build-types/form-token-field/token.d.ts +4 -0
  746. package/build-types/form-token-field/token.d.ts.map +1 -0
  747. package/build-types/form-token-field/types.d.ts +176 -0
  748. package/build-types/form-token-field/types.d.ts.map +1 -0
  749. package/build-types/grid/hook.d.ts +0 -1
  750. package/build-types/grid/hook.d.ts.map +1 -1
  751. package/build-types/h-stack/hook.d.ts +0 -1
  752. package/build-types/h-stack/hook.d.ts.map +1 -1
  753. package/build-types/heading/hook.d.ts +0 -1
  754. package/build-types/heading/hook.d.ts.map +1 -1
  755. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -1
  756. package/build-types/input-control/index.d.ts +1 -1
  757. package/build-types/input-control/index.d.ts.map +1 -1
  758. package/build-types/input-control/input-field.d.ts +1 -1
  759. package/build-types/input-control/input-field.d.ts.map +1 -1
  760. package/build-types/input-control/reducer/reducer.d.ts +5 -3
  761. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  762. package/build-types/input-control/reducer/state.d.ts +2 -2
  763. package/build-types/input-control/reducer/state.d.ts.map +1 -1
  764. package/build-types/input-control/stories/index.d.ts +5 -5
  765. package/build-types/input-control/stories/index.d.ts.map +1 -1
  766. package/build-types/input-control/utils.d.ts +17 -0
  767. package/build-types/input-control/utils.d.ts.map +1 -1
  768. package/build-types/item-group/item/hook.d.ts +0 -1
  769. package/build-types/item-group/item/hook.d.ts.map +1 -1
  770. package/build-types/item-group/item-group/hook.d.ts +0 -1
  771. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  772. package/build-types/navigator/navigator-back-button/hook.d.ts +0 -1
  773. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  774. package/build-types/navigator/navigator-button/hook.d.ts +0 -1
  775. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  776. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  777. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  778. package/build-types/popover/index.d.ts +6 -7
  779. package/build-types/popover/index.d.ts.map +1 -1
  780. package/build-types/radio-control/index.d.ts +31 -0
  781. package/build-types/radio-control/index.d.ts.map +1 -0
  782. package/build-types/radio-control/stories/index.d.ts +12 -0
  783. package/build-types/radio-control/stories/index.d.ts.map +1 -0
  784. package/build-types/radio-control/types.d.ts +29 -0
  785. package/build-types/radio-control/types.d.ts.map +1 -0
  786. package/build-types/range-control/index.d.ts +5 -5
  787. package/build-types/range-control/index.d.ts.map +1 -1
  788. package/build-types/range-control/input-range.d.ts +4 -4
  789. package/build-types/range-control/input-range.d.ts.map +1 -1
  790. package/build-types/range-control/utils.d.ts.map +1 -1
  791. package/build-types/resizable-box/index.d.ts +1 -1
  792. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  793. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  794. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  795. package/build-types/scrollable/hook.d.ts +0 -1
  796. package/build-types/scrollable/hook.d.ts.map +1 -1
  797. package/build-types/select-control/index.d.ts +1 -1
  798. package/build-types/select-control/index.d.ts.map +1 -1
  799. package/build-types/select-control/stories/index.d.ts +3 -3
  800. package/build-types/select-control/stories/index.d.ts.map +1 -1
  801. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  802. package/build-types/select-control/types.d.ts +1 -1
  803. package/build-types/select-control/types.d.ts.map +1 -1
  804. package/build-types/slot-fill/fill.d.ts.map +1 -1
  805. package/build-types/slot-fill/slot.d.ts.map +1 -1
  806. package/build-types/spacer/hook.d.ts +0 -1
  807. package/build-types/spacer/hook.d.ts.map +1 -1
  808. package/build-types/surface/component.d.ts +3 -2
  809. package/build-types/surface/component.d.ts.map +1 -1
  810. package/build-types/surface/hook.d.ts +4 -5
  811. package/build-types/surface/hook.d.ts.map +1 -1
  812. package/build-types/surface/index.d.ts +2 -2
  813. package/build-types/surface/index.d.ts.map +1 -1
  814. package/build-types/surface/stories/index.d.ts +12 -0
  815. package/build-types/surface/stories/index.d.ts.map +1 -0
  816. package/build-types/surface/styles.d.ts +10 -21
  817. package/build-types/surface/styles.d.ts.map +1 -1
  818. package/build-types/surface/test/index.d.ts +2 -0
  819. package/build-types/{flyout/flyout → surface/test}/index.d.ts.map +1 -1
  820. package/build-types/surface/types.d.ts +1 -1
  821. package/build-types/surface/types.d.ts.map +1 -1
  822. package/build-types/text/hook.d.ts +0 -1
  823. package/build-types/text/hook.d.ts.map +1 -1
  824. package/build-types/text/utils.d.ts.map +1 -1
  825. package/build-types/text-control/index.d.ts +1 -1
  826. package/build-types/text-control/index.d.ts.map +1 -1
  827. package/build-types/text-control/stories/index.d.ts.map +1 -1
  828. package/build-types/textarea-control/index.d.ts +29 -0
  829. package/build-types/textarea-control/index.d.ts.map +1 -0
  830. package/build-types/textarea-control/stories/index.d.ts +12 -0
  831. package/build-types/textarea-control/stories/index.d.ts.map +1 -0
  832. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +6 -0
  833. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -0
  834. package/build-types/textarea-control/types.d.ts +26 -0
  835. package/build-types/textarea-control/types.d.ts.map +1 -0
  836. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  837. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +1 -1
  838. package/build-types/tools-panel/tools-panel/hook.d.ts +0 -1
  839. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  840. package/build-types/tools-panel/tools-panel-header/hook.d.ts +0 -1
  841. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  842. package/build-types/tools-panel/tools-panel-item/hook.d.ts +0 -1
  843. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  844. package/build-types/tooltip/index.d.ts.map +1 -1
  845. package/build-types/tree-select/index.d.ts +53 -0
  846. package/build-types/tree-select/index.d.ts.map +1 -0
  847. package/build-types/tree-select/stories/index.d.ts +12 -0
  848. package/build-types/tree-select/stories/index.d.ts.map +1 -0
  849. package/build-types/tree-select/types.d.ts +30 -0
  850. package/build-types/tree-select/types.d.ts.map +1 -0
  851. package/build-types/truncate/hook.d.ts +0 -1
  852. package/build-types/truncate/hook.d.ts.map +1 -1
  853. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  854. package/build-types/ui/control-group/hook.d.ts +0 -1
  855. package/build-types/ui/control-group/hook.d.ts.map +1 -1
  856. package/build-types/ui/control-label/hook.d.ts +0 -1
  857. package/build-types/ui/control-label/hook.d.ts.map +1 -1
  858. package/build-types/ui/form-group/use-form-group.d.ts +0 -2
  859. package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
  860. package/build-types/unit-control/index.d.ts +1 -1
  861. package/build-types/unit-control/index.d.ts.map +1 -1
  862. package/build-types/unit-control/stories/index.d.ts.map +1 -1
  863. package/build-types/utils/hooks/index.d.ts +0 -1
  864. package/build-types/utils/unit-values.d.ts.map +1 -1
  865. package/build-types/utils/values.d.ts.map +1 -1
  866. package/build-types/v-stack/hook.d.ts +0 -1
  867. package/build-types/v-stack/hook.d.ts.map +1 -1
  868. package/build-types/z-stack/component.d.ts +18 -28
  869. package/build-types/z-stack/component.d.ts.map +1 -1
  870. package/build-types/z-stack/stories/index.d.ts +6 -0
  871. package/build-types/z-stack/stories/index.d.ts.map +1 -0
  872. package/build-types/z-stack/types.d.ts +33 -0
  873. package/build-types/z-stack/types.d.ts.map +1 -0
  874. package/package.json +20 -20
  875. package/src/alignment-matrix-control/index.js +6 -3
  876. package/src/angle-picker-control/index.js +1 -1
  877. package/src/autocomplete/autocompleter-ui.js +1 -1
  878. package/src/autocomplete/autocompleter-ui.native.js +2 -2
  879. package/src/autocomplete/index.js +21 -9
  880. package/src/autocomplete/style.scss +1 -1
  881. package/src/base-control/stories/index.tsx +2 -3
  882. package/src/border-box-control/border-box-control/README.md +10 -14
  883. package/src/border-box-control/border-box-control/component.tsx +21 -4
  884. package/src/border-box-control/border-box-control/hook.ts +2 -2
  885. package/src/border-box-control/border-box-control-linked-button/component.tsx +2 -5
  886. package/src/border-box-control/border-box-control-linked-button/hook.ts +10 -6
  887. package/src/border-box-control/border-box-control-split-controls/component.tsx +26 -7
  888. package/src/border-box-control/border-box-control-split-controls/hook.ts +18 -4
  889. package/src/border-box-control/border-box-control-visualizer/hook.ts +14 -6
  890. package/src/border-box-control/stories/index.js +1 -0
  891. package/src/border-box-control/styles.ts +20 -9
  892. package/src/border-box-control/types.ts +40 -14
  893. package/src/border-box-control/utils.ts +5 -2
  894. package/src/border-control/border-control/README.md +0 -7
  895. package/src/border-control/border-control/component.tsx +4 -2
  896. package/src/border-control/border-control/hook.ts +15 -7
  897. package/src/border-control/border-control-dropdown/component.tsx +18 -11
  898. package/src/border-control/border-control-dropdown/hook.ts +7 -5
  899. package/src/border-control/stories/index.js +1 -0
  900. package/src/border-control/styles.ts +82 -22
  901. package/src/border-control/types.ts +18 -6
  902. package/src/box-control/all-input-control.js +2 -4
  903. package/src/box-control/axial-input-controls.js +4 -6
  904. package/src/box-control/index.js +2 -5
  905. package/src/box-control/input-controls.js +33 -36
  906. package/src/box-control/test/index.js +120 -109
  907. package/src/box-control/unit-control.js +2 -1
  908. package/src/button/index.native.js +34 -20
  909. package/src/button-group/index.tsx +47 -0
  910. package/src/button-group/stories/index.tsx +41 -0
  911. package/src/button-group/types.ts +11 -0
  912. package/src/card/stories/index.js +10 -5
  913. package/src/card/types.ts +1 -1
  914. package/src/checkbox-control/README.md +10 -8
  915. package/src/checkbox-control/{index.js → index.tsx} +51 -17
  916. package/src/checkbox-control/stories/{index.js → index.tsx} +48 -27
  917. package/src/checkbox-control/test/__snapshots__/index.tsx.snap +42 -0
  918. package/src/checkbox-control/test/index.tsx +110 -0
  919. package/src/checkbox-control/types.ts +36 -0
  920. package/src/circular-option-picker/style.scss +1 -0
  921. package/src/color-palette/index.js +17 -17
  922. package/src/color-palette/index.native.js +3 -0
  923. package/src/color-palette/stories/index.js +25 -1
  924. package/src/color-palette/style.scss +3 -18
  925. package/src/color-palette/test/utils.ts +24 -0
  926. package/src/color-picker/color-copy-button.tsx +76 -0
  927. package/src/color-picker/component.tsx +18 -38
  928. package/src/color-picker/hex-input.tsx +16 -0
  929. package/src/color-picker/index.native.js +7 -4
  930. package/src/color-picker/styles.ts +5 -1
  931. package/src/color-picker/types.ts +9 -0
  932. package/src/combobox-control/index.js +4 -2
  933. package/src/confirm-dialog/component.tsx +7 -8
  934. package/src/custom-gradient-bar/constants.js +2 -2
  935. package/src/custom-gradient-bar/control-points.js +20 -16
  936. package/src/custom-gradient-bar/index.js +11 -11
  937. package/src/custom-gradient-bar/test/utils.js +79 -0
  938. package/src/custom-gradient-bar/utils.js +6 -18
  939. package/src/custom-gradient-picker/style.scss +1 -3
  940. package/src/custom-gradient-picker/utils.js +5 -4
  941. package/src/custom-select-control/index.js +2 -1
  942. package/src/custom-select-control/stories/index.js +1 -2
  943. package/src/date-time/README.md +29 -10
  944. package/src/date-time/{datepicker.scss → date/datepicker.scss} +0 -0
  945. package/src/date-time/{date.js → date/index.tsx} +77 -25
  946. package/src/date-time/date/style.scss +85 -0
  947. package/src/date-time/date/styles.ts +55 -0
  948. package/src/date-time/{test/date.js → date/test/index.tsx} +5 -4
  949. package/src/date-time/{test/utils.js → date/test/utils.ts} +1 -1
  950. package/src/date-time/date/utils.ts +20 -0
  951. package/src/date-time/date-time/index.tsx +215 -0
  952. package/src/date-time/date-time/styles.ts +8 -0
  953. package/src/date-time/index.ts +9 -0
  954. package/src/date-time/stories/date-time.tsx +73 -0
  955. package/src/date-time/stories/date.tsx +72 -0
  956. package/src/date-time/stories/time.tsx +51 -0
  957. package/src/date-time/stories/utils.ts +9 -0
  958. package/src/date-time/style.scss +1 -262
  959. package/src/date-time/time/index.tsx +356 -0
  960. package/src/date-time/time/styles.ts +119 -0
  961. package/src/date-time/{test/time.js → time/test/index.tsx} +119 -57
  962. package/src/date-time/{timezone.js → time/timezone.tsx} +9 -5
  963. package/src/date-time/types.ts +104 -0
  964. package/src/dimension-control/index.js +1 -2
  965. package/src/disabled/index.js +1 -1
  966. package/src/divider/styles.ts +2 -3
  967. package/src/draggable/index.js +3 -3
  968. package/src/draggable/index.native.js +234 -0
  969. package/src/draggable/style.native.scss +3 -0
  970. package/src/draggable/test/index.native.js +130 -0
  971. package/src/drop-zone/provider.js +1 -2
  972. package/src/dropdown/index.js +14 -5
  973. package/src/dropdown/style.scss +1 -1
  974. package/src/dropdown-menu/index.js +11 -1
  975. package/src/dropdown-menu/index.native.js +11 -1
  976. package/src/external-link/README.md +18 -0
  977. package/src/external-link/{index.js → index.tsx} +26 -6
  978. package/src/external-link/stories/index.tsx +36 -0
  979. package/src/external-link/styles/{external-link-styles.js → external-link-styles.ts} +0 -0
  980. package/src/external-link/types.ts +15 -0
  981. package/src/flex/flex/hook.js +4 -1
  982. package/src/focal-point-picker/controls.js +1 -5
  983. package/src/focal-point-picker/index.js +2 -8
  984. package/src/focal-point-picker/index.native.js +3 -3
  985. package/src/focal-point-picker/media.js +2 -5
  986. package/src/font-size-picker/index.js +3 -1
  987. package/src/form-file-upload/test/index.js +8 -4
  988. package/src/form-toggle/index.js +2 -1
  989. package/src/form-toggle/test/index.js +1 -2
  990. package/src/form-token-field/index.tsx +694 -0
  991. package/src/form-token-field/stories/index.tsx +103 -0
  992. package/src/form-token-field/style.scss +2 -1
  993. package/src/form-token-field/{suggestions-list.js → suggestions-list.tsx} +45 -29
  994. package/src/form-token-field/test/index.js +64 -31
  995. package/src/form-token-field/test/lib/{token-field-wrapper.js → token-field-wrapper.tsx} +24 -9
  996. package/src/form-token-field/token-input.tsx +76 -0
  997. package/src/form-token-field/{token.js → token.tsx} +4 -2
  998. package/src/form-token-field/types.ts +178 -0
  999. package/src/gradient-picker/index.js +4 -3
  1000. package/src/heading/hook.ts +5 -4
  1001. package/src/higher-order/navigate-regions/index.js +7 -5
  1002. package/src/higher-order/with-filters/test/index.js +43 -36
  1003. package/src/higher-order/with-focus-return/index.js +14 -13
  1004. package/src/higher-order/with-spoken-messages/index.js +8 -7
  1005. package/src/higher-order/with-spoken-messages/test/index.js +1 -1
  1006. package/src/icon/index.tsx +2 -2
  1007. package/src/index.js +0 -1
  1008. package/src/index.native.js +1 -0
  1009. package/src/input-control/index.tsx +10 -3
  1010. package/src/input-control/input-field.tsx +12 -31
  1011. package/src/input-control/reducer/reducer.ts +63 -47
  1012. package/src/input-control/reducer/state.ts +2 -3
  1013. package/src/input-control/utils.ts +56 -2
  1014. package/src/item-group/stories/index.js +24 -19
  1015. package/src/menu-item/test/index.js +2 -1
  1016. package/src/menu-items-choice/index.js +2 -5
  1017. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +2 -4
  1018. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  1019. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +1 -1
  1020. package/src/mobile/bottom-sheet/cell.native.js +2 -3
  1021. package/src/mobile/bottom-sheet/cycle-picker-cell.native.js +3 -5
  1022. package/src/mobile/bottom-sheet/index.native.js +15 -18
  1023. package/src/mobile/bottom-sheet/picker-cell.native.js +2 -7
  1024. package/src/mobile/bottom-sheet/stepper-cell/index.native.js +4 -6
  1025. package/src/mobile/bottom-sheet-select-control/index.native.js +7 -2
  1026. package/src/mobile/color-settings/index.native.js +2 -4
  1027. package/src/mobile/global-styles-context/index.native.js +8 -7
  1028. package/src/mobile/gradient/index.native.js +12 -9
  1029. package/src/mobile/gradient/test/index.native.js +1 -3
  1030. package/src/mobile/html-text-input/index.native.js +47 -32
  1031. package/src/mobile/html-text-input/style.android.scss +1 -15
  1032. package/src/mobile/html-text-input/style.ios.scss +1 -15
  1033. package/src/mobile/html-text-input/{style-common.native.scss → style.scss} +16 -0
  1034. package/src/mobile/inserter-button/index.native.js +2 -6
  1035. package/src/mobile/keyboard-aware-flat-list/index.android.js +15 -5
  1036. package/src/mobile/keyboard-aware-flat-list/index.ios.js +75 -46
  1037. package/src/mobile/link-settings/image-link-destinations-screen.native.js +6 -2
  1038. package/src/mobile/media-edit/index.native.js +2 -3
  1039. package/src/mobile/segmented-control/index.native.js +4 -5
  1040. package/src/mobile/utils/test/index.native.js +3 -12
  1041. package/src/modal/index.js +1 -1
  1042. package/src/navigable-container/container.js +3 -2
  1043. package/src/navigable-container/test/menu.js +1 -2
  1044. package/src/navigable-container/test/tabbable.js +1 -2
  1045. package/src/navigation/context.js +2 -5
  1046. package/src/navigation/index.js +2 -1
  1047. package/src/navigation/item/index.js +2 -1
  1048. package/src/navigation/stories/controlled-state.js +1 -1
  1049. package/src/navigation/stories/more-examples.js +2 -3
  1050. package/src/navigation/test/index.js +252 -52
  1051. package/src/navigator/navigator-back-button/hook.ts +14 -12
  1052. package/src/navigator/navigator-button/hook.ts +14 -13
  1053. package/src/navigator/navigator-provider/component.tsx +2 -6
  1054. package/src/navigator/navigator-screen/component.tsx +3 -3
  1055. package/src/navigator/stories/index.js +16 -10
  1056. package/src/notice/index.js +2 -1
  1057. package/src/notice/list.js +3 -1
  1058. package/src/palette-edit/index.js +37 -9
  1059. package/src/palette-edit/style.scss +0 -7
  1060. package/src/palette-edit/test/index.js +63 -0
  1061. package/src/panel/README.md +1 -1
  1062. package/src/panel/body.js +2 -1
  1063. package/src/placeholder/README.md +7 -6
  1064. package/src/placeholder/index.js +27 -10
  1065. package/src/placeholder/style.scss +23 -0
  1066. package/src/placeholder/test/index.js +7 -0
  1067. package/src/popover/README.md +7 -9
  1068. package/src/popover/index.js +256 -370
  1069. package/src/popover/style.scss +20 -190
  1070. package/src/popover/test/__snapshots__/index.js.snap +6 -18
  1071. package/src/query-controls/README.md +1 -1
  1072. package/src/radio-control/README.md +17 -23
  1073. package/src/radio-control/index.tsx +107 -0
  1074. package/src/radio-control/stories/index.tsx +72 -0
  1075. package/src/radio-control/types.ts +32 -0
  1076. package/src/range-control/index.js +4 -2
  1077. package/src/range-control/input-range.js +2 -5
  1078. package/src/range-control/utils.js +3 -1
  1079. package/src/resizable-box/resize-tooltip/index.tsx +2 -1
  1080. package/src/resizable-box/resize-tooltip/utils.ts +5 -10
  1081. package/src/responsive-wrapper/index.js +2 -4
  1082. package/src/sandbox/index.native.js +1 -1
  1083. package/src/sandbox/test/index.js +4 -6
  1084. package/src/search-control/index.js +6 -7
  1085. package/src/select-control/README.md +11 -0
  1086. package/src/select-control/index.tsx +9 -2
  1087. package/src/select-control/stories/index.tsx +3 -4
  1088. package/src/select-control/styles/select-control-styles.ts +6 -3
  1089. package/src/select-control/types.ts +1 -1
  1090. package/src/slot-fill/README.md +1 -1
  1091. package/src/slot-fill/fill.js +1 -5
  1092. package/src/slot-fill/slot.js +12 -2
  1093. package/src/snackbar/index.js +1 -1
  1094. package/src/snackbar/list.js +2 -1
  1095. package/src/spacer/hook.ts +13 -13
  1096. package/src/surface/README.md +15 -15
  1097. package/src/surface/{component.js → component.tsx} +13 -7
  1098. package/src/surface/{hook.js → hook.ts} +13 -12
  1099. package/src/surface/{index.js → index.ts} +0 -0
  1100. package/src/surface/stories/index.tsx +40 -0
  1101. package/src/surface/{styles.js → styles.ts} +15 -44
  1102. package/src/surface/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  1103. package/src/surface/test/{index.js → index.tsx} +2 -1
  1104. package/src/surface/types.ts +1 -1
  1105. package/src/tab-panel/index.js +3 -1
  1106. package/src/tab-panel/style.scss +1 -1
  1107. package/src/text/hook.js +4 -1
  1108. package/src/text/utils.js +2 -3
  1109. package/src/text-control/stories/index.tsx +4 -6
  1110. package/src/textarea-control/README.md +14 -20
  1111. package/src/textarea-control/index.tsx +86 -0
  1112. package/src/textarea-control/stories/index.tsx +58 -0
  1113. package/src/textarea-control/styles/{textarea-control-styles.js → textarea-control-styles.ts} +0 -0
  1114. package/src/textarea-control/types.ts +30 -0
  1115. package/src/toggle-control/index.js +1 -2
  1116. package/src/toggle-control/index.native.js +2 -6
  1117. package/src/toggle-group-control/test/__snapshots__/index.js.snap +4 -10
  1118. package/src/toggle-group-control/toggle-group-control/component.tsx +7 -3
  1119. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +2 -4
  1120. package/src/toolbar/index.js +1 -2
  1121. package/src/tools-panel/tools-panel/hook.ts +2 -4
  1122. package/src/tools-panel/tools-panel-header/hook.ts +2 -5
  1123. package/src/tooltip/index.js +9 -2
  1124. package/src/tooltip/style.scss +2 -4
  1125. package/src/tooltip/test/index.native.js +1 -1
  1126. package/src/tree-grid/roving-tab-index-item.js +2 -4
  1127. package/src/tree-grid/test/index.js +2 -3
  1128. package/src/tree-select/README.md +2 -2
  1129. package/src/tree-select/index.tsx +99 -0
  1130. package/src/tree-select/stories/index.tsx +80 -0
  1131. package/src/tree-select/types.ts +35 -0
  1132. package/src/ui/context/wordpress-component.ts +4 -5
  1133. package/src/ui/form-group/form-group-content.js +4 -4
  1134. package/src/unit-control/index.tsx +7 -9
  1135. package/src/unit-control/stories/index.tsx +8 -12
  1136. package/src/unit-control/test/index.tsx +88 -11
  1137. package/src/utils/hooks/index.js +0 -1
  1138. package/src/utils/hooks/stories/use-cx.js +8 -7
  1139. package/src/utils/hooks/test/use-controlled-state.js +2 -1
  1140. package/src/utils/unit-values.ts +2 -1
  1141. package/src/utils/values.js +2 -3
  1142. package/src/z-stack/README.md +14 -3
  1143. package/src/z-stack/component.tsx +24 -29
  1144. package/src/z-stack/stories/index.tsx +76 -0
  1145. package/src/z-stack/types.ts +33 -0
  1146. package/tsconfig.json +12 -2
  1147. package/tsconfig.tsbuildinfo +1 -1
  1148. package/build/color-picker/color-display.js +0 -184
  1149. package/build/color-picker/color-display.js.map +0 -1
  1150. package/build/date-time/date.js.map +0 -1
  1151. package/build/date-time/time.js +0 -287
  1152. package/build/date-time/time.js.map +0 -1
  1153. package/build/date-time/timezone.js.map +0 -1
  1154. package/build/date-time/utils.js.map +0 -1
  1155. package/build/flyout/context.js +0 -23
  1156. package/build/flyout/context.js.map +0 -1
  1157. package/build/flyout/flyout/component.js +0 -106
  1158. package/build/flyout/flyout/component.js.map +0 -1
  1159. package/build/flyout/flyout/hook.js +0 -53
  1160. package/build/flyout/flyout/hook.js.map +0 -1
  1161. package/build/flyout/flyout/index.js +0 -24
  1162. package/build/flyout/flyout/index.js.map +0 -1
  1163. package/build/flyout/flyout-content/component.js +0 -65
  1164. package/build/flyout/flyout-content/component.js.map +0 -1
  1165. package/build/flyout/flyout-content/index.js +0 -16
  1166. package/build/flyout/flyout-content/index.js.map +0 -1
  1167. package/build/flyout/index.js +0 -16
  1168. package/build/flyout/index.js.map +0 -1
  1169. package/build/flyout/styles.js +0 -46
  1170. package/build/flyout/styles.js.map +0 -1
  1171. package/build/flyout/utils.js +0 -36
  1172. package/build/flyout/utils.js.map +0 -1
  1173. package/build/mobile/html-text-input/container.android.js +0 -41
  1174. package/build/mobile/html-text-input/container.android.js.map +0 -1
  1175. package/build/mobile/html-text-input/container.ios.js +0 -60
  1176. package/build/mobile/html-text-input/container.ios.js.map +0 -1
  1177. package/build/popover/utils.js +0 -322
  1178. package/build/popover/utils.js.map +0 -1
  1179. package/build/utils/hooks/use-combined-ref.js +0 -32
  1180. package/build/utils/hooks/use-combined-ref.js.map +0 -1
  1181. package/build-module/color-picker/color-display.js +0 -170
  1182. package/build-module/color-picker/color-display.js.map +0 -1
  1183. package/build-module/date-time/date.js.map +0 -1
  1184. package/build-module/date-time/time.js +0 -269
  1185. package/build-module/date-time/time.js.map +0 -1
  1186. package/build-module/date-time/timezone.js.map +0 -1
  1187. package/build-module/date-time/utils.js +0 -20
  1188. package/build-module/date-time/utils.js.map +0 -1
  1189. package/build-module/flyout/context.js +0 -11
  1190. package/build-module/flyout/context.js.map +0 -1
  1191. package/build-module/flyout/flyout/component.js +0 -89
  1192. package/build-module/flyout/flyout/component.js.map +0 -1
  1193. package/build-module/flyout/flyout/hook.js +0 -44
  1194. package/build-module/flyout/flyout/hook.js.map +0 -1
  1195. package/build-module/flyout/flyout/index.js +0 -3
  1196. package/build-module/flyout/flyout/index.js.map +0 -1
  1197. package/build-module/flyout/flyout-content/component.js +0 -51
  1198. package/build-module/flyout/flyout-content/component.js.map +0 -1
  1199. package/build-module/flyout/flyout-content/index.js +0 -2
  1200. package/build-module/flyout/flyout-content/index.js.map +0 -1
  1201. package/build-module/flyout/index.js +0 -2
  1202. package/build-module/flyout/index.js.map +0 -1
  1203. package/build-module/flyout/styles.js +0 -27
  1204. package/build-module/flyout/styles.js.map +0 -1
  1205. package/build-module/flyout/utils.js +0 -25
  1206. package/build-module/flyout/utils.js.map +0 -1
  1207. package/build-module/mobile/html-text-input/container.android.js +0 -29
  1208. package/build-module/mobile/html-text-input/container.android.js.map +0 -1
  1209. package/build-module/mobile/html-text-input/container.ios.js +0 -48
  1210. package/build-module/mobile/html-text-input/container.ios.js.map +0 -1
  1211. package/build-module/popover/utils.js +0 -308
  1212. package/build-module/popover/utils.js.map +0 -1
  1213. package/build-module/utils/hooks/use-combined-ref.js +0 -28
  1214. package/build-module/utils/hooks/use-combined-ref.js.map +0 -1
  1215. package/build-types/color-picker/color-display.d.ts +0 -14
  1216. package/build-types/color-picker/color-display.d.ts.map +0 -1
  1217. package/build-types/flyout/context.d.ts +0 -6
  1218. package/build-types/flyout/context.d.ts.map +0 -1
  1219. package/build-types/flyout/flyout/component.d.ts +0 -21
  1220. package/build-types/flyout/flyout/component.d.ts.map +0 -1
  1221. package/build-types/flyout/flyout/hook.d.ts +0 -270
  1222. package/build-types/flyout/flyout/hook.d.ts.map +0 -1
  1223. package/build-types/flyout/flyout/index.d.ts +0 -3
  1224. package/build-types/flyout/flyout-content/component.d.ts +0 -3
  1225. package/build-types/flyout/flyout-content/component.d.ts.map +0 -1
  1226. package/build-types/flyout/flyout-content/index.d.ts +0 -2
  1227. package/build-types/flyout/flyout-content/index.d.ts.map +0 -1
  1228. package/build-types/flyout/index.d.ts +0 -2
  1229. package/build-types/flyout/index.d.ts.map +0 -1
  1230. package/build-types/flyout/styles.d.ts +0 -22
  1231. package/build-types/flyout/styles.d.ts.map +0 -1
  1232. package/build-types/flyout/types.d.ts +0 -80
  1233. package/build-types/flyout/types.d.ts.map +0 -1
  1234. package/build-types/flyout/utils.d.ts +0 -8
  1235. package/build-types/flyout/utils.d.ts.map +0 -1
  1236. package/build-types/popover/utils.d.ts +0 -70
  1237. package/build-types/popover/utils.d.ts.map +0 -1
  1238. package/build-types/utils/hooks/use-combined-ref.d.ts +0 -8
  1239. package/build-types/utils/hooks/use-combined-ref.d.ts.map +0 -1
  1240. package/src/button-group/index.js +0 -17
  1241. package/src/button-group/stories/index.js +0 -21
  1242. package/src/color-picker/color-display.tsx +0 -169
  1243. package/src/date-time/index.js +0 -170
  1244. package/src/date-time/stories/date.js +0 -17
  1245. package/src/date-time/stories/index.js +0 -91
  1246. package/src/date-time/stories/time.js +0 -32
  1247. package/src/date-time/time.js +0 -310
  1248. package/src/date-time/utils.js +0 -18
  1249. package/src/external-link/stories/index.js +0 -23
  1250. package/src/flyout/context.js +0 -10
  1251. package/src/flyout/flyout/README.md +0 -98
  1252. package/src/flyout/flyout/component.js +0 -111
  1253. package/src/flyout/flyout/hook.js +0 -45
  1254. package/src/flyout/flyout/index.js +0 -2
  1255. package/src/flyout/flyout-content/component.js +0 -53
  1256. package/src/flyout/flyout-content/index.js +0 -1
  1257. package/src/flyout/index.js +0 -1
  1258. package/src/flyout/stories/index.js +0 -24
  1259. package/src/flyout/styles.ts +0 -41
  1260. package/src/flyout/test/__snapshots__/index.js.snap +0 -186
  1261. package/src/flyout/test/index.js +0 -103
  1262. package/src/flyout/types.ts +0 -84
  1263. package/src/flyout/utils.js +0 -23
  1264. package/src/form-token-field/index.js +0 -725
  1265. package/src/form-token-field/stories/index.js +0 -102
  1266. package/src/form-token-field/token-input.js +0 -81
  1267. package/src/mobile/html-text-input/container.android.js +0 -23
  1268. package/src/mobile/html-text-input/container.ios.js +0 -50
  1269. package/src/popover/test/utils.js +0 -304
  1270. package/src/popover/utils.js +0 -396
  1271. package/src/radio-control/index.js +0 -69
  1272. package/src/radio-control/stories/index.js +0 -41
  1273. package/src/surface/stories/index.js +0 -46
  1274. package/src/textarea-control/index.js +0 -45
  1275. package/src/textarea-control/stories/index.js +0 -48
  1276. package/src/tree-select/index.js +0 -48
  1277. package/src/tree-select/stories/index.js +0 -80
  1278. package/src/utils/hooks/use-combined-ref.ts +0 -28
  1279. package/src/z-stack/stories/index.js +0 -70
@@ -3,31 +3,39 @@
3
3
  * External dependencies
4
4
  */
5
5
  import classnames from 'classnames';
6
+ import {
7
+ useFloating,
8
+ flip,
9
+ shift,
10
+ autoUpdate,
11
+ arrow,
12
+ offset as offsetMiddleware,
13
+ limitShift,
14
+ size,
15
+ } from '@floating-ui/react-dom';
6
16
 
7
17
  /**
8
18
  * WordPress dependencies
9
19
  */
10
20
  import {
11
21
  useRef,
12
- useState,
13
22
  useLayoutEffect,
14
23
  forwardRef,
15
24
  createContext,
16
25
  useContext,
26
+ useMemo,
17
27
  } from '@wordpress/element';
18
- import { getRectangleFromRange } from '@wordpress/dom';
19
28
  import {
20
29
  useViewportMatch,
21
- useResizeObserver,
22
30
  useMergeRefs,
23
31
  __experimentalUseDialog as useDialog,
24
32
  } from '@wordpress/compose';
25
33
  import { close } from '@wordpress/icons';
34
+ import deprecated from '@wordpress/deprecated';
26
35
 
27
36
  /**
28
37
  * Internal dependencies
29
38
  */
30
- import { computePopoverPosition, offsetIframe } from './utils';
31
39
  import Button from '../button';
32
40
  import ScrollLock from '../scroll-lock';
33
41
  import { Slot, Fill, useSlot } from '../slot-fill';
@@ -42,405 +50,162 @@ const SLOT_NAME = 'Popover';
42
50
 
43
51
  const slotNameContext = createContext();
44
52
 
45
- function computeAnchorRect(
46
- anchorRefFallback,
47
- anchorRect,
48
- getAnchorRect,
49
- anchorRef = false,
50
- container
51
- ) {
52
- if ( anchorRect ) {
53
- return anchorRect;
54
- }
55
-
56
- if ( getAnchorRect ) {
57
- if ( ! anchorRefFallback.current ) {
58
- return;
59
- }
60
-
61
- const rect = getAnchorRect( anchorRefFallback.current );
62
- return offsetIframe(
63
- rect,
64
- rect.ownerDocument || anchorRefFallback.current.ownerDocument,
65
- container
66
- );
67
- }
53
+ const positionToPlacement = ( position ) => {
54
+ const [ x, y, z ] = position.split( ' ' );
68
55
 
69
- if ( anchorRef !== false ) {
70
- if (
71
- ! anchorRef ||
72
- ! window.Range ||
73
- ! window.Element ||
74
- ! window.DOMRect
75
- ) {
76
- return;
56
+ if ( [ 'top', 'bottom' ].includes( x ) ) {
57
+ let suffix = '';
58
+ if ( ( !! z && z === 'left' ) || y === 'right' ) {
59
+ suffix = '-start';
60
+ } else if ( ( !! z && z === 'right' ) || y === 'left' ) {
61
+ suffix = '-end';
77
62
  }
78
-
79
- // Duck-type to check if `anchorRef` is an instance of Range
80
- // `anchorRef instanceof window.Range` checks will break across document boundaries
81
- // such as in an iframe.
82
- if ( typeof anchorRef?.cloneRange === 'function' ) {
83
- return offsetIframe(
84
- getRectangleFromRange( anchorRef ),
85
- anchorRef.endContainer.ownerDocument,
86
- container
87
- );
88
- }
89
-
90
- // Duck-type to check if `anchorRef` is an instance of Element
91
- // `anchorRef instanceof window.Element` checks will break across document boundaries
92
- // such as in an iframe.
93
- if ( typeof anchorRef?.getBoundingClientRect === 'function' ) {
94
- const rect = offsetIframe(
95
- anchorRef.getBoundingClientRect(),
96
- anchorRef.ownerDocument,
97
- container
98
- );
99
-
100
- return rect;
101
- }
102
-
103
- const { top, bottom } = anchorRef;
104
- const topRect = top.getBoundingClientRect();
105
- const bottomRect = bottom.getBoundingClientRect();
106
-
107
- return offsetIframe(
108
- new window.DOMRect(
109
- topRect.left,
110
- topRect.top,
111
- topRect.width,
112
- bottomRect.bottom - topRect.top
113
- ),
114
- top.ownerDocument,
115
- container
116
- );
117
- }
118
-
119
- if ( ! anchorRefFallback.current ) {
120
- return;
63
+ return x + suffix;
121
64
  }
122
65
 
123
- const { parentNode } = anchorRefFallback.current;
124
-
125
- return offsetIframe(
126
- parentNode.getBoundingClientRect(),
127
- parentNode.ownerDocument,
128
- container
129
- );
130
- }
66
+ return y;
67
+ };
131
68
 
132
- /**
133
- * Sets or removes an element attribute.
134
- *
135
- * @param {Element} element The element to modify.
136
- * @param {string} name The attribute name to set or remove.
137
- * @param {?string} value The value to set. A falsy value will remove the
138
- * attribute.
139
- */
140
- function setAttribute( element, name, value ) {
141
- if ( ! value ) {
142
- if ( element.hasAttribute( name ) ) {
143
- element.removeAttribute( name );
69
+ const placementToAnimationOrigin = ( placement ) => {
70
+ const [ a, b ] = placement.split( '-' );
71
+
72
+ let x, y;
73
+ if ( a === 'top' || a === 'bottom' ) {
74
+ x = a === 'top' ? 'bottom' : 'top';
75
+ y = 'middle';
76
+ if ( b === 'start' ) {
77
+ y = 'left';
78
+ } else if ( b === 'end' ) {
79
+ y = 'right';
144
80
  }
145
- } else if ( element.getAttribute( name ) !== value ) {
146
- element.setAttribute( name, value );
147
81
  }
148
- }
149
82
 
150
- /**
151
- * Sets or removes an element style property.
152
- *
153
- * @param {Element} element The element to modify.
154
- * @param {string} property The property to set or remove.
155
- * @param {?string} value The value to set. A falsy value will remove the
156
- * property.
157
- */
158
- function setStyle( element, property, value = '' ) {
159
- if ( element.style[ property ] !== value ) {
160
- element.style[ property ] = value;
161
- }
162
- }
163
-
164
- /**
165
- * Sets or removes an element class.
166
- *
167
- * @param {Element} element The element to modify.
168
- * @param {string} name The class to set or remove.
169
- * @param {boolean} toggle True to set the class, false to remove.
170
- */
171
- function setClass( element, name, toggle ) {
172
- if ( toggle ) {
173
- if ( ! element.classList.contains( name ) ) {
174
- element.classList.add( name );
83
+ if ( a === 'left' || a === 'right' ) {
84
+ x = 'center';
85
+ y = a === 'left' ? 'right' : 'left';
86
+ if ( b === 'start' ) {
87
+ x = 'top';
88
+ } else if ( b === 'end' ) {
89
+ x = 'bottom';
175
90
  }
176
- } else if ( element.classList.contains( name ) ) {
177
- element.classList.remove( name );
178
- }
179
- }
180
-
181
- function getAnchorDocument( anchor ) {
182
- if ( ! anchor ) {
183
- return;
184
- }
185
-
186
- if ( anchor.endContainer ) {
187
- return anchor.endContainer.ownerDocument;
188
91
  }
189
92
 
190
- if ( anchor.top ) {
191
- return anchor.top.ownerDocument;
192
- }
193
-
194
- return anchor.ownerDocument;
195
- }
93
+ return x + ' ' + y;
94
+ };
196
95
 
197
96
  const Popover = (
198
97
  {
98
+ range,
99
+ animate = true,
199
100
  headerTitle,
200
101
  onClose,
201
102
  children,
202
103
  className,
203
104
  noArrow = true,
204
105
  isAlternate,
205
- // Disable reason: We generate the `...contentProps` rest as remainder
206
- // of props which aren't explicitly handled by this component.
207
- /* eslint-disable no-unused-vars */
208
- position = 'bottom right',
209
- range,
106
+ position,
107
+ placement = 'bottom-start',
108
+ offset,
210
109
  focusOnMount = 'firstElement',
211
110
  anchorRef,
212
111
  anchorRect,
213
112
  getAnchorRect,
214
113
  expandOnMobile,
215
- animate = true,
216
114
  onFocusOutside,
217
- __unstableStickyBoundaryElement,
218
115
  __unstableSlotName = SLOT_NAME,
219
116
  __unstableObserveElement,
220
- __unstableBoundaryParent,
221
117
  __unstableForcePosition,
222
- __unstableForceXAlignment,
223
- __unstableEditorCanvasWrapper,
224
- /* eslint-enable no-unused-vars */
118
+ __unstableShift = false,
225
119
  ...contentProps
226
120
  },
227
121
  ref
228
122
  ) => {
229
- const anchorRefFallback = useRef( null );
230
- const contentRef = useRef( null );
231
- const containerRef = useRef();
123
+ if ( range ) {
124
+ deprecated( 'range prop in Popover component', {
125
+ since: '6.1',
126
+ version: '6.3',
127
+ } );
128
+ }
129
+
130
+ const arrowRef = useRef( null );
232
131
  const isMobileViewport = useViewportMatch( 'medium', '<' );
233
- const [ animateOrigin, setAnimateOrigin ] = useState();
234
- const slotName = useContext( slotNameContext ) || __unstableSlotName;
235
- const slot = useSlot( slotName );
236
132
  const isExpanded = expandOnMobile && isMobileViewport;
237
- const [ containerResizeListener, contentSize ] = useResizeObserver();
238
- noArrow = isExpanded || noArrow;
239
-
240
- useLayoutEffect( () => {
241
- if ( isExpanded ) {
242
- setClass( containerRef.current, 'is-without-arrow', noArrow );
243
- setClass( containerRef.current, 'is-alternate', isAlternate );
244
- setAttribute( containerRef.current, 'data-x-axis' );
245
- setAttribute( containerRef.current, 'data-y-axis' );
246
- setStyle( containerRef.current, 'top' );
247
- setStyle( containerRef.current, 'left' );
248
- setStyle( contentRef.current, 'maxHeight' );
249
- setStyle( contentRef.current, 'maxWidth' );
250
- return;
133
+ const hasArrow = ! isExpanded && ! noArrow;
134
+ const usedPlacement = position
135
+ ? positionToPlacement( position )
136
+ : placement;
137
+
138
+ const ownerDocument = useMemo( () => {
139
+ if ( anchorRef?.top ) {
140
+ return anchorRef?.top.ownerDocument;
141
+ } else if ( anchorRef?.startContainer ) {
142
+ return anchorRef.startContainer.ownerDocument;
143
+ } else if ( anchorRef?.current ) {
144
+ return anchorRef.current.ownerDocument;
145
+ } else if ( anchorRef ) {
146
+ // This one should be deprecated.
147
+ return anchorRef.ownerDocument;
148
+ } else if ( anchorRect && anchorRect?.ownerDocument ) {
149
+ return anchorRect.ownerDocument;
150
+ } else if ( getAnchorRect ) {
151
+ return getAnchorRect()?.ownerDocument ?? document;
251
152
  }
252
153
 
253
- const refresh = () => {
254
- if ( ! containerRef.current || ! contentRef.current ) {
255
- return;
256
- }
257
-
258
- let anchor = computeAnchorRect(
259
- anchorRefFallback,
260
- anchorRect,
261
- getAnchorRect,
262
- anchorRef,
263
- containerRef.current
264
- );
154
+ return document;
155
+ }, [ anchorRef, anchorRect, getAnchorRect ] );
265
156
 
266
- if ( ! anchor ) {
267
- return;
268
- }
269
-
270
- const { offsetParent, ownerDocument } = containerRef.current;
271
-
272
- let relativeOffsetTop = 0;
273
-
274
- // If there is a positioned ancestor element that is not the body,
275
- // subtract the position from the anchor rect. If the position of
276
- // the popover is fixed, the offset parent is null or the body
277
- // element, in which case the position is relative to the viewport.
278
- // See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
279
- if ( offsetParent && offsetParent !== ownerDocument.body ) {
280
- const offsetParentRect = offsetParent.getBoundingClientRect();
281
-
282
- relativeOffsetTop = offsetParentRect.top;
283
- anchor = new window.DOMRect(
284
- anchor.left - offsetParentRect.left,
285
- anchor.top - offsetParentRect.top,
286
- anchor.width,
287
- anchor.height
288
- );
289
- }
290
-
291
- let boundaryElement;
292
- if ( __unstableBoundaryParent ) {
293
- boundaryElement = containerRef.current.parentElement;
294
- }
295
-
296
- const usedContentSize = ! contentSize.height
297
- ? contentRef.current.getBoundingClientRect()
298
- : contentSize;
299
-
300
- const {
301
- popoverTop,
302
- popoverLeft,
303
- xAxis,
304
- yAxis,
305
- contentHeight,
306
- contentWidth,
307
- } = computePopoverPosition(
308
- anchor,
309
- usedContentSize,
310
- position,
311
- __unstableStickyBoundaryElement,
312
- containerRef.current,
313
- relativeOffsetTop,
314
- boundaryElement,
315
- __unstableForcePosition,
316
- __unstableForceXAlignment,
317
- __unstableEditorCanvasWrapper
318
- );
319
-
320
- if (
321
- typeof popoverTop === 'number' &&
322
- typeof popoverLeft === 'number'
323
- ) {
324
- setStyle( containerRef.current, 'top', popoverTop + 'px' );
325
- setStyle( containerRef.current, 'left', popoverLeft + 'px' );
326
- }
327
-
328
- setClass(
329
- containerRef.current,
330
- 'is-without-arrow',
331
- noArrow || ( xAxis === 'center' && yAxis === 'middle' )
332
- );
333
- setClass( containerRef.current, 'is-alternate', isAlternate );
334
- setAttribute( containerRef.current, 'data-x-axis', xAxis );
335
- setAttribute( containerRef.current, 'data-y-axis', yAxis );
336
- setStyle(
337
- contentRef.current,
338
- 'maxHeight',
339
- typeof contentHeight === 'number' ? contentHeight + 'px' : ''
340
- );
341
- setStyle(
342
- contentRef.current,
343
- 'maxWidth',
344
- typeof contentWidth === 'number' ? contentWidth + 'px' : ''
345
- );
346
-
347
- // Compute the animation position.
348
- const yAxisMapping = {
349
- top: 'bottom',
350
- bottom: 'top',
351
- };
352
- const xAxisMapping = {
353
- left: 'right',
354
- right: 'left',
355
- };
356
- const animateYAxis = yAxisMapping[ yAxis ] || 'middle';
357
- const animateXAxis = xAxisMapping[ xAxis ] || 'center';
358
-
359
- setAnimateOrigin( animateXAxis + ' ' + animateYAxis );
360
- };
361
-
362
- refresh();
363
-
364
- const { ownerDocument } = containerRef.current;
157
+ /**
158
+ * Offsets the the position of the popover when the anchor is inside an iframe.
159
+ */
160
+ const frameOffset = useMemo( () => {
365
161
  const { defaultView } = ownerDocument;
162
+ const { frameElement } = defaultView;
366
163
 
367
- /*
368
- * There are sometimes we need to reposition or resize the popover that
369
- * are not handled by the resize/scroll window events (i.e. CSS changes
370
- * in the layout that changes the position of the anchor).
371
- *
372
- * For these situations, we refresh the popover every 0.5s
373
- */
374
- const intervalHandle = defaultView.setInterval( refresh, 500 );
375
-
376
- let rafId;
377
-
378
- const refreshOnAnimationFrame = () => {
379
- defaultView.cancelAnimationFrame( rafId );
380
- rafId = defaultView.requestAnimationFrame( refresh );
381
- };
382
-
383
- // Sometimes a click trigger a layout change that affects the popover
384
- // position. This is an opportunity to immediately refresh rather than
385
- // at the interval.
386
- defaultView.addEventListener( 'click', refreshOnAnimationFrame );
387
- defaultView.addEventListener( 'resize', refresh );
388
- defaultView.addEventListener( 'scroll', refresh, true );
389
-
390
- const anchorDocument = getAnchorDocument( anchorRef );
391
-
392
- // If the anchor is within an iframe, the popover position also needs
393
- // to refrest when the iframe content is scrolled or resized.
394
- if ( anchorDocument && anchorDocument !== ownerDocument ) {
395
- anchorDocument.defaultView.addEventListener( 'resize', refresh );
396
- anchorDocument.defaultView.addEventListener(
397
- 'scroll',
398
- refresh,
399
- true
400
- );
164
+ if ( ! frameElement || ownerDocument === document ) {
165
+ return undefined;
401
166
  }
402
167
 
403
- let observer;
404
-
405
- if ( __unstableObserveElement ) {
406
- observer = new defaultView.MutationObserver( refresh );
407
- observer.observe( __unstableObserveElement, { attributes: true } );
408
- }
409
-
410
- return () => {
411
- defaultView.clearInterval( intervalHandle );
412
- defaultView.removeEventListener( 'resize', refresh );
413
- defaultView.removeEventListener( 'scroll', refresh, true );
414
- defaultView.removeEventListener( 'click', refreshOnAnimationFrame );
415
- defaultView.cancelAnimationFrame( rafId );
416
-
417
- if ( anchorDocument && anchorDocument !== ownerDocument ) {
418
- anchorDocument.defaultView?.removeEventListener(
419
- 'resize',
420
- refresh
421
- );
422
- anchorDocument.defaultView?.removeEventListener(
423
- 'scroll',
424
- refresh,
425
- true
426
- );
427
- }
428
-
429
- if ( observer ) {
430
- observer.disconnect();
431
- }
168
+ const iframeRect = frameElement.getBoundingClientRect();
169
+ return {
170
+ name: 'iframeOffset',
171
+ fn( { x, y } ) {
172
+ return {
173
+ x: x + iframeRect.left,
174
+ y: y + iframeRect.top,
175
+ };
176
+ },
432
177
  };
433
- }, [
434
- isExpanded,
435
- anchorRect,
436
- getAnchorRect,
437
- anchorRef,
438
- position,
439
- contentSize,
440
- __unstableStickyBoundaryElement,
441
- __unstableObserveElement,
442
- __unstableBoundaryParent,
443
- ] );
178
+ }, [ ownerDocument ] );
179
+
180
+ const middlewares = [
181
+ frameOffset,
182
+ offset ? offsetMiddleware( offset ) : undefined,
183
+ __unstableForcePosition ? undefined : flip(),
184
+ __unstableForcePosition
185
+ ? undefined
186
+ : size( {
187
+ apply( sizeProps ) {
188
+ const { height } = sizeProps;
189
+ if ( ! refs.floating.current ) return;
190
+ // Reduce the height of the popover to the available space.
191
+ Object.assign( refs.floating.current.firstChild.style, {
192
+ maxHeight: `${ height }px`,
193
+ overflow: 'auto',
194
+ } );
195
+ },
196
+ } ),
197
+ __unstableShift
198
+ ? shift( {
199
+ crossAxis: true,
200
+ limiter: limitShift(),
201
+ padding: 1, // Necessary to avoid flickering at the edge of the viewport.
202
+ } )
203
+ : undefined,
204
+ hasArrow ? arrow( { element: arrowRef } ) : undefined,
205
+ ].filter( ( m ) => !! m );
206
+ const anchorRefFallback = useRef( null );
207
+ const slotName = useContext( slotNameContext ) || __unstableSlotName;
208
+ const slot = useSlot( slotName );
444
209
 
445
210
  const onDialogClose = ( type, event ) => {
446
211
  // Ideally the popover should have just a single onClose prop and
@@ -458,14 +223,113 @@ const Popover = (
458
223
  onClose: onDialogClose,
459
224
  } );
460
225
 
461
- const mergedRefs = useMergeRefs( [ containerRef, dialogRef, ref ] );
226
+ const {
227
+ x,
228
+ y,
229
+ reference,
230
+ floating,
231
+ strategy,
232
+ refs,
233
+ update,
234
+ placement: placementData,
235
+ middlewareData: { arrow: arrowData = {} },
236
+ } = useFloating( {
237
+ placement: usedPlacement,
238
+ middleware: middlewares,
239
+ } );
240
+ const staticSide = {
241
+ top: 'bottom',
242
+ right: 'left',
243
+ bottom: 'top',
244
+ left: 'right',
245
+ }[ placementData.split( '-' )[ 0 ] ];
246
+ const mergedRefs = useMergeRefs( [ floating, dialogRef, ref ] );
247
+
248
+ // Updates references
249
+ useLayoutEffect( () => {
250
+ // No ref or position have been passed
251
+ let usedRef;
252
+ if ( anchorRef?.top ) {
253
+ usedRef = {
254
+ getBoundingClientRect() {
255
+ const topRect = anchorRef.top.getBoundingClientRect();
256
+ const bottomRect = anchorRef.bottom.getBoundingClientRect();
257
+ return new window.DOMRect(
258
+ topRect.x,
259
+ topRect.y,
260
+ topRect.width,
261
+ bottomRect.bottom - topRect.top
262
+ );
263
+ },
264
+ };
265
+ } else if ( anchorRef?.current ) {
266
+ usedRef = anchorRef.current;
267
+ } else if ( anchorRef ) {
268
+ usedRef = anchorRef;
269
+ } else if ( anchorRect ) {
270
+ usedRef = {
271
+ getBoundingClientRect() {
272
+ return anchorRect;
273
+ },
274
+ };
275
+ } else if ( getAnchorRect ) {
276
+ usedRef = {
277
+ getBoundingClientRect() {
278
+ const rect = getAnchorRect();
279
+ return new window.DOMRect(
280
+ rect.x ?? rect.left,
281
+ rect.y ?? rect.top,
282
+ rect.width ?? rect.right - rect.left,
283
+ rect.height ?? rect.bottom - rect.top
284
+ );
285
+ },
286
+ };
287
+ } else if ( anchorRefFallback.current ) {
288
+ usedRef = anchorRefFallback.current;
289
+ }
290
+
291
+ if ( ! usedRef ) {
292
+ return;
293
+ }
294
+
295
+ reference( usedRef );
296
+
297
+ if ( ! refs.floating.current ) {
298
+ return;
299
+ }
300
+
301
+ return autoUpdate( usedRef, refs.floating.current, update );
302
+ }, [ anchorRef, anchorRect, getAnchorRect ] );
303
+
304
+ // This is only needed for a smoth transition when moving blocks.
305
+ useLayoutEffect( () => {
306
+ if ( ! __unstableObserveElement ) {
307
+ return;
308
+ }
309
+ const observer = new window.MutationObserver( update );
310
+ observer.observe( __unstableObserveElement, { attributes: true } );
311
+
312
+ return () => {
313
+ observer.disconnect();
314
+ };
315
+ }, [ __unstableObserveElement ] );
316
+
317
+ // If we're using getAnchorRect, we need to update the position as we scroll the iframe.
318
+ useLayoutEffect( () => {
319
+ if ( ownerDocument === document ) {
320
+ return;
321
+ }
322
+
323
+ ownerDocument.addEventListener( 'scroll', update );
324
+ return () => ownerDocument.removeEventListener( 'scroll', update );
325
+ }, [ ownerDocument ] );
462
326
 
463
327
  /** @type {false | string} */
464
328
  const animateClassName =
465
- Boolean( animate && animateOrigin ) &&
329
+ !! animate &&
466
330
  getAnimateClassName( {
467
331
  type: 'appear',
468
- origin: animateOrigin,
332
+ origin: placementToAnimationOrigin( placementData ),
469
333
  } );
470
334
 
471
335
  // Disable reason: We care to capture the _bubbled_ events from inputs
@@ -481,7 +345,6 @@ const Popover = (
481
345
  animateClassName,
482
346
  {
483
347
  'is-expanded': isExpanded,
484
- 'is-without-arrow': noArrow,
485
348
  'is-alternate': isAlternate,
486
349
  }
487
350
  ) }
@@ -489,6 +352,15 @@ const Popover = (
489
352
  ref={ mergedRefs }
490
353
  { ...dialogProps }
491
354
  tabIndex="-1"
355
+ style={
356
+ isExpanded
357
+ ? undefined
358
+ : {
359
+ position: strategy,
360
+ left: Number.isNaN( x ) ? 0 : x,
361
+ top: Number.isNaN( y ) ? 0 : y,
362
+ }
363
+ }
492
364
  >
493
365
  { isExpanded && <ScrollLock /> }
494
366
  { isExpanded && (
@@ -503,12 +375,26 @@ const Popover = (
503
375
  />
504
376
  </div>
505
377
  ) }
506
- <div ref={ contentRef } className="components-popover__content">
507
- <div style={ { position: 'relative' } }>
508
- { containerResizeListener }
509
- { children }
510
- </div>
511
- </div>
378
+ <div className="components-popover__content">{ children }</div>
379
+ { hasArrow && (
380
+ <div
381
+ className="components-popover__arrow"
382
+ ref={ arrowRef }
383
+ style={ {
384
+ left:
385
+ ! arrowData?.x || Number.isNaN( arrowData?.x )
386
+ ? 0
387
+ : arrowData.x,
388
+ top:
389
+ ! arrowData?.y || Number.isNaN( arrowData?.y )
390
+ ? 0
391
+ : arrowData.y,
392
+ right: undefined,
393
+ bottom: undefined,
394
+ [ staticSide ]: '-4px',
395
+ } }
396
+ />
397
+ ) }
512
398
  </div>
513
399
  );
514
400