@wordpress/components 25.6.0 → 25.6.1

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 (438) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/build/color-palette/utils.js +2 -9
  4. package/build/color-palette/utils.js.map +1 -1
  5. package/build/sandbox/index.js +1 -1
  6. package/build/sandbox/index.js.map +1 -1
  7. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +1 -1
  8. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  9. package/build/snackbar/index.js +1 -1
  10. package/build/snackbar/index.js.map +1 -1
  11. package/build/theme/color-algorithms.js +2 -2
  12. package/build/theme/color-algorithms.js.map +1 -1
  13. package/build/toolbar/toolbar-item/index.js +1 -1
  14. package/build/toolbar/toolbar-item/index.js.map +1 -1
  15. package/build/toolbar/toolbar-item/index.native.js +1 -1
  16. package/build/toolbar/toolbar-item/index.native.js.map +1 -1
  17. package/build/ui/context/constants.js +2 -6
  18. package/build/ui/context/constants.js.map +1 -1
  19. package/build/ui/context/context-connect.js +1 -1
  20. package/build/ui/context/context-connect.js.map +1 -1
  21. package/build/ui/context/context-system-provider.js +1 -1
  22. package/build/ui/context/context-system-provider.js.map +1 -1
  23. package/build/ui/context/use-context-system.js +1 -1
  24. package/build/ui/context/use-context-system.js.map +1 -1
  25. package/build/utils/math.js +0 -12
  26. package/build/utils/math.js.map +1 -1
  27. package/build/utils/values.js +3 -66
  28. package/build/utils/values.js.map +1 -1
  29. package/build-module/color-palette/utils.js +0 -6
  30. package/build-module/color-palette/utils.js.map +1 -1
  31. package/build-module/sandbox/index.js +1 -1
  32. package/build-module/sandbox/index.js.map +1 -1
  33. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +1 -1
  34. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  35. package/build-module/snackbar/index.js +1 -1
  36. package/build-module/snackbar/index.js.map +1 -1
  37. package/build-module/theme/color-algorithms.js +2 -2
  38. package/build-module/theme/color-algorithms.js.map +1 -1
  39. package/build-module/toolbar/toolbar-item/index.js +1 -1
  40. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  41. package/build-module/toolbar/toolbar-item/index.native.js +1 -1
  42. package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
  43. package/build-module/ui/context/constants.js +0 -2
  44. package/build-module/ui/context/constants.js.map +1 -1
  45. package/build-module/ui/context/context-connect.js +1 -1
  46. package/build-module/ui/context/context-connect.js.map +1 -1
  47. package/build-module/ui/context/context-system-provider.js +1 -1
  48. package/build-module/ui/context/context-system-provider.js.map +1 -1
  49. package/build-module/ui/context/use-context-system.js +1 -1
  50. package/build-module/ui/context/use-context-system.js.map +1 -1
  51. package/build-module/utils/math.js +0 -11
  52. package/build-module/utils/math.js.map +1 -1
  53. package/build-module/utils/values.js +0 -60
  54. package/build-module/utils/values.js.map +1 -1
  55. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  56. package/build-types/color-palette/utils.d.ts +0 -1
  57. package/build-types/color-palette/utils.d.ts.map +1 -1
  58. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  59. package/build-types/item-group/item/hook.d.ts +1 -1
  60. package/build-types/sandbox/index.d.ts.map +1 -1
  61. package/build-types/search-control/stories/index.story.d.ts +0 -14
  62. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  63. package/build-types/ui/context/constants.d.ts +0 -2
  64. package/build-types/ui/context/constants.d.ts.map +1 -1
  65. package/build-types/utils/math.d.ts +0 -8
  66. package/build-types/utils/math.d.ts.map +1 -1
  67. package/build-types/utils/values.d.ts +0 -13
  68. package/build-types/utils/values.d.ts.map +1 -1
  69. package/package.json +19 -19
  70. package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
  71. package/src/alignment-matrix-control/test/index.tsx +6 -2
  72. package/src/angle-picker-control/stories/index.story.tsx +1 -1
  73. package/src/animate/stories/index.story.tsx +1 -1
  74. package/src/base-control/stories/index.story.tsx +1 -1
  75. package/src/border-box-control/stories/index.story.tsx +1 -1
  76. package/src/border-control/stories/index.story.tsx +1 -1
  77. package/src/button/stories/index.story.tsx +1 -1
  78. package/src/button-group/stories/index.story.tsx +1 -1
  79. package/src/card/stories/index.story.tsx +1 -1
  80. package/src/checkbox-control/stories/index.story.tsx +1 -1
  81. package/src/circular-option-picker/stories/index.story.tsx +4 -1
  82. package/src/color-indicator/stories/index.story.tsx +1 -1
  83. package/src/color-palette/stories/index.story.tsx +1 -1
  84. package/src/color-palette/test/index.tsx +15 -9
  85. package/src/color-palette/test/utils.ts +0 -15
  86. package/src/color-palette/utils.ts +0 -7
  87. package/src/color-picker/stories/index.story.tsx +1 -1
  88. package/src/combobox-control/stories/index.story.tsx +1 -1
  89. package/src/confirm-dialog/stories/index.story.js +1 -1
  90. package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
  91. package/src/date-time/stories/date-time.story.tsx +1 -1
  92. package/src/date-time/stories/date.story.tsx +1 -1
  93. package/src/date-time/stories/time.story.tsx +1 -1
  94. package/src/dimension-control/stories/index.story.tsx +1 -1
  95. package/src/disabled/stories/index.story.tsx +1 -1
  96. package/src/divider/stories/index.story.tsx +1 -1
  97. package/src/drop-zone/stories/index.story.tsx +1 -1
  98. package/src/dropdown-menu/stories/index.story.tsx +1 -1
  99. package/src/dropdown-menu-v2/stories/index.story.tsx +4 -1
  100. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  101. package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
  102. package/src/elevation/stories/index.story.tsx +1 -1
  103. package/src/external-link/stories/index.story.tsx +1 -1
  104. package/src/flex/stories/index.story.tsx +1 -1
  105. package/src/focal-point-picker/stories/index.story.tsx +1 -1
  106. package/src/font-size-picker/stories/index.story.tsx +1 -1
  107. package/src/form-file-upload/stories/index.story.tsx +1 -1
  108. package/src/form-toggle/stories/index.story.tsx +1 -1
  109. package/src/form-token-field/stories/index.story.tsx +1 -1
  110. package/src/gradient-picker/stories/index.story.tsx +1 -1
  111. package/src/grid/stories/index.story.tsx +1 -1
  112. package/src/h-stack/stories/index.story.tsx +1 -1
  113. package/src/heading/stories/index.story.tsx +1 -1
  114. package/src/icon/stories/index.story.tsx +1 -1
  115. package/src/input-control/stories/index.story.tsx +1 -1
  116. package/src/item-group/stories/index.story.tsx +1 -1
  117. package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
  118. package/src/menu-group/stories/index.story.tsx +1 -1
  119. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  120. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  121. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  122. package/src/navigation/stories/index.story.tsx +1 -1
  123. package/src/navigator/stories/index.story.tsx +1 -1
  124. package/src/notice/stories/index.story.tsx +1 -1
  125. package/src/number-control/stories/index.story.tsx +1 -1
  126. package/src/palette-edit/stories/index.story.tsx +1 -1
  127. package/src/panel/stories/index.story.tsx +1 -1
  128. package/src/placeholder/stories/index.story.tsx +1 -1
  129. package/src/progress-bar/stories/index.story.tsx +1 -1
  130. package/src/query-controls/stories/index.story.tsx +1 -1
  131. package/src/radio-control/stories/index.story.tsx +1 -1
  132. package/src/range-control/stories/index.story.tsx +1 -1
  133. package/src/resizable-box/stories/index.story.tsx +1 -1
  134. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  135. package/src/sandbox/index.tsx +4 -1
  136. package/src/sandbox/stories/index.story.tsx +1 -1
  137. package/src/scroll-lock/stories/index.story.tsx +1 -1
  138. package/src/scrollable/stories/index.story.tsx +1 -1
  139. package/src/search-control/stories/index.story.tsx +1 -1
  140. package/src/select-control/stories/index.story.tsx +1 -1
  141. package/src/slot-fill/stories/index.story.js +1 -1
  142. package/src/snackbar/stories/index.story.tsx +1 -1
  143. package/src/snackbar/stories/list.story.tsx +1 -1
  144. package/src/spacer/stories/index.story.tsx +1 -1
  145. package/src/spinner/stories/index.story.tsx +1 -1
  146. package/src/surface/stories/index.story.tsx +1 -1
  147. package/src/tab-panel/stories/index.story.tsx +1 -1
  148. package/src/text/test/index.tsx +1 -1
  149. package/src/text-control/stories/index.story.tsx +1 -1
  150. package/src/text-highlight/stories/index.story.tsx +1 -1
  151. package/src/textarea-control/stories/index.story.tsx +1 -1
  152. package/src/theme/stories/index.story.tsx +2 -2
  153. package/src/tip/stories/index.story.tsx +1 -1
  154. package/src/toggle-control/stories/index.story.tsx +1 -1
  155. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  156. package/src/toolbar/stories/index.story.tsx +1 -1
  157. package/src/tools-panel/stories/index.story.tsx +1 -1
  158. package/src/tooltip/stories/index.story.js +1 -1
  159. package/src/tree-select/stories/index.story.tsx +1 -1
  160. package/src/truncate/stories/index.story.tsx +1 -1
  161. package/src/ui/context/constants.js +0 -2
  162. package/src/unit-control/stories/index.story.tsx +1 -1
  163. package/src/utils/math.js +0 -11
  164. package/src/utils/values.js +0 -81
  165. package/src/v-stack/stories/index.story.tsx +1 -1
  166. package/src/view/stories/index.story.tsx +1 -1
  167. package/src/visually-hidden/stories/index.story.tsx +1 -1
  168. package/src/z-stack/stories/index.story.tsx +1 -1
  169. package/tsconfig.tsbuildinfo +1 -1
  170. package/build/ui/utils/get-high-dpi.js +0 -16
  171. package/build/ui/utils/get-high-dpi.js.map +0 -1
  172. package/build/utils/browsers.js +0 -32
  173. package/build/utils/browsers.js.map +0 -1
  174. package/build/utils/events.js +0 -43
  175. package/build/utils/events.js.map +0 -1
  176. package/build-module/ui/utils/get-high-dpi.js +0 -11
  177. package/build-module/ui/utils/get-high-dpi.js.map +0 -1
  178. package/build-module/utils/browsers.js +0 -25
  179. package/build-module/utils/browsers.js.map +0 -1
  180. package/build-module/utils/events.js +0 -37
  181. package/build-module/utils/events.js.map +0 -1
  182. package/build-types/alignment-matrix-control/stories/index.d.ts +0 -14
  183. package/build-types/alignment-matrix-control/stories/index.d.ts.map +0 -1
  184. package/build-types/angle-picker-control/stories/index.d.ts +0 -15
  185. package/build-types/angle-picker-control/stories/index.d.ts.map +0 -1
  186. package/build-types/animate/stories/index.d.ts +0 -18
  187. package/build-types/animate/stories/index.d.ts.map +0 -1
  188. package/build-types/base-control/stories/index.d.ts +0 -25
  189. package/build-types/base-control/stories/index.d.ts.map +0 -1
  190. package/build-types/border-box-control/stories/index.d.ts +0 -17
  191. package/build-types/border-box-control/stories/index.d.ts.map +0 -1
  192. package/build-types/border-control/stories/index.d.ts +0 -119
  193. package/build-types/border-control/stories/index.d.ts.map +0 -1
  194. package/build-types/button/stories/e2e/index.d.ts +0 -15
  195. package/build-types/button/stories/e2e/index.d.ts.map +0 -1
  196. package/build-types/button/stories/index.d.ts +0 -20
  197. package/build-types/button/stories/index.d.ts.map +0 -1
  198. package/build-types/button-group/stories/index.d.ts +0 -12
  199. package/build-types/button-group/stories/index.d.ts.map +0 -1
  200. package/build-types/card/stories/index.d.ts +0 -32
  201. package/build-types/card/stories/index.d.ts.map +0 -1
  202. package/build-types/checkbox-control/stories/index.d.ts +0 -13
  203. package/build-types/checkbox-control/stories/index.d.ts.map +0 -1
  204. package/build-types/circular-option-picker/stories/index.d.ts +0 -14
  205. package/build-types/circular-option-picker/stories/index.d.ts.map +0 -1
  206. package/build-types/color-indicator/stories/index.d.ts +0 -12
  207. package/build-types/color-indicator/stories/index.d.ts.map +0 -1
  208. package/build-types/color-palette/stories/index.d.ts +0 -46
  209. package/build-types/color-palette/stories/index.d.ts.map +0 -1
  210. package/build-types/color-picker/stories/index.d.ts +0 -19
  211. package/build-types/color-picker/stories/index.d.ts.map +0 -1
  212. package/build-types/combobox-control/stories/index.d.ts +0 -18
  213. package/build-types/combobox-control/stories/index.d.ts.map +0 -1
  214. package/build-types/custom-gradient-picker/stories/index.d.ts +0 -12
  215. package/build-types/custom-gradient-picker/stories/index.d.ts.map +0 -1
  216. package/build-types/date-time/stories/date-time.d.ts +0 -14
  217. package/build-types/date-time/stories/date-time.d.ts.map +0 -1
  218. package/build-types/date-time/stories/date.d.ts +0 -14
  219. package/build-types/date-time/stories/date.d.ts.map +0 -1
  220. package/build-types/date-time/stories/time.d.ts +0 -12
  221. package/build-types/date-time/stories/time.d.ts.map +0 -1
  222. package/build-types/dimension-control/stories/index.d.ts +0 -12
  223. package/build-types/dimension-control/stories/index.d.ts.map +0 -1
  224. package/build-types/disabled/stories/index.d.ts +0 -13
  225. package/build-types/disabled/stories/index.d.ts.map +0 -1
  226. package/build-types/divider/stories/index.d.ts +0 -11
  227. package/build-types/divider/stories/index.d.ts.map +0 -1
  228. package/build-types/draggable/stories/index.d.ts +0 -20
  229. package/build-types/draggable/stories/index.d.ts.map +0 -1
  230. package/build-types/drop-zone/stories/index.d.ts +0 -12
  231. package/build-types/drop-zone/stories/index.d.ts.map +0 -1
  232. package/build-types/dropdown/stories/index.d.ts +0 -23
  233. package/build-types/dropdown/stories/index.d.ts.map +0 -1
  234. package/build-types/dropdown-menu/stories/index.d.ts +0 -14
  235. package/build-types/dropdown-menu/stories/index.d.ts.map +0 -1
  236. package/build-types/dropdown-menu-v2/stories/index.d.ts +0 -11
  237. package/build-types/dropdown-menu-v2/stories/index.d.ts.map +0 -1
  238. package/build-types/duotone-picker/stories/duotone-picker.d.ts +0 -12
  239. package/build-types/duotone-picker/stories/duotone-picker.d.ts.map +0 -1
  240. package/build-types/duotone-picker/stories/duotone-swatch.d.ts +0 -14
  241. package/build-types/duotone-picker/stories/duotone-swatch.d.ts.map +0 -1
  242. package/build-types/elevation/stories/index.d.ts +0 -22
  243. package/build-types/elevation/stories/index.d.ts.map +0 -1
  244. package/build-types/external-link/stories/index.d.ts +0 -12
  245. package/build-types/external-link/stories/index.d.ts.map +0 -1
  246. package/build-types/flex/stories/index.d.ts +0 -13
  247. package/build-types/flex/stories/index.d.ts.map +0 -1
  248. package/build-types/focal-point-picker/stories/index.d.ts +0 -15
  249. package/build-types/focal-point-picker/stories/index.d.ts.map +0 -1
  250. package/build-types/font-size-picker/stories/e2e/index.d.ts +0 -16
  251. package/build-types/font-size-picker/stories/e2e/index.d.ts.map +0 -1
  252. package/build-types/font-size-picker/stories/index.d.ts +0 -31
  253. package/build-types/font-size-picker/stories/index.d.ts.map +0 -1
  254. package/build-types/form-file-upload/stories/index.d.ts +0 -23
  255. package/build-types/form-file-upload/stories/index.d.ts.map +0 -1
  256. package/build-types/form-toggle/stories/index.d.ts +0 -12
  257. package/build-types/form-toggle/stories/index.d.ts.map +0 -1
  258. package/build-types/form-token-field/stories/index.d.ts +0 -26
  259. package/build-types/form-token-field/stories/index.d.ts.map +0 -1
  260. package/build-types/gradient-picker/stories/index.d.ts +0 -14
  261. package/build-types/gradient-picker/stories/index.d.ts.map +0 -1
  262. package/build-types/grid/stories/index.d.ts +0 -9
  263. package/build-types/grid/stories/index.d.ts.map +0 -1
  264. package/build-types/guide/stories/index.d.ts +0 -9
  265. package/build-types/guide/stories/index.d.ts.map +0 -1
  266. package/build-types/h-stack/stories/e2e/index.d.ts +0 -9
  267. package/build-types/h-stack/stories/e2e/index.d.ts.map +0 -1
  268. package/build-types/h-stack/stories/index.d.ts +0 -9
  269. package/build-types/h-stack/stories/index.d.ts.map +0 -1
  270. package/build-types/heading/stories/index.d.ts +0 -12
  271. package/build-types/heading/stories/index.d.ts.map +0 -1
  272. package/build-types/icon/stories/index.d.ts +0 -22
  273. package/build-types/icon/stories/index.d.ts.map +0 -1
  274. package/build-types/input-control/stories/index.d.ts +0 -28
  275. package/build-types/input-control/stories/index.d.ts.map +0 -1
  276. package/build-types/item-group/stories/index.d.ts +0 -15
  277. package/build-types/item-group/stories/index.d.ts.map +0 -1
  278. package/build-types/keyboard-shortcuts/stories/index.d.ts +0 -12
  279. package/build-types/keyboard-shortcuts/stories/index.d.ts.map +0 -1
  280. package/build-types/menu-group/stories/index.d.ts +0 -17
  281. package/build-types/menu-group/stories/index.d.ts.map +0 -1
  282. package/build-types/menu-items-choice/stories/index.d.ts +0 -12
  283. package/build-types/menu-items-choice/stories/index.d.ts.map +0 -1
  284. package/build-types/modal/stories/index.d.ts +0 -10
  285. package/build-types/modal/stories/index.d.ts.map +0 -1
  286. package/build-types/navigable-container/stories/navigable-menu.d.ts +0 -12
  287. package/build-types/navigable-container/stories/navigable-menu.d.ts.map +0 -1
  288. package/build-types/navigable-container/stories/tabbable-container.d.ts +0 -12
  289. package/build-types/navigable-container/stories/tabbable-container.d.ts.map +0 -1
  290. package/build-types/navigation/stories/index.d.ts +0 -18
  291. package/build-types/navigation/stories/index.d.ts.map +0 -1
  292. package/build-types/navigator/stories/index.d.ts +0 -11
  293. package/build-types/navigator/stories/index.d.ts.map +0 -1
  294. package/build-types/notice/stories/index.d.ts +0 -17
  295. package/build-types/notice/stories/index.d.ts.map +0 -1
  296. package/build-types/number-control/stories/index.d.ts +0 -25
  297. package/build-types/number-control/stories/index.d.ts.map +0 -1
  298. package/build-types/palette-edit/stories/index.d.ts +0 -13
  299. package/build-types/palette-edit/stories/index.d.ts.map +0 -1
  300. package/build-types/panel/stories/index.d.ts +0 -19
  301. package/build-types/panel/stories/index.d.ts.map +0 -1
  302. package/build-types/placeholder/stories/index.d.ts +0 -12
  303. package/build-types/placeholder/stories/index.d.ts.map +0 -1
  304. package/build-types/popover/stories/e2e/index.d.ts +0 -8
  305. package/build-types/popover/stories/e2e/index.d.ts.map +0 -1
  306. package/build-types/popover/stories/index.d.ts +0 -13
  307. package/build-types/popover/stories/index.d.ts.map +0 -1
  308. package/build-types/progress-bar/stories/index.d.ts +0 -12
  309. package/build-types/progress-bar/stories/index.d.ts.map +0 -1
  310. package/build-types/query-controls/stories/index.d.ts +0 -13
  311. package/build-types/query-controls/stories/index.d.ts.map +0 -1
  312. package/build-types/radio-control/stories/index.d.ts +0 -12
  313. package/build-types/radio-control/stories/index.d.ts.map +0 -1
  314. package/build-types/range-control/stories/index.d.ts +0 -48
  315. package/build-types/range-control/stories/index.d.ts.map +0 -1
  316. package/build-types/resizable-box/stories/index.d.ts +0 -61
  317. package/build-types/resizable-box/stories/index.d.ts.map +0 -1
  318. package/build-types/responsive-wrapper/stories/index.d.ts +0 -22
  319. package/build-types/responsive-wrapper/stories/index.d.ts.map +0 -1
  320. package/build-types/sandbox/stories/index.d.ts +0 -12
  321. package/build-types/sandbox/stories/index.d.ts.map +0 -1
  322. package/build-types/scroll-lock/stories/index.d.ts +0 -9
  323. package/build-types/scroll-lock/stories/index.d.ts.map +0 -1
  324. package/build-types/scrollable/stories/index.d.ts +0 -9
  325. package/build-types/scrollable/stories/index.d.ts.map +0 -1
  326. package/build-types/search-control/stories/index.d.ts +0 -47
  327. package/build-types/search-control/stories/index.d.ts.map +0 -1
  328. package/build-types/select-control/stories/index.d.ts +0 -19
  329. package/build-types/select-control/stories/index.d.ts.map +0 -1
  330. package/build-types/snackbar/stories/index.d.ts +0 -16
  331. package/build-types/snackbar/stories/index.d.ts.map +0 -1
  332. package/build-types/snackbar/stories/list.d.ts +0 -12
  333. package/build-types/snackbar/stories/list.d.ts.map +0 -1
  334. package/build-types/spacer/stories/index.d.ts +0 -12
  335. package/build-types/spacer/stories/index.d.ts.map +0 -1
  336. package/build-types/spinner/stories/index.d.ts +0 -13
  337. package/build-types/spinner/stories/index.d.ts.map +0 -1
  338. package/build-types/surface/stories/index.d.ts +0 -12
  339. package/build-types/surface/stories/index.d.ts.map +0 -1
  340. package/build-types/tab-panel/stories/index.d.ts +0 -16
  341. package/build-types/tab-panel/stories/index.d.ts.map +0 -1
  342. package/build-types/text-control/stories/index.d.ts +0 -13
  343. package/build-types/text-control/stories/index.d.ts.map +0 -1
  344. package/build-types/text-highlight/stories/index.d.ts +0 -12
  345. package/build-types/text-highlight/stories/index.d.ts.map +0 -1
  346. package/build-types/textarea-control/stories/index.d.ts +0 -12
  347. package/build-types/textarea-control/stories/index.d.ts.map +0 -1
  348. package/build-types/theme/stories/index.d.ts +0 -17
  349. package/build-types/theme/stories/index.d.ts.map +0 -1
  350. package/build-types/tip/stories/index.d.ts +0 -12
  351. package/build-types/tip/stories/index.d.ts.map +0 -1
  352. package/build-types/toggle-control/stories/index.d.ts +0 -13
  353. package/build-types/toggle-control/stories/index.d.ts.map +0 -1
  354. package/build-types/toggle-group-control/stories/index.d.ts +0 -27
  355. package/build-types/toggle-group-control/stories/index.d.ts.map +0 -1
  356. package/build-types/toolbar/stories/index.d.ts +0 -14
  357. package/build-types/toolbar/stories/index.d.ts.map +0 -1
  358. package/build-types/tools-panel/stories/index.d.ts +0 -17
  359. package/build-types/tools-panel/stories/index.d.ts.map +0 -1
  360. package/build-types/tree-grid/stories/index.d.ts +0 -13
  361. package/build-types/tree-grid/stories/index.d.ts.map +0 -1
  362. package/build-types/tree-select/stories/index.d.ts +0 -12
  363. package/build-types/tree-select/stories/index.d.ts.map +0 -1
  364. package/build-types/truncate/stories/index.d.ts +0 -13
  365. package/build-types/truncate/stories/index.d.ts.map +0 -1
  366. package/build-types/ui/control-group/component.d.ts +0 -27
  367. package/build-types/ui/control-group/component.d.ts.map +0 -1
  368. package/build-types/ui/control-group/context.d.ts +0 -4
  369. package/build-types/ui/control-group/context.d.ts.map +0 -1
  370. package/build-types/ui/control-group/hook.d.ts +0 -266
  371. package/build-types/ui/control-group/hook.d.ts.map +0 -1
  372. package/build-types/ui/control-group/index.d.ts +0 -4
  373. package/build-types/ui/control-group/index.d.ts.map +0 -1
  374. package/build-types/ui/control-group/styles.d.ts +0 -8
  375. package/build-types/ui/control-group/styles.d.ts.map +0 -1
  376. package/build-types/ui/control-group/types.d.ts +0 -27
  377. package/build-types/ui/control-group/types.d.ts.map +0 -1
  378. package/build-types/ui/control-label/component.d.ts +0 -23
  379. package/build-types/ui/control-label/component.d.ts.map +0 -1
  380. package/build-types/ui/control-label/hook.d.ts +0 -265
  381. package/build-types/ui/control-label/hook.d.ts.map +0 -1
  382. package/build-types/ui/control-label/index.d.ts +0 -3
  383. package/build-types/ui/control-label/index.d.ts.map +0 -1
  384. package/build-types/ui/control-label/styles.d.ts +0 -7
  385. package/build-types/ui/control-label/styles.d.ts.map +0 -1
  386. package/build-types/ui/control-label/types.d.ts +0 -9
  387. package/build-types/ui/control-label/types.d.ts.map +0 -1
  388. package/build-types/ui/form-group/form-group-content.d.ts +0 -7
  389. package/build-types/ui/form-group/form-group-content.d.ts.map +0 -1
  390. package/build-types/ui/form-group/form-group-context.d.ts +0 -11
  391. package/build-types/ui/form-group/form-group-context.d.ts.map +0 -1
  392. package/build-types/ui/form-group/form-group-help.d.ts +0 -18
  393. package/build-types/ui/form-group/form-group-help.d.ts.map +0 -1
  394. package/build-types/ui/form-group/form-group-label.d.ts +0 -8
  395. package/build-types/ui/form-group/form-group-label.d.ts.map +0 -1
  396. package/build-types/ui/form-group/form-group-styles.d.ts +0 -2
  397. package/build-types/ui/form-group/form-group-styles.d.ts.map +0 -1
  398. package/build-types/ui/form-group/form-group.d.ts +0 -53
  399. package/build-types/ui/form-group/form-group.d.ts.map +0 -1
  400. package/build-types/ui/form-group/index.d.ts +0 -4
  401. package/build-types/ui/form-group/index.d.ts.map +0 -1
  402. package/build-types/ui/form-group/types.d.ts +0 -30
  403. package/build-types/ui/form-group/types.d.ts.map +0 -1
  404. package/build-types/ui/form-group/use-form-group.d.ts +0 -593
  405. package/build-types/ui/form-group/use-form-group.d.ts.map +0 -1
  406. package/build-types/ui/index.d.ts +0 -6
  407. package/build-types/ui/index.d.ts.map +0 -1
  408. package/build-types/ui/spinner/component.d.ts +0 -13
  409. package/build-types/ui/spinner/component.d.ts.map +0 -1
  410. package/build-types/ui/spinner/index.d.ts +0 -2
  411. package/build-types/ui/spinner/index.d.ts.map +0 -1
  412. package/build-types/ui/spinner/styles.d.ts +0 -13
  413. package/build-types/ui/spinner/styles.d.ts.map +0 -1
  414. package/build-types/ui/spinner/utils.d.ts +0 -3
  415. package/build-types/ui/spinner/utils.d.ts.map +0 -1
  416. package/build-types/ui/utils/get-high-dpi.d.ts +0 -3
  417. package/build-types/ui/utils/get-high-dpi.d.ts.map +0 -1
  418. package/build-types/unit-control/stories/index.d.ts +0 -33
  419. package/build-types/unit-control/stories/index.d.ts.map +0 -1
  420. package/build-types/utils/browsers.d.ts +0 -11
  421. package/build-types/utils/browsers.d.ts.map +0 -1
  422. package/build-types/utils/events.d.ts +0 -11
  423. package/build-types/utils/events.d.ts.map +0 -1
  424. package/build-types/v-stack/stories/e2e/index.d.ts +0 -9
  425. package/build-types/v-stack/stories/e2e/index.d.ts.map +0 -1
  426. package/build-types/v-stack/stories/index.d.ts +0 -13
  427. package/build-types/v-stack/stories/index.d.ts.map +0 -1
  428. package/build-types/view/stories/index.d.ts +0 -12
  429. package/build-types/view/stories/index.d.ts.map +0 -1
  430. package/build-types/visually-hidden/stories/index.d.ts +0 -14
  431. package/build-types/visually-hidden/stories/index.d.ts.map +0 -1
  432. package/build-types/z-stack/stories/index.d.ts +0 -6
  433. package/build-types/z-stack/stories/index.d.ts.map +0 -1
  434. package/src/ui/utils/get-high-dpi.ts +0 -20
  435. package/src/utils/browsers.js +0 -36
  436. package/src/utils/events.ts +0 -50
  437. package/src/utils/test/events.js +0 -63
  438. package/src/utils/test/values.js +0 -101
@@ -225,6 +225,8 @@ describe( 'ColorPalette', () => {
225
225
 
226
226
  render( <ControlledColorPalette /> );
227
227
 
228
+ const { name: colorName, color: colorCode } = EXAMPLE_COLORS[ 0 ];
229
+
228
230
  expect( screen.getByText( 'No color selected' ) ).toBeVisible();
229
231
 
230
232
  // Click the first unpressed button
@@ -236,11 +238,19 @@ describe( 'ColorPalette', () => {
236
238
  );
237
239
 
238
240
  // Confirm the correct color name, color value, and button label are used
239
- expect( screen.getByText( EXAMPLE_COLORS[ 0 ].name ) ).toBeVisible();
240
- expect( screen.getByText( EXAMPLE_COLORS[ 0 ].color ) ).toBeVisible();
241
+ expect(
242
+ screen.getByText( colorName, {
243
+ selector: '.components-color-palette__custom-color-name',
244
+ } )
245
+ ).toBeVisible();
246
+ expect(
247
+ screen.getByText( colorCode, {
248
+ selector: '.components-color-palette__custom-color-value',
249
+ } )
250
+ ).toBeVisible();
241
251
  expect(
242
252
  screen.getByRole( 'button', {
243
- name: `Custom color picker. The currently selected color is called "${ EXAMPLE_COLORS[ 0 ].name }" and has a value of "${ EXAMPLE_COLORS[ 0 ].color }".`,
253
+ name: `Custom color picker. The currently selected color is called "${ colorName }" and has a value of "${ colorCode }".`,
244
254
  expanded: false,
245
255
  } )
246
256
  ).toBeInTheDocument();
@@ -248,12 +258,8 @@ describe( 'ColorPalette', () => {
248
258
  // Clear the color, confirm that the relative values are cleared/updated.
249
259
  await user.click( screen.getByRole( 'button', { name: 'Clear' } ) );
250
260
  expect( screen.getByText( 'No color selected' ) ).toBeVisible();
251
- expect(
252
- screen.queryByText( EXAMPLE_COLORS[ 0 ].name )
253
- ).not.toBeInTheDocument();
254
- expect(
255
- screen.queryByText( EXAMPLE_COLORS[ 0 ].color )
256
- ).not.toBeInTheDocument();
261
+ expect( screen.queryByText( colorName ) ).not.toBeInTheDocument();
262
+ expect( screen.queryByText( colorCode ) ).not.toBeInTheDocument();
257
263
  expect(
258
264
  screen.getByRole( 'button', {
259
265
  name: /^Custom color picker.$/,
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import {
5
5
  extractColorNameFromCurrentValue,
6
- showTransparentBackground,
7
6
  normalizeColorValue,
8
7
  } from '../utils';
9
8
 
@@ -25,20 +24,6 @@ describe( 'ColorPalette: Utils', () => {
25
24
  expect( result ).toBe( 'Blue' );
26
25
  } );
27
26
  } );
28
- describe( 'showTransparentBackground', () => {
29
- test( 'should return true for undefined color values', () => {
30
- expect( showTransparentBackground( undefined ) ).toBe( true );
31
- } );
32
- test( 'should return true for transparent colors', () => {
33
- expect( showTransparentBackground( 'transparent' ) ).toBe( true );
34
- expect( showTransparentBackground( '#75757500' ) ).toBe( true );
35
- } );
36
- test( 'should return false for non-transparent colors', () => {
37
- expect( showTransparentBackground( '#FFF' ) ).toBe( false );
38
- expect( showTransparentBackground( '#757575' ) ).toBe( false );
39
- expect( showTransparentBackground( '#f5f5f524' ) ).toBe( false ); // 0.14 alpha.
40
- } );
41
- } );
42
27
 
43
28
  describe( 'normalizeColorValue', () => {
44
29
  test( 'should return the value as is if the color value is not a CSS variable', () => {
@@ -52,13 +52,6 @@ export const extractColorNameFromCurrentValue = (
52
52
  return __( 'Custom' );
53
53
  };
54
54
 
55
- export const showTransparentBackground = ( currentValue?: string ) => {
56
- if ( typeof currentValue === 'undefined' ) {
57
- return true;
58
- }
59
- return colord( currentValue ).alpha() === 0;
60
- };
61
-
62
55
  // The PaletteObject type has a `colors` property (an array of ColorObject),
63
56
  // while the ColorObject type has a `color` property (the CSS color value).
64
57
  export const isMultiplePaletteObject = (
@@ -25,7 +25,7 @@ const meta: ComponentMeta< typeof ColorPicker > = {
25
25
  controls: {
26
26
  expanded: true,
27
27
  },
28
- docs: { source: { state: 'open' } },
28
+ docs: { canvas: { sourceState: 'shown' } },
29
29
  },
30
30
  };
31
31
  export default meta;
@@ -31,7 +31,7 @@ const meta: ComponentMeta< typeof ComboboxControl > = {
31
31
  parameters: {
32
32
  actions: { argTypesRegex: '^on.*' },
33
33
  controls: { expanded: true },
34
- docs: { source: { state: 'open' } },
34
+ docs: { canvas: { sourceState: 'shown' } },
35
35
  },
36
36
  };
37
37
  export default meta;
@@ -32,7 +32,7 @@ const meta = {
32
32
  children: 'Would you like to privately publish the post now?',
33
33
  },
34
34
  parameters: {
35
- docs: { source: { state: 'open' } },
35
+ docs: { canvas: { sourceState: 'shown' } },
36
36
  },
37
37
  };
38
38
 
@@ -18,7 +18,7 @@ const meta: ComponentMeta< typeof CustomGradientPicker > = {
18
18
  parameters: {
19
19
  actions: { argTypesRegex: '^on.*' },
20
20
  controls: { expanded: true },
21
- docs: { source: { state: 'open' } },
21
+ docs: { canvas: { sourceState: 'shown' } },
22
22
  },
23
23
  };
24
24
  export default meta;
@@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof DateTimePicker > = {
23
23
  },
24
24
  parameters: {
25
25
  controls: { expanded: true },
26
- docs: { source: { state: 'open' } },
26
+ docs: { canvas: { sourceState: 'shown' } },
27
27
  },
28
28
  };
29
29
  export default meta;
@@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof DatePicker > = {
23
23
  },
24
24
  parameters: {
25
25
  controls: { expanded: true },
26
- docs: { source: { state: 'open' } },
26
+ docs: { canvas: { sourceState: 'shown' } },
27
27
  },
28
28
  };
29
29
  export default meta;
@@ -22,7 +22,7 @@ const meta: ComponentMeta< typeof TimePicker > = {
22
22
  },
23
23
  parameters: {
24
24
  controls: { expanded: true },
25
- docs: { source: { state: 'open' } },
25
+ docs: { canvas: { sourceState: 'shown' } },
26
26
  },
27
27
  };
28
28
  export default meta;
@@ -31,7 +31,7 @@ export default {
31
31
  },
32
32
  parameters: {
33
33
  controls: { expanded: true },
34
- docs: { source: { state: 'open' } },
34
+ docs: { canvas: { sourceState: 'shown' } },
35
35
  },
36
36
  },
37
37
  } as ComponentMeta< typeof DimensionControl >;
@@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof Disabled > = {
28
28
  controls: {
29
29
  expanded: true,
30
30
  },
31
- docs: { source: { state: 'open' } },
31
+ docs: { canvas: { sourceState: 'shown' } },
32
32
  },
33
33
  };
34
34
 
@@ -26,7 +26,7 @@ const meta: ComponentMeta< typeof Divider > = {
26
26
  },
27
27
  parameters: {
28
28
  controls: { expanded: true },
29
- docs: { source: { state: 'open' } },
29
+ docs: { canvas: { sourceState: 'shown' } },
30
30
  },
31
31
  };
32
32
  export default meta;
@@ -13,7 +13,7 @@ const meta: ComponentMeta< typeof DropZone > = {
13
13
  parameters: {
14
14
  actions: { argTypesRegex: '^on.*' },
15
15
  controls: { expanded: true },
16
- docs: { source: { state: 'open' } },
16
+ docs: { canvas: { sourceState: 'shown' } },
17
17
  },
18
18
  };
19
19
  export default meta;
@@ -26,7 +26,7 @@ const meta: ComponentMeta< typeof DropdownMenu > = {
26
26
  component: DropdownMenu,
27
27
  parameters: {
28
28
  controls: { expanded: true },
29
- docs: { source: { state: 'open' } },
29
+ docs: { canvas: { sourceState: 'shown' } },
30
30
  },
31
31
  argTypes: {
32
32
  icon: {
@@ -46,7 +46,10 @@ const meta: Meta< typeof DropdownMenu > = {
46
46
  parameters: {
47
47
  actions: { argTypesRegex: '^on.*' },
48
48
  controls: { expanded: true },
49
- docs: { source: { state: 'open', excludeDecorators: true } },
49
+ docs: {
50
+ canvas: { sourceState: 'shown' },
51
+ source: { excludeDecorators: true },
52
+ },
50
53
  },
51
54
  decorators: [
52
55
  // Layout wrapper
@@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof DuotonePicker > = {
23
23
  },
24
24
  parameters: {
25
25
  controls: { expanded: true },
26
- docs: { source: { state: 'open' } },
26
+ docs: { canvas: { sourceState: 'shown' } },
27
27
  },
28
28
  };
29
29
  export default meta;
@@ -13,7 +13,7 @@ const meta: ComponentMeta< typeof DuotoneSwatch > = {
13
13
  component: DuotoneSwatch,
14
14
  parameters: {
15
15
  controls: { expanded: true },
16
- docs: { source: { state: 'open' } },
16
+ docs: { canvas: { sourceState: 'shown' } },
17
17
  },
18
18
  };
19
19
  export default meta;
@@ -19,7 +19,7 @@ const meta: ComponentMeta< typeof Elevation > = {
19
19
  controls: {
20
20
  expanded: true,
21
21
  },
22
- docs: { source: { state: 'open' } },
22
+ docs: { canvas: { sourceState: 'shown' } },
23
23
  },
24
24
  };
25
25
  export default meta;
@@ -18,7 +18,7 @@ const meta: ComponentMeta< typeof ExternalLink > = {
18
18
  controls: {
19
19
  expanded: true,
20
20
  },
21
- docs: { source: { state: 'open' } },
21
+ docs: { canvas: { sourceState: 'shown' } },
22
22
  },
23
23
  };
24
24
  export default meta;
@@ -29,7 +29,7 @@ const meta: ComponentMeta< typeof Flex > = {
29
29
  controls: {
30
30
  expanded: true,
31
31
  },
32
- docs: { source: { state: 'open' } },
32
+ docs: { canvas: { sourceState: 'shown' } },
33
33
  },
34
34
  };
35
35
  export default meta;
@@ -22,7 +22,7 @@ const meta: ComponentMeta< typeof FocalPointPicker > = {
22
22
  parameters: {
23
23
  actions: { argTypesRegex: '^on.*' },
24
24
  controls: { expanded: true },
25
- docs: { source: { state: 'open' } },
25
+ docs: { canvas: { sourceState: 'shown' } },
26
26
  },
27
27
  };
28
28
  export default meta;
@@ -22,7 +22,7 @@ const meta: ComponentMeta< typeof FontSizePicker > = {
22
22
  parameters: {
23
23
  actions: { argTypesRegex: '^on.*' },
24
24
  controls: { expanded: true },
25
- docs: { source: { state: 'open' } },
25
+ docs: { canvas: { sourceState: 'shown' } },
26
26
  },
27
27
  };
28
28
  export default meta;
@@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof FormFileUpload > = {
23
23
  },
24
24
  parameters: {
25
25
  controls: { expanded: true },
26
- docs: { source: { state: 'open' } },
26
+ docs: { canvas: { sourceState: 'shown' } },
27
27
  },
28
28
  };
29
29
  export default meta;
@@ -25,7 +25,7 @@ const meta: ComponentMeta< typeof FormToggle > = {
25
25
  controls: {
26
26
  expanded: true,
27
27
  },
28
- docs: { source: { state: 'open' } },
28
+ docs: { canvas: { sourceState: 'shown' } },
29
29
  },
30
30
  };
31
31
  export default meta;
@@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof FormTokenField > = {
28
28
  controls: {
29
29
  expanded: true,
30
30
  },
31
- docs: { source: { state: 'open' } },
31
+ docs: { canvas: { sourceState: 'shown' } },
32
32
  },
33
33
  };
34
34
  export default meta;
@@ -17,7 +17,7 @@ const meta: ComponentMeta< typeof GradientPicker > = {
17
17
  component: GradientPicker,
18
18
  parameters: {
19
19
  controls: { expanded: true },
20
- docs: { source: { state: 'open' } },
20
+ docs: { canvas: { sourceState: 'shown' } },
21
21
  actions: { argTypesRegex: '^on.*' },
22
22
  },
23
23
  argTypes: {
@@ -34,7 +34,7 @@ const meta: ComponentMeta< typeof Grid > = {
34
34
  controls: {
35
35
  expanded: true,
36
36
  },
37
- docs: { source: { state: 'open' } },
37
+ docs: { canvas: { sourceState: 'shown' } },
38
38
  },
39
39
  };
40
40
  export default meta;
@@ -71,7 +71,7 @@ const meta: ComponentMeta< typeof HStack > = {
71
71
  },
72
72
  parameters: {
73
73
  controls: { expanded: true },
74
- docs: { source: { state: 'open' } },
74
+ docs: { canvas: { sourceState: 'shown' } },
75
75
  },
76
76
  };
77
77
  export default meta;
@@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof Heading > = {
28
28
  },
29
29
  parameters: {
30
30
  controls: { expanded: true },
31
- docs: { source: { state: 'open' } },
31
+ docs: { canvas: { sourceState: 'shown' } },
32
32
  },
33
33
  };
34
34
  export default meta;
@@ -20,7 +20,7 @@ const meta: ComponentMeta< typeof Icon > = {
20
20
  component: Icon,
21
21
  parameters: {
22
22
  controls: { expanded: true },
23
- docs: { source: { state: 'open' } },
23
+ docs: { canvas: { sourceState: 'shown' } },
24
24
  },
25
25
  };
26
26
  export default meta;
@@ -24,7 +24,7 @@ const meta: ComponentMeta< typeof InputControl > = {
24
24
  },
25
25
  parameters: {
26
26
  controls: { expanded: true },
27
- docs: { source: { state: 'open' } },
27
+ docs: { canvas: { sourceState: 'shown' } },
28
28
  },
29
29
  };
30
30
  export default meta;
@@ -20,7 +20,7 @@ const meta: ComponentMeta< typeof ItemGroup > = {
20
20
  },
21
21
  parameters: {
22
22
  controls: { expanded: true },
23
- docs: { source: { state: 'open' } },
23
+ docs: { canvas: { sourceState: 'shown' } },
24
24
  },
25
25
  };
26
26
  export default meta;
@@ -13,7 +13,7 @@ const meta: ComponentMeta< typeof KeyboardShortcuts > = {
13
13
  title: 'Components/KeyboardShortcuts',
14
14
  parameters: {
15
15
  controls: { expanded: true },
16
- docs: { source: { state: 'open' } },
16
+ docs: { canvas: { sourceState: 'shown' } },
17
17
  },
18
18
  };
19
19
  export default meta;
@@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof MenuGroup > = {
23
23
  },
24
24
  parameters: {
25
25
  controls: { expanded: true },
26
- docs: { source: { state: 'open' } },
26
+ docs: { canvas: { sourceState: 'shown' } },
27
27
  },
28
28
  };
29
29
  export default meta;
@@ -26,7 +26,7 @@ const meta: ComponentMeta< typeof MenuItemsChoice > = {
26
26
  controls: {
27
27
  expanded: true,
28
28
  },
29
- docs: { source: { state: 'open' } },
29
+ docs: { canvas: { sourceState: 'shown' } },
30
30
  },
31
31
  };
32
32
  export default meta;
@@ -19,7 +19,7 @@ const meta: ComponentMeta< typeof NavigableMenu > = {
19
19
  controls: {
20
20
  expanded: true,
21
21
  },
22
- docs: { source: { state: 'open' } },
22
+ docs: { canvas: { sourceState: 'shown' } },
23
23
  },
24
24
  };
25
25
  export default meta;
@@ -19,7 +19,7 @@ const meta: ComponentMeta< typeof TabbableContainer > = {
19
19
  controls: {
20
20
  expanded: true,
21
21
  },
22
- docs: { source: { state: 'open' } },
22
+ docs: { canvas: { sourceState: 'shown' } },
23
23
  },
24
24
  };
25
25
  export default meta;
@@ -29,7 +29,7 @@ const meta: ComponentMeta< typeof Navigation > = {
29
29
  controls: {
30
30
  expanded: true,
31
31
  },
32
- docs: { source: { state: 'open' } },
32
+ docs: { canvas: { sourceState: 'shown' } },
33
33
  },
34
34
  };
35
35
 
@@ -29,7 +29,7 @@ const meta: ComponentMeta< typeof NavigatorProvider > = {
29
29
  },
30
30
  parameters: {
31
31
  controls: { expanded: true },
32
- docs: { source: { state: 'open' } },
32
+ docs: { canvas: { sourceState: 'shown' } },
33
33
  },
34
34
  };
35
35
  export default meta;
@@ -22,7 +22,7 @@ const meta: ComponentMeta< typeof Notice > = {
22
22
  parameters: {
23
23
  actions: { argTypesRegex: '^on.*' },
24
24
  controls: { expanded: true },
25
- docs: { source: { state: 'open' } },
25
+ docs: { canvas: { sourceState: 'shown' } },
26
26
  },
27
27
  };
28
28
  export default meta;
@@ -26,7 +26,7 @@ const meta: ComponentMeta< typeof NumberControl > = {
26
26
  },
27
27
  parameters: {
28
28
  controls: { expanded: true },
29
- docs: { source: { state: 'open' } },
29
+ docs: { canvas: { sourceState: 'shown' } },
30
30
  },
31
31
  };
32
32
 
@@ -20,7 +20,7 @@ const meta: ComponentMeta< typeof PaletteEdit > = {
20
20
  parameters: {
21
21
  actions: { argTypesRegex: '^on.*' },
22
22
  controls: { expanded: true },
23
- docs: { source: { state: 'open' } },
23
+ docs: { canvas: { sourceState: 'shown' } },
24
24
  },
25
25
  };
26
26
  export default meta;
@@ -24,7 +24,7 @@ const meta: ComponentMeta< typeof Panel > = {
24
24
  },
25
25
  parameters: {
26
26
  controls: { expanded: true },
27
- docs: { source: { state: 'open' } },
27
+ docs: { canvas: { sourceState: 'shown' } },
28
28
  },
29
29
  };
30
30
  export default meta;
@@ -32,7 +32,7 @@ const meta: ComponentMeta< typeof Placeholder > = {
32
32
  },
33
33
  parameters: {
34
34
  controls: { expanded: true },
35
- docs: { source: { state: 'open' } },
35
+ docs: { canvas: { sourceState: 'shown' } },
36
36
  },
37
37
  };
38
38
  export default meta;
@@ -18,7 +18,7 @@ const meta: ComponentMeta< typeof ProgressBar > = {
18
18
  controls: {
19
19
  expanded: true,
20
20
  },
21
- docs: { source: { state: 'open' } },
21
+ docs: { canvas: { sourceState: 'shown' } },
22
22
  },
23
23
  };
24
24
  export default meta;
@@ -32,7 +32,7 @@ const meta: ComponentMeta< typeof QueryControls > = {
32
32
  parameters: {
33
33
  actions: { argTypesRegex: '^on.*' },
34
34
  controls: { expanded: true },
35
- docs: { source: { state: 'open' } },
35
+ docs: { canvas: { sourceState: 'shown' } },
36
36
  },
37
37
  };
38
38
  export default meta;
@@ -34,7 +34,7 @@ const meta: ComponentMeta< typeof RadioControl > = {
34
34
  controls: {
35
35
  expanded: true,
36
36
  },
37
- docs: { source: { state: 'open' } },
37
+ docs: { canvas: { sourceState: 'shown' } },
38
38
  },
39
39
  };
40
40
  export default meta;
@@ -48,7 +48,7 @@ const meta: ComponentMeta< typeof RangeControl > = {
48
48
  parameters: {
49
49
  actions: { argTypesRegex: '^on.*' },
50
50
  controls: { expanded: true },
51
- docs: { source: { state: 'open' } },
51
+ docs: { canvas: { sourceState: 'shown' } },
52
52
  },
53
53
  };
54
54
  export default meta;
@@ -23,7 +23,7 @@ const meta: ComponentMeta< typeof ResizableBox > = {
23
23
  },
24
24
  parameters: {
25
25
  controls: { expanded: true },
26
- docs: { source: { state: 'open' } },
26
+ docs: { canvas: { sourceState: 'shown' } },
27
27
  },
28
28
  };
29
29
  export default meta;
@@ -16,7 +16,7 @@ const meta: ComponentMeta< typeof ResponsiveWrapper > = {
16
16
  },
17
17
  parameters: {
18
18
  controls: { expanded: true },
19
- docs: { source: { state: 'open' } },
19
+ docs: { canvas: { sourceState: 'shown' } },
20
20
  },
21
21
  };
22
22
  export default meta;
@@ -254,7 +254,10 @@ function SandBox( {
254
254
 
255
255
  return () => {
256
256
  iframe?.removeEventListener( 'load', tryNoForceSandBox, false );
257
- defaultView?.addEventListener( 'message', checkMessageForResize );
257
+ defaultView?.removeEventListener(
258
+ 'message',
259
+ checkMessageForResize
260
+ );
258
261
  };
259
262
  // Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.
260
263
  // See https://github.com/WordPress/gutenberg/pull/44378
@@ -17,7 +17,7 @@ const meta: ComponentMeta< typeof SandBox > = {
17
17
  parameters: {
18
18
  actions: { argTypesRegex: '^on.*' },
19
19
  controls: { expanded: true },
20
- docs: { source: { state: 'open' } },
20
+ docs: { canvas: { sourceState: 'shown' } },
21
21
  },
22
22
  };
23
23
  export default meta;
@@ -20,7 +20,7 @@ const meta: ComponentMeta< typeof ScrollLock > = {
20
20
  title: 'Components/ScrollLock',
21
21
  parameters: {
22
22
  controls: { hideNoControlsWarning: true },
23
- docs: { source: { state: 'open' } },
23
+ docs: { canvas: { sourceState: 'shown' } },
24
24
  },
25
25
  };
26
26
  export default meta;
@@ -29,7 +29,7 @@ const meta: ComponentMeta< typeof Scrollable > = {
29
29
  controls: {
30
30
  expanded: true,
31
31
  },
32
- docs: { source: { state: 'open' } },
32
+ docs: { canvas: { sourceState: 'shown' } },
33
33
  },
34
34
  };
35
35
  export default meta;
@@ -21,7 +21,7 @@ const meta: ComponentMeta< typeof SearchControl > = {
21
21
  },
22
22
  parameters: {
23
23
  controls: { expanded: true },
24
- docs: { source: { state: 'open' } },
24
+ docs: { canvas: { sourceState: 'shown' } },
25
25
  },
26
26
  };
27
27
  export default meta;