@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
@@ -7,7 +7,7 @@ import { forwardRef } from '@wordpress/element';
7
7
  /**
8
8
  * External dependencies
9
9
  */
10
- import classnames from 'classnames';
10
+ import clsx from 'clsx';
11
11
  import { Resizable } from 're-resizable';
12
12
  /**
13
13
  * Internal dependencies
@@ -17,14 +17,14 @@ const HANDLE_CLASS_NAME = 'components-resizable-box__handle';
17
17
  const SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';
18
18
  const CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';
19
19
  const HANDLE_CLASSES = {
20
- top: classnames(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top'),
21
- right: classnames(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-right'),
22
- bottom: classnames(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom'),
23
- left: classnames(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-left'),
24
- topLeft: classnames(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-left'),
25
- topRight: classnames(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-right'),
26
- bottomRight: classnames(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-right'),
27
- bottomLeft: classnames(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-left')
20
+ top: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top'),
21
+ right: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-right'),
22
+ bottom: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom'),
23
+ left: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-left'),
24
+ topLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-left'),
25
+ topRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-right'),
26
+ bottomRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-right'),
27
+ bottomLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-left')
28
28
  };
29
29
 
30
30
  // Removes the inline styles in the drag handles.
@@ -55,7 +55,7 @@ function UnforwardedResizableBox({
55
55
  ...props
56
56
  }, ref) {
57
57
  return createElement(Resizable, {
58
- className: classnames('components-resizable-box__container', showHandle && 'has-show-handle', className),
58
+ className: clsx('components-resizable-box__container', showHandle && 'has-show-handle', className),
59
59
  handleClasses: HANDLE_CLASSES,
60
60
  handleStyles: HANDLE_STYLES,
61
61
  ref: ref,
@@ -1 +1 @@
1
- {"version":3,"names":["forwardRef","classnames","Resizable","ResizeTooltip","HANDLE_CLASS_NAME","SIDE_HANDLE_CLASS_NAME","CORNER_HANDLE_CLASS_NAME","HANDLE_CLASSES","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","HANDLE_STYLES_OVERRIDES","width","undefined","height","HANDLE_STYLES","UnforwardedResizableBox","className","children","showHandle","__experimentalShowTooltip","showTooltip","__experimentalTooltipProps","tooltipProps","props","ref","createElement","handleClasses","handleStyles","ResizableBox"],"sources":["@wordpress/components/src/resizable-box/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { Resizable } from 're-resizable';\nimport type { ResizableProps } from 're-resizable';\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\n\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\n\nconst HANDLE_CLASSES = {\n\ttop: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top'\n\t),\n\tright: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottom: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom'\n\t),\n\tleft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopLeft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopRight: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomRight: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomLeft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-left'\n\t),\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\nconst HANDLE_STYLES = {\n\ttop: HANDLE_STYLES_OVERRIDES,\n\tright: HANDLE_STYLES_OVERRIDES,\n\tbottom: HANDLE_STYLES_OVERRIDES,\n\tleft: HANDLE_STYLES_OVERRIDES,\n\ttopLeft: HANDLE_STYLES_OVERRIDES,\n\ttopRight: HANDLE_STYLES_OVERRIDES,\n\tbottomRight: HANDLE_STYLES_OVERRIDES,\n\tbottomLeft: HANDLE_STYLES_OVERRIDES,\n};\n\ntype ResizableBoxProps = ResizableProps & {\n\tchildren: ReactNode;\n\tshowHandle?: boolean;\n\t__experimentalShowTooltip?: boolean;\n\t__experimentalTooltipProps?: Parameters< typeof ResizeTooltip >[ 0 ];\n};\n\nfunction UnforwardedResizableBox(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tshowHandle = true,\n\t\t__experimentalShowTooltip: showTooltip = false,\n\t\t__experimentalTooltipProps: tooltipProps = {},\n\t\t...props\n\t}: ResizableBoxProps,\n\tref: ForwardedRef< Resizable >\n): JSX.Element {\n\treturn (\n\t\t<Resizable\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-resizable-box__container',\n\t\t\t\tshowHandle && 'has-show-handle',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\thandleClasses={ HANDLE_CLASSES }\n\t\t\thandleStyles={ HANDLE_STYLES }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ showTooltip && <ResizeTooltip { ...tooltipProps } /> }\n\t\t</Resizable>\n\t);\n}\n\nexport const ResizableBox = forwardRef( UnforwardedResizableBox );\n\nexport default ResizableBox;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,UAAU,MAAM,YAAY;AACnC,SA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BAAuB;EAChCH,QAAQ,EAAEG,uBAAuB;EACjCF,WAAW,EAAEE,uBAAuB;EACpCD,UAAU,EAAEC;AACb,CAAC;AASD,SAASK,uBAAuBA,CAC/B;EACCC,SAAS;EACTC,QAAQ;EACRC,UAAU,GAAG,IAAI;EACjBC,yBAAyB,EAAEC,WAAW,GAAG,KAAK;EAC9CC,0BAA0B,EAAEC,YAAY,GAAG,CAAC,CAAC;EAC7C,GAAGC;AACe,CAAC,EACpBC,GAA8B,EAChB;EACd,OACCC,aAAA,CAAC7B,SAAS;IACToB,SAAS,EAAGrB,UAAU,CACrB,qCAAqC,EACrCuB,UAAU,IAAI,iBAAiB,EAC/BF,SACD,CAAG;IACHU,aAAa,EAAGzB,cAAgB;IAChC0B,YAAY,EAAGb,aAAe;IAC9BU,GAAG,EAAGA,GAAK;IAAA,GACND;EAAK,GAERN,QAAQ,EACRG,WAAW,IAAIK,aAAA,CAAC5B,aAAa;IAAA,GAAMyB;EAAY,CAAI,CAC3C,CAAC;AAEd;AAEA,OAAO,MAAMM,YAAY,GAAGlC,UAAU,CAAEqB,uBAAwB,CAAC;AAEjE,eAAea,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["forwardRef","clsx","Resizable","ResizeTooltip","HANDLE_CLASS_NAME","SIDE_HANDLE_CLASS_NAME","CORNER_HANDLE_CLASS_NAME","HANDLE_CLASSES","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","HANDLE_STYLES_OVERRIDES","width","undefined","height","HANDLE_STYLES","UnforwardedResizableBox","className","children","showHandle","__experimentalShowTooltip","showTooltip","__experimentalTooltipProps","tooltipProps","props","ref","createElement","handleClasses","handleStyles","ResizableBox"],"sources":["@wordpress/components/src/resizable-box/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { Resizable } from 're-resizable';\nimport type { ResizableProps } from 're-resizable';\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\n\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\n\nconst HANDLE_CLASSES = {\n\ttop: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top'\n\t),\n\tright: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottom: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom'\n\t),\n\tleft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopLeft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopRight: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomRight: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomLeft: clsx(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-left'\n\t),\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\nconst HANDLE_STYLES = {\n\ttop: HANDLE_STYLES_OVERRIDES,\n\tright: HANDLE_STYLES_OVERRIDES,\n\tbottom: HANDLE_STYLES_OVERRIDES,\n\tleft: HANDLE_STYLES_OVERRIDES,\n\ttopLeft: HANDLE_STYLES_OVERRIDES,\n\ttopRight: HANDLE_STYLES_OVERRIDES,\n\tbottomRight: HANDLE_STYLES_OVERRIDES,\n\tbottomLeft: HANDLE_STYLES_OVERRIDES,\n};\n\ntype ResizableBoxProps = ResizableProps & {\n\tchildren: ReactNode;\n\tshowHandle?: boolean;\n\t__experimentalShowTooltip?: boolean;\n\t__experimentalTooltipProps?: Parameters< typeof ResizeTooltip >[ 0 ];\n};\n\nfunction UnforwardedResizableBox(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tshowHandle = true,\n\t\t__experimentalShowTooltip: showTooltip = false,\n\t\t__experimentalTooltipProps: tooltipProps = {},\n\t\t...props\n\t}: ResizableBoxProps,\n\tref: ForwardedRef< Resizable >\n): JSX.Element {\n\treturn (\n\t\t<Resizable\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-resizable-box__container',\n\t\t\t\tshowHandle && 'has-show-handle',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\thandleClasses={ HANDLE_CLASSES }\n\t\t\thandleStyles={ HANDLE_STYLES }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ showTooltip && <ResizeTooltip { ...tooltipProps } /> }\n\t\t</Resizable>\n\t);\n}\n\nexport const ResizableBox = forwardRef( UnforwardedResizableBox );\n\nexport default ResizableBox;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,IAAI,MAAM,MAAM;AACvB,SAASC,SAAS,QAAQ,cAAc;AAIxC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAE5C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C;AACb,CAAC;AASD,SAASK,uBAAuBA,CAC/B;EACCC,SAAS;EACTC,QAAQ;EACRC,UAAU,GAAG,IAAI;EACjBC,yBAAyB,EAAEC,WAAW,GAAG,KAAK;EAC9CC,0BAA0B,EAAEC,YAAY,GAAG,CAAC,CAAC;EAC7C,GAAGC;AACe,CAAC,EACpBC,GAA8B,EAChB;EACd,OACCC,aAAA,CAAC7B,SAAS;IACToB,SAAS,EAAGrB,IAAI,CACf,qCAAqC,EACrCuB,UAAU,IAAI,iBAAiB,EAC/BF,SACD,CAAG;IACHU,aAAa,EAAGzB,cAAgB;IAChC0B,YAAY,EAAGb,aAAe;IAC9BU,GAAG,EAAGA,GAAK;IAAA,GACND;EAAK,GAERN,QAAQ,EACRG,WAAW,IAAIK,aAAA,CAAC5B,aAAa;IAAA,GAAMyB;EAAY,CAAI,CAC3C,CAAC;AAEd;AAEA,OAAO,MAAMM,YAAY,GAAGlC,UAAU,CAAEqB,uBAAwB,CAAC;AAEjE,eAAea,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
  */
@@ -40,7 +40,7 @@ function ResizeTooltip({
40
40
  if (!isVisible) {
41
41
  return null;
42
42
  }
43
- const classes = classnames('components-resize-tooltip', className);
43
+ const classes = clsx('components-resize-tooltip', className);
44
44
  return createElement(Root, {
45
45
  "aria-hidden": "true",
46
46
  className: classes,
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","forwardRef","Label","useResizeLabel","POSITIONS","Root","noop","ResizeTooltip","axis","className","fadeTimeout","isVisible","labelRef","onResize","position","bottom","showPx","zIndex","props","ref","label","resizeListener","classes","createElement","ForwardedComponent"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { Ref, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Label from './label';\nimport type { Axis, Position } from './utils';\nimport { useResizeLabel, POSITIONS } from './utils';\nimport { Root } from './styles/resize-tooltip.styles';\n\ntype ResizeTooltipProps = React.ComponentProps< typeof Root > & {\n\t'aria-hidden'?: boolean;\n\taxis?: Axis;\n\tclassName?: string;\n\tfadeTimeout?: number;\n\tisVisible?: boolean;\n\tlabelRef?: Ref< HTMLDivElement >;\n\tonResize?: Parameters< typeof useResizeLabel >[ 0 ][ 'onResize' ];\n\tposition?: Position;\n\tshowPx?: boolean;\n\tzIndex?: number;\n};\n\nconst noop = () => {};\n\nfunction ResizeTooltip(\n\t{\n\t\taxis,\n\t\tclassName,\n\t\tfadeTimeout = 180,\n\t\tisVisible = true,\n\t\tlabelRef,\n\t\tonResize = noop,\n\t\tposition = POSITIONS.bottom,\n\t\tshowPx = true,\n\t\tzIndex = 1000,\n\t\t...props\n\t}: ResizeTooltipProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst { label, resizeListener } = useResizeLabel( {\n\t\taxis,\n\t\tfadeTimeout,\n\t\tonResize,\n\t\tshowPx,\n\t\tposition,\n\t} );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst classes = classnames( 'components-resize-tooltip', className );\n\n\treturn (\n\t\t<Root aria-hidden=\"true\" className={ classes } ref={ ref } { ...props }>\n\t\t\t{ resizeListener }\n\t\t\t<Label\n\t\t\t\taria-hidden={ props[ 'aria-hidden' ] }\n\t\t\t\tlabel={ label }\n\t\t\t\tposition={ position }\n\t\t\t\tref={ labelRef }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( ResizeTooltip );\n\nexport default ForwardedComponent;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AAGnC;AAC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ooltip","axis","className","fadeTimeout","isVisible","labelRef","onResize","position","bottom","showPx","zIndex","props","ref","label","resizeListener","classes","createElement","ForwardedComponent"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { Ref, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Label from './label';\nimport type { Axis, Position } from './utils';\nimport { useResizeLabel, POSITIONS } from './utils';\nimport { Root } from './styles/resize-tooltip.styles';\n\ntype ResizeTooltipProps = React.ComponentProps< typeof Root > & {\n\t'aria-hidden'?: boolean;\n\taxis?: Axis;\n\tclassName?: string;\n\tfadeTimeout?: number;\n\tisVisible?: boolean;\n\tlabelRef?: Ref< HTMLDivElement >;\n\tonResize?: Parameters< typeof useResizeLabel >[ 0 ][ 'onResize' ];\n\tposition?: Position;\n\tshowPx?: boolean;\n\tzIndex?: number;\n};\n\nconst noop = () => {};\n\nfunction ResizeTooltip(\n\t{\n\t\taxis,\n\t\tclassName,\n\t\tfadeTimeout = 180,\n\t\tisVisible = true,\n\t\tlabelRef,\n\t\tonResize = noop,\n\t\tposition = POSITIONS.bottom,\n\t\tshowPx = true,\n\t\tzIndex = 1000,\n\t\t...props\n\t}: ResizeTooltipProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst { label, resizeListener } = useResizeLabel( {\n\t\taxis,\n\t\tfadeTimeout,\n\t\tonResize,\n\t\tshowPx,\n\t\tposition,\n\t} );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst classes = clsx( 'components-resize-tooltip', className );\n\n\treturn (\n\t\t<Root aria-hidden=\"true\" className={ classes } ref={ ref } { ...props }>\n\t\t\t{ resizeListener }\n\t\t\t<Label\n\t\t\t\taria-hidden={ props[ 'aria-hidden' ] }\n\t\t\t\tlabel={ label }\n\t\t\t\tposition={ position }\n\t\t\t\tref={ labelRef }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( ResizeTooltip );\n\nexport default ForwardedComponent;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,KAAK,MAAM,SAAS;AAE3B,SAASC,cAAc,EAAEC,SAAS,QAAQ,SAAS;AACnD,SAASC,IAAI,QAAQ,gCAAgC;AAerD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,aAAaA,CACrB;EACCC,IAAI;EACJC,SAAS;EACTC,WAAW,GAAG,GAAG;EACjBC,SAAS,GAAG,IAAI;EAChBC,QAAQ;EACRC,QAAQ,GAAGP,IAAI;EACfQ,QAAQ,GAAGV,SAAS,CAACW,MAAM;EAC3BC,MAAM,GAAG,IAAI;EACbC,MAAM,GAAG,IAAI;EACb,GAAGC;AACgB,CAAC,EACrBC,GAAmC,EACd;EACrB,MAAM;IAAEC,KAAK;IAAEC;EAAe,CAAC,GAAGlB,cAAc,CAAE;IACjDK,IAAI;IACJE,WAAW;IACXG,QAAQ;IACRG,MAAM;IACNF;EACD,CAAE,CAAC;EAEH,IAAK,CAAEH,SAAS,EAAG;IAClB,OAAO,IAAI;EACZ;EAEA,MAAMW,OAAO,GAAGtB,IAAI,CAAE,2BAA2B,EAAES,SAAU,CAAC;EAE9D,OACCc,aAAA,CAAClB,IAAI;IAAC,eAAY,MAAM;IAACI,SAAS,EAAGa,OAAS;IAACH,GAAG,EAAGA,GAAK;IAAA,GAAMD;EAAK,GAClEG,cAAc,EAChBE,aAAA,CAACrB,KAAK;IACL,eAAcgB,KAAK,CAAE,aAAa,CAAI;IACtCE,KAAK,EAAGA,KAAO;IACfN,QAAQ,EAAGA,QAAU;IACrBK,GAAG,EAAGP,QAAU;IAChBK,MAAM,EAAGA;EAAQ,CACjB,CACI,CAAC;AAET;AAEA,MAAMO,kBAAkB,GAAGvB,UAAU,CAAEM,aAAc,CAAC;AAEtD,eAAeiB,kBAAkB","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
@@ -46,7 +46,7 @@ function ResponsiveWrapper({
46
46
  return createElement(TagName, {
47
47
  className: "components-responsive-wrapper"
48
48
  }, createElement("div", null, cloneElement(children, {
49
- className: classnames('components-responsive-wrapper__content', children.props.className),
49
+ className: clsx('components-responsive-wrapper__content', children.props.className),
50
50
  style: {
51
51
  ...children.props.style,
52
52
  aspectRatio
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","cloneElement","Children","ResponsiveWrapper","naturalWidth","naturalHeight","children","isInline","count","TagName","aspectRatio","createElement","className","props","style"],"sources":["@wordpress/components/src/responsive-wrapper/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, Children } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ResponsiveWrapperProps } from './types';\n\n/**\n * A wrapper component that maintains its aspect ratio when resized.\n *\n * ```jsx\n * import { ResponsiveWrapper } from '@wordpress/components';\n *\n * const MyResponsiveWrapper = () => (\n * \t<ResponsiveWrapper naturalWidth={ 2000 } naturalHeight={ 680 }>\n * \t\t<img\n * \t\t\tsrc=\"https://s.w.org/style/images/about/WordPress-logotype-standard.png\"\n * \t\t\talt=\"WordPress\"\n * \t\t/>\n * \t</ResponsiveWrapper>\n * );\n * ```\n */\nfunction ResponsiveWrapper( {\n\tnaturalWidth,\n\tnaturalHeight,\n\tchildren,\n\tisInline = false,\n}: ResponsiveWrapperProps ) {\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn null;\n\t}\n\n\tconst TagName = isInline ? 'span' : 'div';\n\tlet aspectRatio;\n\tif ( naturalWidth && naturalHeight ) {\n\t\taspectRatio = `${ naturalWidth } / ${ naturalHeight }`;\n\t}\n\n\treturn (\n\t\t<TagName className=\"components-responsive-wrapper\">\n\t\t\t<div>\n\t\t\t\t{ cloneElement( children, {\n\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t'components-responsive-wrapper__content',\n\t\t\t\t\t\tchildren.props.className\n\t\t\t\t\t),\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...children.props.style,\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t},\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</TagName>\n\t);\n}\n\nexport default ResponsiveWrapper;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,YAAY,EAAEC,QAAQ,QAAQ,oBAAoB;;AAE3D;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAAE;EAC3BC,YAAY;EACZC,aAAa;EACbC,QAAQ;EACRC,QAAQ,GAAG;AACY,CAAC,EAAG;EAC3B,IAAKL,QAAQ,CAACM,KAAK,CAAEF,QAAS,CAAC,KAAK,CAAC,EAAG;IACvC,OAAO,IAAI;EACZ;EAEA,MAAMG,OAAO,GAAGF,QAAQ,GAAG,MAAM,GAAG,KAAK;EACzC,IAAIG,WAAW;EACf,IAAKN,YAAY,IAAIC,aAAa,EAAG;IACpCK,WAAW,GAAI,GAAGN,YAAc,MAAMC,aAAe,EAAC;EACvD;EAEA,OACCM,aAAA,CAACF,OAAO;IAACG,SAAS,EAAC;EAA+B,GACjDD,aAAA,cACGV,YAAY,CAAEK,QAAQ,EAAE;IACzBM,SAAS,EAAEZ,UAAU,CACpB,wCAAwC,EACxCM,QAAQ,CAACO,KAAK,CAACD,SAChB,CAAC;IACDE,KAAK,EAAE;MACN,GAAGR,QAAQ,CAACO,KAAK,CAACC,KAAK;MACvBJ;IACD;EACD,CAAE,CACE,CACG,CAAC;AAEZ;AAEA,eAAeP,iBAAiB","ignoreList":[]}
1
+ {"version":3,"names":["clsx","cloneElement","Children","ResponsiveWrapper","naturalWidth","naturalHeight","children","isInline","count","TagName","aspectRatio","createElement","className","props","style"],"sources":["@wordpress/components/src/responsive-wrapper/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, Children } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ResponsiveWrapperProps } from './types';\n\n/**\n * A wrapper component that maintains its aspect ratio when resized.\n *\n * ```jsx\n * import { ResponsiveWrapper } from '@wordpress/components';\n *\n * const MyResponsiveWrapper = () => (\n * \t<ResponsiveWrapper naturalWidth={ 2000 } naturalHeight={ 680 }>\n * \t\t<img\n * \t\t\tsrc=\"https://s.w.org/style/images/about/WordPress-logotype-standard.png\"\n * \t\t\talt=\"WordPress\"\n * \t\t/>\n * \t</ResponsiveWrapper>\n * );\n * ```\n */\nfunction ResponsiveWrapper( {\n\tnaturalWidth,\n\tnaturalHeight,\n\tchildren,\n\tisInline = false,\n}: ResponsiveWrapperProps ) {\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn null;\n\t}\n\n\tconst TagName = isInline ? 'span' : 'div';\n\tlet aspectRatio;\n\tif ( naturalWidth && naturalHeight ) {\n\t\taspectRatio = `${ naturalWidth } / ${ naturalHeight }`;\n\t}\n\n\treturn (\n\t\t<TagName className=\"components-responsive-wrapper\">\n\t\t\t<div>\n\t\t\t\t{ cloneElement( children, {\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'components-responsive-wrapper__content',\n\t\t\t\t\t\tchildren.props.className\n\t\t\t\t\t),\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...children.props.style,\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t},\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</TagName>\n\t);\n}\n\nexport default ResponsiveWrapper;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,YAAY,EAAEC,QAAQ,QAAQ,oBAAoB;;AAE3D;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAAE;EAC3BC,YAAY;EACZC,aAAa;EACbC,QAAQ;EACRC,QAAQ,GAAG;AACY,CAAC,EAAG;EAC3B,IAAKL,QAAQ,CAACM,KAAK,CAAEF,QAAS,CAAC,KAAK,CAAC,EAAG;IACvC,OAAO,IAAI;EACZ;EAEA,MAAMG,OAAO,GAAGF,QAAQ,GAAG,MAAM,GAAG,KAAK;EACzC,IAAIG,WAAW;EACf,IAAKN,YAAY,IAAIC,aAAa,EAAG;IACpCK,WAAW,GAAI,GAAGN,YAAc,MAAMC,aAAe,EAAC;EACvD;EAEA,OACCM,aAAA,CAACF,OAAO;IAACG,SAAS,EAAC;EAA+B,GACjDD,aAAA,cACGV,YAAY,CAAEK,QAAQ,EAAE;IACzBM,SAAS,EAAEZ,IAAI,CACd,wCAAwC,EACxCM,QAAQ,CAACO,KAAK,CAACD,SAChB,CAAC;IACDE,KAAK,EAAE;MACN,GAAGR,QAAQ,CAACO,KAAK,CAACC,KAAK;MACvBJ;IACD;EACD,CAAE,CACE,CACG,CAAC;AAEZ;AAEA,eAAeP,iBAAiB","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
@@ -81,7 +81,7 @@ function UnforwardedSearchControl({
81
81
  ref: useMergeRefs([searchRef, forwardedRef]),
82
82
  type: "search",
83
83
  size: size,
84
- className: classnames('components-search-control', className),
84
+ className: clsx('components-search-control', className),
85
85
  onChange: nextValue => onChange(nextValue !== null && nextValue !== void 0 ? nextValue : ''),
86
86
  autoComplete: "off",
87
87
  placeholder: placeholder,
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useInstanceId","useMergeRefs","__","Icon","search","closeSmall","forwardRef","useMemo","useRef","Button","ContextSystemProvider","StyledInputControl","SuffixItemWrapper","SuffixItem","searchRef","value","onChange","onClose","createElement","icon","onReset","current","focus","size","label","onClick","UnforwardedSearchControl","__nextHasNoMarginBottom","className","placeholder","hideLabelFromVision","restProps","forwardedRef","disabled","instanceId","SearchControl","contextValue","BaseControl","_overrides","InputBase","isBorderless","__next40pxDefaultSize","id","ref","type","nextValue","autoComplete","suffix"],"sources":["@wordpress/components/src/search-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { SearchControlProps, SuffixItemProps } from './types';\nimport type { ForwardedRef } from 'react';\nimport { ContextSystemProvider } from '../context';\nimport { StyledInputControl, SuffixItemWrapper } from './styles';\n\nfunction SuffixItem( {\n\tsearchRef,\n\tvalue,\n\tonChange,\n\tonClose,\n}: SuffixItemProps ) {\n\tif ( ! onClose && ! value ) {\n\t\treturn <Icon icon={ search } />;\n\t}\n\n\tconst onReset = () => {\n\t\tonChange( '' );\n\t\tsearchRef.current?.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tsize=\"small\"\n\t\t\ticon={ closeSmall }\n\t\t\tlabel={ onClose ? __( 'Close search' ) : __( 'Reset search' ) }\n\t\t\tonClick={ onClose ?? onReset }\n\t\t/>\n\t);\n}\n\nfunction UnforwardedSearchControl(\n\t{\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tonChange,\n\t\tvalue,\n\t\tlabel = __( 'Search' ),\n\t\tplaceholder = __( 'Search' ),\n\t\thideLabelFromVision = true,\n\t\tonClose,\n\t\tsize = 'default',\n\t\t...restProps\n\t}: Omit<\n\t\tWordPressComponentProps< SearchControlProps, 'input', false >,\n\t\t// TODO: Background styling currently doesn't support a disabled state. Needs design work.\n\t\t'disabled'\n\t>,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\t// @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n\t// Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n\tdelete restProps.disabled;\n\n\tconst searchRef = useRef< HTMLInputElement >( null );\n\tconst instanceId = useInstanceId(\n\t\tSearchControl,\n\t\t'components-search-control'\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\t// Overrides the underlying BaseControl `__nextHasNoMarginBottom` via the context system\n\t\t\t// to provide backwards compatibile margin for SearchControl.\n\t\t\t// (In a standard InputControl, the BaseControl `__nextHasNoMarginBottom` is always set to true.)\n\t\t\tBaseControl: { _overrides: { __nextHasNoMarginBottom } },\n\t\t\t// `isBorderless` is still experimental and not a public prop for InputControl yet.\n\t\t\tInputBase: { isBorderless: true },\n\t\t} ),\n\t\t[ __nextHasNoMarginBottom ]\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextValue }>\n\t\t\t<StyledInputControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tid={ instanceId }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabel={ label }\n\t\t\t\tref={ useMergeRefs( [ searchRef, forwardedRef ] ) }\n\t\t\t\ttype=\"search\"\n\t\t\t\tsize={ size }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-search-control',\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\tonChange={ ( nextValue?: string ) =>\n\t\t\t\t\tonChange( nextValue ?? '' )\n\t\t\t\t}\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tvalue={ value ?? '' }\n\t\t\t\tsuffix={\n\t\t\t\t\t<SuffixItemWrapper size={ size }>\n\t\t\t\t\t\t<SuffixItem\n\t\t\t\t\t\t\tsearchRef={ searchRef }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SuffixItemWrapper>\n\t\t\t\t}\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * __nextHasNoMarginBottom\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef( UnforwardedSearchControl );\n\nexport default SearchControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;AAChE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,EAAEC,UAAU,QAAQ,kBAAkB;AAC3D,SAASC,UAAU,EAAEC,OAAO,EAAEC,MAAM,QAAQ,oBAAoB;;AAEhE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAI9B,SAASC,qBAAqB,QAAQ,YAAY;AAClD,SAASC,kBAAkB,EAAEC,iBAAiB,QAAQ,UAAU;AAEhE,SAASC,UAAUA,CAAE;EACpBC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC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CAAC;EAED,OACCT,aAAA,CAACR,qBAAqB;IAACK,KAAK,EAAGqB;EAAc,GAC5ClB,aAAA,CAACP,kBAAkB;IAClB8B,qBAAqB;IACrBC,EAAE,EAAGR,UAAY;IACjBJ,mBAAmB,EAAGA,mBAAqB;IAC3CN,KAAK,EAAGA,KAAO;IACfmB,GAAG,EAAG1C,YAAY,CAAE,CAAEa,SAAS,EAAEkB,YAAY,CAAG,CAAG;IACnDY,IAAI,EAAC,QAAQ;IACbrB,IAAI,EAAGA,IAAM;IACbK,SAAS,EAAG7B,UAAU,CACrB,2BAA2B,EAC3B6B,SACD,CAAG;IACHZ,QAAQ,EAAK6B,SAAkB,IAC9B7B,QAAQ,CAAE6B,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAG,CAC1B;IACDC,YAAY,EAAC,KAAK;IAClBjB,WAAW,EAAGA,WAAa;IAC3Bd,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAI;IACrBgC,MAAM,EACL7B,aAAA,CAACN,iBAAiB;MAACW,IAAI,EAAGA;IAAM,GAC/BL,aAAA,CAACL,UAAU;MACVC,SAAS,EAAGA,SAAW;MACvBC,KAAK,EAAGA,KAAO;MACfC,QAAQ,EAAGA,QAAU;MACrBC,OAAO,EAAGA;IAAS,CACnB,CACiB,CACnB;IAAA,GACIc;EAAS,CACd,CACqB,CAAC;AAE1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,aAAa,GAAG7B,UAAU,CAAEoB,wBAAyB,CAAC;AAEnE,eAAeS,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useInstanceId","useMergeRefs","__","Icon","search","closeSmall","forwardRef","useMemo","useRef","Button","ContextSystemProvider","StyledInputControl","SuffixItemWrapper","SuffixItem","searchRef","value","onChange","onClose","createElement","icon","onReset","current","focus","size","label","onClick","UnforwardedSearchControl","__nextHasNoMarginBottom","className","placeholder","hideLabelFromVision","restProps","forwardedRef","disabled","instanceId","SearchControl","contextValue","BaseControl","_overrides","InputBase","isBorderless","__next40pxDefaultSize","id","ref","type","nextValue","autoComplete","suffix"],"sources":["@wordpress/components/src/search-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { SearchControlProps, SuffixItemProps } from './types';\nimport type { ForwardedRef } from 'react';\nimport { ContextSystemProvider } from '../context';\nimport { StyledInputControl, SuffixItemWrapper } from './styles';\n\nfunction SuffixItem( {\n\tsearchRef,\n\tvalue,\n\tonChange,\n\tonClose,\n}: SuffixItemProps ) {\n\tif ( ! onClose && ! value ) {\n\t\treturn <Icon icon={ search } />;\n\t}\n\n\tconst onReset = () => {\n\t\tonChange( '' );\n\t\tsearchRef.current?.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tsize=\"small\"\n\t\t\ticon={ closeSmall }\n\t\t\tlabel={ onClose ? __( 'Close search' ) : __( 'Reset search' ) }\n\t\t\tonClick={ onClose ?? onReset }\n\t\t/>\n\t);\n}\n\nfunction UnforwardedSearchControl(\n\t{\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tonChange,\n\t\tvalue,\n\t\tlabel = __( 'Search' ),\n\t\tplaceholder = __( 'Search' ),\n\t\thideLabelFromVision = true,\n\t\tonClose,\n\t\tsize = 'default',\n\t\t...restProps\n\t}: Omit<\n\t\tWordPressComponentProps< SearchControlProps, 'input', false >,\n\t\t// TODO: Background styling currently doesn't support a disabled state. Needs design work.\n\t\t'disabled'\n\t>,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\t// @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n\t// Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n\tdelete restProps.disabled;\n\n\tconst searchRef = useRef< HTMLInputElement >( null );\n\tconst instanceId = useInstanceId(\n\t\tSearchControl,\n\t\t'components-search-control'\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\t// Overrides the underlying BaseControl `__nextHasNoMarginBottom` via the context system\n\t\t\t// to provide backwards compatibile margin for SearchControl.\n\t\t\t// (In a standard InputControl, the BaseControl `__nextHasNoMarginBottom` is always set to true.)\n\t\t\tBaseControl: { _overrides: { __nextHasNoMarginBottom } },\n\t\t\t// `isBorderless` is still experimental and not a public prop for InputControl yet.\n\t\t\tInputBase: { isBorderless: true },\n\t\t} ),\n\t\t[ __nextHasNoMarginBottom ]\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextValue }>\n\t\t\t<StyledInputControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tid={ instanceId }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabel={ label }\n\t\t\t\tref={ useMergeRefs( [ searchRef, forwardedRef ] ) }\n\t\t\t\ttype=\"search\"\n\t\t\t\tsize={ size }\n\t\t\t\tclassName={ clsx( 'components-search-control', className ) }\n\t\t\t\tonChange={ ( nextValue?: string ) =>\n\t\t\t\t\tonChange( nextValue ?? '' )\n\t\t\t\t}\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tvalue={ value ?? '' }\n\t\t\t\tsuffix={\n\t\t\t\t\t<SuffixItemWrapper size={ size }>\n\t\t\t\t\t\t<SuffixItem\n\t\t\t\t\t\t\tsearchRef={ searchRef }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SuffixItemWrapper>\n\t\t\t\t}\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * __nextHasNoMarginBottom\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef( UnforwardedSearchControl );\n\nexport default SearchControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;AAChE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,EAAEC,UAAU,QAAQ,kBAAkB;AAC3D,SAASC,UAAU,EAAEC,OAAO,EAAEC,MAAM,QAAQ,oBAAoB;;AAEhE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAI9B,SAASC,qBAAqB,QAAQ,YAAY;AAClD,SAASC,kBAAkB,EAAEC,iBAAiB,QAAQ,UAAU;AAEhE,SAASC,UAAUA,CAAE;EACpBC,SAAS;EACTC,KAAK;EACLC,QAAQ;EACRC;AACgB,CAAC,EAAG;EACpB,IAAK,CAAEA,OAAO,IAAI,CAAEF,KAAK,EAAG;IAC3B,OAAOG,aAAA,CAACf,IAAI;MAACgB,IAAI,EAAGf;IAAQ,CAAE,CAAC;EAChC;EAEA,MAAMgB,OAAO,GAAGA,CAAA,KAAM;IACrBJ,QAAQ,CAAE,EAAG,CAAC;IACdF,SAAS,CAACO,OAAO,EAAEC,KAAK,CAAC,CAAC;EAC3B,CAAC;EAED,OACCJ,aAAA,CAACT,MAAM;IACNc,IAAI,EAAC,OAAO;IACZJ,IAAI,EAAGd,UAAY;IAC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AE6B,SAAU,CAAG;IAC5DZ,QAAQ,EAAK6B,SAAkB,IAC9B7B,QAAQ,CAAE6B,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,EAAG,CAC1B;IACDC,YAAY,EAAC,KAAK;IAClBjB,WAAW,EAAGA,WAAa;IAC3Bd,KAAK,EAAGA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAI,EAAI;IACrBgC,MAAM,EACL7B,aAAA,CAACN,iBAAiB;MAACW,IAAI,EAAGA;IAAM,GAC/BL,aAAA,CAACL,UAAU;MACVC,SAAS,EAAGA,SAAW;MACvBC,KAAK,EAAGA,KAAO;MACfC,QAAQ,EAAGA,QAAU;MACrBC,OAAO,EAAGA;IAAS,CACnB,CACiB,CACnB;IAAA,GACIc;EAAS,CACd,CACqB,CAAC;AAE1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,aAAa,GAAG7B,UAAU,CAAEoB,wBAAyB,CAAC;AAEnE,eAAeS,aAAa","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
@@ -68,7 +68,7 @@ function UnforwardedSelectControl(props, ref) {
68
68
  event
69
69
  });
70
70
  };
71
- const classes = classNames('components-select-control', className);
71
+ const classes = clsx('components-select-control', className);
72
72
  return createElement(BaseControl, {
73
73
  help: help,
74
74
  id: id,
@@ -1 +1 @@
1
- {"version":3,"names":["classNames","useInstanceId","forwardRef","BaseControl","InputBase","Select","SelectControlChevronDown","useDeprecated36pxDefaultSizeProp","useUniqueId","idProp","instanceId","SelectControl","id","UnforwardedSelectControl","props","ref","className","disabled","help","hideLabelFromVision","label","multiple","onChange","options","size","value","valueProp","labelPosition","children","prefix","suffix","__next40pxDefaultSize","__nextHasNoMarginBottom","restProps","helpId","undefined","length","handleOnChange","event","selectedOptions","Array","from","target","filter","selected","newValues","map","classes","createElement","selectSize","option","index","key","hidden"],"sources":["@wordpress/components/src/select-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport InputBase from '../input-control/input-base';\nimport { Select } from './styles/select-control-styles';\nimport type { WordPressComponentProps } from '../context';\nimport type { SelectControlProps } from './types';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( SelectControl );\n\tconst id = `inspector-select-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nfunction UnforwardedSelectControl(\n\tprops: WordPressComponentProps< SelectControlProps, 'select', false >,\n\tref: React.ForwardedRef< HTMLSelectElement >\n) {\n\tconst {\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision,\n\t\tid: idProp,\n\t\tlabel,\n\t\tmultiple = false,\n\t\tonChange,\n\t\toptions = [],\n\t\tsize = 'default',\n\t\tvalue: valueProp,\n\t\tlabelPosition = 'top',\n\t\tchildren,\n\t\tprefix,\n\t\tsuffix,\n\t\t__next40pxDefaultSize = false,\n\t\t__nextHasNoMarginBottom = false,\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\tconst id = useUniqueId( idProp );\n\tconst helpId = help ? `${ id }__help` : undefined;\n\n\t// Disable reason: A select with an onchange throws a warning.\n\tif ( ! options?.length && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst handleOnChange = (\n\t\tevent: React.ChangeEvent< HTMLSelectElement >\n\t) => {\n\t\tif ( props.multiple ) {\n\t\t\tconst selectedOptions = Array.from( event.target.options ).filter(\n\t\t\t\t( { selected } ) => selected\n\t\t\t);\n\t\t\tconst newValues = selectedOptions.map( ( { value } ) => value );\n\t\t\tprops.onChange?.( newValues, { event } );\n\t\t\treturn;\n\t\t}\n\n\t\tprops.onChange?.( event.target.value, { event } );\n\t};\n\n\tconst classes = classNames( 'components-select-control', className );\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t>\n\t\t\t<InputBase\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tlabel={ label }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={\n\t\t\t\t\tsuffix || ( ! multiple && <SelectControlChevronDown /> )\n\t\t\t\t}\n\t\t\t\tprefix={ prefix }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t<Select\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\taria-describedby={ helpId }\n\t\t\t\t\tclassName=\"components-select-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\tvalue={ valueProp }\n\t\t\t\t>\n\t\t\t\t\t{ children ||\n\t\t\t\t\t\toptions.map( ( option, index ) => {\n\t\t\t\t\t\t\tconst key =\n\t\t\t\t\t\t\t\toption.id ||\n\t\t\t\t\t\t\t\t`${ option.label }-${ option.value }-${ index }`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<option\n\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\t\t\tdisabled={ option.disabled }\n\t\t\t\t\t\t\t\t\thidden={ option.hidden }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</InputBase>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef( UnforwardedSelectControl );\n\nexport default SelectControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,iBAAiB;AACzC,OAAOC,SAAS,MAAM,6BAA6B;AACnD,SAASC,MAAM,QAAQ,gCAAgC;AAGvD,OAAOC,wBAAwB,MAAM,gBAAgB;AACrD,SAASC,gCAAgC,QAAQ,+BAA+B;AAEhF,SAASC,WAAWA,CAAEC,MAAe,EAAG;EACvC,MAAMC,UAAU,GAAGT,aAAa,CAAEU,aAAc,CAAC;EACjD,MAAMC,EAAE,GAAI,4BAA4BF,UAAY,EAAC;EAErD,OAAOD,MAAM,IAAIG,EAAE;AACpB;AAEA,SAASC,wBAAwBA,CAChCC,KAAqE,EACrEC,GAA4C,EAC3C;EACD,M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ACC,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMT,aAAa,GAAGT,UAAU,CAAEW,wBAAyB,CAAC;AAEnE,eAAeF,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useInstanceId","forwardRef","BaseControl","InputBase","Select","SelectControlChevronDown","useDeprecated36pxDefaultSizeProp","useUniqueId","idProp","instanceId","SelectControl","id","UnforwardedSelectControl","props","ref","className","disabled","help","hideLabelFromVision","label","multiple","onChange","options","size","value","valueProp","labelPosition","children","prefix","suffix","__next40pxDefaultSize","__nextHasNoMarginBottom","restProps","helpId","undefined","length","handleOnChange","event","selectedOptions","Array","from","target","filter","selected","newValues","map","classes","createElement","selectSize","option","index","key","hidden"],"sources":["@wordpress/components/src/select-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport InputBase from '../input-control/input-base';\nimport { Select } from './styles/select-control-styles';\nimport type { WordPressComponentProps } from '../context';\nimport type { SelectControlProps } from './types';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( SelectControl );\n\tconst id = `inspector-select-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nfunction UnforwardedSelectControl(\n\tprops: WordPressComponentProps< SelectControlProps, 'select', false >,\n\tref: React.ForwardedRef< HTMLSelectElement >\n) {\n\tconst {\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision,\n\t\tid: idProp,\n\t\tlabel,\n\t\tmultiple = false,\n\t\tonChange,\n\t\toptions = [],\n\t\tsize = 'default',\n\t\tvalue: valueProp,\n\t\tlabelPosition = 'top',\n\t\tchildren,\n\t\tprefix,\n\t\tsuffix,\n\t\t__next40pxDefaultSize = false,\n\t\t__nextHasNoMarginBottom = false,\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\tconst id = useUniqueId( idProp );\n\tconst helpId = help ? `${ id }__help` : undefined;\n\n\t// Disable reason: A select with an onchange throws a warning.\n\tif ( ! options?.length && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst handleOnChange = (\n\t\tevent: React.ChangeEvent< HTMLSelectElement >\n\t) => {\n\t\tif ( props.multiple ) {\n\t\t\tconst selectedOptions = Array.from( event.target.options ).filter(\n\t\t\t\t( { selected } ) => selected\n\t\t\t);\n\t\t\tconst newValues = selectedOptions.map( ( { value } ) => value );\n\t\t\tprops.onChange?.( newValues, { event } );\n\t\t\treturn;\n\t\t}\n\n\t\tprops.onChange?.( event.target.value, { event } );\n\t};\n\n\tconst classes = clsx( 'components-select-control', className );\n\n\treturn (\n\t\t<BaseControl\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t>\n\t\t\t<InputBase\n\t\t\t\tclassName={ classes }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tlabel={ label }\n\t\t\t\tsize={ size }\n\t\t\t\tsuffix={\n\t\t\t\t\tsuffix || ( ! multiple && <SelectControlChevronDown /> )\n\t\t\t\t}\n\t\t\t\tprefix={ prefix }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t<Select\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t\t\taria-describedby={ helpId }\n\t\t\t\t\tclassName=\"components-select-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tselectSize={ size }\n\t\t\t\t\tvalue={ valueProp }\n\t\t\t\t>\n\t\t\t\t\t{ children ||\n\t\t\t\t\t\toptions.map( ( option, index ) => {\n\t\t\t\t\t\t\tconst key =\n\t\t\t\t\t\t\t\toption.id ||\n\t\t\t\t\t\t\t\t`${ option.label }-${ option.value }-${ index }`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<option\n\t\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\t\t\tdisabled={ option.disabled }\n\t\t\t\t\t\t\t\t\thidden={ option.hidden }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t</Select>\n\t\t\t</InputBase>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef( UnforwardedSelectControl );\n\nexport default SelectControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD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M;IACnBC,KAAK,EAAGC;EAAW,GAEjBE,QAAQ,IACTL,OAAO,CAACuB,GAAG,CAAE,CAAEI,MAAM,EAAEC,KAAK,KAAM;IACjC,MAAMC,GAAG,GACRF,MAAM,CAACtC,EAAE,IACR,GAAGsC,MAAM,CAAC9B,KAAO,IAAI8B,MAAM,CAACzB,KAAO,IAAI0B,KAAO,EAAC;IAEjD,OACCH,aAAA;MACCI,GAAG,EAAGA,GAAK;MACX3B,KAAK,EAAGyB,MAAM,CAACzB,KAAO;MACtBR,QAAQ,EAAGiC,MAAM,CAACjC,QAAU;MAC5BoC,MAAM,EAAGH,MAAM,CAACG;IAAQ,GAEtBH,MAAM,CAAC9B,KACF,CAAC;EAEX,CAAE,CACI,CACE,CACC,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMT,aAAa,GAAGT,UAAU,CAAEW,wBAAyB,CAAC;AAEnE,eAAeF,aAAa","ignoreList":[]}
@@ -3,7 +3,7 @@ import { createElement } from "react";
3
3
  * External dependencies
4
4
  */
5
5
 
6
- import classnames from 'classnames';
6
+ import clsx from 'clsx';
7
7
 
8
8
  /**
9
9
  * WordPress dependencies
@@ -90,7 +90,7 @@ function UnforwardedSnackbar({
90
90
  }, NOTICE_TIMEOUT);
91
91
  return () => clearTimeout(timeoutHandle);
92
92
  }, [explicitDismiss]);
93
- const classes = classnames(className, 'components-snackbar', {
93
+ const classes = clsx(className, 'components-snackbar', {
94
94
  'components-snackbar-explicit-dismiss': !!explicitDismiss
95
95
  });
96
96
  if (actions && actions.length > 1) {
@@ -99,7 +99,7 @@ function UnforwardedSnackbar({
99
99
  // return first element only while keeping it inside an array
100
100
  actions = [actions[0]];
101
101
  }
102
- const snackbarContentClassnames = classnames('components-snackbar__content', {
102
+ const snackbarContentClassnames = clsx('components-snackbar__content', {
103
103
  'components-snackbar__content-with-icon': !!icon
104
104
  });
105
105
  return createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","speak","useEffect","useLayoutEffect","useRef","forwardRef","renderToString","__","warning","Button","NOTICE_TIMEOUT","useSpokenMessage","message","politeness","spokenMessage","UnforwardedSnackbar","className","children","actions","onRemove","icon","explicitDismiss","onDismiss","listRef","ref","dismissMe","event","preventDefault","current","focus","onActionClick","onClick","stopPropagation","callbackRefs","timeoutHandle","setTimeout","clearTimeout","classes","length","SCRIPT_DEBUG","snackbarContentClassnames","createElement","undefined","tabIndex","role","onKeyPress","map","label","url","index","key","href","variant","Snackbar"],"sources":["@wordpress/components/src/snackbar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, KeyboardEvent, MouseEvent } from 'react';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tforwardRef,\n\trenderToString,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { SnackbarProps } from './types';\nimport type { NoticeAction } from '../notice/types';\nimport type { WordPressComponentProps } from '../context';\n\nconst NOTICE_TIMEOUT = 10000;\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param message Message to announce.\n * @param politeness Politeness to announce.\n */\nfunction useSpokenMessage(\n\tmessage: SnackbarProps[ 'spokenMessage' ],\n\tpoliteness: NonNullable< SnackbarProps[ 'politeness' ] >\n) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction UnforwardedSnackbar(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tspokenMessage = children,\n\t\tpoliteness = 'polite',\n\t\tactions = [],\n\t\tonRemove,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\t// onDismiss is a callback executed when the snackbar is dismissed.\n\t\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t\t// actually the function to call to remove the snackbar from the UI.\n\t\tonDismiss,\n\t\tlistRef,\n\t}: WordPressComponentProps< SnackbarProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tfunction dismissMe( event: KeyboardEvent | MouseEvent ) {\n\t\tif ( event && event.preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\t// Prevent focus loss by moving it to the list element.\n\t\tlistRef?.current?.focus();\n\n\t\tonDismiss?.();\n\t\tonRemove?.();\n\t}\n\n\tfunction onActionClick(\n\t\tevent: MouseEvent< HTMLButtonElement >,\n\t\tonClick: NoticeAction[ 'onClick' ]\n\t) {\n\t\tevent.stopPropagation();\n\n\t\tonRemove?.();\n\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\t// The `onDismiss/onRemove` can have unstable references,\n\t// trigger side-effect cleanup, and reset timers.\n\tconst callbackRefs = useRef( { onDismiss, onRemove } );\n\tuseLayoutEffect( () => {\n\t\tcallbackRefs.current = { onDismiss, onRemove };\n\t} );\n\n\tuseEffect( () => {\n\t\t// Only set up the timeout dismiss if we're not explicitly dismissing.\n\t\tconst timeoutHandle = setTimeout( () => {\n\t\t\tif ( ! explicitDismiss ) {\n\t\t\t\tcallbackRefs.current.onDismiss?.();\n\t\t\t\tcallbackRefs.current.onRemove?.();\n\t\t\t}\n\t\t}, NOTICE_TIMEOUT );\n\n\t\treturn () => clearTimeout( timeoutHandle );\n\t}, [ explicitDismiss ] );\n\n\tconst classes = classnames( className, 'components-snackbar', {\n\t\t'components-snackbar-explicit-dismiss': !! explicitDismiss,\n\t} );\n\tif ( actions && actions.length > 1 ) {\n\t\t// We need to inform developers that snackbar only accepts 1 action.\n\t\twarning(\n\t\t\t'Snackbar can only have one action. Use Notice if your message requires many actions.'\n\t\t);\n\t\t// return first element only while keeping it inside an array\n\t\tactions = [ actions[ 0 ] ];\n\t}\n\n\tconst snackbarContentClassnames = classnames(\n\t\t'components-snackbar__content',\n\t\t{\n\t\t\t'components-snackbar__content-with-icon': !! icon,\n\t\t}\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ classes }\n\t\t\tonClick={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\ttabIndex={ 0 }\n\t\t\trole={ ! explicitDismiss ? 'button' : undefined }\n\t\t\tonKeyPress={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\taria-label={\n\t\t\t\t! explicitDismiss ? __( 'Dismiss this notice' ) : undefined\n\t\t\t}\n\t\t\tdata-testid=\"snackbar\"\n\t\t>\n\t\t\t<div className={ snackbarContentClassnames }>\n\t\t\t\t{ icon && (\n\t\t\t\t\t<div className=\"components-snackbar__icon\">{ icon }</div>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ actions.map( ( { label, onClick, url }, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\tevent: MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t) => onActionClick( event, onClick ) }\n\t\t\t\t\t\t\tclassName=\"components-snackbar__action\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t\t{ explicitDismiss && (\n\t\t\t\t\t<span\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\taria-label={ __( 'Dismiss this notice' ) }\n\t\t\t\t\t\ttabIndex={ 0 }\n\t\t\t\t\t\tclassName=\"components-snackbar__dismiss-button\"\n\t\t\t\t\t\tonClick={ dismissMe }\n\t\t\t\t\t\tonKeyPress={ dismissMe }\n\t\t\t\t\t>\n\t\t\t\t\t\t&#x2715;\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * A Snackbar displays a succinct message that is cleared out after a small delay.\n *\n * It can also offer the user options, like viewing a published post.\n * But these options should also be available elsewhere in the UI.\n *\n * ```jsx\n * const MySnackbarNotice = () => (\n * <Snackbar>Post published successfully.</Snackbar>\n * );\n * ```\n */\nexport const Snackbar = forwardRef( UnforwardedSnackbar );\n\nexport default Snackbar;\n"],"mappings":";AAAA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SACCC,SAAS,EACTC,eAAe,EACfC,MAAM,EACNC,UAAU,EACVC,cAAc,QACR,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAK9B,MAAMC,cAAc,GAAG,KAAK;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACxBC,OAAyC,EACzCC,UAAwD,EACvD;EACD,MAAMC,aAAa,GAClB,OAAOF,OAAO,KAAK,QAAQ,GAAGA,OAAO,GAAGN,cAAc,CAAEM,OAAQ,CAAC;EAElEV,SAAS,CAAE,MAAM;IAChB,IAAKY,aAAa,EAAG;MACpBb,KAAK,CAAEa,aAAa,EAAED,UAAW,CAAC;IACnC;EACD,CAAC,EAAE,CAAEC,aAAa,EAAED,UAAU,CAAG,CAAC;AACnC;AAEA,SAASE,mBAAmBA,CAC3B;EACCC,SAAS;EACTC,QAAQ;EACRH,aAAa,GAAGG,QAAQ;EACxBJ,UAAU,GAAG,QAAQ;EACrBK,O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IAChBoB,aAAA;IACCG,IAAI,EAAC,QAAQ;IACb,cAAarC,EAAE,CAAE,qBAAsB,CAAG;IAC1CoC,QAAQ,EAAG,CAAG;IACd3B,SAAS,EAAC,qCAAqC;IAC/Ce,OAAO,EAAGN,SAAW;IACrBoB,UAAU,EAAGpB;EAAW,GACxB,QAEK,CAEH,CACD,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM4B,QAAQ,GAAGhD,UAAU,CAAEU,mBAAoB,CAAC;AAEzD,eAAesC,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["clsx","speak","useEffect","useLayoutEffect","useRef","forwardRef","renderToString","__","warning","Button","NOTICE_TIMEOUT","useSpokenMessage","message","politeness","spokenMessage","UnforwardedSnackbar","className","children","actions","onRemove","icon","explicitDismiss","onDismiss","listRef","ref","dismissMe","event","preventDefault","current","focus","onActionClick","onClick","stopPropagation","callbackRefs","timeoutHandle","setTimeout","clearTimeout","classes","length","SCRIPT_DEBUG","snackbarContentClassnames","createElement","undefined","tabIndex","role","onKeyPress","map","label","url","index","key","href","variant","Snackbar"],"sources":["@wordpress/components/src/snackbar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, KeyboardEvent, MouseEvent } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tforwardRef,\n\trenderToString,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { SnackbarProps } from './types';\nimport type { NoticeAction } from '../notice/types';\nimport type { WordPressComponentProps } from '../context';\n\nconst NOTICE_TIMEOUT = 10000;\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param message Message to announce.\n * @param politeness Politeness to announce.\n */\nfunction useSpokenMessage(\n\tmessage: SnackbarProps[ 'spokenMessage' ],\n\tpoliteness: NonNullable< SnackbarProps[ 'politeness' ] >\n) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction UnforwardedSnackbar(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tspokenMessage = children,\n\t\tpoliteness = 'polite',\n\t\tactions = [],\n\t\tonRemove,\n\t\ticon = null,\n\t\texplicitDismiss = false,\n\t\t// onDismiss is a callback executed when the snackbar is dismissed.\n\t\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t\t// actually the function to call to remove the snackbar from the UI.\n\t\tonDismiss,\n\t\tlistRef,\n\t}: WordPressComponentProps< SnackbarProps, 'div' >,\n\tref: ForwardedRef< any >\n) {\n\tfunction dismissMe( event: KeyboardEvent | MouseEvent ) {\n\t\tif ( event && event.preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\t// Prevent focus loss by moving it to the list element.\n\t\tlistRef?.current?.focus();\n\n\t\tonDismiss?.();\n\t\tonRemove?.();\n\t}\n\n\tfunction onActionClick(\n\t\tevent: MouseEvent< HTMLButtonElement >,\n\t\tonClick: NoticeAction[ 'onClick' ]\n\t) {\n\t\tevent.stopPropagation();\n\n\t\tonRemove?.();\n\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\t// The `onDismiss/onRemove` can have unstable references,\n\t// trigger side-effect cleanup, and reset timers.\n\tconst callbackRefs = useRef( { onDismiss, onRemove } );\n\tuseLayoutEffect( () => {\n\t\tcallbackRefs.current = { onDismiss, onRemove };\n\t} );\n\n\tuseEffect( () => {\n\t\t// Only set up the timeout dismiss if we're not explicitly dismissing.\n\t\tconst timeoutHandle = setTimeout( () => {\n\t\t\tif ( ! explicitDismiss ) {\n\t\t\t\tcallbackRefs.current.onDismiss?.();\n\t\t\t\tcallbackRefs.current.onRemove?.();\n\t\t\t}\n\t\t}, NOTICE_TIMEOUT );\n\n\t\treturn () => clearTimeout( timeoutHandle );\n\t}, [ explicitDismiss ] );\n\n\tconst classes = clsx( className, 'components-snackbar', {\n\t\t'components-snackbar-explicit-dismiss': !! explicitDismiss,\n\t} );\n\tif ( actions && actions.length > 1 ) {\n\t\t// We need to inform developers that snackbar only accepts 1 action.\n\t\twarning(\n\t\t\t'Snackbar can only have one action. Use Notice if your message requires many actions.'\n\t\t);\n\t\t// return first element only while keeping it inside an array\n\t\tactions = [ actions[ 0 ] ];\n\t}\n\n\tconst snackbarContentClassnames = clsx( 'components-snackbar__content', {\n\t\t'components-snackbar__content-with-icon': !! icon,\n\t} );\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ classes }\n\t\t\tonClick={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\ttabIndex={ 0 }\n\t\t\trole={ ! explicitDismiss ? 'button' : undefined }\n\t\t\tonKeyPress={ ! explicitDismiss ? dismissMe : undefined }\n\t\t\taria-label={\n\t\t\t\t! explicitDismiss ? __( 'Dismiss this notice' ) : undefined\n\t\t\t}\n\t\t\tdata-testid=\"snackbar\"\n\t\t>\n\t\t\t<div className={ snackbarContentClassnames }>\n\t\t\t\t{ icon && (\n\t\t\t\t\t<div className=\"components-snackbar__icon\">{ icon }</div>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t\t{ actions.map( ( { label, onClick, url }, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\tevent: MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t) => onActionClick( event, onClick ) }\n\t\t\t\t\t\t\tclassName=\"components-snackbar__action\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t\t{ explicitDismiss && (\n\t\t\t\t\t<span\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\taria-label={ __( 'Dismiss this notice' ) }\n\t\t\t\t\t\ttabIndex={ 0 }\n\t\t\t\t\t\tclassName=\"components-snackbar__dismiss-button\"\n\t\t\t\t\t\tonClick={ dismissMe }\n\t\t\t\t\t\tonKeyPress={ dismissMe }\n\t\t\t\t\t>\n\t\t\t\t\t\t&#x2715;\n\t\t\t\t\t</span>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * A Snackbar displays a succinct message that is cleared out after a small delay.\n *\n * It can also offer the user options, like viewing a published post.\n * But these options should also be available elsewhere in the UI.\n *\n * ```jsx\n * const MySnackbarNotice = () => (\n * <Snackbar>Post published successfully.</Snackbar>\n * );\n * ```\n */\nexport const Snackbar = forwardRef( UnforwardedSnackbar );\n\nexport default Snackbar;\n"],"mappings":";AAAA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,KAAK,QAAQ,iBAAiB;AACvC,SACCC,SAAS,EACTC,eAAe,EACfC,MAAM,EACNC,UAAU,EACVC,cAAc,QACR,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,OAAOC,OAAO,MAAM,oBAAoB;;AAExC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAK9B,MAAMC,cAAc,GAAG,KAAK;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACxBC,OAAyC,EACzCC,UAAwD,EACvD;EACD,MAAMC,aAAa,GAClB,OAAOF,OAAO,KAAK,QAAQ,GAAGA,OAAO,GAAGN,cAAc,CAAEM,OAA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I,CAAC,EAAEC,KAAK,KAAM;IACpD,OACCR,aAAA,CAAChC,MAAM;MACNyC,GAAG,EAAGD,KAAO;MACbE,IAAI,EAAGH,GAAK;MACZI,OAAO,EAAC,UAAU;MAClBrB,OAAO,EACNL,KAAsC,IAClCI,aAAa,CAAEJ,KAAK,EAAEK,OAAQ,CAAG;MACtCf,SAAS,EAAC;IAA6B,GAErC+B,KACK,CAAC;EAEX,CAAE,CAAC,EACD1B,eAAe,IAChBoB,aAAA;IACCG,IAAI,EAAC,QAAQ;IACb,cAAarC,EAAE,CAAE,qBAAsB,CAAG;IAC1CoC,QAAQ,EAAG,CAAG;IACd3B,SAAS,EAAC,qCAAqC;IAC/Ce,OAAO,EAAGN,SAAW;IACrBoB,UAAU,EAAGpB;EAAW,GACxB,QAEK,CAEH,CACD,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM4B,QAAQ,GAAGhD,UAAU,CAAEU,mBAAoB,CAAC;AAEzD,eAAesC,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
@@ -67,7 +67,7 @@ export function SnackbarList({
67
67
  }) {
68
68
  const listRef = useRef(null);
69
69
  const isReducedMotion = useReducedMotion();
70
- className = classnames('components-snackbar-list', className);
70
+ className = clsx('components-snackbar-list', className);
71
71
  const removeNotice = notice => () => onRemove?.(notice.id);
72
72
  return createElement("div", {
73
73
  className: className,
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useReducedMotion","useRef","Snackbar","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","SNACKBAR_VARIANTS","init","height","opacity","open","transition","type","duration","ease","delay","exit","SnackbarList","notices","className","children","onRemove","listRef","isReducedMotion","removeNotice","notice","id","createElement","tabIndex","ref","map","content","restNotice","div","layout","initial","animate","key","variants","undefined"],"sources":["@wordpress/components/src/snackbar/list.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Snackbar from '.';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '../animation';\nimport type { SnackbarListProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst SNACKBAR_VARIANTS = {\n\tinit: {\n\t\theight: 0,\n\t\topacity: 0,\n\t},\n\topen: {\n\t\theight: 'auto',\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\theight: { type: 'tween', duration: 0.3, ease: [ 0, 0, 0.2, 1 ] },\n\t\t\topacity: {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: 0.25,\n\t\t\t\tdelay: 0.05,\n\t\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t\t},\n\t\t},\n\t},\n\texit: {\n\t\topacity: 0,\n\t\ttransition: {\n\t\t\ttype: 'tween',\n\t\t\tduration: 0.1,\n\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t},\n\t},\n};\n\n/**\n * Renders a list of notices.\n *\n * ```jsx\n * const MySnackbarListNotice = () => (\n * <SnackbarList\n * notices={ notices }\n * onRemove={ removeNotice }\n * />\n * );\n * ```\n */\nexport function SnackbarList( {\n\tnotices,\n\tclassName,\n\tchildren,\n\tonRemove,\n}: WordPressComponentProps< SnackbarListProps, 'div' > ) {\n\tconst listRef = useRef< HTMLDivElement | null >( null );\n\tconst isReducedMotion = useReducedMotion();\n\tclassName = classnames( 'components-snackbar-list', className );\n\tconst removeNotice =\n\t\t( notice: SnackbarListProps[ 'notices' ][ number ] ) => () =>\n\t\t\tonRemove?.( notice.id );\n\treturn (\n\t\t<div\n\t\t\tclassName={ className }\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ listRef }\n\t\t\tdata-testid=\"snackbar-list\"\n\t\t>\n\t\t\t{ children }\n\t\t\t<AnimatePresence>\n\t\t\t\t{ notices.map( ( notice ) => {\n\t\t\t\t\tconst { content, ...restNotice } = notice;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ ! isReducedMotion } // See https://www.framer.com/docs/animation/#layout-animations\n\t\t\t\t\t\t\tinitial={ 'init' }\n\t\t\t\t\t\t\tanimate={ 'open' }\n\t\t\t\t\t\t\texit={ 'exit' }\n\t\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\t\tvariants={\n\t\t\t\t\t\t\t\tisReducedMotion ? undefined : SNACKBAR_VARIANTS\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"components-snackbar-list__notice-container\">\n\t\t\t\t\t\t\t\t<Snackbar\n\t\t\t\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\t\t\t\tonRemove={ removeNotice( notice ) }\n\t\t\t\t\t\t\t\t\tlistRef={ listRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t\t\t\t</Snackbar>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</AnimatePresence>\n\t\t</div>\n\t);\n}\n\nexport default SnackbarList;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,GAAG;AACxB,SACCC,gBAAgB,IAAIC,MAAM,EAC1BC,yBAAyB,IAAIC,eAAe,QACtC,cAAc;AAIrB,MAAMC,iBAAiB,GAAG;EACzBC,IAAI,EAAE;IACLC,MAAM,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,GAAG,CAAIL,MAAM,IAAM;IAC5B,MAAM;MAAEM,OAAO;MAAE,GAAGC;IAAW,CAAC,GAAGP,MAAM;IAEzC,OACCE,aAAA,CAACxB,MAAM,CAAC8B,GAAG;MACVC,MAAM,EAAG,CAAEX,eAAiB,CAAC;MAAA;MAC7BY,OAAO,EAAG,MAAQ;MAClBC,OAAO,EAAG,MAAQ;MAClBpB,IAAI,EAAG,MAAQ;MACfqB,GAAG,EAAGZ,MAAM,CAACC,EAAI;MACjBY,QAAQ,EACPf,eAAe,GAAGgB,SAAS,GAAGjC;IAC9B,GAEDqB,aAAA;MAAKR,SAAS,EAAC;IAA4C,GAC1DQ,aAAA,CAAC1B,QAAQ;MAAA,GACH+B,UAAU;MACfX,QAAQ,EAAGG,YAAY,CAAEC,MAAO,CAAG;MACnCH,OAAO,EAAGA;IAAS,GAEjBG,MAAM,CAACM,OACA,CACN,CACM,CAAC;EAEf,CAAE,CACc,CACb,CAAC;AAER;AAEA,eAAed,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useReducedMotion","useRef","Snackbar","__unstableMotion","motion","__unstableAnimatePresence","AnimatePresence","SNACKBAR_VARIANTS","init","height","opacity","open","transition","type","duration","ease","delay","exit","SnackbarList","notices","className","children","onRemove","listRef","isReducedMotion","removeNotice","notice","id","createElement","tabIndex","ref","map","content","restNotice","div","layout","initial","animate","key","variants","undefined"],"sources":["@wordpress/components/src/snackbar/list.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Snackbar from '.';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '../animation';\nimport type { SnackbarListProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst SNACKBAR_VARIANTS = {\n\tinit: {\n\t\theight: 0,\n\t\topacity: 0,\n\t},\n\topen: {\n\t\theight: 'auto',\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\theight: { type: 'tween', duration: 0.3, ease: [ 0, 0, 0.2, 1 ] },\n\t\t\topacity: {\n\t\t\t\ttype: 'tween',\n\t\t\t\tduration: 0.25,\n\t\t\t\tdelay: 0.05,\n\t\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t\t},\n\t\t},\n\t},\n\texit: {\n\t\topacity: 0,\n\t\ttransition: {\n\t\t\ttype: 'tween',\n\t\t\tduration: 0.1,\n\t\t\tease: [ 0, 0, 0.2, 1 ],\n\t\t},\n\t},\n};\n\n/**\n * Renders a list of notices.\n *\n * ```jsx\n * const MySnackbarListNotice = () => (\n * <SnackbarList\n * notices={ notices }\n * onRemove={ removeNotice }\n * />\n * );\n * ```\n */\nexport function SnackbarList( {\n\tnotices,\n\tclassName,\n\tchildren,\n\tonRemove,\n}: WordPressComponentProps< SnackbarListProps, 'div' > ) {\n\tconst listRef = useRef< HTMLDivElement | null >( null );\n\tconst isReducedMotion = useReducedMotion();\n\tclassName = clsx( 'components-snackbar-list', className );\n\tconst removeNotice =\n\t\t( notice: SnackbarListProps[ 'notices' ][ number ] ) => () =>\n\t\t\tonRemove?.( notice.id );\n\treturn (\n\t\t<div\n\t\t\tclassName={ className }\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ listRef }\n\t\t\tdata-testid=\"snackbar-list\"\n\t\t>\n\t\t\t{ children }\n\t\t\t<AnimatePresence>\n\t\t\t\t{ notices.map( ( notice ) => {\n\t\t\t\t\tconst { content, ...restNotice } = notice;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tlayout={ ! isReducedMotion } // See https://www.framer.com/docs/animation/#layout-animations\n\t\t\t\t\t\t\tinitial={ 'init' }\n\t\t\t\t\t\t\tanimate={ 'open' }\n\t\t\t\t\t\t\texit={ 'exit' }\n\t\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\t\tvariants={\n\t\t\t\t\t\t\t\tisReducedMotion ? undefined : SNACKBAR_VARIANTS\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"components-snackbar-list__notice-container\">\n\t\t\t\t\t\t\t\t<Snackbar\n\t\t\t\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\t\t\t\tonRemove={ removeNotice( notice ) }\n\t\t\t\t\t\t\t\t\tlistRef={ listRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t\t\t\t</Snackbar>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</AnimatePresence>\n\t\t</div>\n\t);\n}\n\nexport default SnackbarList;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SAASC,MAAM,QAAQ,oBAAoB;;AAE3C;AACA;AACA;AACA,OAAOC,QAAQ,MAAM,GAAG;AACxB,SACCC,gBAAgB,IAAIC,MAAM,EAC1BC,yBAAyB,IAAIC,eAAe,QACtC,cAAc;AAIrB,MAAMC,iBAAiB,GAAG;EACzBC,IAAI,EAAE;IACLC,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE;EACV,CAAC;EACDC,IAAI,EAAE;IACLF,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE,CAAC;IACVE,UAAU,EAAE;MACXH,MAAM,EAAE;QAAEI,IAAI,EAAE,OAAO;QAAEC,QAAQ,EAAE,GAAG;QAAEC,IAAI,EAAE,CAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;MAAG,CAAC;MAChEL,OAAO,EAAE;QACRG,IAAI,EAAE,OAAO;QACbC,QAAQ,EAAE,IAAI;QACdE,KAAK,EAAE,IAAI;QACXD,IAAI,EAAE,CAAE,CAAC,EA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,GAC1DQ,aAAA,CAAC1B,QAAQ;MAAA,GACH+B,UAAU;MACfX,QAAQ,EAAGG,YAAY,CAAEC,MAAO,CAAG;MACnCH,OAAO,EAAGA;IAAS,GAEjBG,MAAM,CAACM,OACA,CACN,CACM,CAAC;EAEf,CAAE,CACc,CACb,CAAC;AAER;AAEA,eAAed,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
  * Internal dependencies
8
8
  */
@@ -16,7 +16,7 @@ export function UnforwardedSpinner({
16
16
  ...props
17
17
  }, forwardedRef) {
18
18
  return createElement(StyledSpinner, {
19
- className: classNames('components-spinner', className),
19
+ className: clsx('components-spinner', className),
20
20
  viewBox: "0 0 100 100",
21
21
  width: "16",
22
22
  height: "16",
@@ -1 +1 @@
1
- {"version":3,"names":["classNames","StyledSpinner","SpinnerTrack","SpinnerIndicator","forwardRef","UnforwardedSpinner","className","props","forwardedRef","createElement","viewBox","width","height","xmlns","role","focusable","ref","cx","cy","r","vectorEffect","d","Spinner"],"sources":["@wordpress/components/src/spinner/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\nexport function UnforwardedSpinner(\n\t{ className, ...props }: WordPressComponentProps< {}, 'svg', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\treturn (\n\t\t<StyledSpinner\n\t\t\tclassName={ classNames( 'components-spinner', className ) }\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\twidth=\"16\"\n\t\t\theight=\"16\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\trole=\"presentation\"\n\t\t\tfocusable=\"false\"\n\t\t\t{ ...props }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ /* Gray circular background */ }\n\t\t\t<SpinnerTrack\n\t\t\t\tcx=\"50\"\n\t\t\t\tcy=\"50\"\n\t\t\t\tr=\"50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\n\t\t\t{ /* Theme-colored arc */ }\n\t\t\t<SpinnerIndicator\n\t\t\t\td=\"m 50 0 a 50 50 0 0 1 50 50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\t\t</StyledSpinner>\n\t);\n}\n/**\n * `Spinner` is a component used to notify users that their action is being processed.\n *\n * ```js\n * import { Spinner } from '@wordpress/components';\n *\n * function Example() {\n * return <Spinner />;\n * }\n * ```\n */\nexport const Spinner = forwardRef( UnforwardedSpinner );\nexport default Spinner;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AAGnC;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,UAAU;AAGxE;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAE/C,OAAO,SAASC,kBAAkBA,CACjC;EAAEC,SAAS;EAAE,GAAGC;AAAmD,CAAC,EACpEC,YAAiC,EAChC;EACD,OACCC,aAAA,CAACR,aAAa;IACbK,SAAS,EAAGN,UAAU,CAAE,oBAAoB,EAAEM,SAAU,CAAG;IAC3DI,OAAO,EAAC,aAAa;IACrBC,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXC,KAAK,EAAC,4BAA4B;IAClCC,IAAI,EAAC,cAAc;IACnBC,SAAS,EAAC,OAAO;IAAA,GACZR,KAAK;IACVS,GAAG,EAAGR;EAAc,GAGpBC,aAAA,CAACP,YAAY;IACZe,EAAE,EAAC,IAAI;IACPC,EAAE,EAAC,IAAI;IACPC,CAAC,EAAC,IAAI;IACNC,YAAY,EAAC;EAAoB,CACjC,CAAC,EAGFX,aAAA,CAACN,gBAAgB;IAChBkB,CAAC,EAAC,4BAA4B;IAC9BD,YAAY,EAAC;EAAoB,CACjC,CACa,CAAC;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,OAAO,GAAGlB,UAAU,CAAEC,kBAAmB,CAAC;AACvD,eAAeiB,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["clsx","StyledSpinner","SpinnerTrack","SpinnerIndicator","forwardRef","UnforwardedSpinner","className","props","forwardedRef","createElement","viewBox","width","height","xmlns","role","focusable","ref","cx","cy","r","vectorEffect","d","Spinner"],"sources":["@wordpress/components/src/spinner/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';\nimport type { WordPressComponentProps } from '../context';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\nexport function UnforwardedSpinner(\n\t{ className, ...props }: WordPressComponentProps< {}, 'svg', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\treturn (\n\t\t<StyledSpinner\n\t\t\tclassName={ clsx( 'components-spinner', className ) }\n\t\t\tviewBox=\"0 0 100 100\"\n\t\t\twidth=\"16\"\n\t\t\theight=\"16\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\trole=\"presentation\"\n\t\t\tfocusable=\"false\"\n\t\t\t{ ...props }\n\t\t\tref={ forwardedRef }\n\t\t>\n\t\t\t{ /* Gray circular background */ }\n\t\t\t<SpinnerTrack\n\t\t\t\tcx=\"50\"\n\t\t\t\tcy=\"50\"\n\t\t\t\tr=\"50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\n\t\t\t{ /* Theme-colored arc */ }\n\t\t\t<SpinnerIndicator\n\t\t\t\td=\"m 50 0 a 50 50 0 0 1 50 50\"\n\t\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t\t/>\n\t\t</StyledSpinner>\n\t);\n}\n/**\n * `Spinner` is a component used to notify users that their action is being processed.\n *\n * ```js\n * import { Spinner } from '@wordpress/components';\n *\n * function Example() {\n * return <Spinner />;\n * }\n * ```\n */\nexport const Spinner = forwardRef( UnforwardedSpinner );\nexport default Spinner;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,UAAU;AAGxE;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAE/C,OAAO,SAASC,kBAAkBA,CACjC;EAAEC,SAAS;EAAE,GAAGC;AAAmD,CAAC,EACpEC,YAAiC,EAChC;EACD,OACCC,aAAA,CAACR,aAAa;IACbK,SAAS,EAAGN,IAAI,CAAE,oBAAoB,EAAEM,SAAU,CAAG;IACrDI,OAAO,EAAC,aAAa;IACrBC,KAAK,EAAC,IAAI;IACVC,MAAM,EAAC,IAAI;IACXC,KAAK,EAAC,4BAA4B;IAClCC,IAAI,EAAC,cAAc;IACnBC,SAAS,EAAC,OAAO;IAAA,GACZR,KAAK;IACVS,GAAG,EAAGR;EAAc,GAGpBC,aAAA,CAACP,YAAY;IACZe,EAAE,EAAC,IAAI;IACPC,EAAE,EAAC,IAAI;IACPC,CAAC,EAAC,IAAI;IACNC,YAAY,EAAC;EAAoB,CACjC,CAAC,EAGFX,aAAA,CAACN,gBAAgB;IAChBkB,CAAC,EAAC,4BAA4B;IAC9BD,YAAY,EAAC;EAAoB,CACjC,CACa,CAAC;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,OAAO,GAAGlB,UAAU,CAAEC,kBAAmB,CAAC;AACvD,eAAeiB,OAAO","ignoreList":[]}
@@ -4,7 +4,7 @@ import { createElement } from "react";
4
4
  */
5
5
  // eslint-disable-next-line no-restricted-imports
6
6
  import * as Ariakit from '@ariakit/react';
7
- import classnames from 'classnames';
7
+ import clsx from 'clsx';
8
8
  /**
9
9
  * WordPress dependencies
10
10
  */
@@ -164,7 +164,7 @@ const UnforwardedTabPanel = ({
164
164
  return createElement(Ariakit.Tab, {
165
165
  key: tab.name,
166
166
  id: prependInstanceId(tab.name),
167
- className: classnames('components-tab-panel__tabs-item', tab.className, {
167
+ className: clsx('components-tab-panel__tabs-item', tab.className, {
168
168
  [activeClass]: tab.name === selectedTabName
169
169
  }),
170
170
  disabled: tab.disabled,
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","classnames","forwardRef","useEffect","useLayoutEffect","useCallback","useInstanceId","usePrevious","Button","extractTabName","id","match","UnforwardedTabPanel","className","children","tabs","selectOnMove","initialTabName","orientation","activeClass","onSelect","ref","instanceId","TabPanel","prependInstanceId","tabName","tabStore","useTabStore","setSelectedId","newTabValue","newTab","find","t","name","disabled","selectedTab","simplifiedTabName","defaultSelectedId","selectedTabName","useState","setTabStoreSelectedId","setState","previousSelectedTabName","initialTab","tab","firstEnabledTab","createElement","TabList","store","map","Tab","key","render","icon","label","title","showTooltip","tabId"],"sources":["@wordpress/components/src/tab-panel/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\nimport classnames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { useInstanceId, usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport type { TabPanelProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n// Separate the actual tab name from the instance ID. This is\n// necessary because Ariakit internally uses the element ID when\n// a new tab is selected, but our implementation looks specifically\n// for the tab name to be passed to the `onSelect` callback.\nconst extractTabName = ( id: string | undefined | null ) => {\n\tif ( typeof id === 'undefined' || id === null ) {\n\t\treturn;\n\t}\n\treturn id.match( /^tab-panel-[0-9]*-(.*)/ )?.[ 1 ];\n};\n\n/**\n * TabPanel is an ARIA-compliant tabpanel.\n *\n * TabPanels organize content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when tabs are chosen.\n *\n * ```jsx\n * import { TabPanel } from '@wordpress/components';\n *\n * const onSelect = ( tabName ) => {\n * console.log( 'Selecting tab', tabName );\n * };\n *\n * const MyTabPanel = () => (\n * <TabPanel\n * className=\"my-tab-panel\"\n * activeClass=\"active-tab\"\n * onSelect={ onSelect }\n * tabs={ [\n * {\n * name: 'tab1',\n * title: 'Tab 1',\n * className: 'tab-one',\n * },\n * {\n * name: 'tab2',\n * title: 'Tab 2',\n * className: 'tab-two',\n * },\n * ] }\n * >\n * { ( tab ) => <p>{ tab.title }</p> }\n * </TabPanel>\n * );\n * ```\n */\nconst UnforwardedTabPanel = (\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\ttabs,\n\t\tselectOnMove = true,\n\t\tinitialTabName,\n\t\torientation = 'horizontal',\n\t\tactiveClass = 'is-active',\n\t\tonSelect,\n\t}: WordPressComponentProps< TabPanelProps, 'div', false >,\n\tref: ForwardedRef< any >\n) => {\n\tconst instanceId = useInstanceId( TabPanel, 'tab-panel' );\n\n\tconst prependInstanceId = useCallback(\n\t\t( tabName: string | undefined ) => {\n\t\t\tif ( typeof tabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn `${ instanceId }-${ tabName }`;\n\t\t},\n\t\t[ instanceId ]\n\t);\n\n\tconst tabStore = Ariakit.useTabStore( {\n\t\tsetSelectedId: ( newTabValue ) => {\n\t\t\tif ( typeof newTabValue === 'undefined' || newTabValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newTab = tabs.find(\n\t\t\t\t( t ) => prependInstanceId( t.name ) === newTabValue\n\t\t\t);\n\t\t\tif ( newTab?.disabled || newTab === selectedTab ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst simplifiedTabName = extractTabName( newTabValue );\n\t\t\tif ( typeof simplifiedTabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonSelect?.( simplifiedTabName );\n\t\t},\n\t\torientation,\n\t\tselectOnMove,\n\t\tdefaultSelectedId: prependInstanceId( initialTabName ),\n\t} );\n\n\tconst selectedTabName = extractTabName( tabStore.useState( 'selectedId' ) );\n\n\tconst setTabStoreSelectedId = useCallback(\n\t\t( tabName: string ) => {\n\t\t\ttabStore.setState( 'selectedId', prependInstanceId( tabName ) );\n\t\t},\n\t\t[ prependInstanceId, tabStore ]\n\t);\n\n\tconst selectedTab = tabs.find( ( { name } ) => name === selectedTabName );\n\n\tconst previousSelectedTabName = usePrevious( selectedTabName );\n\n\t// Ensure `onSelect` is called when the initial tab is selected.\n\tuseEffect( () => {\n\t\tif (\n\t\t\tpreviousSelectedTabName !== selectedTabName &&\n\t\t\tselectedTabName === initialTabName &&\n\t\t\t!! selectedTabName\n\t\t) {\n\t\t\tonSelect?.( selectedTabName );\n\t\t}\n\t}, [ selectedTabName, initialTabName, onSelect, previousSelectedTabName ] );\n\n\t// Handle selecting the initial tab.\n\tuseLayoutEffect( () => {\n\t\t// If there's a selected tab, don't override it.\n\t\tif ( selectedTab ) {\n\t\t\treturn;\n\t\t}\n\t\tconst initialTab = tabs.find( ( tab ) => tab.name === initialTabName );\n\t\t// Wait for the denoted initial tab to be declared before making a\n\t\t// selection. This ensures that if a tab is declared lazily it can\n\t\t// still receive initial selection.\n\t\tif ( initialTabName && ! initialTab ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( initialTab && ! initialTab.disabled ) {\n\t\t\t// Select the initial tab if it's not disabled.\n\t\t\tsetTabStoreSelectedId( initialTab.name );\n\t\t} else {\n\t\t\t// Fallback to the first enabled tab when the initial tab is\n\t\t\t// disabled or it can't be found.\n\t\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t\tif ( firstEnabledTab ) {\n\t\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t\t}\n\t\t}\n\t}, [\n\t\ttabs,\n\t\tselectedTab,\n\t\tinitialTabName,\n\t\tinstanceId,\n\t\tsetTabStoreSelectedId,\n\t] );\n\n\t// Handle the currently selected tab becoming disabled.\n\tuseEffect( () => {\n\t\t// This effect only runs when the selected tab is defined and becomes disabled.\n\t\tif ( ! selectedTab?.disabled ) {\n\t\t\treturn;\n\t\t}\n\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t// If the currently selected tab becomes disabled, select the first enabled tab.\n\t\t// (if there is one).\n\t\tif ( firstEnabledTab ) {\n\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t}\n\t}, [ tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId ] );\n\treturn (\n\t\t<div className={ className } ref={ ref }>\n\t\t\t<Ariakit.TabList\n\t\t\t\tstore={ tabStore }\n\t\t\t\tclassName=\"components-tab-panel__tabs\"\n\t\t\t>\n\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Ariakit.Tab\n\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\tid={ prependInstanceId( tab.name ) }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'components-tab-panel__tabs-item',\n\t\t\t\t\t\t\t\ttab.className,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ activeClass ]:\n\t\t\t\t\t\t\t\t\t\ttab.name === selectedTabName,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tdisabled={ tab.disabled }\n\t\t\t\t\t\t\taria-controls={ `${ prependInstanceId(\n\t\t\t\t\t\t\t\ttab.name\n\t\t\t\t\t\t\t) }-view` }\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ tab.icon }\n\t\t\t\t\t\t\t\t\tlabel={ tab.icon && tab.title }\n\t\t\t\t\t\t\t\t\tshowTooltip={ !! tab.icon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ! tab.icon && tab.title }\n\t\t\t\t\t\t</Ariakit.Tab>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Ariakit.TabList>\n\t\t\t{ selectedTab && (\n\t\t\t\t<Ariakit.TabPanel\n\t\t\t\t\tid={ `${ prependInstanceId( selectedTab.name ) }-view` }\n\t\t\t\t\tstore={ tabStore }\n\t\t\t\t\ttabId={ prependInstanceId( selectedTab.name ) }\n\t\t\t\t\tclassName={ 'components-tab-panel__tab-content' }\n\t\t\t\t>\n\t\t\t\t\t{ children( selectedTab ) }\n\t\t\t\t</Ariakit.TabPanel>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport const TabPanel = forwardRef( UnforwardedTabPanel );\nexport default TabPanel;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAOC,UAAU,MAAM,YAAY;AAGnC;AACA;AACA;AACA,SACCC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,WAAW,QACL,oBAAoB;AAC3B,SAASC,aAAa,EAAEC,WAAW,QAAQ,oBAAoB;;AAE/D;AACA;AACA;;AAEA,OAAOC,MAAM,MAAM,WAAW;AAI9B;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAKC,EAA6B,IAAM;EAC3D,IAAK,OAAOA,EAAE,KAAK,WAAW,IAAIA,EAAE,KAAK,IAAI,EAAG;IAC/C;EACD;EACA,OAAOA,EAAE,CAACC,KAAK,CAAE,wBAAyB,CAAC,GAAI,CAAC,CAAE;AACnD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA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KAAK,EAAGV,GAAG,CAACS,IAAI,IAAIT,GAAG,CAACW,KAAO;QAC/BC,WAAW,EAAG,CAAC,CAAEZ,GAAG,CAACS;MAAM,CAC3B;IACD,GAEC,CAAET,GAAG,CAACS,IAAI,IAAIT,GAAG,CAACW,KACR,CAAC;EAEhB,CAAE,CACc,CAAC,EAChBpB,WAAW,IACZW,aAAA,CAAC9C,OAAO,CAACuB,QAAQ;IAChBb,EAAE,EAAI,GAAGc,iBAAiB,CAAEW,WAAW,CAACF,IAAK,CAAG,OAAQ;IACxDe,KAAK,EAAGtB,QAAU;IAClB+B,KAAK,EAAGjC,iBAAiB,CAAEW,WAAW,CAACF,IAAK,CAAG;IAC/CpB,SAAS,EAAG;EAAqC,GAE/CC,QAAQ,CAAEqB,WAAY,CACP,CAEf,CAAC;AAER,CAAC;AAED,OAAO,MAAMZ,QAAQ,GAAGrB,UAAU,CAAEU,mBAAoB,CAAC;AACzD,eAAeW,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","clsx","forwardRef","useEffect","useLayoutEffect","useCallback","useInstanceId","usePrevious","Button","extractTabName","id","match","UnforwardedTabPanel","className","children","tabs","selectOnMove","initialTabName","orientation","activeClass","onSelect","ref","instanceId","TabPanel","prependInstanceId","tabName","tabStore","useTabStore","setSelectedId","newTabValue","newTab","find","t","name","disabled","selectedTab","simplifiedTabName","defaultSelectedId","selectedTabName","useState","setTabStoreSelectedId","setState","previousSelectedTabName","initialTab","tab","firstEnabledTab","createElement","TabList","store","map","Tab","key","render","icon","label","title","showTooltip","tabId"],"sources":["@wordpress/components/src/tab-panel/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { useInstanceId, usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport type { TabPanelProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n// Separate the actual tab name from the instance ID. This is\n// necessary because Ariakit internally uses the element ID when\n// a new tab is selected, but our implementation looks specifically\n// for the tab name to be passed to the `onSelect` callback.\nconst extractTabName = ( id: string | undefined | null ) => {\n\tif ( typeof id === 'undefined' || id === null ) {\n\t\treturn;\n\t}\n\treturn id.match( /^tab-panel-[0-9]*-(.*)/ )?.[ 1 ];\n};\n\n/**\n * TabPanel is an ARIA-compliant tabpanel.\n *\n * TabPanels organize content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when tabs are chosen.\n *\n * ```jsx\n * import { TabPanel } from '@wordpress/components';\n *\n * const onSelect = ( tabName ) => {\n * console.log( 'Selecting tab', tabName );\n * };\n *\n * const MyTabPanel = () => (\n * <TabPanel\n * className=\"my-tab-panel\"\n * activeClass=\"active-tab\"\n * onSelect={ onSelect }\n * tabs={ [\n * {\n * name: 'tab1',\n * title: 'Tab 1',\n * className: 'tab-one',\n * },\n * {\n * name: 'tab2',\n * title: 'Tab 2',\n * className: 'tab-two',\n * },\n * ] }\n * >\n * { ( tab ) => <p>{ tab.title }</p> }\n * </TabPanel>\n * );\n * ```\n */\nconst UnforwardedTabPanel = (\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\ttabs,\n\t\tselectOnMove = true,\n\t\tinitialTabName,\n\t\torientation = 'horizontal',\n\t\tactiveClass = 'is-active',\n\t\tonSelect,\n\t}: WordPressComponentProps< TabPanelProps, 'div', false >,\n\tref: ForwardedRef< any >\n) => {\n\tconst instanceId = useInstanceId( TabPanel, 'tab-panel' );\n\n\tconst prependInstanceId = useCallback(\n\t\t( tabName: string | undefined ) => {\n\t\t\tif ( typeof tabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn `${ instanceId }-${ tabName }`;\n\t\t},\n\t\t[ instanceId ]\n\t);\n\n\tconst tabStore = Ariakit.useTabStore( {\n\t\tsetSelectedId: ( newTabValue ) => {\n\t\t\tif ( typeof newTabValue === 'undefined' || newTabValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newTab = tabs.find(\n\t\t\t\t( t ) => prependInstanceId( t.name ) === newTabValue\n\t\t\t);\n\t\t\tif ( newTab?.disabled || newTab === selectedTab ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst simplifiedTabName = extractTabName( newTabValue );\n\t\t\tif ( typeof simplifiedTabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonSelect?.( simplifiedTabName );\n\t\t},\n\t\torientation,\n\t\tselectOnMove,\n\t\tdefaultSelectedId: prependInstanceId( initialTabName ),\n\t} );\n\n\tconst selectedTabName = extractTabName( tabStore.useState( 'selectedId' ) );\n\n\tconst setTabStoreSelectedId = useCallback(\n\t\t( tabName: string ) => {\n\t\t\ttabStore.setState( 'selectedId', prependInstanceId( tabName ) );\n\t\t},\n\t\t[ prependInstanceId, tabStore ]\n\t);\n\n\tconst selectedTab = tabs.find( ( { name } ) => name === selectedTabName );\n\n\tconst previousSelectedTabName = usePrevious( selectedTabName );\n\n\t// Ensure `onSelect` is called when the initial tab is selected.\n\tuseEffect( () => {\n\t\tif (\n\t\t\tpreviousSelectedTabName !== selectedTabName &&\n\t\t\tselectedTabName === initialTabName &&\n\t\t\t!! selectedTabName\n\t\t) {\n\t\t\tonSelect?.( selectedTabName );\n\t\t}\n\t}, [ selectedTabName, initialTabName, onSelect, previousSelectedTabName ] );\n\n\t// Handle selecting the initial tab.\n\tuseLayoutEffect( () => {\n\t\t// If there's a selected tab, don't override it.\n\t\tif ( selectedTab ) {\n\t\t\treturn;\n\t\t}\n\t\tconst initialTab = tabs.find( ( tab ) => tab.name === initialTabName );\n\t\t// Wait for the denoted initial tab to be declared before making a\n\t\t// selection. This ensures that if a tab is declared lazily it can\n\t\t// still receive initial selection.\n\t\tif ( initialTabName && ! initialTab ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( initialTab && ! initialTab.disabled ) {\n\t\t\t// Select the initial tab if it's not disabled.\n\t\t\tsetTabStoreSelectedId( initialTab.name );\n\t\t} else {\n\t\t\t// Fallback to the first enabled tab when the initial tab is\n\t\t\t// disabled or it can't be found.\n\t\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t\tif ( firstEnabledTab ) {\n\t\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t\t}\n\t\t}\n\t}, [\n\t\ttabs,\n\t\tselectedTab,\n\t\tinitialTabName,\n\t\tinstanceId,\n\t\tsetTabStoreSelectedId,\n\t] );\n\n\t// Handle the currently selected tab becoming disabled.\n\tuseEffect( () => {\n\t\t// This effect only runs when the selected tab is defined and becomes disabled.\n\t\tif ( ! selectedTab?.disabled ) {\n\t\t\treturn;\n\t\t}\n\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t// If the currently selected tab becomes disabled, select the first enabled tab.\n\t\t// (if there is one).\n\t\tif ( firstEnabledTab ) {\n\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t}\n\t}, [ tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId ] );\n\treturn (\n\t\t<div className={ className } ref={ ref }>\n\t\t\t<Ariakit.TabList\n\t\t\t\tstore={ tabStore }\n\t\t\t\tclassName=\"components-tab-panel__tabs\"\n\t\t\t>\n\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Ariakit.Tab\n\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\tid={ prependInstanceId( tab.name ) }\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'components-tab-panel__tabs-item',\n\t\t\t\t\t\t\t\ttab.className,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ activeClass ]:\n\t\t\t\t\t\t\t\t\t\ttab.name === selectedTabName,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tdisabled={ tab.disabled }\n\t\t\t\t\t\t\taria-controls={ `${ prependInstanceId(\n\t\t\t\t\t\t\t\ttab.name\n\t\t\t\t\t\t\t) }-view` }\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ tab.icon }\n\t\t\t\t\t\t\t\t\tlabel={ tab.icon && tab.title }\n\t\t\t\t\t\t\t\t\tshowTooltip={ !! tab.icon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ! tab.icon && tab.title }\n\t\t\t\t\t\t</Ariakit.Tab>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Ariakit.TabList>\n\t\t\t{ selectedTab && (\n\t\t\t\t<Ariakit.TabPanel\n\t\t\t\t\tid={ `${ prependInstanceId( selectedTab.name ) }-view` }\n\t\t\t\t\tstore={ tabStore }\n\t\t\t\t\ttabId={ prependInstanceId( selectedTab.name ) }\n\t\t\t\t\tclassName={ 'components-tab-panel__tab-content' }\n\t\t\t\t>\n\t\t\t\t\t{ children( selectedTab ) }\n\t\t\t\t</Ariakit.TabPanel>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport const TabPanel = forwardRef( UnforwardedTabPanel );\nexport default TabPanel;\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAOC,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SACCC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,WAAW,QACL,oBAAoB;AAC3B,SAASC,aAAa,EAAEC,WAAW,QAAQ,oBAAoB;;AAE/D;AACA;AACA;;AAEA,OAAOC,MAAM,MAAM,WAAW;AAI9B;AACA;AACA;AACA;AACA,MAAMC,cAA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I,KAAKK;MACf,CACD,CAAG;MACHJ,QAAQ,EAAGU,GAAG,CAACV,QAAU;MACzB,iBAAiB,GAAGV,iBAAiB,CACpCoB,GAAG,CAACX,IACL,CAAG,OAAQ;MACXmB,MAAM,EACLN,aAAA,CAACtC,MAAM;QACN6C,IAAI,EAAGT,GAAG,CAACS,IAAM;QACjBC,KAAK,EAAGV,GAAG,CAACS,IAAI,IAAIT,GAAG,CAACW,KAAO;QAC/BC,WAAW,EAAG,CAAC,CAAEZ,GAAG,CAACS;MAAM,CAC3B;IACD,GAEC,CAAET,GAAG,CAACS,IAAI,IAAIT,GAAG,CAACW,KACR,CAAC;EAEhB,CAAE,CACc,CAAC,EAChBpB,WAAW,IACZW,aAAA,CAAC9C,OAAO,CAACuB,QAAQ;IAChBb,EAAE,EAAI,GAAGc,iBAAiB,CAAEW,WAAW,CAACF,IAAK,CAAG,OAAQ;IACxDe,KAAK,EAAGtB,QAAU;IAClB+B,KAAK,EAAGjC,iBAAiB,CAAEW,WAAW,CAACF,IAAK,CAAG;IAC/CpB,SAAS,EAAG;EAAqC,GAE/CC,QAAQ,CAAEqB,WAAY,CACP,CAEf,CAAC;AAER,CAAC;AAED,OAAO,MAAMZ,QAAQ,GAAGrB,UAAU,CAAEU,mBAAoB,CAAC;AACzD,eAAeW,QAAQ","ignoreList":[]}
@@ -3,7 +3,7 @@ import { createElement } from "react";
3
3
  * External dependencies
4
4
  */
5
5
 
6
- import classnames from 'classnames';
6
+ import clsx from 'clsx';
7
7
 
8
8
  /**
9
9
  * WordPress dependencies
@@ -39,7 +39,7 @@ function UnforwardedTextControl(props, ref) {
39
39
  help: help,
40
40
  className: className
41
41
  }, createElement("input", {
42
- className: classnames('components-text-control__input', {
42
+ className: clsx('components-text-control__input', {
43
43
  'is-next-40px-default-size': __next40pxDefaultSize
44
44
  }),
45
45
  type: type,
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useInstanceId","forwardRef","BaseControl","UnforwardedTextControl","props","ref","__nextHasNoMarginBottom","__next40pxDefaultSize","label","hideLabelFromVision","value","help","id","idProp","className","onChange","type","additionalProps","TextControl","onChangeValue","event","target","createElement","undefined"],"sources":["@wordpress/components/src/text-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { TextControlProps } from './types';\n\nfunction UnforwardedTextControl(\n\tprops: WordPressComponentProps< TextControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\t__next40pxDefaultSize = false,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tid: idProp,\n\t\tclassName,\n\t\tonChange,\n\t\ttype = 'text',\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId( TextControl, 'inspector-text-control', idProp );\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<input\n\t\t\t\tclassName={ classnames( 'components-text-control__input', {\n\t\t\t\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t\t\t} ) }\n\t\t\t\ttype={ type }\n\t\t\t\tid={ id }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextControl components let users enter and edit text.\n *\n * ```jsx\n * import { TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextControl = () => {\n * const [ className, setClassName ] = useState( '' );\n *\n * return (\n * <TextControl\n * label=\"Additional CSS Class\"\n * value={ className }\n * onChange={ ( value ) => setClassName( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextControl = forwardRef( UnforwardedTextControl );\n\nexport default TextControl;\n"],"mappings":";AAAA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,iBAAiB;AAIzC,SAASC,sBAAsBA,CAC9BC,KAAkE,EAClEC,GAAqC,EACpC;EACD,MAAM;IACLC,uBAAuB;IACvBC,qBAAqB,GAAG,KAAK;IAC7BC,KAAK;IACLC,mBAAmB;IACnBC,KAAK;IACLC,IAAI;IACJC,EAAE,EAAEC,MAAM;IACVC,SAAS;IACTC,QAAQ;IACRC,IAAI,GAAG,MAAM;IACb,GAAGC;EACJ,CAAC,GAAGb,KAAK;EACT,MAAMQ,EAAE,GAAGZ,aAAa,CAAEkB,WAAW,EAAE,wBAAwB,EAAEL,MAAO,CAAC;EACzE,MAAMM,aAAa,GAAKC,KAAsC,IAC7DL,QAAQ,CAAEK,KAAK,CAACC,MAAM,CAACX,KAAM,CAAC;EAE/B,OACCY,aAAA,CAACpB,WAAW;IACXI,uBAAuB,EAAGA,uBAAyB;IACnDE,KAAK,EAAGA,KAAO;IACfC,mBAAmB,EAAGA,mBAAqB;IAC3CG,EAAE,EAAGA,EAAI;IACTD,IAAI,EAAGA,IAAM;IACbG,SAAS,EAAGA;EAAW,GAEvBQ,aAAA;IACCR,SAAS,EAAGf,UAAU,CAAE,gCAAgC,EAAE;MACzD,2BAA2B,EAAEQ;IAC9B,CAAE,CAAG;IACLS,IAAI,EAAGA,IAAM;IACbJ,EAAE,EAAGA,EAAI;IACTF,KAAK,EAAGA,KAAO;IACfK,QAAQ,EAAGI,aAAe;IAC1B,oBAAmB,CAAC,CAAER,IAAI,GAAGC,EAAE,GAAG,QAAQ,GAAGW,SAAW;IACxDlB,GAAG,EAAGA,GAAK;IAAA,GACNY;EAAe,CACpB,CACW,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAGjB,UAAU,CAAEE,sBAAuB,CAAC;AAE/D,eAAee,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useInstanceId","forwardRef","BaseControl","UnforwardedTextControl","props","ref","__nextHasNoMarginBottom","__next40pxDefaultSize","label","hideLabelFromVision","value","help","id","idProp","className","onChange","type","additionalProps","TextControl","onChangeValue","event","target","createElement","undefined"],"sources":["@wordpress/components/src/text-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { TextControlProps } from './types';\n\nfunction UnforwardedTextControl(\n\tprops: WordPressComponentProps< TextControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\t__next40pxDefaultSize = false,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tid: idProp,\n\t\tclassName,\n\t\tonChange,\n\t\ttype = 'text',\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId( TextControl, 'inspector-text-control', idProp );\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<input\n\t\t\t\tclassName={ clsx( 'components-text-control__input', {\n\t\t\t\t\t'is-next-40px-default-size': __next40pxDefaultSize,\n\t\t\t\t} ) }\n\t\t\t\ttype={ type }\n\t\t\t\tid={ id }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextControl components let users enter and edit text.\n *\n * ```jsx\n * import { TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextControl = () => {\n * const [ className, setClassName ] = useState( '' );\n *\n * return (\n * <TextControl\n * label=\"Additional CSS Class\"\n * value={ className }\n * onChange={ ( value ) => setClassName( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextControl = forwardRef( UnforwardedTextControl );\n\nexport default TextControl;\n"],"mappings":";AAAA;AACA;AACA;;AAEA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,iBAAiB;AAIzC,SAASC,sBAAsBA,CAC9BC,KAAkE,EAClEC,GAAqC,EACpC;EACD,MAAM;IACLC,uBAAuB;IACvBC,qBAAqB,GAAG,KAAK;IAC7BC,KAAK;IACLC,mBAAmB;IACnBC,KAAK;IACLC,IAAI;IACJC,EAAE,EAAEC,MAAM;IACVC,SAAS;IACTC,QAAQ;IACRC,IAAI,GAAG,MAAM;IACb,GAAGC;EACJ,CAAC,GAAGb,KAAK;EACT,MAAMQ,EAAE,GAAGZ,aAAa,CAAEkB,WAAW,EAAE,wBAAwB,EAAEL,MAAO,CAAC;EACzE,MAAMM,aAAa,GAAKC,KAAsC,IAC7DL,QAAQ,CAAEK,KAAK,CAACC,MAAM,CAACX,KAAM,CAAC;EAE/B,OACCY,aAAA,CAACpB,WAAW;IACXI,uBAAuB,EAAGA,uBAAyB;IACnDE,KAAK,EAAGA,KAAO;IACfC,mBAAmB,EAAGA,mBAAqB;IAC3CG,EAAE,EAAGA,EAAI;IACTD,IAAI,EAAGA,IAAM;IACbG,SAAS,EAAGA;EAAW,GAEvBQ,aAAA;IACCR,SAAS,EAAGf,IAAI,CAAE,gCAAgC,EAAE;MACnD,2BAA2B,EAAEQ;IAC9B,CAAE,CAAG;IACLS,IAAI,EAAGA,IAAM;IACbJ,EAAE,EAAGA,EAAI;IACTF,KAAK,EAAGA,KAAO;IACfK,QAAQ,EAAGI,aAAe;IAC1B,oBAAmB,CAAC,CAAER,IAAI,GAAGC,EAAE,GAAG,QAAQ,GAAGW,SAAW;IACxDlB,GAAG,EAAGA,GAAK;IAAA,GACNY;EAAe,CACpB,CACW,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAGjB,UAAU,CAAEE,sBAAuB,CAAC;AAE/D,eAAee,WAAW","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
  */
@@ -53,7 +53,7 @@ function UnforwardedToolbar({
53
53
  });
54
54
  }
55
55
  // `ToolbarGroup` already uses components-toolbar for compatibility reasons.
56
- const finalClassName = classnames('components-accessible-toolbar', className, variant && `is-${variant}`);
56
+ const finalClassName = clsx('components-accessible-toolbar', className, variant && `is-${variant}`);
57
57
  return createElement(ContextSystemProvider, {
58
58
  value: contextSystemValue
59
59
  }, createElement(ToolbarContainer, {