@wordpress/components 28.9.0 → 28.10.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 (689) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/build/alignment-matrix-control/icon.js.map +1 -1
  3. package/build/alignment-matrix-control/types.js.map +1 -1
  4. package/build/alignment-matrix-control/utils.js.map +1 -1
  5. package/build/angle-picker-control/angle-circle.js.map +1 -1
  6. package/build/autocomplete/autocompleter-ui.js +3 -3
  7. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  8. package/build/autocomplete/get-default-use-items.js.map +1 -1
  9. package/build/autocomplete/index.js +1 -0
  10. package/build/autocomplete/index.js.map +1 -1
  11. package/build/base-control/hooks.js.map +1 -1
  12. package/build/base-control/index.js.map +1 -1
  13. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  14. package/build/border-box-control/styles.js.map +1 -1
  15. package/build/border-box-control/utils.js.map +1 -1
  16. package/build/border-control/border-control/hook.js.map +1 -1
  17. package/build/border-control/styles.js.map +1 -1
  18. package/build/box-control/axial-input-controls.js.map +1 -1
  19. package/build/box-control/icon.js.map +1 -1
  20. package/build/box-control/index.js.map +1 -1
  21. package/build/box-control/input-controls.js.map +1 -1
  22. package/build/button/index.native.js +1 -1
  23. package/build/button/index.native.js.map +1 -1
  24. package/build/card/card/component.js +1 -1
  25. package/build/card/card/component.js.map +1 -1
  26. package/build/card/styles.js.map +1 -1
  27. package/build/color-palette/index.js.map +1 -1
  28. package/build/color-palette/index.native.js +2 -1
  29. package/build/color-palette/index.native.js.map +1 -1
  30. package/build/color-picker/styles.js.map +1 -1
  31. package/build/combobox-control/index.js +1 -1
  32. package/build/combobox-control/index.js.map +1 -1
  33. package/build/composite/legacy/index.js.map +1 -1
  34. package/build/context/context-connect.js +1 -0
  35. package/build/context/context-connect.js.map +1 -1
  36. package/build/context/context-system-provider.js +1 -1
  37. package/build/context/context-system-provider.js.map +1 -1
  38. package/build/context/get-styled-class-name-from-key.js.map +1 -1
  39. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  40. package/build/custom-gradient-picker/index.js.map +1 -1
  41. package/build/custom-gradient-picker/serializer.js.map +1 -1
  42. package/build/custom-gradient-picker/utils.js.map +1 -1
  43. package/build/custom-select-control-v2/styles.js.map +1 -1
  44. package/build/dashicon/index.js.map +1 -1
  45. package/build/date-time/date/styles.js.map +1 -1
  46. package/build/date-time/time/timezone.js.map +1 -1
  47. package/build/draggable/index.js.map +1 -1
  48. package/build/drop-zone/index.js +1 -2
  49. package/build/drop-zone/index.js.map +1 -1
  50. package/build/dropdown-menu-v2/styles.js.map +1 -1
  51. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  52. package/build/duotone-picker/utils.js.map +1 -1
  53. package/build/elevation/hook.js.map +1 -1
  54. package/build/external-link/index.js +20 -23
  55. package/build/external-link/index.js.map +1 -1
  56. package/build/focal-point-picker/index.js.map +1 -1
  57. package/build/focal-point-picker/index.native.js.map +1 -1
  58. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  59. package/build/font-size-picker/index.js.map +1 -1
  60. package/build/form-token-field/index.js +2 -1
  61. package/build/form-token-field/index.js.map +1 -1
  62. package/build/form-token-field/suggestions-list.js.map +1 -1
  63. package/build/form-token-field/token-input.js.map +1 -1
  64. package/build/form-token-field/token.js +1 -1
  65. package/build/form-token-field/token.js.map +1 -1
  66. package/build/gradient-picker/index.js.map +1 -1
  67. package/build/grid/hook.js.map +1 -1
  68. package/build/guide/page-control.js +1 -1
  69. package/build/guide/page-control.js.map +1 -1
  70. package/build/h-stack/hook.js.map +1 -1
  71. package/build/heading/hook.js.map +1 -1
  72. package/build/input-control/index.js.map +1 -1
  73. package/build/input-control/input-base.js.map +1 -1
  74. package/build/input-control/styles/input-control-styles.js.map +1 -1
  75. package/build/item-group/styles.js.map +1 -1
  76. package/build/menu-group/index.js.map +1 -1
  77. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  78. package/build/mobile/bottom-sheet/cell.native.js +4 -4
  79. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  80. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  81. package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
  82. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  83. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  84. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  85. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  86. package/build/mobile/bottom-sheet/switch-cell.native.js +4 -4
  87. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  88. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  89. package/build/mobile/gradient/index.native.js.map +1 -1
  90. package/build/mobile/image/index.native.js.map +1 -1
  91. package/build/mobile/link-picker/index.native.js +1 -1
  92. package/build/mobile/link-picker/index.native.js.map +1 -1
  93. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  94. package/build/mobile/picker/index.android.js.map +1 -1
  95. package/build/mobile/segmented-control/index.native.js.map +1 -1
  96. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  97. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  98. package/build/modal/aria-helper.js +2 -1
  99. package/build/modal/aria-helper.js.map +1 -1
  100. package/build/modal/index.js +2 -1
  101. package/build/modal/index.js.map +1 -1
  102. package/build/modal/use-modal-exit-animation.js.map +1 -1
  103. package/build/navigation/group/index.js.map +1 -1
  104. package/build/navigation/item/base.js.map +1 -1
  105. package/build/navigation/menu/index.js.map +1 -1
  106. package/build/navigation/menu/menu-title-search.js +2 -2
  107. package/build/navigation/menu/menu-title-search.js.map +1 -1
  108. package/build/navigation/menu/menu-title.js.map +1 -1
  109. package/build/navigation/styles/navigation-styles.js.map +1 -1
  110. package/build/navigator/navigator/component.js.map +1 -1
  111. package/build/navigator/navigator-button/hook.js.map +1 -1
  112. package/build/number-control/styles/number-control-styles.js.map +1 -1
  113. package/build/palette-edit/index.js +25 -2
  114. package/build/palette-edit/index.js.map +1 -1
  115. package/build/popover/index.js +1 -1
  116. package/build/popover/index.js.map +1 -1
  117. package/build/popover/overlay-middlewares.js.map +1 -1
  118. package/build/popover/utils.js.map +1 -1
  119. package/build/progress-bar/index.js.map +1 -1
  120. package/build/progress-bar/styles.js.map +1 -1
  121. package/build/query-controls/index.js.map +1 -1
  122. package/build/query-controls/index.native.js.map +1 -1
  123. package/build/radio-control/index.js.map +1 -1
  124. package/build/radio-control/index.native.js.map +1 -1
  125. package/build/range-control/index.js.map +1 -1
  126. package/build/range-control/index.native.js.map +1 -1
  127. package/build/range-control/rail.js.map +1 -1
  128. package/build/range-control/styles/range-control-styles.js +32 -32
  129. package/build/range-control/styles/range-control-styles.js.map +1 -1
  130. package/build/range-control/tooltip.js +1 -1
  131. package/build/range-control/tooltip.js.map +1 -1
  132. package/build/range-control/utils.js.map +1 -1
  133. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  134. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  135. package/build/responsive-wrapper/index.js.map +1 -1
  136. package/build/sandbox/index.js.map +1 -1
  137. package/build/sandbox/index.native.js.map +1 -1
  138. package/build/search-control/index.js +6 -0
  139. package/build/search-control/index.js.map +1 -1
  140. package/build/search-control/index.native.js.map +1 -1
  141. package/build/search-control/types.js.map +1 -1
  142. package/build/select-control/index.js.map +1 -1
  143. package/build/select-control/index.native.js.map +1 -1
  144. package/build/slot-fill/index.js.map +1 -1
  145. package/build/spinner/styles.js.map +1 -1
  146. package/build/style-provider/index.js +1 -0
  147. package/build/style-provider/index.js.map +1 -1
  148. package/build/surface/hook.js.map +1 -1
  149. package/build/surface/styles.js.map +1 -1
  150. package/build/tab-panel/index.js.map +1 -1
  151. package/build/tabs/index.js.map +1 -1
  152. package/build/tabs/styles.js +30 -12
  153. package/build/tabs/styles.js.map +1 -1
  154. package/build/tabs/tab.js +7 -2
  155. package/build/tabs/tab.js.map +1 -1
  156. package/build/tabs/tablist.js +47 -48
  157. package/build/tabs/tablist.js.map +1 -1
  158. package/build/tabs/tabpanel.js.map +1 -1
  159. package/build/text/get-line-height.js.map +1 -1
  160. package/build/text/styles/text-mixins.native.js.map +1 -1
  161. package/build/text/utils.js.map +1 -1
  162. package/build/text-control/index.native.js.map +1 -1
  163. package/build/text-highlight/index.js.map +1 -1
  164. package/build/textarea-control/index.js.map +1 -1
  165. package/build/theme/color-algorithms.js.map +1 -1
  166. package/build/theme/styles.js.map +1 -1
  167. package/build/toggle-control/index.js.map +1 -1
  168. package/build/toggle-control/index.native.js.map +1 -1
  169. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +9 -1
  170. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  171. package/build/toggle-group-control/toggle-group-control/component.js +2 -60
  172. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  173. package/build/toggle-group-control/toggle-group-control-option-base/component.js +10 -10
  174. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  175. package/build/toggle-group-control/types.js.map +1 -1
  176. package/build/toolbar/toolbar/index.js.map +1 -1
  177. package/build/tools-panel/styles.js.map +1 -1
  178. package/build/tooltip/index.js +5 -1
  179. package/build/tooltip/index.js.map +1 -1
  180. package/build/unit-control/index.js.map +1 -1
  181. package/build/unit-control/utils.js.map +1 -1
  182. package/build/utils/breakpoint.js.map +1 -1
  183. package/build/utils/colors-values.js.map +1 -1
  184. package/build/utils/config-values.js.map +1 -1
  185. package/build/utils/font-size.js.map +1 -1
  186. package/build/utils/hooks/use-animated-offset-rect.js +80 -0
  187. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -0
  188. package/build/utils/hooks/use-cx.js.map +1 -1
  189. package/build/utils/math.js +2 -2
  190. package/build/utils/math.js.map +1 -1
  191. package/build/utils/space.js.map +1 -1
  192. package/build/utils/unit-values.js.map +1 -1
  193. package/build/utils/use-responsive-value.js.map +1 -1
  194. package/build-module/alignment-matrix-control/cell.js +1 -2
  195. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  196. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  197. package/build-module/alignment-matrix-control/types.js.map +1 -1
  198. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  199. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  200. package/build-module/angle-picker-control/index.js +1 -2
  201. package/build-module/angle-picker-control/index.js.map +1 -1
  202. package/build-module/autocomplete/autocompleter-ui.js +4 -6
  203. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  204. package/build-module/autocomplete/autocompleter-ui.native.js +1 -2
  205. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  206. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  207. package/build-module/autocomplete/index.js +2 -3
  208. package/build-module/autocomplete/index.js.map +1 -1
  209. package/build-module/base-control/hooks.js.map +1 -1
  210. package/build-module/base-control/index.js +1 -2
  211. package/build-module/base-control/index.js.map +1 -1
  212. package/build-module/base-control/index.native.js +1 -2
  213. package/build-module/base-control/index.native.js.map +1 -1
  214. package/build-module/border-box-control/border-box-control/component.js +1 -2
  215. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  216. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  217. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -2
  218. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  219. package/build-module/border-box-control/styles.js.map +1 -1
  220. package/build-module/border-box-control/utils.js.map +1 -1
  221. package/build-module/border-control/border-control/component.js +1 -2
  222. package/build-module/border-control/border-control/component.js.map +1 -1
  223. package/build-module/border-control/border-control/hook.js.map +1 -1
  224. package/build-module/border-control/border-control-dropdown/component.js +1 -3
  225. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  226. package/build-module/border-control/styles.js.map +1 -1
  227. package/build-module/box-control/all-input-control.js +1 -3
  228. package/build-module/box-control/all-input-control.js.map +1 -1
  229. package/build-module/box-control/axial-input-controls.js +1 -3
  230. package/build-module/box-control/axial-input-controls.js.map +1 -1
  231. package/build-module/box-control/icon.js +1 -2
  232. package/build-module/box-control/icon.js.map +1 -1
  233. package/build-module/box-control/index.js +1 -2
  234. package/build-module/box-control/index.js.map +1 -1
  235. package/build-module/box-control/input-controls.js +1 -3
  236. package/build-module/box-control/input-controls.js.map +1 -1
  237. package/build-module/button/index.js +1 -3
  238. package/build-module/button/index.js.map +1 -1
  239. package/build-module/button/index.native.js +2 -3
  240. package/build-module/button/index.native.js.map +1 -1
  241. package/build-module/card/card/component.js +2 -3
  242. package/build-module/card/card/component.js.map +1 -1
  243. package/build-module/card/styles.js.map +1 -1
  244. package/build-module/checkbox-control/index.js +1 -2
  245. package/build-module/checkbox-control/index.js.map +1 -1
  246. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -2
  247. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  248. package/build-module/circular-option-picker/circular-option-picker.js +1 -2
  249. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  250. package/build-module/color-indicator/index.native.js +1 -2
  251. package/build-module/color-indicator/index.native.js.map +1 -1
  252. package/build-module/color-palette/index.js +1 -2
  253. package/build-module/color-palette/index.js.map +1 -1
  254. package/build-module/color-palette/index.native.js +3 -4
  255. package/build-module/color-palette/index.native.js.map +1 -1
  256. package/build-module/color-picker/component.js +1 -2
  257. package/build-module/color-picker/component.js.map +1 -1
  258. package/build-module/color-picker/hsl-input.js +1 -3
  259. package/build-module/color-picker/hsl-input.js.map +1 -1
  260. package/build-module/color-picker/hsv-color-picker.native.js +1 -2
  261. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
  262. package/build-module/color-picker/hue-picker.native.js +1 -2
  263. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  264. package/build-module/color-picker/index.native.js +1 -3
  265. package/build-module/color-picker/index.native.js.map +1 -1
  266. package/build-module/color-picker/input-with-slider.js +1 -2
  267. package/build-module/color-picker/input-with-slider.js.map +1 -1
  268. package/build-module/color-picker/rgb-input.js +1 -3
  269. package/build-module/color-picker/rgb-input.js.map +1 -1
  270. package/build-module/color-picker/saturation-picker.native.js +1 -2
  271. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  272. package/build-module/color-picker/styles.js.map +1 -1
  273. package/build-module/combobox-control/index.js +2 -3
  274. package/build-module/combobox-control/index.js.map +1 -1
  275. package/build-module/composite/legacy/index.js.map +1 -1
  276. package/build-module/confirm-dialog/component.js +1 -3
  277. package/build-module/confirm-dialog/component.js.map +1 -1
  278. package/build-module/context/context-connect.js +1 -0
  279. package/build-module/context/context-connect.js.map +1 -1
  280. package/build-module/context/context-system-provider.js +1 -1
  281. package/build-module/context/context-system-provider.js.map +1 -1
  282. package/build-module/context/get-styled-class-name-from-key.js.map +1 -1
  283. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -3
  284. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  285. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -2
  286. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  287. package/build-module/custom-gradient-picker/index.js +1 -2
  288. package/build-module/custom-gradient-picker/index.js.map +1 -1
  289. package/build-module/custom-gradient-picker/index.native.js +1 -3
  290. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  291. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  292. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  293. package/build-module/custom-select-control/index.js +1 -3
  294. package/build-module/custom-select-control/index.js.map +1 -1
  295. package/build-module/custom-select-control-v2/custom-select.js +1 -2
  296. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  297. package/build-module/custom-select-control-v2/item.js +1 -2
  298. package/build-module/custom-select-control-v2/item.js.map +1 -1
  299. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  300. package/build-module/dashicon/index.js.map +1 -1
  301. package/build-module/date-time/date/index.js +1 -2
  302. package/build-module/date-time/date/index.js.map +1 -1
  303. package/build-module/date-time/date/styles.js.map +1 -1
  304. package/build-module/date-time/date-time/index.js +1 -3
  305. package/build-module/date-time/date-time/index.js.map +1 -1
  306. package/build-module/date-time/time/index.js +1 -2
  307. package/build-module/date-time/time/index.js.map +1 -1
  308. package/build-module/date-time/time/time-input/index.js +1 -2
  309. package/build-module/date-time/time/time-input/index.js.map +1 -1
  310. package/build-module/date-time/time/timezone.js.map +1 -1
  311. package/build-module/dimension-control/index.js +1 -3
  312. package/build-module/dimension-control/index.js.map +1 -1
  313. package/build-module/draggable/index.js +1 -3
  314. package/build-module/draggable/index.js.map +1 -1
  315. package/build-module/drop-zone/index.js +2 -4
  316. package/build-module/drop-zone/index.js.map +1 -1
  317. package/build-module/dropdown/index.js +1 -2
  318. package/build-module/dropdown/index.js.map +1 -1
  319. package/build-module/dropdown/index.native.js +1 -2
  320. package/build-module/dropdown/index.native.js.map +1 -1
  321. package/build-module/dropdown-menu/index.js +1 -2
  322. package/build-module/dropdown-menu/index.js.map +1 -1
  323. package/build-module/dropdown-menu/index.native.js +1 -2
  324. package/build-module/dropdown-menu/index.native.js.map +1 -1
  325. package/build-module/dropdown-menu-v2/checkbox-item.js +1 -2
  326. package/build-module/dropdown-menu-v2/checkbox-item.js.map +1 -1
  327. package/build-module/dropdown-menu-v2/index.js +1 -3
  328. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  329. package/build-module/dropdown-menu-v2/item.js +1 -2
  330. package/build-module/dropdown-menu-v2/item.js.map +1 -1
  331. package/build-module/dropdown-menu-v2/radio-item.js +1 -2
  332. package/build-module/dropdown-menu-v2/radio-item.js.map +1 -1
  333. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  334. package/build-module/duotone-picker/color-list-picker/index.js +1 -3
  335. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  336. package/build-module/duotone-picker/duotone-picker.js +1 -2
  337. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  338. package/build-module/duotone-picker/utils.js.map +1 -1
  339. package/build-module/elevation/hook.js.map +1 -1
  340. package/build-module/external-link/index.js +21 -25
  341. package/build-module/external-link/index.js.map +1 -1
  342. package/build-module/external-link/index.native.js +1 -2
  343. package/build-module/external-link/index.native.js.map +1 -1
  344. package/build-module/focal-point-picker/controls.js +1 -2
  345. package/build-module/focal-point-picker/controls.js.map +1 -1
  346. package/build-module/focal-point-picker/focal-point.native.js +1 -2
  347. package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
  348. package/build-module/focal-point-picker/grid.js +1 -2
  349. package/build-module/focal-point-picker/grid.js.map +1 -1
  350. package/build-module/focal-point-picker/index.js +1 -2
  351. package/build-module/focal-point-picker/index.js.map +1 -1
  352. package/build-module/focal-point-picker/index.native.js +1 -2
  353. package/build-module/focal-point-picker/index.native.js.map +1 -1
  354. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  355. package/build-module/focal-point-picker/tooltip/index.native.js +1 -2
  356. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  357. package/build-module/font-size-picker/index.js +1 -2
  358. package/build-module/font-size-picker/index.js.map +1 -1
  359. package/build-module/font-size-picker/index.native.js +1 -3
  360. package/build-module/font-size-picker/index.native.js.map +1 -1
  361. package/build-module/form-file-upload/index.js +1 -2
  362. package/build-module/form-file-upload/index.js.map +1 -1
  363. package/build-module/form-toggle/index.js +1 -2
  364. package/build-module/form-toggle/index.js.map +1 -1
  365. package/build-module/form-token-field/index.js +3 -3
  366. package/build-module/form-token-field/index.js.map +1 -1
  367. package/build-module/form-token-field/suggestions-list.js +1 -2
  368. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  369. package/build-module/form-token-field/token-input.js.map +1 -1
  370. package/build-module/form-token-field/token.js +2 -3
  371. package/build-module/form-token-field/token.js.map +1 -1
  372. package/build-module/gradient-picker/index.js +1 -2
  373. package/build-module/gradient-picker/index.js.map +1 -1
  374. package/build-module/grid/hook.js.map +1 -1
  375. package/build-module/guide/index.js +1 -2
  376. package/build-module/guide/index.js.map +1 -1
  377. package/build-module/guide/page-control.js +1 -1
  378. package/build-module/guide/page-control.js.map +1 -1
  379. package/build-module/h-stack/hook.js.map +1 -1
  380. package/build-module/heading/hook.js.map +1 -1
  381. package/build-module/higher-order/with-fallback-styles/index.js +3 -4
  382. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  383. package/build-module/input-control/index.js.map +1 -1
  384. package/build-module/input-control/input-base.js +1 -2
  385. package/build-module/input-control/input-base.js.map +1 -1
  386. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  387. package/build-module/item-group/styles.js.map +1 -1
  388. package/build-module/keyboard-shortcuts/index.js +1 -3
  389. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  390. package/build-module/menu-group/index.js +1 -2
  391. package/build-module/menu-group/index.js.map +1 -1
  392. package/build-module/menu-item/index.js +1 -2
  393. package/build-module/menu-item/index.js.map +1 -1
  394. package/build-module/menu-items-choice/index.js +1 -2
  395. package/build-module/menu-items-choice/index.js.map +1 -1
  396. package/build-module/mobile/badge/index.native.js +1 -3
  397. package/build-module/mobile/badge/index.native.js.map +1 -1
  398. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -2
  399. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  400. package/build-module/mobile/bottom-sheet/cell.native.js +5 -6
  401. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  402. package/build-module/mobile/bottom-sheet/color-cell.native.js +1 -2
  403. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  404. package/build-module/mobile/bottom-sheet/index.native.js +1 -3
  405. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  406. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -2
  407. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  408. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -2
  409. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  410. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  411. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  412. package/build-module/mobile/bottom-sheet/range-text-input.native.js +1 -2
  413. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  414. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +2 -3
  415. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  416. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -2
  417. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  418. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -2
  419. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  420. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  421. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  422. package/build-module/mobile/bottom-sheet/switch-cell.native.js +4 -4
  423. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  424. package/build-module/mobile/bottom-sheet-select-control/index.native.js +1 -3
  425. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  426. package/build-module/mobile/bottom-sheet-text-control/index.native.js +1 -3
  427. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  428. package/build-module/mobile/color-settings/gradient-picker-screen.native.js +1 -2
  429. package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  430. package/build-module/mobile/color-settings/index.native.js +1 -2
  431. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  432. package/build-module/mobile/color-settings/palette.screen.native.js +1 -3
  433. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  434. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  435. package/build-module/mobile/focal-point-settings-panel/index.native.js +1 -2
  436. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  437. package/build-module/mobile/gradient/index.native.js +1 -2
  438. package/build-module/mobile/gradient/index.native.js.map +1 -1
  439. package/build-module/mobile/html-text-input/index.native.js +1 -2
  440. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  441. package/build-module/mobile/image/icon-retry.native.js +1 -2
  442. package/build-module/mobile/image/icon-retry.native.js.map +1 -1
  443. package/build-module/mobile/image/image-editing-button.native.js +1 -2
  444. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  445. package/build-module/mobile/image/index.native.js +1 -3
  446. package/build-module/mobile/image/index.native.js.map +1 -1
  447. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +1 -2
  448. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  449. package/build-module/mobile/link-picker/index.native.js +2 -3
  450. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  451. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  452. package/build-module/mobile/link-settings/index.native.js +1 -3
  453. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  454. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -2
  455. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  456. package/build-module/mobile/picker/index.android.js +1 -2
  457. package/build-module/mobile/picker/index.android.js.map +1 -1
  458. package/build-module/mobile/segmented-control/index.native.js +1 -2
  459. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  460. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  461. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  462. package/build-module/modal/aria-helper.js +2 -1
  463. package/build-module/modal/aria-helper.js.map +1 -1
  464. package/build-module/modal/index.js +3 -4
  465. package/build-module/modal/index.js.map +1 -1
  466. package/build-module/modal/use-modal-exit-animation.js.map +1 -1
  467. package/build-module/navigation/back-button/index.js +1 -2
  468. package/build-module/navigation/back-button/index.js.map +1 -1
  469. package/build-module/navigation/group/index.js +1 -2
  470. package/build-module/navigation/group/index.js.map +1 -1
  471. package/build-module/navigation/item/base-content.js +1 -3
  472. package/build-module/navigation/item/base-content.js.map +1 -1
  473. package/build-module/navigation/item/base.js.map +1 -1
  474. package/build-module/navigation/item/index.js +1 -2
  475. package/build-module/navigation/item/index.js.map +1 -1
  476. package/build-module/navigation/menu/index.js +1 -2
  477. package/build-module/navigation/menu/index.js.map +1 -1
  478. package/build-module/navigation/menu/menu-title-search.js +2 -2
  479. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  480. package/build-module/navigation/menu/menu-title.js +1 -2
  481. package/build-module/navigation/menu/menu-title.js.map +1 -1
  482. package/build-module/navigation/menu/search-no-results-found.js +1 -2
  483. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  484. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  485. package/build-module/navigator/navigator/component.js.map +1 -1
  486. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  487. package/build-module/notice/index.js +1 -2
  488. package/build-module/notice/index.js.map +1 -1
  489. package/build-module/notice/index.native.js +1 -3
  490. package/build-module/notice/index.native.js.map +1 -1
  491. package/build-module/number-control/index.js +1 -3
  492. package/build-module/number-control/index.js.map +1 -1
  493. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  494. package/build-module/palette-edit/index.js +25 -5
  495. package/build-module/palette-edit/index.js.map +1 -1
  496. package/build-module/panel/actions.native.js +1 -2
  497. package/build-module/panel/actions.native.js.map +1 -1
  498. package/build-module/panel/body.js +1 -2
  499. package/build-module/panel/body.js.map +1 -1
  500. package/build-module/panel/body.native.js +1 -2
  501. package/build-module/panel/body.native.js.map +1 -1
  502. package/build-module/panel/header.js +1 -2
  503. package/build-module/panel/header.js.map +1 -1
  504. package/build-module/panel/index.js +1 -2
  505. package/build-module/panel/index.js.map +1 -1
  506. package/build-module/placeholder/index.js +1 -2
  507. package/build-module/placeholder/index.js.map +1 -1
  508. package/build-module/popover/index.js +2 -4
  509. package/build-module/popover/index.js.map +1 -1
  510. package/build-module/popover/overlay-middlewares.js.map +1 -1
  511. package/build-module/popover/utils.js.map +1 -1
  512. package/build-module/progress-bar/index.js +1 -2
  513. package/build-module/progress-bar/index.js.map +1 -1
  514. package/build-module/progress-bar/styles.js.map +1 -1
  515. package/build-module/query-controls/index.js.map +1 -1
  516. package/build-module/query-controls/index.native.js +1 -3
  517. package/build-module/query-controls/index.native.js.map +1 -1
  518. package/build-module/radio-control/index.js +1 -2
  519. package/build-module/radio-control/index.js.map +1 -1
  520. package/build-module/radio-control/index.native.js +1 -2
  521. package/build-module/radio-control/index.native.js.map +1 -1
  522. package/build-module/range-control/index.js +1 -2
  523. package/build-module/range-control/index.js.map +1 -1
  524. package/build-module/range-control/index.native.js.map +1 -1
  525. package/build-module/range-control/mark.js +1 -3
  526. package/build-module/range-control/mark.js.map +1 -1
  527. package/build-module/range-control/rail.js +1 -3
  528. package/build-module/range-control/rail.js.map +1 -1
  529. package/build-module/range-control/styles/range-control-styles.js +32 -32
  530. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  531. package/build-module/range-control/tooltip.js +1 -1
  532. package/build-module/range-control/tooltip.js.map +1 -1
  533. package/build-module/range-control/utils.js.map +1 -1
  534. package/build-module/resizable-box/index.js +1 -2
  535. package/build-module/resizable-box/index.js.map +1 -1
  536. package/build-module/resizable-box/resize-tooltip/index.js +1 -2
  537. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  538. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  539. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  540. package/build-module/responsive-wrapper/index.js.map +1 -1
  541. package/build-module/sandbox/index.js +1 -2
  542. package/build-module/sandbox/index.js.map +1 -1
  543. package/build-module/sandbox/index.native.js +1 -2
  544. package/build-module/sandbox/index.native.js.map +1 -1
  545. package/build-module/search-control/index.js +6 -0
  546. package/build-module/search-control/index.js.map +1 -1
  547. package/build-module/search-control/index.native.js +1 -2
  548. package/build-module/search-control/index.native.js.map +1 -1
  549. package/build-module/search-control/types.js.map +1 -1
  550. package/build-module/select-control/index.js.map +1 -1
  551. package/build-module/select-control/index.native.js.map +1 -1
  552. package/build-module/slot-fill/index.js +1 -3
  553. package/build-module/slot-fill/index.js.map +1 -1
  554. package/build-module/slot-fill/slot.js +1 -2
  555. package/build-module/slot-fill/slot.js.map +1 -1
  556. package/build-module/snackbar/index.js +1 -2
  557. package/build-module/snackbar/index.js.map +1 -1
  558. package/build-module/snackbar/list.js +1 -2
  559. package/build-module/snackbar/list.js.map +1 -1
  560. package/build-module/spinner/index.js +1 -2
  561. package/build-module/spinner/index.js.map +1 -1
  562. package/build-module/spinner/styles.js.map +1 -1
  563. package/build-module/style-provider/index.js +1 -0
  564. package/build-module/style-provider/index.js.map +1 -1
  565. package/build-module/surface/hook.js.map +1 -1
  566. package/build-module/surface/styles.js.map +1 -1
  567. package/build-module/tab-panel/index.js +1 -2
  568. package/build-module/tab-panel/index.js.map +1 -1
  569. package/build-module/tabs/index.js.map +1 -1
  570. package/build-module/tabs/styles.js +28 -6
  571. package/build-module/tabs/styles.js.map +1 -1
  572. package/build-module/tabs/tab.js +9 -4
  573. package/build-module/tabs/tab.js.map +1 -1
  574. package/build-module/tabs/tablist.js +47 -48
  575. package/build-module/tabs/tablist.js.map +1 -1
  576. package/build-module/tabs/tabpanel.js.map +1 -1
  577. package/build-module/text/get-line-height.js.map +1 -1
  578. package/build-module/text/styles/text-mixins.native.js.map +1 -1
  579. package/build-module/text/utils.js.map +1 -1
  580. package/build-module/text-control/index.native.js.map +1 -1
  581. package/build-module/text-highlight/index.js +1 -2
  582. package/build-module/text-highlight/index.js.map +1 -1
  583. package/build-module/textarea-control/index.js.map +1 -1
  584. package/build-module/theme/color-algorithms.js.map +1 -1
  585. package/build-module/theme/styles.js.map +1 -1
  586. package/build-module/tip/index.js +1 -2
  587. package/build-module/tip/index.js.map +1 -1
  588. package/build-module/toggle-control/index.js +1 -2
  589. package/build-module/toggle-control/index.js.map +1 -1
  590. package/build-module/toggle-control/index.native.js.map +1 -1
  591. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +10 -2
  592. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  593. package/build-module/toggle-group-control/toggle-group-control/component.js +4 -65
  594. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  595. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +11 -12
  596. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  597. package/build-module/toggle-group-control/types.js.map +1 -1
  598. package/build-module/toolbar/toolbar/index.js.map +1 -1
  599. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js +2 -2
  600. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  601. package/build-module/toolbar/toolbar-group/index.js +1 -2
  602. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  603. package/build-module/tools-panel/styles.js.map +1 -1
  604. package/build-module/tools-panel/tools-panel/component.js +1 -2
  605. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  606. package/build-module/tools-panel/tools-panel-header/component.js +1 -3
  607. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  608. package/build-module/tooltip/index.js +6 -3
  609. package/build-module/tooltip/index.js.map +1 -1
  610. package/build-module/tooltip/index.native.js +1 -3
  611. package/build-module/tooltip/index.native.js.map +1 -1
  612. package/build-module/tree-grid/cell.js +1 -2
  613. package/build-module/tree-grid/cell.js.map +1 -1
  614. package/build-module/unit-control/index.js.map +1 -1
  615. package/build-module/unit-control/index.native.js +1 -3
  616. package/build-module/unit-control/index.native.js.map +1 -1
  617. package/build-module/unit-control/utils.js.map +1 -1
  618. package/build-module/utils/breakpoint.js.map +1 -1
  619. package/build-module/utils/colors-values.js.map +1 -1
  620. package/build-module/utils/config-values.js.map +1 -1
  621. package/build-module/utils/font-size.js.map +1 -1
  622. package/build-module/utils/hooks/use-animated-offset-rect.js +74 -0
  623. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -0
  624. package/build-module/utils/hooks/use-cx.js.map +1 -1
  625. package/build-module/utils/math.js +2 -2
  626. package/build-module/utils/math.js.map +1 -1
  627. package/build-module/utils/space.js.map +1 -1
  628. package/build-module/utils/unit-values.js.map +1 -1
  629. package/build-module/utils/use-responsive-value.js.map +1 -1
  630. package/build-style/style-rtl.css +8 -5
  631. package/build-style/style.css +8 -5
  632. package/build-types/alignment-matrix-control/types.d.ts +2 -0
  633. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  634. package/build-types/drop-zone/index.d.ts.map +1 -1
  635. package/build-types/modal/aria-helper.d.ts.map +1 -1
  636. package/build-types/palette-edit/index.d.ts +3 -0
  637. package/build-types/palette-edit/index.d.ts.map +1 -1
  638. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  639. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  640. package/build-types/search-control/index.d.ts.map +1 -1
  641. package/build-types/search-control/stories/index.story.d.ts +0 -8
  642. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  643. package/build-types/search-control/types.d.ts +3 -0
  644. package/build-types/search-control/types.d.ts.map +1 -1
  645. package/build-types/tabs/styles.d.ts +7 -0
  646. package/build-types/tabs/styles.d.ts.map +1 -1
  647. package/build-types/tabs/tab.d.ts.map +1 -1
  648. package/build-types/tabs/tablist.d.ts.map +1 -1
  649. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  650. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  651. package/build-types/toggle-group-control/types.d.ts +1 -0
  652. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  653. package/build-types/tooltip/index.d.ts.map +1 -1
  654. package/build-types/utils/hooks/use-animated-offset-rect.d.ts +62 -0
  655. package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -0
  656. package/package.json +20 -20
  657. package/schemas/docs-manifest.json +38 -0
  658. package/src/alignment-matrix-control/README.md +46 -36
  659. package/src/alignment-matrix-control/docs-manifest.json +12 -0
  660. package/src/alignment-matrix-control/types.ts +2 -0
  661. package/src/angle-picker-control/README.md +36 -23
  662. package/src/angle-picker-control/docs-manifest.json +5 -0
  663. package/src/button/style.scss +5 -1
  664. package/src/composite/test/index.tsx +629 -38
  665. package/src/drop-zone/index.tsx +1 -2
  666. package/src/drop-zone/style.scss +1 -1
  667. package/src/modal/aria-helper.ts +1 -0
  668. package/src/palette-edit/index.tsx +30 -5
  669. package/src/palette-edit/test/index.tsx +50 -1
  670. package/src/range-control/styles/range-control-styles.ts +19 -10
  671. package/src/range-control/tooltip.tsx +1 -1
  672. package/src/search-control/README.md +2 -0
  673. package/src/search-control/index.tsx +7 -0
  674. package/src/search-control/stories/index.story.tsx +0 -15
  675. package/src/search-control/test/index.tsx +4 -1
  676. package/src/search-control/types.ts +3 -0
  677. package/src/tabs/styles.ts +116 -47
  678. package/src/tabs/tab.tsx +8 -2
  679. package/src/tabs/tablist.tsx +48 -49
  680. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +6 -6
  681. package/src/toggle-group-control/test/index.tsx +39 -0
  682. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +11 -1
  683. package/src/toggle-group-control/toggle-group-control/component.tsx +3 -98
  684. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +15 -15
  685. package/src/toggle-group-control/types.ts +1 -0
  686. package/src/tooltip/index.tsx +8 -1
  687. package/src/tooltip/test/index.tsx +78 -0
  688. package/src/utils/hooks/use-animated-offset-rect.ts +107 -0
  689. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEvent","useLayoutEffect","useOnValueUpdate","useAnimatedOffsetRect","container","rect","prefix","dataAttribute","transitionEndFilter","setProperties","Object","keys","forEach","property","style","setProperty","String","element","previousValue","setAttribute","onTransitionEnd","event","removeAttribute","addEventListener","removeEventListener"],"sources":["@wordpress/components/src/utils/hooks/use-animated-offset-rect.ts"],"sourcesContent":["/* eslint-disable jsdoc/require-param */\n\n/**\n * WordPress dependencies\n */\nimport { useEvent } from '@wordpress/compose';\nimport { useLayoutEffect } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport type { ElementOffsetRect } from '../element-rect';\nimport { useOnValueUpdate } from './use-on-value-update';\n\n/**\n * A utility used to animate something in a container component based on the \"offset\n * rect\" (position relative to the container and size) of a subelement. For example,\n * this is useful to render an indicator for the selected option of a component, and\n * to animate it when the selected option changes.\n *\n * Takes in a container element and the up-to-date \"offset rect\" of the target\n * subelement, obtained with `useTrackElementOffsetRect`. Then it does the following:\n *\n * - Adds CSS variables with rect information to the container, so that the indicator\n * can be rendered and animated with them. These are kept up-to-date, enabling CSS\n * transitions on change.\n * - Sets an attribute (`data-subelement-animated` by default) when the tracked\n * element changes, so that the target (e.g. the indicator) can be animated to its\n * new size and position.\n * - Removes the attribute when the animation is done.\n *\n * The need for the attribute is due to the fact that the rect might update in\n * situations other than when the tracked element changes, e.g. the tracked element\n * might be resized. In such cases, there is no need to animate the indicator, and\n * the change in size or position of the indicator needs to be reflected immediately.\n */\nexport function useAnimatedOffsetRect(\n\t/**\n\t * The container element.\n\t */\n\tcontainer: HTMLElement | undefined,\n\t/**\n\t * The rect of the tracked element.\n\t */\n\trect: ElementOffsetRect,\n\t{\n\t\tprefix = 'subelement',\n\t\tdataAttribute = `${ prefix }-animated`,\n\t\ttransitionEndFilter = () => true,\n\t}: {\n\t\t/**\n\t\t * The prefix used for the CSS variables, e.g. if `prefix` is `selected`, the\n\t\t * CSS variables will be `--selected-top`, `--selected-left`, etc.\n\t\t * @default 'subelement'\n\t\t */\n\t\tprefix?: string;\n\t\t/**\n\t\t * The name of the data attribute used to indicate that the animation is in\n\t\t * progress. The `data-` prefix is added automatically.\n\t\t *\n\t\t * For example, if `dataAttribute` is `indicator-animated`, the attribute will\n\t\t * be `data-indicator-animated`.\n\t\t * @default `${ prefix }-animated`\n\t\t */\n\t\tdataAttribute?: string;\n\t\t/**\n\t\t * A function that is called with the transition event and returns a boolean\n\t\t * indicating whether the animation should be stopped. The default is a function\n\t\t * that always returns `true`.\n\t\t *\n\t\t * For example, if the animated element is the `::before` pseudo-element, the\n\t\t * function can be written as `( event ) => event.pseudoElement === '::before'`.\n\t\t * @default () => true\n\t\t */\n\t\ttransitionEndFilter?: ( event: TransitionEvent ) => boolean;\n\t} = {}\n) {\n\tconst setProperties = useEvent( () => {\n\t\t( Object.keys( rect ) as Array< keyof typeof rect > ).forEach(\n\t\t\t( property ) =>\n\t\t\t\tproperty !== 'element' &&\n\t\t\t\tcontainer?.style.setProperty(\n\t\t\t\t\t`--${ prefix }-${ property }`,\n\t\t\t\t\tString( rect[ property ] )\n\t\t\t\t)\n\t\t);\n\t} );\n\tuseLayoutEffect( () => {\n\t\tsetProperties();\n\t}, [ rect, setProperties ] );\n\tuseOnValueUpdate( rect.element, ( { previousValue } ) => {\n\t\t// Only enable the animation when moving from one element to another.\n\t\tif ( rect.element && previousValue ) {\n\t\t\tcontainer?.setAttribute( `data-${ dataAttribute }`, '' );\n\t\t}\n\t} );\n\tuseLayoutEffect( () => {\n\t\tfunction onTransitionEnd( event: TransitionEvent ) {\n\t\t\tif ( transitionEndFilter( event ) ) {\n\t\t\t\tcontainer?.removeAttribute( `data-${ dataAttribute }` );\n\t\t\t}\n\t\t}\n\t\tcontainer?.addEventListener( 'transitionend', onTransitionEnd );\n\t\treturn () =>\n\t\t\tcontainer?.removeEventListener( 'transitionend', onTransitionEnd );\n\t}, [ dataAttribute, container, transitionEndFilter ] );\n}\n/* eslint-enable jsdoc/require-param */\n"],"mappings":"AAAA;;AAEA;AACA;AACA;AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,eAAe,QAAQ,oBAAoB;AACpD;AACA;AACA;;AAEA,SAASC,gBAAgB,QAAQ,uBAAuB;;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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EI,mBAAmB,CAAG,CAAC;AACvD;AACA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["__unsafe_useEmotionCache","useEmotionCache","insertStyles","cx","innerCx","useCallback","isSerializedStyles","o","every","p","useCx","cache","classNames","Error","map","arg","key","name"],"sources":["@wordpress/components/src/utils/hooks/use-cx.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { __unsafe_useEmotionCache as useEmotionCache } from '@emotion/react';\nimport type { SerializedStyles } from '@emotion/serialize';\nimport { insertStyles } from '@emotion/utils';\n// eslint-disable-next-line no-restricted-imports\nimport type { ClassNamesArg } from '@emotion/css';\n// eslint-disable-next-line no-restricted-imports\nimport { cx as innerCx } from '@emotion/css';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\nconst isSerializedStyles = ( o: any ): o is SerializedStyles =>\n\ttypeof o !== 'undefined' &&\n\to !== null &&\n\t[ 'name', 'styles' ].every( ( p ) => typeof o[ p ] !== 'undefined' );\n\n/**\n * Retrieve a `cx` function that knows how to handle `SerializedStyles`\n * returned by the `@emotion/react` `css` function in addition to what\n * `cx` normally knows how to handle. It also hooks into the Emotion\n * Cache, allowing `css` calls to work inside iframes.\n *\n * ```jsx\n * import { css } from '@emotion/react';\n *\n * const styles = css`\n * \tcolor: red\n * `;\n *\n * function RedText( { className, ...props } ) {\n * \tconst cx = useCx();\n *\n * \tconst classes = cx(styles, className);\n *\n * \treturn <span className={classes} {...props} />;\n * }\n * ```\n */\nexport const useCx = () => {\n\tconst cache = useEmotionCache();\n\n\tconst cx = useCallback(\n\t\t( ...classNames: ( ClassNamesArg | SerializedStyles )[] ) => {\n\t\t\tif ( cache === null ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'The `useCx` hook should be only used within a valid Emotion Cache Context'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn innerCx(\n\t\t\t\t...classNames.map( ( arg ) => {\n\t\t\t\t\tif ( isSerializedStyles( arg ) ) {\n\t\t\t\t\t\tinsertStyles( cache, arg, false );\n\t\t\t\t\t\treturn `${ cache.key }-${ arg.name }`;\n\t\t\t\t\t}\n\t\t\t\t\treturn arg;\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t[ cache ]\n\t);\n\n\treturn cx;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,wBAAwB,IAAIC,eAAe,QAAQ,gBAAgB;AAE5E,SAASC,YAAY,QAAQ,gBAAgB;AAC7C;;AAEA;AACA,SAASC,EAAE,IAAIC,OAAO,QAAQ,cAAc;;AAE5C;AACA;AACA;AACA,SAASC,WAAW,QAAQ,oBAAoB;AAEhD,MAAMC,kBAAkB,GAAKC,CAAM,IAClC,OAAOA,CAAC,KAAK,WAAW,IACxBA,CAAC,KAAK,IAAI,IACV,CAAE,MAAM,EAAE,QAAQ,CAAE,CAACC,KAAK,CAAIC,CAAC,IAAM,OAAOF,CAAC,CAAEE,CAAC,CAAE,KAAK,WAAY,CAAC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,KAAK,GAAGA,CAAA,KAAM;EAC1B,MAAMC,KAAK,GAAGV,eAAe,CAAC,CAAC;EAE/B,MAAME,EAAE,GAAGE,WAAW,CACrB,CAAE,GAAGO,UAAkD,KAAM;IAC5D,IAAKD,KAAK,KAAK,IAAI,EAAG;MACrB,MAAM,IAAIE,KAAK,CACd,2EACD,CAAC;IACF;IAEA,OAAOT,OAAO,CACb,GAAGQ,UAAU,CAACE,GAAG,CAAIC,GAAG,IAAM;MAC7B,IAAKT,kBAAkB,CAAES,GAAI,CAAC,EAAG;QAChCb,YAAY,CAAES,KAAK,EAAEI,GAAG,EAAE,KAAM,CAAC;QACjC,OAAQ,GAAGJ,KAAK,CAACK,GAAK,IAAID,GAAG,CAACE,IAAM,EAAC;MACtC;MACA,OAAOF,GAAG;IACX,CAAE,CACH,CAAC;EACF,CAAC,EACD,CAAEJ,KAAK,CACR,CAAC;EAED,OAAOR,EAAE;AACV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["__unsafe_useEmotionCache","useEmotionCache","insertStyles","cx","innerCx","useCallback","isSerializedStyles","o","every","p","useCx","cache","classNames","Error","map","arg","key","name"],"sources":["@wordpress/components/src/utils/hooks/use-cx.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { __unsafe_useEmotionCache as useEmotionCache } from '@emotion/react';\nimport type { SerializedStyles } from '@emotion/serialize';\nimport { insertStyles } from '@emotion/utils';\n// eslint-disable-next-line no-restricted-imports\nimport type { ClassNamesArg } from '@emotion/css';\n// eslint-disable-next-line no-restricted-imports\nimport { cx as innerCx } from '@emotion/css';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\nconst isSerializedStyles = ( o: any ): o is SerializedStyles =>\n\ttypeof o !== 'undefined' &&\n\to !== null &&\n\t[ 'name', 'styles' ].every( ( p ) => typeof o[ p ] !== 'undefined' );\n\n/**\n * Retrieve a `cx` function that knows how to handle `SerializedStyles`\n * returned by the `@emotion/react` `css` function in addition to what\n * `cx` normally knows how to handle. It also hooks into the Emotion\n * Cache, allowing `css` calls to work inside iframes.\n *\n * ```jsx\n * import { css } from '@emotion/react';\n *\n * const styles = css`\n * \tcolor: red\n * `;\n *\n * function RedText( { className, ...props } ) {\n * \tconst cx = useCx();\n *\n * \tconst classes = cx(styles, className);\n *\n * \treturn <span className={classes} {...props} />;\n * }\n * ```\n */\nexport const useCx = () => {\n\tconst cache = useEmotionCache();\n\n\tconst cx = useCallback(\n\t\t( ...classNames: ( ClassNamesArg | SerializedStyles )[] ) => {\n\t\t\tif ( cache === null ) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'The `useCx` hook should be only used within a valid Emotion Cache Context'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn innerCx(\n\t\t\t\t...classNames.map( ( arg ) => {\n\t\t\t\t\tif ( isSerializedStyles( arg ) ) {\n\t\t\t\t\t\tinsertStyles( cache, arg, false );\n\t\t\t\t\t\treturn `${ cache.key }-${ arg.name }`;\n\t\t\t\t\t}\n\t\t\t\t\treturn arg;\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t[ cache ]\n\t);\n\n\treturn cx;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,wBAAwB,IAAIC,eAAe,QAAQ,gBAAgB;AAE5E,SAASC,YAAY,QAAQ,gBAAgB;AAC7C;;AAEA;AACA,SAASC,EAAE,IAAIC,OAAO,QAAQ,cAAc;;AAE5C;AACA;AACA;AACA,SAASC,WAAW,QAAQ,oBAAoB;AAEhD,MAAMC,kBAAkB,GAAKC,CAAM,IAClC,OAAOA,CAAC,KAAK,WAAW,IACxBA,CAAC,KAAK,IAAI,IACV,CAAE,MAAM,EAAE,QAAQ,CAAE,CAACC,KAAK,CAAIC,CAAC,IAAM,OAAOF,CAAC,CAAEE,CAAC,CAAE,KAAK,WAAY,CAAC;;AAErE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,KAAK,GAAGA,CAAA,KAAM;EAC1B,MAAMC,KAAK,GAAGV,eAAe,CAAC,CAAC;EAE/B,MAAME,EAAE,GAAGE,WAAW,CACrB,CAAE,GAAGO,UAAkD,KAAM;IAC5D,IAAKD,KAAK,KAAK,IAAI,EAAG;MACrB,MAAM,IAAIE,KAAK,CACd,2EACD,CAAC;IACF;IAEA,OAAOT,OAAO,CACb,GAAGQ,UAAU,CAACE,GAAG,CAAIC,GAAG,IAAM;MAC7B,IAAKT,kBAAkB,CAAES,GAAI,CAAC,EAAG;QAChCb,YAAY,CAAES,KAAK,EAAEI,GAAG,EAAE,KAAM,CAAC;QACjC,OAAO,GAAIJ,KAAK,CAACK,GAAG,IAAMD,GAAG,CAACE,IAAI,EAAG;MACtC;MACA,OAAOF,GAAG;IACX,CAAE,CACH,CAAC;EACF,CAAC,EACD,CAAEJ,KAAK,CACR,CAAC;EAED,OAAOR,EAAE;AACV,CAAC","ignoreList":[]}
@@ -18,7 +18,7 @@ export function getNumber(value) {
18
18
  * @return {number} The sum of values.
19
19
  */
20
20
  export function add(...args) {
21
- return args.reduce( /** @type {(sum:number, arg: number|string) => number} */
21
+ return args.reduce(/** @type {(sum:number, arg: number|string) => number} */
22
22
  (sum, arg) => sum + getNumber(arg), 0);
23
23
  }
24
24
 
@@ -30,7 +30,7 @@ export function add(...args) {
30
30
  * @return {number} The difference of the values.
31
31
  */
32
32
  export function subtract(...args) {
33
- return args.reduce( /** @type {(diff:number, arg: number|string, index:number) => number} */
33
+ return args.reduce(/** @type {(diff:number, arg: number|string, index:number) => number} */
34
34
  (diff, arg, index) => {
35
35
  const value = getNumber(arg);
36
36
  return index === 0 ? value : diff - value;
@@ -1 +1 @@
1
- {"version":3,"names":["getNumber","value","number","Number","isNaN","add","args","reduce","sum","arg","subtract","diff","index","getPrecision","split","undefined","length","clamp","min","max","baseValue","Math","roundClamp","Infinity","step","stepValue","precision","rounded","round","clampedValue","toFixed"],"sources":["@wordpress/components/src/utils/math.js"],"sourcesContent":["/**\n * Parses and retrieves a number value.\n *\n * @param {unknown} value The incoming value.\n *\n * @return {number} The parsed number value.\n */\nexport function getNumber( value ) {\n\tconst number = Number( value );\n\n\treturn isNaN( number ) ? 0 : number;\n}\n\n/**\n * Safely adds 2 values.\n *\n * @param {Array<number|string>} args Values to add together.\n *\n * @return {number} The sum of values.\n */\nexport function add( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(sum:number, arg: number|string) => number} */\n\t\t( sum, arg ) => sum + getNumber( arg ),\n\t\t0\n\t);\n}\n\n/**\n * Safely subtracts 2 values.\n *\n * @param {Array<number|string>} args Values to subtract together.\n *\n * @return {number} The difference of the values.\n */\nexport function subtract( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(diff:number, arg: number|string, index:number) => number} */\n\t\t( diff, arg, index ) => {\n\t\t\tconst value = getNumber( arg );\n\t\t\treturn index === 0 ? value : diff - value;\n\t\t},\n\t\t0\n\t);\n}\n\n/**\n * Determines the decimal position of a number value.\n *\n * @param {number} value The number to evaluate.\n *\n * @return {number} The number of decimal places.\n */\nfunction getPrecision( value ) {\n\tconst split = ( value + '' ).split( '.' );\n\treturn split[ 1 ] !== undefined ? split[ 1 ].length : 0;\n}\n\n/**\n * Clamps a value based on a min/max range.\n *\n * @param {number} value The value.\n * @param {number} min The minimum range.\n * @param {number} max The maximum range.\n *\n * @return {number} The clamped value.\n */\nexport function clamp( value, min, max ) {\n\tconst baseValue = getNumber( value );\n\treturn Math.max( min, Math.min( baseValue, max ) );\n}\n\n/**\n * Clamps a value based on a min/max range with rounding\n *\n * @param {number | string} value The value.\n * @param {number} min The minimum range.\n * @param {number} max The maximum range.\n * @param {number} step A multiplier for the value.\n *\n * @return {number} The rounded and clamped value.\n */\nexport function roundClamp(\n\tvalue = 0,\n\tmin = Infinity,\n\tmax = Infinity,\n\tstep = 1\n) {\n\tconst baseValue = getNumber( value );\n\tconst stepValue = getNumber( step );\n\tconst precision = getPrecision( step );\n\tconst rounded = Math.round( baseValue / stepValue ) * stepValue;\n\tconst clampedValue = clamp( rounded, min, max );\n\n\treturn precision\n\t\t? getNumber( clampedValue.toFixed( precision ) )\n\t\t: clampedValue;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAASA,CAAEC,KAAK,EAAG;EAClC,MAAMC,MAAM,GAAGC,MAAM,CAAEF,KAAM,CAAC;EAE9B,OAAOG,KAAK,CAAEF,MAAO,CAAC,GAAG,CAAC,GAAGA,MAAM;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,GAAGA,CAAE,GAAGC,IAAI,EAAG;EAC9B,OAAOA,IAAI,CAACC,MAAM,EACjB;EACA,CAAEC,GAAG,EAAEC,GAAG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,IAAK,CAAC;EACnC,MAAME,SAAS,GAAGb,YAAY,CAAEW,IAAK,CAAC;EACtC,MAAMG,OAAO,GAAGN,IAAI,CAACO,KAAK,CAAER,SAAS,GAAGK,SAAU,CAAC,GAAGA,SAAS;EAC/D,MAAMI,YAAY,GAAGZ,KAAK,CAAEU,OAAO,EAAET,GAAG,EAAEC,GAAI,CAAC;EAE/C,OAAOO,SAAS,GACb1B,SAAS,CAAE6B,YAAY,CAACC,OAAO,CAAEJ,SAAU,CAAE,CAAC,GAC9CG,YAAY;AAChB","ignoreList":[]}
1
+ {"version":3,"names":["getNumber","value","number","Number","isNaN","add","args","reduce","sum","arg","subtract","diff","index","getPrecision","split","undefined","length","clamp","min","max","baseValue","Math","roundClamp","Infinity","step","stepValue","precision","rounded","round","clampedValue","toFixed"],"sources":["@wordpress/components/src/utils/math.js"],"sourcesContent":["/**\n * Parses and retrieves a number value.\n *\n * @param {unknown} value The incoming value.\n *\n * @return {number} The parsed number value.\n */\nexport function getNumber( value ) {\n\tconst number = Number( value );\n\n\treturn isNaN( number ) ? 0 : number;\n}\n\n/**\n * Safely adds 2 values.\n *\n * @param {Array<number|string>} args Values to add together.\n *\n * @return {number} The sum of values.\n */\nexport function add( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(sum:number, arg: number|string) => number} */\n\t\t( sum, arg ) => sum + getNumber( arg ),\n\t\t0\n\t);\n}\n\n/**\n * Safely subtracts 2 values.\n *\n * @param {Array<number|string>} args Values to subtract together.\n *\n * @return {number} The difference of the values.\n */\nexport function subtract( ...args ) {\n\treturn args.reduce(\n\t\t/** @type {(diff:number, arg: number|string, index:number) => number} */\n\t\t( diff, arg, index ) => {\n\t\t\tconst value = getNumber( arg );\n\t\t\treturn index === 0 ? value : diff - value;\n\t\t},\n\t\t0\n\t);\n}\n\n/**\n * Determines the decimal position of a number value.\n *\n * @param {number} value The number to evaluate.\n *\n * @return {number} The number of decimal places.\n */\nfunction getPrecision( value ) {\n\tconst split = ( value + '' ).split( '.' );\n\treturn split[ 1 ] !== undefined ? split[ 1 ].length : 0;\n}\n\n/**\n * Clamps a value based on a min/max range.\n *\n * @param {number} value The value.\n * @param {number} min The minimum range.\n * @param {number} max The maximum range.\n *\n * @return {number} The clamped value.\n */\nexport function clamp( value, min, max ) {\n\tconst baseValue = getNumber( value );\n\treturn Math.max( min, Math.min( baseValue, max ) );\n}\n\n/**\n * Clamps a value based on a min/max range with rounding\n *\n * @param {number | string} value The value.\n * @param {number} min The minimum range.\n * @param {number} max The maximum range.\n * @param {number} step A multiplier for the value.\n *\n * @return {number} The rounded and clamped value.\n */\nexport function roundClamp(\n\tvalue = 0,\n\tmin = Infinity,\n\tmax = Infinity,\n\tstep = 1\n) {\n\tconst baseValue = getNumber( value );\n\tconst stepValue = getNumber( step );\n\tconst precision = getPrecision( step );\n\tconst rounded = Math.round( baseValue / stepValue ) * stepValue;\n\tconst clampedValue = clamp( rounded, min, max );\n\n\treturn precision\n\t\t? getNumber( clampedValue.toFixed( precision ) )\n\t\t: clampedValue;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,SAASA,CAAEC,KAAK,EAAG;EAClC,MAAMC,MAAM,GAAGC,MAAM,CAAEF,KAAM,CAAC;EAE9B,OAAOG,KAAK,CAAEF,MAAO,CAAC,GAAG,CAAC,GAAGA,MAAM;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASG,GAAGA,CAAE,GAAGC,IAAI,EAAG;EAC9B,OAAOA,IAAI,CAACC,MAAM,CACjB;EACA,CAAEC,GAAG,EAAEC,GAAG,KAAMD,GAAG,GAAGR,SAAS,CAAES,GAAI,CAAC,EACtC,CACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAAE,GAAGJ,IAAI,EAAG;EACnC,OAAOA,IAAI,CAACC,MAAM,CACjB;EACA,CAAEI,IAAI,EAAEF,GAAG,EAA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CAAC;EAE/C,OAAOO,SAAS,GACb1B,SAAS,CAAE6B,YAAY,CAACC,OAAO,CAAEJ,SAAU,CAAE,CAAC,GAC9CG,YAAY;AAChB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["GRID_BASE","space","value","undefined","asInt","Number","window","CSS","supports","toString","isNaN"],"sources":["@wordpress/components/src/utils/space.ts"],"sourcesContent":["/**\n * The argument value for the `space()` utility function.\n *\n * When this is a number or a numeric string, it will be interpreted as a\n * multiplier for the grid base value (4px). For example, `space( 2 )` will be 8px.\n *\n * Otherwise, it will be interpreted as a literal CSS length value. For example,\n * `space( 'auto' )` will be 'auto', and `space( '2px' )` will be 2px.\n */\nexport type SpaceInput = number | string;\n\nconst GRID_BASE = '4px';\n\n/**\n * A function that handles numbers, numeric strings, and unit values.\n *\n * When given a number or a numeric string, it will return the grid-based\n * value as a factor of GRID_BASE, defined above.\n *\n * When given a unit value or one of the named CSS values like `auto`,\n * it will simply return the value back.\n *\n * @param value A number, numeric string, or a unit value.\n */\nexport function space( value?: SpaceInput ): string | undefined {\n\tif ( typeof value === 'undefined' ) {\n\t\treturn undefined;\n\t}\n\n\t// Handle empty strings, if it's the number 0 this still works.\n\tif ( ! value ) {\n\t\treturn '0';\n\t}\n\n\tconst asInt = typeof value === 'number' ? value : Number( value );\n\n\t// Test if the input has a unit, was NaN, or was one of the named CSS values (like `auto`), in which case just use that value.\n\tif (\n\t\t( typeof window !== 'undefined' &&\n\t\t\twindow.CSS?.supports?.( 'margin', value.toString() ) ) ||\n\t\tNumber.isNaN( asInt )\n\t) {\n\t\treturn value.toString();\n\t}\n\n\treturn `calc(${ GRID_BASE } * ${ value })`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,MAAMA,SAAS,GAAG,KAAK;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CAAEC,KAAkB,EAAuB;EAC/D,IAAK,OAAOA,KAAK,KAAK,WAAW,EAAG;IACnC,OAAOC,SAAS;EACjB;;EAEA;EACA,IAAK,CAAED,KAAK,EAAG;IACd,OAAO,GAAG;EACX;EAEA,MAAME,KAAK,GAAG,OAAOF,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGG,MAAM,CAAEH,KAAM,CAAC;;EAEjE;EACA,IACG,OAAOI,MAAM,KAAK,WAAW,IAC9BA,MAAM,CAACC,GAAG,EAAEC,QAAQ,GAAI,QAAQ,EAAEN,KAAK,CAACO,QAAQ,CAAC,CAAE,CAAC,IACrDJ,MAAM,CAACK,KAAK,CAAEN,KAAM,CAAC,EACpB;IACD,OAAOF,KAAK,CAACO,QAAQ,CAAC,CAAC;EACxB;EAEA,OAAQ,QAAQT,SAAW,MAAME,KAAO,GAAE;AAC3C","ignoreList":[]}
1
+ {"version":3,"names":["GRID_BASE","space","value","undefined","asInt","Number","window","CSS","supports","toString","isNaN"],"sources":["@wordpress/components/src/utils/space.ts"],"sourcesContent":["/**\n * The argument value for the `space()` utility function.\n *\n * When this is a number or a numeric string, it will be interpreted as a\n * multiplier for the grid base value (4px). For example, `space( 2 )` will be 8px.\n *\n * Otherwise, it will be interpreted as a literal CSS length value. For example,\n * `space( 'auto' )` will be 'auto', and `space( '2px' )` will be 2px.\n */\nexport type SpaceInput = number | string;\n\nconst GRID_BASE = '4px';\n\n/**\n * A function that handles numbers, numeric strings, and unit values.\n *\n * When given a number or a numeric string, it will return the grid-based\n * value as a factor of GRID_BASE, defined above.\n *\n * When given a unit value or one of the named CSS values like `auto`,\n * it will simply return the value back.\n *\n * @param value A number, numeric string, or a unit value.\n */\nexport function space( value?: SpaceInput ): string | undefined {\n\tif ( typeof value === 'undefined' ) {\n\t\treturn undefined;\n\t}\n\n\t// Handle empty strings, if it's the number 0 this still works.\n\tif ( ! value ) {\n\t\treturn '0';\n\t}\n\n\tconst asInt = typeof value === 'number' ? value : Number( value );\n\n\t// Test if the input has a unit, was NaN, or was one of the named CSS values (like `auto`), in which case just use that value.\n\tif (\n\t\t( typeof window !== 'undefined' &&\n\t\t\twindow.CSS?.supports?.( 'margin', value.toString() ) ) ||\n\t\tNumber.isNaN( asInt )\n\t) {\n\t\treturn value.toString();\n\t}\n\n\treturn `calc(${ GRID_BASE } * ${ value })`;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,MAAMA,SAAS,GAAG,KAAK;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CAAEC,KAAkB,EAAuB;EAC/D,IAAK,OAAOA,KAAK,KAAK,WAAW,EAAG;IACnC,OAAOC,SAAS;EACjB;;EAEA;EACA,IAAK,CAAED,KAAK,EAAG;IACd,OAAO,GAAG;EACX;EAEA,MAAME,KAAK,GAAG,OAAOF,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGG,MAAM,CAAEH,KAAM,CAAC;;EAEjE;EACA,IACG,OAAOI,MAAM,KAAK,WAAW,IAC9BA,MAAM,CAACC,GAAG,EAAEC,QAAQ,GAAI,QAAQ,EAAEN,KAAK,CAACO,QAAQ,CAAC,CAAE,CAAC,IACrDJ,MAAM,CAACK,KAAK,CAAEN,KAAM,CAAC,EACpB;IACD,OAAOF,KAAK,CAACO,QAAQ,CAAC,CAAC;EACxB;EAEA,OAAO,QAAST,SAAS,MAAQE,KAAK,GAAI;AAC3C","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["UNITED_VALUE_REGEX","parseCSSUnitValue","toParse","value","trim","matched","match","undefined","num","unit","numParsed","parseFloat","Number","isNaN","createCSSUnitValue"],"sources":["@wordpress/components/src/utils/unit-values.ts"],"sourcesContent":["const UNITED_VALUE_REGEX =\n\t/^([\\d.\\-+]*)\\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;\n\n/**\n * Parses a number and unit from a value.\n *\n * @param toParse Value to parse\n *\n * @return The extracted number and unit.\n */\nexport function parseCSSUnitValue(\n\ttoParse: string\n): [ number | undefined, string | undefined ] {\n\tconst value = toParse.trim();\n\n\tconst matched = value.match( UNITED_VALUE_REGEX );\n\tif ( ! matched ) {\n\t\treturn [ undefined, undefined ];\n\t}\n\tconst [ , num, unit ] = matched;\n\tlet numParsed: number | undefined = parseFloat( num );\n\tnumParsed = Number.isNaN( numParsed ) ? undefined : numParsed;\n\n\treturn [ numParsed, unit ];\n}\n\n/**\n * Combines a value and a unit into a unit value.\n *\n * @param value\n * @param unit\n *\n * @return The unit value.\n */\nexport function createCSSUnitValue(\n\tvalue: string | number,\n\tunit: string\n): string {\n\treturn `${ value }${ unit }`;\n}\n"],"mappings":"AAAA,MAAMA,kBAAkB,GACvB,8NAA8N;;AAE/N;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAChCC,OAAe,EAC8B;EAC7C,MAAMC,KAAK,GAAGD,OAAO,CAACE,IAAI,CAAC,CAAC;EAE5B,MAAMC,OAAO,GAAGF,KAAK,CAACG,KAAK,CAAEN,kBAAmB,CAAC;EACjD,IAAK,CAAEK,OAAO,EAAG;IAChB,OAAO,CAAEE,SAAS,EAAEA,SAAS,CAAE;EAChC;EACA,MAAM,GAAIC,GAAG,EAAEC,IAAI,CAAE,GAAGJ,OAAO;EAC/B,IAAIK,SAA6B,GAAGC,UAAU,CAAEH,GAAI,CAAC;EACrDE,SAAS,GAAGE,MAAM,CAACC,KAAK,CAAEH,SAAU,CAAC,GAAGH,SAAS,GAAGG,SAAS;EAE7D,OAAO,CAAEA,SAAS,EAAED,IAAI,CAAE;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,kBAAkBA,CACjCX,KAAsB,EACtBM,IAAY,EACH;EACT,OAAQ,GAAGN,KAAO,GAAGM,IAAM,EAAC;AAC7B","ignoreList":[]}
1
+ {"version":3,"names":["UNITED_VALUE_REGEX","parseCSSUnitValue","toParse","value","trim","matched","match","undefined","num","unit","numParsed","parseFloat","Number","isNaN","createCSSUnitValue"],"sources":["@wordpress/components/src/utils/unit-values.ts"],"sourcesContent":["const UNITED_VALUE_REGEX =\n\t/^([\\d.\\-+]*)\\s*(fr|cm|mm|Q|in|pc|pt|px|em|ex|ch|rem|lh|vw|vh|vmin|vmax|%|cap|ic|rlh|vi|vb|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx|svw|lvw|dvw|svh|lvh|dvh|svi|lvi|dvi|svb|lvb|dvb|svmin|lvmin|dvmin|svmax|lvmax|dvmax)?$/;\n\n/**\n * Parses a number and unit from a value.\n *\n * @param toParse Value to parse\n *\n * @return The extracted number and unit.\n */\nexport function parseCSSUnitValue(\n\ttoParse: string\n): [ number | undefined, string | undefined ] {\n\tconst value = toParse.trim();\n\n\tconst matched = value.match( UNITED_VALUE_REGEX );\n\tif ( ! matched ) {\n\t\treturn [ undefined, undefined ];\n\t}\n\tconst [ , num, unit ] = matched;\n\tlet numParsed: number | undefined = parseFloat( num );\n\tnumParsed = Number.isNaN( numParsed ) ? undefined : numParsed;\n\n\treturn [ numParsed, unit ];\n}\n\n/**\n * Combines a value and a unit into a unit value.\n *\n * @param value\n * @param unit\n *\n * @return The unit value.\n */\nexport function createCSSUnitValue(\n\tvalue: string | number,\n\tunit: string\n): string {\n\treturn `${ value }${ unit }`;\n}\n"],"mappings":"AAAA,MAAMA,kBAAkB,GACvB,8NAA8N;;AAE/N;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAChCC,OAAe,EAC8B;EAC7C,MAAMC,KAAK,GAAGD,OAAO,CAACE,IAAI,CAAC,CAAC;EAE5B,MAAMC,OAAO,GAAGF,KAAK,CAACG,KAAK,CAAEN,kBAAmB,CAAC;EACjD,IAAK,CAAEK,OAAO,EAAG;IAChB,OAAO,CAAEE,SAAS,EAAEA,SAAS,CAAE;EAChC;EACA,MAAM,GAAIC,GAAG,EAAEC,IAAI,CAAE,GAAGJ,OAAO;EAC/B,IAAIK,SAA6B,GAAGC,UAAU,CAAEH,GAAI,CAAC;EACrDE,SAAS,GAAGE,MAAM,CAACC,KAAK,CAAEH,SAAU,CAAC,GAAGH,SAAS,GAAGG,SAAS;EAE7D,OAAO,CAAEA,SAAS,EAAED,IAAI,CAAE;AAC3B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASK,kBAAkBA,CACjCX,KAAsB,EACtBM,IAAY,EACH;EACT,OAAO,GAAIN,KAAK,GAAKM,IAAI,EAAG;AAC7B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useState","breakpoints","useBreakpointIndex","options","defaultIndex","TypeError","length","RangeError","value","setValue","getIndex","filter","bp","window","matchMedia","matches","onResize","newValue","addEventListener","removeEventListener","useResponsiveValue","values","index","Array","isArray","array"],"sources":["@wordpress/components/src/utils/use-responsive-value.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\n\nconst breakpoints = [ '40em', '52em', '64em' ];\n\nexport const useBreakpointIndex = (\n\toptions: { defaultIndex?: number } = {}\n) => {\n\tconst { defaultIndex = 0 } = options;\n\n\tif ( typeof defaultIndex !== 'number' ) {\n\t\tthrow new TypeError(\n\t\t\t`Default breakpoint index should be a number. Got: ${ defaultIndex }, ${ typeof defaultIndex }`\n\t\t);\n\t} else if ( defaultIndex < 0 || defaultIndex > breakpoints.length - 1 ) {\n\t\tthrow new RangeError(\n\t\t\t`Default breakpoint index out of range. Theme has ${ breakpoints.length } breakpoints, got index ${ defaultIndex }`\n\t\t);\n\t}\n\n\tconst [ value, setValue ] = useState( defaultIndex );\n\n\tuseEffect( () => {\n\t\tconst getIndex = () =>\n\t\t\tbreakpoints.filter( ( bp ) => {\n\t\t\t\treturn typeof window !== 'undefined'\n\t\t\t\t\t? window.matchMedia( `screen and (min-width: ${ bp })` )\n\t\t\t\t\t\t\t.matches\n\t\t\t\t\t: false;\n\t\t\t} ).length;\n\n\t\tconst onResize = () => {\n\t\t\tconst newValue = getIndex();\n\t\t\tif ( value !== newValue ) {\n\t\t\t\tsetValue( newValue );\n\t\t\t}\n\t\t};\n\n\t\tonResize();\n\n\t\tif ( typeof window !== 'undefined' ) {\n\t\t\twindow.addEventListener( 'resize', onResize );\n\t\t}\n\t\treturn () => {\n\t\t\tif ( typeof window !== 'undefined' ) {\n\t\t\t\twindow.removeEventListener( 'resize', onResize );\n\t\t\t}\n\t\t};\n\t}, [ value ] );\n\n\treturn value;\n};\n\nexport function useResponsiveValue< T >(\n\tvalues: ( T | undefined )[],\n\toptions: Parameters< typeof useBreakpointIndex >[ 0 ] = {}\n): T | undefined {\n\tconst index = useBreakpointIndex( options );\n\n\t// Allow calling the function with a \"normal\" value without having to check on the outside.\n\tif ( ! Array.isArray( values ) && typeof values !== 'function' ) {\n\t\treturn values;\n\t}\n\n\tconst array = values || [];\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\treturn /** @type {T[]} */ array[\n\t\t/* eslint-enable jsdoc/no-undefined-types */\n\t\tindex >= array.length ? array.length - 1 : index\n\t];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;AAExD,MAAMC,WAAW,GAAG,CAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAE;AAE9C,OAAO,MAAMC,kBAAkB,GAAGA,CACjCC,OAAkC,GAAG,CAAC,CAAC,KACnC;EACJ,MAAM;IAAEC,YAAY,GAAG;EAAE,CAAC,GAAGD,OAAO;EAEpC,IAAK,OAAOC,YAAY,KAAK,QAAQ,EAAG;IACvC,MAAM,IAAIC,SAAS,CACjB,qDA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AC;;EAE3C;EACA,IAAK,CAAEoB,KAAK,CAACC,OAAO,CAAEH,MAAO,CAAC,IAAI,OAAOA,MAAM,KAAK,UAAU,EAAG;IAChE,OAAOA,MAAM;EACd;EAEA,MAAMI,KAAK,GAAGJ,MAAM,IAAI,EAAE;;EAE1B;EACA,OAAO,kBAAmBI,KAAK,CAC9B;EACAH,KAAK,IAAIG,KAAK,CAACnB,MAAM,GAAGmB,KAAK,CAACnB,MAAM,GAAG,CAAC,GAAGgB,KAAK,CAChD;AACF","ignoreList":[]}
1
+ {"version":3,"names":["useEffect","useState","breakpoints","useBreakpointIndex","options","defaultIndex","TypeError","length","RangeError","value","setValue","getIndex","filter","bp","window","matchMedia","matches","onResize","newValue","addEventListener","removeEventListener","useResponsiveValue","values","index","Array","isArray","array"],"sources":["@wordpress/components/src/utils/use-responsive-value.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\n\nconst breakpoints = [ '40em', '52em', '64em' ];\n\nexport const useBreakpointIndex = (\n\toptions: { defaultIndex?: number } = {}\n) => {\n\tconst { defaultIndex = 0 } = options;\n\n\tif ( typeof defaultIndex !== 'number' ) {\n\t\tthrow new TypeError(\n\t\t\t`Default breakpoint index should be a number. Got: ${ defaultIndex }, ${ typeof defaultIndex }`\n\t\t);\n\t} else if ( defaultIndex < 0 || defaultIndex > breakpoints.length - 1 ) {\n\t\tthrow new RangeError(\n\t\t\t`Default breakpoint index out of range. Theme has ${ breakpoints.length } breakpoints, got index ${ defaultIndex }`\n\t\t);\n\t}\n\n\tconst [ value, setValue ] = useState( defaultIndex );\n\n\tuseEffect( () => {\n\t\tconst getIndex = () =>\n\t\t\tbreakpoints.filter( ( bp ) => {\n\t\t\t\treturn typeof window !== 'undefined'\n\t\t\t\t\t? window.matchMedia( `screen and (min-width: ${ bp })` )\n\t\t\t\t\t\t\t.matches\n\t\t\t\t\t: false;\n\t\t\t} ).length;\n\n\t\tconst onResize = () => {\n\t\t\tconst newValue = getIndex();\n\t\t\tif ( value !== newValue ) {\n\t\t\t\tsetValue( newValue );\n\t\t\t}\n\t\t};\n\n\t\tonResize();\n\n\t\tif ( typeof window !== 'undefined' ) {\n\t\t\twindow.addEventListener( 'resize', onResize );\n\t\t}\n\t\treturn () => {\n\t\t\tif ( typeof window !== 'undefined' ) {\n\t\t\t\twindow.removeEventListener( 'resize', onResize );\n\t\t\t}\n\t\t};\n\t}, [ value ] );\n\n\treturn value;\n};\n\nexport function useResponsiveValue< T >(\n\tvalues: ( T | undefined )[],\n\toptions: Parameters< typeof useBreakpointIndex >[ 0 ] = {}\n): T | undefined {\n\tconst index = useBreakpointIndex( options );\n\n\t// Allow calling the function with a \"normal\" value without having to check on the outside.\n\tif ( ! Array.isArray( values ) && typeof values !== 'function' ) {\n\t\treturn values;\n\t}\n\n\tconst array = values || [];\n\n\t/* eslint-disable jsdoc/no-undefined-types */\n\treturn /** @type {T[]} */ array[\n\t\t/* eslint-enable jsdoc/no-undefined-types */\n\t\tindex >= array.length ? array.length - 1 : index\n\t];\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,oBAAoB;AAExD,MAAMC,WAAW,GAAG,CAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAE;AAE9C,OAAO,MAAMC,kBAAkB,GAAGA,CACjCC,OAAkC,GAAG,CAAC,CAAC,KACnC;EACJ,MAAM;IAAEC,YAAY,GAAG;EAAE,CAAC,GAAGD,OAAO;EAEpC,IAAK,OAAOC,YAAY,KAAK,QAAQ,EAAG;IACvC,MAAM,IAAIC,SAAS,CAClB,qDAAsDD,YAAY,KAAO,OAAOA,YAAY,EAC7F,CAAC;EACF,CAAC,MAAM,IAAKA,YAAY,GAAG,CAAC,IAAIA,YAAY,GAAGH,WAAW,CAACK,MAAM,GAAG,CAAC,EAAG;IACvE,MAAM,IAAIC,UAAU,CACnB,oDAAqDN,WAAW,CAACK,MAAM,2BAA6BF,YAAY,EACjH,CA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K,IAAIG,KAAK,CAACnB,MAAM,GAAGmB,KAAK,CAACnB,MAAM,GAAG,CAAC,GAAGgB,KAAK,CAChD;AACF","ignoreList":[]}
@@ -333,7 +333,7 @@
333
333
  transform: none;
334
334
  }
335
335
  .components-button.is-secondary {
336
- box-shadow: inset 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
336
+ box-shadow: inset 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)), 0 0 0 currentColor;
337
337
  outline: 1px solid transparent;
338
338
  white-space: nowrap;
339
339
  color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
@@ -345,6 +345,9 @@
345
345
  .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
346
  box-shadow: inset 0 0 0 1px #ddd;
347
347
  }
348
+ .components-button.is-secondary:focus:not(:disabled) {
349
+ box-shadow: 0 0 0 currentColor inset, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
350
+ }
348
351
  .components-button.is-tertiary {
349
352
  white-space: nowrap;
350
353
  color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
@@ -1141,22 +1144,22 @@ body.is-dragging-components-draggable {
1141
1144
  opacity: 0;
1142
1145
  transform: scale(0.9);
1143
1146
  }
1144
- .components-drop-zone.is-active:not(.has-dragged-out) .components-drop-zone__content {
1147
+ .components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content {
1145
1148
  opacity: 1;
1146
1149
  transition: opacity 0.2s ease-in-out;
1147
1150
  }
1148
1151
  @media (prefers-reduced-motion) {
1149
- .components-drop-zone.is-active:not(.has-dragged-out) .components-drop-zone__content {
1152
+ .components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content {
1150
1153
  transition: none;
1151
1154
  }
1152
1155
  }
1153
- .components-drop-zone.is-active:not(.has-dragged-out) .components-drop-zone__content-inner {
1156
+ .components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content-inner {
1154
1157
  opacity: 1;
1155
1158
  transform: scale(1);
1156
1159
  transition: opacity 0.1s ease-in-out 0.1s, transform 0.1s ease-in-out 0.1s;
1157
1160
  }
1158
1161
  @media (prefers-reduced-motion) {
1159
- .components-drop-zone.is-active:not(.has-dragged-out) .components-drop-zone__content-inner {
1162
+ .components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content-inner {
1160
1163
  transition: none;
1161
1164
  }
1162
1165
  }
@@ -333,7 +333,7 @@
333
333
  transform: none;
334
334
  }
335
335
  .components-button.is-secondary {
336
- box-shadow: inset 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
336
+ box-shadow: inset 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)), 0 0 0 currentColor;
337
337
  outline: 1px solid transparent;
338
338
  white-space: nowrap;
339
339
  color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
@@ -345,6 +345,9 @@
345
345
  .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
346
  box-shadow: inset 0 0 0 1px #ddd;
347
347
  }
348
+ .components-button.is-secondary:focus:not(:disabled) {
349
+ box-shadow: 0 0 0 currentColor inset, 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
350
+ }
348
351
  .components-button.is-tertiary {
349
352
  white-space: nowrap;
350
353
  color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
@@ -1146,22 +1149,22 @@ body.is-dragging-components-draggable {
1146
1149
  opacity: 0;
1147
1150
  transform: scale(0.9);
1148
1151
  }
1149
- .components-drop-zone.is-active:not(.has-dragged-out) .components-drop-zone__content {
1152
+ .components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content {
1150
1153
  opacity: 1;
1151
1154
  transition: opacity 0.2s ease-in-out;
1152
1155
  }
1153
1156
  @media (prefers-reduced-motion) {
1154
- .components-drop-zone.is-active:not(.has-dragged-out) .components-drop-zone__content {
1157
+ .components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content {
1155
1158
  transition: none;
1156
1159
  }
1157
1160
  }
1158
- .components-drop-zone.is-active:not(.has-dragged-out) .components-drop-zone__content-inner {
1161
+ .components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content-inner {
1159
1162
  opacity: 1;
1160
1163
  transform: scale(1);
1161
1164
  transition: opacity 0.1s ease-in-out 0.1s, transform 0.1s ease-in-out 0.1s;
1162
1165
  }
1163
1166
  @media (prefers-reduced-motion) {
1164
- .components-drop-zone.is-active:not(.has-dragged-out) .components-drop-zone__content-inner {
1167
+ .components-drop-zone.is-active.is-dragging-over-element .components-drop-zone__content-inner {
1165
1168
  transition: none;
1166
1169
  }
1167
1170
  }
@@ -39,6 +39,8 @@ export type AlignmentMatrixControlIconProps = Pick<AlignmentMatrixControlProps,
39
39
  * component instead_
40
40
  *
41
41
  * The size of the icon.
42
+ *
43
+ * @deprecated
42
44
  * @ignore
43
45
  * @default 24
44
46
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/alignment-matrix-control/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,2BAA2B,GACpC,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,QAAQ,GACR,eAAe,GACf,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAElB,MAAM,MAAM,2BAA2B,GAAG;IACzC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C;;OAEG;IACH,KAAK,CAAC,EAAE,2BAA2B,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,QAAQ,EAAE,2BAA2B,KAA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AE,CAAC;CAC7D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drop-zone/index.tsx"],"names":[],"mappings":"AAcA;;GAEG;AACH,OAAO,KAAK,EAAY,aAAa,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAE,EAClC,SAAS,EACT,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,GAAG,SAAS,EACZ,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAE,+BA0FxD;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/drop-zone/index.tsx"],"names":[],"mappings":"AAcA;;GAEG;AACH,OAAO,KAAK,EAAY,aAAa,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAE,EAClC,SAAS,EACT,KAAK,EACL,WAAW,EACX,UAAU,EACV,MAAM,EACN,GAAG,SAAS,EACZ,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAE,+BAyFxD;AAED,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"aria-helper.d.ts","sourceRoot":"","sources":["../../src/modal/aria-helper.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAE,YAAY,CAAC,EAAE,cAAc,QActD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAE,OAAO,EAAE,OAAO,WAQtD;AAED;;GAEG;AACH,wBAAgB,UAAU,SASzB"}
1
+ {"version":3,"file":"aria-helper.d.ts","sourceRoot":"","sources":["../../src/modal/aria-helper.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAE,YAAY,CAAC,EAAE,cAAc,QActD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAE,OAAO,EAAE,OAAO,WAStD;AAED;;GAEG;AACH,wBAAgB,UAAU,SASzB"}
@@ -1,4 +1,7 @@
1
1
  import type { PaletteEditProps, PaletteElement } from './types';
2
+ export declare function deduplicateElementSlugs<T extends PaletteElement>(elements: T[]): (T & {
3
+ slug: string;
4
+ })[];
2
5
  /**
3
6
  * Returns a name and slug for a palette item. The name takes the format "Color + id".
4
7
  * To ensure there are no duplicate ids, this function checks all slugs.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/palette-edit/index.tsx"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAOX,gBAAgB,EAChB,cAAc,EACd,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACxC,QAAQ,EAAE,cAAc,EAAE,EAC1B,UAAU,EAAE,MAAM;;;EAwBlB;AA6ND;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAE,EAC5B,SAAS,EACT,MAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,wBAA4B,EAC5B,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,UAAe,EACf,YAAY,GACZ,EAAE,gBAAgB,+BA8OlB;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/palette-edit/index.tsx"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAMX,gBAAgB,EAChB,cAAc,EACd,MAAM,SAAS,CAAC;AAkBjB,wBAAgB,uBAAuB,CAAE,CAAC,SAAS,cAAc,EAChE,QAAQ,EAAE,CAAC,EAAE;;KAgBb;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACxC,QAAQ,EAAE,cAAc,EAAE,EAC1B,UAAU,EAAE,MAAM;;;EAwBlB;AAiOD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAE,EAC5B,SAAS,EACT,MAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,wBAA4B,EAC5B,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,UAAe,EACf,YAAY,GACZ,EAAE,gBAAgB,+BA8OlB;AAED,eAAe,WAAW,CAAC"}
@@ -6,7 +6,7 @@ export declare const Root: import("@emotion/styled").StyledComponent<{
6
6
  } & RootProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
7
  export declare const Wrapper: import("@emotion/styled").StyledComponent<{
8
8
  theme?: import("@emotion/react").Theme;
9
- as?: React.ElementType;
9
+ as?: import("react").ElementType;
10
10
  } & Pick<import("../../base-control/types").BaseControlProps, "__nextHasNoMarginBottom"> & {
11
11
  color?: import("react").CSSProperties["color"];
12
12
  marks?: import("../types").RangeMarks;
@@ -1 +1 @@
1
- {"version":3,"file":"range-control-styles.d.ts","sourceRoot":"","sources":["../../../src/range-control/styles/range-control-styles.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACX,cAAc,EAEd,UAAU,EACV,YAAY,EACZ,UAAU,EAEV,iBAAiB,EACjB,MAAM,UAAU,CAAC;AAalB,KAAK,SAAS,GAAG,IAAI,CAAE,iBAAiB,EAAE,uBAAuB,CAAE,CAAC;AACpE,eAAO,MAAM,IAAI;;SATK,MAAO,WAAW;qHAqBvC,CAAC;AAYF,eAAO,MAAM,OAAO;;eAjCS,WAAW;;;;yGA0CvC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;eA5CD,WAAW;2GAiDvC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;eAnDA,WAAW;2GAwDvC,CAAC;AAYF,eAAO,MAAM,IAAI;;eApEY,WAAW;;;;;aAmBnC,CAAC;;;;;2GA8DL,CAAC;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I;;eAjIY,WAAW;4HAyIvC,CAAC;AAQF,eAAO,MAAM,SAAS;;eAjJO,WAAW;4HA+JvC,CAAC;AAWF,eAAO,MAAM,YAAY;;eA1KI,WAAW;wHA8LvC,CAAC;AAoBF,eAAO,MAAM,KAAK;;eAlNW,WAAW;wHA8NvC,CAAC;AAEF,eAAO,MAAM,UAAU;;eAhOM,WAAW;kHA6OvC,CAAC;AAiCF,eAAO,MAAM,OAAO;;eA9QS,WAAW;0HAkSvC,CAAC;AAIF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;UAUvB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;eAlTF,WAAW;2GA6TvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/search-control/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,SAAS,CAAC;AA2GnE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,4KAAyC,CAAC;AAEpE,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/search-control/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,SAAS,CAAC;AAiHnE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,aAAa,4KAAyC,CAAC;AAEpE,eAAe,aAAa,CAAC"}
@@ -9,12 +9,4 @@ import SearchControl from '..';
9
9
  declare const meta: Meta<typeof SearchControl>;
10
10
  export default meta;
11
11
  export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<import("../../context").WordPressComponentProps<import("../types").SearchControlProps, "input", false>, "disabled"> & import("react").RefAttributes<HTMLInputElement>>;
12
- /**
13
- * When an `onClose` callback is provided, the search control will render a close button
14
- * that will trigger the given callback.
15
- *
16
- * Use this if you want the button to trigger your own logic to close the search field entirely,
17
- * rather than just clearing the input value.
18
- */
19
- export declare const WithOnClose: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<import("../../context").WordPressComponentProps<import("../types").SearchControlProps, "input", false>, "disabled"> & import("react").RefAttributes<HTMLInputElement>>;
20
12
  //# sourceMappingURL=index.story.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/search-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAWrC,CAAC;AACF,eAAe,IAAI,CAAC;AAoBpB,eAAO,MAAM,OAAO,mQAAsB,CAAC;AAM3C;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,mQAAsB,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/search-control/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,aAAa,MAAM,IAAI,CAAC;AAE/B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,aAAa,CAWrC,CAAC;AACF,eAAe,IAAI,CAAC;AAoBpB,eAAO,MAAM,OAAO,mQAAsB,CAAC"}
@@ -39,6 +39,9 @@ export type SearchControlProps = Pick<InputControlProps, 'help' | 'value'> & {
39
39
  *
40
40
  * Use this if you want the button to trigger your own logic to close the search field entirely,
41
41
  * rather than just clearing the input value.
42
+ *
43
+ * @deprecated
44
+ * @ignore
42
45
  */
43
46
  onClose?: () => void;
44
47
  /** @ignore */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/search-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAE,GAAG;IAC9E;;;OAGG;IACH,qBAAqB,CAAC,EAAE,iBAAiB,CAAE,uBAAuB,CAAE,CAAC;IACrE;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,iBAAiB,CAAE,qBAAqB,CAAE,CAAC;IACjE;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACpC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,cAAc;IACd,MAAM,CAAC,EAAE,iBAAiB,CAAE,QAAQ,CAAE,CAAC;IACvC,cAAc;IACd,WAAW,CAAC,EAAE,iBAAiB,CAAE,aAAa,CAAE,CAAC;IACjD,cAAc;IACd,SAAS,CAAC,EAAE,iBAAiB,CAAE,WAAW,CAAE,CAAC;IAC7C;;;;OAIG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAE,aAAa,CAAE,CAAC;IACjD;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,kBAAkB,EAClB,OAAO,GAAG,UAAU,GAAG,SAAS,CAChC,GAAG;IACH,SAAS,EAAE,KAAK,CAAC,SAAS,CAAE,gBAAgB,CAAE,CAAC;CAC/C,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/search-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAE,GAAG;IAC9E;;;OAGG;IACH,qBAAqB,CAAC,EAAE,iBAAiB,CAAE,uBAAuB,CAAE,CAAC;IACrE;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,iBAAiB,CAAE,qBAAqB,CAAE,CAAC;IACjE;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACpC;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,cAAc;IACd,MAAM,CAAC,EAAE,iBAAiB,CAAE,QAAQ,CAAE,CAAC;IACvC,cAAc;IACd,WAAW,CAAC,EAAE,iBAAiB,CAAE,aAAa,CAAE,CAAC;IACjD,cAAc;IACd,SAAS,CAAC,EAAE,iBAAiB,CAAE,WAAW,CAAE,CAAC;IAC7C;;;;OAIG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAE,aAAa,CAAE,CAAC;IACjD;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,kBAAkB,EAClB,OAAO,GAAG,UAAU,GAAG,SAAS,CAChC,GAAG;IACH,SAAS,EAAE,KAAK,CAAC,SAAS,CAAE,gBAAgB,CAAE,CAAC;CAC/C,CAAC"}
@@ -10,6 +10,13 @@ export declare const Tab: import("@emotion/styled").StyledComponent<Ariakit.TabO
10
10
  } & {
11
11
  theme?: import("@emotion/react").Theme;
12
12
  }, {}, {}>;
13
+ export declare const TabChildren: import("@emotion/styled").StyledComponent<{
14
+ theme?: import("@emotion/react").Theme;
15
+ as?: React.ElementType;
16
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
17
+ export declare const TabChevron: import("@emotion/styled").StyledComponent<import("../icon").Props & {
18
+ theme?: import("@emotion/react").Theme;
19
+ }, {}, {}>;
13
20
  export declare const TabPanel: import("@emotion/styled").StyledComponent<Ariakit.TabPanelOptions<"div"> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
21
  ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
15
22
  }, keyof Ariakit.TabPanelOptions<T>> & {
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tabs/styles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAQ1C,eAAO,MAAM,cAAc;;SAczB,MAAI,WAAW;yGA0FhB,CAAC;AAEF,eAAO,MAAM,GAAG;;;;;;UA0Ef,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;UAapB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tabs/styles.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAS1C,eAAO,MAAM,cAAc;;SAcrB,MAAO,WAAW;yGAyHvB,CAAC;AAEF,eAAO,MAAM,GAAG;;;;;;UAkFf,CAAC;AAEF,eAAO,MAAM,WAAW;;eA/MX,WAAW;2GAiNvB,CAAC;AAEF,eAAO,MAAM,UAAU;;UAuBtB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;UAapB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/tabs/tab.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D,eAAO,MAAM,GAAG,8JAuBb,CAAC"}
1
+ {"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/tabs/tab.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQxC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D,eAAO,MAAM,GAAG,8JAwBb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tablist.d.ts","sourceRoot":"","sources":["../../src/tabs/tablist.tsx"],"names":[],"mappings":"AAaA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAW5C,eAAO,MAAM,OAAO,mPAsGjB,CAAC"}
1
+ {"version":3,"file":"tablist.d.ts","sourceRoot":"","sources":["../../src/tabs/tablist.tsx"],"names":[],"mappings":"AAaA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA2C5C,eAAO,MAAM,OAAO,mPAqEjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"as-radio-group.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/as-radio-group.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAEX,8BAA8B,EAC9B,MAAM,UAAU,CAAC;AAwFlB,eAAO,MAAM,8BAA8B,mfAE1C,CAAC"}
1
+ {"version":3,"file":"as-radio-group.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/as-radio-group.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAEX,8BAA8B,EAC9B,MAAM,UAAU,CAAC;AAkGlB,eAAO,MAAM,8BAA8B,mfAE1C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/component.tsx"],"names":[],"mappings":"AA6MA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;8CAG9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/component.tsx"],"names":[],"mappings":"AA8GA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;8CAG9B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -115,6 +115,7 @@ export type ToggleGroupControlProps = Pick<BaseControlProps, 'help' | '__nextHas
115
115
  __next40pxDefaultSize?: boolean;
116
116
  };
117
117
  export type ToggleGroupControlContextProps = {
118
+ activeItemIsNotFirstItem?: () => boolean;
118
119
  isDeselectable?: boolean;
119
120
  baseId: string;
120
121
  isBlock: ToggleGroupControlProps['isBlock'];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/toggle-group-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,MAAM,iCAAiC,GAAG;IAC/C,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE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zC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,uBAAuB,CAAE,SAAS,CAAE,CAAC;IAC9C,IAAI,EAAE,uBAAuB,CAAE,MAAM,CAAE,CAAC;IACxC,KAAK,EAAE,uBAAuB,CAAE,OAAO,CAAE,CAAC;IAC1C,QAAQ,EAAE,CAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,KAAM,IAAI,CAAC;IAC5D,kBAAkB,EAAE,CAAE,OAAO,EAAE,WAAW,GAAG,SAAS,KAAM,IAAI,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,IAAI,CACpD,uBAAuB,EACvB,UAAU,GAAG,iBAAiB,GAAG,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CACxE,GACA,IAAI,CAAE,8BAA8B,EAAE,oBAAoB,CAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.tsx"],"names":[],"mappings":"AAoBA;;GAEG;AACH,OAAO,KAAK,EACX,YAAY,EAEZ,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,eAAO,MAAM,aAAa,MAAM,CAAC;AAmHjC,eAAO,MAAM,OAAO,8FAAmC,CAAC;AAExD,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.tsx"],"names":[],"mappings":"AAoBA;;GAEG;AACH,OAAO,KAAK,EACX,YAAY,EAEZ,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,eAAO,MAAM,aAAa,MAAM,CAAC;AA0HjC,eAAO,MAAM,OAAO,8FAAmC,CAAC;AAExD,eAAe,OAAO,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import type { ElementOffsetRect } from '../element-rect';
5
+ /**
6
+ * A utility used to animate something in a container component based on the "offset
7
+ * rect" (position relative to the container and size) of a subelement. For example,
8
+ * this is useful to render an indicator for the selected option of a component, and
9
+ * to animate it when the selected option changes.
10
+ *
11
+ * Takes in a container element and the up-to-date "offset rect" of the target
12
+ * subelement, obtained with `useTrackElementOffsetRect`. Then it does the following:
13
+ *
14
+ * - Adds CSS variables with rect information to the container, so that the indicator
15
+ * can be rendered and animated with them. These are kept up-to-date, enabling CSS
16
+ * transitions on change.
17
+ * - Sets an attribute (`data-subelement-animated` by default) when the tracked
18
+ * element changes, so that the target (e.g. the indicator) can be animated to its
19
+ * new size and position.
20
+ * - Removes the attribute when the animation is done.
21
+ *
22
+ * The need for the attribute is due to the fact that the rect might update in
23
+ * situations other than when the tracked element changes, e.g. the tracked element
24
+ * might be resized. In such cases, there is no need to animate the indicator, and
25
+ * the change in size or position of the indicator needs to be reflected immediately.
26
+ */
27
+ export declare function useAnimatedOffsetRect(
28
+ /**
29
+ * The container element.
30
+ */
31
+ container: HTMLElement | undefined,
32
+ /**
33
+ * The rect of the tracked element.
34
+ */
35
+ rect: ElementOffsetRect, { prefix, dataAttribute, transitionEndFilter, }?: {
36
+ /**
37
+ * The prefix used for the CSS variables, e.g. if `prefix` is `selected`, the
38
+ * CSS variables will be `--selected-top`, `--selected-left`, etc.
39
+ * @default 'subelement'
40
+ */
41
+ prefix?: string;
42
+ /**
43
+ * The name of the data attribute used to indicate that the animation is in
44
+ * progress. The `data-` prefix is added automatically.
45
+ *
46
+ * For example, if `dataAttribute` is `indicator-animated`, the attribute will
47
+ * be `data-indicator-animated`.
48
+ * @default `${ prefix }-animated`
49
+ */
50
+ dataAttribute?: string;
51
+ /**
52
+ * A function that is called with the transition event and returns a boolean
53
+ * indicating whether the animation should be stopped. The default is a function
54
+ * that always returns `true`.
55
+ *
56
+ * For example, if the animated element is the `::before` pseudo-element, the
57
+ * function can be written as `( event ) => event.pseudoElement === '::before'`.
58
+ * @default () => true
59
+ */
60
+ transitionEndFilter?: (event: TransitionEvent) => boolean;
61
+ }): void;
62
+ //# sourceMappingURL=use-animated-offset-rect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-animated-offset-rect.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use-animated-offset-rect.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGzD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB;AACpC;;GAEG;AACH,SAAS,EAAE,WAAW,GAAG,SAAS;AAClC;;GAEG;AACH,IAAI,EAAE,iBAAiB,EACvB,EACC,MAAqB,EACrB,aAAsC,EACtC,mBAAgC,GAChC,GAAE;IACF;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,CAAE,KAAK,EAAE,eAAe,KAAM,OAAO,CAAC;CACvD,QA+BN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "28.9.0",
3
+ "version": "28.10.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -32,7 +32,7 @@
32
32
  "types": "build-types",
33
33
  "dependencies": {
34
34
  "@ariakit/react": "^0.4.10",
35
- "@babel/runtime": "^7.16.0",
35
+ "@babel/runtime": "7.25.7",
36
36
  "@emotion/cache": "^11.7.1",
37
37
  "@emotion/css": "^11.7.1",
38
38
  "@emotion/react": "^11.7.1",
@@ -43,23 +43,23 @@
43
43
  "@types/gradient-parser": "0.1.3",
44
44
  "@types/highlight-words-core": "1.2.1",
45
45
  "@use-gesture/react": "^10.3.1",
46
- "@wordpress/a11y": "^4.9.0",
47
- "@wordpress/compose": "^7.9.0",
48
- "@wordpress/date": "^5.9.0",
49
- "@wordpress/deprecated": "^4.9.0",
50
- "@wordpress/dom": "^4.9.0",
51
- "@wordpress/element": "^6.9.0",
52
- "@wordpress/escape-html": "^3.9.0",
53
- "@wordpress/hooks": "^4.9.0",
54
- "@wordpress/html-entities": "^4.9.0",
55
- "@wordpress/i18n": "^5.9.0",
56
- "@wordpress/icons": "^10.9.0",
57
- "@wordpress/is-shallow-equal": "^5.9.0",
58
- "@wordpress/keycodes": "^4.9.0",
59
- "@wordpress/primitives": "^4.9.0",
60
- "@wordpress/private-apis": "^1.9.0",
61
- "@wordpress/rich-text": "^7.9.0",
62
- "@wordpress/warning": "^3.9.0",
46
+ "@wordpress/a11y": "^4.10.0",
47
+ "@wordpress/compose": "^7.10.0",
48
+ "@wordpress/date": "^5.10.0",
49
+ "@wordpress/deprecated": "^4.10.0",
50
+ "@wordpress/dom": "^4.10.0",
51
+ "@wordpress/element": "^6.10.0",
52
+ "@wordpress/escape-html": "^3.10.0",
53
+ "@wordpress/hooks": "^4.10.0",
54
+ "@wordpress/html-entities": "^4.10.0",
55
+ "@wordpress/i18n": "^5.10.0",
56
+ "@wordpress/icons": "^10.10.0",
57
+ "@wordpress/is-shallow-equal": "^5.10.0",
58
+ "@wordpress/keycodes": "^4.10.0",
59
+ "@wordpress/primitives": "^4.10.0",
60
+ "@wordpress/private-apis": "^1.10.0",
61
+ "@wordpress/rich-text": "^7.10.0",
62
+ "@wordpress/warning": "^3.10.0",
63
63
  "change-case": "^4.1.2",
64
64
  "clsx": "^2.1.1",
65
65
  "colord": "^2.7.0",
@@ -84,5 +84,5 @@
84
84
  "publishConfig": {
85
85
  "access": "public"
86
86
  },
87
- "gitHead": "2e5495c635910cb34bfaca3c6258d2e989f66214"
87
+ "gitHead": "ab34a7ac935fd1478eac63b596242d83270897ee"
88
88
  }
@@ -0,0 +1,38 @@
1
+ {
2
+ "title": "JSON schema for @wordpress/components README manifests",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "type": "object",
5
+ "properties": {
6
+ "displayName": {
7
+ "type": "string",
8
+ "description": "The `displayName` of the component, as determined in code. Used to identify the component in the specified source file."
9
+ },
10
+ "filePath": {
11
+ "type": "string",
12
+ "description": "The file path where the component is located."
13
+ },
14
+ "subcomponents": {
15
+ "type": "array",
16
+ "description": "List of subcomponents related to the component.",
17
+ "items": {
18
+ "type": "object",
19
+ "properties": {
20
+ "displayName": {
21
+ "type": "string",
22
+ "description": "The `displayName` of the subcomponent, as determined in code. Used to identify the component in the specified source file."
23
+ },
24
+ "preferredDisplayName": {
25
+ "type": "string",
26
+ "description": "The display name to use in the README, if it is different from the `displayName` as determined in code."
27
+ },
28
+ "filePath": {
29
+ "type": "string",
30
+ "description": "The file path where the subcomponent is located."
31
+ }
32
+ },
33
+ "required": [ "displayName", "filePath" ]
34
+ }
35
+ }
36
+ },
37
+ "required": [ "displayName", "filePath" ]
38
+ }