@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/calendar/date-range-calendar/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { differenceInCalendarDays } from 'date-fns';\nimport { DayPicker, rangeContainsModifiers } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState, useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS, MODIFIER_CLASSNAMES } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../../utils/hooks';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function usePreviewRange({\n selected,\n hoveredDate,\n excludeDisabled,\n min,\n max,\n disabled\n}) {\n return useMemo(() => {\n if (!hoveredDate || !selected?.from) {\n return;\n }\n let previewHighlight;\n let potentialNewRange;\n\n // Hovering on a date before the start of the selected range\n if (hoveredDate < selected.from) {\n var _selected$to;\n previewHighlight = {\n from: hoveredDate,\n to: selected.from\n };\n potentialNewRange = {\n from: hoveredDate,\n to: (_selected$to = selected.to) !== null && _selected$to !== void 0 ? _selected$to : selected.from\n };\n } else if (selected.to && hoveredDate > selected.from && hoveredDate < selected.to) {\n // Hovering on a date between the start and end of the selected range\n previewHighlight = {\n from: selected.from,\n to: hoveredDate\n };\n potentialNewRange = {\n from: selected.from,\n to: hoveredDate\n };\n } else if (hoveredDate > selected.from) {\n var _selected$to2;\n // Hovering on a date after the end of the selected range (either\n // because it's greater than selected.to, or because it's not defined)\n previewHighlight = {\n from: (_selected$to2 = selected.to) !== null && _selected$to2 !== void 0 ? _selected$to2 : selected.from,\n to: hoveredDate\n };\n potentialNewRange = {\n from: selected.from,\n to: hoveredDate\n };\n }\n if (min !== undefined && min > 0 && potentialNewRange && differenceInCalendarDays(potentialNewRange.to, potentialNewRange.from) < min) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n if (max !== undefined && max > 0 && potentialNewRange && differenceInCalendarDays(potentialNewRange.to, potentialNewRange.from) > max) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n if (excludeDisabled && disabled && potentialNewRange && rangeContainsModifiers(potentialNewRange, disabled)) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n return previewHighlight;\n }, [selected, hoveredDate, excludeDisabled, min, max, disabled]);\n}\n\n/**\n * `DateRangeCalendar` is a React component that provides a customizable calendar\n * interface for **date range** selection.\n *\n * The component is built with accessibility in mind and follows ARIA best\n * practices for calendar widgets. It provides keyboard navigation, screen reader\n * support, and customizable labels for internationalization.\n */\nexport const DateRangeCalendar = ({\n defaultSelected,\n selected: selectedProp,\n onSelect,\n numberOfMonths = 1,\n excludeDisabled,\n min,\n max,\n disabled,\n locale = enUS,\n timeZone,\n ...props\n}) => {\n const localizationProps = useLocalizationProps({\n locale,\n timeZone,\n mode: 'range'\n });\n const onChange = useCallback((selected, triggerDate, modifiers, e) => {\n // Convert internal `null` to `undefined` for the public event handler.\n onSelect?.(selected !== null && selected !== void 0 ? selected : undefined, triggerDate, modifiers, e);\n }, [onSelect]);\n const [selected, setSelected] = useControlledValue({\n defaultValue: defaultSelected,\n value: selectedProp,\n onChange\n });\n const [hoveredDate, setHoveredDate] = useState(undefined);\n\n // Compute the preview range for hover effect\n const previewRange = usePreviewRange({\n selected,\n hoveredDate,\n excludeDisabled,\n min,\n max,\n disabled\n });\n const modifiers = useMemo(() => {\n return {\n preview: previewRange,\n preview_start: previewRange?.from,\n preview_end: previewRange?.to\n };\n }, [previewRange]);\n return /*#__PURE__*/_jsx(DayPicker, {\n ...COMMON_PROPS,\n ...localizationProps,\n ...props,\n mode: \"range\",\n numberOfMonths: clampNumberOfMonths(numberOfMonths),\n disabled: disabled,\n excludeDisabled: excludeDisabled,\n min: min,\n max: max,\n selected: selected !== null && selected !== void 0 ? selected : undefined,\n onSelect: setSelected,\n onDayMouseEnter: date => setHoveredDate(date),\n onDayMouseLeave: () => setHoveredDate(undefined),\n modifiers: modifiers,\n modifiersClassNames: M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AAA,IAC7B;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AACjB,SAAoB,uCAAAC,KAAK,mCAAW;AAAA,IAClC,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,MAAM;AAAA,IACN,oBAAgB,iCAAoB,cAAc;AAAA,IAClD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,aAAa,QAAQ,aAAa,SAAS,WAAW;AAAA,IAChE,UAAU;AAAA,IACV,iBAAiB,UAAQ,eAAe,IAAI;AAAA,IAC5C,iBAAiB,MAAM,eAAe,MAAS;AAAA,IAC/C;AAAA,IACA,qBAAqB;AAAA,EACvB,CAAC;AACH;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { differenceInCalendarDays } from 'date-fns';\nimport { DayPicker, rangeContainsModifiers } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState, useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS, MODIFIER_CLASSNAMES } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../../utils/hooks';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function usePreviewRange({\n selected,\n hoveredDate,\n excludeDisabled,\n min,\n max,\n disabled\n}) {\n return useMemo(() => {\n if (!hoveredDate || !selected?.from) {\n return;\n }\n let previewHighlight;\n let potentialNewRange;\n\n // Hovering on a date before the start of the selected range\n if (hoveredDate < selected.from) {\n previewHighlight = {\n from: hoveredDate,\n to: selected.from\n };\n potentialNewRange = {\n from: hoveredDate,\n to: selected.to ?? selected.from\n };\n } else if (selected.to && hoveredDate > selected.from && hoveredDate < selected.to) {\n // Hovering on a date between the start and end of the selected range\n previewHighlight = {\n from: selected.from,\n to: hoveredDate\n };\n potentialNewRange = {\n from: selected.from,\n to: hoveredDate\n };\n } else if (hoveredDate > selected.from) {\n // Hovering on a date after the end of the selected range (either\n // because it's greater than selected.to, or because it's not defined)\n previewHighlight = {\n from: selected.to ?? selected.from,\n to: hoveredDate\n };\n potentialNewRange = {\n from: selected.from,\n to: hoveredDate\n };\n }\n if (min !== undefined && min > 0 && potentialNewRange && differenceInCalendarDays(potentialNewRange.to, potentialNewRange.from) < min) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n if (max !== undefined && max > 0 && potentialNewRange && differenceInCalendarDays(potentialNewRange.to, potentialNewRange.from) > max) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n if (excludeDisabled && disabled && potentialNewRange && rangeContainsModifiers(potentialNewRange, disabled)) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n return previewHighlight;\n }, [selected, hoveredDate, excludeDisabled, min, max, disabled]);\n}\n\n/**\n * `DateRangeCalendar` is a React component that provides a customizable calendar\n * interface for **date range** selection.\n *\n * The component is built with accessibility in mind and follows ARIA best\n * practices for calendar widgets. It provides keyboard navigation, screen reader\n * support, and customizable labels for internationalization.\n */\nexport const DateRangeCalendar = ({\n defaultSelected,\n selected: selectedProp,\n onSelect,\n numberOfMonths = 1,\n excludeDisabled,\n min,\n max,\n disabled,\n locale = enUS,\n timeZone,\n ...props\n}) => {\n const localizationProps = useLocalizationProps({\n locale,\n timeZone,\n mode: 'range'\n });\n const onChange = useCallback((selected, triggerDate, modifiers, e) => {\n // Convert internal `null` to `undefined` for the public event handler.\n onSelect?.(selected ?? undefined, triggerDate, modifiers, e);\n }, [onSelect]);\n const [selected, setSelected] = useControlledValue({\n defaultValue: defaultSelected,\n value: selectedProp,\n onChange\n });\n const [hoveredDate, setHoveredDate] = useState(undefined);\n\n // Compute the preview range for hover effect\n const previewRange = usePreviewRange({\n selected,\n hoveredDate,\n excludeDisabled,\n min,\n max,\n disabled\n });\n const modifiers = useMemo(() => {\n return {\n preview: previewRange,\n preview_start: previewRange?.from,\n preview_end: previewRange?.to\n };\n }, [previewRange]);\n return /*#__PURE__*/_jsx(DayPicker, {\n ...COMMON_PROPS,\n ...localizationProps,\n ...props,\n mode: \"range\",\n numberOfMonths: clampNumberOfMonths(numberOfMonths),\n disabled: disabled,\n excludeDisabled: excludeDisabled,\n min: min,\n max: max,\n selected: selected ?? undefined,\n onSelect: setSelected,\n onDayMouseEnter: date => setHoveredDate(date),\n onDayMouseLeave: () => setHoveredDate(undefined),\n modifiers: modifiers,\n modifiersClassNames: MODIFIER_CLASSNAMES\n });\n};"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,sBAAyC;AACzC,8BAAkD;AAClD,oBAAqB;AAIrB,qBAA+C;AAI/C,uBAAkD;AAClD,kBAAoC;AACpC,mBAAmC;AACnC,oCAAqC;AACrC,yBAA4B;AACrB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,aAAO,wBAAQ,MAAM;AACnB,QAAI,CAAC,eAAe,CAAC,UAAU,MAAM;AACnC;AAAA,IACF;AACA,QAAI;AACJ,QAAI;AAGJ,QAAI,cAAc,SAAS,MAAM;AAC/B,yBAAmB;AAAA,QACjB,MAAM;AAAA,QACN,IAAI,SAAS;AAAA,MACf;AACA,0BAAoB;AAAA,QAClB,MAAM;AAAA,QACN,IAAI,SAAS,MAAM,SAAS;AAAA,MAC9B;AAAA,IACF,WAAW,SAAS,MAAM,cAAc,SAAS,QAAQ,cAAc,SAAS,IAAI;AAElF,yBAAmB;AAAA,QACjB,MAAM,SAAS;AAAA,QACf,IAAI;AAAA,MACN;AACA,0BAAoB;AAAA,QAClB,MAAM,SAAS;AAAA,QACf,IAAI;AAAA,MACN;AAAA,IACF,WAAW,cAAc,SAAS,MAAM;AAGtC,yBAAmB;AAAA,QACjB,MAAM,SAAS,MAAM,SAAS;AAAA,QAC9B,IAAI;AAAA,MAC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C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,gBAAY,wBAAQ,MAAM;AAC9B,WAAO;AAAA,MACL,SAAS;AAAA,MACT,eAAe,cAAc;AAAA,MAC7B,aAAa,cAAc;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AACjB,SAAoB,uCAAAC,KAAK,mCAAW;AAAA,IAClC,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,MAAM;AAAA,IACN,oBAAgB,iCAAoB,cAAc;AAAA,IAClD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,YAAY;AAAA,IACtB,UAAU;AAAA,IACV,iBAAiB,UAAQ,eAAe,IAAI;AAAA,IAC5C,iBAAiB,MAAM,eAAe,MAAS;AAAA,IAC/C;AAAA,IACA,qBAAqB;AAAA,EACvB,CAAC;AACH;",
6
6
  "names": ["selected", "modifiers", "_jsx"]
7
7
  }
@@ -49,12 +49,11 @@ function useDeprecatedProps({
49
49
  };
50
50
  let computedElevation = elevation;
51
51
  if (isElevated) {
52
- var _computedElevation;
53
52
  (0, import_deprecated.default)("Card isElevated prop", {
54
53
  since: "5.9",
55
54
  alternative: "elevation"
56
55
  });
57
- (_computedElevation = computedElevation) !== null && _computedElevation !== void 0 ? _computedElevation : computedElevation = 2;
56
+ computedElevation ??= 2;
58
57
  }
59
58
  if (typeof computedElevation !== "undefined") {
60
59
  propsToReturn.elevation = computedElevation;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/card/card/hook.ts"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useContextSystem } from '../../context';\nimport { useSurface } from '../../surface';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nfunction useDeprecatedProps({\n elevation,\n isElevated,\n ...otherProps\n}) {\n const propsToReturn = {\n ...otherProps\n };\n let computedElevation = elevation;\n if (isElevated) {\n var _computedElevation;\n deprecated('Card isElevated prop', {\n since: '5.9',\n alternative: 'elevation'\n });\n (_computedElevation = computedElevation) !== null && _computedElevation !== void 0 ? _computedElevation : computedElevation = 2;\n }\n\n // The `elevation` prop should only be passed when it's not `undefined`,\n // otherwise it will override the value that gets derived from `useContextSystem`.\n if (typeof computedElevation !== 'undefined') {\n propsToReturn.elevation = computedElevation;\n }\n return propsToReturn;\n}\nexport function useCard(props) {\n const {\n className,\n elevation = 0,\n isBorderless = false,\n isRounded = true,\n size = 'medium',\n ...otherProps\n } = useContextSystem(useDeprecatedProps(props), 'Card');\n const cx = useCx();\n const classes = useMemo(() => {\n return cx(styles.Card, isBorderless && styles.boxShadowless, isRounded && styles.rounded, className);\n }, [className, cx, isBorderless, isRounded]);\n const surfaceProps = useSurface({\n ...otherProps,\n className: classes\n });\n return {\n ...surfaceProps,\n elevation,\n isBorderless,\n isRounded,\n size\n };\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,qBAAwB;AAMxB,qBAAiC;AACjC,qBAA2B;AAC3B,aAAwB;AACxB,oBAAsB;AACtB,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,gBAAgB;AAAA,IACpB,GAAG;AAAA,EACL;AACA,MAAI,oBAAoB;AACxB,MAAI,YAAY;AACd,QAAI;AACJ,0BAAAA,SAAW,wBAAwB;AAAA,MACjC,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AACD,KAAC,qBAAqB,uBAAuB,QAAQ,uBAAuB,SAAS,qBAAqB,oBAAoB;AAAA,EAChI;AAIA,MAAI,OAAO,sBAAsB,aAAa;AAC5C,kBAAc,YAAY;AAAA,EAC5B;AACA,SAAO;AACT;AACO,SAAS,QAAQ,OAAO;AAC7B,QAAM;AAAA,IACJ;AAAA,IACA,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,GAAG;AAAA,EACL,QAAI,iCAAiB,mBAAmB,KAAK,GAAG,MAAM;AACtD,QAAM,SAAK,qBAAM;AACjB,QAAM,cAAU,wBAAQ,MAAM;AAC5B,WAAO,GAAU,aAAM,gBAAuB,sBAAe,aAAoB,gBAAS,SAAS;AAAA,EACrG,GAAG,CAAC,WAAW,IAAI,cAAc,SAAS,CAAC;AAC3C,QAAM,mBAAe,2BAAW;AAAA,IAC9B,GAAG;AAAA,IACH,WAAW;AAAA,EACb,CAAC;AACD,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useContextSystem } from '../../context';\nimport { useSurface } from '../../surface';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nfunction useDeprecatedProps({\n elevation,\n isElevated,\n ...otherProps\n}) {\n const propsToReturn = {\n ...otherProps\n };\n let computedElevation = elevation;\n if (isElevated) {\n deprecated('Card isElevated prop', {\n since: '5.9',\n alternative: 'elevation'\n });\n computedElevation ??= 2;\n }\n\n // The `elevation` prop should only be passed when it's not `undefined`,\n // otherwise it will override the value that gets derived from `useContextSystem`.\n if (typeof computedElevation !== 'undefined') {\n propsToReturn.elevation = computedElevation;\n }\n return propsToReturn;\n}\nexport function useCard(props) {\n const {\n className,\n elevation = 0,\n isBorderless = false,\n isRounded = true,\n size = 'medium',\n ...otherProps\n } = useContextSystem(useDeprecatedProps(props), 'Card');\n const cx = useCx();\n const classes = useMemo(() => {\n return cx(styles.Card, isBorderless && styles.boxShadowless, isRounded && styles.rounded, className);\n }, [className, cx, isBorderless, isRounded]);\n const surfaceProps = useSurface({\n ...otherProps,\n className: classes\n });\n return {\n ...surfaceProps,\n elevation,\n isBorderless,\n isRounded,\n size\n };\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,wBAAuB;AACvB,qBAAwB;AAMxB,qBAAiC;AACjC,qBAA2B;AAC3B,aAAwB;AACxB,oBAAsB;AACtB,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,gBAAgB;AAAA,IACpB,GAAG;AAAA,EACL;AACA,MAAI,oBAAoB;AACxB,MAAI,YAAY;AACd,0BAAAA,SAAW,wBAAwB;AAAA,MACjC,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AACD,0BAAsB;AAAA,EACxB;AAIA,MAAI,OAAO,sBAAsB,aAAa;AAC5C,kBAAc,YAAY;AAAA,EAC5B;AACA,SAAO;AACT;AACO,SAAS,QAAQ,OAAO;AAC7B,QAAM;AAAA,IACJ;AAAA,IACA,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,GAAG;AAAA,EACL,QAAI,iCAAiB,mBAAmB,KAAK,GAAG,MAAM;AACtD,QAAM,SAAK,qBAAM;AACjB,QAAM,cAAU,wBAAQ,MAAM;AAC5B,WAAO,GAAU,aAAM,gBAAuB,sBAAe,aAAoB,gBAAS,SAAS;AAAA,EACrG,GAAG,CAAC,WAAW,IAAI,cAAc,SAAS,CAAC;AAC3C,QAAM,mBAAe,2BAAW;AAAA,IAC9B,GAAG;AAAA,IACH,WAAW;AAAA,EACb,CAAC;AACD,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
6
6
  "names": ["deprecated"]
7
7
  }
@@ -48,6 +48,7 @@ function UnforwardedOptionAsButton(props, forwardedRef) {
48
48
  ...additionalProps
49
49
  } = props;
50
50
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
51
+ __next40pxDefaultSize: true,
51
52
  ...additionalProps,
52
53
  "aria-pressed": isPressed,
53
54
  ref: forwardedRef,
@@ -73,6 +74,7 @@ function UnforwardedOptionAsOption(props, forwardedRef) {
73
74
  }, [isSelected, setActiveId, activeId, id]);
74
75
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_composite.Composite.Item, {
75
76
  render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
77
+ __next40pxDefaultSize: true,
76
78
  ...additionalProps,
77
79
  role: "option",
78
80
  "aria-selected": !!isSelected,
@@ -98,7 +100,6 @@ function Option({
98
100
  const commonProps = {
99
101
  id,
100
102
  className: "components-circular-option-picker__option",
101
- __next40pxDefaultSize: true,
102
103
  ...additionalProps
103
104
  };
104
105
  const isListbox = setActiveId !== void 0;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/circular-option-picker/circular-option-picker-option.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedOptionAsButton(props, forwardedRef) {\n const {\n isPressed,\n label,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(Button, {\n ...additionalProps,\n \"aria-pressed\": isPressed,\n ref: forwardedRef,\n label: label\n });\n}\nconst OptionAsButton = forwardRef(UnforwardedOptionAsButton);\nfunction UnforwardedOptionAsOption(props, forwardedRef) {\n const {\n id,\n isSelected,\n label,\n ...additionalProps\n } = props;\n const {\n setActiveId,\n activeId\n } = useContext(CircularOptionPickerContext);\n useEffect(() => {\n if (isSelected && !activeId) {\n // The setTimeout call is necessary to make sure that this update\n // doesn't get overridden by `Composite`'s internal logic, which picks\n // an initial active item if one is not specifically set.\n window.setTimeout(() => setActiveId?.(id), 0);\n }\n }, [isSelected, setActiveId, activeId, id]);\n return /*#__PURE__*/_jsx(Composite.Item, {\n render: /*#__PURE__*/_jsx(Button, {\n ...additionalProps,\n role: \"option\",\n \"aria-selected\": !!isSelected,\n ref: forwardedRef,\n label: label\n }),\n id: id\n });\n}\nconst OptionAsOption = forwardRef(UnforwardedOptionAsOption);\nexport function Option({\n className,\n isSelected,\n selectedIconProps = {},\n tooltipText,\n ...additionalProps\n}) {\n const {\n baseId,\n setActiveId\n } = useContext(CircularOptionPickerContext);\n const id = useInstanceId(Option, baseId || 'components-circular-option-picker__option');\n const commonProps = {\n id,\n className: 'components-circular-option-picker__option',\n __next40pxDefaultSize: true,\n ...additionalProps\n };\n const isListbox = setActiveId !== undefined;\n const optionControl = isListbox ? /*#__PURE__*/_jsx(OptionAsOption, {\n ...commonProps,\n label: tooltipText,\n isSelected: isSelected\n }) : /*#__PURE__*/_jsx(OptionAsButton, {\n ...commonProps,\n label: tooltipText,\n isPressed: isSelected\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(className, 'components-circular-option-picker__option-wrapper'),\n children: [optionControl, isSelected && /*#__PURE__*/_jsx(Icon, {\n icon: check,\n ...selectedIconProps\n })]\n });\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA8B;AAC9B,qBAAkD;AAClD,mBAA4B;AAK5B,4CAA4C;AAC5C,oBAAmB;AACnB,uBAA0B;AAC1B,yBAA2C;AAC3C,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;A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,OAAO;AAAA,IACP;AAAA,EACF,CAAC,IAAiB,uCAAAA,KAAK,gBAAgB;AAAA,IACrC,GAAG;AAAA,IACH,OAAO;AAAA,IACP,WAAW;AAAA,EACb,CAAC;AACD,SAAoB,uCAAAE,MAAM,OAAO;AAAA,IAC/B,eAAW,YAAAC,SAAK,WAAW,mDAAmD;AAAA,IAC9E,UAAU,CAAC,eAAe,cAA2B,uCAAAH,KAAK,mBAAM;AAAA,MAC9D,MAAM;AAAA,MACN,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedOptionAsButton(props, forwardedRef) {\n const {\n isPressed,\n label,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ...additionalProps,\n \"aria-pressed\": isPressed,\n ref: forwardedRef,\n label: label\n });\n}\nconst OptionAsButton = forwardRef(UnforwardedOptionAsButton);\nfunction UnforwardedOptionAsOption(props, forwardedRef) {\n const {\n id,\n isSelected,\n label,\n ...additionalProps\n } = props;\n const {\n setActiveId,\n activeId\n } = useContext(CircularOptionPickerContext);\n useEffect(() => {\n if (isSelected && !activeId) {\n // The setTimeout call is necessary to make sure that this update\n // doesn't get overridden by `Composite`'s internal logic, which picks\n // an initial active item if one is not specifically set.\n window.setTimeout(() => setActiveId?.(id), 0);\n }\n }, [isSelected, setActiveId, activeId, id]);\n return /*#__PURE__*/_jsx(Composite.Item, {\n render: /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ...additionalProps,\n role: \"option\",\n \"aria-selected\": !!isSelected,\n ref: forwardedRef,\n label: label\n }),\n id: id\n });\n}\nconst OptionAsOption = forwardRef(UnforwardedOptionAsOption);\nexport function Option({\n className,\n isSelected,\n selectedIconProps = {},\n tooltipText,\n ...additionalProps\n}) {\n const {\n baseId,\n setActiveId\n } = useContext(CircularOptionPickerContext);\n const id = useInstanceId(Option, baseId || 'components-circular-option-picker__option');\n const commonProps = {\n id,\n className: 'components-circular-option-picker__option',\n ...additionalProps\n };\n const isListbox = setActiveId !== undefined;\n const optionControl = isListbox ? /*#__PURE__*/_jsx(OptionAsOption, {\n ...commonProps,\n label: tooltipText,\n isSelected: isSelected\n }) : /*#__PURE__*/_jsx(OptionAsButton, {\n ...commonProps,\n label: tooltipText,\n isPressed: isSelected\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(className, 'components-circular-option-picker__option-wrapper'),\n children: [optionControl, isSelected && /*#__PURE__*/_jsx(Icon, {\n icon: check,\n ...selectedIconProps\n })]\n });\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA8B;AAC9B,qBAAkD;AAClD,mBAA4B;AAK5B,4CAA4C;AAC5C,oBAAmB;AACnB,uBAA0B;AAC1B,yBAA2C;AAC3C,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,IAC/B,uBAAuB;AAAA,IACvB,GAAG;AAAA,IACH,gBAAgB;AAAA,IAChB,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AACA,IAAM,qBAAiB,2BAAW,yBAAyB;AAC3D,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,G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M;AAAA,MACN,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
6
6
  "names": ["_jsx", "Button", "_jsxs", "clsx"]
7
7
  }
@@ -129,5 +129,6 @@ CircularOptionPicker.Option = import_circular_option_picker_option.Option;
129
129
  CircularOptionPicker.OptionGroup = import_circular_option_picker_option_group.OptionGroup;
130
130
  CircularOptionPicker.ButtonAction = import_circular_option_picker_actions.ButtonAction;
131
131
  CircularOptionPicker.DropdownLinkAction = import_circular_option_picker_actions.DropdownLinkAction;
132
+ CircularOptionPicker.displayName = "CircularOptionPicker";
132
133
  var circular_option_picker_default = CircularOptionPicker;
133
134
  //# sourceMappingURL=circular-option-picker.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/circular-option-picker/circular-option-picker.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport { Composite } from '../composite';\nimport { Option } from './circular-option-picker-option';\nimport { OptionGroup } from './circular-option-picker-option-group';\nimport { ButtonAction, DropdownLinkAction } from './circular-option-picker-actions';\n\n/**\n *`CircularOptionPicker` is a component that displays a set of options as circular buttons.\n *\n * ```jsx\n * import { CircularOptionPicker } from '../circular-option-picker';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ currentColor, setCurrentColor ] = useState();\n * \tconst colors = [\n * \t\t{ color: '#f00', name: 'Red' },\n * \t\t{ color: '#0f0', name: 'Green' },\n * \t\t{ color: '#00f', name: 'Blue' },\n * \t];\n * \tconst colorOptions = (\n * \t\t<>\n * \t\t\t{ colors.map( ( { color, name }, index ) => {\n * \t\t\t\treturn (\n * \t\t\t\t\t<CircularOptionPicker.Option\n * \t\t\t\t\t\tkey={ `${ color }-${ index }` }\n * \t\t\t\t\t\ttooltipText={ name }\n * \t\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n * \t\t\t\t\t\tisSelected={ index === currentColor }\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( index ) }\n * \t\t\t\t\t/>\n * \t\t\t\t);\n * \t\t\t} ) }\n * \t\t</>\n * \t);\n * \treturn (\n * \t\t<CircularOptionPicker\n * \t\t\t\toptions={ colorOptions }\n * \t\t\t\tactions={\n * \t\t\t\t\t<CircularOptionPicker.ButtonAction\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( undefined ) }\n * \t\t\t\t\t>\n * \t\t\t\t\t\t{ 'Clear' }\n * \t\t\t\t\t</CircularOptionPicker.ButtonAction>\n * \t\t\t\t}\n * \t\t\t/>\n * \t);\n * };\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ListboxCircularOptionPicker(props) {\n const {\n actions,\n options,\n baseId,\n className,\n loop = true,\n children,\n ...additionalProps\n } = props;\n const [activeId, setActiveId] = useState(undefined);\n const contextValue = useMemo(() => ({\n baseId,\n activeId,\n setActiveId\n }), [baseId, activeId, setActiveId]);\n return /*#__PURE__*/_jsx(\"div\", {\n className: className,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [/*#__PURE__*/_jsx(Composite, {\n ...additionalProps,\n id: baseId,\n focusLoop: loop,\n rtl: isRTL(),\n role: \"listbox\",\n activeId: activeId,\n setActiveId: setActiveId,\n children: options\n }), children, actions]\n })\n });\n}\nfunction ButtonsCircularOptionPicker(props) {\n const {\n actions,\n options,\n children,\n baseId,\n ...additionalProps\n } = props;\n const contextValue = useMemo(() => ({\n baseId\n }), [baseId]);\n return /*#__PURE__*/_jsx(\"div\", {\n ...additionalProps,\n role: \"group\",\n id: baseId,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [options, children, actions]\n })\n });\n}\nfunction CircularOptionPicker(props) {\n const {\n asButtons,\n actions: actionsProp,\n options: optionsProp,\n children,\n className,\n ...additionalProps\n } = props;\n const baseId = useInstanceId(CircularOptionPicker, 'components-circular-option-picker', additionalProps.id);\n const OptionPickerImplementation = asButtons ? ButtonsCircularOptionPicker : ListboxCircularOptionPicker;\n const actions = actionsProp ? /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__custom-clear-wrapper\",\n children: actionsProp\n }) : undefined;\n const options = /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__swatches\",\n children: optionsProp\n });\n return /*#__PURE__*/_jsx(OptionPickerImplementation, {\n ...additionalProps,\n baseId: baseId,\n className: clsx('components-circular-option-picker', className),\n actions: actions,\n options: options,\n children: children\n });\n}\nCircularOptionPicker.Option = Option;\nCircularOptionPicker.OptionGroup = OptionGroup;\nCircularOptionPicker.ButtonAction = ButtonAction;\nCircularOptionPicker.DropdownLinkAction = DropdownLinkAction;\nexport default CircularOptionPicker;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,kBAAsB;AACtB,qBAAkC;AAKlC,4CAA4C;AAC5C,uBAA0B;AAC1B,2CAAuB;AACvB,iDAA4B;AAC5B,4CAAiD;AA8CjD,yBAA2C;AAC3C,SAAS,4BAA4B,OAAO;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,QAAI,yBAAS,MAAS;AAClD,QAAM,mBAAe,wBAAQ,OAAO;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,CAAC,QAAQ,UAAU,WAAW,CAAC;AACnC,SAAoB,uCAAAA,KAAK,OAAO;AAAA,IAC9B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AAA,IACH;AAAA,IACA,eAAW,YAAAE,SAAK,qCAAqC,SAAS;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AACA,qBAAqB,SAAS;AAC9B,qBAAqB,cAAc;AACnC,qBAAqB,eAAe;AACpC,qBAAqB,qBAAqB;AAC1C,IAAO,iCAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport { Composite } from '../composite';\nimport { Option } from './circular-option-picker-option';\nimport { OptionGroup } from './circular-option-picker-option-group';\nimport { ButtonAction, DropdownLinkAction } from './circular-option-picker-actions';\n\n/**\n *`CircularOptionPicker` is a component that displays a set of options as circular buttons.\n *\n * ```jsx\n * import { CircularOptionPicker } from '../circular-option-picker';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ currentColor, setCurrentColor ] = useState();\n * \tconst colors = [\n * \t\t{ color: '#f00', name: 'Red' },\n * \t\t{ color: '#0f0', name: 'Green' },\n * \t\t{ color: '#00f', name: 'Blue' },\n * \t];\n * \tconst colorOptions = (\n * \t\t<>\n * \t\t\t{ colors.map( ( { color, name }, index ) => {\n * \t\t\t\treturn (\n * \t\t\t\t\t<CircularOptionPicker.Option\n * \t\t\t\t\t\tkey={ `${ color }-${ index }` }\n * \t\t\t\t\t\ttooltipText={ name }\n * \t\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n * \t\t\t\t\t\tisSelected={ index === currentColor }\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( index ) }\n * \t\t\t\t\t/>\n * \t\t\t\t);\n * \t\t\t} ) }\n * \t\t</>\n * \t);\n * \treturn (\n * \t\t<CircularOptionPicker\n * \t\t\t\toptions={ colorOptions }\n * \t\t\t\tactions={\n * \t\t\t\t\t<CircularOptionPicker.ButtonAction\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( undefined ) }\n * \t\t\t\t\t>\n * \t\t\t\t\t\t{ 'Clear' }\n * \t\t\t\t\t</CircularOptionPicker.ButtonAction>\n * \t\t\t\t}\n * \t\t\t/>\n * \t);\n * };\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ListboxCircularOptionPicker(props) {\n const {\n actions,\n options,\n baseId,\n className,\n loop = true,\n children,\n ...additionalProps\n } = props;\n const [activeId, setActiveId] = useState(undefined);\n const contextValue = useMemo(() => ({\n baseId,\n activeId,\n setActiveId\n }), [baseId, activeId, setActiveId]);\n return /*#__PURE__*/_jsx(\"div\", {\n className: className,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [/*#__PURE__*/_jsx(Composite, {\n ...additionalProps,\n id: baseId,\n focusLoop: loop,\n rtl: isRTL(),\n role: \"listbox\",\n activeId: activeId,\n setActiveId: setActiveId,\n children: options\n }), children, actions]\n })\n });\n}\nfunction ButtonsCircularOptionPicker(props) {\n const {\n actions,\n options,\n children,\n baseId,\n ...additionalProps\n } = props;\n const contextValue = useMemo(() => ({\n baseId\n }), [baseId]);\n return /*#__PURE__*/_jsx(\"div\", {\n ...additionalProps,\n role: \"group\",\n id: baseId,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [options, children, actions]\n })\n });\n}\nfunction CircularOptionPicker(props) {\n const {\n asButtons,\n actions: actionsProp,\n options: optionsProp,\n children,\n className,\n ...additionalProps\n } = props;\n const baseId = useInstanceId(CircularOptionPicker, 'components-circular-option-picker', additionalProps.id);\n const OptionPickerImplementation = asButtons ? ButtonsCircularOptionPicker : ListboxCircularOptionPicker;\n const actions = actionsProp ? /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__custom-clear-wrapper\",\n children: actionsProp\n }) : undefined;\n const options = /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__swatches\",\n children: optionsProp\n });\n return /*#__PURE__*/_jsx(OptionPickerImplementation, {\n ...additionalProps,\n baseId: baseId,\n className: clsx('components-circular-option-picker', className),\n actions: actions,\n options: options,\n children: children\n });\n}\nCircularOptionPicker.Option = Option;\nCircularOptionPicker.OptionGroup = OptionGroup;\nCircularOptionPicker.ButtonAction = ButtonAction;\nCircularOptionPicker.DropdownLinkAction = DropdownLinkAction;\nCircularOptionPicker.displayName = 'CircularOptionPicker';\nexport default CircularOptionPicker;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,kBAAsB;AACtB,qBAAkC;AAKlC,4CAA4C;AAC5C,uBAA0B;AAC1B,2CAAuB;AACvB,iDAA4B;AAC5B,4CAAiD;AA8CjD,yBAA2C;AAC3C,SAAS,4BAA4B,OAAO;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,QAAI,yBAAS,MAAS;AAClD,QAAM,mBAAe,wBAAQ,OAAO;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,CAAC,QAAQ,UAAU,WAAW,CAAC;AACnC,SAAoB,uCAAAA,KAAK,OAAO;AAAA,IAC9B;AAAA,IACA,UAAuB,uCAAAC,MAAM,kEAA4B,UAAU;AAAA,MACjE,OAAO;AAAA,MACP,UAAU,CAAc,uCAAAD,KAAK,4BAAW;AAAA,QACtC,GAAG;AAAA,QACH,IAAI;AAAA,QACJ,WAAW;AAAA,QACX,SAAK,mBAAM;AAAA,QACX,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,UAAU;AAAA,MACZ,CAAC,GAAG,UA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x"]
7
7
  }
@@ -73,12 +73,16 @@ function ClipboardButton({
73
73
  const focusOnCopyEventTarget = (event) => {
74
74
  event.target.focus();
75
75
  };
76
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
77
- ...buttonProps,
78
- className: classes,
79
- ref,
80
- onCopy: focusOnCopyEventTarget,
81
- children
82
- });
76
+ return (
77
+ // Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.
78
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
80
+ ...buttonProps,
81
+ className: classes,
82
+ ref,
83
+ onCopy: focusOnCopyEventTarget,
84
+ children
85
+ })
86
+ );
83
87
  }
84
88
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/clipboard-button/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst TIMEOUT = 4000;\nexport default function ClipboardButton({\n className,\n children,\n onCopy,\n onFinishCopy,\n text,\n ...buttonProps\n}) {\n deprecated('wp.components.ClipboardButton', {\n since: '5.8',\n alternative: 'wp.compose.useCopyToClipboard'\n });\n const timeoutIdRef = useRef();\n const ref = useCopyToClipboard(text, () => {\n onCopy();\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n if (onFinishCopy) {\n timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);\n }\n });\n useEffect(() => {\n return () => {\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n };\n }, []);\n const classes = clsx('components-clipboard-button', className);\n\n // Workaround for inconsistent behavior in Safari, where <textarea> is not\n // the document.activeElement at the moment when the copy event fires.\n // This causes documentHasSelection() in the copy-handler component to\n // mistakenly override the ClipboardButton, and copy a serialized string\n // of the current block instead.\n const focusOnCopyEventTarget = event => {\n // @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n event.target.focus();\n };\n return /*#__PURE__*/_jsx(Button, {\n ...buttonProps,\n className: classes,\n ref: ref,\n onCopy: focusOnCopyEventTarget,\n children: children\n });\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAAkC;AAClC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,yBAA4B;AAC5B,IAAM,UAAU;AACD,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,wBAAAA,SAAW,iCAAiC;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AACD,QAAM,mBAAe,uBAAO;AAC5B,QAAM,UAAM,mCAAmB,MAAM,MAAM;AACzC,WAAO;AACP,QAAI,aAAa,SAAS;AACxB,mBAAa,aAAa,OAAO;AAAA,IACnC;AACA,QAAI,cAAc;AAChB,mBAAa,UAAU,WAAW,MAAM,aAAa,GAAG,OAAO;AAAA,IACjE;AAAA,EACF,CAAC;AACD,gCAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,qBAAa,aAAa,OAAO;AAAA,MACnC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,cAAU,YAAAC,SAAK,+BAA+B,SAAS;AAO7D,QAAM,yBAAyB,WAAS;AAEtC,UAAM,OAAO,MAAM;AAAA,EACrB;AACA,SAAoB,uCAAAC,KAAK,cAAAC,SAAQ;AAAA,IAC/B,GAAG;AAAA,IACH,WAAW;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,EACF,CAAC;AACH;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst TIMEOUT = 4000;\nexport default function ClipboardButton({\n className,\n children,\n onCopy,\n onFinishCopy,\n text,\n ...buttonProps\n}) {\n deprecated('wp.components.ClipboardButton', {\n since: '5.8',\n alternative: 'wp.compose.useCopyToClipboard'\n });\n const timeoutIdRef = useRef();\n const ref = useCopyToClipboard(text, () => {\n onCopy();\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n if (onFinishCopy) {\n timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);\n }\n });\n useEffect(() => {\n return () => {\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n };\n }, []);\n const classes = clsx('components-clipboard-button', className);\n\n // Workaround for inconsistent behavior in Safari, where <textarea> is not\n // the document.activeElement at the moment when the copy event fires.\n // This causes documentHasSelection() in the copy-handler component to\n // mistakenly override the ClipboardButton, and copy a serialized string\n // of the current block instead.\n const focusOnCopyEventTarget = event => {\n // @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n event.target.focus();\n };\n return (\n /*#__PURE__*/\n // Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n ...buttonProps,\n className: classes,\n ref: ref,\n onCopy: focusOnCopyEventTarget,\n children: children\n })\n );\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAAkC;AAClC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,yBAA4B;AAC5B,IAAM,UAAU;AACD,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,wBAAAA,SAAW,iCAAiC;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AACD,QAAM,mBAAe,uBAAO;AAC5B,QAAM,UAAM,mCAAmB,MAAM,MAAM;AACzC,WAAO;AACP,QAAI,aAAa,SAAS;AACxB,mBAAa,aAAa,OAAO;AAAA,IACnC;AACA,QAAI,cAAc;AAChB,mBAAa,UAAU,WAAW,MAAM,aAAa,GAAG,OAAO;AAAA,IACjE;AAAA,EACF,CAAC;AACD,gCAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,qBAAa,aAAa,OAAO;AAAA,MACnC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,cAAU,YAAAC,SAAK,+BAA+B,SAAS;AAO7D,QAAM,yBAAyB,WAAS;AAEtC,UAAM,OAAO,MAAM;AAAA,EACrB;AACA;AAAA;AAAA;AAAA,IAIE,uCAAAC,KAAK,cAAAC,SAAQ;AAAA,MACX,GAAG;AAAA,MACH,WAAW;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAAA;AAEL;",
6
6
  "names": ["deprecated", "clsx", "_jsx", "Button"]
7
7
  }
@@ -53,6 +53,7 @@ function UnforwardedColorIndicator(props, forwardedRef) {
53
53
  });
54
54
  }
55
55
  var ColorIndicator = (0, import_element.forwardRef)(UnforwardedColorIndicator);
56
+ ColorIndicator.displayName = "ColorIndicator";
56
57
  var color_indicator_default = ColorIndicator;
57
58
  // Annotate the CommonJS export names for ESM import in node:
58
59
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/color-indicator/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedColorIndicator(props, forwardedRef) {\n const {\n className,\n colorValue,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(\"span\", {\n className: clsx('component-color-indicator', className),\n style: {\n background: colorValue\n },\n ref: forwardedRef,\n ...additionalProps\n });\n}\n\n/**\n * ColorIndicator is a React component that renders a specific color in a\n * circle. It's often used to summarize a collection of used colors in a child\n * component.\n *\n * ```jsx\n * import { ColorIndicator } from '@wordpress/components';\n *\n * const MyColorIndicator = () => <ColorIndicator colorValue=\"#0073aa\" />;\n * ```\n */\nexport const ColorIndicator = forwardRef(UnforwardedColorIndicator);\nexport default ColorIndicator;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAK3B,yBAA4B;AAC5B,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,QAAQ;AAAA,IAC/B,eAAW,YAAAC,SAAK,6BAA6B,SAAS;AAAA,IACtD,OAAO;AAAA,MACL,YAAY;AAAA,IACd;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACL,CAAC;AACH;AAaO,IAAM,qBAAiB,2BAAW,yBAAyB;AAClE,IAAO,0BAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedColorIndicator(props, forwardedRef) {\n const {\n className,\n colorValue,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(\"span\", {\n className: clsx('component-color-indicator', className),\n style: {\n background: colorValue\n },\n ref: forwardedRef,\n ...additionalProps\n });\n}\n\n/**\n * ColorIndicator is a React component that renders a specific color in a\n * circle. It's often used to summarize a collection of used colors in a child\n * component.\n *\n * ```jsx\n * import { ColorIndicator } from '@wordpress/components';\n *\n * const MyColorIndicator = () => <ColorIndicator colorValue=\"#0073aa\" />;\n * ```\n */\nexport const ColorIndicator = forwardRef(UnforwardedColorIndicator);\nColorIndicator.displayName = 'ColorIndicator';\nexport default ColorIndicator;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAK3B,yBAA4B;AAC5B,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,QAAQ;AAAA,IAC/B,eAAW,YAAAC,SAAK,6BAA6B,SAAS;AAAA,IACtD,OAAO;AAAA,MACL,YAAY;AAAA,IACd;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACL,CAAC;AACH;AAaO,IAAM,qBAAiB,2BAAW,yBAAyB;AAClE,eAAe,cAAc;AAC7B,IAAO,0BAAQ;",
6
6
  "names": ["_jsx", "clsx"]
7
7
  }
@@ -264,6 +264,7 @@ function UnforwardedColorPalette(props, forwardedRef) {
264
264
  });
265
265
  }
266
266
  var ColorPalette = (0, import_element.forwardRef)(UnforwardedColorPalette);
267
+ ColorPalette.displayName = "ColorPalette";
267
268
  var color_palette_default = ColorPalette;
268
269
  // Annotate the CommonJS export names for ESM import in node:
269
270
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/color-palette/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Dropdown from '../dropdown';\nimport { ColorPicker } from '../color-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport { Truncate } from '../truncate';\nimport { ColorHeading } from './styles';\nimport DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';\nimport { extractColorNameFromCurrentValue, isMultiplePaletteArray, normalizeColorValue } from './utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nextend([namesPlugin, a11yPlugin]);\nfunction SinglePalette({\n className,\n clearColor,\n colors,\n onChange,\n value,\n ...additionalProps\n}) {\n const colorOptions = useMemo(() => {\n return colors.map(({\n color,\n name\n }, index) => {\n const colordColor = colord(color);\n const isSelected = value === color;\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n isSelected: isSelected,\n selectedIconProps: isSelected ? {\n fill: colordColor.contrast() > colordColor.contrast('#000') ? '#fff' : '#000'\n } : {},\n tooltipText: name ||\n // translators: %s: color hex code e.g: \"#f00\".\n sprintf(__('Color code: %s'), color),\n style: {\n backgroundColor: color,\n color\n },\n onClick: isSelected ? clearColor : () => onChange(color, index)\n }, `${color}-${index}`);\n });\n }, [colors, value, onChange, clearColor]);\n return /*#__PURE__*/_jsx(CircularOptionPicker.OptionGroup, {\n className: className,\n options: colorOptions,\n ...additionalProps\n });\n}\nfunction MultiplePalettes({\n className,\n clearColor,\n colors,\n onChange,\n value,\n headingLevel\n}) {\n const instanceId = useInstanceId(MultiplePalettes, 'color-palette');\n if (colors.length === 0) {\n return null;\n }\n return /*#__PURE__*/_jsx(VStack, {\n spacing: 3,\n className: className,\n children: colors.map(({\n name,\n colors: colorPalette\n }, index) => {\n const id = `${instanceId}-${index}`;\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 2,\n children: [/*#__PURE__*/_jsx(ColorHeading, {\n id: id,\n level: headingLevel,\n children: name\n }), /*#__PURE__*/_jsx(SinglePalette, {\n clearColor: clearColor,\n colors: colorPalette,\n onChange: newColor => onChange(newColor, index),\n value: value,\n \"aria-labelledby\": id\n })]\n }, index);\n })\n });\n}\nexport function CustomColorPickerDropdown({\n isRenderedInSidebar,\n popoverProps: receivedPopoverProps,\n ...props\n}) {\n const popoverProps = useMemo(() => ({\n shift: true,\n // Disabling resize as it would otherwise cause the popover to show\n // scrollbars while dragging the color picker's handle close to the\n // popover edge.\n resize: false,\n ...(isRenderedInSidebar ? {\n // When in the sidebar: open to the left (stacking),\n // leaving the same gap as the parent popover.\n placement: 'left-start',\n offset: 34\n } : {\n // Default behavior: open below the anchor\n placement: 'bottom',\n offset: 8\n }),\n ...receivedPopoverProps\n }), [isRenderedInSidebar, receivedPopoverProps]);\n return /*#__PURE__*/_jsx(Dropdown, {\n contentClassName: \"components-color-palette__custom-color-dropdown-content\",\n popoverProps: popoverProps,\n ...props\n });\n}\nfunction UnforwardedColorPalette(props, forwardedRef) {\n const {\n asButtons,\n loop,\n clearable = true,\n colors = [],\n disableCustomColors = false,\n enableAlpha = false,\n onChange,\n value,\n __experimentalIsRenderedInSidebar = false,\n headingLevel = 2,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...additionalProps\n } = props;\n const [normalizedColorValue, setNormalizedColorValue] = useState(value);\n const clearColor = useCallback(() => onChange(undefined), [onChange]);\n const customColorPaletteCallbackRef = useCallback(node => {\n setNormalizedColorValue(normalizeColorValue(value, node));\n }, [value]);\n const hasMultipleColorOrigins = isMultiplePaletteArray(colors);\n const buttonLabelName = useMemo(() => extractColorNameFromCurrentValue(value, colors, hasMultipleColorOrigins), [value, colors, hasMultipleColorOrigins]);\n const renderCustomColorPicker = () => /*#__PURE__*/_jsx(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: /*#__PURE__*/_jsx(ColorPicker, {\n color: normalizedColorValue,\n onChange: color => onChange(color),\n enableAlpha: enableAlpha\n })\n });\n const isHex = value?.startsWith('#');\n\n // Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n const displayValue = value?.replace(/^var\\((.+)\\)$/, '$1');\n const customColorAccessibleLabel = !!displayValue ? sprintf(\n // translators: 1: The name of the color e.g: \"vivid red\". 2: The color's hex code e.g: \"#f00\".\n __('Custom color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'), buttonLabelName, displayValue) : __('Custom color picker');\n const paletteCommonProps = {\n clearColor,\n onChange,\n value\n };\n const actions = !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: clearColor,\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n ref: forwardedRef,\n ...additionalProps,\n children: [!disableCustomColors && /*#__PURE__*/_jsx(CustomColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n renderContent: renderCustomColorPicker,\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-wrapper\",\n spacing: 0,\n children: [/*#__PURE__*/_jsx(\"button\", {\n ref: customColorPaletteCallbackRef,\n className: \"components-color-palette__custom-color-button\",\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"true\",\n onClick: onToggle,\n \"aria-label\": customColorAccessibleLabel,\n style: {\n background: value\n },\n type: \"button\"\n }), /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-text-wrapper\",\n spacing: 0.5,\n children: [/*#__PURE__*/_jsx(Truncate, {\n className: \"components-color-palette__custom-color-name\",\n children: value ? buttonLabelName : __('No color selected')\n }), /*#__PURE__*/_jsx(Truncate, {\n className: clsx('components-color-palette__custom-color-value', {\n 'components-color-palette__custom-color-value--is-hex': isHex\n }),\n children: displayValue\n })]\n })]\n })\n }), (colors.length > 0 || actions) && /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...metaProps,\n ...labelProps,\n actions: actions,\n options: hasMultipleColorOrigins ? /*#__PURE__*/_jsx(MultiplePalettes, {\n ...paletteCommonProps,\n headingLevel: headingLevel,\n colors: colors,\n value: value\n }) : /*#__PURE__*/_jsx(SinglePalette, {\n ...paletteCommonProps,\n colors: colors,\n value: value\n })\n })]\n });\n}\n\n/**\n * Allows the user to pick a color from a list of pre-defined color entries.\n *\n * ```jsx\n * import { ColorPalette } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyColorPalette = () => {\n * const [ color, setColor ] = useState ( '#f00' )\n * const colors = [\n * { name: 'red', color: '#f00' },\n * { name: 'white', color: '#fff' },\n * { name: 'blue', color: '#00f' },\n * ];\n * return (\n * <ColorPalette\n * colors={ colors }\n * value={ color }\n * onChange={ ( color ) => setColor( color ) }\n * />\n * );\n * } );\n * ```\n */\nexport const ColorPalette = forwardRef(UnforwardedColorPalette);\nexport default ColorPalette;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAA+B;AAC/B,mBAAwB;AACxB,kBAAuB;AACvB,kBAAiB;AAKjB,qBAA8B;AAC9B,kBAA4B;AAC5B,qBAA2D;AAK3D,sBAAqB;AACrB,0BAA4B;AAC5B,oCAAgF;AAChF,qBAAuB;AACvB,sBAAyB;AACzB,oBAA6B;AAC7B,sCAAmC;AACnC,mBAA8F;AAC9F,yBAA2C;AAAA,IAC3C,sBAAO,CAAC,aAAAA,SAAa,YAAAC,OAAU,CAAC;AAChC,SAAS,cAAc;AAAA,EAC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cAAc,CAAC;AAAA,QACb;AAAA,QACA;AAAA,MACF,MAAmB,uCAAAE,MAAM,uBAAQ;AAAA,QAC/B,WAAW;AAAA,QACX,SAAS;AAAA,QACT,UAAU,CAAc,uCAAAF,KAAK,UAAU;AAAA,UACrC,KAAK;AAAA,UACL,WAAW;AAAA,UACX,iBAAiB;AAAA,UACjB,iBAAiB;AAAA,UACjB,SAAS;AAAA,UACT,cAAc;AAAA,UACd,OAAO;AAAA,YACL,YAAY;AAAA,UACd;AAAA,UACA,MAAM;AAAA,QACR,CAAC,GAAgB,uCAAAE,MAAM,uBAAQ;AAAA,UAC7B,WAAW;AAAA,UACX,SAAS;AAAA,UACT,UAAU,CAAc,uCAAAF,KAAK,0BAAU;AAAA,YACrC,WAAW;AAAA,YACX,UAAU,QAAQ,sBAAkB,gBAAG,mBAAmB;AAAA,UAC5D,CAAC,GAAgB,uCAAAA,KAAK,0BAAU;AAAA,YAC9B,eAAW,YAAAK,SAAK,gDAAgD;AAAA,cAC9D,wDAAwD;AAAA,YAC1D,CAAC;AAAA,YACD,UAAU;AAAA,UACZ,CAAC,CAAC;AAAA,QACJ,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC,IAAI,OAAO,SAAS,KAAK,YAAyB,uCAAAL,KAAK,8BAAAC,SAAsB;AAAA,MAC5E,GAAG;AAAA,MACH,GAAG;AAAA,MACH;AAAA,MACA,SAAS,0BAAuC,uCAAAD,KAAK,kBAAkB;AAAA,QACrE,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,IAAiB,uCAAAA,KAAK,eAAe;AAAA,QACpC,GAAG;AAAA,QACH;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AA0BO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Dropdown from '../dropdown';\nimport { ColorPicker } from '../color-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport { Truncate } from '../truncate';\nimport { ColorHeading } from './styles';\nimport DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';\nimport { extractColorNameFromCurrentValue, isMultiplePaletteArray, normalizeColorValue } from './utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nextend([namesPlugin, a11yPlugin]);\nfunction SinglePalette({\n className,\n clearColor,\n colors,\n onChange,\n value,\n ...additionalProps\n}) {\n const colorOptions = useMemo(() => {\n return colors.map(({\n color,\n name\n }, index) => {\n const colordColor = colord(color);\n const isSelected = value === color;\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n isSelected: isSelected,\n selectedIconProps: isSelected ? {\n fill: colordColor.contrast() > colordColor.contrast('#000') ? '#fff' : '#000'\n } : {},\n tooltipText: name ||\n // translators: %s: color hex code e.g: \"#f00\".\n sprintf(__('Color code: %s'), color),\n style: {\n backgroundColor: color,\n color\n },\n onClick: isSelected ? clearColor : () => onChange(color, index)\n }, `${color}-${index}`);\n });\n }, [colors, value, onChange, clearColor]);\n return /*#__PURE__*/_jsx(CircularOptionPicker.OptionGroup, {\n className: className,\n options: colorOptions,\n ...additionalProps\n });\n}\nfunction MultiplePalettes({\n className,\n clearColor,\n colors,\n onChange,\n value,\n headingLevel\n}) {\n const instanceId = useInstanceId(MultiplePalettes, 'color-palette');\n if (colors.length === 0) {\n return null;\n }\n return /*#__PURE__*/_jsx(VStack, {\n spacing: 3,\n className: className,\n children: colors.map(({\n name,\n colors: colorPalette\n }, index) => {\n const id = `${instanceId}-${index}`;\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 2,\n children: [/*#__PURE__*/_jsx(ColorHeading, {\n id: id,\n level: headingLevel,\n children: name\n }), /*#__PURE__*/_jsx(SinglePalette, {\n clearColor: clearColor,\n colors: colorPalette,\n onChange: newColor => onChange(newColor, index),\n value: value,\n \"aria-labelledby\": id\n })]\n }, index);\n })\n });\n}\nexport function CustomColorPickerDropdown({\n isRenderedInSidebar,\n popoverProps: receivedPopoverProps,\n ...props\n}) {\n const popoverProps = useMemo(() => ({\n shift: true,\n // Disabling resize as it would otherwise cause the popover to show\n // scrollbars while dragging the color picker's handle close to the\n // popover edge.\n resize: false,\n ...(isRenderedInSidebar ? {\n // When in the sidebar: open to the left (stacking),\n // leaving the same gap as the parent popover.\n placement: 'left-start',\n offset: 34\n } : {\n // Default behavior: open below the anchor\n placement: 'bottom',\n offset: 8\n }),\n ...receivedPopoverProps\n }), [isRenderedInSidebar, receivedPopoverProps]);\n return /*#__PURE__*/_jsx(Dropdown, {\n contentClassName: \"components-color-palette__custom-color-dropdown-content\",\n popoverProps: popoverProps,\n ...props\n });\n}\nfunction UnforwardedColorPalette(props, forwardedRef) {\n const {\n asButtons,\n loop,\n clearable = true,\n colors = [],\n disableCustomColors = false,\n enableAlpha = false,\n onChange,\n value,\n __experimentalIsRenderedInSidebar = false,\n headingLevel = 2,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...additionalProps\n } = props;\n const [normalizedColorValue, setNormalizedColorValue] = useState(value);\n const clearColor = useCallback(() => onChange(undefined), [onChange]);\n const customColorPaletteCallbackRef = useCallback(node => {\n setNormalizedColorValue(normalizeColorValue(value, node));\n }, [value]);\n const hasMultipleColorOrigins = isMultiplePaletteArray(colors);\n const buttonLabelName = useMemo(() => extractColorNameFromCurrentValue(value, colors, hasMultipleColorOrigins), [value, colors, hasMultipleColorOrigins]);\n const renderCustomColorPicker = () => /*#__PURE__*/_jsx(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: /*#__PURE__*/_jsx(ColorPicker, {\n color: normalizedColorValue,\n onChange: color => onChange(color),\n enableAlpha: enableAlpha\n })\n });\n const isHex = value?.startsWith('#');\n\n // Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n const displayValue = value?.replace(/^var\\((.+)\\)$/, '$1');\n const customColorAccessibleLabel = !!displayValue ? sprintf(\n // translators: 1: The name of the color e.g: \"vivid red\". 2: The color's hex code e.g: \"#f00\".\n __('Custom color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'), buttonLabelName, displayValue) : __('Custom color picker');\n const paletteCommonProps = {\n clearColor,\n onChange,\n value\n };\n const actions = !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: clearColor,\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n ref: forwardedRef,\n ...additionalProps,\n children: [!disableCustomColors && /*#__PURE__*/_jsx(CustomColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n renderContent: renderCustomColorPicker,\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-wrapper\",\n spacing: 0,\n children: [/*#__PURE__*/_jsx(\"button\", {\n ref: customColorPaletteCallbackRef,\n className: \"components-color-palette__custom-color-button\",\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"true\",\n onClick: onToggle,\n \"aria-label\": customColorAccessibleLabel,\n style: {\n background: value\n },\n type: \"button\"\n }), /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-text-wrapper\",\n spacing: 0.5,\n children: [/*#__PURE__*/_jsx(Truncate, {\n className: \"components-color-palette__custom-color-name\",\n children: value ? buttonLabelName : __('No color selected')\n }), /*#__PURE__*/_jsx(Truncate, {\n className: clsx('components-color-palette__custom-color-value', {\n 'components-color-palette__custom-color-value--is-hex': isHex\n }),\n children: displayValue\n })]\n })]\n })\n }), (colors.length > 0 || actions) && /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...metaProps,\n ...labelProps,\n actions: actions,\n options: hasMultipleColorOrigins ? /*#__PURE__*/_jsx(MultiplePalettes, {\n ...paletteCommonProps,\n headingLevel: headingLevel,\n colors: colors,\n value: value\n }) : /*#__PURE__*/_jsx(SinglePalette, {\n ...paletteCommonProps,\n colors: colors,\n value: value\n })\n })]\n });\n}\n\n/**\n * Allows the user to pick a color from a list of pre-defined color entries.\n *\n * ```jsx\n * import { ColorPalette } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyColorPalette = () => {\n * const [ color, setColor ] = useState ( '#f00' )\n * const colors = [\n * { name: 'red', color: '#f00' },\n * { name: 'white', color: '#fff' },\n * { name: 'blue', color: '#00f' },\n * ];\n * return (\n * <ColorPalette\n * colors={ colors }\n * value={ color }\n * onChange={ ( color ) => setColor( color ) }\n * />\n * );\n * } );\n * ```\n */\nexport const ColorPalette = forwardRef(UnforwardedColorPalette);\nColorPalette.displayName = 'ColorPalette';\nexport default ColorPalette;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,oBAA+B;AAC/B,mBAAwB;AACxB,kBAAuB;AACvB,kBAAiB;AAKjB,qBAA8B;AAC9B,kBAA4B;AAC5B,qBAA2D;AAK3D,sBAAqB;AACrB,0BAA4B;AAC5B,oCAAgF;AAChF,qBAAuB;AACvB,sBAAyB;AACzB,oBAA6B;AAC7B,sCAAmC;AACnC,mBAA8F;AAC9F,yBAA2C;AAAA,IAC3C,sBAAO,CAAC,aAAAA,SAAa,YAAAC,OAAU,CAAC;AAChC,SAAS,cAAc;AAAA,EACrB;AAAA,E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Dropdown", "DropdownContentWrapper", "clsx"]
7
7
  }
@@ -42,8 +42,8 @@ var import_a11y = __toESM(require("colord/plugins/a11y"));
42
42
  var import_i18n = require("@wordpress/i18n");
43
43
  (0, import_colord.extend)([import_names.default, import_a11y.default]);
44
44
  var isSimpleCSSColor = (value) => {
45
- const valueIsCssVariable = /var\(/.test(value !== null && value !== void 0 ? value : "");
46
- const valueIsColorMix = /color-mix\(/.test(value !== null && value !== void 0 ? value : "");
45
+ const valueIsCssVariable = /var\(/.test(value ?? "");
46
+ const valueIsColorMix = /color-mix\(/.test(value ?? "");
47
47
  return !valueIsCssVariable && !valueIsColorMix;
48
48
  };
49
49
  var extractColorNameFromCurrentValue = (currentValue, colors = [], showMultiplePalettes = false) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/color-palette/utils.ts"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nextend([namesPlugin, a11yPlugin]);\n\n/**\n * Checks if a color value is a simple CSS color.\n *\n * @param value The color value to check.\n * @return A boolean indicating whether the color value is a simple CSS color.\n */\nconst isSimpleCSSColor = value => {\n const valueIsCssVariable = /var\\(/.test(value !== null && value !== void 0 ? value : '');\n const valueIsColorMix = /color-mix\\(/.test(value !== null && value !== void 0 ? value : '');\n return !valueIsCssVariable && !valueIsColorMix;\n};\nexport const extractColorNameFromCurrentValue = (currentValue, colors = [], showMultiplePalettes = false) => {\n if (!currentValue) {\n return '';\n }\n const currentValueIsSimpleColor = currentValue ? isSimpleCSSColor(currentValue) : false;\n const normalizedCurrentValue = currentValueIsSimpleColor ? colord(currentValue).toHex() : currentValue;\n\n // Normalize format of `colors` to simplify the following loop\n\n const colorPalettes = showMultiplePalettes ? colors : [{\n colors: colors\n }];\n for (const {\n colors: paletteColors\n } of colorPalettes) {\n for (const {\n name: colorName,\n color: colorValue\n } of paletteColors) {\n const normalizedColorValue = currentValueIsSimpleColor ? colord(colorValue).toHex() : colorValue;\n if (normalizedCurrentValue === normalizedColorValue) {\n return colorName;\n }\n }\n }\n\n // translators: shown when the user has picked a custom color (i.e not in the palette of colors).\n return __('Custom');\n};\n\n// The PaletteObject type has a `colors` property (an array of ColorObject),\n// while the ColorObject type has a `color` property (the CSS color value).\nexport const isMultiplePaletteObject = obj => Array.isArray(obj.colors) && !('color' in obj);\nexport const isMultiplePaletteArray = arr => {\n return arr.length > 0 && arr.every(colorObj => isMultiplePaletteObject(colorObj));\n};\n\n/**\n * Transform a CSS variable used as background color into the color value itself.\n *\n * @param value The color value that may be a CSS variable.\n * @param element The element for which to get the computed style.\n * @return The background color value computed from a element.\n */\nexport const normalizeColorValue = (value, element) => {\n if (!value || !element || isSimpleCSSColor(value)) {\n return value;\n }\n const {\n ownerDocument\n } = element;\n const {\n defaultView\n } = ownerDocument;\n const computedBackgroundColor = defaultView?.getComputedStyle(element).backgroundColor;\n return computedBackgroundColor ? colord(computedBackgroundColor).toHex() : value;\n};"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAA+B;AAC/B,mBAAwB;AACxB,kBAAuB;AAKvB,kBAAmB;AAAA,IAMnB,sBAAO,CAAC,aAAAA,SAAa,YAAAC,OAAU,CAAC;AAQhC,IAAM,mBAAmB,WAAS;AAChC,QAAM,qBAAqB,QAAQ,KAAK,UAAU,QAAQ,UAAU,SAAS,QAAQ,EAAE;AACvF,QAAM,kBAAkB,cAAc,KAAK,UAAU,QAAQ,UAAU,SAAS,QAAQ,EAAE;AAC1F,SAAO,CAAC,sBAAsB,CAAC;AACjC;AACO,IAAM,mCAAmC,CAAC,cAAc,SAAS,CAAC,GAAG,uBAAuB,UAAU;AAC3G,MAAI,CAAC,cAAc;AACjB,WAAO;AAAA,EACT;AACA,QAAM,4BAA4B,eAAe,iBAAiB,YAAY,IAAI;AAClF,QAAM,yBAAyB,gCAA4B,sBAAO,YAAY,EAAE,MAAM,IAAI;AAI1F,QAAM,gBAAgB,uBAAuB,SAAS,CAAC;AAAA,IACrD;AAAA,EACF,CAAC;AACD,aAAW;AAAA,IACT,QAAQ;AAAA,EACV,KAAK,eAAe;AAClB,eAAW;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,IACT,KAAK,eAAe;AAClB,YAAM,uBAAuB,gCAA4B,sBAAO,UAAU,EAAE,MAAM,IAAI;AACtF,UAAI,2BAA2B,sBAAsB;AACnD,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAGA,aAAO,gBAAG,QAAQ;AACpB;AAIO,IAAM,0BAA0B,SAAO,MAAM,QAAQ,IAAI,MAAM,KAAK,EAAE,WAAW;AACjF,IAAM,yBAAyB,SAAO;AAC3C,SAAO,IAAI,SAAS,KAAK,IAAI,MAAM,cAAY,wBAAwB,QAAQ,CAAC;AAClF;AASO,IAAM,sBAAsB,CAAC,OAAO,YAAY;AACrD,MAAI,CAAC,SAAS,CAAC,WAAW,iBAAiB,KAAK,GAAG;AACjD,WAAO;AAAA,EACT;AACA,QAAM;AAAA,IACJ;AAAA,EACF,IAAI;AACJ,QAAM;AAAA,IACJ;AAAA,EACF,IAAI;AACJ,QAAM,0BAA0B,aAAa,iBAAiB,OAAO,EAAE;AACvE,SAAO,8BAA0B,sBAAO,uBAAuB,EAAE,MAAM,IAAI;AAC7E;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nextend([namesPlugin, a11yPlugin]);\n\n/**\n * Checks if a color value is a simple CSS color.\n *\n * @param value The color value to check.\n * @return A boolean indicating whether the color value is a simple CSS color.\n */\nconst isSimpleCSSColor = value => {\n const valueIsCssVariable = /var\\(/.test(value ?? '');\n const valueIsColorMix = /color-mix\\(/.test(value ?? '');\n return !valueIsCssVariable && !valueIsColorMix;\n};\nexport const extractColorNameFromCurrentValue = (currentValue, colors = [], showMultiplePalettes = false) => {\n if (!currentValue) {\n return '';\n }\n const currentValueIsSimpleColor = currentValue ? isSimpleCSSColor(currentValue) : false;\n const normalizedCurrentValue = currentValueIsSimpleColor ? colord(currentValue).toHex() : currentValue;\n\n // Normalize format of `colors` to simplify the following loop\n\n const colorPalettes = showMultiplePalettes ? colors : [{\n colors: colors\n }];\n for (const {\n colors: paletteColors\n } of colorPalettes) {\n for (const {\n name: colorName,\n color: colorValue\n } of paletteColors) {\n const normalizedColorValue = currentValueIsSimpleColor ? colord(colorValue).toHex() : colorValue;\n if (normalizedCurrentValue === normalizedColorValue) {\n return colorName;\n }\n }\n }\n\n // translators: shown when the user has picked a custom color (i.e not in the palette of colors).\n return __('Custom');\n};\n\n// The PaletteObject type has a `colors` property (an array of ColorObject),\n// while the ColorObject type has a `color` property (the CSS color value).\nexport const isMultiplePaletteObject = obj => Array.isArray(obj.colors) && !('color' in obj);\nexport const isMultiplePaletteArray = arr => {\n return arr.length > 0 && arr.every(colorObj => isMultiplePaletteObject(colorObj));\n};\n\n/**\n * Transform a CSS variable used as background color into the color value itself.\n *\n * @param value The color value that may be a CSS variable.\n * @param element The element for which to get the computed style.\n * @return The background color value computed from a element.\n */\nexport const normalizeColorValue = (value, element) => {\n if (!value || !element || isSimpleCSSColor(value)) {\n return value;\n }\n const {\n ownerDocument\n } = element;\n const {\n defaultView\n } = ownerDocument;\n const computedBackgroundColor = defaultView?.getComputedStyle(element).backgroundColor;\n return computedBackgroundColor ? colord(computedBackgroundColor).toHex() : value;\n};"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAI;AACJ,QAAM,0BAA0B,aAAa,iBAAiB,OAAO,EAAE;AACvE,SAAO,8BAA0B,sBAAO,uBAAuB,EAAE,MAAM,IAAI;AAC7E;",
6
6
  "names": ["namesPlugin", "a11yPlugin"]
7
7
  }
@@ -55,7 +55,7 @@ var import_spinner = __toESM(require("../spinner/index.cjs"));
55
55
  var import_jsx_runtime = require("react/jsx-runtime");
56
56
  var noop = () => {
57
57
  };
58
- var DetectOutside = (0, import_with_focus_outside.default)(class extends import_element.Component {
58
+ var DetectOutside = (0, import_with_focus_outside.default)(class DetectOutsideComponent extends import_element.Component {
59
59
  handleFocusOutside(event) {
60
60
  this.props.onFocusOutside(event);
61
61
  }
@@ -65,7 +65,6 @@ var DetectOutside = (0, import_with_focus_outside.default)(class extends import_
65
65
  });
66
66
  var getIndexOfMatchingSuggestion = (selectedSuggestion, matchingSuggestions) => selectedSuggestion === null ? -1 : matchingSuggestions.indexOf(selectedSuggestion);
67
67
  function ComboboxControl(props) {
68
- var _currentOption$label;
69
68
  const {
70
69
  __next40pxDefaultSize = false,
71
70
  value: valueProp,
@@ -90,7 +89,7 @@ function ComboboxControl(props) {
90
89
  onChange: onChangeProp
91
90
  });
92
91
  const currentOption = options.find((option) => option.value === value);
93
- const currentLabel = (_currentOption$label = currentOption?.label) !== null && _currentOption$label !== void 0 ? _currentOption$label : "";
92
+ const currentLabel = currentOption?.label ?? "";
94
93
  const instanceId = (0, import_compose.useInstanceId)(ComboboxControl, "combobox-control");
95
94
  const [selectedSuggestion, setSelectedSuggestion] = (0, import_element.useState)(currentOption || null);
96
95
  const [isExpanded, setIsExpanded] = (0, import_element.useState)(false);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/combobox-control/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Component, useState, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport Spinner from '../spinner';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nconst DetectOutside = withFocusOutside(class extends Component {\n handleFocusOutside(event) {\n this.props.onFocusOutside(event);\n }\n render() {\n return this.props.children;\n }\n});\nconst getIndexOfMatchingSuggestion = (selectedSuggestion, matchingSuggestions) => selectedSuggestion === null ? -1 : matchingSuggestions.indexOf(selectedSuggestion);\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\t__next40pxDefaultSize\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl(props) {\n var _currentOption$label;\n const {\n __next40pxDefaultSize = false,\n value: valueProp,\n label,\n options,\n onChange: onChangeProp,\n onFilterValueChange = noop,\n hideLabelFromVision,\n help,\n allowReset = true,\n className,\n isLoading = false,\n messages = {\n selected: __('Item selected.')\n },\n __experimentalRenderItem,\n expandOnFocus = true,\n placeholder\n } = useDeprecated36pxDefaultSizeProp(props);\n const [value, setValue] = useControlledValue({\n value: valueProp,\n onChange: onChangeProp\n });\n const currentOption = options.find(option => option.value === value);\n const currentLabel = (_currentOption$label = currentOption?.label) !== null && _currentOption$label !== void 0 ? _currentOption$label : '';\n // Use a custom prefix when generating the `instanceId` to avoid having\n // duplicate input IDs when rendering this component and `FormTokenField`\n // in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n const instanceId = useInstanceId(ComboboxControl, 'combobox-control');\n const [selectedSuggestion, setSelectedSuggestion] = useState(currentOption || null);\n const [isExpanded, setIsExpanded] = useState(false);\n const [inputHasFocus, setInputHasFocus] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const inputContainer = useRef(null);\n const matchingSuggestions = useMemo(() => {\n const startsWithMatch = [];\n const containsMatch = [];\n const match = normalizeTextString(inputValue);\n options.forEach(option => {\n const index = normalizeTextString(option.label).indexOf(match);\n if (index === 0) {\n startsWithMatch.push(option);\n } else if (index > 0) {\n containsMatch.push(option);\n }\n });\n return startsWithMatch.concat(containsMatch);\n }, [inputValue, options]);\n const onSuggestionSelected = newSelectedSuggestion => {\n if (newSelectedSuggestion.disabled) {\n return;\n }\n setValue(newSelectedSuggestion.value);\n speak(messages.selected, 'assertive');\n setSelectedSuggestion(newSelectedSuggestion);\n setInputValue('');\n setIsExpanded(false);\n };\n const handleArrowNavigation = (offset = 1) => {\n const index = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions);\n let nextIndex = index + offset;\n if (nextIndex < 0) {\n nextIndex = matchingSuggestions.length - 1;\n } else if (nextIndex >= matchingSuggestions.length) {\n nextIndex = 0;\n }\n setSelectedSuggestion(matchingSuggestions[nextIndex]);\n setIsExpanded(true);\n };\n const onKeyDown = withIgnoreIMEEvents(event => {\n let preventDefault = false;\n if (event.defaultPrevented) {\n return;\n }\n switch (event.code) {\n case 'Enter':\n if (selectedSuggestion) {\n onSuggestionSelected(selectedSuggestion);\n preventDefault = true;\n }\n break;\n case 'ArrowUp':\n handleArrowNavigation(-1);\n preventDefault = true;\n break;\n case 'ArrowDown':\n handleArrowNavigation(1);\n preventDefault = true;\n break;\n case 'Escape':\n setIsExpanded(false);\n setSelectedSuggestion(null);\n preventDefault = true;\n break;\n default:\n break;\n }\n if (preventDefault) {\n event.preventDefault();\n }\n });\n const onBlur = () => {\n setInputHasFocus(false);\n };\n const onFocus = () => {\n setInputHasFocus(true);\n if (expandOnFocus) {\n setIsExpanded(true);\n }\n onFilterValueChange('');\n setInputValue('');\n };\n const onClick = () => {\n setIsExpanded(true);\n };\n const onFocusOutside = () => {\n setIsExpanded(false);\n };\n const onInputChange = event => {\n const text = event.value;\n setInputValue(text);\n onFilterValueChange(text);\n if (inputHasFocus) {\n setIsExpanded(true);\n }\n };\n const handleOnReset = () => {\n setValue(null);\n inputContainer.current?.focus();\n };\n\n // Stop propagation of the keydown event when pressing Enter on the Reset\n // button to prevent calling the onKeydown callback on the container div\n // element which actually sets the selected suggestion.\n const handleResetStopPropagation = event => {\n event.stopPropagation();\n };\n\n // Update current selections when the filter input changes.\n useEffect(() => {\n const hasMatchingSuggestions = matchingSuggestions.length > 0;\n const hasSelectedMatchingSuggestions = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions) > 0;\n if (hasMatchingSuggestions && !hasSelectedMatchingSuggestions) {\n // If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n setSelectedSuggestion(matchingSuggestions[0]);\n }\n }, [matchingSuggestions, selectedSuggestion]);\n\n // Announcements.\n useEffect(() => {\n const hasMatchingSuggestions = matchingSuggestions.length > 0;\n if (isExpanded) {\n const message = hasMatchingSuggestions ? sprintf(/* translators: %d: number of results. */\n _n('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', matchingSuggestions.length), matchingSuggestions.length) : __('No results.');\n speak(message, 'polite');\n }\n }, [matchingSuggestions, isExpanded]);\n maybeWarnDeprecated36pxSize({\n componentName: 'ComboboxControl',\n __next40pxDefaultSize,\n size: undefined\n });\n\n // Disable reason: There is no appropriate role which describes the\n // input container intended accessible usability.\n // TODO: Refactor click detection to use blur to stop propagation.\n /* eslint-disable jsx-a11y/no-static-element-interactions */\n return /*#__PURE__*/_jsx(DetectOutside, {\n onFocusOutside: onFocusOutside,\n children: /*#__PURE__*/_jsx(BaseControl, {\n className: clsx(className, 'components-combobox-control'),\n label: label,\n id: `components-form-token-input-${instanceId}`,\n hideLabelFromVision: hideLabelFromVision,\n help: help,\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-combobox-control__suggestions-container\",\n tabIndex: -1,\n onKeyDown: onKeyDown,\n children: [/*#__PURE__*/_jsxs(InputWrapperFlex, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: [/*#__PURE__*/_jsx(FlexBlock, {\n children: /*#__PURE__*/_jsx(TokenInput, {\n className: \"components-combobox-control__input\",\n instanceId: instanceId,\n ref: inputContainer,\n placeholder: placeholder,\n value: isExpanded ? inputValue : currentLabel,\n onFocus: onFocus,\n onBlur: onBlur,\n onClick: onClick,\n isExpanded: isExpanded,\n selectedSuggestionIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),\n onChange: onInputChange\n })\n }), isLoading && /*#__PURE__*/_jsx(Spinner, {}), allowReset && Boolean(value) && !isExpanded && /*#__PURE__*/_jsx(Button, {\n size: \"small\",\n icon: closeSmall,\n onClick: handleOnReset,\n onKeyDown: handleResetStopPropagation,\n label: __('Reset')\n })]\n }), isExpanded && !isLoading && /*#__PURE__*/_jsx(SuggestionsList, {\n instanceId: instanceId\n // The empty string for `value` here is not actually used, but is\n // just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n // See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n ,\n match: {\n label: inputValue,\n value: ''\n },\n displayTransform: suggestion => suggestion.label,\n suggestions: matchingSuggestions,\n selectedIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),\n onHover: setSelectedSuggestion,\n onSelect: onSuggestionSelected,\n scrollIntoView: true,\n __experimentalRenderItem: __experimentalRenderItem\n })]\n })\n })\n });\n /* eslint-enable jsx-a11y/no-static-element-interactions */\n}\nexport default ComboboxControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAAgC;AAChC,qBAAgE;AAChE,qBAA8B;AAC9B,kBAAsB;AACtB,mBAA2B;AAK3B,oBAAiC;AACjC,yBAAuB;AACvB,8BAA4B;AAC5B,0BAAwB;AACxB,oBAAmB;AACnB,kBAA0B;AAC1B,gCAA6B;AAC7B,mBAAmC;AACnC,qBAAoC;AACpC,kCAAiD;AACjD,oCAAoC;AACpC,kCAA4C;AAC5C,qBAAoB;AACpB,yBAA2C;AAC3C,IAAM,OAAO,MAAM;AAAC;AACpB,IAAM,oBAAgB,0BAAAA,SAAiB,cAAc,yBAAU;AAAA,EAC7D,mBAAmB,OAAO;AACxB,SAAK,MAAM,eAAe,KAAK;AAAA,EACjC;AAAA,E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EACH,CAAC;AAEH;AACA,IAAO,2BAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Component, useState, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { InputWrapperFlex } from './styles';\nimport TokenInput from '../form-token-field/token-input';\nimport SuggestionsList from '../form-token-field/suggestions-list';\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport { FlexBlock } from '../flex';\nimport withFocusOutside from '../higher-order/with-focus-outside';\nimport { useControlledValue } from '../utils/hooks';\nimport { normalizeTextString } from '../utils/strings';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport Spinner from '../spinner';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nconst DetectOutside = withFocusOutside(class DetectOutsideComponent extends Component {\n handleFocusOutside(event) {\n this.props.onFocusOutside(event);\n }\n render() {\n return this.props.children;\n }\n});\nconst getIndexOfMatchingSuggestion = (selectedSuggestion, matchingSuggestions) => selectedSuggestion === null ? -1 : matchingSuggestions.indexOf(selectedSuggestion);\n\n/**\n * `ComboboxControl` is an enhanced version of a [`SelectControl`](../select-control/README.md) with the addition of\n * being able to search for options using a search input.\n *\n * ```jsx\n * import { ComboboxControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const options = [\n * \t{\n * \t\tvalue: 'small',\n * \t\tlabel: 'Small',\n * \t},\n * \t{\n * \t\tvalue: 'normal',\n * \t\tlabel: 'Normal',\n * \t\tdisabled: true,\n * \t},\n * \t{\n * \t\tvalue: 'large',\n * \t\tlabel: 'Large',\n * \t\tdisabled: false,\n * \t},\n * ];\n *\n * function MyComboboxControl() {\n * \tconst [ fontSize, setFontSize ] = useState();\n * \tconst [ filteredOptions, setFilteredOptions ] = useState( options );\n * \treturn (\n * \t\t<ComboboxControl\n * \t\t\t__next40pxDefaultSize\n * \t\t\tlabel=\"Font Size\"\n * \t\t\tvalue={ fontSize }\n * \t\t\tonChange={ setFontSize }\n * \t\t\toptions={ filteredOptions }\n * \t\t\tonFilterValueChange={ ( inputValue ) =>\n * \t\t\t\tsetFilteredOptions(\n * \t\t\t\t\toptions.filter( ( option ) =>\n * \t\t\t\t\t\toption.label\n * \t\t\t\t\t\t\t.toLowerCase()\n * \t\t\t\t\t\t\t.startsWith( inputValue.toLowerCase() )\n * \t\t\t\t\t)\n * \t\t\t\t)\n * \t\t\t}\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction ComboboxControl(props) {\n const {\n __next40pxDefaultSize = false,\n value: valueProp,\n label,\n options,\n onChange: onChangeProp,\n onFilterValueChange = noop,\n hideLabelFromVision,\n help,\n allowReset = true,\n className,\n isLoading = false,\n messages = {\n selected: __('Item selected.')\n },\n __experimentalRenderItem,\n expandOnFocus = true,\n placeholder\n } = useDeprecated36pxDefaultSizeProp(props);\n const [value, setValue] = useControlledValue({\n value: valueProp,\n onChange: onChangeProp\n });\n const currentOption = options.find(option => option.value === value);\n const currentLabel = currentOption?.label ?? '';\n // Use a custom prefix when generating the `instanceId` to avoid having\n // duplicate input IDs when rendering this component and `FormTokenField`\n // in the same page (see https://github.com/WordPress/gutenberg/issues/42112).\n const instanceId = useInstanceId(ComboboxControl, 'combobox-control');\n const [selectedSuggestion, setSelectedSuggestion] = useState(currentOption || null);\n const [isExpanded, setIsExpanded] = useState(false);\n const [inputHasFocus, setInputHasFocus] = useState(false);\n const [inputValue, setInputValue] = useState('');\n const inputContainer = useRef(null);\n const matchingSuggestions = useMemo(() => {\n const startsWithMatch = [];\n const containsMatch = [];\n const match = normalizeTextString(inputValue);\n options.forEach(option => {\n const index = normalizeTextString(option.label).indexOf(match);\n if (index === 0) {\n startsWithMatch.push(option);\n } else if (index > 0) {\n containsMatch.push(option);\n }\n });\n return startsWithMatch.concat(containsMatch);\n }, [inputValue, options]);\n const onSuggestionSelected = newSelectedSuggestion => {\n if (newSelectedSuggestion.disabled) {\n return;\n }\n setValue(newSelectedSuggestion.value);\n speak(messages.selected, 'assertive');\n setSelectedSuggestion(newSelectedSuggestion);\n setInputValue('');\n setIsExpanded(false);\n };\n const handleArrowNavigation = (offset = 1) => {\n const index = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions);\n let nextIndex = index + offset;\n if (nextIndex < 0) {\n nextIndex = matchingSuggestions.length - 1;\n } else if (nextIndex >= matchingSuggestions.length) {\n nextIndex = 0;\n }\n setSelectedSuggestion(matchingSuggestions[nextIndex]);\n setIsExpanded(true);\n };\n const onKeyDown = withIgnoreIMEEvents(event => {\n let preventDefault = false;\n if (event.defaultPrevented) {\n return;\n }\n switch (event.code) {\n case 'Enter':\n if (selectedSuggestion) {\n onSuggestionSelected(selectedSuggestion);\n preventDefault = true;\n }\n break;\n case 'ArrowUp':\n handleArrowNavigation(-1);\n preventDefault = true;\n break;\n case 'ArrowDown':\n handleArrowNavigation(1);\n preventDefault = true;\n break;\n case 'Escape':\n setIsExpanded(false);\n setSelectedSuggestion(null);\n preventDefault = true;\n break;\n default:\n break;\n }\n if (preventDefault) {\n event.preventDefault();\n }\n });\n const onBlur = () => {\n setInputHasFocus(false);\n };\n const onFocus = () => {\n setInputHasFocus(true);\n if (expandOnFocus) {\n setIsExpanded(true);\n }\n onFilterValueChange('');\n setInputValue('');\n };\n const onClick = () => {\n setIsExpanded(true);\n };\n const onFocusOutside = () => {\n setIsExpanded(false);\n };\n const onInputChange = event => {\n const text = event.value;\n setInputValue(text);\n onFilterValueChange(text);\n if (inputHasFocus) {\n setIsExpanded(true);\n }\n };\n const handleOnReset = () => {\n setValue(null);\n inputContainer.current?.focus();\n };\n\n // Stop propagation of the keydown event when pressing Enter on the Reset\n // button to prevent calling the onKeydown callback on the container div\n // element which actually sets the selected suggestion.\n const handleResetStopPropagation = event => {\n event.stopPropagation();\n };\n\n // Update current selections when the filter input changes.\n useEffect(() => {\n const hasMatchingSuggestions = matchingSuggestions.length > 0;\n const hasSelectedMatchingSuggestions = getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions) > 0;\n if (hasMatchingSuggestions && !hasSelectedMatchingSuggestions) {\n // If the current selection isn't present in the list of suggestions, then automatically select the first item from the list of suggestions.\n setSelectedSuggestion(matchingSuggestions[0]);\n }\n }, [matchingSuggestions, selectedSuggestion]);\n\n // Announcements.\n useEffect(() => {\n const hasMatchingSuggestions = matchingSuggestions.length > 0;\n if (isExpanded) {\n const message = hasMatchingSuggestions ? sprintf(/* translators: %d: number of results. */\n _n('%d result found, use up and down arrow keys to navigate.', '%d results found, use up and down arrow keys to navigate.', matchingSuggestions.length), matchingSuggestions.length) : __('No results.');\n speak(message, 'polite');\n }\n }, [matchingSuggestions, isExpanded]);\n maybeWarnDeprecated36pxSize({\n componentName: 'ComboboxControl',\n __next40pxDefaultSize,\n size: undefined\n });\n\n // Disable reason: There is no appropriate role which describes the\n // input container intended accessible usability.\n // TODO: Refactor click detection to use blur to stop propagation.\n /* eslint-disable jsx-a11y/no-static-element-interactions */\n return /*#__PURE__*/_jsx(DetectOutside, {\n onFocusOutside: onFocusOutside,\n children: /*#__PURE__*/_jsx(BaseControl, {\n className: clsx(className, 'components-combobox-control'),\n label: label,\n id: `components-form-token-input-${instanceId}`,\n hideLabelFromVision: hideLabelFromVision,\n help: help,\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-combobox-control__suggestions-container\",\n tabIndex: -1,\n onKeyDown: onKeyDown,\n children: [/*#__PURE__*/_jsxs(InputWrapperFlex, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: [/*#__PURE__*/_jsx(FlexBlock, {\n children: /*#__PURE__*/_jsx(TokenInput, {\n className: \"components-combobox-control__input\",\n instanceId: instanceId,\n ref: inputContainer,\n placeholder: placeholder,\n value: isExpanded ? inputValue : currentLabel,\n onFocus: onFocus,\n onBlur: onBlur,\n onClick: onClick,\n isExpanded: isExpanded,\n selectedSuggestionIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),\n onChange: onInputChange\n })\n }), isLoading && /*#__PURE__*/_jsx(Spinner, {}), allowReset && Boolean(value) && !isExpanded && /*#__PURE__*/_jsx(Button, {\n size: \"small\",\n icon: closeSmall,\n onClick: handleOnReset,\n onKeyDown: handleResetStopPropagation,\n label: __('Reset')\n })]\n }), isExpanded && !isLoading && /*#__PURE__*/_jsx(SuggestionsList, {\n instanceId: instanceId\n // The empty string for `value` here is not actually used, but is\n // just a quick way to satisfy the TypeScript requirements of SuggestionsList.\n // See: https://github.com/WordPress/gutenberg/pull/47581/files#r1091089330\n ,\n match: {\n label: inputValue,\n value: ''\n },\n displayTransform: suggestion => suggestion.label,\n suggestions: matchingSuggestions,\n selectedIndex: getIndexOfMatchingSuggestion(selectedSuggestion, matchingSuggestions),\n onHover: setSelectedSuggestion,\n onSelect: onSuggestionSelected,\n scrollIntoView: true,\n __experimentalRenderItem: __experimentalRenderItem\n })]\n })\n })\n });\n /* eslint-enable jsx-a11y/no-static-element-interactions */\n}\nexport default ComboboxControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,kBAAgC;AAChC,qBAAgE;AAChE,qBAA8B;AAC9B,kBAAsB;AACtB,mBAA2B;AAK3B,oBAAiC;AACjC,yBAAuB;AACvB,8BAA4B;AAC5B,0BAAwB;AACxB,oBAAmB;AACnB,kBAA0B;AAC1B,gCAA6B;AAC7B,mBAAmC;AACnC,qBAAoC;AACpC,kCAAiD;AACjD,oCAAoC;AACpC,kCAA4C;AAC5C,qBAAoB;AACpB,yBAA2C;AAC3C,IAAM,OAAO,MA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,UACV,gBAAgB;AAAA,UAChB;AAAA,QACF,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AAEH;AACA,IAAO,2BAAQ;",
6
6
  "names": ["withFocusOutside", "_jsx", "BaseControl", "clsx", "_jsxs", "TokenInput", "Spinner", "Button", "SuggestionsList"]
7
7
  }
@@ -38,9 +38,8 @@ var import_element = require("@wordpress/element");
38
38
  var import_context = require("./context.cjs");
39
39
  var import_jsx_runtime = require("react/jsx-runtime");
40
40
  var CompositeGroupLabel2 = (0, import_element.forwardRef)(function CompositeGroupLabel3(props, ref) {
41
- var _props$store;
42
41
  const context = (0, import_context.useCompositeContext)();
43
- const store = (_props$store = props.store) !== null && _props$store !== void 0 ? _props$store : context.store;
42
+ const store = props.store ?? context.store;
44
43
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Ariakit.CompositeGroupLabel, {
45
44
  store,
46
45
  ...props,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/composite/group-label.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useCompositeContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const CompositeGroupLabel = forwardRef(function CompositeGroupLabel(props, ref) {\n var _props$store;\n const context = useCompositeContext();\n\n // @ts-expect-error The store prop is undocumented and only used by the\n // legacy compat layer. The `store` prop is documented, but its type is\n // obfuscated to discourage its use outside of the component's internals.\n const store = (_props$store = props.store) !== null && _props$store !== void 0 ? _props$store : context.store;\n return /*#__PURE__*/_jsx(Ariakit.CompositeGroupLabel, {\n store: store,\n ...props,\n ref: ref\n });\n});"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA2B;AAM3B,qBAAoC;AACpC,yBAA4B;AACrB,IAAMA,2BAAsB,2BAAW,SAASA,qBAAoB,OAAO,KAAK;AACrF,MAAI;AACJ,QAAM,cAAU,oCAAoB;AAKpC,QAAM,SAAS,eAAe,MAAM,WAAW,QAAQ,iBAAiB,SAAS,eAAe,QAAQ;AACxG,SAAoB,uCAAAC,KAAa,6BAAqB;AAAA,IACpD;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useCompositeContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const CompositeGroupLabel = forwardRef(function CompositeGroupLabel(props, ref) {\n const context = useCompositeContext();\n\n // @ts-expect-error The store prop is undocumented and only used by the\n // legacy compat layer. The `store` prop is documented, but its type is\n // obfuscated to discourage its use outside of the component's internals.\n const store = props.store ?? context.store;\n return /*#__PURE__*/_jsx(Ariakit.CompositeGroupLabel, {\n store: store,\n ...props,\n ref: ref\n });\n});"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA2B;AAM3B,qBAAoC;AACpC,yBAA4B;AACrB,IAAMA,2BAAsB,2BAAW,SAASA,qBAAoB,OAAO,KAAK;AACrF,QAAM,cAAU,oCAAoB;AAKpC,QAAM,QAAQ,MAAM,SAAS,QAAQ;AACrC,SAAoB,uCAAAC,KAAa,6BAAqB;AAAA,IACpD;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;",
6
6
  "names": ["CompositeGroupLabel", "_jsx"]
7
7
  }
@@ -38,9 +38,8 @@ var import_element = require("@wordpress/element");
38
38
  var import_context = require("./context.cjs");
39
39
  var import_jsx_runtime = require("react/jsx-runtime");
40
40
  var CompositeGroup2 = (0, import_element.forwardRef)(function CompositeGroup3(props, ref) {
41
- var _props$store;
42
41
  const context = (0, import_context.useCompositeContext)();
43
- const store = (_props$store = props.store) !== null && _props$store !== void 0 ? _props$store : context.store;
42
+ const store = props.store ?? context.store;
44
43
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Ariakit.CompositeGroup, {
45
44
  store,
46
45
  ...props,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/composite/group.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useCompositeContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const CompositeGroup = forwardRef(function CompositeGroup(props, ref) {\n var _props$store;\n const context = useCompositeContext();\n\n // @ts-expect-error The store prop is undocumented and only used by the\n // legacy compat layer. The `store` prop is documented, but its type is\n // obfuscated to discourage its use outside of the component's internals.\n const store = (_props$store = props.store) !== null && _props$store !== void 0 ? _props$store : context.store;\n return /*#__PURE__*/_jsx(Ariakit.CompositeGroup, {\n store: store,\n ...props,\n ref: ref\n });\n});"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA2B;AAM3B,qBAAoC;AACpC,yBAA4B;AACrB,IAAMA,sBAAiB,2BAAW,SAASA,gBAAe,OAAO,KAAK;AAC3E,MAAI;AACJ,QAAM,cAAU,oCAAoB;AAKpC,QAAM,SAAS,eAAe,MAAM,WAAW,QAAQ,iBAAiB,SAAS,eAAe,QAAQ;AACxG,SAAoB,uCAAAC,KAAa,wBAAgB;AAAA,IAC/C;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useCompositeContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const CompositeGroup = forwardRef(function CompositeGroup(props, ref) {\n const context = useCompositeContext();\n\n // @ts-expect-error The store prop is undocumented and only used by the\n // legacy compat layer. The `store` prop is documented, but its type is\n // obfuscated to discourage its use outside of the component's internals.\n const store = props.store ?? context.store;\n return /*#__PURE__*/_jsx(Ariakit.CompositeGroup, {\n store: store,\n ...props,\n ref: ref\n });\n});"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA2B;AAM3B,qBAAoC;AACpC,yBAA4B;AACrB,IAAMA,sBAAiB,2BAAW,SAASA,gBAAe,OAAO,KAAK;AAC3E,QAAM,cAAU,oCAAoB;AAKpC,QAAM,QAAQ,MAAM,SAAS,QAAQ;AACrC,SAAoB,uCAAAC,KAAa,wBAAgB;AAAA,IAC/C;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;",
6
6
  "names": ["CompositeGroup", "_jsx"]
7
7
  }
@@ -38,9 +38,8 @@ var import_element = require("@wordpress/element");
38
38
  var import_context = require("./context.cjs");
39
39
  var import_jsx_runtime = require("react/jsx-runtime");
40
40
  var CompositeHover2 = (0, import_element.forwardRef)(function CompositeHover3(props, ref) {
41
- var _props$store;
42
41
  const context = (0, import_context.useCompositeContext)();
43
- const store = (_props$store = props.store) !== null && _props$store !== void 0 ? _props$store : context.store;
42
+ const store = props.store ?? context.store;
44
43
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Ariakit.CompositeHover, {
45
44
  store,
46
45
  ...props,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/composite/hover.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useCompositeContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const CompositeHover = forwardRef(function CompositeHover(props, ref) {\n var _props$store;\n const context = useCompositeContext();\n\n // @ts-expect-error The store prop is undocumented and only used by the\n // legacy compat layer. The `store` prop is documented, but its type is\n // obfuscated to discourage its use outside of the component's internals.\n const store = (_props$store = props.store) !== null && _props$store !== void 0 ? _props$store : context.store;\n return /*#__PURE__*/_jsx(Ariakit.CompositeHover, {\n store: store,\n ...props,\n ref: ref\n });\n});"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA2B;AAM3B,qBAAoC;AACpC,yBAA4B;AACrB,IAAMA,sBAAiB,2BAAW,SAASA,gBAAe,OAAO,KAAK;AAC3E,MAAI;AACJ,QAAM,cAAU,oCAAoB;AAKpC,QAAM,SAAS,eAAe,MAAM,WAAW,QAAQ,iBAAiB,SAAS,eAAe,QAAQ;AACxG,SAAoB,uCAAAC,KAAa,wBAAgB;AAAA,IAC/C;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useCompositeContext } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const CompositeHover = forwardRef(function CompositeHover(props, ref) {\n const context = useCompositeContext();\n\n // @ts-expect-error The store prop is undocumented and only used by the\n // legacy compat layer. The `store` prop is documented, but its type is\n // obfuscated to discourage its use outside of the component's internals.\n const store = props.store ?? context.store;\n return /*#__PURE__*/_jsx(Ariakit.CompositeHover, {\n store: store,\n ...props,\n ref: ref\n });\n});"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA2B;AAM3B,qBAAoC;AACpC,yBAA4B;AACrB,IAAMA,sBAAiB,2BAAW,SAASA,gBAAe,OAAO,KAAK;AAC3E,QAAM,cAAU,oCAAoB;AAKpC,QAAM,QAAQ,MAAM,SAAS,QAAQ;AACrC,SAAoB,uCAAAC,KAAa,wBAAgB;AAAA,IAC/C;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;",
6
6
  "names": ["CompositeHover", "_jsx"]
7
7
  }