@wordpress/components 32.0.1-next.v.0 → 32.0.2-next.v.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 (954) hide show
  1. package/CHANGELOG.md +11 -2
  2. package/CONTRIBUTING.md +6 -0
  3. package/build/angle-picker-control/index.cjs +1 -0
  4. package/build/angle-picker-control/index.cjs.map +2 -2
  5. package/build/box-control/index.cjs +15 -7
  6. package/build/box-control/index.cjs.map +2 -2
  7. package/build/button/deprecated.cjs +12 -8
  8. package/build/button/deprecated.cjs.map +2 -2
  9. package/build/button/index.cjs +1 -0
  10. package/build/button/index.cjs.map +2 -2
  11. package/build/button-group/index.cjs +1 -0
  12. package/build/button-group/index.cjs.map +2 -2
  13. package/build/circular-option-picker/circular-option-picker-option.cjs +2 -1
  14. package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
  15. package/build/circular-option-picker/circular-option-picker.cjs +1 -0
  16. package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
  17. package/build/clipboard-button/index.cjs +11 -7
  18. package/build/clipboard-button/index.cjs.map +2 -2
  19. package/build/color-indicator/index.cjs +1 -0
  20. package/build/color-indicator/index.cjs.map +2 -2
  21. package/build/color-palette/index.cjs +1 -0
  22. package/build/color-palette/index.cjs.map +2 -2
  23. package/build/combobox-control/index.cjs +1 -1
  24. package/build/combobox-control/index.cjs.map +2 -2
  25. package/build/date-time/date-time/index.cjs +1 -0
  26. package/build/date-time/date-time/index.cjs.map +2 -2
  27. package/build/disclosure/index.cjs +1 -0
  28. package/build/disclosure/index.cjs.map +2 -2
  29. package/build/external-link/index.cjs +1 -0
  30. package/build/external-link/index.cjs.map +2 -2
  31. package/build/font-size-picker/index.cjs +1 -0
  32. package/build/font-size-picker/index.cjs.map +2 -2
  33. package/build/form-file-upload/index.cjs +9 -5
  34. package/build/form-file-upload/index.cjs.map +2 -2
  35. package/build/form-toggle/index.cjs +1 -0
  36. package/build/form-toggle/index.cjs.map +2 -2
  37. package/build/form-token-field/token-input.cjs +1 -0
  38. package/build/form-token-field/token-input.cjs.map +2 -2
  39. package/build/form-token-field/token.cjs.map +2 -2
  40. package/build/higher-order/navigate-regions/index.cjs +9 -7
  41. package/build/higher-order/navigate-regions/index.cjs.map +2 -2
  42. package/build/higher-order/with-fallback-styles/index.cjs +1 -1
  43. package/build/higher-order/with-fallback-styles/index.cjs.map +2 -2
  44. package/build/higher-order/with-focus-outside/index.cjs +1 -1
  45. package/build/higher-order/with-focus-outside/index.cjs.map +2 -2
  46. package/build/higher-order/with-spoken-messages/index.cjs +7 -5
  47. package/build/higher-order/with-spoken-messages/index.cjs.map +2 -2
  48. package/build/input-control/index.cjs +1 -0
  49. package/build/input-control/index.cjs.map +2 -2
  50. package/build/input-control/styles/input-control-styles.cjs +22 -22
  51. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  52. package/build/menu-item/index.cjs +1 -0
  53. package/build/menu-item/index.cjs.map +2 -2
  54. package/build/modal/index.cjs +1 -0
  55. package/build/modal/index.cjs.map +2 -2
  56. package/build/navigable-container/menu.cjs +1 -0
  57. package/build/navigable-container/menu.cjs.map +2 -2
  58. package/build/navigable-container/tabbable.cjs +1 -0
  59. package/build/navigable-container/tabbable.cjs.map +2 -2
  60. package/build/navigation/back-button/index.cjs +1 -0
  61. package/build/navigation/back-button/index.cjs.map +2 -2
  62. package/build/number-control/index.cjs +1 -0
  63. package/build/number-control/index.cjs.map +2 -2
  64. package/build/panel/body.cjs +1 -0
  65. package/build/panel/body.cjs.map +2 -2
  66. package/build/panel/index.cjs +1 -0
  67. package/build/panel/index.cjs.map +2 -2
  68. package/build/panel/row.cjs +1 -0
  69. package/build/panel/row.cjs.map +2 -2
  70. package/build/progress-bar/index.cjs +1 -0
  71. package/build/progress-bar/index.cjs.map +2 -2
  72. package/build/radio-group/index.cjs +1 -0
  73. package/build/radio-group/index.cjs.map +2 -2
  74. package/build/radio-group/radio.cjs +9 -4
  75. package/build/radio-group/radio.cjs.map +2 -2
  76. package/build/range-control/index.cjs +1 -0
  77. package/build/range-control/index.cjs.map +2 -2
  78. package/build/resizable-box/index.cjs +1 -0
  79. package/build/resizable-box/index.cjs.map +2 -2
  80. package/build/search-control/index.cjs +1 -0
  81. package/build/search-control/index.cjs.map +2 -2
  82. package/build/select-control/index.cjs +1 -0
  83. package/build/select-control/index.cjs.map +2 -2
  84. package/build/slot-fill/bubbles-virtually/slot.cjs +17 -5
  85. package/build/slot-fill/bubbles-virtually/slot.cjs.map +2 -2
  86. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs +17 -4
  87. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs.map +2 -2
  88. package/build/slot-fill/bubbles-virtually/use-slot.cjs +7 -3
  89. package/build/slot-fill/bubbles-virtually/use-slot.cjs.map +2 -2
  90. package/build/slot-fill/context.cjs +17 -6
  91. package/build/slot-fill/context.cjs.map +3 -3
  92. package/build/slot-fill/fill.cjs +29 -4
  93. package/build/slot-fill/fill.cjs.map +4 -4
  94. package/build/slot-fill/index.cjs +8 -23
  95. package/build/slot-fill/index.cjs.map +3 -3
  96. package/build/slot-fill/provider.cjs +33 -17
  97. package/build/slot-fill/provider.cjs.map +2 -2
  98. package/build/slot-fill/slot.cjs +7 -4
  99. package/build/slot-fill/slot.cjs.map +2 -2
  100. package/build/snackbar/index.cjs +1 -0
  101. package/build/snackbar/index.cjs.map +2 -2
  102. package/build/spinner/index.cjs +1 -0
  103. package/build/spinner/index.cjs.map +2 -2
  104. package/build/tab-panel/index.cjs +1 -0
  105. package/build/tab-panel/index.cjs.map +2 -2
  106. package/build/text-control/index.cjs +1 -0
  107. package/build/text-control/index.cjs.map +2 -2
  108. package/build/text-highlight/index.cjs +1 -0
  109. package/build/text-highlight/index.cjs.map +2 -2
  110. package/build/textarea-control/index.cjs +1 -0
  111. package/build/textarea-control/index.cjs.map +2 -2
  112. package/build/toggle-control/index.cjs +1 -0
  113. package/build/toggle-control/index.cjs.map +2 -2
  114. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs +1 -0
  115. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs.map +2 -2
  116. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs +1 -0
  117. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
  118. package/build/toggle-group-control/toggle-group-control-option/component.cjs +1 -0
  119. package/build/toggle-group-control/toggle-group-control-option/component.cjs.map +2 -2
  120. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs +1 -0
  121. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs.map +2 -2
  122. package/build/toolbar/toolbar/index.cjs +1 -0
  123. package/build/toolbar/toolbar/index.cjs.map +2 -2
  124. package/build/toolbar/toolbar/toolbar-container.cjs +1 -0
  125. package/build/toolbar/toolbar/toolbar-container.cjs.map +2 -2
  126. package/build/toolbar/toolbar-button/index.cjs +1 -0
  127. package/build/toolbar/toolbar-button/index.cjs.map +2 -2
  128. package/build/toolbar/toolbar-dropdown-menu/index.cjs +1 -0
  129. package/build/toolbar/toolbar-dropdown-menu/index.cjs.map +2 -2
  130. package/build/toolbar/toolbar-item/index.cjs +1 -0
  131. package/build/toolbar/toolbar-item/index.cjs.map +2 -2
  132. package/build/tooltip/index.cjs +1 -0
  133. package/build/tooltip/index.cjs.map +2 -2
  134. package/build/tree-grid/cell.cjs +1 -0
  135. package/build/tree-grid/cell.cjs.map +2 -2
  136. package/build/tree-grid/index.cjs +1 -0
  137. package/build/tree-grid/index.cjs.map +2 -2
  138. package/build/tree-grid/item.cjs +1 -0
  139. package/build/tree-grid/item.cjs.map +2 -2
  140. package/build/tree-grid/roving-tab-index-item.cjs +1 -0
  141. package/build/tree-grid/roving-tab-index-item.cjs.map +2 -2
  142. package/build/tree-grid/row.cjs +1 -0
  143. package/build/tree-grid/row.cjs.map +2 -2
  144. package/build/tree-select/index.cjs +12 -8
  145. package/build/tree-select/index.cjs.map +2 -2
  146. package/build/unit-control/index.cjs +1 -0
  147. package/build/unit-control/index.cjs.map +2 -2
  148. package/build/utils/dropdown-motion.cjs.map +2 -2
  149. package/build/validated-form-controls/components/checkbox-control.cjs +1 -0
  150. package/build/validated-form-controls/components/checkbox-control.cjs.map +2 -2
  151. package/build/validated-form-controls/components/combobox-control.cjs +1 -0
  152. package/build/validated-form-controls/components/combobox-control.cjs.map +2 -2
  153. package/build/validated-form-controls/components/custom-select-control.cjs +1 -0
  154. package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
  155. package/build/validated-form-controls/components/form-token-field.cjs +1 -0
  156. package/build/validated-form-controls/components/form-token-field.cjs.map +2 -2
  157. package/build/validated-form-controls/components/input-control.cjs +1 -0
  158. package/build/validated-form-controls/components/input-control.cjs.map +2 -2
  159. package/build/validated-form-controls/components/number-control.cjs +1 -0
  160. package/build/validated-form-controls/components/number-control.cjs.map +2 -2
  161. package/build/validated-form-controls/components/radio-control.cjs +1 -0
  162. package/build/validated-form-controls/components/radio-control.cjs.map +2 -2
  163. package/build/validated-form-controls/components/range-control.cjs +1 -0
  164. package/build/validated-form-controls/components/range-control.cjs.map +2 -2
  165. package/build/validated-form-controls/components/select-control.cjs +1 -0
  166. package/build/validated-form-controls/components/select-control.cjs.map +2 -2
  167. package/build/validated-form-controls/components/text-control.cjs +1 -0
  168. package/build/validated-form-controls/components/text-control.cjs.map +2 -2
  169. package/build/validated-form-controls/components/textarea-control.cjs +1 -0
  170. package/build/validated-form-controls/components/textarea-control.cjs.map +2 -2
  171. package/build/validated-form-controls/components/toggle-control.cjs +1 -0
  172. package/build/validated-form-controls/components/toggle-control.cjs.map +2 -2
  173. package/build/validated-form-controls/components/toggle-group-control.cjs +1 -0
  174. package/build/validated-form-controls/components/toggle-group-control.cjs.map +2 -2
  175. package/build/validated-form-controls/control-with-error.cjs +1 -0
  176. package/build/validated-form-controls/control-with-error.cjs.map +2 -2
  177. package/build-module/angle-picker-control/index.mjs +1 -0
  178. package/build-module/angle-picker-control/index.mjs.map +2 -2
  179. package/build-module/box-control/index.mjs +15 -7
  180. package/build-module/box-control/index.mjs.map +2 -2
  181. package/build-module/button/deprecated.mjs +12 -8
  182. package/build-module/button/deprecated.mjs.map +2 -2
  183. package/build-module/button/index.mjs +1 -0
  184. package/build-module/button/index.mjs.map +2 -2
  185. package/build-module/button-group/index.mjs +1 -0
  186. package/build-module/button-group/index.mjs.map +2 -2
  187. package/build-module/circular-option-picker/circular-option-picker-option.mjs +2 -1
  188. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  189. package/build-module/circular-option-picker/circular-option-picker.mjs +1 -0
  190. package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
  191. package/build-module/clipboard-button/index.mjs +11 -7
  192. package/build-module/clipboard-button/index.mjs.map +2 -2
  193. package/build-module/color-indicator/index.mjs +1 -0
  194. package/build-module/color-indicator/index.mjs.map +2 -2
  195. package/build-module/color-palette/index.mjs +1 -0
  196. package/build-module/color-palette/index.mjs.map +2 -2
  197. package/build-module/combobox-control/index.mjs +1 -1
  198. package/build-module/combobox-control/index.mjs.map +2 -2
  199. package/build-module/date-time/date-time/index.mjs +1 -0
  200. package/build-module/date-time/date-time/index.mjs.map +2 -2
  201. package/build-module/disclosure/index.mjs +1 -0
  202. package/build-module/disclosure/index.mjs.map +2 -2
  203. package/build-module/external-link/index.mjs +1 -0
  204. package/build-module/external-link/index.mjs.map +2 -2
  205. package/build-module/font-size-picker/index.mjs +1 -0
  206. package/build-module/font-size-picker/index.mjs.map +2 -2
  207. package/build-module/form-file-upload/index.mjs +9 -5
  208. package/build-module/form-file-upload/index.mjs.map +2 -2
  209. package/build-module/form-toggle/index.mjs +1 -0
  210. package/build-module/form-toggle/index.mjs.map +2 -2
  211. package/build-module/form-token-field/token-input.mjs +1 -0
  212. package/build-module/form-token-field/token-input.mjs.map +2 -2
  213. package/build-module/form-token-field/token.mjs.map +2 -2
  214. package/build-module/higher-order/navigate-regions/index.mjs +9 -7
  215. package/build-module/higher-order/navigate-regions/index.mjs.map +2 -2
  216. package/build-module/higher-order/with-fallback-styles/index.mjs +1 -1
  217. package/build-module/higher-order/with-fallback-styles/index.mjs.map +2 -2
  218. package/build-module/higher-order/with-focus-outside/index.mjs +1 -1
  219. package/build-module/higher-order/with-focus-outside/index.mjs.map +2 -2
  220. package/build-module/higher-order/with-spoken-messages/index.mjs +7 -5
  221. package/build-module/higher-order/with-spoken-messages/index.mjs.map +2 -2
  222. package/build-module/input-control/index.mjs +1 -0
  223. package/build-module/input-control/index.mjs.map +2 -2
  224. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  225. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  226. package/build-module/menu-item/index.mjs +1 -0
  227. package/build-module/menu-item/index.mjs.map +2 -2
  228. package/build-module/modal/index.mjs +1 -0
  229. package/build-module/modal/index.mjs.map +2 -2
  230. package/build-module/navigable-container/menu.mjs +1 -0
  231. package/build-module/navigable-container/menu.mjs.map +2 -2
  232. package/build-module/navigable-container/tabbable.mjs +1 -0
  233. package/build-module/navigable-container/tabbable.mjs.map +2 -2
  234. package/build-module/navigation/back-button/index.mjs +1 -0
  235. package/build-module/navigation/back-button/index.mjs.map +2 -2
  236. package/build-module/number-control/index.mjs +1 -0
  237. package/build-module/number-control/index.mjs.map +2 -2
  238. package/build-module/panel/body.mjs +1 -0
  239. package/build-module/panel/body.mjs.map +2 -2
  240. package/build-module/panel/index.mjs +1 -0
  241. package/build-module/panel/index.mjs.map +2 -2
  242. package/build-module/panel/row.mjs +1 -0
  243. package/build-module/panel/row.mjs.map +2 -2
  244. package/build-module/progress-bar/index.mjs +1 -0
  245. package/build-module/progress-bar/index.mjs.map +2 -2
  246. package/build-module/radio-group/index.mjs +1 -0
  247. package/build-module/radio-group/index.mjs.map +2 -2
  248. package/build-module/radio-group/radio.mjs +9 -4
  249. package/build-module/radio-group/radio.mjs.map +2 -2
  250. package/build-module/range-control/index.mjs +1 -0
  251. package/build-module/range-control/index.mjs.map +2 -2
  252. package/build-module/resizable-box/index.mjs +1 -0
  253. package/build-module/resizable-box/index.mjs.map +2 -2
  254. package/build-module/search-control/index.mjs +1 -0
  255. package/build-module/search-control/index.mjs.map +2 -2
  256. package/build-module/select-control/index.mjs +1 -0
  257. package/build-module/select-control/index.mjs.map +2 -2
  258. package/build-module/slot-fill/bubbles-virtually/slot.mjs +16 -4
  259. package/build-module/slot-fill/bubbles-virtually/slot.mjs.map +2 -2
  260. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs +17 -4
  261. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs.map +2 -2
  262. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs +6 -2
  263. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs.map +2 -2
  264. package/build-module/slot-fill/context.mjs +7 -2
  265. package/build-module/slot-fill/context.mjs.map +2 -2
  266. package/build-module/slot-fill/fill.mjs +30 -5
  267. package/build-module/slot-fill/fill.mjs.map +3 -3
  268. package/build-module/slot-fill/index.mjs +7 -21
  269. package/build-module/slot-fill/index.mjs.map +2 -2
  270. package/build-module/slot-fill/provider.mjs +33 -17
  271. package/build-module/slot-fill/provider.mjs.map +2 -2
  272. package/build-module/slot-fill/slot.mjs +7 -4
  273. package/build-module/slot-fill/slot.mjs.map +2 -2
  274. package/build-module/snackbar/index.mjs +1 -0
  275. package/build-module/snackbar/index.mjs.map +2 -2
  276. package/build-module/spinner/index.mjs +1 -0
  277. package/build-module/spinner/index.mjs.map +2 -2
  278. package/build-module/tab-panel/index.mjs +1 -0
  279. package/build-module/tab-panel/index.mjs.map +2 -2
  280. package/build-module/text-control/index.mjs +1 -0
  281. package/build-module/text-control/index.mjs.map +2 -2
  282. package/build-module/text-highlight/index.mjs +1 -0
  283. package/build-module/text-highlight/index.mjs.map +2 -2
  284. package/build-module/textarea-control/index.mjs +1 -0
  285. package/build-module/textarea-control/index.mjs.map +2 -2
  286. package/build-module/toggle-control/index.mjs +1 -0
  287. package/build-module/toggle-control/index.mjs.map +2 -2
  288. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs +1 -0
  289. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs.map +2 -2
  290. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs +1 -0
  291. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs.map +2 -2
  292. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs +1 -0
  293. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs.map +2 -2
  294. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs +1 -0
  295. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map +2 -2
  296. package/build-module/toolbar/toolbar/index.mjs +1 -0
  297. package/build-module/toolbar/toolbar/index.mjs.map +2 -2
  298. package/build-module/toolbar/toolbar/toolbar-container.mjs +1 -0
  299. package/build-module/toolbar/toolbar/toolbar-container.mjs.map +2 -2
  300. package/build-module/toolbar/toolbar-button/index.mjs +1 -0
  301. package/build-module/toolbar/toolbar-button/index.mjs.map +2 -2
  302. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs +1 -0
  303. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs.map +2 -2
  304. package/build-module/toolbar/toolbar-item/index.mjs +1 -0
  305. package/build-module/toolbar/toolbar-item/index.mjs.map +2 -2
  306. package/build-module/tooltip/index.mjs +1 -0
  307. package/build-module/tooltip/index.mjs.map +2 -2
  308. package/build-module/tree-grid/cell.mjs +1 -0
  309. package/build-module/tree-grid/cell.mjs.map +2 -2
  310. package/build-module/tree-grid/index.mjs +1 -0
  311. package/build-module/tree-grid/index.mjs.map +2 -2
  312. package/build-module/tree-grid/item.mjs +1 -0
  313. package/build-module/tree-grid/item.mjs.map +2 -2
  314. package/build-module/tree-grid/roving-tab-index-item.mjs +1 -0
  315. package/build-module/tree-grid/roving-tab-index-item.mjs.map +2 -2
  316. package/build-module/tree-grid/row.mjs +1 -0
  317. package/build-module/tree-grid/row.mjs.map +2 -2
  318. package/build-module/tree-select/index.mjs +12 -8
  319. package/build-module/tree-select/index.mjs.map +2 -2
  320. package/build-module/unit-control/index.mjs +1 -0
  321. package/build-module/unit-control/index.mjs.map +2 -2
  322. package/build-module/utils/dropdown-motion.mjs.map +2 -2
  323. package/build-module/validated-form-controls/components/checkbox-control.mjs +1 -0
  324. package/build-module/validated-form-controls/components/checkbox-control.mjs.map +2 -2
  325. package/build-module/validated-form-controls/components/combobox-control.mjs +1 -0
  326. package/build-module/validated-form-controls/components/combobox-control.mjs.map +2 -2
  327. package/build-module/validated-form-controls/components/custom-select-control.mjs +1 -0
  328. package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
  329. package/build-module/validated-form-controls/components/form-token-field.mjs +1 -0
  330. package/build-module/validated-form-controls/components/form-token-field.mjs.map +2 -2
  331. package/build-module/validated-form-controls/components/input-control.mjs +1 -0
  332. package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
  333. package/build-module/validated-form-controls/components/number-control.mjs +1 -0
  334. package/build-module/validated-form-controls/components/number-control.mjs.map +2 -2
  335. package/build-module/validated-form-controls/components/radio-control.mjs +1 -0
  336. package/build-module/validated-form-controls/components/radio-control.mjs.map +2 -2
  337. package/build-module/validated-form-controls/components/range-control.mjs +1 -0
  338. package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
  339. package/build-module/validated-form-controls/components/select-control.mjs +1 -0
  340. package/build-module/validated-form-controls/components/select-control.mjs.map +2 -2
  341. package/build-module/validated-form-controls/components/text-control.mjs +1 -0
  342. package/build-module/validated-form-controls/components/text-control.mjs.map +2 -2
  343. package/build-module/validated-form-controls/components/textarea-control.mjs +1 -0
  344. package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
  345. package/build-module/validated-form-controls/components/toggle-control.mjs +1 -0
  346. package/build-module/validated-form-controls/components/toggle-control.mjs.map +2 -2
  347. package/build-module/validated-form-controls/components/toggle-group-control.mjs +1 -0
  348. package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +2 -2
  349. package/build-module/validated-form-controls/control-with-error.mjs +1 -0
  350. package/build-module/validated-form-controls/control-with-error.mjs.map +2 -2
  351. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  352. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  353. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  354. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  355. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  356. package/build-types/animate/stories/index.story.d.ts +8 -8
  357. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  358. package/build-types/badge/stories/index.story.d.ts +1 -1
  359. package/build-types/badge/stories/index.story.d.ts.map +1 -1
  360. package/build-types/base-control/stories/index.story.d.ts +2 -2
  361. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  362. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  363. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  364. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  365. package/build-types/border-control/stories/index.story.d.ts +6 -6
  366. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  367. package/build-types/box-control/index.d.ts.map +1 -1
  368. package/build-types/box-control/stories/index.story.d.ts +8 -8
  369. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  370. package/build-types/button/deprecated.d.ts.map +1 -1
  371. package/build-types/button/index.d.ts +1 -1
  372. package/build-types/button/index.d.ts.map +1 -1
  373. package/build-types/button/stories/e2e/index.story.d.ts +2 -2
  374. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  375. package/build-types/button/stories/index.story.d.ts +9 -9
  376. package/build-types/button/stories/index.story.d.ts.map +1 -1
  377. package/build-types/button-group/index.d.ts.map +1 -1
  378. package/build-types/button-group/stories/index.story.d.ts +1 -1
  379. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  380. package/build-types/calendar/stories/date-calendar.story.d.ts +1 -1
  381. package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
  382. package/build-types/calendar/stories/date-range-calendar.story.d.ts +1 -1
  383. package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
  384. package/build-types/card/stories/index.story.d.ts +1 -1
  385. package/build-types/card/stories/index.story.d.ts.map +1 -1
  386. package/build-types/checkbox-control/stories/index.story.d.ts +1 -1
  387. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  388. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  389. package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -0
  390. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  391. package/build-types/circular-option-picker/stories/index.story.d.ts +6 -6
  392. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  393. package/build-types/clipboard-button/index.d.ts.map +1 -1
  394. package/build-types/clipboard-button/types.d.ts +1 -0
  395. package/build-types/clipboard-button/types.d.ts.map +1 -1
  396. package/build-types/color-indicator/index.d.ts.map +1 -1
  397. package/build-types/color-indicator/stories/index.story.d.ts +1 -1
  398. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  399. package/build-types/color-palette/index.d.ts.map +1 -1
  400. package/build-types/color-palette/stories/index.story.d.ts +4 -4
  401. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  402. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  403. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  404. package/build-types/combobox-control/stories/index.story.d.ts +5 -5
  405. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  406. package/build-types/composite/legacy/stories/index.story.d.ts +1 -1
  407. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  408. package/build-types/composite/legacy/stories/utils.d.ts +1 -1
  409. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  410. package/build-types/composite/stories/index.story.d.ts +1 -1
  411. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  412. package/build-types/confirm-dialog/stories/index.story.d.ts +3 -3
  413. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  414. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  415. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  416. package/build-types/custom-select-control/stories/index.story.d.ts +4 -4
  417. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  418. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -4
  419. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  420. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  421. package/build-types/date-time/stories/date-time.story.d.ts +1 -1
  422. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  423. package/build-types/date-time/stories/date.story.d.ts +1 -1
  424. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  425. package/build-types/date-time/stories/time.story.d.ts +2 -2
  426. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  427. package/build-types/disabled/stories/index.story.d.ts +1 -1
  428. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  429. package/build-types/disclosure/index.d.ts.map +1 -1
  430. package/build-types/divider/stories/index.story.d.ts +1 -1
  431. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  432. package/build-types/draggable/stories/index.story.d.ts +1 -1
  433. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  434. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  435. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  436. package/build-types/dropdown/stories/index.story.d.ts +1 -1
  437. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  438. package/build-types/dropdown-menu/stories/index.story.d.ts +1 -1
  439. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  440. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  441. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  442. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +4 -4
  443. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  444. package/build-types/elevation/stories/index.story.d.ts +1 -1
  445. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  446. package/build-types/external-link/index.d.ts.map +1 -1
  447. package/build-types/external-link/stories/index.story.d.ts +1 -1
  448. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  449. package/build-types/flex/stories/index.story.d.ts +1 -1
  450. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  451. package/build-types/focal-point-picker/stories/index.story.d.ts +5 -5
  452. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  453. package/build-types/font-size-picker/index.d.ts.map +1 -1
  454. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +1 -1
  455. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  456. package/build-types/font-size-picker/stories/index.story.d.ts +1 -1
  457. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  458. package/build-types/form-file-upload/index.d.ts.map +1 -1
  459. package/build-types/form-file-upload/stories/index.story.d.ts +6 -6
  460. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  461. package/build-types/form-toggle/index.d.ts.map +1 -1
  462. package/build-types/form-toggle/stories/index.story.d.ts +1 -1
  463. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  464. package/build-types/form-token-field/stories/index.story.d.ts +1 -1
  465. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  466. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  467. package/build-types/gradient-picker/stories/index.story.d.ts +4 -4
  468. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  469. package/build-types/grid/stories/index.story.d.ts +1 -1
  470. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  471. package/build-types/guide/stories/index.story.d.ts +2 -2
  472. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  473. package/build-types/h-stack/stories/e2e/index.story.d.ts +1 -1
  474. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  475. package/build-types/h-stack/stories/index.story.d.ts +1 -1
  476. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  477. package/build-types/heading/stories/index.story.d.ts +1 -1
  478. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  479. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  480. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  481. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  482. package/build-types/icon/stories/index.story.d.ts +5 -5
  483. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  484. package/build-types/input-control/index.d.ts.map +1 -1
  485. package/build-types/input-control/stories/index.story.d.ts +8 -8
  486. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  487. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  488. package/build-types/item-group/stories/index.story.d.ts +1 -1
  489. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  490. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  491. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  492. package/build-types/menu/stories/index.story.d.ts +1 -1
  493. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  494. package/build-types/menu-group/stories/index.story.d.ts +2 -2
  495. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  496. package/build-types/menu-item/index.d.ts.map +1 -1
  497. package/build-types/menu-item/stories/index.story.d.ts +5 -5
  498. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  499. package/build-types/menu-items-choice/stories/index.story.d.ts +1 -1
  500. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  501. package/build-types/modal/index.d.ts.map +1 -1
  502. package/build-types/modal/stories/index.story.d.ts +1 -1
  503. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  504. package/build-types/navigable-container/menu.d.ts.map +1 -1
  505. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +1 -1
  506. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  507. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +1 -1
  508. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  509. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  510. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  511. package/build-types/navigation/stories/index.story.d.ts +7 -7
  512. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  513. package/build-types/navigation/stories/utils/controlled-state.d.ts +1 -1
  514. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  515. package/build-types/navigation/stories/utils/default.d.ts +1 -1
  516. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  517. package/build-types/navigation/stories/utils/group.d.ts +1 -1
  518. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  519. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +1 -1
  520. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  521. package/build-types/navigation/stories/utils/more-examples.d.ts +1 -1
  522. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  523. package/build-types/navigation/stories/utils/search.d.ts +1 -1
  524. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  525. package/build-types/navigator/stories/index.story.d.ts +1 -1
  526. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  527. package/build-types/notice/stories/index.story.d.ts +6 -6
  528. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  529. package/build-types/number-control/index.d.ts.map +1 -1
  530. package/build-types/number-control/stories/index.story.d.ts +2 -2
  531. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  532. package/build-types/palette-edit/stories/index.story.d.ts +3 -3
  533. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  534. package/build-types/panel/body.d.ts.map +1 -1
  535. package/build-types/panel/index.d.ts.map +1 -1
  536. package/build-types/panel/row.d.ts.map +1 -1
  537. package/build-types/panel/stories/index.story.d.ts +1 -1
  538. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  539. package/build-types/placeholder/stories/index.story.d.ts +1 -1
  540. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  541. package/build-types/popover/stories/index.story.d.ts +1 -1
  542. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  543. package/build-types/progress-bar/index.d.ts.map +1 -1
  544. package/build-types/progress-bar/stories/index.story.d.ts +2 -2
  545. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  546. package/build-types/query-controls/stories/index.story.d.ts +2 -2
  547. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  548. package/build-types/radio-control/stories/index.story.d.ts +1 -1
  549. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  550. package/build-types/radio-group/index.d.ts.map +1 -1
  551. package/build-types/radio-group/radio.d.ts.map +1 -1
  552. package/build-types/radio-group/stories/index.story.d.ts +1 -1
  553. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  554. package/build-types/range-control/index.d.ts.map +1 -1
  555. package/build-types/range-control/stories/index.story.d.ts +1 -1
  556. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  557. package/build-types/resizable-box/index.d.ts.map +1 -1
  558. package/build-types/resizable-box/stories/index.story.d.ts +3 -3
  559. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  560. package/build-types/responsive-wrapper/stories/index.story.d.ts +2 -2
  561. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  562. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  563. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  564. package/build-types/scroll-lock/stories/index.story.d.ts +1 -1
  565. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  566. package/build-types/scrollable/stories/index.story.d.ts +1 -1
  567. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  568. package/build-types/search-control/index.d.ts.map +1 -1
  569. package/build-types/search-control/stories/index.story.d.ts +2 -2
  570. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  571. package/build-types/select-control/index.d.ts.map +1 -1
  572. package/build-types/select-control/stories/index.story.d.ts +6 -6
  573. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  574. package/build-types/shortcut/stories/index.story.d.ts +2 -2
  575. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  576. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  577. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  578. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  579. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +2 -3
  580. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  581. package/build-types/slot-fill/context.d.ts +2 -2
  582. package/build-types/slot-fill/context.d.ts.map +1 -1
  583. package/build-types/slot-fill/fill.d.ts +1 -1
  584. package/build-types/slot-fill/fill.d.ts.map +1 -1
  585. package/build-types/slot-fill/index.d.ts +3 -4
  586. package/build-types/slot-fill/index.d.ts.map +1 -1
  587. package/build-types/slot-fill/provider.d.ts.map +1 -1
  588. package/build-types/slot-fill/stories/index.story.d.ts +1 -1
  589. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  590. package/build-types/slot-fill/types.d.ts +23 -25
  591. package/build-types/slot-fill/types.d.ts.map +1 -1
  592. package/build-types/snackbar/index.d.ts.map +1 -1
  593. package/build-types/snackbar/stories/index.story.d.ts +1 -1
  594. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  595. package/build-types/snackbar/stories/list.story.d.ts +1 -1
  596. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  597. package/build-types/spacer/stories/index.story.d.ts +1 -1
  598. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  599. package/build-types/spinner/index.d.ts.map +1 -1
  600. package/build-types/spinner/stories/index.story.d.ts +1 -1
  601. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  602. package/build-types/surface/stories/index.story.d.ts +1 -1
  603. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  604. package/build-types/tab-panel/index.d.ts.map +1 -1
  605. package/build-types/tab-panel/stories/index.story.d.ts +5 -5
  606. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  607. package/build-types/tabs/stories/index.story.d.ts +8 -8
  608. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  609. package/build-types/text/stories/index.story.d.ts +4 -4
  610. package/build-types/text/stories/index.story.d.ts.map +1 -1
  611. package/build-types/text-control/index.d.ts.map +1 -1
  612. package/build-types/text-control/stories/index.story.d.ts +1 -1
  613. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  614. package/build-types/text-highlight/index.d.ts +4 -1
  615. package/build-types/text-highlight/index.d.ts.map +1 -1
  616. package/build-types/text-highlight/stories/index.story.d.ts +1 -1
  617. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  618. package/build-types/textarea-control/index.d.ts.map +1 -1
  619. package/build-types/textarea-control/stories/index.story.d.ts +1 -1
  620. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  621. package/build-types/theme/stories/index.story.d.ts +2 -2
  622. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  623. package/build-types/tip/stories/index.story.d.ts +1 -1
  624. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  625. package/build-types/toggle-control/index.d.ts.map +1 -1
  626. package/build-types/toggle-control/stories/index.story.d.ts +3 -3
  627. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  628. package/build-types/toggle-group-control/stories/index.story.d.ts +1 -1
  629. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  630. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  631. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  632. package/build-types/toolbar/stories/index.story.d.ts +4 -4
  633. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  634. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  635. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  636. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  637. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  638. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  639. package/build-types/tools-panel/stories/index.story.d.ts +1 -1
  640. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  641. package/build-types/tooltip/index.d.ts.map +1 -1
  642. package/build-types/tooltip/stories/index.story.d.ts +2 -2
  643. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  644. package/build-types/tree-grid/cell.d.ts.map +1 -1
  645. package/build-types/tree-grid/index.d.ts.map +1 -1
  646. package/build-types/tree-grid/item.d.ts.map +1 -1
  647. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  648. package/build-types/tree-grid/row.d.ts.map +1 -1
  649. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  650. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  651. package/build-types/tree-select/index.d.ts.map +1 -1
  652. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  653. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  654. package/build-types/truncate/stories/index.story.d.ts +1 -1
  655. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  656. package/build-types/unit-control/index.d.ts.map +1 -1
  657. package/build-types/unit-control/stories/index.story.d.ts +1 -1
  658. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  659. package/build-types/utils/dropdown-motion.d.ts.map +1 -1
  660. package/build-types/v-stack/stories/e2e/index.story.d.ts +1 -1
  661. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  662. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  663. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  664. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
  665. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +1 -1
  666. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
  667. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +1 -1
  668. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
  669. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +1 -1
  670. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
  671. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +1 -1
  672. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
  673. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +1 -1
  674. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
  675. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +1 -1
  676. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
  677. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +1 -1
  678. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
  679. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +1 -1
  680. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
  681. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +1 -1
  682. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
  683. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +1 -1
  684. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
  685. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +1 -1
  686. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -1
  687. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +1 -1
  688. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
  689. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +1 -1
  690. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
  691. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +1 -1
  692. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
  693. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +1 -1
  694. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
  695. package/build-types/view/stories/index.story.d.ts +1 -1
  696. package/build-types/view/stories/index.story.d.ts.map +1 -1
  697. package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
  698. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  699. package/build-types/z-stack/stories/index.story.d.ts +1 -1
  700. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  701. package/package.json +26 -24
  702. package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
  703. package/src/angle-picker-control/index.tsx +1 -0
  704. package/src/angle-picker-control/stories/index.story.tsx +1 -1
  705. package/src/animate/stories/index.story.tsx +1 -1
  706. package/src/badge/stories/index.story.tsx +1 -1
  707. package/src/base-control/stories/index.story.tsx +4 -2
  708. package/src/border-box-control/border-box-control-split-controls/component.tsx +9 -0
  709. package/src/border-box-control/stories/index.story.tsx +3 -1
  710. package/src/border-box-control/test/index.tsx +51 -20
  711. package/src/border-control/stories/index.story.tsx +2 -1
  712. package/src/border-control/test/index.js +37 -34
  713. package/src/box-control/index.tsx +6 -0
  714. package/src/box-control/stories/index.story.tsx +3 -2
  715. package/src/button/deprecated.tsx +2 -0
  716. package/src/button/index.tsx +16 -15
  717. package/src/button/stories/e2e/index.story.tsx +9 -5
  718. package/src/button/stories/index.story.tsx +14 -11
  719. package/src/button/test/index.tsx +0 -5
  720. package/src/button-group/index.tsx +1 -0
  721. package/src/button-group/stories/index.story.tsx +5 -3
  722. package/src/calendar/stories/date-calendar.story.tsx +1 -1
  723. package/src/calendar/stories/date-range-calendar.story.tsx +1 -1
  724. package/src/card/stories/index.story.tsx +4 -2
  725. package/src/checkbox-control/stories/index.story.tsx +1 -1
  726. package/src/circular-option-picker/circular-option-picker-option.tsx +2 -1
  727. package/src/circular-option-picker/circular-option-picker.tsx +2 -0
  728. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  729. package/src/clipboard-button/index.tsx +2 -0
  730. package/src/clipboard-button/types.ts +1 -0
  731. package/src/color-indicator/index.tsx +1 -0
  732. package/src/color-indicator/stories/index.story.tsx +1 -1
  733. package/src/color-palette/index.tsx +1 -0
  734. package/src/color-palette/stories/index.story.tsx +1 -1
  735. package/src/color-picker/stories/index.story.tsx +1 -1
  736. package/src/combobox-control/index.tsx +1 -1
  737. package/src/combobox-control/stories/index.story.tsx +2 -1
  738. package/src/composite/legacy/stories/index.story.tsx +1 -1
  739. package/src/composite/legacy/stories/utils.tsx +1 -1
  740. package/src/composite/stories/index.story.tsx +1 -1
  741. package/src/confirm-dialog/stories/index.story.tsx +6 -2
  742. package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
  743. package/src/custom-select-control/stories/index.story.tsx +2 -1
  744. package/src/custom-select-control-v2/stories/index.story.tsx +1 -1
  745. package/src/date-time/date-time/index.tsx +1 -0
  746. package/src/date-time/stories/date-time.story.tsx +1 -1
  747. package/src/date-time/stories/date.story.tsx +1 -1
  748. package/src/date-time/stories/time.story.tsx +1 -1
  749. package/src/disabled/stories/index.story.tsx +1 -1
  750. package/src/disclosure/index.tsx +1 -0
  751. package/src/divider/stories/index.story.tsx +1 -1
  752. package/src/draggable/stories/index.story.tsx +1 -1
  753. package/src/drop-zone/stories/index.story.tsx +1 -1
  754. package/src/dropdown/stories/index.story.tsx +2 -1
  755. package/src/dropdown-menu/stories/index.story.tsx +1 -1
  756. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  757. package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
  758. package/src/elevation/stories/index.story.tsx +1 -1
  759. package/src/external-link/index.tsx +1 -0
  760. package/src/external-link/stories/index.story.tsx +1 -1
  761. package/src/flex/stories/index.story.tsx +1 -1
  762. package/src/focal-point-picker/stories/index.story.tsx +1 -1
  763. package/src/font-size-picker/index.tsx +1 -0
  764. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -1
  765. package/src/font-size-picker/stories/index.story.tsx +2 -1
  766. package/src/form-file-upload/index.tsx +2 -0
  767. package/src/form-file-upload/stories/index.story.tsx +2 -2
  768. package/src/form-toggle/index.tsx +1 -0
  769. package/src/form-toggle/stories/index.story.tsx +1 -1
  770. package/src/form-token-field/stories/index.story.tsx +3 -1
  771. package/src/form-token-field/token-input.tsx +1 -0
  772. package/src/form-token-field/token.tsx +2 -2
  773. package/src/gradient-picker/stories/index.story.tsx +1 -1
  774. package/src/grid/stories/index.story.tsx +1 -1
  775. package/src/guide/stories/index.story.tsx +6 -2
  776. package/src/h-stack/stories/e2e/index.story.tsx +1 -1
  777. package/src/h-stack/stories/index.story.tsx +1 -1
  778. package/src/heading/stories/index.story.tsx +1 -1
  779. package/src/higher-order/navigate-regions/index.tsx +7 -5
  780. package/src/higher-order/with-fallback-styles/index.tsx +1 -1
  781. package/src/higher-order/with-focus-outside/index.tsx +25 -24
  782. package/src/higher-order/with-spoken-messages/index.tsx +10 -7
  783. package/src/icon/stories/index.story.tsx +1 -1
  784. package/src/input-control/index.tsx +1 -0
  785. package/src/input-control/stories/index.story.tsx +3 -2
  786. package/src/input-control/styles/input-control-styles.tsx +0 -4
  787. package/src/item-group/stories/index.story.tsx +1 -1
  788. package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
  789. package/src/menu/stories/index.story.tsx +5 -2
  790. package/src/menu-group/stories/index.story.tsx +1 -1
  791. package/src/menu-item/index.tsx +1 -0
  792. package/src/menu-item/stories/index.story.tsx +1 -1
  793. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  794. package/src/modal/index.tsx +1 -0
  795. package/src/modal/stories/index.story.tsx +11 -3
  796. package/src/navigable-container/menu.tsx +1 -0
  797. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  798. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  799. package/src/navigable-container/tabbable.tsx +1 -0
  800. package/src/navigation/back-button/index.tsx +1 -0
  801. package/src/navigation/stories/index.story.tsx +1 -1
  802. package/src/navigation/stories/utils/controlled-state.tsx +4 -1
  803. package/src/navigation/stories/utils/default.tsx +1 -1
  804. package/src/navigation/stories/utils/group.tsx +1 -1
  805. package/src/navigation/stories/utils/hide-if-empty.tsx +1 -1
  806. package/src/navigation/stories/utils/more-examples.tsx +1 -1
  807. package/src/navigation/stories/utils/search.tsx +1 -1
  808. package/src/navigator/stories/index.story.tsx +2 -1
  809. package/src/navigator/test/index.tsx +1 -1
  810. package/src/notice/stories/index.story.tsx +1 -1
  811. package/src/number-control/index.tsx +1 -0
  812. package/src/number-control/stories/index.story.tsx +2 -1
  813. package/src/palette-edit/stories/index.story.tsx +1 -1
  814. package/src/panel/body.tsx +1 -0
  815. package/src/panel/index.tsx +1 -0
  816. package/src/panel/row.tsx +1 -0
  817. package/src/panel/stories/index.story.tsx +1 -1
  818. package/src/placeholder/stories/index.story.tsx +1 -1
  819. package/src/popover/stories/index.story.tsx +9 -2
  820. package/src/progress-bar/index.tsx +1 -0
  821. package/src/progress-bar/stories/index.story.tsx +1 -1
  822. package/src/query-controls/stories/index.story.tsx +1 -1
  823. package/src/radio-control/stories/index.story.tsx +1 -1
  824. package/src/radio-group/index.tsx +1 -0
  825. package/src/radio-group/radio.tsx +3 -0
  826. package/src/radio-group/stories/index.story.tsx +1 -1
  827. package/src/range-control/index.tsx +1 -0
  828. package/src/range-control/stories/index.story.tsx +5 -1
  829. package/src/resizable-box/index.tsx +1 -0
  830. package/src/resizable-box/stories/index.story.tsx +1 -1
  831. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  832. package/src/sandbox/stories/index.story.tsx +1 -1
  833. package/src/scroll-lock/stories/index.story.tsx +6 -2
  834. package/src/scrollable/stories/index.story.tsx +1 -1
  835. package/src/search-control/index.tsx +1 -0
  836. package/src/search-control/stories/index.story.tsx +1 -1
  837. package/src/select-control/index.tsx +3 -0
  838. package/src/select-control/stories/index.story.tsx +3 -1
  839. package/src/shortcut/stories/index.story.tsx +1 -1
  840. package/src/slot-fill/bubbles-virtually/slot.tsx +16 -9
  841. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +30 -4
  842. package/src/slot-fill/bubbles-virtually/use-slot.ts +7 -3
  843. package/src/slot-fill/context.ts +15 -4
  844. package/src/slot-fill/fill.tsx +74 -0
  845. package/src/slot-fill/index.tsx +17 -33
  846. package/src/slot-fill/provider.tsx +49 -35
  847. package/src/slot-fill/slot.tsx +4 -4
  848. package/src/slot-fill/stories/index.story.tsx +1 -1
  849. package/src/slot-fill/test/__snapshots__/slot.js.snap +14 -0
  850. package/src/slot-fill/test/slot.js +24 -1
  851. package/src/slot-fill/types.ts +16 -32
  852. package/src/snackbar/index.tsx +1 -0
  853. package/src/snackbar/stories/index.story.tsx +1 -1
  854. package/src/snackbar/stories/list.story.tsx +1 -1
  855. package/src/spacer/stories/index.story.tsx +1 -1
  856. package/src/spinner/index.tsx +1 -0
  857. package/src/spinner/stories/index.story.tsx +1 -1
  858. package/src/surface/stories/index.story.tsx +1 -1
  859. package/src/tab-panel/index.tsx +1 -0
  860. package/src/tab-panel/stories/index.story.tsx +1 -1
  861. package/src/tabs/stories/index.story.tsx +11 -3
  862. package/src/text/stories/index.story.tsx +1 -1
  863. package/src/text-control/index.tsx +1 -0
  864. package/src/text-control/stories/index.story.tsx +2 -1
  865. package/src/text-highlight/index.tsx +2 -0
  866. package/src/text-highlight/stories/index.story.tsx +1 -1
  867. package/src/textarea-control/index.tsx +1 -0
  868. package/src/textarea-control/stories/index.story.tsx +1 -1
  869. package/src/theme/stories/index.story.tsx +8 -4
  870. package/src/tip/stories/index.story.tsx +1 -1
  871. package/src/toggle-control/index.tsx +1 -0
  872. package/src/toggle-control/stories/index.story.tsx +1 -1
  873. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  874. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +1 -0
  875. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -0
  876. package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
  877. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -0
  878. package/src/toolbar/stories/index.story.tsx +1 -1
  879. package/src/toolbar/toolbar/index.tsx +1 -0
  880. package/src/toolbar/toolbar/toolbar-container.tsx +1 -0
  881. package/src/toolbar/toolbar-button/index.tsx +1 -0
  882. package/src/toolbar/toolbar-dropdown-menu/index.tsx +1 -0
  883. package/src/toolbar/toolbar-item/index.tsx +1 -0
  884. package/src/tools-panel/stories/index.story.tsx +1 -1
  885. package/src/tooltip/index.tsx +1 -0
  886. package/src/tooltip/stories/index.story.tsx +14 -4
  887. package/src/tree-grid/cell.tsx +1 -0
  888. package/src/tree-grid/index.tsx +1 -0
  889. package/src/tree-grid/item.tsx +1 -0
  890. package/src/tree-grid/roving-tab-index-item.tsx +1 -0
  891. package/src/tree-grid/row.tsx +1 -0
  892. package/src/tree-grid/stories/index.story.tsx +6 -2
  893. package/src/tree-select/index.tsx +2 -0
  894. package/src/tree-select/stories/index.story.tsx +2 -1
  895. package/src/truncate/stories/index.story.tsx +1 -1
  896. package/src/unit-control/index.tsx +1 -0
  897. package/src/unit-control/stories/index.story.tsx +3 -1
  898. package/src/utils/dropdown-motion.ts +1 -0
  899. package/src/v-stack/stories/e2e/index.story.tsx +1 -1
  900. package/src/v-stack/stories/index.story.tsx +1 -1
  901. package/src/validated-form-controls/components/checkbox-control.tsx +1 -0
  902. package/src/validated-form-controls/components/combobox-control.tsx +1 -0
  903. package/src/validated-form-controls/components/custom-select-control.tsx +1 -0
  904. package/src/validated-form-controls/components/form-token-field.tsx +1 -0
  905. package/src/validated-form-controls/components/input-control.tsx +1 -0
  906. package/src/validated-form-controls/components/number-control.tsx +1 -0
  907. package/src/validated-form-controls/components/radio-control.tsx +1 -0
  908. package/src/validated-form-controls/components/range-control.tsx +1 -0
  909. package/src/validated-form-controls/components/select-control.tsx +1 -0
  910. package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
  911. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
  912. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
  913. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
  914. package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
  915. package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
  916. package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
  917. package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
  918. package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
  919. package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
  920. package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
  921. package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
  922. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
  923. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
  924. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
  925. package/src/validated-form-controls/components/text-control.tsx +1 -0
  926. package/src/validated-form-controls/components/textarea-control.tsx +1 -0
  927. package/src/validated-form-controls/components/toggle-control.tsx +1 -0
  928. package/src/validated-form-controls/components/toggle-group-control.tsx +1 -0
  929. package/src/validated-form-controls/control-with-error.tsx +1 -0
  930. package/src/view/stories/index.story.tsx +1 -1
  931. package/src/visually-hidden/stories/index.story.tsx +1 -1
  932. package/src/z-stack/stories/index.story.tsx +1 -1
  933. package/build/slot-fill/bubbles-virtually/fill.cjs +0 -63
  934. package/build/slot-fill/bubbles-virtually/fill.cjs.map +0 -7
  935. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs +0 -59
  936. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs.map +0 -7
  937. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs +0 -105
  938. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs.map +0 -7
  939. package/build-module/slot-fill/bubbles-virtually/fill.mjs +0 -32
  940. package/build-module/slot-fill/bubbles-virtually/fill.mjs.map +0 -7
  941. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs +0 -28
  942. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs.map +0 -7
  943. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs +0 -74
  944. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs.map +0 -7
  945. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -3
  946. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +0 -1
  947. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -7
  948. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +0 -1
  949. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -3
  950. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +0 -1
  951. package/src/slot-fill/bubbles-virtually/fill.tsx +0 -50
  952. package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +0 -34
  953. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +0 -106
  954. package/src/slot-fill/fill.ts +0 -32
package/CHANGELOG.md CHANGED
@@ -2,11 +2,18 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 32.0.0-next.0 (2026-01-14)
5
+ ## 32.0.1-next.0 (2026-01-23)
6
+
7
+ ### Code Quality
8
+
9
+ - Add `displayName` to components to improve debugging and fix Storybook source code. [#74716](https://github.com/WordPress/gutenberg/pull/74716)
10
+
11
+ ## 32.0.0 (2026-01-16)
6
12
 
7
13
  ### Code Quality
8
14
 
9
15
  - Fix missing dependencies. [#74310](https://github.com/WordPress/gutenberg/pull/74310)
16
+ - Fix generated TS types referencing unavailable `csstype`. [#74655](https://github.com/WordPress/gutenberg/pull/74655)
10
17
 
11
18
  ### Breaking Changes
12
19
 
@@ -50,6 +57,7 @@
50
57
  - `DatePicker`: Fix missing scheduled events and current date indicators. ([#73887](https://github.com/WordPress/gutenberg/pull/73887))
51
58
  - `DatePicker`: Fix handling of `currentDate` when passed values as Date or timestamp. ([#73887](https://github.com/WordPress/gutenberg/pull/73887))
52
59
  - `Popover`: Fix bug where clicking outside nested popovers only closed the inner one. ([#74340](https://github.com/WordPress/gutenberg/pull/74340))
60
+ - `InputControl`: Allow label to wrap for long labels/translations. ([#74301](https://github.com/WordPress/gutenberg/pull/74301)).
53
61
 
54
62
  ### Internal
55
63
 
@@ -57,7 +65,8 @@
57
65
  - `AnglePickerControl`: Migrate styles from Emotion to a CSS module ([#73786](https://github.com/WordPress/gutenberg/pull/73786)).
58
66
  - `Menu`: Clean up popover wrappers ([#74207](https://github.com/WordPress/gutenberg/pull/74207)).
59
67
  - `Button`, `DateCalendar`, `DateRangeCalendar`, `CheckboxControl`, `Panel`, `Placeholder`: Remove outdated vendor prefix properties in CSS ([#74213](https://github.com/WordPress/gutenberg/pull/74213)).
60
- - Updated `fast-deep-equal` imports for compatibility with strict Node.js resolution ([#74530](https://github.com/WordPress/gutenberg/pull/74530)).
68
+ - Updated `fast-deep-equal` imports for compatibility with strict Node.js resolution ([#74530](https://github.com/WordPress/gutenberg/pull/74530)).
69
+ - `SlotFill`: unify context providers and `Fill` implementations ([#68056](https://github.com/WordPress/gutenberg/pull/68056)).
61
70
 
62
71
  ## 30.9.0 (2025-11-26)
63
72
 
package/CONTRIBUTING.md CHANGED
@@ -570,6 +570,12 @@ Please refer to the [JavaScript Testing Overview docs](https://developer.wordpre
570
570
 
571
571
  All new components should add stories to the project's [Storybook](https://storybook.js.org/). Each [story](https://storybook.js.org/docs/react/get-started/whats-a-story) captures the rendered state of a UI component in isolation. This greatly simplifies working on a given component, while also serving as an interactive form of documentation.
572
572
 
573
+ ### Source code display
574
+
575
+ Storybook displays source code snippets in the Docs tab. To ensure component names display correctly (instead of minified names like `<J>`), the build uses [terser](https://terser.org/) with `keep_fnames: true` (configured in `storybook/main.ts`).
576
+
577
+ For function declaration components, no additional configuration is needed — the function name is preserved automatically. For `forwardRef` components, ensure the unforwarded function is named (not an arrow function), and set `displayName` on the forwarded component.
578
+
573
579
  A component's story should be showcasing its different states — for example, the different variants of a `Button`:
574
580
 
575
581
  ```jsx
@@ -99,6 +99,7 @@ function UnforwardedAnglePickerControl(props, ref) {
99
99
  });
100
100
  }
101
101
  var AnglePickerControl = (0, import_element.forwardRef)(UnforwardedAnglePickerControl);
102
+ AnglePickerControl.displayName = "AnglePickerControl";
102
103
  var angle_picker_control_default = AnglePickerControl;
103
104
  // Annotate the CommonJS export names for ESM import in node:
104
105
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/angle-picker-control/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Flex, FlexBlock } from '../flex';\nimport { Spacer } from '../spacer';\nimport NumberControl from '../number-control';\nimport InputControlPrefixWrapper from '../input-control/input-prefix-wrapper';\nimport InputControlSuffixWrapper from '../input-control/input-suffix-wrapper';\nimport AngleCircle from './angle-circle';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedAnglePickerControl(props, ref) {\n const {\n className,\n label = __('Angle'),\n onChange,\n value,\n ...restProps\n } = props;\n const handleOnNumberChange = unprocessedValue => {\n if (onChange === undefined) {\n return;\n }\n const inputValue = unprocessedValue !== undefined && unprocessedValue !== '' ? parseInt(unprocessedValue, 10) : 0;\n onChange(inputValue);\n };\n const classes = clsx('components-angle-picker-control', className);\n\n // Override the default behavior and position the degree symbol to the\n // right of the number, regardless of the language direction.\n const prefixOrSuffixProp = isRTL() ? {\n prefix: /*#__PURE__*/_jsx(InputControlPrefixWrapper, {\n children: \"\\xB0\"\n })\n } : {\n suffix: /*#__PURE__*/_jsx(InputControlSuffixWrapper, {\n children: \"\\xB0\"\n })\n };\n return /*#__PURE__*/_jsxs(Flex, {\n ...restProps,\n ref: ref,\n className: classes,\n gap: 2,\n children: [/*#__PURE__*/_jsx(FlexBlock, {\n children: /*#__PURE__*/_jsx(NumberControl, {\n __next40pxDefaultSize: true,\n label: label,\n className: \"components-angle-picker-control__input-field\",\n max: 360,\n min: 0,\n onChange: handleOnNumberChange,\n step: \"1\",\n value: value,\n spinControls: \"none\",\n ...prefixOrSuffixProp\n })\n }), /*#__PURE__*/_jsx(Spacer, {\n marginBottom: \"1\",\n marginTop: \"auto\",\n children: /*#__PURE__*/_jsx(AngleCircle, {\n \"aria-hidden\": \"true\",\n value: value,\n onChange: onChange\n })\n })]\n });\n}\n\n/**\n * `AnglePickerControl` is a React component to render a UI that allows users to\n * pick an angle. Users can choose an angle in a visual UI with the mouse by\n * dragging an angle indicator inside a circle or by directly inserting the\n * desired angle in a text field.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { AnglePickerControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ angle, setAngle ] = useState( 0 );\n * return (\n * <AnglePickerControl\n * value={ angle }\n * onChange={ setAngle }\n * />\n * );\n * }\n * ```\n */\nexport const AnglePickerControl = forwardRef(UnforwardedAnglePickerControl);\nexport default AnglePickerControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,qBAA2B;AAC3B,kBAA0B;AAK1B,kBAAgC;AAChC,oBAAuB;AACvB,4BAA0B;AAC1B,kCAAsC;AACtC,kCAAsC;AACtC,0BAAwB;AACxB,yBAA2C;AAC3C,SAAS,8BAA8B,OAAO,KAAK;AACjD,QAAM;AAAA,IACJ;AAAA,IACA,YAAQ,gBAAG,OAAO;AAAA,IAClB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,uBAAuB,sBAAoB;AAC/C,QAAI,aAAa,QAAW;AAC1B;AAAA,IACF;AACA,UAAM,aAAa,qBAAqB,UAAa,qBAAqB,KAAK,SAAS,kBAAkB,EAAE,IAAI;AAChH,aAAS,UAAU;AAAA,EACrB;AACA,QAAM,cAAU,YAAAA,SAAK,mCAAmC,SAAS;AAIjE,QAAM,yBAAqB,mBAAM,IAAI;AAAA,IACnC,QAAqB,uCAAAC,KAAK,4BAAAC,SAA2B;AAAA,MACnD,UAAU;AAAA,IACZ,CAAC;AAAA,EACH,IAAI;AAAA,IACF,QAAqB,uCAAAD,KAAK,4BAAAE,SAA2B;AAAA,MACnD,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACA,SAAoB,uCAAAC,MAAM,kBAAM;AAAA,IAC9B,GAAG;AAAA,IACH;AAAA,IACA,WAAW;AAAA,IACX,KAAK;AAAA,IACL,UAAU,CAAc,uCAAAH,KAAK,uBAAW;AAAA,MACtC,UAAuB,uCAAAA,KAAK,sBAAAI,SAAe;AAAA,QACzC,uBAAuB;AAAA,QACvB;AAAA,QACA,WAAW;AAAA,QACX,KAAK;AAAA,QACL,KAAK;AAAA,QACL,UAAU;AAAA,QACV,MAAM;AAAA,QACN;AAAA,QACA,cAAc;AAAA,QACd,GAAG;AAAA,MACL,CAAC;AAAA,IACH,CAAC,GAAgB,uCAAAJ,KAAK,sBAAQ;AAAA,MAC5B,cAAc;AAAA,MACd,WAAW;AAAA,MACX,UAAuB,uCAAAA,KAAK,oBAAAK,SAAa;AAAA,QACvC,eAAe;AAAA,QACf;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAuBO,IAAM,yBAAqB,2BAAW,6BAA6B;AAC1E,IAAO,+BAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Flex, FlexBlock } from '../flex';\nimport { Spacer } from '../spacer';\nimport NumberControl from '../number-control';\nimport InputControlPrefixWrapper from '../input-control/input-prefix-wrapper';\nimport InputControlSuffixWrapper from '../input-control/input-suffix-wrapper';\nimport AngleCircle from './angle-circle';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedAnglePickerControl(props, ref) {\n const {\n className,\n label = __('Angle'),\n onChange,\n value,\n ...restProps\n } = props;\n const handleOnNumberChange = unprocessedValue => {\n if (onChange === undefined) {\n return;\n }\n const inputValue = unprocessedValue !== undefined && unprocessedValue !== '' ? parseInt(unprocessedValue, 10) : 0;\n onChange(inputValue);\n };\n const classes = clsx('components-angle-picker-control', className);\n\n // Override the default behavior and position the degree symbol to the\n // right of the number, regardless of the language direction.\n const prefixOrSuffixProp = isRTL() ? {\n prefix: /*#__PURE__*/_jsx(InputControlPrefixWrapper, {\n children: \"\\xB0\"\n })\n } : {\n suffix: /*#__PURE__*/_jsx(InputControlSuffixWrapper, {\n children: \"\\xB0\"\n })\n };\n return /*#__PURE__*/_jsxs(Flex, {\n ...restProps,\n ref: ref,\n className: classes,\n gap: 2,\n children: [/*#__PURE__*/_jsx(FlexBlock, {\n children: /*#__PURE__*/_jsx(NumberControl, {\n __next40pxDefaultSize: true,\n label: label,\n className: \"components-angle-picker-control__input-field\",\n max: 360,\n min: 0,\n onChange: handleOnNumberChange,\n step: \"1\",\n value: value,\n spinControls: \"none\",\n ...prefixOrSuffixProp\n })\n }), /*#__PURE__*/_jsx(Spacer, {\n marginBottom: \"1\",\n marginTop: \"auto\",\n children: /*#__PURE__*/_jsx(AngleCircle, {\n \"aria-hidden\": \"true\",\n value: value,\n onChange: onChange\n })\n })]\n });\n}\n\n/**\n * `AnglePickerControl` is a React component to render a UI that allows users to\n * pick an angle. Users can choose an angle in a visual UI with the mouse by\n * dragging an angle indicator inside a circle or by directly inserting the\n * desired angle in a text field.\n *\n * ```jsx\n * import { useState } from '@wordpress/element';\n * import { AnglePickerControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ angle, setAngle ] = useState( 0 );\n * return (\n * <AnglePickerControl\n * value={ angle }\n * onChange={ setAngle }\n * />\n * );\n * }\n * ```\n */\nexport const AnglePickerControl = forwardRef(UnforwardedAnglePickerControl);\nAnglePickerControl.displayName = 'AnglePickerControl';\nexport default AnglePickerControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,qBAA2B;AAC3B,kBAA0B;AAK1B,kBAAgC;AAChC,oBAAuB;AACvB,4BAA0B;AAC1B,kCAAsC;AACtC,kCAAsC;AACtC,0BAAwB;AACxB,yBAA2C;AAC3C,SAAS,8BAA8B,OAAO,KAAK;AACjD,QAAM;AAAA,IACJ;AAAA,IACA,YAAQ,gBAAG,OAAO;AAAA,IAClB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,uBAAuB,sBAAoB;AAC/C,QAAI,aAAa,QAAW;AAC1B;AAAA,IACF;AACA,UAAM,aAAa,qBAAqB,UAAa,qBAAqB,KAAK,SAAS,kBAAkB,EAAE,IAAI;AAChH,aAAS,UAAU;AAAA,EACrB;AACA,QAAM,cAAU,YAAAA,SAAK,mCAAmC,SAAS;AAIjE,QAAM,yBAAqB,mBAAM,IAAI;AAAA,IACnC,QAAqB,uCAAAC,KAAK,4BAAAC,SAA2B;AAAA,MACnD,UAAU;AAAA,IACZ,CAAC;AAAA,EACH,IAAI;AAAA,IACF,QAAqB,uCAAAD,KAAK,4BAAAE,SAA2B;AAAA,MACnD,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACA,SAAoB,uCAAAC,MAAM,kBAAM;AAAA,IAC9B,GAAG;AAAA,IACH;AAAA,IACA,WAAW;AAAA,IACX,KAAK;AAAA,IACL,UAAU,CAAc,uCAAAH,KAAK,uBAAW;AAAA,MACtC,UAAuB,uCAAAA,KAAK,sBAAAI,SAAe;AAAA,QACzC,uBAAuB;AAAA,QACvB;AAAA,QACA,WAAW;AAAA,QACX,KAAK;AAAA,QACL,KAAK;AAAA,QACL,UAAU;AAAA,QACV,MAAM;AAAA,QACN;AAAA,QACA,cAAc;AAAA,QACd,GAAG;AAAA,MACL,CAAC;AAAA,IACH,CAAC,GAAgB,uCAAAJ,KAAK,sBAAQ;AAAA,MAC5B,cAAc;AAAA,MACd,WAAW;AAAA,MACX,UAAuB,uCAAAA,KAAK,oBAAAK,SAAa;AAAA,QACvC,eAAe;AAAA,QACf;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAuBO,IAAM,yBAAqB,2BAAW,6BAA6B;AAC1E,mBAAmB,cAAc;AACjC,IAAO,+BAAQ;",
6
6
  "names": ["clsx", "_jsx", "InputControlPrefixWrapper", "InputControlSuffixWrapper", "_jsxs", "NumberControl", "AngleCircle"]
7
7
  }
@@ -158,13 +158,21 @@ function BoxControl({
158
158
  onClick: toggleLinked,
159
159
  isLinked
160
160
  })
161
- }), !isLinked && splitOnAxis && ["vertical", "horizontal"].map((axis) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_control.default, {
162
- side: axis,
163
- ...inputControlProps
164
- }, axis)), !isLinked && !splitOnAxis && Array.from(sidesToRender).map((axis) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_control.default, {
165
- side: axis,
166
- ...inputControlProps
167
- }, axis)), allowReset && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_box_control_styles.ResetButton, {
161
+ }), !isLinked && splitOnAxis && ["vertical", "horizontal"].map((axis) => (
162
+ // Disable reason: the parent component is handling the __next40pxDefaultSize prop
163
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
164
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_control.default, {
165
+ side: axis,
166
+ ...inputControlProps
167
+ }, axis)
168
+ )), !isLinked && !splitOnAxis && Array.from(sidesToRender).map((axis) => (
169
+ // Disable reason: the parent component is handling the __next40pxDefaultSize prop
170
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_control.default, {
172
+ side: axis,
173
+ ...inputControlProps
174
+ }, axis)
175
+ )), allowReset && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_box_control_styles.ResetButton, {
168
176
  className: "component-box-control__reset-button",
169
177
  variant: "secondary",
170
178
  size: "small",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/box-control/index.tsx"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { BaseControl } from '../base-control';\nimport InputControl from './input-control';\nimport LinkedButton from './linked-button';\nimport { Grid } from '../grid';\nimport { InputWrapper, ResetButton, LinkedButtonWrapper } from './styles/box-control-styles';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport { DEFAULT_VALUES, getInitialSide, isValueMixed, isValuesDefined, getAllowedSides } from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst defaultInputProps = {\n min: 0\n};\nconst noop = () => {};\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(BoxControl, 'inspector-box-control');\n return idProp || instanceId;\n}\n\n/**\n * A control that lets users set values for top, right, bottom, and left. Can be\n * used as an input control for values like `padding` or `margin`.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { BoxControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ values, setValues ] = useState( {\n * top: '50px',\n * left: '10%',\n * right: '10%',\n * bottom: '50px',\n * } );\n *\n * return (\n * <BoxControl\n * __next40pxDefaultSize\n * values={ values }\n * onChange={ setValues }\n * />\n * );\n * };\n * ```\n */\nfunction BoxControl({\n __next40pxDefaultSize = false,\n id: idProp,\n inputProps = defaultInputProps,\n onChange = noop,\n label = __('Box Control'),\n values: valuesProp,\n units,\n sides,\n splitOnAxis = false,\n allowReset = true,\n resetValues = DEFAULT_VALUES,\n presets,\n presetKey,\n onMouseOver,\n onMouseOut\n}) {\n const [values, setValues] = useControlledState(valuesProp, {\n fallback: DEFAULT_VALUES\n });\n const inputValues = values || DEFAULT_VALUES;\n const hasInitialValue = isValuesDefined(valuesProp);\n const hasOneSide = sides?.length === 1;\n const [isDirty, setIsDirty] = useState(hasInitialValue);\n const [isLinked, setIsLinked] = useState(!hasInitialValue || !isValueMixed(inputValues) || hasOneSide);\n const [side, setSide] = useState(getInitialSide(isLinked, splitOnAxis));\n\n // Tracking selected units via internal state allows filtering of CSS unit\n // only values from being saved while maintaining preexisting unit selection\n // behaviour. Filtering CSS only values prevents invalid style values.\n const [selectedUnits, setSelectedUnits] = useState({\n top: parseQuantityAndUnitFromRawValue(valuesProp?.top)[1],\n right: parseQuantityAndUnitFromRawValue(valuesProp?.right)[1],\n bottom: parseQuantityAndUnitFromRawValue(valuesProp?.bottom)[1],\n left: parseQuantityAndUnitFromRawValue(valuesProp?.left)[1]\n });\n const id = useUniqueId(idProp);\n const headingId = `${id}-heading`;\n const toggleLinked = () => {\n setIsLinked(!isLinked);\n setSide(getInitialSide(!isLinked, splitOnAxis));\n };\n const handleOnFocus = (_event, {\n side: nextSide\n }) => {\n setSide(nextSide);\n };\n const handleOnChange = nextValues => {\n onChange(nextValues);\n setValues(nextValues);\n setIsDirty(true);\n };\n const handleOnReset = () => {\n onChange(resetValues);\n setValues(resetValues);\n setSelectedUnits(resetValues);\n setIsDirty(false);\n };\n const inputControlProps = {\n onMouseOver,\n onMouseOut,\n ...inputProps,\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n isLinked,\n units,\n selectedUnits,\n setSelectedUnits,\n sides,\n values: inputValues,\n __next40pxDefaultSize,\n presets,\n presetKey\n };\n maybeWarnDeprecated36pxSize({\n componentName: 'BoxControl',\n __next40pxDefaultSize,\n size: undefined\n });\n const sidesToRender = getAllowedSides(sides);\n if (presets && !presetKey || !presets && presetKey) {\n const definedProp = presets ? 'presets' : 'presetKey';\n const missingProp = presets ? 'presetKey' : 'presets';\n globalThis.SCRIPT_DEBUG === true ? warning(`wp.components.BoxControl: the '${missingProp}' prop is required when the '${definedProp}' prop is defined.`) : void 0;\n }\n return /*#__PURE__*/_jsxs(Grid, {\n id: id,\n columns: 3,\n templateColumns: \"1fr min-content min-content\",\n role: \"group\",\n \"aria-labelledby\": headingId,\n children: [/*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n id: headingId,\n children: label\n }), isLinked && /*#__PURE__*/_jsx(InputWrapper, {\n children: /*#__PURE__*/_jsx(InputControl, {\n side: \"all\",\n ...inputControlProps\n })\n }), !hasOneSide && /*#__PURE__*/_jsx(LinkedButtonWrapper, {\n children: /*#__PURE__*/_jsx(LinkedButton, {\n onClick: toggleLinked,\n isLinked: isLinked\n })\n }), !isLinked && splitOnAxis && ['vertical', 'horizontal'].map(axis => /*#__PURE__*/_jsx(InputControl, {\n side: axis,\n ...inputControlProps\n }, axis)), !isLinked && !splitOnAxis && Array.from(sidesToRender).map(axis => /*#__PURE__*/_jsx(InputControl, {\n side: axis,\n ...inputControlProps\n }, axis)), allowReset && /*#__PURE__*/_jsx(ResetButton, {\n className: \"component-box-control__reset-button\",\n variant: \"secondary\",\n size: \"small\",\n onClick: handleOnReset,\n disabled: !isDirty,\n children: __('Reset')\n })]\n });\n}\nexport { applyValueToSides } from './utils';\nexport default BoxControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA8B;AAC9B,qBAAyB;AACzB,kBAAmB;AACnB,qBAAoB;AAKpB,0BAA4B;AAC5B,2BAAyB;AACzB,2BAAyB;AACzB,kBAAqB;AACr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K,wCAAc;AAAA,MAC9C,UAAuB,uCAAAA,KAAK,qBAAAC,SAAc;AAAA,QACxC,MAAM;AAAA,QACN,GAAG;AAAA,MACL,CAAC;AAAA,IACH,CAAC,GAAG,CAAC,cAA2B,uCAAAD,KAAK,+CAAqB;AAAA,MACxD,UAAuB,uCAAAA,KAAK,qBAAAE,SAAc;AAAA,QACxC,SAAS;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH,CAAC,GAAG,CAAC,YAAY,eAAe,CAAC,YAAY,YAAY,EAAE,IAAI,UAAqB,uCAAAF,KAAK,qBAAAC,SAAc;AAAA,MACrG,MAAM;AAAA,MACN,GAAG;AAAA,IACL,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,eAAe,MAAM,KAAK,aAAa,EAAE,IAAI,UAAqB,uCAAAD,KAAK,qBAAAC,SAAc;AAAA,MAC5G,MAAM;AAAA,MACN,GAAG;AAAA,IACL,GAAG,IAAI,CAAC,GAAG,cAA2B,uCAAAD,KAAK,uCAAa;AAAA,MACtD,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,MACX,cAAU,gBAAG,OAAO;AAAA,IACtB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { BaseControl } from '../base-control';\nimport InputControl from './input-control';\nimport LinkedButton from './linked-button';\nimport { Grid } from '../grid';\nimport { InputWrapper, ResetButton, LinkedButtonWrapper } from './styles/box-control-styles';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport { DEFAULT_VALUES, getInitialSide, isValueMixed, isValuesDefined, getAllowedSides } from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst defaultInputProps = {\n min: 0\n};\nconst noop = () => {};\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(BoxControl, 'inspector-box-control');\n return idProp || instanceId;\n}\n\n/**\n * A control that lets users set values for top, right, bottom, and left. Can be\n * used as an input control for values like `padding` or `margin`.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { BoxControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ values, setValues ] = useState( {\n * top: '50px',\n * left: '10%',\n * right: '10%',\n * bottom: '50px',\n * } );\n *\n * return (\n * <BoxControl\n * __next40pxDefaultSize\n * values={ values }\n * onChange={ setValues }\n * />\n * );\n * };\n * ```\n */\nfunction BoxControl({\n __next40pxDefaultSize = false,\n id: idProp,\n inputProps = defaultInputProps,\n onChange = noop,\n label = __('Box Control'),\n values: valuesProp,\n units,\n sides,\n splitOnAxis = false,\n allowReset = true,\n resetValues = DEFAULT_VALUES,\n presets,\n presetKey,\n onMouseOver,\n onMouseOut\n}) {\n const [values, setValues] = useControlledState(valuesProp, {\n fallback: DEFAULT_VALUES\n });\n const inputValues = values || DEFAULT_VALUES;\n const hasInitialValue = isValuesDefined(valuesProp);\n const hasOneSide = sides?.length === 1;\n const [isDirty, setIsDirty] = useState(hasInitialValue);\n const [isLinked, setIsLinked] = useState(!hasInitialValue || !isValueMixed(inputValues) || hasOneSide);\n const [side, setSide] = useState(getInitialSide(isLinked, splitOnAxis));\n\n // Tracking selected units via internal state allows filtering of CSS unit\n // only values from being saved while maintaining preexisting unit selection\n // behaviour. Filtering CSS only values prevents invalid style values.\n const [selectedUnits, setSelectedUnits] = useState({\n top: parseQuantityAndUnitFromRawValue(valuesProp?.top)[1],\n right: parseQuantityAndUnitFromRawValue(valuesProp?.right)[1],\n bottom: parseQuantityAndUnitFromRawValue(valuesProp?.bottom)[1],\n left: parseQuantityAndUnitFromRawValue(valuesProp?.left)[1]\n });\n const id = useUniqueId(idProp);\n const headingId = `${id}-heading`;\n const toggleLinked = () => {\n setIsLinked(!isLinked);\n setSide(getInitialSide(!isLinked, splitOnAxis));\n };\n const handleOnFocus = (_event, {\n side: nextSide\n }) => {\n setSide(nextSide);\n };\n const handleOnChange = nextValues => {\n onChange(nextValues);\n setValues(nextValues);\n setIsDirty(true);\n };\n const handleOnReset = () => {\n onChange(resetValues);\n setValues(resetValues);\n setSelectedUnits(resetValues);\n setIsDirty(false);\n };\n const inputControlProps = {\n onMouseOver,\n onMouseOut,\n ...inputProps,\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n isLinked,\n units,\n selectedUnits,\n setSelectedUnits,\n sides,\n values: inputValues,\n __next40pxDefaultSize,\n presets,\n presetKey\n };\n maybeWarnDeprecated36pxSize({\n componentName: 'BoxControl',\n __next40pxDefaultSize,\n size: undefined\n });\n const sidesToRender = getAllowedSides(sides);\n if (presets && !presetKey || !presets && presetKey) {\n const definedProp = presets ? 'presets' : 'presetKey';\n const missingProp = presets ? 'presetKey' : 'presets';\n globalThis.SCRIPT_DEBUG === true ? warning(`wp.components.BoxControl: the '${missingProp}' prop is required when the '${definedProp}' prop is defined.`) : void 0;\n }\n return /*#__PURE__*/_jsxs(Grid, {\n id: id,\n columns: 3,\n templateColumns: \"1fr min-content min-content\",\n role: \"group\",\n \"aria-labelledby\": headingId,\n children: [/*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n id: headingId,\n children: label\n }), isLinked && /*#__PURE__*/_jsx(InputWrapper, {\n children: /*#__PURE__*/_jsx(InputControl, {\n side: \"all\",\n ...inputControlProps\n })\n }), !hasOneSide && /*#__PURE__*/_jsx(LinkedButtonWrapper, {\n children: /*#__PURE__*/_jsx(LinkedButton, {\n onClick: toggleLinked,\n isLinked: isLinked\n })\n }), !isLinked && splitOnAxis && ['vertical', 'horizontal'].map(axis =>\n /*#__PURE__*/\n // Disable reason: the parent component is handling the __next40pxDefaultSize prop\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(InputControl, {\n side: axis,\n ...inputControlProps\n }, axis)), !isLinked && !splitOnAxis && Array.from(sidesToRender).map(axis =>\n /*#__PURE__*/\n // Disable reason: the parent component is handling the __next40pxDefaultSize prop\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(InputControl, {\n side: axis,\n ...inputControlProps\n }, axis)), allowReset && /*#__PURE__*/_jsx(ResetButton, {\n className: \"component-box-control__reset-button\",\n variant: \"secondary\",\n size: \"small\",\n onClick: handleOnReset,\n disabled: !isDirty,\n children: __('Reset')\n })]\n });\n}\nexport { applyValueToSides } from './utils';\nexport default BoxControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA8B;AAC9B,qBAAyB;AACzB,kBAAmB;AACnB,qBAAoB;AAKpB,0BAA4B;AAC5B,2BAAyB;AACzB,2BAAyB;AACzB,kBAAqB;AACrB,gCAA+D;AAC/D,mBAAiD;AACjD,IAAAA,gBAA+F;AAC/F,mBAAmC;AACnC,kCAA4C;AAC5C,yBAA2C;AAoK3C,IAAAA,gBAAkC;AAnKlC,IAAM,oBAAoB;AAAA,EACxB,KAAK;AACP;AACA,IAAM,OAAO,MAAM;AAAC;AACpB,SAAS,YAAY,QAAQ;AAC3B,QAAM,iBAAa,8BAAc,YAAY,uBAAuB;AACpE,SAAO,UAAU;AACnB;AA4BA,SAAS,WAAW;AAAA,EAClB,wBAAwB;AAAA,EACxB,IAAI;AAAA,EACJ,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAQ,gBAAG,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,CAAC,QAAQ,SAAS,QAAI,iCAAmB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ACN,GAAG;AAAA,MACL,GAAG,IAAI;AAAA,KAAC,GAAG,cAA2B,uCAAAD,KAAK,uCAAa;AAAA,MACtD,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,MACX,cAAU,gBAAG,OAAO;AAAA,IACtB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAEA,IAAO,sBAAQ;",
6
6
  "names": ["import_utils", "warning", "_jsxs", "_jsx", "InputControl", "LinkedButton"]
7
7
  }
@@ -49,14 +49,18 @@ function UnforwardedIconButton({
49
49
  alternative: "wp.components.Button",
50
50
  version: "6.2"
51
51
  });
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {
53
- ...props,
54
- ref,
55
- tooltipPosition: labelPosition,
56
- iconSize: size,
57
- showTooltip: tooltip !== void 0 ? !!tooltip : void 0,
58
- label: tooltip || label
59
- });
52
+ return (
53
+ // Disable reason: the parent component is taking care of the __next40pxDefaultSize prop.
54
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {
56
+ ...props,
57
+ ref,
58
+ tooltipPosition: labelPosition,
59
+ iconSize: size,
60
+ showTooltip: tooltip !== void 0 ? !!tooltip : void 0,
61
+ label: tooltip || label
62
+ })
63
+ );
60
64
  }
61
65
  var deprecated_default = (0, import_element.forwardRef)(UnforwardedIconButton);
62
66
  //# sourceMappingURL=deprecated.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/button/deprecated.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '.';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedIconButton({\n label,\n labelPosition,\n size,\n tooltip,\n ...props\n}, ref) {\n deprecated('wp.components.IconButton', {\n since: '5.4',\n alternative: 'wp.components.Button',\n version: '6.2'\n });\n return /*#__PURE__*/_jsx(Button, {\n ...props,\n ref: ref,\n tooltipPosition: labelPosition,\n iconSize: size,\n showTooltip: tooltip !== undefined ? !!tooltip : undefined,\n label: tooltip || label\n });\n}\nexport default forwardRef(UnforwardedIconButton);"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,wBAAuB;AACvB,qBAA2B;AAK3B,eAAmB;AACnB,yBAA4B;AAC5B,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,wBAAAA,SAAW,4BAA4B;AAAA,IACrC,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,EACX,CAAC;AACD,SAAoB,uCAAAC,KAAK,SAAAC,SAAQ;AAAA,IAC/B,GAAG;AAAA,IACH;AAAA,IACA,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,aAAa,YAAY,SAAY,CAAC,CAAC,UAAU;AAAA,IACjD,OAAO,WAAW;AAAA,EACpB,CAAC;AACH;AACA,IAAO,yBAAQ,2BAAW,qBAAqB;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '.';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedIconButton({\n label,\n labelPosition,\n size,\n tooltip,\n ...props\n}, ref) {\n deprecated('wp.components.IconButton', {\n since: '5.4',\n alternative: 'wp.components.Button',\n version: '6.2'\n });\n return (\n /*#__PURE__*/\n // Disable reason: the parent component is taking care of the __next40pxDefaultSize prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n ...props,\n ref: ref,\n tooltipPosition: labelPosition,\n iconSize: size,\n showTooltip: tooltip !== undefined ? !!tooltip : undefined,\n label: tooltip || label\n })\n );\n}\nexport default forwardRef(UnforwardedIconButton);"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,wBAAuB;AACvB,qBAA2B;AAK3B,eAAmB;AACnB,yBAA4B;AAC5B,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,wBAAAA,SAAW,4BAA4B;AAAA,IACrC,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,EACX,CAAC;AACD;AAAA;AAAA;AAAA,IAIE,uCAAAC,KAAK,SAAAC,SAAQ;AAAA,MACX,GAAG;AAAA,MACH;AAAA,MACA,iBAAiB;AAAA,MACjB,UAAU;AAAA,MACV,aAAa,YAAY,SAAY,CAAC,CAAC,UAAU;AAAA,MACjD,OAAO,WAAW;AAAA,IACpB,CAAC;AAAA;AAEL;AACA,IAAO,yBAAQ,2BAAW,qBAAqB;",
6
6
  "names": ["deprecated", "_jsx", "Button"]
7
7
  }
@@ -239,6 +239,7 @@ function UnforwardedButton(props, ref) {
239
239
  });
240
240
  }
241
241
  var Button = (0, import_element.forwardRef)(UnforwardedButton);
242
+ Button.displayName = "Button";
242
243
  var button_default = Button;
243
244
  // Annotate the CommonJS export names for ESM import in node:
244
245
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/button/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { positionToPlacement } from '../popover/utils';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst disabledEventsOnDisabledButton = ['onMouseDown', 'onClick'];\nfunction useDeprecatedProps({\n __experimentalIsFocusable,\n isDefault,\n isPrimary,\n isSecondary,\n isTertiary,\n isLink,\n isPressed,\n isSmall,\n size,\n variant,\n describedBy,\n ...otherProps\n}) {\n let computedSize = size;\n let computedVariant = variant;\n const newProps = {\n accessibleWhenDisabled: __experimentalIsFocusable,\n // @todo Mark `isPressed` as deprecated\n 'aria-pressed': isPressed,\n description: describedBy\n };\n if (isSmall) {\n var _computedSize;\n (_computedSize = computedSize) !== null && _computedSize !== void 0 ? _computedSize : computedSize = 'small';\n }\n if (isPrimary) {\n var _computedVariant;\n (_computedVariant = computedVariant) !== null && _computedVariant !== void 0 ? _computedVariant : computedVariant = 'primary';\n }\n if (isTertiary) {\n var _computedVariant2;\n (_computedVariant2 = computedVariant) !== null && _computedVariant2 !== void 0 ? _computedVariant2 : computedVariant = 'tertiary';\n }\n if (isSecondary) {\n var _computedVariant3;\n (_computedVariant3 = computedVariant) !== null && _computedVariant3 !== void 0 ? _computedVariant3 : computedVariant = 'secondary';\n }\n if (isDefault) {\n var _computedVariant4;\n deprecated('wp.components.Button `isDefault` prop', {\n since: '5.4',\n alternative: 'variant=\"secondary\"'\n });\n (_computedVariant4 = computedVariant) !== null && _computedVariant4 !== void 0 ? _computedVariant4 : computedVariant = 'secondary';\n }\n if (isLink) {\n var _computedVariant5;\n (_computedVariant5 = computedVariant) !== null && _computedVariant5 !== void 0 ? _computedVariant5 : computedVariant = 'link';\n }\n return {\n ...newProps,\n ...otherProps,\n size: computedSize,\n variant: computedVariant\n };\n}\nexport function UnforwardedButton(props, ref) {\n const {\n __next40pxDefaultSize,\n accessibleWhenDisabled,\n isBusy,\n isDestructive,\n className,\n disabled,\n icon,\n iconPosition = 'left',\n iconSize,\n showTooltip,\n tooltipPosition,\n shortcut,\n label,\n children,\n size = 'default',\n text,\n variant,\n description,\n ...buttonOrAnchorProps\n } = useDeprecatedProps(props);\n const {\n href,\n target,\n 'aria-checked': ariaChecked,\n 'aria-pressed': ariaPressed,\n 'aria-selected': ariaSelected,\n ...additionalProps\n } = 'href' in buttonOrAnchorProps ? buttonOrAnchorProps : {\n href: undefined,\n target: undefined,\n ...buttonOrAnchorProps\n };\n const instanceId = useInstanceId(Button, 'components-button__description');\n const hasChildren = 'string' === typeof children && !!children || Array.isArray(children) && children?.[0] && children[0] !== null &&\n // Tooltip should not considered as a child\n children?.[0]?.props?.className !== 'components-tooltip';\n const truthyAriaPressedValues = [true, 'true', 'mixed'];\n const classes = clsx('components-button', className, {\n 'is-next-40px-default-size': __next40pxDefaultSize,\n 'is-secondary': variant === 'secondary',\n 'is-primary': variant === 'primary',\n 'is-small': size === 'small',\n 'is-compact': size === 'compact',\n 'is-tertiary': variant === 'tertiary',\n 'is-pressed': truthyAriaPressedValues.includes(ariaPressed),\n 'is-pressed-mixed': ariaPressed === 'mixed',\n 'is-busy': isBusy,\n 'is-link': variant === 'link',\n 'is-destructive': isDestructive,\n 'has-text': !!icon && (hasChildren || text),\n 'has-icon': !!icon,\n 'has-icon-right': iconPosition === 'right'\n });\n const trulyDisabled = disabled && !accessibleWhenDisabled;\n const Tag = href !== undefined && !disabled ? 'a' : 'button';\n const buttonProps = Tag === 'button' ? {\n type: 'button',\n disabled: trulyDisabled,\n 'aria-checked': ariaChecked,\n 'aria-pressed': ariaPressed,\n 'aria-selected': ariaSelected\n } : {};\n const anchorProps = Tag === 'a' ? {\n href,\n target\n } : {};\n const disableEventProps = {};\n if (disabled && accessibleWhenDisabled) {\n // In this case, the button will be disabled, but still focusable and\n // perceivable by screen reader users.\n buttonProps['aria-disabled'] = true;\n anchorProps['aria-disabled'] = true;\n for (const disabledEvent of disabledEventsOnDisabledButton) {\n disableEventProps[disabledEvent] = event => {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n }\n };\n }\n }\n\n // Should show the tooltip if...\n const shouldShowTooltip = !trulyDisabled && (\n // An explicit tooltip is passed or...\n showTooltip && !!label ||\n // There's a shortcut or...\n !!shortcut ||\n // There's a label and...\n !!label &&\n // The children are empty and...\n !children?.length &&\n // The tooltip is not explicitly disabled.\n false !== showTooltip);\n const descriptionId = description ? instanceId : undefined;\n const describedById = additionalProps['aria-describedby'] || descriptionId;\n const commonProps = {\n className: classes,\n 'aria-label': additionalProps['aria-label'] || label,\n 'aria-describedby': describedById,\n ref\n };\n const elementChildren = /*#__PURE__*/_jsxs(_Fragment, {\n children: [icon && iconPosition === 'left' && /*#__PURE__*/_jsx(Icon, {\n icon: icon,\n size: iconSize\n }), text && /*#__PURE__*/_jsx(_Fragment, {\n children: text\n }), children, icon && iconPosition === 'right' && /*#__PURE__*/_jsx(Icon, {\n icon: icon,\n size: iconSize\n })]\n });\n const element = Tag === 'a' ? /*#__PURE__*/_jsx(\"a\", {\n ...anchorProps,\n ...additionalProps,\n ...disableEventProps,\n ...commonProps,\n children: elementChildren\n }) : /*#__PURE__*/_jsx(\"button\", {\n ...buttonProps,\n ...additionalProps,\n ...disableEventProps,\n ...commonProps,\n children: elementChildren\n });\n\n // In order to avoid some React reconciliation issues, we are always rendering\n // the `Tooltip` component even when `shouldShowTooltip` is `false`.\n // In order to make sure that the tooltip doesn't show when it shouldn't,\n // we don't pass the props to the `Tooltip` component.\n const tooltipProps = shouldShowTooltip ? {\n text: children?.length && description ? description : label,\n shortcut,\n placement: tooltipPosition &&\n // Convert legacy `position` values to be used with the new `placement` prop\n positionToPlacement(tooltipPosition)\n } : {};\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Tooltip, {\n ...tooltipProps,\n children: element\n }), description && /*#__PURE__*/_jsx(VisuallyHidden, {\n children: /*#__PURE__*/_jsx(\"span\", {\n id: descriptionId,\n children: description\n })\n })]\n });\n}\n\n/**\n * Lets users take actions and make choices with a single click or tap.\n *\n * ```jsx\n * import { Button } from '@wordpress/components';\n * const Mybutton = () => (\n * <Button\n * variant=\"primary\"\n * onClick={ handleClick }\n * >\n * Click here\n * </Button>\n * );\n * ```\n */\nexport const Button = forwardRef(UnforwardedButton);\nexport default Button;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,wBAAuB;AACvB,qBAA2B;AAC3B,qBAA8B;AAK9B,qBAAoB;AACpB,kBAAiB;AACjB,6BAA+B;AAC/B,mBAAoC;AACpC,yBAAkE;AAClE,IAAM,iCAAiC,CAAC,eAAe,SAAS;AAChE,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,MAAI,eAAe;AACnB,MAAI,kBAAkB;AACtB,QAAM,WAAW;AAAA,IACf,wBAAwB;AAAA;AAAA,IAExB,gBAAgB;AAAA,IAChB,aAAa;AAAA,EACf;AACA,MAAI,SAAS;AACX,QAAI;AACJ,KAAC,gBAAgB,kBAAkB,QAAQ,kBAAkB,SAAS,gBAAgB,eAAe;AAAA,EACvG;AACA,MAAI,WAAW;AACb,QAAI;AACJ,KAAC,mBAAmB,qBAAqB,QAAQ,qBAAqB,SAAS,mBAAmB,kBAAkB;AAAA,EACtH;AACA,MAAI,YAAY;AACd,QAAI;AACJ,KAAC,oBAAoB,qBAAqB,QAAQ,sBAAsB,SAAS,oBAAoB,kBAAkB;AAAA,EACzH;AACA,MAAI,aAAa;AACf,QAAI;AACJ,KAAC,oBAAoB,qBAAqB,QAAQ,sBAAsB,SAAS,oBAAoB,kBAAkB;AAAA,EACzH;AACA,MAAI,WAAW;AACb,QAAI;AACJ,0BAAAA,SAAW,yCAAyC;AAAA,MAClD,OAAO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WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Tooltip from '../tooltip';\nimport Icon from '../icon';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { positionToPlacement } from '../popover/utils';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst disabledEventsOnDisabledButton = ['onMouseDown', 'onClick'];\nfunction useDeprecatedProps({\n __experimentalIsFocusable,\n isDefault,\n isPrimary,\n isSecondary,\n isTertiary,\n isLink,\n isPressed,\n isSmall,\n size,\n variant,\n describedBy,\n ...otherProps\n}) {\n let computedSize = size;\n let computedVariant = variant;\n const newProps = {\n accessibleWhenDisabled: __experimentalIsFocusable,\n // @todo Mark `isPressed` as deprecated\n 'aria-pressed': isPressed,\n description: describedBy\n };\n if (isSmall) {\n var _computedSize;\n (_computedSize = computedSize) !== null && _computedSize !== void 0 ? _computedSize : computedSize = 'small';\n }\n if (isPrimary) {\n var _computedVariant;\n (_computedVariant = computedVariant) !== null && _computedVariant !== void 0 ? _computedVariant : computedVariant = 'primary';\n }\n if (isTertiary) {\n var _computedVariant2;\n (_computedVariant2 = computedVariant) !== null && _computedVariant2 !== void 0 ? _computedVariant2 : computedVariant = 'tertiary';\n }\n if (isSecondary) {\n var _computedVariant3;\n (_computedVariant3 = computedVariant) !== null && _computedVariant3 !== void 0 ? _computedVariant3 : computedVariant = 'secondary';\n }\n if (isDefault) {\n var _computedVariant4;\n deprecated('wp.components.Button `isDefault` prop', {\n since: '5.4',\n alternative: 'variant=\"secondary\"'\n });\n (_computedVariant4 = computedVariant) !== null && _computedVariant4 !== void 0 ? _computedVariant4 : computedVariant = 'secondary';\n }\n if (isLink) {\n var _computedVariant5;\n (_computedVariant5 = computedVariant) !== null && _computedVariant5 !== void 0 ? _computedVariant5 : computedVariant = 'link';\n }\n return {\n ...newProps,\n ...otherProps,\n size: computedSize,\n variant: computedVariant\n };\n}\n\n/**\n * Lets users take actions and make choices with a single click or tap.\n *\n * ```jsx\n * import { Button } from '@wordpress/components';\n * const Mybutton = () => (\n * <Button\n * variant=\"primary\"\n * onClick={ handleClick }\n * >\n * Click here\n * </Button>\n * );\n * ```\n */\nexport function UnforwardedButton(props, ref) {\n const {\n __next40pxDefaultSize,\n accessibleWhenDisabled,\n isBusy,\n isDestructive,\n className,\n disabled,\n icon,\n iconPosition = 'left',\n iconSize,\n showTooltip,\n tooltipPosition,\n shortcut,\n label,\n children,\n size = 'default',\n text,\n variant,\n description,\n ...buttonOrAnchorProps\n } = useDeprecatedProps(props);\n const {\n href,\n target,\n 'aria-checked': ariaChecked,\n 'aria-pressed': ariaPressed,\n 'aria-selected': ariaSelected,\n ...additionalProps\n } = 'href' in buttonOrAnchorProps ? buttonOrAnchorProps : {\n href: undefined,\n target: undefined,\n ...buttonOrAnchorProps\n };\n const instanceId = useInstanceId(Button, 'components-button__description');\n const hasChildren = 'string' === typeof children && !!children || Array.isArray(children) && children?.[0] && children[0] !== null &&\n // Tooltip should not considered as a child\n children?.[0]?.props?.className !== 'components-tooltip';\n const truthyAriaPressedValues = [true, 'true', 'mixed'];\n const classes = clsx('components-button', className, {\n 'is-next-40px-default-size': __next40pxDefaultSize,\n 'is-secondary': variant === 'secondary',\n 'is-primary': variant === 'primary',\n 'is-small': size === 'small',\n 'is-compact': size === 'compact',\n 'is-tertiary': variant === 'tertiary',\n 'is-pressed': truthyAriaPressedValues.includes(ariaPressed),\n 'is-pressed-mixed': ariaPressed === 'mixed',\n 'is-busy': isBusy,\n 'is-link': variant === 'link',\n 'is-destructive': isDestructive,\n 'has-text': !!icon && (hasChildren || text),\n 'has-icon': !!icon,\n 'has-icon-right': iconPosition === 'right'\n });\n const trulyDisabled = disabled && !accessibleWhenDisabled;\n const Tag = href !== undefined && !disabled ? 'a' : 'button';\n const buttonProps = Tag === 'button' ? {\n type: 'button',\n disabled: trulyDisabled,\n 'aria-checked': ariaChecked,\n 'aria-pressed': ariaPressed,\n 'aria-selected': ariaSelected\n } : {};\n const anchorProps = Tag === 'a' ? {\n href,\n target\n } : {};\n const disableEventProps = {};\n if (disabled && accessibleWhenDisabled) {\n // In this case, the button will be disabled, but still focusable and\n // perceivable by screen reader users.\n buttonProps['aria-disabled'] = true;\n anchorProps['aria-disabled'] = true;\n for (const disabledEvent of disabledEventsOnDisabledButton) {\n disableEventProps[disabledEvent] = event => {\n if (event) {\n event.stopPropagation();\n event.preventDefault();\n }\n };\n }\n }\n\n // Should show the tooltip if...\n const shouldShowTooltip = !trulyDisabled && (\n // An explicit tooltip is passed or...\n showTooltip && !!label ||\n // There's a shortcut or...\n !!shortcut ||\n // There's a label and...\n !!label &&\n // The children are empty and...\n !children?.length &&\n // The tooltip is not explicitly disabled.\n false !== showTooltip);\n const descriptionId = description ? instanceId : undefined;\n const describedById = additionalProps['aria-describedby'] || descriptionId;\n const commonProps = {\n className: classes,\n 'aria-label': additionalProps['aria-label'] || label,\n 'aria-describedby': describedById,\n ref\n };\n const elementChildren = /*#__PURE__*/_jsxs(_Fragment, {\n children: [icon && iconPosition === 'left' && /*#__PURE__*/_jsx(Icon, {\n icon: icon,\n size: iconSize\n }), text && /*#__PURE__*/_jsx(_Fragment, {\n children: text\n }), children, icon && iconPosition === 'right' && /*#__PURE__*/_jsx(Icon, {\n icon: icon,\n size: iconSize\n })]\n });\n const element = Tag === 'a' ? /*#__PURE__*/_jsx(\"a\", {\n ...anchorProps,\n ...additionalProps,\n ...disableEventProps,\n ...commonProps,\n children: elementChildren\n }) : /*#__PURE__*/_jsx(\"button\", {\n ...buttonProps,\n ...additionalProps,\n ...disableEventProps,\n ...commonProps,\n children: elementChildren\n });\n\n // In order to avoid some React reconciliation issues, we are always rendering\n // the `Tooltip` component even when `shouldShowTooltip` is `false`.\n // In order to make sure that the tooltip doesn't show when it shouldn't,\n // we don't pass the props to the `Tooltip` component.\n const tooltipProps = shouldShowTooltip ? {\n text: children?.length && description ? description : label,\n shortcut,\n placement: tooltipPosition &&\n // Convert legacy `position` values to be used with the new `placement` prop\n positionToPlacement(tooltipPosition)\n } : {};\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Tooltip, {\n ...tooltipProps,\n children: element\n }), description && /*#__PURE__*/_jsx(VisuallyHidden, {\n children: /*#__PURE__*/_jsx(\"span\", {\n id: descriptionId,\n children: description\n })\n })]\n });\n}\nexport const Button = forwardRef(UnforwardedButton);\nButton.displayName = 'Button';\nexport default Button;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,wBAAuB;AACvB,qBAA2B;AAC3B,qBAA8B;AAK9B,qBAAoB;AACpB,kBAAiB;AACjB,6BAA+B;AAC/B,mBAAoC;AACpC,yBAAkE;AAClE,IAAM,iCAAiC,CAAC,eAAe,SAAS;AAChE,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,MAAI,eAAe;AACnB,MAAI,kBAAkB;AACtB,QAAM,WAAW;AAAA,IACf,wBAAwB;AAAA;AAAA,IAExB,gBAAgB;AAAA,IAChB,aAAa;AAAA,EACf;AACA,MAAI,SAAS;AACX,QAAI;AACJ,KAAC,gBAAgB,kBAAkB,QAAQ,kBAAkB,SAAS,gBAAgB,eAAe;AAAA,EACvG;AACA,MAAI,WAAW;AACb,QAAI;AACJ,KAAC,mBAAmB,qBAAqB,QAAQ,qBAAqB,SAAS,mBAAmB,kBAAkB;AAAA,EACtH;AACA,MAAI,YAAY;AACd,QAAI;AACJ,KAAC,oBAAoB,qBAAqB,QAAQ,sBAAsB,SAAS,oBAAoB,kBAAkB;AAAA,EACzH;AACA,MAAI,aAAa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CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,aAAS,2BAAW,iBAAiB;AAClD,OAAO,cAAc;AACrB,IAAO,iBAAQ;",
6
6
  "names": ["deprecated", "clsx", "_jsxs", "_Fragment", "_jsx", "Icon", "Tooltip"]
7
7
  }
@@ -59,6 +59,7 @@ function UnforwardedButtonGroup(props, ref) {
59
59
  });
60
60
  }
61
61
  var ButtonGroup = (0, import_element.forwardRef)(UnforwardedButtonGroup);
62
+ ButtonGroup.displayName = "ButtonGroup";
62
63
  var button_group_default = ButtonGroup;
63
64
  // Annotate the CommonJS export names for ESM import in node:
64
65
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/button-group/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedButtonGroup(props, ref) {\n const {\n className,\n __shouldNotWarnDeprecated,\n ...restProps\n } = props;\n const classes = clsx('components-button-group', className);\n if (!__shouldNotWarnDeprecated) {\n deprecated('wp.components.ButtonGroup', {\n since: '6.8',\n alternative: 'wp.components.__experimentalToggleGroupControl'\n });\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"group\",\n className: classes,\n ...restProps\n });\n}\n\n/**\n * ButtonGroup can be used to group any related buttons together. To emphasize\n * related buttons, a group should share a common container.\n *\n * @deprecated Use `ToggleGroupControl` instead.\n *\n * ```jsx\n * import { Button, ButtonGroup } from '@wordpress/components';\n *\n * const MyButtonGroup = () => (\n * <ButtonGroup>\n * <Button variant=\"primary\">Button 1</Button>\n * <Button variant=\"primary\">Button 2</Button>\n * </ButtonGroup>\n * );\n * ```\n */\nexport const ButtonGroup = forwardRef(UnforwardedButtonGroup);\nexport default ButtonGroup;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAC3B,wBAAuB;AAKvB,yBAA4B;AAC5B,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,cAAU,YAAAA,SAAK,2BAA2B,SAAS;AACzD,MAAI,CAAC,2BAA2B;AAC9B,0BAAAC,SAAW,6BAA6B;AAAA,MACtC,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AACA,SAAoB,uCAAAC,KAAK,OAAO;AAAA,IAC9B;AAAA,IACA,MAAM;AAAA,IACN,WAAW;AAAA,IACX,GAAG;AAAA,EACL,CAAC;AACH;AAmBO,IAAM,kBAAc,2BAAW,sBAAsB;AAC5D,IAAO,uBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedButtonGroup(props, ref) {\n const {\n className,\n __shouldNotWarnDeprecated,\n ...restProps\n } = props;\n const classes = clsx('components-button-group', className);\n if (!__shouldNotWarnDeprecated) {\n deprecated('wp.components.ButtonGroup', {\n since: '6.8',\n alternative: 'wp.components.__experimentalToggleGroupControl'\n });\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"group\",\n className: classes,\n ...restProps\n });\n}\n\n/**\n * ButtonGroup can be used to group any related buttons together. To emphasize\n * related buttons, a group should share a common container.\n *\n * @deprecated Use `ToggleGroupControl` instead.\n *\n * ```jsx\n * import { Button, ButtonGroup } from '@wordpress/components';\n *\n * const MyButtonGroup = () => (\n * <ButtonGroup>\n * <Button variant=\"primary\">Button 1</Button>\n * <Button variant=\"primary\">Button 2</Button>\n * </ButtonGroup>\n * );\n * ```\n */\nexport const ButtonGroup = forwardRef(UnforwardedButtonGroup);\nButtonGroup.displayName = 'ButtonGroup';\nexport default ButtonGroup;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAC3B,wBAAuB;AAKvB,yBAA4B;AAC5B,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,cAAU,YAAAA,SAAK,2BAA2B,SAAS;AACzD,MAAI,CAAC,2BAA2B;AAC9B,0BAAAC,SAAW,6BAA6B;AAAA,MACtC,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AACA,SAAoB,uCAAAC,KAAK,OAAO;AAAA,IAC9B;AAAA,IACA,MAAM;AAAA,IACN,WAAW;AAAA,IACX,GAAG;AAAA,EACL,CAAC;AACH;AAmBO,IAAM,kBAAc,2BAAW,sBAAsB;AAC5D,YAAY,cAAc;AAC1B,IAAO,uBAAQ;",
6
6
  "names": ["clsx", "deprecated", "_jsx"]
7
7
  }
@@ -48,6 +48,7 @@ function UnforwardedOptionAsButton(props, forwardedRef) {
48
48
  ...additionalProps
49
49
  } = props;
50
50
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
51
+ __next40pxDefaultSize: true,
51
52
  ...additionalProps,
52
53
  "aria-pressed": isPressed,
53
54
  ref: forwardedRef,
@@ -73,6 +74,7 @@ function UnforwardedOptionAsOption(props, forwardedRef) {
73
74
  }, [isSelected, setActiveId, activeId, id]);
74
75
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_composite.Composite.Item, {
75
76
  render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
77
+ __next40pxDefaultSize: true,
76
78
  ...additionalProps,
77
79
  role: "option",
78
80
  "aria-selected": !!isSelected,
@@ -98,7 +100,6 @@ function Option({
98
100
  const commonProps = {
99
101
  id,
100
102
  className: "components-circular-option-picker__option",
101
- __next40pxDefaultSize: true,
102
103
  ...additionalProps
103
104
  };
104
105
  const isListbox = setActiveId !== void 0;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/circular-option-picker/circular-option-picker-option.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedOptionAsButton(props, forwardedRef) {\n const {\n isPressed,\n label,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(Button, {\n ...additionalProps,\n \"aria-pressed\": isPressed,\n ref: forwardedRef,\n label: label\n });\n}\nconst OptionAsButton = forwardRef(UnforwardedOptionAsButton);\nfunction UnforwardedOptionAsOption(props, forwardedRef) {\n const {\n id,\n isSelected,\n label,\n ...additionalProps\n } = props;\n const {\n setActiveId,\n activeId\n } = useContext(CircularOptionPickerContext);\n useEffect(() => {\n if (isSelected && !activeId) {\n // The setTimeout call is necessary to make sure that this update\n // doesn't get overridden by `Composite`'s internal logic, which picks\n // an initial active item if one is not specifically set.\n window.setTimeout(() => setActiveId?.(id), 0);\n }\n }, [isSelected, setActiveId, activeId, id]);\n return /*#__PURE__*/_jsx(Composite.Item, {\n render: /*#__PURE__*/_jsx(Button, {\n ...additionalProps,\n role: \"option\",\n \"aria-selected\": !!isSelected,\n ref: forwardedRef,\n label: label\n }),\n id: id\n });\n}\nconst OptionAsOption = forwardRef(UnforwardedOptionAsOption);\nexport function Option({\n className,\n isSelected,\n selectedIconProps = {},\n tooltipText,\n ...additionalProps\n}) {\n const {\n baseId,\n setActiveId\n } = useContext(CircularOptionPickerContext);\n const id = useInstanceId(Option, baseId || 'components-circular-option-picker__option');\n const commonProps = {\n id,\n className: 'components-circular-option-picker__option',\n __next40pxDefaultSize: true,\n ...additionalProps\n };\n const isListbox = setActiveId !== undefined;\n const optionControl = isListbox ? /*#__PURE__*/_jsx(OptionAsOption, {\n ...commonProps,\n label: tooltipText,\n isSelected: isSelected\n }) : /*#__PURE__*/_jsx(OptionAsButton, {\n ...commonProps,\n label: tooltipText,\n isPressed: isSelected\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(className, 'components-circular-option-picker__option-wrapper'),\n children: [optionControl, isSelected && /*#__PURE__*/_jsx(Icon, {\n icon: check,\n ...selectedIconProps\n })]\n });\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA8B;AAC9B,qBAAkD;AAClD,mBAA4B;AAK5B,4CAA4C;AAC5C,oBAAmB;AACnB,uBAA0B;AAC1B,yBAA2C;AAC3C,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,IAC/B,GAAG;AAAA,IACH,gBAAgB;AAAA,IAChB,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AACA,IAAM,qBAAiB,2BAAW,yBAAyB;AAC3D,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,2BAAW,i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["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedOptionAsButton(props, forwardedRef) {\n const {\n isPressed,\n label,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ...additionalProps,\n \"aria-pressed\": isPressed,\n ref: forwardedRef,\n label: label\n });\n}\nconst OptionAsButton = forwardRef(UnforwardedOptionAsButton);\nfunction UnforwardedOptionAsOption(props, forwardedRef) {\n const {\n id,\n isSelected,\n label,\n ...additionalProps\n } = props;\n const {\n setActiveId,\n activeId\n } = useContext(CircularOptionPickerContext);\n useEffect(() => {\n if (isSelected && !activeId) {\n // The setTimeout call is necessary to make sure that this update\n // doesn't get overridden by `Composite`'s internal logic, which picks\n // an initial active item if one is not specifically set.\n window.setTimeout(() => setActiveId?.(id), 0);\n }\n }, [isSelected, setActiveId, activeId, id]);\n return /*#__PURE__*/_jsx(Composite.Item, {\n render: /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ...additionalProps,\n role: \"option\",\n \"aria-selected\": !!isSelected,\n ref: forwardedRef,\n label: label\n }),\n id: id\n });\n}\nconst OptionAsOption = forwardRef(UnforwardedOptionAsOption);\nexport function Option({\n className,\n isSelected,\n selectedIconProps = {},\n tooltipText,\n ...additionalProps\n}) {\n const {\n baseId,\n setActiveId\n } = useContext(CircularOptionPickerContext);\n const id = useInstanceId(Option, baseId || 'components-circular-option-picker__option');\n const commonProps = {\n id,\n className: 'components-circular-option-picker__option',\n ...additionalProps\n };\n const isListbox = setActiveId !== undefined;\n const optionControl = isListbox ? /*#__PURE__*/_jsx(OptionAsOption, {\n ...commonProps,\n label: tooltipText,\n isSelected: isSelected\n }) : /*#__PURE__*/_jsx(OptionAsButton, {\n ...commonProps,\n label: tooltipText,\n isPressed: isSelected\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(className, 'components-circular-option-picker__option-wrapper'),\n children: [optionControl, isSelected && /*#__PURE__*/_jsx(Icon, {\n icon: check,\n ...selectedIconProps\n })]\n });\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA8B;AAC9B,qBAAkD;AAClD,mBAA4B;AAK5B,4CAA4C;AAC5C,oBAAmB;AACnB,uBAA0B;AAC1B,yBAA2C;AAC3C,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,IAC/B,uBAAuB;AAAA,IACvB,GAAG;AAAA,IACH,gBAAgB;AAAA,IAChB,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AACA,IAAM,qBAAiB,2BAAW,yBAAyB;AAC3D,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,2BAAW,iEAA2B;AAC1C,gCAAU,MAAM;AACd,QAAI,cAAc,CAAC,UAAU;AAI3B,aAAO,WAAW,MAAM,cAAc,EAAE,GAAG,CAAC;AAAA,IAC9C;AAAA,EACF,GAAG,CAAC,YAAY,aAAa,UAAU,EAAE,CAAC;AAC1C,SAAoB,uCAAAD,KAAK,2BAAU,MAAM;AAAA,IACvC,QAAqB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAChC,uBAAuB;AAAA,MACvB,GAAG;AAAA,MACH,MAAM;AAAA,MACN,iBAAiB,CAAC,CAAC;AAAA,MACnB,KAAK;AAAA,MACL;AAAA,IACF,CAAC;AAAA,IACD;AAAA,EACF,CAAC;AACH;AACA,IAAM,qBAAiB,2BAAW,yBAAyB;AACpD,SAAS,OAAO;AAAA,EACrB;AAAA,EACA;AAAA,EACA,oBAAoB,CAAC;AAAA,EACrB;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,2BAAW,iEAA2B;AAC1C,QAAM,SAAK,8BAAc,QAAQ,UAAU,2CAA2C;AACtF,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,IACX,GAAG;AAAA,EACL;AACA,QAAM,YAAY,gBAAgB;AAClC,QAAM,gBAAgB,YAAyB,uCAAAD,KAAK,gBAAgB;AAAA,IAClE,GAAG;AAAA,IACH,OAAO;AAAA,IACP;AAAA,EACF,CAAC,IAAiB,uCAAAA,KAAK,gBAAgB;AAAA,IACrC,GAAG;AAAA,IACH,OAAO;AAAA,IACP,WAAW;AAAA,EACb,CAAC;AACD,SAAoB,uCAAAE,MAAM,OAAO;AAAA,IAC/B,eAAW,YAAAC,SAAK,WAAW,mDAAmD;AAAA,IAC9E,UAAU,CAAC,eAAe,cAA2B,uCAAAH,KAAK,mBAAM;AAAA,MAC9D,MAAM;AAAA,MACN,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
6
6
  "names": ["_jsx", "Button", "_jsxs", "clsx"]
7
7
  }
@@ -129,5 +129,6 @@ CircularOptionPicker.Option = import_circular_option_picker_option.Option;
129
129
  CircularOptionPicker.OptionGroup = import_circular_option_picker_option_group.OptionGroup;
130
130
  CircularOptionPicker.ButtonAction = import_circular_option_picker_actions.ButtonAction;
131
131
  CircularOptionPicker.DropdownLinkAction = import_circular_option_picker_actions.DropdownLinkAction;
132
+ CircularOptionPicker.displayName = "CircularOptionPicker";
132
133
  var circular_option_picker_default = CircularOptionPicker;
133
134
  //# sourceMappingURL=circular-option-picker.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/circular-option-picker/circular-option-picker.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport { Composite } from '../composite';\nimport { Option } from './circular-option-picker-option';\nimport { OptionGroup } from './circular-option-picker-option-group';\nimport { ButtonAction, DropdownLinkAction } from './circular-option-picker-actions';\n\n/**\n *`CircularOptionPicker` is a component that displays a set of options as circular buttons.\n *\n * ```jsx\n * import { CircularOptionPicker } from '../circular-option-picker';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ currentColor, setCurrentColor ] = useState();\n * \tconst colors = [\n * \t\t{ color: '#f00', name: 'Red' },\n * \t\t{ color: '#0f0', name: 'Green' },\n * \t\t{ color: '#00f', name: 'Blue' },\n * \t];\n * \tconst colorOptions = (\n * \t\t<>\n * \t\t\t{ colors.map( ( { color, name }, index ) => {\n * \t\t\t\treturn (\n * \t\t\t\t\t<CircularOptionPicker.Option\n * \t\t\t\t\t\tkey={ `${ color }-${ index }` }\n * \t\t\t\t\t\ttooltipText={ name }\n * \t\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n * \t\t\t\t\t\tisSelected={ index === currentColor }\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( index ) }\n * \t\t\t\t\t/>\n * \t\t\t\t);\n * \t\t\t} ) }\n * \t\t</>\n * \t);\n * \treturn (\n * \t\t<CircularOptionPicker\n * \t\t\t\toptions={ colorOptions }\n * \t\t\t\tactions={\n * \t\t\t\t\t<CircularOptionPicker.ButtonAction\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( undefined ) }\n * \t\t\t\t\t>\n * \t\t\t\t\t\t{ 'Clear' }\n * \t\t\t\t\t</CircularOptionPicker.ButtonAction>\n * \t\t\t\t}\n * \t\t\t/>\n * \t);\n * };\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ListboxCircularOptionPicker(props) {\n const {\n actions,\n options,\n baseId,\n className,\n loop = true,\n children,\n ...additionalProps\n } = props;\n const [activeId, setActiveId] = useState(undefined);\n const contextValue = useMemo(() => ({\n baseId,\n activeId,\n setActiveId\n }), [baseId, activeId, setActiveId]);\n return /*#__PURE__*/_jsx(\"div\", {\n className: className,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [/*#__PURE__*/_jsx(Composite, {\n ...additionalProps,\n id: baseId,\n focusLoop: loop,\n rtl: isRTL(),\n role: \"listbox\",\n activeId: activeId,\n setActiveId: setActiveId,\n children: options\n }), children, actions]\n })\n });\n}\nfunction ButtonsCircularOptionPicker(props) {\n const {\n actions,\n options,\n children,\n baseId,\n ...additionalProps\n } = props;\n const contextValue = useMemo(() => ({\n baseId\n }), [baseId]);\n return /*#__PURE__*/_jsx(\"div\", {\n ...additionalProps,\n role: \"group\",\n id: baseId,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [options, children, actions]\n })\n });\n}\nfunction CircularOptionPicker(props) {\n const {\n asButtons,\n actions: actionsProp,\n options: optionsProp,\n children,\n className,\n ...additionalProps\n } = props;\n const baseId = useInstanceId(CircularOptionPicker, 'components-circular-option-picker', additionalProps.id);\n const OptionPickerImplementation = asButtons ? ButtonsCircularOptionPicker : ListboxCircularOptionPicker;\n const actions = actionsProp ? /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__custom-clear-wrapper\",\n children: actionsProp\n }) : undefined;\n const options = /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__swatches\",\n children: optionsProp\n });\n return /*#__PURE__*/_jsx(OptionPickerImplementation, {\n ...additionalProps,\n baseId: baseId,\n className: clsx('components-circular-option-picker', className),\n actions: actions,\n options: options,\n children: children\n });\n}\nCircularOptionPicker.Option = Option;\nCircularOptionPicker.OptionGroup = OptionGroup;\nCircularOptionPicker.ButtonAction = ButtonAction;\nCircularOptionPicker.DropdownLinkAction = DropdownLinkAction;\nexport default CircularOptionPicker;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,kBAAsB;AACtB,qBAAkC;AAKlC,4CAA4C;AAC5C,uBAA0B;AAC1B,2CAAuB;AACvB,iDAA4B;AAC5B,4CAAiD;AA8CjD,yBAA2C;AAC3C,SAAS,4BAA4B,OAAO;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,QAAI,yBAAS,MAAS;AAClD,QAAM,mBAAe,wBAAQ,OAAO;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,CAAC,QAAQ,UAAU,WAAW,CAAC;AACnC,SAAoB,uCAAAA,KAAK,OAAO;AAAA,IAC9B;AAAA,IACA,UAAuB,uCAAAC,MAAM,kEAA4B,UAAU;AAAA,MACjE,OAAO;AAAA,MACP,UAAU,CAAc,uCAAAD,KAAK,4BAAW;AAAA,QACtC,GAAG;AAAA,QACH,IAAI;AAAA,QACJ,WAAW;AAAA,QACX,SAAK,mBAAM;AAAA,QACX,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,UAAU;AAAA,MACZ,CAAC,GAAG,UAAU,OAAO;AAAA,IACvB,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,4BAA4B,OAAO;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,mBAAe,wBAAQ,OAAO;AAAA,IAClC;AAAA,EACF,IAAI,CAAC,MAAM,CAAC;AACZ,SAAoB,uCAAAA,KAAK,OAAO;AAAA,IAC9B,GAAG;AAAA,IACH,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,UAAuB,uCAAAC,MAAM,kEAA4B,UAAU;AAAA,MACjE,OAAO;AAAA,MACP,UAAU,CAAC,SAAS,UAAU,OAAO;AAAA,IACvC,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,qBAAqB,OAAO;AACnC,QAAM;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,aAAS,8BAAc,sBAAsB,qCAAqC,gBAAgB,EAAE;AAC1G,QAAM,6BAA6B,YAAY,8BAA8B;AAC7E,QAAM,UAAU,cAA2B,uCAAAD,KAAK,OAAO;AAAA,IACrD,WAAW;AAAA,IACX,UAAU;AAAA,EACZ,CAAC,IAAI;AACL,QAAM,UAAuB,uCAAAA,KAAK,OAAO;AAAA,IACvC,WAAW;AAAA,IACX,UAAU;AAAA,EACZ,CAAC;AACD,SAAoB,uCAAAA,KAAK,4BAA4B;AAAA,IACnD,GAAG;AAAA,IACH;AAAA,IACA,eAAW,YAAAE,SAAK,qCAAqC,SAAS;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AACA,qBAAqB,SAAS;AAC9B,qBAAqB,cAAc;AACnC,qBAAqB,eAAe;AACpC,qBAAqB,qBAAqB;AAC1C,IAAO,iCAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport { Composite } from '../composite';\nimport { Option } from './circular-option-picker-option';\nimport { OptionGroup } from './circular-option-picker-option-group';\nimport { ButtonAction, DropdownLinkAction } from './circular-option-picker-actions';\n\n/**\n *`CircularOptionPicker` is a component that displays a set of options as circular buttons.\n *\n * ```jsx\n * import { CircularOptionPicker } from '../circular-option-picker';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ currentColor, setCurrentColor ] = useState();\n * \tconst colors = [\n * \t\t{ color: '#f00', name: 'Red' },\n * \t\t{ color: '#0f0', name: 'Green' },\n * \t\t{ color: '#00f', name: 'Blue' },\n * \t];\n * \tconst colorOptions = (\n * \t\t<>\n * \t\t\t{ colors.map( ( { color, name }, index ) => {\n * \t\t\t\treturn (\n * \t\t\t\t\t<CircularOptionPicker.Option\n * \t\t\t\t\t\tkey={ `${ color }-${ index }` }\n * \t\t\t\t\t\ttooltipText={ name }\n * \t\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n * \t\t\t\t\t\tisSelected={ index === currentColor }\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( index ) }\n * \t\t\t\t\t/>\n * \t\t\t\t);\n * \t\t\t} ) }\n * \t\t</>\n * \t);\n * \treturn (\n * \t\t<CircularOptionPicker\n * \t\t\t\toptions={ colorOptions }\n * \t\t\t\tactions={\n * \t\t\t\t\t<CircularOptionPicker.ButtonAction\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( undefined ) }\n * \t\t\t\t\t>\n * \t\t\t\t\t\t{ 'Clear' }\n * \t\t\t\t\t</CircularOptionPicker.ButtonAction>\n * \t\t\t\t}\n * \t\t\t/>\n * \t);\n * };\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ListboxCircularOptionPicker(props) {\n const {\n actions,\n options,\n baseId,\n className,\n loop = true,\n children,\n ...additionalProps\n } = props;\n const [activeId, setActiveId] = useState(undefined);\n const contextValue = useMemo(() => ({\n baseId,\n activeId,\n setActiveId\n }), [baseId, activeId, setActiveId]);\n return /*#__PURE__*/_jsx(\"div\", {\n className: className,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [/*#__PURE__*/_jsx(Composite, {\n ...additionalProps,\n id: baseId,\n focusLoop: loop,\n rtl: isRTL(),\n role: \"listbox\",\n activeId: activeId,\n setActiveId: setActiveId,\n children: options\n }), children, actions]\n })\n });\n}\nfunction ButtonsCircularOptionPicker(props) {\n const {\n actions,\n options,\n children,\n baseId,\n ...additionalProps\n } = props;\n const contextValue = useMemo(() => ({\n baseId\n }), [baseId]);\n return /*#__PURE__*/_jsx(\"div\", {\n ...additionalProps,\n role: \"group\",\n id: baseId,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [options, children, actions]\n })\n });\n}\nfunction CircularOptionPicker(props) {\n const {\n asButtons,\n actions: actionsProp,\n options: optionsProp,\n children,\n className,\n ...additionalProps\n } = props;\n const baseId = useInstanceId(CircularOptionPicker, 'components-circular-option-picker', additionalProps.id);\n const OptionPickerImplementation = asButtons ? ButtonsCircularOptionPicker : ListboxCircularOptionPicker;\n const actions = actionsProp ? /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__custom-clear-wrapper\",\n children: actionsProp\n }) : undefined;\n const options = /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__swatches\",\n children: optionsProp\n });\n return /*#__PURE__*/_jsx(OptionPickerImplementation, {\n ...additionalProps,\n baseId: baseId,\n className: clsx('components-circular-option-picker', className),\n actions: actions,\n options: options,\n children: children\n });\n}\nCircularOptionPicker.Option = Option;\nCircularOptionPicker.OptionGroup = OptionGroup;\nCircularOptionPicker.ButtonAction = ButtonAction;\nCircularOptionPicker.DropdownLinkAction = DropdownLinkAction;\nCircularOptionPicker.displayName = 'CircularOptionPicker';\nexport default CircularOptionPicker;"],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4B,UAAU;AAAA,MACjE,OAAO;AAAA,MACP,UAAU,CAAC,SAAS,UAAU,OAAO;AAAA,IACvC,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,qBAAqB,OAAO;AACnC,QAAM;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,aAAS,8BAAc,sBAAsB,qCAAqC,gBAAgB,EAAE;AAC1G,QAAM,6BAA6B,YAAY,8BAA8B;AAC7E,QAAM,UAAU,cAA2B,uCAAAD,KAAK,OAAO;AAAA,IACrD,WAAW;AAAA,IACX,UAAU;AAAA,EACZ,CAAC,IAAI;AACL,QAAM,UAAuB,uCAAAA,KAAK,OAAO;AAAA,IACvC,WAAW;AAAA,IACX,UAAU;AAAA,EACZ,CAAC;AACD,SAAoB,uCAAAA,KAAK,4BAA4B;AAAA,IACnD,GAAG;AAAA,IACH;AAAA,IACA,eAAW,YAAAE,SAAK,qCAAqC,SAAS;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AACA,qBAAqB,SAAS;AAC9B,qBAAqB,cAAc;AACnC,qBAAqB,eAAe;AACpC,qBAAqB,qBAAqB;AAC1C,qBAAqB,cAAc;AACnC,IAAO,iCAAQ;",
6
6
  "names": ["_jsx", "_jsxs", "clsx"]
7
7
  }
@@ -73,12 +73,16 @@ function ClipboardButton({
73
73
  const focusOnCopyEventTarget = (event) => {
74
74
  event.target.focus();
75
75
  };
76
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
77
- ...buttonProps,
78
- className: classes,
79
- ref,
80
- onCopy: focusOnCopyEventTarget,
81
- children
82
- });
76
+ return (
77
+ // Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.
78
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
80
+ ...buttonProps,
81
+ className: classes,
82
+ ref,
83
+ onCopy: focusOnCopyEventTarget,
84
+ children
85
+ })
86
+ );
83
87
  }
84
88
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/clipboard-button/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst TIMEOUT = 4000;\nexport default function ClipboardButton({\n className,\n children,\n onCopy,\n onFinishCopy,\n text,\n ...buttonProps\n}) {\n deprecated('wp.components.ClipboardButton', {\n since: '5.8',\n alternative: 'wp.compose.useCopyToClipboard'\n });\n const timeoutIdRef = useRef();\n const ref = useCopyToClipboard(text, () => {\n onCopy();\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n if (onFinishCopy) {\n timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);\n }\n });\n useEffect(() => {\n return () => {\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n };\n }, []);\n const classes = clsx('components-clipboard-button', className);\n\n // Workaround for inconsistent behavior in Safari, where <textarea> is not\n // the document.activeElement at the moment when the copy event fires.\n // This causes documentHasSelection() in the copy-handler component to\n // mistakenly override the ClipboardButton, and copy a serialized string\n // of the current block instead.\n const focusOnCopyEventTarget = event => {\n // @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n event.target.focus();\n };\n return /*#__PURE__*/_jsx(Button, {\n ...buttonProps,\n className: classes,\n ref: ref,\n onCopy: focusOnCopyEventTarget,\n children: children\n });\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAAkC;AAClC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,yBAA4B;AAC5B,IAAM,UAAU;AACD,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,wBAAAA,SAAW,iCAAiC;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AACD,QAAM,mBAAe,uBAAO;AAC5B,QAAM,UAAM,mCAAmB,MAAM,MAAM;AACzC,WAAO;AACP,QAAI,aAAa,SAAS;AACxB,mBAAa,aAAa,OAAO;AAAA,IACnC;AACA,QAAI,cAAc;AAChB,mBAAa,UAAU,WAAW,MAAM,aAAa,GAAG,OAAO;AAAA,IACjE;AAAA,EACF,CAAC;AACD,gCAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,qBAAa,aAAa,OAAO;AAAA,MACnC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,cAAU,YAAAC,SAAK,+BAA+B,SAAS;AAO7D,QAAM,yBAAyB,WAAS;AAEtC,UAAM,OAAO,MAAM;AAAA,EACrB;AACA,SAAoB,uCAAAC,KAAK,cAAAC,SAAQ;AAAA,IAC/B,GAAG;AAAA,IACH,WAAW;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,EACF,CAAC;AACH;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst TIMEOUT = 4000;\nexport default function ClipboardButton({\n className,\n children,\n onCopy,\n onFinishCopy,\n text,\n ...buttonProps\n}) {\n deprecated('wp.components.ClipboardButton', {\n since: '5.8',\n alternative: 'wp.compose.useCopyToClipboard'\n });\n const timeoutIdRef = useRef();\n const ref = useCopyToClipboard(text, () => {\n onCopy();\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n if (onFinishCopy) {\n timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);\n }\n });\n useEffect(() => {\n return () => {\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n };\n }, []);\n const classes = clsx('components-clipboard-button', className);\n\n // Workaround for inconsistent behavior in Safari, where <textarea> is not\n // the document.activeElement at the moment when the copy event fires.\n // This causes documentHasSelection() in the copy-handler component to\n // mistakenly override the ClipboardButton, and copy a serialized string\n // of the current block instead.\n const focusOnCopyEventTarget = event => {\n // @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n event.target.focus();\n };\n return (\n /*#__PURE__*/\n // Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n ...buttonProps,\n className: classes,\n ref: ref,\n onCopy: focusOnCopyEventTarget,\n children: children\n })\n );\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAAkC;AAClC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,yBAA4B;AAC5B,IAAM,UAAU;AACD,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,wBAAAA,SAAW,iCAAiC;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AACD,QAAM,mBAAe,uBAAO;AAC5B,QAAM,UAAM,mCAAmB,MAAM,MAAM;AACzC,WAAO;AACP,QAAI,aAAa,SAAS;AACxB,mBAAa,aAAa,OAAO;AAAA,IACnC;AACA,QAAI,cAAc;AAChB,mBAAa,UAAU,WAAW,MAAM,aAAa,GAAG,OAAO;AAAA,IACjE;AAAA,EACF,CAAC;AACD,gCAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,qBAAa,aAAa,OAAO;AAAA,MACnC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,cAAU,YAAAC,SAAK,+BAA+B,SAAS;AAO7D,QAAM,yBAAyB,WAAS;AAEtC,UAAM,OAAO,MAAM;AAAA,EACrB;AACA;AAAA;AAAA;AAAA,IAIE,uCAAAC,KAAK,cAAAC,SAAQ;AAAA,MACX,GAAG;AAAA,MACH,WAAW;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAAA;AAEL;",
6
6
  "names": ["deprecated", "clsx", "_jsx", "Button"]
7
7
  }
@@ -53,6 +53,7 @@ function UnforwardedColorIndicator(props, forwardedRef) {
53
53
  });
54
54
  }
55
55
  var ColorIndicator = (0, import_element.forwardRef)(UnforwardedColorIndicator);
56
+ ColorIndicator.displayName = "ColorIndicator";
56
57
  var color_indicator_default = ColorIndicator;
57
58
  // Annotate the CommonJS export names for ESM import in node:
58
59
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/color-indicator/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedColorIndicator(props, forwardedRef) {\n const {\n className,\n colorValue,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(\"span\", {\n className: clsx('component-color-indicator', className),\n style: {\n background: colorValue\n },\n ref: forwardedRef,\n ...additionalProps\n });\n}\n\n/**\n * ColorIndicator is a React component that renders a specific color in a\n * circle. It's often used to summarize a collection of used colors in a child\n * component.\n *\n * ```jsx\n * import { ColorIndicator } from '@wordpress/components';\n *\n * const MyColorIndicator = () => <ColorIndicator colorValue=\"#0073aa\" />;\n * ```\n */\nexport const ColorIndicator = forwardRef(UnforwardedColorIndicator);\nexport default ColorIndicator;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAK3B,yBAA4B;AAC5B,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,QAAQ;AAAA,IAC/B,eAAW,YAAAC,SAAK,6BAA6B,SAAS;AAAA,IACtD,OAAO;AAAA,MACL,YAAY;AAAA,IACd;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACL,CAAC;AACH;AAaO,IAAM,qBAAiB,2BAAW,yBAAyB;AAClE,IAAO,0BAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedColorIndicator(props, forwardedRef) {\n const {\n className,\n colorValue,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(\"span\", {\n className: clsx('component-color-indicator', className),\n style: {\n background: colorValue\n },\n ref: forwardedRef,\n ...additionalProps\n });\n}\n\n/**\n * ColorIndicator is a React component that renders a specific color in a\n * circle. It's often used to summarize a collection of used colors in a child\n * component.\n *\n * ```jsx\n * import { ColorIndicator } from '@wordpress/components';\n *\n * const MyColorIndicator = () => <ColorIndicator colorValue=\"#0073aa\" />;\n * ```\n */\nexport const ColorIndicator = forwardRef(UnforwardedColorIndicator);\nColorIndicator.displayName = 'ColorIndicator';\nexport default ColorIndicator;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAK3B,yBAA4B;AAC5B,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,QAAQ;AAAA,IAC/B,eAAW,YAAAC,SAAK,6BAA6B,SAAS;AAAA,IACtD,OAAO;AAAA,MACL,YAAY;AAAA,IACd;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACL,CAAC;AACH;AAaO,IAAM,qBAAiB,2BAAW,yBAAyB;AAClE,eAAe,cAAc;AAC7B,IAAO,0BAAQ;",
6
6
  "names": ["_jsx", "clsx"]
7
7
  }
@@ -264,6 +264,7 @@ function UnforwardedColorPalette(props, forwardedRef) {
264
264
  });
265
265
  }
266
266
  var ColorPalette = (0, import_element.forwardRef)(UnforwardedColorPalette);
267
+ ColorPalette.displayName = "ColorPalette";
267
268
  var color_palette_default = ColorPalette;
268
269
  // Annotate the CommonJS export names for ESM import in node:
269
270
  0 && (module.exports = {