@wordpress/components 27.5.0 → 27.6.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 (938) hide show
  1. package/CHANGELOG.md +25 -5
  2. package/build/alignment-matrix-control/icon.js +2 -2
  3. package/build/alignment-matrix-control/icon.js.map +1 -1
  4. package/build/alignment-matrix-control/index.js +2 -2
  5. package/build/alignment-matrix-control/index.js.map +1 -1
  6. package/build/angle-picker-control/index.js +2 -2
  7. package/build/angle-picker-control/index.js.map +1 -1
  8. package/build/animate/index.js +4 -4
  9. package/build/animate/index.js.map +1 -1
  10. package/build/autocomplete/autocompleter-ui.js +2 -2
  11. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  12. package/build/base-control/hooks.js +1 -4
  13. package/build/base-control/hooks.js.map +1 -1
  14. package/build/base-control/index.js +2 -2
  15. package/build/base-control/index.js.map +1 -1
  16. package/build/base-control/types.js.map +1 -1
  17. package/build/border-control/types.js.map +1 -1
  18. package/build/button/index.js +2 -2
  19. package/build/button/index.js.map +1 -1
  20. package/build/button-group/index.js +2 -2
  21. package/build/button-group/index.js.map +1 -1
  22. package/build/checkbox-control/index.js +2 -2
  23. package/build/checkbox-control/index.js.map +1 -1
  24. package/build/circular-option-picker/circular-option-picker-actions.js +3 -3
  25. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  26. package/build/circular-option-picker/circular-option-picker-option-group.js +2 -2
  27. package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
  28. package/build/circular-option-picker/circular-option-picker-option.js +2 -2
  29. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  30. package/build/circular-option-picker/circular-option-picker.js +2 -2
  31. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  32. package/build/clipboard-button/index.js +2 -2
  33. package/build/clipboard-button/index.js.map +1 -1
  34. package/build/color-indicator/index.js +2 -2
  35. package/build/color-indicator/index.js.map +1 -1
  36. package/build/color-palette/index.js +2 -2
  37. package/build/color-palette/index.js.map +1 -1
  38. package/build/combobox-control/index.js +7 -2
  39. package/build/combobox-control/index.js.map +1 -1
  40. package/build/combobox-control/types.js.map +1 -1
  41. package/build/custom-gradient-picker/gradient-bar/control-points.js +3 -3
  42. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  43. package/build/custom-gradient-picker/gradient-bar/index.js +2 -2
  44. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  45. package/build/custom-gradient-picker/index.js.map +1 -1
  46. package/build/custom-select-control/index.js +3 -3
  47. package/build/custom-select-control/index.js.map +1 -1
  48. package/build/dimension-control/index.js +2 -2
  49. package/build/dimension-control/index.js.map +1 -1
  50. package/build/drop-zone/index.js +2 -2
  51. package/build/drop-zone/index.js.map +1 -1
  52. package/build/dropdown/index.js +2 -2
  53. package/build/dropdown/index.js.map +1 -1
  54. package/build/dropdown-menu/index.js +5 -5
  55. package/build/dropdown-menu/index.js.map +1 -1
  56. package/build/dropdown-menu/index.native.js +4 -4
  57. package/build/dropdown-menu/index.native.js.map +1 -1
  58. package/build/external-link/index.js +2 -2
  59. package/build/external-link/index.js.map +1 -1
  60. package/build/focal-point-picker/focal-point.js +2 -2
  61. package/build/focal-point-picker/focal-point.js.map +1 -1
  62. package/build/focal-point-picker/index.js +2 -2
  63. package/build/focal-point-picker/index.js.map +1 -1
  64. package/build/form-toggle/index.js +2 -2
  65. package/build/form-toggle/index.js.map +1 -1
  66. package/build/form-token-field/index.js +3 -3
  67. package/build/form-token-field/index.js.map +1 -1
  68. package/build/form-token-field/suggestions-list.js +9 -5
  69. package/build/form-token-field/suggestions-list.js.map +1 -1
  70. package/build/form-token-field/token-input.js +2 -2
  71. package/build/form-token-field/token-input.js.map +1 -1
  72. package/build/form-token-field/token.js +2 -2
  73. package/build/form-token-field/token.js.map +1 -1
  74. package/build/guide/index.js +2 -2
  75. package/build/guide/index.js.map +1 -1
  76. package/build/input-control/index.js +3 -6
  77. package/build/input-control/index.js.map +1 -1
  78. package/build/menu-group/index.js +2 -2
  79. package/build/menu-group/index.js.map +1 -1
  80. package/build/menu-item/index.js +3 -3
  81. package/build/menu-item/index.js.map +1 -1
  82. package/build/mobile/color-settings/utils.native.js +1 -1
  83. package/build/mobile/color-settings/utils.native.js.map +1 -1
  84. package/build/modal/index.js +4 -4
  85. package/build/modal/index.js.map +1 -1
  86. package/build/navigation/back-button/index.js +2 -2
  87. package/build/navigation/back-button/index.js.map +1 -1
  88. package/build/navigation/group/index.js +2 -2
  89. package/build/navigation/group/index.js.map +1 -1
  90. package/build/navigation/index.js +3 -3
  91. package/build/navigation/index.js.map +1 -1
  92. package/build/navigation/item/base.js +2 -2
  93. package/build/navigation/item/base.js.map +1 -1
  94. package/build/navigation/item/index.js +2 -2
  95. package/build/navigation/item/index.js.map +1 -1
  96. package/build/navigation/menu/index.js +2 -2
  97. package/build/navigation/menu/index.js.map +1 -1
  98. package/build/notice/index.js +3 -3
  99. package/build/notice/index.js.map +1 -1
  100. package/build/notice/list.js +2 -2
  101. package/build/notice/list.js.map +1 -1
  102. package/build/number-control/index.js +2 -2
  103. package/build/number-control/index.js.map +1 -1
  104. package/build/palette-edit/index.js +5 -5
  105. package/build/palette-edit/index.js.map +1 -1
  106. package/build/palette-edit/styles.js +14 -15
  107. package/build/palette-edit/styles.js.map +1 -1
  108. package/build/panel/body.js +2 -2
  109. package/build/panel/body.js.map +1 -1
  110. package/build/panel/index.js +2 -2
  111. package/build/panel/index.js.map +1 -1
  112. package/build/panel/row.js +2 -2
  113. package/build/panel/row.js.map +1 -1
  114. package/build/placeholder/index.js +3 -3
  115. package/build/placeholder/index.js.map +1 -1
  116. package/build/popover/index.js +2 -2
  117. package/build/popover/index.js.map +1 -1
  118. package/build/radio-control/index.js +2 -2
  119. package/build/radio-control/index.js.map +1 -1
  120. package/build/range-control/index.js +3 -3
  121. package/build/range-control/index.js.map +1 -1
  122. package/build/range-control/mark.js +3 -3
  123. package/build/range-control/mark.js.map +1 -1
  124. package/build/range-control/tooltip.js +2 -2
  125. package/build/range-control/tooltip.js.map +1 -1
  126. package/build/resizable-box/index.js +10 -10
  127. package/build/resizable-box/index.js.map +1 -1
  128. package/build/resizable-box/resize-tooltip/index.js +2 -2
  129. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  130. package/build/responsive-wrapper/index.js +2 -2
  131. package/build/responsive-wrapper/index.js.map +1 -1
  132. package/build/search-control/index.js +2 -2
  133. package/build/search-control/index.js.map +1 -1
  134. package/build/select-control/index.js +2 -2
  135. package/build/select-control/index.js.map +1 -1
  136. package/build/snackbar/index.js +3 -3
  137. package/build/snackbar/index.js.map +1 -1
  138. package/build/snackbar/list.js +2 -2
  139. package/build/snackbar/list.js.map +1 -1
  140. package/build/spinner/index.js +2 -2
  141. package/build/spinner/index.js.map +1 -1
  142. package/build/tab-panel/index.js +2 -2
  143. package/build/tab-panel/index.js.map +1 -1
  144. package/build/text-control/index.js +2 -2
  145. package/build/text-control/index.js.map +1 -1
  146. package/build/toolbar/toolbar/index.js +2 -2
  147. package/build/toolbar/toolbar/index.js.map +1 -1
  148. package/build/toolbar/toolbar-button/index.js +3 -3
  149. package/build/toolbar/toolbar-button/index.js.map +1 -1
  150. package/build/toolbar/toolbar-group/index.js +2 -2
  151. package/build/toolbar/toolbar-group/index.js.map +1 -1
  152. package/build/tools-panel/tools-panel/hook.js +5 -6
  153. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  154. package/build/tools-panel/tools-panel-item/hook.js +6 -8
  155. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  156. package/build/tools-panel/types.js.map +1 -1
  157. package/build/truncate/hook.js +1 -1
  158. package/build/truncate/hook.js.map +1 -1
  159. package/build/unit-control/index.js +2 -2
  160. package/build/unit-control/index.js.map +1 -1
  161. package/build/unit-control/unit-select-control.js +2 -2
  162. package/build/unit-control/unit-select-control.js.map +1 -1
  163. package/build-module/alignment-matrix-control/icon.js +2 -2
  164. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  165. package/build-module/alignment-matrix-control/index.js +2 -2
  166. package/build-module/alignment-matrix-control/index.js.map +1 -1
  167. package/build-module/angle-picker-control/index.js +2 -2
  168. package/build-module/angle-picker-control/index.js.map +1 -1
  169. package/build-module/animate/index.js +4 -4
  170. package/build-module/animate/index.js.map +1 -1
  171. package/build-module/autocomplete/autocompleter-ui.js +2 -2
  172. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  173. package/build-module/base-control/hooks.js +1 -4
  174. package/build-module/base-control/hooks.js.map +1 -1
  175. package/build-module/base-control/index.js +2 -2
  176. package/build-module/base-control/index.js.map +1 -1
  177. package/build-module/base-control/types.js.map +1 -1
  178. package/build-module/border-control/types.js.map +1 -1
  179. package/build-module/button/index.js +2 -2
  180. package/build-module/button/index.js.map +1 -1
  181. package/build-module/button-group/index.js +2 -2
  182. package/build-module/button-group/index.js.map +1 -1
  183. package/build-module/checkbox-control/index.js +2 -2
  184. package/build-module/checkbox-control/index.js.map +1 -1
  185. package/build-module/circular-option-picker/circular-option-picker-actions.js +3 -3
  186. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  187. package/build-module/circular-option-picker/circular-option-picker-option-group.js +2 -2
  188. package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
  189. package/build-module/circular-option-picker/circular-option-picker-option.js +2 -2
  190. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  191. package/build-module/circular-option-picker/circular-option-picker.js +2 -2
  192. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  193. package/build-module/clipboard-button/index.js +2 -2
  194. package/build-module/clipboard-button/index.js.map +1 -1
  195. package/build-module/color-indicator/index.js +2 -2
  196. package/build-module/color-indicator/index.js.map +1 -1
  197. package/build-module/color-palette/index.js +2 -2
  198. package/build-module/color-palette/index.js.map +1 -1
  199. package/build-module/combobox-control/index.js +7 -2
  200. package/build-module/combobox-control/index.js.map +1 -1
  201. package/build-module/combobox-control/types.js.map +1 -1
  202. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +3 -3
  203. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  204. package/build-module/custom-gradient-picker/gradient-bar/index.js +2 -2
  205. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  206. package/build-module/custom-gradient-picker/index.js.map +1 -1
  207. package/build-module/custom-select-control/index.js +3 -3
  208. package/build-module/custom-select-control/index.js.map +1 -1
  209. package/build-module/dimension-control/index.js +2 -2
  210. package/build-module/dimension-control/index.js.map +1 -1
  211. package/build-module/drop-zone/index.js +2 -2
  212. package/build-module/drop-zone/index.js.map +1 -1
  213. package/build-module/dropdown/index.js +2 -2
  214. package/build-module/dropdown/index.js.map +1 -1
  215. package/build-module/dropdown-menu/index.js +5 -5
  216. package/build-module/dropdown-menu/index.js.map +1 -1
  217. package/build-module/dropdown-menu/index.native.js +4 -4
  218. package/build-module/dropdown-menu/index.native.js.map +1 -1
  219. package/build-module/external-link/index.js +2 -2
  220. package/build-module/external-link/index.js.map +1 -1
  221. package/build-module/focal-point-picker/focal-point.js +2 -2
  222. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  223. package/build-module/focal-point-picker/index.js +2 -2
  224. package/build-module/focal-point-picker/index.js.map +1 -1
  225. package/build-module/form-toggle/index.js +2 -2
  226. package/build-module/form-toggle/index.js.map +1 -1
  227. package/build-module/form-token-field/index.js +3 -3
  228. package/build-module/form-token-field/index.js.map +1 -1
  229. package/build-module/form-token-field/suggestions-list.js +9 -5
  230. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  231. package/build-module/form-token-field/token-input.js +2 -2
  232. package/build-module/form-token-field/token-input.js.map +1 -1
  233. package/build-module/form-token-field/token.js +2 -2
  234. package/build-module/form-token-field/token.js.map +1 -1
  235. package/build-module/guide/index.js +2 -2
  236. package/build-module/guide/index.js.map +1 -1
  237. package/build-module/input-control/index.js +3 -6
  238. package/build-module/input-control/index.js.map +1 -1
  239. package/build-module/menu-group/index.js +2 -2
  240. package/build-module/menu-group/index.js.map +1 -1
  241. package/build-module/menu-item/index.js +3 -3
  242. package/build-module/menu-item/index.js.map +1 -1
  243. package/build-module/mobile/color-settings/utils.native.js +1 -1
  244. package/build-module/mobile/color-settings/utils.native.js.map +1 -1
  245. package/build-module/modal/index.js +4 -4
  246. package/build-module/modal/index.js.map +1 -1
  247. package/build-module/navigation/back-button/index.js +2 -2
  248. package/build-module/navigation/back-button/index.js.map +1 -1
  249. package/build-module/navigation/group/index.js +2 -2
  250. package/build-module/navigation/group/index.js.map +1 -1
  251. package/build-module/navigation/index.js +3 -3
  252. package/build-module/navigation/index.js.map +1 -1
  253. package/build-module/navigation/item/base.js +2 -2
  254. package/build-module/navigation/item/base.js.map +1 -1
  255. package/build-module/navigation/item/index.js +2 -2
  256. package/build-module/navigation/item/index.js.map +1 -1
  257. package/build-module/navigation/menu/index.js +2 -2
  258. package/build-module/navigation/menu/index.js.map +1 -1
  259. package/build-module/notice/index.js +3 -3
  260. package/build-module/notice/index.js.map +1 -1
  261. package/build-module/notice/list.js +2 -2
  262. package/build-module/notice/list.js.map +1 -1
  263. package/build-module/number-control/index.js +2 -2
  264. package/build-module/number-control/index.js.map +1 -1
  265. package/build-module/palette-edit/index.js +6 -6
  266. package/build-module/palette-edit/index.js.map +1 -1
  267. package/build-module/palette-edit/styles.js +13 -14
  268. package/build-module/palette-edit/styles.js.map +1 -1
  269. package/build-module/panel/body.js +2 -2
  270. package/build-module/panel/body.js.map +1 -1
  271. package/build-module/panel/index.js +2 -2
  272. package/build-module/panel/index.js.map +1 -1
  273. package/build-module/panel/row.js +2 -2
  274. package/build-module/panel/row.js.map +1 -1
  275. package/build-module/placeholder/index.js +3 -3
  276. package/build-module/placeholder/index.js.map +1 -1
  277. package/build-module/popover/index.js +2 -2
  278. package/build-module/popover/index.js.map +1 -1
  279. package/build-module/radio-control/index.js +2 -2
  280. package/build-module/radio-control/index.js.map +1 -1
  281. package/build-module/range-control/index.js +3 -3
  282. package/build-module/range-control/index.js.map +1 -1
  283. package/build-module/range-control/mark.js +3 -3
  284. package/build-module/range-control/mark.js.map +1 -1
  285. package/build-module/range-control/tooltip.js +2 -2
  286. package/build-module/range-control/tooltip.js.map +1 -1
  287. package/build-module/resizable-box/index.js +10 -10
  288. package/build-module/resizable-box/index.js.map +1 -1
  289. package/build-module/resizable-box/resize-tooltip/index.js +2 -2
  290. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  291. package/build-module/responsive-wrapper/index.js +2 -2
  292. package/build-module/responsive-wrapper/index.js.map +1 -1
  293. package/build-module/search-control/index.js +2 -2
  294. package/build-module/search-control/index.js.map +1 -1
  295. package/build-module/select-control/index.js +2 -2
  296. package/build-module/select-control/index.js.map +1 -1
  297. package/build-module/snackbar/index.js +3 -3
  298. package/build-module/snackbar/index.js.map +1 -1
  299. package/build-module/snackbar/list.js +2 -2
  300. package/build-module/snackbar/list.js.map +1 -1
  301. package/build-module/spinner/index.js +2 -2
  302. package/build-module/spinner/index.js.map +1 -1
  303. package/build-module/tab-panel/index.js +2 -2
  304. package/build-module/tab-panel/index.js.map +1 -1
  305. package/build-module/text-control/index.js +2 -2
  306. package/build-module/text-control/index.js.map +1 -1
  307. package/build-module/toolbar/toolbar/index.js +2 -2
  308. package/build-module/toolbar/toolbar/index.js.map +1 -1
  309. package/build-module/toolbar/toolbar-button/index.js +3 -3
  310. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  311. package/build-module/toolbar/toolbar-group/index.js +2 -2
  312. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  313. package/build-module/tools-panel/tools-panel/hook.js +5 -6
  314. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  315. package/build-module/tools-panel/tools-panel-item/hook.js +6 -8
  316. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  317. package/build-module/tools-panel/types.js.map +1 -1
  318. package/build-module/truncate/hook.js +1 -1
  319. package/build-module/truncate/hook.js.map +1 -1
  320. package/build-module/unit-control/index.js +2 -2
  321. package/build-module/unit-control/index.js.map +1 -1
  322. package/build-module/unit-control/unit-select-control.js +2 -2
  323. package/build-module/unit-control/unit-select-control.js.map +1 -1
  324. package/build-style/style-rtl.css +18 -20
  325. package/build-style/style.css +18 -20
  326. package/build-types/alignment-matrix-control/cell.d.ts +1 -1
  327. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  328. package/build-types/alignment-matrix-control/icon.d.ts +1 -1
  329. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  330. package/build-types/alignment-matrix-control/index.d.ts +1 -1
  331. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  332. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  333. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  334. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +4 -4
  335. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +4 -4
  336. package/build-types/angle-picker-control/angle-circle.d.ts +1 -1
  337. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  338. package/build-types/angle-picker-control/index.d.ts +1 -1
  339. package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
  340. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +4 -4
  341. package/build-types/animate/index.d.ts.map +1 -1
  342. package/build-types/autocomplete/autocompleter-ui.d.ts +1 -1
  343. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  344. package/build-types/autocomplete/index.d.ts +3 -3
  345. package/build-types/autocomplete/index.d.ts.map +1 -1
  346. package/build-types/base-control/hooks.d.ts +1 -0
  347. package/build-types/base-control/hooks.d.ts.map +1 -1
  348. package/build-types/base-control/index.d.ts +2 -2
  349. package/build-types/base-control/index.d.ts.map +1 -1
  350. package/build-types/base-control/styles/base-control-styles.d.ts +5 -5
  351. package/build-types/base-control/types.d.ts +1 -2
  352. package/build-types/base-control/types.d.ts.map +1 -1
  353. package/build-types/border-box-control/border-box-control/hook.d.ts +67 -57
  354. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  355. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +68 -59
  356. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  357. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +67 -57
  358. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  359. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +67 -57
  360. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  361. package/build-types/border-box-control/stories/index.story.d.ts +1 -1
  362. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  363. package/build-types/border-control/border-control/component.d.ts +1 -0
  364. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  365. package/build-types/border-control/border-control/hook.d.ts +68 -57
  366. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  367. package/build-types/border-control/border-control-dropdown/hook.d.ts +67 -57
  368. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  369. package/build-types/border-control/border-control-style-picker/component.d.ts +1 -1
  370. package/build-types/border-control/stories/index.story.d.ts +12 -6
  371. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  372. package/build-types/border-control/types.d.ts +4 -0
  373. package/build-types/border-control/types.d.ts.map +1 -1
  374. package/build-types/box-control/all-input-control.d.ts +1 -1
  375. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  376. package/build-types/box-control/axial-input-controls.d.ts +1 -1
  377. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  378. package/build-types/box-control/icon.d.ts +1 -1
  379. package/build-types/box-control/icon.d.ts.map +1 -1
  380. package/build-types/box-control/index.d.ts +1 -1
  381. package/build-types/box-control/index.d.ts.map +1 -1
  382. package/build-types/box-control/input-controls.d.ts +1 -1
  383. package/build-types/box-control/input-controls.d.ts.map +1 -1
  384. package/build-types/box-control/linked-button.d.ts +1 -1
  385. package/build-types/box-control/linked-button.d.ts.map +1 -1
  386. package/build-types/box-control/stories/index.story.d.ts +427 -378
  387. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  388. package/build-types/box-control/styles/box-control-icon-styles.d.ts +6 -6
  389. package/build-types/box-control/styles/box-control-styles.d.ts +5 -5
  390. package/build-types/button/deprecated.d.ts +5 -51
  391. package/build-types/button/deprecated.d.ts.map +1 -1
  392. package/build-types/button/index.d.ts +1 -1
  393. package/build-types/button/index.d.ts.map +1 -1
  394. package/build-types/button/stories/index.story.d.ts +1 -1
  395. package/build-types/button/stories/index.story.d.ts.map +1 -1
  396. package/build-types/button-group/index.d.ts +1 -1
  397. package/build-types/button-group/index.d.ts.map +1 -1
  398. package/build-types/card/card/hook.d.ts +67 -57
  399. package/build-types/card/card/hook.d.ts.map +1 -1
  400. package/build-types/card/card-body/hook.d.ts +67 -57
  401. package/build-types/card/card-body/hook.d.ts.map +1 -1
  402. package/build-types/card/card-divider/hook.d.ts +67 -57
  403. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  404. package/build-types/card/card-footer/hook.d.ts +67 -57
  405. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  406. package/build-types/card/card-header/hook.d.ts +67 -57
  407. package/build-types/card/card-header/hook.d.ts.map +1 -1
  408. package/build-types/card/card-media/hook.d.ts +67 -57
  409. package/build-types/card/card-media/hook.d.ts.map +1 -1
  410. package/build-types/card/stories/index.story.d.ts +2 -2
  411. package/build-types/checkbox-control/index.d.ts +1 -1
  412. package/build-types/checkbox-control/index.d.ts.map +1 -1
  413. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +2 -2
  414. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  415. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +1 -1
  416. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
  417. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +1 -1
  418. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  419. package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -1
  420. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  421. package/build-types/clipboard-button/index.d.ts +1 -1
  422. package/build-types/clipboard-button/index.d.ts.map +1 -1
  423. package/build-types/color-indicator/index.d.ts +1 -1
  424. package/build-types/color-indicator/index.d.ts.map +1 -1
  425. package/build-types/color-palette/index.d.ts +1 -1
  426. package/build-types/color-palette/index.d.ts.map +1 -1
  427. package/build-types/color-palette/styles.d.ts +1 -1
  428. package/build-types/color-picker/color-copy-button.d.ts +1 -1
  429. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  430. package/build-types/color-picker/color-input.d.ts +1 -1
  431. package/build-types/color-picker/color-input.d.ts.map +1 -1
  432. package/build-types/color-picker/component.d.ts +2 -2
  433. package/build-types/color-picker/component.d.ts.map +1 -1
  434. package/build-types/color-picker/hex-input.d.ts +1 -1
  435. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  436. package/build-types/color-picker/hsl-input.d.ts +1 -1
  437. package/build-types/color-picker/hsl-input.d.ts.map +1 -1
  438. package/build-types/color-picker/input-with-slider.d.ts +1 -1
  439. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  440. package/build-types/color-picker/legacy-adapter.d.ts +1 -1
  441. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
  442. package/build-types/color-picker/picker.d.ts +1 -1
  443. package/build-types/color-picker/picker.d.ts.map +1 -1
  444. package/build-types/color-picker/rgb-input.d.ts +1 -1
  445. package/build-types/color-picker/rgb-input.d.ts.map +1 -1
  446. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  447. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  448. package/build-types/color-picker/styles.d.ts +6 -6
  449. package/build-types/combobox-control/index.d.ts +3 -1
  450. package/build-types/combobox-control/index.d.ts.map +1 -1
  451. package/build-types/combobox-control/stories/index.story.d.ts +22 -2
  452. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  453. package/build-types/combobox-control/styles.d.ts +1 -1
  454. package/build-types/combobox-control/types.d.ts +1 -0
  455. package/build-types/combobox-control/types.d.ts.map +1 -1
  456. package/build-types/composite/current/stories/utils.d.ts +1 -1
  457. package/build-types/composite/current/stories/utils.d.ts.map +1 -1
  458. package/build-types/composite/legacy/stories/utils.d.ts +1 -1
  459. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  460. package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
  461. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  462. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +2 -2
  463. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  464. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +1 -1
  465. package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
  466. package/build-types/custom-gradient-picker/index.d.ts +1 -1
  467. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  468. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
  469. package/build-types/custom-select-control/index.d.ts +2 -2
  470. package/build-types/custom-select-control/index.d.ts.map +1 -1
  471. package/build-types/custom-select-control-v2/custom-select.d.ts +1 -1
  472. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  473. package/build-types/custom-select-control-v2/default-component/index.d.ts +1 -1
  474. package/build-types/custom-select-control-v2/default-component/index.d.ts.map +1 -1
  475. package/build-types/custom-select-control-v2/item.d.ts +1 -1
  476. package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
  477. package/build-types/custom-select-control-v2/legacy-component/index.d.ts +1 -1
  478. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
  479. package/build-types/custom-select-control-v2/stories/default.story.d.ts +3 -3
  480. package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
  481. package/build-types/custom-select-control-v2/styles.d.ts +8 -8
  482. package/build-types/dashicon/index.d.ts +1 -1
  483. package/build-types/dashicon/index.d.ts.map +1 -1
  484. package/build-types/date-time/date/index.d.ts +1 -1
  485. package/build-types/date-time/date/index.d.ts.map +1 -1
  486. package/build-types/date-time/date/styles.d.ts +5 -5
  487. package/build-types/date-time/date-time/styles.d.ts +1 -1
  488. package/build-types/date-time/time/index.d.ts +1 -1
  489. package/build-types/date-time/time/index.d.ts.map +1 -1
  490. package/build-types/date-time/time/styles.d.ts +10 -10
  491. package/build-types/date-time/time/timezone.d.ts +1 -1
  492. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  493. package/build-types/dimension-control/index.d.ts +1 -1
  494. package/build-types/dimension-control/index.d.ts.map +1 -1
  495. package/build-types/disabled/index.d.ts +1 -1
  496. package/build-types/disabled/index.d.ts.map +1 -1
  497. package/build-types/disclosure/index.d.ts +1 -1
  498. package/build-types/disclosure/index.d.ts.map +1 -1
  499. package/build-types/divider/styles.d.ts +1 -1
  500. package/build-types/draggable/index.d.ts +1 -1
  501. package/build-types/draggable/index.d.ts.map +1 -1
  502. package/build-types/drop-zone/index.d.ts +1 -1
  503. package/build-types/drop-zone/index.d.ts.map +1 -1
  504. package/build-types/drop-zone/stories/index.story.d.ts +1 -1
  505. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  506. package/build-types/dropdown/index.d.ts +1 -1
  507. package/build-types/dropdown/index.d.ts.map +1 -1
  508. package/build-types/dropdown/stories/index.story.d.ts +4 -4
  509. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  510. package/build-types/dropdown/styles.d.ts +1 -1
  511. package/build-types/dropdown-menu/index.d.ts +1 -1
  512. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  513. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  514. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  515. package/build-types/dropdown-menu-v2/index.d.ts +7 -7
  516. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  517. package/build-types/dropdown-menu-v2/styles.d.ts +12 -12
  518. package/build-types/duotone-picker/color-list-picker/index.d.ts +1 -1
  519. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  520. package/build-types/duotone-picker/custom-duotone-bar.d.ts +1 -1
  521. package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
  522. package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
  523. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  524. package/build-types/duotone-picker/duotone-swatch.d.ts +1 -1
  525. package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
  526. package/build-types/elevation/hook.d.ts +66 -56
  527. package/build-types/elevation/hook.d.ts.map +1 -1
  528. package/build-types/flex/flex/hook.d.ts +67 -57
  529. package/build-types/flex/flex/hook.d.ts.map +1 -1
  530. package/build-types/flex/flex-block/hook.d.ts +67 -57
  531. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  532. package/build-types/flex/flex-item/hook.d.ts +67 -57
  533. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  534. package/build-types/focal-point-picker/controls.d.ts +1 -1
  535. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  536. package/build-types/focal-point-picker/focal-point.d.ts +1 -1
  537. package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
  538. package/build-types/focal-point-picker/grid.d.ts +1 -1
  539. package/build-types/focal-point-picker/grid.d.ts.map +1 -1
  540. package/build-types/focal-point-picker/index.d.ts +1 -1
  541. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  542. package/build-types/focal-point-picker/media.d.ts +1 -1
  543. package/build-types/focal-point-picker/media.d.ts.map +1 -1
  544. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -8
  545. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  546. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +9 -9
  547. package/build-types/focal-point-picker/styles/focal-point-style.d.ts +1 -1
  548. package/build-types/focal-point-picker/test/index.d.ts +2 -0
  549. package/build-types/focal-point-picker/test/index.d.ts.map +1 -0
  550. package/build-types/focal-point-picker/test/media.d.ts +2 -0
  551. package/build-types/focal-point-picker/test/media.d.ts.map +1 -0
  552. package/build-types/focusable-iframe/index.d.ts +1 -1
  553. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  554. package/build-types/font-size-picker/font-size-picker-select.d.ts +1 -1
  555. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  556. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +1 -1
  557. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  558. package/build-types/font-size-picker/styles.d.ts +4 -4
  559. package/build-types/form-file-upload/index.d.ts +1 -1
  560. package/build-types/form-file-upload/index.d.ts.map +1 -1
  561. package/build-types/form-file-upload/stories/index.story.d.ts +5 -5
  562. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  563. package/build-types/form-toggle/index.d.ts +2 -2
  564. package/build-types/form-toggle/index.d.ts.map +1 -1
  565. package/build-types/form-token-field/index.d.ts +1 -1
  566. package/build-types/form-token-field/index.d.ts.map +1 -1
  567. package/build-types/form-token-field/styles.d.ts +1 -1
  568. package/build-types/form-token-field/suggestions-list.d.ts +2 -1
  569. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  570. package/build-types/form-token-field/token-input.d.ts +2 -2
  571. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  572. package/build-types/form-token-field/token.d.ts +1 -1
  573. package/build-types/form-token-field/token.d.ts.map +1 -1
  574. package/build-types/gradient-picker/index.d.ts +1 -1
  575. package/build-types/gradient-picker/index.d.ts.map +1 -1
  576. package/build-types/grid/hook.d.ts +67 -57
  577. package/build-types/grid/hook.d.ts.map +1 -1
  578. package/build-types/guide/icons.d.ts +1 -1
  579. package/build-types/guide/icons.d.ts.map +1 -1
  580. package/build-types/guide/index.d.ts +1 -1
  581. package/build-types/guide/index.d.ts.map +1 -1
  582. package/build-types/guide/page-control.d.ts +1 -1
  583. package/build-types/guide/page-control.d.ts.map +1 -1
  584. package/build-types/guide/page.d.ts +1 -1
  585. package/build-types/guide/page.d.ts.map +1 -1
  586. package/build-types/h-stack/hook.d.ts +67 -57
  587. package/build-types/h-stack/hook.d.ts.map +1 -1
  588. package/build-types/heading/hook.d.ts +67 -57
  589. package/build-types/heading/hook.d.ts.map +1 -1
  590. package/build-types/higher-order/navigate-regions/index.d.ts +1 -1
  591. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +1 -1
  592. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
  593. package/build-types/higher-order/with-fallback-styles/index.d.ts +1 -1
  594. package/build-types/higher-order/with-filters/index.d.ts +2 -2
  595. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -1
  596. package/build-types/higher-order/with-notices/index.d.ts +2 -2
  597. package/build-types/higher-order/with-spoken-messages/index.d.ts +1 -1
  598. package/build-types/icon/index.d.ts +1 -1
  599. package/build-types/icon/index.d.ts.map +1 -1
  600. package/build-types/input-control/backdrop.d.ts +1 -1
  601. package/build-types/input-control/backdrop.d.ts.map +1 -1
  602. package/build-types/input-control/index.d.ts +1 -1
  603. package/build-types/input-control/index.d.ts.map +1 -1
  604. package/build-types/input-control/input-base.d.ts +1 -1
  605. package/build-types/input-control/input-base.d.ts.map +1 -1
  606. package/build-types/input-control/input-field.d.ts +1 -1
  607. package/build-types/input-control/input-field.d.ts.map +1 -1
  608. package/build-types/input-control/label.d.ts +1 -1
  609. package/build-types/input-control/label.d.ts.map +1 -1
  610. package/build-types/input-control/styles/input-control-styles.d.ts +8 -8
  611. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  612. package/build-types/isolated-event-container/index.d.ts +1 -1
  613. package/build-types/isolated-event-container/index.d.ts.map +1 -1
  614. package/build-types/item-group/item/hook.d.ts +67 -57
  615. package/build-types/item-group/item/hook.d.ts.map +1 -1
  616. package/build-types/item-group/item-group/hook.d.ts +67 -57
  617. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  618. package/build-types/keyboard-shortcuts/index.d.ts +1 -1
  619. package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
  620. package/build-types/menu-group/index.d.ts +1 -1
  621. package/build-types/menu-group/index.d.ts.map +1 -1
  622. package/build-types/menu-item/index.d.ts +1 -1
  623. package/build-types/menu-item/index.d.ts.map +1 -1
  624. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  625. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  626. package/build-types/menu-items-choice/index.d.ts +1 -1
  627. package/build-types/menu-items-choice/index.d.ts.map +1 -1
  628. package/build-types/navigable-container/container.d.ts +1 -1
  629. package/build-types/navigable-container/menu.d.ts +2 -2
  630. package/build-types/navigable-container/menu.d.ts.map +1 -1
  631. package/build-types/navigable-container/tabbable.d.ts +2 -2
  632. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  633. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  634. package/build-types/navigation/group/index.d.ts +1 -1
  635. package/build-types/navigation/group/index.d.ts.map +1 -1
  636. package/build-types/navigation/index.d.ts +1 -1
  637. package/build-types/navigation/index.d.ts.map +1 -1
  638. package/build-types/navigation/item/base-content.d.ts +1 -1
  639. package/build-types/navigation/item/base-content.d.ts.map +1 -1
  640. package/build-types/navigation/item/base.d.ts +1 -1
  641. package/build-types/navigation/item/base.d.ts.map +1 -1
  642. package/build-types/navigation/item/index.d.ts +1 -1
  643. package/build-types/navigation/item/index.d.ts.map +1 -1
  644. package/build-types/navigation/menu/index.d.ts +1 -1
  645. package/build-types/navigation/menu/index.d.ts.map +1 -1
  646. package/build-types/navigation/menu/menu-title-search.d.ts +1 -1
  647. package/build-types/navigation/menu/menu-title.d.ts +1 -1
  648. package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
  649. package/build-types/navigation/menu/search-no-results-found.d.ts +1 -1
  650. package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
  651. package/build-types/navigation/styles/navigation-styles.d.ts +11 -11
  652. package/build-types/navigator/navigator-back-button/hook.d.ts +68 -59
  653. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  654. package/build-types/navigator/navigator-button/hook.d.ts +68 -59
  655. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  656. package/build-types/notice/index.d.ts +1 -1
  657. package/build-types/notice/index.d.ts.map +1 -1
  658. package/build-types/notice/list.d.ts +1 -1
  659. package/build-types/notice/list.d.ts.map +1 -1
  660. package/build-types/number-control/index.d.ts +1 -1
  661. package/build-types/number-control/index.d.ts.map +1 -1
  662. package/build-types/number-control/stories/index.story.d.ts +1 -1
  663. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  664. package/build-types/palette-edit/index.d.ts +1 -1
  665. package/build-types/palette-edit/index.d.ts.map +1 -1
  666. package/build-types/palette-edit/styles.d.ts +1007 -756
  667. package/build-types/palette-edit/styles.d.ts.map +1 -1
  668. package/build-types/panel/body.d.ts +1 -1
  669. package/build-types/panel/body.d.ts.map +1 -1
  670. package/build-types/panel/header.d.ts +1 -1
  671. package/build-types/panel/header.d.ts.map +1 -1
  672. package/build-types/placeholder/index.d.ts +1 -1
  673. package/build-types/placeholder/index.d.ts.map +1 -1
  674. package/build-types/popover/index.d.ts +1 -1
  675. package/build-types/popover/index.d.ts.map +1 -1
  676. package/build-types/popover/stories/e2e/index.story.d.ts +2 -2
  677. package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
  678. package/build-types/popover/test/utils/index.d.ts +1 -1
  679. package/build-types/popover/test/utils/index.d.ts.map +1 -1
  680. package/build-types/progress-bar/index.d.ts +1 -1
  681. package/build-types/progress-bar/index.d.ts.map +1 -1
  682. package/build-types/progress-bar/styles.d.ts +3 -3
  683. package/build-types/query-controls/author-select.d.ts +1 -1
  684. package/build-types/query-controls/author-select.d.ts.map +1 -1
  685. package/build-types/query-controls/category-select.d.ts +1 -1
  686. package/build-types/query-controls/category-select.d.ts.map +1 -1
  687. package/build-types/query-controls/index.d.ts +1 -1
  688. package/build-types/query-controls/index.d.ts.map +1 -1
  689. package/build-types/radio-control/index.d.ts +1 -1
  690. package/build-types/radio-control/index.d.ts.map +1 -1
  691. package/build-types/radio-group/index.d.ts +1 -1
  692. package/build-types/radio-group/index.d.ts.map +1 -1
  693. package/build-types/radio-group/radio.d.ts +1 -1
  694. package/build-types/radio-group/radio.d.ts.map +1 -1
  695. package/build-types/range-control/index.d.ts +1 -1
  696. package/build-types/range-control/index.d.ts.map +1 -1
  697. package/build-types/range-control/input-range.d.ts +1 -1
  698. package/build-types/range-control/mark.d.ts +1 -1
  699. package/build-types/range-control/mark.d.ts.map +1 -1
  700. package/build-types/range-control/rail.d.ts +1 -1
  701. package/build-types/range-control/rail.d.ts.map +1 -1
  702. package/build-types/range-control/styles/range-control-styles.d.ts +15 -15
  703. package/build-types/range-control/tooltip.d.ts +1 -1
  704. package/build-types/range-control/tooltip.d.ts.map +1 -1
  705. package/build-types/resizable-box/index.d.ts +3 -3
  706. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  707. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  708. package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
  709. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  710. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +4 -4
  711. package/build-types/resizable-box/stories/index.story.d.ts +6 -6
  712. package/build-types/responsive-wrapper/index.d.ts +1 -1
  713. package/build-types/responsive-wrapper/index.d.ts.map +1 -1
  714. package/build-types/sandbox/index.d.ts +1 -1
  715. package/build-types/sandbox/index.d.ts.map +1 -1
  716. package/build-types/scrollable/hook.d.ts +67 -57
  717. package/build-types/scrollable/hook.d.ts.map +1 -1
  718. package/build-types/search-control/index.d.ts.map +1 -1
  719. package/build-types/search-control/styles.d.ts +1 -1
  720. package/build-types/select-control/chevron-down.d.ts +1 -1
  721. package/build-types/select-control/chevron-down.d.ts.map +1 -1
  722. package/build-types/select-control/styles/select-control-styles.d.ts +3 -3
  723. package/build-types/shortcut/index.d.ts +1 -1
  724. package/build-types/shortcut/index.d.ts.map +1 -1
  725. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +1 -1
  726. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  727. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
  728. package/build-types/slot-fill/index.d.ts +7 -7
  729. package/build-types/slot-fill/index.d.ts.map +1 -1
  730. package/build-types/slot-fill/provider.d.ts +1 -1
  731. package/build-types/slot-fill/provider.d.ts.map +1 -1
  732. package/build-types/slot-fill/slot.d.ts +1 -1
  733. package/build-types/slot-fill/slot.d.ts.map +1 -1
  734. package/build-types/snackbar/index.d.ts +2 -2
  735. package/build-types/snackbar/index.d.ts.map +1 -1
  736. package/build-types/snackbar/list.d.ts +1 -1
  737. package/build-types/snackbar/list.d.ts.map +1 -1
  738. package/build-types/spacer/hook.d.ts +67 -57
  739. package/build-types/spacer/hook.d.ts.map +1 -1
  740. package/build-types/spinner/index.d.ts +2 -2
  741. package/build-types/spinner/index.d.ts.map +1 -1
  742. package/build-types/spinner/styles.d.ts +3 -3
  743. package/build-types/style-provider/index.d.ts +1 -1
  744. package/build-types/style-provider/index.d.ts.map +1 -1
  745. package/build-types/surface/hook.d.ts +67 -57
  746. package/build-types/surface/hook.d.ts.map +1 -1
  747. package/build-types/tab-panel/index.d.ts +1 -1
  748. package/build-types/tab-panel/index.d.ts.map +1 -1
  749. package/build-types/tab-panel/stories/index.story.d.ts +4 -4
  750. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  751. package/build-types/tabs/index.d.ts +2 -2
  752. package/build-types/tabs/index.d.ts.map +1 -1
  753. package/build-types/tabs/styles.d.ts +3 -3
  754. package/build-types/tabs/tablist.d.ts +1 -1
  755. package/build-types/tabs/tablist.d.ts.map +1 -1
  756. package/build-types/text/hook.d.ts +66 -57
  757. package/build-types/text/hook.d.ts.map +1 -1
  758. package/build-types/text/stories/index.story.d.ts +3 -3
  759. package/build-types/text-control/index.d.ts +3 -3
  760. package/build-types/text-control/index.d.ts.map +1 -1
  761. package/build-types/text-highlight/index.d.ts +1 -1
  762. package/build-types/text-highlight/index.d.ts.map +1 -1
  763. package/build-types/textarea-control/index.d.ts +2 -2
  764. package/build-types/textarea-control/index.d.ts.map +1 -1
  765. package/build-types/textarea-control/styles/textarea-control-styles.d.ts +1 -1
  766. package/build-types/theme/index.d.ts +1 -1
  767. package/build-types/theme/index.d.ts.map +1 -1
  768. package/build-types/theme/stories/index.story.d.ts +1 -1
  769. package/build-types/theme/styles.d.ts +1 -1
  770. package/build-types/tip/index.d.ts +1 -1
  771. package/build-types/tip/index.d.ts.map +1 -1
  772. package/build-types/toggle-control/index.d.ts +2 -2
  773. package/build-types/toggle-control/index.d.ts.map +1 -1
  774. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  775. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  776. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
  777. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  778. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
  779. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  780. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +1 -1
  781. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  782. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  783. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -1
  784. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  785. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +2 -2
  786. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  787. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
  788. package/build-types/toolbar/stories/index.story.d.ts +3 -3
  789. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  790. package/build-types/toolbar/toolbar/index.d.ts +1 -1
  791. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  792. package/build-types/toolbar/toolbar/toolbar-container.d.ts +1 -1
  793. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  794. package/build-types/toolbar/toolbar-button/index.d.ts +5 -51
  795. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  796. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +1 -1
  797. package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
  798. package/build-types/toolbar/toolbar-group/index.d.ts +1 -1
  799. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  800. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +1 -1
  801. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  802. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -1
  803. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  804. package/build-types/tools-panel/styles.d.ts +1 -1
  805. package/build-types/tools-panel/tools-panel/hook.d.ts +69 -59
  806. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  807. package/build-types/tools-panel/tools-panel-header/hook.d.ts +68 -58
  808. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  809. package/build-types/tools-panel/tools-panel-item/hook.d.ts +67 -57
  810. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  811. package/build-types/tools-panel/types.d.ts +1 -1
  812. package/build-types/tools-panel/types.d.ts.map +1 -1
  813. package/build-types/tree-grid/index.d.ts +1 -1
  814. package/build-types/tree-grid/index.d.ts.map +1 -1
  815. package/build-types/tree-grid/item.d.ts +1 -1
  816. package/build-types/tree-grid/item.d.ts.map +1 -1
  817. package/build-types/tree-grid/roving-tab-index-item.d.ts +1 -1
  818. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  819. package/build-types/tree-grid/roving-tab-index.d.ts +1 -1
  820. package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
  821. package/build-types/tree-grid/row.d.ts +1 -1
  822. package/build-types/tree-grid/row.d.ts.map +1 -1
  823. package/build-types/tree-grid/stories/index.story.d.ts +1 -1
  824. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  825. package/build-types/tree-select/index.d.ts +1 -1
  826. package/build-types/tree-select/index.d.ts.map +1 -1
  827. package/build-types/truncate/hook.d.ts +67 -57
  828. package/build-types/truncate/hook.d.ts.map +1 -1
  829. package/build-types/unit-control/index.d.ts +1 -1
  830. package/build-types/unit-control/index.d.ts.map +1 -1
  831. package/build-types/unit-control/styles/unit-control-styles.d.ts +3 -3
  832. package/build-types/unit-control/unit-select-control.d.ts +1 -1
  833. package/build-types/v-stack/hook.d.ts +67 -57
  834. package/build-types/v-stack/hook.d.ts.map +1 -1
  835. package/build-types/v-stack/stories/index.story.d.ts +1 -1
  836. package/build-types/view/component.d.ts +251 -249
  837. package/build-types/view/component.d.ts.map +1 -1
  838. package/build-types/z-stack/styles.d.ts +2 -2
  839. package/package.json +22 -22
  840. package/src/alignment-matrix-control/icon.tsx +2 -2
  841. package/src/alignment-matrix-control/index.tsx +2 -5
  842. package/src/angle-picker-control/index.tsx +2 -2
  843. package/src/animate/index.tsx +4 -7
  844. package/src/autocomplete/autocompleter-ui.tsx +2 -2
  845. package/src/base-control/README.md +1 -1
  846. package/src/base-control/hooks.ts +1 -5
  847. package/src/base-control/index.tsx +2 -5
  848. package/src/base-control/test/index.tsx +3 -3
  849. package/src/base-control/types.ts +1 -2
  850. package/src/border-control/types.ts +4 -0
  851. package/src/button/index.tsx +2 -2
  852. package/src/button/style.scss +4 -6
  853. package/src/button-group/index.tsx +2 -2
  854. package/src/checkbox-control/index.tsx +2 -2
  855. package/src/circular-option-picker/circular-option-picker-actions.tsx +3 -3
  856. package/src/circular-option-picker/circular-option-picker-option-group.tsx +2 -2
  857. package/src/circular-option-picker/circular-option-picker-option.tsx +2 -2
  858. package/src/circular-option-picker/circular-option-picker.tsx +2 -5
  859. package/src/circular-option-picker/style.scss +1 -2
  860. package/src/clipboard-button/index.tsx +2 -2
  861. package/src/color-indicator/index.tsx +2 -2
  862. package/src/color-palette/index.tsx +2 -2
  863. package/src/combobox-control/README.md +1 -1
  864. package/src/combobox-control/index.tsx +8 -5
  865. package/src/combobox-control/stories/index.story.tsx +28 -0
  866. package/src/combobox-control/types.ts +1 -0
  867. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +3 -3
  868. package/src/custom-gradient-picker/gradient-bar/index.tsx +2 -2
  869. package/src/custom-gradient-picker/index.tsx +2 -2
  870. package/src/custom-select-control/index.js +3 -6
  871. package/src/dimension-control/index.tsx +2 -5
  872. package/src/drop-zone/index.tsx +2 -2
  873. package/src/dropdown/index.tsx +2 -2
  874. package/src/dropdown-menu/index.native.js +6 -12
  875. package/src/dropdown-menu/index.tsx +9 -16
  876. package/src/external-link/index.tsx +2 -2
  877. package/src/focal-point-picker/focal-point.tsx +2 -4
  878. package/src/focal-point-picker/index.tsx +2 -5
  879. package/src/focal-point-picker/test/{index.js → index.tsx} +44 -17
  880. package/src/focal-point-picker/test/{media.js → media.tsx} +18 -13
  881. package/src/form-toggle/index.tsx +2 -2
  882. package/src/form-token-field/index.tsx +10 -8
  883. package/src/form-token-field/style.scss +9 -0
  884. package/src/form-token-field/suggestions-list.tsx +16 -10
  885. package/src/form-token-field/token-input.tsx +2 -2
  886. package/src/form-token-field/token.tsx +2 -2
  887. package/src/guide/index.tsx +2 -2
  888. package/src/input-control/index.tsx +3 -6
  889. package/src/input-control/test/index.js +2 -2
  890. package/src/menu-group/index.tsx +2 -2
  891. package/src/menu-item/index.tsx +3 -3
  892. package/src/mobile/color-settings/utils.native.js +1 -1
  893. package/src/modal/index.tsx +4 -4
  894. package/src/navigation/back-button/index.tsx +2 -5
  895. package/src/navigation/group/index.tsx +2 -2
  896. package/src/navigation/index.tsx +3 -3
  897. package/src/navigation/item/base.tsx +2 -2
  898. package/src/navigation/item/index.tsx +2 -2
  899. package/src/navigation/menu/index.tsx +2 -2
  900. package/src/notice/index.tsx +5 -10
  901. package/src/notice/list.tsx +2 -2
  902. package/src/number-control/index.tsx +2 -2
  903. package/src/palette-edit/index.tsx +10 -8
  904. package/src/palette-edit/styles.ts +2 -3
  905. package/src/panel/body.tsx +2 -2
  906. package/src/panel/index.tsx +2 -2
  907. package/src/panel/row.tsx +2 -2
  908. package/src/placeholder/index.tsx +3 -3
  909. package/src/placeholder/style.scss +1 -2
  910. package/src/popover/index.tsx +2 -2
  911. package/src/radio-control/index.tsx +2 -2
  912. package/src/range-control/index.tsx +3 -3
  913. package/src/range-control/mark.tsx +3 -3
  914. package/src/range-control/tooltip.tsx +2 -2
  915. package/src/resizable-box/index.tsx +10 -10
  916. package/src/resizable-box/resize-tooltip/index.tsx +2 -2
  917. package/src/responsive-wrapper/index.tsx +2 -2
  918. package/src/search-control/index.tsx +2 -5
  919. package/src/select-control/index.tsx +2 -2
  920. package/src/snackbar/index.tsx +5 -8
  921. package/src/snackbar/list.tsx +2 -2
  922. package/src/spinner/index.tsx +2 -2
  923. package/src/tab-panel/index.tsx +2 -2
  924. package/src/text-control/index.tsx +2 -2
  925. package/src/theme/stories/index.story.tsx +1 -1
  926. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +0 -2
  927. package/src/toolbar/toolbar/index.tsx +2 -2
  928. package/src/toolbar/toolbar/style.scss +0 -12
  929. package/src/toolbar/toolbar-button/index.tsx +3 -3
  930. package/src/toolbar/toolbar-group/index.tsx +2 -2
  931. package/src/tools-panel/tools-panel/hook.ts +9 -6
  932. package/src/tools-panel/tools-panel-item/hook.ts +12 -8
  933. package/src/tools-panel/types.ts +1 -0
  934. package/src/truncate/hook.ts +1 -1
  935. package/src/unit-control/index.tsx +2 -2
  936. package/src/unit-control/unit-select-control.tsx +2 -2
  937. package/src/utils/theme-variables.scss +4 -0
  938. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useReducedMotion","useMergeRefs","forwardRef","useRef","chevronUp","chevronDown","Button","Icon","useControlledState","useUpdateEffect","noop","UnforwardedPanelBody","props","ref","buttonProps","children","className","icon","initialOpen","onToggle","opened","title","scrollAfterOpen","isOpened","setIsOpened","initial","undefined","fallback","nodeRef","scrollBehavior","handleOnToggle","event","preventDefault","next","scrollAfterOpenRef","current","scrollIntoView","inline","block","behavior","classes","createElement","PanelBodyTitle","Boolean","onClick","size","PanelBody"],"sources":["@wordpress/components/src/panel/body.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { chevronUp, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { PanelBodyProps, PanelBodyTitleProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { useControlledState, useUpdateEffect } from '../utils';\n\nconst noop = () => {};\n\nexport function UnforwardedPanelBody(\n\tprops: PanelBodyProps,\n\tref: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbuttonProps = {},\n\t\tchildren,\n\t\tclassName,\n\t\ticon,\n\t\tinitialOpen,\n\t\tonToggle = noop,\n\t\topened,\n\t\ttitle,\n\t\tscrollAfterOpen = true,\n\t} = props;\n\tconst [ isOpened, setIsOpened ] = useControlledState< boolean | undefined >(\n\t\topened,\n\t\t{\n\t\t\tinitial: initialOpen === undefined ? true : initialOpen,\n\t\t\tfallback: false,\n\t\t}\n\t);\n\tconst nodeRef = useRef< HTMLElement >( null );\n\n\t// Defaults to 'smooth' scrolling\n\t// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\n\tconst scrollBehavior = useReducedMotion() ? 'auto' : 'smooth';\n\n\tconst handleOnToggle = ( event: React.MouseEvent ) => {\n\t\tevent.preventDefault();\n\t\tconst next = ! isOpened;\n\t\tsetIsOpened( next );\n\t\tonToggle( next );\n\t};\n\n\t// Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.\n\tconst scrollAfterOpenRef = useRef< boolean | undefined >();\n\tscrollAfterOpenRef.current = scrollAfterOpen;\n\t// Runs after initial render.\n\tuseUpdateEffect( () => {\n\t\tif (\n\t\t\tisOpened &&\n\t\t\tscrollAfterOpenRef.current &&\n\t\t\tnodeRef.current?.scrollIntoView\n\t\t) {\n\t\t\t/*\n\t\t\t * Scrolls the content into view when visible.\n\t\t\t * This improves the UX when there are multiple stacking <PanelBody />\n\t\t\t * components in a scrollable container.\n\t\t\t */\n\t\t\tnodeRef.current.scrollIntoView( {\n\t\t\t\tinline: 'nearest',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tbehavior: scrollBehavior,\n\t\t\t} );\n\t\t}\n\t}, [ isOpened, scrollBehavior ] );\n\n\tconst classes = classnames( 'components-panel__body', className, {\n\t\t'is-opened': isOpened,\n\t} );\n\n\treturn (\n\t\t<div className={ classes } ref={ useMergeRefs( [ nodeRef, ref ] ) }>\n\t\t\t<PanelBodyTitle\n\t\t\t\ticon={ icon }\n\t\t\t\tisOpened={ Boolean( isOpened ) }\n\t\t\t\tonClick={ handleOnToggle }\n\t\t\t\ttitle={ title }\n\t\t\t\t{ ...buttonProps }\n\t\t\t/>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( { opened: Boolean( isOpened ) } )\n\t\t\t\t: isOpened && children }\n\t\t</div>\n\t);\n}\n\nconst PanelBodyTitle = forwardRef(\n\t(\n\t\t{\n\t\t\tisOpened,\n\t\t\ticon,\n\t\t\ttitle,\n\t\t\t...props\n\t\t}: WordPressComponentProps< PanelBodyTitleProps, 'button' >,\n\t\tref: React.ForwardedRef< any >\n\t) => {\n\t\tif ( ! title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<h2 className=\"components-panel__body-title\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"components-panel__body-toggle\"\n\t\t\t\t\taria-expanded={ isOpened }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ /*\n\t\t\t\t\tFirefox + NVDA don't announce aria-expanded because the browser\n\t\t\t\t\trepaints the whole element, so this wrapping span hides that.\n\t\t\t\t*/ }\n\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"components-panel__arrow\"\n\t\t\t\t\t\t\ticon={ isOpened ? chevronUp : chevronDown }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ title }\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tclassName=\"components-panel__icon\"\n\t\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</h2>\n\t\t);\n\t}\n);\n\nexport const PanelBody = forwardRef( UnforwardedPanelBody );\n\nexport default PanelBody;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,YAAY,QAAQ,oBAAoB;AACnE,SAASC,UAAU,EAAEC,MAAM,QAAQ,oBAAoB;AACvD,SAASC,SAAS,EAAEC,WAAW,QAAQ,kBAAkB;;AAEzD;AACA;AACA;;AAGA,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,IAAI,MAAM,SAAS;AAC1B,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,UAAU;AAE9D,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,OAAO,SAASC,oBAAoBA,CACnCC,KAAqB,EACrBC,GAAyC,EACxC;EACD,MAAM;IACLC,WAAW,GAAG,CAAC,CAAC;IAChBC,Q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","useMergeRefs","forwardRef","useRef","chevronUp","chevronDown","Button","Icon","useControlledState","useUpdateEffect","noop","UnforwardedPanelBody","props","ref","buttonProps","children","className","icon","initialOpen","onToggle","opened","title","scrollAfterOpen","isOpened","setIsOpened","initial","undefined","fallback","nodeRef","scrollBehavior","handleOnToggle","event","preventDefault","next","scrollAfterOpenRef","current","scrollIntoView","inline","block","behavior","classes","createElement","PanelBodyTitle","Boolean","onClick","size","PanelBody"],"sources":["@wordpress/components/src/panel/body.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { chevronUp, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { PanelBodyProps, PanelBodyTitleProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { useControlledState, useUpdateEffect } from '../utils';\n\nconst noop = () => {};\n\nexport function UnforwardedPanelBody(\n\tprops: PanelBodyProps,\n\tref: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbuttonProps = {},\n\t\tchildren,\n\t\tclassName,\n\t\ticon,\n\t\tinitialOpen,\n\t\tonToggle = noop,\n\t\topened,\n\t\ttitle,\n\t\tscrollAfterOpen = true,\n\t} = props;\n\tconst [ isOpened, setIsOpened ] = useControlledState< boolean | undefined >(\n\t\topened,\n\t\t{\n\t\t\tinitial: initialOpen === undefined ? true : initialOpen,\n\t\t\tfallback: false,\n\t\t}\n\t);\n\tconst nodeRef = useRef< HTMLElement >( null );\n\n\t// Defaults to 'smooth' scrolling\n\t// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\n\tconst scrollBehavior = useReducedMotion() ? 'auto' : 'smooth';\n\n\tconst handleOnToggle = ( event: React.MouseEvent ) => {\n\t\tevent.preventDefault();\n\t\tconst next = ! isOpened;\n\t\tsetIsOpened( next );\n\t\tonToggle( next );\n\t};\n\n\t// Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.\n\tconst scrollAfterOpenRef = useRef< boolean | undefined >();\n\tscrollAfterOpenRef.current = scrollAfterOpen;\n\t// Runs after initial render.\n\tuseUpdateEffect( () => {\n\t\tif (\n\t\t\tisOpened &&\n\t\t\tscrollAfterOpenRef.current &&\n\t\t\tnodeRef.current?.scrollIntoView\n\t\t) {\n\t\t\t/*\n\t\t\t * Scrolls the content into view when visible.\n\t\t\t * This improves the UX when there are multiple stacking <PanelBody />\n\t\t\t * components in a scrollable container.\n\t\t\t */\n\t\t\tnodeRef.current.scrollIntoView( {\n\t\t\t\tinline: 'nearest',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tbehavior: scrollBehavior,\n\t\t\t} );\n\t\t}\n\t}, [ isOpened, scrollBehavior ] );\n\n\tconst classes = clsx( 'components-panel__body', className, {\n\t\t'is-opened': isOpened,\n\t} );\n\n\treturn (\n\t\t<div className={ classes } ref={ useMergeRefs( [ nodeRef, ref ] ) }>\n\t\t\t<PanelBodyTitle\n\t\t\t\ticon={ icon }\n\t\t\t\tisOpened={ Boolean( isOpened ) }\n\t\t\t\tonClick={ handleOnToggle }\n\t\t\t\ttitle={ title }\n\t\t\t\t{ ...buttonProps }\n\t\t\t/>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( { opened: Boolean( isOpened ) } )\n\t\t\t\t: isOpened && children }\n\t\t</div>\n\t);\n}\n\nconst PanelBodyTitle = forwardRef(\n\t(\n\t\t{\n\t\t\tisOpened,\n\t\t\ticon,\n\t\t\ttitle,\n\t\t\t...props\n\t\t}: WordPressComponentProps< PanelBodyTitleProps, 'button' >,\n\t\tref: React.ForwardedRef< any >\n\t) => {\n\t\tif ( ! title ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<h2 className=\"components-panel__body-title\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"components-panel__body-toggle\"\n\t\t\t\t\taria-expanded={ isOpened }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ /*\n\t\t\t\t\tFirefox + NVDA don't announce aria-expanded because the browser\n\t\t\t\t\trepaints the whole element, so this wrapping span hides that.\n\t\t\t\t*/ }\n\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"components-panel__arrow\"\n\t\t\t\t\t\t\ticon={ isOpened ? chevronUp : chevronDown }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ title }\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tclassName=\"components-panel__icon\"\n\t\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</h2>\n\t\t);\n\t}\n);\n\nexport const PanelBody = forwardRef( UnforwardedPanelBody );\n\nexport default PanelBody;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,YAAY,QAAQ,oBAAoB;AACnE,SAASC,UAAU,EAAEC,MAAM,QAAQ,oBAAoB;AACvD,SAASC,SAAS,EAAEC,WAAW,QAAQ,kBAAkB;;AAEzD;AACA;AACA;;AAGA,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,IAAI,MAAM,SAAS;AAC1B,SAASC,kBAAkB,EAAEC,eAAe,QAAQ,UAAU;AAE9D,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,OAAO,SAASC,oBAAoBA,CACnCC,KAAqB,EACrBC,GAAyC,EACxC;EACD,MAAM;IACLC,WAAW,GAAG,CAAC,CAAC;IAChBC,QAAQ;IACRC,SAAS;IACTC,IAAI;IACJC,WAAW;IACXC,QAAQ,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B,OAAO,EAAEf,GAAG,CAAG;EAAG,GAClE4B,aAAA,CAACC,cAAc;IACdzB,IAAI,EAAGA,IAAM;IACbM,QAAQ,EAAGoB,OAAO,CAAEpB,QAAS,CAAG;IAChCqB,OAAO,EAAGd,cAAgB;IAC1BT,KAAK,EAAGA,KAAO;IAAA,GACVP;EAAW,CAChB,CAAC,EACA,OAAOC,QAAQ,KAAK,UAAU,GAC7BA,QAAQ,CAAE;IAAEK,MAAM,EAAEuB,OAAO,CAAEpB,QAAS;EAAE,CAAE,CAAC,GAC3CA,QAAQ,IAAIR,QACX,CAAC;AAER;AAEA,MAAM2B,cAAc,GAAGxC,UAAU,CAChC,CACC;EACCqB,QAAQ;EACRN,IAAI;EACJI,KAAK;EACL,GAAGT;AACsD,CAAC,EAC3DC,GAA8B,KAC1B;EACJ,IAAK,CAAEQ,KAAK,EAAG;IACd,OAAO,IAAI;EACZ;EAEA,OACCoB,aAAA;IAAIzB,SAAS,EAAC;EAA8B,GAC3CyB,aAAA,CAACnC,MAAM;IACNU,SAAS,EAAC,+BAA+B;IACzC,iBAAgBO,QAAU;IAC1BV,GAAG,EAAGA,GAAK;IAAA,GACND;EAAK,GAMV6B,aAAA;IAAM,eAAY;EAAM,GACvBA,aAAA,CAAClC,IAAI;IACJS,SAAS,EAAC,yBAAyB;IACnCC,IAAI,EAAGM,QAAQ,GAAGnB,SAAS,GAAGC;EAAa,CAC3C,CACI,CAAC,EACLgB,KAAK,EACLJ,IAAI,IACLwB,aAAA,CAAClC,IAAI;IACJU,IAAI,EAAGA,IAAM;IACbD,SAAS,EAAC,wBAAwB;IAClC6B,IAAI,EAAG;EAAI,CACX,CAEK,CACL,CAAC;AAEP,CACD,CAAC;AAED,OAAO,MAAMC,SAAS,GAAG5C,UAAU,CAAES,oBAAqB,CAAC;AAE3D,eAAemC,SAAS","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -18,7 +18,7 @@ function UnforwardedPanel({
18
18
  className,
19
19
  children
20
20
  }, ref) {
21
- const classNames = classnames(className, 'components-panel');
21
+ const classNames = clsx(className, 'components-panel');
22
22
  return createElement("div", {
23
23
  className: classNames,
24
24
  ref: ref
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","forwardRef","PanelHeader","UnforwardedPanel","header","className","children","ref","classNames","createElement","label","Panel"],"sources":["@wordpress/components/src/panel/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\nimport type { PanelProps } from './types';\n\nfunction UnforwardedPanel(\n\t{ header, className, children }: PanelProps,\n\tref: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst classNames = classnames( className, 'components-panel' );\n\treturn (\n\t\t<div className={ classNames } ref={ ref }>\n\t\t\t{ header && <PanelHeader label={ header } /> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * `Panel` expands and collapses multiple sections of content.\n *\n * ```jsx\n * import { Panel, PanelBody, PanelRow } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPanel = () => (\n * \t<Panel header=\"My Panel\">\n * \t\t<PanelBody title=\"My Block Settings\" icon={ more } initialOpen={ true }>\n * \t\t\t<PanelRow>My Panel Inputs and Labels</PanelRow>\n * \t\t</PanelBody>\n * \t</Panel>\n * );\n * ```\n */\nexport const Panel = forwardRef( UnforwardedPanel );\n\nexport default Panel;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,UAAU;AAGlC,SAASC,gBAAgBA,CACxB;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAqB,CAAC,EAC3CC,GAAyC,EACxC;EACD,MAAMC,UAAU,GAAGR,UAAU,CAAEK,SAAS,EAAE,kBAAmB,CAAC;EAC9D,OACCI,aAAA;IAAKJ,SAAS,EAAGG,UAAY;IAACD,GAAG,EAAGA;EAAK,GACtCH,MAAM,IAAIK,aAAA,CAACP,WAAW;IAACQ,KAAK,EAAGN;EAAQ,CAAE,CAAC,EAC1CE,QACE,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMK,KAAK,GAAGV,UAAU,CAAEE,gBAAiB,CAAC;AAEnD,eAAeQ,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["clsx","forwardRef","PanelHeader","UnforwardedPanel","header","className","children","ref","classNames","createElement","label","Panel"],"sources":["@wordpress/components/src/panel/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\nimport type { PanelProps } from './types';\n\nfunction UnforwardedPanel(\n\t{ header, className, children }: PanelProps,\n\tref: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst classNames = clsx( className, 'components-panel' );\n\treturn (\n\t\t<div className={ classNames } ref={ ref }>\n\t\t\t{ header && <PanelHeader label={ header } /> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * `Panel` expands and collapses multiple sections of content.\n *\n * ```jsx\n * import { Panel, PanelBody, PanelRow } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPanel = () => (\n * \t<Panel header=\"My Panel\">\n * \t\t<PanelBody title=\"My Block Settings\" icon={ more } initialOpen={ true }>\n * \t\t\t<PanelRow>My Panel Inputs and Labels</PanelRow>\n * \t\t</PanelBody>\n * \t</Panel>\n * );\n * ```\n */\nexport const Panel = forwardRef( UnforwardedPanel );\n\nexport default Panel;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,UAAU;AAGlC,SAASC,gBAAgBA,CACxB;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAqB,CAAC,EAC3CC,GAAyC,EACxC;EACD,MAAMC,UAAU,GAAGR,IAAI,CAAEK,SAAS,EAAE,kBAAmB,CAAC;EACxD,OACCI,aAAA;IAAKJ,SAAS,EAAGG,UAAY;IAACD,GAAG,EAAGA;EAAK,GACtCH,MAAM,IAAIK,aAAA,CAACP,WAAW;IAACQ,KAAK,EAAGN;EAAQ,CAAE,CAAC,EAC1CE,QACE,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMK,KAAK,GAAGV,UAAU,CAAEE,gBAAiB,CAAC;AAEnD,eAAeQ,KAAK","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -18,7 +18,7 @@ function UnforwardedPanelRow({
18
18
  children
19
19
  }, ref) {
20
20
  return createElement("div", {
21
- className: classnames('components-panel__row', className),
21
+ className: clsx('components-panel__row', className),
22
22
  ref: ref
23
23
  }, children);
24
24
  }
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","forwardRef","UnforwardedPanelRow","className","children","ref","createElement","PanelRow"],"sources":["@wordpress/components/src/panel/row.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { PanelRowProps } from './types';\n\nfunction UnforwardedPanelRow(\n\t{ className, children }: PanelRowProps,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'components-panel__row', className ) }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * `PanelRow` is a generic container for rows within a `PanelBody`.\n * It is a flex container with a top margin for spacing.\n */\nexport const PanelRow = forwardRef( UnforwardedPanelRow );\n\nexport default PanelRow;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAG/C;AACA;AACA;;AAGA,SAASC,mBAAmBA,CAC3B;EAAEC,SAAS;EAAEC;AAAwB,CAAC,EACtCC,GAAmC,EAClC;EACD,OACCC,aAAA;IACCH,SAAS,EAAGH,UAAU,CAAE,uBAAuB,EAAEG,SAAU,CAAG;IAC9DE,GAAG,EAAGA;EAAK,GAETD,QACE,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMG,QAAQ,GAAGN,UAAU,CAAEC,mBAAoB,CAAC;AAEzD,eAAeK,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["clsx","forwardRef","UnforwardedPanelRow","className","children","ref","createElement","PanelRow"],"sources":["@wordpress/components/src/panel/row.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { PanelRowProps } from './types';\n\nfunction UnforwardedPanelRow(\n\t{ className, children }: PanelRowProps,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'components-panel__row', className ) }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * `PanelRow` is a generic container for rows within a `PanelBody`.\n * It is a flex container with a top margin for spacing.\n */\nexport const PanelRow = forwardRef( UnforwardedPanelRow );\n\nexport default PanelRow;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAG/C;AACA;AACA;;AAGA,SAASC,mBAAmBA,CAC3B;EAAEC,SAAS;EAAEC;AAAwB,CAAC,EACtCC,GAAmC,EAClC;EACD,OACCC,aAAA;IACCH,SAAS,EAAGH,IAAI,CAAE,uBAAuB,EAAEG,SAAU,CAAG;IACxDE,GAAG,EAAGA;EAAK,GAETD,QACE,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMG,QAAQ,GAAGN,UAAU,CAAEC,mBAAoB,CAAC;AAEzD,eAAeK,QAAQ","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -64,8 +64,8 @@ export function Placeholder(props) {
64
64
  'is-small': width < 160
65
65
  };
66
66
  }
67
- const classes = classnames('components-placeholder', className, modifierClassNames, withIllustration ? 'has-illustration' : null);
68
- const fieldsetClasses = classnames('components-placeholder__fieldset', {
67
+ const classes = clsx('components-placeholder', className, modifierClassNames, withIllustration ? 'has-illustration' : null);
68
+ const fieldsetClasses = clsx('components-placeholder__fieldset', {
69
69
  'is-column-layout': isColumnLayout
70
70
  });
71
71
  useEffect(() => {
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useResizeObserver","SVG","Path","useEffect","speak","Icon","PlaceholderIllustration","createElement","className","fill","xmlns","viewBox","preserveAspectRatio","vectorEffect","d","Placeholder","props","icon","children","label","instructions","notices","preview","isColumnLayout","withIllustration","additionalProps","resizeListener","width","modifierClassNames","classes","fieldsetClasses"],"sources":["@wordpress/components/src/placeholder/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = classnames(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\n\tconst fieldsetClasses = classnames( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( instructions ) {\n\t\t\tspeak( instructions );\n\t\t}\n\t}, [ instructions ] );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && (\n\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t{ instructions }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className={ fieldsetClasses }>{ children }</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,GAAG,EAAEC,IAAI,QAAQ,uBAAuB;AACjD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,OAAOC,IAAI,MAAM,SAAS;AAI1B,MAAMC,uBAAuB,GAC5BC,aAAA,CAACN,GAAG;EACHO,SAAS,EAAC,sCAAsC;EAChDC,IAAI,EAAC,MAAM;EACXC,KAAK,EAAC,4BAA4B;EAClCC,OAAO,EAAC,WAAW;EACnBC,mBAAmB,EAAC;AAAM,GAE1BL,aAAA,CAACL,IAAI;EAACW,YAAY,EAAC,oBAAoB;EAACC,CAAC,EAAC;AAAY,CAAE,CACpD,CACL;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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CAAEC,YAAY,IAChBb,aAAA;IAAKC,SAAS,EAAC;EAAsC,GAClDY,YACE,CACL,EACDb,aAAA;IAAKC,SAAS,EAAGsB;EAAiB,GAAGZ,QAAe,CAChD,CAAC;AAER;AAEA,eAAeH,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useResizeObserver","SVG","Path","useEffect","speak","Icon","PlaceholderIllustration","createElement","className","fill","xmlns","viewBox","preserveAspectRatio","vectorEffect","d","Placeholder","props","icon","children","label","instructions","notices","preview","isColumnLayout","withIllustration","additionalProps","resizeListener","width","modifierClassNames","classes","fieldsetClasses"],"sources":["@wordpress/components/src/placeholder/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = clsx(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\n\tconst fieldsetClasses = clsx( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( instructions ) {\n\t\t\tspeak( instructions );\n\t\t}\n\t}, [ instructions ] );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && (\n\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t{ instructions }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className={ fieldsetClasses }>{ children }</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,GAAG,EAAEC,IAAI,QAAQ,uBAAuB;AACjD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,QAAQ,iBA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D,CAAC,EAAE,CAAEA,YAAY,CAAG,CAAC;EAErB,OACCb,aAAA;IAAA,GAAUkB,eAAe;IAAGjB,SAAS,EAAGqB;EAAS,GAC9CL,gBAAgB,GAAGlB,uBAAuB,GAAG,IAAI,EACjDoB,cAAc,EACdL,OAAO,EACPC,OAAO,IACRf,aAAA;IAAKC,SAAS,EAAC;EAAiC,GAC7Cc,OACE,CACL,EACDf,aAAA;IAAKC,SAAS,EAAC;EAA+B,GAC7CD,aAAA,CAACF,IAAI;IAACY,IAAI,EAAGA;EAAM,CAAE,CAAC,EACpBE,KACE,CAAC,EACJ,CAAC,CAAEC,YAAY,IAChBb,aAAA;IAAKC,SAAS,EAAC;EAAsC,GAClDY,YACE,CACL,EACDb,aAAA;IAAKC,SAAS,EAAGsB;EAAiB,GAAGZ,QAAe,CAChD,CAAC;AAER;AAEA,eAAeH,WAAW","ignoreList":[]}
@@ -3,7 +3,7 @@ import { createElement, Fragment } from "react";
3
3
  * External dependencies
4
4
  */
5
5
 
6
- import classnames from 'classnames';
6
+ import clsx from 'clsx';
7
7
  import { useFloating, flip as flipMiddleware, shift as shiftMiddleware, limitShift, autoUpdate, arrow, offset as offsetMiddleware, size } from '@floating-ui/react-dom';
8
8
  // eslint-disable-next-line no-restricted-imports
9
9
 
@@ -269,7 +269,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
269
269
  // the popover, add the `is-positioned` class to signal that all transitions have finished.
270
270
  const isPositioned = (!shouldAnimate || animationFinished) && x !== null && y !== null;
271
271
  let content = createElement(motion.div, {
272
- className: classnames(className, {
272
+ className: clsx(className, {
273
273
  'is-expanded': isExpanded,
274
274
  'is-positioned': isPositioned,
275
275
  // Use the 'alternate' classname for 'toolbar' variant for back compat.
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useFloating","flip","flipMiddleware","shift","shiftMiddleware","limitShift","autoUpdate","arrow","offset","offsetMiddleware","size","motion","useRef","useLayoutEffect","forwardRef","createContext","useContext","useMemo","useState","useCallback","createPortal","useReducedMotion","useViewportMatch","useMergeRefs","__experimentalUseDialog","useDialog","close","deprecated","Path","SVG","Button","ScrollLock","Slot","Fill","useSlot","computePopoverPosition","positionToPlacement","placementToMotionAnimationProps","getReferenceElement","contextConnect","useContextSystem","overlayMiddlewares","StyleProvider","SLOT_NAME","ArrowTriangle","createElement","xmlns","viewBox","className","role","d","vectorEffect","slotNameContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","constrainTabbing","onClose","children","noArrow","position","placement","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","inline","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","since","version","alternative","computedVariant","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","middleware","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","style","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceElement","setReference","mergedFloatingRef","setFloating","left","shouldReduceMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","animationProps","onAnimationComplete","isPositioned","content","div","ref","tabIndex","icon","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","name","Fragment","Popover","PopoverSlot","bubblesVirtually","__unstableSlotNameProvider","Provider"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport classnames from 'classnames';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tlimitShift,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n} from '@floating-ui/react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\n// eslint-disable-next-line no-restricted-imports\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n\tcreatePortal,\n} from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceElement,\n} from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { overlayMiddlewares } from './overlay-middlewares';\nimport { StyleProvider } from '../style-provider';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox={ `0 0 100 100` }\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst fallbackContainerClassname = 'components-popover__fallback-container';\nconst getPopoverFallbackContainer = () => {\n\tlet container = document.body.querySelector(\n\t\t'.' + fallbackContainerClassname\n\t);\n\tif ( ! container ) {\n\t\tcontainer = document.createElement( 'div' );\n\t\tcontainer.className = fallbackContainerClassname;\n\t\tdocument.body.append( container );\n\t}\n\n\treturn container;\n};\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children`, which are re-defined in `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tconstrainTabbing,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tinline = false,\n\t\tvariant,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = useContextSystem( props, 'Popover' );\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp && flipMiddleware(),\n\t\tcomputedResizeProp &&\n\t\t\tsize( {\n\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\tconst { firstElementChild } = refs.floating.current ?? {};\n\n\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t} ),\n\t\tshift &&\n\t\t\tshiftMiddleware( {\n\t\t\t\tcrossAxis: true,\n\t\t\t\tlimiter: limitShift(),\n\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t} ),\n\t\tarrow( { element: arrowRef } ),\n\t];\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tconstrainTabbing,\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tlayoutShift: false,\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\trefs.setReference( resultingReferenceElement );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\trefs,\n\t] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\tconst style = isExpanded\n\t\t? undefined\n\t\t: {\n\t\t\t\tposition: strategy,\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t// be overridden by the return value of the\n\t\t\t\t// `placementToMotionAnimationProps` function.\n\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\ty: computePopoverPosition( y ),\n\t\t };\n\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst shouldAnimate = animate && ! isExpanded && ! shouldReduceMotion;\n\n\tconst [ animationFinished, setAnimationFinished ] = useState( false );\n\n\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t() => placementToMotionAnimationProps( computedPlacement ),\n\t\t[ computedPlacement ]\n\t);\n\n\tconst animationProps: HTMLMotionProps< 'div' > = shouldAnimate\n\t\t? {\n\t\t\t\tstyle: {\n\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t\t\tonAnimationComplete: () => setAnimationFinished( true ),\n\t\t\t\t...otherMotionProps,\n\t\t }\n\t\t: {\n\t\t\t\tanimate: false,\n\t\t\t\tstyle,\n\t\t };\n\n\t// When Floating UI has finished positioning and Framer Motion has finished animating\n\t// the popover, add the `is-positioned` class to signal that all transitions have finished.\n\tconst isPositioned =\n\t\t( ! shouldAnimate || animationFinished ) && x !== null && y !== null;\n\n\tlet content = (\n\t\t<motion.div\n\t\t\tclassName={ classnames( className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': isPositioned,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...animationProps }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${ arrowData.x }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${ arrowData.y }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n\n\tconst shouldRenderWithinSlot = slot.ref && ! inline;\n\tconst hasAnchor = anchorRef || anchorRect || anchor;\n\n\tif ( shouldRenderWithinSlot ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t} else if ( ! inline ) {\n\t\tcontent = createPortal(\n\t\t\t<StyleProvider document={ document }>{ content }</StyleProvider>,\n\t\t\tgetPopoverFallbackContainer()\n\t\t);\n\t}\n\n\tif ( hasAnchor ) {\n\t\treturn content;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<span ref={ anchorRefFallback } />\n\t\t\t{ content }\n\t\t</>\n\t);\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = contextConnect( UnforwardedPopover, 'Popover' );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n"],"mappings":";AAAA;AAC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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMc,OAAO,GAAG5I,cAAc,CAAEsB,kBAAkB,EAAE,SAAU,CAAC;AAEtE,SAASuH,WAAWA,CACnB;EAAEH,IAAI,GAAGtI;AAA6B,CAAC,EACvC4H,GAAwB,EACvB;EACD,OACC1H,aAAA,CAACb,IAAI;IACJqJ,gBAAgB;IAChBJ,IAAI,EAAGA,IAAM;IACbjI,SAAS,EAAC,cAAc;IACxBuH,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAY,OAAO,CAACnJ,IAAI,GAAGlB,UAAU,CAAEsK,WAAY,CAAC;AACxC;AACAD,OAAO,CAACG,0BAA0B,GAAGlI,eAAe,CAACmI,QAAQ;AAE7D,eAAeJ,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useFloating","flip","flipMiddleware","shift","shiftMiddleware","limitShift","autoUpdate","arrow","offset","offsetMiddleware","size","motion","useRef","useLayoutEffect","forwardRef","createContext","useContext","useMemo","useState","useCallback","createPortal","useReducedMotion","useViewportMatch","useMergeRefs","__experimentalUseDialog","useDialog","close","deprecated","Path","SVG","Button","ScrollLock","Slot","Fill","useSlot","computePopoverPosition","positionToPlacement","placementToMotionAnimationProps","getReferenceElement","contextConnect","useContextSystem","overlayMiddlewares","StyleProvider","SLOT_NAME","ArrowTriangle","createElement","xmlns","viewBox","className","role","d","vectorEffect","slotNameContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","constrainTabbing","onClose","children","noArrow","position","placement","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","inline","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","since","version","alternative","computedVariant","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","middleware","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","style","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceElement","setReference","mergedFloatingRef","setFloating","left","shouldReduceMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","animationProps","onAnimationComplete","isPositioned","content","div","ref","tabIndex","icon","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","name","Fragment","Popover","PopoverSlot","bubblesVirtually","__unstableSlotNameProvider","Provider"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport clsx from 'clsx';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tlimitShift,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n} from '@floating-ui/react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\n// eslint-disable-next-line no-restricted-imports\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n\tcreatePortal,\n} from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceElement,\n} from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { overlayMiddlewares } from './overlay-middlewares';\nimport { StyleProvider } from '../style-provider';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox={ `0 0 100 100` }\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst fallbackContainerClassname = 'components-popover__fallback-container';\nconst getPopoverFallbackContainer = () => {\n\tlet container = document.body.querySelector(\n\t\t'.' + fallbackContainerClassname\n\t);\n\tif ( ! container ) {\n\t\tcontainer = document.createElement( 'div' );\n\t\tcontainer.className = fallbackContainerClassname;\n\t\tdocument.body.append( container );\n\t}\n\n\treturn container;\n};\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children`, which are re-defined in `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tconstrainTabbing,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tinline = false,\n\t\tvariant,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = useContextSystem( props, 'Popover' );\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp && flipMiddleware(),\n\t\tcomputedResizeProp &&\n\t\t\tsize( {\n\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\tconst { firstElementChild } = refs.floating.current ?? {};\n\n\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t} ),\n\t\tshift &&\n\t\t\tshiftMiddleware( {\n\t\t\t\tcrossAxis: true,\n\t\t\t\tlimiter: limitShift(),\n\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t} ),\n\t\tarrow( { element: arrowRef } ),\n\t];\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tconstrainTabbing,\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tlayoutShift: false,\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\trefs.setReference( resultingReferenceElement );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\trefs,\n\t] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\tconst style = isExpanded\n\t\t? undefined\n\t\t: {\n\t\t\t\tposition: strategy,\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t// be overridden by the return value of the\n\t\t\t\t// `placementToMotionAnimationProps` function.\n\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\ty: computePopoverPosition( y ),\n\t\t };\n\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst shouldAnimate = animate && ! isExpanded && ! shouldReduceMotion;\n\n\tconst [ animationFinished, setAnimationFinished ] = useState( false );\n\n\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t() => placementToMotionAnimationProps( computedPlacement ),\n\t\t[ computedPlacement ]\n\t);\n\n\tconst animationProps: HTMLMotionProps< 'div' > = shouldAnimate\n\t\t? {\n\t\t\t\tstyle: {\n\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t\t\tonAnimationComplete: () => setAnimationFinished( true ),\n\t\t\t\t...otherMotionProps,\n\t\t }\n\t\t: {\n\t\t\t\tanimate: false,\n\t\t\t\tstyle,\n\t\t };\n\n\t// When Floating UI has finished positioning and Framer Motion has finished animating\n\t// the popover, add the `is-positioned` class to signal that all transitions have finished.\n\tconst isPositioned =\n\t\t( ! shouldAnimate || animationFinished ) && x !== null && y !== null;\n\n\tlet content = (\n\t\t<motion.div\n\t\t\tclassName={ clsx( className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': isPositioned,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...animationProps }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${ arrowData.x }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${ arrowData.y }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n\n\tconst shouldRenderWithinSlot = slot.ref && ! inline;\n\tconst hasAnchor = anchorRef || anchorRect || anchor;\n\n\tif ( shouldRenderWithinSlot ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t} else if ( ! inline ) {\n\t\tcontent = createPortal(\n\t\t\t<StyleProvider document={ document }>{ content }</StyleProvider>,\n\t\t\tgetPopoverFallbackContainer()\n\t\t);\n\t}\n\n\tif ( hasAnchor ) {\n\t\treturn content;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<span ref={ anchorRefFallback } />\n\t\t\t{ content }\n\t\t</>\n\t);\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = contextConnect( UnforwardedPopover, 'Popover' );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n"],"mappings":";AAAA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;AACvB,SACCC,WAAW,EACXC,IAAI,IAAIC,cAAc,EACtBC,KAAK,IAAIC,eAAe,EACxBC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,MAAM,IAAIC,gBAAgB,EAC1BC,IAAI,QACE,wBAAwB;AAC/B;;AAEA;AACA,SAASC,MAAM,QAAQ,eAAe;;AAEtC;AACA;AACA;AACA,SACCC,MAAM,EACNC,eAAe,EACfC,UAAU,EACVC,aAAa,EACbC,UAAU,EACVC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,YAAY,QACN,oBAAoB;AAC3B,SACCC,gBAAgB,EAChBC,gBAAgB,EAChBC,YAAY,EACZC,uBAAuB,IAAIC,SAAS,QAC9B,oBAAoB;AAC3B,SAASC,KAAK,QAAQ,kBAAkB;AACxC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,IAAI,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GAAGpD,IAAI,CAAC4C,GAAG,IAAI,CAAEvF,MAAM;EACnD,MAAMgG,SAAS,GAAG7F,SAAS,IAAIC,UAAU,IAAIT,MAAM;EAEnD,IAAKoG,sBAAsB,EAAG;IAC7BV,OAAO,GAAGxH,aAAA,CAACZ,IAAI;MAACgJ,IAAI,EAAGvD;IAAU,GAAG2C,OAAe,CAAC;EACrD,CAAC,MAAM,IAAK,CAAErF,MAAM,EAAG;IACtBqF,OAAO,GAAGjJ,YAAY,CACrByB,aAAA,CAACH,aAAa;MAACe,QAAQ,EAAGA;IAAU,GAAG4G,OAAwB,CAAC,EAChE9G,2BAA2B,CAAC,CAC7B,CAAC;EACF;EAEA,IAAKyH,SAAS,EAAG;IAChB,OAAOX,OAAO;EACf;EAEA,OACCxH,aAAA,CAAAqI,QAAA,QACCrI,aAAA;IAAM0H,GAAG,EAAGtE;EAAmB,CAAE,CAAC,EAChCoE,OACD,CAAC;AAEL,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,OAAO,MAAMc,OAAO,GAAG5I,cAAc,CAAEsB,kBAAkB,EAAE,SAAU,CAAC;AAEtE,SAASuH,WAAWA,CACnB;EAAEH,IAAI,GAAGtI;AAA6B,CAAC,EACvC4H,GAAwB,EACvB;EACD,OACC1H,aAAA,CAACb,IAAI;IACJqJ,gBAAgB;IAChBJ,IAAI,EAAGA,IAAM;IACbjI,SAAS,EAAC,cAAc;IACxBuH,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAY,OAAO,CAACnJ,IAAI,GAAGlB,UAAU,CAAEsK,WAAY,CAAC;AACxC;AACAD,OAAO,CAACG,0BAA0B,GAAGlI,eAAe,CAACmI,QAAQ;AAE7D,eAAeJ,OAAO","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
@@ -62,7 +62,7 @@ export function RadioControl(props) {
62
62
  id: id,
63
63
  hideLabelFromVision: hideLabelFromVision,
64
64
  help: help,
65
- className: classnames(className, 'components-radio-control')
65
+ className: clsx(className, 'components-radio-control')
66
66
  }, createElement(VStack, {
67
67
  spacing: 1
68
68
  }, options.map((option, index) => createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useInstanceId","BaseControl","VStack","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","additionalProps","instanceId","id","onChangeValue","event","target","value","length","createElement","__nextHasNoMarginBottom","spacing","map","option","index","key","type","name","checked","undefined","htmlFor"],"sources":["@wordpress/components/src/radio-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( RadioControl );\n\tconst id = `inspector-radio-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ classnames( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ `${ id }-${ index }` }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ `${ id }-${ index }` }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! help ? `${ id }__help` : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ `${ id }-${ index }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AAGnC;AACA;AACA;AACA,SAASC,aAAa,QAA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I,EAAGd,EAAI;IACXI,KAAK,EAAGM,MAAM,CAACN,KAAO;IACtBT,QAAQ,EAAGM,aAAe;IAC1Bc,OAAO,EAAGL,MAAM,CAACN,KAAK,KAAKX,QAAU;IACrC,oBACC,CAAC,CAAEC,IAAI,GAAI,GAAGM,EAAI,QAAO,GAAGgB,SAC5B;IAAA,GACIlB;EAAe,CACpB,CAAC,EACFQ,aAAA;IACCd,SAAS,EAAC,iCAAiC;IAC3CyB,OAAO,EAAI,GAAGjB,EAAI,IAAIW,KAAO;EAAG,GAE9BD,MAAM,CAACnB,KACH,CACH,CACJ,CACK,CACI,CAAC;AAEhB;AAEA,eAAeF,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useInstanceId","BaseControl","VStack","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","additionalProps","instanceId","id","onChangeValue","event","target","value","length","createElement","__nextHasNoMarginBottom","spacing","map","option","index","key","type","name","checked","undefined","htmlFor"],"sources":["@wordpress/components/src/radio-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( RadioControl );\n\tconst id = `inspector-radio-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ clsx( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ `${ id }-${ index }` }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ `${ id }-${ index }` }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! help ? `${ id }__help` : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ `${ id }-${ index }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t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AE5Cc,aAAA;IACCN,EAAE,EAAI,GAAGA,EAAI,IAAIW,KAAO,EAAG;IAC3BnB,SAAS,EAAC,iCAAiC;IAC3CqB,IAAI,EAAC,OAAO;IACZC,IAAI,EAAGd,EAAI;IACXI,KAAK,EAAGM,MAAM,CAACN,KAAO;IACtBT,QAAQ,EAAGM,aAAe;IAC1Bc,OAAO,EAAGL,MAAM,CAACN,KAAK,KAAKX,QAAU;IACrC,oBACC,CAAC,CAAEC,IAAI,GAAI,GAAGM,EAAI,QAAO,GAAGgB,SAC5B;IAAA,GACIlB;EAAe,CACpB,CAAC,EACFQ,aAAA;IACCd,SAAS,EAAC,iCAAiC;IAC3CyB,OAAO,EAAI,GAAGjB,EAAI,IAAIW,KAAO;EAAG,GAE9BD,MAAM,CAACnB,KACH,CACH,CACJ,CACK,CACI,CAAC;AAEhB;AAEA,eAAeF,YAAY","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
@@ -86,8 +86,8 @@ function UnforwardedRangeControl(props, forwardedRef) {
86
86
  const rangeFillValue = isValueReset ? (max - min) / 2 + min : value;
87
87
  const fillValue = isValueReset ? 50 : (value - min) / (max - min) * 100;
88
88
  const fillValueOffset = `${clamp(fillValue, 0, 100)}%`;
89
- const classes = classnames('components-range-control', className);
90
- const wrapperClasses = classnames('components-range-control__wrapper', !!marks && 'is-marked');
89
+ const classes = clsx('components-range-control', className);
90
+ const wrapperClasses = clsx('components-range-control__wrapper', !!marks && 'is-marked');
91
91
  const id = useInstanceId(UnforwardedRangeControl, 'inspector-range-control');
92
92
  const describedBy = !!help ? `${id}__help` : undefined;
93
93
  const enableTooltip = hasTooltip !== false && Number.isFinite(value);
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","__","isRTL","useRef","useState","forwardRef","useInstanceId","useMergeRefs","BaseControl","Button","Icon","COLORS","floatClamp","useControlledRangeValue","clamp","InputRange","RangeRail","SimpleTooltip","ActionRightWrapper","AfterIconWrapper","BeforeIconWrapper","InputNumber","Root","Track","ThumbWrapper","Thumb","Wrapper","space","noop","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","theme","accent","currentInput","disabled","help","hideLabelFromVision","initialPosition","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","resetFallbackValue","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","otherProps","setValue","initial","isResetPendent","hasTooltip","hasInputField","setShowTooltip","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","undefined","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","classes","wrapperClasses","id","describedBy","enableTooltip","Number","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","isNaN","handleOnInputNumberBlur","handleOnReset","resetValue","onChangeResetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","createElement","icon","ref","style","width","tooltipPosition","show","inputMode","size","__unstableInputWidth","variant","onClick","RangeControl"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\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';\n\nconst noop = () => {};\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...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 = classnames( 'components-range-control', className );\n\n\tconst wrapperClasses = classnames(\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\tlet resetValue: number | null = parseFloat( `${ resetFallbackValue }` );\n\t\tlet onChangeResetValue: number | undefined = resetValue;\n\n\t\tif ( isNaN( resetValue ) ) {\n\t\t\tresetValue = null;\n\t\t\tonChangeResetValue = undefined;\n\t\t}\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( onChangeResetValue );\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\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\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\tdisabled={ disabled || value === undefined }\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 * 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":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AAGnC;AACA;AACA;AACA,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SAASC,MAAM,EAAEC,QAAQ,EAAE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GAAK;IACXC,GAAG,EAAGA,GAAK;IACXC,MAAM,EAAGsD,uBAAyB;IAClCrD,QAAQ,EAAGkD,cAAgB;IAC3BzC,SAAS,EAAGA,SAAW;IACvB6D,IAAI,EACH9D,qBAAqB,GAClB,kBAAkB,GAClB,SACH;IACD+D,oBAAoB,EACnB/D,qBAAqB,GAAGjC,KAAK,CAAE,EAAG,CAAC,GAAGA,KAAK,CAAE,EAAG,CAChD;IACDqC,IAAI,EAAGA;IACP;IAAA;IACAE,KAAK,EAAGoB;EAAkB,CAC1B,CACD,EACCpD,UAAU,IACXgF,aAAA,CAAChG,kBAAkB,QAClBgG,aAAA,CAACzG,MAAM;IACN2B,SAAS,EAAC,iCAAiC;IAC3CM,QAAQ,EAAGA,QAAQ,IAAIwB,KAAK,KAAKmB,SAAW;IAC5CuC,OAAO,EAAC,WAAW;IACnBF,IAAI,EAAC,OAAO;IACZG,OAAO,EAAGnB;EAAe,GAEvBzG,EAAE,CAAE,OAAQ,CACP,CACW,CAEhB,CACM,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,OAAO,MAAM6H,YAAY,GAAGzH,UAAU,CAAEwB,uBAAwB,CAAC;AAEjE,eAAeiG,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["clsx","__","isRTL","useRef","useState","forwardRef","useInstanceId","useMergeRefs","BaseControl","Button","Icon","COLORS","floatClamp","useControlledRangeValue","clamp","InputRange","RangeRail","SimpleTooltip","ActionRightWrapper","AfterIconWrapper","BeforeIconWrapper","InputNumber","Root","Track","ThumbWrapper","Thumb","Wrapper","space","noop","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","theme","accent","currentInput","disabled","help","hideLabelFromVision","initialPosition","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","resetFallbackValue","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","otherProps","setValue","initial","isResetPendent","hasTooltip","hasInputField","setShowTooltip","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","undefined","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","classes","wrapperClasses","id","describedBy","enableTooltip","Number","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","isNaN","handleOnInputNumberBlur","handleOnReset","resetValue","onChangeResetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","createElement","icon","ref","style","width","tooltipPosition","show","inputMode","size","__unstableInputWidth","variant","onClick","RangeControl"],"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';\n\nconst noop = () => {};\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...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\tlet resetValue: number | null = parseFloat( `${ resetFallbackValue }` );\n\t\tlet onChangeResetValue: number | undefined = resetValue;\n\n\t\tif ( isNaN( resetValue ) ) {\n\t\t\tresetValue = null;\n\t\t\tonChangeResetValue = undefined;\n\t\t}\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( onChangeResetValue );\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\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\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\tdisabled={ disabled || value === undefined }\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 * 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":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SAASC,MAAM,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,oBAAoB;AACjE,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;;AAEhE;AACA;AACA;AACA,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,IAAI,MAAM,SAAS;AAC1B,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,UAAU,EAAEC,uBAAuB,QAAQ,SAAS;AAC7D,SAASC,KAAK,QAAQ,eAAe;AACrC,OAAOC,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KAAK,EAAGoB;EAAkB,CAC1B,CACD,EACCpD,UAAU,IACXgF,aAAA,CAAChG,kBAAkB,QAClBgG,aAAA,CAACzG,MAAM;IACN2B,SAAS,EAAC,iCAAiC;IAC3CM,QAAQ,EAAGA,QAAQ,IAAIwB,KAAK,KAAKmB,SAAW;IAC5CuC,OAAO,EAAC,WAAW;IACnBF,IAAI,EAAC,OAAO;IACZG,OAAO,EAAGnB;EAAe,GAEvBzG,EAAE,CAAE,OAAQ,CACP,CACW,CAEhB,CACM,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,OAAO,MAAM6H,YAAY,GAAGzH,UAAU,CAAEwB,uBAAwB,CAAC;AAEjE,eAAeiG,YAAY","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement, Fragment } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * Internal dependencies
@@ -16,8 +16,8 @@ export default function RangeMark(props) {
16
16
  style = {},
17
17
  ...otherProps
18
18
  } = props;
19
- const classes = classnames('components-range-control__mark', isFilled && 'is-filled', className);
20
- const labelClasses = classnames('components-range-control__mark-label', isFilled && 'is-filled');
19
+ const classes = clsx('components-range-control__mark', isFilled && 'is-filled', className);
20
+ const labelClasses = clsx('components-range-control__mark-label', isFilled && 'is-filled');
21
21
  return createElement(Fragment, null, createElement(Mark, {
22
22
  ...otherProps,
23
23
  "aria-hidden": "true",
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","Mark","MarkLabel","RangeMark","props","className","isFilled","label","style","otherProps","classes","labelClasses","createElement","Fragment"],"sources":["@wordpress/components/src/range-control/mark.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { Mark, MarkLabel } from './styles/range-control-styles';\n\nimport type { RangeMarkProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function RangeMark(\n\tprops: WordPressComponentProps< RangeMarkProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisFilled = false,\n\t\tlabel,\n\t\tstyle = {},\n\t\t...otherProps\n\t} = props;\n\n\tconst classes = classnames(\n\t\t'components-range-control__mark',\n\t\tisFilled && 'is-filled',\n\t\tclassName\n\t);\n\tconst labelClasses = classnames(\n\t\t'components-range-control__mark-label',\n\t\tisFilled && 'is-filled'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Mark\n\t\t\t\t{ ...otherProps }\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={ classes }\n\t\t\t\tisFilled={ isFilled }\n\t\t\t\tstyle={ style }\n\t\t\t/>\n\t\t\t{ label && (\n\t\t\t\t<MarkLabel\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName={ labelClasses }\n\t\t\t\t\tisFilled={ isFilled }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</MarkLabel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,IAAI,EAAEC,SAAS,QAAQ,+BAA+B;AAK/D,eAAe,SAASC,SAASA,CAChCC,KAAwD,EACvD;EACD,MAAM;IACLC,SAAS;IACTC,QAAQ,GAAG,KAAK;IAChBC,KAAK;IACLC,KAAK,GAAG,CAAC,CAAC;IACV,GAAGC;EACJ,CAAC,GAAGL,KAAK;EAET,MAAMM,OAAO,GAAGV,UAAU,CACzB,gCAAgC,EAChCM,QAAQ,IAAI,WAAW,EACvBD,SACD,CAAC;EACD,MAAMM,YAAY,GAAGX,UAAU,CAC9B,sCAAsC,EACtCM,QAAQ,IAAI,WACb,CAAC;EAED,OACCM,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACX,IAAI;IAAA,GACCQ,UAAU;IACf,eAAY,MAAM;IAClBJ,SAAS,EAAGK,OAAS;IACrBJ,QAAQ,EAAGA,QAAU;IACrBE,KAAK,EAAGA;EAAO,CACf,CAAC,EACAD,KAAK,IACNK,aAAA,CAACV,SAAS;IACT,eAAY,MAAM;IAClBG,SAAS,EAAGM,YAAc;IAC1BL,QAAQ,EAAGA,QAAU;IACrBE,KAAK,EAAGA;EAAO,GAEbD,KACQ,CAEX,CAAC;AAEL","ignoreList":[]}
1
+ {"version":3,"names":["clsx","Mark","MarkLabel","RangeMark","props","className","isFilled","label","style","otherProps","classes","labelClasses","createElement","Fragment"],"sources":["@wordpress/components/src/range-control/mark.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * Internal dependencies\n */\nimport { Mark, MarkLabel } from './styles/range-control-styles';\n\nimport type { RangeMarkProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function RangeMark(\n\tprops: WordPressComponentProps< RangeMarkProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tisFilled = false,\n\t\tlabel,\n\t\tstyle = {},\n\t\t...otherProps\n\t} = props;\n\n\tconst classes = clsx(\n\t\t'components-range-control__mark',\n\t\tisFilled && 'is-filled',\n\t\tclassName\n\t);\n\tconst labelClasses = clsx(\n\t\t'components-range-control__mark-label',\n\t\tisFilled && 'is-filled'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Mark\n\t\t\t\t{ ...otherProps }\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={ classes }\n\t\t\t\tisFilled={ isFilled }\n\t\t\t\tstyle={ style }\n\t\t\t/>\n\t\t\t{ label && (\n\t\t\t\t<MarkLabel\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclassName={ labelClasses }\n\t\t\t\t\tisFilled={ isFilled }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</MarkLabel>\n\t\t\t) }\n\t\t</>\n\t);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,IAAI,EAAEC,SAAS,QAAQ,+BAA+B;AAK/D,eAAe,SAASC,SAASA,CAChCC,KAAwD,EACvD;EACD,MAAM;IACLC,SAAS;IACTC,QAAQ,GAAG,KAAK;IAChBC,KAAK;IACLC,KAAK,GAAG,CAAC,CAAC;IACV,GAAGC;EACJ,CAAC,GAAGL,KAAK;EAET,MAAMM,OAAO,GAAGV,IAAI,CACnB,gCAAgC,EAChCM,QAAQ,IAAI,WAAW,EACvBD,SACD,CAAC;EACD,MAAMM,YAAY,GAAGX,IAAI,CACxB,sCAAsC,EACtCM,QAAQ,IAAI,WACb,CAAC;EAED,OACCM,aAAA,CAAAC,QAAA,QACCD,aAAA,CAACX,IAAI;IAAA,GACCQ,UAAU;IACf,eAAY,MAAM;IAClBJ,SAAS,EAAGK,OAAS;IACrBJ,QAAQ,EAAGA,QAAU;IACrBE,KAAK,EAAGA;EAAO,CACf,CAAC,EACAD,KAAK,IACNK,aAAA,CAACV,SAAS;IACT,eAAY,MAAM;IAClBG,SAAS,EAAGM,YAAc;IAC1BL,QAAQ,EAAGA,QAAU;IACrBE,KAAK,EAAGA;EAAO,GAEbD,KACQ,CAEX,CAAC;AAEL","ignoreList":[]}
@@ -2,7 +2,7 @@ import { createElement } from "react";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
- import classnames from 'classnames';
5
+ import clsx from 'clsx';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -29,7 +29,7 @@ export default function SimpleTooltip(props) {
29
29
  inputRef,
30
30
  tooltipPosition
31
31
  });
32
- const classes = classnames('components-simple-tooltip', className);
32
+ const classes = clsx('components-simple-tooltip', className);
33
33
  const styles = {
34
34
  ...style,
35
35
  zIndex
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useCallback","useEffect","useState","Tooltip","SimpleTooltip","props","className","inputRef","tooltipPosition","show","style","value","renderTooltipContent","v","zIndex","restProps","position","useTooltipPosition","classes","styles","createElement","role","setPosition","setTooltipPosition","current","window","addEventListener","removeEventListener"],"sources":["@wordpress/components/src/range-control/tooltip.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Tooltip } from './styles/range-control-styles';\n\nimport type { TooltipProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function SimpleTooltip(\n\tprops: WordPressComponentProps< TooltipProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tinputRef,\n\t\ttooltipPosition,\n\t\tshow = false,\n\t\tstyle = {},\n\t\tvalue = 0,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tzIndex = 100,\n\t\t...restProps\n\t} = props;\n\tconst position = useTooltipPosition( { inputRef, tooltipPosition } );\n\tconst classes = classnames( 'components-simple-tooltip', className );\n\tconst styles = {\n\t\t...style,\n\t\tzIndex,\n\t};\n\n\treturn (\n\t\t<Tooltip\n\t\t\t{ ...restProps }\n\t\t\taria-hidden={ show }\n\t\t\tclassName={ classes }\n\t\t\tposition={ position }\n\t\t\tshow={ show }\n\t\t\trole=\"tooltip\"\n\t\t\tstyle={ styles }\n\t\t>\n\t\t\t{ renderTooltipContent( value ) }\n\t\t</Tooltip>\n\t);\n}\n\nfunction useTooltipPosition( { inputRef, tooltipPosition }: TooltipProps ) {\n\tconst [ position, setPosition ] = useState< string >();\n\n\tconst setTooltipPosition = useCallback( () => {\n\t\tif ( inputRef && inputRef.current ) {\n\t\t\tsetPosition( tooltipPosition );\n\t\t}\n\t}, [ tooltipPosition, inputRef ] );\n\n\tuseEffect( () => {\n\t\tsetTooltipPosition();\n\t}, [ setTooltipPosition ] );\n\n\tuseEffect( () => {\n\t\twindow.addEventListener( 'resize', setTooltipPosition );\n\n\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B,OAAO,EAAG;MACnCF,WAAW,CAAEd,eAAgB,CAAC;IAC/B;EACD,CAAC,EAAE,CAAEA,eAAe,EAAED,QAAQ,CAAG,CAAC;EAElCN,SAAS,CAAE,MAAM;IAChBsB,kBAAkB,CAAC,CAAC;EACrB,CAAC,EAAE,CAAEA,kBAAkB,CAAG,CAAC;EAE3BtB,SAAS,CAAE,MAAM;IAChBwB,MAAM,CAACC,gBAAgB,CAAE,QAAQ,EAAEH,kBAAmB,CAAC;IAEvD,OAAO,MAAM;MACZE,MAAM,CAACE,mBAAmB,CAAE,QAAQ,EAAEJ,kBAAmB,CAAC;IAC3D,CAAC;EACF,CAAE,CAAC;EAEH,OAAOP,QAAQ;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useCallback","useEffect","useState","Tooltip","SimpleTooltip","props","className","inputRef","tooltipPosition","show","style","value","renderTooltipContent","v","zIndex","restProps","position","useTooltipPosition","classes","styles","createElement","role","setPosition","setTooltipPosition","current","window","addEventListener","removeEventListener"],"sources":["@wordpress/components/src/range-control/tooltip.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { Tooltip } from './styles/range-control-styles';\n\nimport type { TooltipProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nexport default function SimpleTooltip(\n\tprops: WordPressComponentProps< TooltipProps, 'span' >\n) {\n\tconst {\n\t\tclassName,\n\t\tinputRef,\n\t\ttooltipPosition,\n\t\tshow = false,\n\t\tstyle = {},\n\t\tvalue = 0,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tzIndex = 100,\n\t\t...restProps\n\t} = props;\n\tconst position = useTooltipPosition( { inputRef, tooltipPosition } );\n\tconst classes = clsx( 'components-simple-tooltip', className );\n\tconst styles = {\n\t\t...style,\n\t\tzIndex,\n\t};\n\n\treturn (\n\t\t<Tooltip\n\t\t\t{ ...restProps }\n\t\t\taria-hidden={ show }\n\t\t\tclassName={ classes }\n\t\t\tposition={ position }\n\t\t\tshow={ show }\n\t\t\trole=\"tooltip\"\n\t\t\tstyle={ styles }\n\t\t>\n\t\t\t{ renderTooltipContent( value ) }\n\t\t</Tooltip>\n\t);\n}\n\nfunction useTooltipPosition( { inputRef, tooltipPosition }: TooltipProps ) {\n\tconst [ position, setPosition ] = useState< string >();\n\n\tconst setTooltipPosition = useCallback( () => {\n\t\tif ( inputRef && inputRef.current ) {\n\t\t\tsetPosition( tooltipPosition );\n\t\t}\n\t}, [ tooltipPosition, inputRef ] );\n\n\tuseEffect( () => {\n\t\tsetTooltipPosition();\n\t}, [ setTooltipPosition ] );\n\n\tuseEffect( () => {\n\t\twindow.addEventListener( 'resize', setTooltipPosition );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'resize', setTooltipPosition );\n\t\t};\n\t} );\n\n\treturn position;\n}\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,WAAW,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;;AAErE;AACA;AACA;AACA,SAASC,OAAO,QAAQ,+BAA+B;AAKvD,eAAe,SAASC,aAAaA,CACpCC,KAAsD,EACrD;EACD,MAAM;IACLC,SAAS;IACTC,QAAQ;IACRC,eAAe;IACfC,IAAI,GAAG,KAAK;IACZC,KAAK,GAAG,CAAC,CAAC;IACVC,KAAK,GAAG,CAAC;IACTC,oBAAoB,GAAKC,CAAC,IAAMA,CAAC;IACjCC,MAAM,GAAG,GAAG;IACZ,GAAGC;EACJ,CAAC,GAAGV,KAAK;EACT,MAAMW,QAAQ,GAAGC,kBAAkB,CAAE;IAAEV,QAAQ;IAAEC;EAAgB,CAAE,CAAC;EACpE,MAAMU,OAAO,GAAGnB,IAAI,CAAE,2BAA2B,EAAEO,SAAU,CAAC;EAC9D,MAAMa,MAAM,GAAG;IACd,GAAGT,KAAK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