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