@wordpress/components 31.0.1-next.76cff8c98.0 → 32.0.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 (585) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/build/box-control/index.cjs +15 -7
  3. package/build/box-control/index.cjs.map +2 -2
  4. package/build/button/deprecated.cjs +12 -8
  5. package/build/button/deprecated.cjs.map +2 -2
  6. package/build/circular-option-picker/circular-option-picker-option.cjs +2 -1
  7. package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
  8. package/build/clipboard-button/index.cjs +11 -7
  9. package/build/clipboard-button/index.cjs.map +2 -2
  10. package/build/context/context-system-provider.cjs +1 -1
  11. package/build/context/context-system-provider.cjs.map +2 -2
  12. package/build/duotone-picker/duotone-picker.cjs +1 -1
  13. package/build/duotone-picker/duotone-picker.cjs.map +1 -1
  14. package/build/form-file-upload/index.cjs +9 -5
  15. package/build/form-file-upload/index.cjs.map +2 -2
  16. package/build/form-token-field/token.cjs.map +2 -2
  17. package/build/higher-order/with-fallback-styles/index.cjs +1 -1
  18. package/build/higher-order/with-fallback-styles/index.cjs.map +1 -1
  19. package/build/input-control/styles/input-control-styles.cjs +22 -22
  20. package/build/input-control/styles/input-control-styles.cjs.map +2 -2
  21. package/build/menu/popover.cjs +1 -0
  22. package/build/menu/popover.cjs.map +2 -2
  23. package/build/menu/styles.cjs +15 -15
  24. package/build/menu/styles.cjs.map +2 -2
  25. package/build/radio-group/radio.cjs +8 -4
  26. package/build/radio-group/radio.cjs.map +2 -2
  27. package/build/tree-select/index.cjs +12 -8
  28. package/build/tree-select/index.cjs.map +2 -2
  29. package/build-module/box-control/index.mjs +15 -7
  30. package/build-module/box-control/index.mjs.map +2 -2
  31. package/build-module/button/deprecated.mjs +12 -8
  32. package/build-module/button/deprecated.mjs.map +2 -2
  33. package/build-module/circular-option-picker/circular-option-picker-option.mjs +2 -1
  34. package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
  35. package/build-module/clipboard-button/index.mjs +11 -7
  36. package/build-module/clipboard-button/index.mjs.map +2 -2
  37. package/build-module/context/context-system-provider.mjs +1 -1
  38. package/build-module/context/context-system-provider.mjs.map +2 -2
  39. package/build-module/duotone-picker/duotone-picker.mjs +1 -1
  40. package/build-module/duotone-picker/duotone-picker.mjs.map +1 -1
  41. package/build-module/form-file-upload/index.mjs +9 -5
  42. package/build-module/form-file-upload/index.mjs.map +2 -2
  43. package/build-module/form-token-field/token.mjs.map +2 -2
  44. package/build-module/higher-order/with-fallback-styles/index.mjs +1 -1
  45. package/build-module/higher-order/with-fallback-styles/index.mjs.map +1 -1
  46. package/build-module/input-control/styles/input-control-styles.mjs +22 -22
  47. package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
  48. package/build-module/menu/popover.mjs +1 -0
  49. package/build-module/menu/popover.mjs.map +2 -2
  50. package/build-module/menu/styles.mjs +15 -15
  51. package/build-module/menu/styles.mjs.map +2 -2
  52. package/build-module/radio-group/radio.mjs +8 -4
  53. package/build-module/radio-group/radio.mjs.map +2 -2
  54. package/build-module/tree-select/index.mjs +12 -8
  55. package/build-module/tree-select/index.mjs.map +2 -2
  56. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  57. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  58. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  59. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  60. package/build-types/animate/stories/index.story.d.ts +8 -8
  61. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  62. package/build-types/badge/stories/index.story.d.ts +1 -1
  63. package/build-types/badge/stories/index.story.d.ts.map +1 -1
  64. package/build-types/base-control/stories/index.story.d.ts +2 -2
  65. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  66. package/build-types/border-box-control/border-box-control/hook.d.ts +5 -4
  67. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  68. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +5 -4
  69. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  70. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  71. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +5 -4
  72. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  73. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +5 -4
  74. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  75. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  76. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  77. package/build-types/border-control/border-control/hook.d.ts +5 -4
  78. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  79. package/build-types/border-control/border-control-dropdown/hook.d.ts +5 -4
  80. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  81. package/build-types/border-control/stories/index.story.d.ts +6 -6
  82. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  83. package/build-types/box-control/index.d.ts.map +1 -1
  84. package/build-types/box-control/stories/index.story.d.ts +8 -8
  85. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  86. package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
  87. package/build-types/button/deprecated.d.ts.map +1 -1
  88. package/build-types/button/stories/e2e/index.story.d.ts +2 -2
  89. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  90. package/build-types/button/stories/index.story.d.ts +8 -8
  91. package/build-types/button/stories/index.story.d.ts.map +1 -1
  92. package/build-types/button-group/stories/index.story.d.ts +1 -1
  93. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  94. package/build-types/calendar/stories/date-calendar.story.d.ts +1 -1
  95. package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
  96. package/build-types/calendar/stories/date-range-calendar.story.d.ts +1 -1
  97. package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
  98. package/build-types/card/card/hook.d.ts +5 -4
  99. package/build-types/card/card/hook.d.ts.map +1 -1
  100. package/build-types/card/card-body/hook.d.ts +5 -4
  101. package/build-types/card/card-body/hook.d.ts.map +1 -1
  102. package/build-types/card/card-divider/hook.d.ts +6 -5
  103. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  104. package/build-types/card/card-footer/hook.d.ts +5 -4
  105. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  106. package/build-types/card/card-header/hook.d.ts +5 -4
  107. package/build-types/card/card-header/hook.d.ts.map +1 -1
  108. package/build-types/card/card-media/hook.d.ts +5 -4
  109. package/build-types/card/card-media/hook.d.ts.map +1 -1
  110. package/build-types/card/stories/index.story.d.ts +1 -1
  111. package/build-types/card/stories/index.story.d.ts.map +1 -1
  112. package/build-types/checkbox-control/stories/index.story.d.ts +1 -1
  113. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  114. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  115. package/build-types/circular-option-picker/stories/index.story.d.ts +6 -6
  116. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  117. package/build-types/clipboard-button/index.d.ts.map +1 -1
  118. package/build-types/clipboard-button/types.d.ts +1 -0
  119. package/build-types/clipboard-button/types.d.ts.map +1 -1
  120. package/build-types/color-indicator/stories/index.story.d.ts +1 -1
  121. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  122. package/build-types/color-palette/stories/index.story.d.ts +4 -4
  123. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  124. package/build-types/color-palette/styles.d.ts +1 -1
  125. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  126. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  127. package/build-types/color-picker/styles.d.ts +1 -1
  128. package/build-types/combobox-control/stories/index.story.d.ts +5 -5
  129. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  130. package/build-types/composite/legacy/stories/index.story.d.ts +1 -1
  131. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  132. package/build-types/composite/legacy/stories/utils.d.ts +1 -1
  133. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  134. package/build-types/composite/stories/index.story.d.ts +1 -1
  135. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  136. package/build-types/confirm-dialog/stories/index.story.d.ts +3 -3
  137. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  138. package/build-types/context/context-system-provider.d.ts.map +1 -1
  139. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  140. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  141. package/build-types/custom-select-control/stories/index.story.d.ts +4 -4
  142. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  143. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -4
  144. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  145. package/build-types/date-time/date/styles.d.ts +1 -1
  146. package/build-types/date-time/stories/date-time.story.d.ts +1 -1
  147. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  148. package/build-types/date-time/stories/date.story.d.ts +1 -1
  149. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  150. package/build-types/date-time/stories/time.story.d.ts +2 -2
  151. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  152. package/build-types/date-time/time/styles.d.ts +4 -4
  153. package/build-types/disabled/stories/index.story.d.ts +1 -1
  154. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  155. package/build-types/divider/stories/index.story.d.ts +1 -1
  156. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  157. package/build-types/draggable/stories/index.story.d.ts +1 -1
  158. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  159. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  160. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  161. package/build-types/dropdown/stories/index.story.d.ts +1 -1
  162. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  163. package/build-types/dropdown-menu/stories/index.story.d.ts +1 -1
  164. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  165. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  166. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  167. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +4 -4
  168. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  169. package/build-types/elevation/hook.d.ts +5 -4
  170. package/build-types/elevation/hook.d.ts.map +1 -1
  171. package/build-types/elevation/stories/index.story.d.ts +1 -1
  172. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  173. package/build-types/external-link/index.d.ts +1 -2
  174. package/build-types/external-link/index.d.ts.map +1 -1
  175. package/build-types/external-link/stories/index.story.d.ts +1 -1
  176. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  177. package/build-types/flex/flex/hook.d.ts +5 -4
  178. package/build-types/flex/flex/hook.d.ts.map +1 -1
  179. package/build-types/flex/flex-block/hook.d.ts +5 -4
  180. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  181. package/build-types/flex/flex-item/hook.d.ts +5 -4
  182. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  183. package/build-types/flex/stories/index.story.d.ts +1 -1
  184. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  185. package/build-types/focal-point-picker/stories/index.story.d.ts +5 -5
  186. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  187. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +127 -127
  188. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +1 -1
  189. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  190. package/build-types/font-size-picker/stories/index.story.d.ts +1 -1
  191. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  192. package/build-types/form-file-upload/index.d.ts.map +1 -1
  193. package/build-types/form-file-upload/stories/index.story.d.ts +6 -6
  194. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  195. package/build-types/form-toggle/stories/index.story.d.ts +1 -1
  196. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  197. package/build-types/form-token-field/stories/index.story.d.ts +1 -1
  198. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  199. package/build-types/gradient-picker/stories/index.story.d.ts +4 -4
  200. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  201. package/build-types/grid/hook.d.ts +5 -4
  202. package/build-types/grid/hook.d.ts.map +1 -1
  203. package/build-types/grid/stories/index.story.d.ts +1 -1
  204. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  205. package/build-types/guide/stories/index.story.d.ts +2 -2
  206. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  207. package/build-types/h-stack/hook.d.ts +5 -4
  208. package/build-types/h-stack/hook.d.ts.map +1 -1
  209. package/build-types/h-stack/stories/e2e/index.story.d.ts +1 -1
  210. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  211. package/build-types/h-stack/stories/index.story.d.ts +1 -1
  212. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  213. package/build-types/heading/hook.d.ts +5 -4
  214. package/build-types/heading/hook.d.ts.map +1 -1
  215. package/build-types/heading/stories/index.story.d.ts +1 -1
  216. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  217. package/build-types/icon/stories/index.story.d.ts +5 -5
  218. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  219. package/build-types/index.d.ts +1 -0
  220. package/build-types/index.d.ts.map +1 -1
  221. package/build-types/input-control/stories/index.story.d.ts +8 -8
  222. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  223. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  224. package/build-types/item-group/item/hook.d.ts +5 -4
  225. package/build-types/item-group/item/hook.d.ts.map +1 -1
  226. package/build-types/item-group/item-group/hook.d.ts +5 -4
  227. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  228. package/build-types/item-group/stories/index.story.d.ts +1 -1
  229. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  230. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  231. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  232. package/build-types/menu/popover.d.ts.map +1 -1
  233. package/build-types/menu/stories/index.story.d.ts +1 -1
  234. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  235. package/build-types/menu/styles.d.ts.map +1 -1
  236. package/build-types/menu-group/stories/index.story.d.ts +2 -2
  237. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  238. package/build-types/menu-item/stories/index.story.d.ts +5 -5
  239. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  240. package/build-types/menu-items-choice/stories/index.story.d.ts +1 -1
  241. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  242. package/build-types/modal/stories/index.story.d.ts +1 -1
  243. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  244. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +1 -1
  245. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  246. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +1 -1
  247. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  248. package/build-types/navigation/stories/index.story.d.ts +7 -7
  249. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  250. package/build-types/navigation/stories/utils/controlled-state.d.ts +1 -1
  251. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  252. package/build-types/navigation/stories/utils/default.d.ts +1 -1
  253. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  254. package/build-types/navigation/stories/utils/group.d.ts +1 -1
  255. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  256. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +1 -1
  257. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  258. package/build-types/navigation/stories/utils/more-examples.d.ts +1 -1
  259. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  260. package/build-types/navigation/stories/utils/search.d.ts +1 -1
  261. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  262. package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
  263. package/build-types/navigator/navigator-back-button/hook.d.ts +5 -4
  264. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  265. package/build-types/navigator/navigator-button/hook.d.ts +5 -4
  266. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  267. package/build-types/navigator/stories/index.story.d.ts +1 -1
  268. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  269. package/build-types/notice/stories/index.story.d.ts +6 -6
  270. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  271. package/build-types/number-control/index.d.ts +1 -1
  272. package/build-types/number-control/index.d.ts.map +1 -1
  273. package/build-types/number-control/stories/index.story.d.ts +3 -3
  274. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  275. package/build-types/palette-edit/stories/index.story.d.ts +3 -3
  276. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  277. package/build-types/palette-edit/styles.d.ts +379 -379
  278. package/build-types/panel/stories/index.story.d.ts +1 -1
  279. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  280. package/build-types/placeholder/stories/index.story.d.ts +1 -1
  281. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  282. package/build-types/popover/index.d.ts +1 -1
  283. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  284. package/build-types/popover/stories/index.story.d.ts +1 -1
  285. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  286. package/build-types/progress-bar/stories/index.story.d.ts +2 -2
  287. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  288. package/build-types/query-controls/stories/index.story.d.ts +2 -2
  289. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  290. package/build-types/radio-control/stories/index.story.d.ts +1 -1
  291. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  292. package/build-types/radio-group/radio.d.ts.map +1 -1
  293. package/build-types/radio-group/stories/index.story.d.ts +1 -1
  294. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  295. package/build-types/range-control/index.d.ts +2 -2
  296. package/build-types/range-control/stories/index.story.d.ts +1 -1
  297. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  298. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  299. package/build-types/resizable-box/stories/index.story.d.ts +3 -3
  300. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  301. package/build-types/responsive-wrapper/stories/index.story.d.ts +2 -2
  302. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  303. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  304. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  305. package/build-types/scroll-lock/stories/index.story.d.ts +1 -1
  306. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  307. package/build-types/scrollable/hook.d.ts +5 -4
  308. package/build-types/scrollable/hook.d.ts.map +1 -1
  309. package/build-types/scrollable/stories/index.story.d.ts +1 -1
  310. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  311. package/build-types/search-control/index.d.ts +13 -3
  312. package/build-types/search-control/index.d.ts.map +1 -1
  313. package/build-types/search-control/stories/index.story.d.ts +14 -2
  314. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  315. package/build-types/select-control/stories/index.story.d.ts +6 -6
  316. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  317. package/build-types/shortcut/stories/index.story.d.ts +2 -2
  318. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  319. package/build-types/slot-fill/stories/index.story.d.ts +1 -1
  320. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  321. package/build-types/snackbar/stories/index.story.d.ts +1 -1
  322. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  323. package/build-types/snackbar/stories/list.story.d.ts +1 -1
  324. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  325. package/build-types/spacer/hook.d.ts +5 -4
  326. package/build-types/spacer/hook.d.ts.map +1 -1
  327. package/build-types/spacer/stories/index.story.d.ts +1 -1
  328. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  329. package/build-types/spinner/index.d.ts +1 -1
  330. package/build-types/spinner/index.d.ts.map +1 -1
  331. package/build-types/spinner/stories/index.story.d.ts +1 -1
  332. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  333. package/build-types/surface/hook.d.ts +5 -4
  334. package/build-types/surface/hook.d.ts.map +1 -1
  335. package/build-types/surface/stories/index.story.d.ts +1 -1
  336. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  337. package/build-types/tab-panel/stories/index.story.d.ts +5 -5
  338. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  339. package/build-types/tabs/stories/index.story.d.ts +8 -8
  340. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  341. package/build-types/text/hook.d.ts +5 -4
  342. package/build-types/text/hook.d.ts.map +1 -1
  343. package/build-types/text/stories/index.story.d.ts +4 -4
  344. package/build-types/text/stories/index.story.d.ts.map +1 -1
  345. package/build-types/text-control/stories/index.story.d.ts +1 -1
  346. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  347. package/build-types/text-highlight/stories/index.story.d.ts +1 -1
  348. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  349. package/build-types/textarea-control/stories/index.story.d.ts +1 -1
  350. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  351. package/build-types/theme/stories/index.story.d.ts +2 -2
  352. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  353. package/build-types/tip/stories/index.story.d.ts +1 -1
  354. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  355. package/build-types/toggle-control/stories/index.story.d.ts +3 -3
  356. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  357. package/build-types/toggle-group-control/stories/index.story.d.ts +1 -1
  358. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  359. package/build-types/toolbar/stories/index.story.d.ts +4 -4
  360. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  361. package/build-types/tools-panel/stories/index.story.d.ts +1 -1
  362. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  363. package/build-types/tools-panel/tools-panel/hook.d.ts +5 -4
  364. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  365. package/build-types/tools-panel/tools-panel-header/hook.d.ts +5 -4
  366. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  367. package/build-types/tools-panel/tools-panel-item/hook.d.ts +5 -4
  368. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  369. package/build-types/tooltip/stories/index.story.d.ts +2 -2
  370. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  371. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  372. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  373. package/build-types/tree-select/index.d.ts.map +1 -1
  374. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  375. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  376. package/build-types/truncate/hook.d.ts +5 -4
  377. package/build-types/truncate/hook.d.ts.map +1 -1
  378. package/build-types/truncate/stories/index.story.d.ts +1 -1
  379. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  380. package/build-types/unit-control/index.d.ts +1 -1
  381. package/build-types/unit-control/index.d.ts.map +1 -1
  382. package/build-types/unit-control/stories/index.story.d.ts +1 -1
  383. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  384. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
  385. package/build-types/v-stack/hook.d.ts +5 -4
  386. package/build-types/v-stack/hook.d.ts.map +1 -1
  387. package/build-types/v-stack/stories/e2e/index.story.d.ts +1 -1
  388. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  389. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  390. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  391. package/build-types/validated-form-controls/components/number-control.d.ts +1 -1
  392. package/build-types/validated-form-controls/components/number-control.d.ts.map +1 -1
  393. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +1 -1
  394. package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
  395. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +1 -1
  396. package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
  397. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +1 -1
  398. package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
  399. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +1 -1
  400. package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
  401. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +1 -1
  402. package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
  403. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +1 -1
  404. package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
  405. package/build-types/validated-form-controls/components/stories/overview.story.d.ts +1 -1
  406. package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
  407. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +1 -1
  408. package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
  409. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +1 -1
  410. package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
  411. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +1 -1
  412. package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
  413. package/build-types/validated-form-controls/components/stories/story-utils.d.ts +1 -1
  414. package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -1
  415. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +1 -1
  416. package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
  417. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +1 -1
  418. package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
  419. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +1 -1
  420. package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
  421. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +1 -1
  422. package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
  423. package/build-types/view/component.d.ts +126 -126
  424. package/build-types/view/stories/index.story.d.ts +1 -1
  425. package/build-types/view/stories/index.story.d.ts.map +1 -1
  426. package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
  427. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  428. package/build-types/z-stack/stories/index.story.d.ts +1 -1
  429. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  430. package/package.json +29 -21
  431. package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
  432. package/src/angle-picker-control/stories/index.story.tsx +1 -1
  433. package/src/animate/stories/index.story.tsx +1 -1
  434. package/src/badge/stories/index.story.tsx +1 -1
  435. package/src/base-control/stories/index.story.tsx +4 -2
  436. package/src/border-box-control/border-box-control-split-controls/component.tsx +9 -0
  437. package/src/border-box-control/stories/index.story.tsx +3 -1
  438. package/src/border-box-control/test/index.tsx +51 -20
  439. package/src/border-control/stories/index.story.tsx +2 -1
  440. package/src/border-control/test/index.js +37 -34
  441. package/src/box-control/index.tsx +6 -0
  442. package/src/box-control/stories/index.story.tsx +3 -2
  443. package/src/button/deprecated.tsx +2 -0
  444. package/src/button/stories/e2e/index.story.tsx +9 -5
  445. package/src/button/stories/index.story.tsx +9 -5
  446. package/src/button/test/index.tsx +0 -5
  447. package/src/button-group/stories/index.story.tsx +5 -3
  448. package/src/calendar/stories/date-calendar.story.tsx +1 -1
  449. package/src/calendar/stories/date-range-calendar.story.tsx +1 -1
  450. package/src/card/stories/index.story.tsx +4 -2
  451. package/src/checkbox-control/stories/index.story.tsx +1 -1
  452. package/src/circular-option-picker/circular-option-picker-option.tsx +2 -1
  453. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  454. package/src/clipboard-button/index.tsx +2 -0
  455. package/src/clipboard-button/types.ts +1 -0
  456. package/src/color-indicator/stories/index.story.tsx +1 -1
  457. package/src/color-palette/stories/index.story.tsx +1 -1
  458. package/src/color-picker/stories/index.story.tsx +1 -1
  459. package/src/combobox-control/stories/index.story.tsx +2 -1
  460. package/src/composite/legacy/stories/index.story.tsx +1 -1
  461. package/src/composite/legacy/stories/utils.tsx +1 -1
  462. package/src/composite/stories/index.story.tsx +1 -1
  463. package/src/confirm-dialog/stories/index.story.tsx +6 -2
  464. package/src/context/context-system-provider.js +2 -1
  465. package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
  466. package/src/custom-select-control/stories/index.story.tsx +2 -1
  467. package/src/custom-select-control-v2/stories/index.story.tsx +1 -1
  468. package/src/date-time/stories/date-time.story.tsx +1 -1
  469. package/src/date-time/stories/date.story.tsx +1 -1
  470. package/src/date-time/stories/time.story.tsx +1 -1
  471. package/src/disabled/stories/index.story.tsx +1 -1
  472. package/src/divider/stories/index.story.tsx +1 -1
  473. package/src/draggable/stories/index.story.tsx +1 -1
  474. package/src/drop-zone/stories/index.story.tsx +1 -1
  475. package/src/dropdown/stories/index.story.tsx +2 -1
  476. package/src/dropdown-menu/stories/index.story.tsx +1 -1
  477. package/src/duotone-picker/duotone-picker.tsx +1 -1
  478. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  479. package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
  480. package/src/elevation/stories/index.story.tsx +1 -1
  481. package/src/external-link/stories/index.story.tsx +1 -1
  482. package/src/flex/stories/index.story.tsx +1 -1
  483. package/src/focal-point-picker/stories/index.story.tsx +1 -1
  484. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -1
  485. package/src/font-size-picker/stories/index.story.tsx +2 -1
  486. package/src/form-file-upload/index.tsx +2 -0
  487. package/src/form-file-upload/stories/index.story.tsx +2 -2
  488. package/src/form-toggle/stories/index.story.tsx +1 -1
  489. package/src/form-token-field/stories/index.story.tsx +3 -1
  490. package/src/form-token-field/token.tsx +2 -2
  491. package/src/gradient-picker/stories/index.story.tsx +1 -1
  492. package/src/grid/stories/index.story.tsx +1 -1
  493. package/src/guide/stories/index.story.tsx +6 -2
  494. package/src/h-stack/stories/e2e/index.story.tsx +1 -1
  495. package/src/h-stack/stories/index.story.tsx +1 -1
  496. package/src/heading/stories/index.story.tsx +1 -1
  497. package/src/higher-order/with-fallback-styles/index.tsx +1 -1
  498. package/src/higher-order/with-notices/test/index.tsx +10 -2
  499. package/src/icon/stories/index.story.tsx +1 -1
  500. package/src/index.ts +6 -0
  501. package/src/input-control/stories/index.story.tsx +3 -2
  502. package/src/input-control/styles/input-control-styles.tsx +0 -4
  503. package/src/item-group/stories/index.story.tsx +1 -1
  504. package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
  505. package/src/menu/popover.tsx +1 -0
  506. package/src/menu/stories/index.story.tsx +5 -2
  507. package/src/menu/styles.ts +36 -26
  508. package/src/menu-group/stories/index.story.tsx +1 -1
  509. package/src/menu-item/stories/index.story.tsx +1 -1
  510. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  511. package/src/modal/stories/index.story.tsx +11 -3
  512. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  513. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  514. package/src/navigation/stories/index.story.tsx +1 -1
  515. package/src/navigation/stories/utils/controlled-state.tsx +4 -1
  516. package/src/navigation/stories/utils/default.tsx +1 -1
  517. package/src/navigation/stories/utils/group.tsx +1 -1
  518. package/src/navigation/stories/utils/hide-if-empty.tsx +1 -1
  519. package/src/navigation/stories/utils/more-examples.tsx +1 -1
  520. package/src/navigation/stories/utils/search.tsx +1 -1
  521. package/src/navigator/stories/index.story.tsx +2 -1
  522. package/src/notice/stories/index.story.tsx +1 -1
  523. package/src/number-control/stories/index.story.tsx +2 -1
  524. package/src/palette-edit/stories/index.story.tsx +1 -1
  525. package/src/panel/stories/index.story.tsx +1 -1
  526. package/src/placeholder/stories/index.story.tsx +1 -1
  527. package/src/popover/stories/index.story.tsx +9 -2
  528. package/src/progress-bar/stories/index.story.tsx +1 -1
  529. package/src/query-controls/stories/index.story.tsx +1 -1
  530. package/src/radio-control/stories/index.story.tsx +1 -1
  531. package/src/radio-group/radio.tsx +2 -0
  532. package/src/radio-group/stories/index.story.tsx +1 -1
  533. package/src/range-control/stories/index.story.tsx +5 -1
  534. package/src/resizable-box/stories/index.story.tsx +1 -1
  535. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  536. package/src/sandbox/stories/index.story.tsx +1 -1
  537. package/src/scroll-lock/stories/index.story.tsx +6 -2
  538. package/src/scrollable/stories/index.story.tsx +1 -1
  539. package/src/search-control/stories/index.story.tsx +1 -1
  540. package/src/select-control/stories/index.story.tsx +3 -1
  541. package/src/shortcut/stories/index.story.tsx +1 -1
  542. package/src/slot-fill/stories/index.story.tsx +1 -1
  543. package/src/snackbar/stories/index.story.tsx +1 -1
  544. package/src/snackbar/stories/list.story.tsx +1 -1
  545. package/src/spacer/stories/index.story.tsx +1 -1
  546. package/src/spinner/stories/index.story.tsx +1 -1
  547. package/src/surface/stories/index.story.tsx +1 -1
  548. package/src/tab-panel/stories/index.story.tsx +1 -1
  549. package/src/tabs/stories/index.story.tsx +11 -3
  550. package/src/text/stories/index.story.tsx +1 -1
  551. package/src/text-control/stories/index.story.tsx +2 -1
  552. package/src/text-highlight/stories/index.story.tsx +1 -1
  553. package/src/textarea-control/stories/index.story.tsx +1 -1
  554. package/src/theme/stories/index.story.tsx +8 -4
  555. package/src/tip/stories/index.story.tsx +1 -1
  556. package/src/toggle-control/stories/index.story.tsx +1 -1
  557. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  558. package/src/toolbar/stories/index.story.tsx +1 -1
  559. package/src/tools-panel/stories/index.story.tsx +1 -1
  560. package/src/tooltip/stories/index.story.tsx +14 -4
  561. package/src/tree-grid/stories/index.story.tsx +6 -2
  562. package/src/tree-select/index.tsx +2 -0
  563. package/src/tree-select/stories/index.story.tsx +2 -1
  564. package/src/truncate/stories/index.story.tsx +1 -1
  565. package/src/unit-control/stories/index.story.tsx +3 -1
  566. package/src/v-stack/stories/e2e/index.story.tsx +1 -1
  567. package/src/v-stack/stories/index.story.tsx +1 -1
  568. package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
  569. package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
  570. package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
  571. package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
  572. package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
  573. package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
  574. package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
  575. package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
  576. package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
  577. package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
  578. package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
  579. package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
  580. package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
  581. package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
  582. package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
  583. package/src/view/stories/index.story.tsx +1 -1
  584. package/src/visually-hidden/stories/index.story.tsx +1 -1
  585. package/src/z-stack/stories/index.story.tsx +1 -1
package/CHANGELOG.md CHANGED
@@ -2,7 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 31.0.0-next.0 (2026-01-07)
5
+ ## 32.0.0 (2026-01-16)
6
+
7
+ ### Code Quality
8
+
9
+ - Fix missing dependencies. [#74310](https://github.com/WordPress/gutenberg/pull/74310)
10
+ - Fix generated TS types referencing unavailable `csstype`. [#74655](https://github.com/WordPress/gutenberg/pull/74655)
6
11
 
7
12
  ### Breaking Changes
8
13
 
@@ -37,6 +42,7 @@
37
42
  - Converted package to a compliant dual CJS/ESM module ([#73822](https://github.com/WordPress/gutenberg/pull/73822) and [#74348](https://github.com/WordPress/gutenberg/pull/74348)).
38
43
  - `ToggleGroupControl`: Update visual design ([#74036](https://github.com/WordPress/gutenberg/pull/74036)).
39
44
  - `Notice`: Add `disabled` prop to action buttons. Also allow `onClick` to work alongside `url` ([#74094](https://github.com/WordPress/gutenberg/pull/74094)).
45
+ - `Menu`: Remove animation on submenus ([#74548](https://github.com/WordPress/gutenberg/pull/74548)).
40
46
 
41
47
  ### Bug Fixes
42
48
 
@@ -45,6 +51,7 @@
45
51
  - `DatePicker`: Fix missing scheduled events and current date indicators. ([#73887](https://github.com/WordPress/gutenberg/pull/73887))
46
52
  - `DatePicker`: Fix handling of `currentDate` when passed values as Date or timestamp. ([#73887](https://github.com/WordPress/gutenberg/pull/73887))
47
53
  - `Popover`: Fix bug where clicking outside nested popovers only closed the inner one. ([#74340](https://github.com/WordPress/gutenberg/pull/74340))
54
+ - `InputControl`: Allow label to wrap for long labels/translations. ([#74301](https://github.com/WordPress/gutenberg/pull/74301)).
48
55
 
49
56
  ### Internal
50
57
 
@@ -52,6 +59,7 @@
52
59
  - `AnglePickerControl`: Migrate styles from Emotion to a CSS module ([#73786](https://github.com/WordPress/gutenberg/pull/73786)).
53
60
  - `Menu`: Clean up popover wrappers ([#74207](https://github.com/WordPress/gutenberg/pull/74207)).
54
61
  - `Button`, `DateCalendar`, `DateRangeCalendar`, `CheckboxControl`, `Panel`, `Placeholder`: Remove outdated vendor prefix properties in CSS ([#74213](https://github.com/WordPress/gutenberg/pull/74213)).
62
+ - Updated `fast-deep-equal` imports for compatibility with strict Node.js resolution ([#74530](https://github.com/WordPress/gutenberg/pull/74530)).
55
63
 
56
64
  ## 30.9.0 (2025-11-26)
57
65
 
@@ -158,13 +158,21 @@ function BoxControl({
158
158
  onClick: toggleLinked,
159
159
  isLinked
160
160
  })
161
- }), !isLinked && splitOnAxis && ["vertical", "horizontal"].map((axis) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_control.default, {
162
- side: axis,
163
- ...inputControlProps
164
- }, axis)), !isLinked && !splitOnAxis && Array.from(sidesToRender).map((axis) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_control.default, {
165
- side: axis,
166
- ...inputControlProps
167
- }, axis)), allowReset && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_box_control_styles.ResetButton, {
161
+ }), !isLinked && splitOnAxis && ["vertical", "horizontal"].map((axis) => (
162
+ // Disable reason: the parent component is handling the __next40pxDefaultSize prop
163
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
164
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_control.default, {
165
+ side: axis,
166
+ ...inputControlProps
167
+ }, axis)
168
+ )), !isLinked && !splitOnAxis && Array.from(sidesToRender).map((axis) => (
169
+ // Disable reason: the parent component is handling the __next40pxDefaultSize prop
170
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input_control.default, {
172
+ side: axis,
173
+ ...inputControlProps
174
+ }, axis)
175
+ )), allowReset && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_box_control_styles.ResetButton, {
168
176
  className: "component-box-control__reset-button",
169
177
  variant: "secondary",
170
178
  size: "small",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/box-control/index.tsx"],
4
- "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { BaseControl } from '../base-control';\nimport InputControl from './input-control';\nimport LinkedButton from './linked-button';\nimport { Grid } from '../grid';\nimport { InputWrapper, ResetButton, LinkedButtonWrapper } from './styles/box-control-styles';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport { DEFAULT_VALUES, getInitialSide, isValueMixed, isValuesDefined, getAllowedSides } from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst defaultInputProps = {\n min: 0\n};\nconst noop = () => {};\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(BoxControl, 'inspector-box-control');\n return idProp || instanceId;\n}\n\n/**\n * A control that lets users set values for top, right, bottom, and left. Can be\n * used as an input control for values like `padding` or `margin`.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { BoxControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ values, setValues ] = useState( {\n * top: '50px',\n * left: '10%',\n * right: '10%',\n * bottom: '50px',\n * } );\n *\n * return (\n * <BoxControl\n * __next40pxDefaultSize\n * values={ values }\n * onChange={ setValues }\n * />\n * );\n * };\n * ```\n */\nfunction BoxControl({\n __next40pxDefaultSize = false,\n id: idProp,\n inputProps = defaultInputProps,\n onChange = noop,\n label = __('Box Control'),\n values: valuesProp,\n units,\n sides,\n splitOnAxis = false,\n allowReset = true,\n resetValues = DEFAULT_VALUES,\n presets,\n presetKey,\n onMouseOver,\n onMouseOut\n}) {\n const [values, setValues] = useControlledState(valuesProp, {\n fallback: DEFAULT_VALUES\n });\n const inputValues = values || DEFAULT_VALUES;\n const hasInitialValue = isValuesDefined(valuesProp);\n const hasOneSide = sides?.length === 1;\n const [isDirty, setIsDirty] = useState(hasInitialValue);\n const [isLinked, setIsLinked] = useState(!hasInitialValue || !isValueMixed(inputValues) || hasOneSide);\n const [side, setSide] = useState(getInitialSide(isLinked, splitOnAxis));\n\n // Tracking selected units via internal state allows filtering of CSS unit\n // only values from being saved while maintaining preexisting unit selection\n // behaviour. Filtering CSS only values prevents invalid style values.\n const [selectedUnits, setSelectedUnits] = useState({\n top: parseQuantityAndUnitFromRawValue(valuesProp?.top)[1],\n right: parseQuantityAndUnitFromRawValue(valuesProp?.right)[1],\n bottom: parseQuantityAndUnitFromRawValue(valuesProp?.bottom)[1],\n left: parseQuantityAndUnitFromRawValue(valuesProp?.left)[1]\n });\n const id = useUniqueId(idProp);\n const headingId = `${id}-heading`;\n const toggleLinked = () => {\n setIsLinked(!isLinked);\n setSide(getInitialSide(!isLinked, splitOnAxis));\n };\n const handleOnFocus = (_event, {\n side: nextSide\n }) => {\n setSide(nextSide);\n };\n const handleOnChange = nextValues => {\n onChange(nextValues);\n setValues(nextValues);\n setIsDirty(true);\n };\n const handleOnReset = () => {\n onChange(resetValues);\n setValues(resetValues);\n setSelectedUnits(resetValues);\n setIsDirty(false);\n };\n const inputControlProps = {\n onMouseOver,\n onMouseOut,\n ...inputProps,\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n isLinked,\n units,\n selectedUnits,\n setSelectedUnits,\n sides,\n values: inputValues,\n __next40pxDefaultSize,\n presets,\n presetKey\n };\n maybeWarnDeprecated36pxSize({\n componentName: 'BoxControl',\n __next40pxDefaultSize,\n size: undefined\n });\n const sidesToRender = getAllowedSides(sides);\n if (presets && !presetKey || !presets && presetKey) {\n const definedProp = presets ? 'presets' : 'presetKey';\n const missingProp = presets ? 'presetKey' : 'presets';\n globalThis.SCRIPT_DEBUG === true ? warning(`wp.components.BoxControl: the '${missingProp}' prop is required when the '${definedProp}' prop is defined.`) : void 0;\n }\n return /*#__PURE__*/_jsxs(Grid, {\n id: id,\n columns: 3,\n templateColumns: \"1fr min-content min-content\",\n role: \"group\",\n \"aria-labelledby\": headingId,\n children: [/*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n id: headingId,\n children: label\n }), isLinked && /*#__PURE__*/_jsx(InputWrapper, {\n children: /*#__PURE__*/_jsx(InputControl, {\n side: \"all\",\n ...inputControlProps\n })\n }), !hasOneSide && /*#__PURE__*/_jsx(LinkedButtonWrapper, {\n children: /*#__PURE__*/_jsx(LinkedButton, {\n onClick: toggleLinked,\n isLinked: isLinked\n })\n }), !isLinked && splitOnAxis && ['vertical', 'horizontal'].map(axis => /*#__PURE__*/_jsx(InputControl, {\n side: axis,\n ...inputControlProps\n }, axis)), !isLinked && !splitOnAxis && Array.from(sidesToRender).map(axis => /*#__PURE__*/_jsx(InputControl, {\n side: axis,\n ...inputControlProps\n }, axis)), allowReset && /*#__PURE__*/_jsx(ResetButton, {\n className: \"component-box-control__reset-button\",\n variant: \"secondary\",\n size: \"small\",\n onClick: handleOnReset,\n disabled: !isDirty,\n children: __('Reset')\n })]\n });\n}\nexport { applyValueToSides } from './utils';\nexport default BoxControl;"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA8B;AAC9B,qBAAyB;AACzB,kBAAmB;AACnB,qBAAoB;AAKpB,0BAA4B;AAC5B,2BAAyB;AACzB,2BAAyB;AACzB,kBAAqB;AACrB,gCAA+D;AAC/D,mBAAiD;AACjD,IAAAA,gBAA+F;AAC/F,mBAAmC;AACnC,kCAA4C;AAC5C,yBAA2C;AA4J3C,IAAAA,gBAAkC;AA3JlC,IAAM,oBAAoB;AAAA,EACxB,KAAK;AACP;AACA,IAAM,OAAO,MAAM;AAAC;AACpB,SAAS,YAAY,QAAQ;AAC3B,QAAM,iBAAa,8BAAc,YAAY,uBAAuB;AACpE,SAAO,UAAU;AACnB;AA4BA,SAAS,WAAW;AAAA,EAClB,wBAAwB;AAAA,EACxB,IAAI;AAAA,EACJ,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAQ,gBAAG,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,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AAD,KAAK,qBAAAC,SAAc;AAAA,MAC5G,MAAM;AAAA,MACN,GAAG;AAAA,IACL,GAAG,IAAI,CAAC,GAAG,cAA2B,uCAAAD,KAAK,uCAAa;AAAA,MACtD,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,MACX,cAAU,gBAAG,OAAO;AAAA,IACtB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAEA,IAAO,sBAAQ;",
4
+ "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport { BaseControl } from '../base-control';\nimport InputControl from './input-control';\nimport LinkedButton from './linked-button';\nimport { Grid } from '../grid';\nimport { InputWrapper, ResetButton, LinkedButtonWrapper } from './styles/box-control-styles';\nimport { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';\nimport { DEFAULT_VALUES, getInitialSide, isValueMixed, isValuesDefined, getAllowedSides } from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst defaultInputProps = {\n min: 0\n};\nconst noop = () => {};\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(BoxControl, 'inspector-box-control');\n return idProp || instanceId;\n}\n\n/**\n * A control that lets users set values for top, right, bottom, and left. Can be\n * used as an input control for values like `padding` or `margin`.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { BoxControl } from '@wordpress/components';\n *\n * function Example() {\n * const [ values, setValues ] = useState( {\n * top: '50px',\n * left: '10%',\n * right: '10%',\n * bottom: '50px',\n * } );\n *\n * return (\n * <BoxControl\n * __next40pxDefaultSize\n * values={ values }\n * onChange={ setValues }\n * />\n * );\n * };\n * ```\n */\nfunction BoxControl({\n __next40pxDefaultSize = false,\n id: idProp,\n inputProps = defaultInputProps,\n onChange = noop,\n label = __('Box Control'),\n values: valuesProp,\n units,\n sides,\n splitOnAxis = false,\n allowReset = true,\n resetValues = DEFAULT_VALUES,\n presets,\n presetKey,\n onMouseOver,\n onMouseOut\n}) {\n const [values, setValues] = useControlledState(valuesProp, {\n fallback: DEFAULT_VALUES\n });\n const inputValues = values || DEFAULT_VALUES;\n const hasInitialValue = isValuesDefined(valuesProp);\n const hasOneSide = sides?.length === 1;\n const [isDirty, setIsDirty] = useState(hasInitialValue);\n const [isLinked, setIsLinked] = useState(!hasInitialValue || !isValueMixed(inputValues) || hasOneSide);\n const [side, setSide] = useState(getInitialSide(isLinked, splitOnAxis));\n\n // Tracking selected units via internal state allows filtering of CSS unit\n // only values from being saved while maintaining preexisting unit selection\n // behaviour. Filtering CSS only values prevents invalid style values.\n const [selectedUnits, setSelectedUnits] = useState({\n top: parseQuantityAndUnitFromRawValue(valuesProp?.top)[1],\n right: parseQuantityAndUnitFromRawValue(valuesProp?.right)[1],\n bottom: parseQuantityAndUnitFromRawValue(valuesProp?.bottom)[1],\n left: parseQuantityAndUnitFromRawValue(valuesProp?.left)[1]\n });\n const id = useUniqueId(idProp);\n const headingId = `${id}-heading`;\n const toggleLinked = () => {\n setIsLinked(!isLinked);\n setSide(getInitialSide(!isLinked, splitOnAxis));\n };\n const handleOnFocus = (_event, {\n side: nextSide\n }) => {\n setSide(nextSide);\n };\n const handleOnChange = nextValues => {\n onChange(nextValues);\n setValues(nextValues);\n setIsDirty(true);\n };\n const handleOnReset = () => {\n onChange(resetValues);\n setValues(resetValues);\n setSelectedUnits(resetValues);\n setIsDirty(false);\n };\n const inputControlProps = {\n onMouseOver,\n onMouseOut,\n ...inputProps,\n onChange: handleOnChange,\n onFocus: handleOnFocus,\n isLinked,\n units,\n selectedUnits,\n setSelectedUnits,\n sides,\n values: inputValues,\n __next40pxDefaultSize,\n presets,\n presetKey\n };\n maybeWarnDeprecated36pxSize({\n componentName: 'BoxControl',\n __next40pxDefaultSize,\n size: undefined\n });\n const sidesToRender = getAllowedSides(sides);\n if (presets && !presetKey || !presets && presetKey) {\n const definedProp = presets ? 'presets' : 'presetKey';\n const missingProp = presets ? 'presetKey' : 'presets';\n globalThis.SCRIPT_DEBUG === true ? warning(`wp.components.BoxControl: the '${missingProp}' prop is required when the '${definedProp}' prop is defined.`) : void 0;\n }\n return /*#__PURE__*/_jsxs(Grid, {\n id: id,\n columns: 3,\n templateColumns: \"1fr min-content min-content\",\n role: \"group\",\n \"aria-labelledby\": headingId,\n children: [/*#__PURE__*/_jsx(BaseControl.VisualLabel, {\n id: headingId,\n children: label\n }), isLinked && /*#__PURE__*/_jsx(InputWrapper, {\n children: /*#__PURE__*/_jsx(InputControl, {\n side: \"all\",\n ...inputControlProps\n })\n }), !hasOneSide && /*#__PURE__*/_jsx(LinkedButtonWrapper, {\n children: /*#__PURE__*/_jsx(LinkedButton, {\n onClick: toggleLinked,\n isLinked: isLinked\n })\n }), !isLinked && splitOnAxis && ['vertical', 'horizontal'].map(axis =>\n /*#__PURE__*/\n // Disable reason: the parent component is handling the __next40pxDefaultSize prop\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(InputControl, {\n side: axis,\n ...inputControlProps\n }, axis)), !isLinked && !splitOnAxis && Array.from(sidesToRender).map(axis =>\n /*#__PURE__*/\n // Disable reason: the parent component is handling the __next40pxDefaultSize prop\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(InputControl, {\n side: axis,\n ...inputControlProps\n }, axis)), allowReset && /*#__PURE__*/_jsx(ResetButton, {\n className: \"component-box-control__reset-button\",\n variant: \"secondary\",\n size: \"small\",\n onClick: handleOnReset,\n disabled: !isDirty,\n children: __('Reset')\n })]\n });\n}\nexport { applyValueToSides } from './utils';\nexport default BoxControl;"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA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AAA,IACnB,UAAU,CAAc,uCAAAC,KAAK,gCAAY,aAAa;AAAA,MACpD,IAAI;AAAA,MACJ,UAAU;AAAA,IACZ,CAAC,GAAG,YAAyB,uCAAAA,KAAK,wCAAc;AAAA,MAC9C,UAAuB,uCAAAA,KAAK,qBAAAC,SAAc;AAAA,QACxC,MAAM;AAAA,QACN,GAAG;AAAA,MACL,CAAC;AAAA,IACH,CAAC,GAAG,CAAC,cAA2B,uCAAAD,KAAK,+CAAqB;AAAA,MACxD,UAAuB,uCAAAA,KAAK,qBAAAE,SAAc;AAAA,QACxC,SAAS;AAAA,QACT;AAAA,MACF,CAAC;AAAA,IACH,CAAC,GAAG,CAAC,YAAY,eAAe,CAAC,YAAY,YAAY,EAAE,IAAI;AAAA;AAAA;AAAA,MAI/D,uCAAAF,KAAK,qBAAAC,SAAc;AAAA,QACjB,MAAM;AAAA,QACN,GAAG;AAAA,MACL,GAAG,IAAI;AAAA,KAAC,GAAG,CAAC,YAAY,CAAC,eAAe,MAAM,KAAK,aAAa,EAAE,IAAI;AAAA;AAAA;AAAA,MAItE,uCAAAD,KAAK,qBAAAC,SAAc;AAAA,QACjB,MAAM;AAAA,QACN,GAAG;AAAA,MACL,GAAG,IAAI;AAAA,KAAC,GAAG,cAA2B,uCAAAD,KAAK,uCAAa;AAAA,MACtD,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,UAAU,CAAC;AAAA,MACX,cAAU,gBAAG,OAAO;AAAA,IACtB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAEA,IAAO,sBAAQ;",
6
6
  "names": ["import_utils", "warning", "_jsxs", "_jsx", "InputControl", "LinkedButton"]
7
7
  }
@@ -49,14 +49,18 @@ function UnforwardedIconButton({
49
49
  alternative: "wp.components.Button",
50
50
  version: "6.2"
51
51
  });
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {
53
- ...props,
54
- ref,
55
- tooltipPosition: labelPosition,
56
- iconSize: size,
57
- showTooltip: tooltip !== void 0 ? !!tooltip : void 0,
58
- label: tooltip || label
59
- });
52
+ return (
53
+ // Disable reason: the parent component is taking care of the __next40pxDefaultSize prop.
54
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {
56
+ ...props,
57
+ ref,
58
+ tooltipPosition: labelPosition,
59
+ iconSize: size,
60
+ showTooltip: tooltip !== void 0 ? !!tooltip : void 0,
61
+ label: tooltip || label
62
+ })
63
+ );
60
64
  }
61
65
  var deprecated_default = (0, import_element.forwardRef)(UnforwardedIconButton);
62
66
  //# sourceMappingURL=deprecated.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/button/deprecated.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '.';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedIconButton({\n label,\n labelPosition,\n size,\n tooltip,\n ...props\n}, ref) {\n deprecated('wp.components.IconButton', {\n since: '5.4',\n alternative: 'wp.components.Button',\n version: '6.2'\n });\n return /*#__PURE__*/_jsx(Button, {\n ...props,\n ref: ref,\n tooltipPosition: labelPosition,\n iconSize: size,\n showTooltip: tooltip !== undefined ? !!tooltip : undefined,\n label: tooltip || label\n });\n}\nexport default forwardRef(UnforwardedIconButton);"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,wBAAuB;AACvB,qBAA2B;AAK3B,eAAmB;AACnB,yBAA4B;AAC5B,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,wBAAAA,SAAW,4BAA4B;AAAA,IACrC,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,EACX,CAAC;AACD,SAAoB,uCAAAC,KAAK,SAAAC,SAAQ;AAAA,IAC/B,GAAG;AAAA,IACH;AAAA,IACA,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,aAAa,YAAY,SAAY,CAAC,CAAC,UAAU;AAAA,IACjD,OAAO,WAAW;AAAA,EACpB,CAAC;AACH;AACA,IAAO,yBAAQ,2BAAW,qBAAqB;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '.';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedIconButton({\n label,\n labelPosition,\n size,\n tooltip,\n ...props\n}, ref) {\n deprecated('wp.components.IconButton', {\n since: '5.4',\n alternative: 'wp.components.Button',\n version: '6.2'\n });\n return (\n /*#__PURE__*/\n // Disable reason: the parent component is taking care of the __next40pxDefaultSize prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n ...props,\n ref: ref,\n tooltipPosition: labelPosition,\n iconSize: size,\n showTooltip: tooltip !== undefined ? !!tooltip : undefined,\n label: tooltip || label\n })\n );\n}\nexport default forwardRef(UnforwardedIconButton);"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,wBAAuB;AACvB,qBAA2B;AAK3B,eAAmB;AACnB,yBAA4B;AAC5B,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,wBAAAA,SAAW,4BAA4B;AAAA,IACrC,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,EACX,CAAC;AACD;AAAA;AAAA;AAAA,IAIE,uCAAAC,KAAK,SAAAC,SAAQ;AAAA,MACX,GAAG;AAAA,MACH;AAAA,MACA,iBAAiB;AAAA,MACjB,UAAU;AAAA,MACV,aAAa,YAAY,SAAY,CAAC,CAAC,UAAU;AAAA,MACjD,OAAO,WAAW;AAAA,IACpB,CAAC;AAAA;AAEL;AACA,IAAO,yBAAQ,2BAAW,qBAAqB;",
6
6
  "names": ["deprecated", "_jsx", "Button"]
7
7
  }
@@ -48,6 +48,7 @@ function UnforwardedOptionAsButton(props, forwardedRef) {
48
48
  ...additionalProps
49
49
  } = props;
50
50
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
51
+ __next40pxDefaultSize: true,
51
52
  ...additionalProps,
52
53
  "aria-pressed": isPressed,
53
54
  ref: forwardedRef,
@@ -73,6 +74,7 @@ function UnforwardedOptionAsOption(props, forwardedRef) {
73
74
  }, [isSelected, setActiveId, activeId, id]);
74
75
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_composite.Composite.Item, {
75
76
  render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
77
+ __next40pxDefaultSize: true,
76
78
  ...additionalProps,
77
79
  role: "option",
78
80
  "aria-selected": !!isSelected,
@@ -98,7 +100,6 @@ function Option({
98
100
  const commonProps = {
99
101
  id,
100
102
  className: "components-circular-option-picker__option",
101
- __next40pxDefaultSize: true,
102
103
  ...additionalProps
103
104
  };
104
105
  const isListbox = setActiveId !== void 0;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/circular-option-picker/circular-option-picker-option.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedOptionAsButton(props, forwardedRef) {\n const {\n isPressed,\n label,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(Button, {\n ...additionalProps,\n \"aria-pressed\": isPressed,\n ref: forwardedRef,\n label: label\n });\n}\nconst OptionAsButton = forwardRef(UnforwardedOptionAsButton);\nfunction UnforwardedOptionAsOption(props, forwardedRef) {\n const {\n id,\n isSelected,\n label,\n ...additionalProps\n } = props;\n const {\n setActiveId,\n activeId\n } = useContext(CircularOptionPickerContext);\n useEffect(() => {\n if (isSelected && !activeId) {\n // The setTimeout call is necessary to make sure that this update\n // doesn't get overridden by `Composite`'s internal logic, which picks\n // an initial active item if one is not specifically set.\n window.setTimeout(() => setActiveId?.(id), 0);\n }\n }, [isSelected, setActiveId, activeId, id]);\n return /*#__PURE__*/_jsx(Composite.Item, {\n render: /*#__PURE__*/_jsx(Button, {\n ...additionalProps,\n role: \"option\",\n \"aria-selected\": !!isSelected,\n ref: forwardedRef,\n label: label\n }),\n id: id\n });\n}\nconst OptionAsOption = forwardRef(UnforwardedOptionAsOption);\nexport function Option({\n className,\n isSelected,\n selectedIconProps = {},\n tooltipText,\n ...additionalProps\n}) {\n const {\n baseId,\n setActiveId\n } = useContext(CircularOptionPickerContext);\n const id = useInstanceId(Option, baseId || 'components-circular-option-picker__option');\n const commonProps = {\n id,\n className: 'components-circular-option-picker__option',\n __next40pxDefaultSize: true,\n ...additionalProps\n };\n const isListbox = setActiveId !== undefined;\n const optionControl = isListbox ? /*#__PURE__*/_jsx(OptionAsOption, {\n ...commonProps,\n label: tooltipText,\n isSelected: isSelected\n }) : /*#__PURE__*/_jsx(OptionAsButton, {\n ...commonProps,\n label: tooltipText,\n isPressed: isSelected\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(className, 'components-circular-option-picker__option-wrapper'),\n children: [optionControl, isSelected && /*#__PURE__*/_jsx(Icon, {\n icon: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AA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,2BAAW,iEAA2B;AAC1C,QAAM,SAAK,8BAAc,QAAQ,UAAU,2CAA2C;AACtF,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,IACX,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL;AACA,QAAM,YAAY,gBAAgB;AAClC,QAAM,gBAAgB,YAAyB,uCAAAD,KAAK,gBAAgB;AAAA,IAClE,GAAG;AAAA,IACH,OAAO;AAAA,IACP;AAAA,EACF,CAAC,IAAiB,uCAAAA,KAAK,gBAAgB;AAAA,IACrC,GAAG;AAAA,IACH,OAAO;AAAA,IACP,WAAW;AAAA,EACb,CAAC;AACD,SAAoB,uCAAAE,MAAM,OAAO;AAAA,IAC/B,eAAW,YAAAC,SAAK,WAAW,mDAAmD;AAAA,IAC9E,UAAU,CAAC,eAAe,cAA2B,uCAAAH,KAAK,mBAAM;AAAA,MAC9D,MAAM;AAAA,MACN,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedOptionAsButton(props, forwardedRef) {\n const {\n isPressed,\n label,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ...additionalProps,\n \"aria-pressed\": isPressed,\n ref: forwardedRef,\n label: label\n });\n}\nconst OptionAsButton = forwardRef(UnforwardedOptionAsButton);\nfunction UnforwardedOptionAsOption(props, forwardedRef) {\n const {\n id,\n isSelected,\n label,\n ...additionalProps\n } = props;\n const {\n setActiveId,\n activeId\n } = useContext(CircularOptionPickerContext);\n useEffect(() => {\n if (isSelected && !activeId) {\n // The setTimeout call is necessary to make sure that this update\n // doesn't get overridden by `Composite`'s internal logic, which picks\n // an initial active item if one is not specifically set.\n window.setTimeout(() => setActiveId?.(id), 0);\n }\n }, [isSelected, setActiveId, activeId, id]);\n return /*#__PURE__*/_jsx(Composite.Item, {\n render: /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ...additionalProps,\n role: \"option\",\n \"aria-selected\": !!isSelected,\n ref: forwardedRef,\n label: label\n }),\n id: id\n });\n}\nconst OptionAsOption = forwardRef(UnforwardedOptionAsOption);\nexport function Option({\n className,\n isSelected,\n selectedIconProps = {},\n tooltipText,\n ...additionalProps\n}) {\n const {\n baseId,\n setActiveId\n } = useContext(CircularOptionPickerContext);\n const id = useInstanceId(Option, baseId || 'components-circular-option-picker__option');\n const commonProps = {\n id,\n className: 'components-circular-option-picker__option',\n ...additionalProps\n };\n const isListbox = setActiveId !== undefined;\n const optionControl = isListbox ? /*#__PURE__*/_jsx(OptionAsOption, {\n ...commonProps,\n label: tooltipText,\n isSelected: isSelected\n }) : /*#__PURE__*/_jsx(OptionAsButton, {\n ...commonProps,\n label: tooltipText,\n isPressed: isSelected\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(className, 'components-circular-option-picker__option-wrapper'),\n children: [optionControl, isSelected && /*#__PURE__*/_jsx(Icon, {\n icon: check,\n ...selectedIconProps\n })]\n });\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA8B;AAC9B,qBAAkD;AAClD,mBAA4B;AAK5B,4CAA4C;AAC5C,oBAAmB;AACnB,uBAA0B;AAC1B,yBAA2C;AAC3C,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,G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AAAA,IACH,OAAO;AAAA,IACP;AAAA,EACF,CAAC,IAAiB,uCAAAA,KAAK,gBAAgB;AAAA,IACrC,GAAG;AAAA,IACH,OAAO;AAAA,IACP,WAAW;AAAA,EACb,CAAC;AACD,SAAoB,uCAAAE,MAAM,OAAO;AAAA,IAC/B,eAAW,YAAAC,SAAK,WAAW,mDAAmD;AAAA,IAC9E,UAAU,CAAC,eAAe,cAA2B,uCAAAH,KAAK,mBAAM;AAAA,MAC9D,MAAM;AAAA,MACN,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
6
6
  "names": ["_jsx", "Button", "_jsxs", "clsx"]
7
7
  }
@@ -73,12 +73,16 @@ function ClipboardButton({
73
73
  const focusOnCopyEventTarget = (event) => {
74
74
  event.target.focus();
75
75
  };
76
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
77
- ...buttonProps,
78
- className: classes,
79
- ref,
80
- onCopy: focusOnCopyEventTarget,
81
- children
82
- });
76
+ return (
77
+ // Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.
78
+ // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.default, {
80
+ ...buttonProps,
81
+ className: classes,
82
+ ref,
83
+ onCopy: focusOnCopyEventTarget,
84
+ children
85
+ })
86
+ );
83
87
  }
84
88
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/clipboard-button/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst TIMEOUT = 4000;\nexport default function ClipboardButton({\n className,\n children,\n onCopy,\n onFinishCopy,\n text,\n ...buttonProps\n}) {\n deprecated('wp.components.ClipboardButton', {\n since: '5.8',\n alternative: 'wp.compose.useCopyToClipboard'\n });\n const timeoutIdRef = useRef();\n const ref = useCopyToClipboard(text, () => {\n onCopy();\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n if (onFinishCopy) {\n timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);\n }\n });\n useEffect(() => {\n return () => {\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n };\n }, []);\n const classes = clsx('components-clipboard-button', className);\n\n // Workaround for inconsistent behavior in Safari, where <textarea> is not\n // the document.activeElement at the moment when the copy event fires.\n // This causes documentHasSelection() in the copy-handler component to\n // mistakenly override the ClipboardButton, and copy a serialized string\n // of the current block instead.\n const focusOnCopyEventTarget = event => {\n // @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n event.target.focus();\n };\n return /*#__PURE__*/_jsx(Button, {\n ...buttonProps,\n className: classes,\n ref: ref,\n onCopy: focusOnCopyEventTarget,\n children: children\n });\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAAkC;AAClC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,yBAA4B;AAC5B,IAAM,UAAU;AACD,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,wBAAAA,SAAW,iCAAiC;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AACD,QAAM,mBAAe,uBAAO;AAC5B,QAAM,UAAM,mCAAmB,MAAM,MAAM;AACzC,WAAO;AACP,QAAI,aAAa,SAAS;AACxB,mBAAa,aAAa,OAAO;AAAA,IACnC;AACA,QAAI,cAAc;AAChB,mBAAa,UAAU,WAAW,MAAM,aAAa,GAAG,OAAO;AAAA,IACjE;AAAA,EACF,CAAC;AACD,gCAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,qBAAa,aAAa,OAAO;AAAA,MACnC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,cAAU,YAAAC,SAAK,+BAA+B,SAAS;AAO7D,QAAM,yBAAyB,WAAS;AAEtC,UAAM,OAAO,MAAM;AAAA,EACrB;AACA,SAAoB,uCAAAC,KAAK,cAAAC,SAAQ;AAAA,IAC/B,GAAG;AAAA,IACH,WAAW;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,EACF,CAAC;AACH;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst TIMEOUT = 4000;\nexport default function ClipboardButton({\n className,\n children,\n onCopy,\n onFinishCopy,\n text,\n ...buttonProps\n}) {\n deprecated('wp.components.ClipboardButton', {\n since: '5.8',\n alternative: 'wp.compose.useCopyToClipboard'\n });\n const timeoutIdRef = useRef();\n const ref = useCopyToClipboard(text, () => {\n onCopy();\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n if (onFinishCopy) {\n timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);\n }\n });\n useEffect(() => {\n return () => {\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n };\n }, []);\n const classes = clsx('components-clipboard-button', className);\n\n // Workaround for inconsistent behavior in Safari, where <textarea> is not\n // the document.activeElement at the moment when the copy event fires.\n // This causes documentHasSelection() in the copy-handler component to\n // mistakenly override the ClipboardButton, and copy a serialized string\n // of the current block instead.\n const focusOnCopyEventTarget = event => {\n // @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n event.target.focus();\n };\n return (\n /*#__PURE__*/\n // Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n ...buttonProps,\n className: classes,\n ref: ref,\n onCopy: focusOnCopyEventTarget,\n children: children\n })\n );\n}"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAAkC;AAClC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,yBAA4B;AAC5B,IAAM,UAAU;AACD,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,wBAAAA,SAAW,iCAAiC;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AACD,QAAM,mBAAe,uBAAO;AAC5B,QAAM,UAAM,mCAAmB,MAAM,MAAM;AACzC,WAAO;AACP,QAAI,aAAa,SAAS;AACxB,mBAAa,aAAa,OAAO;AAAA,IACnC;AACA,QAAI,cAAc;AAChB,mBAAa,UAAU,WAAW,MAAM,aAAa,GAAG,OAAO;AAAA,IACjE;AAAA,EACF,CAAC;AACD,gCAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,qBAAa,aAAa,OAAO;AAAA,MACnC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,cAAU,YAAAC,SAAK,+BAA+B,SAAS;AAO7D,QAAM,yBAAyB,WAAS;AAEtC,UAAM,OAAO,MAAM;AAAA,EACrB;AACA;AAAA;AAAA;AAAA,IAIE,uCAAAC,KAAK,cAAAC,SAAQ;AAAA,MACX,GAAG;AAAA,MACH,WAAW;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAAA;AAEL;",
6
6
  "names": ["deprecated", "clsx", "_jsx", "Button"]
7
7
  }
@@ -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
  }
@@ -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;AACnC,QAAM,cAA2B,uCAAAA,KAAK,8BAAAC,QAAqB,QAAQ;AAAA,IACjE,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,cAAc;AAAA,IACd,WAAW;AAAA,IACX,SAAS,MAAM;AACb,eAAS,UAAU,SAAY,OAAO;AAAA,IACxC;AAAA,EACF,GAAG,OAAO;AACV,QAAM,iBAAiB,eAAe,IAAI,CAAC;AAAA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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
  }
@@ -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
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/form-token-field/token.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nexport default function Token({\n value,\n status,\n title,\n displayTransform,\n isBorderless = false,\n disabled = false,\n onClickRemove = noop,\n onMouseEnter,\n onMouseLeave,\n messages,\n termPosition,\n termsCount\n}) {\n const instanceId = useInstanceId(Token);\n const tokenClasses = clsx('components-form-token-field__token', {\n 'is-error': 'error' === status,\n 'is-success': 'success' === status,\n 'is-validating': 'validating' === status,\n 'is-borderless': isBorderless,\n 'is-disabled': disabled\n });\n const onClick = () => onClickRemove({\n value\n });\n const transformedValue = displayTransform(value);\n const termPositionAndCount = sprintf(/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */\n __('%1$s (%2$d of %3$d)'), transformedValue, termPosition, termsCount);\n return /*#__PURE__*/_jsxs(\"span\", {\n className: tokenClasses,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n title: title,\n children: [/*#__PURE__*/_jsxs(\"span\", {\n className: \"components-form-token-field__token-text\",\n id: `components-form-token-field__token-text-${instanceId}`,\n children: [/*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"span\",\n children: termPositionAndCount\n }), /*#__PURE__*/_jsx(\"span\", {\n \"aria-hidden\": \"true\",\n children: transformedValue\n })]\n }), /*#__PURE__*/_jsx(Button, {\n className: \"components-form-token-field__remove-token\",\n size: \"small\",\n icon: closeSmall,\n onClick: !disabled ? onClick : undefined\n // Disable reason: Even when FormTokenField itself is accessibly disabled, token reset buttons shouldn't be in the tab sequence.\n // eslint-disable-next-line no-restricted-syntax\n ,\n disabled: disabled,\n label: messages.remove,\n \"aria-describedby\": `components-form-token-field__token-text-${instanceId}`\n })]\n });\n}"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,kBAA4B;AAC5B,mBAA2B;AAK3B,oBAAmB;AACnB,6BAA+B;AAC/B,yBAA2C;AA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EACJ,CAAC;AACH;",
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nexport default function Token({\n value,\n status,\n title,\n displayTransform,\n isBorderless = false,\n disabled = false,\n onClickRemove = noop,\n onMouseEnter,\n onMouseLeave,\n messages,\n termPosition,\n termsCount\n}) {\n const instanceId = useInstanceId(Token);\n const tokenClasses = clsx('components-form-token-field__token', {\n 'is-error': 'error' === status,\n 'is-success': 'success' === status,\n 'is-validating': 'validating' === status,\n 'is-borderless': isBorderless,\n 'is-disabled': disabled\n });\n const onClick = () => onClickRemove({\n value\n });\n const transformedValue = displayTransform(value);\n const termPositionAndCount = sprintf(/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */\n __('%1$s (%2$d of %3$d)'), transformedValue, termPosition, termsCount);\n return /*#__PURE__*/_jsxs(\"span\", {\n className: tokenClasses,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n title: title,\n children: [/*#__PURE__*/_jsxs(\"span\", {\n className: \"components-form-token-field__token-text\",\n id: `components-form-token-field__token-text-${instanceId}`,\n children: [/*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"span\",\n children: termPositionAndCount\n }), /*#__PURE__*/_jsx(\"span\", {\n \"aria-hidden\": \"true\",\n children: transformedValue\n })]\n }), /*#__PURE__*/_jsx(Button, {\n className: \"components-form-token-field__remove-token\",\n size: \"small\",\n icon: closeSmall,\n onClick: !disabled ? onClick : undefined,\n disabled: disabled,\n label: messages.remove,\n \"aria-describedby\": `components-form-token-field__token-text-${instanceId}`\n })]\n });\n}"],
5
+ "mappings": ";;;;;;;;;;;;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,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS,CAAC,WAAW,UAAU;AAAA,MAC/B;AAAA,MACA,OAAO,SAAS;AAAA,MAChB,oBAAoB,2CAA2C,UAAU;AAAA,IAC3E,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
6
6
  "names": ["clsx", "_jsxs", "_jsx", "Button"]
7
7
  }
@@ -33,7 +33,7 @@ __export(with_fallback_styles_exports, {
33
33
  default: () => with_fallback_styles_default
34
34
  });
35
35
  module.exports = __toCommonJS(with_fallback_styles_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_compose = require("@wordpress/compose");
39
39
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/higher-order/with-fallback-styles/index.tsx"],
4
- "sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default mapNodeToProps => createHigherOrderComponent(WrappedComponent => {\n return class extends Component {\n constructor(props) {\n super(props);\n this.nodeRef = this.props.node;\n this.state = {\n fallbackStyles: undefined,\n grabStylesCompleted: false\n };\n this.bindRef = this.bindRef.bind(this);\n }\n bindRef(node) {\n if (!node) {\n return;\n }\n this.nodeRef = node;\n }\n componentDidMount() {\n this.grabFallbackStyles();\n }\n componentDidUpdate() {\n this.grabFallbackStyles();\n }\n grabFallbackStyles() {\n const {\n grabStylesCompleted,\n fallbackStyles\n } = this.state;\n if (this.nodeRef && !grabStylesCompleted) {\n const newFallbackStyles = mapNodeToProps(this.nodeRef, this.props);\n if (!fastDeepEqual(newFallbackStyles, fallbackStyles)) {\n this.setState({\n fallbackStyles: newFallbackStyles,\n grabStylesCompleted: Object.values(newFallbackStyles).every(Boolean)\n });\n }\n }\n }\n render() {\n const wrappedComponent = /*#__PURE__*/_jsx(WrappedComponent, {\n ...this.props,\n ...this.state.fallbackStyles\n });\n return this.props.node ? wrappedComponent : /*#__PURE__*/_jsxs(\"div\", {\n ref: this.bindRef,\n children: [\" \", wrappedComponent, \" \"]\n });\n }\n };\n}, 'withFallbackStyles');"],
4
+ "sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default mapNodeToProps => createHigherOrderComponent(WrappedComponent => {\n return class extends Component {\n constructor(props) {\n super(props);\n this.nodeRef = this.props.node;\n this.state = {\n fallbackStyles: undefined,\n grabStylesCompleted: false\n };\n this.bindRef = this.bindRef.bind(this);\n }\n bindRef(node) {\n if (!node) {\n return;\n }\n this.nodeRef = node;\n }\n componentDidMount() {\n this.grabFallbackStyles();\n }\n componentDidUpdate() {\n this.grabFallbackStyles();\n }\n grabFallbackStyles() {\n const {\n grabStylesCompleted,\n fallbackStyles\n } = this.state;\n if (this.nodeRef && !grabStylesCompleted) {\n const newFallbackStyles = mapNodeToProps(this.nodeRef, this.props);\n if (!fastDeepEqual(newFallbackStyles, fallbackStyles)) {\n this.setState({\n fallbackStyles: newFallbackStyles,\n grabStylesCompleted: Object.values(newFallbackStyles).every(Boolean)\n });\n }\n }\n }\n render() {\n const wrappedComponent = /*#__PURE__*/_jsx(WrappedComponent, {\n ...this.props,\n ...this.state.fallbackStyles\n });\n return this.props.node ? wrappedComponent : /*#__PURE__*/_jsxs(\"div\", {\n ref: this.bindRef,\n children: [\" \", wrappedComponent, \" \"]\n });\n }\n };\n}, 'withFallbackStyles');"],
5
5
  "mappings": ";;;;;;;;;;;;;;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