@wordpress/components 32.0.1-next.v.0 → 32.1.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 (1188) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/CONTRIBUTING.md +6 -0
  3. package/build/alignment-matrix-control/cell.cjs +6 -121
  4. package/build/alignment-matrix-control/cell.cjs.map +2 -2
  5. package/build/alignment-matrix-control/icon.cjs +2 -3
  6. package/build/alignment-matrix-control/icon.cjs.map +2 -2
  7. package/build/alignment-matrix-control/index.cjs +6 -121
  8. package/build/alignment-matrix-control/index.cjs.map +2 -2
  9. package/build/angle-picker-control/angle-circle.cjs +6 -85
  10. package/build/angle-picker-control/angle-circle.cjs.map +2 -2
  11. package/build/angle-picker-control/index.cjs +1 -0
  12. package/build/angle-picker-control/index.cjs.map +2 -2
  13. package/build/autocomplete/autocompleter-ui.cjs +1 -2
  14. package/build/autocomplete/autocompleter-ui.cjs.map +2 -2
  15. package/build/box-control/index.cjs +15 -7
  16. package/build/box-control/index.cjs.map +2 -2
  17. package/build/box-control/input-control.cjs +8 -12
  18. package/build/box-control/input-control.cjs.map +2 -2
  19. package/build/button/deprecated.cjs +12 -8
  20. package/build/button/deprecated.cjs.map +2 -2
  21. package/build/button/index.cjs +7 -12
  22. package/build/button/index.cjs.map +2 -2
  23. package/build/button-group/index.cjs +1 -0
  24. package/build/button-group/index.cjs.map +2 -2
  25. package/build/calendar/date-calendar/index.cjs +2 -2
  26. package/build/calendar/date-calendar/index.cjs.map +2 -2
  27. package/build/calendar/date-range-calendar/index.cjs +4 -6
  28. package/build/calendar/date-range-calendar/index.cjs.map +2 -2
  29. package/build/card/card/hook.cjs +1 -2
  30. package/build/card/card/hook.cjs.map +2 -2
  31. package/build/circular-option-picker/circular-option-picker-option.cjs +2 -1
  32. package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
  33. package/build/circular-option-picker/circular-option-picker.cjs +1 -0
  34. package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
  35. package/build/clipboard-button/index.cjs +11 -7
  36. package/build/clipboard-button/index.cjs.map +2 -2
  37. package/build/color-indicator/index.cjs +1 -0
  38. package/build/color-indicator/index.cjs.map +2 -2
  39. package/build/color-palette/index.cjs +1 -0
  40. package/build/color-palette/index.cjs.map +2 -2
  41. package/build/color-palette/utils.cjs +2 -2
  42. package/build/color-palette/utils.cjs.map +2 -2
  43. package/build/combobox-control/index.cjs +2 -3
  44. package/build/combobox-control/index.cjs.map +2 -2
  45. package/build/composite/group-label.cjs +1 -2
  46. package/build/composite/group-label.cjs.map +2 -2
  47. package/build/composite/group.cjs +1 -2
  48. package/build/composite/group.cjs.map +2 -2
  49. package/build/composite/hover.cjs +1 -2
  50. package/build/composite/hover.cjs.map +2 -2
  51. package/build/composite/index.cjs +1 -1
  52. package/build/composite/index.cjs.map +2 -2
  53. package/build/composite/item.cjs +1 -2
  54. package/build/composite/item.cjs.map +2 -2
  55. package/build/composite/legacy/index.cjs +1 -2
  56. package/build/composite/legacy/index.cjs.map +2 -2
  57. package/build/composite/row.cjs +1 -2
  58. package/build/composite/row.cjs.map +2 -2
  59. package/build/composite/typeahead.cjs +1 -2
  60. package/build/composite/typeahead.cjs.map +2 -2
  61. package/build/confirm-dialog/component.cjs +2 -2
  62. package/build/confirm-dialog/component.cjs.map +2 -2
  63. package/build/context/context-system-provider.cjs +1 -1
  64. package/build/context/context-system-provider.cjs.map +2 -2
  65. package/build/custom-gradient-picker/index.cjs +1 -2
  66. package/build/custom-gradient-picker/index.cjs.map +2 -2
  67. package/build/custom-gradient-picker/utils.cjs +1 -1
  68. package/build/custom-gradient-picker/utils.cjs.map +2 -2
  69. package/build/custom-select-control/index.cjs +2 -3
  70. package/build/custom-select-control/index.cjs.map +2 -2
  71. package/build/custom-select-control-v2/custom-select.cjs +1 -1
  72. package/build/custom-select-control-v2/custom-select.cjs.map +2 -2
  73. package/build/custom-select-control-v2/item.cjs +2 -3
  74. package/build/custom-select-control-v2/item.cjs.map +2 -2
  75. package/build/date-time/date/index.cjs +1 -1
  76. package/build/date-time/date/index.cjs.map +2 -2
  77. package/build/date-time/date-time/index.cjs +1 -0
  78. package/build/date-time/date-time/index.cjs.map +2 -2
  79. package/build/date-time/time/index.cjs +2 -2
  80. package/build/date-time/time/index.cjs.map +2 -2
  81. package/build/date-time/utils.cjs +1 -2
  82. package/build/date-time/utils.cjs.map +2 -2
  83. package/build/disclosure/index.cjs +1 -0
  84. package/build/disclosure/index.cjs.map +2 -2
  85. package/build/divider/styles.cjs +2 -2
  86. package/build/divider/styles.cjs.map +2 -2
  87. package/build/dropdown-menu/index.cjs +2 -3
  88. package/build/dropdown-menu/index.cjs.map +2 -2
  89. package/build/duotone-picker/duotone-picker.cjs +1 -1
  90. package/build/duotone-picker/duotone-picker.cjs.map +2 -2
  91. package/build/external-link/index.cjs +1 -0
  92. package/build/external-link/index.cjs.map +2 -2
  93. package/build/flex/flex/hook.cjs +1 -1
  94. package/build/flex/flex/hook.cjs.map +2 -2
  95. package/build/focal-point-picker/index.cjs +1 -2
  96. package/build/focal-point-picker/index.cjs.map +2 -2
  97. package/build/font-size-picker/font-size-picker-select.cjs +1 -2
  98. package/build/font-size-picker/font-size-picker-select.cjs.map +2 -2
  99. package/build/font-size-picker/index.cjs +3 -2
  100. package/build/font-size-picker/index.cjs.map +2 -2
  101. package/build/form-file-upload/index.cjs +9 -5
  102. package/build/form-file-upload/index.cjs.map +2 -2
  103. package/build/form-toggle/index.cjs +1 -0
  104. package/build/form-toggle/index.cjs.map +2 -2
  105. package/build/form-token-field/token-input.cjs +1 -0
  106. package/build/form-token-field/token-input.cjs.map +2 -2
  107. package/build/form-token-field/token.cjs.map +2 -2
  108. package/build/guide/index.cjs +2 -3
  109. package/build/guide/index.cjs.map +2 -2
  110. package/build/higher-order/navigate-regions/index.cjs +10 -9
  111. package/build/higher-order/navigate-regions/index.cjs.map +2 -2
  112. package/build/higher-order/with-fallback-styles/index.cjs +1 -1
  113. package/build/higher-order/with-fallback-styles/index.cjs.map +2 -2
  114. package/build/higher-order/with-focus-outside/index.cjs +1 -1
  115. package/build/higher-order/with-focus-outside/index.cjs.map +2 -2
  116. package/build/higher-order/with-spoken-messages/index.cjs +7 -5
  117. package/build/higher-order/with-spoken-messages/index.cjs.map +2 -2
  118. package/build/input-control/index.cjs +1 -0
  119. package/build/input-control/index.cjs.map +2 -2
  120. package/build/input-control/input-field.cjs +1 -1
  121. package/build/input-control/input-field.cjs.map +2 -2
  122. package/build/input-control/reducer/reducer.cjs +2 -4
  123. package/build/input-control/reducer/reducer.cjs.map +2 -2
  124. package/build/input-control/styles/input-control-styles.cjs +22 -22
  125. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  126. package/build/keyboard-shortcuts/index.cjs +1 -1
  127. package/build/keyboard-shortcuts/index.cjs.map +2 -2
  128. package/build/menu/index.cjs +1 -1
  129. package/build/menu/index.cjs.map +2 -2
  130. package/build/menu/item.cjs +1 -1
  131. package/build/menu/item.cjs.map +2 -2
  132. package/build/menu/popover.cjs +2 -2
  133. package/build/menu/popover.cjs.map +2 -2
  134. package/build/menu-item/index.cjs +1 -0
  135. package/build/menu-item/index.cjs.map +2 -2
  136. package/build/modal/index.cjs +3 -4
  137. package/build/modal/index.cjs.map +2 -2
  138. package/build/navigable-container/menu.cjs +1 -0
  139. package/build/navigable-container/menu.cjs.map +2 -2
  140. package/build/navigable-container/tabbable.cjs +1 -0
  141. package/build/navigable-container/tabbable.cjs.map +2 -2
  142. package/build/navigation/back-button/index.cjs +1 -0
  143. package/build/navigation/back-button/index.cjs.map +2 -2
  144. package/build/navigator/navigator/component.cjs +8 -13
  145. package/build/navigator/navigator/component.cjs.map +2 -2
  146. package/build/navigator/navigator-screen/component.cjs +1 -1
  147. package/build/navigator/navigator-screen/component.cjs.map +2 -2
  148. package/build/number-control/index.cjs +3 -3
  149. package/build/number-control/index.cjs.map +2 -2
  150. package/build/palette-edit/index.cjs +3 -4
  151. package/build/palette-edit/index.cjs.map +2 -2
  152. package/build/panel/body.cjs +1 -0
  153. package/build/panel/body.cjs.map +2 -2
  154. package/build/panel/index.cjs +1 -0
  155. package/build/panel/index.cjs.map +2 -2
  156. package/build/panel/row.cjs +1 -0
  157. package/build/panel/row.cjs.map +2 -2
  158. package/build/popover/index.cjs +1 -2
  159. package/build/popover/index.cjs.map +2 -2
  160. package/build/popover/overlay-middlewares.cjs +1 -2
  161. package/build/popover/overlay-middlewares.cjs.map +2 -2
  162. package/build/popover/utils.cjs +3 -8
  163. package/build/popover/utils.cjs.map +2 -2
  164. package/build/private-apis.cjs +1 -0
  165. package/build/private-apis.cjs.map +2 -2
  166. package/build/progress-bar/index.cjs +1 -0
  167. package/build/progress-bar/index.cjs.map +2 -2
  168. package/build/radio-group/index.cjs +2 -1
  169. package/build/radio-group/index.cjs.map +2 -2
  170. package/build/radio-group/radio.cjs +9 -4
  171. package/build/radio-group/radio.cjs.map +2 -2
  172. package/build/range-control/index.cjs +5 -4
  173. package/build/range-control/index.cjs.map +2 -2
  174. package/build/range-control/utils.cjs +1 -1
  175. package/build/range-control/utils.cjs.map +2 -2
  176. package/build/resizable-box/index.cjs +1 -0
  177. package/build/resizable-box/index.cjs.map +2 -2
  178. package/build/search-control/index.cjs +4 -3
  179. package/build/search-control/index.cjs.map +2 -2
  180. package/build/select-control/index.cjs +1 -0
  181. package/build/select-control/index.cjs.map +2 -2
  182. package/build/slot-fill/bubbles-virtually/slot.cjs +17 -5
  183. package/build/slot-fill/bubbles-virtually/slot.cjs.map +2 -2
  184. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs +17 -4
  185. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs.map +2 -2
  186. package/build/slot-fill/bubbles-virtually/use-slot.cjs +7 -3
  187. package/build/slot-fill/bubbles-virtually/use-slot.cjs.map +2 -2
  188. package/build/slot-fill/context.cjs +17 -6
  189. package/build/slot-fill/context.cjs.map +3 -3
  190. package/build/slot-fill/fill.cjs +28 -4
  191. package/build/slot-fill/fill.cjs.map +4 -4
  192. package/build/slot-fill/index.cjs +8 -23
  193. package/build/slot-fill/index.cjs.map +3 -3
  194. package/build/slot-fill/provider.cjs +33 -17
  195. package/build/slot-fill/provider.cjs.map +2 -2
  196. package/build/slot-fill/slot.cjs +8 -6
  197. package/build/slot-fill/slot.cjs.map +2 -2
  198. package/build/snackbar/index.cjs +1 -0
  199. package/build/snackbar/index.cjs.map +2 -2
  200. package/build/spinner/index.cjs +1 -0
  201. package/build/spinner/index.cjs.map +2 -2
  202. package/build/tab-panel/index.cjs +1 -0
  203. package/build/tab-panel/index.cjs.map +2 -2
  204. package/build/tabs/tab.cjs +1 -2
  205. package/build/tabs/tab.cjs.map +2 -2
  206. package/build/tabs/tablist.cjs +7 -11
  207. package/build/tabs/tablist.cjs.map +2 -2
  208. package/build/text-control/index.cjs +1 -0
  209. package/build/text-control/index.cjs.map +2 -2
  210. package/build/text-highlight/index.cjs +1 -0
  211. package/build/text-highlight/index.cjs.map +2 -2
  212. package/build/textarea-control/index.cjs +1 -0
  213. package/build/textarea-control/index.cjs.map +2 -2
  214. package/build/toggle-control/index.cjs +1 -0
  215. package/build/toggle-control/index.cjs.map +2 -2
  216. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs +1 -0
  217. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs.map +2 -2
  218. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs +2 -1
  219. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
  220. package/build/toggle-group-control/toggle-group-control/utils.cjs +1 -1
  221. package/build/toggle-group-control/toggle-group-control/utils.cjs.map +2 -2
  222. package/build/toggle-group-control/toggle-group-control-option/component.cjs +1 -0
  223. package/build/toggle-group-control/toggle-group-control-option/component.cjs.map +2 -2
  224. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs +1 -0
  225. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs.map +2 -2
  226. package/build/toolbar/toolbar/index.cjs +1 -0
  227. package/build/toolbar/toolbar/index.cjs.map +2 -2
  228. package/build/toolbar/toolbar/toolbar-container.cjs +1 -0
  229. package/build/toolbar/toolbar/toolbar-container.cjs.map +2 -2
  230. package/build/toolbar/toolbar-button/index.cjs +1 -0
  231. package/build/toolbar/toolbar-button/index.cjs.map +2 -2
  232. package/build/toolbar/toolbar-dropdown-menu/index.cjs +1 -0
  233. package/build/toolbar/toolbar-dropdown-menu/index.cjs.map +2 -2
  234. package/build/toolbar/toolbar-item/index.cjs +1 -0
  235. package/build/toolbar/toolbar-item/index.cjs.map +2 -2
  236. package/build/tooltip/index.cjs +1 -0
  237. package/build/tooltip/index.cjs.map +2 -2
  238. package/build/tree-grid/cell.cjs +1 -0
  239. package/build/tree-grid/cell.cjs.map +2 -2
  240. package/build/tree-grid/index.cjs +2 -2
  241. package/build/tree-grid/index.cjs.map +2 -2
  242. package/build/tree-grid/item.cjs +1 -0
  243. package/build/tree-grid/item.cjs.map +2 -2
  244. package/build/tree-grid/roving-tab-index-item.cjs +1 -0
  245. package/build/tree-grid/roving-tab-index-item.cjs.map +2 -2
  246. package/build/tree-grid/row.cjs +1 -0
  247. package/build/tree-grid/row.cjs.map +2 -2
  248. package/build/tree-select/index.cjs +12 -8
  249. package/build/tree-select/index.cjs.map +2 -2
  250. package/build/unit-control/index.cjs +5 -5
  251. package/build/unit-control/index.cjs.map +2 -2
  252. package/build/unit-control/utils.cjs +2 -2
  253. package/build/unit-control/utils.cjs.map +2 -2
  254. package/build/utils/dropdown-motion.cjs.map +2 -2
  255. package/build/utils/element-rect.cjs +3 -4
  256. package/build/utils/element-rect.cjs.map +2 -2
  257. package/build/utils/font.cjs +1 -2
  258. package/build/utils/font.cjs.map +2 -2
  259. package/build/utils/strings.cjs +1 -2
  260. package/build/utils/strings.cjs.map +2 -2
  261. package/build/utils/use-deprecated-props.cjs +1 -1
  262. package/build/utils/use-deprecated-props.cjs.map +2 -2
  263. package/build/utils/values.cjs +1 -2
  264. package/build/utils/values.cjs.map +2 -2
  265. package/build/validated-form-controls/components/checkbox-control.cjs +1 -0
  266. package/build/validated-form-controls/components/checkbox-control.cjs.map +2 -2
  267. package/build/validated-form-controls/components/combobox-control.cjs +2 -1
  268. package/build/validated-form-controls/components/combobox-control.cjs.map +2 -2
  269. package/build/validated-form-controls/components/custom-select-control.cjs +1 -0
  270. package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
  271. package/build/validated-form-controls/components/form-token-field.cjs +1 -0
  272. package/build/validated-form-controls/components/form-token-field.cjs.map +2 -2
  273. package/build/validated-form-controls/components/input-control.cjs +1 -0
  274. package/build/validated-form-controls/components/input-control.cjs.map +2 -2
  275. package/build/validated-form-controls/components/number-control.cjs +1 -0
  276. package/build/validated-form-controls/components/number-control.cjs.map +2 -2
  277. package/build/validated-form-controls/components/radio-control.cjs +1 -0
  278. package/build/validated-form-controls/components/radio-control.cjs.map +2 -2
  279. package/build/validated-form-controls/components/range-control.cjs +1 -0
  280. package/build/validated-form-controls/components/range-control.cjs.map +2 -2
  281. package/build/validated-form-controls/components/select-control.cjs +1 -0
  282. package/build/validated-form-controls/components/select-control.cjs.map +2 -2
  283. package/build/validated-form-controls/components/text-control.cjs +1 -0
  284. package/build/validated-form-controls/components/text-control.cjs.map +2 -2
  285. package/build/validated-form-controls/components/textarea-control.cjs +1 -0
  286. package/build/validated-form-controls/components/textarea-control.cjs.map +2 -2
  287. package/build/validated-form-controls/components/toggle-control.cjs +2 -1
  288. package/build/validated-form-controls/components/toggle-control.cjs.map +2 -2
  289. package/build/validated-form-controls/components/toggle-group-control.cjs +1 -0
  290. package/build/validated-form-controls/components/toggle-group-control.cjs.map +2 -2
  291. package/build/validated-form-controls/control-with-error.cjs +4 -6
  292. package/build/validated-form-controls/control-with-error.cjs.map +2 -2
  293. package/build-module/alignment-matrix-control/cell.mjs +6 -121
  294. package/build-module/alignment-matrix-control/cell.mjs.map +2 -2
  295. package/build-module/alignment-matrix-control/icon.mjs +2 -3
  296. package/build-module/alignment-matrix-control/icon.mjs.map +2 -2
  297. package/build-module/alignment-matrix-control/index.mjs +6 -121
  298. package/build-module/alignment-matrix-control/index.mjs.map +2 -2
  299. package/build-module/angle-picker-control/angle-circle.mjs +6 -85
  300. package/build-module/angle-picker-control/angle-circle.mjs.map +2 -2
  301. package/build-module/angle-picker-control/index.mjs +1 -0
  302. package/build-module/angle-picker-control/index.mjs.map +2 -2
  303. package/build-module/autocomplete/autocompleter-ui.mjs +1 -2
  304. package/build-module/autocomplete/autocompleter-ui.mjs.map +2 -2
  305. package/build-module/box-control/index.mjs +15 -7
  306. package/build-module/box-control/index.mjs.map +2 -2
  307. package/build-module/box-control/input-control.mjs +8 -12
  308. package/build-module/box-control/input-control.mjs.map +2 -2
  309. package/build-module/button/deprecated.mjs +12 -8
  310. package/build-module/button/deprecated.mjs.map +2 -2
  311. package/build-module/button/index.mjs +7 -12
  312. package/build-module/button/index.mjs.map +2 -2
  313. package/build-module/button-group/index.mjs +1 -0
  314. package/build-module/button-group/index.mjs.map +2 -2
  315. package/build-module/calendar/date-calendar/index.mjs +2 -2
  316. package/build-module/calendar/date-calendar/index.mjs.map +2 -2
  317. package/build-module/calendar/date-range-calendar/index.mjs +4 -6
  318. package/build-module/calendar/date-range-calendar/index.mjs.map +2 -2
  319. package/build-module/card/card/hook.mjs +1 -2
  320. package/build-module/card/card/hook.mjs.map +2 -2
  321. package/build-module/circular-option-picker/circular-option-picker-option.mjs +2 -1
  322. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  323. package/build-module/circular-option-picker/circular-option-picker.mjs +1 -0
  324. package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
  325. package/build-module/clipboard-button/index.mjs +11 -7
  326. package/build-module/clipboard-button/index.mjs.map +2 -2
  327. package/build-module/color-indicator/index.mjs +1 -0
  328. package/build-module/color-indicator/index.mjs.map +2 -2
  329. package/build-module/color-palette/index.mjs +1 -0
  330. package/build-module/color-palette/index.mjs.map +2 -2
  331. package/build-module/color-palette/utils.mjs +2 -2
  332. package/build-module/color-palette/utils.mjs.map +2 -2
  333. package/build-module/combobox-control/index.mjs +2 -3
  334. package/build-module/combobox-control/index.mjs.map +2 -2
  335. package/build-module/composite/group-label.mjs +1 -2
  336. package/build-module/composite/group-label.mjs.map +2 -2
  337. package/build-module/composite/group.mjs +1 -2
  338. package/build-module/composite/group.mjs.map +2 -2
  339. package/build-module/composite/hover.mjs +1 -2
  340. package/build-module/composite/hover.mjs.map +2 -2
  341. package/build-module/composite/index.mjs +1 -1
  342. package/build-module/composite/index.mjs.map +2 -2
  343. package/build-module/composite/item.mjs +1 -2
  344. package/build-module/composite/item.mjs.map +2 -2
  345. package/build-module/composite/legacy/index.mjs +1 -2
  346. package/build-module/composite/legacy/index.mjs.map +2 -2
  347. package/build-module/composite/row.mjs +1 -2
  348. package/build-module/composite/row.mjs.map +2 -2
  349. package/build-module/composite/typeahead.mjs +1 -2
  350. package/build-module/composite/typeahead.mjs.map +2 -2
  351. package/build-module/confirm-dialog/component.mjs +2 -2
  352. package/build-module/confirm-dialog/component.mjs.map +2 -2
  353. package/build-module/context/context-system-provider.mjs +1 -1
  354. package/build-module/context/context-system-provider.mjs.map +2 -2
  355. package/build-module/custom-gradient-picker/index.mjs +1 -2
  356. package/build-module/custom-gradient-picker/index.mjs.map +2 -2
  357. package/build-module/custom-gradient-picker/utils.mjs +1 -1
  358. package/build-module/custom-gradient-picker/utils.mjs.map +2 -2
  359. package/build-module/custom-select-control/index.mjs +2 -3
  360. package/build-module/custom-select-control/index.mjs.map +2 -2
  361. package/build-module/custom-select-control-v2/custom-select.mjs +1 -1
  362. package/build-module/custom-select-control-v2/custom-select.mjs.map +2 -2
  363. package/build-module/custom-select-control-v2/item.mjs +2 -3
  364. package/build-module/custom-select-control-v2/item.mjs.map +2 -2
  365. package/build-module/date-time/date/index.mjs +1 -1
  366. package/build-module/date-time/date/index.mjs.map +2 -2
  367. package/build-module/date-time/date-time/index.mjs +1 -0
  368. package/build-module/date-time/date-time/index.mjs.map +2 -2
  369. package/build-module/date-time/time/index.mjs +2 -2
  370. package/build-module/date-time/time/index.mjs.map +2 -2
  371. package/build-module/date-time/utils.mjs +1 -2
  372. package/build-module/date-time/utils.mjs.map +2 -2
  373. package/build-module/disclosure/index.mjs +1 -0
  374. package/build-module/disclosure/index.mjs.map +2 -2
  375. package/build-module/divider/styles.mjs +2 -2
  376. package/build-module/divider/styles.mjs.map +2 -2
  377. package/build-module/dropdown-menu/index.mjs +2 -3
  378. package/build-module/dropdown-menu/index.mjs.map +2 -2
  379. package/build-module/duotone-picker/duotone-picker.mjs +1 -1
  380. package/build-module/duotone-picker/duotone-picker.mjs.map +2 -2
  381. package/build-module/external-link/index.mjs +1 -0
  382. package/build-module/external-link/index.mjs.map +2 -2
  383. package/build-module/flex/flex/hook.mjs +1 -1
  384. package/build-module/flex/flex/hook.mjs.map +2 -2
  385. package/build-module/focal-point-picker/index.mjs +1 -2
  386. package/build-module/focal-point-picker/index.mjs.map +2 -2
  387. package/build-module/font-size-picker/font-size-picker-select.mjs +1 -2
  388. package/build-module/font-size-picker/font-size-picker-select.mjs.map +2 -2
  389. package/build-module/font-size-picker/index.mjs +3 -2
  390. package/build-module/font-size-picker/index.mjs.map +2 -2
  391. package/build-module/form-file-upload/index.mjs +9 -5
  392. package/build-module/form-file-upload/index.mjs.map +2 -2
  393. package/build-module/form-toggle/index.mjs +1 -0
  394. package/build-module/form-toggle/index.mjs.map +2 -2
  395. package/build-module/form-token-field/token-input.mjs +1 -0
  396. package/build-module/form-token-field/token-input.mjs.map +2 -2
  397. package/build-module/form-token-field/token.mjs.map +2 -2
  398. package/build-module/guide/index.mjs +2 -3
  399. package/build-module/guide/index.mjs.map +2 -2
  400. package/build-module/higher-order/navigate-regions/index.mjs +10 -9
  401. package/build-module/higher-order/navigate-regions/index.mjs.map +2 -2
  402. package/build-module/higher-order/with-fallback-styles/index.mjs +1 -1
  403. package/build-module/higher-order/with-fallback-styles/index.mjs.map +2 -2
  404. package/build-module/higher-order/with-focus-outside/index.mjs +1 -1
  405. package/build-module/higher-order/with-focus-outside/index.mjs.map +2 -2
  406. package/build-module/higher-order/with-spoken-messages/index.mjs +7 -5
  407. package/build-module/higher-order/with-spoken-messages/index.mjs.map +2 -2
  408. package/build-module/input-control/index.mjs +1 -0
  409. package/build-module/input-control/index.mjs.map +2 -2
  410. package/build-module/input-control/input-field.mjs +1 -1
  411. package/build-module/input-control/input-field.mjs.map +2 -2
  412. package/build-module/input-control/reducer/reducer.mjs +2 -4
  413. package/build-module/input-control/reducer/reducer.mjs.map +2 -2
  414. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  415. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  416. package/build-module/keyboard-shortcuts/index.mjs +1 -1
  417. package/build-module/keyboard-shortcuts/index.mjs.map +2 -2
  418. package/build-module/menu/index.mjs +1 -1
  419. package/build-module/menu/index.mjs.map +2 -2
  420. package/build-module/menu/item.mjs +1 -1
  421. package/build-module/menu/item.mjs.map +2 -2
  422. package/build-module/menu/popover.mjs +2 -2
  423. package/build-module/menu/popover.mjs.map +2 -2
  424. package/build-module/menu-item/index.mjs +1 -0
  425. package/build-module/menu-item/index.mjs.map +2 -2
  426. package/build-module/modal/index.mjs +3 -4
  427. package/build-module/modal/index.mjs.map +2 -2
  428. package/build-module/navigable-container/menu.mjs +1 -0
  429. package/build-module/navigable-container/menu.mjs.map +2 -2
  430. package/build-module/navigable-container/tabbable.mjs +1 -0
  431. package/build-module/navigable-container/tabbable.mjs.map +2 -2
  432. package/build-module/navigation/back-button/index.mjs +1 -0
  433. package/build-module/navigation/back-button/index.mjs.map +2 -2
  434. package/build-module/navigator/navigator/component.mjs +8 -13
  435. package/build-module/navigator/navigator/component.mjs.map +2 -2
  436. package/build-module/navigator/navigator-screen/component.mjs +1 -1
  437. package/build-module/navigator/navigator-screen/component.mjs.map +2 -2
  438. package/build-module/number-control/index.mjs +3 -3
  439. package/build-module/number-control/index.mjs.map +2 -2
  440. package/build-module/palette-edit/index.mjs +3 -4
  441. package/build-module/palette-edit/index.mjs.map +2 -2
  442. package/build-module/panel/body.mjs +1 -0
  443. package/build-module/panel/body.mjs.map +2 -2
  444. package/build-module/panel/index.mjs +1 -0
  445. package/build-module/panel/index.mjs.map +2 -2
  446. package/build-module/panel/row.mjs +1 -0
  447. package/build-module/panel/row.mjs.map +2 -2
  448. package/build-module/popover/index.mjs +1 -2
  449. package/build-module/popover/index.mjs.map +2 -2
  450. package/build-module/popover/overlay-middlewares.mjs +1 -2
  451. package/build-module/popover/overlay-middlewares.mjs.map +2 -2
  452. package/build-module/popover/utils.mjs +3 -8
  453. package/build-module/popover/utils.mjs.map +2 -2
  454. package/build-module/private-apis.mjs +2 -1
  455. package/build-module/private-apis.mjs.map +2 -2
  456. package/build-module/progress-bar/index.mjs +1 -0
  457. package/build-module/progress-bar/index.mjs.map +2 -2
  458. package/build-module/radio-group/index.mjs +2 -1
  459. package/build-module/radio-group/index.mjs.map +2 -2
  460. package/build-module/radio-group/radio.mjs +9 -4
  461. package/build-module/radio-group/radio.mjs.map +2 -2
  462. package/build-module/range-control/index.mjs +5 -4
  463. package/build-module/range-control/index.mjs.map +2 -2
  464. package/build-module/range-control/utils.mjs +1 -1
  465. package/build-module/range-control/utils.mjs.map +2 -2
  466. package/build-module/resizable-box/index.mjs +1 -0
  467. package/build-module/resizable-box/index.mjs.map +2 -2
  468. package/build-module/search-control/index.mjs +4 -3
  469. package/build-module/search-control/index.mjs.map +2 -2
  470. package/build-module/select-control/index.mjs +1 -0
  471. package/build-module/select-control/index.mjs.map +2 -2
  472. package/build-module/slot-fill/bubbles-virtually/slot.mjs +16 -4
  473. package/build-module/slot-fill/bubbles-virtually/slot.mjs.map +2 -2
  474. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs +17 -4
  475. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs.map +2 -2
  476. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs +6 -2
  477. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs.map +2 -2
  478. package/build-module/slot-fill/context.mjs +7 -2
  479. package/build-module/slot-fill/context.mjs.map +2 -2
  480. package/build-module/slot-fill/fill.mjs +29 -5
  481. package/build-module/slot-fill/fill.mjs.map +3 -3
  482. package/build-module/slot-fill/index.mjs +7 -21
  483. package/build-module/slot-fill/index.mjs.map +2 -2
  484. package/build-module/slot-fill/provider.mjs +33 -17
  485. package/build-module/slot-fill/provider.mjs.map +2 -2
  486. package/build-module/slot-fill/slot.mjs +8 -6
  487. package/build-module/slot-fill/slot.mjs.map +2 -2
  488. package/build-module/snackbar/index.mjs +1 -0
  489. package/build-module/snackbar/index.mjs.map +2 -2
  490. package/build-module/spinner/index.mjs +1 -0
  491. package/build-module/spinner/index.mjs.map +2 -2
  492. package/build-module/tab-panel/index.mjs +1 -0
  493. package/build-module/tab-panel/index.mjs.map +2 -2
  494. package/build-module/tabs/tab.mjs +1 -2
  495. package/build-module/tabs/tab.mjs.map +2 -2
  496. package/build-module/tabs/tablist.mjs +7 -11
  497. package/build-module/tabs/tablist.mjs.map +2 -2
  498. package/build-module/text-control/index.mjs +1 -0
  499. package/build-module/text-control/index.mjs.map +2 -2
  500. package/build-module/text-highlight/index.mjs +1 -0
  501. package/build-module/text-highlight/index.mjs.map +2 -2
  502. package/build-module/textarea-control/index.mjs +1 -0
  503. package/build-module/textarea-control/index.mjs.map +2 -2
  504. package/build-module/toggle-control/index.mjs +1 -0
  505. package/build-module/toggle-control/index.mjs.map +2 -2
  506. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs +1 -0
  507. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs.map +2 -2
  508. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs +2 -1
  509. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs.map +2 -2
  510. package/build-module/toggle-group-control/toggle-group-control/utils.mjs +1 -1
  511. package/build-module/toggle-group-control/toggle-group-control/utils.mjs.map +2 -2
  512. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs +1 -0
  513. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs.map +2 -2
  514. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs +1 -0
  515. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map +2 -2
  516. package/build-module/toolbar/toolbar/index.mjs +1 -0
  517. package/build-module/toolbar/toolbar/index.mjs.map +2 -2
  518. package/build-module/toolbar/toolbar/toolbar-container.mjs +1 -0
  519. package/build-module/toolbar/toolbar/toolbar-container.mjs.map +2 -2
  520. package/build-module/toolbar/toolbar-button/index.mjs +1 -0
  521. package/build-module/toolbar/toolbar-button/index.mjs.map +2 -2
  522. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs +1 -0
  523. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs.map +2 -2
  524. package/build-module/toolbar/toolbar-item/index.mjs +1 -0
  525. package/build-module/toolbar/toolbar-item/index.mjs.map +2 -2
  526. package/build-module/tooltip/index.mjs +1 -0
  527. package/build-module/tooltip/index.mjs.map +2 -2
  528. package/build-module/tree-grid/cell.mjs +1 -0
  529. package/build-module/tree-grid/cell.mjs.map +2 -2
  530. package/build-module/tree-grid/index.mjs +2 -2
  531. package/build-module/tree-grid/index.mjs.map +2 -2
  532. package/build-module/tree-grid/item.mjs +1 -0
  533. package/build-module/tree-grid/item.mjs.map +2 -2
  534. package/build-module/tree-grid/roving-tab-index-item.mjs +1 -0
  535. package/build-module/tree-grid/roving-tab-index-item.mjs.map +2 -2
  536. package/build-module/tree-grid/row.mjs +1 -0
  537. package/build-module/tree-grid/row.mjs.map +2 -2
  538. package/build-module/tree-select/index.mjs +12 -8
  539. package/build-module/tree-select/index.mjs.map +2 -2
  540. package/build-module/unit-control/index.mjs +5 -5
  541. package/build-module/unit-control/index.mjs.map +2 -2
  542. package/build-module/unit-control/utils.mjs +2 -2
  543. package/build-module/unit-control/utils.mjs.map +2 -2
  544. package/build-module/utils/dropdown-motion.mjs.map +2 -2
  545. package/build-module/utils/element-rect.mjs +3 -4
  546. package/build-module/utils/element-rect.mjs.map +2 -2
  547. package/build-module/utils/font.mjs +1 -2
  548. package/build-module/utils/font.mjs.map +2 -2
  549. package/build-module/utils/strings.mjs +1 -2
  550. package/build-module/utils/strings.mjs.map +2 -2
  551. package/build-module/utils/use-deprecated-props.mjs +1 -1
  552. package/build-module/utils/use-deprecated-props.mjs.map +2 -2
  553. package/build-module/utils/values.mjs +1 -2
  554. package/build-module/utils/values.mjs.map +2 -2
  555. package/build-module/validated-form-controls/components/checkbox-control.mjs +1 -0
  556. package/build-module/validated-form-controls/components/checkbox-control.mjs.map +2 -2
  557. package/build-module/validated-form-controls/components/combobox-control.mjs +2 -1
  558. package/build-module/validated-form-controls/components/combobox-control.mjs.map +2 -2
  559. package/build-module/validated-form-controls/components/custom-select-control.mjs +1 -0
  560. package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
  561. package/build-module/validated-form-controls/components/form-token-field.mjs +1 -0
  562. package/build-module/validated-form-controls/components/form-token-field.mjs.map +2 -2
  563. package/build-module/validated-form-controls/components/input-control.mjs +1 -0
  564. package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
  565. package/build-module/validated-form-controls/components/number-control.mjs +1 -0
  566. package/build-module/validated-form-controls/components/number-control.mjs.map +2 -2
  567. package/build-module/validated-form-controls/components/radio-control.mjs +1 -0
  568. package/build-module/validated-form-controls/components/radio-control.mjs.map +2 -2
  569. package/build-module/validated-form-controls/components/range-control.mjs +1 -0
  570. package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
  571. package/build-module/validated-form-controls/components/select-control.mjs +1 -0
  572. package/build-module/validated-form-controls/components/select-control.mjs.map +2 -2
  573. package/build-module/validated-form-controls/components/text-control.mjs +1 -0
  574. package/build-module/validated-form-controls/components/text-control.mjs.map +2 -2
  575. package/build-module/validated-form-controls/components/textarea-control.mjs +1 -0
  576. package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
  577. package/build-module/validated-form-controls/components/toggle-control.mjs +2 -1
  578. package/build-module/validated-form-controls/components/toggle-control.mjs.map +2 -2
  579. package/build-module/validated-form-controls/components/toggle-group-control.mjs +1 -0
  580. package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +2 -2
  581. package/build-module/validated-form-controls/control-with-error.mjs +4 -6
  582. package/build-module/validated-form-controls/control-with-error.mjs.map +2 -2
  583. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  584. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  585. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  586. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  587. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  588. package/build-types/animate/stories/index.story.d.ts +8 -8
  589. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  590. package/build-types/badge/stories/index.story.d.ts +1 -1
  591. package/build-types/badge/stories/index.story.d.ts.map +1 -1
  592. package/build-types/base-control/stories/index.story.d.ts +2 -2
  593. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  594. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  595. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  596. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  597. package/build-types/border-control/stories/index.story.d.ts +6 -6
  598. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  599. package/build-types/box-control/index.d.ts.map +1 -1
  600. package/build-types/box-control/stories/index.story.d.ts +8 -8
  601. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  602. package/build-types/button/deprecated.d.ts.map +1 -1
  603. package/build-types/button/index.d.ts +1 -1
  604. package/build-types/button/index.d.ts.map +1 -1
  605. package/build-types/button/stories/e2e/index.story.d.ts +2 -2
  606. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  607. package/build-types/button/stories/index.story.d.ts +9 -9
  608. package/build-types/button/stories/index.story.d.ts.map +1 -1
  609. package/build-types/button-group/index.d.ts.map +1 -1
  610. package/build-types/button-group/stories/index.story.d.ts +1 -1
  611. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  612. package/build-types/calendar/stories/date-calendar.story.d.ts +1 -1
  613. package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
  614. package/build-types/calendar/stories/date-range-calendar.story.d.ts +1 -1
  615. package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
  616. package/build-types/card/stories/index.story.d.ts +1 -1
  617. package/build-types/card/stories/index.story.d.ts.map +1 -1
  618. package/build-types/checkbox-control/stories/index.story.d.ts +1 -1
  619. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  620. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  621. package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -0
  622. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  623. package/build-types/circular-option-picker/stories/index.story.d.ts +6 -6
  624. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  625. package/build-types/clipboard-button/index.d.ts.map +1 -1
  626. package/build-types/clipboard-button/types.d.ts +1 -0
  627. package/build-types/clipboard-button/types.d.ts.map +1 -1
  628. package/build-types/color-indicator/index.d.ts.map +1 -1
  629. package/build-types/color-indicator/stories/index.story.d.ts +1 -1
  630. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  631. package/build-types/color-palette/index.d.ts.map +1 -1
  632. package/build-types/color-palette/stories/index.story.d.ts +4 -4
  633. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  634. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  635. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  636. package/build-types/combobox-control/stories/index.story.d.ts +5 -5
  637. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  638. package/build-types/composite/legacy/stories/index.story.d.ts +1 -1
  639. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  640. package/build-types/composite/legacy/stories/utils.d.ts +1 -1
  641. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  642. package/build-types/composite/stories/index.story.d.ts +1 -1
  643. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  644. package/build-types/confirm-dialog/stories/index.story.d.ts +3 -3
  645. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  646. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  647. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  648. package/build-types/custom-select-control/stories/index.story.d.ts +4 -4
  649. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  650. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -4
  651. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  652. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  653. package/build-types/date-time/stories/date-time.story.d.ts +1 -1
  654. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  655. package/build-types/date-time/stories/date.story.d.ts +1 -1
  656. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  657. package/build-types/date-time/stories/time.story.d.ts +2 -2
  658. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  659. package/build-types/disabled/stories/index.story.d.ts +1 -1
  660. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  661. package/build-types/disclosure/index.d.ts.map +1 -1
  662. package/build-types/divider/stories/index.story.d.ts +1 -1
  663. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  664. package/build-types/draggable/stories/index.story.d.ts +1 -1
  665. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  666. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  667. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  668. package/build-types/dropdown/stories/index.story.d.ts +1 -1
  669. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  670. package/build-types/dropdown-menu/stories/index.story.d.ts +1 -1
  671. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  672. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  673. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  674. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +4 -4
  675. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  676. package/build-types/elevation/stories/index.story.d.ts +1 -1
  677. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  678. package/build-types/external-link/index.d.ts.map +1 -1
  679. package/build-types/external-link/stories/index.story.d.ts +1 -1
  680. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  681. package/build-types/flex/stories/index.story.d.ts +1 -1
  682. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  683. package/build-types/focal-point-picker/stories/index.story.d.ts +5 -5
  684. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  685. package/build-types/font-size-picker/index.d.ts.map +1 -1
  686. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +1 -1
  687. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  688. package/build-types/font-size-picker/stories/index.story.d.ts +1 -1
  689. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  690. package/build-types/form-file-upload/index.d.ts.map +1 -1
  691. package/build-types/form-file-upload/stories/index.story.d.ts +6 -6
  692. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  693. package/build-types/form-toggle/index.d.ts.map +1 -1
  694. package/build-types/form-toggle/stories/index.story.d.ts +1 -1
  695. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  696. package/build-types/form-token-field/stories/index.story.d.ts +1 -1
  697. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  698. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  699. package/build-types/gradient-picker/stories/index.story.d.ts +4 -4
  700. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  701. package/build-types/grid/stories/index.story.d.ts +1 -1
  702. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  703. package/build-types/guide/stories/index.story.d.ts +2 -2
  704. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  705. package/build-types/h-stack/stories/e2e/index.story.d.ts +1 -1
  706. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  707. package/build-types/h-stack/stories/index.story.d.ts +1 -1
  708. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  709. package/build-types/heading/stories/index.story.d.ts +1 -1
  710. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  711. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  712. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  713. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  714. package/build-types/icon/stories/index.story.d.ts +5 -5
  715. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  716. package/build-types/input-control/index.d.ts.map +1 -1
  717. package/build-types/input-control/stories/index.story.d.ts +8 -8
  718. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  719. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  720. package/build-types/item-group/stories/index.story.d.ts +1 -1
  721. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  722. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  723. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  724. package/build-types/menu/stories/index.story.d.ts +1 -1
  725. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  726. package/build-types/menu-group/stories/index.story.d.ts +2 -2
  727. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  728. package/build-types/menu-item/index.d.ts.map +1 -1
  729. package/build-types/menu-item/stories/index.story.d.ts +5 -5
  730. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  731. package/build-types/menu-items-choice/stories/index.story.d.ts +1 -1
  732. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  733. package/build-types/modal/index.d.ts.map +1 -1
  734. package/build-types/modal/stories/index.story.d.ts +1 -1
  735. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  736. package/build-types/navigable-container/menu.d.ts.map +1 -1
  737. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +1 -1
  738. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  739. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +1 -1
  740. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  741. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  742. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  743. package/build-types/navigation/stories/index.story.d.ts +7 -7
  744. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  745. package/build-types/navigation/stories/utils/controlled-state.d.ts +1 -1
  746. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  747. package/build-types/navigation/stories/utils/default.d.ts +1 -1
  748. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  749. package/build-types/navigation/stories/utils/group.d.ts +1 -1
  750. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  751. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +1 -1
  752. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  753. package/build-types/navigation/stories/utils/more-examples.d.ts +1 -1
  754. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  755. package/build-types/navigation/stories/utils/search.d.ts +1 -1
  756. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  757. package/build-types/navigator/stories/index.story.d.ts +1 -1
  758. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  759. package/build-types/notice/stories/index.story.d.ts +6 -6
  760. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  761. package/build-types/number-control/index.d.ts.map +1 -1
  762. package/build-types/number-control/stories/index.story.d.ts +2 -2
  763. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  764. package/build-types/palette-edit/stories/index.story.d.ts +3 -3
  765. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  766. package/build-types/panel/body.d.ts.map +1 -1
  767. package/build-types/panel/index.d.ts.map +1 -1
  768. package/build-types/panel/row.d.ts.map +1 -1
  769. package/build-types/panel/stories/index.story.d.ts +1 -1
  770. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  771. package/build-types/placeholder/stories/index.story.d.ts +1 -1
  772. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  773. package/build-types/popover/stories/index.story.d.ts +1 -1
  774. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  775. package/build-types/private-apis.d.ts.map +1 -1
  776. package/build-types/progress-bar/index.d.ts.map +1 -1
  777. package/build-types/progress-bar/stories/index.story.d.ts +2 -2
  778. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  779. package/build-types/query-controls/stories/index.story.d.ts +2 -2
  780. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  781. package/build-types/radio-control/stories/index.story.d.ts +1 -1
  782. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  783. package/build-types/radio-group/index.d.ts.map +1 -1
  784. package/build-types/radio-group/radio.d.ts.map +1 -1
  785. package/build-types/radio-group/stories/index.story.d.ts +1 -1
  786. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  787. package/build-types/range-control/index.d.ts.map +1 -1
  788. package/build-types/range-control/stories/index.story.d.ts +1 -1
  789. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  790. package/build-types/resizable-box/index.d.ts.map +1 -1
  791. package/build-types/resizable-box/stories/index.story.d.ts +3 -3
  792. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  793. package/build-types/responsive-wrapper/stories/index.story.d.ts +2 -2
  794. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  795. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  796. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  797. package/build-types/scroll-lock/stories/index.story.d.ts +1 -1
  798. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  799. package/build-types/scrollable/stories/index.story.d.ts +1 -1
  800. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  801. package/build-types/search-control/index.d.ts.map +1 -1
  802. package/build-types/search-control/stories/index.story.d.ts +2 -2
  803. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  804. package/build-types/select-control/index.d.ts.map +1 -1
  805. package/build-types/select-control/stories/index.story.d.ts +6 -6
  806. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  807. package/build-types/shortcut/stories/index.story.d.ts +2 -2
  808. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  809. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  810. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  811. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  812. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +2 -3
  813. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  814. package/build-types/slot-fill/context.d.ts +2 -2
  815. package/build-types/slot-fill/context.d.ts.map +1 -1
  816. package/build-types/slot-fill/fill.d.ts +1 -1
  817. package/build-types/slot-fill/fill.d.ts.map +1 -1
  818. package/build-types/slot-fill/index.d.ts +3 -4
  819. package/build-types/slot-fill/index.d.ts.map +1 -1
  820. package/build-types/slot-fill/provider.d.ts.map +1 -1
  821. package/build-types/slot-fill/stories/index.story.d.ts +1 -1
  822. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  823. package/build-types/slot-fill/types.d.ts +23 -25
  824. package/build-types/slot-fill/types.d.ts.map +1 -1
  825. package/build-types/snackbar/index.d.ts.map +1 -1
  826. package/build-types/snackbar/stories/index.story.d.ts +1 -1
  827. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  828. package/build-types/snackbar/stories/list.story.d.ts +1 -1
  829. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  830. package/build-types/spacer/stories/index.story.d.ts +1 -1
  831. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  832. package/build-types/spinner/index.d.ts.map +1 -1
  833. package/build-types/spinner/stories/index.story.d.ts +1 -1
  834. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  835. package/build-types/surface/stories/index.story.d.ts +1 -1
  836. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  837. package/build-types/tab-panel/index.d.ts.map +1 -1
  838. package/build-types/tab-panel/stories/index.story.d.ts +5 -5
  839. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  840. package/build-types/tabs/stories/index.story.d.ts +8 -8
  841. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  842. package/build-types/text/stories/index.story.d.ts +4 -4
  843. package/build-types/text/stories/index.story.d.ts.map +1 -1
  844. package/build-types/text-control/index.d.ts.map +1 -1
  845. package/build-types/text-control/stories/index.story.d.ts +1 -1
  846. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  847. package/build-types/text-highlight/index.d.ts +4 -1
  848. package/build-types/text-highlight/index.d.ts.map +1 -1
  849. package/build-types/text-highlight/stories/index.story.d.ts +1 -1
  850. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  851. package/build-types/textarea-control/index.d.ts.map +1 -1
  852. package/build-types/textarea-control/stories/index.story.d.ts +1 -1
  853. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  854. package/build-types/theme/stories/index.story.d.ts +2 -2
  855. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  856. package/build-types/tip/stories/index.story.d.ts +1 -1
  857. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  858. package/build-types/toggle-control/index.d.ts.map +1 -1
  859. package/build-types/toggle-control/stories/index.story.d.ts +3 -3
  860. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  861. package/build-types/toggle-group-control/stories/index.story.d.ts +1 -1
  862. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  863. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  864. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  865. package/build-types/toolbar/stories/index.story.d.ts +4 -4
  866. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  867. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  868. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  869. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  870. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  871. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  872. package/build-types/tools-panel/stories/index.story.d.ts +1 -1
  873. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  874. package/build-types/tooltip/index.d.ts.map +1 -1
  875. package/build-types/tooltip/stories/index.story.d.ts +2 -2
  876. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  877. package/build-types/tree-grid/cell.d.ts.map +1 -1
  878. package/build-types/tree-grid/index.d.ts.map +1 -1
  879. package/build-types/tree-grid/item.d.ts.map +1 -1
  880. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  881. package/build-types/tree-grid/row.d.ts.map +1 -1
  882. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  883. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  884. package/build-types/tree-select/index.d.ts.map +1 -1
  885. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  886. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  887. package/build-types/truncate/stories/index.story.d.ts +1 -1
  888. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  889. package/build-types/unit-control/index.d.ts.map +1 -1
  890. package/build-types/unit-control/stories/index.story.d.ts +1 -1
  891. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  892. package/build-types/utils/dropdown-motion.d.ts.map +1 -1
  893. package/build-types/v-stack/stories/e2e/index.story.d.ts +1 -1
  894. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  895. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  896. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  897. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
  898. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +1 -1
  899. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
  900. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +1 -1
  901. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
  902. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +1 -1
  903. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
  904. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +1 -1
  905. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
  906. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +1 -1
  907. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
  908. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +1 -1
  909. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
  910. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +1 -1
  911. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
  912. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +1 -1
  913. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
  914. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +1 -1
  915. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
  916. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +1 -1
  917. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
  918. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +1 -1
  919. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -1
  920. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +1 -1
  921. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
  922. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +1 -1
  923. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
  924. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +1 -1
  925. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
  926. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +1 -1
  927. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
  928. package/build-types/view/stories/index.story.d.ts +1 -1
  929. package/build-types/view/stories/index.story.d.ts.map +1 -1
  930. package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
  931. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  932. package/build-types/z-stack/stories/index.story.d.ts +1 -1
  933. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  934. package/package.json +26 -24
  935. package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
  936. package/src/angle-picker-control/index.tsx +1 -0
  937. package/src/angle-picker-control/stories/index.story.tsx +1 -1
  938. package/src/animate/stories/index.story.tsx +1 -1
  939. package/src/badge/stories/index.story.tsx +1 -1
  940. package/src/base-control/stories/index.story.tsx +4 -2
  941. package/src/border-box-control/border-box-control-split-controls/component.tsx +9 -0
  942. package/src/border-box-control/stories/index.story.tsx +3 -1
  943. package/src/border-box-control/test/index.tsx +51 -20
  944. package/src/border-control/stories/index.story.tsx +2 -1
  945. package/src/border-control/test/index.js +37 -34
  946. package/src/box-control/index.tsx +6 -0
  947. package/src/box-control/stories/index.story.tsx +3 -2
  948. package/src/button/deprecated.tsx +2 -0
  949. package/src/button/index.tsx +16 -15
  950. package/src/button/stories/e2e/index.story.tsx +9 -5
  951. package/src/button/stories/index.story.tsx +14 -11
  952. package/src/button/test/index.tsx +0 -5
  953. package/src/button-group/index.tsx +1 -0
  954. package/src/button-group/stories/index.story.tsx +5 -3
  955. package/src/calendar/stories/date-calendar.story.tsx +1 -1
  956. package/src/calendar/stories/date-range-calendar.story.tsx +1 -1
  957. package/src/card/stories/index.story.tsx +4 -2
  958. package/src/checkbox-control/stories/index.story.tsx +1 -1
  959. package/src/circular-option-picker/circular-option-picker-option.tsx +2 -1
  960. package/src/circular-option-picker/circular-option-picker.tsx +2 -0
  961. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  962. package/src/clipboard-button/index.tsx +2 -0
  963. package/src/clipboard-button/types.ts +1 -0
  964. package/src/color-indicator/index.tsx +1 -0
  965. package/src/color-indicator/stories/index.story.tsx +1 -1
  966. package/src/color-palette/index.tsx +1 -0
  967. package/src/color-palette/stories/index.story.tsx +1 -1
  968. package/src/color-picker/stories/index.story.tsx +1 -1
  969. package/src/combobox-control/index.tsx +1 -1
  970. package/src/combobox-control/stories/index.story.tsx +2 -1
  971. package/src/composite/legacy/stories/index.story.tsx +1 -1
  972. package/src/composite/legacy/stories/utils.tsx +1 -1
  973. package/src/composite/stories/index.story.tsx +1 -1
  974. package/src/confirm-dialog/stories/index.story.tsx +6 -2
  975. package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
  976. package/src/custom-select-control/stories/index.story.tsx +2 -1
  977. package/src/custom-select-control-v2/stories/index.story.tsx +1 -1
  978. package/src/date-time/date-time/index.tsx +1 -0
  979. package/src/date-time/stories/date-time.story.tsx +1 -1
  980. package/src/date-time/stories/date.story.tsx +1 -1
  981. package/src/date-time/stories/time.story.tsx +1 -1
  982. package/src/disabled/stories/index.story.tsx +1 -1
  983. package/src/disclosure/index.tsx +1 -0
  984. package/src/divider/stories/index.story.tsx +1 -1
  985. package/src/draggable/stories/index.story.tsx +1 -1
  986. package/src/drop-zone/stories/index.story.tsx +1 -1
  987. package/src/dropdown/stories/index.story.tsx +2 -1
  988. package/src/dropdown-menu/stories/index.story.tsx +1 -1
  989. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  990. package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
  991. package/src/elevation/stories/index.story.tsx +1 -1
  992. package/src/external-link/index.tsx +1 -0
  993. package/src/external-link/stories/index.story.tsx +1 -1
  994. package/src/flex/stories/index.story.tsx +1 -1
  995. package/src/focal-point-picker/stories/index.story.tsx +1 -1
  996. package/src/font-size-picker/index.tsx +1 -0
  997. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -1
  998. package/src/font-size-picker/stories/index.story.tsx +2 -1
  999. package/src/form-file-upload/index.tsx +2 -0
  1000. package/src/form-file-upload/stories/index.story.tsx +2 -2
  1001. package/src/form-toggle/index.tsx +1 -0
  1002. package/src/form-toggle/stories/index.story.tsx +1 -1
  1003. package/src/form-token-field/stories/index.story.tsx +3 -1
  1004. package/src/form-token-field/token-input.tsx +1 -0
  1005. package/src/form-token-field/token.tsx +2 -2
  1006. package/src/gradient-picker/stories/index.story.tsx +1 -1
  1007. package/src/grid/stories/index.story.tsx +1 -1
  1008. package/src/guide/stories/index.story.tsx +6 -2
  1009. package/src/h-stack/stories/e2e/index.story.tsx +1 -1
  1010. package/src/h-stack/stories/index.story.tsx +1 -1
  1011. package/src/heading/stories/index.story.tsx +1 -1
  1012. package/src/higher-order/navigate-regions/index.tsx +7 -5
  1013. package/src/higher-order/with-fallback-styles/index.tsx +1 -1
  1014. package/src/higher-order/with-focus-outside/index.tsx +25 -24
  1015. package/src/higher-order/with-spoken-messages/index.tsx +10 -7
  1016. package/src/icon/stories/index.story.tsx +1 -1
  1017. package/src/input-control/index.tsx +1 -0
  1018. package/src/input-control/stories/index.story.tsx +3 -2
  1019. package/src/input-control/styles/input-control-styles.tsx +0 -4
  1020. package/src/item-group/stories/index.story.tsx +1 -1
  1021. package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
  1022. package/src/menu/stories/index.story.tsx +5 -2
  1023. package/src/menu-group/stories/index.story.tsx +1 -1
  1024. package/src/menu-item/index.tsx +1 -0
  1025. package/src/menu-item/stories/index.story.tsx +1 -1
  1026. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  1027. package/src/modal/index.tsx +1 -0
  1028. package/src/modal/stories/index.story.tsx +11 -3
  1029. package/src/navigable-container/menu.tsx +1 -0
  1030. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  1031. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  1032. package/src/navigable-container/tabbable.tsx +1 -0
  1033. package/src/navigation/back-button/index.tsx +1 -0
  1034. package/src/navigation/stories/index.story.tsx +1 -1
  1035. package/src/navigation/stories/utils/controlled-state.tsx +4 -1
  1036. package/src/navigation/stories/utils/default.tsx +1 -1
  1037. package/src/navigation/stories/utils/group.tsx +1 -1
  1038. package/src/navigation/stories/utils/hide-if-empty.tsx +1 -1
  1039. package/src/navigation/stories/utils/more-examples.tsx +1 -1
  1040. package/src/navigation/stories/utils/search.tsx +1 -1
  1041. package/src/navigator/stories/index.story.tsx +2 -1
  1042. package/src/navigator/test/index.tsx +1 -1
  1043. package/src/notice/stories/index.story.tsx +1 -1
  1044. package/src/number-control/index.tsx +1 -0
  1045. package/src/number-control/stories/index.story.tsx +2 -1
  1046. package/src/palette-edit/stories/index.story.tsx +1 -1
  1047. package/src/panel/body.tsx +1 -0
  1048. package/src/panel/index.tsx +1 -0
  1049. package/src/panel/row.tsx +1 -0
  1050. package/src/panel/stories/index.story.tsx +1 -1
  1051. package/src/placeholder/stories/index.story.tsx +1 -1
  1052. package/src/popover/stories/index.story.tsx +9 -2
  1053. package/src/private-apis.ts +2 -0
  1054. package/src/progress-bar/index.tsx +1 -0
  1055. package/src/progress-bar/stories/index.story.tsx +1 -1
  1056. package/src/query-controls/stories/index.story.tsx +1 -1
  1057. package/src/radio-control/stories/index.story.tsx +1 -1
  1058. package/src/radio-group/index.tsx +1 -0
  1059. package/src/radio-group/radio.tsx +3 -0
  1060. package/src/radio-group/stories/index.story.tsx +1 -1
  1061. package/src/range-control/index.tsx +1 -0
  1062. package/src/range-control/stories/index.story.tsx +5 -1
  1063. package/src/resizable-box/index.tsx +1 -0
  1064. package/src/resizable-box/stories/index.story.tsx +1 -1
  1065. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  1066. package/src/sandbox/stories/index.story.tsx +1 -1
  1067. package/src/scroll-lock/stories/index.story.tsx +6 -2
  1068. package/src/scrollable/stories/index.story.tsx +1 -1
  1069. package/src/search-control/index.tsx +1 -0
  1070. package/src/search-control/stories/index.story.tsx +1 -1
  1071. package/src/select-control/index.tsx +3 -0
  1072. package/src/select-control/stories/index.story.tsx +3 -1
  1073. package/src/shortcut/stories/index.story.tsx +1 -1
  1074. package/src/slot-fill/bubbles-virtually/slot.tsx +16 -9
  1075. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +30 -4
  1076. package/src/slot-fill/bubbles-virtually/use-slot.ts +7 -3
  1077. package/src/slot-fill/context.ts +15 -4
  1078. package/src/slot-fill/fill.tsx +74 -0
  1079. package/src/slot-fill/index.tsx +17 -33
  1080. package/src/slot-fill/provider.tsx +49 -35
  1081. package/src/slot-fill/slot.tsx +4 -4
  1082. package/src/slot-fill/stories/index.story.tsx +1 -1
  1083. package/src/slot-fill/test/__snapshots__/slot.js.snap +14 -0
  1084. package/src/slot-fill/test/slot.js +24 -1
  1085. package/src/slot-fill/types.ts +16 -32
  1086. package/src/snackbar/index.tsx +1 -0
  1087. package/src/snackbar/stories/index.story.tsx +1 -1
  1088. package/src/snackbar/stories/list.story.tsx +1 -1
  1089. package/src/spacer/stories/index.story.tsx +1 -1
  1090. package/src/spinner/index.tsx +1 -0
  1091. package/src/spinner/stories/index.story.tsx +1 -1
  1092. package/src/surface/stories/index.story.tsx +1 -1
  1093. package/src/tab-panel/index.tsx +1 -0
  1094. package/src/tab-panel/stories/index.story.tsx +1 -1
  1095. package/src/tabs/stories/index.story.tsx +11 -3
  1096. package/src/text/stories/index.story.tsx +1 -1
  1097. package/src/text-control/index.tsx +1 -0
  1098. package/src/text-control/stories/index.story.tsx +2 -1
  1099. package/src/text-highlight/index.tsx +2 -0
  1100. package/src/text-highlight/stories/index.story.tsx +1 -1
  1101. package/src/textarea-control/index.tsx +1 -0
  1102. package/src/textarea-control/stories/index.story.tsx +1 -1
  1103. package/src/theme/stories/index.story.tsx +8 -4
  1104. package/src/tip/stories/index.story.tsx +1 -1
  1105. package/src/toggle-control/index.tsx +1 -0
  1106. package/src/toggle-control/stories/index.story.tsx +1 -1
  1107. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  1108. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +1 -0
  1109. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -0
  1110. package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
  1111. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -0
  1112. package/src/toolbar/stories/index.story.tsx +1 -1
  1113. package/src/toolbar/toolbar/index.tsx +1 -0
  1114. package/src/toolbar/toolbar/toolbar-container.tsx +1 -0
  1115. package/src/toolbar/toolbar-button/index.tsx +1 -0
  1116. package/src/toolbar/toolbar-dropdown-menu/index.tsx +1 -0
  1117. package/src/toolbar/toolbar-item/index.tsx +1 -0
  1118. package/src/tools-panel/stories/index.story.tsx +1 -1
  1119. package/src/tooltip/index.tsx +1 -0
  1120. package/src/tooltip/stories/index.story.tsx +14 -4
  1121. package/src/tree-grid/cell.tsx +1 -0
  1122. package/src/tree-grid/index.tsx +1 -0
  1123. package/src/tree-grid/item.tsx +1 -0
  1124. package/src/tree-grid/roving-tab-index-item.tsx +1 -0
  1125. package/src/tree-grid/row.tsx +1 -0
  1126. package/src/tree-grid/stories/index.story.tsx +6 -2
  1127. package/src/tree-select/index.tsx +2 -0
  1128. package/src/tree-select/stories/index.story.tsx +2 -1
  1129. package/src/truncate/stories/index.story.tsx +1 -1
  1130. package/src/unit-control/index.tsx +1 -0
  1131. package/src/unit-control/stories/index.story.tsx +3 -1
  1132. package/src/utils/dropdown-motion.ts +1 -0
  1133. package/src/v-stack/stories/e2e/index.story.tsx +1 -1
  1134. package/src/v-stack/stories/index.story.tsx +1 -1
  1135. package/src/validated-form-controls/components/checkbox-control.tsx +1 -0
  1136. package/src/validated-form-controls/components/combobox-control.tsx +1 -0
  1137. package/src/validated-form-controls/components/custom-select-control.tsx +1 -0
  1138. package/src/validated-form-controls/components/form-token-field.tsx +1 -0
  1139. package/src/validated-form-controls/components/input-control.tsx +1 -0
  1140. package/src/validated-form-controls/components/number-control.tsx +1 -0
  1141. package/src/validated-form-controls/components/radio-control.tsx +1 -0
  1142. package/src/validated-form-controls/components/range-control.tsx +1 -0
  1143. package/src/validated-form-controls/components/select-control.tsx +1 -0
  1144. package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
  1145. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
  1146. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
  1147. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
  1148. package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
  1149. package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
  1150. package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
  1151. package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
  1152. package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
  1153. package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
  1154. package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
  1155. package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
  1156. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
  1157. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
  1158. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
  1159. package/src/validated-form-controls/components/text-control.tsx +1 -0
  1160. package/src/validated-form-controls/components/textarea-control.tsx +1 -0
  1161. package/src/validated-form-controls/components/toggle-control.tsx +1 -0
  1162. package/src/validated-form-controls/components/toggle-group-control.tsx +1 -0
  1163. package/src/validated-form-controls/control-with-error.tsx +1 -0
  1164. package/src/view/stories/index.story.tsx +1 -1
  1165. package/src/visually-hidden/stories/index.story.tsx +1 -1
  1166. package/src/z-stack/stories/index.story.tsx +1 -1
  1167. package/build/slot-fill/bubbles-virtually/fill.cjs +0 -63
  1168. package/build/slot-fill/bubbles-virtually/fill.cjs.map +0 -7
  1169. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs +0 -59
  1170. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs.map +0 -7
  1171. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs +0 -105
  1172. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs.map +0 -7
  1173. package/build-module/slot-fill/bubbles-virtually/fill.mjs +0 -32
  1174. package/build-module/slot-fill/bubbles-virtually/fill.mjs.map +0 -7
  1175. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs +0 -28
  1176. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs.map +0 -7
  1177. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs +0 -74
  1178. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs.map +0 -7
  1179. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -3
  1180. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +0 -1
  1181. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -7
  1182. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +0 -1
  1183. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -3
  1184. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +0 -1
  1185. package/src/slot-fill/bubbles-virtually/fill.tsx +0 -50
  1186. package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +0 -34
  1187. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +0 -106
  1188. package/src/slot-fill/fill.ts +0 -32
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/popover/utils.ts"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { cubicBezier } from 'framer-motion';\n/**\n * Internal dependencies\n */\nimport { DROPDOWN_MOTION } from '../utils';\nconst POSITION_TO_PLACEMENT = {\n bottom: 'bottom',\n top: 'top',\n 'middle left': 'left',\n 'middle right': 'right',\n 'bottom left': 'bottom-end',\n 'bottom center': 'bottom',\n 'bottom right': 'bottom-start',\n 'top left': 'top-end',\n 'top center': 'top',\n 'top right': 'top-start',\n 'middle left left': 'left',\n 'middle left right': 'left',\n 'middle left bottom': 'left-end',\n 'middle left top': 'left-start',\n 'middle right left': 'right',\n 'middle right right': 'right',\n 'middle right bottom': 'right-end',\n 'middle right top': 'right-start',\n 'bottom left left': 'bottom-end',\n 'bottom left right': 'bottom-end',\n 'bottom left bottom': 'bottom-end',\n 'bottom left top': 'bottom-end',\n 'bottom center left': 'bottom',\n 'bottom center right': 'bottom',\n 'bottom center bottom': 'bottom',\n 'bottom center top': 'bottom',\n 'bottom right left': 'bottom-start',\n 'bottom right right': 'bottom-start',\n 'bottom right bottom': 'bottom-start',\n 'bottom right top': 'bottom-start',\n 'top left left': 'top-end',\n 'top left right': 'top-end',\n 'top left bottom': 'top-end',\n 'top left top': 'top-end',\n 'top center left': 'top',\n 'top center right': 'top',\n 'top center bottom': 'top',\n 'top center top': 'top',\n 'top right left': 'top-start',\n 'top right right': 'top-start',\n 'top right bottom': 'top-start',\n 'top right top': 'top-start',\n // `middle`/`middle center [corner?]` positions are associated to a fallback\n // `bottom` placement because there aren't any corresponding placement values.\n middle: 'bottom',\n 'middle center': 'bottom',\n 'middle center bottom': 'bottom',\n 'middle center left': 'bottom',\n 'middle center right': 'bottom',\n 'middle center top': 'bottom'\n};\n\n/**\n * Converts the `Popover`'s legacy \"position\" prop to the new \"placement\" prop\n * (used by `floating-ui`).\n *\n * @param position The legacy position\n * @return The corresponding placement\n */\nexport const positionToPlacement = position => {\n var _POSITION_TO_PLACEMEN;\n return (_POSITION_TO_PLACEMEN = POSITION_TO_PLACEMENT[position]) !== null && _POSITION_TO_PLACEMEN !== void 0 ? _POSITION_TO_PLACEMEN : 'bottom';\n};\n\n/**\n * @typedef AnimationOrigin\n * @type {Object}\n * @property {number} originX A number between 0 and 1 (in CSS logical properties jargon, 0 is \"start\", 0.5 is \"center\", and 1 is \"end\")\n * @property {number} originY A number between 0 and 1 (0 is top, 0.5 is center, and 1 is bottom)\n */\n\nconst PLACEMENT_TO_ANIMATION_ORIGIN = {\n top: {\n originX: 0.5,\n originY: 1\n },\n // open from bottom, center\n 'top-start': {\n originX: 0,\n originY: 1\n },\n // open from bottom, left\n 'top-end': {\n originX: 1,\n originY: 1\n },\n // open from bottom, right\n right: {\n originX: 0,\n originY: 0.5\n },\n // open from middle, left\n 'right-start': {\n originX: 0,\n originY: 0\n },\n // open from top, left\n 'right-end': {\n originX: 0,\n originY: 1\n },\n // open from bottom, left\n bottom: {\n originX: 0.5,\n originY: 0\n },\n // open from top, center\n 'bottom-start': {\n originX: 0,\n originY: 0\n },\n // open from top, left\n 'bottom-end': {\n originX: 1,\n originY: 0\n },\n // open from top, right\n left: {\n originX: 1,\n originY: 0.5\n },\n // open from middle, right\n 'left-start': {\n originX: 1,\n originY: 0\n },\n // open from top, right\n 'left-end': {\n originX: 1,\n originY: 1\n },\n // open from bottom, right\n overlay: {\n originX: 0.5,\n originY: 0.5\n } // open from center, center\n};\n\n/**\n * Given the floating-ui `placement`, compute the framer-motion props for the\n * popover's entry animation.\n *\n * @param placement A placement string from floating ui\n * @return The object containing the motion props\n */\nexport const placementToMotionAnimationProps = placement => {\n const translateProp = placement.startsWith('top') || placement.startsWith('bottom') ? 'translateY' : 'translateX';\n const translateDirection = placement.startsWith('top') || placement.startsWith('left') ? 1 : -1;\n return {\n style: PLACEMENT_TO_ANIMATION_ORIGIN[placement],\n initial: {\n opacity: 0,\n [translateProp]: `${DROPDOWN_MOTION.SLIDE_DISTANCE * translateDirection}px`\n },\n animate: {\n opacity: 1,\n [translateProp]: 0\n },\n transition: {\n opacity: {\n duration: DROPDOWN_MOTION.FADE_DURATION / 1000,\n ease: DROPDOWN_MOTION.FADE_EASING.function\n },\n [translateProp]: {\n duration: DROPDOWN_MOTION.SLIDE_DURATION / 1000,\n ease: cubicBezier(...DROPDOWN_MOTION.SLIDE_EASING.args)\n }\n }\n };\n};\nfunction isTopBottom(anchorRef) {\n return !!anchorRef?.top;\n}\nfunction isRef(anchorRef) {\n return !!anchorRef?.current;\n}\nexport const getReferenceElement = ({\n anchor,\n anchorRef,\n anchorRect,\n getAnchorRect,\n fallbackReferenceElement\n}) => {\n var _referenceElement;\n let referenceElement = null;\n if (anchor) {\n referenceElement = anchor;\n } else if (isTopBottom(anchorRef)) {\n // Create a virtual element for the ref. The expectation is that\n // if anchorRef.top is defined, then anchorRef.bottom is defined too.\n // Seems to be used by the block toolbar, when multiple blocks are selected\n // (top and bottom blocks are used to calculate the resulting rect).\n referenceElement = {\n getBoundingClientRect() {\n const topRect = anchorRef.top.getBoundingClientRect();\n const bottomRect = anchorRef.bottom.getBoundingClientRect();\n return new window.DOMRect(topRect.x, topRect.y, topRect.width, bottomRect.bottom - topRect.top);\n }\n };\n } else if (isRef(anchorRef)) {\n // Standard React ref.\n referenceElement = anchorRef.current;\n } else if (anchorRef) {\n // If `anchorRef` holds directly the element's value (no `current` key)\n // This is a weird scenario and should be deprecated.\n referenceElement = anchorRef;\n } else if (anchorRect) {\n // Create a virtual element for the ref.\n referenceElement = {\n getBoundingClientRect() {\n return anchorRect;\n }\n };\n } else if (getAnchorRect) {\n // Create a virtual element for the ref.\n referenceElement = {\n getBoundingClientRect() {\n var _rect$x, _rect$y, _rect$width, _rect$height;\n const rect = getAnchorRect(fallbackReferenceElement);\n return new window.DOMRect((_rect$x = rect.x) !== null && _rect$x !== void 0 ? _rect$x : rect.left, (_rect$y = rect.y) !== null && _rect$y !== void 0 ? _rect$y : rect.top, (_rect$width = rect.width) !== null && _rect$width !== void 0 ? _rect$width : rect.right - rect.left, (_rect$height = rect.height) !== null && _rect$height !== void 0 ? _rect$height : rect.bottom - rect.top);\n }\n };\n } else if (fallbackReferenceElement) {\n // If no explicit ref is passed via props, fall back to\n // anchoring to the popover's parent node.\n referenceElement = fallbackReferenceElement.parentElement;\n }\n\n // Convert any `undefined` value to `null`.\n return (_referenceElement = referenceElement) !== null && _referenceElement !== void 0 ? _referenceElement : null;\n};\n\n/**\n * Computes the final coordinate that needs to be applied to the floating\n * element when applying transform inline styles, defaulting to `undefined`\n * if the provided value is `null` or `NaN`.\n *\n * @param c input coordinate (usually as returned from floating-ui)\n * @return The coordinate's value to be used for inline styles. An `undefined`\n * return value means \"no style set\" for this coordinate.\n */\nexport const computePopoverPosition = c => c === null || Number.isNaN(c) ? undefined : Math.round(c);"],
5
- "mappings": ";AAGA,SAAS,mBAAmB;AAI5B,SAAS,uBAAuB;AAChC,IAAM,wBAAwB;AAAA,EAC5B,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,aAAa;AAAA,EACb,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,wBAAwB;AAAA,EACxB,qBAAqB;AAAA,EACrB,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,oBAA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AQ,OAAO,WAAW,SAAS,QAAQ,GAAG;AAAA,MAChG;AAAA,IACF;AAAA,EACF,WAAW,MAAM,SAAS,GAAG;AAE3B,uBAAmB,UAAU;AAAA,EAC/B,WAAW,WAAW;AAGpB,uBAAmB;AAAA,EACrB,WAAW,YAAY;AAErB,uBAAmB;AAAA,MACjB,wBAAwB;AACtB,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF,WAAW,eAAe;AAExB,uBAAmB;AAAA,MACjB,wBAAwB;AACtB,YAAI,SAAS,SAAS,aAAa;AACnC,cAAM,OAAO,cAAc,wBAAwB;AACnD,eAAO,IAAI,OAAO,SAAS,UAAU,KAAK,OAAO,QAAQ,YAAY,SAAS,UAAU,KAAK,OAAO,UAAU,KAAK,OAAO,QAAQ,YAAY,SAAS,UAAU,KAAK,MAAM,cAAc,KAAK,WAAW,QAAQ,gBAAgB,SAAS,cAAc,KAAK,QAAQ,KAAK,OAAO,eAAe,KAAK,YAAY,QAAQ,iBAAiB,SAAS,eAAe,KAAK,SAAS,KAAK,GAAG;AAAA,MAC3X;AAAA,IACF;AAAA,EACF,WAAW,0BAA0B;AAGnC,uBAAmB,yBAAyB;AAAA,EAC9C;AAGA,UAAQ,oBAAoB,sBAAsB,QAAQ,sBAAsB,SAAS,oBAAoB;AAC/G;AAWO,IAAM,yBAAyB,OAAK,MAAM,QAAQ,OAAO,MAAM,CAAC,IAAI,SAAY,KAAK,MAAM,CAAC;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { cubicBezier } from 'framer-motion';\n/**\n * Internal dependencies\n */\nimport { DROPDOWN_MOTION } from '../utils';\nconst POSITION_TO_PLACEMENT = {\n bottom: 'bottom',\n top: 'top',\n 'middle left': 'left',\n 'middle right': 'right',\n 'bottom left': 'bottom-end',\n 'bottom center': 'bottom',\n 'bottom right': 'bottom-start',\n 'top left': 'top-end',\n 'top center': 'top',\n 'top right': 'top-start',\n 'middle left left': 'left',\n 'middle left right': 'left',\n 'middle left bottom': 'left-end',\n 'middle left top': 'left-start',\n 'middle right left': 'right',\n 'middle right right': 'right',\n 'middle right bottom': 'right-end',\n 'middle right top': 'right-start',\n 'bottom left left': 'bottom-end',\n 'bottom left right': 'bottom-end',\n 'bottom left bottom': 'bottom-end',\n 'bottom left top': 'bottom-end',\n 'bottom center left': 'bottom',\n 'bottom center right': 'bottom',\n 'bottom center bottom': 'bottom',\n 'bottom center top': 'bottom',\n 'bottom right left': 'bottom-start',\n 'bottom right right': 'bottom-start',\n 'bottom right bottom': 'bottom-start',\n 'bottom right top': 'bottom-start',\n 'top left left': 'top-end',\n 'top left right': 'top-end',\n 'top left bottom': 'top-end',\n 'top left top': 'top-end',\n 'top center left': 'top',\n 'top center right': 'top',\n 'top center bottom': 'top',\n 'top center top': 'top',\n 'top right left': 'top-start',\n 'top right right': 'top-start',\n 'top right bottom': 'top-start',\n 'top right top': 'top-start',\n // `middle`/`middle center [corner?]` positions are associated to a fallback\n // `bottom` placement because there aren't any corresponding placement values.\n middle: 'bottom',\n 'middle center': 'bottom',\n 'middle center bottom': 'bottom',\n 'middle center left': 'bottom',\n 'middle center right': 'bottom',\n 'middle center top': 'bottom'\n};\n\n/**\n * Converts the `Popover`'s legacy \"position\" prop to the new \"placement\" prop\n * (used by `floating-ui`).\n *\n * @param position The legacy position\n * @return The corresponding placement\n */\nexport const positionToPlacement = position => POSITION_TO_PLACEMENT[position] ?? 'bottom';\n\n/**\n * @typedef AnimationOrigin\n * @type {Object}\n * @property {number} originX A number between 0 and 1 (in CSS logical properties jargon, 0 is \"start\", 0.5 is \"center\", and 1 is \"end\")\n * @property {number} originY A number between 0 and 1 (0 is top, 0.5 is center, and 1 is bottom)\n */\n\nconst PLACEMENT_TO_ANIMATION_ORIGIN = {\n top: {\n originX: 0.5,\n originY: 1\n },\n // open from bottom, center\n 'top-start': {\n originX: 0,\n originY: 1\n },\n // open from bottom, left\n 'top-end': {\n originX: 1,\n originY: 1\n },\n // open from bottom, right\n right: {\n originX: 0,\n originY: 0.5\n },\n // open from middle, left\n 'right-start': {\n originX: 0,\n originY: 0\n },\n // open from top, left\n 'right-end': {\n originX: 0,\n originY: 1\n },\n // open from bottom, left\n bottom: {\n originX: 0.5,\n originY: 0\n },\n // open from top, center\n 'bottom-start': {\n originX: 0,\n originY: 0\n },\n // open from top, left\n 'bottom-end': {\n originX: 1,\n originY: 0\n },\n // open from top, right\n left: {\n originX: 1,\n originY: 0.5\n },\n // open from middle, right\n 'left-start': {\n originX: 1,\n originY: 0\n },\n // open from top, right\n 'left-end': {\n originX: 1,\n originY: 1\n },\n // open from bottom, right\n overlay: {\n originX: 0.5,\n originY: 0.5\n } // open from center, center\n};\n\n/**\n * Given the floating-ui `placement`, compute the framer-motion props for the\n * popover's entry animation.\n *\n * @param placement A placement string from floating ui\n * @return The object containing the motion props\n */\nexport const placementToMotionAnimationProps = placement => {\n const translateProp = placement.startsWith('top') || placement.startsWith('bottom') ? 'translateY' : 'translateX';\n const translateDirection = placement.startsWith('top') || placement.startsWith('left') ? 1 : -1;\n return {\n style: PLACEMENT_TO_ANIMATION_ORIGIN[placement],\n initial: {\n opacity: 0,\n [translateProp]: `${DROPDOWN_MOTION.SLIDE_DISTANCE * translateDirection}px`\n },\n animate: {\n opacity: 1,\n [translateProp]: 0\n },\n transition: {\n opacity: {\n duration: DROPDOWN_MOTION.FADE_DURATION / 1000,\n ease: DROPDOWN_MOTION.FADE_EASING.function\n },\n [translateProp]: {\n duration: DROPDOWN_MOTION.SLIDE_DURATION / 1000,\n ease: cubicBezier(...DROPDOWN_MOTION.SLIDE_EASING.args)\n }\n }\n };\n};\nfunction isTopBottom(anchorRef) {\n return !!anchorRef?.top;\n}\nfunction isRef(anchorRef) {\n return !!anchorRef?.current;\n}\nexport const getReferenceElement = ({\n anchor,\n anchorRef,\n anchorRect,\n getAnchorRect,\n fallbackReferenceElement\n}) => {\n let referenceElement = null;\n if (anchor) {\n referenceElement = anchor;\n } else if (isTopBottom(anchorRef)) {\n // Create a virtual element for the ref. The expectation is that\n // if anchorRef.top is defined, then anchorRef.bottom is defined too.\n // Seems to be used by the block toolbar, when multiple blocks are selected\n // (top and bottom blocks are used to calculate the resulting rect).\n referenceElement = {\n getBoundingClientRect() {\n const topRect = anchorRef.top.getBoundingClientRect();\n const bottomRect = anchorRef.bottom.getBoundingClientRect();\n return new window.DOMRect(topRect.x, topRect.y, topRect.width, bottomRect.bottom - topRect.top);\n }\n };\n } else if (isRef(anchorRef)) {\n // Standard React ref.\n referenceElement = anchorRef.current;\n } else if (anchorRef) {\n // If `anchorRef` holds directly the element's value (no `current` key)\n // This is a weird scenario and should be deprecated.\n referenceElement = anchorRef;\n } else if (anchorRect) {\n // Create a virtual element for the ref.\n referenceElement = {\n getBoundingClientRect() {\n return anchorRect;\n }\n };\n } else if (getAnchorRect) {\n // Create a virtual element for the ref.\n referenceElement = {\n getBoundingClientRect() {\n const rect = getAnchorRect(fallbackReferenceElement);\n return new window.DOMRect(rect.x ?? rect.left, rect.y ?? rect.top, rect.width ?? rect.right - rect.left, rect.height ?? rect.bottom - rect.top);\n }\n };\n } else if (fallbackReferenceElement) {\n // If no explicit ref is passed via props, fall back to\n // anchoring to the popover's parent node.\n referenceElement = fallbackReferenceElement.parentElement;\n }\n\n // Convert any `undefined` value to `null`.\n return referenceElement ?? null;\n};\n\n/**\n * Computes the final coordinate that needs to be applied to the floating\n * element when applying transform inline styles, defaulting to `undefined`\n * if the provided value is `null` or `NaN`.\n *\n * @param c input coordinate (usually as returned from floating-ui)\n * @return The coordinate's value to be used for inline styles. An `undefined`\n * return value means \"no style set\" for this coordinate.\n */\nexport const computePopoverPosition = c => c === null || Number.isNaN(c) ? undefined : Math.round(c);"],
5
+ "mappings": ";AAGA,SAAS,mBAAmB;AAI5B,SAAS,uBAAuB;AAChC,IAAM,wBAAwB;AAAA,EAC5B,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,iBAAiB;AAAA,EAC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,7 +9,7 @@ import { withIgnoreIMEEvents } from "./utils/with-ignore-ime-events.mjs";
9
9
  import { lock } from "./lock-unlock.mjs";
10
10
  import Badge from "./badge/index.mjs";
11
11
  import { DateCalendar, DateRangeCalendar, TZDate } from "./calendar/index.mjs";
12
- import { ValidatedCheckboxControl, ValidatedInputControl, ValidatedNumberControl, ValidatedSelectControl, ValidatedRadioControl, ValidatedTextControl, ValidatedTextareaControl, ValidatedToggleControl, ValidatedToggleGroupControl } from "./validated-form-controls/index.mjs";
12
+ import { ValidatedCheckboxControl, ValidatedComboboxControl, ValidatedInputControl, ValidatedNumberControl, ValidatedSelectControl, ValidatedRadioControl, ValidatedTextControl, ValidatedTextareaControl, ValidatedToggleControl, ValidatedToggleGroupControl } from "./validated-form-controls/index.mjs";
13
13
  import { ValidatedFormTokenField } from "./validated-form-controls/components/form-token-field.mjs";
14
14
  import { Picker } from "./color-picker/picker.mjs";
15
15
  var privateApis = {};
@@ -29,6 +29,7 @@ lock(privateApis, {
29
29
  Picker,
30
30
  ValidatedInputControl,
31
31
  ValidatedCheckboxControl,
32
+ ValidatedComboboxControl,
32
33
  ValidatedNumberControl,
33
34
  ValidatedSelectControl,
34
35
  ValidatedRadioControl,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/private-apis.ts"],
4
- "sourcesContent": ["/**\n * Internal dependencies\n */\nimport { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';\nimport { Menu } from './menu';\nimport { ComponentsContext } from './context/context-system-provider';\nimport Theme from './theme';\nimport { Tabs } from './tabs';\nimport { kebabCase, normalizeTextString } from './utils/strings';\nimport { withIgnoreIMEEvents } from './utils/with-ignore-ime-events';\nimport { lock } from './lock-unlock';\nimport Badge from './badge';\nimport { DateCalendar, DateRangeCalendar, TZDate } from './calendar';\nimport { ValidatedCheckboxControl, ValidatedInputControl, ValidatedNumberControl, ValidatedSelectControl, ValidatedRadioControl, ValidatedTextControl, ValidatedTextareaControl, ValidatedToggleControl, ValidatedToggleGroupControl } from './validated-form-controls';\nimport { ValidatedFormTokenField } from './validated-form-controls/components/form-token-field';\nimport { Picker } from './color-picker/picker';\nexport const privateApis = {};\nlock(privateApis, {\n __experimentalPopoverLegacyPositionToPlacement,\n ComponentsContext,\n Tabs,\n Theme,\n Menu,\n kebabCase,\n withIgnoreIMEEvents,\n Badge,\n normalizeTextString,\n DateCalendar,\n DateRangeCalendar,\n TZDate,\n Picker,\n ValidatedInputControl,\n ValidatedCheckboxControl,\n ValidatedNumberControl,\n ValidatedSelectControl,\n ValidatedRadioControl,\n ValidatedTextControl,\n ValidatedTextareaControl,\n ValidatedToggleControl,\n ValidatedToggleGroupControl,\n ValidatedFormTokenField\n});"],
5
- "mappings": ";AAGA,SAAS,uBAAuB,sDAAsD;AACtF,SAAS,YAAY;AACrB,SAAS,yBAAyB;AAClC,OAAO,WAAW;AAClB,SAAS,YAAY;AACrB,SAAS,WAAW,2BAA2B;AAC/C,SAAS,2BAA2B;AACpC,SAAS,YAAY;AACrB,OAAO,WAAW;AAClB,SAAS,cAAc,mBAAmB,cAAc;AACxD,SAAS,0BAA0B,uBAAuB,wBAAwB,wBAAwB,uBAAuB,sBAAsB,0BAA0B,wBAAwB,mCAAmC;AAC5O,SAAS,+BAA+B;AACxC,SAAS,cAAc;AAChB,IAAM,cAAc,CAAC;AAC5B,KAAK,aAAa;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;",
4
+ "sourcesContent": ["/**\n * Internal dependencies\n */\nimport { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';\nimport { Menu } from './menu';\nimport { ComponentsContext } from './context/context-system-provider';\nimport Theme from './theme';\nimport { Tabs } from './tabs';\nimport { kebabCase, normalizeTextString } from './utils/strings';\nimport { withIgnoreIMEEvents } from './utils/with-ignore-ime-events';\nimport { lock } from './lock-unlock';\nimport Badge from './badge';\nimport { DateCalendar, DateRangeCalendar, TZDate } from './calendar';\nimport { ValidatedCheckboxControl, ValidatedComboboxControl, ValidatedInputControl, ValidatedNumberControl, ValidatedSelectControl, ValidatedRadioControl, ValidatedTextControl, ValidatedTextareaControl, ValidatedToggleControl, ValidatedToggleGroupControl } from './validated-form-controls';\nimport { ValidatedFormTokenField } from './validated-form-controls/components/form-token-field';\nimport { Picker } from './color-picker/picker';\nexport const privateApis = {};\nlock(privateApis, {\n __experimentalPopoverLegacyPositionToPlacement,\n ComponentsContext,\n Tabs,\n Theme,\n Menu,\n kebabCase,\n withIgnoreIMEEvents,\n Badge,\n normalizeTextString,\n DateCalendar,\n DateRangeCalendar,\n TZDate,\n Picker,\n ValidatedInputControl,\n ValidatedCheckboxControl,\n ValidatedComboboxControl,\n ValidatedNumberControl,\n ValidatedSelectControl,\n ValidatedRadioControl,\n ValidatedTextControl,\n ValidatedTextareaControl,\n ValidatedToggleControl,\n ValidatedToggleGroupControl,\n ValidatedFormTokenField\n});"],
5
+ "mappings": ";AAGA,SAAS,uBAAuB,sDAAsD;AACtF,SAAS,YAAY;AACrB,SAAS,yBAAyB;AAClC,OAAO,WAAW;AAClB,SAAS,YAAY;AACrB,SAAS,WAAW,2BAA2B;AAC/C,SAAS,2BAA2B;AACpC,SAAS,YAAY;AACrB,OAAO,WAAW;AAClB,SAAS,cAAc,mBAAmB,cAAc;AACxD,SAAS,0BAA0B,0BAA0B,uBAAuB,wBAAwB,wBAAwB,uBAAuB,sBAAsB,0BAA0B,wBAAwB,mCAAmC;AACtQ,SAAS,+BAA+B;AACxC,SAAS,cAAc;AAChB,IAAM,cAAc,CAAC;AAC5B,KAAK,aAAa;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;",
6
6
  "names": []
7
7
  }
@@ -27,6 +27,7 @@ function UnforwardedProgressBar(props, ref) {
27
27
  });
28
28
  }
29
29
  var ProgressBar = forwardRef(UnforwardedProgressBar);
30
+ ProgressBar.displayName = "ProgressBar";
30
31
  var progress_bar_default = ProgressBar;
31
32
  export {
32
33
  ProgressBar,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/progress-bar/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as ProgressBarStyled from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedProgressBar(props, ref) {\n const {\n className,\n value,\n ...progressProps\n } = props;\n const isIndeterminate = !Number.isFinite(value);\n return /*#__PURE__*/_jsxs(ProgressBarStyled.Track, {\n className: className,\n children: [/*#__PURE__*/_jsx(ProgressBarStyled.Indicator, {\n style: {\n '--indicator-width': !isIndeterminate ? `${value}%` : undefined\n },\n isIndeterminate: isIndeterminate\n }), /*#__PURE__*/_jsx(ProgressBarStyled.ProgressElement, {\n max: 100,\n value: value,\n \"aria-label\": __('Loading \u2026'),\n ref: ref,\n ...progressProps\n })]\n });\n}\n\n/**\n * A simple horizontal progress bar component.\n *\n * Supports two modes: determinate and indeterminate. A progress bar is determinate\n * when a specific progress value has been specified (from 0 to 100), and indeterminate\n * when a value hasn't been specified.\n *\n * ```jsx\n * import { ProgressBar } from '@wordpress/components';\n *\n * const MyLoadingComponent = () => {\n * \treturn <ProgressBar />;\n * };\n * ```\n */\nexport const ProgressBar = forwardRef(UnforwardedProgressBar);\nexport default ProgressBar;"],
5
- "mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAK3B,YAAY,uBAAuB;AACnC,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,kBAAkB,CAAC,OAAO,SAAS,KAAK;AAC9C,SAAoB,sBAAwB,yBAAO;AAAA,IACjD;AAAA,IACA,UAAU,CAAc,qBAAuB,6BAAW;AAAA,MACxD,OAAO;AAAA,QACL,qBAAqB,CAAC,kBAAkB,GAAG,KAAK,MAAM;AAAA,MACxD;AAAA,MACA;AAAA,IACF,CAAC,GAAgB,qBAAuB,mCAAiB;AAAA,MACvD,KAAK;AAAA,MACL;AAAA,MACA,cAAc,GAAG,gBAAW;AAAA,MAC5B;AAAA,MACA,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAiBO,IAAM,cAAc,WAAW,sBAAsB;AAC5D,IAAO,uBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as ProgressBarStyled from './styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedProgressBar(props, ref) {\n const {\n className,\n value,\n ...progressProps\n } = props;\n const isIndeterminate = !Number.isFinite(value);\n return /*#__PURE__*/_jsxs(ProgressBarStyled.Track, {\n className: className,\n children: [/*#__PURE__*/_jsx(ProgressBarStyled.Indicator, {\n style: {\n '--indicator-width': !isIndeterminate ? `${value}%` : undefined\n },\n isIndeterminate: isIndeterminate\n }), /*#__PURE__*/_jsx(ProgressBarStyled.ProgressElement, {\n max: 100,\n value: value,\n \"aria-label\": __('Loading \u2026'),\n ref: ref,\n ...progressProps\n })]\n });\n}\n\n/**\n * A simple horizontal progress bar component.\n *\n * Supports two modes: determinate and indeterminate. A progress bar is determinate\n * when a specific progress value has been specified (from 0 to 100), and indeterminate\n * when a value hasn't been specified.\n *\n * ```jsx\n * import { ProgressBar } from '@wordpress/components';\n *\n * const MyLoadingComponent = () => {\n * \treturn <ProgressBar />;\n * };\n * ```\n */\nexport const ProgressBar = forwardRef(UnforwardedProgressBar);\nProgressBar.displayName = 'ProgressBar';\nexport default ProgressBar;"],
5
+ "mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,kBAAkB;AAK3B,YAAY,uBAAuB;AACnC,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,kBAAkB,CAAC,OAAO,SAAS,KAAK;AAC9C,SAAoB,sBAAwB,yBAAO;AAAA,IACjD;AAAA,IACA,UAAU,CAAc,qBAAuB,6BAAW;AAAA,MACxD,OAAO;AAAA,QACL,qBAAqB,CAAC,kBAAkB,GAAG,KAAK,MAAM;AAAA,MACxD;AAAA,MACA;AAAA,IACF,CAAC,GAAgB,qBAAuB,mCAAiB;AAAA,MACvD,KAAK;AAAA,MACL;AAAA,MACA,cAAc,GAAG,gBAAW;AAAA,MAC5B;AAAA,MACA,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAiBO,IAAM,cAAc,WAAW,sBAAsB;AAC5D,YAAY,cAAc;AAC1B,IAAO,uBAAQ;",
6
6
  "names": []
7
7
  }
@@ -19,7 +19,7 @@ function UnforwardedRadioGroup({
19
19
  value: checked,
20
20
  defaultValue: defaultChecked,
21
21
  setValue: (newValue) => {
22
- onChange?.(newValue !== null && newValue !== void 0 ? newValue : void 0);
22
+ onChange?.(newValue ?? void 0);
23
23
  },
24
24
  rtl: isRTL()
25
25
  });
@@ -46,6 +46,7 @@ function UnforwardedRadioGroup({
46
46
  });
47
47
  }
48
48
  var RadioGroup2 = forwardRef(UnforwardedRadioGroup);
49
+ RadioGroup2.displayName = "RadioGroup";
49
50
  var radio_group_default = RadioGroup2;
50
51
  export {
51
52
  RadioGroup2 as RadioGroup,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/radio-group/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo, forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ButtonGroup from '../button-group';\nimport { RadioGroupContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedRadioGroup({\n label,\n checked,\n defaultChecked,\n disabled,\n onChange,\n children,\n ...props\n}, ref) {\n const radioStore = Ariakit.useRadioStore({\n value: checked,\n defaultValue: defaultChecked,\n setValue: newValue => {\n onChange?.(newValue !== null && newValue !== void 0 ? newValue : undefined);\n },\n rtl: isRTL()\n });\n const contextValue = useMemo(() => ({\n store: radioStore,\n disabled\n }), [radioStore, disabled]);\n deprecated('wp.components.__experimentalRadioGroup', {\n alternative: 'wp.components.RadioControl or wp.components.__experimentalToggleGroupControl',\n since: '6.8'\n });\n return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(Ariakit.RadioGroup, {\n store: radioStore,\n render: /*#__PURE__*/_jsx(ButtonGroup, {\n __shouldNotWarnDeprecated: true,\n children: children\n }),\n \"aria-label\": label,\n ref: ref,\n ...props\n })\n });\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const RadioGroup = forwardRef(UnforwardedRadioGroup);\nexport default RadioGroup;"],
5
- "mappings": ";AAGA,YAAY,aAAa;AAKzB,OAAO,gBAAgB;AACvB,SAAS,SAAS,kBAAkB;AACpC,SAAS,aAAa;AAKtB,OAAO,iBAAiB;AACxB,SAAS,yBAAyB;AAClC,SAAS,OAAO,YAAY;AAC5B,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,aAAqB,sBAAc;AAAA,IACvC,OAAO;AAAA,IACP,cAAc;AAAA,IACd,UAAU,cAAY;AACpB,iBAAW,aAAa,QAAQ,aAAa,SAAS,WAAW,MAAS;AAAA,IAC5E;AAAA,IACA,KAAK,MAAM;AAAA,EACb,CAAC;AACD,QAAM,eAAe,QAAQ,OAAO;AAAA,IAClC,OAAO;AAAA,IACP;AAAA,EACF,IAAI,CAAC,YAAY,QAAQ,CAAC;AAC1B,aAAW,0CAA0C;AAAA,IACnD,aAAa;AAAA,IACb,OAAO;AAAA,EACT,CAAC;AACD,SAAoB,qBAAK,kBAAkB,UAAU;AAAA,IACnD,OAAO;AAAA,IACP,UAAuB,qBAAa,oBAAY;AAAA,MAC9C,OAAO;AAAA,MACP,QAAqB,qBAAK,aAAa;AAAA,QACrC,2BAA2B;AAAA,QAC3B;AAAA,MACF,CAAC;AAAA,MACD,cAAc;AAAA,MACd;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAKO,IAAMA,cAAa,WAAW,qBAAqB;AAC1D,IAAO,sBAAQA;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo, forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ButtonGroup from '../button-group';\nimport { RadioGroupContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedRadioGroup({\n label,\n checked,\n defaultChecked,\n disabled,\n onChange,\n children,\n ...props\n}, ref) {\n const radioStore = Ariakit.useRadioStore({\n value: checked,\n defaultValue: defaultChecked,\n setValue: newValue => {\n onChange?.(newValue ?? undefined);\n },\n rtl: isRTL()\n });\n const contextValue = useMemo(() => ({\n store: radioStore,\n disabled\n }), [radioStore, disabled]);\n deprecated('wp.components.__experimentalRadioGroup', {\n alternative: 'wp.components.RadioControl or wp.components.__experimentalToggleGroupControl',\n since: '6.8'\n });\n return /*#__PURE__*/_jsx(RadioGroupContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(Ariakit.RadioGroup, {\n store: radioStore,\n render: /*#__PURE__*/_jsx(ButtonGroup, {\n __shouldNotWarnDeprecated: true,\n children: children\n }),\n \"aria-label\": label,\n ref: ref,\n ...props\n })\n });\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const RadioGroup = forwardRef(UnforwardedRadioGroup);\nRadioGroup.displayName = 'RadioGroup';\nexport default RadioGroup;"],
5
+ "mappings": ";AAGA,YAAY,aAAa;AAKzB,OAAO,gBAAgB;AACvB,SAAS,SAAS,kBAAkB;AACpC,SAAS,aAAa;AAKtB,OAAO,iBAAiB;AACxB,SAAS,yBAAyB;AAClC,SAAS,OAAO,YAAY;AAC5B,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,aAAqB,sBAAc;AAAA,IACvC,OAAO;AAAA,IACP,cAAc;AAAA,IACd,UAAU,cAAY;AACpB,iBAAW,YAAY,MAAS;AAAA,IAClC;AAAA,IACA,KAAK,MAAM;AAAA,EACb,CAAC;AACD,QAAM,eAAe,QAAQ,OAAO;AAAA,IAClC,OAAO;AAAA,IACP;AAAA,EACF,IAAI,CAAC,YAAY,QAAQ,CAAC;AAC1B,aAAW,0CAA0C;AAAA,IACnD,aAAa;AAAA,IACb,OAAO;AAAA,EACT,CAAC;AACD,SAAoB,qBAAK,kBAAkB,UAAU;AAAA,IACnD,OAAO;AAAA,IACP,UAAuB,qBAAa,oBAAY;AAAA,MAC9C,OAAO;AAAA,MACP,QAAqB,qBAAK,aAAa;AAAA,QACrC,2BAA2B;AAAA,QAC3B;AAAA,MACF,CAAC;AAAA,MACD,cAAc;AAAA,MACd;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAKO,IAAMA,cAAa,WAAW,qBAAqB;AAC1DA,YAAW,cAAc;AACzB,IAAO,sBAAQA;",
6
6
  "names": ["RadioGroup"]
7
7
  }
@@ -26,14 +26,19 @@ function UnforwardedRadio({
26
26
  store,
27
27
  ref,
28
28
  value,
29
- render: /* @__PURE__ */ _jsx(Button, {
30
- variant: isChecked ? "primary" : "secondary",
31
- ...props
32
- }),
29
+ render: (
30
+ // Disable: the parent component already takes care of the `__next40pxDefaultSize` prop.
31
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
32
+ /* @__PURE__ */ _jsx(Button, {
33
+ variant: isChecked ? "primary" : "secondary",
34
+ ...props
35
+ })
36
+ ),
33
37
  children: children || value
34
38
  });
35
39
  }
36
40
  var Radio2 = forwardRef(UnforwardedRadio);
41
+ Radio2.displayName = "Radio";
37
42
  var radio_default = Radio2;
38
43
  export {
39
44
  Radio2 as Radio,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/radio-group/radio.tsx"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { RadioGroupContext } from './context';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedRadio({\n value,\n children,\n ...props\n}, ref) {\n const {\n store,\n disabled\n } = useContext(RadioGroupContext);\n const selectedValue = Ariakit.useStoreState(store, 'value');\n const isChecked = selectedValue !== undefined && selectedValue === value;\n maybeWarnDeprecated36pxSize({\n componentName: 'Radio',\n size: undefined,\n __next40pxDefaultSize: props.__next40pxDefaultSize\n });\n return /*#__PURE__*/_jsx(Ariakit.Radio, {\n disabled: disabled,\n store: store,\n ref: ref,\n value: value,\n render: /*#__PURE__*/_jsx(Button, {\n variant: isChecked ? 'primary' : 'secondary',\n ...props\n }),\n children: children || value\n });\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const Radio = forwardRef(UnforwardedRadio);\nexport default Radio;"],
5
- "mappings": ";AAGA,SAAS,YAAY,kBAAkB;AAKvC,YAAY,aAAa;AAKzB,OAAO,YAAY;AACnB,SAAS,yBAAyB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,OAAO,YAAY;AAC5B,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,WAAW,iBAAiB;AAChC,QAAM,gBAAwB,sBAAc,OAAO,OAAO;AAC1D,QAAM,YAAY,kBAAkB,UAAa,kBAAkB;AACnE,8BAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,MAAM;AAAA,IACN,uBAAuB,MAAM;AAAA,EAC/B,CAAC;AACD,SAAoB,qBAAa,eAAO;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAqB,qBAAK,QAAQ;AAAA,MAChC,SAAS,YAAY,YAAY;AAAA,MACjC,GAAG;AAAA,IACL,CAAC;AAAA,IACD,UAAU,YAAY;AAAA,EACxB,CAAC;AACH;AAKO,IAAMA,SAAQ,WAAW,gBAAgB;AAChD,IAAO,gBAAQA;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { RadioGroupContext } from './context';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedRadio({\n value,\n children,\n ...props\n}, ref) {\n const {\n store,\n disabled\n } = useContext(RadioGroupContext);\n const selectedValue = Ariakit.useStoreState(store, 'value');\n const isChecked = selectedValue !== undefined && selectedValue === value;\n maybeWarnDeprecated36pxSize({\n componentName: 'Radio',\n size: undefined,\n __next40pxDefaultSize: props.__next40pxDefaultSize\n });\n return /*#__PURE__*/_jsx(Ariakit.Radio, {\n disabled: disabled,\n store: store,\n ref: ref,\n value: value,\n render:\n /*#__PURE__*/\n // Disable: the parent component already takes care of the `__next40pxDefaultSize` prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n variant: isChecked ? 'primary' : 'secondary',\n ...props\n }),\n children: children || value\n });\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport const Radio = forwardRef(UnforwardedRadio);\nRadio.displayName = 'Radio';\nexport default Radio;"],
5
+ "mappings": ";AAGA,SAAS,YAAY,kBAAkB;AAKvC,YAAY,aAAa;AAKzB,OAAO,YAAY;AACnB,SAAS,yBAAyB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,OAAO,YAAY;AAC5B,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,WAAW,iBAAiB;AAChC,QAAM,gBAAwB,sBAAc,OAAO,OAAO;AAC1D,QAAM,YAAY,kBAAkB,UAAa,kBAAkB;AACnE,8BAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,MAAM;AAAA,IACN,uBAAuB,MAAM;AAAA,EAC/B,CAAC;AACD,SAAoB,qBAAa,eAAO;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA,MAIA,qBAAK,QAAQ;AAAA,QACX,SAAS,YAAY,YAAY;AAAA,QACjC,GAAG;AAAA,MACL,CAAC;AAAA;AAAA,IACD,UAAU,YAAY;AAAA,EACxB,CAAC;AACH;AAKO,IAAMA,SAAQ,WAAW,gBAAgB;AAChDA,OAAM,cAAc;AACpB,IAAO,gBAAQA;",
6
6
  "names": ["Radio"]
7
7
  }
@@ -70,7 +70,7 @@ function UnforwardedRangeControl(props, forwardedRef) {
70
70
  const [value, setValue] = useControlledRangeValue({
71
71
  min,
72
72
  max,
73
- value: valueProp !== null && valueProp !== void 0 ? valueProp : null,
73
+ value: valueProp ?? null,
74
74
  initial: initialPosition
75
75
  });
76
76
  const isResetPendent = useRef(false);
@@ -121,9 +121,9 @@ function UnforwardedRangeControl(props, forwardedRef) {
121
121
  }
122
122
  };
123
123
  const handleOnReset = () => {
124
- const resetValue = Number.isNaN(resetFallbackValue) ? null : resetFallbackValue !== null && resetFallbackValue !== void 0 ? resetFallbackValue : null;
124
+ const resetValue = Number.isNaN(resetFallbackValue) ? null : resetFallbackValue ?? null;
125
125
  setValue(resetValue);
126
- onChange(resetValue !== null && resetValue !== void 0 ? resetValue : void 0);
126
+ onChange(resetValue ?? void 0);
127
127
  };
128
128
  const handleShowTooltip = () => setShowTooltip(true);
129
129
  const handleHideTooltip = () => setShowTooltip(false);
@@ -179,7 +179,7 @@ function UnforwardedRangeControl(props, forwardedRef) {
179
179
  onMouseLeave,
180
180
  ref: useMergeRefs([inputRef, forwardedRef]),
181
181
  step,
182
- value: inputSliderValue !== null && inputSliderValue !== void 0 ? inputSliderValue : void 0
182
+ value: inputSliderValue ?? void 0
183
183
  }), /* @__PURE__ */ _jsx(RangeRail, {
184
184
  "aria-hidden": true,
185
185
  disabled,
@@ -253,6 +253,7 @@ function UnforwardedRangeControl(props, forwardedRef) {
253
253
  });
254
254
  }
255
255
  var RangeControl = forwardRef(UnforwardedRangeControl);
256
+ RangeControl.displayName = "RangeControl";
256
257
  var range_control_default = RangeControl;
257
258
  export {
258
259
  RangeControl,
@@ -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": ";AAGA,OAAO,UAAU;AAIjB,SAAS,IAAI,aAAa;AAC1B,SAAS,QAAQ,UAAU,kBAAkB;AAC7C,SAAS,eAAe,oBAAoB;AAK5C,OAAO,iBAAiB;AACxB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,SAAS,cAAc;AACvB,SAAS,YAAY,+BAA+B;AACpD,SAAS,aAAa;AACtB,OAAO,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AAA,QACnD,sBAAsB,wBAAwB,MAAM,EAAE,IAAI,MAAM,EAAE;AAAA,QAClE;AAAA,QAGA,OAAO;AAAA,QACP,mCAAmC;AAAA,MACrC,CAAC,GAAG,cAA2B,qBAAK,oBAAoB;AAAA,QACtD,UAAuB,qBAAK,QAAQ;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,UAAU,GAAG,OAAO;AAAA,QACtB,CAAC;AAAA,MACH,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AA0BO,IAAM,eAAe,WAAW,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,\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;\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 ?? 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 ?? 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": ";AAGA,OAAO,UAAU;AAIjB,SAAS,IAAI,aAAa;AAC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AAAA,QACA,QAAQ;AAAA,QACR,UAAU;AAAA,QACV;AAAA,QACA,MAAM,wBAAwB,qBAAqB;AAAA,QACnD,sBAAsB,wBAAwB,MAAM,EAAE,IAAI,MAAM,EAAE;AAAA,QAClE;AAAA,QAGA,OAAO;AAAA,QACP,mCAAmC;AAAA,MACrC,CAAC,GAAG,cAA2B,qBAAK,oBAAoB;AAAA,QACtD,UAAuB,qBAAK,QAAQ;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,UAAU,GAAG,OAAO;AAAA,QACtB,CAAC;AAAA,MACH,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AA0BO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -16,7 +16,7 @@ function useControlledRangeValue(settings) {
16
16
  initial
17
17
  } = settings;
18
18
  const [state, setInternalState] = useControlledState(floatClamp(valueProp, min, max), {
19
- initial: floatClamp(initial !== null && initial !== void 0 ? initial : null, min, max),
19
+ initial: floatClamp(initial ?? null, min, max),
20
20
  fallback: null
21
21
  });
22
22
  const setState = useCallback((nextValue) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/range-control/utils.ts"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useControlledState } from '../utils/hooks';\nimport { clamp } from '../utils/math';\n/**\n * A float supported clamp function for a specific value.\n *\n * @param value The value to clamp.\n * @param min The minimum value.\n * @param max The maximum value.\n *\n * @return A (float) number\n */\nexport function floatClamp(value, min, max) {\n if (typeof value !== 'number') {\n return null;\n }\n return parseFloat(`${clamp(value, min, max)}`);\n}\n\n/**\n * Hook to store a clamped value, derived from props.\n *\n * @param settings\n * @return The controlled value and the value setter.\n */\nexport function useControlledRangeValue(settings) {\n const {\n min,\n max,\n value: valueProp,\n initial\n } = settings;\n const [state, setInternalState] = useControlledState(floatClamp(valueProp, min, max), {\n initial: floatClamp(initial !== null && initial !== void 0 ? initial : null, min, max),\n fallback: null\n });\n const setState = useCallback(nextValue => {\n if (nextValue === null) {\n setInternalState(null);\n } else {\n setInternalState(floatClamp(nextValue, min, max));\n }\n }, [min, max, setInternalState]);\n\n // `state` can't be an empty string because we specified a fallback value of\n // `null` in `useControlledState`\n return [state, setState];\n}"],
5
- "mappings": ";AAGA,SAAS,mBAAmB;AAK5B,SAAS,0BAA0B;AACnC,SAAS,aAAa;AAUf,SAAS,WAAW,OAAO,KAAK,KAAK;AAC1C,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AACA,SAAO,WAAW,GAAG,MAAM,OAAO,KAAK,GAAG,CAAC,EAAE;AAC/C;AAQO,SAAS,wBAAwB,UAAU;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,EACF,IAAI;AACJ,QAAM,CAAC,OAAO,gBAAgB,IAAI,mBAAmB,WAAW,WAAW,KAAK,GAAG,GAAG;AAAA,IACpF,SAAS,WAAW,YAAY,QAAQ,YAAY,SAAS,UAAU,MAAM,KAAK,GAAG;AAAA,IACrF,UAAU;AAAA,EACZ,CAAC;AACD,QAAM,WAAW,YAAY,eAAa;AACxC,QAAI,cAAc,MAAM;AACtB,uBAAiB,IAAI;AAAA,IACvB,OAAO;AACL,uBAAiB,WAAW,WAAW,KAAK,GAAG,CAAC;AAAA,IAClD;AAAA,EACF,GAAG,CAAC,KAAK,KAAK,gBAAgB,CAAC;AAI/B,SAAO,CAAC,OAAO,QAAQ;AACzB;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useControlledState } from '../utils/hooks';\nimport { clamp } from '../utils/math';\n/**\n * A float supported clamp function for a specific value.\n *\n * @param value The value to clamp.\n * @param min The minimum value.\n * @param max The maximum value.\n *\n * @return A (float) number\n */\nexport function floatClamp(value, min, max) {\n if (typeof value !== 'number') {\n return null;\n }\n return parseFloat(`${clamp(value, min, max)}`);\n}\n\n/**\n * Hook to store a clamped value, derived from props.\n *\n * @param settings\n * @return The controlled value and the value setter.\n */\nexport function useControlledRangeValue(settings) {\n const {\n min,\n max,\n value: valueProp,\n initial\n } = settings;\n const [state, setInternalState] = useControlledState(floatClamp(valueProp, min, max), {\n initial: floatClamp(initial ?? null, min, max),\n fallback: null\n });\n const setState = useCallback(nextValue => {\n if (nextValue === null) {\n setInternalState(null);\n } else {\n setInternalState(floatClamp(nextValue, min, max));\n }\n }, [min, max, setInternalState]);\n\n // `state` can't be an empty string because we specified a fallback value of\n // `null` in `useControlledState`\n return [state, setState];\n}"],
5
+ "mappings": ";AAGA,SAAS,mBAAmB;AAK5B,SAAS,0BAA0B;AACnC,SAAS,aAAa;AAUf,SAAS,WAAW,OAAO,KAAK,KAAK;AAC1C,MAAI,OAAO,UAAU,UAAU;AAC7B,WAAO;AAAA,EACT;AACA,SAAO,WAAW,GAAG,MAAM,OAAO,KAAK,GAAG,CAAC,EAAE;AAC/C;AAQO,SAAS,wBAAwB,UAAU;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,EACF,IAAI;AACJ,QAAM,CAAC,OAAO,gBAAgB,IAAI,mBAAmB,WAAW,WAAW,KAAK,GAAG,GAAG;AAAA,IACpF,SAAS,WAAW,WAAW,MAAM,KAAK,GAAG;AAAA,IAC7C,UAAU;AAAA,EACZ,CAAC;AACD,QAAM,WAAW,YAAY,eAAa;AACxC,QAAI,cAAc,MAAM;AACtB,uBAAiB,IAAI;AAAA,IACvB,OAAO;AACL,uBAAiB,WAAW,WAAW,KAAK,GAAG,CAAC;AAAA,IAClD;AAAA,EACF,GAAG,CAAC,KAAK,KAAK,gBAAgB,CAAC;AAI/B,SAAO,CAAC,OAAO,QAAQ;AACzB;",
6
6
  "names": []
7
7
  }
@@ -58,6 +58,7 @@ function UnforwardedResizableBox({
58
58
  });
59
59
  }
60
60
  var ResizableBox = forwardRef(UnforwardedResizableBox);
61
+ ResizableBox.displayName = "ResizableBox";
61
62
  var resizable_box_default = ResizableBox;
62
63
  export {
63
64
  ResizableBox,
@@ -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": ";AAGA,SAAS,kBAAkB;AAK3B,OAAO,UAAU;AACjB,SAAS,iBAAiB;AAI1B,OAAO,mBAAmB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CAAC,CAAC,CAAC;AAAA,IACT,eAAe;AAAA,IACf,cAAc;AAAA,IACd;AAAA,IACA,GAAG;AAAA,IACH,UAAU,CAAC,UAAU,eAA4B,qBAAK,eAAe;AAAA,MACnE,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,eAAe,WAAW,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": ";AAGA,SAAS,kBAAkB;AAK3B,OAAO,UAAU;AACjB,SAAS,iBAAiB;AAI1B,OAAO,mBAAmB;AAC1B,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,IAAM,oBAAoB;AAC1B,IAAM,yBAAyB;AAC/B,IAAM,2BAA2B;AACjC,IAAM,iBAAi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eAAe;AAAA,MACnE,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
6
6
  "names": []
7
7
  }
@@ -34,7 +34,7 @@ function SuffixItem({
34
34
  size: "small",
35
35
  icon: closeSmall,
36
36
  label: onClose ? __("Close search") : __("Reset search"),
37
- onClick: onClose !== null && onClose !== void 0 ? onClose : onReset
37
+ onClick: onClose ?? onReset
38
38
  })
39
39
  });
40
40
  }
@@ -66,10 +66,10 @@ function UnforwardedSearchControl({
66
66
  type: "search",
67
67
  size,
68
68
  className: clsx("components-search-control", className),
69
- onChange: (nextValue) => onChange(nextValue !== null && nextValue !== void 0 ? nextValue : ""),
69
+ onChange: (nextValue) => onChange(nextValue ?? ""),
70
70
  autoComplete: "off",
71
71
  placeholder,
72
- value: value !== null && value !== void 0 ? value : "",
72
+ value: value ?? "",
73
73
  prefix: /* @__PURE__ */ _jsx(InputControlPrefixWrapper, {
74
74
  variant: "icon",
75
75
  children: /* @__PURE__ */ _jsx(StyledIcon, {
@@ -87,6 +87,7 @@ function UnforwardedSearchControl({
87
87
  });
88
88
  }
89
89
  var SearchControl = forwardRef(UnforwardedSearchControl);
90
+ SearchControl.displayName = "SearchControl";
90
91
  var search_control_default = SearchControl;
91
92
  export {
92
93
  SearchControl,
@@ -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": ";AAGA,OAAO,UAAU;AAIjB,SAAS,eAAe,oBAAoB;AAC5C,SAAS,UAAU;AACnB,SAAS,QAAQ,kBAAkB;AACnC,SAAS,YAAY,cAAc;AACnC,OAAO,gBAAgB;AAKvB,OAAO,YAAY;AACnB,SAAS,iCAAiC;AAC1C,SAAS,iCAAiC;AAC1C,SAAS,oBAAoB,kBAAkB;AAC/C,SAAS,OAAO,YAAY;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,eAAW,iDAAiD;AAAA,MAC1D,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,QAAM,UAAU,MAAM;AACpB,aAAS,EAAE;AACX,cAAU,SAAS,MAAM;AAAA,EAC3B;AACA,SAAoB,qBAAK,2BAA2B;AAAA,IAClD,SAAS;AAAA,IACT,UAAuB,qBAAK,QAAQ;AAAA,MAClC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,UAAU,GAAG,cAAc,IAAI,GAAG,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,QAAQ,GAAG,QAAQ;AAAA,EACnB,cAAc,GAAG,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,YAAY,OAAO,IAAI;AAC7B,QAAM,aAAa,cAAc,eAAe,2BAA2B;AAC3E,SAAoB,qBAAK,oBAAoB;AAAA,IAC3C,uBAAuB;AAAA,IACvB,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA,KAAK,aAAa,CAAC,WAAW,YAAY,CAAC;AAAA,IAC3C,MAAM;AAAA,IACN;AAAA,IACA,WAAW,KAAK,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,qBAAK,2BAA2B;AAAA,MACnD,SAAS;AAAA,MACT,UAAuB,qBAAK,YAAY;AAAA,QACtC,MAAM;AAAA,QACN,MAAM;AAAA,MACR,CAAC;AAAA,IACH,CAAC;AAAA,IACD,QAAqB,qBAAK,YAAY;AAAA,MACpC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;AAqBO,IAAM,gBAAgB,WAAW,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 ?? 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 ?? ''),\n autoComplete: \"off\",\n placeholder: placeholder,\n value: 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": ";AAGA,OAAO,UAAU;AAIjB,SAAS,eAAe,oBAAoB;AAC5C,SAAS,UAAU;AACnB,SAAS,QAAQ,kBAAkB;AACnC,SAAS,YAAY,cAAc;AACnC,OAAO,gBAAgB;AAKvB,OAAO,YAAY;AACnB,SAAS,iCAAiC;AAC1C,SAAS,iCAAiC;AAC1C,SAAS,oBAAoB,kBAAkB;AAC/C,SAAS,OAAO,YAAY;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,eAAW,iDAAiD;AAAA,MAC1D,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,QAAM,UAAU,MAAM;AACpB,aAAS,EAAE;AACX,cAAU,SAAS,MAAM;AAAA,EAC3B;AACA,SAAoB,qBAAK,2BAA2B;AAAA,IAClD,SAAS;AAAA,IACT,UAAuB,qBAAK,QAAQ;AAAA,MAClC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,UAAU,GAAG,cAAc,IAAI,GAAG,cAAc;AAAA,MACvD,SAAS,WAAW;AAAA,IACtB,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,yBAAyB;AAAA,EAChC,yBAAyB;AAAA;AAAA,EAEzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ,GAAG,QAAQ;AAAA,EACnB,cAAc,GAAG,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,YAAY,OAAO,IAAI;AAC7B,QAAM,aAAa,cAAc,eAAe,2BAA2B;AAC3E,SAAoB,qBAAK,oBAAoB;AAAA,IAC3C,uBAAuB;AAAA,IACvB,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA,KAAK,aAAa,CAAC,WAAW,YAAY,CAAC;AAAA,IAC3C,MAAM;AAAA,IACN;AAAA,IACA,WAAW,KAAK,6BAA6B,SAAS;AAAA,IACtD,UAAU,eAAa,SAAS,aAAa,EAAE;AAAA,IAC/C,cAAc;AAAA,IACd;AAAA,IACA,OAAO,SAAS;AAAA,IAChB,QAAqB,qBAAK,2BAA2B;AAAA,MACnD,SAAS;AAAA,MACT,UAAuB,qBAAK,YAAY;AAAA,QACtC,MAAM;AAAA,QACN,MAAM;AAAA,MACR,CAAC;AAAA,IACH,CAAC;AAAA,IACD,QAAqB,qBAAK,YAAY;AAAA,MACpC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;AAqBO,IAAM,gBAAgB,WAAW,wBAAwB;AAChE,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
6
6
  "names": []
7
7
  }
@@ -121,6 +121,7 @@ function UnforwardedSelectControl(props, ref) {
121
121
  });
122
122
  }
123
123
  var SelectControl = forwardRef(UnforwardedSelectControl);
124
+ SelectControl.displayName = "SelectControl";
124
125
  var select_control_default = SelectControl;
125
126
  export {
126
127
  SelectControl,
@@ -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": ";AAGA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAK3B,OAAO,iBAAiB;AACxB,SAAS,QAAQ,uBAAuB;AACxC,OAAO,8BAA8B;AACrC,SAAS,wCAAwC;AACjD,SAAS,mCAAmC;AAC5C,SAAS,OAAO,YAAY;AAC5B,SAAS,YAAY,QAAQ;AAC3B,QAAM,aAAa,cAAc,aAAa;AAC9C,QAAM,KAAK,4BAA4B,UAAU;AACjD,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ACH;AACA,QAAM,UAAU,KAAK,6BAA6B,SAAS;AAC3D,8BAA4B;AAAA,IAC1B,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SAAoB,qBAAK,aAAa;AAAA,IACpC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,UAAuB,qBAAK,iBAAiB;AAAA,MAC3C;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAc,YAAY;AAAA,MAC1B;AAAA,MACA;AAAA,MACA,QAAQ,UAAU,CAAC,YAAyB,qBAAK,0BAA0B,CAAC,CAAC;AAAA,MAC7E;AAAA,MACA;AAAA,MACA,sBAAsB,YAAY,YAAY,SAAS;AAAA,MACvD;AAAA,MACA;AAAA,MACA,UAAuB,qBAAK,QAAQ;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,qBAAK,eAAe;AAAA,UACrD;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AA6BO,IAAM,gBAAgB,WAAW,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": ";AAGA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAK3B,OAAO,iBAAiB;AACxB,SAAS,QAAQ,uBAAuB;AACxC,OAAO,8BAA8B;AACrC,SAAS,wCAAwC;AACjD,SAAS,mCAAmC;AAC5C,SAAS,OAAO,YAAY;AAC5B,SAAS,YAAY,QAAQ;AAC3B,QAAM,aAAa,cAAc,aAAa;AAC9C,QAAM,KAAK,4BAA4B,UAAU;AACjD,SAAO,UAAU;AACnB;AACA,SAAS,cAAc;AAAA,EACrB;AACF,GAAG;AACD,SAAO,QAAQ,IAAI,CAAC;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GAAG,UAAU;AACX,UAAM,MAAM,MAAM,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK;AAC5C,WAAoB,qBAAK,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,MACA;AAAA,MACA;AAAA,MACA,cAAc,YAAY;AAAA,MAC1B;AAAA,MACA;AAAA,MACA,QAAQ,UAAU,CAAC,YAAyB,qBAAK,0BAA0B,CAAC,CAAC;AAAA,MAC7E;AAAA,MACA;AAAA,MACA,sBAAsB,YAAY,YAAY,SAAS;AAAA,MACvD;AAAA,MACA;AAAA,MACA,UAAuB,qBAAK,QAAQ;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,qBAAK,eAAe;AAAA,UACrD;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AA6BO,IAAM,gBAAgB,WAAW,wBAAwB;AAGhE,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@
2
2
  import { useRef, useLayoutEffect, useContext, forwardRef } from "@wordpress/element";
3
3
  import { useMergeRefs } from "@wordpress/compose";
4
4
  import { View } from "../../view/index.mjs";
5
- import SlotFillContext from "./slot-fill-context.mjs";
5
+ import SlotFillContext from "../context.mjs";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  function Slot(props, forwardedRef) {
8
8
  const {
@@ -15,17 +15,29 @@ function Slot(props, forwardedRef) {
15
15
  ...restProps
16
16
  } = props;
17
17
  const registry = useContext(SlotFillContext);
18
+ const instanceRef = useRef({});
18
19
  const ref = useRef(null);
19
20
  const fillPropsRef = useRef(fillProps);
20
21
  useLayoutEffect(() => {
21
22
  fillPropsRef.current = fillProps;
22
23
  }, [fillProps]);
23
24
  useLayoutEffect(() => {
24
- registry.registerSlot(name, ref, fillPropsRef.current);
25
- return () => registry.unregisterSlot(name, ref);
25
+ const instance = instanceRef.current;
26
+ registry.registerSlot(name, {
27
+ type: "portal",
28
+ instance,
29
+ ref,
30
+ fillProps: fillPropsRef.current
31
+ });
32
+ return () => registry.unregisterSlot(name, instance);
26
33
  }, [registry, name]);
27
34
  useLayoutEffect(() => {
28
- registry.updateSlot(name, ref, fillPropsRef.current);
35
+ registry.updateSlot(name, {
36
+ type: "portal",
37
+ instance: instanceRef.current,
38
+ ref,
39
+ fillProps: fillPropsRef.current
40
+ });
29
41
  });
30
42
  return /* @__PURE__ */ _jsx(View, {
31
43
  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": ";AAOA,SAAS,QAAQ,iBAAiB,YAAY,kBAAkB;AAChE,SAAS,oBAAoB;AAK7B,SAAS,YAAY;AACrB,OAAO,qBAAqB;AAC5B,SAAS,OAAO,YAAY;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,WAAW,WAAW,eAAe;AAC3C,QAAM,MAAM,OAAO,IAAI;AAMvB,QAAM,eAAe,OAAO,SAAS;AACrC,kBAAgB,MAAM;AACpB,iBAAa,UAAU;AAAA,EACzB,GAAG,CAAC,SAAS,CAAC;AACd,kBAAgB,MAAM;AACpB,aAAS,aAAa,MAAM,KAAK,aAAa,OAAO;AACrD,WAAO,MAAM,SAAS,eAAe,MAAM,GAAG;AAAA,EAChD,GAAG,CAAC,UAAU,IAAI,CAAC;AACnB,kBAAgB,MAAM;AACpB,aAAS,WAAW,MAAM,KAAK,aAAa,OAAO;AAAA,EACrD,CAAC;AACD,SAAoB,qBAAK,MAAM;AAAA,IAC7B;AAAA,IACA,KAAK,aAAa,CAAC,cAAc,GAAG,CAAC;AAAA,IACrC,GAAG;AAAA,EACL,CAAC;AACH;AACA,IAAO,eAAQ,WAAW,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": ";AAOA,SAAS,QAAQ,iBAAiB,YAAY,kBAAkB;AAChE,SAAS,oBAAoB;AAK7B,SAAS,YAAY;AACrB,OAAO,qBAAqB;AAC5B,SAAS,OAAO,YAAY;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,WAAW,WAAW,eAAe;AAC3C,QAAM,cAAc,OAAO,CAAC,CAAC;AAC7B,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,eAAe,OAAO,SAAS;AACrC,kBAAgB,MAAM;AACpB,iBAAa,UAAU;AAAA,EACzB,GAAG,CAAC,SAAS,CAAC;AACd,kBAAgB,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,kBAAgB,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,qBAAK,MAAM;AAAA,IAC7B;AAAA,IACA,KAAK,aAAa,CAAC,cAAc,GAAG,CAAC;AAAA,IACrC,GAAG;AAAA,EACL,CAAC;AACH;AACA,IAAO,eAAQ,WAAW,IAAI;",
6
6
  "names": []
7
7
  }