@wordpress/components 32.0.1-next.ba3aee3a2.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 (982) hide show
  1. package/CHANGELOG.md +12 -1
  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/context/context-system-provider.cjs +1 -1
  26. package/build/context/context-system-provider.cjs.map +2 -2
  27. package/build/date-time/date-time/index.cjs +1 -0
  28. package/build/date-time/date-time/index.cjs.map +2 -2
  29. package/build/disclosure/index.cjs +1 -0
  30. package/build/disclosure/index.cjs.map +2 -2
  31. package/build/duotone-picker/duotone-picker.cjs +1 -1
  32. package/build/duotone-picker/duotone-picker.cjs.map +1 -1
  33. package/build/external-link/index.cjs +1 -0
  34. package/build/external-link/index.cjs.map +2 -2
  35. package/build/font-size-picker/index.cjs +1 -0
  36. package/build/font-size-picker/index.cjs.map +2 -2
  37. package/build/form-file-upload/index.cjs +9 -5
  38. package/build/form-file-upload/index.cjs.map +2 -2
  39. package/build/form-toggle/index.cjs +1 -0
  40. package/build/form-toggle/index.cjs.map +2 -2
  41. package/build/form-token-field/token-input.cjs +1 -0
  42. package/build/form-token-field/token-input.cjs.map +2 -2
  43. package/build/form-token-field/token.cjs.map +2 -2
  44. package/build/higher-order/navigate-regions/index.cjs +9 -7
  45. package/build/higher-order/navigate-regions/index.cjs.map +2 -2
  46. package/build/higher-order/with-fallback-styles/index.cjs +2 -2
  47. package/build/higher-order/with-fallback-styles/index.cjs.map +2 -2
  48. package/build/higher-order/with-focus-outside/index.cjs +1 -1
  49. package/build/higher-order/with-focus-outside/index.cjs.map +2 -2
  50. package/build/higher-order/with-spoken-messages/index.cjs +7 -5
  51. package/build/higher-order/with-spoken-messages/index.cjs.map +2 -2
  52. package/build/input-control/index.cjs +1 -0
  53. package/build/input-control/index.cjs.map +2 -2
  54. package/build/input-control/styles/input-control-styles.cjs +22 -22
  55. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  56. package/build/menu/popover.cjs +1 -0
  57. package/build/menu/popover.cjs.map +2 -2
  58. package/build/menu/styles.cjs +15 -15
  59. package/build/menu/styles.cjs.map +2 -2
  60. package/build/menu-item/index.cjs +1 -0
  61. package/build/menu-item/index.cjs.map +2 -2
  62. package/build/modal/index.cjs +1 -0
  63. package/build/modal/index.cjs.map +2 -2
  64. package/build/navigable-container/menu.cjs +1 -0
  65. package/build/navigable-container/menu.cjs.map +2 -2
  66. package/build/navigable-container/tabbable.cjs +1 -0
  67. package/build/navigable-container/tabbable.cjs.map +2 -2
  68. package/build/navigation/back-button/index.cjs +1 -0
  69. package/build/navigation/back-button/index.cjs.map +2 -2
  70. package/build/number-control/index.cjs +1 -0
  71. package/build/number-control/index.cjs.map +2 -2
  72. package/build/panel/body.cjs +1 -0
  73. package/build/panel/body.cjs.map +2 -2
  74. package/build/panel/index.cjs +1 -0
  75. package/build/panel/index.cjs.map +2 -2
  76. package/build/panel/row.cjs +1 -0
  77. package/build/panel/row.cjs.map +2 -2
  78. package/build/progress-bar/index.cjs +1 -0
  79. package/build/progress-bar/index.cjs.map +2 -2
  80. package/build/radio-group/index.cjs +1 -0
  81. package/build/radio-group/index.cjs.map +2 -2
  82. package/build/radio-group/radio.cjs +9 -4
  83. package/build/radio-group/radio.cjs.map +2 -2
  84. package/build/range-control/index.cjs +1 -0
  85. package/build/range-control/index.cjs.map +2 -2
  86. package/build/resizable-box/index.cjs +1 -0
  87. package/build/resizable-box/index.cjs.map +2 -2
  88. package/build/search-control/index.cjs +1 -0
  89. package/build/search-control/index.cjs.map +2 -2
  90. package/build/select-control/index.cjs +1 -0
  91. package/build/select-control/index.cjs.map +2 -2
  92. package/build/slot-fill/bubbles-virtually/slot.cjs +17 -5
  93. package/build/slot-fill/bubbles-virtually/slot.cjs.map +2 -2
  94. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs +17 -4
  95. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs.map +2 -2
  96. package/build/slot-fill/bubbles-virtually/use-slot.cjs +7 -3
  97. package/build/slot-fill/bubbles-virtually/use-slot.cjs.map +2 -2
  98. package/build/slot-fill/context.cjs +17 -6
  99. package/build/slot-fill/context.cjs.map +3 -3
  100. package/build/slot-fill/fill.cjs +29 -4
  101. package/build/slot-fill/fill.cjs.map +4 -4
  102. package/build/slot-fill/index.cjs +8 -23
  103. package/build/slot-fill/index.cjs.map +3 -3
  104. package/build/slot-fill/provider.cjs +33 -17
  105. package/build/slot-fill/provider.cjs.map +2 -2
  106. package/build/slot-fill/slot.cjs +7 -4
  107. package/build/slot-fill/slot.cjs.map +2 -2
  108. package/build/snackbar/index.cjs +1 -0
  109. package/build/snackbar/index.cjs.map +2 -2
  110. package/build/spinner/index.cjs +1 -0
  111. package/build/spinner/index.cjs.map +2 -2
  112. package/build/tab-panel/index.cjs +1 -0
  113. package/build/tab-panel/index.cjs.map +2 -2
  114. package/build/text-control/index.cjs +1 -0
  115. package/build/text-control/index.cjs.map +2 -2
  116. package/build/text-highlight/index.cjs +1 -0
  117. package/build/text-highlight/index.cjs.map +2 -2
  118. package/build/textarea-control/index.cjs +1 -0
  119. package/build/textarea-control/index.cjs.map +2 -2
  120. package/build/toggle-control/index.cjs +1 -0
  121. package/build/toggle-control/index.cjs.map +2 -2
  122. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs +1 -0
  123. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs.map +2 -2
  124. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs +1 -0
  125. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
  126. package/build/toggle-group-control/toggle-group-control-option/component.cjs +1 -0
  127. package/build/toggle-group-control/toggle-group-control-option/component.cjs.map +2 -2
  128. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs +1 -0
  129. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs.map +2 -2
  130. package/build/toolbar/toolbar/index.cjs +1 -0
  131. package/build/toolbar/toolbar/index.cjs.map +2 -2
  132. package/build/toolbar/toolbar/toolbar-container.cjs +1 -0
  133. package/build/toolbar/toolbar/toolbar-container.cjs.map +2 -2
  134. package/build/toolbar/toolbar-button/index.cjs +1 -0
  135. package/build/toolbar/toolbar-button/index.cjs.map +2 -2
  136. package/build/toolbar/toolbar-dropdown-menu/index.cjs +1 -0
  137. package/build/toolbar/toolbar-dropdown-menu/index.cjs.map +2 -2
  138. package/build/toolbar/toolbar-item/index.cjs +1 -0
  139. package/build/toolbar/toolbar-item/index.cjs.map +2 -2
  140. package/build/tooltip/index.cjs +1 -0
  141. package/build/tooltip/index.cjs.map +2 -2
  142. package/build/tree-grid/cell.cjs +1 -0
  143. package/build/tree-grid/cell.cjs.map +2 -2
  144. package/build/tree-grid/index.cjs +1 -0
  145. package/build/tree-grid/index.cjs.map +2 -2
  146. package/build/tree-grid/item.cjs +1 -0
  147. package/build/tree-grid/item.cjs.map +2 -2
  148. package/build/tree-grid/roving-tab-index-item.cjs +1 -0
  149. package/build/tree-grid/roving-tab-index-item.cjs.map +2 -2
  150. package/build/tree-grid/row.cjs +1 -0
  151. package/build/tree-grid/row.cjs.map +2 -2
  152. package/build/tree-select/index.cjs +12 -8
  153. package/build/tree-select/index.cjs.map +2 -2
  154. package/build/unit-control/index.cjs +1 -0
  155. package/build/unit-control/index.cjs.map +2 -2
  156. package/build/utils/dropdown-motion.cjs.map +2 -2
  157. package/build/validated-form-controls/components/checkbox-control.cjs +1 -0
  158. package/build/validated-form-controls/components/checkbox-control.cjs.map +2 -2
  159. package/build/validated-form-controls/components/combobox-control.cjs +1 -0
  160. package/build/validated-form-controls/components/combobox-control.cjs.map +2 -2
  161. package/build/validated-form-controls/components/custom-select-control.cjs +1 -0
  162. package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
  163. package/build/validated-form-controls/components/form-token-field.cjs +1 -0
  164. package/build/validated-form-controls/components/form-token-field.cjs.map +2 -2
  165. package/build/validated-form-controls/components/input-control.cjs +1 -0
  166. package/build/validated-form-controls/components/input-control.cjs.map +2 -2
  167. package/build/validated-form-controls/components/number-control.cjs +1 -0
  168. package/build/validated-form-controls/components/number-control.cjs.map +2 -2
  169. package/build/validated-form-controls/components/radio-control.cjs +1 -0
  170. package/build/validated-form-controls/components/radio-control.cjs.map +2 -2
  171. package/build/validated-form-controls/components/range-control.cjs +1 -0
  172. package/build/validated-form-controls/components/range-control.cjs.map +2 -2
  173. package/build/validated-form-controls/components/select-control.cjs +1 -0
  174. package/build/validated-form-controls/components/select-control.cjs.map +2 -2
  175. package/build/validated-form-controls/components/text-control.cjs +1 -0
  176. package/build/validated-form-controls/components/text-control.cjs.map +2 -2
  177. package/build/validated-form-controls/components/textarea-control.cjs +1 -0
  178. package/build/validated-form-controls/components/textarea-control.cjs.map +2 -2
  179. package/build/validated-form-controls/components/toggle-control.cjs +1 -0
  180. package/build/validated-form-controls/components/toggle-control.cjs.map +2 -2
  181. package/build/validated-form-controls/components/toggle-group-control.cjs +1 -0
  182. package/build/validated-form-controls/components/toggle-group-control.cjs.map +2 -2
  183. package/build/validated-form-controls/control-with-error.cjs +1 -0
  184. package/build/validated-form-controls/control-with-error.cjs.map +2 -2
  185. package/build-module/angle-picker-control/index.mjs +1 -0
  186. package/build-module/angle-picker-control/index.mjs.map +2 -2
  187. package/build-module/box-control/index.mjs +15 -7
  188. package/build-module/box-control/index.mjs.map +2 -2
  189. package/build-module/button/deprecated.mjs +12 -8
  190. package/build-module/button/deprecated.mjs.map +2 -2
  191. package/build-module/button/index.mjs +1 -0
  192. package/build-module/button/index.mjs.map +2 -2
  193. package/build-module/button-group/index.mjs +1 -0
  194. package/build-module/button-group/index.mjs.map +2 -2
  195. package/build-module/circular-option-picker/circular-option-picker-option.mjs +2 -1
  196. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  197. package/build-module/circular-option-picker/circular-option-picker.mjs +1 -0
  198. package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
  199. package/build-module/clipboard-button/index.mjs +11 -7
  200. package/build-module/clipboard-button/index.mjs.map +2 -2
  201. package/build-module/color-indicator/index.mjs +1 -0
  202. package/build-module/color-indicator/index.mjs.map +2 -2
  203. package/build-module/color-palette/index.mjs +1 -0
  204. package/build-module/color-palette/index.mjs.map +2 -2
  205. package/build-module/combobox-control/index.mjs +1 -1
  206. package/build-module/combobox-control/index.mjs.map +2 -2
  207. package/build-module/context/context-system-provider.mjs +1 -1
  208. package/build-module/context/context-system-provider.mjs.map +2 -2
  209. package/build-module/date-time/date-time/index.mjs +1 -0
  210. package/build-module/date-time/date-time/index.mjs.map +2 -2
  211. package/build-module/disclosure/index.mjs +1 -0
  212. package/build-module/disclosure/index.mjs.map +2 -2
  213. package/build-module/duotone-picker/duotone-picker.mjs +1 -1
  214. package/build-module/duotone-picker/duotone-picker.mjs.map +1 -1
  215. package/build-module/external-link/index.mjs +1 -0
  216. package/build-module/external-link/index.mjs.map +2 -2
  217. package/build-module/font-size-picker/index.mjs +1 -0
  218. package/build-module/font-size-picker/index.mjs.map +2 -2
  219. package/build-module/form-file-upload/index.mjs +9 -5
  220. package/build-module/form-file-upload/index.mjs.map +2 -2
  221. package/build-module/form-toggle/index.mjs +1 -0
  222. package/build-module/form-toggle/index.mjs.map +2 -2
  223. package/build-module/form-token-field/token-input.mjs +1 -0
  224. package/build-module/form-token-field/token-input.mjs.map +2 -2
  225. package/build-module/form-token-field/token.mjs.map +2 -2
  226. package/build-module/higher-order/navigate-regions/index.mjs +9 -7
  227. package/build-module/higher-order/navigate-regions/index.mjs.map +2 -2
  228. package/build-module/higher-order/with-fallback-styles/index.mjs +2 -2
  229. package/build-module/higher-order/with-fallback-styles/index.mjs.map +2 -2
  230. package/build-module/higher-order/with-focus-outside/index.mjs +1 -1
  231. package/build-module/higher-order/with-focus-outside/index.mjs.map +2 -2
  232. package/build-module/higher-order/with-spoken-messages/index.mjs +7 -5
  233. package/build-module/higher-order/with-spoken-messages/index.mjs.map +2 -2
  234. package/build-module/input-control/index.mjs +1 -0
  235. package/build-module/input-control/index.mjs.map +2 -2
  236. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  237. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  238. package/build-module/menu/popover.mjs +1 -0
  239. package/build-module/menu/popover.mjs.map +2 -2
  240. package/build-module/menu/styles.mjs +15 -15
  241. package/build-module/menu/styles.mjs.map +2 -2
  242. package/build-module/menu-item/index.mjs +1 -0
  243. package/build-module/menu-item/index.mjs.map +2 -2
  244. package/build-module/modal/index.mjs +1 -0
  245. package/build-module/modal/index.mjs.map +2 -2
  246. package/build-module/navigable-container/menu.mjs +1 -0
  247. package/build-module/navigable-container/menu.mjs.map +2 -2
  248. package/build-module/navigable-container/tabbable.mjs +1 -0
  249. package/build-module/navigable-container/tabbable.mjs.map +2 -2
  250. package/build-module/navigation/back-button/index.mjs +1 -0
  251. package/build-module/navigation/back-button/index.mjs.map +2 -2
  252. package/build-module/number-control/index.mjs +1 -0
  253. package/build-module/number-control/index.mjs.map +2 -2
  254. package/build-module/panel/body.mjs +1 -0
  255. package/build-module/panel/body.mjs.map +2 -2
  256. package/build-module/panel/index.mjs +1 -0
  257. package/build-module/panel/index.mjs.map +2 -2
  258. package/build-module/panel/row.mjs +1 -0
  259. package/build-module/panel/row.mjs.map +2 -2
  260. package/build-module/progress-bar/index.mjs +1 -0
  261. package/build-module/progress-bar/index.mjs.map +2 -2
  262. package/build-module/radio-group/index.mjs +1 -0
  263. package/build-module/radio-group/index.mjs.map +2 -2
  264. package/build-module/radio-group/radio.mjs +9 -4
  265. package/build-module/radio-group/radio.mjs.map +2 -2
  266. package/build-module/range-control/index.mjs +1 -0
  267. package/build-module/range-control/index.mjs.map +2 -2
  268. package/build-module/resizable-box/index.mjs +1 -0
  269. package/build-module/resizable-box/index.mjs.map +2 -2
  270. package/build-module/search-control/index.mjs +1 -0
  271. package/build-module/search-control/index.mjs.map +2 -2
  272. package/build-module/select-control/index.mjs +1 -0
  273. package/build-module/select-control/index.mjs.map +2 -2
  274. package/build-module/slot-fill/bubbles-virtually/slot.mjs +16 -4
  275. package/build-module/slot-fill/bubbles-virtually/slot.mjs.map +2 -2
  276. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs +17 -4
  277. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs.map +2 -2
  278. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs +6 -2
  279. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs.map +2 -2
  280. package/build-module/slot-fill/context.mjs +7 -2
  281. package/build-module/slot-fill/context.mjs.map +2 -2
  282. package/build-module/slot-fill/fill.mjs +30 -5
  283. package/build-module/slot-fill/fill.mjs.map +3 -3
  284. package/build-module/slot-fill/index.mjs +7 -21
  285. package/build-module/slot-fill/index.mjs.map +2 -2
  286. package/build-module/slot-fill/provider.mjs +33 -17
  287. package/build-module/slot-fill/provider.mjs.map +2 -2
  288. package/build-module/slot-fill/slot.mjs +7 -4
  289. package/build-module/slot-fill/slot.mjs.map +2 -2
  290. package/build-module/snackbar/index.mjs +1 -0
  291. package/build-module/snackbar/index.mjs.map +2 -2
  292. package/build-module/spinner/index.mjs +1 -0
  293. package/build-module/spinner/index.mjs.map +2 -2
  294. package/build-module/tab-panel/index.mjs +1 -0
  295. package/build-module/tab-panel/index.mjs.map +2 -2
  296. package/build-module/text-control/index.mjs +1 -0
  297. package/build-module/text-control/index.mjs.map +2 -2
  298. package/build-module/text-highlight/index.mjs +1 -0
  299. package/build-module/text-highlight/index.mjs.map +2 -2
  300. package/build-module/textarea-control/index.mjs +1 -0
  301. package/build-module/textarea-control/index.mjs.map +2 -2
  302. package/build-module/toggle-control/index.mjs +1 -0
  303. package/build-module/toggle-control/index.mjs.map +2 -2
  304. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs +1 -0
  305. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs.map +2 -2
  306. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs +1 -0
  307. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs.map +2 -2
  308. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs +1 -0
  309. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs.map +2 -2
  310. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs +1 -0
  311. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map +2 -2
  312. package/build-module/toolbar/toolbar/index.mjs +1 -0
  313. package/build-module/toolbar/toolbar/index.mjs.map +2 -2
  314. package/build-module/toolbar/toolbar/toolbar-container.mjs +1 -0
  315. package/build-module/toolbar/toolbar/toolbar-container.mjs.map +2 -2
  316. package/build-module/toolbar/toolbar-button/index.mjs +1 -0
  317. package/build-module/toolbar/toolbar-button/index.mjs.map +2 -2
  318. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs +1 -0
  319. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs.map +2 -2
  320. package/build-module/toolbar/toolbar-item/index.mjs +1 -0
  321. package/build-module/toolbar/toolbar-item/index.mjs.map +2 -2
  322. package/build-module/tooltip/index.mjs +1 -0
  323. package/build-module/tooltip/index.mjs.map +2 -2
  324. package/build-module/tree-grid/cell.mjs +1 -0
  325. package/build-module/tree-grid/cell.mjs.map +2 -2
  326. package/build-module/tree-grid/index.mjs +1 -0
  327. package/build-module/tree-grid/index.mjs.map +2 -2
  328. package/build-module/tree-grid/item.mjs +1 -0
  329. package/build-module/tree-grid/item.mjs.map +2 -2
  330. package/build-module/tree-grid/roving-tab-index-item.mjs +1 -0
  331. package/build-module/tree-grid/roving-tab-index-item.mjs.map +2 -2
  332. package/build-module/tree-grid/row.mjs +1 -0
  333. package/build-module/tree-grid/row.mjs.map +2 -2
  334. package/build-module/tree-select/index.mjs +12 -8
  335. package/build-module/tree-select/index.mjs.map +2 -2
  336. package/build-module/unit-control/index.mjs +1 -0
  337. package/build-module/unit-control/index.mjs.map +2 -2
  338. package/build-module/utils/dropdown-motion.mjs.map +2 -2
  339. package/build-module/validated-form-controls/components/checkbox-control.mjs +1 -0
  340. package/build-module/validated-form-controls/components/checkbox-control.mjs.map +2 -2
  341. package/build-module/validated-form-controls/components/combobox-control.mjs +1 -0
  342. package/build-module/validated-form-controls/components/combobox-control.mjs.map +2 -2
  343. package/build-module/validated-form-controls/components/custom-select-control.mjs +1 -0
  344. package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
  345. package/build-module/validated-form-controls/components/form-token-field.mjs +1 -0
  346. package/build-module/validated-form-controls/components/form-token-field.mjs.map +2 -2
  347. package/build-module/validated-form-controls/components/input-control.mjs +1 -0
  348. package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
  349. package/build-module/validated-form-controls/components/number-control.mjs +1 -0
  350. package/build-module/validated-form-controls/components/number-control.mjs.map +2 -2
  351. package/build-module/validated-form-controls/components/radio-control.mjs +1 -0
  352. package/build-module/validated-form-controls/components/radio-control.mjs.map +2 -2
  353. package/build-module/validated-form-controls/components/range-control.mjs +1 -0
  354. package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
  355. package/build-module/validated-form-controls/components/select-control.mjs +1 -0
  356. package/build-module/validated-form-controls/components/select-control.mjs.map +2 -2
  357. package/build-module/validated-form-controls/components/text-control.mjs +1 -0
  358. package/build-module/validated-form-controls/components/text-control.mjs.map +2 -2
  359. package/build-module/validated-form-controls/components/textarea-control.mjs +1 -0
  360. package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
  361. package/build-module/validated-form-controls/components/toggle-control.mjs +1 -0
  362. package/build-module/validated-form-controls/components/toggle-control.mjs.map +2 -2
  363. package/build-module/validated-form-controls/components/toggle-group-control.mjs +1 -0
  364. package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +2 -2
  365. package/build-module/validated-form-controls/control-with-error.mjs +1 -0
  366. package/build-module/validated-form-controls/control-with-error.mjs.map +2 -2
  367. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  368. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  369. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  370. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  371. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  372. package/build-types/animate/stories/index.story.d.ts +8 -8
  373. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  374. package/build-types/badge/stories/index.story.d.ts +1 -1
  375. package/build-types/badge/stories/index.story.d.ts.map +1 -1
  376. package/build-types/base-control/stories/index.story.d.ts +2 -2
  377. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  378. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  379. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  380. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  381. package/build-types/border-control/stories/index.story.d.ts +6 -6
  382. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  383. package/build-types/box-control/index.d.ts.map +1 -1
  384. package/build-types/box-control/stories/index.story.d.ts +8 -8
  385. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  386. package/build-types/button/deprecated.d.ts.map +1 -1
  387. package/build-types/button/index.d.ts +1 -1
  388. package/build-types/button/index.d.ts.map +1 -1
  389. package/build-types/button/stories/e2e/index.story.d.ts +2 -2
  390. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  391. package/build-types/button/stories/index.story.d.ts +9 -9
  392. package/build-types/button/stories/index.story.d.ts.map +1 -1
  393. package/build-types/button-group/index.d.ts.map +1 -1
  394. package/build-types/button-group/stories/index.story.d.ts +1 -1
  395. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  396. package/build-types/calendar/stories/date-calendar.story.d.ts +1 -1
  397. package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
  398. package/build-types/calendar/stories/date-range-calendar.story.d.ts +1 -1
  399. package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
  400. package/build-types/card/card-divider/hook.d.ts +1 -1
  401. package/build-types/card/stories/index.story.d.ts +1 -1
  402. package/build-types/card/stories/index.story.d.ts.map +1 -1
  403. package/build-types/checkbox-control/stories/index.story.d.ts +1 -1
  404. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  405. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  406. package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -0
  407. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  408. package/build-types/circular-option-picker/stories/index.story.d.ts +6 -6
  409. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  410. package/build-types/clipboard-button/index.d.ts.map +1 -1
  411. package/build-types/clipboard-button/types.d.ts +1 -0
  412. package/build-types/clipboard-button/types.d.ts.map +1 -1
  413. package/build-types/color-indicator/index.d.ts.map +1 -1
  414. package/build-types/color-indicator/stories/index.story.d.ts +1 -1
  415. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  416. package/build-types/color-palette/index.d.ts.map +1 -1
  417. package/build-types/color-palette/stories/index.story.d.ts +4 -4
  418. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  419. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  420. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  421. package/build-types/combobox-control/stories/index.story.d.ts +5 -5
  422. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  423. package/build-types/composite/legacy/stories/index.story.d.ts +1 -1
  424. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  425. package/build-types/composite/legacy/stories/utils.d.ts +1 -1
  426. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  427. package/build-types/composite/stories/index.story.d.ts +1 -1
  428. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  429. package/build-types/confirm-dialog/stories/index.story.d.ts +3 -3
  430. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  431. package/build-types/context/context-system-provider.d.ts.map +1 -1
  432. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  433. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  434. package/build-types/custom-select-control/stories/index.story.d.ts +4 -4
  435. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  436. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -4
  437. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  438. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  439. package/build-types/date-time/stories/date-time.story.d.ts +1 -1
  440. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  441. package/build-types/date-time/stories/date.story.d.ts +1 -1
  442. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  443. package/build-types/date-time/stories/time.story.d.ts +2 -2
  444. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  445. package/build-types/disabled/stories/index.story.d.ts +1 -1
  446. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  447. package/build-types/disclosure/index.d.ts.map +1 -1
  448. package/build-types/divider/stories/index.story.d.ts +1 -1
  449. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  450. package/build-types/draggable/stories/index.story.d.ts +1 -1
  451. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  452. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  453. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  454. package/build-types/dropdown/stories/index.story.d.ts +1 -1
  455. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  456. package/build-types/dropdown-menu/stories/index.story.d.ts +1 -1
  457. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  458. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  459. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  460. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +4 -4
  461. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  462. package/build-types/elevation/stories/index.story.d.ts +1 -1
  463. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  464. package/build-types/external-link/index.d.ts.map +1 -1
  465. package/build-types/external-link/stories/index.story.d.ts +1 -1
  466. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  467. package/build-types/flex/stories/index.story.d.ts +1 -1
  468. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  469. package/build-types/focal-point-picker/stories/index.story.d.ts +5 -5
  470. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  471. package/build-types/font-size-picker/index.d.ts.map +1 -1
  472. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +1 -1
  473. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  474. package/build-types/font-size-picker/stories/index.story.d.ts +1 -1
  475. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  476. package/build-types/form-file-upload/index.d.ts.map +1 -1
  477. package/build-types/form-file-upload/stories/index.story.d.ts +6 -6
  478. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  479. package/build-types/form-toggle/index.d.ts.map +1 -1
  480. package/build-types/form-toggle/stories/index.story.d.ts +1 -1
  481. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  482. package/build-types/form-token-field/stories/index.story.d.ts +1 -1
  483. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  484. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  485. package/build-types/gradient-picker/stories/index.story.d.ts +4 -4
  486. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  487. package/build-types/grid/stories/index.story.d.ts +1 -1
  488. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  489. package/build-types/guide/stories/index.story.d.ts +2 -2
  490. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  491. package/build-types/h-stack/stories/e2e/index.story.d.ts +1 -1
  492. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  493. package/build-types/h-stack/stories/index.story.d.ts +1 -1
  494. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  495. package/build-types/heading/stories/index.story.d.ts +1 -1
  496. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  497. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  498. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  499. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  500. package/build-types/icon/stories/index.story.d.ts +5 -5
  501. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  502. package/build-types/index.d.ts +1 -0
  503. package/build-types/index.d.ts.map +1 -1
  504. package/build-types/input-control/index.d.ts.map +1 -1
  505. package/build-types/input-control/stories/index.story.d.ts +8 -8
  506. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  507. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  508. package/build-types/item-group/stories/index.story.d.ts +1 -1
  509. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  510. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  511. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  512. package/build-types/menu/popover.d.ts.map +1 -1
  513. package/build-types/menu/stories/index.story.d.ts +1 -1
  514. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  515. package/build-types/menu/styles.d.ts.map +1 -1
  516. package/build-types/menu-group/stories/index.story.d.ts +2 -2
  517. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  518. package/build-types/menu-item/index.d.ts.map +1 -1
  519. package/build-types/menu-item/stories/index.story.d.ts +5 -5
  520. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  521. package/build-types/menu-items-choice/stories/index.story.d.ts +1 -1
  522. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  523. package/build-types/modal/index.d.ts.map +1 -1
  524. package/build-types/modal/stories/index.story.d.ts +1 -1
  525. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  526. package/build-types/navigable-container/menu.d.ts.map +1 -1
  527. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +1 -1
  528. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  529. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +1 -1
  530. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  531. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  532. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  533. package/build-types/navigation/stories/index.story.d.ts +7 -7
  534. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  535. package/build-types/navigation/stories/utils/controlled-state.d.ts +1 -1
  536. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  537. package/build-types/navigation/stories/utils/default.d.ts +1 -1
  538. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  539. package/build-types/navigation/stories/utils/group.d.ts +1 -1
  540. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  541. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +1 -1
  542. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  543. package/build-types/navigation/stories/utils/more-examples.d.ts +1 -1
  544. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  545. package/build-types/navigation/stories/utils/search.d.ts +1 -1
  546. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  547. package/build-types/navigator/stories/index.story.d.ts +1 -1
  548. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  549. package/build-types/notice/stories/index.story.d.ts +6 -6
  550. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  551. package/build-types/number-control/index.d.ts.map +1 -1
  552. package/build-types/number-control/stories/index.story.d.ts +2 -2
  553. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  554. package/build-types/palette-edit/stories/index.story.d.ts +3 -3
  555. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  556. package/build-types/panel/body.d.ts.map +1 -1
  557. package/build-types/panel/index.d.ts.map +1 -1
  558. package/build-types/panel/row.d.ts.map +1 -1
  559. package/build-types/panel/stories/index.story.d.ts +1 -1
  560. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  561. package/build-types/placeholder/stories/index.story.d.ts +1 -1
  562. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  563. package/build-types/popover/stories/index.story.d.ts +1 -1
  564. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  565. package/build-types/progress-bar/index.d.ts.map +1 -1
  566. package/build-types/progress-bar/stories/index.story.d.ts +2 -2
  567. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  568. package/build-types/query-controls/stories/index.story.d.ts +2 -2
  569. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  570. package/build-types/radio-control/stories/index.story.d.ts +1 -1
  571. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  572. package/build-types/radio-group/index.d.ts.map +1 -1
  573. package/build-types/radio-group/radio.d.ts.map +1 -1
  574. package/build-types/radio-group/stories/index.story.d.ts +1 -1
  575. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  576. package/build-types/range-control/index.d.ts +2 -2
  577. package/build-types/range-control/index.d.ts.map +1 -1
  578. package/build-types/range-control/stories/index.story.d.ts +1 -1
  579. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  580. package/build-types/resizable-box/index.d.ts.map +1 -1
  581. package/build-types/resizable-box/stories/index.story.d.ts +3 -3
  582. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  583. package/build-types/responsive-wrapper/stories/index.story.d.ts +2 -2
  584. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  585. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  586. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  587. package/build-types/scroll-lock/stories/index.story.d.ts +1 -1
  588. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  589. package/build-types/scrollable/stories/index.story.d.ts +1 -1
  590. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  591. package/build-types/search-control/index.d.ts.map +1 -1
  592. package/build-types/search-control/stories/index.story.d.ts +2 -2
  593. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  594. package/build-types/select-control/index.d.ts.map +1 -1
  595. package/build-types/select-control/stories/index.story.d.ts +6 -6
  596. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  597. package/build-types/shortcut/stories/index.story.d.ts +2 -2
  598. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  599. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  600. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  601. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  602. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +2 -3
  603. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  604. package/build-types/slot-fill/context.d.ts +2 -2
  605. package/build-types/slot-fill/context.d.ts.map +1 -1
  606. package/build-types/slot-fill/fill.d.ts +1 -1
  607. package/build-types/slot-fill/fill.d.ts.map +1 -1
  608. package/build-types/slot-fill/index.d.ts +3 -4
  609. package/build-types/slot-fill/index.d.ts.map +1 -1
  610. package/build-types/slot-fill/provider.d.ts.map +1 -1
  611. package/build-types/slot-fill/stories/index.story.d.ts +1 -1
  612. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  613. package/build-types/slot-fill/types.d.ts +23 -25
  614. package/build-types/slot-fill/types.d.ts.map +1 -1
  615. package/build-types/snackbar/index.d.ts.map +1 -1
  616. package/build-types/snackbar/stories/index.story.d.ts +1 -1
  617. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  618. package/build-types/snackbar/stories/list.story.d.ts +1 -1
  619. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  620. package/build-types/spacer/stories/index.story.d.ts +1 -1
  621. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  622. package/build-types/spinner/index.d.ts.map +1 -1
  623. package/build-types/spinner/stories/index.story.d.ts +1 -1
  624. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  625. package/build-types/surface/stories/index.story.d.ts +1 -1
  626. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  627. package/build-types/tab-panel/index.d.ts.map +1 -1
  628. package/build-types/tab-panel/stories/index.story.d.ts +5 -5
  629. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  630. package/build-types/tabs/stories/index.story.d.ts +8 -8
  631. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  632. package/build-types/text/stories/index.story.d.ts +4 -4
  633. package/build-types/text/stories/index.story.d.ts.map +1 -1
  634. package/build-types/text-control/index.d.ts.map +1 -1
  635. package/build-types/text-control/stories/index.story.d.ts +1 -1
  636. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  637. package/build-types/text-highlight/index.d.ts +4 -1
  638. package/build-types/text-highlight/index.d.ts.map +1 -1
  639. package/build-types/text-highlight/stories/index.story.d.ts +1 -1
  640. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  641. package/build-types/textarea-control/index.d.ts.map +1 -1
  642. package/build-types/textarea-control/stories/index.story.d.ts +1 -1
  643. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  644. package/build-types/theme/stories/index.story.d.ts +2 -2
  645. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  646. package/build-types/tip/stories/index.story.d.ts +1 -1
  647. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  648. package/build-types/toggle-control/index.d.ts.map +1 -1
  649. package/build-types/toggle-control/stories/index.story.d.ts +3 -3
  650. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  651. package/build-types/toggle-group-control/stories/index.story.d.ts +1 -1
  652. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  653. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  654. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  655. package/build-types/toolbar/stories/index.story.d.ts +4 -4
  656. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  657. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  658. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  659. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  660. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  661. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  662. package/build-types/tools-panel/stories/index.story.d.ts +1 -1
  663. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  664. package/build-types/tooltip/index.d.ts.map +1 -1
  665. package/build-types/tooltip/stories/index.story.d.ts +2 -2
  666. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  667. package/build-types/tree-grid/cell.d.ts.map +1 -1
  668. package/build-types/tree-grid/index.d.ts.map +1 -1
  669. package/build-types/tree-grid/item.d.ts.map +1 -1
  670. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  671. package/build-types/tree-grid/row.d.ts.map +1 -1
  672. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  673. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  674. package/build-types/tree-select/index.d.ts.map +1 -1
  675. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  676. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  677. package/build-types/truncate/stories/index.story.d.ts +1 -1
  678. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  679. package/build-types/unit-control/index.d.ts.map +1 -1
  680. package/build-types/unit-control/stories/index.story.d.ts +1 -1
  681. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  682. package/build-types/utils/dropdown-motion.d.ts.map +1 -1
  683. package/build-types/v-stack/stories/e2e/index.story.d.ts +1 -1
  684. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  685. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  686. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  687. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
  688. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +1 -1
  689. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
  690. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +1 -1
  691. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
  692. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +1 -1
  693. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
  694. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +1 -1
  695. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
  696. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +1 -1
  697. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
  698. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +1 -1
  699. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
  700. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +1 -1
  701. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
  702. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +1 -1
  703. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
  704. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +1 -1
  705. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
  706. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +1 -1
  707. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
  708. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +1 -1
  709. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -1
  710. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +1 -1
  711. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
  712. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +1 -1
  713. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
  714. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +1 -1
  715. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
  716. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +1 -1
  717. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
  718. package/build-types/view/stories/index.story.d.ts +1 -1
  719. package/build-types/view/stories/index.story.d.ts.map +1 -1
  720. package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
  721. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  722. package/build-types/z-stack/stories/index.story.d.ts +1 -1
  723. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  724. package/package.json +27 -25
  725. package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
  726. package/src/angle-picker-control/index.tsx +1 -0
  727. package/src/angle-picker-control/stories/index.story.tsx +1 -1
  728. package/src/animate/stories/index.story.tsx +1 -1
  729. package/src/badge/stories/index.story.tsx +1 -1
  730. package/src/base-control/stories/index.story.tsx +4 -2
  731. package/src/border-box-control/border-box-control-split-controls/component.tsx +9 -0
  732. package/src/border-box-control/stories/index.story.tsx +3 -1
  733. package/src/border-box-control/test/index.tsx +51 -20
  734. package/src/border-control/stories/index.story.tsx +2 -1
  735. package/src/border-control/test/index.js +37 -34
  736. package/src/box-control/index.tsx +6 -0
  737. package/src/box-control/stories/index.story.tsx +3 -2
  738. package/src/button/deprecated.tsx +2 -0
  739. package/src/button/index.tsx +16 -15
  740. package/src/button/stories/e2e/index.story.tsx +9 -5
  741. package/src/button/stories/index.story.tsx +14 -11
  742. package/src/button/test/index.tsx +0 -5
  743. package/src/button-group/index.tsx +1 -0
  744. package/src/button-group/stories/index.story.tsx +5 -3
  745. package/src/calendar/stories/date-calendar.story.tsx +1 -1
  746. package/src/calendar/stories/date-range-calendar.story.tsx +1 -1
  747. package/src/card/stories/index.story.tsx +4 -2
  748. package/src/checkbox-control/stories/index.story.tsx +1 -1
  749. package/src/circular-option-picker/circular-option-picker-option.tsx +2 -1
  750. package/src/circular-option-picker/circular-option-picker.tsx +2 -0
  751. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  752. package/src/clipboard-button/index.tsx +2 -0
  753. package/src/clipboard-button/types.ts +1 -0
  754. package/src/color-indicator/index.tsx +1 -0
  755. package/src/color-indicator/stories/index.story.tsx +1 -1
  756. package/src/color-palette/index.tsx +1 -0
  757. package/src/color-palette/stories/index.story.tsx +1 -1
  758. package/src/color-picker/stories/index.story.tsx +1 -1
  759. package/src/combobox-control/index.tsx +1 -1
  760. package/src/combobox-control/stories/index.story.tsx +2 -1
  761. package/src/composite/legacy/stories/index.story.tsx +1 -1
  762. package/src/composite/legacy/stories/utils.tsx +1 -1
  763. package/src/composite/stories/index.story.tsx +1 -1
  764. package/src/confirm-dialog/stories/index.story.tsx +6 -2
  765. package/src/context/context-system-provider.js +2 -1
  766. package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
  767. package/src/custom-select-control/stories/index.story.tsx +2 -1
  768. package/src/custom-select-control-v2/stories/index.story.tsx +1 -1
  769. package/src/date-time/date-time/index.tsx +1 -0
  770. package/src/date-time/stories/date-time.story.tsx +1 -1
  771. package/src/date-time/stories/date.story.tsx +1 -1
  772. package/src/date-time/stories/time.story.tsx +1 -1
  773. package/src/disabled/stories/index.story.tsx +1 -1
  774. package/src/disclosure/index.tsx +1 -0
  775. package/src/divider/stories/index.story.tsx +1 -1
  776. package/src/draggable/stories/index.story.tsx +1 -1
  777. package/src/drop-zone/stories/index.story.tsx +1 -1
  778. package/src/dropdown/stories/index.story.tsx +2 -1
  779. package/src/dropdown-menu/stories/index.story.tsx +1 -1
  780. package/src/duotone-picker/duotone-picker.tsx +1 -1
  781. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  782. package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
  783. package/src/elevation/stories/index.story.tsx +1 -1
  784. package/src/external-link/index.tsx +1 -0
  785. package/src/external-link/stories/index.story.tsx +1 -1
  786. package/src/flex/stories/index.story.tsx +1 -1
  787. package/src/focal-point-picker/stories/index.story.tsx +1 -1
  788. package/src/font-size-picker/index.tsx +1 -0
  789. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -1
  790. package/src/font-size-picker/stories/index.story.tsx +2 -1
  791. package/src/form-file-upload/index.tsx +2 -0
  792. package/src/form-file-upload/stories/index.story.tsx +2 -2
  793. package/src/form-toggle/index.tsx +1 -0
  794. package/src/form-toggle/stories/index.story.tsx +1 -1
  795. package/src/form-token-field/stories/index.story.tsx +3 -1
  796. package/src/form-token-field/token-input.tsx +1 -0
  797. package/src/form-token-field/token.tsx +2 -2
  798. package/src/gradient-picker/stories/index.story.tsx +1 -1
  799. package/src/grid/stories/index.story.tsx +1 -1
  800. package/src/guide/stories/index.story.tsx +6 -2
  801. package/src/h-stack/stories/e2e/index.story.tsx +1 -1
  802. package/src/h-stack/stories/index.story.tsx +1 -1
  803. package/src/heading/stories/index.story.tsx +1 -1
  804. package/src/higher-order/navigate-regions/index.tsx +7 -5
  805. package/src/higher-order/with-fallback-styles/index.tsx +2 -2
  806. package/src/higher-order/with-focus-outside/index.tsx +25 -24
  807. package/src/higher-order/with-spoken-messages/index.tsx +10 -7
  808. package/src/icon/stories/index.story.tsx +1 -1
  809. package/src/index.ts +6 -0
  810. package/src/input-control/index.tsx +1 -0
  811. package/src/input-control/stories/index.story.tsx +3 -2
  812. package/src/input-control/styles/input-control-styles.tsx +0 -4
  813. package/src/item-group/stories/index.story.tsx +1 -1
  814. package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
  815. package/src/menu/popover.tsx +1 -0
  816. package/src/menu/stories/index.story.tsx +5 -2
  817. package/src/menu/styles.ts +36 -26
  818. package/src/menu-group/stories/index.story.tsx +1 -1
  819. package/src/menu-item/index.tsx +1 -0
  820. package/src/menu-item/stories/index.story.tsx +1 -1
  821. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  822. package/src/modal/index.tsx +1 -0
  823. package/src/modal/stories/index.story.tsx +11 -3
  824. package/src/navigable-container/menu.tsx +1 -0
  825. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  826. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  827. package/src/navigable-container/tabbable.tsx +1 -0
  828. package/src/navigation/back-button/index.tsx +1 -0
  829. package/src/navigation/stories/index.story.tsx +1 -1
  830. package/src/navigation/stories/utils/controlled-state.tsx +4 -1
  831. package/src/navigation/stories/utils/default.tsx +1 -1
  832. package/src/navigation/stories/utils/group.tsx +1 -1
  833. package/src/navigation/stories/utils/hide-if-empty.tsx +1 -1
  834. package/src/navigation/stories/utils/more-examples.tsx +1 -1
  835. package/src/navigation/stories/utils/search.tsx +1 -1
  836. package/src/navigator/stories/index.story.tsx +2 -1
  837. package/src/navigator/test/index.tsx +1 -1
  838. package/src/notice/stories/index.story.tsx +1 -1
  839. package/src/number-control/index.tsx +1 -0
  840. package/src/number-control/stories/index.story.tsx +2 -1
  841. package/src/palette-edit/stories/index.story.tsx +1 -1
  842. package/src/panel/body.tsx +1 -0
  843. package/src/panel/index.tsx +1 -0
  844. package/src/panel/row.tsx +1 -0
  845. package/src/panel/stories/index.story.tsx +1 -1
  846. package/src/placeholder/stories/index.story.tsx +1 -1
  847. package/src/popover/stories/index.story.tsx +9 -2
  848. package/src/progress-bar/index.tsx +1 -0
  849. package/src/progress-bar/stories/index.story.tsx +1 -1
  850. package/src/query-controls/stories/index.story.tsx +1 -1
  851. package/src/radio-control/stories/index.story.tsx +1 -1
  852. package/src/radio-group/index.tsx +1 -0
  853. package/src/radio-group/radio.tsx +3 -0
  854. package/src/radio-group/stories/index.story.tsx +1 -1
  855. package/src/range-control/index.tsx +1 -0
  856. package/src/range-control/stories/index.story.tsx +5 -1
  857. package/src/resizable-box/index.tsx +1 -0
  858. package/src/resizable-box/stories/index.story.tsx +1 -1
  859. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  860. package/src/sandbox/stories/index.story.tsx +1 -1
  861. package/src/scroll-lock/stories/index.story.tsx +6 -2
  862. package/src/scrollable/stories/index.story.tsx +1 -1
  863. package/src/search-control/index.tsx +1 -0
  864. package/src/search-control/stories/index.story.tsx +1 -1
  865. package/src/select-control/index.tsx +3 -0
  866. package/src/select-control/stories/index.story.tsx +3 -1
  867. package/src/shortcut/stories/index.story.tsx +1 -1
  868. package/src/slot-fill/bubbles-virtually/slot.tsx +16 -9
  869. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +30 -4
  870. package/src/slot-fill/bubbles-virtually/use-slot.ts +7 -3
  871. package/src/slot-fill/context.ts +15 -4
  872. package/src/slot-fill/fill.tsx +74 -0
  873. package/src/slot-fill/index.tsx +17 -33
  874. package/src/slot-fill/provider.tsx +49 -35
  875. package/src/slot-fill/slot.tsx +4 -4
  876. package/src/slot-fill/stories/index.story.tsx +1 -1
  877. package/src/slot-fill/test/__snapshots__/slot.js.snap +14 -0
  878. package/src/slot-fill/test/slot.js +24 -1
  879. package/src/slot-fill/types.ts +16 -32
  880. package/src/snackbar/index.tsx +1 -0
  881. package/src/snackbar/stories/index.story.tsx +1 -1
  882. package/src/snackbar/stories/list.story.tsx +1 -1
  883. package/src/spacer/stories/index.story.tsx +1 -1
  884. package/src/spinner/index.tsx +1 -0
  885. package/src/spinner/stories/index.story.tsx +1 -1
  886. package/src/surface/stories/index.story.tsx +1 -1
  887. package/src/tab-panel/index.tsx +1 -0
  888. package/src/tab-panel/stories/index.story.tsx +1 -1
  889. package/src/tabs/stories/index.story.tsx +11 -3
  890. package/src/text/stories/index.story.tsx +1 -1
  891. package/src/text-control/index.tsx +1 -0
  892. package/src/text-control/stories/index.story.tsx +2 -1
  893. package/src/text-highlight/index.tsx +2 -0
  894. package/src/text-highlight/stories/index.story.tsx +1 -1
  895. package/src/textarea-control/index.tsx +1 -0
  896. package/src/textarea-control/stories/index.story.tsx +1 -1
  897. package/src/theme/stories/index.story.tsx +8 -4
  898. package/src/tip/stories/index.story.tsx +1 -1
  899. package/src/toggle-control/index.tsx +1 -0
  900. package/src/toggle-control/stories/index.story.tsx +1 -1
  901. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  902. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +1 -0
  903. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -0
  904. package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
  905. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -0
  906. package/src/toolbar/stories/index.story.tsx +1 -1
  907. package/src/toolbar/toolbar/index.tsx +1 -0
  908. package/src/toolbar/toolbar/toolbar-container.tsx +1 -0
  909. package/src/toolbar/toolbar-button/index.tsx +1 -0
  910. package/src/toolbar/toolbar-dropdown-menu/index.tsx +1 -0
  911. package/src/toolbar/toolbar-item/index.tsx +1 -0
  912. package/src/tools-panel/stories/index.story.tsx +1 -1
  913. package/src/tooltip/index.tsx +1 -0
  914. package/src/tooltip/stories/index.story.tsx +14 -4
  915. package/src/tree-grid/cell.tsx +1 -0
  916. package/src/tree-grid/index.tsx +1 -0
  917. package/src/tree-grid/item.tsx +1 -0
  918. package/src/tree-grid/roving-tab-index-item.tsx +1 -0
  919. package/src/tree-grid/row.tsx +1 -0
  920. package/src/tree-grid/stories/index.story.tsx +6 -2
  921. package/src/tree-select/index.tsx +2 -0
  922. package/src/tree-select/stories/index.story.tsx +2 -1
  923. package/src/truncate/stories/index.story.tsx +1 -1
  924. package/src/unit-control/index.tsx +1 -0
  925. package/src/unit-control/stories/index.story.tsx +3 -1
  926. package/src/utils/dropdown-motion.ts +1 -0
  927. package/src/v-stack/stories/e2e/index.story.tsx +1 -1
  928. package/src/v-stack/stories/index.story.tsx +1 -1
  929. package/src/validated-form-controls/components/checkbox-control.tsx +1 -0
  930. package/src/validated-form-controls/components/combobox-control.tsx +1 -0
  931. package/src/validated-form-controls/components/custom-select-control.tsx +1 -0
  932. package/src/validated-form-controls/components/form-token-field.tsx +1 -0
  933. package/src/validated-form-controls/components/input-control.tsx +1 -0
  934. package/src/validated-form-controls/components/number-control.tsx +1 -0
  935. package/src/validated-form-controls/components/radio-control.tsx +1 -0
  936. package/src/validated-form-controls/components/range-control.tsx +1 -0
  937. package/src/validated-form-controls/components/select-control.tsx +1 -0
  938. package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
  939. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
  940. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
  941. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
  942. package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
  943. package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
  944. package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
  945. package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
  946. package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
  947. package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
  948. package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
  949. package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
  950. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
  951. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
  952. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
  953. package/src/validated-form-controls/components/text-control.tsx +1 -0
  954. package/src/validated-form-controls/components/textarea-control.tsx +1 -0
  955. package/src/validated-form-controls/components/toggle-control.tsx +1 -0
  956. package/src/validated-form-controls/components/toggle-group-control.tsx +1 -0
  957. package/src/validated-form-controls/control-with-error.tsx +1 -0
  958. package/src/view/stories/index.story.tsx +1 -1
  959. package/src/visually-hidden/stories/index.story.tsx +1 -1
  960. package/src/z-stack/stories/index.story.tsx +1 -1
  961. package/build/slot-fill/bubbles-virtually/fill.cjs +0 -63
  962. package/build/slot-fill/bubbles-virtually/fill.cjs.map +0 -7
  963. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs +0 -59
  964. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs.map +0 -7
  965. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs +0 -105
  966. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs.map +0 -7
  967. package/build-module/slot-fill/bubbles-virtually/fill.mjs +0 -32
  968. package/build-module/slot-fill/bubbles-virtually/fill.mjs.map +0 -7
  969. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs +0 -28
  970. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs.map +0 -7
  971. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs +0 -74
  972. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs.map +0 -7
  973. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -3
  974. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +0 -1
  975. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -7
  976. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +0 -1
  977. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -3
  978. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +0 -1
  979. package/src/slot-fill/bubbles-virtually/fill.tsx +0 -50
  980. package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +0 -34
  981. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +0 -106
  982. package/src/slot-fill/fill.ts +0 -32
@@ -94,6 +94,7 @@ function UnforwardedMenuItem(props, ref) {
94
94
  });
95
95
  }
96
96
  var MenuItem = (0, import_element.forwardRef)(UnforwardedMenuItem);
97
+ MenuItem.displayName = "MenuItem";
97
98
  var menu_item_default = MenuItem;
98
99
  // Annotate the CommonJS export names for ESM import in node:
99
100
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/menu-item/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from '../shortcut';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedMenuItem(props, ref) {\n let {\n children,\n info,\n className,\n icon,\n iconPosition = 'right',\n shortcut,\n isSelected,\n role = 'menuitem',\n suffix,\n ...buttonProps\n } = props;\n className = clsx('components-menu-item__button', className);\n if (info) {\n children = /*#__PURE__*/_jsxs(\"span\", {\n className: \"components-menu-item__info-wrapper\",\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__item\",\n children: children\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__info\",\n children: info\n })]\n });\n }\n if (icon && typeof icon !== 'string') {\n icon = cloneElement(icon, {\n className: clsx('components-menu-items__item-icon', {\n 'has-icon-right': iconPosition === 'right'\n })\n });\n }\n return /*#__PURE__*/_jsxs(Button, {\n size: \"compact\",\n ref: ref\n // Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n ,\n \"aria-checked\": role === 'menuitemcheckbox' || role === 'menuitemradio' ? isSelected : undefined,\n role: role,\n icon: iconPosition === 'left' ? icon : undefined,\n className: className,\n accessibleWhenDisabled: true,\n ...buttonProps,\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__item\",\n children: children\n }), !suffix && /*#__PURE__*/_jsx(Shortcut, {\n className: \"components-menu-item__shortcut\",\n shortcut: shortcut\n }), !suffix && icon && iconPosition === 'right' && /*#__PURE__*/_jsx(Icon, {\n icon: icon\n }), suffix]\n });\n}\n\n/**\n * MenuItem is a component which renders a button intended to be used in combination with the `DropdownMenu` component.\n *\n * ```jsx\n * import { MenuItem } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyMenuItem = () => {\n * \tconst [ isActive, setIsActive ] = useState( true );\n *\n * \treturn (\n * \t\t<MenuItem\n * \t\t\ticon={ isActive ? 'yes' : 'no' }\n * \t\t\tisSelected={ isActive }\n * \t\t\trole=\"menuitemcheckbox\"\n * \t\t\tonClick={ () => setIsActive( ( state ) => ! state ) }\n * \t\t>\n * \t\t\tToggle\n * \t\t</MenuItem>\n * \t);\n * };\n * ```\n */\nexport const MenuItem = forwardRef(UnforwardedMenuItem);\nexport default MenuItem;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,qBAAyC;AAKzC,sBAAqB;AACrB,oBAAmB;AACnB,kBAAiB;AACjB,yBAA2C;AAC3C,SAAS,oBAAoB,OAAO,KAAK;AACvC,MAAI;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,kBAAY,YAAAA,SAAK,gCAAgC,SAAS;AAC1D,MAAI,MAAM;AACR,eAAwB,uCAAAC,MAAM,QAAQ;AAAA,MACpC,WAAW;AAAA,MACX,UAAU,CAAc,uCAAAC,KAAK,QAAQ;AAAA,QACnC,WAAW;AAAA,QACX;AAAA,MACF,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,QAC5B,WAAW;AAAA,QACX,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH;AACA,MAAI,QAAQ,OAAO,SAAS,UAAU;AACpC,eAAO,6BAAa,MAAM;AAAA,MACxB,eAAW,YAAAF,SAAK,oCAAoC;AAAA,QAClD,kBAAkB,iBAAiB;AAAA,MACrC,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACA,SAAoB,uCAAAC,MAAM,cAAAE,SAAQ;AAAA,IAChC,MAAM;AAAA,IACN;AAAA,IAGA,gBAAgB,SAAS,sBAAsB,SAAS,kBAAkB,aAAa;AAAA,IACvF;AAAA,IACA,MAAM,iBAAiB,SAAS,OAAO;AAAA,IACvC;AAAA,IACA,wBAAwB;AAAA,IACxB,GAAG;AAAA,IACH,UAAU,CAAc,uCAAAD,KAAK,QAAQ;AAAA,MACnC,WAAW;AAAA,MACX;AAAA,IACF,CAAC,GAAG,CAAC,UAAuB,uCAAAA,KAAK,gBAAAE,SAAU;AAAA,MACzC,WAAW;AAAA,MACX;AAAA,IACF,CAAC,GAAG,CAAC,UAAU,QAAQ,iBAAiB,WAAwB,uCAAAF,KAAK,YAAAG,SAAM;AAAA,MACzE;AAAA,IACF,CAAC,GAAG,MAAM;AAAA,EACZ,CAAC;AACH;AAyBO,IAAM,eAAW,2BAAW,mBAAmB;AACtD,IAAO,oBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from '../shortcut';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedMenuItem(props, ref) {\n let {\n children,\n info,\n className,\n icon,\n iconPosition = 'right',\n shortcut,\n isSelected,\n role = 'menuitem',\n suffix,\n ...buttonProps\n } = props;\n className = clsx('components-menu-item__button', className);\n if (info) {\n children = /*#__PURE__*/_jsxs(\"span\", {\n className: \"components-menu-item__info-wrapper\",\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__item\",\n children: children\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__info\",\n children: info\n })]\n });\n }\n if (icon && typeof icon !== 'string') {\n icon = cloneElement(icon, {\n className: clsx('components-menu-items__item-icon', {\n 'has-icon-right': iconPosition === 'right'\n })\n });\n }\n return /*#__PURE__*/_jsxs(Button, {\n size: \"compact\",\n ref: ref\n // Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n ,\n \"aria-checked\": role === 'menuitemcheckbox' || role === 'menuitemradio' ? isSelected : undefined,\n role: role,\n icon: iconPosition === 'left' ? icon : undefined,\n className: className,\n accessibleWhenDisabled: true,\n ...buttonProps,\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__item\",\n children: children\n }), !suffix && /*#__PURE__*/_jsx(Shortcut, {\n className: \"components-menu-item__shortcut\",\n shortcut: shortcut\n }), !suffix && icon && iconPosition === 'right' && /*#__PURE__*/_jsx(Icon, {\n icon: icon\n }), suffix]\n });\n}\n\n/**\n * MenuItem is a component which renders a button intended to be used in combination with the `DropdownMenu` component.\n *\n * ```jsx\n * import { MenuItem } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyMenuItem = () => {\n * \tconst [ isActive, setIsActive ] = useState( true );\n *\n * \treturn (\n * \t\t<MenuItem\n * \t\t\ticon={ isActive ? 'yes' : 'no' }\n * \t\t\tisSelected={ isActive }\n * \t\t\trole=\"menuitemcheckbox\"\n * \t\t\tonClick={ () => setIsActive( ( state ) => ! state ) }\n * \t\t>\n * \t\t\tToggle\n * \t\t</MenuItem>\n * \t);\n * };\n * ```\n */\nexport const MenuItem = forwardRef(UnforwardedMenuItem);\nMenuItem.displayName = 'MenuItem';\nexport default MenuItem;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,qBAAyC;AAKzC,sBAAqB;AACrB,oBAAmB;AACnB,kBAAiB;AACjB,yBAA2C;AAC3C,SAAS,oBAAoB,OAAO,KAAK;AACvC,MAAI;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,kBAAY,YAAAA,SAAK,gCAAgC,SAAS;AAC1D,MAAI,MAAM;AACR,eAAwB,uCAAAC,MAAM,QAAQ;AAAA,MACpC,WAAW;AAAA,MACX,UAAU,CAAc,uCAAAC,KAAK,QAAQ;AAAA,QACnC,WAAW;AAAA,QACX;AAAA,MACF,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,QAC5B,WAAW;AAAA,QACX,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH;AACA,MAAI,QAAQ,OAAO,SAAS,UAAU;AACpC,eAAO,6BAAa,MAAM;AAAA,MACxB,eAAW,YAAAF,SAAK,oCAAoC;AAAA,QAClD,kBAAkB,iBAAiB;AAAA,MACrC,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACA,SAAoB,uCAAAC,MAAM,cAAAE,SAAQ;AAAA,IAChC,MAAM;AAAA,IACN;AAAA,IAGA,gBAAgB,SAAS,sBAAsB,SAAS,kBAAkB,aAAa;AAAA,IACvF;AAAA,IACA,MAAM,iBAAiB,SAAS,OAAO;AAAA,IACvC;AAAA,IACA,wBAAwB;AAAA,IACxB,GAAG;AAAA,IACH,UAAU,CAAc,uCAAAD,KAAK,QAAQ;AAAA,MACnC,WAAW;AAAA,MACX;AAAA,IACF,CAAC,GAAG,CAAC,UAAuB,uCAAAA,KAAK,gBAAAE,SAAU;AAAA,MACzC,WAAW;AAAA,MACX;AAAA,IACF,CAAC,GAAG,CAAC,UAAU,QAAQ,iBAAiB,WAAwB,uCAAAF,KAAK,YAAAG,SAAM;AAAA,MACzE;AAAA,IACF,CAAC,GAAG,MAAM;AAAA,EACZ,CAAC;AACH;AAyBO,IAAM,eAAW,2BAAW,mBAAmB;AACtD,SAAS,cAAc;AACvB,IAAO,oBAAQ;",
6
6
  "names": ["clsx", "_jsxs", "_jsx", "Button", "Shortcut", "Icon"]
7
7
  }
@@ -275,6 +275,7 @@ function UnforwardedModal(props, forwardedRef) {
275
275
  }), document.body);
276
276
  }
277
277
  var Modal = (0, import_element.forwardRef)(UnforwardedModal);
278
+ Modal.displayName = "Modal";
278
279
  var modal_default = Modal;
279
280
  // Annotate the CommonJS export names for ESM import in node:
280
281
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/modal/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createPortal, useCallback, useEffect, useRef, useState, forwardRef, useLayoutEffect, createContext, useContext } from '@wordpress/element';\nimport { useInstanceId, useFocusReturn, useFocusOnMount, useConstrainedTabbing, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { Spacer } from '../spacer';\nimport { useModalExitAnimation } from './use-modal-exit-animation';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst ModalContext = createContext(new Set());\nModalContext.displayName = 'ModalContext';\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map();\nfunction UnforwardedModal(props, forwardedRef) {\n const {\n bodyOpenClassName = 'modal-open',\n role = 'dialog',\n title = null,\n focusOnMount = true,\n shouldCloseOnEsc = true,\n shouldCloseOnClickOutside = true,\n isDismissible = true,\n /* Accessibility. */\n aria = {\n labelledby: undefined,\n describedby: undefined\n },\n onRequestClose,\n icon,\n closeButtonLabel,\n children,\n style,\n overlayClassName: overlayClassnameProp,\n className,\n contentLabel,\n onKeyDown,\n isFullScreen = false,\n size,\n headerActions = null,\n __experimentalHideHeader = false\n } = props;\n const ref = useRef();\n const instanceId = useInstanceId(Modal);\n const headingId = title ? `components-modal-header-${instanceId}` : aria.labelledby;\n\n // The focus hook does not support 'firstContentElement' but this is a valid\n // value for the Modal's focusOnMount prop. The following code ensures the focus\n // hook will focus the first focusable node within the element to which it is applied.\n // When `firstContentElement` is passed as the value of the focusOnMount prop,\n // the focus hook is applied to the Modal's content element.\n // Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n // focus hook will focus the first element in the Modal's **content** when\n // `firstContentElement` is passed.\n const focusOnMountRef = useFocusOnMount(focusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount);\n const constrainedTabbingRef = useConstrainedTabbing();\n const focusReturnRef = useFocusReturn();\n const contentRef = useRef(null);\n const childrenContainerRef = useRef(null);\n const [hasScrolledContent, setHasScrolledContent] = useState(false);\n const [hasScrollableContent, setHasScrollableContent] = useState(false);\n let sizeClass;\n if (isFullScreen || size === 'fill') {\n sizeClass = 'is-full-screen';\n } else if (size) {\n sizeClass = `has-size-${size}`;\n }\n\n // Determines whether the Modal content is scrollable and updates the state.\n const isContentScrollable = useCallback(() => {\n if (!contentRef.current) {\n return;\n }\n const closestScrollContainer = getScrollContainer(contentRef.current);\n if (contentRef.current === closestScrollContainer) {\n setHasScrollableContent(true);\n } else {\n setHasScrollableContent(false);\n }\n }, [contentRef]);\n\n // Accessibly isolates/unisolates the modal.\n useEffect(() => {\n ariaHelper.modalize(ref.current);\n return () => ariaHelper.unmodalize();\n }, []);\n\n // Keeps a fresh ref for the subsequent effect.\n const onRequestCloseRef = useRef();\n useEffect(() => {\n onRequestCloseRef.current = onRequestClose;\n }, [onRequestClose]);\n\n // The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n // one should remain open at a time and the list enables closing prior ones.\n const dismissers = useContext(ModalContext);\n // Used for the tracking and dismissing any nested modals.\n const [nestedDismissers] = useState(() => new Set());\n\n // Updates the stack tracking open modals at this level and calls\n // onRequestClose for any prior and/or nested modals as applicable.\n useEffect(() => {\n // add this modal instance to the dismissers set\n dismissers.add(onRequestCloseRef);\n // request that all the other modals close themselves\n for (const dismisser of dismissers) {\n if (dismisser !== onRequestCloseRef) {\n dismisser.current?.();\n }\n }\n return () => {\n // request that all the nested modals close themselves\n for (const dismisser of nestedDismissers) {\n dismisser.current?.();\n }\n // remove this modal instance from the dismissers set\n dismissers.delete(onRequestCloseRef);\n };\n }, [dismissers, nestedDismissers]);\n\n // Adds/removes the value of bodyOpenClassName to body element.\n useEffect(() => {\n var _bodyOpenClasses$get;\n const theClass = bodyOpenClassName;\n const oneMore = 1 + ((_bodyOpenClasses$get = bodyOpenClasses.get(theClass)) !== null && _bodyOpenClasses$get !== void 0 ? _bodyOpenClasses$get : 0);\n bodyOpenClasses.set(theClass, oneMore);\n document.body.classList.add(bodyOpenClassName);\n return () => {\n const oneLess = bodyOpenClasses.get(theClass) - 1;\n if (oneLess === 0) {\n document.body.classList.remove(theClass);\n bodyOpenClasses.delete(theClass);\n } else {\n bodyOpenClasses.set(theClass, oneLess);\n }\n };\n }, [bodyOpenClassName]);\n const {\n closeModal,\n frameRef,\n frameStyle,\n overlayClassname\n } = useModalExitAnimation();\n\n // Calls the isContentScrollable callback when the Modal children container resizes.\n useLayoutEffect(() => {\n if (!window.ResizeObserver || !childrenContainerRef.current) {\n return;\n }\n const resizeObserver = new ResizeObserver(isContentScrollable);\n resizeObserver.observe(childrenContainerRef.current);\n isContentScrollable();\n return () => {\n resizeObserver.disconnect();\n };\n }, [isContentScrollable, childrenContainerRef]);\n function handleEscapeKeyDown(event) {\n if (shouldCloseOnEsc && (event.code === 'Escape' || event.key === 'Escape') && !event.defaultPrevented) {\n event.preventDefault();\n closeModal().then(() => onRequestClose(event));\n }\n }\n const onContentContainerScroll = useCallback(e => {\n var _e$currentTarget$scro;\n const scrollY = (_e$currentTarget$scro = e?.currentTarget?.scrollTop) !== null && _e$currentTarget$scro !== void 0 ? _e$currentTarget$scro : -1;\n if (!hasScrolledContent && scrollY > 0) {\n setHasScrolledContent(true);\n } else if (hasScrolledContent && scrollY <= 0) {\n setHasScrolledContent(false);\n }\n }, [hasScrolledContent]);\n let pressTarget = null;\n const overlayPressHandlers = {\n onPointerDown: event => {\n if (event.target === event.currentTarget) {\n pressTarget = event.target;\n // Avoids focus changing so that focus return works as expected.\n event.preventDefault();\n }\n },\n // Closes the modal with two exceptions. 1. Opening the context menu on\n // the overlay. 2. Pressing on the overlay then dragging the pointer\n // over the modal and releasing. Due to the modal being a child of the\n // overlay, such a gesture is a `click` on the overlay and cannot be\n // excepted by a `click` handler. Thus the tactic of handling\n // `pointerup` and comparing its target to that of the `pointerdown`.\n onPointerUp: ({\n target,\n button\n }) => {\n const isSameTarget = target === pressTarget;\n pressTarget = null;\n if (button === 0 && isSameTarget) {\n closeModal().then(() => onRequestClose());\n }\n }\n };\n const modal =\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n _jsx(\"div\", {\n ref: useMergeRefs([ref, forwardedRef]),\n className: clsx('components-modal__screen-overlay', overlayClassname, overlayClassnameProp),\n onKeyDown: withIgnoreIMEEvents(handleEscapeKeyDown),\n ...(shouldCloseOnClickOutside ? overlayPressHandlers : {}),\n children: /*#__PURE__*/_jsx(StyleProvider, {\n document: document,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: clsx('components-modal__frame', sizeClass, className),\n style: {\n ...frameStyle,\n ...style\n },\n ref: useMergeRefs([frameRef, constrainedTabbingRef, focusReturnRef, focusOnMount !== 'firstContentElement' ? focusOnMountRef : null]),\n role: role,\n \"aria-label\": contentLabel,\n \"aria-labelledby\": contentLabel ? undefined : headingId,\n \"aria-describedby\": aria.describedby,\n tabIndex: -1,\n onKeyDown: onKeyDown,\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: clsx('components-modal__content', {\n 'hide-header': __experimentalHideHeader,\n 'is-scrollable': hasScrollableContent,\n 'has-scrolled-content': hasScrolledContent\n }),\n role: \"document\",\n onScroll: onContentContainerScroll,\n ref: contentRef,\n \"aria-label\": hasScrollableContent ? __('Scrollable section') : undefined,\n tabIndex: hasScrollableContent ? 0 : undefined,\n children: [!__experimentalHideHeader && /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-modal__header\",\n children: [/*#__PURE__*/_jsxs(\"div\", {\n className: \"components-modal__header-heading-container\",\n children: [icon && /*#__PURE__*/_jsx(\"span\", {\n className: \"components-modal__icon-container\",\n \"aria-hidden\": true,\n children: icon\n }), title && /*#__PURE__*/_jsx(\"h1\", {\n id: headingId,\n className: \"components-modal__header-heading\",\n children: title\n })]\n }), headerActions, isDismissible && /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Spacer, {\n marginBottom: 0,\n marginLeft: 2\n }), /*#__PURE__*/_jsx(Button, {\n size: \"compact\",\n onClick: event => closeModal().then(() => onRequestClose(event)),\n icon: close,\n label: closeButtonLabel || __('Close')\n })]\n })]\n }), /*#__PURE__*/_jsx(\"div\", {\n ref: useMergeRefs([childrenContainerRef, focusOnMount === 'firstContentElement' ? focusOnMountRef : null]),\n className: \"components-modal__children-container\",\n children: children\n })]\n })\n })\n })\n });\n return createPortal(/*#__PURE__*/_jsx(ModalContext.Provider, {\n value: nestedDismissers,\n children: modal\n }), document.body);\n}\n\n/**\n * Modals give users information and choices related to a task they\u2019re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef(UnforwardedModal);\nexport default Modal;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA+H;AAC/H,qBAAoG;AACpG,kBAAmB;AACnB,mBAAsB;AACtB,iBAAmC;AAKnC,iBAA4B;AAC5B,oBAAmB;AACnB,4BAA0B;AAC1B,oCAAoC;AACpC,oBAAuB;AACvB,sCAAsC;AAGtC,yBAAkE;AAClE,IAAM,mBAAe,8BAAc,oBAAI,IAAI,CAAC;AAC5C,aAAa,cAAc;AAG3B,IAAM,kBAAkB,oBAAI,IAAI;AAChC,SAAS,iBAAiB,OAAO,cAAc;AAC7C,QAAM;AAAA,IACJ,oBAAoB;AAAA,IACpB,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,4BAA4B;AAAA,IAC5B,gBAAgB;AAAA;AAAA,IAEhB,OAAO;AAAA,MACL,YAAY;AAAA,MACZ,aAAa;AAAA,IACf;AAAA,IACA;AAAA,I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MAAM;AAAA,kBACN,OAAO,wBAAoB,gBAAG,OAAO;AAAA,gBACvC,CAAC,CAAC;AAAA,cACJ,CAAC,CAAC;AAAA,YACJ,CAAC,GAAgB,uCAAAL,KAAK,OAAO;AAAA,cAC3B,SAAK,6BAAa,CAAC,sBAAsB,iBAAiB,wBAAwB,kBAAkB,IAAI,CAAC;AAAA,cACzG,WAAW;AAAA,cACX;AAAA,YACF,CAAC,CAAC;AAAA,UACJ,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA;AACD,aAAO,6BAA0B,uCAAAA,KAAK,aAAa,UAAU;AAAA,IAC3D,OAAO;AAAA,IACP,UAAU;AAAA,EACZ,CAAC,GAAG,SAAS,IAAI;AACnB;AAiCO,IAAM,YAAQ,2BAAW,gBAAgB;AAChD,IAAO,gBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createPortal, useCallback, useEffect, useRef, useState, forwardRef, useLayoutEffect, createContext, useContext } from '@wordpress/element';\nimport { useInstanceId, useFocusReturn, useFocusOnMount, useConstrainedTabbing, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { Spacer } from '../spacer';\nimport { useModalExitAnimation } from './use-modal-exit-animation';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst ModalContext = createContext(new Set());\nModalContext.displayName = 'ModalContext';\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map();\nfunction UnforwardedModal(props, forwardedRef) {\n const {\n bodyOpenClassName = 'modal-open',\n role = 'dialog',\n title = null,\n focusOnMount = true,\n shouldCloseOnEsc = true,\n shouldCloseOnClickOutside = true,\n isDismissible = true,\n /* Accessibility. */\n aria = {\n labelledby: undefined,\n describedby: undefined\n },\n onRequestClose,\n icon,\n closeButtonLabel,\n children,\n style,\n overlayClassName: overlayClassnameProp,\n className,\n contentLabel,\n onKeyDown,\n isFullScreen = false,\n size,\n headerActions = null,\n __experimentalHideHeader = false\n } = props;\n const ref = useRef();\n const instanceId = useInstanceId(Modal);\n const headingId = title ? `components-modal-header-${instanceId}` : aria.labelledby;\n\n // The focus hook does not support 'firstContentElement' but this is a valid\n // value for the Modal's focusOnMount prop. The following code ensures the focus\n // hook will focus the first focusable node within the element to which it is applied.\n // When `firstContentElement` is passed as the value of the focusOnMount prop,\n // the focus hook is applied to the Modal's content element.\n // Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n // focus hook will focus the first element in the Modal's **content** when\n // `firstContentElement` is passed.\n const focusOnMountRef = useFocusOnMount(focusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount);\n const constrainedTabbingRef = useConstrainedTabbing();\n const focusReturnRef = useFocusReturn();\n const contentRef = useRef(null);\n const childrenContainerRef = useRef(null);\n const [hasScrolledContent, setHasScrolledContent] = useState(false);\n const [hasScrollableContent, setHasScrollableContent] = useState(false);\n let sizeClass;\n if (isFullScreen || size === 'fill') {\n sizeClass = 'is-full-screen';\n } else if (size) {\n sizeClass = `has-size-${size}`;\n }\n\n // Determines whether the Modal content is scrollable and updates the state.\n const isContentScrollable = useCallback(() => {\n if (!contentRef.current) {\n return;\n }\n const closestScrollContainer = getScrollContainer(contentRef.current);\n if (contentRef.current === closestScrollContainer) {\n setHasScrollableContent(true);\n } else {\n setHasScrollableContent(false);\n }\n }, [contentRef]);\n\n // Accessibly isolates/unisolates the modal.\n useEffect(() => {\n ariaHelper.modalize(ref.current);\n return () => ariaHelper.unmodalize();\n }, []);\n\n // Keeps a fresh ref for the subsequent effect.\n const onRequestCloseRef = useRef();\n useEffect(() => {\n onRequestCloseRef.current = onRequestClose;\n }, [onRequestClose]);\n\n // The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n // one should remain open at a time and the list enables closing prior ones.\n const dismissers = useContext(ModalContext);\n // Used for the tracking and dismissing any nested modals.\n const [nestedDismissers] = useState(() => new Set());\n\n // Updates the stack tracking open modals at this level and calls\n // onRequestClose for any prior and/or nested modals as applicable.\n useEffect(() => {\n // add this modal instance to the dismissers set\n dismissers.add(onRequestCloseRef);\n // request that all the other modals close themselves\n for (const dismisser of dismissers) {\n if (dismisser !== onRequestCloseRef) {\n dismisser.current?.();\n }\n }\n return () => {\n // request that all the nested modals close themselves\n for (const dismisser of nestedDismissers) {\n dismisser.current?.();\n }\n // remove this modal instance from the dismissers set\n dismissers.delete(onRequestCloseRef);\n };\n }, [dismissers, nestedDismissers]);\n\n // Adds/removes the value of bodyOpenClassName to body element.\n useEffect(() => {\n var _bodyOpenClasses$get;\n const theClass = bodyOpenClassName;\n const oneMore = 1 + ((_bodyOpenClasses$get = bodyOpenClasses.get(theClass)) !== null && _bodyOpenClasses$get !== void 0 ? _bodyOpenClasses$get : 0);\n bodyOpenClasses.set(theClass, oneMore);\n document.body.classList.add(bodyOpenClassName);\n return () => {\n const oneLess = bodyOpenClasses.get(theClass) - 1;\n if (oneLess === 0) {\n document.body.classList.remove(theClass);\n bodyOpenClasses.delete(theClass);\n } else {\n bodyOpenClasses.set(theClass, oneLess);\n }\n };\n }, [bodyOpenClassName]);\n const {\n closeModal,\n frameRef,\n frameStyle,\n overlayClassname\n } = useModalExitAnimation();\n\n // Calls the isContentScrollable callback when the Modal children container resizes.\n useLayoutEffect(() => {\n if (!window.ResizeObserver || !childrenContainerRef.current) {\n return;\n }\n const resizeObserver = new ResizeObserver(isContentScrollable);\n resizeObserver.observe(childrenContainerRef.current);\n isContentScrollable();\n return () => {\n resizeObserver.disconnect();\n };\n }, [isContentScrollable, childrenContainerRef]);\n function handleEscapeKeyDown(event) {\n if (shouldCloseOnEsc && (event.code === 'Escape' || event.key === 'Escape') && !event.defaultPrevented) {\n event.preventDefault();\n closeModal().then(() => onRequestClose(event));\n }\n }\n const onContentContainerScroll = useCallback(e => {\n var _e$currentTarget$scro;\n const scrollY = (_e$currentTarget$scro = e?.currentTarget?.scrollTop) !== null && _e$currentTarget$scro !== void 0 ? _e$currentTarget$scro : -1;\n if (!hasScrolledContent && scrollY > 0) {\n setHasScrolledContent(true);\n } else if (hasScrolledContent && scrollY <= 0) {\n setHasScrolledContent(false);\n }\n }, [hasScrolledContent]);\n let pressTarget = null;\n const overlayPressHandlers = {\n onPointerDown: event => {\n if (event.target === event.currentTarget) {\n pressTarget = event.target;\n // Avoids focus changing so that focus return works as expected.\n event.preventDefault();\n }\n },\n // Closes the modal with two exceptions. 1. Opening the context menu on\n // the overlay. 2. Pressing on the overlay then dragging the pointer\n // over the modal and releasing. Due to the modal being a child of the\n // overlay, such a gesture is a `click` on the overlay and cannot be\n // excepted by a `click` handler. Thus the tactic of handling\n // `pointerup` and comparing its target to that of the `pointerdown`.\n onPointerUp: ({\n target,\n button\n }) => {\n const isSameTarget = target === pressTarget;\n pressTarget = null;\n if (button === 0 && isSameTarget) {\n closeModal().then(() => onRequestClose());\n }\n }\n };\n const modal =\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n _jsx(\"div\", {\n ref: useMergeRefs([ref, forwardedRef]),\n className: clsx('components-modal__screen-overlay', overlayClassname, overlayClassnameProp),\n onKeyDown: withIgnoreIMEEvents(handleEscapeKeyDown),\n ...(shouldCloseOnClickOutside ? overlayPressHandlers : {}),\n children: /*#__PURE__*/_jsx(StyleProvider, {\n document: document,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: clsx('components-modal__frame', sizeClass, className),\n style: {\n ...frameStyle,\n ...style\n },\n ref: useMergeRefs([frameRef, constrainedTabbingRef, focusReturnRef, focusOnMount !== 'firstContentElement' ? focusOnMountRef : null]),\n role: role,\n \"aria-label\": contentLabel,\n \"aria-labelledby\": contentLabel ? undefined : headingId,\n \"aria-describedby\": aria.describedby,\n tabIndex: -1,\n onKeyDown: onKeyDown,\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: clsx('components-modal__content', {\n 'hide-header': __experimentalHideHeader,\n 'is-scrollable': hasScrollableContent,\n 'has-scrolled-content': hasScrolledContent\n }),\n role: \"document\",\n onScroll: onContentContainerScroll,\n ref: contentRef,\n \"aria-label\": hasScrollableContent ? __('Scrollable section') : undefined,\n tabIndex: hasScrollableContent ? 0 : undefined,\n children: [!__experimentalHideHeader && /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-modal__header\",\n children: [/*#__PURE__*/_jsxs(\"div\", {\n className: \"components-modal__header-heading-container\",\n children: [icon && /*#__PURE__*/_jsx(\"span\", {\n className: \"components-modal__icon-container\",\n \"aria-hidden\": true,\n children: icon\n }), title && /*#__PURE__*/_jsx(\"h1\", {\n id: headingId,\n className: \"components-modal__header-heading\",\n children: title\n })]\n }), headerActions, isDismissible && /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Spacer, {\n marginBottom: 0,\n marginLeft: 2\n }), /*#__PURE__*/_jsx(Button, {\n size: \"compact\",\n onClick: event => closeModal().then(() => onRequestClose(event)),\n icon: close,\n label: closeButtonLabel || __('Close')\n })]\n })]\n }), /*#__PURE__*/_jsx(\"div\", {\n ref: useMergeRefs([childrenContainerRef, focusOnMount === 'firstContentElement' ? focusOnMountRef : null]),\n className: \"components-modal__children-container\",\n children: children\n })]\n })\n })\n })\n });\n return createPortal(/*#__PURE__*/_jsx(ModalContext.Provider, {\n value: nestedDismissers,\n children: modal\n }), document.body);\n}\n\n/**\n * Modals give users information and choices related to a task they\u2019re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef(UnforwardedModal);\nModal.displayName = 'Modal';\nexport default Modal;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA+H;AAC/H,qBAAoG;AACpG,kBAAmB;AACnB,mBAAsB;AACtB,iBAAmC;AAKnC,iBAA4B;AAC5B,oBAAmB;AACnB,4BAA0B;AAC1B,oCAAoC;AACpC,oBAAuB;AACvB,sCAAsC;AAGtC,yBAAkE;AAClE,IAAM,mBAAe,8BAAc,oBAAI,IAAI,CAAC;AAC5C,aAAa,cAAc;AAG3B,IAAM,kBAAkB,oBAAI,IAAI;AAChC,SAAS,iBAAiB,OAAO,cAAc;AAC7C,QAAM;AAAA,IACJ,oBAAoB;AAAA,IACpB,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,4BAA4B;AAAA,IAC5B,gBAAgB;AAAA;AAAA,IAEhB,OAAO;AAAA,MACL,YAAY;AAAA,MACZ,aAAa;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA,gBAAgB;AAAA,IAChB,2BAA2B;AAAA,EAC7B,IAAI;AACJ,QAAM,UAAM,uBAAO;AACnB,QAAM,iBAAa,8BAAc,KAAK;AACtC,QAAM,YAAY,QAAQ,2BAA2B,UAAU,K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A,UACJ,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA;AACD,aAAO,6BAA0B,uCAAAA,KAAK,aAAa,UAAU;AAAA,IAC3D,OAAO;AAAA,IACP,UAAU;AAAA,EACZ,CAAC,GAAG,SAAS,IAAI;AACnB;AAiCO,IAAM,YAAQ,2BAAW,gBAAgB;AAChD,MAAM,cAAc;AACpB,IAAO,gBAAQ;",
6
6
  "names": ["_jsx", "clsx", "StyleProvider", "_jsxs", "_Fragment", "Button"]
7
7
  }
@@ -77,6 +77,7 @@ function UnforwardedNavigableMenu({
77
77
  });
78
78
  }
79
79
  var NavigableMenu = (0, import_element.forwardRef)(UnforwardedNavigableMenu);
80
+ NavigableMenu.displayName = "NavigableMenu";
80
81
  var menu_default = NavigableMenu;
81
82
  // Annotate the CommonJS export names for ESM import in node:
82
83
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/navigable-container/menu.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnforwardedNavigableMenu({\n role = 'menu',\n orientation = 'vertical',\n ...rest\n}, ref) {\n const eventToOffset = evt => {\n const {\n code\n } = evt;\n let next = ['ArrowDown'];\n let previous = ['ArrowUp'];\n if (orientation === 'horizontal') {\n next = ['ArrowRight'];\n previous = ['ArrowLeft'];\n }\n if (orientation === 'both') {\n next = ['ArrowRight', 'ArrowDown'];\n previous = ['ArrowLeft', 'ArrowUp'];\n }\n if (next.includes(code)) {\n return 1;\n } else if (previous.includes(code)) {\n return -1;\n } else if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(code)) {\n // Key press should be handled, e.g. have event propagation and\n // default behavior handled by NavigableContainer but not result\n // in an offset.\n return 0;\n }\n return undefined;\n };\n return /*#__PURE__*/_jsx(NavigableContainer, {\n ref: ref,\n stopNavigationEvents: true,\n onlyBrowserTabstops: false,\n role: role,\n \"aria-orientation\": role !== 'presentation' && (orientation === 'vertical' || orientation === 'horizontal') ? orientation : undefined,\n eventToOffset: eventToOffset,\n ...rest\n });\n}\n\n/**\n * A container for a navigable menu.\n *\n * ```jsx\n * import {\n * NavigableMenu,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyNavigableContainer = () => (\n * <div>\n * <span>Navigable Menu:</span>\n * <NavigableMenu onNavigate={ onNavigate } orientation=\"horizontal\">\n * <Button variant=\"secondary\">Item 1</Button>\n * <Button variant=\"secondary\">Item 2</Button>\n * <Button variant=\"secondary\">Item 3</Button>\n * </NavigableMenu>\n * </div>\n * );\n * ```\n */\nexport const NavigableMenu = forwardRef(UnforwardedNavigableMenu);\nexport default NavigableMenu;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,uBAA+B;AAC/B,yBAA4B;AACrB,SAAS,yBAAyB;AAAA,EACvC,OAAO;AAAA,EACP,cAAc;AAAA,EACd,GAAG;AACL,GAAG,KAAK;AACN,QAAM,gBAAgB,SAAO;AAC3B,UAAM;AAAA,MACJ;AAAA,IACF,IAAI;AACJ,QAAI,OAAO,CAAC,WAAW;AACvB,QAAI,WAAW,CAAC,SAAS;AACzB,QAAI,gBAAgB,cAAc;AAChC,aAAO,CAAC,YAAY;AACpB,iBAAW,CAAC,WAAW;AAAA,IACzB;AACA,QAAI,gBAAgB,QAAQ;AAC1B,aAAO,CAAC,cAAc,WAAW;AACjC,iBAAW,CAAC,aAAa,SAAS;AAAA,IACpC;AACA,QAAI,KAAK,SAAS,IAAI,GAAG;AACvB,aAAO;AAAA,IACT,WAAW,SAAS,SAAS,IAAI,GAAG;AAClC,aAAO;AAAA,IACT,WAAW,CAAC,aAAa,WAAW,aAAa,YAAY,EAAE,SAAS,IAAI,GAAG;AAI7E,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,iBAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB;AAAA,IACA,oBAAoB,SAAS,mBAAmB,gBAAgB,cAAc,gBAAgB,gBAAgB,cAAc;AAAA,IAC5H;AAAA,IACA,GAAG;AAAA,EACL,CAAC;AACH;AA2BO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,IAAO,eAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnforwardedNavigableMenu({\n role = 'menu',\n orientation = 'vertical',\n ...rest\n}, ref) {\n const eventToOffset = evt => {\n const {\n code\n } = evt;\n let next = ['ArrowDown'];\n let previous = ['ArrowUp'];\n if (orientation === 'horizontal') {\n next = ['ArrowRight'];\n previous = ['ArrowLeft'];\n }\n if (orientation === 'both') {\n next = ['ArrowRight', 'ArrowDown'];\n previous = ['ArrowLeft', 'ArrowUp'];\n }\n if (next.includes(code)) {\n return 1;\n } else if (previous.includes(code)) {\n return -1;\n } else if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(code)) {\n // Key press should be handled, e.g. have event propagation and\n // default behavior handled by NavigableContainer but not result\n // in an offset.\n return 0;\n }\n return undefined;\n };\n return /*#__PURE__*/_jsx(NavigableContainer, {\n ref: ref,\n stopNavigationEvents: true,\n onlyBrowserTabstops: false,\n role: role,\n \"aria-orientation\": role !== 'presentation' && (orientation === 'vertical' || orientation === 'horizontal') ? orientation : undefined,\n eventToOffset: eventToOffset,\n ...rest\n });\n}\n\n/**\n * A container for a navigable menu.\n *\n * ```jsx\n * import {\n * NavigableMenu,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyNavigableContainer = () => (\n * <div>\n * <span>Navigable Menu:</span>\n * <NavigableMenu onNavigate={ onNavigate } orientation=\"horizontal\">\n * <Button variant=\"secondary\">Item 1</Button>\n * <Button variant=\"secondary\">Item 2</Button>\n * <Button variant=\"secondary\">Item 3</Button>\n * </NavigableMenu>\n * </div>\n * );\n * ```\n */\nexport const NavigableMenu = forwardRef(UnforwardedNavigableMenu);\nNavigableMenu.displayName = 'NavigableMenu';\nexport default NavigableMenu;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,uBAA+B;AAC/B,yBAA4B;AACrB,SAAS,yBAAyB;AAAA,EACvC,OAAO;AAAA,EACP,cAAc;AAAA,EACd,GAAG;AACL,GAAG,KAAK;AACN,QAAM,gBAAgB,SAAO;AAC3B,UAAM;AAAA,MACJ;AAAA,IACF,IAAI;AACJ,QAAI,OAAO,CAAC,WAAW;AACvB,QAAI,WAAW,CAAC,SAAS;AACzB,QAAI,gBAAgB,cAAc;AAChC,aAAO,CAAC,YAAY;AACpB,iBAAW,CAAC,WAAW;AAAA,IACzB;AACA,QAAI,gBAAgB,QAAQ;AAC1B,aAAO,CAAC,cAAc,WAAW;AACjC,iBAAW,CAAC,aAAa,SAAS;AAAA,IACpC;AACA,QAAI,KAAK,SAAS,IAAI,GAAG;AACvB,aAAO;AAAA,IACT,WAAW,SAAS,SAAS,IAAI,GAAG;AAClC,aAAO;AAAA,IACT,WAAW,CAAC,aAAa,WAAW,aAAa,YAAY,EAAE,SAAS,IAAI,GAAG;AAI7E,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,iBAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB;AAAA,IACA,oBAAoB,SAAS,mBAAmB,gBAAgB,cAAc,gBAAgB,gBAAgB,cAAc;AAAA,IAC5H;AAAA,IACA,GAAG;AAAA,EACL,CAAC;AACH;AA2BO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,cAAc,cAAc;AAC5B,IAAO,eAAQ;",
6
6
  "names": ["_jsx", "NavigableContainer"]
7
7
  }
@@ -64,6 +64,7 @@ function UnforwardedTabbableContainer({
64
64
  });
65
65
  }
66
66
  var TabbableContainer = (0, import_element.forwardRef)(UnforwardedTabbableContainer);
67
+ TabbableContainer.displayName = "TabbableContainer";
67
68
  var tabbable_default = TabbableContainer;
68
69
  // Annotate the CommonJS export names for ESM import in node:
69
70
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/navigable-container/tabbable.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnforwardedTabbableContainer({\n eventToOffset,\n ...props\n}, ref) {\n const innerEventToOffset = evt => {\n const {\n code,\n shiftKey\n } = evt;\n if ('Tab' === code) {\n return shiftKey ? -1 : 1;\n }\n\n // Allow custom handling of keys besides Tab.\n //\n // By default, TabbableContainer will move focus forward on Tab and\n // backward on Shift+Tab. The handler below will be used for all other\n // events. The semantics for `eventToOffset`'s return\n // values are the following:\n //\n // - +1: move focus forward\n // - -1: move focus backward\n // - 0: don't move focus, but acknowledge event and thus stop it\n // - undefined: do nothing, let the event propagate.\n if (eventToOffset) {\n return eventToOffset(evt);\n }\n return undefined;\n };\n return /*#__PURE__*/_jsx(NavigableContainer, {\n ref: ref,\n stopNavigationEvents: true,\n onlyBrowserTabstops: true,\n eventToOffset: innerEventToOffset,\n ...props\n });\n}\n\n/**\n * A container for tabbable elements.\n *\n * ```jsx\n * import {\n * TabbableContainer,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyTabbableContainer = () => (\n * <div>\n * <span>Tabbable Container:</span>\n * <TabbableContainer onNavigate={ onNavigate }>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 1\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 2\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 3\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 4\n * </Button>\n * </TabbableContainer>\n * </div>\n * );\n * ```\n */\nexport const TabbableContainer = forwardRef(UnforwardedTabbableContainer);\nexport default TabbableContainer;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,uBAA+B;AAC/B,yBAA4B;AACrB,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,qBAAqB,SAAO;AAChC,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF,IAAI;AACJ,QAAI,UAAU,MAAM;AAClB,aAAO,WAAW,KAAK;AAAA,IACzB;AAaA,QAAI,eAAe;AACjB,aAAO,cAAc,GAAG;AAAA,IAC1B;AACA,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,iBAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,eAAe;AAAA,IACf,GAAG;AAAA,EACL,CAAC;AACH;AAoCO,IAAM,wBAAoB,2BAAW,4BAA4B;AACxE,IAAO,mBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnforwardedTabbableContainer({\n eventToOffset,\n ...props\n}, ref) {\n const innerEventToOffset = evt => {\n const {\n code,\n shiftKey\n } = evt;\n if ('Tab' === code) {\n return shiftKey ? -1 : 1;\n }\n\n // Allow custom handling of keys besides Tab.\n //\n // By default, TabbableContainer will move focus forward on Tab and\n // backward on Shift+Tab. The handler below will be used for all other\n // events. The semantics for `eventToOffset`'s return\n // values are the following:\n //\n // - +1: move focus forward\n // - -1: move focus backward\n // - 0: don't move focus, but acknowledge event and thus stop it\n // - undefined: do nothing, let the event propagate.\n if (eventToOffset) {\n return eventToOffset(evt);\n }\n return undefined;\n };\n return /*#__PURE__*/_jsx(NavigableContainer, {\n ref: ref,\n stopNavigationEvents: true,\n onlyBrowserTabstops: true,\n eventToOffset: innerEventToOffset,\n ...props\n });\n}\n\n/**\n * A container for tabbable elements.\n *\n * ```jsx\n * import {\n * TabbableContainer,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyTabbableContainer = () => (\n * <div>\n * <span>Tabbable Container:</span>\n * <TabbableContainer onNavigate={ onNavigate }>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 1\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 2\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 3\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 4\n * </Button>\n * </TabbableContainer>\n * </div>\n * );\n * ```\n */\nexport const TabbableContainer = forwardRef(UnforwardedTabbableContainer);\nTabbableContainer.displayName = 'TabbableContainer';\nexport default TabbableContainer;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,uBAA+B;AAC/B,yBAA4B;AACrB,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,qBAAqB,SAAO;AAChC,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF,IAAI;AACJ,QAAI,UAAU,MAAM;AAClB,aAAO,WAAW,KAAK;AAAA,IACzB;AAaA,QAAI,eAAe;AACjB,aAAO,cAAc,GAAG;AAAA,IAC1B;AACA,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,iBAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,eAAe;AAAA,IACf,GAAG;AAAA,EACL,CAAC;AACH;AAoCO,IAAM,wBAAoB,2BAAW,4BAA4B;AACxE,kBAAkB,cAAc;AAChC,IAAO,mBAAQ;",
6
6
  "names": ["_jsx", "NavigableContainer"]
7
7
  }
@@ -77,6 +77,7 @@ function UnforwardedNavigationBackButton({
77
77
  });
78
78
  }
79
79
  var NavigationBackButton = (0, import_element.forwardRef)(UnforwardedNavigationBackButton);
80
+ NavigationBackButton.displayName = "NavigationBackButton";
80
81
  var back_button_default = NavigationBackButton;
81
82
  // Annotate the CommonJS export names for ESM import in node:
82
83
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/navigation/back-button/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { MenuBackButtonUI } from '../styles/navigation-styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedNavigationBackButton({\n backButtonLabel,\n className,\n href,\n onClick,\n parentMenu\n}, ref) {\n const {\n setActiveMenu,\n navigationTree\n } = useNavigationContext();\n const classes = clsx('components-navigation__back-button', className);\n const parentMenuTitle = parentMenu !== undefined ? navigationTree.getMenu(parentMenu)?.title : undefined;\n const handleOnClick = event => {\n if (typeof onClick === 'function') {\n onClick(event);\n }\n const animationDirection = isRTL() ? 'left' : 'right';\n if (parentMenu && !event.defaultPrevented) {\n setActiveMenu(parentMenu, animationDirection);\n }\n };\n const icon = isRTL() ? chevronRight : chevronLeft;\n return /*#__PURE__*/_jsxs(MenuBackButtonUI, {\n __next40pxDefaultSize: true,\n className: classes,\n href: href,\n variant: \"tertiary\",\n ref: ref,\n onClick: handleOnClick,\n children: [/*#__PURE__*/_jsx(Icon, {\n icon: icon\n }), backButtonLabel || parentMenuTitle || __('Back')]\n });\n}\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport const NavigationBackButton = forwardRef(UnforwardedNavigationBackButton);\nexport default NavigationBackButton;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAC3B,kBAA0B;AAC1B,mBAAgD;AAKhD,qBAAqC;AACrC,+BAAiC;AACjC,yBAA2C;AAC3C,SAAS,gCAAgC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,qCAAqB;AACzB,QAAM,cAAU,YAAAA,SAAK,sCAAsC,SAAS;AACpE,QAAM,kBAAkB,eAAe,SAAY,eAAe,QAAQ,UAAU,GAAG,QAAQ;AAC/F,QAAM,gBAAgB,WAAS;AAC7B,QAAI,OAAO,YAAY,YAAY;AACjC,cAAQ,KAAK;AAAA,IACf;AACA,UAAM,yBAAqB,mBAAM,IAAI,SAAS;AAC9C,QAAI,cAAc,CAAC,MAAM,kBAAkB;AACzC,oBAAc,YAAY,kBAAkB;AAAA,IAC9C;AAAA,EACF;AACA,QAAM,WAAO,mBAAM,IAAI,4BAAe;AACtC,SAAoB,uCAAAC,MAAM,2CAAkB;AAAA,IAC1C,uBAAuB;AAAA,IACvB,WAAW;AAAA,IACX;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,SAAS;AAAA,IACT,UAAU,CAAc,uCAAAC,KAAK,mBAAM;AAAA,MACjC;AAAA,IACF,CAAC,GAAG,mBAAmB,uBAAmB,gBAAG,MAAM,CAAC;AAAA,EACtD,CAAC;AACH;AAKO,IAAM,2BAAuB,2BAAW,+BAA+B;AAC9E,IAAO,sBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { MenuBackButtonUI } from '../styles/navigation-styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedNavigationBackButton({\n backButtonLabel,\n className,\n href,\n onClick,\n parentMenu\n}, ref) {\n const {\n setActiveMenu,\n navigationTree\n } = useNavigationContext();\n const classes = clsx('components-navigation__back-button', className);\n const parentMenuTitle = parentMenu !== undefined ? navigationTree.getMenu(parentMenu)?.title : undefined;\n const handleOnClick = event => {\n if (typeof onClick === 'function') {\n onClick(event);\n }\n const animationDirection = isRTL() ? 'left' : 'right';\n if (parentMenu && !event.defaultPrevented) {\n setActiveMenu(parentMenu, animationDirection);\n }\n };\n const icon = isRTL() ? chevronRight : chevronLeft;\n return /*#__PURE__*/_jsxs(MenuBackButtonUI, {\n __next40pxDefaultSize: true,\n className: classes,\n href: href,\n variant: \"tertiary\",\n ref: ref,\n onClick: handleOnClick,\n children: [/*#__PURE__*/_jsx(Icon, {\n icon: icon\n }), backButtonLabel || parentMenuTitle || __('Back')]\n });\n}\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport const NavigationBackButton = forwardRef(UnforwardedNavigationBackButton);\nNavigationBackButton.displayName = 'NavigationBackButton';\nexport default NavigationBackButton;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAC3B,kBAA0B;AAC1B,mBAAgD;AAKhD,qBAAqC;AACrC,+BAAiC;AACjC,yBAA2C;AAC3C,SAAS,gCAAgC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,qCAAqB;AACzB,QAAM,cAAU,YAAAA,SAAK,sCAAsC,SAAS;AACpE,QAAM,kBAAkB,eAAe,SAAY,eAAe,QAAQ,UAAU,GAAG,QAAQ;AAC/F,QAAM,gBAAgB,WAAS;AAC7B,QAAI,OAAO,YAAY,YAAY;AACjC,cAAQ,KAAK;AAAA,IACf;AACA,UAAM,yBAAqB,mBAAM,IAAI,SAAS;AAC9C,QAAI,cAAc,CAAC,MAAM,kBAAkB;AACzC,oBAAc,YAAY,kBAAkB;AAAA,IAC9C;AAAA,EACF;AACA,QAAM,WAAO,mBAAM,IAAI,4BAAe;AACtC,SAAoB,uCAAAC,MAAM,2CAAkB;AAAA,IAC1C,uBAAuB;AAAA,IACvB,WAAW;AAAA,IACX;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,SAAS;AAAA,IACT,UAAU,CAAc,uCAAAC,KAAK,mBAAM;AAAA,MACjC;AAAA,IACF,CAAC,GAAG,mBAAmB,uBAAmB,gBAAG,MAAM,CAAC;AAAA,EACtD,CAAC;AACH;AAKO,IAAM,2BAAuB,2BAAW,+BAA+B;AAC9E,qBAAqB,cAAc;AACnC,IAAO,sBAAQ;",
6
6
  "names": ["clsx", "_jsxs", "_jsx"]
7
7
  }
@@ -230,6 +230,7 @@ function UnforwardedNumberControl(props, forwardedRef) {
230
230
  });
231
231
  }
232
232
  var NumberControl = (0, import_element.forwardRef)(UnforwardedNumberControl);
233
+ NumberControl.displayName = "NumberControl";
233
234
  var number_control_default = NumberControl;
234
235
  // Annotate the CommonJS export names for ESM import in node:
235
236
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/number-control/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { plus as plusIcon, reset as resetIcon } from '@wordpress/icons';\nimport { useMergeRefs } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { Input, SpinButton, styles } from './styles/number-control-styles';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { add, subtract, clamp, ensureValidStep } from '../utils/math';\nimport { ensureNumber, isValueEmpty } from '../utils/values';\nimport { HStack } from '../h-stack';\nimport { Spacer } from '../spacer';\nimport { useCx } from '../utils';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst noop = () => {};\nfunction UnforwardedNumberControl(props, forwardedRef) {\n const {\n __unstableStateReducer: stateReducerProp,\n className,\n dragDirection = 'n',\n hideHTMLArrows = false,\n spinControls = hideHTMLArrows ? 'none' : 'native',\n isDragEnabled = true,\n isShiftStepEnabled = true,\n label,\n max = Infinity,\n min = -Infinity,\n required = false,\n shiftStep = 10,\n step = 1,\n spinFactor = 1,\n type: typeProp = 'number',\n value: valueProp,\n size = 'default',\n suffix,\n onChange = noop,\n __shouldNotWarnDeprecated36pxSize,\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n maybeWarnDeprecated36pxSize({\n componentName: 'NumberControl',\n size,\n __next40pxDefaultSize: restProps.__next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize\n });\n if (hideHTMLArrows) {\n deprecated('wp.components.NumberControl hideHTMLArrows prop ', {\n alternative: 'spinControls=\"none\"',\n since: '6.2',\n version: '6.3'\n });\n }\n const inputRef = useRef();\n const mergedRef = useMergeRefs([inputRef, forwardedRef]);\n const isStepAny = step === 'any';\n const baseStep = isStepAny ? 1 : ensureNumber(step);\n const baseSpin = ensureNumber(spinFactor) * baseStep;\n const constrainValue = (value, stepOverride) => {\n // When step is not \"any\" the value must be a valid step.\n if (!isStepAny) {\n value = ensureValidStep(value, min, stepOverride !== null && stepOverride !== void 0 ? stepOverride : baseStep);\n }\n return `${clamp(value, min, max)}`;\n };\n const baseValue = constrainValue(0);\n const autoComplete = typeProp === 'number' ? 'off' : undefined;\n const classes = clsx('components-number-control', className);\n const cx = useCx();\n const spinButtonClasses = cx(size === 'small' && styles.smallSpinButtons);\n const spinValue = (value, direction, event) => {\n event?.preventDefault();\n const shift = event?.shiftKey && isShiftStepEnabled;\n const delta = shift ? ensureNumber(shiftStep) * baseSpin : baseSpin;\n let nextValue = isValueEmpty(value) ? baseValue : value;\n if (direction === 'up') {\n nextValue = add(nextValue, delta);\n } else if (direction === 'down') {\n nextValue = subtract(nextValue, delta);\n }\n return constrainValue(nextValue, shift ? delta : undefined);\n };\n\n /**\n * \"Middleware\" function that intercepts updates from InputControl.\n * This allows us to tap into actions to transform the (next) state for\n * InputControl.\n *\n * @return The updated state to apply to InputControl\n */\n const numberControlStateReducer = (state, action) => {\n const nextState = {\n ...state\n };\n const {\n type,\n payload\n } = action;\n const event = payload.event;\n const currentValue = nextState.value;\n\n /**\n * Handles custom UP and DOWN Keyboard events\n */\n if (type === inputControlActionTypes.PRESS_UP || type === inputControlActionTypes.PRESS_DOWN) {\n nextState.value = spinValue(currentValue, type === inputControlActionTypes.PRESS_UP ? 'up' : 'down', event);\n }\n\n /**\n * Handles drag to update events\n */\n if (type === inputControlActionTypes.DRAG && isDragEnabled) {\n const [x, y] = payload.delta;\n const enableShift = payload.shiftKey && isShiftStepEnabled;\n const modifier = enableShift ? ensureNumber(shiftStep) * baseSpin : baseSpin;\n let directionModifier;\n let delta;\n switch (dragDirection) {\n case 'n':\n delta = y;\n directionModifier = -1;\n break;\n case 'e':\n delta = x;\n directionModifier = isRTL() ? -1 : 1;\n break;\n case 's':\n delta = y;\n directionModifier = 1;\n break;\n case 'w':\n delta = x;\n directionModifier = isRTL() ? 1 : -1;\n break;\n }\n if (delta !== 0) {\n delta = Math.ceil(Math.abs(delta)) * Math.sign(delta);\n const distance = delta * modifier * directionModifier;\n nextState.value = constrainValue(\n // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n add(currentValue, distance), enableShift ? modifier : undefined);\n }\n }\n\n /**\n * Handles commit (ENTER key press or blur)\n */\n if (type === inputControlActionTypes.PRESS_ENTER || type === inputControlActionTypes.COMMIT) {\n const applyEmptyValue = required === false && currentValue === '';\n nextState.value = applyEmptyValue ? currentValue :\n // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n constrainValue(currentValue);\n }\n return nextState;\n };\n const buildSpinButtonClickHandler = direction => event => onChange(String(spinValue(valueProp, direction, event)), {\n // Set event.target to the <input> so that consumers can use\n // e.g. event.target.validity.\n event: {\n ...event,\n target: inputRef.current\n }\n });\n return /*#__PURE__*/_jsx(Input, {\n autoComplete: autoComplete,\n inputMode: \"numeric\",\n ...restProps,\n className: classes,\n dragDirection: dragDirection,\n hideHTMLArrows: spinControls !== 'native',\n isDragEnabled: isDragEnabled,\n label: label,\n max: max === Infinity ? undefined : max,\n min: min === -Infinity ? undefined : min,\n ref: mergedRef,\n required: required,\n step: step,\n type: typeProp\n // @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n ,\n value: valueProp,\n __unstableStateReducer: (state, action) => {\n var _stateReducerProp;\n const baseState = numberControlStateReducer(state, action);\n return (_stateReducerProp = stateReducerProp?.(baseState, action)) !== null && _stateReducerProp !== void 0 ? _stateReducerProp : baseState;\n },\n size: size,\n __shouldNotWarnDeprecated36pxSize: true,\n suffix: spinControls === 'custom' ? /*#__PURE__*/_jsxs(_Fragment, {\n children: [suffix, /*#__PURE__*/_jsx(Spacer, {\n marginBottom: 0,\n marginRight: 2,\n children: /*#__PURE__*/_jsxs(HStack, {\n spacing: 1,\n children: [/*#__PURE__*/_jsx(SpinButton, {\n className: spinButtonClasses,\n icon: plusIcon,\n size: \"small\",\n label: __('Increment'),\n onClick: buildSpinButtonClickHandler('up')\n }), /*#__PURE__*/_jsx(SpinButton, {\n className: spinButtonClasses,\n icon: resetIcon,\n size: \"small\",\n label: __('Decrement'),\n onClick: buildSpinButtonClickHandler('down')\n })]\n })\n })]\n }) : suffix,\n onChange: onChange\n });\n}\nexport const NumberControl = forwardRef(UnforwardedNumberControl);\nexport default NumberControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAAmC;AACnC,kBAA0B;AAC1B,mBAAqD;AACrD,qBAA6B;AAC7B,wBAAuB;AAKvB,mCAA0C;AAC1C,8BAAyC;AACzC,kBAAsD;AACtD,oBAA2C;AAC3C,qBAAuB;AACvB,oBAAuB;AACvB,mBAAsB;AACtB,kCAAiD;AACjD,kCAA4C;AAC5C,yBAAkE;AAClE,IAAM,OAAO,MAAM;AAAC;AACpB,SAAS,yBAAyB,OAAO,cAAc;AACrD,QAAM;AAAA,IACJ,wBAAwB;AAAA,IACxB;AAAA,IACA,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,eAAe,iBAAiB,SAAS;AAAA,IACzC,gBAAgB;AAAA,IAChB,qBAAqB;AAAA,IACrB;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IAC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uCAAAH,KAAK,yCAAY;AAAA,YAChC,WAAW;AAAA,YACX,MAAM,aAAAI;AAAA,YACN,MAAM;AAAA,YACN,WAAO,gBAAG,WAAW;AAAA,YACrB,SAAS,4BAA4B,MAAM;AAAA,UAC7C,CAAC,CAAC;AAAA,QACJ,CAAC;AAAA,MACH,CAAC,CAAC;AAAA,IACJ,CAAC,IAAI;AAAA,IACL;AAAA,EACF,CAAC;AACH;AACO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,IAAO,yBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { plus as plusIcon, reset as resetIcon } from '@wordpress/icons';\nimport { useMergeRefs } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { Input, SpinButton, styles } from './styles/number-control-styles';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { add, subtract, clamp, ensureValidStep } from '../utils/math';\nimport { ensureNumber, isValueEmpty } from '../utils/values';\nimport { HStack } from '../h-stack';\nimport { Spacer } from '../spacer';\nimport { useCx } from '../utils';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst noop = () => {};\nfunction UnforwardedNumberControl(props, forwardedRef) {\n const {\n __unstableStateReducer: stateReducerProp,\n className,\n dragDirection = 'n',\n hideHTMLArrows = false,\n spinControls = hideHTMLArrows ? 'none' : 'native',\n isDragEnabled = true,\n isShiftStepEnabled = true,\n label,\n max = Infinity,\n min = -Infinity,\n required = false,\n shiftStep = 10,\n step = 1,\n spinFactor = 1,\n type: typeProp = 'number',\n value: valueProp,\n size = 'default',\n suffix,\n onChange = noop,\n __shouldNotWarnDeprecated36pxSize,\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n maybeWarnDeprecated36pxSize({\n componentName: 'NumberControl',\n size,\n __next40pxDefaultSize: restProps.__next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize\n });\n if (hideHTMLArrows) {\n deprecated('wp.components.NumberControl hideHTMLArrows prop ', {\n alternative: 'spinControls=\"none\"',\n since: '6.2',\n version: '6.3'\n });\n }\n const inputRef = useRef();\n const mergedRef = useMergeRefs([inputRef, forwardedRef]);\n const isStepAny = step === 'any';\n const baseStep = isStepAny ? 1 : ensureNumber(step);\n const baseSpin = ensureNumber(spinFactor) * baseStep;\n const constrainValue = (value, stepOverride) => {\n // When step is not \"any\" the value must be a valid step.\n if (!isStepAny) {\n value = ensureValidStep(value, min, stepOverride !== null && stepOverride !== void 0 ? stepOverride : baseStep);\n }\n return `${clamp(value, min, max)}`;\n };\n const baseValue = constrainValue(0);\n const autoComplete = typeProp === 'number' ? 'off' : undefined;\n const classes = clsx('components-number-control', className);\n const cx = useCx();\n const spinButtonClasses = cx(size === 'small' && styles.smallSpinButtons);\n const spinValue = (value, direction, event) => {\n event?.preventDefault();\n const shift = event?.shiftKey && isShiftStepEnabled;\n const delta = shift ? ensureNumber(shiftStep) * baseSpin : baseSpin;\n let nextValue = isValueEmpty(value) ? baseValue : value;\n if (direction === 'up') {\n nextValue = add(nextValue, delta);\n } else if (direction === 'down') {\n nextValue = subtract(nextValue, delta);\n }\n return constrainValue(nextValue, shift ? delta : undefined);\n };\n\n /**\n * \"Middleware\" function that intercepts updates from InputControl.\n * This allows us to tap into actions to transform the (next) state for\n * InputControl.\n *\n * @return The updated state to apply to InputControl\n */\n const numberControlStateReducer = (state, action) => {\n const nextState = {\n ...state\n };\n const {\n type,\n payload\n } = action;\n const event = payload.event;\n const currentValue = nextState.value;\n\n /**\n * Handles custom UP and DOWN Keyboard events\n */\n if (type === inputControlActionTypes.PRESS_UP || type === inputControlActionTypes.PRESS_DOWN) {\n nextState.value = spinValue(currentValue, type === inputControlActionTypes.PRESS_UP ? 'up' : 'down', event);\n }\n\n /**\n * Handles drag to update events\n */\n if (type === inputControlActionTypes.DRAG && isDragEnabled) {\n const [x, y] = payload.delta;\n const enableShift = payload.shiftKey && isShiftStepEnabled;\n const modifier = enableShift ? ensureNumber(shiftStep) * baseSpin : baseSpin;\n let directionModifier;\n let delta;\n switch (dragDirection) {\n case 'n':\n delta = y;\n directionModifier = -1;\n break;\n case 'e':\n delta = x;\n directionModifier = isRTL() ? -1 : 1;\n break;\n case 's':\n delta = y;\n directionModifier = 1;\n break;\n case 'w':\n delta = x;\n directionModifier = isRTL() ? 1 : -1;\n break;\n }\n if (delta !== 0) {\n delta = Math.ceil(Math.abs(delta)) * Math.sign(delta);\n const distance = delta * modifier * directionModifier;\n nextState.value = constrainValue(\n // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n add(currentValue, distance), enableShift ? modifier : undefined);\n }\n }\n\n /**\n * Handles commit (ENTER key press or blur)\n */\n if (type === inputControlActionTypes.PRESS_ENTER || type === inputControlActionTypes.COMMIT) {\n const applyEmptyValue = required === false && currentValue === '';\n nextState.value = applyEmptyValue ? currentValue :\n // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n constrainValue(currentValue);\n }\n return nextState;\n };\n const buildSpinButtonClickHandler = direction => event => onChange(String(spinValue(valueProp, direction, event)), {\n // Set event.target to the <input> so that consumers can use\n // e.g. event.target.validity.\n event: {\n ...event,\n target: inputRef.current\n }\n });\n return /*#__PURE__*/_jsx(Input, {\n autoComplete: autoComplete,\n inputMode: \"numeric\",\n ...restProps,\n className: classes,\n dragDirection: dragDirection,\n hideHTMLArrows: spinControls !== 'native',\n isDragEnabled: isDragEnabled,\n label: label,\n max: max === Infinity ? undefined : max,\n min: min === -Infinity ? undefined : min,\n ref: mergedRef,\n required: required,\n step: step,\n type: typeProp\n // @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n ,\n value: valueProp,\n __unstableStateReducer: (state, action) => {\n var _stateReducerProp;\n const baseState = numberControlStateReducer(state, action);\n return (_stateReducerProp = stateReducerProp?.(baseState, action)) !== null && _stateReducerProp !== void 0 ? _stateReducerProp : baseState;\n },\n size: size,\n __shouldNotWarnDeprecated36pxSize: true,\n suffix: spinControls === 'custom' ? /*#__PURE__*/_jsxs(_Fragment, {\n children: [suffix, /*#__PURE__*/_jsx(Spacer, {\n marginBottom: 0,\n marginRight: 2,\n children: /*#__PURE__*/_jsxs(HStack, {\n spacing: 1,\n children: [/*#__PURE__*/_jsx(SpinButton, {\n className: spinButtonClasses,\n icon: plusIcon,\n size: \"small\",\n label: __('Increment'),\n onClick: buildSpinButtonClickHandler('up')\n }), /*#__PURE__*/_jsx(SpinButton, {\n className: spinButtonClasses,\n icon: resetIcon,\n size: \"small\",\n label: __('Decrement'),\n onClick: buildSpinButtonClickHandler('down')\n })]\n })\n })]\n }) : suffix,\n onChange: onChange\n });\n}\nexport const NumberControl = forwardRef(UnforwardedNumberControl);\nNumberControl.displayName = 'NumberControl';\nexport default NumberControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAAmC;AACnC,kBAA0B;AAC1B,mBAAqD;AACrD,qBAA6B;AAC7B,wBAAuB;AAKvB,mCAA0C;AAC1C,8BAAyC;AACzC,kBAAsD;AACtD,oBAA2C;AAC3C,qBAAuB;AACvB,oBAAuB;AACvB,mBAAsB;AACtB,kCAAiD;AACjD,kCAA4C;AAC5C,yBAAkE;AAClE,IAAM,OAAO,MAAM;AAAC;AACpB,SAAS,yBAAyB,OAAO,cAAc;AACrD,QAAM;AAAA,IACJ,wBAAwB;AAAA,IACxB;AAAA,IACA,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,eAAe,iBAAiB,SAAS;AAAA,IACzC,gBAAgB;AAAA,IAChB,qBAAqB;AAAA,IACrB;AAAA,I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B,IAAI;AAAA,UAC3C,CAAC,GAAgB,uCAAAH,KAAK,yCAAY;AAAA,YAChC,WAAW;AAAA,YACX,MAAM,aAAAI;AAAA,YACN,MAAM;AAAA,YACN,WAAO,gBAAG,WAAW;AAAA,YACrB,SAAS,4BAA4B,MAAM;AAAA,UAC7C,CAAC,CAAC;AAAA,QACJ,CAAC;AAAA,MACH,CAAC,CAAC;AAAA,IACJ,CAAC,IAAI;AAAA,IACL;AAAA,EACF,CAAC;AACH;AACO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
6
6
  "names": ["deprecated", "clsx", "_jsx", "_jsxs", "_Fragment", "plusIcon", "resetIcon"]
7
7
  }
@@ -129,6 +129,7 @@ var PanelBodyTitle = (0, import_element.forwardRef)(({
129
129
  });
130
130
  });
131
131
  var PanelBody = (0, import_element.forwardRef)(UnforwardedPanelBody);
132
+ PanelBody.displayName = "PanelBody";
132
133
  var body_default = PanelBody;
133
134
  // Annotate the CommonJS export names for ESM import in node:
134
135
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/panel/body.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { chevronUp, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport Icon from '../icon';\nimport { useControlledState, useUpdateEffect } from '../utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nexport function UnforwardedPanelBody(props, ref) {\n const {\n buttonProps = {},\n children,\n className,\n icon,\n initialOpen,\n onToggle = noop,\n opened,\n title,\n scrollAfterOpen = true\n } = props;\n const [isOpened, setIsOpened] = useControlledState(opened, {\n initial: initialOpen === undefined ? true : initialOpen,\n fallback: false\n });\n const nodeRef = useRef(null);\n\n // Defaults to 'smooth' scrolling\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\n const scrollBehavior = useReducedMotion() ? 'auto' : 'smooth';\n const handleOnToggle = event => {\n event.preventDefault();\n const next = !isOpened;\n setIsOpened(next);\n onToggle(next);\n };\n\n // Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.\n const scrollAfterOpenRef = useRef();\n scrollAfterOpenRef.current = scrollAfterOpen;\n // Runs after initial render.\n useUpdateEffect(() => {\n if (isOpened && scrollAfterOpenRef.current && nodeRef.current?.scrollIntoView) {\n /*\n * Scrolls the content into view when visible.\n * This improves the UX when there are multiple stacking <PanelBody />\n * components in a scrollable container.\n */\n nodeRef.current.scrollIntoView({\n inline: 'nearest',\n block: 'nearest',\n behavior: scrollBehavior\n });\n }\n }, [isOpened, scrollBehavior]);\n const classes = clsx('components-panel__body', className, {\n 'is-opened': isOpened\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: classes,\n ref: useMergeRefs([nodeRef, ref]),\n children: [/*#__PURE__*/_jsx(PanelBodyTitle, {\n icon: icon,\n isOpened: Boolean(isOpened),\n onClick: handleOnToggle,\n title: title,\n ...buttonProps\n }), typeof children === 'function' ? children({\n opened: Boolean(isOpened)\n }) : isOpened && children]\n });\n}\nconst PanelBodyTitle = forwardRef(({\n isOpened,\n icon,\n title,\n ...props\n}, ref) => {\n if (!title) {\n return null;\n }\n return /*#__PURE__*/_jsx(\"h2\", {\n className: \"components-panel__body-title\",\n children: /*#__PURE__*/_jsxs(Button, {\n __next40pxDefaultSize: true,\n className: \"components-panel__body-toggle\",\n \"aria-expanded\": isOpened,\n ref: ref,\n ...props,\n children: [/*#__PURE__*/_jsx(\"span\", {\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/_jsx(Icon, {\n className: \"components-panel__arrow\",\n icon: isOpened ? chevronUp : chevronDown\n })\n }), title, icon && /*#__PURE__*/_jsx(Icon, {\n icon: icon,\n className: \"components-panel__icon\",\n size: 20\n })]\n })\n });\n});\nexport const PanelBody = forwardRef(UnforwardedPanelBody);\nexport default PanelBody;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA+C;AAC/C,qBAAmC;AACnC,mBAAuC;AAMvC,oBAAmB;AACnB,kBAAiB;AACjB,mBAAoD;AACpD,yBAA2C;AAC3C,IAAM,OAAO,MAAM;AAAC;AACb,SAAS,qBAAqB,OAAO,KAAK;AAC/C,QAAM;AAAA,IACJ,cAAc,CAAC;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,EACpB,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,QAAI,iCAAmB,QAAQ;AAAA,IACzD,SAAS,gBAAgB,SAAY,OAAO;AAAA,IAC5C,UAAU;AAAA,EACZ,CAAC;AACD,QAAM,cAAU,uBAAO,IAAI;AAI3B,QAAM,qBAAiB,iCAAiB,IAAI,SAAS;AACrD,QAAM,iBAAiB,WAAS;AAC9B,UAAM,eAAe;AACrB,UAAM,OAAO,CAAC;AACd,gBAAY,IAAI;AAChB,aAAS,IAAI;AAAA,EACf;AAGA,QAAM,yBAAqB,uBAAO;AAClC,qBAAmB,UAAU;AAE7B,oCAAgB,MAAM;AACpB,QAAI,YAAY,mBAAmB,WAAW,QAAQ,SAAS,gBAAgB;AAM7E,cAAQ,QAAQ,eAAe;AAAA,QAC7B,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAC,UAAU,cAAc,CAAC;AAC7B,QAAM,cAAU,YAAAA,SAAK,0BAA0B,WAAW;AAAA,IACxD,aAAa;AAAA,EACf,CAAC;AACD,SAAoB,uCAAAC,MAAM,OAAO;AAAA,IAC/B,WAAW;AAAA,IACX,SAAK,6BAAa,CAAC,SAAS,GAAG,CAAC;AAAA,IAChC,UAAU,CAAc,uCAAAC,KAAK,gBAAgB;AAAA,MAC3C;AAAA,MACA,UAAU,QAAQ,QAAQ;AAAA,MAC1B,SAAS;AAAA,MACT;AAAA,MACA,GAAG;AAAA,IACL,CAAC,GAAG,OAAO,aAAa,aAAa,SAAS;AAAA,MAC5C,QAAQ,QAAQ,QAAQ;AAAA,IAC1B,CAAC,IAAI,YAAY,QAAQ;AAAA,EAC3B,CAAC;AACH;AACA,IAAM,qBAAiB,2BAAW,CAAC;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,QAAQ;AACT,MAAI,CAAC,OAAO;AACV,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,MAAM;AAAA,IAC7B,WAAW;AAAA,IACX,UAAuB,uCAAAD,MAAM,cAAAE,SAAQ;AAAA,MACnC,uBAAuB;AAAA,MACvB,WAAW;AAAA,MACX,iBAAiB;AAAA,MACjB;AAAA,MACA,GAAG;AAAA,MACH,UAAU,CAAc,uCAAAD,KAAK,QAAQ;AAAA,QACnC,eAAe;AAAA,QACf,UAAuB,uCAAAA,KAAK,YAAAE,SAAM;AAAA,UAChC,WAAW;AAAA,UACX,MAAM,WAAW,yBAAY;AAAA,QAC/B,CAAC;AAAA,MACH,CAAC,GAAG,OAAO,QAAqB,uCAAAF,KAAK,YAAAE,SAAM;AAAA,QACzC;AAAA,QACA,WAAW;AAAA,QACX,MAAM;AAAA,MACR,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH,CAAC;AACM,IAAM,gBAAY,2BAAW,oBAAoB;AACxD,IAAO,eAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { chevronUp, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport Icon from '../icon';\nimport { useControlledState, useUpdateEffect } from '../utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nexport function UnforwardedPanelBody(props, ref) {\n const {\n buttonProps = {},\n children,\n className,\n icon,\n initialOpen,\n onToggle = noop,\n opened,\n title,\n scrollAfterOpen = true\n } = props;\n const [isOpened, setIsOpened] = useControlledState(opened, {\n initial: initialOpen === undefined ? true : initialOpen,\n fallback: false\n });\n const nodeRef = useRef(null);\n\n // Defaults to 'smooth' scrolling\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\n const scrollBehavior = useReducedMotion() ? 'auto' : 'smooth';\n const handleOnToggle = event => {\n event.preventDefault();\n const next = !isOpened;\n setIsOpened(next);\n onToggle(next);\n };\n\n // Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.\n const scrollAfterOpenRef = useRef();\n scrollAfterOpenRef.current = scrollAfterOpen;\n // Runs after initial render.\n useUpdateEffect(() => {\n if (isOpened && scrollAfterOpenRef.current && nodeRef.current?.scrollIntoView) {\n /*\n * Scrolls the content into view when visible.\n * This improves the UX when there are multiple stacking <PanelBody />\n * components in a scrollable container.\n */\n nodeRef.current.scrollIntoView({\n inline: 'nearest',\n block: 'nearest',\n behavior: scrollBehavior\n });\n }\n }, [isOpened, scrollBehavior]);\n const classes = clsx('components-panel__body', className, {\n 'is-opened': isOpened\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: classes,\n ref: useMergeRefs([nodeRef, ref]),\n children: [/*#__PURE__*/_jsx(PanelBodyTitle, {\n icon: icon,\n isOpened: Boolean(isOpened),\n onClick: handleOnToggle,\n title: title,\n ...buttonProps\n }), typeof children === 'function' ? children({\n opened: Boolean(isOpened)\n }) : isOpened && children]\n });\n}\nconst PanelBodyTitle = forwardRef(({\n isOpened,\n icon,\n title,\n ...props\n}, ref) => {\n if (!title) {\n return null;\n }\n return /*#__PURE__*/_jsx(\"h2\", {\n className: \"components-panel__body-title\",\n children: /*#__PURE__*/_jsxs(Button, {\n __next40pxDefaultSize: true,\n className: \"components-panel__body-toggle\",\n \"aria-expanded\": isOpened,\n ref: ref,\n ...props,\n children: [/*#__PURE__*/_jsx(\"span\", {\n \"aria-hidden\": \"true\",\n children: /*#__PURE__*/_jsx(Icon, {\n className: \"components-panel__arrow\",\n icon: isOpened ? chevronUp : chevronDown\n })\n }), title, icon && /*#__PURE__*/_jsx(Icon, {\n icon: icon,\n className: \"components-panel__icon\",\n size: 20\n })]\n })\n });\n});\nexport const PanelBody = forwardRef(UnforwardedPanelBody);\nPanelBody.displayName = 'PanelBody';\nexport default PanelBody;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA+C;AAC/C,qBAAmC;AACnC,mBAAuC;AAMvC,oBAAmB;AACnB,kBAAiB;AACjB,mBAAoD;AACpD,yBAA2C;AAC3C,IAAM,OAAO,MAAM;AAAC;AACb,SAAS,qBAAqB,OAAO,KAAK;AAC/C,QAAM;AAAA,IACJ,cAAc,CAAC;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,EACpB,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,QAAI,iCAAmB,QAAQ;AAAA,IACzD,SAAS,gBAAgB,SAAY,OAAO;AAAA,IAC5C,UAAU;AAAA,EACZ,CAAC;AACD,QAAM,cAAU,uBAAO,IAAI;AAI3B,QAAM,qBAAiB,iCAAiB,IAAI,SAAS;AACrD,QAAM,iBAAiB,WAAS;AAC9B,UAAM,eAAe;AACrB,UAAM,OAAO,CAAC;AACd,gBAAY,IAAI;AAChB,aAAS,IAAI;AAAA,EACf;AAGA,QAAM,yB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AAAA,MACH,CAAC,GAAG,OAAO,QAAqB,uCAAAF,KAAK,YAAAE,SAAM;AAAA,QACzC;AAAA,QACA,WAAW;AAAA,QACX,MAAM;AAAA,MACR,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH,CAAC;AACM,IAAM,gBAAY,2BAAW,oBAAoB;AACxD,UAAU,cAAc;AACxB,IAAO,eAAQ;",
6
6
  "names": ["clsx", "_jsxs", "_jsx", "Button", "Icon"]
7
7
  }
@@ -53,6 +53,7 @@ function UnforwardedPanel({
53
53
  });
54
54
  }
55
55
  var Panel = (0, import_element.forwardRef)(UnforwardedPanel);
56
+ Panel.displayName = "Panel";
56
57
  var panel_default = Panel;
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/panel/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedPanel({\n header,\n className,\n children\n}, ref) {\n const classNames = clsx(className, 'components-panel');\n return /*#__PURE__*/_jsxs(\"div\", {\n className: classNames,\n ref: ref,\n children: [header && /*#__PURE__*/_jsx(PanelHeader, {\n label: header\n }), children]\n });\n}\n\n/**\n * `Panel` expands and collapses multiple sections of content.\n *\n * ```jsx\n * import { Panel, PanelBody, PanelRow } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPanel = () => (\n * \t<Panel header=\"My Panel\">\n * \t\t<PanelBody title=\"My Block Settings\" icon={ more } initialOpen={ true }>\n * \t\t\t<PanelRow>My Panel Inputs and Labels</PanelRow>\n * \t\t</PanelBody>\n * \t</Panel>\n * );\n * ```\n */\nexport const Panel = forwardRef(UnforwardedPanel);\nexport default Panel;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA2B;AAK3B,oBAAwB;AACxB,yBAA2C;AAC3C,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,QAAM,iBAAa,YAAAA,SAAK,WAAW,kBAAkB;AACrD,SAAoB,uCAAAC,MAAM,OAAO;AAAA,IAC/B,WAAW;AAAA,IACX;AAAA,IACA,UAAU,CAAC,UAAuB,uCAAAC,KAAK,cAAAC,SAAa;AAAA,MAClD,OAAO;AAAA,IACT,CAAC,GAAG,QAAQ;AAAA,EACd,CAAC;AACH;AAkBO,IAAM,YAAQ,2BAAW,gBAAgB;AAChD,IAAO,gBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedPanel({\n header,\n className,\n children\n}, ref) {\n const classNames = clsx(className, 'components-panel');\n return /*#__PURE__*/_jsxs(\"div\", {\n className: classNames,\n ref: ref,\n children: [header && /*#__PURE__*/_jsx(PanelHeader, {\n label: header\n }), children]\n });\n}\n\n/**\n * `Panel` expands and collapses multiple sections of content.\n *\n * ```jsx\n * import { Panel, PanelBody, PanelRow } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPanel = () => (\n * \t<Panel header=\"My Panel\">\n * \t\t<PanelBody title=\"My Block Settings\" icon={ more } initialOpen={ true }>\n * \t\t\t<PanelRow>My Panel Inputs and Labels</PanelRow>\n * \t\t</PanelBody>\n * \t</Panel>\n * );\n * ```\n */\nexport const Panel = forwardRef(UnforwardedPanel);\nPanel.displayName = 'Panel';\nexport default Panel;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA2B;AAK3B,oBAAwB;AACxB,yBAA2C;AAC3C,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,QAAM,iBAAa,YAAAA,SAAK,WAAW,kBAAkB;AACrD,SAAoB,uCAAAC,MAAM,OAAO;AAAA,IAC/B,WAAW;AAAA,IACX;AAAA,IACA,UAAU,CAAC,UAAuB,uCAAAC,KAAK,cAAAC,SAAa;AAAA,MAClD,OAAO;AAAA,IACT,CAAC,GAAG,QAAQ;AAAA,EACd,CAAC;AACH;AAkBO,IAAM,YAAQ,2BAAW,gBAAgB;AAChD,MAAM,cAAc;AACpB,IAAO,gBAAQ;",
6
6
  "names": ["clsx", "_jsxs", "_jsx", "PanelHeader"]
7
7
  }
@@ -48,6 +48,7 @@ function UnforwardedPanelRow({
48
48
  });
49
49
  }
50
50
  var PanelRow = (0, import_element.forwardRef)(UnforwardedPanelRow);
51
+ PanelRow.displayName = "PanelRow";
51
52
  var row_default = PanelRow;
52
53
  // Annotate the CommonJS export names for ESM import in node:
53
54
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/panel/row.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\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 UnforwardedPanelRow({\n className,\n children\n}, ref) {\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx('components-panel__row', className),\n ref: ref,\n children: children\n });\n}\n\n/**\n * `PanelRow` is a generic container for rows within a `PanelBody`.\n * It is a flex container with a top margin for spacing.\n */\nexport const PanelRow = forwardRef(UnforwardedPanelRow);\nexport default PanelRow;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA2B;AAK3B,yBAA4B;AAC5B,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA;AACF,GAAG,KAAK;AACN,SAAoB,uCAAAA,KAAK,OAAO;AAAA,IAC9B,eAAW,YAAAC,SAAK,yBAAyB,SAAS;AAAA,IAClD;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAMO,IAAM,eAAW,2BAAW,mBAAmB;AACtD,IAAO,cAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\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 UnforwardedPanelRow({\n className,\n children\n}, ref) {\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx('components-panel__row', className),\n ref: ref,\n children: children\n });\n}\n\n/**\n * `PanelRow` is a generic container for rows within a `PanelBody`.\n * It is a flex container with a top margin for spacing.\n */\nexport const PanelRow = forwardRef(UnforwardedPanelRow);\nPanelRow.displayName = 'PanelRow';\nexport default PanelRow;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA2B;AAK3B,yBAA4B;AAC5B,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA;AACF,GAAG,KAAK;AACN,SAAoB,uCAAAA,KAAK,OAAO;AAAA,IAC9B,eAAW,YAAAC,SAAK,yBAAyB,SAAS;AAAA,IAClD;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAMO,IAAM,eAAW,2BAAW,mBAAmB;AACtD,SAAS,cAAc;AACvB,IAAO,cAAQ;",
6
6
  "names": ["_jsx", "clsx"]
7
7
  }
@@ -62,6 +62,7 @@ function UnforwardedProgressBar(props, ref) {
62
62
  });
63
63
  }
64
64
  var ProgressBar = (0, import_element.forwardRef)(UnforwardedProgressBar);
65
+ ProgressBar.displayName = "ProgressBar";
65
66
  var progress_bar_default = ProgressBar;
66
67
  // Annotate the CommonJS export names for ESM import in node:
67
68
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/progress-bar/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as ProgressBarStyled from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedProgressBar(props, ref) {\n const {\n className,\n value,\n ...progressProps\n } = props;\n const isIndeterminate = !Number.isFinite(value);\n return /*#__PURE__*/_jsxs(ProgressBarStyled.Track, {\n className: className,\n children: [/*#__PURE__*/_jsx(ProgressBarStyled.Indicator, {\n style: {\n '--indicator-width': !isIndeterminate ? `${value}%` : undefined\n },\n isIndeterminate: isIndeterminate\n }), /*#__PURE__*/_jsx(ProgressBarStyled.ProgressElement, {\n max: 100,\n value: value,\n \"aria-label\": __('Loading \u2026'),\n ref: ref,\n ...progressProps\n })]\n });\n}\n\n/**\n * A simple horizontal progress bar component.\n *\n * Supports two modes: determinate and indeterminate. A progress bar is determinate\n * when a specific progress value has been specified (from 0 to 100), and indeterminate\n * when a value hasn't been specified.\n *\n * ```jsx\n * import { ProgressBar } from '@wordpress/components';\n *\n * const MyLoadingComponent = () => {\n * \treturn <ProgressBar />;\n * };\n * ```\n */\nexport const ProgressBar = forwardRef(UnforwardedProgressBar);\nexport default ProgressBar;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,kBAAmB;AACnB,qBAA2B;AAK3B,wBAAmC;AACnC,yBAA2C;AAC3C,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,kBAAkB,CAAC,OAAO,SAAS,KAAK;AAC9C,SAAoB,uCAAAA,MAAwB,yBAAO;AAAA,IACjD;AAAA,IACA,UAAU,CAAc,uCAAAC,KAAuB,6BAAW;AAAA,MACxD,OAAO;AAAA,QACL,qBAAqB,CAAC,kBAAkB,GAAG,KAAK,MAAM;AAAA,MACxD;AAAA,MACA;AAAA,IACF,CAAC,GAAgB,uCAAAA,KAAuB,mCAAiB;AAAA,MACvD,KAAK;AAAA,MACL;AAAA,MACA,kBAAc,gBAAG,gBAAW;AAAA,MAC5B;AAAA,MACA,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAiBO,IAAM,kBAAc,2BAAW,sBAAsB;AAC5D,IAAO,uBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as ProgressBarStyled from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedProgressBar(props, ref) {\n const {\n className,\n value,\n ...progressProps\n } = props;\n const isIndeterminate = !Number.isFinite(value);\n return /*#__PURE__*/_jsxs(ProgressBarStyled.Track, {\n className: className,\n children: [/*#__PURE__*/_jsx(ProgressBarStyled.Indicator, {\n style: {\n '--indicator-width': !isIndeterminate ? `${value}%` : undefined\n },\n isIndeterminate: isIndeterminate\n }), /*#__PURE__*/_jsx(ProgressBarStyled.ProgressElement, {\n max: 100,\n value: value,\n \"aria-label\": __('Loading \u2026'),\n ref: ref,\n ...progressProps\n })]\n });\n}\n\n/**\n * A simple horizontal progress bar component.\n *\n * Supports two modes: determinate and indeterminate. A progress bar is determinate\n * when a specific progress value has been specified (from 0 to 100), and indeterminate\n * when a value hasn't been specified.\n *\n * ```jsx\n * import { ProgressBar } from '@wordpress/components';\n *\n * const MyLoadingComponent = () => {\n * \treturn <ProgressBar />;\n * };\n * ```\n */\nexport const ProgressBar = forwardRef(UnforwardedProgressBar);\nProgressBar.displayName = 'ProgressBar';\nexport default ProgressBar;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,kBAAmB;AACnB,qBAA2B;AAK3B,wBAAmC;AACnC,yBAA2C;AAC3C,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,kBAAkB,CAAC,OAAO,SAAS,KAAK;AAC9C,SAAoB,uCAAAA,MAAwB,yBAAO;AAAA,IACjD;AAAA,IACA,UAAU,CAAc,uCAAAC,KAAuB,6BAAW;AAAA,MACxD,OAAO;AAAA,QACL,qBAAqB,CAAC,kBAAkB,GAAG,KAAK,MAAM;AAAA,MACxD;AAAA,MACA;AAAA,IACF,CAAC,GAAgB,uCAAAA,KAAuB,mCAAiB;AAAA,MACvD,KAAK;AAAA,MACL;AAAA,MACA,kBAAc,gBAAG,gBAAW;AAAA,MAC5B;AAAA,MACA,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAiBO,IAAM,kBAAc,2BAAW,sBAAsB;AAC5D,YAAY,cAAc;AAC1B,IAAO,uBAAQ;",
6
6
  "names": ["_jsxs", "_jsx"]
7
7
  }
@@ -81,6 +81,7 @@ function UnforwardedRadioGroup({
81
81
  });
82
82
  }
83
83
  var RadioGroup2 = (0, import_element.forwardRef)(UnforwardedRadioGroup);
84
+ RadioGroup2.displayName = "RadioGroup";
84
85
  var radio_group_default = RadioGroup2;
85
86
  // Annotate the CommonJS export names for ESM import in node:
86
87
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/radio-group/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo, forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ButtonGroup from '../button-group';\nimport { RadioGroupContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedRadioGroup({\n label,\n checked,\n defaultChecked,\n disabled,\n onChange,\n children,\n ...props\n}, ref) {\n const radioStore = Ariakit.useRadioStore({\n value: checked,\n defaultValue: defaultChecked,\n setValue: newValue => {\n onChange?.(newValue !== null && newValue !== void 0 ? newValue : undefined);\n },\n rtl: isRTL()\n });\n const contextValue = useMemo(() => ({\n store: radioStore,\n disabled\n }), [radioStore, disabled]);\n deprecated('wp.components.__experimentalRadioGroup', {\n alternative: 'wp.components.RadioControl or wp.components.__experimentalToggleGroupControl',\n since: '6.8'\n });\n return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(Ariakit.RadioGroup, {\n store: radioStore,\n render: /*#__PURE__*/_jsx(ButtonGroup, {\n __shouldNotWarnDeprecated: true,\n children: children\n }),\n \"aria-label\": label,\n ref: ref,\n ...props\n })\n });\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const RadioGroup = forwardRef(UnforwardedRadioGroup);\nexport default RadioGroup;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,wBAAuB;AACvB,qBAAoC;AACpC,kBAAsB;AAKtB,0BAAwB;AACxB,qBAAkC;AAClC,yBAA4B;AAC5B,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,aAAqB,sBAAc;AAAA,IACvC,OAAO;AAAA,IACP,cAAc;AAAA,IACd,UAAU,cAAY;AACpB,iBAAW,aAAa,QAAQ,aAAa,SAAS,WAAW,MAAS;AAAA,IAC5E;AAAA,IACA,SAAK,mBAAM;AAAA,EACb,CAAC;AACD,QAAM,mBAAe,wBAAQ,OAAO;AAAA,IAClC,OAAO;AAAA,IACP;AAAA,EACF,IAAI,CAAC,YAAY,QAAQ,CAAC;AAC1B,wBAAAC,SAAW,0CAA0C;AAAA,IACnD,aAAa;AAAA,IACb,OAAO;AAAA,EACT,CAAC;AACD,SAAoB,uCAAAC,KAAK,iCAAkB,UAAU;AAAA,IACnD,OAAO;AAAA,IACP,UAAuB,uCAAAA,KAAa,oBAAY;AAAA,MAC9C,OAAO;AAAA,MACP,QAAqB,uCAAAA,KAAK,oBAAAC,SAAa;AAAA,QACrC,2BAA2B;AAAA,QAC3B;AAAA,MACF,CAAC;AAAA,MACD,cAAc;AAAA,MACd;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAKO,IAAMH,kBAAa,2BAAW,qBAAqB;AAC1D,IAAO,sBAAQA;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo, forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ButtonGroup from '../button-group';\nimport { RadioGroupContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedRadioGroup({\n label,\n checked,\n defaultChecked,\n disabled,\n onChange,\n children,\n ...props\n}, ref) {\n const radioStore = Ariakit.useRadioStore({\n value: checked,\n defaultValue: defaultChecked,\n setValue: newValue => {\n onChange?.(newValue !== null && newValue !== void 0 ? newValue : undefined);\n },\n rtl: isRTL()\n });\n const contextValue = useMemo(() => ({\n store: radioStore,\n disabled\n }), [radioStore, disabled]);\n deprecated('wp.components.__experimentalRadioGroup', {\n alternative: 'wp.components.RadioControl or wp.components.__experimentalToggleGroupControl',\n since: '6.8'\n });\n return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(Ariakit.RadioGroup, {\n store: radioStore,\n render: /*#__PURE__*/_jsx(ButtonGroup, {\n __shouldNotWarnDeprecated: true,\n children: children\n }),\n \"aria-label\": label,\n ref: ref,\n ...props\n })\n });\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const RadioGroup = forwardRef(UnforwardedRadioGroup);\nRadioGroup.displayName = 'RadioGroup';\nexport default RadioGroup;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,wBAAuB;AACvB,qBAAoC;AACpC,kBAAsB;AAKtB,0BAAwB;AACxB,qBAAkC;AAClC,yBAA4B;AAC5B,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,aAAqB,sBAAc;AAAA,IACvC,OAAO;AAAA,IACP,cAAc;AAAA,IACd,UAAU,cAAY;AACpB,iBAAW,aAAa,QAAQ,aAAa,SAAS,WAAW,MAAS;AAAA,IAC5E;AAAA,IACA,SAAK,mBAAM;AAAA,EACb,CAAC;AACD,QAAM,mBAAe,wBAAQ,OAAO;AAAA,IAClC,OAAO;AAAA,IACP;AAAA,EACF,IAAI,CAAC,YAAY,QAAQ,CAAC;AAC1B,wBAAAC,SAAW,0CAA0C;AAAA,IACnD,aAAa;AAAA,IACb,OAAO;AAAA,EACT,CAAC;AACD,SAAoB,uCAAAC,KAAK,iCAAkB,UAAU;AAAA,IACnD,OAAO;AAAA,IACP,UAAuB,uCAAAA,KAAa,oBAAY;AAAA,MAC9C,OAAO;AAAA,MACP,QAAqB,uCAAAA,KAAK,oBAAAC,SAAa;AAAA,QACrC,2BAA2B;AAAA,QAC3B;AAAA,MACF,CAAC;AAAA,MACD,cAAc;AAAA,MACd;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAKO,IAAMH,kBAAa,2BAAW,qBAAqB;AAC1DA,YAAW,cAAc;AACzB,IAAO,sBAAQA;",
6
6
  "names": ["RadioGroup", "deprecated", "_jsx", "ButtonGroup"]
7
7
  }
@@ -61,14 +61,19 @@ function UnforwardedRadio({
61
61
  store,
62
62
  ref,
63
63
  value,
64
- render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
65
- variant: isChecked ? "primary" : "secondary",
66
- ...props
67
- }),
64
+ render: (
65
+ // Disable: the parent component already takes care of the `__next40pxDefaultSize` prop.
66
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
68
+ variant: isChecked ? "primary" : "secondary",
69
+ ...props
70
+ })
71
+ ),
68
72
  children: children || value
69
73
  });
70
74
  }
71
75
  var Radio2 = (0, import_element.forwardRef)(UnforwardedRadio);
76
+ Radio2.displayName = "Radio";
72
77
  var radio_default = Radio2;
73
78
  // Annotate the CommonJS export names for ESM import in node:
74
79
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/radio-group/radio.tsx"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { RadioGroupContext } from './context';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedRadio({\n value,\n children,\n ...props\n}, ref) {\n const {\n store,\n disabled\n } = useContext(RadioGroupContext);\n const selectedValue = Ariakit.useStoreState(store, 'value');\n const isChecked = selectedValue !== undefined && selectedValue === value;\n maybeWarnDeprecated36pxSize({\n componentName: 'Radio',\n size: undefined,\n __next40pxDefaultSize: props.__next40pxDefaultSize\n });\n return /*#__PURE__*/_jsx(Ariakit.Radio, {\n disabled: disabled,\n store: store,\n ref: ref,\n value: value,\n render: /*#__PURE__*/_jsx(Button, {\n variant: isChecked ? 'primary' : 'secondary',\n ...props\n }),\n children: children || value\n });\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const Radio = forwardRef(UnforwardedRadio);\nexport default Radio;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,qBAAuC;AAKvC,cAAyB;AAKzB,oBAAmB;AACnB,qBAAkC;AAClC,kCAA4C;AAC5C,yBAA4B;AAC5B,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,2BAAW,gCAAiB;AAChC,QAAM,gBAAwB,sBAAc,OAAO,OAAO;AAC1D,QAAM,YAAY,kBAAkB,UAAa,kBAAkB;AACnE,+DAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,MAAM;AAAA,IACN,uBAAuB,MAAM;AAAA,EAC/B,CAAC;AACD,SAAoB,uCAAAC,KAAa,eAAO;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAqB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAChC,SAAS,YAAY,YAAY;AAAA,MACjC,GAAG;AAAA,IACL,CAAC;AAAA,IACD,UAAU,YAAY;AAAA,EACxB,CAAC;AACH;AAKO,IAAMF,aAAQ,2BAAW,gBAAgB;AAChD,IAAO,gBAAQA;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { RadioGroupContext } from './context';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedRadio({\n value,\n children,\n ...props\n}, ref) {\n const {\n store,\n disabled\n } = useContext(RadioGroupContext);\n const selectedValue = Ariakit.useStoreState(store, 'value');\n const isChecked = selectedValue !== undefined && selectedValue === value;\n maybeWarnDeprecated36pxSize({\n componentName: 'Radio',\n size: undefined,\n __next40pxDefaultSize: props.__next40pxDefaultSize\n });\n return /*#__PURE__*/_jsx(Ariakit.Radio, {\n disabled: disabled,\n store: store,\n ref: ref,\n value: value,\n render:\n /*#__PURE__*/\n // Disable: the parent component already takes care of the `__next40pxDefaultSize` prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n variant: isChecked ? 'primary' : 'secondary',\n ...props\n }),\n children: children || value\n });\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const Radio = forwardRef(UnforwardedRadio);\nRadio.displayName = 'Radio';\nexport default Radio;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,qBAAuC;AAKvC,cAAyB;AAKzB,oBAAmB;AACnB,qBAAkC;AAClC,kCAA4C;AAC5C,yBAA4B;AAC5B,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,2BAAW,gCAAiB;AAChC,QAAM,gBAAwB,sBAAc,OAAO,OAAO;AAC1D,QAAM,YAAY,kBAAkB,UAAa,kBAAkB;AACnE,+DAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,MAAM;AAAA,IACN,uBAAuB,MAAM;AAAA,EAC/B,CAAC;AACD,SAAoB,uCAAAC,KAAa,eAAO;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA,MAIA,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,QACX,SAAS,YAAY,YAAY;AAAA,QACjC,GAAG;AAAA,MACL,CAAC;AAAA;AAAA,IACD,UAAU,YAAY;AAAA,EACxB,CAAC;AACH;AAKO,IAAMF,aAAQ,2BAAW,gBAAgB;AAChDA,OAAM,cAAc;AACpB,IAAO,gBAAQA;",
6
6
  "names": ["Radio", "_jsx", "Button"]
7
7
  }
@@ -288,6 +288,7 @@ function UnforwardedRangeControl(props, forwardedRef) {
288
288
  });
289
289
  }
290
290
  var RangeControl = (0, import_element.forwardRef)(UnforwardedRangeControl);
291
+ RangeControl.displayName = "RangeControl";
291
292
  var range_control_default = RangeControl;
292
293
  // Annotate the CommonJS export names for ESM import in node:
293
294
  0 && (module.exports = {