@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
@@ -13,13 +13,13 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
13
13
 
14
14
  var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
- var _dom = require("@wordpress/dom");
16
+ var _reactDom = require("@floating-ui/react-dom");
17
17
 
18
18
  var _compose = require("@wordpress/compose");
19
19
 
20
20
  var _icons = require("@wordpress/icons");
21
21
 
22
- var _utils = require("./utils");
22
+ var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
23
23
 
24
24
  var _button = _interopRequireDefault(require("../button"));
25
25
 
@@ -51,322 +51,170 @@ var _animate = require("../animate");
51
51
  const SLOT_NAME = 'Popover';
52
52
  const slotNameContext = (0, _element.createContext)();
53
53
 
54
- function computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect) {
55
- let anchorRef = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
56
- let container = arguments.length > 4 ? arguments[4] : undefined;
54
+ const positionToPlacement = position => {
55
+ const [x, y, z] = position.split(' ');
57
56
 
58
- if (anchorRect) {
59
- return anchorRect;
60
- }
57
+ if (['top', 'bottom'].includes(x)) {
58
+ let suffix = '';
61
59
 
62
- if (getAnchorRect) {
63
- if (!anchorRefFallback.current) {
64
- return;
60
+ if (!!z && z === 'left' || y === 'right') {
61
+ suffix = '-start';
62
+ } else if (!!z && z === 'right' || y === 'left') {
63
+ suffix = '-end';
65
64
  }
66
65
 
67
- const rect = getAnchorRect(anchorRefFallback.current);
68
- return (0, _utils.offsetIframe)(rect, rect.ownerDocument || anchorRefFallback.current.ownerDocument, container);
66
+ return x + suffix;
69
67
  }
70
68
 
71
- if (anchorRef !== false) {
72
- if (!anchorRef || !window.Range || !window.Element || !window.DOMRect) {
73
- return;
74
- } // Duck-type to check if `anchorRef` is an instance of Range
75
- // `anchorRef instanceof window.Range` checks will break across document boundaries
76
- // such as in an iframe.
77
-
69
+ return y;
70
+ };
78
71
 
79
- if (typeof (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.cloneRange) === 'function') {
80
- return (0, _utils.offsetIframe)((0, _dom.getRectangleFromRange)(anchorRef), anchorRef.endContainer.ownerDocument, container);
81
- } // Duck-type to check if `anchorRef` is an instance of Element
82
- // `anchorRef instanceof window.Element` checks will break across document boundaries
83
- // such as in an iframe.
72
+ const placementToAnimationOrigin = placement => {
73
+ const [a, b] = placement.split('-');
74
+ let x, y;
84
75
 
76
+ if (a === 'top' || a === 'bottom') {
77
+ x = a === 'top' ? 'bottom' : 'top';
78
+ y = 'middle';
85
79
 
86
- if (typeof (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.getBoundingClientRect) === 'function') {
87
- const rect = (0, _utils.offsetIframe)(anchorRef.getBoundingClientRect(), anchorRef.ownerDocument, container);
88
- return rect;
80
+ if (b === 'start') {
81
+ y = 'left';
82
+ } else if (b === 'end') {
83
+ y = 'right';
89
84
  }
90
-
91
- const {
92
- top,
93
- bottom
94
- } = anchorRef;
95
- const topRect = top.getBoundingClientRect();
96
- const bottomRect = bottom.getBoundingClientRect();
97
- return (0, _utils.offsetIframe)(new window.DOMRect(topRect.left, topRect.top, topRect.width, bottomRect.bottom - topRect.top), top.ownerDocument, container);
98
- }
99
-
100
- if (!anchorRefFallback.current) {
101
- return;
102
85
  }
103
86
 
104
- const {
105
- parentNode
106
- } = anchorRefFallback.current;
107
- return (0, _utils.offsetIframe)(parentNode.getBoundingClientRect(), parentNode.ownerDocument, container);
108
- }
109
- /**
110
- * Sets or removes an element attribute.
111
- *
112
- * @param {Element} element The element to modify.
113
- * @param {string} name The attribute name to set or remove.
114
- * @param {?string} value The value to set. A falsy value will remove the
115
- * attribute.
116
- */
117
-
87
+ if (a === 'left' || a === 'right') {
88
+ x = 'center';
89
+ y = a === 'left' ? 'right' : 'left';
118
90
 
119
- function setAttribute(element, name, value) {
120
- if (!value) {
121
- if (element.hasAttribute(name)) {
122
- element.removeAttribute(name);
91
+ if (b === 'start') {
92
+ x = 'top';
93
+ } else if (b === 'end') {
94
+ x = 'bottom';
123
95
  }
124
- } else if (element.getAttribute(name) !== value) {
125
- element.setAttribute(name, value);
126
96
  }
127
- }
128
- /**
129
- * Sets or removes an element style property.
130
- *
131
- * @param {Element} element The element to modify.
132
- * @param {string} property The property to set or remove.
133
- * @param {?string} value The value to set. A falsy value will remove the
134
- * property.
135
- */
136
-
137
97
 
138
- function setStyle(element, property) {
139
- let value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
140
-
141
- if (element.style[property] !== value) {
142
- element.style[property] = value;
143
- }
144
- }
145
- /**
146
- * Sets or removes an element class.
147
- *
148
- * @param {Element} element The element to modify.
149
- * @param {string} name The class to set or remove.
150
- * @param {boolean} toggle True to set the class, false to remove.
151
- */
152
-
153
-
154
- function setClass(element, name, toggle) {
155
- if (toggle) {
156
- if (!element.classList.contains(name)) {
157
- element.classList.add(name);
158
- }
159
- } else if (element.classList.contains(name)) {
160
- element.classList.remove(name);
161
- }
162
- }
163
-
164
- function getAnchorDocument(anchor) {
165
- if (!anchor) {
166
- return;
167
- }
168
-
169
- if (anchor.endContainer) {
170
- return anchor.endContainer.ownerDocument;
171
- }
172
-
173
- if (anchor.top) {
174
- return anchor.top.ownerDocument;
175
- }
176
-
177
- return anchor.ownerDocument;
178
- }
98
+ return x + ' ' + y;
99
+ };
179
100
 
180
101
  const Popover = (_ref, ref) => {
181
102
  let {
103
+ range,
104
+ animate = true,
182
105
  headerTitle,
183
106
  onClose,
184
107
  children,
185
108
  className,
186
109
  noArrow = true,
187
110
  isAlternate,
188
- // Disable reason: We generate the `...contentProps` rest as remainder
189
- // of props which aren't explicitly handled by this component.
190
-
191
- /* eslint-disable no-unused-vars */
192
- position = 'bottom right',
193
- range,
111
+ position,
112
+ placement = 'bottom-start',
113
+ offset,
194
114
  focusOnMount = 'firstElement',
195
115
  anchorRef,
196
116
  anchorRect,
197
117
  getAnchorRect,
198
118
  expandOnMobile,
199
- animate = true,
200
119
  onFocusOutside,
201
- __unstableStickyBoundaryElement,
202
120
  __unstableSlotName = SLOT_NAME,
203
121
  __unstableObserveElement,
204
- __unstableBoundaryParent,
205
122
  __unstableForcePosition,
206
- __unstableForceXAlignment,
207
- __unstableEditorCanvasWrapper,
208
-
209
- /* eslint-enable no-unused-vars */
123
+ __unstableShift = false,
210
124
  ...contentProps
211
125
  } = _ref;
212
- const anchorRefFallback = (0, _element.useRef)(null);
213
- const contentRef = (0, _element.useRef)(null);
214
- const containerRef = (0, _element.useRef)();
215
- const isMobileViewport = (0, _compose.useViewportMatch)('medium', '<');
216
- const [animateOrigin, setAnimateOrigin] = (0, _element.useState)();
217
126
 
218
- const slotName = (0, _element.useContext)(slotNameContext) || __unstableSlotName;
127
+ if (range) {
128
+ (0, _deprecated.default)('range prop in Popover component', {
129
+ since: '6.1',
130
+ version: '6.3'
131
+ });
132
+ }
219
133
 
220
- const slot = (0, _slotFill.useSlot)(slotName);
134
+ const arrowRef = (0, _element.useRef)(null);
135
+ const isMobileViewport = (0, _compose.useViewportMatch)('medium', '<');
221
136
  const isExpanded = expandOnMobile && isMobileViewport;
222
- const [containerResizeListener, contentSize] = (0, _compose.useResizeObserver)();
223
- noArrow = isExpanded || noArrow;
224
- (0, _element.useLayoutEffect)(() => {
225
- if (isExpanded) {
226
- setClass(containerRef.current, 'is-without-arrow', noArrow);
227
- setClass(containerRef.current, 'is-alternate', isAlternate);
228
- setAttribute(containerRef.current, 'data-x-axis');
229
- setAttribute(containerRef.current, 'data-y-axis');
230
- setStyle(containerRef.current, 'top');
231
- setStyle(containerRef.current, 'left');
232
- setStyle(contentRef.current, 'maxHeight');
233
- setStyle(contentRef.current, 'maxWidth');
234
- return;
137
+ const hasArrow = !isExpanded && !noArrow;
138
+ const usedPlacement = position ? positionToPlacement(position) : placement;
139
+ const ownerDocument = (0, _element.useMemo)(() => {
140
+ if (anchorRef !== null && anchorRef !== void 0 && anchorRef.top) {
141
+ return anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.top.ownerDocument;
142
+ } else if (anchorRef !== null && anchorRef !== void 0 && anchorRef.startContainer) {
143
+ return anchorRef.startContainer.ownerDocument;
144
+ } else if (anchorRef !== null && anchorRef !== void 0 && anchorRef.current) {
145
+ return anchorRef.current.ownerDocument;
146
+ } else if (anchorRef) {
147
+ // This one should be deprecated.
148
+ return anchorRef.ownerDocument;
149
+ } else if (anchorRect && anchorRect !== null && anchorRect !== void 0 && anchorRect.ownerDocument) {
150
+ return anchorRect.ownerDocument;
151
+ } else if (getAnchorRect) {
152
+ var _getAnchorRect$ownerD, _getAnchorRect;
153
+
154
+ return (_getAnchorRect$ownerD = (_getAnchorRect = getAnchorRect()) === null || _getAnchorRect === void 0 ? void 0 : _getAnchorRect.ownerDocument) !== null && _getAnchorRect$ownerD !== void 0 ? _getAnchorRect$ownerD : document;
235
155
  }
236
156
 
237
- const refresh = () => {
238
- if (!containerRef.current || !contentRef.current) {
239
- return;
240
- }
241
-
242
- let anchor = computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect, anchorRef, containerRef.current);
243
-
244
- if (!anchor) {
245
- return;
246
- }
247
-
248
- const {
249
- offsetParent,
250
- ownerDocument
251
- } = containerRef.current;
252
- let relativeOffsetTop = 0; // If there is a positioned ancestor element that is not the body,
253
- // subtract the position from the anchor rect. If the position of
254
- // the popover is fixed, the offset parent is null or the body
255
- // element, in which case the position is relative to the viewport.
256
- // See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
257
-
258
- if (offsetParent && offsetParent !== ownerDocument.body) {
259
- const offsetParentRect = offsetParent.getBoundingClientRect();
260
- relativeOffsetTop = offsetParentRect.top;
261
- anchor = new window.DOMRect(anchor.left - offsetParentRect.left, anchor.top - offsetParentRect.top, anchor.width, anchor.height);
262
- }
157
+ return document;
158
+ }, [anchorRef, anchorRect, getAnchorRect]);
159
+ /**
160
+ * Offsets the the position of the popover when the anchor is inside an iframe.
161
+ */
263
162
 
264
- let boundaryElement;
265
-
266
- if (__unstableBoundaryParent) {
267
- boundaryElement = containerRef.current.parentElement;
268
- }
269
-
270
- const usedContentSize = !contentSize.height ? contentRef.current.getBoundingClientRect() : contentSize;
271
- const {
272
- popoverTop,
273
- popoverLeft,
274
- xAxis,
275
- yAxis,
276
- contentHeight,
277
- contentWidth
278
- } = (0, _utils.computePopoverPosition)(anchor, usedContentSize, position, __unstableStickyBoundaryElement, containerRef.current, relativeOffsetTop, boundaryElement, __unstableForcePosition, __unstableForceXAlignment, __unstableEditorCanvasWrapper);
279
-
280
- if (typeof popoverTop === 'number' && typeof popoverLeft === 'number') {
281
- setStyle(containerRef.current, 'top', popoverTop + 'px');
282
- setStyle(containerRef.current, 'left', popoverLeft + 'px');
283
- }
284
-
285
- setClass(containerRef.current, 'is-without-arrow', noArrow || xAxis === 'center' && yAxis === 'middle');
286
- setClass(containerRef.current, 'is-alternate', isAlternate);
287
- setAttribute(containerRef.current, 'data-x-axis', xAxis);
288
- setAttribute(containerRef.current, 'data-y-axis', yAxis);
289
- setStyle(contentRef.current, 'maxHeight', typeof contentHeight === 'number' ? contentHeight + 'px' : '');
290
- setStyle(contentRef.current, 'maxWidth', typeof contentWidth === 'number' ? contentWidth + 'px' : ''); // Compute the animation position.
291
-
292
- const yAxisMapping = {
293
- top: 'bottom',
294
- bottom: 'top'
295
- };
296
- const xAxisMapping = {
297
- left: 'right',
298
- right: 'left'
299
- };
300
- const animateYAxis = yAxisMapping[yAxis] || 'middle';
301
- const animateXAxis = xAxisMapping[xAxis] || 'center';
302
- setAnimateOrigin(animateXAxis + ' ' + animateYAxis);
303
- };
304
-
305
- refresh();
306
- const {
307
- ownerDocument
308
- } = containerRef.current;
163
+ const frameOffset = (0, _element.useMemo)(() => {
309
164
  const {
310
165
  defaultView
311
166
  } = ownerDocument;
312
- /*
313
- * There are sometimes we need to reposition or resize the popover that
314
- * are not handled by the resize/scroll window events (i.e. CSS changes
315
- * in the layout that changes the position of the anchor).
316
- *
317
- * For these situations, we refresh the popover every 0.5s
318
- */
319
-
320
- const intervalHandle = defaultView.setInterval(refresh, 500);
321
- let rafId;
322
-
323
- const refreshOnAnimationFrame = () => {
324
- defaultView.cancelAnimationFrame(rafId);
325
- rafId = defaultView.requestAnimationFrame(refresh);
326
- }; // Sometimes a click trigger a layout change that affects the popover
327
- // position. This is an opportunity to immediately refresh rather than
328
- // at the interval.
329
-
330
-
331
- defaultView.addEventListener('click', refreshOnAnimationFrame);
332
- defaultView.addEventListener('resize', refresh);
333
- defaultView.addEventListener('scroll', refresh, true);
334
- const anchorDocument = getAnchorDocument(anchorRef); // If the anchor is within an iframe, the popover position also needs
335
- // to refrest when the iframe content is scrolled or resized.
336
-
337
- if (anchorDocument && anchorDocument !== ownerDocument) {
338
- anchorDocument.defaultView.addEventListener('resize', refresh);
339
- anchorDocument.defaultView.addEventListener('scroll', refresh, true);
167
+ const {
168
+ frameElement
169
+ } = defaultView;
170
+
171
+ if (!frameElement || ownerDocument === document) {
172
+ return undefined;
340
173
  }
341
174
 
342
- let observer;
175
+ const iframeRect = frameElement.getBoundingClientRect();
176
+ return {
177
+ name: 'iframeOffset',
178
+
179
+ fn(_ref2) {
180
+ let {
181
+ x,
182
+ y
183
+ } = _ref2;
184
+ return {
185
+ x: x + iframeRect.left,
186
+ y: y + iframeRect.top
187
+ };
188
+ }
189
+
190
+ };
191
+ }, [ownerDocument]);
192
+ const middlewares = [frameOffset, offset ? (0, _reactDom.offset)(offset) : undefined, __unstableForcePosition ? undefined : (0, _reactDom.flip)(), __unstableForcePosition ? undefined : (0, _reactDom.size)({
193
+ apply(sizeProps) {
194
+ const {
195
+ height
196
+ } = sizeProps;
197
+ if (!refs.floating.current) return; // Reduce the height of the popover to the available space.
343
198
 
344
- if (__unstableObserveElement) {
345
- observer = new defaultView.MutationObserver(refresh);
346
- observer.observe(__unstableObserveElement, {
347
- attributes: true
199
+ Object.assign(refs.floating.current.firstChild.style, {
200
+ maxHeight: `${height}px`,
201
+ overflow: 'auto'
348
202
  });
349
203
  }
350
204
 
351
- return () => {
352
- defaultView.clearInterval(intervalHandle);
353
- defaultView.removeEventListener('resize', refresh);
354
- defaultView.removeEventListener('scroll', refresh, true);
355
- defaultView.removeEventListener('click', refreshOnAnimationFrame);
356
- defaultView.cancelAnimationFrame(rafId);
205
+ }), __unstableShift ? (0, _reactDom.shift)({
206
+ crossAxis: true,
207
+ limiter: (0, _reactDom.limitShift)(),
208
+ padding: 1 // Necessary to avoid flickering at the edge of the viewport.
357
209
 
358
- if (anchorDocument && anchorDocument !== ownerDocument) {
359
- var _anchorDocument$defau, _anchorDocument$defau2;
210
+ }) : undefined, hasArrow ? (0, _reactDom.arrow)({
211
+ element: arrowRef
212
+ }) : undefined].filter(m => !!m);
213
+ const anchorRefFallback = (0, _element.useRef)(null);
360
214
 
361
- (_anchorDocument$defau = anchorDocument.defaultView) === null || _anchorDocument$defau === void 0 ? void 0 : _anchorDocument$defau.removeEventListener('resize', refresh);
362
- (_anchorDocument$defau2 = anchorDocument.defaultView) === null || _anchorDocument$defau2 === void 0 ? void 0 : _anchorDocument$defau2.removeEventListener('scroll', refresh, true);
363
- }
215
+ const slotName = (0, _element.useContext)(slotNameContext) || __unstableSlotName;
364
216
 
365
- if (observer) {
366
- observer.disconnect();
367
- }
368
- };
369
- }, [isExpanded, anchorRect, getAnchorRect, anchorRef, position, contentSize, __unstableStickyBoundaryElement, __unstableObserveElement, __unstableBoundaryParent]);
217
+ const slot = (0, _slotFill.useSlot)(slotName);
370
218
 
371
219
  const onDialogClose = (type, event) => {
372
220
  // Ideally the popover should have just a single onClose prop and
@@ -383,12 +231,108 @@ const Popover = (_ref, ref) => {
383
231
  __unstableOnClose: onDialogClose,
384
232
  onClose: onDialogClose
385
233
  });
386
- const mergedRefs = (0, _compose.useMergeRefs)([containerRef, dialogRef, ref]);
234
+ const {
235
+ x,
236
+ y,
237
+ reference,
238
+ floating,
239
+ strategy,
240
+ refs,
241
+ update,
242
+ placement: placementData,
243
+ middlewareData: {
244
+ arrow: arrowData = {}
245
+ }
246
+ } = (0, _reactDom.useFloating)({
247
+ placement: usedPlacement,
248
+ middleware: middlewares
249
+ });
250
+ const staticSide = {
251
+ top: 'bottom',
252
+ right: 'left',
253
+ bottom: 'top',
254
+ left: 'right'
255
+ }[placementData.split('-')[0]];
256
+ const mergedRefs = (0, _compose.useMergeRefs)([floating, dialogRef, ref]); // Updates references
257
+
258
+ (0, _element.useLayoutEffect)(() => {
259
+ // No ref or position have been passed
260
+ let usedRef;
261
+
262
+ if (anchorRef !== null && anchorRef !== void 0 && anchorRef.top) {
263
+ usedRef = {
264
+ getBoundingClientRect() {
265
+ const topRect = anchorRef.top.getBoundingClientRect();
266
+ const bottomRect = anchorRef.bottom.getBoundingClientRect();
267
+ return new window.DOMRect(topRect.x, topRect.y, topRect.width, bottomRect.bottom - topRect.top);
268
+ }
269
+
270
+ };
271
+ } else if (anchorRef !== null && anchorRef !== void 0 && anchorRef.current) {
272
+ usedRef = anchorRef.current;
273
+ } else if (anchorRef) {
274
+ usedRef = anchorRef;
275
+ } else if (anchorRect) {
276
+ usedRef = {
277
+ getBoundingClientRect() {
278
+ return anchorRect;
279
+ }
280
+
281
+ };
282
+ } else if (getAnchorRect) {
283
+ usedRef = {
284
+ getBoundingClientRect() {
285
+ var _rect$x, _rect$y, _rect$width, _rect$height;
286
+
287
+ const rect = getAnchorRect();
288
+ return new window.DOMRect((_rect$x = rect.x) !== null && _rect$x !== void 0 ? _rect$x : rect.left, (_rect$y = rect.y) !== null && _rect$y !== void 0 ? _rect$y : rect.top, (_rect$width = rect.width) !== null && _rect$width !== void 0 ? _rect$width : rect.right - rect.left, (_rect$height = rect.height) !== null && _rect$height !== void 0 ? _rect$height : rect.bottom - rect.top);
289
+ }
290
+
291
+ };
292
+ } else if (anchorRefFallback.current) {
293
+ usedRef = anchorRefFallback.current;
294
+ }
295
+
296
+ if (!usedRef) {
297
+ return;
298
+ }
299
+
300
+ reference(usedRef);
301
+
302
+ if (!refs.floating.current) {
303
+ return;
304
+ }
305
+
306
+ return (0, _reactDom.autoUpdate)(usedRef, refs.floating.current, update);
307
+ }, [anchorRef, anchorRect, getAnchorRect]); // This is only needed for a smoth transition when moving blocks.
308
+
309
+ (0, _element.useLayoutEffect)(() => {
310
+ if (!__unstableObserveElement) {
311
+ return;
312
+ }
313
+
314
+ const observer = new window.MutationObserver(update);
315
+ observer.observe(__unstableObserveElement, {
316
+ attributes: true
317
+ });
318
+ return () => {
319
+ observer.disconnect();
320
+ };
321
+ }, [__unstableObserveElement]); // If we're using getAnchorRect, we need to update the position as we scroll the iframe.
322
+
323
+ (0, _element.useLayoutEffect)(() => {
324
+ if (ownerDocument === document) {
325
+ return;
326
+ }
327
+
328
+ ownerDocument.addEventListener('scroll', update);
329
+ return () => ownerDocument.removeEventListener('scroll', update);
330
+ }, [ownerDocument]);
387
331
  /** @type {false | string} */
388
332
 
389
- const animateClassName = Boolean(animate && animateOrigin) && (0, _animate.getAnimateClassName)({
333
+ const animateClassName = !!animate && (0, _animate.getAnimateClassName)({
390
334
  type: 'appear',
391
- origin: animateOrigin
335
+ origin: placementToAnimationOrigin(placementData)
392
336
  }); // Disable reason: We care to capture the _bubbled_ events from inputs
393
337
  // within popover as inferring close intent.
394
338
 
@@ -397,13 +341,17 @@ const Popover = (_ref, ref) => {
397
341
  (0, _element.createElement)("div", (0, _extends2.default)({
398
342
  className: (0, _classnames.default)('components-popover', className, animateClassName, {
399
343
  'is-expanded': isExpanded,
400
- 'is-without-arrow': noArrow,
401
344
  'is-alternate': isAlternate
402
345
  })
403
346
  }, contentProps, {
404
347
  ref: mergedRefs
405
348
  }, dialogProps, {
406
- tabIndex: "-1"
349
+ tabIndex: "-1",
350
+ style: isExpanded ? undefined : {
351
+ position: strategy,
352
+ left: Number.isNaN(x) ? 0 : x,
353
+ top: Number.isNaN(y) ? 0 : y
354
+ }
407
355
  }), isExpanded && (0, _element.createElement)(_scrollLock.default, null), isExpanded && (0, _element.createElement)("div", {
408
356
  className: "components-popover__header"
409
357
  }, (0, _element.createElement)("span", {
@@ -413,13 +361,18 @@ const Popover = (_ref, ref) => {
413
361
  icon: _icons.close,
414
362
  onClick: onClose
415
363
  })), (0, _element.createElement)("div", {
416
- ref: contentRef,
417
364
  className: "components-popover__content"
418
- }, (0, _element.createElement)("div", {
365
+ }, children), hasArrow && (0, _element.createElement)("div", {
366
+ className: "components-popover__arrow",
367
+ ref: arrowRef,
419
368
  style: {
420
- position: 'relative'
369
+ left: !(arrowData !== null && arrowData !== void 0 && arrowData.x) || Number.isNaN(arrowData === null || arrowData === void 0 ? void 0 : arrowData.x) ? 0 : arrowData.x,
370
+ top: !(arrowData !== null && arrowData !== void 0 && arrowData.y) || Number.isNaN(arrowData === null || arrowData === void 0 ? void 0 : arrowData.y) ? 0 : arrowData.y,
371
+ right: undefined,
372
+ bottom: undefined,
373
+ [staticSide]: '-4px'
421
374
  }
422
- }, containerResizeListener, children)));
375
+ }));
423
376
 
424
377
  if (slot.ref) {
425
378
  content = (0, _element.createElement)(_slotFill.Fill, {
@@ -438,10 +391,10 @@ const Popover = (_ref, ref) => {
438
391
 
439
392
  const PopoverContainer = (0, _element.forwardRef)(Popover);
440
393
 
441
- function PopoverSlot(_ref2, ref) {
394
+ function PopoverSlot(_ref3, ref) {
442
395
  let {
443
396
  name = SLOT_NAME
444
- } = _ref2;
397
+ } = _ref3;
445
398
  return (0, _element.createElement)(_slotFill.Slot, {
446
399
  bubblesVirtually: true,
447
400
  name: name,