@wordpress/components 29.0.0 → 29.1.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 (469) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/LICENSE.md +1 -1
  3. package/build/badge/index.js +64 -0
  4. package/build/badge/index.js.map +1 -0
  5. package/build/badge/types.js +6 -0
  6. package/build/badge/types.js.map +1 -0
  7. package/build/box-control/index.js +5 -1
  8. package/build/box-control/index.js.map +1 -1
  9. package/build/box-control/input-control.js +90 -29
  10. package/build/box-control/input-control.js.map +1 -1
  11. package/build/box-control/types.js.map +1 -1
  12. package/build/box-control/utils.js +50 -0
  13. package/build/box-control/utils.js.map +1 -1
  14. package/build/button-group/index.js +10 -0
  15. package/build/button-group/index.js.map +1 -1
  16. package/build/button-group/types.js.map +1 -1
  17. package/build/custom-select-control/index.js +3 -5
  18. package/build/custom-select-control/index.js.map +1 -1
  19. package/build/custom-select-control-v2/custom-select.js +2 -3
  20. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  21. package/build/date-time/date/index.js +1 -0
  22. package/build/date-time/date/index.js.map +1 -1
  23. package/build/dimension-control/index.js +1 -0
  24. package/build/dimension-control/index.js.map +1 -1
  25. package/build/font-size-picker/styles.js +9 -9
  26. package/build/font-size-picker/styles.js.map +1 -1
  27. package/build/heading/hook.js +1 -1
  28. package/build/heading/hook.js.map +1 -1
  29. package/build/input-control/index.js +9 -0
  30. package/build/input-control/index.js.map +1 -1
  31. package/build/input-control/types.js.map +1 -1
  32. package/build/menu/checkbox-item.js +2 -0
  33. package/build/menu/checkbox-item.js.map +1 -1
  34. package/build/menu/index.js +25 -94
  35. package/build/menu/index.js.map +1 -1
  36. package/build/menu/item.js +10 -1
  37. package/build/menu/item.js.map +1 -1
  38. package/build/menu/popover.js +89 -0
  39. package/build/menu/popover.js.map +1 -0
  40. package/build/menu/radio-item.js +2 -0
  41. package/build/menu/radio-item.js.map +1 -1
  42. package/build/menu/submenu-trigger-item.js +58 -0
  43. package/build/menu/submenu-trigger-item.js.map +1 -0
  44. package/build/menu/trigger-button.js +45 -0
  45. package/build/menu/trigger-button.js.map +1 -0
  46. package/build/menu/types.js.map +1 -1
  47. package/build/navigation/back-button/index.js +1 -0
  48. package/build/navigation/back-button/index.js.map +1 -1
  49. package/build/navigation/index.js +6 -0
  50. package/build/navigation/index.js.map +1 -1
  51. package/build/navigation/item/index.js +1 -0
  52. package/build/navigation/item/index.js.map +1 -1
  53. package/build/number-control/index.js +1 -0
  54. package/build/number-control/index.js.map +1 -1
  55. package/build/palette-edit/index.js +1 -0
  56. package/build/palette-edit/index.js.map +1 -1
  57. package/build/private-apis.js +3 -1
  58. package/build/private-apis.js.map +1 -1
  59. package/build/radio-group/index.js +6 -0
  60. package/build/radio-group/index.js.map +1 -1
  61. package/build/radio-group/radio.js +2 -3
  62. package/build/radio-group/radio.js.map +1 -1
  63. package/build/range-control/styles/range-control-styles.js +28 -28
  64. package/build/range-control/styles/range-control-styles.js.map +1 -1
  65. package/build/select-control/index.js +9 -0
  66. package/build/select-control/index.js.map +1 -1
  67. package/build/select-control/types.js.map +1 -1
  68. package/build/slot-fill/context.js +4 -3
  69. package/build/slot-fill/context.js.map +1 -1
  70. package/build/slot-fill/fill.js +10 -15
  71. package/build/slot-fill/fill.js.map +1 -1
  72. package/build/slot-fill/provider.js +41 -55
  73. package/build/slot-fill/provider.js.map +1 -1
  74. package/build/slot-fill/slot.js +31 -23
  75. package/build/slot-fill/slot.js.map +1 -1
  76. package/build/slot-fill/types.js.map +1 -1
  77. package/build/tab-panel/index.js +2 -3
  78. package/build/tab-panel/index.js.map +1 -1
  79. package/build/tabs/index.js +21 -4
  80. package/build/tabs/index.js.map +1 -1
  81. package/build/tabs/types.js.map +1 -1
  82. package/build/text/hook.js +6 -6
  83. package/build/text/hook.js.map +1 -1
  84. package/build/text/styles.js +7 -7
  85. package/build/text/styles.js.map +1 -1
  86. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +2 -3
  87. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  88. package/build/tooltip/index.js +2 -3
  89. package/build/tooltip/index.js.map +1 -1
  90. package/build/tree-select/index.js +10 -2
  91. package/build/tree-select/index.js.map +1 -1
  92. package/build/tree-select/types.js.map +1 -1
  93. package/build-module/badge/index.js +57 -0
  94. package/build-module/badge/index.js.map +1 -0
  95. package/build-module/badge/types.js +2 -0
  96. package/build-module/badge/types.js.map +1 -0
  97. package/build-module/box-control/index.js +5 -1
  98. package/build-module/box-control/index.js.map +1 -1
  99. package/build-module/box-control/input-control.js +92 -31
  100. package/build-module/box-control/input-control.js.map +1 -1
  101. package/build-module/box-control/types.js.map +1 -1
  102. package/build-module/box-control/utils.js +47 -0
  103. package/build-module/box-control/utils.js.map +1 -1
  104. package/build-module/button-group/index.js +10 -0
  105. package/build-module/button-group/index.js.map +1 -1
  106. package/build-module/button-group/types.js.map +1 -1
  107. package/build-module/custom-select-control/index.js +3 -5
  108. package/build-module/custom-select-control/index.js.map +1 -1
  109. package/build-module/custom-select-control-v2/custom-select.js +1 -2
  110. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  111. package/build-module/date-time/date/index.js +1 -0
  112. package/build-module/date-time/date/index.js.map +1 -1
  113. package/build-module/dimension-control/index.js +1 -0
  114. package/build-module/dimension-control/index.js.map +1 -1
  115. package/build-module/font-size-picker/styles.js +9 -9
  116. package/build-module/font-size-picker/styles.js.map +1 -1
  117. package/build-module/heading/hook.js +1 -1
  118. package/build-module/heading/hook.js.map +1 -1
  119. package/build-module/input-control/index.js +9 -0
  120. package/build-module/input-control/index.js.map +1 -1
  121. package/build-module/input-control/types.js.map +1 -1
  122. package/build-module/menu/checkbox-item.js +2 -0
  123. package/build-module/menu/checkbox-item.js.map +1 -1
  124. package/build-module/menu/index.js +28 -97
  125. package/build-module/menu/index.js.map +1 -1
  126. package/build-module/menu/item.js +10 -1
  127. package/build-module/menu/item.js.map +1 -1
  128. package/build-module/menu/popover.js +81 -0
  129. package/build-module/menu/popover.js.map +1 -0
  130. package/build-module/menu/radio-item.js +2 -0
  131. package/build-module/menu/radio-item.js.map +1 -1
  132. package/build-module/menu/submenu-trigger-item.js +50 -0
  133. package/build-module/menu/submenu-trigger-item.js.map +1 -0
  134. package/build-module/menu/trigger-button.js +37 -0
  135. package/build-module/menu/trigger-button.js.map +1 -0
  136. package/build-module/menu/types.js.map +1 -1
  137. package/build-module/navigation/back-button/index.js +1 -0
  138. package/build-module/navigation/back-button/index.js.map +1 -1
  139. package/build-module/navigation/index.js +6 -0
  140. package/build-module/navigation/index.js.map +1 -1
  141. package/build-module/navigation/item/index.js +1 -0
  142. package/build-module/navigation/item/index.js.map +1 -1
  143. package/build-module/number-control/index.js +1 -0
  144. package/build-module/number-control/index.js.map +1 -1
  145. package/build-module/palette-edit/index.js +1 -0
  146. package/build-module/palette-edit/index.js.map +1 -1
  147. package/build-module/private-apis.js +3 -1
  148. package/build-module/private-apis.js.map +1 -1
  149. package/build-module/radio-group/index.js +6 -0
  150. package/build-module/radio-group/index.js.map +1 -1
  151. package/build-module/radio-group/radio.js +1 -2
  152. package/build-module/radio-group/radio.js.map +1 -1
  153. package/build-module/range-control/styles/range-control-styles.js +28 -28
  154. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  155. package/build-module/select-control/index.js +9 -0
  156. package/build-module/select-control/index.js.map +1 -1
  157. package/build-module/select-control/types.js.map +1 -1
  158. package/build-module/slot-fill/context.js +5 -3
  159. package/build-module/slot-fill/context.js.map +1 -1
  160. package/build-module/slot-fill/fill.js +10 -15
  161. package/build-module/slot-fill/fill.js.map +1 -1
  162. package/build-module/slot-fill/provider.js +41 -55
  163. package/build-module/slot-fill/provider.js.map +1 -1
  164. package/build-module/slot-fill/slot.js +32 -24
  165. package/build-module/slot-fill/slot.js.map +1 -1
  166. package/build-module/slot-fill/types.js.map +1 -1
  167. package/build-module/tab-panel/index.js +1 -2
  168. package/build-module/tab-panel/index.js.map +1 -1
  169. package/build-module/tabs/index.js +21 -4
  170. package/build-module/tabs/index.js.map +1 -1
  171. package/build-module/tabs/types.js.map +1 -1
  172. package/build-module/text/hook.js +6 -6
  173. package/build-module/text/hook.js.map +1 -1
  174. package/build-module/text/styles.js +7 -7
  175. package/build-module/text/styles.js.map +1 -1
  176. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +1 -2
  177. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  178. package/build-module/tooltip/index.js +1 -2
  179. package/build-module/tooltip/index.js.map +1 -1
  180. package/build-module/tree-select/index.js +10 -2
  181. package/build-module/tree-select/index.js.map +1 -1
  182. package/build-module/tree-select/types.js.map +1 -1
  183. package/build-style/style-rtl.css +60 -13
  184. package/build-style/style.css +60 -13
  185. package/build-types/alignment-matrix-control/stories/index.story.d.ts +1 -1
  186. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  187. package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
  188. package/build-types/animate/stories/index.story.d.ts +7 -7
  189. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  190. package/build-types/badge/index.d.ts +8 -0
  191. package/build-types/badge/index.d.ts.map +1 -0
  192. package/build-types/badge/stories/index.story.d.ts +17 -0
  193. package/build-types/badge/stories/index.story.d.ts.map +1 -0
  194. package/build-types/badge/test/index.d.ts +2 -0
  195. package/build-types/badge/test/index.d.ts.map +1 -0
  196. package/build-types/badge/types.d.ts +13 -0
  197. package/build-types/badge/types.d.ts.map +1 -0
  198. package/build-types/base-control/stories/index.story.d.ts +1 -1
  199. package/build-types/border-box-control/stories/index.story.d.ts +1 -1
  200. package/build-types/border-control/stories/index.story.d.ts +5 -5
  201. package/build-types/box-control/index.d.ts +1 -1
  202. package/build-types/box-control/index.d.ts.map +1 -1
  203. package/build-types/box-control/input-control.d.ts +1 -1
  204. package/build-types/box-control/input-control.d.ts.map +1 -1
  205. package/build-types/box-control/stories/index.story.d.ts +356 -11
  206. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  207. package/build-types/box-control/styles/box-control-styles.d.ts +2 -2
  208. package/build-types/box-control/types.d.ts +17 -0
  209. package/build-types/box-control/types.d.ts.map +1 -1
  210. package/build-types/box-control/utils.d.ts +27 -1
  211. package/build-types/box-control/utils.d.ts.map +1 -1
  212. package/build-types/button/stories/e2e/index.story.d.ts +1 -1
  213. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  214. package/build-types/button/stories/index.story.d.ts +7 -7
  215. package/build-types/button/stories/index.story.d.ts.map +1 -1
  216. package/build-types/button-group/index.d.ts +3 -1
  217. package/build-types/button-group/index.d.ts.map +1 -1
  218. package/build-types/button-group/stories/index.story.d.ts +6 -0
  219. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  220. package/build-types/button-group/types.d.ts +7 -0
  221. package/build-types/button-group/types.d.ts.map +1 -1
  222. package/build-types/circular-option-picker/stories/index.story.d.ts +5 -5
  223. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  224. package/build-types/color-palette/stories/index.story.d.ts +3 -3
  225. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  226. package/build-types/color-picker/styles.d.ts +2 -2
  227. package/build-types/color-picker/styles.d.ts.map +1 -1
  228. package/build-types/combobox-control/stories/index.story.d.ts +4 -4
  229. package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
  230. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  231. package/build-types/custom-gradient-picker/stories/index.story.d.ts +1 -1
  232. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  233. package/build-types/custom-select-control/stories/index.story.d.ts +3 -3
  234. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  235. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  236. package/build-types/custom-select-control-v2/stories/index.story.d.ts +3 -3
  237. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  238. package/build-types/date-time/date/index.d.ts.map +1 -1
  239. package/build-types/date-time/stories/time.story.d.ts +1 -1
  240. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  241. package/build-types/date-time/time/styles.d.ts +4 -4
  242. package/build-types/dimension-control/index.d.ts.map +1 -1
  243. package/build-types/dimension-control/stories/index.story.d.ts +1 -1
  244. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  245. package/build-types/drop-zone/stories/index.story.d.ts +1 -1
  246. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  247. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +1 -1
  248. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  249. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +3 -3
  250. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  251. package/build-types/focal-point-picker/stories/index.story.d.ts +4 -4
  252. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  253. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  254. package/build-types/form-file-upload/stories/index.story.d.ts +5 -5
  255. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  256. package/build-types/gradient-picker/stories/index.story.d.ts +3 -3
  257. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  258. package/build-types/guide/stories/index.story.d.ts +1 -1
  259. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  260. package/build-types/icon/stories/index.story.d.ts +4 -4
  261. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  262. package/build-types/input-control/index.d.ts +1 -0
  263. package/build-types/input-control/index.d.ts.map +1 -1
  264. package/build-types/input-control/stories/index.story.d.ts +7 -7
  265. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  266. package/build-types/input-control/types.d.ts +11 -2
  267. package/build-types/input-control/types.d.ts.map +1 -1
  268. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +1 -1
  269. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  270. package/build-types/menu/checkbox-item.d.ts.map +1 -1
  271. package/build-types/menu/index.d.ts +10 -1
  272. package/build-types/menu/index.d.ts.map +1 -1
  273. package/build-types/menu/item.d.ts.map +1 -1
  274. package/build-types/menu/popover.d.ts +3 -0
  275. package/build-types/menu/popover.d.ts.map +1 -0
  276. package/build-types/menu/radio-item.d.ts.map +1 -1
  277. package/build-types/menu/stories/index.story.d.ts +9 -9
  278. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  279. package/build-types/menu/submenu-trigger-item.d.ts +3 -0
  280. package/build-types/menu/submenu-trigger-item.d.ts.map +1 -0
  281. package/build-types/menu/trigger-button.d.ts +3 -0
  282. package/build-types/menu/trigger-button.d.ts.map +1 -0
  283. package/build-types/menu/types.d.ts +208 -57
  284. package/build-types/menu/types.d.ts.map +1 -1
  285. package/build-types/menu-group/stories/index.story.d.ts +1 -1
  286. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  287. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  288. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  289. package/build-types/navigation/back-button/index.d.ts.map +1 -1
  290. package/build-types/navigation/index.d.ts.map +1 -1
  291. package/build-types/navigation/item/index.d.ts.map +1 -1
  292. package/build-types/navigation/stories/index.story.d.ts +6 -6
  293. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  294. package/build-types/notice/stories/index.story.d.ts +4 -4
  295. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  296. package/build-types/number-control/index.d.ts +1 -1
  297. package/build-types/number-control/index.d.ts.map +1 -1
  298. package/build-types/number-control/stories/index.story.d.ts +2 -2
  299. package/build-types/palette-edit/index.d.ts.map +1 -1
  300. package/build-types/palette-edit/stories/index.story.d.ts +2 -2
  301. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  302. package/build-types/private-apis.d.ts.map +1 -1
  303. package/build-types/progress-bar/stories/index.story.d.ts +1 -1
  304. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  305. package/build-types/query-controls/stories/index.story.d.ts +1 -1
  306. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  307. package/build-types/radio-group/index.d.ts.map +1 -1
  308. package/build-types/radio-group/radio.d.ts.map +1 -1
  309. package/build-types/range-control/index.d.ts +1 -1
  310. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  311. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  312. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  313. package/build-types/responsive-wrapper/stories/index.story.d.ts +1 -1
  314. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  315. package/build-types/sandbox/stories/index.story.d.ts +1 -1
  316. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  317. package/build-types/search-control/stories/index.story.d.ts +1 -1
  318. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  319. package/build-types/select-control/index.d.ts +1 -0
  320. package/build-types/select-control/index.d.ts.map +1 -1
  321. package/build-types/select-control/stories/index.story.d.ts +5 -5
  322. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  323. package/build-types/select-control/types.d.ts +1 -1
  324. package/build-types/select-control/types.d.ts.map +1 -1
  325. package/build-types/shortcut/stories/index.story.d.ts +1 -1
  326. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  327. package/build-types/slot-fill/context.d.ts.map +1 -1
  328. package/build-types/slot-fill/fill.d.ts.map +1 -1
  329. package/build-types/slot-fill/provider.d.ts.map +1 -1
  330. package/build-types/slot-fill/slot.d.ts.map +1 -1
  331. package/build-types/slot-fill/types.d.ts +13 -11
  332. package/build-types/slot-fill/types.d.ts.map +1 -1
  333. package/build-types/tab-panel/index.d.ts.map +1 -1
  334. package/build-types/tab-panel/stories/index.story.d.ts +4 -4
  335. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  336. package/build-types/tabs/index.d.ts +21 -4
  337. package/build-types/tabs/index.d.ts.map +1 -1
  338. package/build-types/tabs/stories/index.story.d.ts +10 -10
  339. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  340. package/build-types/tabs/types.d.ts +13 -13
  341. package/build-types/tabs/types.d.ts.map +1 -1
  342. package/build-types/text/stories/index.story.d.ts +3 -3
  343. package/build-types/theme/stories/index.story.d.ts +1 -1
  344. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  345. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  346. package/build-types/toolbar/stories/index.story.d.ts +3 -3
  347. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  348. package/build-types/tooltip/index.d.ts.map +1 -1
  349. package/build-types/tooltip/stories/index.story.d.ts +1 -1
  350. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  351. package/build-types/tree-grid/stories/index.story.d.ts +1 -1
  352. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  353. package/build-types/tree-select/index.d.ts +3 -2
  354. package/build-types/tree-select/index.d.ts.map +1 -1
  355. package/build-types/tree-select/stories/index.story.d.ts +1 -1
  356. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  357. package/build-types/tree-select/types.d.ts +5 -1
  358. package/build-types/tree-select/types.d.ts.map +1 -1
  359. package/build-types/unit-control/index.d.ts +1 -1
  360. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
  361. package/build-types/v-stack/stories/index.story.d.ts +1 -1
  362. package/package.json +19 -19
  363. package/src/alignment-matrix-control/README.md +16 -15
  364. package/src/angle-picker-control/README.md +10 -9
  365. package/src/badge/README.md +24 -0
  366. package/src/badge/docs-manifest.json +5 -0
  367. package/src/badge/index.tsx +67 -0
  368. package/src/badge/stories/index.story.tsx +54 -0
  369. package/src/badge/styles.scss +49 -0
  370. package/src/badge/test/index.tsx +45 -0
  371. package/src/badge/types.ts +12 -0
  372. package/src/base-control/README.md +22 -21
  373. package/src/box-control/README.md +41 -24
  374. package/src/box-control/index.tsx +4 -0
  375. package/src/box-control/input-control.tsx +142 -40
  376. package/src/box-control/stories/index.story.tsx +12 -0
  377. package/src/box-control/types.ts +18 -0
  378. package/src/box-control/utils.ts +60 -0
  379. package/src/button/README.md +51 -50
  380. package/src/button/style.scss +9 -10
  381. package/src/button/test/index.tsx +9 -2
  382. package/src/button-group/README.md +4 -0
  383. package/src/button-group/index.tsx +11 -1
  384. package/src/button-group/stories/index.story.tsx +8 -1
  385. package/src/button-group/types.ts +7 -0
  386. package/src/custom-select-control/index.tsx +3 -3
  387. package/src/custom-select-control-v2/custom-select.tsx +1 -2
  388. package/src/custom-select-control-v2/stories/index.story.tsx +4 -0
  389. package/src/date-time/date/index.tsx +1 -0
  390. package/src/dimension-control/index.tsx +1 -0
  391. package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -4
  392. package/src/disabled/stories/index.story.tsx +1 -0
  393. package/src/drop-zone/stories/index.story.tsx +7 -1
  394. package/src/font-size-picker/styles.ts +1 -0
  395. package/src/form-file-upload/README.md +22 -21
  396. package/src/gradient-picker/README.md +36 -35
  397. package/src/heading/hook.ts +1 -1
  398. package/src/heading/test/__snapshots__/index.tsx.snap +4 -4
  399. package/src/icon/README.md +9 -8
  400. package/src/input-control/README.md +1 -0
  401. package/src/input-control/index.tsx +10 -0
  402. package/src/input-control/stories/index.story.tsx +6 -1
  403. package/src/input-control/test/index.js +9 -3
  404. package/src/input-control/types.ts +11 -2
  405. package/src/menu/checkbox-item.tsx +2 -1
  406. package/src/menu/index.tsx +61 -165
  407. package/src/menu/item.tsx +17 -2
  408. package/src/menu/popover.tsx +103 -0
  409. package/src/menu/radio-item.tsx +2 -1
  410. package/src/menu/stories/index.story.tsx +533 -381
  411. package/src/menu/submenu-trigger-item.tsx +61 -0
  412. package/src/menu/test/index.tsx +266 -182
  413. package/src/menu/trigger-button.tsx +46 -0
  414. package/src/menu/types.ts +210 -63
  415. package/src/modal/stories/index.story.tsx +4 -1
  416. package/src/navigation/back-button/index.tsx +1 -0
  417. package/src/navigation/index.tsx +7 -0
  418. package/src/navigation/item/index.tsx +2 -0
  419. package/src/navigation/test/index.tsx +4 -0
  420. package/src/navigator/test/index.tsx +4 -0
  421. package/src/number-control/index.tsx +1 -0
  422. package/src/palette-edit/index.tsx +1 -0
  423. package/src/panel/stories/index.story.tsx +3 -3
  424. package/src/private-apis.ts +2 -0
  425. package/src/radio-group/index.tsx +12 -1
  426. package/src/radio-group/radio.tsx +1 -2
  427. package/src/range-control/styles/range-control-styles.ts +8 -4
  428. package/src/select-control/README.md +3 -0
  429. package/src/select-control/index.tsx +10 -0
  430. package/src/select-control/stories/index.story.tsx +2 -0
  431. package/src/select-control/test/select-control.tsx +7 -1
  432. package/src/select-control/types.ts +1 -0
  433. package/src/slot-fill/context.ts +5 -3
  434. package/src/slot-fill/fill.ts +10 -15
  435. package/src/slot-fill/provider.tsx +63 -64
  436. package/src/slot-fill/slot.tsx +40 -27
  437. package/src/slot-fill/types.ts +23 -11
  438. package/src/style.scss +1 -0
  439. package/src/tab-panel/index.tsx +1 -2
  440. package/src/tab-panel/stories/index.story.tsx +4 -0
  441. package/src/tabs/README.md +151 -187
  442. package/src/tabs/docs-manifest.json +22 -0
  443. package/src/tabs/index.tsx +21 -4
  444. package/src/tabs/stories/best-practices.mdx +99 -0
  445. package/src/tabs/stories/index.story.tsx +5 -0
  446. package/src/tabs/types.ts +13 -14
  447. package/src/text/hook.ts +2 -2
  448. package/src/text/styles.ts +1 -1
  449. package/src/text/test/__snapshots__/index.tsx.snap +3 -3
  450. package/src/text/test/index.tsx +1 -1
  451. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +2 -2
  452. package/src/toggle-group-control/test/index.tsx +7 -1
  453. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -2
  454. package/src/tooltip/index.tsx +1 -2
  455. package/src/tree-grid/stories/index.story.tsx +2 -0
  456. package/src/tree-select/README.md +144 -28
  457. package/src/tree-select/docs-manifest.json +5 -0
  458. package/src/tree-select/index.tsx +11 -2
  459. package/src/tree-select/stories/index.story.tsx +1 -0
  460. package/src/tree-select/types.ts +8 -1
  461. package/tsconfig.json +0 -3
  462. package/tsconfig.tsbuildinfo +1 -1
  463. package/build/slot-fill/use-slot.js +0 -32
  464. package/build/slot-fill/use-slot.js.map +0 -1
  465. package/build-module/slot-fill/use-slot.js +0 -24
  466. package/build-module/slot-fill/use-slot.js.map +0 -1
  467. package/build-types/slot-fill/use-slot.d.ts +0 -10
  468. package/build-types/slot-fill/use-slot.d.ts.map +0 -1
  469. package/src/slot-fill/use-slot.ts +0 -27
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","useStoreState","clsx","useInstanceId","Children","useContext","createContext","forwardRef","cloneElement","deprecated","Shortcut","positionToPlacement","jsx","_jsx","jsxs","_jsxs","TooltipInternalContext","isNestedInTooltip","TOOLTIP_DELAY","CONTEXT_VALUE","UnforwardedTooltip","props","ref","children","className","delay","hideOnClick","placement","position","shortcut","text","restProps","baseId","Tooltip","describedById","undefined","isOnlyChild","count","process","env","NODE_ENV","console","error","computedPlacement","since","alternative","tooltipStore","useTooltipStore","showTimeout","mounted","Role","render","addDescribedById","element","Provider","value","TooltipAnchor","onClick","hide","store","unmountOnHide","gutter","id","overflowPadding"],"sources":["@wordpress/components/src/tooltip/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport { useStoreState } from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tChildren,\n\tuseContext,\n\tcreateContext,\n\tforwardRef,\n\tcloneElement,\n} from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tTooltipProps,\n\tTooltipInternalContext as TooltipInternalContextType,\n} from './types';\nimport Shortcut from '../shortcut';\nimport { positionToPlacement } from '../popover/utils';\n\nconst TooltipInternalContext = createContext< TooltipInternalContextType >( {\n\tisNestedInTooltip: false,\n} );\n\n/**\n * Time over anchor to wait before showing tooltip\n */\nexport const TOOLTIP_DELAY = 700;\n\nconst CONTEXT_VALUE = {\n\tisNestedInTooltip: true,\n};\n\nfunction UnforwardedTooltip(\n\tprops: TooltipProps,\n\tref: React.ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tdelay = TOOLTIP_DELAY,\n\t\thideOnClick = true,\n\t\tplacement,\n\t\tposition,\n\t\tshortcut,\n\t\ttext,\n\n\t\t...restProps\n\t} = props;\n\n\tconst { isNestedInTooltip } = useContext( TooltipInternalContext );\n\n\tconst baseId = useInstanceId( Tooltip, 'tooltip' );\n\tconst describedById = text || shortcut ? baseId : undefined;\n\n\tconst isOnlyChild = Children.count( children ) === 1;\n\t// console error if more than one child element is added\n\tif ( ! isOnlyChild ) {\n\t\tif ( 'development' === process.env.NODE_ENV ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t'wp-components.Tooltip should be called with only a single child element.'\n\t\t\t);\n\t\t}\n\t}\n\n\t// Compute tooltip's placement:\n\t// - give priority to `placement` prop, if defined\n\t// - otherwise, compute it from the legacy `position` prop (if defined)\n\t// - finally, fallback to the default placement: 'bottom'\n\tlet computedPlacement;\n\tif ( placement !== undefined ) {\n\t\tcomputedPlacement = placement;\n\t} else if ( position !== undefined ) {\n\t\tcomputedPlacement = positionToPlacement( position );\n\t\tdeprecated( '`position` prop in wp.components.tooltip', {\n\t\t\tsince: '6.4',\n\t\t\talternative: '`placement` prop',\n\t\t} );\n\t}\n\tcomputedPlacement = computedPlacement || 'bottom';\n\n\tconst tooltipStore = Ariakit.useTooltipStore( {\n\t\tplacement: computedPlacement,\n\t\tshowTimeout: delay,\n\t} );\n\tconst mounted = useStoreState( tooltipStore, 'mounted' );\n\n\tif ( isNestedInTooltip ) {\n\t\treturn isOnlyChild ? (\n\t\t\t<Ariakit.Role { ...restProps } render={ children } />\n\t\t) : (\n\t\t\tchildren\n\t\t);\n\t}\n\n\t// TODO: this is a temporary workaround to minimize the effects of the\n\t// Ariakit upgrade. Ariakit doesn't pass the `aria-describedby` prop to\n\t// the tooltip anchor anymore since 0.4.0, so we need to add it manually.\n\t// The `aria-describedby` attribute is added only if the anchor doesn't have\n\t// one already, and if the tooltip text is not the same as the anchor's\n\t// `aria-label`\n\t// See: https://github.com/WordPress/gutenberg/pull/64066\n\t// See: https://github.com/WordPress/gutenberg/pull/65989\n\tfunction addDescribedById( element: React.ReactElement ) {\n\t\treturn describedById &&\n\t\t\tmounted &&\n\t\t\telement.props[ 'aria-describedby' ] === undefined &&\n\t\t\telement.props[ 'aria-label' ] !== text\n\t\t\t? cloneElement( element, { 'aria-describedby': describedById } )\n\t\t\t: element;\n\t}\n\n\treturn (\n\t\t<TooltipInternalContext.Provider value={ CONTEXT_VALUE }>\n\t\t\t<Ariakit.TooltipAnchor\n\t\t\t\tonClick={ hideOnClick ? tooltipStore.hide : undefined }\n\t\t\t\tstore={ tooltipStore }\n\t\t\t\trender={\n\t\t\t\t\tisOnlyChild ? addDescribedById( children ) : undefined\n\t\t\t\t}\n\t\t\t\tref={ ref }\n\t\t\t>\n\t\t\t\t{ isOnlyChild ? undefined : children }\n\t\t\t</Ariakit.TooltipAnchor>\n\t\t\t{ isOnlyChild && ( text || shortcut ) && (\n\t\t\t\t<Ariakit.Tooltip\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tclassName={ clsx( 'components-tooltip', className ) }\n\t\t\t\t\tunmountOnHide\n\t\t\t\t\tgutter={ 4 }\n\t\t\t\t\tid={ describedById }\n\t\t\t\t\toverflowPadding={ 0.5 }\n\t\t\t\t\tstore={ tooltipStore }\n\t\t\t\t>\n\t\t\t\t\t{ text }\n\t\t\t\t\t{ shortcut && (\n\t\t\t\t\t\t<Shortcut\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\ttext ? 'components-tooltip__shortcut' : ''\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Ariakit.Tooltip>\n\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C9DmB,OAAO;EACX;EAEA,oBACCtC,KAAA,CAACC,sBAAsB,CAACsC,QAAQ;IAACC,KAAK,EAAGpC,aAAe;IAAAI,QAAA,gBACvDV,IAAA,CAACb,OAAO,CAACwD,aAAa;MACrBC,OAAO,EAAG/B,WAAW,GAAGoB,YAAY,CAACY,IAAI,GAAGvB,SAAW;MACvDwB,KAAK,EAAGb,YAAc;MACtBK,MAAM,EACLf,WAAW,GAAGgB,gBAAgB,CAAE7B,QAAS,CAAC,GAAGY,SAC7C;MACDb,GAAG,EAAGA,GAAK;MAAAC,QAAA,EAETa,WAAW,GAAGD,SAAS,GAAGZ;IAAQ,CACd,CAAC,EACtBa,WAAW,KAAMN,IAAI,IAAID,QAAQ,CAAE,iBACpCd,KAAA,CAACf,OAAO,CAACiC,OAAO;MAAA,GACVF,SAAS;MACdP,SAAS,EAAGtB,IAAI,CAAE,oBAAoB,EAAEsB,SAAU,CAAG;MACrDoC,aAAa;MACbC,MAAM,EAAG,CAAG;MACZC,EAAE,EAAG5B,aAAe;MACpB6B,eAAe,EAAG,GAAK;MACvBJ,KAAK,EAAGb,YAAc;MAAAvB,QAAA,GAEpBO,IAAI,EACJD,QAAQ,iBACThB,IAAA,CAACH,QAAQ;QACRc,SAAS,EACRM,IAAI,GAAG,8BAA8B,GAAG,EACxC;QACDD,QAAQ,EAAGA;MAAU,CACrB,CACD;IAAA,CACe,CACjB;EAAA,CAC+B,CAAC;AAEpC;AACA,OAAO,MAAMI,OAAO,GAAG1B,UAAU,CAAEa,kBAAmB,CAAC;AAEvD,eAAea,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","clsx","useInstanceId","Children","useContext","createContext","forwardRef","cloneElement","deprecated","Shortcut","positionToPlacement","jsx","_jsx","jsxs","_jsxs","TooltipInternalContext","isNestedInTooltip","TOOLTIP_DELAY","CONTEXT_VALUE","UnforwardedTooltip","props","ref","children","className","delay","hideOnClick","placement","position","shortcut","text","restProps","baseId","Tooltip","describedById","undefined","isOnlyChild","count","process","env","NODE_ENV","console","error","computedPlacement","since","alternative","tooltipStore","useTooltipStore","showTimeout","mounted","useStoreState","Role","render","addDescribedById","element","Provider","value","TooltipAnchor","onClick","hide","store","unmountOnHide","gutter","id","overflowPadding"],"sources":["@wordpress/components/src/tooltip/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tChildren,\n\tuseContext,\n\tcreateContext,\n\tforwardRef,\n\tcloneElement,\n} from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tTooltipProps,\n\tTooltipInternalContext as TooltipInternalContextType,\n} from './types';\nimport Shortcut from '../shortcut';\nimport { positionToPlacement } from '../popover/utils';\n\nconst TooltipInternalContext = createContext< TooltipInternalContextType >( {\n\tisNestedInTooltip: false,\n} );\n\n/**\n * Time over anchor to wait before showing tooltip\n */\nexport const TOOLTIP_DELAY = 700;\n\nconst CONTEXT_VALUE = {\n\tisNestedInTooltip: true,\n};\n\nfunction UnforwardedTooltip(\n\tprops: TooltipProps,\n\tref: React.ForwardedRef< any >\n) {\n\tconst {\n\t\tchildren,\n\t\tclassName,\n\t\tdelay = TOOLTIP_DELAY,\n\t\thideOnClick = true,\n\t\tplacement,\n\t\tposition,\n\t\tshortcut,\n\t\ttext,\n\n\t\t...restProps\n\t} = props;\n\n\tconst { isNestedInTooltip } = useContext( TooltipInternalContext );\n\n\tconst baseId = useInstanceId( Tooltip, 'tooltip' );\n\tconst describedById = text || shortcut ? baseId : undefined;\n\n\tconst isOnlyChild = Children.count( children ) === 1;\n\t// console error if more than one child element is added\n\tif ( ! isOnlyChild ) {\n\t\tif ( 'development' === process.env.NODE_ENV ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t'wp-components.Tooltip should be called with only a single child element.'\n\t\t\t);\n\t\t}\n\t}\n\n\t// Compute tooltip's placement:\n\t// - give priority to `placement` prop, if defined\n\t// - otherwise, compute it from the legacy `position` prop (if defined)\n\t// - finally, fallback to the default placement: 'bottom'\n\tlet computedPlacement;\n\tif ( placement !== undefined ) {\n\t\tcomputedPlacement = placement;\n\t} else if ( position !== undefined ) {\n\t\tcomputedPlacement = positionToPlacement( position );\n\t\tdeprecated( '`position` prop in wp.components.tooltip', {\n\t\t\tsince: '6.4',\n\t\t\talternative: '`placement` prop',\n\t\t} );\n\t}\n\tcomputedPlacement = computedPlacement || 'bottom';\n\n\tconst tooltipStore = Ariakit.useTooltipStore( {\n\t\tplacement: computedPlacement,\n\t\tshowTimeout: delay,\n\t} );\n\tconst mounted = Ariakit.useStoreState( tooltipStore, 'mounted' );\n\n\tif ( isNestedInTooltip ) {\n\t\treturn isOnlyChild ? (\n\t\t\t<Ariakit.Role { ...restProps } render={ children } />\n\t\t) : (\n\t\t\tchildren\n\t\t);\n\t}\n\n\t// TODO: this is a temporary workaround to minimize the effects of the\n\t// Ariakit upgrade. Ariakit doesn't pass the `aria-describedby` prop to\n\t// the tooltip anchor anymore since 0.4.0, so we need to add it manually.\n\t// The `aria-describedby` attribute is added only if the anchor doesn't have\n\t// one already, and if the tooltip text is not the same as the anchor's\n\t// `aria-label`\n\t// See: https://github.com/WordPress/gutenberg/pull/64066\n\t// See: https://github.com/WordPress/gutenberg/pull/65989\n\tfunction addDescribedById( element: React.ReactElement ) {\n\t\treturn describedById &&\n\t\t\tmounted &&\n\t\t\telement.props[ 'aria-describedby' ] === undefined &&\n\t\t\telement.props[ 'aria-label' ] !== text\n\t\t\t? cloneElement( element, { 'aria-describedby': describedById } )\n\t\t\t: element;\n\t}\n\n\treturn (\n\t\t<TooltipInternalContext.Provider value={ CONTEXT_VALUE }>\n\t\t\t<Ariakit.TooltipAnchor\n\t\t\t\tonClick={ hideOnClick ? tooltipStore.hide : undefined }\n\t\t\t\tstore={ tooltipStore }\n\t\t\t\trender={\n\t\t\t\t\tisOnlyChild ? addDescribedById( children ) : undefined\n\t\t\t\t}\n\t\t\t\tref={ ref }\n\t\t\t>\n\t\t\t\t{ isOnlyChild ? undefined : children }\n\t\t\t</Ariakit.TooltipAnchor>\n\t\t\t{ isOnlyChild && ( text || shortcut ) && (\n\t\t\t\t<Ariakit.Tooltip\n\t\t\t\t\t{ ...restProps }\n\t\t\t\t\tclassName={ clsx( 'components-tooltip', className ) }\n\t\t\t\t\tunmountOnHide\n\t\t\t\t\tgutter={ 4 }\n\t\t\t\t\tid={ describedById }\n\t\t\t\t\toverflowPadding={ 0.5 }\n\t\t\t\t\tstore={ tooltipStore }\n\t\t\t\t>\n\t\t\t\t\t{ text }\n\t\t\t\t\t{ shortcut && (\n\t\t\t\t\t\t<Shortcut\n\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\ttext ? 'components-tooltip__shortcut' : ''\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Ariakit.Tooltip>\n\t\t\t) }\n\t\t</TooltipInternalContext.Provider>\n\t);\n}\nexport const Tooltip = forwardRef( UnforwardedTooltip );\n\nexport default Tooltip;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,QAAQ,EACRC,UAAU,EACVC,aAAa,EACbC,UAAU,EACVC,YAAY,QACN,oBAAoB;AAC3B,OAAOC,UAAU,MAAM,uBAAuB;;AAE9C;AACA;AACA;;AAKA,OAAOC,QAAQ,MAAM,aAAa;AAClC,SAASC,mBAAmB,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEvD,MAAMC,sBAAsB,GAAGV,aAAa,CAAgC;EAC3EW,iBA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MACrDqC,aAAa;MACbC,MAAM,EAAG,CAAG;MACZC,EAAE,EAAG7B,aAAe;MACpB8B,eAAe,EAAG,GAAK;MACvBJ,KAAK,EAAGd,YAAc;MAAAvB,QAAA,GAEpBO,IAAI,EACJD,QAAQ,iBACThB,IAAA,CAACH,QAAQ;QACRc,SAAS,EACRM,IAAI,GAAG,8BAA8B,GAAG,EACxC;QACDD,QAAQ,EAAGA;MAAU,CACrB,CACD;IAAA,CACe,CACjB;EAAA,CAC+B,CAAC;AAEpC;AACA,OAAO,MAAMI,OAAO,GAAG1B,UAAU,CAAEa,kBAAmB,CAAC;AAEvD,eAAea,OAAO","ignoreList":[]}
@@ -11,6 +11,7 @@ import { decodeEntities } from '@wordpress/html-entities';
11
11
  import { SelectControl } from '../select-control';
12
12
  import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
13
13
  import { ContextSystemProvider } from '../context';
14
+ import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  const CONTEXT_VALUE = {
16
17
  BaseControl: {
@@ -29,11 +30,11 @@ function getSelectOptions(tree, level = 0) {
29
30
  }
30
31
 
31
32
  /**
32
- * TreeSelect component is used to generate select input fields.
33
+ * Generates a hierarchical select input.
33
34
  *
34
35
  * ```jsx
36
+ * import { useState } from 'react';
35
37
  * import { TreeSelect } from '@wordpress/components';
36
- * import { useState } from '@wordpress/element';
37
38
  *
38
39
  * const MyTreeSelect = () => {
39
40
  * const [ page, setPage ] = useState( 'p21' );
@@ -41,6 +42,7 @@ function getSelectOptions(tree, level = 0) {
41
42
  * return (
42
43
  * <TreeSelect
43
44
  * __nextHasNoMarginBottom
45
+ * __next40pxDefaultSize
44
46
  * label="Parent page"
45
47
  * noOptionLabel="No parent page"
46
48
  * onChange={ ( newPage ) => setPage( newPage ) }
@@ -91,9 +93,15 @@ export function TreeSelect(props) {
91
93
  label: noOptionLabel
92
94
  }, ...getSelectOptions(tree)].filter(option => !!option);
93
95
  }, [noOptionLabel, tree]);
96
+ maybeWarnDeprecated36pxSize({
97
+ componentName: 'TreeSelect',
98
+ size: restProps.size,
99
+ __next40pxDefaultSize: restProps.__next40pxDefaultSize
100
+ });
94
101
  return /*#__PURE__*/_jsx(ContextSystemProvider, {
95
102
  value: CONTEXT_VALUE,
96
103
  children: /*#__PURE__*/_jsx(SelectControl, {
104
+ __shouldNotWarnDeprecated36pxSize: true,
97
105
  label,
98
106
  options,
99
107
  onChange,
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","decodeEntities","SelectControl","useDeprecated36pxDefaultSizeProp","ContextSystemProvider","jsx","_jsx","CONTEXT_VALUE","BaseControl","_overrides","__associatedWPComponentName","getSelectOptions","tree","level","flatMap","treeNode","value","id","label","repeat","name","children","TreeSelect","props","noOptionLabel","onChange","selectedId","restProps","options","filter","option"],"sources":["@wordpress/components/src/tree-select/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, Truthy } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { ContextSystemProvider } from '../context';\n\nconst CONTEXT_VALUE = {\n\tBaseControl: {\n\t\t// Temporary during deprecation grace period: Overrides the underlying `__associatedWPComponentName`\n\t\t// via the context system to override the value set by SelectControl.\n\t\t_overrides: { __associatedWPComponentName: 'TreeSelect' },\n\t},\n};\n\nfunction getSelectOptions(\n\ttree: Tree[],\n\tlevel = 0\n): NonNullable< TreeSelectProps[ 'options' ] > {\n\treturn tree.flatMap( ( treeNode ) => [\n\t\t{\n\t\t\tvalue: treeNode.id,\n\t\t\tlabel:\n\t\t\t\t'\\u00A0'.repeat( level * 3 ) + decodeEntities( treeNode.name ),\n\t\t},\n\t\t...getSelectOptions( treeNode.children || [], level + 1 ),\n\t] );\n}\n\n/**\n * TreeSelect component is used to generate select input fields.\n *\n * ```jsx\n * import { TreeSelect } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\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],\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nexport function TreeSelect( props: TreeSelectProps ) {\n\tconst {\n\t\tlabel,\n\t\tnoOptionLabel,\n\t\tonChange,\n\t\tselectedId,\n\t\ttree = [],\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst options = useMemo( () => {\n\t\treturn [\n\t\t\tnoOptionLabel && { value: '', label: noOptionLabel },\n\t\t\t...getSelectOptions( tree ),\n\t\t].filter( < T, >( option: T ): option is Truthy< T > => !! option );\n\t}, [ noOptionLabel, tree ] );\n\n\treturn (\n\t\t<ContextSystemProvider value={ CONTEXT_VALUE }>\n\t\t\t<SelectControl\n\t\t\t\t{ ...{ label, options, onChange } }\n\t\t\t\tvalue={ selectedId }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\nexport default TreeSelect;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,SAASC,aAAa,QAAQ,mBAAmB;AAEjD,SAASC,gCAAgC,QAAQ,+BAA+B;AAChF,SAASC,qBAAqB,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEnD,MAAMC,aAAa,GAAG;EACrBC,WAAW,EAAE;IACZ;IACA;IACAC,UAAU,EAAE;MAAEC,2BAA2B,EAAE;IAAa;EACzD;AACD,CAAC;AAED,SAASC,gBAAgBA,CACxBC,IAAY,EACZC,KAAK,GAAG,CAAC,EACqC;EAC9C,OAAOD,IAAI,CAACE,OAAO,CAAIC,QAAQ,IAAM,CACpC;IACCC,KAAK,EAAED,QAAQ,CAACE,EAAE;IAClBC,KAAK,EACJ,QAAQ,CAACC,MAAM,CAAEN,KAAK,GAAG,CAAE,CAAC,GAAGZ,cAAc,CAAEc,QAAQ,CAACK,IAAK;EAC/D,CAAC,EACD,GAAGT,gBAAgB,CAAEI,QAAQ,CAACM,QAAQ,IAAI,EAAE,EAAER,KAAK,GAAG,CAAE,CAAC,CACxD,CAAC;AACJ;;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASS,UAAUA,CAAEC,KAAsB,EAAG;EACpD,MAAM;IACLL,KAAK;IACLM,aAAa;IACbC,QAAQ;IACRC,UAAU;IACVd,IAAI,GAAG,EAAE;IACT,GAAGe;EACJ,CAAC,GAAGxB,gCAAgC,CAAEoB,KAAM,CAAC;EAE7C,MAAMK,OAAO,GAAG5B,OAAO,CAAE,MAAM;IAC9B,OAAO,CACNwB,aAAa,IAAI;MAAER,KAAK,EAAE,EAAE;MAAEE,KAAK,EAAEM;IAAc,CAAC,EACpD,GAAGb,gBAAgB,CAAEC,IAAK,CAAC,CAC3B,CAACiB,MAAM,CAAUC,MAAS,IAA6B,CAAC,CAAEA,MAAO,CAAC;EACpE,CAAC,EAAE,CAAEN,aAAa,EAAEZ,IAAI,CAAG,CAAC;EAE5B,oBACCN,IAAA,CAACF,qBAAqB;IAACY,KAAK,EAAGT,aAAe;IAAAc,QAAA,eAC7Cf,IAAA,CAACJ,aAAa;MACNgB,KAAK;MAAEU,OAAO;MAAEH,QAAQ;MAC/BT,KAAK,EAAGU,UAAY;MAAA,GACfC;IAAS,CACd;EAAC,CACoB,CAAC;AAE1B;AAEA,eAAeL,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","decodeEntities","SelectControl","useDeprecated36pxDefaultSizeProp","ContextSystemProvider","maybeWarnDeprecated36pxSize","jsx","_jsx","CONTEXT_VALUE","BaseControl","_overrides","__associatedWPComponentName","getSelectOptions","tree","level","flatMap","treeNode","value","id","label","repeat","name","children","TreeSelect","props","noOptionLabel","onChange","selectedId","restProps","options","filter","option","componentName","size","__next40pxDefaultSize","__shouldNotWarnDeprecated36pxSize"],"sources":["@wordpress/components/src/tree-select/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport type { TreeSelectProps, Tree, Truthy } from './types';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { ContextSystemProvider } from '../context';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\nconst CONTEXT_VALUE = {\n\tBaseControl: {\n\t\t// Temporary during deprecation grace period: Overrides the underlying `__associatedWPComponentName`\n\t\t// via the context system to override the value set by SelectControl.\n\t\t_overrides: { __associatedWPComponentName: 'TreeSelect' },\n\t},\n};\n\nfunction getSelectOptions(\n\ttree: Tree[],\n\tlevel = 0\n): NonNullable< TreeSelectProps[ 'options' ] > {\n\treturn tree.flatMap( ( treeNode ) => [\n\t\t{\n\t\t\tvalue: treeNode.id,\n\t\t\tlabel:\n\t\t\t\t'\\u00A0'.repeat( level * 3 ) + decodeEntities( treeNode.name ),\n\t\t},\n\t\t...getSelectOptions( treeNode.children || [], level + 1 ),\n\t] );\n}\n\n/**\n * Generates a hierarchical select input.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { TreeSelect } from '@wordpress/components';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\t__nextHasNoMarginBottom\n * \t\t\t__next40pxDefaultSize\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\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],\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nexport function TreeSelect( props: TreeSelectProps ) {\n\tconst {\n\t\tlabel,\n\t\tnoOptionLabel,\n\t\tonChange,\n\t\tselectedId,\n\t\ttree = [],\n\t\t...restProps\n\t} = useDeprecated36pxDefaultSizeProp( props );\n\n\tconst options = useMemo( () => {\n\t\treturn [\n\t\t\tnoOptionLabel && { value: '', label: noOptionLabel },\n\t\t\t...getSelectOptions( tree ),\n\t\t].filter( < T, >( option: T ): option is Truthy< T > => !! option );\n\t}, [ noOptionLabel, tree ] );\n\n\tmaybeWarnDeprecated36pxSize( {\n\t\tcomponentName: 'TreeSelect',\n\t\tsize: restProps.size,\n\t\t__next40pxDefaultSize: restProps.__next40pxDefaultSize,\n\t} );\n\n\treturn (\n\t\t<ContextSystemProvider value={ CONTEXT_VALUE }>\n\t\t\t<SelectControl\n\t\t\t\t__shouldNotWarnDeprecated36pxSize\n\t\t\t\t{ ...{ label, options, onChange } }\n\t\t\t\tvalue={ selectedId }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\nexport default TreeSelect;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;AAC5C,SAASC,cAAc,QAAQ,0BAA0B;;AAEzD;AACA;AACA;AACA,SAASC,aAAa,QAAQ,mBAAmB;AAEjD,SAASC,gCAAgC,QAAQ,+BAA+B;AAChF,SAASC,qBAAqB,QAAQ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,CAAC,CAAEA,MAAO,CAAC;EACpE,CAAC,EAAE,CAAEN,aAAa,EAAEZ,IAAI,CAAG,CAAC;EAE5BR,2BAA2B,CAAE;IAC5B2B,aAAa,EAAE,YAAY;IAC3BC,IAAI,EAAEL,SAAS,CAACK,IAAI;IACpBC,qBAAqB,EAAEN,SAAS,CAACM;EAClC,CAAE,CAAC;EAEH,oBACC3B,IAAA,CAACH,qBAAqB;IAACa,KAAK,EAAGT,aAAe;IAAAc,QAAA,eAC7Cf,IAAA,CAACL,aAAa;MACbiC,iCAAiC;MAC1BhB,KAAK;MAAEU,OAAO;MAAEH,QAAQ;MAC/BT,KAAK,EAAGU,UAAY;MAAA,GACfC;IAAS,CACd;EAAC,CACoB,CAAC;AAE1B;AAEA,eAAeL,UAAU","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/tree-select/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { SelectControlSingleSelectionProps } from '../select-control/types';\n\nexport type Truthy< T > = T extends false | '' | 0 | null | undefined\n\t? never\n\t: T;\n\nexport interface Tree {\n\tid: string;\n\tname: string;\n\tchildren?: Tree[];\n}\n\n// `TreeSelect` inherits props from `SelectControl`, but only\n// in single selection mode (ie. when the `multiple` prop is not defined).\nexport interface TreeSelectProps\n\textends Omit< SelectControlSingleSelectionProps, 'value' | 'multiple' > {\n\t/**\n\t * If this property is added, an option will be added with this label to represent empty selection.\n\t */\n\tnoOptionLabel?: string;\n\t/**\n\t * An array containing the tree objects with the possible nodes the user can select.\n\t */\n\ttree?: Tree[];\n\t/**\n\t * The id of the currently selected node.\n\t */\n\tselectedId?: SelectControlSingleSelectionProps[ 'value' ];\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/tree-select/types.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { SelectControlSingleSelectionProps } from '../select-control/types';\n\nexport type Truthy< T > = T extends false | '' | 0 | null | undefined\n\t? never\n\t: T;\n\nexport interface Tree {\n\tid: string;\n\tname: string;\n\tchildren?: Tree[];\n}\n\n// `TreeSelect` inherits props from `SelectControl`, but only\n// in single selection mode (ie. when the `multiple` prop is not defined).\nexport interface TreeSelectProps\n\textends Omit<\n\t\tSelectControlSingleSelectionProps,\n\t\t'value' | 'multiple' | 'onChange'\n\t> {\n\t/**\n\t * If this property is added, an option will be added with this label to represent empty selection.\n\t */\n\tnoOptionLabel?: string;\n\t/**\n\t * A function that receives the value of the new option that is being selected as input.\n\t */\n\tonChange?: SelectControlSingleSelectionProps[ 'onChange' ];\n\t/**\n\t * An array containing the tree objects with the possible nodes the user can select.\n\t */\n\ttree?: Tree[];\n\t/**\n\t * The id of the currently selected node.\n\t */\n\tselectedId?: SelectControlSingleSelectionProps[ 'value' ];\n}\n"],"mappings":"","ignoreList":[]}
@@ -199,6 +199,56 @@
199
199
  outline: 2px solid transparent;
200
200
  }
201
201
 
202
+ .components-badge {
203
+ box-sizing: border-box;
204
+ background-color: color-mix(in srgb, #fff 90%, var(--base-color));
205
+ color: color-mix(in srgb, #000 50%, var(--base-color));
206
+ padding: 0 8px;
207
+ min-height: 24px;
208
+ max-width: 100%;
209
+ border-radius: 2px;
210
+ font-size: 12px;
211
+ font-weight: 400;
212
+ line-height: 20px;
213
+ display: inline-flex;
214
+ align-items: center;
215
+ gap: 2px;
216
+ }
217
+ .components-badge *,
218
+ .components-badge *::before,
219
+ .components-badge *::after {
220
+ box-sizing: inherit;
221
+ }
222
+ .components-badge:where(.is-default) {
223
+ background-color: #f0f0f0;
224
+ color: #2f2f2f;
225
+ }
226
+ .components-badge.has-icon {
227
+ padding-inline-start: 4px;
228
+ }
229
+ .components-badge.is-info {
230
+ --base-color: #3858e9;
231
+ }
232
+ .components-badge.is-warning {
233
+ --base-color: #f0b849;
234
+ }
235
+ .components-badge.is-error {
236
+ --base-color: #cc1818;
237
+ }
238
+ .components-badge.is-success {
239
+ --base-color: #4ab866;
240
+ }
241
+
242
+ .components-badge__icon {
243
+ flex-shrink: 0;
244
+ }
245
+
246
+ .components-badge__content {
247
+ overflow: hidden;
248
+ white-space: nowrap;
249
+ text-overflow: ellipsis;
250
+ }
251
+
202
252
  .components-button-group {
203
253
  display: inline-block;
204
254
  }
@@ -235,7 +285,6 @@
235
285
  display: inline-flex;
236
286
  text-decoration: none;
237
287
  font-family: inherit;
238
- font-weight: normal;
239
288
  font-size: 13px;
240
289
  margin: 0;
241
290
  border: 0;
@@ -339,8 +388,10 @@
339
388
  color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
340
389
  background: transparent;
341
390
  }
342
- .components-button.is-secondary:hover:not(:disabled, [aria-disabled=true]) {
343
- box-shadow: inset 0 0 0 1px var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6));
391
+ .components-button.is-secondary:hover:not(:disabled, [aria-disabled=true], .is-pressed) {
392
+ box-shadow: inset 0 0 0 1px var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
393
+ color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
394
+ background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
344
395
  }
345
396
  .components-button.is-secondary:disabled:not(:focus), .components-button.is-secondary[aria-disabled=true]:not(:focus), .components-button.is-secondary[aria-disabled=true]:hover:not(:focus) {
346
397
  box-shadow: inset 0 0 0 1px #ddd;
@@ -354,12 +405,11 @@
354
405
  background: transparent;
355
406
  }
356
407
  .components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
357
- /* stylelint-disable-next-line declaration-property-value-disallowed-list -- Allow tertiary buttons to use colors from the user admin color scheme. */
358
- background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
408
+ background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
409
+ color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
359
410
  }
360
411
  .components-button.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
361
- /* stylelint-disable-next-line declaration-property-value-disallowed-list -- Allow tertiary buttons to use colors from the user admin color scheme. */
362
- background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
412
+ background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 8%, transparent);
363
413
  }
364
414
  p + .components-button.is-tertiary {
365
415
  margin-right: -6px;
@@ -388,10 +438,10 @@ p + .components-button.is-tertiary {
388
438
  .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):disabled, .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link)[aria-disabled=true] {
389
439
  color: #949494;
390
440
  }
391
- .components-button.is-destructive.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
441
+ .components-button.is-destructive.is-tertiary:hover:not(:disabled, [aria-disabled=true]), .components-button.is-destructive.is-secondary:hover:not(:disabled, [aria-disabled=true]) {
392
442
  background: rgba(204, 24, 24, 0.04);
393
443
  }
394
- .components-button.is-destructive.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
444
+ .components-button.is-destructive.is-tertiary:active:not(:disabled, [aria-disabled=true]), .components-button.is-destructive.is-secondary:active:not(:disabled, [aria-disabled=true]) {
395
445
  background: rgba(204, 24, 24, 0.08);
396
446
  }
397
447
  .components-button.is-link {
@@ -1078,8 +1128,7 @@ input.components-combobox-control__input[type=text]:focus {
1078
1128
  }
1079
1129
 
1080
1130
  body.is-dragging-components-draggable {
1081
- cursor: move;
1082
- /* Fallback for IE/Edge < 14 */
1131
+ cursor: move; /* Fallback for IE/Edge < 14 */
1083
1132
  cursor: grabbing !important;
1084
1133
  }
1085
1134
 
@@ -2917,7 +2966,6 @@ See https://bugs.webkit.org/show_bug.cgi?id=187903. */
2917
2966
  .components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
2918
2967
  animation: none;
2919
2968
  }
2920
-
2921
2969
  .components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
2922
2970
  .components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
2923
2971
  .components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
@@ -3016,7 +3064,6 @@ body.lockscroll {
3016
3064
  }
3017
3065
  @media (min-width: 600px) {
3018
3066
  .components-snackbar {
3019
- width: -moz-fit-content;
3020
3067
  width: fit-content;
3021
3068
  }
3022
3069
  }
@@ -199,6 +199,56 @@
199
199
  outline: 2px solid transparent;
200
200
  }
201
201
 
202
+ .components-badge {
203
+ box-sizing: border-box;
204
+ background-color: color-mix(in srgb, #fff 90%, var(--base-color));
205
+ color: color-mix(in srgb, #000 50%, var(--base-color));
206
+ padding: 0 8px;
207
+ min-height: 24px;
208
+ max-width: 100%;
209
+ border-radius: 2px;
210
+ font-size: 12px;
211
+ font-weight: 400;
212
+ line-height: 20px;
213
+ display: inline-flex;
214
+ align-items: center;
215
+ gap: 2px;
216
+ }
217
+ .components-badge *,
218
+ .components-badge *::before,
219
+ .components-badge *::after {
220
+ box-sizing: inherit;
221
+ }
222
+ .components-badge:where(.is-default) {
223
+ background-color: #f0f0f0;
224
+ color: #2f2f2f;
225
+ }
226
+ .components-badge.has-icon {
227
+ padding-inline-start: 4px;
228
+ }
229
+ .components-badge.is-info {
230
+ --base-color: #3858e9;
231
+ }
232
+ .components-badge.is-warning {
233
+ --base-color: #f0b849;
234
+ }
235
+ .components-badge.is-error {
236
+ --base-color: #cc1818;
237
+ }
238
+ .components-badge.is-success {
239
+ --base-color: #4ab866;
240
+ }
241
+
242
+ .components-badge__icon {
243
+ flex-shrink: 0;
244
+ }
245
+
246
+ .components-badge__content {
247
+ overflow: hidden;
248
+ white-space: nowrap;
249
+ text-overflow: ellipsis;
250
+ }
251
+
202
252
  .components-button-group {
203
253
  display: inline-block;
204
254
  }
@@ -235,7 +285,6 @@
235
285
  display: inline-flex;
236
286
  text-decoration: none;
237
287
  font-family: inherit;
238
- font-weight: normal;
239
288
  font-size: 13px;
240
289
  margin: 0;
241
290
  border: 0;
@@ -339,8 +388,10 @@
339
388
  color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
340
389
  background: transparent;
341
390
  }
342
- .components-button.is-secondary:hover:not(:disabled, [aria-disabled=true]) {
343
- box-shadow: inset 0 0 0 1px var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6));
391
+ .components-button.is-secondary:hover:not(:disabled, [aria-disabled=true], .is-pressed) {
392
+ box-shadow: inset 0 0 0 1px var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
393
+ color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
394
+ background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
344
395
  }
345
396
  .components-button.is-secondary:disabled:not(:focus), .components-button.is-secondary[aria-disabled=true]:not(:focus), .components-button.is-secondary[aria-disabled=true]:hover:not(:focus) {
346
397
  box-shadow: inset 0 0 0 1px #ddd;
@@ -354,12 +405,11 @@
354
405
  background: transparent;
355
406
  }
356
407
  .components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
357
- /* stylelint-disable-next-line declaration-property-value-disallowed-list -- Allow tertiary buttons to use colors from the user admin color scheme. */
358
- background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
408
+ background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 4%, transparent);
409
+ color: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
359
410
  }
360
411
  .components-button.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
361
- /* stylelint-disable-next-line declaration-property-value-disallowed-list -- Allow tertiary buttons to use colors from the user admin color scheme. */
362
- background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
412
+ background: color-mix(in srgb, var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)) 8%, transparent);
363
413
  }
364
414
  p + .components-button.is-tertiary {
365
415
  margin-left: -6px;
@@ -388,10 +438,10 @@ p + .components-button.is-tertiary {
388
438
  .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link):disabled, .components-button.is-destructive:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link)[aria-disabled=true] {
389
439
  color: #949494;
390
440
  }
391
- .components-button.is-destructive.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
441
+ .components-button.is-destructive.is-tertiary:hover:not(:disabled, [aria-disabled=true]), .components-button.is-destructive.is-secondary:hover:not(:disabled, [aria-disabled=true]) {
392
442
  background: rgba(204, 24, 24, 0.04);
393
443
  }
394
- .components-button.is-destructive.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
444
+ .components-button.is-destructive.is-tertiary:active:not(:disabled, [aria-disabled=true]), .components-button.is-destructive.is-secondary:active:not(:disabled, [aria-disabled=true]) {
395
445
  background: rgba(204, 24, 24, 0.08);
396
446
  }
397
447
  .components-button.is-link {
@@ -1083,8 +1133,7 @@ input.components-combobox-control__input[type=text]:focus {
1083
1133
  }
1084
1134
 
1085
1135
  body.is-dragging-components-draggable {
1086
- cursor: move;
1087
- /* Fallback for IE/Edge < 14 */
1136
+ cursor: move; /* Fallback for IE/Edge < 14 */
1088
1137
  cursor: grabbing !important;
1089
1138
  }
1090
1139
 
@@ -2926,7 +2975,6 @@ See https://bugs.webkit.org/show_bug.cgi?id=187903. */
2926
2975
  .components-resizable-box__side-handle.components-resizable-box__handle-bottom:active::before {
2927
2976
  animation: none;
2928
2977
  }
2929
-
2930
2978
  .components-resizable-box__side-handle.components-resizable-box__handle-left:hover::before,
2931
2979
  .components-resizable-box__side-handle.components-resizable-box__handle-right:hover::before,
2932
2980
  .components-resizable-box__side-handle.components-resizable-box__handle-left:active::before,
@@ -3028,7 +3076,6 @@ body.lockscroll {
3028
3076
  }
3029
3077
  @media (min-width: 600px) {
3030
3078
  .components-snackbar {
3031
- width: -moz-fit-content;
3032
3079
  width: fit-content;
3033
3080
  }
3034
3081
  }
@@ -9,6 +9,6 @@ import AlignmentMatrixControl from '..';
9
9
  import type { AlignmentMatrixControlProps } from '../types';
10
10
  declare const meta: Meta<typeof AlignmentMatrixControl>;
11
11
  export default meta;
12
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, AlignmentMatrixControlProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "as" | keyof AlignmentMatrixControlProps>>;
12
+ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, AlignmentMatrixControlProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "as" | keyof AlignmentMatrixControlProps>>;
13
13
  export declare const IconSubcomponent: () => import("react").JSX.Element;
14
14
  //# sourceMappingURL=index.story.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/alignment-matrix-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAQtD;;GAEG;AACH,OAAO,sBAAsB,MAAM,IAAI,CAAC;AAExC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAgB9C,CAAC;AACF,eAAe,IAAI,CAAC;AAqBpB,eAAO,MAAM,OAAO,kSAAsB,CAAC;AAE3C,eAAO,MAAM,gBAAgB,mCAS5B,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/alignment-matrix-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAQtD;;GAEG;AACH,OAAO,sBAAsB,MAAM,IAAI,CAAC;AAExC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAgB9C,CAAC;AACF,eAAe,IAAI,CAAC;AAqBpB,eAAO,MAAM,OAAO,gSAAsB,CAAC;AAE3C,eAAO,MAAM,gBAAgB,mCAS5B,CAAC"}
@@ -8,7 +8,7 @@ import type { Meta } from '@storybook/react';
8
8
  import { AnglePickerControl } from '..';
9
9
  declare const meta: Meta<typeof AnglePickerControl>;
10
10
  export default meta;
11
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnglePickerControlProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "as" | keyof import("../types").AnglePickerControlProps> & {
11
+ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnglePickerControlProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children" | "as" | keyof import("../types").AnglePickerControlProps> & {
12
12
  as?: keyof JSX.IntrinsicElements | undefined;
13
13
  } & import("react").RefAttributes<any>>;
14
14
  //# sourceMappingURL=index.story.d.ts.map
@@ -8,11 +8,11 @@ import type { Meta } from '@storybook/react';
8
8
  import { Animate } from '..';
9
9
  declare const meta: Meta<typeof Animate>;
10
10
  export default meta;
11
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
12
- export declare const AppearTopLeft: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
13
- export declare const AppearTopRight: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
14
- export declare const AppearBottomLeft: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
15
- export declare const AppearBottomRight: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
16
- export declare const Loading: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
17
- export declare const SlideIn: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
11
+ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
12
+ export declare const AppearTopLeft: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
13
+ export declare const AppearTopRight: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
14
+ export declare const AppearBottomLeft: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
15
+ export declare const AppearBottomRight: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
16
+ export declare const Loading: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
17
+ export declare const SlideIn: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").AnimateProps>;
18
18
  //# sourceMappingURL=index.story.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/animate/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAQ/B,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,wHAAsB,CAAC;AAc3C,eAAO,MAAM,aAAa,wHAAsB,CAAC;AAUjD,eAAO,MAAM,cAAc,wHAAsB,CAAC;AAUlD,eAAO,MAAM,gBAAgB,wHAAsB,CAAC;AAUpD,eAAO,MAAM,iBAAiB,wHAAsB,CAAC;AAWrD,eAAO,MAAM,OAAO,wHAAsB,CAAC;AAU3C,eAAO,MAAM,OAAO,wHAAsB,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/animate/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAG7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAQ/B,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,sHAAsB,CAAC;AAc3C,eAAO,MAAM,aAAa,sHAAsB,CAAC;AAUjD,eAAO,MAAM,cAAc,sHAAsB,CAAC;AAUlD,eAAO,MAAM,gBAAgB,sHAAsB,CAAC;AAUpD,eAAO,MAAM,iBAAiB,sHAAsB,CAAC;AAWrD,eAAO,MAAM,OAAO,sHAAsB,CAAC;AAU3C,eAAO,MAAM,OAAO,sHAAsB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { BadgeProps } from './types';
5
+ import type { WordPressComponentProps } from '../context';
6
+ declare function Badge({ className, intent, children, ...props }: WordPressComponentProps<BadgeProps, 'span', false>): import("react").JSX.Element;
7
+ export default Badge;
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/badge/index.tsx"],"names":[],"mappings":"AAUA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D,iBAAS,KAAK,CAAE,EACf,SAAS,EACT,MAAkB,EAClB,QAAQ,EACR,GAAG,KAAK,EACR,EAAE,uBAAuB,CAAE,UAAU,EAAE,MAAM,EAAE,KAAK,CAAE,+BA0CtD;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { Meta, StoryObj } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import Badge from '..';
9
+ declare const meta: Meta<typeof Badge>;
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+ export declare const Default: Story;
13
+ export declare const Info: Story;
14
+ export declare const Success: Story;
15
+ export declare const Warning: Story;
16
+ export declare const Error: Story;
17
+ //# sourceMappingURL=index.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/badge/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,KAAK,MAAM,IAAI,CAAC;AAEvB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,KAAK,CAK7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAE,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAKlB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/badge/test/index.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export type BadgeProps = {
2
+ /**
3
+ * Badge variant.
4
+ *
5
+ * @default 'default'
6
+ */
7
+ intent?: 'default' | 'info' | 'success' | 'warning' | 'error';
8
+ /**
9
+ * Text to display inside the badge.
10
+ */
11
+ children: string;
12
+ };
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/badge/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACxB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC9D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CACjB,CAAC"}
@@ -9,7 +9,7 @@ import BaseControl from '..';
9
9
  declare const meta: Meta<typeof BaseControl>;
10
10
  export default meta;
11
11
  export declare const Default: StoryFn<typeof BaseControl>;
12
- export declare const WithHelpText: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").BaseControlProps & {
12
+ export declare const WithHelpText: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").BaseControlProps & {
13
13
  as?: keyof JSX.IntrinsicElements | null | undefined;
14
14
  }>;
15
15
  /**
@@ -5,7 +5,7 @@ import type { Meta } from '@storybook/react';
5
5
  import { BorderBoxControl } from '../';
6
6
  declare const meta: Meta<typeof BorderBoxControl>;
7
7
  export default meta;
8
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
8
+ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
9
9
  disableCustomColors?: boolean;
10
10
  enableAlpha?: boolean;
11
11
  } & import("../../border-control/types").LabelProps & Pick<import("../../border-control/types").BorderControlProps, "size" | "enableStyle"> & {
@@ -9,7 +9,7 @@ import { BorderControl } from '..';
9
9
  import type { Border } from '../types';
10
10
  declare const meta: Meta<typeof BorderControl>;
11
11
  export default meta;
12
- export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
12
+ export declare const Default: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
13
13
  disableCustomColors?: boolean;
14
14
  enableAlpha?: boolean;
15
15
  } & import("../types").LabelProps & {
@@ -31,7 +31,7 @@ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import
31
31
  /**
32
32
  * Render a slider beside the control.
33
33
  */
34
- export declare const WithSlider: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
34
+ export declare const WithSlider: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
35
35
  disableCustomColors?: boolean;
36
36
  enableAlpha?: boolean;
37
37
  } & import("../types").LabelProps & {
@@ -53,7 +53,7 @@ export declare const WithSlider: import("@storybook/types").AnnotatedStoryFn<imp
53
53
  /**
54
54
  * When rendering with a slider, the `width` prop is useful to customize the width of the number input.
55
55
  */
56
- export declare const WithSliderCustomWidth: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
56
+ export declare const WithSliderCustomWidth: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
57
57
  disableCustomColors?: boolean;
58
58
  enableAlpha?: boolean;
59
59
  } & import("../types").LabelProps & {
@@ -76,7 +76,7 @@ export declare const WithSliderCustomWidth: import("@storybook/types").Annotated
76
76
  * Restrict the width of the control and prevent it from expanding to take up additional space.
77
77
  * When `true`, the `width` prop will be ignored.
78
78
  */
79
- export declare const IsCompact: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
79
+ export declare const IsCompact: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
80
80
  disableCustomColors?: boolean;
81
81
  enableAlpha?: boolean;
82
82
  } & import("../types").LabelProps & {
@@ -98,7 +98,7 @@ export declare const IsCompact: import("@storybook/types").AnnotatedStoryFn<impo
98
98
  /**
99
99
  * The `colors` object can contain multiple origins.
100
100
  */
101
- export declare const WithMultipleOrigins: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
101
+ export declare const WithMultipleOrigins: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "__experimentalIsRenderedInSidebar"> & {
102
102
  disableCustomColors?: boolean;
103
103
  enableAlpha?: boolean;
104
104
  } & import("../types").LabelProps & {
@@ -25,7 +25,7 @@ import type { BoxControlProps } from './types';
25
25
  * };
26
26
  * ```
27
27
  */
28
- declare function BoxControl({ __next40pxDefaultSize, id: idProp, inputProps, onChange, label, values: valuesProp, units, sides, splitOnAxis, allowReset, resetValues, onMouseOver, onMouseOut, }: BoxControlProps): import("react").JSX.Element;
28
+ declare function BoxControl({ __next40pxDefaultSize, id: idProp, inputProps, onChange, label, values: valuesProp, units, sides, splitOnAxis, allowReset, resetValues, presets, presetKey, onMouseOver, onMouseOut, }: BoxControlProps): import("react").JSX.Element;
29
29
  export { applyValueToSides } from './utils';
30
30
  export default BoxControl;
31
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box-control/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAEX,eAAe,EAEf,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,UAAU,CAAE,EACpB,qBAA6B,EAC7B,EAAE,EAAE,MAAM,EACV,UAA8B,EAC9B,QAAe,EACf,KAA2B,EAC3B,MAAM,EAAE,UAAU,EAClB,KAAK,EACL,KAAK,EACL,WAAmB,EACnB,UAAiB,EACjB,WAA4B,EAC5B,WAAW,EACX,UAAU,GACV,EAAE,eAAe,+BAqIjB;AAED,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/box-control/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAEX,eAAe,EAEf,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,iBAAS,UAAU,CAAE,EACpB,qBAA6B,EAC7B,EAAE,EAAE,MAAM,EACV,UAA8B,EAC9B,QAAe,EACf,KAA2B,EAC3B,MAAM,EAAE,UAAU,EAClB,KAAK,EACL,KAAK,EACL,WAAmB,EACnB,UAAiB,EACjB,WAA4B,EAC5B,OAAO,EACP,SAAS,EACT,WAAW,EACX,UAAU,GACV,EAAE,eAAe,+BAuIjB;AAED,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,eAAe,UAAU,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { BoxControlInputControlProps } from './types';
2
- export default function BoxInputControl({ __next40pxDefaultSize, onChange, onFocus, values, selectedUnits, setSelectedUnits, sides, side, ...props }: BoxControlInputControlProps): import("react").JSX.Element;
2
+ export default function BoxInputControl({ __next40pxDefaultSize, onChange, onFocus, values, selectedUnits, setSelectedUnits, sides, side, min, presets, presetKey, ...props }: BoxControlInputControlProps): import("react").JSX.Element;
3
3
  //# sourceMappingURL=input-control.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-control.d.ts","sourceRoot":"","sources":["../../src/box-control/input-control.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,2BAA2B,EAAmB,MAAM,SAAS,CAAC;AA8C5E,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACxC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAmH7B"}
1
+ {"version":3,"file":"input-control.d.ts","sourceRoot":"","sources":["../../src/box-control/input-control.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,2BAA2B,EAAmB,MAAM,SAAS,CAAC;AA+C5E,MAAM,CAAC,OAAO,UAAU,eAAe,CAAE,EACxC,qBAAqB,EACrB,QAAe,EACf,OAAc,EACd,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,KAAK,EACL,IAAI,EACJ,GAAO,EACP,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACR,EAAE,2BAA2B,+BAgN7B"}