@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/range-control/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport { ActionRightWrapper, AfterIconWrapper, BeforeIconWrapper, InputNumber, Root, Track, ThumbWrapper, Thumb, Wrapper } from './styles/range-control-styles';\nimport { space } from '../utils/space';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue({\n resetFallbackValue,\n initialPosition\n}) {\n if (resetFallbackValue !== undefined) {\n return !Number.isNaN(resetFallbackValue) ? resetFallbackValue : null;\n }\n if (initialPosition !== undefined) {\n return !Number.isNaN(initialPosition) ? initialPosition : null;\n }\n return null;\n}\nfunction UnforwardedRangeControl(props, forwardedRef) {\n const {\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n afterIcon,\n allowReset = false,\n beforeIcon,\n className,\n color: colorProp = COLORS.theme.accent,\n currentInput,\n disabled = false,\n help,\n hideLabelFromVision = false,\n initialPosition,\n isShiftStepEnabled = true,\n label,\n marks = false,\n max = 100,\n min = 0,\n onBlur = noop,\n onChange = noop,\n onFocus = noop,\n onMouseLeave = noop,\n onMouseMove = noop,\n railColor,\n renderTooltipContent = v => v,\n resetFallbackValue,\n __next40pxDefaultSize = false,\n shiftStep = 10,\n showTooltip: showTooltipProp,\n step = 1,\n trackColor,\n value: valueProp,\n withInputField = true,\n __shouldNotWarnDeprecated36pxSize,\n ...otherProps\n } = props;\n const [value, setValue] = useControlledRangeValue({\n min,\n max,\n value: valueProp !== null && valueProp !== void 0 ? valueProp : null,\n initial: initialPosition\n });\n const isResetPendent = useRef(false);\n let hasTooltip = showTooltipProp;\n let hasInputField = withInputField;\n if (step === 'any') {\n // The tooltip and number input field are hidden when the step is \"any\"\n // because the decimals get too lengthy to fit well.\n hasTooltip = false;\n hasInputField = false;\n }\n const [showTooltip, setShowTooltip] = useState(hasTooltip);\n const [isFocused, setIsFocused] = useState(false);\n const inputRef = useRef();\n const isCurrentlyFocused = inputRef.current?.matches(':focus');\n const isThumbFocused = !disabled && isFocused;\n const isValueReset = value === null;\n const currentValue = value !== undefined ? value : currentInput;\n const inputSliderValue = isValueReset ? '' : currentValue;\n const rangeFillValue = isValueReset ? (max - min) / 2 + min : value;\n const fillValue = isValueReset ? 50 : (value - min) / (max - min) * 100;\n const fillValueOffset = `${clamp(fillValue, 0, 100)}%`;\n const classes = clsx('components-range-control', className);\n const wrapperClasses = clsx('components-range-control__wrapper', !!marks && 'is-marked');\n const id = useInstanceId(UnforwardedRangeControl, 'inspector-range-control');\n const describedBy = !!help ? `${id}__help` : undefined;\n const enableTooltip = hasTooltip !== false && Number.isFinite(value);\n const handleOnRangeChange = event => {\n const nextValue = parseFloat(event.target.value);\n setValue(nextValue);\n onChange(nextValue);\n };\n const handleOnChange = next => {\n // @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n // potentially receive a NaN when next is undefined.\n let nextValue = parseFloat(next);\n setValue(nextValue);\n\n /*\n * Calls onChange only when nextValue is numeric\n * otherwise may queue a reset for the blur event.\n */\n if (!isNaN(nextValue)) {\n if (nextValue < min || nextValue > max) {\n nextValue = floatClamp(nextValue, min, max);\n }\n onChange(nextValue);\n isResetPendent.current = false;\n } else if (allowReset) {\n isResetPendent.current = true;\n }\n };\n const handleOnInputNumberBlur = () => {\n if (isResetPendent.current) {\n handleOnReset();\n isResetPendent.current = false;\n }\n };\n const handleOnReset = () => {\n // Reset to `resetFallbackValue` if defined, otherwise set internal value\n // to `null` \u2014 which, if propagated to the `value` prop, will cause\n // the value to be reset to the `initialPosition` prop if defined.\n const resetValue = Number.isNaN(resetFallbackValue) ? null : resetFallbackValue !== null && resetFallbackValue !== void 0 ? resetFallbackValue : null;\n setValue(resetValue);\n\n /**\n * Previously, this callback would always receive undefined as\n * an argument. This behavior is unexpected, specifically\n * when resetFallbackValue is defined.\n *\n * The value of undefined is not ideal. Passing it through\n * to internal <input /> elements would change it from a\n * controlled component to an uncontrolled component.\n *\n * For now, to minimize unexpected regressions, we're going to\n * preserve the undefined callback argument, except when a\n * resetFallbackValue is defined.\n */\n onChange(resetValue !== null && resetValue !== void 0 ? resetValue : undefined);\n };\n const handleShowTooltip = () => setShowTooltip(true);\n const handleHideTooltip = () => setShowTooltip(false);\n const handleOnBlur = event => {\n onBlur(event);\n setIsFocused(false);\n handleHideTooltip();\n };\n const handleOnFocus = event => {\n onFocus(event);\n setIsFocused(true);\n handleShowTooltip();\n };\n const offsetStyle = {\n [isRTL() ? 'right' : 'left']: fillValueOffset\n };\n\n // Add default size deprecation warning.\n maybeWarnDeprecated36pxSize({\n componentName: 'RangeControl',\n __next40pxDefaultSize,\n size: undefined,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n className: classes,\n label: label,\n hideLabelFromVision: hideLabelFromVision,\n id: `${id}`,\n help: help,\n children: /*#__PURE__*/_jsxs(Root, {\n className: \"components-range-control__root\",\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: [beforeIcon && /*#__PURE__*/_jsx(BeforeIconWrapper, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: beforeIcon\n })\n }), /*#__PURE__*/_jsxs(Wrapper, {\n className: wrapperClasses,\n color: colorProp,\n marks: !!marks,\n children: [/*#__PURE__*/_jsx(InputRange, {\n ...otherProps,\n className: \"components-range-control__slider\",\n describedBy: describedBy,\n disabled: disabled,\n id: `${id}`,\n label: label,\n max: max,\n min: min,\n onBlur: handleOnBlur,\n onChange: handleOnRangeChange,\n onFocus: handleOnFocus,\n onMouseMove: onMouseMove,\n onMouseLeave: onMouseLeave,\n ref: useMergeRefs([inputRef, forwardedRef]),\n step: step,\n value: inputSliderValue !== null && inputSliderValue !== void 0 ? inputSliderValue : undefined\n }), /*#__PURE__*/_jsx(RangeRail, {\n \"aria-hidden\": true,\n disabled: disabled,\n marks: marks,\n max: max,\n min: min,\n railColor: railColor,\n step: step,\n value: rangeFillValue\n }), /*#__PURE__*/_jsx(Track, {\n \"aria-hidden\": true,\n className: \"components-range-control__track\",\n disabled: disabled,\n style: {\n width: fillValueOffset\n },\n trackColor: trackColor\n }), /*#__PURE__*/_jsx(ThumbWrapper, {\n className: \"components-range-control__thumb-wrapper\",\n style: offsetStyle,\n disabled: disabled,\n children: /*#__PURE__*/_jsx(Thumb, {\n \"aria-hidden\": true,\n isFocused: isThumbFocused,\n disabled: disabled\n })\n }), enableTooltip && /*#__PURE__*/_jsx(SimpleTooltip, {\n className: \"components-range-control__tooltip\",\n inputRef: inputRef,\n tooltipPlacement: \"bottom\",\n renderTooltipContent: renderTooltipContent,\n show: isCurrentlyFocused || showTooltip,\n style: offsetStyle,\n value: value\n })]\n }), afterIcon && /*#__PURE__*/_jsx(AfterIconWrapper, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: afterIcon\n })\n }), hasInputField && /*#__PURE__*/_jsx(InputNumber, {\n \"aria-label\": label,\n className: \"components-range-control__number\",\n disabled: disabled,\n inputMode: \"decimal\",\n isShiftStepEnabled: isShiftStepEnabled,\n max: max,\n min: min,\n onBlur: handleOnInputNumberBlur,\n onChange: handleOnChange,\n shiftStep: shiftStep,\n size: __next40pxDefaultSize ? '__unstable-large' : 'default',\n __unstableInputWidth: __next40pxDefaultSize ? space(20) : space(16),\n step: step\n // @ts-expect-error TODO: Investigate if the `null` value is necessary\n ,\n value: inputSliderValue,\n __shouldNotWarnDeprecated36pxSize: true\n }), allowReset && /*#__PURE__*/_jsx(ActionRightWrapper, {\n children: /*#__PURE__*/_jsx(Button, {\n className: \"components-range-control__reset\"\n // If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n ,\n accessibleWhenDisabled: !disabled\n // The reset button should be disabled if RangeControl itself is disabled,\n // or if the current `value` is equal to the value that would be currently\n // assigned when clicking the button.\n ,\n disabled: disabled || value === computeResetValue({\n resetFallbackValue,\n initialPosition\n }),\n variant: \"secondary\",\n size: \"small\",\n onClick: handleOnReset,\n children: __('Reset')\n })\n })]\n })\n });\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ value, setValue ] = useState();\n * return (\n * <RangeControl\n * __next40pxDefaultSize\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={ 50 }\n * label=\"Opacity\"\n * max={ 100 }\n * min={ 0 }\n * value={ value }\n * onChange={ setValue }\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef(UnforwardedRangeControl);\nexport default RangeControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,kBAA0B;AAC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AG,iBAA8B,uCAAAH,KAAK,yCAAa;AAAA,QAClD,cAAc;AAAA,QACd,WAAW;AAAA,QACX;AAAA,QACA,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA,QAAQ;AAAA,QACR,UAAU;AAAA,QACV;AAAA,QACA,MAAM,wBAAwB,qBAAqB;AAAA,QACnD,sBAAsB,4BAAwB,oBAAM,EAAE,QAAI,oBAAM,EAAE;AAAA,QAClE;AAAA,QAGA,OAAO;AAAA,QACP,mCAAmC;AAAA,MACrC,CAAC,GAAG,cAA2B,uCAAAA,KAAK,gDAAoB;AAAA,QACtD,UAAuB,uCAAAA,KAAK,cAAAO,SAAQ;AAAA,UAClC,WAAW;AAAA,UAGX,wBAAwB,CAAC;AAAA,UAKzB,UAAU,YAAY,UAAU,kBAAkB;AAAA,YAChD;AAAA,YACA;AAAA,UACF,CAAC;AAAA,UACD,SAAS;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,UACT,cAAU,gBAAG,OAAO;AAAA,QACtB,CAAC;AAAA,MACH,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AA0BO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport { ActionRightWrapper, AfterIconWrapper, BeforeIconWrapper, InputNumber, Root, Track, ThumbWrapper, Thumb, Wrapper } from './styles/range-control-styles';\nimport { space } from '../utils/space';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue({\n resetFallbackValue,\n initialPosition\n}) {\n if (resetFallbackValue !== undefined) {\n return !Number.isNaN(resetFallbackValue) ? resetFallbackValue : null;\n }\n if (initialPosition !== undefined) {\n return !Number.isNaN(initialPosition) ? initialPosition : null;\n }\n return null;\n}\nfunction UnforwardedRangeControl(props, forwardedRef) {\n const {\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n afterIcon,\n allowReset = false,\n beforeIcon,\n className,\n color: colorProp = COLORS.theme.accent,\n currentInput,\n disabled = false,\n help,\n hideLabelFromVision = false,\n initialPosition,\n isShiftStepEnabled = true,\n label,\n marks = false,\n max = 100,\n min = 0,\n onBlur = noop,\n onChange = noop,\n onFocus = noop,\n onMouseLeave = noop,\n onMouseMove = noop,\n railColor,\n renderTooltipContent = v => v,\n resetFallbackValue,\n __next40pxDefaultSize = false,\n shiftStep = 10,\n showTooltip: showTooltipProp,\n step = 1,\n trackColor,\n value: valueProp,\n withInputField = true,\n __shouldNotWarnDeprecated36pxSize,\n ...otherProps\n } = props;\n const [value, setValue] = useControlledRangeValue({\n min,\n max,\n value: valueProp !== null && valueProp !== void 0 ? valueProp : null,\n initial: initialPosition\n });\n const isResetPendent = useRef(false);\n let hasTooltip = showTooltipProp;\n let hasInputField = withInputField;\n if (step === 'any') {\n // The tooltip and number input field are hidden when the step is \"any\"\n // because the decimals get too lengthy to fit well.\n hasTooltip = false;\n hasInputField = false;\n }\n const [showTooltip, setShowTooltip] = useState(hasTooltip);\n const [isFocused, setIsFocused] = useState(false);\n const inputRef = useRef();\n const isCurrentlyFocused = inputRef.current?.matches(':focus');\n const isThumbFocused = !disabled && isFocused;\n const isValueReset = value === null;\n const currentValue = value !== undefined ? value : currentInput;\n const inputSliderValue = isValueReset ? '' : currentValue;\n const rangeFillValue = isValueReset ? (max - min) / 2 + min : value;\n const fillValue = isValueReset ? 50 : (value - min) / (max - min) * 100;\n const fillValueOffset = `${clamp(fillValue, 0, 100)}%`;\n const classes = clsx('components-range-control', className);\n const wrapperClasses = clsx('components-range-control__wrapper', !!marks && 'is-marked');\n const id = useInstanceId(UnforwardedRangeControl, 'inspector-range-control');\n const describedBy = !!help ? `${id}__help` : undefined;\n const enableTooltip = hasTooltip !== false && Number.isFinite(value);\n const handleOnRangeChange = event => {\n const nextValue = parseFloat(event.target.value);\n setValue(nextValue);\n onChange(nextValue);\n };\n const handleOnChange = next => {\n // @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n // potentially receive a NaN when next is undefined.\n let nextValue = parseFloat(next);\n setValue(nextValue);\n\n /*\n * Calls onChange only when nextValue is numeric\n * otherwise may queue a reset for the blur event.\n */\n if (!isNaN(nextValue)) {\n if (nextValue < min || nextValue > max) {\n nextValue = floatClamp(nextValue, min, max);\n }\n onChange(nextValue);\n isResetPendent.current = false;\n } else if (allowReset) {\n isResetPendent.current = true;\n }\n };\n const handleOnInputNumberBlur = () => {\n if (isResetPendent.current) {\n handleOnReset();\n isResetPendent.current = false;\n }\n };\n const handleOnReset = () => {\n // Reset to `resetFallbackValue` if defined, otherwise set internal value\n // to `null` \u2014 which, if propagated to the `value` prop, will cause\n // the value to be reset to the `initialPosition` prop if defined.\n const resetValue = Number.isNaN(resetFallbackValue) ? null : resetFallbackValue !== null && resetFallbackValue !== void 0 ? resetFallbackValue : null;\n setValue(resetValue);\n\n /**\n * Previously, this callback would always receive undefined as\n * an argument. This behavior is unexpected, specifically\n * when resetFallbackValue is defined.\n *\n * The value of undefined is not ideal. Passing it through\n * to internal <input /> elements would change it from a\n * controlled component to an uncontrolled component.\n *\n * For now, to minimize unexpected regressions, we're going to\n * preserve the undefined callback argument, except when a\n * resetFallbackValue is defined.\n */\n onChange(resetValue !== null && resetValue !== void 0 ? resetValue : undefined);\n };\n const handleShowTooltip = () => setShowTooltip(true);\n const handleHideTooltip = () => setShowTooltip(false);\n const handleOnBlur = event => {\n onBlur(event);\n setIsFocused(false);\n handleHideTooltip();\n };\n const handleOnFocus = event => {\n onFocus(event);\n setIsFocused(true);\n handleShowTooltip();\n };\n const offsetStyle = {\n [isRTL() ? 'right' : 'left']: fillValueOffset\n };\n\n // Add default size deprecation warning.\n maybeWarnDeprecated36pxSize({\n componentName: 'RangeControl',\n __next40pxDefaultSize,\n size: undefined,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n className: classes,\n label: label,\n hideLabelFromVision: hideLabelFromVision,\n id: `${id}`,\n help: help,\n children: /*#__PURE__*/_jsxs(Root, {\n className: \"components-range-control__root\",\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: [beforeIcon && /*#__PURE__*/_jsx(BeforeIconWrapper, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: beforeIcon\n })\n }), /*#__PURE__*/_jsxs(Wrapper, {\n className: wrapperClasses,\n color: colorProp,\n marks: !!marks,\n children: [/*#__PURE__*/_jsx(InputRange, {\n ...otherProps,\n className: \"components-range-control__slider\",\n describedBy: describedBy,\n disabled: disabled,\n id: `${id}`,\n label: label,\n max: max,\n min: min,\n onBlur: handleOnBlur,\n onChange: handleOnRangeChange,\n onFocus: handleOnFocus,\n onMouseMove: onMouseMove,\n onMouseLeave: onMouseLeave,\n ref: useMergeRefs([inputRef, forwardedRef]),\n step: step,\n value: inputSliderValue !== null && inputSliderValue !== void 0 ? inputSliderValue : undefined\n }), /*#__PURE__*/_jsx(RangeRail, {\n \"aria-hidden\": true,\n disabled: disabled,\n marks: marks,\n max: max,\n min: min,\n railColor: railColor,\n step: step,\n value: rangeFillValue\n }), /*#__PURE__*/_jsx(Track, {\n \"aria-hidden\": true,\n className: \"components-range-control__track\",\n disabled: disabled,\n style: {\n width: fillValueOffset\n },\n trackColor: trackColor\n }), /*#__PURE__*/_jsx(ThumbWrapper, {\n className: \"components-range-control__thumb-wrapper\",\n style: offsetStyle,\n disabled: disabled,\n children: /*#__PURE__*/_jsx(Thumb, {\n \"aria-hidden\": true,\n isFocused: isThumbFocused,\n disabled: disabled\n })\n }), enableTooltip && /*#__PURE__*/_jsx(SimpleTooltip, {\n className: \"components-range-control__tooltip\",\n inputRef: inputRef,\n tooltipPlacement: \"bottom\",\n renderTooltipContent: renderTooltipContent,\n show: isCurrentlyFocused || showTooltip,\n style: offsetStyle,\n value: value\n })]\n }), afterIcon && /*#__PURE__*/_jsx(AfterIconWrapper, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: afterIcon\n })\n }), hasInputField && /*#__PURE__*/_jsx(InputNumber, {\n \"aria-label\": label,\n className: \"components-range-control__number\",\n disabled: disabled,\n inputMode: \"decimal\",\n isShiftStepEnabled: isShiftStepEnabled,\n max: max,\n min: min,\n onBlur: handleOnInputNumberBlur,\n onChange: handleOnChange,\n shiftStep: shiftStep,\n size: __next40pxDefaultSize ? '__unstable-large' : 'default',\n __unstableInputWidth: __next40pxDefaultSize ? space(20) : space(16),\n step: step\n // @ts-expect-error TODO: Investigate if the `null` value is necessary\n ,\n value: inputSliderValue,\n __shouldNotWarnDeprecated36pxSize: true\n }), allowReset && /*#__PURE__*/_jsx(ActionRightWrapper, {\n children: /*#__PURE__*/_jsx(Button, {\n className: \"components-range-control__reset\"\n // If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n ,\n accessibleWhenDisabled: !disabled\n // The reset button should be disabled if RangeControl itself is disabled,\n // or if the current `value` is equal to the value that would be currently\n // assigned when clicking the button.\n ,\n disabled: disabled || value === computeResetValue({\n resetFallbackValue,\n initialPosition\n }),\n variant: \"secondary\",\n size: \"small\",\n onClick: handleOnReset,\n children: __('Reset')\n })\n })]\n })\n });\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ value, setValue ] = useState();\n * return (\n * <RangeControl\n * __next40pxDefaultSize\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={ 50 }\n * label=\"Opacity\"\n * max={ 100 }\n * min={ 0 }\n * value={ value }\n * onChange={ setValue }\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef(UnforwardedRangeControl);\nRangeControl.displayName = 'RangeControl';\nexport default RangeControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,kBAA0B;AAC1B,qBAA6C;AAC7C,qBAA4C;AAK5C,0BAAwB;AACxB,oBAAmB;AACnB,kBAAiB;AACjB,mBAAuB;AACvB,IAAAA,gBAAoD;AACpD,kBAAsB;AACtB,yBAAuB;AACvB,kBAAsB;AACtB,qBAA0B;AAC1B,kCAAgI;AAChI,mBAAsB;AACtB,kCAA4C;AAC5C,yBAA2C;AAC3C,IAAM,OAAO,MAAM;AAAC;AAMpB,SAAS,kBAAkB;AAAA,EACzB;AAAA,EACA;AACF,GAAG;AACD,MAAI,uBAAuB,QAAW;AACpC,WAAO,CAAC,OAAO,MAAM,kBAAkB,IAAI,qBAAqB;AAAA,EAClE;AACA,MAAI,oBAAoB,QAAW;AACjC,WAAO,CAAC,OAAO,MAAM,eAAe,IAAI,kBAAkB;AAAA,EAC5D;AACA,SAAO;AACT;AACA,SAAS,wBAAwB,OAAO,cAAc;AACpD,QAAM;AAAA,IACJ,yBAAyB;AAAA;AAAA,IAEzB;AAAA,IACA,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA,OAAO,YAAY,oBAAO,MAAM;AAAA,IAChC;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,sBAAsB;AAAA,IACtB;AAAA,IACA,qBAAqB;AAAA,IACrB;AAAA,IACA,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAA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"Icon", "InputRange", "RangeRail", "SimpleTooltip", "Button"]
7
7
  }
@@ -93,6 +93,7 @@ function UnforwardedResizableBox({
93
93
  });
94
94
  }
95
95
  var ResizableBox = (0, import_element.forwardRef)(UnforwardedResizableBox);
96
+ ResizableBox.displayName = "ResizableBox";
96
97
  var resizable_box_default = ResizableBox;
97
98
  // Annotate the CommonJS export names for ESM import in node:
98
99
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/resizable-box/index.tsx"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { Resizable } from 're-resizable';\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\nconst HANDLE_CLASSES = {\n top: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top'),\n right: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-right'),\n bottom: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom'),\n left: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-left'),\n topLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-left'),\n topRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-right'),\n bottomRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-right'),\n bottomLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-left')\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n width: undefined,\n height: undefined,\n top: undefined,\n right: undefined,\n bottom: undefined,\n left: undefined\n};\nconst HANDLE_STYLES = {\n top: HANDLE_STYLES_OVERRIDES,\n right: HANDLE_STYLES_OVERRIDES,\n bottom: HANDLE_STYLES_OVERRIDES,\n left: HANDLE_STYLES_OVERRIDES,\n topLeft: HANDLE_STYLES_OVERRIDES,\n topRight: HANDLE_STYLES_OVERRIDES,\n bottomRight: HANDLE_STYLES_OVERRIDES,\n bottomLeft: HANDLE_STYLES_OVERRIDES\n};\nfunction UnforwardedResizableBox({\n className,\n children,\n showHandle = true,\n __experimentalShowTooltip: showTooltip = false,\n __experimentalTooltipProps: tooltipProps = {},\n ...props\n}, ref) {\n return /*#__PURE__*/_jsxs(Resizable, {\n className: clsx('components-resizable-box__container', showHandle && 'has-show-handle', className)\n // Add a focusable element within the drag handle. Unfortunately,\n // `re-resizable` does not make them properly focusable by default,\n // causing focus to move the the block wrapper which triggers block\n // drag.\n ,\n handleComponent: Object.fromEntries(Object.keys(HANDLE_CLASSES).map(key => [key, /*#__PURE__*/_jsx(\"div\", {\n tabIndex: -1\n }, key)])),\n handleClasses: HANDLE_CLASSES,\n handleStyles: HANDLE_STYLES,\n ref: ref,\n ...props,\n children: [children, showTooltip && /*#__PURE__*/_jsx(ResizeTooltip, {\n ...tooltipProps\n })]\n });\n}\nexport const ResizableBox = forwardRef(UnforwardedResizableBox);\nexport default ResizableBox;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,kBAAiB;AACjB,0BAA0B;AAI1B,4BAA0B;AAC1B,yBAA2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AO;AAAA,MACxG,UAAU;AAAA,IACZ,GAAG,GAAG,CAAC,CAAC,CAAC;AAAA,IACT,eAAe;AAAA,IACf,cAAc;AAAA,IACd;AAAA,IACA,GAAG;AAAA,IACH,UAAU,CAAC,UAAU,eAA4B,uCAAAA,KAAK,sBAAAC,SAAe;AAAA,MACnE,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { Resizable } from 're-resizable';\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\nconst HANDLE_CLASSES = {\n top: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top'),\n right: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-right'),\n bottom: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom'),\n left: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-left'),\n topLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-left'),\n topRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-right'),\n bottomRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-right'),\n bottomLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-left')\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n width: undefined,\n height: undefined,\n top: undefined,\n right: undefined,\n bottom: undefined,\n left: undefined\n};\nconst HANDLE_STYLES = {\n top: HANDLE_STYLES_OVERRIDES,\n right: HANDLE_STYLES_OVERRIDES,\n bottom: HANDLE_STYLES_OVERRIDES,\n left: HANDLE_STYLES_OVERRIDES,\n topLeft: HANDLE_STYLES_OVERRIDES,\n topRight: HANDLE_STYLES_OVERRIDES,\n bottomRight: HANDLE_STYLES_OVERRIDES,\n bottomLeft: HANDLE_STYLES_OVERRIDES\n};\nfunction UnforwardedResizableBox({\n className,\n children,\n showHandle = true,\n __experimentalShowTooltip: showTooltip = false,\n __experimentalTooltipProps: tooltipProps = {},\n ...props\n}, ref) {\n return /*#__PURE__*/_jsxs(Resizable, {\n className: clsx('components-resizable-box__container', showHandle && 'has-show-handle', className)\n // Add a focusable element within the drag handle. Unfortunately,\n // `re-resizable` does not make them properly focusable by default,\n // causing focus to move the the block wrapper which triggers block\n // drag.\n ,\n handleComponent: Object.fromEntries(Object.keys(HANDLE_CLASSES).map(key => [key, /*#__PURE__*/_jsx(\"div\", {\n tabIndex: -1\n }, key)])),\n handleClasses: HANDLE_CLASSES,\n handleStyles: HANDLE_STYLES,\n ref: ref,\n ...props,\n children: [children, showTooltip && /*#__PURE__*/_jsx(ResizeTooltip, {\n ...tooltipProps\n })]\n });\n}\nexport const ResizableBox = forwardRef(UnforwardedResizableBox);\nResizableBox.displayName = 'ResizableBox';\nexport default ResizableBox;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,kBAAiB;AACjB,0BAA0B;AAI1B,4BAA0B;AAC1B,y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K,OAAO;AAAA,MACxG,UAAU;AAAA,IACZ,GAAG,GAAG,CAAC,CAAC,CAAC;AAAA,IACT,eAAe;AAAA,IACf,cAAc;AAAA,IACd;AAAA,IACA,GAAG;AAAA,IACH,UAAU,CAAC,UAAU,eAA4B,uCAAAA,KAAK,sBAAAC,SAAe;AAAA,MACnE,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
6
6
  "names": ["clsx", "_jsxs", "_jsx", "ResizeTooltip"]
7
7
  }
@@ -122,6 +122,7 @@ function UnforwardedSearchControl({
122
122
  });
123
123
  }
124
124
  var SearchControl = (0, import_element.forwardRef)(UnforwardedSearchControl);
125
+ SearchControl.displayName = "SearchControl";
125
126
  var search_control_default = SearchControl;
126
127
  // Annotate the CommonJS export names for ESM import in node:
127
128
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/search-control/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { InputControlPrefixWrapper } from '../input-control/input-prefix-wrapper';\nimport { InputControlSuffixWrapper } from '../input-control/input-suffix-wrapper';\nimport { StyledInputControl, StyledIcon } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction SuffixItem({\n searchRef,\n value,\n onChange,\n onClose\n}) {\n if (!onClose && !value) {\n return null;\n }\n if (onClose) {\n deprecated('`onClose` prop in wp.components.SearchControl', {\n since: '6.8'\n });\n }\n const onReset = () => {\n onChange('');\n searchRef.current?.focus();\n };\n return /*#__PURE__*/_jsx(InputControlSuffixWrapper, {\n variant: \"control\",\n children: /*#__PURE__*/_jsx(Button, {\n size: \"small\",\n icon: closeSmall,\n label: onClose ? __('Close search') : __('Reset search'),\n onClick: onClose !== null && onClose !== void 0 ? onClose : onReset\n })\n });\n}\nfunction UnforwardedSearchControl({\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n className,\n onChange,\n value,\n label = __('Search'),\n placeholder = __('Search'),\n hideLabelFromVision = true,\n onClose,\n size = 'default',\n ...restProps\n}, forwardedRef) {\n // @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n // Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n const {\n disabled,\n ...filteredRestProps\n } = restProps;\n const searchRef = useRef(null);\n const instanceId = useInstanceId(SearchControl, 'components-search-control');\n return /*#__PURE__*/_jsx(StyledInputControl, {\n __next40pxDefaultSize: true,\n id: instanceId,\n hideLabelFromVision: hideLabelFromVision,\n label: label,\n ref: useMergeRefs([searchRef, forwardedRef]),\n type: \"search\",\n size: size,\n className: clsx('components-search-control', className),\n onChange: nextValue => onChange(nextValue !== null && nextValue !== void 0 ? nextValue : ''),\n autoComplete: \"off\",\n placeholder: placeholder,\n value: value !== null && value !== void 0 ? value : '',\n prefix: /*#__PURE__*/_jsx(InputControlPrefixWrapper, {\n variant: \"icon\",\n children: /*#__PURE__*/_jsx(StyledIcon, {\n icon: search,\n fill: \"currentColor\"\n })\n }),\n suffix: /*#__PURE__*/_jsx(SuffixItem, {\n searchRef: searchRef,\n value: value,\n onChange: onChange,\n onClose: onClose\n }),\n ...filteredRestProps\n });\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef(UnforwardedSearchControl);\nexport default SearchControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA4C;AAC5C,kBAAmB;AACnB,mBAAmC;AACnC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,kCAA0C;AAC1C,kCAA0C;AAC1C,oBAA+C;AAC/C,yBAA4B;AAC5B,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,WAAW,CAAC,OAAO;AACtB,WAAO;AAAA,EACT;AACA,MAAI,SAAS;AACX,0BAAAA,SAAW,iDAAiD;AAAA,MAC1D,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,QAAM,UAAU,MAAM;AACpB,aAAS,EAAE;AACX,cAAU,SAAS,MAAM;AAAA,EAC3B;AACA,SAAoB,uCAAAC,KAAK,uDAA2B;AAAA,IAClD,SAAS;AAAA,IACT,UAAuB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAClC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,cAAU,gBAAG,cAAc,QAAI,gBAAG,cAAc;AAAA,MACvD,SAAS,YAAY,QAAQ,YAAY,SAAS,UAAU;AAAA,IAC9D,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,yBAAyB;AAAA,EAChC,yBAAyB;AAAA;AAAA,EAEzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAQ,gBAAG,QAAQ;AAAA,EACnB,kBAAc,gBAAG,QAAQ;AAAA,EACzB,sBAAsB;AAAA,EACtB;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAG,cAAc;AAGf,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,gBAAY,uBAAO,IAAI;AAC7B,QAAM,iBAAa,8BAAc,eAAe,2BAA2B;AAC3E,SAAoB,uCAAAD,KAAK,kCAAoB;AAAA,IAC3C,uBAAuB;AAAA,IACvB,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAK,6BAAa,CAAC,WAAW,YAAY,CAAC;AAAA,IAC3C,MAAM;AAAA,IACN;AAAA,IACA,eAAW,YAAAE,SAAK,6BAA6B,SAAS;AAAA,IACtD,UAAU,eAAa,SAAS,cAAc,QAAQ,cAAc,SAAS,YAAY,EAAE;AAAA,IAC3F,cAAc;AAAA,IACd;AAAA,IACA,OAAO,UAAU,QAAQ,UAAU,SAAS,QAAQ;AAAA,IACpD,QAAqB,uCAAAF,KAAK,uDAA2B;AAAA,MACnD,SAAS;AAAA,MACT,UAAuB,uCAAAA,KAAK,0BAAY;AAAA,QACtC,MAAM;AAAA,QACN,MAAM;AAAA,MACR,CAAC;AAAA,IACH,CAAC;AAAA,IACD,QAAqB,uCAAAA,KAAK,YAAY;AAAA,MACpC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;AAqBO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,IAAO,yBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { InputControlPrefixWrapper } from '../input-control/input-prefix-wrapper';\nimport { InputControlSuffixWrapper } from '../input-control/input-suffix-wrapper';\nimport { StyledInputControl, StyledIcon } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction SuffixItem({\n searchRef,\n value,\n onChange,\n onClose\n}) {\n if (!onClose && !value) {\n return null;\n }\n if (onClose) {\n deprecated('`onClose` prop in wp.components.SearchControl', {\n since: '6.8'\n });\n }\n const onReset = () => {\n onChange('');\n searchRef.current?.focus();\n };\n return /*#__PURE__*/_jsx(InputControlSuffixWrapper, {\n variant: \"control\",\n children: /*#__PURE__*/_jsx(Button, {\n size: \"small\",\n icon: closeSmall,\n label: onClose ? __('Close search') : __('Reset search'),\n onClick: onClose !== null && onClose !== void 0 ? onClose : onReset\n })\n });\n}\nfunction UnforwardedSearchControl({\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n className,\n onChange,\n value,\n label = __('Search'),\n placeholder = __('Search'),\n hideLabelFromVision = true,\n onClose,\n size = 'default',\n ...restProps\n}, forwardedRef) {\n // @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n // Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n const {\n disabled,\n ...filteredRestProps\n } = restProps;\n const searchRef = useRef(null);\n const instanceId = useInstanceId(SearchControl, 'components-search-control');\n return /*#__PURE__*/_jsx(StyledInputControl, {\n __next40pxDefaultSize: true,\n id: instanceId,\n hideLabelFromVision: hideLabelFromVision,\n label: label,\n ref: useMergeRefs([searchRef, forwardedRef]),\n type: \"search\",\n size: size,\n className: clsx('components-search-control', className),\n onChange: nextValue => onChange(nextValue !== null && nextValue !== void 0 ? nextValue : ''),\n autoComplete: \"off\",\n placeholder: placeholder,\n value: value !== null && value !== void 0 ? value : '',\n prefix: /*#__PURE__*/_jsx(InputControlPrefixWrapper, {\n variant: \"icon\",\n children: /*#__PURE__*/_jsx(StyledIcon, {\n icon: search,\n fill: \"currentColor\"\n })\n }),\n suffix: /*#__PURE__*/_jsx(SuffixItem, {\n searchRef: searchRef,\n value: value,\n onChange: onChange,\n onClose: onClose\n }),\n ...filteredRestProps\n });\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef(UnforwardedSearchControl);\nSearchControl.displayName = 'SearchControl';\nexport default SearchControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA4C;AAC5C,kBAAmB;AACnB,mBAAmC;AACnC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,kCAA0C;AAC1C,kCAA0C;AAC1C,oBAA+C;AAC/C,yBAA4B;AAC5B,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,WAAW,CAAC,OAAO;AACtB,WAAO;AAAA,EACT;AACA,MAAI,SAAS;AACX,0BAAAA,SAAW,iDAAiD;AAAA,MAC1D,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,QAAM,UAAU,MAAM;AACpB,aAAS,EAAE;AACX,cAAU,SAAS,MAAM;AAAA,EAC3B;AACA,SAAoB,uCAAAC,KAAK,uDAA2B;AAAA,IAClD,SAAS;AAAA,IACT,UAAuB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAClC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,cAAU,gBAAG,cAAc,QAAI,gBAAG,cAAc;AAAA,MACvD,SAAS,YAAY,QAAQ,YAAY,SAAS,UAAU;AAAA,IAC9D,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,yBAAyB;AAAA,EAChC,yBAAyB;AAAA;AAAA,EAEzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAQ,gBAAG,QAAQ;AAAA,EACnB,kBAAc,gBAAG,QAAQ;AAAA,EACzB,sBAAsB;AAAA,EACtB;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAG,cAAc;AAGf,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,gBAAY,uBAAO,IAAI;AAC7B,QAAM,iBAAa,8BAAc,eAAe,2BAA2B;AAC3E,SAAoB,uCAAAD,KAAK,kCAAoB;AAAA,IAC3C,uBAAuB;AAAA,IACvB,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAK,6BAAa,CAAC,WAAW,YAAY,CAAC;AAAA,IAC3C,MAAM;AAAA,IACN;AAAA,IACA,eAAW,YAAAE,SAAK,6BAA6B,SAAS;AAAA,IACtD,UAAU,eAAa,SAAS,cAAc,QAAQ,cAAc,SAAS,YAAY,EAAE;AAAA,IAC3F,cAAc;AAAA,IACd;AAAA,IACA,OAAO,UAAU,QAAQ,UAAU,SAAS,QAAQ;AAAA,IACpD,QAAqB,uCAAAF,KAAK,uDAA2B;AAAA,MACnD,SAAS;AAAA,MACT,UAAuB,uCAAAA,KAAK,0BAAY;AAAA,QACtC,MAAM;AAAA,QACN,MAAM;AAAA,MACR,CAAC;AAAA,IACH,CAAC;AAAA,IACD,QAAqB,uCAAAA,KAAK,YAAY;AAAA,MACpC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;AAqBO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
6
6
  "names": ["deprecated", "_jsx", "Button", "clsx"]
7
7
  }
@@ -156,6 +156,7 @@ function UnforwardedSelectControl(props, ref) {
156
156
  });
157
157
  }
158
158
  var SelectControl = (0, import_element.forwardRef)(UnforwardedSelectControl);
159
+ SelectControl.displayName = "SelectControl";
159
160
  var select_control_default = SelectControl;
160
161
  // Annotate the CommonJS export names for ESM import in node:
161
162
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/select-control/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { Select, StyledInputBase } from './styles/select-control-styles';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(SelectControl);\n const id = `inspector-select-control-${instanceId}`;\n return idProp || id;\n}\nfunction SelectOptions({\n options\n}) {\n return options.map(({\n id,\n label,\n value,\n ...optionProps\n }, index) => {\n const key = id || `${label}-${value}-${index}`;\n return /*#__PURE__*/_jsx(\"option\", {\n value: value,\n ...optionProps,\n children: label\n }, key);\n });\n}\nfunction UnforwardedSelectControl(props, ref) {\n const {\n className,\n disabled = false,\n help,\n hideLabelFromVision,\n id: idProp,\n label,\n multiple = false,\n onChange,\n options = [],\n size = 'default',\n value: valueProp,\n labelPosition = 'top',\n children,\n prefix,\n suffix,\n variant = 'default',\n __next40pxDefaultSize = false,\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n __shouldNotWarnDeprecated36pxSize,\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n const id = useUniqueId(idProp);\n const helpId = help ? `${id}__help` : undefined;\n if (!options?.length && !children) {\n return null;\n }\n const handleOnChange = event => {\n if (props.multiple) {\n const selectedOptions = Array.from(event.target.options).filter(({\n selected\n }) => selected);\n const newValues = selectedOptions.map(({\n value\n }) => value);\n props.onChange?.(newValues, {\n event\n });\n return;\n }\n props.onChange?.(event.target.value, {\n event\n });\n };\n const classes = clsx('components-select-control', className);\n maybeWarnDeprecated36pxSize({\n componentName: 'SelectControl',\n __next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n help: help,\n id: id,\n className: classes,\n children: /*#__PURE__*/_jsx(StyledInputBase, {\n disabled: disabled,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n isBorderless: variant === 'minimal',\n label: label,\n size: size,\n suffix: suffix || !multiple && /*#__PURE__*/_jsx(SelectControlChevronDown, {}),\n prefix: prefix,\n labelPosition: labelPosition,\n __unstableInputWidth: variant === 'minimal' ? 'auto' : undefined,\n variant: variant,\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: /*#__PURE__*/_jsx(Select, {\n ...restProps,\n __next40pxDefaultSize: __next40pxDefaultSize,\n \"aria-describedby\": helpId,\n className: \"components-select-control__input\",\n disabled: disabled,\n id: id,\n multiple: multiple,\n onChange: handleOnChange,\n ref: ref,\n selectSize: size,\n value: valueProp,\n variant: variant,\n children: children || /*#__PURE__*/_jsx(SelectOptions, {\n options: options\n })\n })\n })\n });\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * __next40pxDefaultSize\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef(UnforwardedSelectControl);\nexport default SelectControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,qBAA2B;AAK3B,0BAAwB;AACxB,mCAAwC;AACxC,0BAAqC;AACrC,kCAAiD;AACjD,kCAA4C;AAC5C,yBAA4B;AAC5B,SAAS,YAAY,QAAQ;AAC3B,QA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AACA,UAAM,WAAW,MAAM,OAAO,OAAO;AAAA,MACnC;AAAA,IACF,CAAC;AAAA,EACH;AACA,QAAM,cAAU,YAAAC,SAAK,6BAA6B,SAAS;AAC3D,+DAA4B;AAAA,IAC1B,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SAAoB,uCAAAD,KAAK,oBAAAE,SAAa;AAAA,IACpC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,UAAuB,uCAAAF,KAAK,8CAAiB;AAAA,MAC3C;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,YAAY;AAAA,MAC1B;AAAA,MACA;AAAA,MACA,QAAQ,UAAU,CAAC,YAAyB,uCAAAA,KAAK,oBAAAG,SAA0B,CAAC,CAAC;AAAA,MAC7E;AAAA,MACA;AAAA,MACA,sBAAsB,YAAY,YAAY,SAAS;AAAA,MACvD;AAAA,MACA;AAAA,MACA,UAAuB,uCAAAH,KAAK,qCAAQ;AAAA,QAClC,GAAG;AAAA,QACH;AAAA,QACA,oBAAoB;AAAA,QACpB,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA,YAAY;AAAA,QACZ,OAAO;AAAA,QACP;AAAA,QACA,UAAU,YAAyB,uCAAAA,KAAK,eAAe;AAAA,UACrD;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AA6BO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,IAAO,yBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { Select, StyledInputBase } from './styles/select-control-styles';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(SelectControl);\n const id = `inspector-select-control-${instanceId}`;\n return idProp || id;\n}\nfunction SelectOptions({\n options\n}) {\n return options.map(({\n id,\n label,\n value,\n ...optionProps\n }, index) => {\n const key = id || `${label}-${value}-${index}`;\n return /*#__PURE__*/_jsx(\"option\", {\n value: value,\n ...optionProps,\n children: label\n }, key);\n });\n}\nfunction UnforwardedSelectControl(props, ref) {\n const {\n className,\n disabled = false,\n help,\n hideLabelFromVision,\n id: idProp,\n label,\n multiple = false,\n onChange,\n options = [],\n size = 'default',\n value: valueProp,\n labelPosition = 'top',\n children,\n prefix,\n suffix,\n variant = 'default',\n __next40pxDefaultSize = false,\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n __shouldNotWarnDeprecated36pxSize,\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n const id = useUniqueId(idProp);\n const helpId = help ? `${id}__help` : undefined;\n if (!options?.length && !children) {\n return null;\n }\n const handleOnChange = event => {\n if (props.multiple) {\n const selectedOptions = Array.from(event.target.options).filter(({\n selected\n }) => selected);\n const newValues = selectedOptions.map(({\n value\n }) => value);\n props.onChange?.(newValues, {\n event\n });\n return;\n }\n props.onChange?.(event.target.value, {\n event\n });\n };\n const classes = clsx('components-select-control', className);\n maybeWarnDeprecated36pxSize({\n componentName: 'SelectControl',\n __next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n help: help,\n id: id,\n className: classes,\n children: /*#__PURE__*/_jsx(StyledInputBase, {\n disabled: disabled,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n isBorderless: variant === 'minimal',\n label: label,\n size: size,\n suffix: suffix || !multiple && /*#__PURE__*/_jsx(SelectControlChevronDown, {}),\n prefix: prefix,\n labelPosition: labelPosition,\n __unstableInputWidth: variant === 'minimal' ? 'auto' : undefined,\n variant: variant,\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: /*#__PURE__*/_jsx(Select, {\n ...restProps,\n __next40pxDefaultSize: __next40pxDefaultSize,\n \"aria-describedby\": helpId,\n className: \"components-select-control__input\",\n disabled: disabled,\n id: id,\n multiple: multiple,\n onChange: handleOnChange,\n ref: ref,\n selectSize: size,\n value: valueProp,\n variant: variant,\n children: children || /*#__PURE__*/_jsx(SelectOptions, {\n options: options\n })\n })\n })\n });\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * __next40pxDefaultSize\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef(UnforwardedSelectControl);\n\n// @ts-expect-error TS says: \"Property 'displayName' does not exist on type ...\"\nSelectControl.displayName = 'SelectControl';\nexport default SelectControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,qBAA2B;AAK3B,0BAAwB;AACxB,mCAAwC;AACxC,0BAAqC;AACrC,kCAAiD;AACjD,kCAA4C;AAC5C,yBAA4B;AAC5B,SAAS,YAAY,QAAQ;AAC3B,QAAM,iBAAa,8BAAc,aAAa;AAC9C,QAAM,KAAK,4BAA4B,UAAU;AACjD,SAAO,UAAU;AACnB;AACA,SAAS,cAAc;AAAA,EACrB;AACF,GAAG;AACD,SAAO,QAAQ,IAAI,CAAC;AAAA,IAClB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f;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SAAoB,uCAAAD,KAAK,oBAAAE,SAAa;AAAA,IACpC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,UAAuB,uCAAAF,KAAK,8CAAiB;AAAA,MAC3C;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,YAAY;AAAA,MAC1B;AAAA,MACA;AAAA,MACA,QAAQ,UAAU,CAAC,YAAyB,uCAAAA,KAAK,oBAAAG,SAA0B,CAAC,CAAC;AAAA,MAC7E;AAAA,MACA;AAAA,MACA,sBAAsB,YAAY,YAAY,SAAS;AAAA,MACvD;AAAA,MACA;AAAA,MACA,UAAuB,uCAAAH,KAAK,qCAAQ;AAAA,QAClC,GAAG;AAAA,QACH;AAAA,QACA,oBAAoB;AAAA,QACpB,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA,YAAY;AAAA,QACZ,OAAO;AAAA,QACP;AAAA,QACA,UAAU,YAAyB,uCAAAA,KAAK,eAAe;AAAA,UACrD;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AA6BO,IAAM,oBAAgB,2BAAW,wBAAwB;AAGhE,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
6
6
  "names": ["_jsx", "clsx", "BaseControl", "SelectControlChevronDown"]
7
7
  }
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(slot_exports);
36
36
  var import_element = require("@wordpress/element");
37
37
  var import_compose = require("@wordpress/compose");
38
38
  var import_view = require("../../view/index.cjs");
39
- var import_slot_fill_context = __toESM(require("./slot-fill-context.cjs"));
39
+ var import_context = __toESM(require("../context.cjs"));
40
40
  var import_jsx_runtime = require("react/jsx-runtime");
41
41
  function Slot(props, forwardedRef) {
42
42
  const {
@@ -48,18 +48,30 @@ function Slot(props, forwardedRef) {
48
48
  children,
49
49
  ...restProps
50
50
  } = props;
51
- const registry = (0, import_element.useContext)(import_slot_fill_context.default);
51
+ const registry = (0, import_element.useContext)(import_context.default);
52
+ const instanceRef = (0, import_element.useRef)({});
52
53
  const ref = (0, import_element.useRef)(null);
53
54
  const fillPropsRef = (0, import_element.useRef)(fillProps);
54
55
  (0, import_element.useLayoutEffect)(() => {
55
56
  fillPropsRef.current = fillProps;
56
57
  }, [fillProps]);
57
58
  (0, import_element.useLayoutEffect)(() => {
58
- registry.registerSlot(name, ref, fillPropsRef.current);
59
- return () => registry.unregisterSlot(name, ref);
59
+ const instance = instanceRef.current;
60
+ registry.registerSlot(name, {
61
+ type: "portal",
62
+ instance,
63
+ ref,
64
+ fillProps: fillPropsRef.current
65
+ });
66
+ return () => registry.unregisterSlot(name, instance);
60
67
  }, [registry, name]);
61
68
  (0, import_element.useLayoutEffect)(() => {
62
- registry.updateSlot(name, ref, fillPropsRef.current);
69
+ registry.updateSlot(name, {
70
+ type: "portal",
71
+ instance: instanceRef.current,
72
+ ref,
73
+ fillProps: fillPropsRef.current
74
+ });
63
75
  });
64
76
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_view.View, {
65
77
  as,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/slot-fill/bubbles-virtually/slot.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect, useContext, forwardRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport SlotFillContext from './slot-fill-context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Slot(props, forwardedRef) {\n const {\n name,\n fillProps = {},\n as,\n // `children` is not allowed. However, if it is passed,\n // it will be displayed as is, so remove `children`.\n children,\n ...restProps\n } = props;\n const registry = useContext(SlotFillContext);\n const ref = useRef(null);\n\n // We don't want to unregister and register the slot whenever\n // `fillProps` change, which would cause the fill to be re-mounted. Instead,\n // we can just update the slot (see hook below).\n // For more context, see https://github.com/WordPress/gutenberg/pull/44403#discussion_r994415973\n const fillPropsRef = useRef(fillProps);\n useLayoutEffect(() => {\n fillPropsRef.current = fillProps;\n }, [fillProps]);\n useLayoutEffect(() => {\n registry.registerSlot(name, ref, fillPropsRef.current);\n return () => registry.unregisterSlot(name, ref);\n }, [registry, name]);\n useLayoutEffect(() => {\n registry.updateSlot(name, ref, fillPropsRef.current);\n });\n return /*#__PURE__*/_jsx(View, {\n as: as,\n ref: useMergeRefs([forwardedRef, ref]),\n ...restProps\n });\n}\nexport default forwardRef(Slot);"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAAgE;AAChE,qBAA6B;AAK7B,kBAAqB;AACrB,+BAA4B;AAC5B,yBAA4B;AAC5B,SAAS,KAAK,OAAO,cAAc;AACjC,QAAM;AAAA,IACJ;AAAA,IACA,YAAY,CAAC;AAAA,IACb;AAAA;AAAA;AAAA,IAGA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,eAAW,2BAAW,yBAAAA,OAAe;AAC3C,QAAM,UAAM,uBAAO,IAAI;AAMvB,QAAM,mBAAe,uBAAO,SAAS;AACrC,sCAAgB,MAAM;AACpB,iBAAa,UAAU;AAAA,EACzB,GAAG,CAAC,SAAS,CAAC;AACd,sCAAgB,MAAM;AACpB,aAAS,aAAa,MAAM,KAAK,aAAa,OAAO;AACrD,WAAO,MAAM,SAAS,eAAe,MAAM,GAAG;AAAA,EAChD,GAAG,CAAC,UAAU,IAAI,CAAC;AACnB,sCAAgB,MAAM;AACpB,aAAS,WAAW,MAAM,KAAK,aAAa,OAAO;AAAA,EACrD,CAAC;AACD,SAAoB,uCAAAC,KAAK,kBAAM;AAAA,IAC7B;AAAA,IACA,SAAK,6BAAa,CAAC,cAAc,GAAG,CAAC;AAAA,IACrC,GAAG;AAAA,EACL,CAAC;AACH;AACA,IAAO,mBAAQ,2BAAW,IAAI;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect, useContext, forwardRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport SlotFillContext from '../context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Slot(props, forwardedRef) {\n const {\n name,\n fillProps = {},\n as,\n // `children` is not allowed. However, if it is passed,\n // it will be displayed as is, so remove `children`.\n children,\n ...restProps\n } = props;\n const registry = useContext(SlotFillContext);\n const instanceRef = useRef({});\n const ref = useRef(null);\n const fillPropsRef = useRef(fillProps);\n useLayoutEffect(() => {\n fillPropsRef.current = fillProps;\n }, [fillProps]);\n useLayoutEffect(() => {\n const instance = instanceRef.current;\n registry.registerSlot(name, {\n type: 'portal',\n instance,\n ref,\n fillProps: fillPropsRef.current\n });\n return () => registry.unregisterSlot(name, instance);\n }, [registry, name]);\n useLayoutEffect(() => {\n registry.updateSlot(name, {\n type: 'portal',\n instance: instanceRef.current,\n ref,\n fillProps: fillPropsRef.current\n });\n });\n return /*#__PURE__*/_jsx(View, {\n as: as,\n ref: useMergeRefs([forwardedRef, ref]),\n ...restProps\n });\n}\nexport default forwardRef(Slot);"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAAgE;AAChE,qBAA6B;AAK7B,kBAAqB;AACrB,qBAA4B;AAC5B,yBAA4B;AAC5B,SAAS,KAAK,OAAO,cAAc;AACjC,QAAM;AAAA,IACJ;AAAA,IACA,YAAY,CAAC;AAAA,IACb;AAAA;AAAA;AAAA,IAGA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,kBAAc,uBAAO,CAAC,CAAC;AAC7B,QAAM,UAAM,uBAAO,IAAI;AACvB,QAAM,mBAAe,uBAAO,SAAS;AACrC,sCAAgB,MAAM;AACpB,iBAAa,UAAU;AAAA,EACzB,GAAG,CAAC,SAAS,CAAC;AACd,sCAAgB,MAAM;AACpB,UAAM,WAAW,YAAY;AAC7B,aAAS,aAAa,MAAM;AAAA,MAC1B,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA,WAAW,aAAa;AAAA,IAC1B,CAAC;AACD,WAAO,MAAM,SAAS,eAAe,MAAM,QAAQ;AAAA,EACrD,GAAG,CAAC,UAAU,IAAI,CAAC;AACnB,sCAAgB,MAAM;AACpB,aAAS,WAAW,MAAM;AAAA,MACxB,MAAM;AAAA,MACN,UAAU,YAAY;AAAA,MACtB;AAAA,MACA,WAAW,aAAa;AAAA,IAC1B,CAAC;AAAA,EACH,CAAC;AACD,SAAoB,uCAAAC,KAAK,kBAAM;AAAA,IAC7B;AAAA,IACA,SAAK,6BAAa,CAAC,cAAc,GAAG,CAAC;AAAA,IACrC,GAAG;AAAA,EACL,CAAC;AACH;AACA,IAAO,mBAAQ,2BAAW,IAAI;",
6
6
  "names": ["SlotFillContext", "_jsx"]
7
7
  }
@@ -34,10 +34,23 @@ __export(use_slot_fills_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(use_slot_fills_exports);
36
36
  var import_element = require("@wordpress/element");
37
- var import_compose = require("@wordpress/compose");
38
- var import_slot_fill_context = __toESM(require("./slot-fill-context.cjs"));
37
+ var import_context = __toESM(require("../context.cjs"));
38
+ function useObservableValueWithSelector(map, name, selector) {
39
+ const subscribe = (0, import_element.useMemo)(() => (listener) => map.subscribe(name, listener), [map, name]);
40
+ const getValue = () => selector(map.get(name));
41
+ return (0, import_element.useSyncExternalStore)(subscribe, getValue, getValue);
42
+ }
43
+ function getLength(array) {
44
+ return array?.length;
45
+ }
39
46
  function useSlotFills(name) {
40
- const registry = (0, import_element.useContext)(import_slot_fill_context.default);
41
- return (0, import_compose.useObservableValue)(registry.fills, name);
47
+ const registry = (0, import_element.useContext)(import_context.default);
48
+ const length = useObservableValueWithSelector(registry.fills, name, getLength);
49
+ const fills = (0, import_element.useMemo)(() => {
50
+ return length !== void 0 ? Array.from({
51
+ length
52
+ }) : void 0;
53
+ }, [length]);
54
+ return fills;
42
55
  }
43
56
  //# sourceMappingURL=use-slot-fills.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/slot-fill/bubbles-virtually/use-slot-fills.ts"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { useObservableValue } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nexport default function useSlotFills(name) {\n const registry = useContext(SlotFillContext);\n return useObservableValue(registry.fills, name);\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAC3B,qBAAmC;AAKnC,+BAA4B;AACb,SAAR,aAA8B,MAAM;AACzC,QAAM,eAAW,2BAAW,yBAAAA,OAAe;AAC3C,aAAO,mCAAmB,SAAS,OAAO,IAAI;AAChD;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext, useMemo, useSyncExternalStore } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport SlotFillContext from '../context';\nfunction useObservableValueWithSelector(map, name, selector) {\n const subscribe = useMemo(() => listener => map.subscribe(name, listener), [map, name]);\n const getValue = () => selector(map.get(name));\n return useSyncExternalStore(subscribe, getValue, getValue);\n}\nfunction getLength(array) {\n return array?.length;\n}\nexport default function useSlotFills(name) {\n const registry = useContext(SlotFillContext);\n const length = useObservableValueWithSelector(registry.fills, name, getLength);\n // callers expect an opaque array with length `length`, so create that array\n const fills = useMemo(() => {\n return length !== undefined ? Array.from({\n length\n }) : undefined;\n }, [length]);\n return fills;\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA0D;AAI1D,qBAA4B;AAC5B,SAAS,+BAA+B,KAAK,MAAM,UAAU;AAC3D,QAAM,gBAAY,wBAAQ,MAAM,cAAY,IAAI,UAAU,MAAM,QAAQ,GAAG,CAAC,KAAK,IAAI,CAAC;AACtF,QAAM,WAAW,MAAM,SAAS,IAAI,IAAI,IAAI,CAAC;AAC7C,aAAO,qCAAqB,WAAW,UAAU,QAAQ;AAC3D;AACA,SAAS,UAAU,OAAO;AACxB,SAAO,OAAO;AAChB;AACe,SAAR,aAA8B,MAAM;AACzC,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,SAAS,+BAA+B,SAAS,OAAO,MAAM,SAAS;AAE7E,QAAM,YAAQ,wBAAQ,MAAM;AAC1B,WAAO,WAAW,SAAY,MAAM,KAAK;AAAA,MACvC;AAAA,IACF,CAAC,IAAI;AAAA,EACP,GAAG,CAAC,MAAM,CAAC;AACX,SAAO;AACT;",
6
6
  "names": ["SlotFillContext"]
7
7
  }
@@ -35,12 +35,16 @@ __export(use_slot_exports, {
35
35
  module.exports = __toCommonJS(use_slot_exports);
36
36
  var import_element = require("@wordpress/element");
37
37
  var import_compose = require("@wordpress/compose");
38
- var import_slot_fill_context = __toESM(require("./slot-fill-context.cjs"));
38
+ var import_context = __toESM(require("../context.cjs"));
39
39
  function useSlot(name) {
40
- const registry = (0, import_element.useContext)(import_slot_fill_context.default);
40
+ const registry = (0, import_element.useContext)(import_context.default);
41
41
  const slot = (0, import_compose.useObservableValue)(registry.slots, name);
42
+ let ref;
43
+ if (slot && slot.type === "portal") {
44
+ ref = slot.ref;
45
+ }
42
46
  return {
43
- ...slot
47
+ ref
44
48
  };
45
49
  }
46
50
  //# sourceMappingURL=use-slot.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/slot-fill/bubbles-virtually/use-slot.ts"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { useObservableValue } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nexport default function useSlot(name) {\n const registry = useContext(SlotFillContext);\n const slot = useObservableValue(registry.slots, name);\n return {\n ...slot\n };\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAC3B,qBAAmC;AAKnC,+BAA4B;AACb,SAAR,QAAyB,MAAM;AACpC,QAAM,eAAW,2BAAW,yBAAAA,OAAe;AAC3C,QAAM,WAAO,mCAAmB,SAAS,OAAO,IAAI;AACpD,SAAO;AAAA,IACL,GAAG;AAAA,EACL;AACF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { useObservableValue } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from '../context';\nexport default function useSlot(name) {\n const registry = useContext(SlotFillContext);\n const slot = useObservableValue(registry.slots, name);\n let ref;\n if (slot && slot.type === 'portal') {\n ref = slot.ref;\n }\n return {\n ref\n };\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAC3B,qBAAmC;AAKnC,qBAA4B;AACb,SAAR,QAAyB,MAAM;AACpC,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,WAAO,mCAAmB,SAAS,OAAO,IAAI;AACpD,MAAI;AACJ,MAAI,QAAQ,KAAK,SAAS,UAAU;AAClC,UAAM,KAAK;AAAA,EACb;AACA,SAAO;AAAA,IACL;AAAA,EACF;AACF;",
6
6
  "names": ["SlotFillContext"]
7
7
  }
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,36 +17,45 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // packages/components/src/slot-fill/context.ts
21
31
  var context_exports = {};
22
32
  __export(context_exports, {
23
- SlotFillContext: () => SlotFillContext,
24
33
  default: () => context_default
25
34
  });
26
35
  module.exports = __toCommonJS(context_exports);
27
36
  var import_compose = require("@wordpress/compose");
28
37
  var import_element = require("@wordpress/element");
38
+ var import_warning = __toESM(require("@wordpress/warning"));
29
39
  var initialValue = {
30
40
  slots: (0, import_compose.observableMap)(),
31
41
  fills: (0, import_compose.observableMap)(),
32
42
  registerSlot: () => {
43
+ globalThis.SCRIPT_DEBUG === true ? (0, import_warning.default)("Components must be wrapped within `SlotFillProvider`. See https://developer.wordpress.org/block-editor/components/slot-fill/") : void 0;
33
44
  },
34
45
  unregisterSlot: () => {
35
46
  },
47
+ updateSlot: () => {
48
+ },
36
49
  registerFill: () => {
37
50
  },
38
51
  unregisterFill: () => {
39
52
  },
40
53
  updateFill: () => {
41
- }
54
+ },
55
+ // This helps the provider know if it's using the default context value or not.
56
+ isDefault: true
42
57
  };
43
58
  var SlotFillContext = (0, import_element.createContext)(initialValue);
44
59
  SlotFillContext.displayName = "SlotFillContext";
45
60
  var context_default = SlotFillContext;
46
- // Annotate the CommonJS export names for ESM import in node:
47
- 0 && (module.exports = {
48
- SlotFillContext
49
- });
50
61
  //# sourceMappingURL=context.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/slot-fill/context.ts"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { observableMap } from '@wordpress/compose';\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nconst initialValue = {\n slots: observableMap(),\n fills: observableMap(),\n registerSlot: () => {},\n unregisterSlot: () => {},\n registerFill: () => {},\n unregisterFill: () => {},\n updateFill: () => {}\n};\nexport const SlotFillContext = createContext(initialValue);\nSlotFillContext.displayName = 'SlotFillContext';\nexport default SlotFillContext;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA8B;AAC9B,qBAA8B;AAM9B,IAAM,eAAe;AAAA,EACnB,WAAO,8BAAc;AAAA,EACrB,WAAO,8BAAc;AAAA,EACrB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,YAAY,MAAM;AAAA,EAAC;AACrB;AACO,IAAM,sBAAkB,8BAAc,YAAY;AACzD,gBAAgB,cAAc;AAC9B,IAAO,kBAAQ;",
6
- "names": []
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { observableMap } from '@wordpress/compose';\nimport { createContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\n\nconst initialValue = {\n slots: observableMap(),\n fills: observableMap(),\n registerSlot: () => {\n globalThis.SCRIPT_DEBUG === true ? warning('Components must be wrapped within `SlotFillProvider`. ' + 'See https://developer.wordpress.org/block-editor/components/slot-fill/') : void 0;\n },\n unregisterSlot: () => {},\n updateSlot: () => {},\n registerFill: () => {},\n unregisterFill: () => {},\n updateFill: () => {},\n // This helps the provider know if it's using the default context value or not.\n isDefault: true\n};\nconst SlotFillContext = createContext(initialValue);\nSlotFillContext.displayName = 'SlotFillContext';\nexport default SlotFillContext;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA8B;AAC9B,qBAA8B;AAC9B,qBAAoB;AAMpB,IAAM,eAAe;AAAA,EACnB,WAAO,8BAAc;AAAA,EACrB,WAAO,8BAAc;AAAA,EACrB,cAAc,MAAM;AAClB,eAAW,iBAAiB,WAAO,eAAAA,SAAQ,8HAAmI,IAAI;AAAA,EACpL;AAAA,EACA,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,YAAY,MAAM;AAAA,EAAC;AAAA,EACnB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,YAAY,MAAM;AAAA,EAAC;AAAA;AAAA,EAEnB,WAAW;AACb;AACA,IAAM,sBAAkB,8BAAc,YAAY;AAClD,gBAAgB,cAAc;AAC9B,IAAO,kBAAQ;",
6
+ "names": ["warning"]
7
7
  }
@@ -27,18 +27,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
- // packages/components/src/slot-fill/fill.ts
30
+ // packages/components/src/slot-fill/fill.tsx
31
31
  var fill_exports = {};
32
32
  __export(fill_exports, {
33
33
  default: () => Fill
34
34
  });
35
35
  module.exports = __toCommonJS(fill_exports);
36
+ var import_compose = require("@wordpress/compose");
36
37
  var import_element = require("@wordpress/element");
37
38
  var import_context = __toESM(require("./context.cjs"));
39
+ var import_style_provider = __toESM(require("../style-provider/index.cjs"));
40
+ var import_jsx_runtime = require("react/jsx-runtime");
38
41
  function Fill({
39
42
  name,
40
43
  children
41
44
  }) {
45
+ var _slot$fillProps;
42
46
  const registry = (0, import_element.useContext)(import_context.default);
43
47
  const instanceRef = (0, import_element.useRef)({});
44
48
  const childrenRef = (0, import_element.useRef)(children);
@@ -47,12 +51,33 @@ function Fill({
47
51
  }, [children]);
48
52
  (0, import_element.useLayoutEffect)(() => {
49
53
  const instance = instanceRef.current;
50
- registry.registerFill(name, instance, childrenRef.current);
54
+ registry.registerFill(name, {
55
+ instance,
56
+ children: childrenRef.current
57
+ });
51
58
  return () => registry.unregisterFill(name, instance);
52
59
  }, [registry, name]);
53
60
  (0, import_element.useLayoutEffect)(() => {
54
- registry.updateFill(name, instanceRef.current, childrenRef.current);
61
+ registry.updateFill(name, {
62
+ instance: instanceRef.current,
63
+ children: childrenRef.current
64
+ });
55
65
  });
56
- return null;
66
+ const slot = (0, import_compose.useObservableValue)(registry.slots, name);
67
+ if (!slot) {
68
+ return null;
69
+ }
70
+ if (slot.type === "children") {
71
+ return null;
72
+ }
73
+ const portalEl = slot.ref.current;
74
+ if (!portalEl) {
75
+ return null;
76
+ }
77
+ const wrappedChildren = typeof children === "function" ? children((_slot$fillProps = slot.fillProps) !== null && _slot$fillProps !== void 0 ? _slot$fillProps : {}) : children;
78
+ return (0, import_element.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style_provider.default, {
79
+ document: portalEl.ownerDocument,
80
+ children: wrappedChildren
81
+ }), portalEl);
57
82
  }
58
83
  //# sourceMappingURL=fill.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/slot-fill/fill.ts"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext, useLayoutEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nexport default function Fill({\n name,\n children\n}) {\n const registry = useContext(SlotFillContext);\n const instanceRef = useRef({});\n const childrenRef = useRef(children);\n useLayoutEffect(() => {\n childrenRef.current = children;\n }, [children]);\n useLayoutEffect(() => {\n const instance = instanceRef.current;\n registry.registerFill(name, instance, childrenRef.current);\n return () => registry.unregisterFill(name, instance);\n }, [registry, name]);\n useLayoutEffect(() => {\n registry.updateFill(name, instanceRef.current, childrenRef.current);\n });\n return null;\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAoD;AAKpD,qBAA4B;AACb,SAAR,KAAsB;AAAA,EAC3B;AAAA,EACA;AACF,GAAG;AACD,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,kBAAc,uBAAO,CAAC,CAAC;AAC7B,QAAM,kBAAc,uBAAO,QAAQ;AACnC,sCAAgB,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,GAAG,CAAC,QAAQ,CAAC;AACb,sCAAgB,MAAM;AACpB,UAAM,WAAW,YAAY;AAC7B,aAAS,aAAa,MAAM,UAAU,YAAY,OAAO;AACzD,WAAO,MAAM,SAAS,eAAe,MAAM,QAAQ;AAAA,EACrD,GAAG,CAAC,UAAU,IAAI,CAAC;AACnB,sCAAgB,MAAM;AACpB,aAAS,WAAW,MAAM,YAAY,SAAS,YAAY,OAAO;AAAA,EACpE,CAAC;AACD,SAAO;AACT;",
6
- "names": ["SlotFillContext"]
3
+ "sources": ["../../src/slot-fill/fill.tsx"],
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useObservableValue } from '@wordpress/compose';\nimport { useContext, useLayoutEffect, useRef, createPortal } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport StyleProvider from '../style-provider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function Fill({\n name,\n children\n}) {\n var _slot$fillProps;\n const registry = useContext(SlotFillContext);\n const instanceRef = useRef({});\n const childrenRef = useRef(children);\n useLayoutEffect(() => {\n childrenRef.current = children;\n }, [children]);\n useLayoutEffect(() => {\n const instance = instanceRef.current;\n registry.registerFill(name, {\n instance,\n children: childrenRef.current\n });\n return () => registry.unregisterFill(name, instance);\n }, [registry, name]);\n useLayoutEffect(() => {\n registry.updateFill(name, {\n instance: instanceRef.current,\n children: childrenRef.current\n });\n });\n const slot = useObservableValue(registry.slots, name);\n if (!slot) {\n return null;\n }\n if (slot.type === 'children') {\n return null;\n }\n const portalEl = slot.ref.current;\n if (!portalEl) {\n return null;\n }\n const wrappedChildren = typeof children === 'function' ? children((_slot$fillProps = slot.fillProps) !== null && _slot$fillProps !== void 0 ? _slot$fillProps : {}) : children;\n\n // When using a `Fill`, the `children` will be rendered in the document of the\n // `Slot`. This means that we need to wrap the `children` in a `StyleProvider`\n // to make sure we're referencing the right document/iframe (instead of the\n // context of the `Fill`'s parent).\n return createPortal(/*#__PURE__*/_jsx(StyleProvider, {\n document: portalEl.ownerDocument,\n children: wrappedChildren\n }), portalEl);\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAmC;AACnC,qBAAkE;AAKlE,qBAA4B;AAC5B,4BAA0B;AAC1B,yBAA4B;AACb,SAAR,KAAsB;AAAA,EAC3B;AAAA,EACA;AACF,GAAG;AACD,MAAI;AACJ,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,kBAAc,uBAAO,CAAC,CAAC;AAC7B,QAAM,kBAAc,uBAAO,QAAQ;AACnC,sCAAgB,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,GAAG,CAAC,QAAQ,CAAC;AACb,sCAAgB,MAAM;AACpB,UAAM,WAAW,YAAY;AAC7B,aAAS,aAAa,MAAM;AAAA,MAC1B;AAAA,MACA,UAAU,YAAY;AAAA,IACxB,CAAC;AACD,WAAO,MAAM,SAAS,eAAe,MAAM,QAAQ;AAAA,EACrD,GAAG,CAAC,UAAU,IAAI,CAAC;AACnB,sCAAgB,MAAM;AACpB,aAAS,WAAW,MAAM;AAAA,MACxB,UAAU,YAAY;AAAA,MACtB,UAAU,YAAY;AAAA,IACxB,CAAC;AAAA,EACH,CAAC;AACD,QAAM,WAAO,mCAAmB,SAAS,OAAO,IAAI;AACpD,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,MAAI,KAAK,SAAS,YAAY;AAC5B,WAAO;AAAA,EACT;AACA,QAAM,WAAW,KAAK,IAAI;AAC1B,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AACA,QAAM,kBAAkB,OAAO,aAAa,aAAa,UAAU,kBAAkB,KAAK,eAAe,QAAQ,oBAAoB,SAAS,kBAAkB,CAAC,CAAC,IAAI;AAMtK,aAAO,6BAA0B,uCAAAC,KAAK,sBAAAC,SAAe;AAAA,IACnD,UAAU,SAAS;AAAA,IACnB,UAAU;AAAA,EACZ,CAAC,GAAG,QAAQ;AACd;",
6
+ "names": ["SlotFillContext", "_jsx", "StyleProvider"]
7
7
  }
@@ -30,10 +30,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // packages/components/src/slot-fill/index.tsx
31
31
  var slot_fill_exports = {};
32
32
  __export(slot_fill_exports, {
33
- Fill: () => Fill,
33
+ Fill: () => import_fill.default,
34
34
  Provider: () => Provider,
35
35
  Slot: () => Slot,
36
- UnforwardedSlot: () => UnforwardedSlot,
37
36
  createSlotFill: () => createSlotFill,
38
37
  useSlot: () => import_use_slot.default,
39
38
  useSlotFills: () => import_use_slot_fills.default
@@ -42,24 +41,13 @@ module.exports = __toCommonJS(slot_fill_exports);
42
41
  var import_element = require("@wordpress/element");
43
42
  var import_fill = __toESM(require("./fill.cjs"));
44
43
  var import_slot = __toESM(require("./slot.cjs"));
45
- var import_fill2 = __toESM(require("./bubbles-virtually/fill.cjs"));
46
44
  var import_slot2 = __toESM(require("./bubbles-virtually/slot.cjs"));
47
- var import_slot_fill_provider = __toESM(require("./bubbles-virtually/slot-fill-provider.cjs"));
48
45
  var import_provider = __toESM(require("./provider.cjs"));
49
- var import_slot_fill_context = __toESM(require("./bubbles-virtually/slot-fill-context.cjs"));
46
+ var import_context = __toESM(require("./context.cjs"));
50
47
  var import_jsx_runtime = require("react/jsx-runtime");
51
48
  var import_use_slot = __toESM(require("./bubbles-virtually/use-slot.cjs"));
52
49
  var import_use_slot_fills = __toESM(require("./bubbles-virtually/use-slot-fills.cjs"));
53
- function Fill(props) {
54
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
55
- children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fill.default, {
56
- ...props
57
- }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fill2.default, {
58
- ...props
59
- })]
60
- });
61
- }
62
- function UnforwardedSlot(props, ref) {
50
+ var Slot = (0, import_element.forwardRef)((props, ref) => {
63
51
  const {
64
52
  bubblesVirtually,
65
53
  ...restProps
@@ -73,28 +61,26 @@ function UnforwardedSlot(props, ref) {
73
61
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_slot.default, {
74
62
  ...restProps
75
63
  });
76
- }
77
- var Slot = (0, import_element.forwardRef)(UnforwardedSlot);
64
+ });
65
+ Slot.displayName = "Slot";
78
66
  function Provider({
79
67
  children,
80
68
  passthrough = false
81
69
  }) {
82
- const parent = (0, import_element.useContext)(import_slot_fill_context.default);
70
+ const parent = (0, import_element.useContext)(import_context.default);
83
71
  if (!parent.isDefault && passthrough) {
84
72
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
85
73
  children
86
74
  });
87
75
  }
88
76
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_provider.default, {
89
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_slot_fill_provider.default, {
90
- children
91
- })
77
+ children
92
78
  });
93
79
  }
94
80
  Provider.displayName = "SlotFillProvider";
95
81
  function createSlotFill(key) {
96
82
  const baseName = typeof key === "symbol" ? key.description : key;
97
- const FillComponent = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Fill, {
83
+ const FillComponent = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fill.default, {
98
84
  name: key,
99
85
  ...props
100
86
  });
@@ -116,7 +102,6 @@ function createSlotFill(key) {
116
102
  Fill,
117
103
  Provider,
118
104
  Slot,
119
- UnforwardedSlot,
120
105
  createSlotFill,
121
106
  useSlot,
122
107
  useSlotFills