@wordpress/components 32.0.1-next.ba3aee3a2.0 → 32.0.2-next.v.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (982) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/CONTRIBUTING.md +6 -0
  3. package/build/angle-picker-control/index.cjs +1 -0
  4. package/build/angle-picker-control/index.cjs.map +2 -2
  5. package/build/box-control/index.cjs +15 -7
  6. package/build/box-control/index.cjs.map +2 -2
  7. package/build/button/deprecated.cjs +12 -8
  8. package/build/button/deprecated.cjs.map +2 -2
  9. package/build/button/index.cjs +1 -0
  10. package/build/button/index.cjs.map +2 -2
  11. package/build/button-group/index.cjs +1 -0
  12. package/build/button-group/index.cjs.map +2 -2
  13. package/build/circular-option-picker/circular-option-picker-option.cjs +2 -1
  14. package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
  15. package/build/circular-option-picker/circular-option-picker.cjs +1 -0
  16. package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
  17. package/build/clipboard-button/index.cjs +11 -7
  18. package/build/clipboard-button/index.cjs.map +2 -2
  19. package/build/color-indicator/index.cjs +1 -0
  20. package/build/color-indicator/index.cjs.map +2 -2
  21. package/build/color-palette/index.cjs +1 -0
  22. package/build/color-palette/index.cjs.map +2 -2
  23. package/build/combobox-control/index.cjs +1 -1
  24. package/build/combobox-control/index.cjs.map +2 -2
  25. package/build/context/context-system-provider.cjs +1 -1
  26. package/build/context/context-system-provider.cjs.map +2 -2
  27. package/build/date-time/date-time/index.cjs +1 -0
  28. package/build/date-time/date-time/index.cjs.map +2 -2
  29. package/build/disclosure/index.cjs +1 -0
  30. package/build/disclosure/index.cjs.map +2 -2
  31. package/build/duotone-picker/duotone-picker.cjs +1 -1
  32. package/build/duotone-picker/duotone-picker.cjs.map +1 -1
  33. package/build/external-link/index.cjs +1 -0
  34. package/build/external-link/index.cjs.map +2 -2
  35. package/build/font-size-picker/index.cjs +1 -0
  36. package/build/font-size-picker/index.cjs.map +2 -2
  37. package/build/form-file-upload/index.cjs +9 -5
  38. package/build/form-file-upload/index.cjs.map +2 -2
  39. package/build/form-toggle/index.cjs +1 -0
  40. package/build/form-toggle/index.cjs.map +2 -2
  41. package/build/form-token-field/token-input.cjs +1 -0
  42. package/build/form-token-field/token-input.cjs.map +2 -2
  43. package/build/form-token-field/token.cjs.map +2 -2
  44. package/build/higher-order/navigate-regions/index.cjs +9 -7
  45. package/build/higher-order/navigate-regions/index.cjs.map +2 -2
  46. package/build/higher-order/with-fallback-styles/index.cjs +2 -2
  47. package/build/higher-order/with-fallback-styles/index.cjs.map +2 -2
  48. package/build/higher-order/with-focus-outside/index.cjs +1 -1
  49. package/build/higher-order/with-focus-outside/index.cjs.map +2 -2
  50. package/build/higher-order/with-spoken-messages/index.cjs +7 -5
  51. package/build/higher-order/with-spoken-messages/index.cjs.map +2 -2
  52. package/build/input-control/index.cjs +1 -0
  53. package/build/input-control/index.cjs.map +2 -2
  54. package/build/input-control/styles/input-control-styles.cjs +22 -22
  55. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  56. package/build/menu/popover.cjs +1 -0
  57. package/build/menu/popover.cjs.map +2 -2
  58. package/build/menu/styles.cjs +15 -15
  59. package/build/menu/styles.cjs.map +2 -2
  60. package/build/menu-item/index.cjs +1 -0
  61. package/build/menu-item/index.cjs.map +2 -2
  62. package/build/modal/index.cjs +1 -0
  63. package/build/modal/index.cjs.map +2 -2
  64. package/build/navigable-container/menu.cjs +1 -0
  65. package/build/navigable-container/menu.cjs.map +2 -2
  66. package/build/navigable-container/tabbable.cjs +1 -0
  67. package/build/navigable-container/tabbable.cjs.map +2 -2
  68. package/build/navigation/back-button/index.cjs +1 -0
  69. package/build/navigation/back-button/index.cjs.map +2 -2
  70. package/build/number-control/index.cjs +1 -0
  71. package/build/number-control/index.cjs.map +2 -2
  72. package/build/panel/body.cjs +1 -0
  73. package/build/panel/body.cjs.map +2 -2
  74. package/build/panel/index.cjs +1 -0
  75. package/build/panel/index.cjs.map +2 -2
  76. package/build/panel/row.cjs +1 -0
  77. package/build/panel/row.cjs.map +2 -2
  78. package/build/progress-bar/index.cjs +1 -0
  79. package/build/progress-bar/index.cjs.map +2 -2
  80. package/build/radio-group/index.cjs +1 -0
  81. package/build/radio-group/index.cjs.map +2 -2
  82. package/build/radio-group/radio.cjs +9 -4
  83. package/build/radio-group/radio.cjs.map +2 -2
  84. package/build/range-control/index.cjs +1 -0
  85. package/build/range-control/index.cjs.map +2 -2
  86. package/build/resizable-box/index.cjs +1 -0
  87. package/build/resizable-box/index.cjs.map +2 -2
  88. package/build/search-control/index.cjs +1 -0
  89. package/build/search-control/index.cjs.map +2 -2
  90. package/build/select-control/index.cjs +1 -0
  91. package/build/select-control/index.cjs.map +2 -2
  92. package/build/slot-fill/bubbles-virtually/slot.cjs +17 -5
  93. package/build/slot-fill/bubbles-virtually/slot.cjs.map +2 -2
  94. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs +17 -4
  95. package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs.map +2 -2
  96. package/build/slot-fill/bubbles-virtually/use-slot.cjs +7 -3
  97. package/build/slot-fill/bubbles-virtually/use-slot.cjs.map +2 -2
  98. package/build/slot-fill/context.cjs +17 -6
  99. package/build/slot-fill/context.cjs.map +3 -3
  100. package/build/slot-fill/fill.cjs +29 -4
  101. package/build/slot-fill/fill.cjs.map +4 -4
  102. package/build/slot-fill/index.cjs +8 -23
  103. package/build/slot-fill/index.cjs.map +3 -3
  104. package/build/slot-fill/provider.cjs +33 -17
  105. package/build/slot-fill/provider.cjs.map +2 -2
  106. package/build/slot-fill/slot.cjs +7 -4
  107. package/build/slot-fill/slot.cjs.map +2 -2
  108. package/build/snackbar/index.cjs +1 -0
  109. package/build/snackbar/index.cjs.map +2 -2
  110. package/build/spinner/index.cjs +1 -0
  111. package/build/spinner/index.cjs.map +2 -2
  112. package/build/tab-panel/index.cjs +1 -0
  113. package/build/tab-panel/index.cjs.map +2 -2
  114. package/build/text-control/index.cjs +1 -0
  115. package/build/text-control/index.cjs.map +2 -2
  116. package/build/text-highlight/index.cjs +1 -0
  117. package/build/text-highlight/index.cjs.map +2 -2
  118. package/build/textarea-control/index.cjs +1 -0
  119. package/build/textarea-control/index.cjs.map +2 -2
  120. package/build/toggle-control/index.cjs +1 -0
  121. package/build/toggle-control/index.cjs.map +2 -2
  122. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs +1 -0
  123. package/build/toggle-group-control/toggle-group-control/as-button-group.cjs.map +2 -2
  124. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs +1 -0
  125. package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
  126. package/build/toggle-group-control/toggle-group-control-option/component.cjs +1 -0
  127. package/build/toggle-group-control/toggle-group-control-option/component.cjs.map +2 -2
  128. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs +1 -0
  129. package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs.map +2 -2
  130. package/build/toolbar/toolbar/index.cjs +1 -0
  131. package/build/toolbar/toolbar/index.cjs.map +2 -2
  132. package/build/toolbar/toolbar/toolbar-container.cjs +1 -0
  133. package/build/toolbar/toolbar/toolbar-container.cjs.map +2 -2
  134. package/build/toolbar/toolbar-button/index.cjs +1 -0
  135. package/build/toolbar/toolbar-button/index.cjs.map +2 -2
  136. package/build/toolbar/toolbar-dropdown-menu/index.cjs +1 -0
  137. package/build/toolbar/toolbar-dropdown-menu/index.cjs.map +2 -2
  138. package/build/toolbar/toolbar-item/index.cjs +1 -0
  139. package/build/toolbar/toolbar-item/index.cjs.map +2 -2
  140. package/build/tooltip/index.cjs +1 -0
  141. package/build/tooltip/index.cjs.map +2 -2
  142. package/build/tree-grid/cell.cjs +1 -0
  143. package/build/tree-grid/cell.cjs.map +2 -2
  144. package/build/tree-grid/index.cjs +1 -0
  145. package/build/tree-grid/index.cjs.map +2 -2
  146. package/build/tree-grid/item.cjs +1 -0
  147. package/build/tree-grid/item.cjs.map +2 -2
  148. package/build/tree-grid/roving-tab-index-item.cjs +1 -0
  149. package/build/tree-grid/roving-tab-index-item.cjs.map +2 -2
  150. package/build/tree-grid/row.cjs +1 -0
  151. package/build/tree-grid/row.cjs.map +2 -2
  152. package/build/tree-select/index.cjs +12 -8
  153. package/build/tree-select/index.cjs.map +2 -2
  154. package/build/unit-control/index.cjs +1 -0
  155. package/build/unit-control/index.cjs.map +2 -2
  156. package/build/utils/dropdown-motion.cjs.map +2 -2
  157. package/build/validated-form-controls/components/checkbox-control.cjs +1 -0
  158. package/build/validated-form-controls/components/checkbox-control.cjs.map +2 -2
  159. package/build/validated-form-controls/components/combobox-control.cjs +1 -0
  160. package/build/validated-form-controls/components/combobox-control.cjs.map +2 -2
  161. package/build/validated-form-controls/components/custom-select-control.cjs +1 -0
  162. package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
  163. package/build/validated-form-controls/components/form-token-field.cjs +1 -0
  164. package/build/validated-form-controls/components/form-token-field.cjs.map +2 -2
  165. package/build/validated-form-controls/components/input-control.cjs +1 -0
  166. package/build/validated-form-controls/components/input-control.cjs.map +2 -2
  167. package/build/validated-form-controls/components/number-control.cjs +1 -0
  168. package/build/validated-form-controls/components/number-control.cjs.map +2 -2
  169. package/build/validated-form-controls/components/radio-control.cjs +1 -0
  170. package/build/validated-form-controls/components/radio-control.cjs.map +2 -2
  171. package/build/validated-form-controls/components/range-control.cjs +1 -0
  172. package/build/validated-form-controls/components/range-control.cjs.map +2 -2
  173. package/build/validated-form-controls/components/select-control.cjs +1 -0
  174. package/build/validated-form-controls/components/select-control.cjs.map +2 -2
  175. package/build/validated-form-controls/components/text-control.cjs +1 -0
  176. package/build/validated-form-controls/components/text-control.cjs.map +2 -2
  177. package/build/validated-form-controls/components/textarea-control.cjs +1 -0
  178. package/build/validated-form-controls/components/textarea-control.cjs.map +2 -2
  179. package/build/validated-form-controls/components/toggle-control.cjs +1 -0
  180. package/build/validated-form-controls/components/toggle-control.cjs.map +2 -2
  181. package/build/validated-form-controls/components/toggle-group-control.cjs +1 -0
  182. package/build/validated-form-controls/components/toggle-group-control.cjs.map +2 -2
  183. package/build/validated-form-controls/control-with-error.cjs +1 -0
  184. package/build/validated-form-controls/control-with-error.cjs.map +2 -2
  185. package/build-module/angle-picker-control/index.mjs +1 -0
  186. package/build-module/angle-picker-control/index.mjs.map +2 -2
  187. package/build-module/box-control/index.mjs +15 -7
  188. package/build-module/box-control/index.mjs.map +2 -2
  189. package/build-module/button/deprecated.mjs +12 -8
  190. package/build-module/button/deprecated.mjs.map +2 -2
  191. package/build-module/button/index.mjs +1 -0
  192. package/build-module/button/index.mjs.map +2 -2
  193. package/build-module/button-group/index.mjs +1 -0
  194. package/build-module/button-group/index.mjs.map +2 -2
  195. package/build-module/circular-option-picker/circular-option-picker-option.mjs +2 -1
  196. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  197. package/build-module/circular-option-picker/circular-option-picker.mjs +1 -0
  198. package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
  199. package/build-module/clipboard-button/index.mjs +11 -7
  200. package/build-module/clipboard-button/index.mjs.map +2 -2
  201. package/build-module/color-indicator/index.mjs +1 -0
  202. package/build-module/color-indicator/index.mjs.map +2 -2
  203. package/build-module/color-palette/index.mjs +1 -0
  204. package/build-module/color-palette/index.mjs.map +2 -2
  205. package/build-module/combobox-control/index.mjs +1 -1
  206. package/build-module/combobox-control/index.mjs.map +2 -2
  207. package/build-module/context/context-system-provider.mjs +1 -1
  208. package/build-module/context/context-system-provider.mjs.map +2 -2
  209. package/build-module/date-time/date-time/index.mjs +1 -0
  210. package/build-module/date-time/date-time/index.mjs.map +2 -2
  211. package/build-module/disclosure/index.mjs +1 -0
  212. package/build-module/disclosure/index.mjs.map +2 -2
  213. package/build-module/duotone-picker/duotone-picker.mjs +1 -1
  214. package/build-module/duotone-picker/duotone-picker.mjs.map +1 -1
  215. package/build-module/external-link/index.mjs +1 -0
  216. package/build-module/external-link/index.mjs.map +2 -2
  217. package/build-module/font-size-picker/index.mjs +1 -0
  218. package/build-module/font-size-picker/index.mjs.map +2 -2
  219. package/build-module/form-file-upload/index.mjs +9 -5
  220. package/build-module/form-file-upload/index.mjs.map +2 -2
  221. package/build-module/form-toggle/index.mjs +1 -0
  222. package/build-module/form-toggle/index.mjs.map +2 -2
  223. package/build-module/form-token-field/token-input.mjs +1 -0
  224. package/build-module/form-token-field/token-input.mjs.map +2 -2
  225. package/build-module/form-token-field/token.mjs.map +2 -2
  226. package/build-module/higher-order/navigate-regions/index.mjs +9 -7
  227. package/build-module/higher-order/navigate-regions/index.mjs.map +2 -2
  228. package/build-module/higher-order/with-fallback-styles/index.mjs +2 -2
  229. package/build-module/higher-order/with-fallback-styles/index.mjs.map +2 -2
  230. package/build-module/higher-order/with-focus-outside/index.mjs +1 -1
  231. package/build-module/higher-order/with-focus-outside/index.mjs.map +2 -2
  232. package/build-module/higher-order/with-spoken-messages/index.mjs +7 -5
  233. package/build-module/higher-order/with-spoken-messages/index.mjs.map +2 -2
  234. package/build-module/input-control/index.mjs +1 -0
  235. package/build-module/input-control/index.mjs.map +2 -2
  236. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  237. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  238. package/build-module/menu/popover.mjs +1 -0
  239. package/build-module/menu/popover.mjs.map +2 -2
  240. package/build-module/menu/styles.mjs +15 -15
  241. package/build-module/menu/styles.mjs.map +2 -2
  242. package/build-module/menu-item/index.mjs +1 -0
  243. package/build-module/menu-item/index.mjs.map +2 -2
  244. package/build-module/modal/index.mjs +1 -0
  245. package/build-module/modal/index.mjs.map +2 -2
  246. package/build-module/navigable-container/menu.mjs +1 -0
  247. package/build-module/navigable-container/menu.mjs.map +2 -2
  248. package/build-module/navigable-container/tabbable.mjs +1 -0
  249. package/build-module/navigable-container/tabbable.mjs.map +2 -2
  250. package/build-module/navigation/back-button/index.mjs +1 -0
  251. package/build-module/navigation/back-button/index.mjs.map +2 -2
  252. package/build-module/number-control/index.mjs +1 -0
  253. package/build-module/number-control/index.mjs.map +2 -2
  254. package/build-module/panel/body.mjs +1 -0
  255. package/build-module/panel/body.mjs.map +2 -2
  256. package/build-module/panel/index.mjs +1 -0
  257. package/build-module/panel/index.mjs.map +2 -2
  258. package/build-module/panel/row.mjs +1 -0
  259. package/build-module/panel/row.mjs.map +2 -2
  260. package/build-module/progress-bar/index.mjs +1 -0
  261. package/build-module/progress-bar/index.mjs.map +2 -2
  262. package/build-module/radio-group/index.mjs +1 -0
  263. package/build-module/radio-group/index.mjs.map +2 -2
  264. package/build-module/radio-group/radio.mjs +9 -4
  265. package/build-module/radio-group/radio.mjs.map +2 -2
  266. package/build-module/range-control/index.mjs +1 -0
  267. package/build-module/range-control/index.mjs.map +2 -2
  268. package/build-module/resizable-box/index.mjs +1 -0
  269. package/build-module/resizable-box/index.mjs.map +2 -2
  270. package/build-module/search-control/index.mjs +1 -0
  271. package/build-module/search-control/index.mjs.map +2 -2
  272. package/build-module/select-control/index.mjs +1 -0
  273. package/build-module/select-control/index.mjs.map +2 -2
  274. package/build-module/slot-fill/bubbles-virtually/slot.mjs +16 -4
  275. package/build-module/slot-fill/bubbles-virtually/slot.mjs.map +2 -2
  276. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs +17 -4
  277. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs.map +2 -2
  278. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs +6 -2
  279. package/build-module/slot-fill/bubbles-virtually/use-slot.mjs.map +2 -2
  280. package/build-module/slot-fill/context.mjs +7 -2
  281. package/build-module/slot-fill/context.mjs.map +2 -2
  282. package/build-module/slot-fill/fill.mjs +30 -5
  283. package/build-module/slot-fill/fill.mjs.map +3 -3
  284. package/build-module/slot-fill/index.mjs +7 -21
  285. package/build-module/slot-fill/index.mjs.map +2 -2
  286. package/build-module/slot-fill/provider.mjs +33 -17
  287. package/build-module/slot-fill/provider.mjs.map +2 -2
  288. package/build-module/slot-fill/slot.mjs +7 -4
  289. package/build-module/slot-fill/slot.mjs.map +2 -2
  290. package/build-module/snackbar/index.mjs +1 -0
  291. package/build-module/snackbar/index.mjs.map +2 -2
  292. package/build-module/spinner/index.mjs +1 -0
  293. package/build-module/spinner/index.mjs.map +2 -2
  294. package/build-module/tab-panel/index.mjs +1 -0
  295. package/build-module/tab-panel/index.mjs.map +2 -2
  296. package/build-module/text-control/index.mjs +1 -0
  297. package/build-module/text-control/index.mjs.map +2 -2
  298. package/build-module/text-highlight/index.mjs +1 -0
  299. package/build-module/text-highlight/index.mjs.map +2 -2
  300. package/build-module/textarea-control/index.mjs +1 -0
  301. package/build-module/textarea-control/index.mjs.map +2 -2
  302. package/build-module/toggle-control/index.mjs +1 -0
  303. package/build-module/toggle-control/index.mjs.map +2 -2
  304. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs +1 -0
  305. package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs.map +2 -2
  306. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs +1 -0
  307. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs.map +2 -2
  308. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs +1 -0
  309. package/build-module/toggle-group-control/toggle-group-control-option/component.mjs.map +2 -2
  310. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs +1 -0
  311. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map +2 -2
  312. package/build-module/toolbar/toolbar/index.mjs +1 -0
  313. package/build-module/toolbar/toolbar/index.mjs.map +2 -2
  314. package/build-module/toolbar/toolbar/toolbar-container.mjs +1 -0
  315. package/build-module/toolbar/toolbar/toolbar-container.mjs.map +2 -2
  316. package/build-module/toolbar/toolbar-button/index.mjs +1 -0
  317. package/build-module/toolbar/toolbar-button/index.mjs.map +2 -2
  318. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs +1 -0
  319. package/build-module/toolbar/toolbar-dropdown-menu/index.mjs.map +2 -2
  320. package/build-module/toolbar/toolbar-item/index.mjs +1 -0
  321. package/build-module/toolbar/toolbar-item/index.mjs.map +2 -2
  322. package/build-module/tooltip/index.mjs +1 -0
  323. package/build-module/tooltip/index.mjs.map +2 -2
  324. package/build-module/tree-grid/cell.mjs +1 -0
  325. package/build-module/tree-grid/cell.mjs.map +2 -2
  326. package/build-module/tree-grid/index.mjs +1 -0
  327. package/build-module/tree-grid/index.mjs.map +2 -2
  328. package/build-module/tree-grid/item.mjs +1 -0
  329. package/build-module/tree-grid/item.mjs.map +2 -2
  330. package/build-module/tree-grid/roving-tab-index-item.mjs +1 -0
  331. package/build-module/tree-grid/roving-tab-index-item.mjs.map +2 -2
  332. package/build-module/tree-grid/row.mjs +1 -0
  333. package/build-module/tree-grid/row.mjs.map +2 -2
  334. package/build-module/tree-select/index.mjs +12 -8
  335. package/build-module/tree-select/index.mjs.map +2 -2
  336. package/build-module/unit-control/index.mjs +1 -0
  337. package/build-module/unit-control/index.mjs.map +2 -2
  338. package/build-module/utils/dropdown-motion.mjs.map +2 -2
  339. package/build-module/validated-form-controls/components/checkbox-control.mjs +1 -0
  340. package/build-module/validated-form-controls/components/checkbox-control.mjs.map +2 -2
  341. package/build-module/validated-form-controls/components/combobox-control.mjs +1 -0
  342. package/build-module/validated-form-controls/components/combobox-control.mjs.map +2 -2
  343. package/build-module/validated-form-controls/components/custom-select-control.mjs +1 -0
  344. package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
  345. package/build-module/validated-form-controls/components/form-token-field.mjs +1 -0
  346. package/build-module/validated-form-controls/components/form-token-field.mjs.map +2 -2
  347. package/build-module/validated-form-controls/components/input-control.mjs +1 -0
  348. package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
  349. package/build-module/validated-form-controls/components/number-control.mjs +1 -0
  350. package/build-module/validated-form-controls/components/number-control.mjs.map +2 -2
  351. package/build-module/validated-form-controls/components/radio-control.mjs +1 -0
  352. package/build-module/validated-form-controls/components/radio-control.mjs.map +2 -2
  353. package/build-module/validated-form-controls/components/range-control.mjs +1 -0
  354. package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
  355. package/build-module/validated-form-controls/components/select-control.mjs +1 -0
  356. package/build-module/validated-form-controls/components/select-control.mjs.map +2 -2
  357. package/build-module/validated-form-controls/components/text-control.mjs +1 -0
  358. package/build-module/validated-form-controls/components/text-control.mjs.map +2 -2
  359. package/build-module/validated-form-controls/components/textarea-control.mjs +1 -0
  360. package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
  361. package/build-module/validated-form-controls/components/toggle-control.mjs +1 -0
  362. package/build-module/validated-form-controls/components/toggle-control.mjs.map +2 -2
  363. package/build-module/validated-form-controls/components/toggle-group-control.mjs +1 -0
  364. package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +2 -2
  365. package/build-module/validated-form-controls/control-with-error.mjs +1 -0
  366. package/build-module/validated-form-controls/control-with-error.mjs.map +2 -2
  367. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  368. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  369. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  370. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  371. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  372. package/build-types/animate/stories/index.story.d.ts +8 -8
  373. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  374. package/build-types/badge/stories/index.story.d.ts +1 -1
  375. package/build-types/badge/stories/index.story.d.ts.map +1 -1
  376. package/build-types/base-control/stories/index.story.d.ts +2 -2
  377. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  378. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  379. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  380. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  381. package/build-types/border-control/stories/index.story.d.ts +6 -6
  382. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  383. package/build-types/box-control/index.d.ts.map +1 -1
  384. package/build-types/box-control/stories/index.story.d.ts +8 -8
  385. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  386. package/build-types/button/deprecated.d.ts.map +1 -1
  387. package/build-types/button/index.d.ts +1 -1
  388. package/build-types/button/index.d.ts.map +1 -1
  389. package/build-types/button/stories/e2e/index.story.d.ts +2 -2
  390. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  391. package/build-types/button/stories/index.story.d.ts +9 -9
  392. package/build-types/button/stories/index.story.d.ts.map +1 -1
  393. package/build-types/button-group/index.d.ts.map +1 -1
  394. package/build-types/button-group/stories/index.story.d.ts +1 -1
  395. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  396. package/build-types/calendar/stories/date-calendar.story.d.ts +1 -1
  397. package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
  398. package/build-types/calendar/stories/date-range-calendar.story.d.ts +1 -1
  399. package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
  400. package/build-types/card/card-divider/hook.d.ts +1 -1
  401. package/build-types/card/stories/index.story.d.ts +1 -1
  402. package/build-types/card/stories/index.story.d.ts.map +1 -1
  403. package/build-types/checkbox-control/stories/index.story.d.ts +1 -1
  404. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  405. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  406. package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -0
  407. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  408. package/build-types/circular-option-picker/stories/index.story.d.ts +6 -6
  409. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  410. package/build-types/clipboard-button/index.d.ts.map +1 -1
  411. package/build-types/clipboard-button/types.d.ts +1 -0
  412. package/build-types/clipboard-button/types.d.ts.map +1 -1
  413. package/build-types/color-indicator/index.d.ts.map +1 -1
  414. package/build-types/color-indicator/stories/index.story.d.ts +1 -1
  415. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  416. package/build-types/color-palette/index.d.ts.map +1 -1
  417. package/build-types/color-palette/stories/index.story.d.ts +4 -4
  418. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  419. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  420. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  421. package/build-types/combobox-control/stories/index.story.d.ts +5 -5
  422. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  423. package/build-types/composite/legacy/stories/index.story.d.ts +1 -1
  424. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  425. package/build-types/composite/legacy/stories/utils.d.ts +1 -1
  426. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  427. package/build-types/composite/stories/index.story.d.ts +1 -1
  428. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  429. package/build-types/confirm-dialog/stories/index.story.d.ts +3 -3
  430. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  431. package/build-types/context/context-system-provider.d.ts.map +1 -1
  432. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  433. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  434. package/build-types/custom-select-control/stories/index.story.d.ts +4 -4
  435. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  436. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -4
  437. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  438. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  439. package/build-types/date-time/stories/date-time.story.d.ts +1 -1
  440. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  441. package/build-types/date-time/stories/date.story.d.ts +1 -1
  442. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  443. package/build-types/date-time/stories/time.story.d.ts +2 -2
  444. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  445. package/build-types/disabled/stories/index.story.d.ts +1 -1
  446. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  447. package/build-types/disclosure/index.d.ts.map +1 -1
  448. package/build-types/divider/stories/index.story.d.ts +1 -1
  449. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  450. package/build-types/draggable/stories/index.story.d.ts +1 -1
  451. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  452. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  453. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  454. package/build-types/dropdown/stories/index.story.d.ts +1 -1
  455. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  456. package/build-types/dropdown-menu/stories/index.story.d.ts +1 -1
  457. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  458. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  459. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  460. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +4 -4
  461. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  462. package/build-types/elevation/stories/index.story.d.ts +1 -1
  463. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  464. package/build-types/external-link/index.d.ts.map +1 -1
  465. package/build-types/external-link/stories/index.story.d.ts +1 -1
  466. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  467. package/build-types/flex/stories/index.story.d.ts +1 -1
  468. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  469. package/build-types/focal-point-picker/stories/index.story.d.ts +5 -5
  470. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  471. package/build-types/font-size-picker/index.d.ts.map +1 -1
  472. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +1 -1
  473. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  474. package/build-types/font-size-picker/stories/index.story.d.ts +1 -1
  475. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  476. package/build-types/form-file-upload/index.d.ts.map +1 -1
  477. package/build-types/form-file-upload/stories/index.story.d.ts +6 -6
  478. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  479. package/build-types/form-toggle/index.d.ts.map +1 -1
  480. package/build-types/form-toggle/stories/index.story.d.ts +1 -1
  481. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  482. package/build-types/form-token-field/stories/index.story.d.ts +1 -1
  483. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  484. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  485. package/build-types/gradient-picker/stories/index.story.d.ts +4 -4
  486. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  487. package/build-types/grid/stories/index.story.d.ts +1 -1
  488. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  489. package/build-types/guide/stories/index.story.d.ts +2 -2
  490. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  491. package/build-types/h-stack/stories/e2e/index.story.d.ts +1 -1
  492. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  493. package/build-types/h-stack/stories/index.story.d.ts +1 -1
  494. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  495. package/build-types/heading/stories/index.story.d.ts +1 -1
  496. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  497. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  498. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  499. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  500. package/build-types/icon/stories/index.story.d.ts +5 -5
  501. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  502. package/build-types/index.d.ts +1 -0
  503. package/build-types/index.d.ts.map +1 -1
  504. package/build-types/input-control/index.d.ts.map +1 -1
  505. package/build-types/input-control/stories/index.story.d.ts +8 -8
  506. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  507. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  508. package/build-types/item-group/stories/index.story.d.ts +1 -1
  509. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  510. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  511. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  512. package/build-types/menu/popover.d.ts.map +1 -1
  513. package/build-types/menu/stories/index.story.d.ts +1 -1
  514. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  515. package/build-types/menu/styles.d.ts.map +1 -1
  516. package/build-types/menu-group/stories/index.story.d.ts +2 -2
  517. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  518. package/build-types/menu-item/index.d.ts.map +1 -1
  519. package/build-types/menu-item/stories/index.story.d.ts +5 -5
  520. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  521. package/build-types/menu-items-choice/stories/index.story.d.ts +1 -1
  522. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  523. package/build-types/modal/index.d.ts.map +1 -1
  524. package/build-types/modal/stories/index.story.d.ts +1 -1
  525. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  526. package/build-types/navigable-container/menu.d.ts.map +1 -1
  527. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +1 -1
  528. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  529. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +1 -1
  530. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  531. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  532. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  533. package/build-types/navigation/stories/index.story.d.ts +7 -7
  534. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  535. package/build-types/navigation/stories/utils/controlled-state.d.ts +1 -1
  536. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  537. package/build-types/navigation/stories/utils/default.d.ts +1 -1
  538. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  539. package/build-types/navigation/stories/utils/group.d.ts +1 -1
  540. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  541. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +1 -1
  542. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  543. package/build-types/navigation/stories/utils/more-examples.d.ts +1 -1
  544. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  545. package/build-types/navigation/stories/utils/search.d.ts +1 -1
  546. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  547. package/build-types/navigator/stories/index.story.d.ts +1 -1
  548. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  549. package/build-types/notice/stories/index.story.d.ts +6 -6
  550. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  551. package/build-types/number-control/index.d.ts.map +1 -1
  552. package/build-types/number-control/stories/index.story.d.ts +2 -2
  553. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  554. package/build-types/palette-edit/stories/index.story.d.ts +3 -3
  555. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  556. package/build-types/panel/body.d.ts.map +1 -1
  557. package/build-types/panel/index.d.ts.map +1 -1
  558. package/build-types/panel/row.d.ts.map +1 -1
  559. package/build-types/panel/stories/index.story.d.ts +1 -1
  560. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  561. package/build-types/placeholder/stories/index.story.d.ts +1 -1
  562. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  563. package/build-types/popover/stories/index.story.d.ts +1 -1
  564. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  565. package/build-types/progress-bar/index.d.ts.map +1 -1
  566. package/build-types/progress-bar/stories/index.story.d.ts +2 -2
  567. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  568. package/build-types/query-controls/stories/index.story.d.ts +2 -2
  569. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  570. package/build-types/radio-control/stories/index.story.d.ts +1 -1
  571. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  572. package/build-types/radio-group/index.d.ts.map +1 -1
  573. package/build-types/radio-group/radio.d.ts.map +1 -1
  574. package/build-types/radio-group/stories/index.story.d.ts +1 -1
  575. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  576. package/build-types/range-control/index.d.ts +2 -2
  577. package/build-types/range-control/index.d.ts.map +1 -1
  578. package/build-types/range-control/stories/index.story.d.ts +1 -1
  579. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  580. package/build-types/resizable-box/index.d.ts.map +1 -1
  581. package/build-types/resizable-box/stories/index.story.d.ts +3 -3
  582. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  583. package/build-types/responsive-wrapper/stories/index.story.d.ts +2 -2
  584. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  585. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  586. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  587. package/build-types/scroll-lock/stories/index.story.d.ts +1 -1
  588. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  589. package/build-types/scrollable/stories/index.story.d.ts +1 -1
  590. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  591. package/build-types/search-control/index.d.ts.map +1 -1
  592. package/build-types/search-control/stories/index.story.d.ts +2 -2
  593. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  594. package/build-types/select-control/index.d.ts.map +1 -1
  595. package/build-types/select-control/stories/index.story.d.ts +6 -6
  596. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  597. package/build-types/shortcut/stories/index.story.d.ts +2 -2
  598. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  599. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  600. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  601. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  602. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +2 -3
  603. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  604. package/build-types/slot-fill/context.d.ts +2 -2
  605. package/build-types/slot-fill/context.d.ts.map +1 -1
  606. package/build-types/slot-fill/fill.d.ts +1 -1
  607. package/build-types/slot-fill/fill.d.ts.map +1 -1
  608. package/build-types/slot-fill/index.d.ts +3 -4
  609. package/build-types/slot-fill/index.d.ts.map +1 -1
  610. package/build-types/slot-fill/provider.d.ts.map +1 -1
  611. package/build-types/slot-fill/stories/index.story.d.ts +1 -1
  612. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  613. package/build-types/slot-fill/types.d.ts +23 -25
  614. package/build-types/slot-fill/types.d.ts.map +1 -1
  615. package/build-types/snackbar/index.d.ts.map +1 -1
  616. package/build-types/snackbar/stories/index.story.d.ts +1 -1
  617. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  618. package/build-types/snackbar/stories/list.story.d.ts +1 -1
  619. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  620. package/build-types/spacer/stories/index.story.d.ts +1 -1
  621. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  622. package/build-types/spinner/index.d.ts.map +1 -1
  623. package/build-types/spinner/stories/index.story.d.ts +1 -1
  624. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  625. package/build-types/surface/stories/index.story.d.ts +1 -1
  626. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  627. package/build-types/tab-panel/index.d.ts.map +1 -1
  628. package/build-types/tab-panel/stories/index.story.d.ts +5 -5
  629. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  630. package/build-types/tabs/stories/index.story.d.ts +8 -8
  631. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  632. package/build-types/text/stories/index.story.d.ts +4 -4
  633. package/build-types/text/stories/index.story.d.ts.map +1 -1
  634. package/build-types/text-control/index.d.ts.map +1 -1
  635. package/build-types/text-control/stories/index.story.d.ts +1 -1
  636. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  637. package/build-types/text-highlight/index.d.ts +4 -1
  638. package/build-types/text-highlight/index.d.ts.map +1 -1
  639. package/build-types/text-highlight/stories/index.story.d.ts +1 -1
  640. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  641. package/build-types/textarea-control/index.d.ts.map +1 -1
  642. package/build-types/textarea-control/stories/index.story.d.ts +1 -1
  643. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  644. package/build-types/theme/stories/index.story.d.ts +2 -2
  645. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  646. package/build-types/tip/stories/index.story.d.ts +1 -1
  647. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  648. package/build-types/toggle-control/index.d.ts.map +1 -1
  649. package/build-types/toggle-control/stories/index.story.d.ts +3 -3
  650. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  651. package/build-types/toggle-group-control/stories/index.story.d.ts +1 -1
  652. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  653. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  654. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  655. package/build-types/toolbar/stories/index.story.d.ts +4 -4
  656. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  657. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  658. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  659. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  660. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  661. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  662. package/build-types/tools-panel/stories/index.story.d.ts +1 -1
  663. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  664. package/build-types/tooltip/index.d.ts.map +1 -1
  665. package/build-types/tooltip/stories/index.story.d.ts +2 -2
  666. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  667. package/build-types/tree-grid/cell.d.ts.map +1 -1
  668. package/build-types/tree-grid/index.d.ts.map +1 -1
  669. package/build-types/tree-grid/item.d.ts.map +1 -1
  670. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  671. package/build-types/tree-grid/row.d.ts.map +1 -1
  672. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  673. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  674. package/build-types/tree-select/index.d.ts.map +1 -1
  675. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  676. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  677. package/build-types/truncate/stories/index.story.d.ts +1 -1
  678. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  679. package/build-types/unit-control/index.d.ts.map +1 -1
  680. package/build-types/unit-control/stories/index.story.d.ts +1 -1
  681. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  682. package/build-types/utils/dropdown-motion.d.ts.map +1 -1
  683. package/build-types/v-stack/stories/e2e/index.story.d.ts +1 -1
  684. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  685. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  686. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  687. package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
  688. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +1 -1
  689. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
  690. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +1 -1
  691. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
  692. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +1 -1
  693. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
  694. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +1 -1
  695. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
  696. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +1 -1
  697. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
  698. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +1 -1
  699. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
  700. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +1 -1
  701. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
  702. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +1 -1
  703. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
  704. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +1 -1
  705. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
  706. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +1 -1
  707. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
  708. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +1 -1
  709. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -1
  710. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +1 -1
  711. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
  712. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +1 -1
  713. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
  714. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +1 -1
  715. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
  716. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +1 -1
  717. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
  718. package/build-types/view/stories/index.story.d.ts +1 -1
  719. package/build-types/view/stories/index.story.d.ts.map +1 -1
  720. package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
  721. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  722. package/build-types/z-stack/stories/index.story.d.ts +1 -1
  723. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  724. package/package.json +27 -25
  725. package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
  726. package/src/angle-picker-control/index.tsx +1 -0
  727. package/src/angle-picker-control/stories/index.story.tsx +1 -1
  728. package/src/animate/stories/index.story.tsx +1 -1
  729. package/src/badge/stories/index.story.tsx +1 -1
  730. package/src/base-control/stories/index.story.tsx +4 -2
  731. package/src/border-box-control/border-box-control-split-controls/component.tsx +9 -0
  732. package/src/border-box-control/stories/index.story.tsx +3 -1
  733. package/src/border-box-control/test/index.tsx +51 -20
  734. package/src/border-control/stories/index.story.tsx +2 -1
  735. package/src/border-control/test/index.js +37 -34
  736. package/src/box-control/index.tsx +6 -0
  737. package/src/box-control/stories/index.story.tsx +3 -2
  738. package/src/button/deprecated.tsx +2 -0
  739. package/src/button/index.tsx +16 -15
  740. package/src/button/stories/e2e/index.story.tsx +9 -5
  741. package/src/button/stories/index.story.tsx +14 -11
  742. package/src/button/test/index.tsx +0 -5
  743. package/src/button-group/index.tsx +1 -0
  744. package/src/button-group/stories/index.story.tsx +5 -3
  745. package/src/calendar/stories/date-calendar.story.tsx +1 -1
  746. package/src/calendar/stories/date-range-calendar.story.tsx +1 -1
  747. package/src/card/stories/index.story.tsx +4 -2
  748. package/src/checkbox-control/stories/index.story.tsx +1 -1
  749. package/src/circular-option-picker/circular-option-picker-option.tsx +2 -1
  750. package/src/circular-option-picker/circular-option-picker.tsx +2 -0
  751. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  752. package/src/clipboard-button/index.tsx +2 -0
  753. package/src/clipboard-button/types.ts +1 -0
  754. package/src/color-indicator/index.tsx +1 -0
  755. package/src/color-indicator/stories/index.story.tsx +1 -1
  756. package/src/color-palette/index.tsx +1 -0
  757. package/src/color-palette/stories/index.story.tsx +1 -1
  758. package/src/color-picker/stories/index.story.tsx +1 -1
  759. package/src/combobox-control/index.tsx +1 -1
  760. package/src/combobox-control/stories/index.story.tsx +2 -1
  761. package/src/composite/legacy/stories/index.story.tsx +1 -1
  762. package/src/composite/legacy/stories/utils.tsx +1 -1
  763. package/src/composite/stories/index.story.tsx +1 -1
  764. package/src/confirm-dialog/stories/index.story.tsx +6 -2
  765. package/src/context/context-system-provider.js +2 -1
  766. package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
  767. package/src/custom-select-control/stories/index.story.tsx +2 -1
  768. package/src/custom-select-control-v2/stories/index.story.tsx +1 -1
  769. package/src/date-time/date-time/index.tsx +1 -0
  770. package/src/date-time/stories/date-time.story.tsx +1 -1
  771. package/src/date-time/stories/date.story.tsx +1 -1
  772. package/src/date-time/stories/time.story.tsx +1 -1
  773. package/src/disabled/stories/index.story.tsx +1 -1
  774. package/src/disclosure/index.tsx +1 -0
  775. package/src/divider/stories/index.story.tsx +1 -1
  776. package/src/draggable/stories/index.story.tsx +1 -1
  777. package/src/drop-zone/stories/index.story.tsx +1 -1
  778. package/src/dropdown/stories/index.story.tsx +2 -1
  779. package/src/dropdown-menu/stories/index.story.tsx +1 -1
  780. package/src/duotone-picker/duotone-picker.tsx +1 -1
  781. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  782. package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
  783. package/src/elevation/stories/index.story.tsx +1 -1
  784. package/src/external-link/index.tsx +1 -0
  785. package/src/external-link/stories/index.story.tsx +1 -1
  786. package/src/flex/stories/index.story.tsx +1 -1
  787. package/src/focal-point-picker/stories/index.story.tsx +1 -1
  788. package/src/font-size-picker/index.tsx +1 -0
  789. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -1
  790. package/src/font-size-picker/stories/index.story.tsx +2 -1
  791. package/src/form-file-upload/index.tsx +2 -0
  792. package/src/form-file-upload/stories/index.story.tsx +2 -2
  793. package/src/form-toggle/index.tsx +1 -0
  794. package/src/form-toggle/stories/index.story.tsx +1 -1
  795. package/src/form-token-field/stories/index.story.tsx +3 -1
  796. package/src/form-token-field/token-input.tsx +1 -0
  797. package/src/form-token-field/token.tsx +2 -2
  798. package/src/gradient-picker/stories/index.story.tsx +1 -1
  799. package/src/grid/stories/index.story.tsx +1 -1
  800. package/src/guide/stories/index.story.tsx +6 -2
  801. package/src/h-stack/stories/e2e/index.story.tsx +1 -1
  802. package/src/h-stack/stories/index.story.tsx +1 -1
  803. package/src/heading/stories/index.story.tsx +1 -1
  804. package/src/higher-order/navigate-regions/index.tsx +7 -5
  805. package/src/higher-order/with-fallback-styles/index.tsx +2 -2
  806. package/src/higher-order/with-focus-outside/index.tsx +25 -24
  807. package/src/higher-order/with-spoken-messages/index.tsx +10 -7
  808. package/src/icon/stories/index.story.tsx +1 -1
  809. package/src/index.ts +6 -0
  810. package/src/input-control/index.tsx +1 -0
  811. package/src/input-control/stories/index.story.tsx +3 -2
  812. package/src/input-control/styles/input-control-styles.tsx +0 -4
  813. package/src/item-group/stories/index.story.tsx +1 -1
  814. package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
  815. package/src/menu/popover.tsx +1 -0
  816. package/src/menu/stories/index.story.tsx +5 -2
  817. package/src/menu/styles.ts +36 -26
  818. package/src/menu-group/stories/index.story.tsx +1 -1
  819. package/src/menu-item/index.tsx +1 -0
  820. package/src/menu-item/stories/index.story.tsx +1 -1
  821. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  822. package/src/modal/index.tsx +1 -0
  823. package/src/modal/stories/index.story.tsx +11 -3
  824. package/src/navigable-container/menu.tsx +1 -0
  825. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  826. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  827. package/src/navigable-container/tabbable.tsx +1 -0
  828. package/src/navigation/back-button/index.tsx +1 -0
  829. package/src/navigation/stories/index.story.tsx +1 -1
  830. package/src/navigation/stories/utils/controlled-state.tsx +4 -1
  831. package/src/navigation/stories/utils/default.tsx +1 -1
  832. package/src/navigation/stories/utils/group.tsx +1 -1
  833. package/src/navigation/stories/utils/hide-if-empty.tsx +1 -1
  834. package/src/navigation/stories/utils/more-examples.tsx +1 -1
  835. package/src/navigation/stories/utils/search.tsx +1 -1
  836. package/src/navigator/stories/index.story.tsx +2 -1
  837. package/src/navigator/test/index.tsx +1 -1
  838. package/src/notice/stories/index.story.tsx +1 -1
  839. package/src/number-control/index.tsx +1 -0
  840. package/src/number-control/stories/index.story.tsx +2 -1
  841. package/src/palette-edit/stories/index.story.tsx +1 -1
  842. package/src/panel/body.tsx +1 -0
  843. package/src/panel/index.tsx +1 -0
  844. package/src/panel/row.tsx +1 -0
  845. package/src/panel/stories/index.story.tsx +1 -1
  846. package/src/placeholder/stories/index.story.tsx +1 -1
  847. package/src/popover/stories/index.story.tsx +9 -2
  848. package/src/progress-bar/index.tsx +1 -0
  849. package/src/progress-bar/stories/index.story.tsx +1 -1
  850. package/src/query-controls/stories/index.story.tsx +1 -1
  851. package/src/radio-control/stories/index.story.tsx +1 -1
  852. package/src/radio-group/index.tsx +1 -0
  853. package/src/radio-group/radio.tsx +3 -0
  854. package/src/radio-group/stories/index.story.tsx +1 -1
  855. package/src/range-control/index.tsx +1 -0
  856. package/src/range-control/stories/index.story.tsx +5 -1
  857. package/src/resizable-box/index.tsx +1 -0
  858. package/src/resizable-box/stories/index.story.tsx +1 -1
  859. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  860. package/src/sandbox/stories/index.story.tsx +1 -1
  861. package/src/scroll-lock/stories/index.story.tsx +6 -2
  862. package/src/scrollable/stories/index.story.tsx +1 -1
  863. package/src/search-control/index.tsx +1 -0
  864. package/src/search-control/stories/index.story.tsx +1 -1
  865. package/src/select-control/index.tsx +3 -0
  866. package/src/select-control/stories/index.story.tsx +3 -1
  867. package/src/shortcut/stories/index.story.tsx +1 -1
  868. package/src/slot-fill/bubbles-virtually/slot.tsx +16 -9
  869. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +30 -4
  870. package/src/slot-fill/bubbles-virtually/use-slot.ts +7 -3
  871. package/src/slot-fill/context.ts +15 -4
  872. package/src/slot-fill/fill.tsx +74 -0
  873. package/src/slot-fill/index.tsx +17 -33
  874. package/src/slot-fill/provider.tsx +49 -35
  875. package/src/slot-fill/slot.tsx +4 -4
  876. package/src/slot-fill/stories/index.story.tsx +1 -1
  877. package/src/slot-fill/test/__snapshots__/slot.js.snap +14 -0
  878. package/src/slot-fill/test/slot.js +24 -1
  879. package/src/slot-fill/types.ts +16 -32
  880. package/src/snackbar/index.tsx +1 -0
  881. package/src/snackbar/stories/index.story.tsx +1 -1
  882. package/src/snackbar/stories/list.story.tsx +1 -1
  883. package/src/spacer/stories/index.story.tsx +1 -1
  884. package/src/spinner/index.tsx +1 -0
  885. package/src/spinner/stories/index.story.tsx +1 -1
  886. package/src/surface/stories/index.story.tsx +1 -1
  887. package/src/tab-panel/index.tsx +1 -0
  888. package/src/tab-panel/stories/index.story.tsx +1 -1
  889. package/src/tabs/stories/index.story.tsx +11 -3
  890. package/src/text/stories/index.story.tsx +1 -1
  891. package/src/text-control/index.tsx +1 -0
  892. package/src/text-control/stories/index.story.tsx +2 -1
  893. package/src/text-highlight/index.tsx +2 -0
  894. package/src/text-highlight/stories/index.story.tsx +1 -1
  895. package/src/textarea-control/index.tsx +1 -0
  896. package/src/textarea-control/stories/index.story.tsx +1 -1
  897. package/src/theme/stories/index.story.tsx +8 -4
  898. package/src/tip/stories/index.story.tsx +1 -1
  899. package/src/toggle-control/index.tsx +1 -0
  900. package/src/toggle-control/stories/index.story.tsx +1 -1
  901. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  902. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +1 -0
  903. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -0
  904. package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
  905. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -0
  906. package/src/toolbar/stories/index.story.tsx +1 -1
  907. package/src/toolbar/toolbar/index.tsx +1 -0
  908. package/src/toolbar/toolbar/toolbar-container.tsx +1 -0
  909. package/src/toolbar/toolbar-button/index.tsx +1 -0
  910. package/src/toolbar/toolbar-dropdown-menu/index.tsx +1 -0
  911. package/src/toolbar/toolbar-item/index.tsx +1 -0
  912. package/src/tools-panel/stories/index.story.tsx +1 -1
  913. package/src/tooltip/index.tsx +1 -0
  914. package/src/tooltip/stories/index.story.tsx +14 -4
  915. package/src/tree-grid/cell.tsx +1 -0
  916. package/src/tree-grid/index.tsx +1 -0
  917. package/src/tree-grid/item.tsx +1 -0
  918. package/src/tree-grid/roving-tab-index-item.tsx +1 -0
  919. package/src/tree-grid/row.tsx +1 -0
  920. package/src/tree-grid/stories/index.story.tsx +6 -2
  921. package/src/tree-select/index.tsx +2 -0
  922. package/src/tree-select/stories/index.story.tsx +2 -1
  923. package/src/truncate/stories/index.story.tsx +1 -1
  924. package/src/unit-control/index.tsx +1 -0
  925. package/src/unit-control/stories/index.story.tsx +3 -1
  926. package/src/utils/dropdown-motion.ts +1 -0
  927. package/src/v-stack/stories/e2e/index.story.tsx +1 -1
  928. package/src/v-stack/stories/index.story.tsx +1 -1
  929. package/src/validated-form-controls/components/checkbox-control.tsx +1 -0
  930. package/src/validated-form-controls/components/combobox-control.tsx +1 -0
  931. package/src/validated-form-controls/components/custom-select-control.tsx +1 -0
  932. package/src/validated-form-controls/components/form-token-field.tsx +1 -0
  933. package/src/validated-form-controls/components/input-control.tsx +1 -0
  934. package/src/validated-form-controls/components/number-control.tsx +1 -0
  935. package/src/validated-form-controls/components/radio-control.tsx +1 -0
  936. package/src/validated-form-controls/components/range-control.tsx +1 -0
  937. package/src/validated-form-controls/components/select-control.tsx +1 -0
  938. package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
  939. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
  940. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
  941. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
  942. package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
  943. package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
  944. package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
  945. package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
  946. package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
  947. package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
  948. package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
  949. package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
  950. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
  951. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
  952. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
  953. package/src/validated-form-controls/components/text-control.tsx +1 -0
  954. package/src/validated-form-controls/components/textarea-control.tsx +1 -0
  955. package/src/validated-form-controls/components/toggle-control.tsx +1 -0
  956. package/src/validated-form-controls/components/toggle-group-control.tsx +1 -0
  957. package/src/validated-form-controls/control-with-error.tsx +1 -0
  958. package/src/view/stories/index.story.tsx +1 -1
  959. package/src/visually-hidden/stories/index.story.tsx +1 -1
  960. package/src/z-stack/stories/index.story.tsx +1 -1
  961. package/build/slot-fill/bubbles-virtually/fill.cjs +0 -63
  962. package/build/slot-fill/bubbles-virtually/fill.cjs.map +0 -7
  963. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs +0 -59
  964. package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs.map +0 -7
  965. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs +0 -105
  966. package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs.map +0 -7
  967. package/build-module/slot-fill/bubbles-virtually/fill.mjs +0 -32
  968. package/build-module/slot-fill/bubbles-virtually/fill.mjs.map +0 -7
  969. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs +0 -28
  970. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs.map +0 -7
  971. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs +0 -74
  972. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs.map +0 -7
  973. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -3
  974. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +0 -1
  975. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -7
  976. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +0 -1
  977. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -3
  978. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +0 -1
  979. package/src/slot-fill/bubbles-virtually/fill.tsx +0 -50
  980. package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +0 -34
  981. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +0 -106
  982. package/src/slot-fill/fill.ts +0 -32
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/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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AsB;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;"],
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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,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
6
6
  "names": ["namesPlugin", "a11yPlugin", "_jsx", "CircularOptionPicker", "_jsxs", "Dropdown", "DropdownContentWrapper", "clsx"]
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
  }
@@ -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,EACA,SAAS;AACP,WAAO,KAAK,MAAM;AAAA,EACpB;AACF,CAAC;AACD,IAAM,+BAA+B,CAAC,oBAAoB,wBAAwB,uBAAuB,OAAO,KAAK,oBAAoB,QAAQ,kBAAkB;AAmDnK,SAAS,gBAAgB,OAAO;AAC9B,MAAI;AACJ,QAAM;AAAA,IACJ,wBAAwB;AAAA,IACxB,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV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AC9C;AAAA,UACA,UAAU,CAAc,uCAAAH,KAAK,uBAAW;AAAA,YACtC,UAAuB,uCAAAA,KAAK,mBAAAI,SAAY;AAAA,cACtC,WAAW;AAAA,cACX;AAAA,cACA,KAAK;AAAA,cACL;AAAA,cACA,OAAO,aAAa,aAAa;AAAA,cACjC;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA,yBAAyB,6BAA6B,oBAAoB,mBAAmB;AAAA,cAC7F,UAAU;AAAA,YACZ,CAAC;AAAA,UACH,CAAC,GAAG,aAA0B,uCAAAJ,KAAK,eAAAK,SAAS,CAAC,CAAC,GAAG,cAAc,QAAQ,KAAK,KAAK,CAAC,cAA2B,uCAAAL,KAAK,cAAAM,SAAQ;AAAA,YACxH,MAAM;AAAA,YACN,MAAM;AAAA,YACN,SAAS;AAAA,YACT,WAAW;AAAA,YACX,WAAO,gBAAG,OAAO;AAAA,UACnB,CAAC,CAAC;AAAA,QACJ,CAAC,GAAG,cAAc,CAAC,aAA0B,uCAAAN,KAAK,wBAAAO,SAAiB;AAAA,UACjE;AAAA,UAKA,OAAO;AAAA,YACL,OAAO;AAAA,YACP,OAAO;AAAA,UACT;AAAA,UACA,kBAAkB,gBAAc,WAAW;AAAA,UAC3C,aAAa;AAAA,UACb,eAAe,6BAA6B,oBAAoB,mBAAmB;AAAA,UACnF,SAAS;AAAA,UACT,UAAU;AAAA,UACV,gBAAgB;AAAA,UAChB;AAAA,QACF,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,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 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,MAAM,+BAA+B,yBAAU;AAAA,EACpF,mBAAmB,OAAO;AACxB,SAAK,MAAM,eAAe,KAAK;AAAA,EACjC;AAAA,EACA,SAAS;AACP,WAAO,KAAK,MAAM;AAAA,EACpB;AACF,CAAC;AACD,IAAM,+BAA+B,CAAC,oBAA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sxs", "TokenInput", "Spinner", "Button", "SuggestionsList"]
7
7
  }
@@ -36,7 +36,7 @@ __export(context_system_provider_exports, {
36
36
  });
37
37
  module.exports = __toCommonJS(context_system_provider_exports);
38
38
  var import_deepmerge = __toESM(require("deepmerge"));
39
- var import_es6 = __toESM(require("fast-deep-equal/es6"));
39
+ var import_es6 = __toESM(require("fast-deep-equal/es6/index.js"));
40
40
  var import_is_plain_object = require("is-plain-object");
41
41
  var import_element = require("@wordpress/element");
42
42
  var import_warning = __toESM(require("@wordpress/warning"));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/context/context-system-provider.js"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport deepmerge from 'deepmerge';\nimport fastDeepEqual from 'fast-deep-equal/es6';\nimport { isPlainObject } from 'is-plain-object';\n\n/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useRef, useMemo, memo } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useUpdateEffect } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComponentsContext = createContext(/** @type {Record<string, any>} */{});\nComponentsContext.displayName = 'ComponentsContext';\nexport const useComponentsContext = () => useContext(ComponentsContext);\n\n/**\n * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.\n *\n * Note: This function will warn if it detects an un-memoized `value`\n *\n * @param {Object} props\n * @param {Record<string, any>} props.value\n * @return {Record<string, any>} The consolidated value.\n */\nfunction useContextSystemBridge({\n value\n}) {\n const parentContext = useComponentsContext();\n const valueRef = useRef(value);\n useUpdateEffect(() => {\n if (\n // Objects are equivalent.\n fastDeepEqual(valueRef.current, value) &&\n // But not the same reference.\n valueRef.current !== value) {\n globalThis.SCRIPT_DEBUG === true ? warn(`Please memoize your context: ${JSON.stringify(value)}`) : void 0;\n }\n }, [value]);\n\n // `parentContext` will always be memoized (i.e., the result of this hook itself)\n // or the default value from when the `ComponentsContext` was originally\n // initialized (which will never change, it's a static variable)\n // so this memoization will prevent `deepmerge()` from rerunning unless\n // the references to `value` change OR the `parentContext` has an actual material change\n // (because again, it's guaranteed to be memoized or a static reference to the empty object\n // so we know that the only changes for `parentContext` are material ones... i.e., why we\n // don't have to warn in the `useUpdateEffect` hook above for `parentContext` and we only\n // need to bother with the `value`). The `useUpdateEffect` above will ensure that we are\n // correctly warning when the `value` isn't being properly memoized. All of that to say\n // that this should be super safe to assume that `useMemo` will only run on actual\n // changes to the two dependencies, therefore saving us calls to `deepmerge()`!\n const config = useMemo(() => {\n // Deep clone `parentContext` to avoid mutating it later.\n return deepmerge(parentContext !== null && parentContext !== void 0 ? parentContext : {}, value !== null && value !== void 0 ? value : {}, {\n isMergeableObject: isPlainObject\n });\n }, [parentContext, value]);\n return config;\n}\n\n/**\n * A Provider component that can modify props for connected components within\n * the Context system.\n *\n * @example\n * ```jsx\n * <ContextSystemProvider value={{ Button: { size: 'small' }}}>\n * <Button>...</Button>\n * </ContextSystemProvider>\n * ```\n *\n * @template {Record<string, any>} T\n * @param {Object} options\n * @param {import('react').ReactNode} options.children Children to render.\n * @param {T} options.value Props to render into connected components.\n * @return {JSX.Element} A Provider wrapped component.\n */\nconst BaseContextSystemProvider = ({\n children,\n value\n}) => {\n const contextValue = useContextSystemBridge({\n value\n });\n return /*#__PURE__*/_jsx(ComponentsContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nexport const ContextSystemProvider = memo(BaseContextSystemProvider);"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAsB;AACtB,iBAA0B;AAC1B,6BAA8B;AAK9B,qBAAiE;AACjE,qBAAiB;AAKjB,mBAAgC;AAChC,yBAA4B;AACrB,IAAM,wBAAoB;AAAA;AAAA,EAAgD,CAAC;AAAC;AACnF,kBAAkB,cAAc;AACzB,IAAM,uBAAuB,UAAM,2BAAW,iBAAiB;AAWtE,SAAS,uBAAuB;AAAA,EAC9B;AACF,GAAG;AACD,QAAM,gBAAgB,qBAAqB;AAC3C,QAAM,eAAW,uBAAO,KAAK;AAC7B,oCAAgB,MAAM;AACpB;AAAA;AAAA,UAEA,WAAAA,SAAc,SAAS,SAAS,KAAK;AAAA,MAErC,SAAS,YAAY;AAAA,MAAO;AAC1B,iBAAW,iBAAiB,WAAO,eAAAC,SAAK,gCAAgC,KAAK,UAAU,KAAK,CAAC,EAAE,IAAI;AAAA,IACrG;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAcV,QAAM,aAAS,wBAAQ,MAAM;AAE3B,eAAO,iBAAAC,SAAU,kBAAkB,QAAQ,kBAAkB,SAAS,gBAAgB,CAAC,GAAG,UAAU,QAAQ,UAAU,SAAS,QAAQ,CAAC,GAAG;AAAA,MACzI,mBAAmB;AAAA,IACrB,CAAC;AAAA,EACH,GAAG,CAAC,eAAe,KAAK,CAAC;AACzB,SAAO;AACT;AAmBA,IAAM,4BAA4B,CAAC;AAAA,EACjC;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe,uBAAuB;AAAA,IAC1C;AAAA,EACF,CAAC;AACD,SAAoB,uCAAAC,KAAK,kBAAkB,UAAU;AAAA,IACnD,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACH;AACO,IAAM,4BAAwB,qBAAK,yBAAyB;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport deepmerge from 'deepmerge';\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n// @ts-expect-error https://github.com/jonschlinkert/is-plain-object/pull/47\nimport { isPlainObject } from 'is-plain-object';\n\n/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useRef, useMemo, memo } from '@wordpress/element';\nimport warn from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { useUpdateEffect } from '../utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ComponentsContext = createContext(/** @type {Record<string, any>} */{});\nComponentsContext.displayName = 'ComponentsContext';\nexport const useComponentsContext = () => useContext(ComponentsContext);\n\n/**\n * Consolidates incoming ContextSystem values with a (potential) parent ContextSystem value.\n *\n * Note: This function will warn if it detects an un-memoized `value`\n *\n * @param {Object} props\n * @param {Record<string, any>} props.value\n * @return {Record<string, any>} The consolidated value.\n */\nfunction useContextSystemBridge({\n value\n}) {\n const parentContext = useComponentsContext();\n const valueRef = useRef(value);\n useUpdateEffect(() => {\n if (\n // Objects are equivalent.\n fastDeepEqual(valueRef.current, value) &&\n // But not the same reference.\n valueRef.current !== value) {\n globalThis.SCRIPT_DEBUG === true ? warn(`Please memoize your context: ${JSON.stringify(value)}`) : void 0;\n }\n }, [value]);\n\n // `parentContext` will always be memoized (i.e., the result of this hook itself)\n // or the default value from when the `ComponentsContext` was originally\n // initialized (which will never change, it's a static variable)\n // so this memoization will prevent `deepmerge()` from rerunning unless\n // the references to `value` change OR the `parentContext` has an actual material change\n // (because again, it's guaranteed to be memoized or a static reference to the empty object\n // so we know that the only changes for `parentContext` are material ones... i.e., why we\n // don't have to warn in the `useUpdateEffect` hook above for `parentContext` and we only\n // need to bother with the `value`). The `useUpdateEffect` above will ensure that we are\n // correctly warning when the `value` isn't being properly memoized. All of that to say\n // that this should be super safe to assume that `useMemo` will only run on actual\n // changes to the two dependencies, therefore saving us calls to `deepmerge()`!\n const config = useMemo(() => {\n // Deep clone `parentContext` to avoid mutating it later.\n return deepmerge(parentContext !== null && parentContext !== void 0 ? parentContext : {}, value !== null && value !== void 0 ? value : {}, {\n isMergeableObject: isPlainObject\n });\n }, [parentContext, value]);\n return config;\n}\n\n/**\n * A Provider component that can modify props for connected components within\n * the Context system.\n *\n * @example\n * ```jsx\n * <ContextSystemProvider value={{ Button: { size: 'small' }}}>\n * <Button>...</Button>\n * </ContextSystemProvider>\n * ```\n *\n * @template {Record<string, any>} T\n * @param {Object} options\n * @param {import('react').ReactNode} options.children Children to render.\n * @param {T} options.value Props to render into connected components.\n * @return {JSX.Element} A Provider wrapped component.\n */\nconst BaseContextSystemProvider = ({\n children,\n value\n}) => {\n const contextValue = useContextSystemBridge({\n value\n });\n return /*#__PURE__*/_jsx(ComponentsContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nexport const ContextSystemProvider = memo(BaseContextSystemProvider);"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAsB;AACtB,iBAA0B;AAE1B,6BAA8B;AAK9B,qBAAiE;AACjE,qBAAiB;AAKjB,mBAAgC;AAChC,yBAA4B;AACrB,IAAM,wBAAoB;AAAA;AAAA,EAAgD,CAAC;AAAC;AACnF,kBAAkB,cAAc;AACzB,IAAM,uBAAuB,UAAM,2BAAW,iBAAiB;AAWtE,SAAS,uBAAuB;AAAA,EAC9B;AACF,GAAG;AACD,QAAM,gBAAgB,qBAAqB;AAC3C,QAAM,eAAW,uBAAO,KAAK;AAC7B,oCAAgB,MAAM;AACpB;AAAA;AAAA,UAEA,WAAAA,SAAc,SAAS,SAAS,KAAK;AAAA,MAErC,SAAS,YAAY;AAAA,MAAO;AAC1B,iBAAW,iBAAiB,WAAO,eAAAC,SAAK,gCAAgC,KAAK,UAAU,KAAK,CAAC,EAAE,IAAI;AAAA,IACrG;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AAcV,QAAM,aAAS,wBAAQ,MAAM;AAE3B,eAAO,iBAAAC,SAAU,kBAAkB,QAAQ,kBAAkB,SAAS,gBAAgB,CAAC,GAAG,UAAU,QAAQ,UAAU,SAAS,QAAQ,CAAC,GAAG;AAAA,MACzI,mBAAmB;AAAA,IACrB,CAAC;AAAA,EACH,GAAG,CAAC,eAAe,KAAK,CAAC;AACzB,SAAO;AACT;AAmBA,IAAM,4BAA4B,CAAC;AAAA,EACjC;AAAA,EACA;AACF,MAAM;AACJ,QAAM,eAAe,uBAAuB;AAAA,IAC1C;AAAA,EACF,CAAC;AACD,SAAoB,uCAAAC,KAAK,kBAAkB,UAAU;AAAA,IACnD,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACH;AACO,IAAM,4BAAwB,qBAAK,yBAAyB;",
6
6
  "names": ["fastDeepEqual", "warn", "deepmerge", "_jsx"]
7
7
  }
@@ -75,6 +75,7 @@ function UnforwardedDateTimePicker({
75
75
  });
76
76
  }
77
77
  var DateTimePicker = (0, import_element.forwardRef)(UnforwardedDateTimePicker);
78
+ DateTimePicker.displayName = "DateTimePicker";
78
79
  var date_time_default = DateTimePicker;
79
80
  // Annotate the CommonJS export names for ESM import in node:
80
81
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/date-time/date-time/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport { Wrapper } from './styles';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport { DatePicker, TimePicker };\nconst noop = () => {};\nfunction UnforwardedDateTimePicker({\n currentDate,\n is12Hour,\n dateOrder,\n isInvalidDate,\n onMonthPreviewed = noop,\n onChange,\n events,\n startOfWeek\n}, ref) {\n return /*#__PURE__*/_jsx(Wrapper, {\n ref: ref,\n className: \"components-datetime\",\n spacing: 4,\n children: /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(TimePicker, {\n currentTime: currentDate,\n onChange: onChange,\n is12Hour: is12Hour,\n dateOrder: dateOrder\n }), /*#__PURE__*/_jsx(DatePicker, {\n currentDate: currentDate,\n onChange: onChange,\n isInvalidDate: isInvalidDate,\n events: events,\n onMonthPreviewed: onMonthPreviewed,\n startOfWeek: startOfWeek\n })]\n })\n });\n}\n\n/**\n * DateTimePicker is a React component that renders a calendar and clock for\n * date and time selection. The calendar and clock components can be accessed\n * individually using the `DatePicker` and `TimePicker` components respectively.\n *\n * ```jsx\n * import { DateTimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDateTimePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DateTimePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef(UnforwardedDateTimePicker);\nexport default DateTimePicker;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA;AAAA,gCAAAC;AAAA,EAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,kBAAsC;AACtC,kBAAsC;AACtC,oBAAwB;AACxB,yBAAkE;AAElE,IAAM,OAAO,MAAM;AAAC;AACpB,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,SAAoB,uCAAAC,KAAK,uBAAS;AAAA,IAChC;AAAA,IACA,WAAW;AAAA,IACX,SAAS;AAAA,IACT,UAAuB,uCAAAC,MAAM,mBAAAC,UAAW;AAAA,MACtC,UAAU,CAAc,uCAAAF,KAAK,YAAAG,SAAY;AAAA,QACvC,aAAa;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,GAAgB,uCAAAH,KAAK,YAAAI,SAAY;AAAA,QAChC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AAwBO,IAAM,qBAAiB,2BAAW,yBAAyB;AAClE,IAAO,oBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { default as DatePicker } from '../date';\nimport { default as TimePicker } from '../time';\nimport { Wrapper } from './styles';\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport { DatePicker, TimePicker };\nconst noop = () => {};\nfunction UnforwardedDateTimePicker({\n currentDate,\n is12Hour,\n dateOrder,\n isInvalidDate,\n onMonthPreviewed = noop,\n onChange,\n events,\n startOfWeek\n}, ref) {\n return /*#__PURE__*/_jsx(Wrapper, {\n ref: ref,\n className: \"components-datetime\",\n spacing: 4,\n children: /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(TimePicker, {\n currentTime: currentDate,\n onChange: onChange,\n is12Hour: is12Hour,\n dateOrder: dateOrder\n }), /*#__PURE__*/_jsx(DatePicker, {\n currentDate: currentDate,\n onChange: onChange,\n isInvalidDate: isInvalidDate,\n events: events,\n onMonthPreviewed: onMonthPreviewed,\n startOfWeek: startOfWeek\n })]\n })\n });\n}\n\n/**\n * DateTimePicker is a React component that renders a calendar and clock for\n * date and time selection. The calendar and clock components can be accessed\n * individually using the `DatePicker` and `TimePicker` components respectively.\n *\n * ```jsx\n * import { DateTimePicker } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyDateTimePicker = () => {\n * const [ date, setDate ] = useState( new Date() );\n *\n * return (\n * <DateTimePicker\n * currentDate={ date }\n * onChange={ ( newDate ) => setDate( newDate ) }\n * is12Hour\n * />\n * );\n * };\n * ```\n */\nexport const DateTimePicker = forwardRef(UnforwardedDateTimePicker);\nDateTimePicker.displayName = 'DateTimePicker';\nexport default DateTimePicker;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA;AAAA,gCAAAC;AAAA,EAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,kBAAsC;AACtC,kBAAsC;AACtC,oBAAwB;AACxB,yBAAkE;AAElE,IAAM,OAAO,MAAM;AAAC;AACpB,SAAS,0BAA0B;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,SAAoB,uCAAAC,KAAK,uBAAS;AAAA,IAChC;AAAA,IACA,WAAW;AAAA,IACX,SAAS;AAAA,IACT,UAAuB,uCAAAC,MAAM,mBAAAC,UAAW;AAAA,MACtC,UAAU,CAAc,uCAAAF,KAAK,YAAAG,SAAY;AAAA,QACvC,aAAa;AAAA,QACb;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,GAAgB,uCAAAH,KAAK,YAAAI,SAAY;AAAA,QAChC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AAwBO,IAAM,qBAAiB,2BAAW,yBAAyB;AAClE,eAAe,cAAc;AAC7B,IAAO,oBAAQ;",
6
6
  "names": ["DatePicker", "TimePicker", "_jsx", "_jsxs", "_Fragment", "TimePicker", "DatePicker"]
7
7
  }
@@ -53,6 +53,7 @@ var UnforwardedDisclosureContent = ({
53
53
  });
54
54
  };
55
55
  var DisclosureContent2 = (0, import_element.forwardRef)(UnforwardedDisclosureContent);
56
+ DisclosureContent2.displayName = "DisclosureContent";
56
57
  var disclosure_default = DisclosureContent2;
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/disclosure/index.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 */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n */\nconst UnforwardedDisclosureContent = ({\n visible,\n children,\n ...props\n}, ref) => {\n const disclosure = Ariakit.useDisclosureStore({\n open: visible\n });\n return /*#__PURE__*/_jsx(Ariakit.DisclosureContent, {\n store: disclosure,\n ref: ref,\n ...props,\n children: children\n });\n};\nexport const DisclosureContent = forwardRef(UnforwardedDisclosureContent);\nexport default DisclosureContent;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA2B;AAK3B,yBAA4B;AAK5B,IAAM,+BAA+B,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,QAAQ;AACT,QAAM,aAAqB,2BAAmB;AAAA,IAC5C,MAAM;AAAA,EACR,CAAC;AACD,SAAoB,uCAAAC,KAAa,2BAAmB;AAAA,IAClD,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;AACO,IAAMD,yBAAoB,2BAAW,4BAA4B;AACxE,IAAO,qBAAQA;",
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 */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n */\nconst UnforwardedDisclosureContent = ({\n visible,\n children,\n ...props\n}, ref) => {\n const disclosure = Ariakit.useDisclosureStore({\n open: visible\n });\n return /*#__PURE__*/_jsx(Ariakit.DisclosureContent, {\n store: disclosure,\n ref: ref,\n ...props,\n children: children\n });\n};\nexport const DisclosureContent = forwardRef(UnforwardedDisclosureContent);\nDisclosureContent.displayName = 'DisclosureContent';\nexport default DisclosureContent;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,2BAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA2B;AAK3B,yBAA4B;AAK5B,IAAM,+BAA+B,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,QAAQ;AACT,QAAM,aAAqB,2BAAmB;AAAA,IAC5C,MAAM;AAAA,EACR,CAAC;AACD,SAAoB,uCAAAC,KAAa,2BAAmB;AAAA,IAClD,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;AACO,IAAMD,yBAAoB,2BAAW,4BAA4B;AACxEA,mBAAkB,cAAc;AAChC,IAAO,qBAAQA;",
6
6
  "names": ["DisclosureContent", "_jsx"]
7
7
  }
@@ -33,7 +33,7 @@ __export(duotone_picker_exports, {
33
33
  default: () => duotone_picker_default
34
34
  });
35
35
  module.exports = __toCommonJS(duotone_picker_exports);
36
- var import_es6 = __toESM(require("fast-deep-equal/es6"));
36
+ var import_es6 = __toESM(require("fast-deep-equal/es6/index.js"));
37
37
  var import_element = require("@wordpress/element");
38
38
  var import_i18n = require("@wordpress/i18n");
39
39
  var import_color_list_picker = __toESM(require("./color-list-picker/index.cjs"));
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/duotone-picker/duotone-picker.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorListPicker from './color-list-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport CustomDuotoneBar from './custom-duotone-bar';\nimport { getDefaultColors, getGradientFromCSSColors } from './utils';\nimport { Spacer } from '../spacer';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * ```jsx\n * import { DuotonePicker, DuotoneSwatch } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const DUOTONE_PALETTE = [\n * \t{ colors: [ '#8c00b7', '#fcff41' ], name: 'Purple and yellow', slug: 'purple-yellow' },\n * \t{ colors: [ '#000097', '#ff4747' ], name: 'Blue and red', slug: 'blue-red' },\n * ];\n *\n * const COLOR_PALETTE = [\n * \t{ color: '#ff4747', name: 'Red', slug: 'red' },\n * \t{ color: '#fcff41', name: 'Yellow', slug: 'yellow' },\n * \t{ color: '#000097', name: 'Blue', slug: 'blue' },\n * \t{ color: '#8c00b7', name: 'Purple', slug: 'purple' },\n * ];\n *\n * const Example = () => {\n * \tconst [ duotone, setDuotone ] = useState( [ '#000000', '#ffffff' ] );\n * \treturn (\n * \t\t<>\n * \t\t\t<DuotonePicker\n * \t\t\t\tduotonePalette={ DUOTONE_PALETTE }\n * \t\t\t\tcolorPalette={ COLOR_PALETTE }\n * \t\t\t\tvalue={ duotone }\n * \t\t\t\tonChange={ setDuotone }\n * \t\t\t/>\n * \t\t\t<DuotoneSwatch values={ duotone } />\n * \t\t</>\n * \t);\n * };\n * ```\n */\nfunction DuotonePicker({\n asButtons,\n loop,\n clearable = true,\n unsetable = true,\n colorPalette,\n duotonePalette,\n disableCustomColors,\n disableCustomDuotone,\n value,\n onChange,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n}) {\n const [defaultDark, defaultLight] = useMemo(() => getDefaultColors(colorPalette), [colorPalette]);\n const isUnset = value === 'unset';\n const unsetOptionLabel = __('Unset');\n const unsetOption = /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n value: \"unset\",\n isSelected: isUnset,\n tooltipText: unsetOptionLabel,\n \"aria-label\": unsetOptionLabel,\n className: \"components-duotone-picker__color-indicator\",\n onClick: () => {\n onChange(isUnset ? undefined : 'unset');\n }\n }, \"unset\");\n const duotoneOptions = duotonePalette.map(({\n colors,\n slug,\n name\n }) => {\n const style = {\n background: getGradientFromCSSColors(colors, '135deg'),\n color: 'transparent'\n };\n const tooltipText = name !== null && name !== void 0 ? name : sprintf(\n // translators: %s: duotone code e.g: \"dark-grayscale\" or \"7f7f7f-ffffff\".\n __('Duotone code: %s'), slug);\n const label = name ? sprintf(\n // translators: %s: The name of the option e.g: \"Dark grayscale\".\n __('Duotone: %s'), name) : tooltipText;\n const isSelected = fastDeepEqual(colors, value);\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n value: colors,\n isSelected: isSelected,\n \"aria-label\": label,\n tooltipText: tooltipText,\n style: style,\n onClick: () => {\n onChange(isSelected ? undefined : colors);\n }\n }, slug);\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n const options = unsetable ? [unsetOption, ...duotoneOptions] : duotoneOptions;\n return /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...otherProps,\n ...metaProps,\n ...labelProps,\n options: options,\n actions: !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: () => onChange(undefined),\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n }),\n children: /*#__PURE__*/_jsx(Spacer, {\n paddingTop: options.length === 0 ? 0 : 4,\n children: /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n children: [!disableCustomColors && !disableCustomDuotone && /*#__PURE__*/_jsx(CustomDuotoneBar, {\n value: isUnset ? undefined : value,\n onChange: onChange\n }), !disableCustomDuotone && /*#__PURE__*/_jsx(ColorListPicker, {\n labels: [__('Shadows'), __('Highlights')],\n colors: colorPalette,\n value: isUnset ? undefined : value,\n disableCustomColors: disableCustomColors,\n enableAlpha: true,\n onChange: newColors => {\n if (!newColors[0]) {\n newColors[0] = defaultDark;\n }\n if (!newColors[1]) {\n newColors[1] = defaultLight;\n }\n const newValue = newColors.length >= 2 ? newColors : undefined;\n // @ts-expect-error TODO: The color arrays for a DuotonePicker should be a tuple of two colors,\n // but it's currently typed as a string[].\n // See also https://github.com/WordPress/gutenberg/pull/49060#discussion_r1136951035\n onChange(newValue);\n }\n })]\n })\n })\n });\n}\nexport default DuotonePicker;"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorListPicker from './color-list-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport CustomDuotoneBar from './custom-duotone-bar';\nimport { getDefaultColors, getGradientFromCSSColors } from './utils';\nimport { Spacer } from '../spacer';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * ```jsx\n * import { DuotonePicker, DuotoneSwatch } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const DUOTONE_PALETTE = [\n * \t{ colors: [ '#8c00b7', '#fcff41' ], name: 'Purple and yellow', slug: 'purple-yellow' },\n * \t{ colors: [ '#000097', '#ff4747' ], name: 'Blue and red', slug: 'blue-red' },\n * ];\n *\n * const COLOR_PALETTE = [\n * \t{ color: '#ff4747', name: 'Red', slug: 'red' },\n * \t{ color: '#fcff41', name: 'Yellow', slug: 'yellow' },\n * \t{ color: '#000097', name: 'Blue', slug: 'blue' },\n * \t{ color: '#8c00b7', name: 'Purple', slug: 'purple' },\n * ];\n *\n * const Example = () => {\n * \tconst [ duotone, setDuotone ] = useState( [ '#000000', '#ffffff' ] );\n * \treturn (\n * \t\t<>\n * \t\t\t<DuotonePicker\n * \t\t\t\tduotonePalette={ DUOTONE_PALETTE }\n * \t\t\t\tcolorPalette={ COLOR_PALETTE }\n * \t\t\t\tvalue={ duotone }\n * \t\t\t\tonChange={ setDuotone }\n * \t\t\t/>\n * \t\t\t<DuotoneSwatch values={ duotone } />\n * \t\t</>\n * \t);\n * };\n * ```\n */\nfunction DuotonePicker({\n asButtons,\n loop,\n clearable = true,\n unsetable = true,\n colorPalette,\n duotonePalette,\n disableCustomColors,\n disableCustomDuotone,\n value,\n onChange,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n}) {\n const [defaultDark, defaultLight] = useMemo(() => getDefaultColors(colorPalette), [colorPalette]);\n const isUnset = value === 'unset';\n const unsetOptionLabel = __('Unset');\n const unsetOption = /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n value: \"unset\",\n isSelected: isUnset,\n tooltipText: unsetOptionLabel,\n \"aria-label\": unsetOptionLabel,\n className: \"components-duotone-picker__color-indicator\",\n onClick: () => {\n onChange(isUnset ? undefined : 'unset');\n }\n }, \"unset\");\n const duotoneOptions = duotonePalette.map(({\n colors,\n slug,\n name\n }) => {\n const style = {\n background: getGradientFromCSSColors(colors, '135deg'),\n color: 'transparent'\n };\n const tooltipText = name !== null && name !== void 0 ? name : sprintf(\n // translators: %s: duotone code e.g: \"dark-grayscale\" or \"7f7f7f-ffffff\".\n __('Duotone code: %s'), slug);\n const label = name ? sprintf(\n // translators: %s: The name of the option e.g: \"Dark grayscale\".\n __('Duotone: %s'), name) : tooltipText;\n const isSelected = fastDeepEqual(colors, value);\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n value: colors,\n isSelected: isSelected,\n \"aria-label\": label,\n tooltipText: tooltipText,\n style: style,\n onClick: () => {\n onChange(isSelected ? undefined : colors);\n }\n }, slug);\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n const options = unsetable ? [unsetOption, ...duotoneOptions] : duotoneOptions;\n return /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...otherProps,\n ...metaProps,\n ...labelProps,\n options: options,\n actions: !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: () => onChange(undefined),\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n }),\n children: /*#__PURE__*/_jsx(Spacer, {\n paddingTop: options.length === 0 ? 0 : 4,\n children: /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n children: [!disableCustomColors && !disableCustomDuotone && /*#__PURE__*/_jsx(CustomDuotoneBar, {\n value: isUnset ? undefined : value,\n onChange: onChange\n }), !disableCustomDuotone && /*#__PURE__*/_jsx(ColorListPicker, {\n labels: [__('Shadows'), __('Highlights')],\n colors: colorPalette,\n value: isUnset ? undefined : value,\n disableCustomColors: disableCustomColors,\n enableAlpha: true,\n onChange: newColors => {\n if (!newColors[0]) {\n newColors[0] = defaultDark;\n }\n if (!newColors[1]) {\n newColors[1] = defaultLight;\n }\n const newValue = newColors.length >= 2 ? newColors : undefined;\n // @ts-expect-error TODO: The color arrays for a DuotonePicker should be a tuple of two colors,\n // but it's currently typed as a string[].\n // See also https://github.com/WordPress/gutenberg/pull/49060#discussion_r1136951035\n onChange(newValue);\n }\n })]\n })\n })\n });\n}\nexport default DuotonePicker;"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAA0B;AAK1B,qBAAwB;AACxB,kBAA4B;AAK5B,+BAA4B;AAC5B,oCAAgF;AAChF,qBAAuB;AACvB,gCAA6B;AAC7B,mBAA2D;AAC3D,oBAAuB;AACvB,yBAA2C;AAkC3C,SAAS,cAAc;AAAA,EACrB;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,GAAG;AACL,GAAG;AACD,QAAM,CAAC,aAAa,YAAY,QAAI,wBAAQ,UAAM,+BAAiB,YAAY,GAAG,CAAC,YAAY,CAAC;AAChG,QAAM,UAAU,UAAU;AAC1B,QAAM,uBAAmB,gBAAG,OAAO;AACn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MACjC,wBAAwB;AAAA,MACxB,UAAU,CAAC;AAAA,MACX,cAAU,gBAAG,OAAO;AAAA,IACtB,CAAC;AAAA,IACD,UAAuB,uCAAAD,KAAK,sBAAQ;AAAA,MAClC,YAAY,QAAQ,WAAW,IAAI,IAAI;AAAA,MACvC,UAAuB,uCAAAG,MAAM,uBAAQ;AAAA,QACnC,SAAS;AAAA,QACT,UAAU,CAAC,CAAC,uBAAuB,CAAC,wBAAqC,uCAAAH,KAAK,0BAAAI,SAAkB;AAAA,UAC9F,OAAO,UAAU,SAAY;AAAA,UAC7B;AAAA,QACF,CAAC,GAAG,CAAC,wBAAqC,uCAAAJ,KAAK,yBAAAK,SAAiB;AAAA,UAC9D,QAAQ,KAAC,gBAAG,SAAS,OAAG,gBAAG,YAAY,CAAC;AAAA,UACxC,QAAQ;AAAA,UACR,OAAO,UAAU,SAAY;AAAA,UAC7B;AAAA,UACA,aAAa;AAAA,UACb,UAAU,eAAa;AACrB,gBAAI,CAAC,UAAU,CAAC,GAAG;AACjB,wBAAU,CAAC,IAAI;AAAA,YACjB;AACA,gBAAI,CAAC,UAAU,CAAC,GAAG;AACjB,wBAAU,CAAC,IAAI;AAAA,YACjB;AACA,kBAAM,WAAW,UAAU,UAAU,IAAI,YAAY;AAIrD,qBAAS,QAAQ;AAAA,UACnB;AAAA,QACF,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AACA,IAAO,yBAAQ;",
6
6
  "names": ["_jsx", "CircularOptionPicker", "fastDeepEqual", "_jsxs", "CustomDuotoneBar", "ColorListPicker"]
7
7
  }
@@ -82,6 +82,7 @@ function UnforwardedExternalLink(props, ref) {
82
82
  );
83
83
  }
84
84
  var ExternalLink = (0, import_element.forwardRef)(UnforwardedExternalLink);
85
+ ExternalLink.displayName = "ExternalLink";
85
86
  var external_link_default = ExternalLink;
86
87
  // Annotate the CommonJS export names for ESM import in node:
87
88
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/external-link/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedExternalLink(props, ref) {\n const {\n href,\n children,\n className,\n rel = '',\n ...additionalProps\n } = props;\n const optimizedRel = [...new Set([...rel.split(' '), 'external', 'noreferrer', 'noopener'].filter(Boolean))].join(' ');\n const classes = clsx('components-external-link', className);\n /* Anchor links are perceived as external links.\n This constant helps check for on page anchor links,\n to prevent them from being opened in the editor. */\n const isInternalAnchor = !!href?.startsWith('#');\n const onClickHandler = event => {\n if (isInternalAnchor) {\n event.preventDefault();\n }\n if (props.onClick) {\n props.onClick(event);\n }\n };\n return /*#__PURE__*/ /* eslint-disable react/jsx-no-target-blank */_jsxs(\"a\", {\n ...additionalProps,\n className: classes,\n href: href,\n onClick: onClickHandler,\n target: \"_blank\",\n rel: optimizedRel,\n ref: ref,\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-external-link__contents\",\n children: children\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-external-link__icon\",\n \"aria-label\": /* translators: accessibility text */\n __('(opens in a new tab)'),\n children: isRTL() ? '\\u2196' : '\\u2197'\n })]\n })\n /* eslint-enable react/jsx-no-target-blank */;\n}\n\n/**\n * Link to an external resource.\n *\n * ```jsx\n * import { ExternalLink } from '@wordpress/components';\n *\n * const MyExternalLink = () => (\n * <ExternalLink href=\"https://wordpress.org\">WordPress.org</ExternalLink>\n * );\n * ```\n */\nexport const ExternalLink = forwardRef(UnforwardedExternalLink);\nexport default ExternalLink;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,kBAA0B;AAC1B,qBAA2B;AAK3B,yBAA2C;AAC3C,SAAS,wBAAwB,OAAO,KAAK;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,eAAe,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,MAAM,GAAG,GAAG,YAAY,cAAc,UAAU,EAAE,OAAO,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG;AACrH,QAAM,cAAU,YAAAA,SAAK,4BAA4B,SAAS;AAI1D,QAAM,mBAAmB,CAAC,CAAC,MAAM,WAAW,GAAG;AAC/C,QAAM,iBAAiB,WAAS;AAC9B,QAAI,kBAAkB;AACpB,YAAM,eAAe;AAAA,IACvB;AACA,QAAI,MAAM,SAAS;AACjB,YAAM,QAAQ,KAAK;AAAA,IACrB;AAAA,EACF;AACA;AAAA;AAAA,IAAmE,uCAAAC,MAAM,KAAK;AAAA,MAC5E,GAAG;AAAA,MACH,WAAW;AAAA,MACX;AAAA,MACA,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,KAAK;AAAA,MACL;AAAA,MACA,UAAU,CAAc,uCAAAC,KAAK,QAAQ;AAAA,QACnC,WAAW;AAAA,QACX;AAAA,MACF,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,QAC5B,WAAW;AAAA,QACX;AAAA;AAAA,cACA,gBAAG,sBAAsB;AAAA;AAAA,QACzB,cAAU,mBAAM,IAAI,WAAW;AAAA,MACjC,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA;AAEH;AAaO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedExternalLink(props, ref) {\n const {\n href,\n children,\n className,\n rel = '',\n ...additionalProps\n } = props;\n const optimizedRel = [...new Set([...rel.split(' '), 'external', 'noreferrer', 'noopener'].filter(Boolean))].join(' ');\n const classes = clsx('components-external-link', className);\n /* Anchor links are perceived as external links.\n This constant helps check for on page anchor links,\n to prevent them from being opened in the editor. */\n const isInternalAnchor = !!href?.startsWith('#');\n const onClickHandler = event => {\n if (isInternalAnchor) {\n event.preventDefault();\n }\n if (props.onClick) {\n props.onClick(event);\n }\n };\n return /*#__PURE__*/ /* eslint-disable react/jsx-no-target-blank */_jsxs(\"a\", {\n ...additionalProps,\n className: classes,\n href: href,\n onClick: onClickHandler,\n target: \"_blank\",\n rel: optimizedRel,\n ref: ref,\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-external-link__contents\",\n children: children\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-external-link__icon\",\n \"aria-label\": /* translators: accessibility text */\n __('(opens in a new tab)'),\n children: isRTL() ? '\\u2196' : '\\u2197'\n })]\n })\n /* eslint-enable react/jsx-no-target-blank */;\n}\n\n/**\n * Link to an external resource.\n *\n * ```jsx\n * import { ExternalLink } from '@wordpress/components';\n *\n * const MyExternalLink = () => (\n * <ExternalLink href=\"https://wordpress.org\">WordPress.org</ExternalLink>\n * );\n * ```\n */\nexport const ExternalLink = forwardRef(UnforwardedExternalLink);\nExternalLink.displayName = 'ExternalLink';\nexport default ExternalLink;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,kBAA0B;AAC1B,qBAA2B;AAK3B,yBAA2C;AAC3C,SAAS,wBAAwB,OAAO,KAAK;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,eAAe,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,MAAM,GAAG,GAAG,YAAY,cAAc,UAAU,EAAE,OAAO,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG;AACrH,QAAM,cAAU,YAAAA,SAAK,4BAA4B,SAAS;AAI1D,QAAM,mBAAmB,CAAC,CAAC,MAAM,WAAW,GAAG;AAC/C,QAAM,iBAAiB,WAAS;AAC9B,QAAI,kBAAkB;AACpB,YAAM,eAAe;AAAA,IACvB;AACA,QAAI,MAAM,SAAS;AACjB,YAAM,QAAQ,KAAK;AAAA,IACrB;AAAA,EACF;AACA;AAAA;AAAA,IAAmE,uCAAAC,MAAM,KAAK;AAAA,MAC5E,GAAG;AAAA,MACH,WAAW;AAAA,MACX;AAAA,MACA,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,KAAK;AAAA,MACL;AAAA,MACA,UAAU,CAAc,uCAAAC,KAAK,QAAQ;AAAA,QACnC,WAAW;AAAA,QACX;AAAA,MACF,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,QAC5B,WAAW;AAAA,QACX;AAAA;AAAA,cACA,gBAAG,sBAAsB;AAAA;AAAA,QACzB,cAAU,mBAAM,IAAI,WAAW;AAAA,MACjC,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA;AAEH;AAaO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
6
6
  "names": ["clsx", "_jsxs", "_jsx"]
7
7
  }
@@ -215,6 +215,7 @@ var UnforwardedFontSizePicker = (props, ref) => {
215
215
  });
216
216
  };
217
217
  var FontSizePicker = (0, import_element.forwardRef)(UnforwardedFontSizePicker);
218
+ FontSizePicker.displayName = "FontSizePicker";
218
219
  var font_size_picker_default = FontSizePicker;
219
220
  // Annotate the CommonJS export names for ESM import in node:
220
221
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/font-size-picker/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { settings } from '@wordpress/icons';\nimport { useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { Button } from '../button';\nimport RangeControl from '../range-control';\nimport { Flex, FlexItem } from '../flex';\nimport { default as UnitControl, parseQuantityAndUnitFromRawValue, useCustomUnits } from '../unit-control';\nimport { Container, Header, HeaderLabel, HeaderToggle } from './styles';\nimport { Spacer } from '../spacer';\nimport FontSizePickerSelect from './font-size-picker-select';\nimport FontSizePickerToggleGroup from './font-size-picker-toggle-group';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst DEFAULT_UNITS = ['px', 'em', 'rem', 'vw', 'vh'];\nconst MAX_TOGGLE_GROUP_SIZES = 5;\nconst UnforwardedFontSizePicker = (props, ref) => {\n const {\n __next40pxDefaultSize = false,\n fallbackFontSize,\n fontSizes = [],\n disableCustomFontSizes = false,\n onChange,\n size = 'default',\n units: unitsProp = DEFAULT_UNITS,\n value,\n valueMode = 'literal',\n withSlider = false,\n withReset = true\n } = props;\n const labelId = useInstanceId(UnforwardedFontSizePicker, 'font-size-picker-label');\n const units = useCustomUnits({\n availableUnits: unitsProp\n });\n const selectedFontSize = (() => {\n if (!value) {\n return undefined;\n }\n\n // If valueMode is 'slug', find by slug\n if (valueMode === 'slug') {\n return fontSizes.find(fontSize => fontSize.slug === value);\n }\n\n // If valueMode is 'literal', find by size value\n return fontSizes.find(fontSize => fontSize.size === value);\n })();\n const isCustomValue = !!value && !selectedFontSize;\n\n // Initially request a custom picker if the value is not from the predef list.\n const [userRequestedCustom, setUserRequestedCustom] = useState(isCustomValue);\n\n // Resolve the literal value to use in custom controls when operating in slug mode.\n // When `valueMode` is 'slug', the `value` prop contains the slug of the\n // selected preset. In that case, the custom input should reflect the preset's\n // actual size value so it pre-populates correctly after clicking \"Set custom size\".\n const resolvedValueForControls = valueMode === 'slug' ? selectedFontSize?.size : value;\n let currentPickerType;\n if (!disableCustomFontSizes && userRequestedCustom) {\n // While showing the custom value picker, switch back to predef only if\n // `disableCustomFontSizes` is set to `true`.\n currentPickerType = 'custom';\n } else {\n currentPickerType = fontSizes.length > MAX_TOGGLE_GROUP_SIZES ? 'select' : 'togglegroup';\n }\n if (fontSizes.length === 0 && disableCustomFontSizes) {\n return null;\n }\n\n // If neither the value or first font size is a string, then FontSizePicker\n // operates in a legacy \"unitless\" mode where UnitControl can only be used\n // to select px values and onChange() is always called with number values.\n const hasUnits = typeof resolvedValueForControls === 'string' || typeof fontSizes[0]?.size === 'string';\n const [valueQuantity, valueUnit] = parseQuantityAndUnitFromRawValue(resolvedValueForControls, units);\n const isValueUnitRelative = !!valueUnit && ['em', 'rem', 'vw', 'vh'].includes(valueUnit);\n const isDisabled = value === undefined;\n maybeWarnDeprecated36pxSize({\n componentName: 'FontSizePicker',\n __next40pxDefaultSize,\n size\n });\n return /*#__PURE__*/_jsxs(Container, {\n ref: ref,\n className: \"components-font-size-picker\"\n // This Container component renders a fieldset element that needs to be labeled.\n ,\n \"aria-labelledby\": labelId,\n children: [/*#__PURE__*/_jsx(Spacer, {\n children: /*#__PURE__*/_jsxs(Header, {\n className: \"components-font-size-picker__header\",\n children: [/*#__PURE__*/_jsx(HeaderLabel, {\n id: labelId,\n children: __('Font size')\n }), !disableCustomFontSizes && /*#__PURE__*/_jsx(HeaderToggle, {\n label: currentPickerType === 'custom' ? __('Use size preset') : __('Set custom size'),\n icon: settings,\n onClick: () => setUserRequestedCustom(!userRequestedCustom),\n isPressed: currentPickerType === 'custom',\n size: \"small\"\n })]\n })\n }), /*#__PURE__*/_jsxs(\"div\", {\n children: [currentPickerType === 'select' && /*#__PURE__*/_jsx(FontSizePickerSelect, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n fontSizes: fontSizes,\n value: value,\n valueMode: valueMode,\n disableCustomFontSizes: disableCustomFontSizes,\n size: size,\n onChange: (newValue, selectedItem) => {\n if (newValue === undefined) {\n onChange?.(undefined, selectedItem);\n } else {\n onChange?.(hasUnits ? newValue : Number(newValue), selectedItem);\n }\n },\n onSelectCustom: () => setUserRequestedCustom(true)\n }), currentPickerType === 'togglegroup' && /*#__PURE__*/_jsx(FontSizePickerToggleGroup, {\n fontSizes: fontSizes,\n value: value,\n valueMode: valueMode,\n __next40pxDefaultSize: __next40pxDefaultSize,\n size: size,\n onChange: (newValue, selectedItem) => {\n if (newValue === undefined) {\n onChange?.(undefined, selectedItem);\n } else {\n onChange?.(hasUnits ? newValue : Number(newValue), selectedItem);\n }\n }\n }), currentPickerType === 'custom' && /*#__PURE__*/_jsxs(Flex, {\n className: \"components-font-size-picker__custom-size-control\",\n children: [/*#__PURE__*/_jsx(FlexItem, {\n isBlock: true,\n children: /*#__PURE__*/_jsx(UnitControl, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize: true,\n label: __('Font size'),\n labelPosition: \"top\",\n hideLabelFromVision: true,\n value: hasUnits ? `${valueQuantity !== null && valueQuantity !== void 0 ? valueQuantity : ''}${valueUnit !== null && valueUnit !== void 0 ? valueUnit : ''}` : resolvedValueForControls,\n onChange: newValue => {\n setUserRequestedCustom(true);\n\n // Treat clearing the input (empty string) as a reset\n if (newValue === undefined || newValue === '') {\n onChange?.(undefined);\n } else {\n onChange?.(hasUnits ? newValue : parseInt(newValue, 10));\n }\n },\n size: size,\n units: hasUnits ? units : [],\n min: 0\n })\n }), withSlider && /*#__PURE__*/_jsx(FlexItem, {\n isBlock: true,\n children: /*#__PURE__*/_jsx(Spacer, {\n marginX: 2,\n marginBottom: 0,\n children: /*#__PURE__*/_jsx(RangeControl, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize: true,\n className: \"components-font-size-picker__custom-input\",\n label: __('Font size'),\n hideLabelFromVision: true,\n value: valueQuantity,\n initialPosition: fallbackFontSize,\n withInputField: false,\n onChange: newValue => {\n setUserRequestedCustom(true);\n if (newValue === undefined) {\n onChange?.(undefined);\n } else if (hasUnits) {\n onChange?.(newValue + (valueUnit !== null && valueUnit !== void 0 ? valueUnit : 'px'));\n } else {\n onChange?.(newValue);\n }\n },\n min: 0,\n max: isValueUnitRelative ? 10 : 100,\n step: isValueUnitRelative ? 0.1 : 1\n })\n })\n }), withReset && /*#__PURE__*/_jsx(FlexItem, {\n children: /*#__PURE__*/_jsx(Button, {\n disabled: isDisabled,\n accessibleWhenDisabled: true,\n onClick: () => {\n onChange?.(undefined);\n },\n variant: \"secondary\",\n __next40pxDefaultSize: true,\n size: size === '__unstable-large' || props.__next40pxDefaultSize ? 'default' : 'small',\n children: __('Reset')\n })\n })]\n })]\n })]\n });\n};\nexport const FontSizePicker = forwardRef(UnforwardedFontSizePicker);\nexport default FontSizePicker;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,kBAAmB;AACnB,mBAAyB;AACzB,qBAAqC;AACrC,qBAA8B;AAK9B,oBAAuB;AACvB,2BAAyB;AACzB,kBAA+B;AAC/B,0BAAyF;AACzF,oBAA6D;AAC7D,oBAAuB;AACvB,qCAAiC;AACjC,2CAAsC;AACtC,kCAA4C;AAC5C,yBAA2C;AAC3C,IAAM,gBAAgB,CAAC,MAAM,MAAM,OAAO,MAAM,IAAI;AACpD,IAAM,yBAAyB;AAC/B,IAAM,4BAA4B,CAAC,OAAO,QAAQ;AAChD,QAAM;AAAA,IACJ,wBAAwB;AAAA,IACxB;AAAA,IACA,YAAY,CAAC;AAAA,IACb,yBAAyB;AAAA,IACzB;AAAA,IACA,OAAO;AAAA,IACP,OAAO,YAAY;AAAA,IACnB;AAAA,IACA,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,YAAY;AAAA,EACd,IAAI;AACJ,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;AAAA,UAC3C,UAAuB,uCAAAA,KAAK,sBAAQ;AAAA,YAClC,UAAU;AAAA,YACV,wBAAwB;AAAA,YACxB,SAAS,MAAM;AACb,yBAAW,MAAS;AAAA,YACtB;AAAA,YACA,SAAS;AAAA,YACT,uBAAuB;AAAA,YACvB,MAAM,SAAS,sBAAsB,MAAM,wBAAwB,YAAY;AAAA,YAC/E,cAAU,gBAAG,OAAO;AAAA,UACtB,CAAC;AAAA,QACH,CAAC,CAAC;AAAA,MACJ,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,qBAAiB,2BAAW,yBAAyB;AAClE,IAAO,2BAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { settings } from '@wordpress/icons';\nimport { useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { Button } from '../button';\nimport RangeControl from '../range-control';\nimport { Flex, FlexItem } from '../flex';\nimport { default as UnitControl, parseQuantityAndUnitFromRawValue, useCustomUnits } from '../unit-control';\nimport { Container, Header, HeaderLabel, HeaderToggle } from './styles';\nimport { Spacer } from '../spacer';\nimport FontSizePickerSelect from './font-size-picker-select';\nimport FontSizePickerToggleGroup from './font-size-picker-toggle-group';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst DEFAULT_UNITS = ['px', 'em', 'rem', 'vw', 'vh'];\nconst MAX_TOGGLE_GROUP_SIZES = 5;\nconst UnforwardedFontSizePicker = (props, ref) => {\n const {\n __next40pxDefaultSize = false,\n fallbackFontSize,\n fontSizes = [],\n disableCustomFontSizes = false,\n onChange,\n size = 'default',\n units: unitsProp = DEFAULT_UNITS,\n value,\n valueMode = 'literal',\n withSlider = false,\n withReset = true\n } = props;\n const labelId = useInstanceId(UnforwardedFontSizePicker, 'font-size-picker-label');\n const units = useCustomUnits({\n availableUnits: unitsProp\n });\n const selectedFontSize = (() => {\n if (!value) {\n return undefined;\n }\n\n // If valueMode is 'slug', find by slug\n if (valueMode === 'slug') {\n return fontSizes.find(fontSize => fontSize.slug === value);\n }\n\n // If valueMode is 'literal', find by size value\n return fontSizes.find(fontSize => fontSize.size === value);\n })();\n const isCustomValue = !!value && !selectedFontSize;\n\n // Initially request a custom picker if the value is not from the predef list.\n const [userRequestedCustom, setUserRequestedCustom] = useState(isCustomValue);\n\n // Resolve the literal value to use in custom controls when operating in slug mode.\n // When `valueMode` is 'slug', the `value` prop contains the slug of the\n // selected preset. In that case, the custom input should reflect the preset's\n // actual size value so it pre-populates correctly after clicking \"Set custom size\".\n const resolvedValueForControls = valueMode === 'slug' ? selectedFontSize?.size : value;\n let currentPickerType;\n if (!disableCustomFontSizes && userRequestedCustom) {\n // While showing the custom value picker, switch back to predef only if\n // `disableCustomFontSizes` is set to `true`.\n currentPickerType = 'custom';\n } else {\n currentPickerType = fontSizes.length > MAX_TOGGLE_GROUP_SIZES ? 'select' : 'togglegroup';\n }\n if (fontSizes.length === 0 && disableCustomFontSizes) {\n return null;\n }\n\n // If neither the value or first font size is a string, then FontSizePicker\n // operates in a legacy \"unitless\" mode where UnitControl can only be used\n // to select px values and onChange() is always called with number values.\n const hasUnits = typeof resolvedValueForControls === 'string' || typeof fontSizes[0]?.size === 'string';\n const [valueQuantity, valueUnit] = parseQuantityAndUnitFromRawValue(resolvedValueForControls, units);\n const isValueUnitRelative = !!valueUnit && ['em', 'rem', 'vw', 'vh'].includes(valueUnit);\n const isDisabled = value === undefined;\n maybeWarnDeprecated36pxSize({\n componentName: 'FontSizePicker',\n __next40pxDefaultSize,\n size\n });\n return /*#__PURE__*/_jsxs(Container, {\n ref: ref,\n className: \"components-font-size-picker\"\n // This Container component renders a fieldset element that needs to be labeled.\n ,\n \"aria-labelledby\": labelId,\n children: [/*#__PURE__*/_jsx(Spacer, {\n children: /*#__PURE__*/_jsxs(Header, {\n className: \"components-font-size-picker__header\",\n children: [/*#__PURE__*/_jsx(HeaderLabel, {\n id: labelId,\n children: __('Font size')\n }), !disableCustomFontSizes && /*#__PURE__*/_jsx(HeaderToggle, {\n label: currentPickerType === 'custom' ? __('Use size preset') : __('Set custom size'),\n icon: settings,\n onClick: () => setUserRequestedCustom(!userRequestedCustom),\n isPressed: currentPickerType === 'custom',\n size: \"small\"\n })]\n })\n }), /*#__PURE__*/_jsxs(\"div\", {\n children: [currentPickerType === 'select' && /*#__PURE__*/_jsx(FontSizePickerSelect, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n fontSizes: fontSizes,\n value: value,\n valueMode: valueMode,\n disableCustomFontSizes: disableCustomFontSizes,\n size: size,\n onChange: (newValue, selectedItem) => {\n if (newValue === undefined) {\n onChange?.(undefined, selectedItem);\n } else {\n onChange?.(hasUnits ? newValue : Number(newValue), selectedItem);\n }\n },\n onSelectCustom: () => setUserRequestedCustom(true)\n }), currentPickerType === 'togglegroup' && /*#__PURE__*/_jsx(FontSizePickerToggleGroup, {\n fontSizes: fontSizes,\n value: value,\n valueMode: valueMode,\n __next40pxDefaultSize: __next40pxDefaultSize,\n size: size,\n onChange: (newValue, selectedItem) => {\n if (newValue === undefined) {\n onChange?.(undefined, selectedItem);\n } else {\n onChange?.(hasUnits ? newValue : Number(newValue), selectedItem);\n }\n }\n }), currentPickerType === 'custom' && /*#__PURE__*/_jsxs(Flex, {\n className: \"components-font-size-picker__custom-size-control\",\n children: [/*#__PURE__*/_jsx(FlexItem, {\n isBlock: true,\n children: /*#__PURE__*/_jsx(UnitControl, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize: true,\n label: __('Font size'),\n labelPosition: \"top\",\n hideLabelFromVision: true,\n value: hasUnits ? `${valueQuantity !== null && valueQuantity !== void 0 ? valueQuantity : ''}${valueUnit !== null && valueUnit !== void 0 ? valueUnit : ''}` : resolvedValueForControls,\n onChange: newValue => {\n setUserRequestedCustom(true);\n\n // Treat clearing the input (empty string) as a reset\n if (newValue === undefined || newValue === '') {\n onChange?.(undefined);\n } else {\n onChange?.(hasUnits ? newValue : parseInt(newValue, 10));\n }\n },\n size: size,\n units: hasUnits ? units : [],\n min: 0\n })\n }), withSlider && /*#__PURE__*/_jsx(FlexItem, {\n isBlock: true,\n children: /*#__PURE__*/_jsx(Spacer, {\n marginX: 2,\n marginBottom: 0,\n children: /*#__PURE__*/_jsx(RangeControl, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize: true,\n className: \"components-font-size-picker__custom-input\",\n label: __('Font size'),\n hideLabelFromVision: true,\n value: valueQuantity,\n initialPosition: fallbackFontSize,\n withInputField: false,\n onChange: newValue => {\n setUserRequestedCustom(true);\n if (newValue === undefined) {\n onChange?.(undefined);\n } else if (hasUnits) {\n onChange?.(newValue + (valueUnit !== null && valueUnit !== void 0 ? valueUnit : 'px'));\n } else {\n onChange?.(newValue);\n }\n },\n min: 0,\n max: isValueUnitRelative ? 10 : 100,\n step: isValueUnitRelative ? 0.1 : 1\n })\n })\n }), withReset && /*#__PURE__*/_jsx(FlexItem, {\n children: /*#__PURE__*/_jsx(Button, {\n disabled: isDisabled,\n accessibleWhenDisabled: true,\n onClick: () => {\n onChange?.(undefined);\n },\n variant: \"secondary\",\n __next40pxDefaultSize: true,\n size: size === '__unstable-large' || props.__next40pxDefaultSize ? 'default' : 'small',\n children: __('Reset')\n })\n })]\n })]\n })]\n });\n};\nexport const FontSizePicker = forwardRef(UnforwardedFontSizePicker);\nFontSizePicker.displayName = 'FontSizePicker';\nexport default FontSizePicker;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,kBAAmB;AACnB,mBAAyB;AACzB,qBAAqC;AACrC,qBAA8B;AAK9B,oBAAuB;AACvB,2BAAyB;AACzB,kBAA+B;AAC/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;AAAA,cACP,iBAAiB;AAAA,cACjB,gBAAgB;AAAA,cAChB,UAAU,cAAY;AACpB,uCAAuB,IAAI;AAC3B,oBAAI,aAAa,QAAW;AAC1B,6BAAW,MAAS;AAAA,gBACtB,WAAW,UAAU;AACnB,6BAAW,YAAY,cAAc,QAAQ,cAAc,SAAS,YAAY,KAAK;AAAA,gBACvF,OAAO;AACL,6BAAW,QAAQ;AAAA,gBACrB;AAAA,cACF;AAAA,cACA,KAAK;AAAA,cACL,KAAK,sBAAsB,KAAK;AAAA,cAChC,MAAM,sBAAsB,MAAM;AAAA,YACpC,CAAC;AAAA,UACH,CAAC;AAAA,QACH,CAAC,GAAG,aAA0B,uCAAAJ,KAAK,sBAAU;AAAA,UAC3C,UAAuB,uCAAAA,KAAK,sBAAQ;AAAA,YAClC,UAAU;AAAA,YACV,wBAAwB;AAAA,YACxB,SAAS,MAAM;AACb,yBAAW,MAAS;AAAA,YACtB;AAAA,YACA,SAAS;AAAA,YACT,uBAAuB;AAAA,YACvB,MAAM,SAAS,sBAAsB,MAAM,wBAAwB,YAAY;AAAA,YAC/E,cAAU,gBAAG,OAAO;AAAA,UACtB,CAAC;AAAA,QACH,CAAC,CAAC;AAAA,MACJ,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,qBAAiB,2BAAW,yBAAyB;AAClE,eAAe,cAAc;AAC7B,IAAO,2BAAQ;",
6
6
  "names": ["_jsxs", "_jsx", "FontSizePickerSelect", "FontSizePickerToggleGroup", "UnitControl", "RangeControl"]
7
7
  }
@@ -61,11 +61,15 @@ function FormFileUpload({
61
61
  }
62
62
  const ui = render ? render({
63
63
  openFileDialog
64
- }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
65
- onClick: openFileDialog,
66
- ...props,
67
- children
68
- });
64
+ }) : (
65
+ // Disable reason: the parent component already takes care of the `__next40pxDefaultSize` prop.
66
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
68
+ onClick: openFileDialog,
69
+ ...props,
70
+ children
71
+ })
72
+ );
69
73
  const compatAccept = accept?.includes("audio/*") ? `${accept}, audio/mp3, audio/x-m4a, audio/x-m4b, audio/x-m4p, audio/x-wav, audio/webm` : accept;
70
74
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
71
75
  className: "components-form-file-upload",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/form-file-upload/index.tsx"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\n/**\n * FormFileUpload allows users to select files from their local device.\n *\n * ```jsx\n * import { FormFileUpload } from '@wordpress/components';\n *\n * const MyFormFileUpload = () => (\n * <FormFileUpload\n * __next40pxDefaultSize\n * accept=\"image/*\"\n * onChange={ ( event ) => console.log( event.currentTarget.files ) }\n * >\n * Upload\n * </FormFileUpload>\n * );\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function FormFileUpload({\n accept,\n children,\n multiple = false,\n onChange,\n onClick,\n render,\n ...props\n}) {\n const ref = useRef(null);\n const openFileDialog = () => {\n ref.current?.click();\n };\n if (!render) {\n maybeWarnDeprecated36pxSize({\n componentName: 'FormFileUpload',\n __next40pxDefaultSize: props.__next40pxDefaultSize,\n // @ts-expect-error - We don't \"officially\" support all Button props but this likely happens.\n size: props.size\n });\n }\n const ui = render ? render({\n openFileDialog\n }) : /*#__PURE__*/_jsx(Button, {\n onClick: openFileDialog,\n ...props,\n children: children\n });\n\n // iOS browsers may not reliably handle 'audio/*' in the accept attribute.\n // Adding explicit audio MIME types improves compatibility across all devices.\n const compatAccept = accept?.includes('audio/*') ? `${accept}, audio/mp3, audio/x-m4a, audio/x-m4b, audio/x-m4p, audio/x-wav, audio/webm` : accept;\n return /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-form-file-upload\",\n children: [ui, /*#__PURE__*/_jsx(\"input\", {\n type: \"file\",\n ref: ref,\n multiple: multiple,\n style: {\n display: 'none'\n },\n accept: compatAccept,\n onChange: onChange,\n onClick: onClick,\n \"data-testid\": \"form-file-upload-input\"\n })]\n });\n}\nexport default FormFileUpload;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAuB;AAKvB,oBAAmB;AACnB,kCAA4C;AAmB5C,yBAA2C;AACpC,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,UAAM,uBAAO,IAAI;AACvB,QAAM,iBAAiB,MAAM;AAC3B,QAAI,SAAS,MAAM;AAAA,EACrB;AACA,MAAI,CAAC,QAAQ;AACX,iEAA4B;AAAA,MAC1B,eAAe;AAAA,MACf,uBAAuB,MAAM;AAAA;AAAA,MAE7B,MAAM,MAAM;AAAA,IACd,CAAC;AAAA,EACH;AACA,QAAM,KAAK,SAAS,OAAO;AAAA,IACzB;AAAA,EACF,CAAC,IAAiB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,IAC7B,SAAS;AAAA,IACT,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AAID,QAAM,eAAe,QAAQ,SAAS,SAAS,IAAI,GAAG,MAAM,gFAAgF;AAC5I,SAAoB,uCAAAC,MAAM,OAAO;AAAA,IAC/B,WAAW;AAAA,IACX,UAAU,CAAC,IAAiB,uCAAAF,KAAK,SAAS;AAAA,MACxC,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,eAAe;AAAA,IACjB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACA,IAAO,2BAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\n/**\n * FormFileUpload allows users to select files from their local device.\n *\n * ```jsx\n * import { FormFileUpload } from '@wordpress/components';\n *\n * const MyFormFileUpload = () => (\n * <FormFileUpload\n * __next40pxDefaultSize\n * accept=\"image/*\"\n * onChange={ ( event ) => console.log( event.currentTarget.files ) }\n * >\n * Upload\n * </FormFileUpload>\n * );\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function FormFileUpload({\n accept,\n children,\n multiple = false,\n onChange,\n onClick,\n render,\n ...props\n}) {\n const ref = useRef(null);\n const openFileDialog = () => {\n ref.current?.click();\n };\n if (!render) {\n maybeWarnDeprecated36pxSize({\n componentName: 'FormFileUpload',\n __next40pxDefaultSize: props.__next40pxDefaultSize,\n // @ts-expect-error - We don't \"officially\" support all Button props but this likely happens.\n size: props.size\n });\n }\n const ui = render ? render({\n openFileDialog\n }) :\n /*#__PURE__*/\n // Disable reason: the parent component already takes care of the `__next40pxDefaultSize` prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n onClick: openFileDialog,\n ...props,\n children: children\n });\n\n // iOS browsers may not reliably handle 'audio/*' in the accept attribute.\n // Adding explicit audio MIME types improves compatibility across all devices.\n const compatAccept = accept?.includes('audio/*') ? `${accept}, audio/mp3, audio/x-m4a, audio/x-m4b, audio/x-m4p, audio/x-wav, audio/webm` : accept;\n return /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-form-file-upload\",\n children: [ui, /*#__PURE__*/_jsx(\"input\", {\n type: \"file\",\n ref: ref,\n multiple: multiple,\n style: {\n display: 'none'\n },\n accept: compatAccept,\n onChange: onChange,\n onClick: onClick,\n \"data-testid\": \"form-file-upload-input\"\n })]\n });\n}\nexport default FormFileUpload;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAuB;AAKvB,oBAAmB;AACnB,kCAA4C;AAmB5C,yBAA2C;AACpC,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,UAAM,uBAAO,IAAI;AACvB,QAAM,iBAAiB,MAAM;AAC3B,QAAI,SAAS,MAAM;AAAA,EACrB;AACA,MAAI,CAAC,QAAQ;AACX,iEAA4B;AAAA,MAC1B,eAAe;AAAA,MACf,uBAAuB,MAAM;AAAA;AAAA,MAE7B,MAAM,MAAM;AAAA,IACd,CAAC;AAAA,EACH;AACA,QAAM,KAAK,SAAS,OAAO;AAAA,IACzB;AAAA,EACF,CAAC;AAAA;AAAA;AAAA,IAID,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MACX,SAAS;AAAA,MACT,GAAG;AAAA,MACH;AAAA,IACF,CAAC;AAAA;AAID,QAAM,eAAe,QAAQ,SAAS,SAAS,IAAI,GAAG,MAAM,gFAAgF;AAC5I,SAAoB,uCAAAC,MAAM,OAAO;AAAA,IAC/B,WAAW;AAAA,IACX,UAAU,CAAC,IAAiB,uCAAAF,KAAK,SAAS;AAAA,MACxC,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,eAAe;AAAA,IACjB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACA,IAAO,2BAAQ;",
6
6
  "names": ["_jsx", "Button", "_jsxs"]
7
7
  }
@@ -77,6 +77,7 @@ function UnforwardedFormToggle(props, ref) {
77
77
  });
78
78
  }
79
79
  var FormToggle = (0, import_element.forwardRef)(UnforwardedFormToggle);
80
+ FormToggle.displayName = "FormToggle";
80
81
  var form_toggle_default = FormToggle;
81
82
  // Annotate the CommonJS export names for ESM import in node:
82
83
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/form-toggle/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, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const noop = () => {};\nfunction UnforwardedFormToggle(props, ref) {\n const {\n className,\n checked,\n id,\n disabled,\n onChange = noop,\n onClick,\n ...additionalProps\n } = props;\n const wrapperClasses = clsx('components-form-toggle', className, {\n 'is-checked': checked,\n 'is-disabled': disabled\n });\n return /*#__PURE__*/_jsxs(\"span\", {\n className: wrapperClasses,\n children: [/*#__PURE__*/_jsx(\"input\", {\n className: \"components-form-toggle__input\",\n id: id,\n type: \"checkbox\",\n checked: checked,\n onChange: onChange,\n disabled: disabled,\n onClick: event => {\n // Compat code for Safari to ensure that the toggle is focused when clicked.\n event.currentTarget.focus();\n onClick?.(event);\n },\n ...additionalProps,\n ref: ref\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-form-toggle__track\"\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-form-toggle__thumb\"\n })]\n });\n}\n\n/**\n * FormToggle switches a single setting on or off.\n *\n * ```jsx\n * import { FormToggle } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyFormToggle = () => {\n * const [ isChecked, setChecked ] = useState( true );\n *\n * return (\n * <FormToggle\n * checked={ isChecked }\n * onChange={ () => setChecked( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const FormToggle = forwardRef(UnforwardedFormToggle);\nexport default FormToggle;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAK3B,yBAA2C;AACpC,IAAM,OAAO,MAAM;AAAC;AAC3B,SAAS,sBAAsB,OAAO,KAAK;AACzC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,qBAAiB,YAAAA,SAAK,0BAA0B,WAAW;AAAA,IAC/D,cAAc;AAAA,IACd,eAAe;AAAA,EACjB,CAAC;AACD,SAAoB,uCAAAC,MAAM,QAAQ;AAAA,IAChC,WAAW;AAAA,IACX,UAAU,CAAc,uCAAAC,KAAK,SAAS;AAAA,MACpC,WAAW;AAAA,MACX;AAAA,MACA,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,WAAS;AAEhB,cAAM,cAAc,MAAM;AAC1B,kBAAU,KAAK;AAAA,MACjB;AAAA,MACA,GAAG;AAAA,MACH;AAAA,IACF,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,IACb,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,IACb,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAqBO,IAAM,iBAAa,2BAAW,qBAAqB;AAC1D,IAAO,sBAAQ;",
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, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const noop = () => {};\nfunction UnforwardedFormToggle(props, ref) {\n const {\n className,\n checked,\n id,\n disabled,\n onChange = noop,\n onClick,\n ...additionalProps\n } = props;\n const wrapperClasses = clsx('components-form-toggle', className, {\n 'is-checked': checked,\n 'is-disabled': disabled\n });\n return /*#__PURE__*/_jsxs(\"span\", {\n className: wrapperClasses,\n children: [/*#__PURE__*/_jsx(\"input\", {\n className: \"components-form-toggle__input\",\n id: id,\n type: \"checkbox\",\n checked: checked,\n onChange: onChange,\n disabled: disabled,\n onClick: event => {\n // Compat code for Safari to ensure that the toggle is focused when clicked.\n event.currentTarget.focus();\n onClick?.(event);\n },\n ...additionalProps,\n ref: ref\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-form-toggle__track\"\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-form-toggle__thumb\"\n })]\n });\n}\n\n/**\n * FormToggle switches a single setting on or off.\n *\n * ```jsx\n * import { FormToggle } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyFormToggle = () => {\n * const [ isChecked, setChecked ] = useState( true );\n *\n * return (\n * <FormToggle\n * checked={ isChecked }\n * onChange={ () => setChecked( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const FormToggle = forwardRef(UnforwardedFormToggle);\nFormToggle.displayName = 'FormToggle';\nexport default FormToggle;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAK3B,yBAA2C;AACpC,IAAM,OAAO,MAAM;AAAC;AAC3B,SAAS,sBAAsB,OAAO,KAAK;AACzC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,qBAAiB,YAAAA,SAAK,0BAA0B,WAAW;AAAA,IAC/D,cAAc;AAAA,IACd,eAAe;AAAA,EACjB,CAAC;AACD,SAAoB,uCAAAC,MAAM,QAAQ;AAAA,IAChC,WAAW;AAAA,IACX,UAAU,CAAc,uCAAAC,KAAK,SAAS;AAAA,MACpC,WAAW;AAAA,MACX;AAAA,MACA,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,WAAS;AAEhB,cAAM,cAAc,MAAM;AAC1B,kBAAU,KAAK;AAAA,MACjB;AAAA,MACA,GAAG;AAAA,MACH;AAAA,IACF,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,IACb,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,IACb,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAqBO,IAAM,iBAAa,2BAAW,qBAAqB;AAC1D,WAAW,cAAc;AACzB,IAAO,sBAAQ;",
6
6
  "names": ["clsx", "_jsxs", "_jsx"]
7
7
  }
@@ -94,6 +94,7 @@ function UnForwardedTokenInput(props, ref) {
94
94
  });
95
95
  }
96
96
  var TokenInput = (0, import_element.forwardRef)(UnForwardedTokenInput);
97
+ TokenInput.displayName = "TokenInput";
97
98
  var token_input_default = TokenInput;
98
99
  // Annotate the CommonJS export names for ESM import in node:
99
100
  0 && (module.exports = {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/form-token-field/token-input.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnForwardedTokenInput(props, ref) {\n const {\n value,\n isExpanded,\n instanceId,\n selectedSuggestionIndex,\n className,\n onChange,\n onFocus,\n onBlur,\n ...restProps\n } = props;\n const [hasFocus, setHasFocus] = useState(false);\n const size = value ? value.length + 1 : 0;\n const onChangeHandler = event => {\n if (onChange) {\n onChange({\n value: event.target.value\n });\n }\n };\n const onFocusHandler = e => {\n setHasFocus(true);\n onFocus?.(e);\n };\n const onBlurHandler = e => {\n setHasFocus(false);\n onBlur?.(e);\n };\n return /*#__PURE__*/_jsx(\"input\", {\n ref: ref,\n id: `components-form-token-input-${instanceId}`,\n type: \"text\",\n ...restProps,\n value: value || '',\n onChange: onChangeHandler,\n onFocus: onFocusHandler,\n onBlur: onBlurHandler,\n size: size,\n className: clsx(className, 'components-form-token-field__input'),\n autoComplete: \"off\",\n role: \"combobox\",\n \"aria-expanded\": isExpanded,\n \"aria-autocomplete\": \"list\",\n \"aria-owns\": isExpanded ? `components-form-token-suggestions-${instanceId}` : undefined,\n \"aria-activedescendant\":\n // Only add the `aria-activedescendant` attribute when:\n // - the user is actively interacting with the input (`hasFocus`)\n // - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n // - the list of suggestions are rendered in the DOM (`isExpanded`)\n hasFocus && selectedSuggestionIndex !== -1 && isExpanded ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : undefined,\n \"aria-describedby\": `components-form-token-suggestions-howto-${instanceId}`\n });\n}\nexport const TokenInput = forwardRef(UnForwardedTokenInput);\nexport default TokenInput;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAAqC;AAKrC,yBAA4B;AACrB,SAAS,sBAAsB,OAAO,KAAK;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,QAAI,yBAAS,KAAK;AAC9C,QAAM,OAAO,QAAQ,MAAM,SAAS,IAAI;AACxC,QAAM,kBAAkB,WAAS;AAC/B,QAAI,UAAU;AACZ,eAAS;AAAA,QACP,OAAO,MAAM,OAAO;AAAA,MACtB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,iBAAiB,OAAK;AAC1B,gBAAY,IAAI;AAChB,cAAU,CAAC;AAAA,EACb;AACA,QAAM,gBAAgB,OAAK;AACzB,gBAAY,KAAK;AACjB,aAAS,CAAC;AAAA,EACZ;AACA,SAAoB,uCAAAA,KAAK,SAAS;AAAA,IAChC;AAAA,IACA,IAAI,+BAA+B,UAAU;AAAA,IAC7C,MAAM;AAAA,IACN,GAAG;AAAA,IACH,OAAO,SAAS;AAAA,IAChB,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR;AAAA,IACA,eAAW,YAAAC,SAAK,WAAW,oCAAoC;AAAA,IAC/D,cAAc;AAAA,IACd,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,aAAa,aAAa,qCAAqC,UAAU,KAAK;AAAA,IAC9E;AAAA;AAAA;AAAA;AAAA;AAAA,MAKA,YAAY,4BAA4B,MAAM,aAAa,qCAAqC,UAAU,IAAI,uBAAuB,KAAK;AAAA;AAAA,IAC1I,oBAAoB,2CAA2C,UAAU;AAAA,EAC3E,CAAC;AACH;AACO,IAAM,iBAAa,2BAAW,qBAAqB;AAC1D,IAAO,sBAAQ;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnForwardedTokenInput(props, ref) {\n const {\n value,\n isExpanded,\n instanceId,\n selectedSuggestionIndex,\n className,\n onChange,\n onFocus,\n onBlur,\n ...restProps\n } = props;\n const [hasFocus, setHasFocus] = useState(false);\n const size = value ? value.length + 1 : 0;\n const onChangeHandler = event => {\n if (onChange) {\n onChange({\n value: event.target.value\n });\n }\n };\n const onFocusHandler = e => {\n setHasFocus(true);\n onFocus?.(e);\n };\n const onBlurHandler = e => {\n setHasFocus(false);\n onBlur?.(e);\n };\n return /*#__PURE__*/_jsx(\"input\", {\n ref: ref,\n id: `components-form-token-input-${instanceId}`,\n type: \"text\",\n ...restProps,\n value: value || '',\n onChange: onChangeHandler,\n onFocus: onFocusHandler,\n onBlur: onBlurHandler,\n size: size,\n className: clsx(className, 'components-form-token-field__input'),\n autoComplete: \"off\",\n role: \"combobox\",\n \"aria-expanded\": isExpanded,\n \"aria-autocomplete\": \"list\",\n \"aria-owns\": isExpanded ? `components-form-token-suggestions-${instanceId}` : undefined,\n \"aria-activedescendant\":\n // Only add the `aria-activedescendant` attribute when:\n // - the user is actively interacting with the input (`hasFocus`)\n // - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n // - the list of suggestions are rendered in the DOM (`isExpanded`)\n hasFocus && selectedSuggestionIndex !== -1 && isExpanded ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : undefined,\n \"aria-describedby\": `components-form-token-suggestions-howto-${instanceId}`\n });\n}\nexport const TokenInput = forwardRef(UnForwardedTokenInput);\nTokenInput.displayName = 'TokenInput';\nexport default TokenInput;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAAqC;AAKrC,yBAA4B;AACrB,SAAS,sBAAsB,OAAO,KAAK;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,QAAI,yBAAS,KAAK;AAC9C,QAAM,OAAO,QAAQ,MAAM,SAAS,IAAI;AACxC,QAAM,kBAAkB,WAAS;AAC/B,QAAI,UAAU;AACZ,eAAS;AAAA,QACP,OAAO,MAAM,OAAO;AAAA,MACtB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,iBAAiB,OAAK;AAC1B,gBAAY,IAAI;AAChB,cAAU,CAAC;AAAA,EACb;AACA,QAAM,gBAAgB,OAAK;AACzB,gBAAY,KAAK;AACjB,aAAS,CAAC;AAAA,EACZ;AACA,SAAoB,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