@wordpress/components 25.13.0 → 25.15.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 (656) hide show
  1. package/CHANGELOG.md +88 -1
  2. package/CONTRIBUTING.md +57 -115
  3. package/LICENSE.md +1 -1
  4. package/build/base-control/index.js +17 -13
  5. package/build/base-control/index.js.map +1 -1
  6. package/build/border-box-control/border-box-control-linked-button/component.js +1 -1
  7. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  8. package/build/border-control/border-control-dropdown/component.js +4 -2
  9. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  10. package/build/border-control/border-control-dropdown/hook.js +3 -2
  11. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  12. package/build/border-control/border-control-style-picker/component.js +1 -1
  13. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  14. package/build/border-control/styles.js +17 -17
  15. package/build/border-control/styles.js.map +1 -1
  16. package/build/box-control/index.js +1 -1
  17. package/build/box-control/index.js.map +1 -1
  18. package/build/box-control/linked-button.js +1 -1
  19. package/build/box-control/linked-button.js.map +1 -1
  20. package/build/button/index.js +1 -1
  21. package/build/button/index.js.map +1 -1
  22. package/build/checkbox-control/index.js +1 -1
  23. package/build/checkbox-control/index.js.map +1 -1
  24. package/build/checkbox-control/types.js.map +1 -1
  25. package/build/color-picker/color-copy-button.js +1 -1
  26. package/build/color-picker/color-copy-button.js.map +1 -1
  27. package/build/context/wordpress-component.js.map +1 -1
  28. package/build/custom-select-control-v2/index.js +11 -10
  29. package/build/custom-select-control-v2/index.js.map +1 -1
  30. package/build/date-time/date/styles.js +8 -8
  31. package/build/date-time/date/styles.js.map +1 -1
  32. package/build/date-time/time/timezone.js +11 -2
  33. package/build/date-time/time/timezone.js.map +1 -1
  34. package/build/dimension-control/index.js +2 -0
  35. package/build/dimension-control/index.js.map +1 -1
  36. package/build/dimension-control/types.js.map +1 -1
  37. package/build/dropdown-menu-v2/index.js +205 -159
  38. package/build/dropdown-menu-v2/index.js.map +1 -1
  39. package/build/dropdown-menu-v2/styles.js +86 -77
  40. package/build/dropdown-menu-v2/styles.js.map +1 -1
  41. package/build/dropdown-menu-v2/types.js.map +1 -1
  42. package/build/duotone-picker/duotone-picker.js +4 -3
  43. package/build/duotone-picker/duotone-picker.js.map +1 -1
  44. package/build/focal-point-picker/controls.js +5 -1
  45. package/build/focal-point-picker/controls.js.map +1 -1
  46. package/build/focal-point-picker/index.js +2 -0
  47. package/build/focal-point-picker/index.js.map +1 -1
  48. package/build/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  49. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  50. package/build/focal-point-picker/types.js.map +1 -1
  51. package/build/font-size-picker/font-size-picker-select.js +2 -0
  52. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  53. package/build/font-size-picker/font-size-picker-toggle-group.js +2 -0
  54. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  55. package/build/font-size-picker/index.js +10 -3
  56. package/build/font-size-picker/index.js.map +1 -1
  57. package/build/font-size-picker/index.native.js +6 -3
  58. package/build/font-size-picker/index.native.js.map +1 -1
  59. package/build/font-size-picker/types.js.map +1 -1
  60. package/build/form-token-field/index.js +10 -5
  61. package/build/form-token-field/index.js.map +1 -1
  62. package/build/form-token-field/token.js +1 -0
  63. package/build/form-token-field/token.js.map +1 -1
  64. package/build/gradient-picker/index.js +3 -2
  65. package/build/gradient-picker/index.js.map +1 -1
  66. package/build/index.native.js +20 -19
  67. package/build/index.native.js.map +1 -1
  68. package/build/input-control/styles/input-control-styles.js +32 -29
  69. package/build/input-control/styles/input-control-styles.js.map +1 -1
  70. package/build/input-control/types.js.map +1 -1
  71. package/build/lock-unlock.js +18 -0
  72. package/build/lock-unlock.js.map +1 -0
  73. package/build/mobile/bottom-sheet/index.native.js +8 -0
  74. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  75. package/build/mobile/global-styles-context/utils.native.js +39 -13
  76. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  77. package/build/mobile/image/constants.js +12 -0
  78. package/build/mobile/image/constants.js.map +1 -0
  79. package/build/mobile/image/index.native.js +26 -18
  80. package/build/mobile/image/index.native.js.map +1 -1
  81. package/build/mobile/keyboard-aware-flat-list/index.android.js +40 -8
  82. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  83. package/build/mobile/keyboard-aware-flat-list/index.ios.js +44 -68
  84. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  85. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +39 -0
  86. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -0
  87. package/build/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +22 -29
  88. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -0
  89. package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js +93 -0
  90. package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -0
  91. package/build/mobile/utils/get-px-from-css-unit.native.js +302 -0
  92. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -0
  93. package/build/modal/index.js +18 -13
  94. package/build/modal/index.js.map +1 -1
  95. package/build/navigation/menu/menu-title.js +1 -1
  96. package/build/navigation/menu/menu-title.js.map +1 -1
  97. package/build/navigator/navigator-provider/component.js +13 -15
  98. package/build/navigator/navigator-provider/component.js.map +1 -1
  99. package/build/navigator/navigator-screen/component.js +23 -63
  100. package/build/navigator/navigator-screen/component.js.map +1 -1
  101. package/build/navigator/styles.js +52 -0
  102. package/build/navigator/styles.js.map +1 -0
  103. package/build/number-control/index.js +4 -8
  104. package/build/number-control/index.js.map +1 -1
  105. package/build/number-control/types.js.map +1 -1
  106. package/build/palette-edit/index.js +15 -34
  107. package/build/palette-edit/index.js.map +1 -1
  108. package/build/private-apis.js +11 -26
  109. package/build/private-apis.js.map +1 -1
  110. package/build/private-apis.native.js +21 -0
  111. package/build/private-apis.native.js.map +1 -0
  112. package/build/query-controls/author-select.js +3 -1
  113. package/build/query-controls/author-select.js.map +1 -1
  114. package/build/query-controls/category-select.js +3 -1
  115. package/build/query-controls/category-select.js.map +1 -1
  116. package/build/query-controls/index.js +6 -1
  117. package/build/query-controls/index.js.map +1 -1
  118. package/build/query-controls/types.js.map +1 -1
  119. package/build/radio-control/index.js +1 -0
  120. package/build/radio-control/index.js.map +1 -1
  121. package/build/range-control/index.js +1 -1
  122. package/build/range-control/index.js.map +1 -1
  123. package/build/select-control/styles/select-control-styles.js +15 -25
  124. package/build/select-control/styles/select-control-styles.js.map +1 -1
  125. package/build/slot-fill/index.js +3 -2
  126. package/build/slot-fill/index.js.map +1 -1
  127. package/build/slot-fill/types.js.map +1 -1
  128. package/build/snackbar/types.js.map +1 -1
  129. package/build/tabs/index.js +18 -1
  130. package/build/tabs/index.js.map +1 -1
  131. package/build/tabs/styles.js +3 -3
  132. package/build/tabs/styles.js.map +1 -1
  133. package/build/tabs/tab.js +2 -2
  134. package/build/tabs/tab.js.map +1 -1
  135. package/build/tabs/tabpanel.js +11 -8
  136. package/build/tabs/tabpanel.js.map +1 -1
  137. package/build/tabs/types.js.map +1 -1
  138. package/build/toggle-group-control/toggle-group-control/component.js +4 -4
  139. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  140. package/build/toggle-group-control/toggle-group-control/styles.js +29 -15
  141. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  142. package/build/toggle-group-control/toggle-group-control/utils.js +17 -17
  143. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  144. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  145. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  146. package/build/tools-panel/tools-panel/component.js +3 -1
  147. package/build/tools-panel/tools-panel/component.js.map +1 -1
  148. package/build/tools-panel/tools-panel-header/component.js +9 -8
  149. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  150. package/build/tools-panel/tools-panel-item/hook.js +11 -11
  151. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  152. package/build/tools-panel/types.js.map +1 -1
  153. package/build/tooltip/index.js +1 -1
  154. package/build/tooltip/index.js.map +1 -1
  155. package/build/truncate/hook.js +10 -4
  156. package/build/truncate/hook.js.map +1 -1
  157. package/build/truncate/types.js.map +1 -1
  158. package/build/unit-control/index.js +1 -1
  159. package/build/unit-control/index.js.map +1 -1
  160. package/build/utils/strings.js +34 -3
  161. package/build/utils/strings.js.map +1 -1
  162. package/build-module/base-control/index.js +16 -12
  163. package/build-module/base-control/index.js.map +1 -1
  164. package/build-module/border-box-control/border-box-control-linked-button/component.js +1 -1
  165. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  166. package/build-module/border-control/border-control-dropdown/component.js +4 -2
  167. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  168. package/build-module/border-control/border-control-dropdown/hook.js +3 -2
  169. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  170. package/build-module/border-control/border-control-style-picker/component.js +1 -1
  171. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  172. package/build-module/border-control/styles.js +17 -17
  173. package/build-module/border-control/styles.js.map +1 -1
  174. package/build-module/box-control/index.js +1 -1
  175. package/build-module/box-control/index.js.map +1 -1
  176. package/build-module/box-control/linked-button.js +1 -1
  177. package/build-module/box-control/linked-button.js.map +1 -1
  178. package/build-module/button/index.js +1 -1
  179. package/build-module/button/index.js.map +1 -1
  180. package/build-module/checkbox-control/index.js +1 -1
  181. package/build-module/checkbox-control/index.js.map +1 -1
  182. package/build-module/checkbox-control/types.js.map +1 -1
  183. package/build-module/color-picker/color-copy-button.js +1 -1
  184. package/build-module/color-picker/color-copy-button.js.map +1 -1
  185. package/build-module/context/wordpress-component.js.map +1 -1
  186. package/build-module/custom-select-control-v2/index.js +11 -10
  187. package/build-module/custom-select-control-v2/index.js.map +1 -1
  188. package/build-module/date-time/date/styles.js +8 -8
  189. package/build-module/date-time/date/styles.js.map +1 -1
  190. package/build-module/date-time/time/timezone.js +11 -2
  191. package/build-module/date-time/time/timezone.js.map +1 -1
  192. package/build-module/dimension-control/index.js +2 -0
  193. package/build-module/dimension-control/index.js.map +1 -1
  194. package/build-module/dimension-control/types.js.map +1 -1
  195. package/build-module/dropdown-menu-v2/index.js +201 -154
  196. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  197. package/build-module/dropdown-menu-v2/styles.js +68 -61
  198. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  199. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  200. package/build-module/duotone-picker/duotone-picker.js +4 -3
  201. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  202. package/build-module/focal-point-picker/controls.js +5 -1
  203. package/build-module/focal-point-picker/controls.js.map +1 -1
  204. package/build-module/focal-point-picker/index.js +2 -0
  205. package/build-module/focal-point-picker/index.js.map +1 -1
  206. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  207. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  208. package/build-module/focal-point-picker/types.js.map +1 -1
  209. package/build-module/font-size-picker/font-size-picker-select.js +2 -0
  210. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  211. package/build-module/font-size-picker/font-size-picker-toggle-group.js +2 -0
  212. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  213. package/build-module/font-size-picker/index.js +10 -3
  214. package/build-module/font-size-picker/index.js.map +1 -1
  215. package/build-module/font-size-picker/index.native.js +5 -2
  216. package/build-module/font-size-picker/index.native.js.map +1 -1
  217. package/build-module/font-size-picker/types.js.map +1 -1
  218. package/build-module/form-token-field/index.js +10 -5
  219. package/build-module/form-token-field/index.js.map +1 -1
  220. package/build-module/form-token-field/token.js +1 -0
  221. package/build-module/form-token-field/token.js.map +1 -1
  222. package/build-module/gradient-picker/index.js +3 -2
  223. package/build-module/gradient-picker/index.js.map +1 -1
  224. package/build-module/index.native.js +6 -3
  225. package/build-module/index.native.js.map +1 -1
  226. package/build-module/input-control/styles/input-control-styles.js +31 -29
  227. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  228. package/build-module/input-control/types.js.map +1 -1
  229. package/build-module/lock-unlock.js +9 -0
  230. package/build-module/lock-unlock.js.map +1 -0
  231. package/build-module/mobile/bottom-sheet/index.native.js +9 -1
  232. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  233. package/build-module/mobile/global-styles-context/utils.native.js +38 -13
  234. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  235. package/build-module/mobile/image/constants.js +5 -0
  236. package/build-module/mobile/image/constants.js.map +1 -0
  237. package/build-module/mobile/image/index.native.js +25 -16
  238. package/build-module/mobile/image/index.native.js.map +1 -1
  239. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +40 -6
  240. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  241. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +46 -68
  242. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  243. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +33 -0
  244. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -0
  245. package/build-module/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +21 -27
  246. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -0
  247. package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js +86 -0
  248. package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -0
  249. package/build-module/mobile/utils/get-px-from-css-unit.native.js +294 -0
  250. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -0
  251. package/build-module/modal/index.js +18 -13
  252. package/build-module/modal/index.js.map +1 -1
  253. package/build-module/navigation/menu/menu-title.js +1 -1
  254. package/build-module/navigation/menu/menu-title.js.map +1 -1
  255. package/build-module/navigator/navigator-provider/component.js +3 -16
  256. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  257. package/build-module/navigator/navigator-screen/component.js +16 -70
  258. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  259. package/build-module/navigator/styles.js +47 -0
  260. package/build-module/navigator/styles.js.map +1 -0
  261. package/build-module/number-control/index.js +4 -8
  262. package/build-module/number-control/index.js.map +1 -1
  263. package/build-module/number-control/types.js.map +1 -1
  264. package/build-module/palette-edit/index.js +14 -33
  265. package/build-module/palette-edit/index.js.map +1 -1
  266. package/build-module/private-apis.js +10 -23
  267. package/build-module/private-apis.js.map +1 -1
  268. package/build-module/private-apis.native.js +14 -0
  269. package/build-module/private-apis.native.js.map +1 -0
  270. package/build-module/query-controls/author-select.js +3 -1
  271. package/build-module/query-controls/author-select.js.map +1 -1
  272. package/build-module/query-controls/category-select.js +3 -1
  273. package/build-module/query-controls/category-select.js.map +1 -1
  274. package/build-module/query-controls/index.js +6 -1
  275. package/build-module/query-controls/index.js.map +1 -1
  276. package/build-module/query-controls/types.js.map +1 -1
  277. package/build-module/radio-control/index.js +1 -0
  278. package/build-module/radio-control/index.js.map +1 -1
  279. package/build-module/range-control/index.js +1 -1
  280. package/build-module/range-control/index.js.map +1 -1
  281. package/build-module/select-control/styles/select-control-styles.js +15 -25
  282. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  283. package/build-module/slot-fill/index.js +3 -2
  284. package/build-module/slot-fill/index.js.map +1 -1
  285. package/build-module/slot-fill/types.js.map +1 -1
  286. package/build-module/snackbar/types.js.map +1 -1
  287. package/build-module/tabs/index.js +18 -1
  288. package/build-module/tabs/index.js.map +1 -1
  289. package/build-module/tabs/styles.js +3 -3
  290. package/build-module/tabs/styles.js.map +1 -1
  291. package/build-module/tabs/tab.js +2 -2
  292. package/build-module/tabs/tab.js.map +1 -1
  293. package/build-module/tabs/tabpanel.js +11 -8
  294. package/build-module/tabs/tabpanel.js.map +1 -1
  295. package/build-module/tabs/types.js.map +1 -1
  296. package/build-module/toggle-group-control/toggle-group-control/component.js +4 -4
  297. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  298. package/build-module/toggle-group-control/toggle-group-control/styles.js +29 -15
  299. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  300. package/build-module/toggle-group-control/toggle-group-control/utils.js +17 -17
  301. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  302. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  303. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  304. package/build-module/tools-panel/tools-panel/component.js +3 -1
  305. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  306. package/build-module/tools-panel/tools-panel-header/component.js +9 -8
  307. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  308. package/build-module/tools-panel/tools-panel-item/hook.js +11 -11
  309. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  310. package/build-module/tools-panel/types.js.map +1 -1
  311. package/build-module/tooltip/index.js +1 -1
  312. package/build-module/tooltip/index.js.map +1 -1
  313. package/build-module/truncate/hook.js +10 -4
  314. package/build-module/truncate/hook.js.map +1 -1
  315. package/build-module/truncate/types.js.map +1 -1
  316. package/build-module/unit-control/index.js +1 -1
  317. package/build-module/unit-control/index.js.map +1 -1
  318. package/build-module/utils/strings.js +32 -2
  319. package/build-module/utils/strings.js.map +1 -1
  320. package/build-style/style-rtl.css +30 -6
  321. package/build-style/style.css +30 -6
  322. package/build-types/base-control/index.d.ts +3 -27
  323. package/build-types/base-control/index.d.ts.map +1 -1
  324. package/build-types/base-control/stories/index.story.d.ts +4 -1
  325. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  326. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  327. package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -0
  328. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  329. package/build-types/border-control/styles.d.ts +1 -1
  330. package/build-types/border-control/styles.d.ts.map +1 -1
  331. package/build-types/checkbox-control/index.d.ts.map +1 -1
  332. package/build-types/checkbox-control/types.d.ts +3 -2
  333. package/build-types/checkbox-control/types.d.ts.map +1 -1
  334. package/build-types/color-picker/component.d.ts +1 -1
  335. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  336. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  337. package/build-types/composite/test/index.d.ts.map +1 -0
  338. package/build-types/context/wordpress-component.d.ts +3 -3
  339. package/build-types/context/wordpress-component.d.ts.map +1 -1
  340. package/build-types/custom-select-control-v2/index.d.ts +3 -2
  341. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  342. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -3
  343. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  344. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  345. package/build-types/dimension-control/index.d.ts.map +1 -1
  346. package/build-types/dimension-control/types.d.ts +6 -0
  347. package/build-types/dimension-control/types.d.ts.map +1 -1
  348. package/build-types/dropdown/index.d.ts +1 -1
  349. package/build-types/dropdown/index.d.ts.map +1 -1
  350. package/build-types/dropdown/stories/index.story.d.ts +3 -3
  351. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  352. package/build-types/dropdown-menu/index.d.ts +1 -1
  353. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  354. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  355. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  356. package/build-types/dropdown-menu-v2/index.d.ts +18 -15
  357. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  358. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +7 -2
  359. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  360. package/build-types/dropdown-menu-v2/styles.d.ts +77 -23
  361. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  362. package/build-types/dropdown-menu-v2/types.d.ts +89 -173
  363. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  364. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  365. package/build-types/focal-point-picker/controls.d.ts +1 -1
  366. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  367. package/build-types/focal-point-picker/index.d.ts +1 -1
  368. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  369. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -4
  370. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  371. package/build-types/focal-point-picker/types.d.ts +7 -0
  372. package/build-types/focal-point-picker/types.d.ts.map +1 -1
  373. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  374. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  375. package/build-types/font-size-picker/index.d.ts.map +1 -1
  376. package/build-types/font-size-picker/types.d.ts +8 -1
  377. package/build-types/font-size-picker/types.d.ts.map +1 -1
  378. package/build-types/form-token-field/index.d.ts.map +1 -1
  379. package/build-types/form-token-field/token.d.ts.map +1 -1
  380. package/build-types/input-control/styles/input-control-styles.d.ts +11 -0
  381. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  382. package/build-types/input-control/types.d.ts +1 -1
  383. package/build-types/input-control/types.d.ts.map +1 -1
  384. package/build-types/lock-unlock.d.ts +3 -0
  385. package/build-types/lock-unlock.d.ts.map +1 -0
  386. package/build-types/mobile/image/constants.d.ts +5 -0
  387. package/build-types/mobile/image/constants.d.ts.map +1 -0
  388. package/build-types/modal/index.d.ts.map +1 -1
  389. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  390. package/build-types/navigator/navigator-screen/component.d.ts +1 -7
  391. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  392. package/build-types/navigator/styles.d.ts +9 -0
  393. package/build-types/navigator/styles.d.ts.map +1 -0
  394. package/build-types/number-control/index.d.ts.map +1 -1
  395. package/build-types/number-control/types.d.ts +1 -1
  396. package/build-types/palette-edit/index.d.ts +2 -2
  397. package/build-types/palette-edit/index.d.ts.map +1 -1
  398. package/build-types/popover/index.d.ts +1 -1
  399. package/build-types/popover/index.d.ts.map +1 -1
  400. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  401. package/build-types/private-apis.d.ts +0 -1
  402. package/build-types/private-apis.d.ts.map +1 -1
  403. package/build-types/query-controls/author-select.d.ts +1 -1
  404. package/build-types/query-controls/author-select.d.ts.map +1 -1
  405. package/build-types/query-controls/category-select.d.ts +1 -1
  406. package/build-types/query-controls/category-select.d.ts.map +1 -1
  407. package/build-types/query-controls/index.d.ts +1 -1
  408. package/build-types/query-controls/index.d.ts.map +1 -1
  409. package/build-types/query-controls/types.d.ts +9 -0
  410. package/build-types/query-controls/types.d.ts.map +1 -1
  411. package/build-types/radio-control/index.d.ts.map +1 -1
  412. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  413. package/build-types/slot-fill/index.d.ts +1 -1
  414. package/build-types/slot-fill/index.d.ts.map +1 -1
  415. package/build-types/slot-fill/types.d.ts +4 -0
  416. package/build-types/slot-fill/types.d.ts.map +1 -1
  417. package/build-types/snackbar/index.d.ts +2 -2
  418. package/build-types/snackbar/stories/index.story.d.ts +0 -3
  419. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  420. package/build-types/snackbar/types.d.ts +1 -1
  421. package/build-types/snackbar/types.d.ts.map +1 -1
  422. package/build-types/tabs/index.d.ts +2 -2
  423. package/build-types/tabs/index.d.ts.map +1 -1
  424. package/build-types/tabs/styles.d.ts.map +1 -1
  425. package/build-types/tabs/tab.d.ts +2 -1
  426. package/build-types/tabs/tab.d.ts.map +1 -1
  427. package/build-types/tabs/tabpanel.d.ts +3 -2
  428. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  429. package/build-types/tabs/types.d.ts +8 -3
  430. package/build-types/tabs/types.d.ts.map +1 -1
  431. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  432. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +2 -2
  433. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  434. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -1
  435. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -1
  436. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  437. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  438. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  439. package/build-types/tools-panel/tools-panel/hook.d.ts +1 -0
  440. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  441. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  442. package/build-types/tools-panel/tools-panel-header/hook.d.ts +1 -0
  443. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  444. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  445. package/build-types/tools-panel/types.d.ts +9 -0
  446. package/build-types/tools-panel/types.d.ts.map +1 -1
  447. package/build-types/truncate/hook.d.ts +1 -1
  448. package/build-types/truncate/hook.d.ts.map +1 -1
  449. package/build-types/truncate/types.d.ts +4 -0
  450. package/build-types/truncate/types.d.ts.map +1 -1
  451. package/build-types/utils/strings.d.ts +14 -2
  452. package/build-types/utils/strings.d.ts.map +1 -1
  453. package/package.json +20 -21
  454. package/src/alignment-matrix-control/test/index.tsx +10 -16
  455. package/src/base-control/index.tsx +21 -16
  456. package/src/border-box-control/border-box-control-linked-button/component.tsx +1 -1
  457. package/src/border-control/border-control-dropdown/component.tsx +3 -1
  458. package/src/border-control/border-control-dropdown/hook.ts +3 -2
  459. package/src/border-control/border-control-style-picker/component.tsx +1 -1
  460. package/src/border-control/styles.ts +2 -9
  461. package/src/box-control/index.tsx +1 -1
  462. package/src/box-control/linked-button.tsx +1 -1
  463. package/src/button/README.md +32 -6
  464. package/src/button/index.tsx +1 -1
  465. package/src/button-group/README.md +0 -6
  466. package/src/card/card/README.md +1 -1
  467. package/src/checkbox-control/README.md +3 -10
  468. package/src/checkbox-control/index.tsx +8 -6
  469. package/src/checkbox-control/test/__snapshots__/index.tsx.snap +3 -8
  470. package/src/checkbox-control/test/index.tsx +7 -0
  471. package/src/checkbox-control/types.ts +3 -2
  472. package/src/color-picker/color-copy-button.tsx +1 -1
  473. package/src/combobox-control/README.md +0 -6
  474. package/src/composite/test/index.tsx +576 -0
  475. package/src/context/wordpress-component.ts +11 -6
  476. package/src/custom-select-control/README.md +0 -6
  477. package/src/custom-select-control/test/index.js +367 -35
  478. package/src/custom-select-control-v2/index.tsx +13 -12
  479. package/src/date-time/date/styles.ts +3 -3
  480. package/src/date-time/time/timezone.tsx +15 -3
  481. package/src/dimension-control/index.tsx +2 -0
  482. package/src/dimension-control/test/__snapshots__/index.test.js.snap +2 -2
  483. package/src/dimension-control/types.ts +6 -0
  484. package/src/dropdown-menu/README.md +0 -5
  485. package/src/dropdown-menu-v2/README.md +75 -136
  486. package/src/dropdown-menu-v2/index.tsx +321 -231
  487. package/src/dropdown-menu-v2/stories/index.story.tsx +522 -126
  488. package/src/dropdown-menu-v2/styles.ts +226 -151
  489. package/src/dropdown-menu-v2/test/index.tsx +480 -188
  490. package/src/dropdown-menu-v2/types.ts +98 -184
  491. package/src/duotone-picker/duotone-picker.tsx +7 -3
  492. package/src/focal-point-picker/controls.tsx +4 -0
  493. package/src/focal-point-picker/index.tsx +2 -0
  494. package/src/focal-point-picker/styles/focal-point-picker-style.ts +1 -1
  495. package/src/focal-point-picker/types.ts +7 -0
  496. package/src/font-size-picker/font-size-picker-select.tsx +2 -0
  497. package/src/font-size-picker/font-size-picker-toggle-group.tsx +9 -1
  498. package/src/font-size-picker/index.native.js +8 -2
  499. package/src/font-size-picker/index.tsx +15 -5
  500. package/src/font-size-picker/types.ts +8 -1
  501. package/src/form-toggle/README.md +0 -6
  502. package/src/form-toggle/style.scss +4 -2
  503. package/src/form-token-field/index.tsx +11 -7
  504. package/src/form-token-field/test/index.tsx +97 -0
  505. package/src/form-token-field/token.tsx +1 -0
  506. package/src/gradient-picker/index.tsx +2 -2
  507. package/src/index.native.js +6 -3
  508. package/src/input-control/styles/input-control-styles.tsx +10 -8
  509. package/src/input-control/types.ts +1 -1
  510. package/src/lock-unlock.js +10 -0
  511. package/src/menu-group/README.md +0 -8
  512. package/src/menu-items-choice/README.md +0 -7
  513. package/src/mobile/bottom-sheet/index.native.js +15 -1
  514. package/src/mobile/global-styles-context/test/fixtures/theme.native.js +0 -20
  515. package/src/mobile/global-styles-context/test/utils.native.js +22 -0
  516. package/src/mobile/global-styles-context/utils.native.js +42 -19
  517. package/src/mobile/image/constants.js +1 -0
  518. package/src/mobile/image/index.native.js +55 -18
  519. package/src/mobile/image/style.native.scss +35 -9
  520. package/src/mobile/keyboard-aware-flat-list/index.android.js +50 -5
  521. package/src/mobile/keyboard-aware-flat-list/index.ios.js +65 -91
  522. package/src/mobile/keyboard-aware-flat-list/test/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +27 -25
  523. package/src/mobile/keyboard-aware-flat-list/test/use-scroll.native.js +71 -0
  524. package/src/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +41 -0
  525. package/src/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +22 -27
  526. package/src/mobile/keyboard-aware-flat-list/use-scroll.native.js +100 -0
  527. package/src/mobile/link-settings/style.native.scss +0 -17
  528. package/src/mobile/utils/get-px-from-css-unit.native.js +329 -0
  529. package/src/mobile/utils/test/get-px-from-css-unit.native.js +172 -0
  530. package/src/modal/README.md +0 -6
  531. package/src/modal/index.tsx +18 -16
  532. package/src/modal/test/index.tsx +90 -1
  533. package/src/navigation/menu/menu-title.tsx +1 -1
  534. package/src/navigator/navigator-provider/component.tsx +3 -4
  535. package/src/navigator/navigator-screen/component.tsx +15 -93
  536. package/src/navigator/styles.ts +71 -0
  537. package/src/navigator/test/index.tsx +0 -64
  538. package/src/notice/README.md +0 -6
  539. package/src/number-control/README.md +2 -2
  540. package/src/number-control/index.tsx +4 -8
  541. package/src/number-control/types.ts +1 -1
  542. package/src/palette-edit/index.tsx +14 -43
  543. package/src/palette-edit/style.scss +2 -2
  544. package/src/panel/README.md +0 -6
  545. package/src/private-apis.native.js +13 -0
  546. package/src/private-apis.ts +12 -37
  547. package/src/query-controls/author-select.tsx +2 -0
  548. package/src/query-controls/category-select.tsx +2 -0
  549. package/src/query-controls/index.tsx +6 -1
  550. package/src/query-controls/types.ts +9 -0
  551. package/src/radio-control/README.md +0 -6
  552. package/src/radio-control/index.tsx +4 -1
  553. package/src/radio-control/style.scss +29 -2
  554. package/src/radio-group/README.md +0 -6
  555. package/src/range-control/README.md +1 -9
  556. package/src/range-control/index.tsx +1 -1
  557. package/src/search-control/README.md +1 -5
  558. package/src/select-control/README.md +0 -6
  559. package/src/select-control/styles/select-control-styles.ts +10 -28
  560. package/src/slot-fill/index.tsx +5 -2
  561. package/src/slot-fill/types.ts +5 -0
  562. package/src/snackbar/README.md +0 -6
  563. package/src/snackbar/stories/index.story.tsx +7 -5
  564. package/src/snackbar/style.scss +4 -3
  565. package/src/snackbar/types.ts +2 -1
  566. package/src/spacer/README.md +0 -2
  567. package/src/spinner/README.md +2 -0
  568. package/src/tab-panel/README.md +0 -5
  569. package/src/tab-panel/test/index.tsx +39 -56
  570. package/src/tabs/README.md +4 -4
  571. package/src/tabs/index.tsx +22 -1
  572. package/src/tabs/stories/index.story.tsx +48 -48
  573. package/src/tabs/styles.ts +7 -1
  574. package/src/tabs/tab.tsx +3 -3
  575. package/src/tabs/tabpanel.tsx +13 -8
  576. package/src/tabs/test/index.tsx +236 -106
  577. package/src/tabs/types.ts +8 -3
  578. package/src/text-control/README.md +0 -6
  579. package/src/textarea-control/README.md +0 -6
  580. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -16
  581. package/src/toggle-group-control/test/index.tsx +107 -41
  582. package/src/toggle-group-control/toggle-group-control/component.tsx +5 -4
  583. package/src/toggle-group-control/toggle-group-control/styles.ts +13 -19
  584. package/src/toggle-group-control/toggle-group-control/utils.ts +15 -20
  585. package/src/toggle-group-control/toggle-group-control-option/README.md +1 -1
  586. package/src/toggle-group-control/toggle-group-control-option-base/README.md +1 -1
  587. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +3 -2
  588. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
  589. package/src/toolbar/toolbar/README.md +0 -6
  590. package/src/tools-panel/test/index.tsx +12 -20
  591. package/src/tools-panel/tools-panel/README.md +7 -0
  592. package/src/tools-panel/tools-panel/component.tsx +2 -0
  593. package/src/tools-panel/tools-panel-header/README.md +7 -0
  594. package/src/tools-panel/tools-panel-header/component.tsx +20 -13
  595. package/src/tools-panel/tools-panel-item/hook.ts +10 -21
  596. package/src/tools-panel/types.ts +9 -0
  597. package/src/tooltip/index.tsx +1 -1
  598. package/src/tooltip/test/index.tsx +360 -256
  599. package/src/tree-grid/README.md +0 -4
  600. package/src/truncate/README.md +8 -0
  601. package/src/truncate/hook.ts +17 -10
  602. package/src/truncate/test/index.tsx +54 -27
  603. package/src/truncate/types.ts +4 -0
  604. package/src/unit-control/index.tsx +1 -1
  605. package/src/utils/strings.ts +30 -2
  606. package/src/utils/test/strings.js +96 -1
  607. package/tsconfig.tsbuildinfo +1 -1
  608. package/build/dropdown-menu-v2-ariakit/index.js +0 -256
  609. package/build/dropdown-menu-v2-ariakit/index.js.map +0 -1
  610. package/build/dropdown-menu-v2-ariakit/styles.js +0 -180
  611. package/build/dropdown-menu-v2-ariakit/styles.js.map +0 -1
  612. package/build/dropdown-menu-v2-ariakit/types.js +0 -6
  613. package/build/dropdown-menu-v2-ariakit/types.js.map +0 -1
  614. package/build/mobile/inserter-button/index.native.js +0 -98
  615. package/build/mobile/inserter-button/index.native.js.map +0 -1
  616. package/build/mobile/inserter-button/sparkles.js +0 -23
  617. package/build/mobile/inserter-button/sparkles.js.map +0 -1
  618. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +0 -1
  619. package/build/mobile/link-settings/image-link-destinations-screen.native.js +0 -119
  620. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  621. package/build-module/dropdown-menu-v2-ariakit/index.js +0 -237
  622. package/build-module/dropdown-menu-v2-ariakit/index.js.map +0 -1
  623. package/build-module/dropdown-menu-v2-ariakit/styles.js +0 -165
  624. package/build-module/dropdown-menu-v2-ariakit/styles.js.map +0 -1
  625. package/build-module/dropdown-menu-v2-ariakit/types.js +0 -2
  626. package/build-module/dropdown-menu-v2-ariakit/types.js.map +0 -1
  627. package/build-module/mobile/inserter-button/index.native.js +0 -89
  628. package/build-module/mobile/inserter-button/index.native.js.map +0 -1
  629. package/build-module/mobile/inserter-button/sparkles.js +0 -15
  630. package/build-module/mobile/inserter-button/sparkles.js.map +0 -1
  631. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +0 -1
  632. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +0 -110
  633. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  634. package/build-types/dropdown-menu-v2-ariakit/index.d.ts +0 -20
  635. package/build-types/dropdown-menu-v2-ariakit/index.d.ts.map +0 -1
  636. package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts +0 -16
  637. package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts.map +0 -1
  638. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts +0 -96
  639. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts.map +0 -1
  640. package/build-types/dropdown-menu-v2-ariakit/test/index.d.ts.map +0 -1
  641. package/build-types/dropdown-menu-v2-ariakit/types.d.ts +0 -168
  642. package/build-types/dropdown-menu-v2-ariakit/types.d.ts.map +0 -1
  643. package/build-types/mobile/inserter-button/sparkles.d.ts +0 -3
  644. package/build-types/mobile/inserter-button/sparkles.d.ts.map +0 -1
  645. package/src/dropdown-menu-v2-ariakit/README.md +0 -331
  646. package/src/dropdown-menu-v2-ariakit/index.tsx +0 -383
  647. package/src/dropdown-menu-v2-ariakit/stories/index.story.tsx +0 -617
  648. package/src/dropdown-menu-v2-ariakit/styles.ts +0 -333
  649. package/src/dropdown-menu-v2-ariakit/test/index.tsx +0 -1108
  650. package/src/dropdown-menu-v2-ariakit/types.ts +0 -179
  651. package/src/mobile/inserter-button/README.md +0 -62
  652. package/src/mobile/inserter-button/index.native.js +0 -116
  653. package/src/mobile/inserter-button/sparkles.js +0 -15
  654. package/src/mobile/inserter-button/style.native.scss +0 -72
  655. package/src/mobile/link-settings/image-link-destinations-screen.native.js +0 -152
  656. /package/build-types/{dropdown-menu-v2-ariakit → composite}/test/index.d.ts +0 -0
@@ -1,168 +0,0 @@
1
- /// <reference types="react" />
2
- /**
3
- * External dependencies
4
- */
5
- import type * as Ariakit from '@ariakit/react';
6
- import type { Placement } from '@floating-ui/react-dom';
7
- export interface DropdownMenuContext {
8
- /**
9
- * The ariakit store shared across all DropdownMenu subcomponents.
10
- */
11
- store: Ariakit.MenuStore;
12
- /**
13
- * The variant used by the underlying menu popover.
14
- */
15
- variant?: 'toolbar';
16
- }
17
- export interface DropdownMenuProps {
18
- /**
19
- * The trigger button.
20
- */
21
- trigger: React.ReactElement;
22
- /**
23
- * The contents of the dropdown.
24
- */
25
- children?: React.ReactNode;
26
- /**
27
- * The open state of the dropdown menu when it is initially rendered. Use when
28
- * not wanting to control its open state.
29
- *
30
- * @default false
31
- */
32
- defaultOpen?: boolean;
33
- /**
34
- * The controlled open state of the dropdown menu. Must be used in conjunction
35
- * with `onOpenChange`.
36
- */
37
- open?: boolean;
38
- /**
39
- * Event handler called when the open state of the dropdown menu changes.
40
- */
41
- onOpenChange?: (open: boolean) => void;
42
- /**
43
- * The modality of the dropdown menu. When set to true, interaction with
44
- * outside elements will be disabled and only menu content will be visible to
45
- * screen readers.
46
- *
47
- * @default true
48
- */
49
- modal?: boolean;
50
- /**
51
- * The placement of the dropdown menu popover.
52
- *
53
- * @default 'bottom-start' for root-level menus, 'right-start' for nested menus
54
- */
55
- placement?: Placement;
56
- /**
57
- * The distance between the popover and the anchor element.
58
- *
59
- * @default 8 for root-level menus, 16 for nested menus
60
- */
61
- gutter?: number;
62
- /**
63
- * The skidding of the popover along the anchor element. Can be set to
64
- * negative values to make the popover shift to the opposite side.
65
- *
66
- * @default 0 for root-level menus, -8 for nested menus
67
- */
68
- shift?: number;
69
- /**
70
- * Determines whether the menu popover will be hidden when the user presses
71
- * the Escape key.
72
- *
73
- * @default `( event ) => { event.preventDefault(); return true; }`
74
- */
75
- hideOnEscape?: boolean | ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean);
76
- }
77
- export interface DropdownMenuGroupProps {
78
- /**
79
- * The contents of the dropdown menu group.
80
- */
81
- children: React.ReactNode;
82
- }
83
- export interface DropdownMenuItemProps {
84
- /**
85
- * The contents of the menu item.
86
- */
87
- children: React.ReactNode;
88
- /**
89
- * The contents of the menu item's prefix.
90
- */
91
- prefix?: React.ReactNode;
92
- /**
93
- * The contents of the menu item's suffix.
94
- */
95
- suffix?: React.ReactNode;
96
- /**
97
- * Whether to hide the parent menu when the item is clicked.
98
- *
99
- * @default true
100
- */
101
- hideOnClick?: boolean;
102
- /**
103
- * Determines if the element is disabled.
104
- */
105
- disabled?: boolean;
106
- }
107
- export interface DropdownMenuCheckboxItemProps extends Omit<DropdownMenuItemProps, 'prefix' | 'hideOnClick'> {
108
- /**
109
- * Whether to hide the dropdown menu when the item is clicked.
110
- *
111
- * @default false
112
- */
113
- hideOnClick?: boolean;
114
- /**
115
- * The checkbox menu item's name.
116
- */
117
- name: string;
118
- /**
119
- * The checkbox item's value, useful when using multiple checkbox menu items
120
- * associated to the same `name`.
121
- */
122
- value?: string;
123
- /**
124
- * The controlled checked state of the checkbox menu item.
125
- */
126
- checked?: boolean;
127
- /**
128
- * The checked state of the checkbox menu item when it is initially rendered.
129
- * Use when not wanting to control its checked state.
130
- */
131
- defaultChecked?: boolean;
132
- /**
133
- * Event handler called when the checked state of the checkbox menu item changes.
134
- */
135
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
136
- }
137
- export interface DropdownMenuRadioItemProps extends Omit<DropdownMenuItemProps, 'prefix' | 'hideOnClick'> {
138
- /**
139
- * Whether to hide the dropdown menu when the item is clicked.
140
- *
141
- * @default false
142
- */
143
- hideOnClick?: boolean;
144
- /**
145
- * The radio item's name.
146
- */
147
- name: string;
148
- /**
149
- * The radio item's value.
150
- */
151
- value: string | number;
152
- /**
153
- * The controlled checked state of the radio menu item.
154
- */
155
- checked?: boolean;
156
- /**
157
- * The checked state of the radio menu item when it is initially rendered.
158
- * Use when not wanting to control its checked state.
159
- */
160
- defaultChecked?: boolean;
161
- /**
162
- * Event handler called when the checked radio menu item changes.
163
- */
164
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
165
- }
166
- export interface DropdownMenuSeparatorProps {
167
- }
168
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dropdown-menu-v2-ariakit/types.ts"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,KAAK,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IACzC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,YAAY,CAAC,EACV,OAAO,GACP,CAAE,CACF,KAAK,EAAE,aAAa,GAAG,KAAK,CAAC,aAAa,CAAE,OAAO,CAAE,KAChD,OAAO,CAAE,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,6BAChB,SAAQ,IAAI,CAAE,qBAAqB,EAAE,QAAQ,GAAG,aAAa,CAAE;IAC/D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAE,gBAAgB,CAAE,KAAM,IAAI,CAAC;CACpE;AAED,MAAM,WAAW,0BAChB,SAAQ,IAAI,CAAE,qBAAqB,EAAE,QAAQ,GAAG,aAAa,CAAE;IAC/D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAE,gBAAgB,CAAE,KAAM,IAAI,CAAC;CACpE;AAED,MAAM,WAAW,0BAA0B;CAAG"}
@@ -1,3 +0,0 @@
1
- export default sparkles;
2
- declare const sparkles: JSX.Element;
3
- //# sourceMappingURL=sparkles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sparkles.d.ts","sourceRoot":"","sources":["../../../src/mobile/inserter-button/sparkles.js"],"names":[],"mappings":";AAKA,oCAOE"}
@@ -1,331 +0,0 @@
1
- # `DropdownMenu` (v2)
2
-
3
- <div class="callout callout-alert">
4
- This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
5
- </div>
6
-
7
- `DropdownMenu` displays a menu to the user (such as a set of actions or functions) triggered by a button.
8
-
9
-
10
- ## Design guidelines
11
-
12
- ### Usage
13
-
14
- #### When to use a DropdownMenu
15
-
16
- Use a DropdownMenu when you want users to:
17
-
18
- - Choose an action or change a setting from a list, AND
19
- - Only see the available choices contextually.
20
-
21
- `DropdownMenu` is a React component to render an expandable menu of buttons. It is similar in purpose to a `<select>` element, with the distinction that it does not maintain a value. Instead, each option behaves as an action button.
22
-
23
- If you need to display all the available options at all times, consider using a Toolbar instead. Use a `DropdownMenu` to display a list of actions after the user interacts with a button.
24
-
25
- **Do**
26
- Use a `DropdownMenu` to display a list of actions after the user interacts with an icon.
27
-
28
- **Don’t** use a `DropdownMenu` for important actions that should always be visible. Use a `Toolbar` instead.
29
-
30
- **Don’t**
31
- Don’t use a `DropdownMenu` for frequently used actions. Use a `Toolbar` instead.
32
-
33
- #### Behavior
34
-
35
- Generally, the parent button should indicate that interacting with it will show a `DropdownMenu`.
36
-
37
- The parent button should retain the same visual styling regardless of whether the `DropdownMenu` is displayed or not.
38
-
39
- #### Placement
40
-
41
- The `DropdownMenu` should typically appear directly below, or below and to the left of, the parent button. If there isn’t enough space below to display the full `DropdownMenu`, it can be displayed instead above the parent button.
42
-
43
- ## Development guidelines
44
-
45
- This component is still highly experimental, and it's not normally accessible to consumers of the `@wordpress/components` package.
46
-
47
- The component exposes a set of components that are meant to be used in combination with each other in order to implement a `DropdownMenu` correctly.
48
-
49
- ### `DropdownMenu`
50
-
51
- The root component, used to specify the menu's trigger and its contents.
52
-
53
- #### Props
54
-
55
- The component accepts the following props:
56
-
57
- ##### `trigger`: `React.ReactNode`
58
-
59
- The trigger button
60
-
61
- - Required: yes
62
-
63
- ##### `children`: `React.ReactNode`
64
-
65
- The contents of the dropdown
66
-
67
- - Required: yes
68
-
69
- ##### `defaultOpen`: `boolean`
70
-
71
- The open state of the dropdown menu when it is initially rendered. Use when not wanting to control its open state.
72
-
73
- - Required: no
74
- - Default: `false`
75
-
76
- ##### `open`: `boolean`
77
-
78
- The controlled open state of the dropdown menu. Must be used in conjunction with `onOpenChange`.
79
-
80
- - Required: no
81
-
82
- ##### `onOpenChange`: `(open: boolean) => void`
83
-
84
- Event handler called when the open state of the dropdown menu changes.
85
-
86
- - Required: no
87
-
88
- ##### `modal`: `boolean`
89
-
90
- The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
91
-
92
- - Required: no
93
- - Default: `true`
94
-
95
- ##### `placement`: ``'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'`
96
-
97
- The placement of the dropdown menu popover.
98
-
99
- - Required: no
100
- - Default: `'bottom-start'` for root-level menus, `'right-start'` for nested menus
101
-
102
- ##### `gutter`: `number`
103
-
104
- The distance in pixels from the trigger.
105
-
106
- - Required: no
107
- - Default: `8` for root-level menus, `16` for nested menus
108
-
109
- ##### `shift`: `number`
110
-
111
- The skidding of the popover along the anchor element. Can be set to negative values to make the popover shift to the opposite side.
112
-
113
- - Required: no
114
- - Default: `0` for root-level menus, `-8` for nested menus
115
-
116
- ### `DropdownMenuItem`
117
-
118
- Used to render a menu item.
119
-
120
- #### Props
121
-
122
- The component accepts the following props:
123
-
124
- ##### `children`: `React.ReactNode`
125
-
126
- The contents of the item
127
-
128
- - Required: yes
129
-
130
- ##### `prefix`: `React.ReactNode`
131
-
132
- The contents of the item's prefix.
133
-
134
- - Required: no
135
-
136
- ##### `suffix`: `React.ReactNode`
137
-
138
- The contents of the item's suffix.
139
-
140
- - Required: no
141
-
142
- ##### `hideOnClick`: `boolean`
143
-
144
- Whether to hide the dropdown menu when the menu item is clicked.
145
-
146
- - Required: no
147
- - Default: `true`
148
-
149
- ##### `disabled`: `boolean`
150
-
151
- Determines if the element is disabled.
152
-
153
- - Required: no
154
- - Default: `false`
155
-
156
- ### `DropdownMenuCheckboxItem`
157
-
158
- Used to render a checkbox item.
159
-
160
- #### Props
161
-
162
- The component accepts the following props:
163
-
164
- ##### `children`: `React.ReactNode`
165
-
166
- The contents of the item
167
-
168
- - Required: yes
169
-
170
- ##### `suffix`: `React.ReactNode`
171
-
172
- The contents of the item's suffix.
173
-
174
- - Required: no
175
-
176
- ##### `hideOnClick`: `boolean`
177
-
178
- Whether to hide the dropdown menu when the menu item is clicked.
179
-
180
- - Required: no
181
- - Default: `false`
182
-
183
- ##### `disabled`: `boolean`
184
-
185
- Determines if the element is disabled.
186
-
187
- - Required: no
188
- - Default: `false`
189
-
190
- ##### `name`: `string`
191
-
192
- The checkbox item's name.
193
-
194
- - Required: yes
195
-
196
- ##### `value`: `string`
197
-
198
- The checkbox item's value, useful when using multiple checkbox items
199
- associated to the same `name`.
200
-
201
- - Required: no
202
-
203
- ##### `checked`: `boolean`
204
-
205
- The checkbox item's value, useful when using multiple checkbox items
206
- associated to the same `name`.
207
-
208
- - Required: no
209
-
210
- ##### `defaultChecked`: `boolean`
211
-
212
- The checked state of the checkbox menu item when it is initially rendered. Use when not wanting to control its checked state.
213
-
214
- - Required: no
215
-
216
- ##### `onChange`: `( event: React.ChangeEvent< HTMLInputElement > ) => void;`
217
-
218
- Event handler called when the checked state of the checkbox menu item changes.
219
-
220
- - Required: no
221
-
222
- ### `DropdownMenuRadioItem`
223
-
224
- Used to render a radio item.
225
-
226
- #### Props
227
-
228
- The component accepts the following props:
229
-
230
- ##### `children`: `React.ReactNode`
231
-
232
- The contents of the item
233
-
234
- - Required: yes
235
-
236
- ##### `suffix`: `React.ReactNode`
237
-
238
- The contents of the item's suffix.
239
-
240
- - Required: no
241
-
242
- ##### `hideOnClick`: `boolean`
243
-
244
- Whether to hide the dropdown menu when the menu item is clicked.
245
-
246
- - Required: no
247
- - Default: `false`
248
-
249
- ##### `disabled`: `boolean`
250
-
251
- Determines if the element is disabled.
252
-
253
- - Required: no
254
- - Default: `false`
255
-
256
- ##### `name`: `string`
257
-
258
- The radio item's name.
259
-
260
- - Required: yes
261
-
262
- ##### `value`: `string | number`
263
-
264
- The radio item's value.
265
-
266
- - Required: yes
267
-
268
- ##### `checked`: `boolean`
269
-
270
- The checkbox item's value, useful when using multiple checkbox items
271
- associated to the same `name`.
272
-
273
- - Required: no
274
-
275
- ##### `defaultChecked`: `boolean`
276
-
277
- The checked state of the radio menu item when it is initially rendered. Use when not wanting to control its checked state.
278
-
279
- - Required: no
280
-
281
- ##### `onChange`: `( event: React.ChangeEvent< HTMLInputElement > ) => void;`
282
-
283
- Event handler called when the checked radio menu item changes.
284
-
285
- - Required: no
286
-
287
- ### `DropdownMenuItemLabel`
288
-
289
- Used to render the menu item's label.
290
-
291
- #### Props
292
-
293
- The component accepts the following props:
294
-
295
- ##### `children`: `React.ReactNode`
296
-
297
- The label contents.
298
-
299
- - Required: yes
300
-
301
- ### `DropdownMenuItemHelpText`
302
-
303
- Used to render the menu item's help text.
304
-
305
- #### Props
306
-
307
- The component accepts the following props:
308
-
309
- ##### `children`: `React.ReactNode`
310
-
311
- The help text contents.
312
-
313
- - Required: yes
314
-
315
- ### `DropdownMenuGroup`
316
-
317
- Used to group menu items.
318
-
319
- #### Props
320
-
321
- The component accepts the following props:
322
-
323
- ##### `children`: `React.ReactNode`
324
-
325
- The contents of the group.
326
-
327
- - Required: yes
328
-
329
- ### `DropdownMenuSeparatorProps`
330
-
331
- Used to render a visual separator.