@wordpress/components 28.13.1-next.082ed6819.0 → 28.14.1-next.cd6172eb0.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 (405) hide show
  1. package/CHANGELOG.md +46 -2
  2. package/CONTRIBUTING.md +16 -16
  3. package/build/angle-picker-control/index.js +1 -1
  4. package/build/angle-picker-control/index.js.map +1 -1
  5. package/build/autocomplete/index.js +0 -1
  6. package/build/autocomplete/index.js.map +1 -1
  7. package/build/border-box-control/border-box-control-split-controls/component.js +1 -1
  8. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  9. package/build/border-control/border-control/component.js +2 -0
  10. package/build/border-control/border-control/component.js.map +1 -1
  11. package/build/box-control/all-input-control.js +1 -0
  12. package/build/box-control/all-input-control.js.map +1 -1
  13. package/build/box-control/axial-input-controls.js +1 -0
  14. package/build/box-control/axial-input-controls.js.map +1 -1
  15. package/build/box-control/index.js +22 -15
  16. package/build/box-control/index.js.map +1 -1
  17. package/build/box-control/input-controls.js +1 -0
  18. package/build/box-control/input-controls.js.map +1 -1
  19. package/build/box-control/types.js.map +1 -1
  20. package/build/circular-option-picker/circular-option-picker-actions.js +1 -0
  21. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  22. package/build/circular-option-picker/circular-option-picker-option.js +1 -0
  23. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  24. package/build/clipboard-button/index.js +5 -3
  25. package/build/clipboard-button/index.js.map +1 -1
  26. package/build/color-palette/index.native.js +0 -1
  27. package/build/color-palette/index.native.js.map +1 -1
  28. package/build/color-picker/input-with-slider.js +2 -2
  29. package/build/color-picker/input-with-slider.js.map +1 -1
  30. package/build/composite/item.js +0 -9
  31. package/build/composite/item.js.map +1 -1
  32. package/build/context/context-connect.js +0 -1
  33. package/build/context/context-connect.js.map +1 -1
  34. package/build/custom-gradient-picker/gradient-bar/control-points.js +2 -0
  35. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  36. package/build/custom-gradient-picker/index.js +2 -0
  37. package/build/custom-gradient-picker/index.js.map +1 -1
  38. package/build/custom-gradient-picker/types.js.map +1 -1
  39. package/build/custom-select-control/index.js +8 -0
  40. package/build/custom-select-control/index.js.map +1 -1
  41. package/build/custom-select-control/types.js.map +1 -1
  42. package/build/drop-zone/index.js +19 -13
  43. package/build/drop-zone/index.js.map +1 -1
  44. package/build/drop-zone/types.js.map +1 -1
  45. package/build/dropdown-menu/index.js +1 -0
  46. package/build/dropdown-menu/index.js.map +1 -1
  47. package/build/duotone-picker/color-list-picker/index.js +9 -14
  48. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  49. package/build/external-link/index.js +0 -1
  50. package/build/external-link/index.js.map +1 -1
  51. package/build/font-size-picker/font-size-picker-select.js +1 -0
  52. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  53. package/build/font-size-picker/index.js +1 -0
  54. package/build/font-size-picker/index.js.map +1 -1
  55. package/build/form-file-upload/index.js +11 -1
  56. package/build/form-file-upload/index.js.map +1 -1
  57. package/build/form-file-upload/types.js.map +1 -1
  58. package/build/form-token-field/index.js +6 -1
  59. package/build/form-token-field/index.js.map +1 -1
  60. package/build/gradient-picker/index.js +2 -0
  61. package/build/gradient-picker/index.js.map +1 -1
  62. package/build/gradient-picker/types.js.map +1 -1
  63. package/build/icon/index.js +9 -0
  64. package/build/icon/index.js.map +1 -1
  65. package/build/menu/checkbox-item.js +5 -9
  66. package/build/menu/checkbox-item.js.map +1 -1
  67. package/build/menu/group-label.js +4 -1
  68. package/build/menu/group-label.js.map +1 -1
  69. package/build/menu/group.js +4 -1
  70. package/build/menu/group.js.map +1 -1
  71. package/build/menu/item-help-text.js +5 -0
  72. package/build/menu/item-help-text.js.map +1 -1
  73. package/build/menu/item-label.js +5 -0
  74. package/build/menu/item-label.js.map +1 -1
  75. package/build/menu/item.js +4 -8
  76. package/build/menu/item.js.map +1 -1
  77. package/build/menu/radio-item.js +5 -9
  78. package/build/menu/radio-item.js.map +1 -1
  79. package/build/menu/separator.js +5 -2
  80. package/build/menu/separator.js.map +1 -1
  81. package/build/modal/aria-helper.js +0 -1
  82. package/build/modal/aria-helper.js.map +1 -1
  83. package/build/modal/index.js +0 -1
  84. package/build/modal/index.js.map +1 -1
  85. package/build/number-control/index.js +8 -0
  86. package/build/number-control/index.js.map +1 -1
  87. package/build/number-control/types.js.map +1 -1
  88. package/build/range-control/index.js +2 -1
  89. package/build/range-control/index.js.map +1 -1
  90. package/build/resizable-box/index.js +9 -1
  91. package/build/resizable-box/index.js.map +1 -1
  92. package/build/slot-fill/bubbles-virtually/fill.js +8 -12
  93. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  94. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +6 -10
  95. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  96. package/build/slot-fill/bubbles-virtually/slot.js +4 -10
  97. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  98. package/build/slot-fill/types.js.map +1 -1
  99. package/build/style-provider/index.js +0 -1
  100. package/build/style-provider/index.js.map +1 -1
  101. package/build/tabs/tab.js +0 -17
  102. package/build/tabs/tab.js.map +1 -1
  103. package/build/toolbar/toolbar-button/index.js +2 -0
  104. package/build/toolbar/toolbar-button/index.js.map +1 -1
  105. package/build/tools-panel/tools-panel/component.js +2 -0
  106. package/build/tools-panel/tools-panel/component.js.map +1 -1
  107. package/build/unit-control/index.js +10 -1
  108. package/build/unit-control/index.js.map +1 -1
  109. package/build/unit-control/types.js.map +1 -1
  110. package/build-module/angle-picker-control/index.js +1 -1
  111. package/build-module/angle-picker-control/index.js.map +1 -1
  112. package/build-module/autocomplete/index.js +0 -1
  113. package/build-module/autocomplete/index.js.map +1 -1
  114. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -1
  115. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  116. package/build-module/border-control/border-control/component.js +2 -0
  117. package/build-module/border-control/border-control/component.js.map +1 -1
  118. package/build-module/box-control/all-input-control.js +1 -0
  119. package/build-module/box-control/all-input-control.js.map +1 -1
  120. package/build-module/box-control/axial-input-controls.js +1 -0
  121. package/build-module/box-control/axial-input-controls.js.map +1 -1
  122. package/build-module/box-control/index.js +22 -15
  123. package/build-module/box-control/index.js.map +1 -1
  124. package/build-module/box-control/input-controls.js +1 -0
  125. package/build-module/box-control/input-controls.js.map +1 -1
  126. package/build-module/box-control/types.js.map +1 -1
  127. package/build-module/circular-option-picker/circular-option-picker-actions.js +1 -0
  128. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  129. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -0
  130. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  131. package/build-module/clipboard-button/index.js +5 -3
  132. package/build-module/clipboard-button/index.js.map +1 -1
  133. package/build-module/color-palette/index.native.js +0 -1
  134. package/build-module/color-palette/index.native.js.map +1 -1
  135. package/build-module/color-picker/input-with-slider.js +2 -2
  136. package/build-module/color-picker/input-with-slider.js.map +1 -1
  137. package/build-module/composite/item.js +0 -9
  138. package/build-module/composite/item.js.map +1 -1
  139. package/build-module/context/context-connect.js +0 -1
  140. package/build-module/context/context-connect.js.map +1 -1
  141. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +2 -0
  142. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  143. package/build-module/custom-gradient-picker/index.js +2 -0
  144. package/build-module/custom-gradient-picker/index.js.map +1 -1
  145. package/build-module/custom-gradient-picker/types.js.map +1 -1
  146. package/build-module/custom-select-control/index.js +8 -0
  147. package/build-module/custom-select-control/index.js.map +1 -1
  148. package/build-module/custom-select-control/types.js.map +1 -1
  149. package/build-module/drop-zone/index.js +19 -13
  150. package/build-module/drop-zone/index.js.map +1 -1
  151. package/build-module/drop-zone/types.js.map +1 -1
  152. package/build-module/dropdown-menu/index.js +1 -0
  153. package/build-module/dropdown-menu/index.js.map +1 -1
  154. package/build-module/duotone-picker/color-list-picker/index.js +10 -15
  155. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  156. package/build-module/external-link/index.js +0 -1
  157. package/build-module/external-link/index.js.map +1 -1
  158. package/build-module/font-size-picker/font-size-picker-select.js +1 -0
  159. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  160. package/build-module/font-size-picker/index.js +1 -0
  161. package/build-module/font-size-picker/index.js.map +1 -1
  162. package/build-module/form-file-upload/index.js +13 -2
  163. package/build-module/form-file-upload/index.js.map +1 -1
  164. package/build-module/form-file-upload/types.js.map +1 -1
  165. package/build-module/form-token-field/index.js +6 -1
  166. package/build-module/form-token-field/index.js.map +1 -1
  167. package/build-module/gradient-picker/index.js +2 -0
  168. package/build-module/gradient-picker/index.js.map +1 -1
  169. package/build-module/gradient-picker/types.js.map +1 -1
  170. package/build-module/icon/index.js +9 -0
  171. package/build-module/icon/index.js.map +1 -1
  172. package/build-module/menu/checkbox-item.js +5 -9
  173. package/build-module/menu/checkbox-item.js.map +1 -1
  174. package/build-module/menu/group-label.js +4 -1
  175. package/build-module/menu/group-label.js.map +1 -1
  176. package/build-module/menu/group.js +4 -1
  177. package/build-module/menu/group.js.map +1 -1
  178. package/build-module/menu/item-help-text.js +6 -1
  179. package/build-module/menu/item-help-text.js.map +1 -1
  180. package/build-module/menu/item-label.js +6 -1
  181. package/build-module/menu/item-label.js.map +1 -1
  182. package/build-module/menu/item.js +4 -8
  183. package/build-module/menu/item.js.map +1 -1
  184. package/build-module/menu/radio-item.js +5 -9
  185. package/build-module/menu/radio-item.js.map +1 -1
  186. package/build-module/menu/separator.js +5 -2
  187. package/build-module/menu/separator.js.map +1 -1
  188. package/build-module/modal/aria-helper.js +0 -1
  189. package/build-module/modal/aria-helper.js.map +1 -1
  190. package/build-module/modal/index.js +0 -1
  191. package/build-module/modal/index.js.map +1 -1
  192. package/build-module/number-control/index.js +8 -0
  193. package/build-module/number-control/index.js.map +1 -1
  194. package/build-module/number-control/types.js.map +1 -1
  195. package/build-module/range-control/index.js +2 -1
  196. package/build-module/range-control/index.js.map +1 -1
  197. package/build-module/resizable-box/index.js +9 -1
  198. package/build-module/resizable-box/index.js.map +1 -1
  199. package/build-module/slot-fill/bubbles-virtually/fill.js +9 -13
  200. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  201. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +6 -10
  202. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  203. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -10
  204. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  205. package/build-module/slot-fill/types.js.map +1 -1
  206. package/build-module/style-provider/index.js +0 -1
  207. package/build-module/style-provider/index.js.map +1 -1
  208. package/build-module/tabs/tab.js +0 -15
  209. package/build-module/tabs/tab.js.map +1 -1
  210. package/build-module/toolbar/toolbar-button/index.js +2 -0
  211. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  212. package/build-module/tools-panel/tools-panel/component.js +2 -0
  213. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  214. package/build-module/unit-control/index.js +10 -1
  215. package/build-module/unit-control/index.js.map +1 -1
  216. package/build-module/unit-control/types.js.map +1 -1
  217. package/build-style/style-rtl.css +12 -8
  218. package/build-style/style.css +12 -8
  219. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  220. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  221. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  222. package/build-types/box-control/index.d.ts +14 -13
  223. package/build-types/box-control/index.d.ts.map +1 -1
  224. package/build-types/box-control/input-controls.d.ts.map +1 -1
  225. package/build-types/box-control/stories/index.story.d.ts +42 -6
  226. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  227. package/build-types/box-control/styles/box-control-styles.d.ts +3 -2
  228. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  229. package/build-types/box-control/types.d.ts +16 -2
  230. package/build-types/box-control/types.d.ts.map +1 -1
  231. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  232. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  233. package/build-types/clipboard-button/index.d.ts.map +1 -1
  234. package/build-types/color-picker/styles.d.ts +3 -2
  235. package/build-types/color-picker/styles.d.ts.map +1 -1
  236. package/build-types/composite/item.d.ts.map +1 -1
  237. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  238. package/build-types/custom-gradient-picker/index.d.ts +1 -1
  239. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  240. package/build-types/custom-gradient-picker/types.d.ts +6 -0
  241. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  242. package/build-types/custom-select-control/index.d.ts.map +1 -1
  243. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  244. package/build-types/custom-select-control/types.d.ts +7 -0
  245. package/build-types/custom-select-control/types.d.ts.map +1 -1
  246. package/build-types/date-time/time/styles.d.ts +8 -4
  247. package/build-types/date-time/time/styles.d.ts.map +1 -1
  248. package/build-types/drop-zone/index.d.ts +1 -1
  249. package/build-types/drop-zone/index.d.ts.map +1 -1
  250. package/build-types/drop-zone/types.d.ts +5 -0
  251. package/build-types/drop-zone/types.d.ts.map +1 -1
  252. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  253. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  254. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -1
  255. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  256. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  257. package/build-types/font-size-picker/index.d.ts.map +1 -1
  258. package/build-types/form-file-upload/index.d.ts +2 -1
  259. package/build-types/form-file-upload/index.d.ts.map +1 -1
  260. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  261. package/build-types/form-file-upload/types.d.ts +10 -8
  262. package/build-types/form-file-upload/types.d.ts.map +1 -1
  263. package/build-types/form-token-field/index.d.ts.map +1 -1
  264. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  265. package/build-types/gradient-picker/index.d.ts +1 -1
  266. package/build-types/gradient-picker/index.d.ts.map +1 -1
  267. package/build-types/gradient-picker/types.d.ts +6 -0
  268. package/build-types/gradient-picker/types.d.ts.map +1 -1
  269. package/build-types/icon/index.d.ts +23 -7
  270. package/build-types/icon/index.d.ts.map +1 -1
  271. package/build-types/icon/stories/index.story.d.ts +7 -1
  272. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  273. package/build-types/lock-unlock.d.ts +2 -2
  274. package/build-types/menu/checkbox-item.d.ts.map +1 -1
  275. package/build-types/menu/group-label.d.ts.map +1 -1
  276. package/build-types/menu/group.d.ts.map +1 -1
  277. package/build-types/menu/index.d.ts.map +1 -1
  278. package/build-types/menu/item-help-text.d.ts.map +1 -1
  279. package/build-types/menu/item-label.d.ts.map +1 -1
  280. package/build-types/menu/item.d.ts.map +1 -1
  281. package/build-types/menu/radio-item.d.ts.map +1 -1
  282. package/build-types/menu/separator.d.ts.map +1 -1
  283. package/build-types/number-control/index.d.ts +2 -1
  284. package/build-types/number-control/index.d.ts.map +1 -1
  285. package/build-types/number-control/stories/index.story.d.ts +2 -1
  286. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  287. package/build-types/number-control/types.d.ts +7 -0
  288. package/build-types/number-control/types.d.ts.map +1 -1
  289. package/build-types/range-control/index.d.ts +1 -1
  290. package/build-types/range-control/index.d.ts.map +1 -1
  291. package/build-types/range-control/styles/range-control-styles.d.ts +2 -1
  292. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  293. package/build-types/resizable-box/index.d.ts.map +1 -1
  294. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  295. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  296. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  297. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  298. package/build-types/slot-fill/types.d.ts +4 -3
  299. package/build-types/slot-fill/types.d.ts.map +1 -1
  300. package/build-types/tabs/tab.d.ts +3 -0
  301. package/build-types/tabs/tab.d.ts.map +1 -1
  302. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  303. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  304. package/build-types/tools-panel/tools-panel/component.d.ts +2 -0
  305. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  306. package/build-types/unit-control/index.d.ts +3 -2
  307. package/build-types/unit-control/index.d.ts.map +1 -1
  308. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  309. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -1
  310. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  311. package/build-types/unit-control/types.d.ts +7 -0
  312. package/build-types/unit-control/types.d.ts.map +1 -1
  313. package/package.json +20 -20
  314. package/src/angle-picker-control/index.tsx +1 -1
  315. package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -1
  316. package/src/border-control/border-control/component.tsx +2 -0
  317. package/src/box-control/README.md +80 -60
  318. package/src/box-control/all-input-control.tsx +1 -0
  319. package/src/box-control/axial-input-controls.tsx +1 -0
  320. package/src/box-control/docs-manifest.json +5 -0
  321. package/src/box-control/index.tsx +23 -15
  322. package/src/box-control/input-controls.tsx +1 -0
  323. package/src/box-control/stories/index.story.tsx +1 -0
  324. package/src/box-control/test/index.tsx +33 -26
  325. package/src/box-control/types.ts +71 -54
  326. package/src/circular-option-picker/circular-option-picker-actions.tsx +1 -0
  327. package/src/circular-option-picker/circular-option-picker-option.tsx +1 -0
  328. package/src/circular-option-picker/style.scss +2 -2
  329. package/src/clipboard-button/index.tsx +5 -3
  330. package/src/color-picker/input-with-slider.tsx +1 -1
  331. package/src/composite/item.tsx +1 -19
  332. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +2 -0
  333. package/src/custom-gradient-picker/index.tsx +2 -0
  334. package/src/custom-gradient-picker/style.scss +1 -1
  335. package/src/custom-gradient-picker/types.ts +6 -0
  336. package/src/custom-select-control/README.md +2 -0
  337. package/src/custom-select-control/index.tsx +9 -0
  338. package/src/custom-select-control/stories/index.story.tsx +1 -0
  339. package/src/custom-select-control/test/index.tsx +13 -9
  340. package/src/custom-select-control/types.ts +7 -0
  341. package/src/drop-zone/index.tsx +21 -24
  342. package/src/drop-zone/types.ts +5 -0
  343. package/src/dropdown-menu/index.tsx +1 -0
  344. package/src/dropdown-menu/style.scss +1 -1
  345. package/src/duotone-picker/color-list-picker/index.tsx +8 -8
  346. package/src/duotone-picker/color-list-picker/style.scss +0 -6
  347. package/src/font-size-picker/font-size-picker-select.tsx +1 -0
  348. package/src/font-size-picker/index.tsx +1 -0
  349. package/src/form-file-upload/README.md +58 -48
  350. package/src/form-file-upload/docs-manifest.json +5 -0
  351. package/src/form-file-upload/index.tsx +12 -1
  352. package/src/form-file-upload/stories/index.story.tsx +1 -0
  353. package/src/form-file-upload/test/index.tsx +5 -1
  354. package/src/form-file-upload/types.ts +10 -8
  355. package/src/form-token-field/README.md +1 -0
  356. package/src/form-token-field/index.tsx +7 -0
  357. package/src/form-token-field/stories/index.story.tsx +2 -0
  358. package/src/form-token-field/test/index.tsx +5 -1
  359. package/src/gradient-picker/README.md +8 -0
  360. package/src/gradient-picker/index.tsx +2 -0
  361. package/src/gradient-picker/types.ts +6 -0
  362. package/src/icon/README.md +22 -65
  363. package/src/icon/docs-manifest.json +5 -0
  364. package/src/icon/index.tsx +28 -13
  365. package/src/icon/stories/index.story.tsx +50 -8
  366. package/src/menu/checkbox-item.tsx +9 -7
  367. package/src/menu/group-label.tsx +8 -1
  368. package/src/menu/group.tsx +8 -1
  369. package/src/menu/item-help-text.tsx +10 -1
  370. package/src/menu/item-label.tsx +10 -1
  371. package/src/menu/item.tsx +8 -6
  372. package/src/menu/radio-item.tsx +9 -7
  373. package/src/menu/separator.tsx +9 -2
  374. package/src/menu-items-choice/style.scss +1 -0
  375. package/src/number-control/README.md +2 -1
  376. package/src/number-control/index.tsx +9 -0
  377. package/src/number-control/stories/index.story.tsx +1 -0
  378. package/src/number-control/test/index.tsx +5 -1
  379. package/src/number-control/types.ts +7 -0
  380. package/src/range-control/index.tsx +1 -0
  381. package/src/resizable-box/index.tsx +10 -0
  382. package/src/resizable-box/style.scss +8 -0
  383. package/src/slot-fill/bubbles-virtually/fill.tsx +7 -11
  384. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +2 -13
  385. package/src/slot-fill/bubbles-virtually/slot.tsx +4 -7
  386. package/src/slot-fill/types.ts +4 -3
  387. package/src/tabs/tab.tsx +0 -18
  388. package/src/tabs/test/index.tsx +1492 -947
  389. package/src/toolbar/toolbar-button/index.tsx +2 -0
  390. package/src/tools-panel/stories/index.story.tsx +12 -0
  391. package/src/tools-panel/tools-panel/README.md +4 -0
  392. package/src/tools-panel/tools-panel/component.tsx +2 -0
  393. package/src/unit-control/README.md +3 -3
  394. package/src/unit-control/index.tsx +11 -1
  395. package/src/unit-control/stories/index.story.tsx +1 -0
  396. package/src/unit-control/test/index.tsx +5 -1
  397. package/src/unit-control/types.ts +7 -0
  398. package/tsconfig.tsbuildinfo +1 -1
  399. package/build/menu/use-temporary-focus-visible-fix.js +0 -27
  400. package/build/menu/use-temporary-focus-visible-fix.js.map +0 -1
  401. package/build-module/menu/use-temporary-focus-visible-fix.js +0 -20
  402. package/build-module/menu/use-temporary-focus-visible-fix.js.map +0 -1
  403. package/build-types/menu/use-temporary-focus-visible-fix.d.ts +0 -8
  404. package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +0 -1
  405. package/src/menu/use-temporary-focus-visible-fix.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"names":["useRef","useLayoutEffect","useContext","forwardRef","useMergeRefs","View","SlotFillContext","jsx","_jsx","Slot","props","forwardedRef","name","fillProps","as","children","restProps","registerSlot","unregisterSlot","registry","ref","fillPropsRef","current","updateSlot"],"sources":["@wordpress/components/src/slot-fill/bubbles-virtually/slot.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tuseContext,\n\tforwardRef,\n} from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport SlotFillContext from './slot-fill-context';\nimport type { WordPressComponentProps } from '../../context';\nimport type { SlotComponentProps } from '../types';\n\nfunction Slot(\n\tprops: WordPressComponentProps<\n\t\tOmit< SlotComponentProps, 'bubblesVirtually' >,\n\t\t'div'\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tname,\n\t\tfillProps = {},\n\t\tas,\n\t\t// `children` is not allowed. However, if it is passed,\n\t\t// it will be displayed as is, so remove `children`.\n\t\tchildren,\n\t\t...restProps\n\t} = props;\n\n\tconst { registerSlot, unregisterSlot, ...registry } =\n\t\tuseContext( SlotFillContext );\n\n\tconst ref = useRef< HTMLElement >( null );\n\n\t// We don't want to unregister and register the slot whenever\n\t// `fillProps` change, which would cause the fill to be re-mounted. Instead,\n\t// we can just update the slot (see hook below).\n\t// For more context, see https://github.com/WordPress/gutenberg/pull/44403#discussion_r994415973\n\tconst fillPropsRef = useRef( fillProps );\n\tuseLayoutEffect( () => {\n\t\tfillPropsRef.current = fillProps;\n\t}, [ fillProps ] );\n\n\tuseLayoutEffect( () => {\n\t\tregisterSlot( name, ref, fillPropsRef.current );\n\t\treturn () => {\n\t\t\tunregisterSlot( name, ref );\n\t\t};\n\t}, [ registerSlot, unregisterSlot, name ] );\n\n\tuseLayoutEffect( () => {\n\t\tregistry.updateSlot( name, ref, fillPropsRef.current );\n\t} );\n\n\treturn (\n\t\t<View\n\t\t\tas={ as }\n\t\t\tref={ useMergeRefs( [ forwardedRef, ref ] ) }\n\t\t\t{ ...restProps }\n\t\t/>\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GA,EAAI;IACTM,GAAG,EAAGhB,YAAY,CAAE,CAAEO,YAAY,EAAES,GAAG,CAAG,CAAG;IAAA,GACxCJ;EAAS,CACd,CAAC;AAEJ;AAEA,eAAeb,UAAU,CAAEM,IAAK,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useRef","useLayoutEffect","useContext","forwardRef","useMergeRefs","View","SlotFillContext","jsx","_jsx","Slot","props","forwardedRef","name","fillProps","as","children","restProps","registry","ref","fillPropsRef","current","registerSlot","unregisterSlot","updateSlot"],"sources":["@wordpress/components/src/slot-fill/bubbles-virtually/slot.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tuseContext,\n\tforwardRef,\n} from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport SlotFillContext from './slot-fill-context';\nimport type { WordPressComponentProps } from '../../context';\nimport type { SlotComponentProps } from '../types';\n\nfunction Slot(\n\tprops: WordPressComponentProps<\n\t\tOmit< SlotComponentProps, 'bubblesVirtually' >,\n\t\t'div'\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\tname,\n\t\tfillProps = {},\n\t\tas,\n\t\t// `children` is not allowed. However, if it is passed,\n\t\t// it will be displayed as is, so remove `children`.\n\t\tchildren,\n\t\t...restProps\n\t} = props;\n\n\tconst registry = useContext( SlotFillContext );\n\n\tconst ref = useRef< HTMLElement >( null );\n\n\t// We don't want to unregister and register the slot whenever\n\t// `fillProps` change, which would cause the fill to be re-mounted. Instead,\n\t// we can just update the slot (see hook below).\n\t// For more context, see https://github.com/WordPress/gutenberg/pull/44403#discussion_r994415973\n\tconst fillPropsRef = useRef( fillProps );\n\tuseLayoutEffect( () => {\n\t\tfillPropsRef.current = fillProps;\n\t}, [ fillProps ] );\n\n\tuseLayoutEffect( () => {\n\t\tregistry.registerSlot( name, ref, fillPropsRef.current );\n\t\treturn () => registry.unregisterSlot( name, ref );\n\t}, [ registry, name ] );\n\n\tuseLayoutEffect( () => {\n\t\tregistry.updateSlot( name, ref, fillPropsRef.current );\n\t} );\n\n\treturn (\n\t\t<View\n\t\t\tas={ as }\n\t\t\tref={ useMergeRefs( [ forwardedRef, ref ] ) }\n\t\t\t{ ...restProps }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( Slot );\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,MAAM,EACNC,eAAe,EACfC,UAAU,EACVC,UAAU,QACJ,oBAAoB;AAC3B,SAASC,YAAY,QAAQ,oBAAoB;;AAEjD;AACA;AACA;AACA,SAASC,IAAI,QAAQ,YAAY;AACjC,OAAOC,eAAe,MAAM,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIlD,SAASC,IAAIA,CACZC,KAGC,EACDC,YAAiC,EAChC;EACD,MAAM;IACLC,IAAI;IACJC,SAAS,GAAG,CAAC,CAAC;IACdC,EAAE;IACF;IACA;IACAC,QAAQ;IACR,GAAGC;EACJ,CAAC,GAAGN,KAAK;EAET,MAAMO,QAAQ,GAAGf,UAAU,CAAEI,eAAgB,CAAC;EAE9C,MAAMY,GAAG,GAAGlB,MAAM,CAAiB,IAAK,CAAC;;EAEzC;EACA;EACA;EACA;EACA,MAAMmB,YAAY,GAAGnB,MAAM,CAAEa,SAAU,CAAC;EACxCZ,eAAe,CAAE,MAAM;IACtBkB,YAAY,CAACC,OAAO,GAAGP,SAAS;EACjC,CAAC,EAAE,CAAEA,SAAS,CAAG,CAAC;EAElBZ,eAAe,CAAE,MAAM;IACtBgB,QAAQ,CAACI,YAAY,CAAET,IAAI,EAAEM,GAAG,EAAEC,YAAY,CAACC,OAAQ,CAAC;IACxD,OAAO,MAAMH,QAAQ,CAACK,cAAc,CAAEV,IAAI,EAAEM,GAAI,CAAC;EAClD,CAAC,EAAE,CAAED,QAAQ,EAAEL,IAAI,CAAG,CAAC;EAEvBX,eAAe,CAAE,MAAM;IACtBgB,QAAQ,CAACM,UAAU,CAAEX,IAAI,EAAEM,GAAG,EAAEC,YAAY,CAACC,OAAQ,CAAC;EACvD,CAAE,CAAC;EAEH,oBACCZ,IAAA,CAACH,IAAI;IACJS,EAAE,EAAGA,EAAI;IACTI,GAAG,EAAGd,YAAY,CAAE,CAAEO,YAAY,EAAEO,GAAG,CAAG,CAAG;IAAA,GACxCF;EAAS,CACd,CAAC;AAEJ;AAEA,eAAeb,UAAU,CAAEM,IAAK,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/slot-fill/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode, RefObject } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport type { ObservableMap } from '@wordpress/compose';\n\nexport type DistributiveOmit< T, K extends keyof any > = T extends any\n\t? Omit< T, K >\n\t: never;\n\nexport type SlotKey = string | symbol;\n\nexport type FillProps = Record< string, any >;\n\ntype SlotPropBase = {\n\t/**\n\t * Slot name.\n\t */\n\tname: SlotKey;\n\n\t/**\n\t * props to pass from `Slot` to `Fill`.\n\t *\n\t * @default {}\n\t */\n\tfillProps?: FillProps;\n};\n\nexport type SlotComponentProps =\n\t| ( SlotPropBase & {\n\t\t\t/**\n\t\t\t * By default, events will bubble to their parents on the DOM hierarchy (native event bubbling).\n\t\t\t * If set to true, events will bubble to their virtual parent in the React elements hierarchy instead,\n\t\t\t * also accept an optional `className`, `id`, etc. to add to the slot container.\n\t\t\t */\n\t\t\tbubblesVirtually: true;\n\n\t\t\t/**\n\t\t\t * A function that returns nodes to be rendered.\n\t\t\t * Supported only when `bubblesVirtually` is `false`.\n\t\t\t */\n\t\t\tchildren?: never;\n\n\t\t\t/**\n\t\t\t * Additional className for the `Slot` component.\n\t\t\t * Supported only when `bubblesVirtually` is `true`.\n\t\t\t */\n\t\t\tclassName?: string;\n\n\t\t\t/**\n\t\t\t * Additional styles for the `Slot` component.\n\t\t\t * Supported only when `bubblesVirtually` is `true`.\n\t\t\t */\n\t\t\tstyle?: React.CSSProperties;\n\t } )\n\t| ( SlotPropBase & {\n\t\t\t/**\n\t\t\t * By default, events will bubble to their parents on the DOM hierarchy (native event bubbling).\n\t\t\t * If set to true, events will bubble to their virtual parent in the React elements hierarchy instead,\n\t\t\t * also accept an optional `className`, `id`, etc. to add to the slot container.\n\t\t\t */\n\t\t\tbubblesVirtually?: false;\n\n\t\t\t/**\n\t\t\t * A function that returns nodes to be rendered.\n\t\t\t * Supported only when `bubblesVirtually` is `false`.\n\t\t\t */\n\t\t\tchildren?: ( fills: ReactNode ) => ReactNode;\n\n\t\t\t/**\n\t\t\t * Additional className for the `Slot` component.\n\t\t\t * Supported only when `bubblesVirtually` is `true`.\n\t\t\t */\n\t\t\tclassName?: never;\n\n\t\t\t/**\n\t\t\t * Additional styles for the `Slot` component.\n\t\t\t * Supported only when `bubblesVirtually` is `true`.\n\t\t\t */\n\t\t\tstyle?: never;\n\t } );\n\nexport type FillComponentProps = {\n\t/**\n\t * The name of the slot to fill into.\n\t */\n\tname: SlotKey;\n\n\t/**\n\t * Children elements or render function.\n\t */\n\tchildren?: ReactNode | ( ( fillProps: FillProps ) => ReactNode );\n};\n\nexport type SlotFillProviderProps = {\n\t/**\n\t * The children elements.\n\t */\n\tchildren: ReactNode;\n\n\t/**\n\t * Whether to pass slots to the parent provider if existent.\n\t */\n\tpassthrough?: boolean;\n};\n\nexport type SlotRef = RefObject< HTMLElement >;\nexport type Rerenderable = { rerender: () => void };\n\nexport type SlotFillBubblesVirtuallyContext = {\n\tslots: ObservableMap< SlotKey, { ref: SlotRef; fillProps: FillProps } >;\n\tfills: ObservableMap< SlotKey, Rerenderable[] >;\n\tregisterSlot: ( name: SlotKey, ref: SlotRef, fillProps: FillProps ) => void;\n\tunregisterSlot: ( name: SlotKey, ref: SlotRef ) => void;\n\tupdateSlot: ( name: SlotKey, ref: SlotRef, fillProps: FillProps ) => void;\n\tregisterFill: ( name: SlotKey, ref: Rerenderable ) => void;\n\tunregisterFill: ( name: SlotKey, ref: Rerenderable ) => void;\n\n\t/**\n\t * This helps the provider know if it's using the default context value or not.\n\t */\n\tisDefault?: boolean;\n};\n\nexport type BaseSlotFillContext = {\n\tregisterSlot: ( name: SlotKey, slot: Rerenderable ) => void;\n\tunregisterSlot: ( name: SlotKey, slot: Rerenderable ) => void;\n\tregisterFill: ( name: SlotKey, instance: FillComponentProps ) => void;\n\tunregisterFill: ( name: SlotKey, instance: FillComponentProps ) => void;\n\tgetSlot: ( name: SlotKey ) => Rerenderable | undefined;\n\tgetFills: (\n\t\tname: SlotKey,\n\t\tslotInstance: Rerenderable\n\t) => FillComponentProps[];\n\tsubscribe: ( listener: () => void ) => () => void;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/slot-fill/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode, RefObject } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport type { ObservableMap } from '@wordpress/compose';\n\nexport type DistributiveOmit< T, K extends keyof any > = T extends any\n\t? Omit< T, K >\n\t: never;\n\nexport type SlotKey = string | symbol;\n\nexport type FillProps = Record< string, any >;\n\ntype SlotPropBase = {\n\t/**\n\t * Slot name.\n\t */\n\tname: SlotKey;\n\n\t/**\n\t * props to pass from `Slot` to `Fill`.\n\t *\n\t * @default {}\n\t */\n\tfillProps?: FillProps;\n};\n\nexport type SlotComponentProps =\n\t| ( SlotPropBase & {\n\t\t\t/**\n\t\t\t * By default, events will bubble to their parents on the DOM hierarchy (native event bubbling).\n\t\t\t * If set to true, events will bubble to their virtual parent in the React elements hierarchy instead,\n\t\t\t * also accept an optional `className`, `id`, etc. to add to the slot container.\n\t\t\t */\n\t\t\tbubblesVirtually: true;\n\n\t\t\t/**\n\t\t\t * A function that returns nodes to be rendered.\n\t\t\t * Supported only when `bubblesVirtually` is `false`.\n\t\t\t */\n\t\t\tchildren?: never;\n\n\t\t\t/**\n\t\t\t * Additional className for the `Slot` component.\n\t\t\t * Supported only when `bubblesVirtually` is `true`.\n\t\t\t */\n\t\t\tclassName?: string;\n\n\t\t\t/**\n\t\t\t * Additional styles for the `Slot` component.\n\t\t\t * Supported only when `bubblesVirtually` is `true`.\n\t\t\t */\n\t\t\tstyle?: React.CSSProperties;\n\t } )\n\t| ( SlotPropBase & {\n\t\t\t/**\n\t\t\t * By default, events will bubble to their parents on the DOM hierarchy (native event bubbling).\n\t\t\t * If set to true, events will bubble to their virtual parent in the React elements hierarchy instead,\n\t\t\t * also accept an optional `className`, `id`, etc. to add to the slot container.\n\t\t\t */\n\t\t\tbubblesVirtually?: false;\n\n\t\t\t/**\n\t\t\t * A function that returns nodes to be rendered.\n\t\t\t * Supported only when `bubblesVirtually` is `false`.\n\t\t\t */\n\t\t\tchildren?: ( fills: ReactNode ) => ReactNode;\n\n\t\t\t/**\n\t\t\t * Additional className for the `Slot` component.\n\t\t\t * Supported only when `bubblesVirtually` is `true`.\n\t\t\t */\n\t\t\tclassName?: never;\n\n\t\t\t/**\n\t\t\t * Additional styles for the `Slot` component.\n\t\t\t * Supported only when `bubblesVirtually` is `true`.\n\t\t\t */\n\t\t\tstyle?: never;\n\t } );\n\nexport type FillComponentProps = {\n\t/**\n\t * The name of the slot to fill into.\n\t */\n\tname: SlotKey;\n\n\t/**\n\t * Children elements or render function.\n\t */\n\tchildren?: ReactNode | ( ( fillProps: FillProps ) => ReactNode );\n};\n\nexport type SlotFillProviderProps = {\n\t/**\n\t * The children elements.\n\t */\n\tchildren: ReactNode;\n\n\t/**\n\t * Whether to pass slots to the parent provider if existent.\n\t */\n\tpassthrough?: boolean;\n};\n\nexport type SlotRef = RefObject< HTMLElement >;\nexport type Rerenderable = { rerender: () => void };\nexport type FillInstance = {};\n\nexport type SlotFillBubblesVirtuallyContext = {\n\tslots: ObservableMap< SlotKey, { ref: SlotRef; fillProps: FillProps } >;\n\tfills: ObservableMap< SlotKey, FillInstance[] >;\n\tregisterSlot: ( name: SlotKey, ref: SlotRef, fillProps: FillProps ) => void;\n\tunregisterSlot: ( name: SlotKey, ref: SlotRef ) => void;\n\tupdateSlot: ( name: SlotKey, ref: SlotRef, fillProps: FillProps ) => void;\n\tregisterFill: ( name: SlotKey, instance: FillInstance ) => void;\n\tunregisterFill: ( name: SlotKey, instance: FillInstance ) => void;\n\n\t/**\n\t * This helps the provider know if it's using the default context value or not.\n\t */\n\tisDefault?: boolean;\n};\n\nexport type BaseSlotFillContext = {\n\tregisterSlot: ( name: SlotKey, slot: Rerenderable ) => void;\n\tunregisterSlot: ( name: SlotKey, slot: Rerenderable ) => void;\n\tregisterFill: ( name: SlotKey, instance: FillComponentProps ) => void;\n\tunregisterFill: ( name: SlotKey, instance: FillComponentProps ) => void;\n\tgetSlot: ( name: SlotKey ) => Rerenderable | undefined;\n\tgetFills: (\n\t\tname: SlotKey,\n\t\tslotInstance: Rerenderable\n\t) => FillComponentProps[];\n\tsubscribe: ( listener: () => void ) => () => void;\n};\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  /**
3
2
  * External dependencies
4
3
  */
@@ -1 +1 @@
1
- {"version":3,"names":["CacheProvider","createCache","uuid","jsx","_jsx","uuidCache","Set","containerCacheMap","WeakMap","memoizedCreateCacheWithContainer","container","has","get","key","v4","replace","add","cache","set","StyleProvider","props","children","document","head","value"],"sources":["@wordpress/components/src/style-provider/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport * as uuid from 'uuid';\n\n/**\n * Internal dependencies\n */\nimport type { StyleProviderProps } from './types';\n\nconst uuidCache = new Set();\n// Use a weak map so that when the container is detached it's automatically\n// dereferenced to avoid memory leak.\nconst containerCacheMap = new WeakMap();\n\nconst memoizedCreateCacheWithContainer = ( container: HTMLElement ) => {\n\tif ( containerCacheMap.has( container ) ) {\n\t\treturn containerCacheMap.get( container );\n\t}\n\n\t// Emotion only accepts alphabetical and hyphenated keys so we just\n\t// strip the numbers from the UUID. It _should_ be fine.\n\tlet key = uuid.v4().replace( /[0-9]/g, '' );\n\twhile ( uuidCache.has( key ) ) {\n\t\tkey = uuid.v4().replace( /[0-9]/g, '' );\n\t}\n\tuuidCache.add( key );\n\n\tconst cache = createCache( { container, key } );\n\tcontainerCacheMap.set( container, cache );\n\treturn cache;\n};\n\nexport function StyleProvider( props: StyleProviderProps ) {\n\tconst { children, document } = props;\n\n\tif ( ! document ) {\n\t\treturn null;\n\t}\n\n\tconst cache = memoizedCreateCacheWithContainer( document.head );\n\n\treturn <CacheProvider value={ cache }>{ children }</CacheProvider>;\n}\n\nexport default StyleProvider;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,gBAAgB;AAC9C,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAO,KAAKC,IAAI,MAAM,MAAM;;AAE5B;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAKA,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAC,CAAC;AAC3B;AACA;AACA,MAAMC,iBAAiB,GAAG,IAAIC,OAAO,CAAC,CAAC;AAEvC,MAAMC,gCAAgC,GAAKC,SAAsB,IAAM;EACtE,IAAKH,iBAAiB,CAACI,GAAG,CAAED,SAAU,CAAC,EAAG;IACzC,OAAOH,iBAAiB,CAACK,GAAG,CAAEF,SAAU,CAAC;EAC1C;;EAEA;EACA;EACA,IAAIG,GAAG,GAAGX,IAAI,CAACY,EAAE,CAAC,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EAC3C,OAAQV,SAAS,CAACM,GAAG,CAAEE,GAAI,CAAC,EAAG;IAC9BA,GAAG,GAAGX,IAAI,CAACY,EAAE,CAAC,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EACxC;EACAV,SAAS,CAACW,GAAG,CAAEH,GAAI,CAAC;EAEpB,MAAMI,KAAK,GAAGhB,WAAW,CAAE;IAAES,SAAS;IAAEG;EAAI,CAAE,CAAC;EAC/CN,iBAAiB,CAACW,GAAG,CAAER,SAAS,EAAEO,KAAM,CAAC;EACzC,OAAOA,KAAK;AACb,CAAC;AAED,OAAO,SAASE,aAAaA,CAAEC,KAAyB,EAAG;EAC1D,MAAM;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAEpC,IAAK,CAAEE,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,MAAML,KAAK,GAAGR,gCAAgC,CAAEa,QAAQ,CAACC,IAAK,CAAC;EAE/D,oBAAOnB,IAAA,CAACJ,aAAa;IAACwB,KAAK,EAAGP,KAAO;IAAAI,QAAA,EAAGA;EAAQ,CAAiB,CAAC;AACnE;AAEA,eAAeF,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["CacheProvider","createCache","uuid","jsx","_jsx","uuidCache","Set","containerCacheMap","WeakMap","memoizedCreateCacheWithContainer","container","has","get","key","v4","replace","add","cache","set","StyleProvider","props","children","document","head","value"],"sources":["@wordpress/components/src/style-provider/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nimport * as uuid from 'uuid';\n\n/**\n * Internal dependencies\n */\nimport type { StyleProviderProps } from './types';\n\nconst uuidCache = new Set();\n// Use a weak map so that when the container is detached it's automatically\n// dereferenced to avoid memory leak.\nconst containerCacheMap = new WeakMap();\n\nconst memoizedCreateCacheWithContainer = ( container: HTMLElement ) => {\n\tif ( containerCacheMap.has( container ) ) {\n\t\treturn containerCacheMap.get( container );\n\t}\n\n\t// Emotion only accepts alphabetical and hyphenated keys so we just\n\t// strip the numbers from the UUID. It _should_ be fine.\n\tlet key = uuid.v4().replace( /[0-9]/g, '' );\n\twhile ( uuidCache.has( key ) ) {\n\t\tkey = uuid.v4().replace( /[0-9]/g, '' );\n\t}\n\tuuidCache.add( key );\n\n\tconst cache = createCache( { container, key } );\n\tcontainerCacheMap.set( container, cache );\n\treturn cache;\n};\n\nexport function StyleProvider( props: StyleProviderProps ) {\n\tconst { children, document } = props;\n\n\tif ( ! document ) {\n\t\treturn null;\n\t}\n\n\tconst cache = memoizedCreateCacheWithContainer( document.head );\n\n\treturn <CacheProvider value={ cache }>{ children }</CacheProvider>;\n}\n\nexport default StyleProvider;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,gBAAgB;AAC9C,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAO,KAAKC,IAAI,MAAM,MAAM;;AAE5B;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAKA,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAC,CAAC;AAC3B;AACA;AACA,MAAMC,iBAAiB,GAAG,IAAIC,OAAO,CAAC,CAAC;AAEvC,MAAMC,gCAAgC,GAAKC,SAAsB,IAAM;EACtE,IAAKH,iBAAiB,CAACI,GAAG,CAAED,SAAU,CAAC,EAAG;IACzC,OAAOH,iBAAiB,CAACK,GAAG,CAAEF,SAAU,CAAC;EAC1C;;EAEA;EACA;EACA,IAAIG,GAAG,GAAGX,IAAI,CAACY,EAAE,CAAC,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EAC3C,OAAQV,SAAS,CAACM,GAAG,CAAEE,GAAI,CAAC,EAAG;IAC9BA,GAAG,GAAGX,IAAI,CAACY,EAAE,CAAC,CAAC,CAACC,OAAO,CAAE,QAAQ,EAAE,EAAG,CAAC;EACxC;EACAV,SAAS,CAACW,GAAG,CAAEH,GAAI,CAAC;EAEpB,MAAMI,KAAK,GAAGhB,WAAW,CAAE;IAAES,SAAS;IAAEG;EAAI,CAAE,CAAC;EAC/CN,iBAAiB,CAACW,GAAG,CAAER,SAAS,EAAEO,KAAM,CAAC;EACzC,OAAOA,KAAK;AACb,CAAC;AAED,OAAO,SAASE,aAAaA,CAAEC,KAAyB,EAAG;EAC1D,MAAM;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAEpC,IAAK,CAAEE,QAAQ,EAAG;IACjB,OAAO,IAAI;EACZ;EAEA,MAAML,KAAK,GAAGR,gCAAgC,CAAEa,QAAQ,CAACC,IAAK,CAAC;EAE/D,oBAAOnB,IAAA,CAACJ,aAAa;IAACwB,KAAK,EAAGP,KAAO;IAAAI,QAAA,EAAGA;EAAQ,CAAiB,CAAC;AACnE;AAEA,eAAeF,aAAa","ignoreList":[]}
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import * as Ariakit from '@ariakit/react';
5
-
6
1
  /**
7
2
  * WordPress dependencies
8
3
  */
@@ -30,15 +25,6 @@ export const Tab = forwardRef(function Tab({
30
25
  store,
31
26
  instanceId
32
27
  } = (_useTabsContext = useTabsContext()) !== null && _useTabsContext !== void 0 ? _useTabsContext : {};
33
-
34
- // If the active item is not connected, the tablist may end up in a state
35
- // where none of the tabs are tabbable. In this case, we force all tabs to
36
- // be tabbable, so that as soon as an item received focus, it becomes active
37
- // and Tablist goes back to working as expected.
38
- // eslint-disable-next-line @wordpress/no-unused-vars-before-return
39
- const tabbable = Ariakit.useStoreState(store, state => {
40
- return state?.activeId !== null && !store?.item(state?.activeId)?.element?.isConnected;
41
- });
42
28
  if (!store) {
43
29
  globalThis.SCRIPT_DEBUG === true ? warning('`Tabs.Tab` must be wrapped in a `Tabs` component.') : void 0;
44
30
  return null;
@@ -50,7 +36,6 @@ export const Tab = forwardRef(function Tab({
50
36
  id: instancedTabId,
51
37
  disabled: disabled,
52
38
  render: render,
53
- tabbable: tabbable,
54
39
  ...otherProps,
55
40
  children: [/*#__PURE__*/_jsx(StyledTabChildren, {
56
41
  children: children
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","forwardRef","warning","useTabsContext","Tab","StyledTab","TabChildren","StyledTabChildren","TabChevron","StyledTabChevron","chevronRight","jsx","_jsx","jsxs","_jsxs","children","tabId","disabled","render","otherProps","ref","_useTabsContext","store","instanceId","tabbable","useStoreState","state","activeId","item","element","isConnected","globalThis","SCRIPT_DEBUG","instancedTabId","id","icon"],"sources":["@wordpress/components/src/tabs/tab.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\n\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabProps } from './types';\nimport warning from '@wordpress/warning';\nimport { useTabsContext } from './context';\nimport {\n\tTab as StyledTab,\n\tTabChildren as StyledTabChildren,\n\tTabChevron as StyledTabChevron,\n} from './styles';\nimport type { WordPressComponentProps } from '../context';\nimport { chevronRight } from '@wordpress/icons';\n\nexport const Tab = forwardRef<\n\tHTMLButtonElement,\n\tOmit< WordPressComponentProps< TabProps, 'button', false >, 'id' >\n>( function Tab( { children, tabId, disabled, render, ...otherProps }, ref ) {\n\tconst { store, instanceId } = useTabsContext() ?? {};\n\n\t// If the active item is not connected, the tablist may end up in a state\n\t// where none of the tabs are tabbable. In this case, we force all tabs to\n\t// be tabbable, so that as soon as an item received focus, it becomes active\n\t// and Tablist goes back to working as expected.\n\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\tconst tabbable = Ariakit.useStoreState( store, ( state ) => {\n\t\treturn (\n\t\t\tstate?.activeId !== null &&\n\t\t\t! store?.item( state?.activeId )?.element?.isConnected\n\t\t);\n\t} );\n\n\tif ( ! store ) {\n\t\twarning( '`Tabs.Tab` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\n\tconst instancedTabId = `${ instanceId }-${ tabId }`;\n\n\treturn (\n\t\t<StyledTab\n\t\t\tref={ ref }\n\t\t\tstore={ store }\n\t\t\tid={ instancedTabId }\n\t\t\tdisabled={ disabled }\n\t\t\trender={ render }\n\t\t\ttabbable={ tabbable }\n\t\t\t{ ...otherProps }\n\t\t>\n\t\t\t<StyledTabChildren>{ children }</StyledTabChildren>\n\t\t\t<StyledTabChev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AAG,EAAGA,GAAK;IACXE,KAAK,EAAGA,KAAO;IACfY,EAAE,EAAGD,cAAgB;IACrBhB,QAAQ,EAAGA,QAAU;IACrBC,MAAM,EAAGA,MAAQ;IACjBM,QAAQ,EAAGA,QAAU;IAAA,GAChBL,UAAU;IAAAJ,QAAA,gBAEfH,IAAA,CAACL,iBAAiB;MAAAQ,QAAA,EAAGA;IAAQ,CAAqB,CAAC,eACnDH,IAAA,CAACH,gBAAgB;MAAC0B,IAAI,EAAGzB;IAAc,CAAE,CAAC;EAAA,CAChC,CAAC;AAEd,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","warning","useTabsContext","Tab","StyledTab","TabChildren","StyledTabChildren","TabChevron","StyledTabChevron","chevronRight","jsx","_jsx","jsxs","_jsxs","children","tabId","disabled","render","otherProps","ref","_useTabsContext","store","instanceId","globalThis","SCRIPT_DEBUG","instancedTabId","id","icon"],"sources":["@wordpress/components/src/tabs/tab.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\n\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabProps } from './types';\nimport warning from '@wordpress/warning';\nimport { useTabsContext } from './context';\nimport {\n\tTab as StyledTab,\n\tTabChildren as StyledTabChildren,\n\tTabChevron as StyledTabChevron,\n} from './styles';\nimport type { WordPressComponentProps } from '../context';\nimport { chevronRight } from '@wordpress/icons';\n\nexport const Tab = forwardRef<\n\tHTMLButtonElement,\n\tOmit< WordPressComponentProps< TabProps, 'button', false >, 'id' >\n>( function Tab( { children, tabId, disabled, render, ...otherProps }, ref ) {\n\tconst { store, instanceId } = useTabsContext() ?? {};\n\n\tif ( ! store ) {\n\t\twarning( '`Tabs.Tab` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\n\tconst instancedTabId = `${ instanceId }-${ tabId }`;\n\n\treturn (\n\t\t<StyledTab\n\t\t\tref={ ref }\n\t\t\tstore={ store }\n\t\t\tid={ instancedTabId }\n\t\t\tdisabled={ disabled }\n\t\t\trender={ render }\n\t\t\t{ ...otherProps }\n\t\t>\n\t\t\t<StyledTabChildren>{ children }</StyledTabChildren>\n\t\t\t<StyledTabChevron icon={ chevronRight } />\n\t\t</StyledTab>\n\t);\n} );\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;;AAEA,OAAOC,OAAO,MAAM,oBAAoB;AACxC,SAASC,cAAc,QAAQ,WAAW;AAC1C,SACCC,GAAG,IAAIC,SAAS,EAChBC,WAAW,IAAIC,iBAAiB,EAChCC,UAAU,IAAIC,gBAAgB,QACxB,UAAU;AAEjB,SAASC,YAAY,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhD,OAAO,MAAMV,GAAG,GAAGH,UAAU,CAG1B,SAASG,GAAGA,CAAE;EAAEW,QAAQ;EAAEC,KAAK;EAAEC,QAAQ;EAAEC,MAAM;EAAE,GAAGC;AAAW,CAAC,EAAEC,GAAG,EAAG;EAAA,IAAAC,eAAA;EAC5E,MAAM;IAAEC,KAAK;IAAEC;EAAW,CAAC,IAAAF,eAAA,GAAGlB,cAAc,CAAC,CAAC,cAAAkB,eAAA,cAAAA,eAAA,GAAI,CAAC,CAAC;EAEpD,IAAK,CAAEC,KAAK,EAAG;IACdE,UAAA,CAAAC,YAAA,YAAAvB,OAAO,CAAE,mDAAoD,CAAC;IAC9D,OAAO,IAAI;EACZ;EAEA,MAAMwB,cAAc,GAAG,GAAIH,UAAU,IAAMP,KAAK,EAAG;EAEnD,oBACCF,KAAA,CAACT,SAAS;IACTe,GAAG,EAAGA,GAAK;IACXE,KAAK,EAAGA,KAAO;IACfK,EAAE,EAAGD,cAAgB;IACrBT,QAAQ,EAAGA,QAAU;IACrBC,MAAM,EAAGA,MAAQ;IAAA,GACZC,UAAU;IAAAJ,QAAA,gBAEfH,IAAA,CAACL,iBAAiB;MAAAQ,QAAA,EAAGA;IAAQ,CAAqB,CAAC,eACnDH,IAAA,CAACH,gBAAgB;MAACmB,IAAI,EAAGlB;IAAc,CAAE,CAAC;EAAA,CAChC,CAAC;AAEd,CAAE,CAAC","ignoreList":[]}
@@ -41,6 +41,7 @@ function UnforwardedToolbarButton(props, ref) {
41
41
  children: /*#__PURE__*/_jsx(Button, {
42
42
  ref: ref,
43
43
  icon: restProps.icon,
44
+ size: "compact",
44
45
  label: title,
45
46
  shortcut: restProps.shortcut,
46
47
  "data-subscript": restProps.subscript,
@@ -71,6 +72,7 @@ function UnforwardedToolbarButton(props, ref) {
71
72
  ...restProps,
72
73
  ref: ref,
73
74
  children: toolbarItemProps => /*#__PURE__*/_jsx(Button, {
75
+ size: "compact",
74
76
  label: title,
75
77
  isPressed: isActive,
76
78
  ...toolbarItemProps,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useContext","forwardRef","Button","ToolbarItem","ToolbarContext","ToolbarButtonContainer","jsx","_jsx","useDeprecatedProps","isDisabled","otherProps","disabled","UnforwardedToolbarButton","props","ref","children","className","containerClassName","extraProps","isActive","title","restProps","accessibleToolbarState","icon","label","shortcut","subscript","onClick","event","stopPropagation","isPressed","accessibleWhenDisabled","toolbarItemProps","ToolbarButton"],"sources":["@wordpress/components/src/toolbar/toolbar-button/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef, MouseEvent as ReactMouseEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\nimport type { ToolbarButtonOverriddenProps, ToolbarButtonProps } from './types';\nimport type { WordPressComponentProps } from '../../context';\n\nfunction useDeprecatedProps( {\n\tisDisabled,\n\t...otherProps\n}: React.ComponentProps< typeof ToolbarButton > ) {\n\treturn {\n\t\tdisabled: isDisabled,\n\t\t...otherProps,\n\t};\n}\n\nfunction UnforwardedToolbarButton(\n\tprops: Omit<\n\t\tWordPressComponentProps< ToolbarButtonProps, typeof Button, false >,\n\t\t'accessibleWhenDisabled' // By default, ToolbarButton will be focusable when disabled.\n\t> &\n\t\tToolbarButtonOverriddenProps,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tcontainerClassName,\n\t\textraProps,\n\t\tisActive,\n\t\ttitle,\n\t\t...restProps\n\t} = useDeprecatedProps( props );\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarButtonContainer className={ containerClassName }>\n\t\t\t\t<Button\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ restProps.icon }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tshortcut={ restProps.shortcut }\n\t\t\t\t\tdata-subscript={ restProps.subscript }\n\t\t\t\t\tonClick={ (\n\t\t\t\t\t\tevent: ReactMouseEvent<\n\t\t\t\t\t\t\tHTMLButtonElement & HTMLAnchorElement,\n\t\t\t\t\t\t\tMouseEvent\n\t\t\t\t\t\t>\n\t\t\t\t\t) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t// TODO: Possible bug; maybe use onClick instead of restProps.onClick.\n\t\t\t\t\t\tif ( restProps.onClick ) {\n\t\t\t\t\t\t\trestProps.onClick( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-toolbar__control',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdata-toolbar-item\n\t\t\t\t\t{ ...extraProps }\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t</ToolbarButtonContainer>\n\t\t);\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to Button. This means that ToolbarButton has the same API as\n\t// Button.\n\treturn (\n\t\t<ToolbarItem\n\t\t\tclassName={ clsx( 'components-toolbar-button', className ) }\n\t\t\t{ ...extraProps }\n\t\t\t{ ...restProps }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\t{ ...toolbarItemProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\n/**\n * ToolbarButton can be used to add actions to a toolbar, usually inside a Toolbar\n * or ToolbarGroup when used to create general interfaces.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { edit } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n *\t\t<Toolbar label=\"Options\">\n *\t\t\t<ToolbarButton\n *\t\t\t\ticon={ edit }\n *\t\t\t\tlabel=\"Edit\"\n *\t\t\t\tonClick={ () => alert( 'Editing' ) }\n *\t\t\t/>\n *\t\t</Toolbar>\n * );\n * }\n * ```\n */\nexport const ToolbarButton = forwardRef( UnforwardedToolbarButton );\nexport default ToolbarButton;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;;AAE3D;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,sBAAsB,MAAM,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIhE,SAASC,kBAAkBA,CAAE;EAC5BC,UAAU;EACV,GAAGC;AAC0C,CAAC,EAAG;EAC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ACL,MAAM;MACNsB,KAAK,EAAGJ,KAAO;MACfU,SAAS,EAAGX,QAAU;MAAA,GACjBa,gBAAgB;MAAAjB,QAAA,EAEnBA;IAAQ,CACH;EACR,CACW,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMkB,aAAa,GAAGhC,UAAU,CAAEW,wBAAyB,CAAC;AACnE,eAAeqB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useContext","forwardRef","Button","ToolbarItem","ToolbarContext","ToolbarButtonContainer","jsx","_jsx","useDeprecatedProps","isDisabled","otherProps","disabled","UnforwardedToolbarButton","props","ref","children","className","containerClassName","extraProps","isActive","title","restProps","accessibleToolbarState","icon","size","label","shortcut","subscript","onClick","event","stopPropagation","isPressed","accessibleWhenDisabled","toolbarItemProps","ToolbarButton"],"sources":["@wordpress/components/src/toolbar/toolbar-button/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef, MouseEvent as ReactMouseEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\nimport type { ToolbarButtonOverriddenProps, ToolbarButtonProps } from './types';\nimport type { WordPressComponentProps } from '../../context';\n\nfunction useDeprecatedProps( {\n\tisDisabled,\n\t...otherProps\n}: React.ComponentProps< typeof ToolbarButton > ) {\n\treturn {\n\t\tdisabled: isDisabled,\n\t\t...otherProps,\n\t};\n}\n\nfunction UnforwardedToolbarButton(\n\tprops: Omit<\n\t\tWordPressComponentProps< ToolbarButtonProps, typeof Button, false >,\n\t\t'accessibleWhenDisabled' // By default, ToolbarButton will be focusable when disabled.\n\t> &\n\t\tToolbarButtonOverriddenProps,\n\tref: ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tcontainerClassName,\n\t\textraProps,\n\t\tisActive,\n\t\ttitle,\n\t\t...restProps\n\t} = useDeprecatedProps( props );\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarButtonContainer className={ containerClassName }>\n\t\t\t\t<Button\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ restProps.icon }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tshortcut={ restProps.shortcut }\n\t\t\t\t\tdata-subscript={ restProps.subscript }\n\t\t\t\t\tonClick={ (\n\t\t\t\t\t\tevent: ReactMouseEvent<\n\t\t\t\t\t\t\tHTMLButtonElement & HTMLAnchorElement,\n\t\t\t\t\t\t\tMouseEvent\n\t\t\t\t\t\t>\n\t\t\t\t\t) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t// TODO: Possible bug; maybe use onClick instead of restProps.onClick.\n\t\t\t\t\t\tif ( restProps.onClick ) {\n\t\t\t\t\t\t\trestProps.onClick( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-toolbar__control',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdata-toolbar-item\n\t\t\t\t\t{ ...extraProps }\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t</ToolbarButtonContainer>\n\t\t);\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to Button. This means that ToolbarButton has the same API as\n\t// Button.\n\treturn (\n\t\t<ToolbarItem\n\t\t\tclassName={ clsx( 'components-toolbar-button', className ) }\n\t\t\t{ ...extraProps }\n\t\t\t{ ...restProps }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\t{ ...toolbarItemProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\n/**\n * ToolbarButton can be used to add actions to a toolbar, usually inside a Toolbar\n * or ToolbarGroup when used to create general interfaces.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { edit } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n *\t\t<Toolbar label=\"Options\">\n *\t\t\t<ToolbarButton\n *\t\t\t\ticon={ edit }\n *\t\t\t\tlabel=\"Edit\"\n *\t\t\t\tonClick={ () => alert( 'Editing' ) }\n *\t\t\t/>\n *\t\t</Toolbar>\n * );\n * }\n * ```\n */\nexport const ToolbarButton = forwardRef( UnforwardedToolbarButton );\nexport default ToolbarButton;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SAASC,UAAU,EAAEC,UAAU,QAAQ,oBAAoB;;AAE3D;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AACjC,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,cAAc,MAAM,oBAAoB;AAC/C,OAAOC,sBAAsB,MAAM,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIhE,SAASC,kBAAkBA,CAAE;EAC5BC,UAAU;EACV,GAAGC;AAC0C,CAAC,EAAG;EACjD,OAAO;IACNC,QAAQ,EAAEF,UAAU;IACpB,GAAGC;EACJ,CAAC;AACF;AAEA,SAASE,wBAAwBA,CAChCC,KAI6B,EAC7BC,GAAwB,EACvB;EACD,MAA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AlB,QAAA,EAEnBA;IAAQ,CACH;EACR,CACW,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMmB,aAAa,GAAGjC,UAAU,CAAEW,wBAAyB,CAAC;AACnE,eAAesB,aAAa","ignoreList":[]}
@@ -69,6 +69,7 @@ const UnconnectedToolsPanel = (props, forwardedRef) => {
69
69
  * onDeselect={ () => setHeight() }
70
70
  * >
71
71
  * <UnitControl
72
+ * __next40pxDefaultSize
72
73
  * label={ __( 'Height' ) }
73
74
  * onChange={ setHeight }
74
75
  * value={ height }
@@ -80,6 +81,7 @@ const UnconnectedToolsPanel = (props, forwardedRef) => {
80
81
  * onDeselect={ () => setWidth() }
81
82
  * >
82
83
  * <UnitControl
84
+ * __next40pxDefaultSize
83
85
  * label={ __( 'Width' ) }
84
86
  * onChange={ setWidth }
85
87
  * value={ width }
@@ -1 +1 @@
1
- {"version":3,"names":["ToolsPanelHeader","ToolsPanelContext","useToolsPanel","Grid","contextConnect","jsx","_jsx","jsxs","_jsxs","UnconnectedToolsPanel","props","forwardedRef","children","label","panelContext","resetAllItems","toggleItem","headingLevel","dropdownMenuProps","toolsPanelProps","columns","ref","Provider","value","resetAll","ToolsPanel"],"sources":["@wordpress/components/src/tools-panel/tools-panel/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ToolsPanelHeader from '../tools-panel-header';\nimport { ToolsPanelContext } from '../context';\nimport { useToolsPanel } from './hook';\nimport { Grid } from '../../grid';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport type { ToolsPanelProps } from '../types';\n\nconst UnconnectedToolsPanel = (\n\tprops: WordPressComponentProps< ToolsPanelProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tlabel,\n\t\tpanelContext,\n\t\tresetAllItems,\n\t\ttoggleItem,\n\t\theadingLevel,\n\t\tdropdownMenuProps,\n\t\t...toolsPanelProps\n\t} = useToolsPanel( props );\n\n\treturn (\n\t\t<Grid { ...toolsPanelProps } columns={ 2 } ref={ forwardedRef }>\n\t\t\t<ToolsPanelContext.Provider value={ panelContext }>\n\t\t\t\t<ToolsPanelHeader\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tresetAll={ resetAllItems }\n\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</ToolsPanelContext.Provider>\n\t\t</Grid>\n\t);\n};\n\n/**\n * The `ToolsPanel` is a container component that displays its children preceded\n * by a header. The header includes a dropdown menu which is automatically\n * generated from the panel's inner `ToolsPanelItems`.\n *\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import {\n * __experimentalToolsPanel as ToolsPanel,\n * __experimentalToolsPanelItem as ToolsPanelItem,\n * __experimentalUnitControl as UnitControl\n * } from '@wordpress/components';\n *\n * function Example() {\n * const [ height, setHeight ] = useState();\n * const [ width, setWidth ] = useState();\n *\n * const resetAll = () => {\n * setHeight();\n * setWidth();\n * }\n *\n * return (\n * <ToolsPanel label={ __( 'Dimensions' ) } resetAll={ resetAll }>\n * <ToolsPanelItem\n * hasValue={ () => !! height }\n * label={ __( 'Height' ) }\n * onDeselect={ () => setHeight() }\n * >\n * <UnitControl\n * label={ __( 'Height' ) }\n * onChange={ setHeight }\n * value={ height }\n * />\n * </ToolsPanelItem>\n * <ToolsPanelItem\n * hasValue={ () => !! width }\n * label={ __( 'Width' ) }\n * onDeselect={ () => setWidth() }\n * >\n * <UnitControl\n * label={ __( 'Width' ) }\n * onChange={ setWidth }\n * value={ width }\n * />\n * </ToolsPanelItem>\n * </ToolsPanel>\n * );\n * }\n * ```\n */\nexport const ToolsPanel = contextConnect( UnconnectedToolsPanel, 'ToolsPanel' );\n\nexport default ToolsPanel;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAOA,gBAAgB,MAAM,uBAAuB;AACpD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,aAAa,QAAQ,QAAQ;AACtC,SAASC,IAAI,QAAQ,YAAY;AAEjC,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,MAAMC,qBAAqB,GAAGA,CAC7BC,KAAwD,EACxDC,YAAiC,KAC7B;EACJ,MAAM;IACLC,QAAQ;IACRC,KAAK;IACLC,YAAY;IACZC,aAAa;IACbC,UAAU;IACVC,YAAY;IACZC,iBAAiB;IACjB,GAAGC;EACJ,CAAC,GAAGjB,aAAa,CAAEQ,KAAM,CAAC;EAE1B,oBACCJ,IAAA,CAACH,IAAI;IAAA,GAAMgB,eAAe;IAAGC,OAAO,EAAG,CAAG;IAACC,GAAG,EAAGV,YAAc;IAAAC,QAAA,eAC9DJ,KAAA,CAACP,iBAAiB,CAACqB,QAAQ;MAACC,KAAK,EAAGT,YAAc;MAAAF,QAAA,gBACjDN,IAAA,CAACN,gBAAgB;QAChBa,KAAK,EAAGA,KAAO;QACfW,QAAQ,EAAGT,aAAe;QAC1BC,UAAU,EAAGA,UAAY;QACzBC,YAAY,EAAGA,YAAc;QAC7BC,iBAAiB,EAAGA;MAAmB,CACvC,CAAC,EACAN,QAAQ;IAAA,CACiB;EAAC,CACxB,CAAC;AAET,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMa,UAAU,GAAGrB,cAAc,CAAEK,qBAAqB,EAAE,YAAa,CAAC;AAE/E,eAAegB,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["ToolsPanelHeader","ToolsPanelContext","useToolsPanel","Grid","contextConnect","jsx","_jsx","jsxs","_jsxs","UnconnectedToolsPanel","props","forwardedRef","children","label","panelContext","resetAllItems","toggleItem","headingLevel","dropdownMenuProps","toolsPanelProps","columns","ref","Provider","value","resetAll","ToolsPanel"],"sources":["@wordpress/components/src/tools-panel/tools-panel/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ToolsPanelHeader from '../tools-panel-header';\nimport { ToolsPanelContext } from '../context';\nimport { useToolsPanel } from './hook';\nimport { Grid } from '../../grid';\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect } from '../../context';\nimport type { ToolsPanelProps } from '../types';\n\nconst UnconnectedToolsPanel = (\n\tprops: WordPressComponentProps< ToolsPanelProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tlabel,\n\t\tpanelContext,\n\t\tresetAllItems,\n\t\ttoggleItem,\n\t\theadingLevel,\n\t\tdropdownMenuProps,\n\t\t...toolsPanelProps\n\t} = useToolsPanel( props );\n\n\treturn (\n\t\t<Grid { ...toolsPanelProps } columns={ 2 } ref={ forwardedRef }>\n\t\t\t<ToolsPanelContext.Provider value={ panelContext }>\n\t\t\t\t<ToolsPanelHeader\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tresetAll={ resetAllItems }\n\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t\tdropdownMenuProps={ dropdownMenuProps }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</ToolsPanelContext.Provider>\n\t\t</Grid>\n\t);\n};\n\n/**\n * The `ToolsPanel` is a container component that displays its children preceded\n * by a header. The header includes a dropdown menu which is automatically\n * generated from the panel's inner `ToolsPanelItems`.\n *\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import {\n * __experimentalToolsPanel as ToolsPanel,\n * __experimentalToolsPanelItem as ToolsPanelItem,\n * __experimentalUnitControl as UnitControl\n * } from '@wordpress/components';\n *\n * function Example() {\n * const [ height, setHeight ] = useState();\n * const [ width, setWidth ] = useState();\n *\n * const resetAll = () => {\n * setHeight();\n * setWidth();\n * }\n *\n * return (\n * <ToolsPanel label={ __( 'Dimensions' ) } resetAll={ resetAll }>\n * <ToolsPanelItem\n * hasValue={ () => !! height }\n * label={ __( 'Height' ) }\n * onDeselect={ () => setHeight() }\n * >\n * <UnitControl\n * __next40pxDefaultSize\n * label={ __( 'Height' ) }\n * onChange={ setHeight }\n * value={ height }\n * />\n * </ToolsPanelItem>\n * <ToolsPanelItem\n * hasValue={ () => !! width }\n * label={ __( 'Width' ) }\n * onDeselect={ () => setWidth() }\n * >\n * <UnitControl\n * __next40pxDefaultSize\n * label={ __( 'Width' ) }\n * onChange={ setWidth }\n * value={ width }\n * />\n * </ToolsPanelItem>\n * </ToolsPanel>\n * );\n * }\n * ```\n */\nexport const ToolsPanel = contextConnect( UnconnectedToolsPanel, 'ToolsPanel' );\n\nexport default ToolsPanel;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAOA,gBAAgB,MAAM,uBAAuB;AACpD,SAASC,iBAAiB,QAAQ,YAAY;AAC9C,SAASC,aAAa,QAAQ,QAAQ;AACtC,SAASC,IAAI,QAAQ,YAAY;AAEjC,SAASC,cAAc,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG/C,MAAMC,qBAAqB,GAAGA,CAC7BC,KAAwD,EACxDC,YAAiC,KAC7B;EACJ,MAAM;IACLC,QAAQ;IACRC,KAAK;IACLC,YAAY;IACZC,aAAa;IACbC,UAAU;IACVC,YAAY;IACZC,iBAAiB;IACjB,GAAGC;EACJ,CAAC,GAAGjB,aAAa,CAAEQ,KAAM,CAAC;EAE1B,oBACCJ,IAAA,CAACH,IAAI;IAAA,GAAMgB,eAAe;IAAGC,OAAO,EAAG,CAAG;IAACC,GAAG,EAAGV,YAAc;IAAAC,QAAA,eAC9DJ,KAAA,CAACP,iBAAiB,CAACqB,QAAQ;MAACC,KAAK,EAAGT,YAAc;MAAAF,QAAA,gBACjDN,IAAA,CAACN,gBAAgB;QAChBa,KAAK,EAAGA,KAAO;QACfW,QAAQ,EAAGT,aAAe;QAC1BC,UAAU,EAAGA,UAAY;QACzBC,YAAY,EAAGA,YAAc;QAC7BC,iBAAiB,EAAGA;MAAmB,CACvC,CAAC,EACAN,QAAQ;IAAA,CACiB;EAAC,CACxB,CAAC;AAET,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMa,UAAU,GAAGrB,cAAc,CAAEK,qBAAqB,EAAE,YAAa,CAAC;AAE/E,eAAegB,UAAU","ignoreList":[]}
@@ -21,6 +21,7 @@ import { CSS_UNITS, getParsedQuantityAndUnit, getUnitsWithCurrentUnit, getValidP
21
21
  import { useControlledState } from '../utils/hooks';
22
22
  import { escapeRegExp } from '../utils/strings';
23
23
  import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
24
+ import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
24
25
  import { jsx as _jsx } from "react/jsx-runtime";
25
26
  function UnforwardedUnitControl(unitControlProps, forwardedRef) {
26
27
  const {
@@ -42,8 +43,15 @@ function UnforwardedUnitControl(unitControlProps, forwardedRef) {
42
43
  units: unitsProp = CSS_UNITS,
43
44
  value: valueProp,
44
45
  onFocus: onFocusProp,
46
+ __shouldNotWarnDeprecated36pxSize,
45
47
  ...props
46
48
  } = useDeprecated36pxDefaultSizeProp(unitControlProps);
49
+ maybeWarnDeprecated36pxSize({
50
+ componentName: 'UnitControl',
51
+ __next40pxDefaultSize: props.__next40pxDefaultSize,
52
+ size,
53
+ __shouldNotWarnDeprecated36pxSize
54
+ });
47
55
  if ('unit' in unitControlProps) {
48
56
  deprecated('UnitControl unit prop', {
49
57
  since: '5.6',
@@ -146,6 +154,7 @@ function UnforwardedUnitControl(unitControlProps, forwardedRef) {
146
154
  }
147
155
  return /*#__PURE__*/_jsx(ValueInput, {
148
156
  ...props,
157
+ __shouldNotWarnDeprecated36pxSize: true,
149
158
  autoComplete: autoComplete,
150
159
  className: classes,
151
160
  disabled: disabled,
@@ -176,7 +185,7 @@ function UnforwardedUnitControl(unitControlProps, forwardedRef) {
176
185
  * const Example = () => {
177
186
  * const [ value, setValue ] = useState( '10px' );
178
187
  *
179
- * return <UnitControl onChange={ setValue } value={ value } />;
188
+ * return <UnitControl __next40pxDefaultSize onChange={ setValue } value={ value } />;
180
189
  * };
181
190
  * ```
182
191
  */
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","deprecated","forwardRef","useMemo","useRef","useEffect","__","ValueInput","UnitSelectControl","CSS_UNITS","getParsedQuantityAndUnit","getUnitsWithCurrentUnit","getValidParsedQuantityAndUnit","useControlledState","escapeRegExp","useDeprecated36pxDefaultSizeProp","jsx","_jsx","UnforwardedUnitControl","unitControlProps","forwardedRef","__unstableStateReducer","autoComplete","children","className","disabled","disableUnits","isPressEnterToChange","isResetValueOnUnitChange","isUnitSelectTabbable","label","onChange","onChangeProp","onUnitChange","size","unit","unitProp","units","unitsProp","value","valueProp","onFocus","onFocusProp","props","since","hint","version","nonNullValueProp","undefined","reFirstCharacterOfUnits","list","firstUnitValue","rest","firstCharacters","reduce","carry","first","substring","includes","RegExp","parsedQuantity","parsedUnit","setUnit","length","initial","fallback","classes","handleOnQuantityChange","nextQuantityValue","changeProps","onChangeValue","join","handleOnUnitChange","nextUnitValue","data","nextValue","default","handleOnKeyDown","event","onKeyDown","metaKey","ctrlKey","test","key","refInputSuffix","current","focus","inputSuffix","ref","__next40pxDefaultSize","onBlur","step","_activeUnit$step","activeUnit","find","option","spinControls","suffix","type","UnitControl","parseQuantityAndUnitFromRawValue","useCustomUnits"],"sources":["@wordpress/components/src/unit-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { KeyboardEvent, ForwardedRef, SyntheticEvent } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport {\n\tCSS_UNITS,\n\tgetParsedQuantityAndUnit,\n\tgetUnitsWithCurrentUnit,\n\tgetValidParsedQuantityAndUnit,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { escapeRegExp } from '../utils/strings';\nimport type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction UnforwardedUnitControl(\n\tunitControlProps: WordPressComponentProps<\n\t\tUnitControlProps,\n\t\t'input',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__unstableStateReducer,\n\t\tautoComplete = 'off',\n\t\t// @ts-expect-error Ensure that children is omitted from restProps\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\tdisableUnits = false,\n\t\tisPressEnterToChange = false,\n\t\tisResetValueOnUnitChange = false,\n\t\tisUnitSelectTabbable = true,\n\t\tlabel,\n\t\tonChange: onChangeProp,\n\t\tonUnitChange,\n\t\tsize = 'default',\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\tonFocus: onFocusProp,\n\t\t...props\n\t} = useDeprecated36pxDefaultSizeProp( unitControlProps );\n\n\tif ( 'unit' in unitControlProps ) {\n\t\tdeprecated( 'UnitControl unit prop', {\n\t\t\tsince: '5.6',\n\t\t\thint: 'The unit should be provided within the `value` prop.',\n\t\t\tversion: '6.2',\n\t\t} );\n\t}\n\n\t// The `value` prop, in theory, should not be `null`, but the following line\n\t// ensures it fallback to `undefined` in case a consumer of `UnitControl`\n\t// still passes `null` as a `value`.\n\tconst nonNullValueProp = valueProp ?? undefined;\n\tconst [ units, reFirstCharacterOfUnits ] = useMemo( () => {\n\t\tconst list = getUnitsWithCurrentUnit(\n\t\t\tnonNullValueProp,\n\t\t\tunitProp,\n\t\t\tunitsProp\n\t\t);\n\t\tconst [ { value: firstUnitValue = '' } = {}, ...rest ] = list;\n\t\tconst firstCharacters = rest.reduce(\n\t\t\t( carry, { value } ) => {\n\t\t\t\tconst first = escapeRegExp( value?.substring( 0, 1 ) || '' );\n\t\t\t\treturn carry.includes( first )\n\t\t\t\t\t? carry\n\t\t\t\t\t: `${ carry }|${ first }`;\n\t\t\t},\n\t\t\tescapeRegExp( firstUnitValue.substring( 0, 1 ) )\n\t\t);\n\t\treturn [ list, new RegExp( `^(?:${ firstCharacters })$`, 'i' ) ];\n\t}, [ nonNullValueProp, unitProp, unitsProp ] );\n\tconst [ parsedQuantity, parsedUnit ] = getParsedQuantityAndUnit(\n\t\tnonNullValueProp,\n\t\tunitProp,\n\t\tunits\n\t);\n\n\tconst [ unit, setUnit ] = useControlledState< string | undefined >(\n\t\tunits.length === 1 ? units[ 0 ].value : unitProp,\n\t\t{\n\t\t\tinitial: parsedUnit,\n\t\t\tfallback: '',\n\t\t}\n\t);\n\n\tuseEffect( () => {\n\t\tif ( parsedUnit !== undefined ) {\n\t\t\tsetUnit( parsedUnit );\n\t\t}\n\t}, [ parsedUnit, setUnit ] );\n\n\tconst classes = clsx(\n\t\t'components-unit-control',\n\t\t// This class is added for legacy purposes to maintain it on the outer\n\t\t// wrapper. See: https://github.com/WordPress/gutenberg/pull/45139\n\t\t'components-unit-control-wrapper',\n\t\tclassName\n\t);\n\n\tconst handleOnQuantityChange = (\n\t\tnextQuantityValue: number | string | undefined,\n\t\tchangeProps: {\n\t\t\tevent: SyntheticEvent;\n\t\t}\n\t) => {\n\t\tif (\n\t\t\tnextQuantityValue === '' ||\n\t\t\ttypeof nextQuantityValue === 'undefined' ||\n\t\t\tnextQuantityValue === null\n\t\t) {\n\t\t\tonChangeProp?.( '', changeProps );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Customizing the onChange callback.\n\t\t * This allows as to broadcast a combined value+unit to onChange.\n\t\t */\n\t\tconst onChangeValue = getValidParsedQuantityAndUnit(\n\t\t\tnextQuantityValue,\n\t\t\tunits,\n\t\t\tparsedQuantity,\n\t\t\tunit\n\t\t).join( '' );\n\n\t\tonChangeProp?.( onChangeValue, changeProps );\n\t};\n\n\tconst handleOnUnitChange: UnitControlOnChangeCallback = (\n\t\tnextUnitValue,\n\t\tchangeProps\n\t) => {\n\t\tconst { data } = changeProps;\n\n\t\tlet nextValue = `${ parsedQuantity ?? '' }${ nextUnitValue }`;\n\n\t\tif ( isResetValueOnUnitChange && data?.default !== undefined ) {\n\t\t\tnextValue = `${ data.default }${ nextUnitValue }`;\n\t\t}\n\n\t\tonChangeProp?.( nextValue, changeProps );\n\t\tonUnitChange?.( nextUnitValue, changeProps );\n\n\t\tsetUnit( nextUnitValue );\n\t};\n\n\tlet handleOnKeyDown;\n\tif ( ! disableUnits && isUnitSelectTabbable && units.length ) {\n\t\thandleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\t\tprops.onKeyDown?.( event );\n\t\t\t// Unless the meta or ctrl key was pressed (to avoid interfering with\n\t\t\t// shortcuts, e.g. pastes), move focus to the unit select if a key\n\t\t\t// matches the first character of a unit.\n\t\t\tif (\n\t\t\t\t! event.metaKey &&\n\t\t\t\t! event.ctrlKey &&\n\t\t\t\treFirstCharacterOfUnits.test( event.key )\n\t\t\t) {\n\t\t\t\trefInputSuffix.current?.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst refInputSuffix = useRef< HTMLSelectElement >( null );\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\n\t\t\tref={ refInputSuffix }\n\t\t\taria-label={ __( 'Select unit' ) }\n\t\t\tdisabled={ disabled }\n\t\t\tisUnitSelectTabbable={ isUnitSelectTabbable }\n\t\t\tonChange={ handleOnUnitChange }\n\t\t\tsize={\n\t\t\t\t[ 'small', 'compact' ].includes( size ) ||\n\t\t\t\t( size === 'default' && ! props.__next40pxDefaultSize )\n\t\t\t\t\t? 'small'\n\t\t\t\t\t: 'default'\n\t\t\t}\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t\tonFocus={ onFocusProp }\n\t\t\tonBlur={ unitControlProps.onBlur }\n\t\t/>\n\t) : null;\n\n\tlet step = props.step;\n\n\t/*\n\t * If no step prop has been passed, lookup the active unit and\n\t * try to get step from `units`, or default to a value of `1`\n\t */\n\tif ( ! step && units ) {\n\t\tconst activeUnit = units.find( ( option ) => option.value === unit );\n\t\tstep = activeUnit?.step ?? 1;\n\t}\n\n\treturn (\n\t\t<ValueInput\n\t\t\t{ ...props }\n\t\t\tautoComplete={ autoComplete }\n\t\t\tclassName={ classes }\n\t\t\tdisabled={ disabled }\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\tlabel={ label }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonChange={ handleOnQuantityChange }\n\t\t\tref={ forwardedRef }\n\t\t\tsize={ size }\n\t\t\tsuffix={ inputSuffix }\n\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\tvalue={ parsedQuantity ?? '' }\n\t\t\tstep={ step }\n\t\t\tonFocus={ onFocusProp }\n\t\t\t__unstableStateReducer={ __unstableStateReducer }\n\t\t/>\n\t);\n}\n\n/**\n * `UnitControl` allows the user to set a numeric quantity as well as a unit (e.g. `px`).\n *\n *\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nexport const UnitControl = forwardRef( UnforwardedUnitControl );\n\nexport { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';\nexport default UnitControl;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,UAAU,EAAEC,OAAO,EAAEC,MAAM,EAAEC,SAAS,QAAQ,oBAAoB;AAC3E,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;;AAEA,SAASC,UAAU,QAAQ,8BAA8B;AACzD,OAAOC,iBAAiB,MAAM,uBAAuB;AACrD,SACCC,SAAS,EACTC,wBAAwB,EACxBC,uBAAuB,EACvBC,6BAA6B,QACvB,SAAS;AAChB,SAASC,kBAAkB,QAAQ,gBAAgB;AACnD,SAASC,YAAY,QAAQ,kBAAkB;AAE/C,SAASC,gCAAgC,QAAQ,+BAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjF,SAASC,sBAAsBA,CAC9BC,gBAIC,EACDC,YAAiC,EAChC;EACD,MAAM;IACLC,sBAAsB;IACtBC,YAAY,GAAG,KAAK;IACpB;IACAC,QAAQ;IACRC,SAAS;IACTC,QAAQ,GAAG,KAAK;IAChBC,YAAY,GAAG,KAAK;IACpBC,oBAAoB,GAAG,KAAK;IAC5BC,wBAAwB,GAAG,KAAK;IAChCC,oBAAoB,GAAG,IAAI;IAC3BC,KAAK;IACLC,QAAQ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C;AAE/D,SAASkF,gCAAgC,EAAEC,cAAc,QAAQ,SAAS;AAC1E,eAAeF,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["clsx","deprecated","forwardRef","useMemo","useRef","useEffect","__","ValueInput","UnitSelectControl","CSS_UNITS","getParsedQuantityAndUnit","getUnitsWithCurrentUnit","getValidParsedQuantityAndUnit","useControlledState","escapeRegExp","useDeprecated36pxDefaultSizeProp","maybeWarnDeprecated36pxSize","jsx","_jsx","UnforwardedUnitControl","unitControlProps","forwardedRef","__unstableStateReducer","autoComplete","children","className","disabled","disableUnits","isPressEnterToChange","isResetValueOnUnitChange","isUnitSelectTabbable","label","onChange","onChangeProp","onUnitChange","size","unit","unitProp","units","unitsProp","value","valueProp","onFocus","onFocusProp","__shouldNotWarnDeprecated36pxSize","props","componentName","__next40pxDefaultSize","since","hint","version","nonNullValueProp","undefined","reFirstCharacterOfUnits","list","firstUnitValue","rest","firstCharacters","reduce","carry","first","substring","includes","RegExp","parsedQuantity","parsedUnit","setUnit","length","initial","fallback","classes","handleOnQuantityChange","nextQuantityValue","changeProps","onChangeValue","join","handleOnUnitChange","nextUnitValue","data","nextValue","default","handleOnKeyDown","event","onKeyDown","metaKey","ctrlKey","test","key","refInputSuffix","current","focus","inputSuffix","ref","onBlur","step","_activeUnit$step","activeUnit","find","option","spinControls","suffix","type","UnitControl","parseQuantityAndUnitFromRawValue","useCustomUnits"],"sources":["@wordpress/components/src/unit-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { KeyboardEvent, ForwardedRef, SyntheticEvent } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport {\n\tCSS_UNITS,\n\tgetParsedQuantityAndUnit,\n\tgetUnitsWithCurrentUnit,\n\tgetValidParsedQuantityAndUnit,\n} from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { escapeRegExp } from '../utils/strings';\nimport type { UnitControlProps, UnitControlOnChangeCallback } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nfunction UnforwardedUnitControl(\n\tunitControlProps: WordPressComponentProps<\n\t\tUnitControlProps,\n\t\t'input',\n\t\tfalse\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst {\n\t\t__unstableStateReducer,\n\t\tautoComplete = 'off',\n\t\t// @ts-expect-error Ensure that children is omitted from restProps\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\tdisableUnits = false,\n\t\tisPressEnterToChange = false,\n\t\tisResetValueOnUnitChange = false,\n\t\tisUnitSelectTabbable = true,\n\t\tlabel,\n\t\tonChange: onChangeProp,\n\t\tonUnitChange,\n\t\tsize = 'default',\n\t\tunit: unitProp,\n\t\tunits: unitsProp = CSS_UNITS,\n\t\tvalue: valueProp,\n\t\tonFocus: onFocusProp,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t...props\n\t} = useDeprecated36pxDefaultSizeProp( unitControlProps );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'UnitControl',\n\t\t__next40pxDefaultSize: props.__next40pxDefaultSize,\n\t\tsize,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\tif ( 'unit' in unitControlProps ) {\n\t\tdeprecated( 'UnitControl unit prop', {\n\t\t\tsince: '5.6',\n\t\t\thint: 'The unit should be provided within the `value` prop.',\n\t\t\tversion: '6.2',\n\t\t} );\n\t}\n\n\t// The `value` prop, in theory, should not be `null`, but the following line\n\t// ensures it fallback to `undefined` in case a consumer of `UnitControl`\n\t// still passes `null` as a `value`.\n\tconst nonNullValueProp = valueProp ?? undefined;\n\tconst [ units, reFirstCharacterOfUnits ] = useMemo( () => {\n\t\tconst list = getUnitsWithCurrentUnit(\n\t\t\tnonNullValueProp,\n\t\t\tunitProp,\n\t\t\tunitsProp\n\t\t);\n\t\tconst [ { value: firstUnitValue = '' } = {}, ...rest ] = list;\n\t\tconst firstCharacters = rest.reduce(\n\t\t\t( carry, { value } ) => {\n\t\t\t\tconst first = escapeRegExp( value?.substring( 0, 1 ) || '' );\n\t\t\t\treturn carry.includes( first )\n\t\t\t\t\t? carry\n\t\t\t\t\t: `${ carry }|${ first }`;\n\t\t\t},\n\t\t\tescapeRegExp( firstUnitValue.substring( 0, 1 ) )\n\t\t);\n\t\treturn [ list, new RegExp( `^(?:${ firstCharacters })$`, 'i' ) ];\n\t}, [ nonNullValueProp, unitProp, unitsProp ] );\n\tconst [ parsedQuantity, parsedUnit ] = getParsedQuantityAndUnit(\n\t\tnonNullValueProp,\n\t\tunitProp,\n\t\tunits\n\t);\n\n\tconst [ unit, setUnit ] = useControlledState< string | undefined >(\n\t\tunits.length === 1 ? units[ 0 ].value : unitProp,\n\t\t{\n\t\t\tinitial: parsedUnit,\n\t\t\tfallback: '',\n\t\t}\n\t);\n\n\tuseEffect( () => {\n\t\tif ( parsedUnit !== undefined ) {\n\t\t\tsetUnit( parsedUnit );\n\t\t}\n\t}, [ parsedUnit, setUnit ] );\n\n\tconst classes = clsx(\n\t\t'components-unit-control',\n\t\t// This class is added for legacy purposes to maintain it on the outer\n\t\t// wrapper. See: https://github.com/WordPress/gutenberg/pull/45139\n\t\t'components-unit-control-wrapper',\n\t\tclassName\n\t);\n\n\tconst handleOnQuantityChange = (\n\t\tnextQuantityValue: number | string | undefined,\n\t\tchangeProps: {\n\t\t\tevent: SyntheticEvent;\n\t\t}\n\t) => {\n\t\tif (\n\t\t\tnextQuantityValue === '' ||\n\t\t\ttypeof nextQuantityValue === 'undefined' ||\n\t\t\tnextQuantityValue === null\n\t\t) {\n\t\t\tonChangeProp?.( '', changeProps );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Customizing the onChange callback.\n\t\t * This allows as to broadcast a combined value+unit to onChange.\n\t\t */\n\t\tconst onChangeValue = getValidParsedQuantityAndUnit(\n\t\t\tnextQuantityValue,\n\t\t\tunits,\n\t\t\tparsedQuantity,\n\t\t\tunit\n\t\t).join( '' );\n\n\t\tonChangeProp?.( onChangeValue, changeProps );\n\t};\n\n\tconst handleOnUnitChange: UnitControlOnChangeCallback = (\n\t\tnextUnitValue,\n\t\tchangeProps\n\t) => {\n\t\tconst { data } = changeProps;\n\n\t\tlet nextValue = `${ parsedQuantity ?? '' }${ nextUnitValue }`;\n\n\t\tif ( isResetValueOnUnitChange && data?.default !== undefined ) {\n\t\t\tnextValue = `${ data.default }${ nextUnitValue }`;\n\t\t}\n\n\t\tonChangeProp?.( nextValue, changeProps );\n\t\tonUnitChange?.( nextUnitValue, changeProps );\n\n\t\tsetUnit( nextUnitValue );\n\t};\n\n\tlet handleOnKeyDown;\n\tif ( ! disableUnits && isUnitSelectTabbable && units.length ) {\n\t\thandleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\t\tprops.onKeyDown?.( event );\n\t\t\t// Unless the meta or ctrl key was pressed (to avoid interfering with\n\t\t\t// shortcuts, e.g. pastes), move focus to the unit select if a key\n\t\t\t// matches the first character of a unit.\n\t\t\tif (\n\t\t\t\t! event.metaKey &&\n\t\t\t\t! event.ctrlKey &&\n\t\t\t\treFirstCharacterOfUnits.test( event.key )\n\t\t\t) {\n\t\t\t\trefInputSuffix.current?.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst refInputSuffix = useRef< HTMLSelectElement >( null );\n\tconst inputSuffix = ! disableUnits ? (\n\t\t<UnitSelectControl\n\t\t\tref={ refInputSuffix }\n\t\t\taria-label={ __( 'Select unit' ) }\n\t\t\tdisabled={ disabled }\n\t\t\tisUnitSelectTabbable={ isUnitSelectTabbable }\n\t\t\tonChange={ handleOnUnitChange }\n\t\t\tsize={\n\t\t\t\t[ 'small', 'compact' ].includes( size ) ||\n\t\t\t\t( size === 'default' && ! props.__next40pxDefaultSize )\n\t\t\t\t\t? 'small'\n\t\t\t\t\t: 'default'\n\t\t\t}\n\t\t\tunit={ unit }\n\t\t\tunits={ units }\n\t\t\tonFocus={ onFocusProp }\n\t\t\tonBlur={ unitControlProps.onBlur }\n\t\t/>\n\t) : null;\n\n\tlet step = props.step;\n\n\t/*\n\t * If no step prop has been passed, lookup the active unit and\n\t * try to get step from `units`, or default to a value of `1`\n\t */\n\tif ( ! step && units ) {\n\t\tconst activeUnit = units.find( ( option ) => option.value === unit );\n\t\tstep = activeUnit?.step ?? 1;\n\t}\n\n\treturn (\n\t\t<ValueInput\n\t\t\t{ ...props }\n\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\tautoComplete={ autoComplete }\n\t\t\tclassName={ classes }\n\t\t\tdisabled={ disabled }\n\t\t\tspinControls=\"none\"\n\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\tlabel={ label }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonChange={ handleOnQuantityChange }\n\t\t\tref={ forwardedRef }\n\t\t\tsize={ size }\n\t\t\tsuffix={ inputSuffix }\n\t\t\ttype={ isPressEnterToChange ? 'text' : 'number' }\n\t\t\tvalue={ parsedQuantity ?? '' }\n\t\t\tstep={ step }\n\t\t\tonFocus={ onFocusProp }\n\t\t\t__unstableStateReducer={ __unstableStateReducer }\n\t\t/>\n\t);\n}\n\n/**\n * `UnitControl` allows the user to set a numeric quantity as well as a unit (e.g. `px`).\n *\n *\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl __next40pxDefaultSize onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nexport const UnitControl = forwardRef( UnforwardedUnitControl );\n\nexport { parseQuantityAndUnitFromRawValue,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K,CAACiD,IAAI;;EAErB;AACD;AACA;AACA;EACC,IAAK,CAAEA,IAAI,IAAIxD,KAAK,EAAG;IAAA,IAAAyD,gBAAA;IACtB,MAAMC,UAAU,GAAG1D,KAAK,CAAC2D,IAAI,CAAIC,MAAM,IAAMA,MAAM,CAAC1D,KAAK,KAAKJ,IAAK,CAAC;IACpE0D,IAAI,IAAAC,gBAAA,GAAGC,UAAU,EAAEF,IAAI,cAAAC,gBAAA,cAAAA,gBAAA,GAAI,CAAC;EAC7B;EAEA,oBACC7E,IAAA,CAACX,UAAU;IAAA,GACLsC,KAAK;IACVD,iCAAiC;IACjCrB,YAAY,EAAGA,YAAc;IAC7BE,SAAS,EAAG6C,OAAS;IACrB5C,QAAQ,EAAGA,QAAU;IACrByE,YAAY,EAAC,MAAM;IACnBvE,oBAAoB,EAAGA,oBAAsB;IAC7CG,KAAK,EAAGA,KAAO;IACfoD,SAAS,EAAGF,eAAiB;IAC7BjD,QAAQ,EAAGuC,sBAAwB;IACnCqB,GAAG,EAAGvE,YAAc;IACpBc,IAAI,EAAGA,IAAM;IACbiE,MAAM,EAAGT,WAAa;IACtBU,IAAI,EAAGzE,oBAAoB,GAAG,MAAM,GAAG,QAAU;IACjDY,KAAK,EAAGwB,cAAc,aAAdA,cAAc,cAAdA,cAAc,GAAI,EAAI;IAC9B8B,IAAI,EAAGA,IAAM;IACbpD,OAAO,EAAGC,WAAa;IACvBrB,sBAAsB,EAAGA;EAAwB,CACjD,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMgF,WAAW,GAAGpG,UAAU,CAAEiB,sBAAuB,CAAC;AAE/D,SAASoF,gCAAgC,EAAEC,cAAc,QAAQ,SAAS;AAC1E,eAAeF,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/unit-control/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { FocusEventHandler } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tInputChangeCallback,\n\tInputControlProps,\n} from '../input-control/types';\nimport type { NumberControlProps } from '../number-control/types';\n\nexport type SelectSize = 'default' | 'small';\n\nexport type WPUnitControlUnit = {\n\t/**\n\t * The value for the unit, used in a CSS value (e.g `px`).\n\t */\n\tvalue: string;\n\t/**\n\t * The label used in a dropdown selector for the unit.\n\t */\n\tlabel: string;\n\t/**\n\t * Default value (quantity) for the unit, used when switching units.\n\t */\n\tdefault?: number;\n\t/**\n\t * An accessible label used by screen readers.\n\t */\n\ta11yLabel?: string;\n\t/**\n\t * A step value used when incrementing/decrementing the value.\n\t */\n\tstep?: number;\n};\n\nexport type UnitControlOnChangeCallback = InputChangeCallback< {\n\tdata?: WPUnitControlUnit;\n} >;\n\nexport type UnitSelectControlProps = {\n\t/**\n\t * Whether the control can be focused via keyboard navigation.\n\t *\n\t * @default true\n\t */\n\tisUnitSelectTabbable?: boolean;\n\t/**\n\t * A callback function invoked when the value is changed.\n\t */\n\tonChange?: UnitControlOnChangeCallback;\n\t/**\n\t * The size of the unit select.\n\t */\n\tsize?: SelectSize;\n\t/**\n\t * Current unit.\n\t */\n\tunit?: string;\n\t/**\n\t * Available units to select from.\n\t *\n\t * @default CSS_UNITS\n\t */\n\tunits?: WPUnitControlUnit[];\n};\n\nexport type UnitControlProps = Pick< InputControlProps, 'size' > &\n\tOmit< UnitSelectControlProps, 'size' | 'unit' > &\n\tOmit< NumberControlProps, 'spinControls' | 'suffix' | 'type' > & {\n\t\t/**\n\t\t * If `true`, the unit `<select>` is hidden.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tdisableUnits?: boolean;\n\t\t/**\n\t\t * If `true`, and the selected unit provides a `default` value, this value is set\n\t\t * when changing units.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tisResetValueOnUnitChange?: boolean;\n\t\t/**\n\t\t * Callback when the `unit` changes.\n\t\t */\n\t\tonUnitChange?: UnitControlOnChangeCallback;\n\t\t/**\n\t\t * Current unit. _Note: this prop is deprecated. Instead, provide a unit with a value through the `value` prop._\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tunit?: string;\n\t\t/**\n\t\t * Current value. If passed as a string, the current unit will be inferred from this value.\n\t\t * For example, a `value` of \"50%\" will set the current unit to `%`.\n\t\t */\n\t\tvalue?: string | number;\n\t\t/**\n\t\t * Callback when either the quantity or the unit inputs lose focus.\n\t\t */\n\t\tonBlur?: FocusEventHandler< HTMLInputElement | HTMLSelectElement >;\n\t\t/**\n\t\t * Callback when either the quantity or the unit inputs gains focus.\n\t\t */\n\t\tonFocus?: FocusEventHandler< HTMLInputElement | HTMLSelectElement >;\n\t};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/unit-control/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { FocusEventHandler } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tInputChangeCallback,\n\tInputControlProps,\n} from '../input-control/types';\nimport type { NumberControlProps } from '../number-control/types';\n\nexport type SelectSize = 'default' | 'small';\n\nexport type WPUnitControlUnit = {\n\t/**\n\t * The value for the unit, used in a CSS value (e.g `px`).\n\t */\n\tvalue: string;\n\t/**\n\t * The label used in a dropdown selector for the unit.\n\t */\n\tlabel: string;\n\t/**\n\t * Default value (quantity) for the unit, used when switching units.\n\t */\n\tdefault?: number;\n\t/**\n\t * An accessible label used by screen readers.\n\t */\n\ta11yLabel?: string;\n\t/**\n\t * A step value used when incrementing/decrementing the value.\n\t */\n\tstep?: number;\n};\n\nexport type UnitControlOnChangeCallback = InputChangeCallback< {\n\tdata?: WPUnitControlUnit;\n} >;\n\nexport type UnitSelectControlProps = {\n\t/**\n\t * Whether the control can be focused via keyboard navigation.\n\t *\n\t * @default true\n\t */\n\tisUnitSelectTabbable?: boolean;\n\t/**\n\t * A callback function invoked when the value is changed.\n\t */\n\tonChange?: UnitControlOnChangeCallback;\n\t/**\n\t * The size of the unit select.\n\t */\n\tsize?: SelectSize;\n\t/**\n\t * Current unit.\n\t */\n\tunit?: string;\n\t/**\n\t * Available units to select from.\n\t *\n\t * @default CSS_UNITS\n\t */\n\tunits?: WPUnitControlUnit[];\n};\n\nexport type UnitControlProps = Pick< InputControlProps, 'size' > &\n\tOmit< UnitSelectControlProps, 'size' | 'unit' > &\n\tOmit< NumberControlProps, 'spinControls' | 'suffix' | 'type' > & {\n\t\t/**\n\t\t * If `true`, the unit `<select>` is hidden.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tdisableUnits?: boolean;\n\t\t/**\n\t\t * If `true`, and the selected unit provides a `default` value, this value is set\n\t\t * when changing units.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tisResetValueOnUnitChange?: boolean;\n\t\t/**\n\t\t * Callback when the `unit` changes.\n\t\t */\n\t\tonUnitChange?: UnitControlOnChangeCallback;\n\t\t/**\n\t\t * Current unit. _Note: this prop is deprecated. Instead, provide a unit with a value through the `value` prop._\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\tunit?: string;\n\t\t/**\n\t\t * Current value. If passed as a string, the current unit will be inferred from this value.\n\t\t * For example, a `value` of \"50%\" will set the current unit to `%`.\n\t\t */\n\t\tvalue?: string | number;\n\t\t/**\n\t\t * Callback when either the quantity or the unit inputs lose focus.\n\t\t */\n\t\tonBlur?: FocusEventHandler< HTMLInputElement | HTMLSelectElement >;\n\t\t/**\n\t\t * Callback when either the quantity or the unit inputs gains focus.\n\t\t */\n\t\tonFocus?: FocusEventHandler< HTMLInputElement | HTMLSelectElement >;\n\t\t/**\n\t\t * Do not throw a warning for the deprecated 36px default size.\n\t\t * For internal components of other components that already throw the warning.\n\t\t *\n\t\t * @ignore\n\t\t */\n\t\t__shouldNotWarnDeprecated36pxSize?: boolean;\n\t};\n"],"mappings":"","ignoreList":[]}
@@ -759,8 +759,8 @@ svg.components-checkbox-control__indeterminate {
759
759
  .components-circular-option-picker__option {
760
760
  display: inline-block;
761
761
  vertical-align: top;
762
- height: 100%;
763
- width: 100%;
762
+ height: 100% !important;
763
+ aspect-ratio: 1;
764
764
  border: none;
765
765
  border-radius: 50%;
766
766
  background: transparent;
@@ -1017,7 +1017,7 @@ input.components-combobox-control__input[type=text]:focus {
1017
1017
  position: relative;
1018
1018
  height: inherit;
1019
1019
  width: inherit;
1020
- min-width: 16px;
1020
+ min-width: 16px !important;
1021
1021
  border-radius: 50%;
1022
1022
  background: #fff;
1023
1023
  padding: 2px;
@@ -1252,7 +1252,7 @@ body.is-dragging-components-draggable {
1252
1252
  }
1253
1253
  .components-dropdown-menu__menu .components-menu-item__button,
1254
1254
  .components-dropdown-menu__menu .components-menu-item__button.components-button {
1255
- min-height: 36px;
1255
+ min-height: 40px;
1256
1256
  height: auto;
1257
1257
  text-align: right;
1258
1258
  padding-right: 8px;
@@ -1284,10 +1284,6 @@ body.is-dragging-components-draggable {
1284
1284
  margin: 8px 0;
1285
1285
  }
1286
1286
 
1287
- .components-color-list-picker__swatch-button {
1288
- padding: 6px;
1289
- }
1290
-
1291
1287
  .components-color-list-picker__swatch-color {
1292
1288
  margin: 2px;
1293
1289
  }
@@ -1856,6 +1852,7 @@ body.is-dragging-components-draggable {
1856
1852
 
1857
1853
  .components-menu-items-choice,
1858
1854
  .components-menu-items-choice.components-button {
1855
+ min-height: 40px;
1859
1856
  height: auto;
1860
1857
  }
1861
1858
  .components-menu-items-choice svg,
@@ -2799,6 +2796,13 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2799
2796
  .components-resizable-box__container.has-show-handle .components-resizable-box__handle {
2800
2797
  display: block;
2801
2798
  }
2799
+ .components-resizable-box__handle > div {
2800
+ position: relative;
2801
+ width: 100%;
2802
+ height: 100%;
2803
+ z-index: 2;
2804
+ outline: none;
2805
+ }
2802
2806
 
2803
2807
  .components-resizable-box__container > img {
2804
2808
  width: inherit;
@@ -759,8 +759,8 @@ svg.components-checkbox-control__indeterminate {
759
759
  .components-circular-option-picker__option {
760
760
  display: inline-block;
761
761
  vertical-align: top;
762
- height: 100%;
763
- width: 100%;
762
+ height: 100% !important;
763
+ aspect-ratio: 1;
764
764
  border: none;
765
765
  border-radius: 50%;
766
766
  background: transparent;
@@ -1021,7 +1021,7 @@ input.components-combobox-control__input[type=text]:focus {
1021
1021
  position: relative;
1022
1022
  height: inherit;
1023
1023
  width: inherit;
1024
- min-width: 16px;
1024
+ min-width: 16px !important;
1025
1025
  border-radius: 50%;
1026
1026
  background: #fff;
1027
1027
  padding: 2px;
@@ -1257,7 +1257,7 @@ body.is-dragging-components-draggable {
1257
1257
  }
1258
1258
  .components-dropdown-menu__menu .components-menu-item__button,
1259
1259
  .components-dropdown-menu__menu .components-menu-item__button.components-button {
1260
- min-height: 36px;
1260
+ min-height: 40px;
1261
1261
  height: auto;
1262
1262
  text-align: left;
1263
1263
  padding-left: 8px;
@@ -1289,10 +1289,6 @@ body.is-dragging-components-draggable {
1289
1289
  margin: 8px 0;
1290
1290
  }
1291
1291
 
1292
- .components-color-list-picker__swatch-button {
1293
- padding: 6px;
1294
- }
1295
-
1296
1292
  .components-color-list-picker__swatch-color {
1297
1293
  margin: 2px;
1298
1294
  }
@@ -1861,6 +1857,7 @@ body.is-dragging-components-draggable {
1861
1857
 
1862
1858
  .components-menu-items-choice,
1863
1859
  .components-menu-items-choice.components-button {
1860
+ min-height: 40px;
1864
1861
  height: auto;
1865
1862
  }
1866
1863
  .components-menu-items-choice svg,
@@ -2808,6 +2805,13 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2808
2805
  .components-resizable-box__container.has-show-handle .components-resizable-box__handle {
2809
2806
  display: block;
2810
2807
  }
2808
+ .components-resizable-box__handle > div {
2809
+ position: relative;
2810
+ width: 100%;
2811
+ height: 100%;
2812
+ z-index: 2;
2813
+ outline: none;
2814
+ }
2811
2815
 
2812
2816
  .components-resizable-box__container > img {
2813
2817
  width: inherit;
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-control/border-control/component.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAsB,UAAU,EAAE,MAAM,UAAU,CAAC;AAiH/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,aAAa;;;;;;;oBAjGyB,CAAC;;;;;;;;;;;8CAoGnD,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-control/border-control/component.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAsB,UAAU,EAAE,MAAM,UAAU,CAAC;AAmH/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,aAAa;;;;;;;oBAnGyB,CAAC;;;;;;;;;;;8CAsGnD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"all-input-control.d.ts","sourceRoot":"","sources":["../../src/box-control/all-input-control.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAa3D,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACxC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,KAAK,EACL,aAAa,EACb,gBAAgB,EAChB,GAAG,KAAK,EACR,EAAE,2BAA2B,+BA0E7B"}
1
+ {"version":3,"file":"all-input-control.d.ts","sourceRoot":"","sources":["../../src/box-control/all-input-control.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAa3D,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACxC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,KAAK,EACL,aAAa,EACb,gBAAgB,EAChB,GAAG,KAAK,EACR,EAAE,2BAA2B,+BA2E7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"axial-input-controls.d.ts","sourceRoot":"","sources":["../../src/box-control/axial-input-controls.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAK3D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,EAC3C,qBAAqB,EACrB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAqI7B"}
1
+ {"version":3,"file":"axial-input-controls.d.ts","sourceRoot":"","sources":["../../src/box-control/axial-input-controls.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAK3D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAE,EAC3C,qBAAqB,EACrB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAsI7B"}
@@ -4,23 +4,24 @@ import type { BoxControlProps } from './types';
4
4
  * used as an input control for values like `padding` or `margin`.
5
5
  *
6
6
  * ```jsx
7
+ * import { useState } from 'react';
7
8
  * import { BoxControl } from '@wordpress/components';
8
- * import { useState } from '@wordpress/element';
9
9
  *
10
10
  * function Example() {
11
- * const [ values, setValues ] = useState( {
12
- * top: '50px',
13
- * left: '10%',
14
- * right: '10%',
15
- * bottom: '50px',
16
- * } );
11
+ * const [ values, setValues ] = useState( {
12
+ * top: '50px',
13
+ * left: '10%',
14
+ * right: '10%',
15
+ * bottom: '50px',
16
+ * } );
17
17
  *
18
- * return (
19
- * <BoxControl
20
- * values={ values }
21
- * onChange={ ( nextValues ) => setValues( nextValues ) }
22
- * />
23
- * );
18
+ * return (
19
+ * <BoxControl
20
+ * __next40pxDefaultSize
21
+ * values={ values }
22
+ * onChange={ setValues }
23
+ * />
24
+ * );
24
25
  * };
25
26
  * ```
26
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box-control/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAEX,eAAe,EAEf,MAAM,SAAS,CAAC;AAcjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,iBAAS,UAAU,CAAE,EACpB,qBAA6B,EAC7B,EAAE,EAAE,MAAM,EACV,UAA8B,EAC9B,QAAe,EACf,KAA2B,EAC3B,MAAM,EAAE,UAAU,EAClB,KAAK,EACL,KAAK,EACL,WAAmB,EACnB,UAAiB,EACjB,WAA4B,EAC5B,WAAW,EACX,UAAU,GACV,EAAE,eAAe,+BAmHjB;AAED,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box-control/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAEX,eAAe,EAEf,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,UAAU,CAAE,EACpB,qBAA6B,EAC7B,EAAE,EAAE,MAAM,EACV,UAA8B,EAC9B,QAAe,EACf,KAA2B,EAC3B,MAAM,EAAE,UAAU,EAClB,KAAK,EACL,KAAK,EACL,WAAmB,EACnB,UAAiB,EACjB,WAA4B,EAC5B,WAAW,EACX,UAAU,GACV,EAAE,eAAe,+BAyHjB;AAED,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"input-controls.d.ts","sourceRoot":"","sources":["../../src/box-control/input-controls.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,2BAA2B,EAAmB,MAAM,SAAS,CAAC;AAI5E,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,EACzC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAwI7B"}
1
+ {"version":3,"file":"input-controls.d.ts","sourceRoot":"","sources":["../../src/box-control/input-controls.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,2BAA2B,EAAmB,MAAM,SAAS,CAAC;AAI5E,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAE,EACzC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAyI7B"}