@wordpress/components 28.13.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 (371) hide show
  1. package/CHANGELOG.md +43 -1
  2. package/build/angle-picker-control/index.js +1 -1
  3. package/build/angle-picker-control/index.js.map +1 -1
  4. package/build/autocomplete/index.js +0 -1
  5. package/build/autocomplete/index.js.map +1 -1
  6. package/build/border-box-control/border-box-control-split-controls/component.js +1 -1
  7. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  8. package/build/border-control/border-control/component.js +2 -0
  9. package/build/border-control/border-control/component.js.map +1 -1
  10. package/build/box-control/all-input-control.js +1 -0
  11. package/build/box-control/all-input-control.js.map +1 -1
  12. package/build/box-control/axial-input-controls.js +1 -0
  13. package/build/box-control/axial-input-controls.js.map +1 -1
  14. package/build/box-control/index.js +9 -2
  15. package/build/box-control/index.js.map +1 -1
  16. package/build/box-control/input-controls.js +1 -0
  17. package/build/box-control/input-controls.js.map +1 -1
  18. package/build/box-control/types.js.map +1 -1
  19. package/build/clipboard-button/index.js +5 -3
  20. package/build/clipboard-button/index.js.map +1 -1
  21. package/build/color-palette/index.native.js +0 -1
  22. package/build/color-palette/index.native.js.map +1 -1
  23. package/build/color-picker/input-with-slider.js +2 -2
  24. package/build/color-picker/input-with-slider.js.map +1 -1
  25. package/build/composite/item.js +0 -9
  26. package/build/composite/item.js.map +1 -1
  27. package/build/context/context-connect.js +0 -1
  28. package/build/context/context-connect.js.map +1 -1
  29. package/build/custom-gradient-picker/index.js +2 -0
  30. package/build/custom-gradient-picker/index.js.map +1 -1
  31. package/build/custom-gradient-picker/types.js.map +1 -1
  32. package/build/custom-select-control/index.js +8 -0
  33. package/build/custom-select-control/index.js.map +1 -1
  34. package/build/custom-select-control/types.js.map +1 -1
  35. package/build/drop-zone/index.js +19 -13
  36. package/build/drop-zone/index.js.map +1 -1
  37. package/build/drop-zone/types.js.map +1 -1
  38. package/build/dropdown-menu/index.js +1 -0
  39. package/build/dropdown-menu/index.js.map +1 -1
  40. package/build/duotone-picker/color-list-picker/index.js +9 -14
  41. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  42. package/build/external-link/index.js +0 -1
  43. package/build/external-link/index.js.map +1 -1
  44. package/build/font-size-picker/font-size-picker-select.js +1 -0
  45. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  46. package/build/font-size-picker/index.js +1 -0
  47. package/build/font-size-picker/index.js.map +1 -1
  48. package/build/form-file-upload/index.js +11 -1
  49. package/build/form-file-upload/index.js.map +1 -1
  50. package/build/form-file-upload/types.js.map +1 -1
  51. package/build/form-token-field/index.js +6 -1
  52. package/build/form-token-field/index.js.map +1 -1
  53. package/build/gradient-picker/index.js +2 -0
  54. package/build/gradient-picker/index.js.map +1 -1
  55. package/build/gradient-picker/types.js.map +1 -1
  56. package/build/menu/checkbox-item.js +5 -9
  57. package/build/menu/checkbox-item.js.map +1 -1
  58. package/build/menu/group-label.js +4 -1
  59. package/build/menu/group-label.js.map +1 -1
  60. package/build/menu/group.js +4 -1
  61. package/build/menu/group.js.map +1 -1
  62. package/build/menu/item-help-text.js +5 -0
  63. package/build/menu/item-help-text.js.map +1 -1
  64. package/build/menu/item-label.js +5 -0
  65. package/build/menu/item-label.js.map +1 -1
  66. package/build/menu/item.js +4 -8
  67. package/build/menu/item.js.map +1 -1
  68. package/build/menu/radio-item.js +5 -9
  69. package/build/menu/radio-item.js.map +1 -1
  70. package/build/menu/separator.js +5 -2
  71. package/build/menu/separator.js.map +1 -1
  72. package/build/modal/aria-helper.js +0 -1
  73. package/build/modal/aria-helper.js.map +1 -1
  74. package/build/modal/index.js +0 -1
  75. package/build/modal/index.js.map +1 -1
  76. package/build/number-control/index.js +8 -0
  77. package/build/number-control/index.js.map +1 -1
  78. package/build/number-control/types.js.map +1 -1
  79. package/build/range-control/index.js +2 -1
  80. package/build/range-control/index.js.map +1 -1
  81. package/build/resizable-box/index.js +9 -1
  82. package/build/resizable-box/index.js.map +1 -1
  83. package/build/slot-fill/bubbles-virtually/fill.js +8 -12
  84. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  85. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +6 -10
  86. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  87. package/build/slot-fill/bubbles-virtually/slot.js +4 -10
  88. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  89. package/build/slot-fill/types.js.map +1 -1
  90. package/build/style-provider/index.js +0 -1
  91. package/build/style-provider/index.js.map +1 -1
  92. package/build/tabs/tab.js +0 -17
  93. package/build/tabs/tab.js.map +1 -1
  94. package/build/toolbar/toolbar-button/index.js +2 -0
  95. package/build/toolbar/toolbar-button/index.js.map +1 -1
  96. package/build/tools-panel/tools-panel/component.js +2 -0
  97. package/build/tools-panel/tools-panel/component.js.map +1 -1
  98. package/build/unit-control/index.js +10 -1
  99. package/build/unit-control/index.js.map +1 -1
  100. package/build/unit-control/types.js.map +1 -1
  101. package/build-module/angle-picker-control/index.js +1 -1
  102. package/build-module/angle-picker-control/index.js.map +1 -1
  103. package/build-module/autocomplete/index.js +0 -1
  104. package/build-module/autocomplete/index.js.map +1 -1
  105. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -1
  106. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  107. package/build-module/border-control/border-control/component.js +2 -0
  108. package/build-module/border-control/border-control/component.js.map +1 -1
  109. package/build-module/box-control/all-input-control.js +1 -0
  110. package/build-module/box-control/all-input-control.js.map +1 -1
  111. package/build-module/box-control/axial-input-controls.js +1 -0
  112. package/build-module/box-control/axial-input-controls.js.map +1 -1
  113. package/build-module/box-control/index.js +9 -2
  114. package/build-module/box-control/index.js.map +1 -1
  115. package/build-module/box-control/input-controls.js +1 -0
  116. package/build-module/box-control/input-controls.js.map +1 -1
  117. package/build-module/box-control/types.js.map +1 -1
  118. package/build-module/clipboard-button/index.js +5 -3
  119. package/build-module/clipboard-button/index.js.map +1 -1
  120. package/build-module/color-palette/index.native.js +0 -1
  121. package/build-module/color-palette/index.native.js.map +1 -1
  122. package/build-module/color-picker/input-with-slider.js +2 -2
  123. package/build-module/color-picker/input-with-slider.js.map +1 -1
  124. package/build-module/composite/item.js +0 -9
  125. package/build-module/composite/item.js.map +1 -1
  126. package/build-module/context/context-connect.js +0 -1
  127. package/build-module/context/context-connect.js.map +1 -1
  128. package/build-module/custom-gradient-picker/index.js +2 -0
  129. package/build-module/custom-gradient-picker/index.js.map +1 -1
  130. package/build-module/custom-gradient-picker/types.js.map +1 -1
  131. package/build-module/custom-select-control/index.js +8 -0
  132. package/build-module/custom-select-control/index.js.map +1 -1
  133. package/build-module/custom-select-control/types.js.map +1 -1
  134. package/build-module/drop-zone/index.js +19 -13
  135. package/build-module/drop-zone/index.js.map +1 -1
  136. package/build-module/drop-zone/types.js.map +1 -1
  137. package/build-module/dropdown-menu/index.js +1 -0
  138. package/build-module/dropdown-menu/index.js.map +1 -1
  139. package/build-module/duotone-picker/color-list-picker/index.js +10 -15
  140. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  141. package/build-module/external-link/index.js +0 -1
  142. package/build-module/external-link/index.js.map +1 -1
  143. package/build-module/font-size-picker/font-size-picker-select.js +1 -0
  144. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  145. package/build-module/font-size-picker/index.js +1 -0
  146. package/build-module/font-size-picker/index.js.map +1 -1
  147. package/build-module/form-file-upload/index.js +13 -2
  148. package/build-module/form-file-upload/index.js.map +1 -1
  149. package/build-module/form-file-upload/types.js.map +1 -1
  150. package/build-module/form-token-field/index.js +6 -1
  151. package/build-module/form-token-field/index.js.map +1 -1
  152. package/build-module/gradient-picker/index.js +2 -0
  153. package/build-module/gradient-picker/index.js.map +1 -1
  154. package/build-module/gradient-picker/types.js.map +1 -1
  155. package/build-module/menu/checkbox-item.js +5 -9
  156. package/build-module/menu/checkbox-item.js.map +1 -1
  157. package/build-module/menu/group-label.js +4 -1
  158. package/build-module/menu/group-label.js.map +1 -1
  159. package/build-module/menu/group.js +4 -1
  160. package/build-module/menu/group.js.map +1 -1
  161. package/build-module/menu/item-help-text.js +6 -1
  162. package/build-module/menu/item-help-text.js.map +1 -1
  163. package/build-module/menu/item-label.js +6 -1
  164. package/build-module/menu/item-label.js.map +1 -1
  165. package/build-module/menu/item.js +4 -8
  166. package/build-module/menu/item.js.map +1 -1
  167. package/build-module/menu/radio-item.js +5 -9
  168. package/build-module/menu/radio-item.js.map +1 -1
  169. package/build-module/menu/separator.js +5 -2
  170. package/build-module/menu/separator.js.map +1 -1
  171. package/build-module/modal/aria-helper.js +0 -1
  172. package/build-module/modal/aria-helper.js.map +1 -1
  173. package/build-module/modal/index.js +0 -1
  174. package/build-module/modal/index.js.map +1 -1
  175. package/build-module/number-control/index.js +8 -0
  176. package/build-module/number-control/index.js.map +1 -1
  177. package/build-module/number-control/types.js.map +1 -1
  178. package/build-module/range-control/index.js +2 -1
  179. package/build-module/range-control/index.js.map +1 -1
  180. package/build-module/resizable-box/index.js +9 -1
  181. package/build-module/resizable-box/index.js.map +1 -1
  182. package/build-module/slot-fill/bubbles-virtually/fill.js +9 -13
  183. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  184. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +6 -10
  185. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  186. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -10
  187. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  188. package/build-module/slot-fill/types.js.map +1 -1
  189. package/build-module/style-provider/index.js +0 -1
  190. package/build-module/style-provider/index.js.map +1 -1
  191. package/build-module/tabs/tab.js +0 -15
  192. package/build-module/tabs/tab.js.map +1 -1
  193. package/build-module/toolbar/toolbar-button/index.js +2 -0
  194. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  195. package/build-module/tools-panel/tools-panel/component.js +2 -0
  196. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  197. package/build-module/unit-control/index.js +10 -1
  198. package/build-module/unit-control/index.js.map +1 -1
  199. package/build-module/unit-control/types.js.map +1 -1
  200. package/build-style/style-rtl.css +9 -5
  201. package/build-style/style.css +9 -5
  202. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  203. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  204. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  205. package/build-types/box-control/index.d.ts +1 -0
  206. package/build-types/box-control/index.d.ts.map +1 -1
  207. package/build-types/box-control/input-controls.d.ts.map +1 -1
  208. package/build-types/box-control/stories/index.story.d.ts +42 -6
  209. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  210. package/build-types/box-control/styles/box-control-styles.d.ts +3 -2
  211. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  212. package/build-types/box-control/types.d.ts +14 -2
  213. package/build-types/box-control/types.d.ts.map +1 -1
  214. package/build-types/clipboard-button/index.d.ts.map +1 -1
  215. package/build-types/color-picker/styles.d.ts +3 -2
  216. package/build-types/color-picker/styles.d.ts.map +1 -1
  217. package/build-types/composite/item.d.ts.map +1 -1
  218. package/build-types/custom-gradient-picker/index.d.ts +1 -1
  219. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  220. package/build-types/custom-gradient-picker/types.d.ts +6 -0
  221. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  222. package/build-types/custom-select-control/index.d.ts.map +1 -1
  223. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  224. package/build-types/custom-select-control/types.d.ts +7 -0
  225. package/build-types/custom-select-control/types.d.ts.map +1 -1
  226. package/build-types/date-time/time/styles.d.ts +8 -4
  227. package/build-types/date-time/time/styles.d.ts.map +1 -1
  228. package/build-types/drop-zone/index.d.ts +1 -1
  229. package/build-types/drop-zone/index.d.ts.map +1 -1
  230. package/build-types/drop-zone/types.d.ts +5 -0
  231. package/build-types/drop-zone/types.d.ts.map +1 -1
  232. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  233. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  234. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -1
  235. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  236. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  237. package/build-types/font-size-picker/index.d.ts.map +1 -1
  238. package/build-types/form-file-upload/index.d.ts +2 -1
  239. package/build-types/form-file-upload/index.d.ts.map +1 -1
  240. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  241. package/build-types/form-file-upload/types.d.ts +10 -8
  242. package/build-types/form-file-upload/types.d.ts.map +1 -1
  243. package/build-types/form-token-field/index.d.ts.map +1 -1
  244. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  245. package/build-types/gradient-picker/index.d.ts +1 -1
  246. package/build-types/gradient-picker/index.d.ts.map +1 -1
  247. package/build-types/gradient-picker/types.d.ts +6 -0
  248. package/build-types/gradient-picker/types.d.ts.map +1 -1
  249. package/build-types/lock-unlock.d.ts +2 -2
  250. package/build-types/menu/checkbox-item.d.ts.map +1 -1
  251. package/build-types/menu/group-label.d.ts.map +1 -1
  252. package/build-types/menu/group.d.ts.map +1 -1
  253. package/build-types/menu/index.d.ts.map +1 -1
  254. package/build-types/menu/item-help-text.d.ts.map +1 -1
  255. package/build-types/menu/item-label.d.ts.map +1 -1
  256. package/build-types/menu/item.d.ts.map +1 -1
  257. package/build-types/menu/radio-item.d.ts.map +1 -1
  258. package/build-types/menu/separator.d.ts.map +1 -1
  259. package/build-types/number-control/index.d.ts +2 -1
  260. package/build-types/number-control/index.d.ts.map +1 -1
  261. package/build-types/number-control/stories/index.story.d.ts +2 -1
  262. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  263. package/build-types/number-control/types.d.ts +7 -0
  264. package/build-types/number-control/types.d.ts.map +1 -1
  265. package/build-types/range-control/index.d.ts +1 -1
  266. package/build-types/range-control/index.d.ts.map +1 -1
  267. package/build-types/range-control/styles/range-control-styles.d.ts +2 -1
  268. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  269. package/build-types/resizable-box/index.d.ts.map +1 -1
  270. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  271. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  272. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  273. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  274. package/build-types/slot-fill/types.d.ts +4 -3
  275. package/build-types/slot-fill/types.d.ts.map +1 -1
  276. package/build-types/tabs/tab.d.ts +3 -0
  277. package/build-types/tabs/tab.d.ts.map +1 -1
  278. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  279. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  280. package/build-types/tools-panel/tools-panel/component.d.ts +2 -0
  281. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  282. package/build-types/unit-control/index.d.ts +3 -2
  283. package/build-types/unit-control/index.d.ts.map +1 -1
  284. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  285. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -1
  286. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  287. package/build-types/unit-control/types.d.ts +7 -0
  288. package/build-types/unit-control/types.d.ts.map +1 -1
  289. package/package.json +20 -20
  290. package/src/angle-picker-control/index.tsx +1 -1
  291. package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -1
  292. package/src/border-control/border-control/component.tsx +2 -0
  293. package/src/box-control/README.md +1 -0
  294. package/src/box-control/all-input-control.tsx +1 -0
  295. package/src/box-control/axial-input-controls.tsx +1 -0
  296. package/src/box-control/index.tsx +10 -2
  297. package/src/box-control/input-controls.tsx +1 -0
  298. package/src/box-control/stories/index.story.tsx +1 -0
  299. package/src/box-control/test/index.tsx +33 -26
  300. package/src/box-control/types.ts +71 -56
  301. package/src/clipboard-button/index.tsx +5 -3
  302. package/src/color-picker/input-with-slider.tsx +1 -1
  303. package/src/composite/item.tsx +1 -19
  304. package/src/custom-gradient-picker/index.tsx +2 -0
  305. package/src/custom-gradient-picker/types.ts +6 -0
  306. package/src/custom-select-control/README.md +2 -0
  307. package/src/custom-select-control/index.tsx +9 -0
  308. package/src/custom-select-control/stories/index.story.tsx +1 -0
  309. package/src/custom-select-control/test/index.tsx +13 -9
  310. package/src/custom-select-control/types.ts +7 -0
  311. package/src/drop-zone/index.tsx +21 -24
  312. package/src/drop-zone/types.ts +5 -0
  313. package/src/dropdown-menu/index.tsx +1 -0
  314. package/src/dropdown-menu/style.scss +1 -1
  315. package/src/duotone-picker/color-list-picker/index.tsx +8 -8
  316. package/src/duotone-picker/color-list-picker/style.scss +0 -6
  317. package/src/font-size-picker/font-size-picker-select.tsx +1 -0
  318. package/src/font-size-picker/index.tsx +1 -0
  319. package/src/form-file-upload/README.md +58 -48
  320. package/src/form-file-upload/docs-manifest.json +5 -0
  321. package/src/form-file-upload/index.tsx +12 -1
  322. package/src/form-file-upload/stories/index.story.tsx +1 -0
  323. package/src/form-file-upload/test/index.tsx +5 -1
  324. package/src/form-file-upload/types.ts +10 -8
  325. package/src/form-token-field/README.md +1 -0
  326. package/src/form-token-field/index.tsx +7 -0
  327. package/src/form-token-field/stories/index.story.tsx +2 -0
  328. package/src/form-token-field/test/index.tsx +5 -1
  329. package/src/gradient-picker/README.md +8 -0
  330. package/src/gradient-picker/index.tsx +2 -0
  331. package/src/gradient-picker/types.ts +6 -0
  332. package/src/menu/checkbox-item.tsx +9 -7
  333. package/src/menu/group-label.tsx +8 -1
  334. package/src/menu/group.tsx +8 -1
  335. package/src/menu/item-help-text.tsx +10 -1
  336. package/src/menu/item-label.tsx +10 -1
  337. package/src/menu/item.tsx +8 -6
  338. package/src/menu/radio-item.tsx +9 -7
  339. package/src/menu/separator.tsx +9 -2
  340. package/src/menu-items-choice/style.scss +1 -0
  341. package/src/number-control/README.md +2 -1
  342. package/src/number-control/index.tsx +9 -0
  343. package/src/number-control/stories/index.story.tsx +1 -0
  344. package/src/number-control/test/index.tsx +5 -1
  345. package/src/number-control/types.ts +7 -0
  346. package/src/range-control/index.tsx +1 -0
  347. package/src/resizable-box/index.tsx +10 -0
  348. package/src/resizable-box/style.scss +8 -0
  349. package/src/slot-fill/bubbles-virtually/fill.tsx +7 -11
  350. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +2 -13
  351. package/src/slot-fill/bubbles-virtually/slot.tsx +4 -7
  352. package/src/slot-fill/types.ts +4 -3
  353. package/src/tabs/tab.tsx +0 -18
  354. package/src/tabs/test/index.tsx +1492 -947
  355. package/src/toolbar/toolbar-button/index.tsx +2 -0
  356. package/src/tools-panel/stories/index.story.tsx +12 -0
  357. package/src/tools-panel/tools-panel/README.md +4 -0
  358. package/src/tools-panel/tools-panel/component.tsx +2 -0
  359. package/src/unit-control/README.md +3 -3
  360. package/src/unit-control/index.tsx +11 -1
  361. package/src/unit-control/stories/index.story.tsx +1 -0
  362. package/src/unit-control/test/index.tsx +5 -1
  363. package/src/unit-control/types.ts +7 -0
  364. package/tsconfig.tsbuildinfo +1 -1
  365. package/build/menu/use-temporary-focus-visible-fix.js +0 -27
  366. package/build/menu/use-temporary-focus-visible-fix.js.map +0 -1
  367. package/build-module/menu/use-temporary-focus-visible-fix.js +0 -20
  368. package/build-module/menu/use-temporary-focus-visible-fix.js.map +0 -1
  369. package/build-types/menu/use-temporary-focus-visible-fix.d.ts +0 -8
  370. package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +0 -1
  371. package/src/menu/use-temporary-focus-visible-fix.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_baseControl","_button","_icon","_utils","_utils2","_math","_inputRange","_rail","_tooltip","_rangeControlStyles","_space","_deprecated36pxSize","_jsxRuntime","noop","computeResetValue","resetFallbackValue","initialPosition","undefined","Number","isNaN","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","COLORS","theme","accent","currentInput","disabled","help","hideLabelFromVision","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","__shouldNotWarnDeprecated36pxSize","otherProps","setValue","useControlledRangeValue","initial","isResetPendent","useRef","hasTooltip","hasInputField","setShowTooltip","useState","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","clamp","classes","clsx","wrapperClasses","id","useInstanceId","describedBy","enableTooltip","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","floatClamp","handleOnInputNumberBlur","handleOnReset","resetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","isRTL","maybeWarnDeprecated36pxSize","componentName","size","jsx","default","__associatedWPComponentName","children","jsxs","Root","BeforeIconWrapper","icon","Wrapper","ref","useMergeRefs","Track","style","width","ThumbWrapper","Thumb","tooltipPosition","show","AfterIconWrapper","InputNumber","inputMode","__unstableInputWidth","space","ActionRightWrapper","accessibleWhenDisabled","variant","onClick","__","RangeControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue( {\n\tresetFallbackValue,\n\tinitialPosition,\n}: Pick< RangeControlProps, 'resetFallbackValue' | 'initialPosition' > ) {\n\tif ( resetFallbackValue !== undefined ) {\n\t\treturn ! Number.isNaN( resetFallbackValue ) ? resetFallbackValue : null;\n\t}\n\n\tif ( initialPosition !== undefined ) {\n\t\treturn ! Number.isNaN( initialPosition ) ? initialPosition : null;\n\t}\n\n\treturn null;\n}\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = clsx( 'components-range-control', className );\n\n\tconst wrapperClasses = clsx(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\t// Reset to `resetFallbackValue` if defined, otherwise set internal value\n\t\t// to `null` — which, if propagated to the `value` prop, will cause\n\t\t// the value to be reset to the `initialPosition` prop if defined.\n\t\tconst resetValue = Number.isNaN( resetFallbackValue )\n\t\t\t? null\n\t\t\t: resetFallbackValue ?? null;\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( resetValue ?? undefined );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\n\t// Add default size deprecation warning.\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'RangeControl',\n\t\t__next40pxDefaultSize,\n\t\tsize: undefined,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"RangeControl\"\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\t// If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n\t\t\t\t\t\t\taccessibleWhenDisabled={ ! disabled }\n\t\t\t\t\t\t\t// The reset button should be disabled if RangeControl itself is disabled,\n\t\t\t\t\t\t\t// or if the current `value` is equal to the value that would be currently\n\t\t\t\t\t\t\t// assigned when clicking the button.\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\tdisabled ||\n\t\t\t\t\t\t\t\tvalue ===\n\t\t\t\t\t\t\t\t\tcomputeResetValue( {\n\t\t\t\t\t\t\t\t\t\tresetFallbackValue,\n\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * __nextHasNoMarginBottom\n * __next40pxDefaultSize\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,C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,EAAGA,SAAW;QACvB4D,IAAI,EACH7D,qBAAqB,GAClB,kBAAkB,GAClB,SACH;QACDmF,oBAAoB,EACnBnF,qBAAqB,GAAG,IAAAoF,YAAK,EAAE,EAAG,CAAC,GAAG,IAAAA,YAAK,EAAE,EAAG,CAChD;QACDhF,IAAI,EAAGA;QACP;QAAA;QACAE,KAAK,EAAGuB;MAAkB,CAC1B,CACD,EACCtD,UAAU,iBACX,IAAAb,WAAA,CAAAoG,GAAA,EAACvG,mBAAA,CAAA8H,kBAAkB;QAAApB,QAAA,eAClB,IAAAvG,WAAA,CAAAoG,GAAA,EAAC/G,OAAA,CAAAgH,OAAM;UACNtF,SAAS,EAAC;UACV;UAAA;UACA6G,sBAAsB,EAAG,CAAEtG;UAC3B;UACA;UACA;UAAA;UACAA,QAAQ,EACPA,QAAQ,IACRsB,KAAK,KACJ1C,iBAAiB,CAAE;YAClBC,kBAAkB;YAClBC;UACD,CAAE,CACH;UACDyH,OAAO,EAAC,WAAW;UACnB1B,IAAI,EAAC,OAAO;UACZ2B,OAAO,EAAGrC,aAAe;UAAAc,QAAA,EAEvB,IAAAwB,QAAE,EAAE,OAAQ;QAAC,CACR;MAAC,CACU,CACpB;IAAA,CACI;EAAC,CACK,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAE1H,uBAAwB,CAAC;AAAC,IAAA2H,QAAA,GAAAF,OAAA,CAAA5B,OAAA,GAEnD2B,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_baseControl","_button","_icon","_utils","_utils2","_math","_inputRange","_rail","_tooltip","_rangeControlStyles","_space","_deprecated36pxSize","_jsxRuntime","noop","computeResetValue","resetFallbackValue","initialPosition","undefined","Number","isNaN","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","COLORS","theme","accent","currentInput","disabled","help","hideLabelFromVision","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","__shouldNotWarnDeprecated36pxSize","otherProps","setValue","useControlledRangeValue","initial","isResetPendent","useRef","hasTooltip","hasInputField","setShowTooltip","useState","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","clamp","classes","clsx","wrapperClasses","id","useInstanceId","describedBy","enableTooltip","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","floatClamp","handleOnInputNumberBlur","handleOnReset","resetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","isRTL","maybeWarnDeprecated36pxSize","componentName","size","jsx","default","__associatedWPComponentName","children","jsxs","Root","BeforeIconWrapper","icon","Wrapper","ref","useMergeRefs","Track","style","width","ThumbWrapper","Thumb","tooltipPosition","show","AfterIconWrapper","InputNumber","inputMode","__unstableInputWidth","space","ActionRightWrapper","accessibleWhenDisabled","variant","onClick","__","RangeControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue( {\n\tresetFallbackValue,\n\tinitialPosition,\n}: Pick< RangeControlProps, 'resetFallbackValue' | 'initialPosition' > ) {\n\tif ( resetFallbackValue !== undefined ) {\n\t\treturn ! Number.isNaN( resetFallbackValue ) ? resetFallbackValue : null;\n\t}\n\n\tif ( initialPosition !== undefined ) {\n\t\treturn ! Number.isNaN( initialPosition ) ? initialPosition : null;\n\t}\n\n\treturn null;\n}\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = clsx( 'components-range-control', className );\n\n\tconst wrapperClasses = clsx(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\t// Reset to `resetFallbackValue` if defined, otherwise set internal value\n\t\t// to `null` — which, if propagated to the `value` prop, will cause\n\t\t// the value to be reset to the `initialPosition` prop if defined.\n\t\tconst resetValue = Number.isNaN( resetFallbackValue )\n\t\t\t? null\n\t\t\t: resetFallbackValue ?? null;\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( resetValue ?? undefined );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\n\t// Add default size deprecation warning.\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'RangeControl',\n\t\t__next40pxDefaultSize,\n\t\tsize: undefined,\n\t\t__shouldNotWarnDeprecated36pxSize,\n\t} );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"RangeControl\"\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\t// If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n\t\t\t\t\t\t\taccessibleWhenDisabled={ ! disabled }\n\t\t\t\t\t\t\t// The reset button should be disabled if RangeControl itself is disabled,\n\t\t\t\t\t\t\t// or if the current `value` is equal to the value that would be currently\n\t\t\t\t\t\t\t// assigned when clicking the button.\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\tdisabled ||\n\t\t\t\t\t\t\t\tvalue ===\n\t\t\t\t\t\t\t\t\tcomputeResetValue( {\n\t\t\t\t\t\t\t\t\t\tresetFallbackValue,\n\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * __nextHasNoMarginBottom\n * __next40pxDefaultSize\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AAC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,EAAGsD,cAAgB;QAC3B9C,SAAS,EAAGA,SAAW;QACvB4D,IAAI,EACH7D,qBAAqB,GAClB,kBAAkB,GAClB,SACH;QACDmF,oBAAoB,EACnBnF,qBAAqB,GAAG,IAAAoF,YAAK,EAAE,EAAG,CAAC,GAAG,IAAAA,YAAK,EAAE,EAAG,CAChD;QACDhF,IAAI,EAAGA;QACP;QAAA;QACAE,KAAK,EAAGuB,gBAAkB;QAC1BpB,iCAAiC;MAAA,CACjC,CACD,EACClC,UAAU,iBACX,IAAAb,WAAA,CAAAoG,GAAA,EAACvG,mBAAA,CAAA8H,kBAAkB;QAAApB,QAAA,eAClB,IAAAvG,WAAA,CAAAoG,GAAA,EAAC/G,OAAA,CAAAgH,OAAM;UACNtF,SAAS,EAAC;UACV;UAAA;UACA6G,sBAAsB,EAAG,CAAEtG;UAC3B;UACA;UACA;UAAA;UACAA,QAAQ,EACPA,QAAQ,IACRsB,KAAK,KACJ1C,iBAAiB,CAAE;YAClBC,kBAAkB;YAClBC;UACD,CAAE,CACH;UACDyH,OAAO,EAAC,WAAW;UACnB1B,IAAI,EAAC,OAAO;UACZ2B,OAAO,EAAGrC,aAAe;UAAAc,QAAA,EAEvB,IAAAwB,QAAE,EAAE,OAAQ;QAAC,CACR;MAAC,CACU,CACpB;IAAA,CACI;EAAC,CACK,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAE1H,uBAAwB,CAAC;AAAC,IAAA2H,QAAA,GAAAF,OAAA,CAAA5B,OAAA,GAEnD2B,YAAY","ignoreList":[]}
@@ -64,7 +64,15 @@ function UnforwardedResizableBox({
64
64
  ...props
65
65
  }, ref) {
66
66
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reResizable.Resizable, {
67
- className: (0, _clsx.default)('components-resizable-box__container', showHandle && 'has-show-handle', className),
67
+ className: (0, _clsx.default)('components-resizable-box__container', showHandle && 'has-show-handle', className)
68
+ // Add a focusable element within the drag handle. Unfortunately,
69
+ // `re-resizable` does not make them properly focusable by default,
70
+ // causing focus to move the the block wrapper which triggers block
71
+ // drag.
72
+ ,
73
+ handleComponent: Object.fromEntries(Object.keys(HANDLE_CLASSES).map(key => [key, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
74
+ tabIndex: -1
75
+ }, key)])),
68
76
  handleClasses: HANDLE_CLASSES,
69
77
  handleStyles: HANDLE_STYLES,
70
78
  ref: ref,
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_clsx","_interopRequireDefault","_reResizable","_resizeTooltip","_jsxRuntime","HANDLE_CLASS_NAME","SIDE_HANDLE_CLASS_NAME","CORNER_HANDLE_CLASS_NAME","HANDLE_CLASSES","top","clsx","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","HANDLE_STYLES_OVERRIDES","width","undefined","height","HANDLE_STYLES","UnforwardedResizableBox","className","children","showHandle","__experimentalShowTooltip","showTooltip","__experimentalTooltipProps","tooltipProps","props","ref","jsxs","Resizable","handleClasses","handleStyles","jsx","default","ResizableBox","exports","forwardRef","_default"],"sources":["@wordpress/components/src/resizable-box/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { Resizable } from 're-resizable';\nimport type { ResizableProps } from 're-resizable';\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\n\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\n\nconst HANDLE_CLASSES = {\n\ttop: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top'\n\t),\n\tright: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottom: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom'\n\t),\n\tleft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopLeft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopRight: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomRight: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomLeft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-left'\n\t),\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\nconst HANDLE_STYLES = {\n\ttop: HANDLE_STYLES_OVERRIDES,\n\tright: HANDLE_STYLES_OVERRIDES,\n\tbottom: HANDLE_STYLES_OVERRIDES,\n\tleft: HANDLE_STYLES_OVERRIDES,\n\ttopLeft: HANDLE_STYLES_OVERRIDES,\n\ttopRight: HANDLE_STYLES_OVERRIDES,\n\tbottomRight: HANDLE_STYLES_OVERRIDES,\n\tbottomLeft: HANDLE_STYLES_OVERRIDES,\n};\n\ntype ResizableBoxProps = ResizableProps & {\n\tchildren: ReactNode;\n\tshowHandle?: boolean;\n\t__experimentalShowTooltip?: boolean;\n\t__experimentalTooltipProps?: Parameters< typeof ResizeTooltip >[ 0 ];\n};\n\nfunction UnforwardedResizableBox(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tshowHandle = true,\n\t\t__experimentalShowTooltip: showTooltip = false,\n\t\t__experimentalTooltipProps: tooltipProps = {},\n\t\t...props\n\t}: ResizableBoxProps,\n\tref: ForwardedRef< Resizable >\n): JSX.Element {\n\treturn (\n\t\t<Resizable\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-resizable-box__container',\n\t\t\t\tshowHandle && 'has-show-handle',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\thandleClasses={ HANDLE_CLASSES }\n\t\t\thandleStyles={ HANDLE_STYLES }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ showTooltip && <ResizeTooltip { ...tooltipProps } /> }\n\t\t</Resizable>\n\t);\n}\n\nexport const ResizableBox = forwardRef( UnforwardedResizableBox );\n\nexport default ResizableBox;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA6C,IAAAK,WAAA,GAAAL,OAAA;AAhB7C;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAGA,MAAMM,iBAAiB,GAAG,kCAAkC;AAC5D,MAAMC,sBAAsB,GAAG,uCAAuC;AACtE,MAAMC,wBAAwB,GAAG,yCAAyC;AAE1E,MAAMC,cAAc,GAAG;EACtBC,GAAG,EAAE,IAAAC,aAAI,EACRL,i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G,KAAK;EAC9CC,0BAA0B,EAAEC,YAAY,GAAG,CAAC,CAAC;EAC7C,GAAGC;AACe,CAAC,EACpBC,GAA8B,EAChB;EACd,oBACC,IAAA5B,WAAA,CAAA6B,IAAA,EAAC/B,YAAA,CAAAgC,SAAS;IACTV,SAAS,EAAG,IAAAd,aAAI,EACf,qCAAqC,EACrCgB,UAAU,IAAI,iBAAiB,EAC/BF,SACD,CAAG;IACHW,aAAa,EAAG3B,cAAgB;IAChC4B,YAAY,EAAGd,aAAe;IAC9BU,GAAG,EAAGA,GAAK;IAAA,GACND,KAAK;IAAAN,QAAA,GAERA,QAAQ,EACRG,WAAW,iBAAI,IAAAxB,WAAA,CAAAiC,GAAA,EAAClC,cAAA,CAAAmC,OAAa;MAAA,GAAMR;IAAY,CAAI,CAAC;EAAA,CAC5C,CAAC;AAEd;AAEO,MAAMS,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAElB,uBAAwB,CAAC;AAAC,IAAAmB,QAAA,GAAAF,OAAA,CAAAF,OAAA,GAEnDC,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_clsx","_interopRequireDefault","_reResizable","_resizeTooltip","_jsxRuntime","HANDLE_CLASS_NAME","SIDE_HANDLE_CLASS_NAME","CORNER_HANDLE_CLASS_NAME","HANDLE_CLASSES","top","clsx","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","HANDLE_STYLES_OVERRIDES","width","undefined","height","HANDLE_STYLES","UnforwardedResizableBox","className","children","showHandle","__experimentalShowTooltip","showTooltip","__experimentalTooltipProps","tooltipProps","props","ref","jsxs","Resizable","handleComponent","Object","fromEntries","keys","map","key","jsx","tabIndex","handleClasses","handleStyles","default","ResizableBox","exports","forwardRef","_default"],"sources":["@wordpress/components/src/resizable-box/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { Resizable } from 're-resizable';\nimport type { ResizableProps } from 're-resizable';\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\n\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\n\nconst HANDLE_CLASSES = {\n\ttop: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top'\n\t),\n\tright: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottom: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom'\n\t),\n\tleft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopLeft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopRight: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomRight: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomLeft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-left'\n\t),\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\nconst HANDLE_STYLES = {\n\ttop: HANDLE_STYLES_OVERRIDES,\n\tright: HANDLE_STYLES_OVERRIDES,\n\tbottom: HANDLE_STYLES_OVERRIDES,\n\tleft: HANDLE_STYLES_OVERRIDES,\n\ttopLeft: HANDLE_STYLES_OVERRIDES,\n\ttopRight: HANDLE_STYLES_OVERRIDES,\n\tbottomRight: HANDLE_STYLES_OVERRIDES,\n\tbottomLeft: HANDLE_STYLES_OVERRIDES,\n};\n\ntype ResizableBoxProps = ResizableProps & {\n\tchildren: ReactNode;\n\tshowHandle?: boolean;\n\t__experimentalShowTooltip?: boolean;\n\t__experimentalTooltipProps?: Parameters< typeof ResizeTooltip >[ 0 ];\n};\n\nfunction UnforwardedResizableBox(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tshowHandle = true,\n\t\t__experimentalShowTooltip: showTooltip = false,\n\t\t__experimentalTooltipProps: tooltipProps = {},\n\t\t...props\n\t}: ResizableBoxProps,\n\tref: ForwardedRef< Resizable >\n): JSX.Element {\n\treturn (\n\t\t<Resizable\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-resizable-box__container',\n\t\t\t\tshowHandle && 'has-show-handle',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t// Add a focusable element within the drag handle. Unfortunately,\n\t\t\t// `re-resizable` does not make them properly focusable by default,\n\t\t\t// causing focus to move the the block wrapper which triggers block\n\t\t\t// drag.\n\t\t\thandleComponent={ Object.fromEntries(\n\t\t\t\tObject.keys( HANDLE_CLASSES ).map( ( key ) => [\n\t\t\t\t\tkey,\n\t\t\t\t\t<div key={ key } tabIndex={ -1 } />,\n\t\t\t\t] )\n\t\t\t) }\n\t\t\thandleClasses={ HANDLE_CLASSES }\n\t\t\thandleStyles={ HANDLE_STYLES }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ showTooltip && <ResizeTooltip { ...tooltipProps } /> }\n\t\t</Resizable>\n\t);\n}\n\nexport const ResizableBox = forwardRef( UnforwardedResizableBox );\n\nexport default ResizableBox;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AAOA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AAA6C,IAAAK,WAAA,GAAAL,OAAA;AAhB7C;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAGA,MAAMM,iBAAiB,GAAG,kCAAkC;AAC5D,MAAMC,sBAAsB,GAAG,uCAAuC;AACtE,MAAMC,wBAAwB,GAAG,yCAAyC;AAE1E,MAAMC,cAAc,GAAG;EACtBC,GAAG,EAAE,IAAAC,aAAI,EACRL,iBAAiB,EACjBC,sBAAsB,EACtB,sCACD,CAAC;EACDK,KAAK,EAAE,IAAAD,aAAI,EACVL,iBAAiB,EACjBC,sBAAsB,EACtB,wCACD,CAAC;EACDM,MAAM,EAAE,IAAAF,aAAI,EACXL,iBAAiB,EACjBC,sBAAsB,EACtB,yCACD,CAAC;EACDO,IAAI,EAAE,IAAAH,aAAI,EACTL,iBAAiB,EACjBC,sBAAsB,EACtB,uCACD,CAAC;EACDQ,OAAO,EAAE,IAAAJ,aAAI,EACZL,iBAAiB,EACjBE,wBAAwB,EACxB,sCAAsC,EACtC,uCACD,CAAC;EACDQ,QAAQ,EAAE,IAAAL,aAAI,EACbL,iBAAiB,EACjBE,wBAAwB,EACxB,sCAAsC,EACtC,wCACD,CAAC;EACDS,WAAW,EAAE,IAAAN,aAAI,EAChBL,iBAAiB,EACjBE,wBAAwB,EACxB,yCAAyC,EACzC,wCACD,CAAC;EACDU,UAAU,EAAE,IAAAP,aAAI,EACfL,iBAAiB,EACjBE,wBAAwB,EACxB,yCAAyC,EACzC,uCACD;AACD,C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AI,IAAAxB,WAAA,CAAAqC,GAAA,EAACtC,cAAA,CAAA0C,OAAa;MAAA,GAAMf;IAAY,CAAI,CAAC;EAAA,CAC5C,CAAC;AAEd;AAEO,MAAMgB,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAEzB,uBAAwB,CAAC;AAAC,IAAA0B,QAAA,GAAAF,OAAA,CAAAF,OAAA,GAEnDC,YAAY","ignoreList":[]}
@@ -25,19 +25,15 @@ function Fill({
25
25
  var _slot$fillProps;
26
26
  const registry = (0, _element.useContext)(_slotFillContext.default);
27
27
  const slot = (0, _compose.useObservableValue)(registry.slots, name);
28
- const [, rerender] = (0, _element.useReducer)(() => [], []);
29
- const ref = (0, _element.useRef)({
30
- rerender
31
- });
28
+ const instanceRef = (0, _element.useRef)({});
29
+
30
+ // We register fills so we can keep track of their existence.
31
+ // Slots can use the `useSlotFills` hook to know if there're already fills
32
+ // registered so they can choose to render themselves or not.
32
33
  (0, _element.useEffect)(() => {
33
- // We register fills so we can keep track of their existence.
34
- // Some Slot implementations need to know if there're already fills
35
- // registered so they can choose to render themselves or not.
36
- const refValue = ref.current;
37
- registry.registerFill(name, refValue);
38
- return () => {
39
- registry.unregisterFill(name, refValue);
40
- };
34
+ const instance = instanceRef.current;
35
+ registry.registerFill(name, instance);
36
+ return () => registry.unregisterFill(name, instance);
41
37
  }, [registry, name]);
42
38
  if (!slot || !slot.ref.current) {
43
39
  return null;
@@ -1 +1 @@
1
- {"version":3,"names":["_compose","require","_element","_slotFillContext","_interopRequireDefault","_styleProvider","_jsxRuntime","Fill","name","children","_slot$fillProps","registry","useContext","SlotFillContext","slot","useObservableValue","slots","rerender","useReducer","ref","useRef","useEffect","refValue","current","registerFill","unregisterFill","wrappedChildren","jsx","default","document","ownerDocument","fillProps","createPortal"],"sources":["@wordpress/components/src/slot-fill/bubbles-virtually/fill.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useObservableValue } from '@wordpress/compose';\nimport {\n\tuseContext,\n\tuseReducer,\n\tuseRef,\n\tuseEffect,\n\tcreatePortal,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nimport StyleProvider from '../../style-provider';\nimport type { FillComponentProps } from '../types';\n\nexport default function Fill( { name, children }: FillComponentProps ) {\n\tconst registry = useContext( SlotFillContext );\n\tconst slot = useObservableValue( registry.slots, name );\n\tconst [ , rerender ] = useReducer( () => [], [] );\n\tconst ref = useRef( { rerender } );\n\n\tuseEffect( () => {\n\t\t// We register fills so we can keep track of their existence.\n\t\t// Some Slot implementations need to know if there're already fills\n\t\t// registered so they can choose to render themselves or not.\n\t\tconst refValue = ref.current;\n\t\tregistry.registerFill( name, refValue );\n\t\treturn () => {\n\t\t\tregistry.unregisterFill( name, refValue );\n\t\t};\n\t}, [ registry, name ] );\n\n\tif ( ! slot || ! slot.ref.current ) {\n\t\treturn null;\n\t}\n\n\t// When using a `Fill`, the `children` will be rendered in the document of the\n\t// `Slot`. This means that we need to wrap the `children` in a `StyleProvider`\n\t// to make sure we're referencing the right document/iframe (instead of the\n\t// context of the `Fill`'s parent).\n\tconst wrappedChildren = (\n\t\t<StyleProvider document={ slot.ref.current.ownerDocument }>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( slot.fillProps ?? {} )\n\t\t\t\t: children }\n\t\t</StyleProvider>\n\t);\n\n\treturn createPortal( wrappedChildren, slot.ref.current );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAWA,IAAAE,gBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAiD,IAAAK,WAAA,GAAAL,OAAA;AAhBjD;AACA;AACA;;AAUA;AACA;AACA;;AAKe,SAASM,IAAIA,CAAE;EAAEC,IAAI;EAAEC;AAA6B,CAAC,EAAG;EAAA,IAAAC,eAAA;EACtE,MAAMC,QAAQ,GAAG,IAAAC,mBAAU,EAAEC,wBAAgB,CAAC;EAC9C,MAAMC,IAAI,GAAG,IAAAC,2BAAkB,EAAEJ,QAAQ,CAACK,KAAK,EAAER,IAAK,CAAC;EACvD,MAAM,GAAIS,QAAQ,CAAE,GAAG,IAAAC,mBAAU,EAAE,MAAM,EAAE,EAAE,EAAG,CAAC;EACjD,MAAMC,GAAG,GAAG,IAAAC,eAAM,EAAE;IAAEH;EAAS,CAAE,CAAC;EAElC,IAAAI,kBAAS,EAAE,MAAM;IAChB;IACA;IACA;IACA,MAAMC,QAAQ,GAAGH,GAAG,CAACI,OAAO;IAC5BZ,QAAQ,CAACa,YAAY,CAAEhB,IAAI,EAAEc,QAAS,CAAC;IACvC,OAAO,MAAM;MACZX,QAAQ,CAACc,cAAc,CAAEjB,IAAI,EAAEc,QAAS,CAAC;IAC1C,CAAC;EACF,CAAC,EAAE,CAAEX,QAAQ,EAAEH,IAAI,CAAG,CAAC;EAEvB,IAAK,CAAEM,IAAI,IAAI,CAAEA,IAAI,CAACK,GAAG,CAACI,OAAO,EAAG;IACnC,OAAO,IAAI;EACZ;;EAEA;EACA;EACA;EACA;EACA,MAAMG,eAAe,gBACpB,IAAApB,WAAA,CAAAqB,GAAA,EAACtB,cAAA,CAAAuB,OAAa;IAACC,QAAQ,EAAGf,IAAI,CAACK,GAAG,CAACI,OAAO,CAACO,aAAe;IAAArB,QAAA,EACvD,OAAOA,QAAQ,KAAK,UAAU,GAC7BA,QAAQ,EAAAC,eAAA,GAAEI,IAAI,CAACiB,SAAS,cAAArB,eAAA,cAAAA,eAAA,GAAI,CAAC,CAAE,CAAC,GAChCD;EAAQ,CACG,CACf;EAED,OAAO,IAAAuB,qBAAY,EAAEN,eAAe,EAAEZ,IAAI,CAACK,GAAG,CAACI,OAAQ,CAAC;AACzD","ignoreList":[]}
1
+ {"version":3,"names":["_compose","require","_element","_slotFillContext","_interopRequireDefault","_styleProvider","_jsxRuntime","Fill","name","children","_slot$fillProps","registry","useContext","SlotFillContext","slot","useObservableValue","slots","instanceRef","useRef","useEffect","instance","current","registerFill","unregisterFill","ref","wrappedChildren","jsx","default","document","ownerDocument","fillProps","createPortal"],"sources":["@wordpress/components/src/slot-fill/bubbles-virtually/fill.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useObservableValue } from '@wordpress/compose';\nimport {\n\tuseContext,\n\tuseRef,\n\tuseEffect,\n\tcreatePortal,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nimport StyleProvider from '../../style-provider';\nimport type { FillComponentProps } from '../types';\n\nexport default function Fill( { name, children }: FillComponentProps ) {\n\tconst registry = useContext( SlotFillContext );\n\tconst slot = useObservableValue( registry.slots, name );\n\tconst instanceRef = useRef( {} );\n\n\t// We register fills so we can keep track of their existence.\n\t// Slots can use the `useSlotFills` hook to know if there're already fills\n\t// registered so they can choose to render themselves or not.\n\tuseEffect( () => {\n\t\tconst instance = instanceRef.current;\n\t\tregistry.registerFill( name, instance );\n\t\treturn () => registry.unregisterFill( name, instance );\n\t}, [ registry, name ] );\n\n\tif ( ! slot || ! slot.ref.current ) {\n\t\treturn null;\n\t}\n\n\t// When using a `Fill`, the `children` will be rendered in the document of the\n\t// `Slot`. This means that we need to wrap the `children` in a `StyleProvider`\n\t// to make sure we're referencing the right document/iframe (instead of the\n\t// context of the `Fill`'s parent).\n\tconst wrappedChildren = (\n\t\t<StyleProvider document={ slot.ref.current.ownerDocument }>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( slot.fillProps ?? {} )\n\t\t\t\t: children }\n\t\t</StyleProvider>\n\t);\n\n\treturn createPortal( wrappedChildren, slot.ref.current );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAUA,IAAAE,gBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAD,sBAAA,CAAAH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22
22
  const slots = (0, _compose.observableMap)();
23
23
  const fills = (0, _compose.observableMap)();
24
24
  const registerSlot = (name, ref, fillProps) => {
25
- const slot = slots.get(name);
26
25
  slots.set(name, {
27
- ...slot,
28
- ref: ref || slot?.ref,
29
- fillProps: fillProps || slot?.fillProps || {}
26
+ ref,
27
+ fillProps
30
28
  });
31
29
  };
32
30
  const unregisterSlot = (name, ref) => {
@@ -53,12 +51,10 @@ function createSlotRegistry() {
53
51
  if ((0, _isShallowEqual.default)(slot.fillProps, fillProps)) {
54
52
  return;
55
53
  }
56
- slot.fillProps = fillProps;
57
- const slotFills = fills.get(name);
58
- if (slotFills) {
59
- // Force update fills.
60
- slotFills.forEach(fill => fill.rerender());
61
- }
54
+ slots.set(name, {
55
+ ref,
56
+ fillProps
57
+ });
62
58
  };
63
59
  const registerFill = (name, ref) => {
64
60
  fills.set(name, [...(fills.get(name) || []), ref]);
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_isShallowEqual","_interopRequireDefault","_compose","_slotFillContext","_jsxRuntime","createSlotRegistry","slots","observableMap","fills","registerSlot","name","ref","fillProps","slot","get","set","unregisterSlot","delete","updateSlot","isShallowEqual","slotFills","forEach","fill","rerender","registerFill","unregisterFill","fillsForName","filter","fillRef","SlotFillProvider","children","registry","useState","jsx","default","Provider","value"],"sources":["@wordpress/components/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { observableMap } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nimport type {\n\tSlotFillProviderProps,\n\tSlotFillBubblesVirtuallyContext,\n} from '../types';\n\nfunction createSlotRegistry(): SlotFillBubblesVirtuallyContext {\n\tconst slots: SlotFillBubblesVirtuallyContext[ 'slots' ] = observableMap();\n\tconst fills: SlotFillBubblesVirtuallyContext[ 'fills' ] = observableMap();\n\n\tconst registerSlot: SlotFillBubblesVirtuallyContext[ 'registerSlot' ] = (\n\t\tname,\n\t\tref,\n\t\tfillProps\n\t) => {\n\t\tconst slot = slots.get( name );\n\n\t\tslots.set( name, {\n\t\t\t...slot,\n\t\t\tref: ref || slot?.ref,\n\t\t\tfillProps: fillProps || slot?.fillProps || {},\n\t\t} );\n\t};\n\n\tconst unregisterSlot: SlotFillBubblesVirtuallyContext[ 'unregisterSlot' ] =\n\t\t( name, ref ) => {\n\t\t\tconst slot = slots.get( name );\n\t\t\tif ( ! slot ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Make sure we're not unregistering a slot registered by another element\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/19242#issuecomment-590295412\n\t\t\tif ( slot.ref !== ref ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tslots.delete( name );\n\t\t};\n\n\tconst updateSlot: SlotFillBubblesVirtuallyContext[ 'updateSlot' ] = (\n\t\tname,\n\t\tref,\n\t\tfillProps\n\t) => {\n\t\tconst slot = slots.get( name );\n\t\tif ( ! slot ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( slot.ref !== ref ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isShallowEqual( slot.fillProps, fillProps ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tslot.fillProps = fillProps;\n\t\tconst slotFills = fills.get( name );\n\t\tif ( slotFills ) {\n\t\t\t// Force update fills.\n\t\t\tslotFills.forEach( ( fill ) => fill.rerender() );\n\t\t}\n\t};\n\n\tconst registerFill: SlotFillBubblesVirtuallyContext[ 'registerFill' ] = (\n\t\tname,\n\t\tref\n\t) => {\n\t\tfills.set( name, [ ...( fills.get( name ) || [] ), ref ] );\n\t};\n\n\tconst unregisterFill: SlotFillBubblesVirtuallyContext[ 'unregisterFill' ] =\n\t\t( name, ref ) => {\n\t\t\tconst fillsForName = fills.get( name );\n\t\t\tif ( ! fillsForName ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfills.set(\n\t\t\t\tname,\n\t\t\t\tfillsForName.filter( ( fillRef ) => fillRef !== ref )\n\t\t\t);\n\t\t};\n\n\treturn {\n\t\tslots,\n\t\tfills,\n\t\tregisterSlot,\n\t\tupdateSlot,\n\t\tunregisterSlot,\n\t\tregisterFill,\n\t\tunregisterFill,\n\t};\n}\n\nexport default function SlotFillProvider( {\n\tchildren,\n}: SlotFillProviderProps ) {\n\tconst [ registry ] = useState( createSlotRegistry );\n\treturn (\n\t\t<SlotFillContext.Provider value={ registry }>\n\t\t\t{ children }\n\t\t</SlotFillContext.Provider>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,gBAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAkD,IAAAK,WAAA,GAAAL,OAAA;AAVlD;AACA;AACA;;AAKA;AACA;AACA;;AAOA,SAASM,kBAAkBA,CAAA,EAAoC;EAC9D,MAAMC,KAAiD,GAAG,IAAAC,sBAAa,EAAC,CAAC;EACzE,MAAMC,KAAiD,GAAG,IAAAD,sBAAa,EAAC,CAAC;EAEzE,MAAME,YAA+D,GAAGA,CACvEC,IAAI,EACJC,GAAG,EACHC,SAAS,KACL;IACJ,MAAMC,IAAI,GAAGP,KAAK,CAACQ,GAAG,CAAEJ,IAAK,CAAC;IAE9BJ,KAAK,CAACS,GAAG,CAAEL,IAAI,EAAE;MAChB,GAAGG,IAAI;MACPF,GAAG,EAAEA,GAAG,IAAIE,IAAI,EAAEF,GAAG;MACrBC,SAAS,EAAEA,SAAS,IAAIC,IAAI,EAAED,SAAS,IAAI,CAAC;IAC7C,CAAE,CAAC;EACJ,CAAC;EAED,MAAMI,cAAmE,GACxEA,CAAEN,IAAI,EAAEC,GAAG,KAAM;IAChB,MAAME,IAAI,GAAGP,KAAK,CAACQ,GAAG,CAAEJ,IAAK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AAC;EACF,CAAC;EAEF,OAAO;IACNL,KAAK;IACLE,KAAK;IACLC,YAAY;IACZS,UAAU;IACVF,cAAc;IACdQ,YAAY;IACZC;EACD,CAAC;AACF;AAEe,SAASI,gBAAgBA,CAAE;EACzCC;AACsB,CAAC,EAAG;EAC1B,MAAM,CAAEC,QAAQ,CAAE,GAAG,IAAAC,iBAAQ,EAAE3B,kBAAmB,CAAC;EACnD,oBACC,IAAAD,WAAA,CAAA6B,GAAA,EAAC9B,gBAAA,CAAA+B,OAAe,CAACC,QAAQ;IAACC,KAAK,EAAGL,QAAU;IAAAD,QAAA,EACzCA;EAAQ,CACe,CAAC;AAE7B","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_isShallowEqual","_interopRequireDefault","_compose","_slotFillContext","_jsxRuntime","createSlotRegistry","slots","observableMap","fills","registerSlot","name","ref","fillProps","set","unregisterSlot","slot","get","delete","updateSlot","isShallowEqual","registerFill","unregisterFill","fillsForName","filter","fillRef","SlotFillProvider","children","registry","useState","jsx","default","Provider","value"],"sources":["@wordpress/components/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { observableMap } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './slot-fill-context';\nimport type {\n\tSlotFillProviderProps,\n\tSlotFillBubblesVirtuallyContext,\n} from '../types';\n\nfunction createSlotRegistry(): SlotFillBubblesVirtuallyContext {\n\tconst slots: SlotFillBubblesVirtuallyContext[ 'slots' ] = observableMap();\n\tconst fills: SlotFillBubblesVirtuallyContext[ 'fills' ] = observableMap();\n\n\tconst registerSlot: SlotFillBubblesVirtuallyContext[ 'registerSlot' ] = (\n\t\tname,\n\t\tref,\n\t\tfillProps\n\t) => {\n\t\tslots.set( name, { ref, fillProps } );\n\t};\n\n\tconst unregisterSlot: SlotFillBubblesVirtuallyContext[ 'unregisterSlot' ] =\n\t\t( name, ref ) => {\n\t\t\tconst slot = slots.get( name );\n\t\t\tif ( ! slot ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Make sure we're not unregistering a slot registered by another element\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/19242#issuecomment-590295412\n\t\t\tif ( slot.ref !== ref ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tslots.delete( name );\n\t\t};\n\n\tconst updateSlot: SlotFillBubblesVirtuallyContext[ 'updateSlot' ] = (\n\t\tname,\n\t\tref,\n\t\tfillProps\n\t) => {\n\t\tconst slot = slots.get( name );\n\t\tif ( ! slot ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( slot.ref !== ref ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isShallowEqual( slot.fillProps, fillProps ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tslots.set( name, { ref, fillProps } );\n\t};\n\n\tconst registerFill: SlotFillBubblesVirtuallyContext[ 'registerFill' ] = (\n\t\tname,\n\t\tref\n\t) => {\n\t\tfills.set( name, [ ...( fills.get( name ) || [] ), ref ] );\n\t};\n\n\tconst unregisterFill: SlotFillBubblesVirtuallyContext[ 'unregisterFill' ] =\n\t\t( name, ref ) => {\n\t\t\tconst fillsForName = fills.get( name );\n\t\t\tif ( ! fillsForName ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfills.set(\n\t\t\t\tname,\n\t\t\t\tfillsForName.filter( ( fillRef ) => fillRef !== ref )\n\t\t\t);\n\t\t};\n\n\treturn {\n\t\tslots,\n\t\tfills,\n\t\tregisterSlot,\n\t\tupdateSlot,\n\t\tunregisterSlot,\n\t\tregisterFill,\n\t\tunregisterFill,\n\t};\n}\n\nexport default function SlotFillProvider( {\n\tchildren,\n}: SlotFillProviderProps ) {\n\tconst [ registry ] = useState( createSlotRegistry );\n\treturn (\n\t\t<SlotFillContext.Provider value={ registry }>\n\t\t\t{ children }\n\t\t</SlotFillContext.Provider>\n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,GAAG;MAAEC;IAAU,CAAE,CAAC;EACtC,CAAC;EAED,MAAMQ,YAA+D,GAAGA,CACvEV,IAAI,EACJC,GAAG,KACC;IACJH,KAAK,CAACK,GAAG,CAAEH,IAAI,EAAE,CAAE,IAAKF,KAAK,CAACQ,GAAG,CAAEN,IAAK,CAAC,IAAI,EAAE,CAAE,EAAEC,GAAG,CAAG,CAAC;EAC3D,CAAC;EAED,MAAMU,cAAmE,GACxEA,CAAEX,IAAI,EAAEC,GAAG,KAAM;IAChB,MAAMW,YAAY,GAAGd,KAAK,CAACQ,GAAG,CAAEN,IAAK,CAAC;IACtC,IAAK,CAAEY,YAAY,EAAG;MACrB;IACD;IAEAd,KAAK,CAACK,GAAG,CACRH,IAAI,EACJY,YAAY,CAACC,MAAM,CAAIC,OAAO,IAAMA,OAAO,KAAKb,GAAI,CACrD,CAAC;EACF,CAAC;EAEF,OAAO;IACNL,KAAK;IACLE,KAAK;IACLC,YAAY;IACZS,UAAU;IACVJ,cAAc;IACdM,YAAY;IACZC;EACD,CAAC;AACF;AAEe,SAASI,gBAAgBA,CAAE;EACzCC;AACsB,CAAC,EAAG;EAC1B,MAAM,CAAEC,QAAQ,CAAE,GAAG,IAAAC,iBAAQ,EAAEvB,kBAAmB,CAAC;EACnD,oBACC,IAAAD,WAAA,CAAAyB,GAAA,EAAC1B,gBAAA,CAAA2B,OAAe,CAACC,QAAQ;IAACC,KAAK,EAAGL,QAAU;IAAAD,QAAA,EACzCA;EAAQ,CACe,CAAC;AAE7B","ignoreList":[]}
@@ -32,11 +32,7 @@ function Slot(props, forwardedRef) {
32
32
  children,
33
33
  ...restProps
34
34
  } = props;
35
- const {
36
- registerSlot,
37
- unregisterSlot,
38
- ...registry
39
- } = (0, _element.useContext)(_slotFillContext.default);
35
+ const registry = (0, _element.useContext)(_slotFillContext.default);
40
36
  const ref = (0, _element.useRef)(null);
41
37
 
42
38
  // We don't want to unregister and register the slot whenever
@@ -48,11 +44,9 @@ function Slot(props, forwardedRef) {
48
44
  fillPropsRef.current = fillProps;
49
45
  }, [fillProps]);
50
46
  (0, _element.useLayoutEffect)(() => {
51
- registerSlot(name, ref, fillPropsRef.current);
52
- return () => {
53
- unregisterSlot(name, ref);
54
- };
55
- }, [registerSlot, unregisterSlot, name]);
47
+ registry.registerSlot(name, ref, fillPropsRef.current);
48
+ return () => registry.unregisterSlot(name, ref);
49
+ }, [registry, name]);
56
50
  (0, _element.useLayoutEffect)(() => {
57
51
  registry.updateSlot(name, ref, fillPropsRef.current);
58
52
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_compose","_view","_slotFillContext","_interopRequireDefault","_jsxRuntime","Slot","props","forwardedRef","name","fillProps","as","children","restProps","registerSlot","unregisterSlot","registry","useContext","SlotFillContext","ref","useRef","fillPropsRef","useLayoutEffect","current","updateSlot","jsx","View","useMergeRefs","_default","exports","default","forwardRef"],"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/>\n\t);\n}\n\nexport default forwardRef( Slot );\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAkD,IAAAK,WAAA,GAAAL,OAAA;AApBlD;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAMA,SAASM,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,MAAM;IAAEO,YAAY;IAAEC,cAAc;IAAE,GAAGC;EAAS,CAAC,GAClD,IAAAC,mBAAU,EAAEC,wBAAgB,CAAC;EAE9B,MAAMC,GAAG,GAAG,IAAAC,eAAM,EAAiB,IAAK,CAAC;;EAEzC;EACA;EACA;EACA;EACA,MAAMC,YAAY,GAAG,IAAAD,eAAM,EAAEV,SAAU,CAAC;EACxC,IAAAY,wBAAe,EAAE,MAAM;IACtBD,YAAY,CAACE,OAAO,GAAGb,SAAS;EACjC,CAAC,EAAE,CAAEA,SAAS,CAAG,CAAC;EAElB,IAAAY,wBAAe,EAAE,MAAM;IACtBR,YAAY,CAAEL,IAAI,EAAEU,GAAG,EAAEE,YAAY,CAACE,OAAQ,CAAC;IAC/C,OAAO,MAAM;MACZR,cAAc,CAAEN,IAAI,EAAEU,GAAI,CAAC;IAC5B,CAAC;EACF,CAAC,EAAE,CAAEL,YAAY,EAAEC,cAAc,EAAEN,IAAI,CAAG,CAAC;EAE3C,IAAAa,wBAAe,EAAE,MAAM;IACtBN,QAAQ,CAACQ,UAAU,CAAEf,IAAI,EAAEU,GAAG,EAAEE,YAAY,CAACE,OAAQ,CAAC;EACvD,CAAE,CAAC;EAEH,oBACC,IAAAlB,WAAA,CAAAoB,GAAA,EAACvB,KAAA,CAAAwB,IAAI;IACJf,EAAE,EAAGA,EAAI;IACTQ,GAAG,EAAG,IAAAQ,qBAAY,EAAE,CAAEnB,YAAY,EAAEW,GAAG,CAAG,CAAG;IAAA,GACxCN;EAAS,CACd,CAAC;AAEJ;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEc,IAAAC,mBAAU,EAAEzB,IAAK,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_compose","_view","_slotFillContext","_interopRequireDefault","_jsxRuntime","Slot","props","forwardedRef","name","fillProps","as","children","restProps","registry","useContext","SlotFillContext","ref","useRef","fillPropsRef","useLayoutEffect","current","registerSlot","unregisterSlot","updateSlot","jsx","View","useMergeRefs","_default","exports","default","forwardRef"],"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":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAkD,IAAAK,WAAA,GAAAL,OAAA;AApBlD;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAMA,SAASM,IA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"],"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
  "use strict";
3
2
 
4
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_cache","_interopRequireDefault","uuid","_interopRequireWildcard","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","uuidCache","Set","containerCacheMap","memoizedCreateCacheWithContainer","container","key","v4","replace","add","cache","createCache","StyleProvider","props","children","document","head","jsx","CacheProvider","value","_default","exports"],"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":";;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,IAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAA6B,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAM,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAH,wBAAAG,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA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gC,CAAEW,QAAQ,CAACC,IAAK,CAAC;EAE/D,oBAAO,IAAApC,WAAA,CAAAqC,GAAA,EAAC3C,MAAA,CAAA4C,aAAa;IAACC,KAAK,EAAGT,KAAO;IAAAI,QAAA,EAAGA;EAAQ,CAAiB,CAAC;AACnE;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAlC,OAAA,GAEcyB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_cache","_interopRequireDefault","uuid","_interopRequireWildcard","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","uuidCache","Set","containerCacheMap","memoizedCreateCacheWithContainer","container","key","v4","replace","add","cache","createCache","StyleProvider","props","children","document","head","jsx","CacheProvider","value","_default","exports"],"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\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,KAAK,EAAGT,KAAO;IAAAI,QAAA,EAAGA;EAAQ,CAAiB,CAAC;AACnE;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAAlC,OAAA,GAEcyB,aAAa","ignoreList":[]}
package/build/tabs/tab.js CHANGED
@@ -5,19 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.Tab = void 0;
8
- var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
9
8
  var _element = require("@wordpress/element");
10
9
  var _warning = _interopRequireDefault(require("@wordpress/warning"));
11
10
  var _context = require("./context");
12
11
  var _styles = require("./styles");
13
12
  var _icons = require("@wordpress/icons");
14
13
  var _jsxRuntime = require("react/jsx-runtime");
15
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
- /**
18
- * External dependencies
19
- */
20
-
21
14
  /**
22
15
  * WordPress dependencies
23
16
  */
@@ -38,15 +31,6 @@ const Tab = exports.Tab = (0, _element.forwardRef)(function Tab({
38
31
  store,
39
32
  instanceId
40
33
  } = (_useTabsContext = (0, _context.useTabsContext)()) !== null && _useTabsContext !== void 0 ? _useTabsContext : {};
41
-
42
- // If the active item is not connected, the tablist may end up in a state
43
- // where none of the tabs are tabbable. In this case, we force all tabs to
44
- // be tabbable, so that as soon as an item received focus, it becomes active
45
- // and Tablist goes back to working as expected.
46
- // eslint-disable-next-line @wordpress/no-unused-vars-before-return
47
- const tabbable = Ariakit.useStoreState(store, state => {
48
- return state?.activeId !== null && !store?.item(state?.activeId)?.element?.isConnected;
49
- });
50
34
  if (!store) {
51
35
  globalThis.SCRIPT_DEBUG === true ? (0, _warning.default)('`Tabs.Tab` must be wrapped in a `Tabs` component.') : void 0;
52
36
  return null;
@@ -58,7 +42,6 @@ const Tab = exports.Tab = (0, _element.forwardRef)(function Tab({
58
42
  id: instancedTabId,
59
43
  disabled: disabled,
60
44
  render: render,
61
- tabbable: tabbable,
62
45
  ...otherProps,
63
46
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TabChildren, {
64
47
  children: children
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_element","_warning","_interopRequireDefault","_context","_styles","_icons","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Tab","exports","forwardRef","children","tabId","disabled","render","otherProps","ref","_useTabsContext","store","instanceId","useTabsContext","tabbable","useStoreState","state","activeId","item","element","isConnected","globalThis","SCRIPT_DEBUG","warning","instancedTabId","jsxs","id","jsx","TabChildren","TabChevron","icon","chevronRight"],"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<StyledTabChevron icon={ chevronRight } />\n\t\t</StyledTab>\n\t);\n} );\n"],"mappings":";;;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAMA,IAAAE,QAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAMA,IAAAM,MAAA,GAAAN,OAAA;AAAgD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAA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A,eAAA,GAAI,CAAC,CAAC;;EAEpD;EACA;EACA;EACA;EACA;EACA,MAAMI,QAAQ,GAAG3C,OAAO,CAAC4C,aAAa,CAAEJ,KAAK,EAAIK,KAAK,IAAM;IAC3D,OACCA,KAAK,EAAEC,QAAQ,KAAK,IAAI,IACxB,CAAEN,KAAK,EAAEO,IAAI,CAAEF,KAAK,EAAEC,QAAS,CAAC,EAAEE,OAAO,EAAEC,WAAW;EAExD,CAAE,CAAC;EAEH,IAAK,CAAET,KAAK,EAAG;IACdU,UAAA,CAAAC,YAAA,gBAAAC,gBAAO,EAAE,mDAAoD,CAAC;IAC9D,OAAO,IAAI;EACZ;EAEA,MAAMC,cAAc,GAAG,GAAIZ,UAAU,IAAMP,KAAK,EAAG;EAEnD,oBACC,IAAAzB,WAAA,CAAA6C,IAAA,EAAC/C,OAAA,CAAAuB,GAAS;IACTQ,GAAG,EAAGA,GAAK;IACXE,KAAK,EAAGA,KAAO;IACfe,EAAE,EAAGF,cAAgB;IACrBlB,QAAQ,EAAGA,QAAU;IACrBC,MAAM,EAAGA,MAAQ;IACjBO,QAAQ,EAAGA,QAAU;IAAA,GAChBN,UAAU;IAAAJ,QAAA,gBAEf,IAAAxB,WAAA,CAAA+C,GAAA,EAACjD,OAAA,CAAAkD,WAAiB;MAAAxB,QAAA,EAAGA;IAAQ,CAAqB,CAAC,eACnD,IAAAxB,WAAA,CAAA+C,GAAA,EAACjD,OAAA,CAAAmD,UAAgB;MAACC,IAAI,EAAGC;IAAc,CAAE,CAAC;EAAA,CAChC,CAAC;AAEd,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_warning","_interopRequireDefault","_context","_styles","_icons","_jsxRuntime","Tab","exports","forwardRef","children","tabId","disabled","render","otherProps","ref","_useTabsContext","store","instanceId","useTabsContext","globalThis","SCRIPT_DEBUG","warning","instancedTabId","jsxs","id","jsx","TabChildren","TabChevron","icon","chevronRight"],"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":";;;;;;;AAIA,IAAAA,QAAA,GAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAMA,IAAAK,MAAA,GAAAL,OAAA;AAAgD,IAAAM,WAAA,GAAAN,OAAA;AAlBhD;AACA;AACA;;AAIA;AACA;AACA;;AAYO,MAAMO,GAAG,GAAAC,OAAA,CAAAD,GAAA,GAAG,IAAAE,mBAAU,EAG1B,SAASF,GAAGA,CAAE;EAAEG,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,GAAG,IAAAG,uBAAc,EAAC,CAAC,cAAAH,eAAA,cAAAA,eAAA,GAAI,CAAC,CAAC;EAEpD,IAAK,CAAEC,KAAK,EAAG;IACdG,UAAA,CAAAC,YAAA,gBAAAC,gBAAO,EAAE,mDAAoD,CAAC;IAC9D,OAAO,IAAI;EACZ;EAEA,MAAMC,cAAc,GAAG,GAAIL,UAAU,IAAMP,KAAK,EAAG;EAEnD,oBACC,IAAAL,WAAA,CAAAkB,IAAA,EAACpB,OAAA,CAAAG,GAAS;IACTQ,GAAG,EAAGA,GAAK;IACXE,KAAK,EAAGA,KAAO;IACfQ,EAAE,EAAGF,cAAgB;IACrBX,QAAQ,EAAGA,QAAU;IACrBC,MAAM,EAAGA,MAAQ;IAAA,GACZC,UAAU;IAAAJ,QAAA,gBAEf,IAAAJ,WAAA,CAAAoB,GAAA,EAACtB,OAAA,CAAAuB,WAAiB;MAAAjB,QAAA,EAAGA;IAAQ,CAAqB,CAAC,eACnD,IAAAJ,WAAA,CAAAoB,GAAA,EAACtB,OAAA,CAAAwB,UAAgB;MAACC,IAAI,EAAGC;IAAc,CAAE,CAAC;EAAA,CAChC,CAAC;AAEd,CAAE,CAAC","ignoreList":[]}
@@ -50,6 +50,7 @@ function UnforwardedToolbarButton(props, ref) {
50
50
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
51
51
  ref: ref,
52
52
  icon: restProps.icon,
53
+ size: "compact",
53
54
  label: title,
54
55
  shortcut: restProps.shortcut,
55
56
  "data-subscript": restProps.subscript,
@@ -80,6 +81,7 @@ function UnforwardedToolbarButton(props, ref) {
80
81
  ...restProps,
81
82
  ref: ref,
82
83
  children: toolbarItemProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
84
+ size: "compact",
83
85
  label: title,
84
86
  isPressed: isActive,
85
87
  ...toolbarItemProps,
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_button","_toolbarItem","_toolbarContext","_toolbarButtonContainer","_jsxRuntime","useDeprecatedProps","isDisabled","otherProps","disabled","UnforwardedToolbarButton","props","ref","children","className","containerClassName","extraProps","isActive","title","restProps","accessibleToolbarState","useContext","ToolbarContext","jsx","default","icon","label","shortcut","subscript","onClick","event","stopPropagation","clsx","isPressed","accessibleWhenDisabled","toolbarItemProps","ToolbarButton","exports","forwardRef","_default"],"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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,uBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAgE,IAAAM,WAAA,GAAAN,OAAA;AAjBhE;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AAQA,SAASO,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,MAAM;IACLC,QAAQ;IACRC,SAAS;IACTC,kBAAkB;IAClBC,UAAU;IACVC,QAAQ;IACRC,KAAK;IACL,GAAGC;EACJ,CAAC,GAAGb,kBAAkB,CAAEK,KAAM,CAAC;EAC/B,MAAMS,sBAAsB,GAAG,IAAAC,mBAAU,EAAEC,uBAAe,CAAC;EAE3D,IAAK,CAAEF,sBAAsB,EAAG;IAC/B,oBACC,IAAAf,WAAA,CAAA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ACA;AACA;AACO,MAAMuB,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,mBAAU,EAAE5B,wBAAyB,CAAC;AAAC,IAAA6B,QAAA,GAAAF,OAAA,CAAAb,OAAA,GACrDY,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_button","_toolbarItem","_toolbarContext","_toolbarButtonContainer","_jsxRuntime","useDeprecatedProps","isDisabled","otherProps","disabled","UnforwardedToolbarButton","props","ref","children","className","containerClassName","extraProps","isActive","title","restProps","accessibleToolbarState","useContext","ToolbarContext","jsx","default","icon","size","label","shortcut","subscript","onClick","event","stopPropagation","clsx","isPressed","accessibleWhenDisabled","toolbarItemProps","ToolbarButton","exports","forwardRef","_default"],"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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,OAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,YAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,uBAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAgE,IAAAM,WAAA,GAAAN,OAAA;AAjBhE;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AAQA,SAASO,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,MAAM;IACLC,QAAQ;IACRC,SAAS;IACTC,kBAAkB;IAClBC,UAAU;I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B,OAAM;MACNE,IAAI,EAAC,SAAS;MACdC,KAAK,EAAGT,KAAO;MACfgB,SAAS,EAAGjB,QAAU;MAAA,GACjBmB,gBAAgB;MAAAvB,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;AACO,MAAMwB,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,mBAAU,EAAE7B,wBAAyB,CAAC;AAAC,IAAA8B,QAAA,GAAAF,OAAA,CAAAd,OAAA,GACrDa,aAAa","ignoreList":[]}
@@ -77,6 +77,7 @@ const UnconnectedToolsPanel = (props, forwardedRef) => {
77
77
  * onDeselect={ () => setHeight() }
78
78
  * >
79
79
  * <UnitControl
80
+ * __next40pxDefaultSize
80
81
  * label={ __( 'Height' ) }
81
82
  * onChange={ setHeight }
82
83
  * value={ height }
@@ -88,6 +89,7 @@ const UnconnectedToolsPanel = (props, forwardedRef) => {
88
89
  * onDeselect={ () => setWidth() }
89
90
  * >
90
91
  * <UnitControl
92
+ * __next40pxDefaultSize
91
93
  * label={ __( 'Width' ) }
92
94
  * onChange={ setWidth }
93
95
  * value={ width }
@@ -1 +1 @@
1
- {"version":3,"names":["_toolsPanelHeader","_interopRequireDefault","require","_context","_hook","_grid","_context2","_jsxRuntime","UnconnectedToolsPanel","props","forwardedRef","children","label","panelContext","resetAllItems","toggleItem","headingLevel","dropdownMenuProps","toolsPanelProps","useToolsPanel","jsx","Grid","columns","ref","jsxs","ToolsPanelContext","Provider","value","default","resetAll","ToolsPanel","exports","contextConnect","_default"],"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":";;;;;;;AAQA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,SAAA,GAAAJ,OAAA;AAA+C,IAAAK,WAAA,GAAAL,OAAA;AAb/C;AACA;AACA;;AAGA;AACA;AACA;;AASA,MAAMM,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,GAAG,IAAAC,mBAAa,EAAEV,KAAM,CAAC;EAE1B,oBACC,IAAAF,WAAA,CAAAa,GAAA,EAACf,KAAA,CAAAgB,IAAI;IAAA,GAAMH,eAAe;IAAGI,OAAO,EAAG,CAAG;IAACC,GAAG,EAAGb,YAAc;IAAAC,QAAA,eAC9D,IAAAJ,WAAA,CAAAiB,IAAA,EAACrB,QAAA,CAAAsB,iBAAiB,CAACC,QAAQ;MAACC,KAAK,EAAGd,YAAc;MAAAF,QAAA,gBACjD,IAAAJ,WAAA,CAAAa,GAAA,EAACpB,iBAAA,CAAA4B,OAAgB;QAChBhB,KAAK,EAAGA,KAAO;QACfiB,QAAQ,EAAGf,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;AACO,MAAMmB,UAAU,GAAAC,OAAA,CAAAD,UAAA,GAAG,IAAAE,wBAAc,EAAExB,qBAAqB,EAAE,YAAa,CAAC;AAAC,IAAAyB,QAAA,GAAAF,OAAA,CAAAH,OAAA,GAEjEE,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["_toolsPanelHeader","_interopRequireDefault","require","_context","_hook","_grid","_context2","_jsxRuntime","UnconnectedToolsPanel","props","forwardedRef","children","label","panelContext","resetAllItems","toggleItem","headingLevel","dropdownMenuProps","toolsPanelProps","useToolsPanel","jsx","Grid","columns","ref","jsxs","ToolsPanelContext","Provider","value","default","resetAll","ToolsPanel","exports","contextConnect","_default"],"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 Tools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