@wordpress/components 29.3.0 → 29.5.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 (568) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/build/alignment-matrix-control/icon.js +0 -1
  3. package/build/alignment-matrix-control/icon.js.map +1 -1
  4. package/build/alignment-matrix-control/index.js +0 -1
  5. package/build/alignment-matrix-control/index.js.map +1 -1
  6. package/build/autocomplete/autocompleter-ui.js +0 -1
  7. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  8. package/build/autocomplete/autocompleter-ui.native.js +0 -1
  9. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  10. package/build/autocomplete/get-default-use-items.js +0 -1
  11. package/build/autocomplete/get-default-use-items.js.map +1 -1
  12. package/build/autocomplete/index.js +0 -1
  13. package/build/autocomplete/index.js.map +1 -1
  14. package/build/border-box-control/utils.js +0 -1
  15. package/build/border-box-control/utils.js.map +1 -1
  16. package/build/border-control/border-control-dropdown/component.js +19 -22
  17. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  18. package/build/border-control/border-control-dropdown/hook.js +3 -3
  19. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  20. package/build/border-control/border-control-style-picker/component.js +0 -1
  21. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  22. package/build/border-control/styles.js +24 -19
  23. package/build/border-control/styles.js.map +1 -1
  24. package/build/box-control/index.js +0 -1
  25. package/build/box-control/index.js.map +1 -1
  26. package/build/box-control/input-control.js +0 -1
  27. package/build/box-control/input-control.js.map +1 -1
  28. package/build/box-control/utils.js +0 -1
  29. package/build/box-control/utils.js.map +1 -1
  30. package/build/button/index.native.js +0 -1
  31. package/build/button/index.native.js.map +1 -1
  32. package/build/circular-option-picker/circular-option-picker.js +1 -0
  33. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  34. package/build/circular-option-picker/index.js +7 -0
  35. package/build/circular-option-picker/index.js.map +1 -1
  36. package/build/circular-option-picker/types.js.map +1 -1
  37. package/build/circular-option-picker/utils.js +31 -0
  38. package/build/circular-option-picker/utils.js.map +1 -0
  39. package/build/color-indicator/index.native.js +0 -1
  40. package/build/color-indicator/index.native.js.map +1 -1
  41. package/build/color-palette/index.js +9 -30
  42. package/build/color-palette/index.js.map +1 -1
  43. package/build/color-palette/index.native.js +0 -1
  44. package/build/color-palette/index.native.js.map +1 -1
  45. package/build/color-palette/utils.js +0 -1
  46. package/build/color-palette/utils.js.map +1 -1
  47. package/build/combobox-control/index.js +4 -3
  48. package/build/combobox-control/index.js.map +1 -1
  49. package/build/combobox-control/types.js.map +1 -1
  50. package/build/composite/legacy/index.js +0 -1
  51. package/build/composite/legacy/index.js.map +1 -1
  52. package/build/context/context-connect.js +0 -1
  53. package/build/context/context-connect.js.map +1 -1
  54. package/build/custom-gradient-picker/gradient-bar/control-points.js +0 -1
  55. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  56. package/build/custom-gradient-picker/gradient-bar/index.js +0 -1
  57. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  58. package/build/custom-gradient-picker/gradient-bar/utils.js +0 -1
  59. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  60. package/build/custom-gradient-picker/index.js +0 -1
  61. package/build/custom-gradient-picker/index.js.map +1 -1
  62. package/build/custom-gradient-picker/serializer.js +0 -1
  63. package/build/custom-gradient-picker/serializer.js.map +1 -1
  64. package/build/custom-gradient-picker/utils.js +0 -1
  65. package/build/custom-gradient-picker/utils.js.map +1 -1
  66. package/build/custom-select-control/index.js +0 -1
  67. package/build/custom-select-control/index.js.map +1 -1
  68. package/build/dashicon/index.js +0 -1
  69. package/build/dashicon/index.js.map +1 -1
  70. package/build/date-time/date/index.js +0 -1
  71. package/build/date-time/date/index.js.map +1 -1
  72. package/build/date-time/date/use-lilius/index.js +0 -1
  73. package/build/date-time/date/use-lilius/index.js.map +1 -1
  74. package/build/date-time/time/index.js +0 -1
  75. package/build/date-time/time/index.js.map +1 -1
  76. package/build/dimension-control/index.js +0 -1
  77. package/build/dimension-control/index.js.map +1 -1
  78. package/build/dimension-control/sizes.js +0 -1
  79. package/build/dimension-control/sizes.js.map +1 -1
  80. package/build/draggable/index.js +0 -1
  81. package/build/draggable/index.js.map +1 -1
  82. package/build/draggable/index.native.js +0 -1
  83. package/build/draggable/index.native.js.map +1 -1
  84. package/build/dropdown-menu/index.js +0 -1
  85. package/build/dropdown-menu/index.js.map +1 -1
  86. package/build/dropdown-menu/index.native.js +0 -1
  87. package/build/dropdown-menu/index.native.js.map +1 -1
  88. package/build/duotone-picker/color-list-picker/index.js +0 -1
  89. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  90. package/build/duotone-picker/duotone-picker.js +8 -29
  91. package/build/duotone-picker/duotone-picker.js.map +1 -1
  92. package/build/duotone-picker/utils.js +0 -1
  93. package/build/duotone-picker/utils.js.map +1 -1
  94. package/build/external-link/index.js +0 -1
  95. package/build/external-link/index.js.map +1 -1
  96. package/build/font-size-picker/font-size-picker-select.js +4 -15
  97. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  98. package/build/font-size-picker/font-size-picker-toggle-group.js +0 -1
  99. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  100. package/build/font-size-picker/index.js +0 -1
  101. package/build/font-size-picker/index.js.map +1 -1
  102. package/build/font-size-picker/index.native.js +0 -1
  103. package/build/font-size-picker/index.native.js.map +1 -1
  104. package/build/font-size-picker/types.js.map +1 -1
  105. package/build/font-size-picker/utils.js +0 -1
  106. package/build/font-size-picker/utils.js.map +1 -1
  107. package/build/form-token-field/index.js +0 -1
  108. package/build/form-token-field/index.js.map +1 -1
  109. package/build/form-token-field/suggestions-list.js +0 -1
  110. package/build/form-token-field/suggestions-list.js.map +1 -1
  111. package/build/gradient-picker/index.js +8 -29
  112. package/build/gradient-picker/index.js.map +1 -1
  113. package/build/guide/index.js +0 -1
  114. package/build/guide/index.js.map +1 -1
  115. package/build/guide/page-control.js +0 -1
  116. package/build/guide/page-control.js.map +1 -1
  117. package/build/h-stack/hook.js +0 -1
  118. package/build/h-stack/hook.js.map +1 -1
  119. package/build/higher-order/navigate-regions/index.js +0 -1
  120. package/build/higher-order/navigate-regions/index.js.map +1 -1
  121. package/build/higher-order/with-fallback-styles/index.js +0 -1
  122. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  123. package/build/higher-order/with-filters/index.js +0 -1
  124. package/build/higher-order/with-filters/index.js.map +1 -1
  125. package/build/higher-order/with-notices/index.js +0 -1
  126. package/build/higher-order/with-notices/index.js.map +1 -1
  127. package/build/input-control/styles/input-control-styles.js +22 -22
  128. package/build/input-control/styles/input-control-styles.js.map +1 -1
  129. package/build/keyboard-shortcuts/index.js +0 -1
  130. package/build/keyboard-shortcuts/index.js.map +1 -1
  131. package/build/menu-items-choice/index.js +0 -1
  132. package/build/menu-items-choice/index.js.map +1 -1
  133. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +0 -1
  134. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  135. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +0 -1
  136. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  137. package/build/mobile/bottom-sheet/picker-cell.native.js +0 -1
  138. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  139. package/build/mobile/bottom-sheet/switch-cell.native.js +1 -1
  140. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  141. package/build/mobile/bottom-sheet-select-control/index.native.js +0 -1
  142. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  143. package/build/mobile/color-settings/palette.screen.native.js +0 -1
  144. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  145. package/build/mobile/gradient/index.native.js +0 -1
  146. package/build/mobile/gradient/index.native.js.map +1 -1
  147. package/build/mobile/media-edit/index.native.js +0 -1
  148. package/build/mobile/media-edit/index.native.js.map +1 -1
  149. package/build/mobile/picker/index.android.js +0 -1
  150. package/build/mobile/picker/index.android.js.map +1 -1
  151. package/build/mobile/picker/index.ios.js +0 -1
  152. package/build/mobile/picker/index.ios.js.map +1 -1
  153. package/build/mobile/segmented-control/index.native.js +0 -1
  154. package/build/mobile/segmented-control/index.native.js.map +1 -1
  155. package/build/mobile/utils/get-px-from-css-unit.native.js +0 -1
  156. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  157. package/build/navigable-container/container.js +0 -1
  158. package/build/navigable-container/container.js.map +1 -1
  159. package/build/navigation/group/index.js +0 -1
  160. package/build/navigation/group/index.js.map +1 -1
  161. package/build/navigation/menu/menu-title-search.js +0 -1
  162. package/build/navigation/menu/menu-title-search.js.map +1 -1
  163. package/build/navigation/menu/search-no-results-found.js +0 -1
  164. package/build/navigation/menu/search-no-results-found.js.map +1 -1
  165. package/build/navigator/navigator/component.js +0 -1
  166. package/build/navigator/navigator/component.js.map +1 -1
  167. package/build/navigator/navigator-screen/component.js +0 -1
  168. package/build/navigator/navigator-screen/component.js.map +1 -1
  169. package/build/navigator/utils/router.js +0 -1
  170. package/build/navigator/utils/router.js.map +1 -1
  171. package/build/notice/index.js +0 -1
  172. package/build/notice/index.js.map +1 -1
  173. package/build/notice/list.js +0 -1
  174. package/build/notice/list.js.map +1 -1
  175. package/build/notice/list.native.js +0 -1
  176. package/build/notice/list.native.js.map +1 -1
  177. package/build/number-control/index.js +2 -2
  178. package/build/number-control/index.js.map +1 -1
  179. package/build/palette-edit/index.js +0 -1
  180. package/build/palette-edit/index.js.map +1 -1
  181. package/build/panel/actions.native.js +0 -1
  182. package/build/panel/actions.native.js.map +1 -1
  183. package/build/query-controls/index.js +0 -1
  184. package/build/query-controls/index.js.map +1 -1
  185. package/build/query-controls/terms.js +0 -1
  186. package/build/query-controls/terms.js.map +1 -1
  187. package/build/radio-control/index.js +0 -1
  188. package/build/radio-control/index.js.map +1 -1
  189. package/build/radio-control/index.native.js +0 -1
  190. package/build/radio-control/index.native.js.map +1 -1
  191. package/build/range-control/rail.js +0 -1
  192. package/build/range-control/rail.js.map +1 -1
  193. package/build/resizable-box/index.js +0 -1
  194. package/build/resizable-box/index.js.map +1 -1
  195. package/build/sandbox/index.js +0 -1
  196. package/build/sandbox/index.js.map +1 -1
  197. package/build/sandbox/index.native.js +0 -1
  198. package/build/sandbox/index.native.js.map +1 -1
  199. package/build/search-control/index.native.js +0 -1
  200. package/build/search-control/index.native.js.map +1 -1
  201. package/build/select-control/index.js +0 -1
  202. package/build/select-control/index.js.map +1 -1
  203. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +0 -1
  204. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  205. package/build/slot-fill/provider.js +0 -1
  206. package/build/slot-fill/provider.js.map +1 -1
  207. package/build/slot-fill/slot.js +0 -1
  208. package/build/slot-fill/slot.js.map +1 -1
  209. package/build/snackbar/index.js +0 -1
  210. package/build/snackbar/index.js.map +1 -1
  211. package/build/snackbar/list.js +0 -1
  212. package/build/snackbar/list.js.map +1 -1
  213. package/build/tab-panel/index.js +0 -1
  214. package/build/tab-panel/index.js.map +1 -1
  215. package/build/tabs/index.js +0 -1
  216. package/build/tabs/index.js.map +1 -1
  217. package/build/text/utils.js +0 -1
  218. package/build/text/utils.js.map +1 -1
  219. package/build/textarea-control/styles/textarea-control-styles.js +3 -3
  220. package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
  221. package/build/theme/color-algorithms.js +0 -1
  222. package/build/theme/color-algorithms.js.map +1 -1
  223. package/build/toolbar/toolbar-group/index.js +0 -1
  224. package/build/toolbar/toolbar-group/index.js.map +1 -1
  225. package/build/tools-panel/tools-panel/hook.js +0 -1
  226. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  227. package/build/tools-panel/tools-panel-header/component.js +0 -1
  228. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  229. package/build/tree-grid/index.js +0 -1
  230. package/build/tree-grid/index.js.map +1 -1
  231. package/build/tree-select/index.js +0 -1
  232. package/build/tree-select/index.js.map +1 -1
  233. package/build/unit-control/index.js +0 -1
  234. package/build/unit-control/index.js.map +1 -1
  235. package/build/unit-control/index.native.js +0 -1
  236. package/build/unit-control/index.native.js.map +1 -1
  237. package/build/unit-control/unit-select-control.js +0 -1
  238. package/build/unit-control/unit-select-control.js.map +1 -1
  239. package/build/unit-control/utils.js +0 -1
  240. package/build/unit-control/utils.js.map +1 -1
  241. package/build/utils/get-valid-children.js +0 -1
  242. package/build/utils/get-valid-children.js.map +1 -1
  243. package/build/utils/hooks/use-animated-offset-rect.js +0 -1
  244. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -1
  245. package/build/utils/hooks/use-cx.js +0 -1
  246. package/build/utils/hooks/use-cx.js.map +1 -1
  247. package/build/utils/math.js +0 -1
  248. package/build/utils/math.js.map +1 -1
  249. package/build/utils/rtl.js +0 -1
  250. package/build/utils/rtl.js.map +1 -1
  251. package/build/utils/values.js +0 -1
  252. package/build/utils/values.js.map +1 -1
  253. package/build/z-stack/component.js +0 -1
  254. package/build/z-stack/component.js.map +1 -1
  255. package/build-module/alignment-matrix-control/icon.js +0 -1
  256. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  257. package/build-module/alignment-matrix-control/index.js +0 -1
  258. package/build-module/alignment-matrix-control/index.js.map +1 -1
  259. package/build-module/autocomplete/autocompleter-ui.js +0 -1
  260. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  261. package/build-module/autocomplete/autocompleter-ui.native.js +0 -1
  262. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  263. package/build-module/autocomplete/get-default-use-items.js +0 -1
  264. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  265. package/build-module/autocomplete/index.js +0 -1
  266. package/build-module/autocomplete/index.js.map +1 -1
  267. package/build-module/border-box-control/utils.js +0 -1
  268. package/build-module/border-box-control/utils.js.map +1 -1
  269. package/build-module/border-control/border-control-dropdown/component.js +19 -22
  270. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  271. package/build-module/border-control/border-control-dropdown/hook.js +3 -3
  272. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  273. package/build-module/border-control/border-control-style-picker/component.js +0 -1
  274. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  275. package/build-module/border-control/styles.js +22 -13
  276. package/build-module/border-control/styles.js.map +1 -1
  277. package/build-module/box-control/index.js +0 -1
  278. package/build-module/box-control/index.js.map +1 -1
  279. package/build-module/box-control/input-control.js +0 -1
  280. package/build-module/box-control/input-control.js.map +1 -1
  281. package/build-module/box-control/utils.js +0 -1
  282. package/build-module/box-control/utils.js.map +1 -1
  283. package/build-module/button/index.native.js +0 -1
  284. package/build-module/button/index.native.js.map +1 -1
  285. package/build-module/circular-option-picker/circular-option-picker.js +1 -0
  286. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  287. package/build-module/circular-option-picker/index.js +1 -0
  288. package/build-module/circular-option-picker/index.js.map +1 -1
  289. package/build-module/circular-option-picker/types.js.map +1 -1
  290. package/build-module/circular-option-picker/utils.js +25 -0
  291. package/build-module/circular-option-picker/utils.js.map +1 -0
  292. package/build-module/color-indicator/index.native.js +0 -1
  293. package/build-module/color-indicator/index.native.js.map +1 -1
  294. package/build-module/color-palette/index.js +7 -30
  295. package/build-module/color-palette/index.js.map +1 -1
  296. package/build-module/color-palette/index.native.js +0 -1
  297. package/build-module/color-palette/index.native.js.map +1 -1
  298. package/build-module/color-palette/utils.js +0 -1
  299. package/build-module/color-palette/utils.js.map +1 -1
  300. package/build-module/combobox-control/index.js +4 -3
  301. package/build-module/combobox-control/index.js.map +1 -1
  302. package/build-module/combobox-control/types.js.map +1 -1
  303. package/build-module/composite/legacy/index.js +0 -1
  304. package/build-module/composite/legacy/index.js.map +1 -1
  305. package/build-module/context/context-connect.js +0 -1
  306. package/build-module/context/context-connect.js.map +1 -1
  307. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +0 -1
  308. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  309. package/build-module/custom-gradient-picker/gradient-bar/index.js +0 -1
  310. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  311. package/build-module/custom-gradient-picker/gradient-bar/utils.js +0 -1
  312. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  313. package/build-module/custom-gradient-picker/index.js +0 -1
  314. package/build-module/custom-gradient-picker/index.js.map +1 -1
  315. package/build-module/custom-gradient-picker/serializer.js +0 -1
  316. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  317. package/build-module/custom-gradient-picker/utils.js +0 -1
  318. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  319. package/build-module/custom-select-control/index.js +0 -1
  320. package/build-module/custom-select-control/index.js.map +1 -1
  321. package/build-module/dashicon/index.js +0 -1
  322. package/build-module/dashicon/index.js.map +1 -1
  323. package/build-module/date-time/date/index.js +0 -1
  324. package/build-module/date-time/date/index.js.map +1 -1
  325. package/build-module/date-time/date/use-lilius/index.js +0 -1
  326. package/build-module/date-time/date/use-lilius/index.js.map +1 -1
  327. package/build-module/date-time/time/index.js +0 -1
  328. package/build-module/date-time/time/index.js.map +1 -1
  329. package/build-module/dimension-control/index.js +0 -1
  330. package/build-module/dimension-control/index.js.map +1 -1
  331. package/build-module/dimension-control/sizes.js +0 -1
  332. package/build-module/dimension-control/sizes.js.map +1 -1
  333. package/build-module/draggable/index.js +0 -1
  334. package/build-module/draggable/index.js.map +1 -1
  335. package/build-module/draggable/index.native.js +0 -1
  336. package/build-module/draggable/index.native.js.map +1 -1
  337. package/build-module/dropdown-menu/index.js +0 -1
  338. package/build-module/dropdown-menu/index.js.map +1 -1
  339. package/build-module/dropdown-menu/index.native.js +0 -1
  340. package/build-module/dropdown-menu/index.native.js.map +1 -1
  341. package/build-module/duotone-picker/color-list-picker/index.js +0 -1
  342. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  343. package/build-module/duotone-picker/duotone-picker.js +6 -29
  344. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  345. package/build-module/duotone-picker/utils.js +0 -1
  346. package/build-module/duotone-picker/utils.js.map +1 -1
  347. package/build-module/external-link/index.js +0 -1
  348. package/build-module/external-link/index.js.map +1 -1
  349. package/build-module/font-size-picker/font-size-picker-select.js +4 -15
  350. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  351. package/build-module/font-size-picker/font-size-picker-toggle-group.js +0 -1
  352. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  353. package/build-module/font-size-picker/index.js +0 -1
  354. package/build-module/font-size-picker/index.js.map +1 -1
  355. package/build-module/font-size-picker/index.native.js +0 -1
  356. package/build-module/font-size-picker/index.native.js.map +1 -1
  357. package/build-module/font-size-picker/types.js.map +1 -1
  358. package/build-module/font-size-picker/utils.js +0 -1
  359. package/build-module/font-size-picker/utils.js.map +1 -1
  360. package/build-module/form-token-field/index.js +0 -1
  361. package/build-module/form-token-field/index.js.map +1 -1
  362. package/build-module/form-token-field/suggestions-list.js +0 -1
  363. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  364. package/build-module/gradient-picker/index.js +6 -29
  365. package/build-module/gradient-picker/index.js.map +1 -1
  366. package/build-module/guide/index.js +0 -1
  367. package/build-module/guide/index.js.map +1 -1
  368. package/build-module/guide/page-control.js +0 -1
  369. package/build-module/guide/page-control.js.map +1 -1
  370. package/build-module/h-stack/hook.js +0 -1
  371. package/build-module/h-stack/hook.js.map +1 -1
  372. package/build-module/higher-order/navigate-regions/index.js +0 -1
  373. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  374. package/build-module/higher-order/with-fallback-styles/index.js +0 -1
  375. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  376. package/build-module/higher-order/with-filters/index.js +0 -1
  377. package/build-module/higher-order/with-filters/index.js.map +1 -1
  378. package/build-module/higher-order/with-notices/index.js +0 -1
  379. package/build-module/higher-order/with-notices/index.js.map +1 -1
  380. package/build-module/input-control/styles/input-control-styles.js +22 -22
  381. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  382. package/build-module/keyboard-shortcuts/index.js +0 -1
  383. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  384. package/build-module/menu-items-choice/index.js +0 -1
  385. package/build-module/menu-items-choice/index.js.map +1 -1
  386. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +0 -1
  387. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  388. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +0 -1
  389. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  390. package/build-module/mobile/bottom-sheet/picker-cell.native.js +0 -1
  391. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  392. package/build-module/mobile/bottom-sheet/switch-cell.native.js +1 -1
  393. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  394. package/build-module/mobile/bottom-sheet-select-control/index.native.js +0 -1
  395. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  396. package/build-module/mobile/color-settings/palette.screen.native.js +0 -1
  397. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  398. package/build-module/mobile/gradient/index.native.js +0 -1
  399. package/build-module/mobile/gradient/index.native.js.map +1 -1
  400. package/build-module/mobile/media-edit/index.native.js +0 -1
  401. package/build-module/mobile/media-edit/index.native.js.map +1 -1
  402. package/build-module/mobile/picker/index.android.js +0 -1
  403. package/build-module/mobile/picker/index.android.js.map +1 -1
  404. package/build-module/mobile/picker/index.ios.js +0 -1
  405. package/build-module/mobile/picker/index.ios.js.map +1 -1
  406. package/build-module/mobile/segmented-control/index.native.js +0 -1
  407. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  408. package/build-module/mobile/utils/get-px-from-css-unit.native.js +0 -1
  409. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  410. package/build-module/navigable-container/container.js +0 -1
  411. package/build-module/navigable-container/container.js.map +1 -1
  412. package/build-module/navigation/group/index.js +0 -1
  413. package/build-module/navigation/group/index.js.map +1 -1
  414. package/build-module/navigation/menu/menu-title-search.js +0 -1
  415. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  416. package/build-module/navigation/menu/search-no-results-found.js +0 -1
  417. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  418. package/build-module/navigator/navigator/component.js +0 -1
  419. package/build-module/navigator/navigator/component.js.map +1 -1
  420. package/build-module/navigator/navigator-screen/component.js +0 -1
  421. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  422. package/build-module/navigator/utils/router.js +0 -1
  423. package/build-module/navigator/utils/router.js.map +1 -1
  424. package/build-module/notice/index.js +0 -1
  425. package/build-module/notice/index.js.map +1 -1
  426. package/build-module/notice/list.js +0 -1
  427. package/build-module/notice/list.js.map +1 -1
  428. package/build-module/notice/list.native.js +0 -1
  429. package/build-module/notice/list.native.js.map +1 -1
  430. package/build-module/number-control/index.js +2 -2
  431. package/build-module/number-control/index.js.map +1 -1
  432. package/build-module/palette-edit/index.js +0 -1
  433. package/build-module/palette-edit/index.js.map +1 -1
  434. package/build-module/panel/actions.native.js +0 -1
  435. package/build-module/panel/actions.native.js.map +1 -1
  436. package/build-module/query-controls/index.js +0 -1
  437. package/build-module/query-controls/index.js.map +1 -1
  438. package/build-module/query-controls/terms.js +0 -1
  439. package/build-module/query-controls/terms.js.map +1 -1
  440. package/build-module/radio-control/index.js +0 -1
  441. package/build-module/radio-control/index.js.map +1 -1
  442. package/build-module/radio-control/index.native.js +0 -1
  443. package/build-module/radio-control/index.native.js.map +1 -1
  444. package/build-module/range-control/rail.js +0 -1
  445. package/build-module/range-control/rail.js.map +1 -1
  446. package/build-module/resizable-box/index.js +0 -1
  447. package/build-module/resizable-box/index.js.map +1 -1
  448. package/build-module/sandbox/index.js +0 -1
  449. package/build-module/sandbox/index.js.map +1 -1
  450. package/build-module/sandbox/index.native.js +0 -1
  451. package/build-module/sandbox/index.native.js.map +1 -1
  452. package/build-module/search-control/index.native.js +0 -1
  453. package/build-module/search-control/index.native.js.map +1 -1
  454. package/build-module/select-control/index.js +0 -1
  455. package/build-module/select-control/index.js.map +1 -1
  456. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +0 -1
  457. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  458. package/build-module/slot-fill/provider.js +0 -1
  459. package/build-module/slot-fill/provider.js.map +1 -1
  460. package/build-module/slot-fill/slot.js +0 -1
  461. package/build-module/slot-fill/slot.js.map +1 -1
  462. package/build-module/snackbar/index.js +0 -1
  463. package/build-module/snackbar/index.js.map +1 -1
  464. package/build-module/snackbar/list.js +0 -1
  465. package/build-module/snackbar/list.js.map +1 -1
  466. package/build-module/tab-panel/index.js +0 -1
  467. package/build-module/tab-panel/index.js.map +1 -1
  468. package/build-module/tabs/index.js +0 -1
  469. package/build-module/tabs/index.js.map +1 -1
  470. package/build-module/text/utils.js +0 -1
  471. package/build-module/text/utils.js.map +1 -1
  472. package/build-module/textarea-control/styles/textarea-control-styles.js +3 -3
  473. package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
  474. package/build-module/theme/color-algorithms.js +0 -1
  475. package/build-module/theme/color-algorithms.js.map +1 -1
  476. package/build-module/toolbar/toolbar-group/index.js +0 -1
  477. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  478. package/build-module/tools-panel/tools-panel/hook.js +0 -1
  479. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  480. package/build-module/tools-panel/tools-panel-header/component.js +0 -1
  481. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  482. package/build-module/tree-grid/index.js +0 -1
  483. package/build-module/tree-grid/index.js.map +1 -1
  484. package/build-module/tree-select/index.js +0 -1
  485. package/build-module/tree-select/index.js.map +1 -1
  486. package/build-module/unit-control/index.js +0 -1
  487. package/build-module/unit-control/index.js.map +1 -1
  488. package/build-module/unit-control/index.native.js +0 -1
  489. package/build-module/unit-control/index.native.js.map +1 -1
  490. package/build-module/unit-control/unit-select-control.js +0 -1
  491. package/build-module/unit-control/unit-select-control.js.map +1 -1
  492. package/build-module/unit-control/utils.js +0 -1
  493. package/build-module/unit-control/utils.js.map +1 -1
  494. package/build-module/utils/get-valid-children.js +0 -1
  495. package/build-module/utils/get-valid-children.js.map +1 -1
  496. package/build-module/utils/hooks/use-animated-offset-rect.js +0 -1
  497. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -1
  498. package/build-module/utils/hooks/use-cx.js +0 -1
  499. package/build-module/utils/hooks/use-cx.js.map +1 -1
  500. package/build-module/utils/math.js +0 -1
  501. package/build-module/utils/math.js.map +1 -1
  502. package/build-module/utils/rtl.js +0 -1
  503. package/build-module/utils/rtl.js.map +1 -1
  504. package/build-module/utils/values.js +0 -1
  505. package/build-module/utils/values.js.map +1 -1
  506. package/build-module/z-stack/component.js +0 -1
  507. package/build-module/z-stack/component.js.map +1 -1
  508. package/build-style/style-rtl.css +9 -6
  509. package/build-style/style.css +10 -6
  510. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  511. package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -1
  512. package/build-types/border-control/styles.d.ts +1 -1
  513. package/build-types/border-control/styles.d.ts.map +1 -1
  514. package/build-types/circular-option-picker/index.d.ts +1 -0
  515. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  516. package/build-types/circular-option-picker/types.d.ts +11 -7
  517. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  518. package/build-types/circular-option-picker/utils.d.ts +17 -0
  519. package/build-types/circular-option-picker/utils.d.ts.map +1 -0
  520. package/build-types/color-palette/index.d.ts.map +1 -1
  521. package/build-types/combobox-control/index.d.ts.map +1 -1
  522. package/build-types/combobox-control/stories/index.story.d.ts +4 -0
  523. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  524. package/build-types/combobox-control/types.d.ts +7 -0
  525. package/build-types/combobox-control/types.d.ts.map +1 -1
  526. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  527. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  528. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  529. package/build-types/font-size-picker/types.d.ts +4 -0
  530. package/build-types/font-size-picker/types.d.ts.map +1 -1
  531. package/build-types/gradient-picker/index.d.ts.map +1 -1
  532. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  533. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  534. package/package.json +19 -19
  535. package/src/border-box-control/test/index.tsx +1 -1
  536. package/src/border-control/border-control-dropdown/component.tsx +8 -12
  537. package/src/border-control/border-control-dropdown/hook.ts +3 -3
  538. package/src/border-control/styles.ts +4 -10
  539. package/src/border-control/test/index.js +1 -1
  540. package/src/circular-option-picker/README.md +13 -0
  541. package/src/circular-option-picker/circular-option-picker.tsx +1 -1
  542. package/src/circular-option-picker/index.tsx +1 -0
  543. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  544. package/src/circular-option-picker/test/index.tsx +1 -0
  545. package/src/circular-option-picker/types.ts +11 -10
  546. package/src/circular-option-picker/utils.tsx +27 -0
  547. package/src/color-palette/index.tsx +11 -29
  548. package/src/color-palette/test/index.tsx +1 -1
  549. package/src/combobox-control/README.md +9 -1
  550. package/src/combobox-control/index.tsx +4 -1
  551. package/src/combobox-control/style.scss +4 -1
  552. package/src/combobox-control/types.ts +7 -0
  553. package/src/duotone-picker/duotone-picker.tsx +10 -28
  554. package/src/font-size-picker/README.md +2 -0
  555. package/src/font-size-picker/font-size-picker-select.tsx +4 -23
  556. package/src/font-size-picker/stories/index.story.tsx +4 -0
  557. package/src/font-size-picker/test/index.tsx +2 -24
  558. package/src/font-size-picker/types.ts +4 -0
  559. package/src/gradient-picker/index.tsx +10 -28
  560. package/src/input-control/styles/input-control-styles.tsx +9 -1
  561. package/src/mobile/bottom-sheet/switch-cell.native.js +1 -1
  562. package/src/notice/README.md +1 -1
  563. package/src/notice/style.scss +1 -0
  564. package/src/number-control/README.md +1 -1
  565. package/src/number-control/index.tsx +2 -2
  566. package/src/text-control/style.scss +6 -0
  567. package/src/textarea-control/styles/textarea-control-styles.ts +0 -2
  568. package/tsconfig.tsbuildinfo +1 -1
@@ -157,7 +157,7 @@ const BorderControlDropdown = (
157
157
  onStyleChange,
158
158
  popoverContentClassName,
159
159
  popoverControlsClassName,
160
- resetButtonClassName,
160
+ resetButtonWrapperClassName,
161
161
  size,
162
162
  __unstablePopoverProps,
163
163
  ...otherProps
@@ -173,7 +173,7 @@ const BorderControlDropdown = (
173
173
  enableStyle
174
174
  );
175
175
 
176
- const showResetButton = color || ( style && style !== 'none' );
176
+ const enableResetButton = color || ( style && style !== 'none' );
177
177
  const dropdownPosition = __experimentalIsRenderedInSidebar
178
178
  ? 'bottom left'
179
179
  : undefined;
@@ -199,9 +199,7 @@ const BorderControlDropdown = (
199
199
  </Button>
200
200
  );
201
201
 
202
- const renderContent: DropdownComponentProps[ 'renderContent' ] = ( {
203
- onClose,
204
- } ) => (
202
+ const renderContent: DropdownComponentProps[ 'renderContent' ] = () => (
205
203
  <>
206
204
  <DropdownContentWrapper paddingSize="medium">
207
205
  <VStack className={ popoverControlsClassName } spacing={ 6 }>
@@ -224,22 +222,20 @@ const BorderControlDropdown = (
224
222
  />
225
223
  ) }
226
224
  </VStack>
227
- </DropdownContentWrapper>
228
- { showResetButton && (
229
- <DropdownContentWrapper paddingSize="none">
225
+ <div className={ resetButtonWrapperClassName }>
230
226
  <Button
231
- className={ resetButtonClassName }
232
227
  variant="tertiary"
233
228
  onClick={ () => {
234
229
  onReset();
235
- onClose();
236
230
  } }
231
+ disabled={ ! enableResetButton }
232
+ accessibleWhenDisabled
237
233
  __next40pxDefaultSize
238
234
  >
239
235
  { __( 'Reset' ) }
240
236
  </Button>
241
- </DropdownContentWrapper>
242
- ) }
237
+ </div>
238
+ </DropdownContentWrapper>
243
239
  </>
244
240
  );
245
241
 
@@ -76,8 +76,8 @@ export function useBorderControlDropdown(
76
76
  return cx( styles.borderControlPopoverContent );
77
77
  }, [ cx ] );
78
78
 
79
- const resetButtonClassName = useMemo( () => {
80
- return cx( styles.resetButton );
79
+ const resetButtonWrapperClassName = useMemo( () => {
80
+ return cx( styles.resetButtonWrapper );
81
81
  }, [ cx ] );
82
82
 
83
83
  return {
@@ -94,7 +94,7 @@ export function useBorderControlDropdown(
94
94
  onReset,
95
95
  popoverContentClassName,
96
96
  popoverControlsClassName,
97
- resetButtonClassName,
97
+ resetButtonWrapperClassName,
98
98
  size,
99
99
  __experimentalIsRenderedInSidebar,
100
100
  };
@@ -147,16 +147,10 @@ export const borderControlPopoverControls = css`
147
147
  export const borderControlPopoverContent = css``;
148
148
  export const borderColorIndicator = css``;
149
149
 
150
- export const resetButton = css`
151
- justify-content: center;
152
- width: 100%;
153
-
154
- /* Override button component styling */
155
- && {
156
- border-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 400 ] };
157
- border-top-left-radius: 0;
158
- border-top-right-radius: 0;
159
- }
150
+ export const resetButtonWrapper = css`
151
+ display: flex;
152
+ justify-content: flex-end;
153
+ margin-top: 12px;
160
154
  `;
161
155
 
162
156
  export const borderSlider = () => css`
@@ -138,7 +138,7 @@ describe( 'BorderControl', () => {
138
138
 
139
139
  const customColorPicker = getButton( /Custom color picker/ );
140
140
  const circularOptionPicker = screen.getByRole( 'listbox', {
141
- name: 'Custom color picker.',
141
+ name: 'Custom color picker',
142
142
  } );
143
143
  const colorSwatchButtons =
144
144
  within( circularOptionPicker ).getAllByRole( 'option' );
@@ -93,6 +93,19 @@ Prevents keyboard interaction from wrapping around. Only used when `asButtons` i
93
93
  - Required: No
94
94
  - Default: `true`
95
95
 
96
+ ### `aria-labelledby`: `string`
97
+
98
+ The ID reference list of one or more elements that label the wrapper element.
99
+
100
+ - Required: No
101
+
102
+ ### `aria-label`: `string`
103
+
104
+ The label for the wrapper element. Not used if an 'aria-labelledby' is provided.
105
+
106
+ - Required: No
107
+ - Default: `Custom color picker`
108
+
96
109
  ## Subcomponents
97
110
 
98
111
  ### `CircularOptionPicker.ButtonAction`
@@ -132,7 +132,7 @@ function ButtonsCircularOptionPicker(
132
132
  );
133
133
 
134
134
  return (
135
- <div { ...additionalProps } id={ baseId }>
135
+ <div { ...additionalProps } role="group" id={ baseId }>
136
136
  <CircularOptionPickerContext.Provider value={ contextValue }>
137
137
  { options }
138
138
  { children }
@@ -9,5 +9,6 @@ export {
9
9
  ButtonAction,
10
10
  DropdownLinkAction,
11
11
  } from './circular-option-picker-actions';
12
+ export { getComputeCircularOptionPickerCommonProps } from './utils';
12
13
 
13
14
  export default CircularOptionPicker;
@@ -131,7 +131,7 @@ WithLoopingDisabled.parameters = {
131
131
  docs: {
132
132
  source: {
133
133
  code: `<CircularOptionPicker
134
- aria-label="${ WithLoopingDisabled.args[ 'aria-label' ] }"
134
+ 'aria-label': 'Circular Option Picker',
135
135
  loop={false}
136
136
  options={<DefaultOptions />}
137
137
  />`,
@@ -57,6 +57,7 @@ describe( 'CircularOptionPicker', () => {
57
57
 
58
58
  expect( screen.queryByRole( 'listbox' ) ).not.toBeInTheDocument();
59
59
  expect( screen.queryByRole( 'option' ) ).not.toBeInTheDocument();
60
+ expect( screen.getByRole( 'group' ) ).toBeInTheDocument();
60
61
  expect( screen.getByRole( 'button' ) ).toBeInTheDocument();
61
62
  } );
62
63
  } );
@@ -40,6 +40,16 @@ type CommonCircularOptionPickerProps = {
40
40
  * The child elements.
41
41
  */
42
42
  children?: ReactNode;
43
+ /**
44
+ * The ID reference list of one or more elements that label the wrapper
45
+ * element.
46
+ */
47
+ 'aria-labelledby'?: string;
48
+ /**
49
+ * The label for the wrapper element. Defaults to 'Custom color picker'. Not
50
+ * used if an 'aria-labelledby' is provided.
51
+ */
52
+ 'aria-label'?: string;
43
53
  };
44
54
 
45
55
  type WithBaseId = {
@@ -59,16 +69,7 @@ type FullListboxCircularOptionPickerProps = CommonCircularOptionPickerProps & {
59
69
  * @default true
60
70
  */
61
71
  loop?: boolean;
62
- } & (
63
- | {
64
- 'aria-label': string;
65
- 'aria-labelledby'?: never;
66
- }
67
- | {
68
- 'aria-label'?: never;
69
- 'aria-labelledby': string;
70
- }
71
- );
72
+ };
72
73
 
73
74
  export type ListboxCircularOptionPickerProps = WithBaseId &
74
75
  Omit< FullListboxCircularOptionPickerProps, 'asButtons' >;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+
6
+ /**
7
+ * Computes the common props for the CircularOptionPicker.
8
+ */
9
+ export function getComputeCircularOptionPickerCommonProps(
10
+ asButtons?: boolean,
11
+ loop?: boolean,
12
+ ariaLabel?: string,
13
+ ariaLabelledby?: string
14
+ ) {
15
+ const metaProps = asButtons
16
+ ? { asButtons: true }
17
+ : { asButtons: false, loop };
18
+
19
+ const labelProps = {
20
+ 'aria-labelledby': ariaLabelledby,
21
+ 'aria-label': ariaLabelledby
22
+ ? undefined
23
+ : ariaLabel || __( 'Custom color picker' ),
24
+ };
25
+
26
+ return { metaProps, labelProps };
27
+ }
@@ -19,7 +19,9 @@ import { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';
19
19
  */
20
20
  import Dropdown from '../dropdown';
21
21
  import { ColorPicker } from '../color-picker';
22
- import CircularOptionPicker from '../circular-option-picker';
22
+ import CircularOptionPicker, {
23
+ getComputeCircularOptionPickerCommonProps,
24
+ } from '../circular-option-picker';
23
25
  import { VStack } from '../v-stack';
24
26
  import { Truncate } from '../truncate';
25
27
  import { ColorHeading } from './styles';
@@ -233,7 +235,7 @@ function UnforwardedColorPalette(
233
235
  buttonLabelName,
234
236
  displayValue
235
237
  )
236
- : __( 'Custom color picker.' );
238
+ : __( 'Custom color picker' );
237
239
 
238
240
  const paletteCommonProps = {
239
241
  clearColor,
@@ -251,33 +253,12 @@ function UnforwardedColorPalette(
251
253
  </CircularOptionPicker.ButtonAction>
252
254
  );
253
255
 
254
- let metaProps:
255
- | { asButtons: false; loop?: boolean; 'aria-label': string }
256
- | { asButtons: false; loop?: boolean; 'aria-labelledby': string }
257
- | { asButtons: true };
258
-
259
- if ( asButtons ) {
260
- metaProps = { asButtons: true };
261
- } else {
262
- const _metaProps: { asButtons: false; loop?: boolean } = {
263
- asButtons: false,
264
- loop,
265
- };
266
-
267
- if ( ariaLabel ) {
268
- metaProps = { ..._metaProps, 'aria-label': ariaLabel };
269
- } else if ( ariaLabelledby ) {
270
- metaProps = {
271
- ..._metaProps,
272
- 'aria-labelledby': ariaLabelledby,
273
- };
274
- } else {
275
- metaProps = {
276
- ..._metaProps,
277
- 'aria-label': __( 'Custom color picker.' ),
278
- };
279
- }
280
- }
256
+ const { metaProps, labelProps } = getComputeCircularOptionPickerCommonProps(
257
+ asButtons,
258
+ loop,
259
+ ariaLabel,
260
+ ariaLabelledby
261
+ );
281
262
 
282
263
  return (
283
264
  <VStack spacing={ 3 } ref={ forwardedRef } { ...additionalProps }>
@@ -335,6 +316,7 @@ function UnforwardedColorPalette(
335
316
  { ( colors.length > 0 || actions ) && (
336
317
  <CircularOptionPicker
337
318
  { ...metaProps }
319
+ { ...labelProps }
338
320
  actions={ actions }
339
321
  options={
340
322
  hasMultipleColorOrigins ? (
@@ -258,7 +258,7 @@ describe( 'ColorPalette', () => {
258
258
  expect( screen.queryByText( colorCode ) ).not.toBeInTheDocument();
259
259
  expect(
260
260
  screen.getByRole( 'button', {
261
- name: /^Custom color picker.$/,
261
+ name: /^Custom color picker$/,
262
262
  } )
263
263
  ).toBeInTheDocument();
264
264
  } );
@@ -39,6 +39,7 @@ function MyComboboxControl() {
39
39
  label="Font Size"
40
40
  value={ fontSize }
41
41
  onChange={ setFontSize }
42
+ isLoading={ isLoading }
42
43
  options={ filteredOptions }
43
44
  onFilterValueChange={ ( inputValue ) =>
44
45
  setFilteredOptions(
@@ -112,13 +113,20 @@ If the control is clicked, the dropdown will expand regardless of this prop.
112
113
  - Required: No
113
114
  - Default: `true`
114
115
 
115
- ### placeholder
116
+ #### placeholder
116
117
 
117
118
  If passed, the combobox input will show a placeholder string if no values are present.
118
119
 
119
120
  - Type: `string`
120
121
  - Required: No
121
122
 
123
+ #### isLoading
124
+
125
+ Show a spinner (and hide the suggestions dropdown) while data about the matching suggestions (ie the `options` prop) is loading
126
+
127
+ - Type: `Boolean`
128
+ - Required: No
129
+
122
130
  #### __experimentalRenderItem
123
131
 
124
132
  Custom renderer invoked for each option in the suggestion list. The render prop receives as its argument an object containing, under the `item` key, the single option's data (directly from the array of data passed to the `options` prop).
@@ -35,6 +35,7 @@ import type { TokenInputProps } from '../form-token-field/types';
35
35
  import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
36
36
  import { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';
37
37
  import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
38
+ import Spinner from '../spinner';
38
39
 
39
40
  const noop = () => {};
40
41
 
@@ -126,6 +127,7 @@ function ComboboxControl( props: ComboboxControlProps ) {
126
127
  help,
127
128
  allowReset = true,
128
129
  className,
130
+ isLoading = false,
129
131
  messages = {
130
132
  selected: __( 'Item selected.' ),
131
133
  },
@@ -362,6 +364,7 @@ function ComboboxControl( props: ComboboxControlProps ) {
362
364
  onChange={ onInputChange }
363
365
  />
364
366
  </FlexBlock>
367
+ { isLoading && <Spinner /> }
365
368
  { allowReset && (
366
369
  <Button
367
370
  size="small"
@@ -375,7 +378,7 @@ function ComboboxControl( props: ComboboxControlProps ) {
375
378
  />
376
379
  ) }
377
380
  </InputWrapperFlex>
378
- { isExpanded && (
381
+ { isExpanded && ! isLoading && (
379
382
  <SuggestionsList
380
383
  instanceId={ instanceId }
381
384
  // The empty string for `value` here is not actually used, but is
@@ -36,5 +36,8 @@ input.components-combobox-control__input[type="text"] {
36
36
  &:focus-within {
37
37
  @include input-style__focus();
38
38
  }
39
- }
40
39
 
40
+ .components-spinner {
41
+ margin: 0;
42
+ }
43
+ }
@@ -86,4 +86,11 @@ export type ComboboxControlProps = Pick<
86
86
  * If passed, the combobox input will show a placeholder string if no values are present.
87
87
  */
88
88
  placeholder?: string;
89
+ /**
90
+ * Show a spinner (and hide the suggestions dropdown) while data
91
+ * about the matching suggestions (ie the `options` prop) is loading
92
+ *
93
+ * @default false
94
+ */
95
+ isLoading?: boolean;
89
96
  };
@@ -13,7 +13,9 @@ import { __, sprintf } from '@wordpress/i18n';
13
13
  * Internal dependencies
14
14
  */
15
15
  import ColorListPicker from './color-list-picker';
16
- import CircularOptionPicker from '../circular-option-picker';
16
+ import CircularOptionPicker, {
17
+ getComputeCircularOptionPickerCommonProps,
18
+ } from '../circular-option-picker';
17
19
  import { VStack } from '../v-stack';
18
20
 
19
21
  import CustomDuotoneBar from './custom-duotone-bar';
@@ -127,33 +129,12 @@ function DuotonePicker( {
127
129
  );
128
130
  } );
129
131
 
130
- let metaProps:
131
- | { asButtons: false; loop?: boolean; 'aria-label': string }
132
- | { asButtons: false; loop?: boolean; 'aria-labelledby': string }
133
- | { asButtons: true };
134
-
135
- if ( asButtons ) {
136
- metaProps = { asButtons: true };
137
- } else {
138
- const _metaProps: { asButtons: false; loop?: boolean } = {
139
- asButtons: false,
140
- loop,
141
- };
142
-
143
- if ( ariaLabel ) {
144
- metaProps = { ..._metaProps, 'aria-label': ariaLabel };
145
- } else if ( ariaLabelledby ) {
146
- metaProps = {
147
- ..._metaProps,
148
- 'aria-labelledby': ariaLabelledby,
149
- };
150
- } else {
151
- metaProps = {
152
- ..._metaProps,
153
- 'aria-label': __( 'Custom color picker.' ),
154
- };
155
- }
156
- }
132
+ const { metaProps, labelProps } = getComputeCircularOptionPickerCommonProps(
133
+ asButtons,
134
+ loop,
135
+ ariaLabel,
136
+ ariaLabelledby
137
+ );
157
138
 
158
139
  const options = unsetable
159
140
  ? [ unsetOption, ...duotoneOptions ]
@@ -163,6 +144,7 @@ function DuotonePicker( {
163
144
  <CircularOptionPicker
164
145
  { ...otherProps }
165
146
  { ...metaProps }
147
+ { ...labelProps }
166
148
  options={ options }
167
149
  actions={
168
150
  !! clearable && (
@@ -99,6 +99,8 @@ Available units for custom font size selection.
99
99
 
100
100
  The current font size value.
101
101
 
102
+ **Note**: For the `units` property to work, the current font size value must be specified as strings with units (e.g., `'12px'` instead of `12`). When the font size is provided as a number, the component operates in "unitless mode" where the `units` property has no effect.
103
+
102
104
  - Required: No
103
105
 
104
106
  ### `withReset`: `boolean`
@@ -20,21 +20,8 @@ const DEFAULT_OPTION: FontSizePickerSelectOption = {
20
20
  value: undefined,
21
21
  };
22
22
 
23
- const CUSTOM_OPTION: FontSizePickerSelectOption = {
24
- key: 'custom',
25
- name: __( 'Custom' ),
26
- };
27
-
28
23
  const FontSizePickerSelect = ( props: FontSizePickerSelectProps ) => {
29
- const {
30
- __next40pxDefaultSize,
31
- fontSizes,
32
- value,
33
- disableCustomFontSizes,
34
- size,
35
- onChange,
36
- onSelectCustom,
37
- } = props;
24
+ const { __next40pxDefaultSize, fontSizes, value, size, onChange } = props;
38
25
 
39
26
  const areAllSizesSameUnit = !! getCommonSizeUnit( fontSizes );
40
27
 
@@ -59,12 +46,10 @@ const FontSizePickerSelect = ( props: FontSizePickerSelectProps ) => {
59
46
  hint,
60
47
  };
61
48
  } ),
62
- ...( disableCustomFontSizes ? [] : [ CUSTOM_OPTION ] ),
63
49
  ];
64
50
 
65
- const selectedOption = value
66
- ? options.find( ( option ) => option.value === value ) ?? CUSTOM_OPTION
67
- : DEFAULT_OPTION;
51
+ const selectedOption =
52
+ options.find( ( option ) => option.value === value ) ?? DEFAULT_OPTION;
68
53
 
69
54
  return (
70
55
  <CustomSelectControl
@@ -86,11 +71,7 @@ const FontSizePickerSelect = ( props: FontSizePickerSelectProps ) => {
86
71
  }: {
87
72
  selectedItem: FontSizePickerSelectOption;
88
73
  } ) => {
89
- if ( selectedItem === CUSTOM_OPTION ) {
90
- onSelectCustom();
91
- } else {
92
- onChange( selectedItem.value );
93
- }
74
+ onChange( selectedItem.value );
94
75
  } }
95
76
  size={ size }
96
77
  />
@@ -18,6 +18,10 @@ const meta: Meta< typeof FontSizePicker > = {
18
18
  component: FontSizePicker,
19
19
  argTypes: {
20
20
  value: { control: false },
21
+ units: {
22
+ control: 'inline-check',
23
+ options: [ 'px', 'em', 'rem', 'vw', 'vh' ],
24
+ },
21
25
  },
22
26
  parameters: {
23
27
  actions: { argTypesRegex: '^on.*' },
@@ -127,7 +127,7 @@ describe( 'FontSizePicker', () => {
127
127
  screen.getByRole( 'combobox', { name: 'Font size' } )
128
128
  );
129
129
  const options = screen.getAllByRole( 'option' );
130
- expect( options ).toHaveLength( 8 );
130
+ expect( options ).toHaveLength( 7 );
131
131
  expect( options[ 0 ] ).toHaveAccessibleName( 'Default' );
132
132
  expect( options[ 1 ] ).toHaveAccessibleName( 'Tiny 8' );
133
133
  expect( options[ 2 ] ).toHaveAccessibleName( 'Small 12' );
@@ -135,7 +135,6 @@ describe( 'FontSizePicker', () => {
135
135
  expect( options[ 4 ] ).toHaveAccessibleName( 'Large 20' );
136
136
  expect( options[ 5 ] ).toHaveAccessibleName( 'Extra Large 30' );
137
137
  expect( options[ 6 ] ).toHaveAccessibleName( 'xx-large 40' );
138
- expect( options[ 7 ] ).toHaveAccessibleName( 'Custom' );
139
138
  } );
140
139
 
141
140
  test.each( [
@@ -186,7 +185,6 @@ describe( 'FontSizePicker', () => {
186
185
  }
187
186
  );
188
187
 
189
- commonSelectTests( fontSizes );
190
188
  commonTests( fontSizes );
191
189
  } );
192
190
 
@@ -231,7 +229,7 @@ describe( 'FontSizePicker', () => {
231
229
  screen.getByRole( 'combobox', { name: 'Font size' } )
232
230
  );
233
231
  const options = screen.getAllByRole( 'option' );
234
- expect( options ).toHaveLength( 8 );
232
+ expect( options ).toHaveLength( 7 );
235
233
  expect( options[ 0 ] ).toHaveAccessibleName( 'Default' );
236
234
  expect( options[ 1 ] ).toHaveAccessibleName( 'Tiny 8px' );
237
235
  expect( options[ 2 ] ).toHaveAccessibleName( 'Small 1em' );
@@ -239,7 +237,6 @@ describe( 'FontSizePicker', () => {
239
237
  expect( options[ 4 ] ).toHaveAccessibleName( 'Large' );
240
238
  expect( options[ 5 ] ).toHaveAccessibleName( 'Extra Large 30px' );
241
239
  expect( options[ 6 ] ).toHaveAccessibleName( 'xx-large 40px' );
242
- expect( options[ 7 ] ).toHaveAccessibleName( 'Custom' );
243
240
  } );
244
241
 
245
242
  test.each( [
@@ -327,7 +324,6 @@ describe( 'FontSizePicker', () => {
327
324
  }
328
325
  );
329
326
 
330
- commonSelectTests( fontSizes );
331
327
  commonTests( fontSizes );
332
328
  } );
333
329
 
@@ -523,24 +519,6 @@ describe( 'FontSizePicker', () => {
523
519
  );
524
520
  }
525
521
 
526
- function commonSelectTests( fontSizes: FontSize[] ) {
527
- it( 'shows custom input when Custom is selected', async () => {
528
- const user = userEvent.setup();
529
- const onChange = jest.fn();
530
- await render(
531
- <FontSizePicker fontSizes={ fontSizes } onChange={ onChange } />
532
- );
533
- await user.click(
534
- screen.getByRole( 'combobox', { name: 'Font size' } )
535
- );
536
- await user.click(
537
- screen.getByRole( 'option', { name: 'Custom' } )
538
- );
539
- expect( screen.getByLabelText( 'Custom' ) ).toBeVisible();
540
- expect( onChange ).not.toHaveBeenCalled();
541
- } );
542
- }
543
-
544
522
  function commonTests( fontSizes: FontSize[] ) {
545
523
  it( 'shows custom input when value is unknown', async () => {
546
524
  await render(
@@ -34,6 +34,10 @@ export type FontSizePickerProps = {
34
34
  units?: string[];
35
35
  /**
36
36
  * The current font size value.
37
+ *
38
+ * Note: For the `units` property to work, the current font size value must be specified
39
+ * as strings with units (e.g., '12px' instead of 12). When the font size is provided
40
+ * as a number, the component operates in "unitless mode" where the `units` property has no effect.
37
41
  */
38
42
  value?: number | string;
39
43
  /**
@@ -8,7 +8,9 @@ import { useCallback, useMemo } from '@wordpress/element';
8
8
  /**
9
9
  * Internal dependencies
10
10
  */
11
- import CircularOptionPicker from '../circular-option-picker';
11
+ import CircularOptionPicker, {
12
+ getComputeCircularOptionPickerCommonProps,
13
+ } from '../circular-option-picker';
12
14
  import CustomGradientPicker from '../custom-gradient-picker';
13
15
  import { VStack } from '../v-stack';
14
16
  import { ColorHeading } from '../color-palette/styles';
@@ -128,37 +130,17 @@ function Component( props: PickerProps< any > ) {
128
130
  <SingleOrigin { ...additionalProps } />
129
131
  );
130
132
 
131
- let metaProps:
132
- | { asButtons: false; loop?: boolean; 'aria-label': string }
133
- | { asButtons: false; loop?: boolean; 'aria-labelledby': string }
134
- | { asButtons: true };
135
-
136
- if ( asButtons ) {
137
- metaProps = { asButtons: true };
138
- } else {
139
- const _metaProps: { asButtons: false; loop?: boolean } = {
140
- asButtons: false,
141
- loop,
142
- };
143
-
144
- if ( ariaLabel ) {
145
- metaProps = { ..._metaProps, 'aria-label': ariaLabel };
146
- } else if ( ariaLabelledby ) {
147
- metaProps = {
148
- ..._metaProps,
149
- 'aria-labelledby': ariaLabelledby,
150
- };
151
- } else {
152
- metaProps = {
153
- ..._metaProps,
154
- 'aria-label': __( 'Custom color picker.' ),
155
- };
156
- }
157
- }
133
+ const { metaProps, labelProps } = getComputeCircularOptionPickerCommonProps(
134
+ asButtons,
135
+ loop,
136
+ ariaLabel,
137
+ ariaLabelledby
138
+ );
158
139
 
159
140
  return (
160
141
  <CircularOptionPicker
161
142
  { ...metaProps }
143
+ { ...labelProps }
162
144
  actions={ actions }
163
145
  options={ options }
164
146
  />