@wordpress/components 25.6.0 → 25.7.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 (864) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/CONTRIBUTING.md +2 -2
  3. package/README.md +3 -8
  4. package/build/color-palette/utils.js +2 -9
  5. package/build/color-palette/utils.js.map +1 -1
  6. package/build/color-picker/hsv-color-picker.native.js +92 -0
  7. package/build/color-picker/hsv-color-picker.native.js.map +1 -0
  8. package/build/color-picker/hue-picker.native.js +195 -0
  9. package/build/color-picker/hue-picker.native.js.map +1 -0
  10. package/build/color-picker/index.native.js +3 -2
  11. package/build/color-picker/index.native.js.map +1 -1
  12. package/build/color-picker/saturation-picker.native.js +178 -0
  13. package/build/color-picker/saturation-picker.native.js.map +1 -0
  14. package/build/item-group/item/component.js +0 -1
  15. package/build/item-group/item/component.js.map +1 -1
  16. package/build/item-group/item-group/component.js +0 -1
  17. package/build/item-group/item-group/component.js.map +1 -1
  18. package/build/menu-item/index.js +6 -4
  19. package/build/menu-item/index.js.map +1 -1
  20. package/build/menu-item/types.js.map +1 -1
  21. package/build/mobile/link-settings/link-settings-navigation.native.js +1 -1
  22. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  23. package/build/navigation/index.js +0 -1
  24. package/build/navigation/index.js.map +1 -1
  25. package/build/navigator/navigator-provider/component.js +1 -2
  26. package/build/navigator/navigator-provider/component.js.map +1 -1
  27. package/build/palette-edit/styles.js +10 -10
  28. package/build/palette-edit/styles.js.map +1 -1
  29. package/build/popover/index.js +38 -75
  30. package/build/popover/index.js.map +1 -1
  31. package/build/popover/overlay-middlewares.js.map +1 -1
  32. package/build/popover/types.js.map +1 -1
  33. package/build/popover/utils.js +5 -50
  34. package/build/popover/utils.js.map +1 -1
  35. package/build/progress-bar/styles.js +6 -5
  36. package/build/progress-bar/styles.js.map +1 -1
  37. package/build/sandbox/index.js +1 -1
  38. package/build/sandbox/index.js.map +1 -1
  39. package/build/search-control/index.native.js +27 -24
  40. package/build/search-control/index.native.js.map +1 -1
  41. package/build/shortcut/index.js +13 -0
  42. package/build/shortcut/index.js.map +1 -1
  43. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +4 -2
  44. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  45. package/build/slot-fill/bubbles-virtually/slot.js +14 -8
  46. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  47. package/build/slot-fill/index.js +5 -0
  48. package/build/slot-fill/index.js.map +1 -1
  49. package/build/snackbar/index.js +1 -1
  50. package/build/snackbar/index.js.map +1 -1
  51. package/build/spinner/index.js +0 -1
  52. package/build/spinner/index.js.map +1 -1
  53. package/build/theme/color-algorithms.js +2 -2
  54. package/build/theme/color-algorithms.js.map +1 -1
  55. package/build/theme/index.js +0 -1
  56. package/build/theme/index.js.map +1 -1
  57. package/build/toolbar/toolbar-item/index.js +1 -1
  58. package/build/toolbar/toolbar-item/index.js.map +1 -1
  59. package/build/toolbar/toolbar-item/index.native.js +1 -1
  60. package/build/toolbar/toolbar-item/index.native.js.map +1 -1
  61. package/build/tools-panel/tools-panel/component.js +0 -1
  62. package/build/tools-panel/tools-panel/component.js.map +1 -1
  63. package/build/tools-panel/tools-panel-header/component.js +5 -1
  64. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  65. package/build/tree-select/index.js +0 -1
  66. package/build/tree-select/index.js.map +1 -1
  67. package/build/ui/context/constants.js +2 -6
  68. package/build/ui/context/constants.js.map +1 -1
  69. package/build/ui/context/context-connect.js +1 -1
  70. package/build/ui/context/context-connect.js.map +1 -1
  71. package/build/ui/context/context-system-provider.js +1 -1
  72. package/build/ui/context/context-system-provider.js.map +1 -1
  73. package/build/ui/context/use-context-system.js +1 -1
  74. package/build/ui/context/use-context-system.js.map +1 -1
  75. package/build/unit-control/index.js +0 -1
  76. package/build/unit-control/index.js.map +1 -1
  77. package/build/utils/hooks/use-cx.js +2 -1
  78. package/build/utils/hooks/use-cx.js.map +1 -1
  79. package/build/utils/math.js +0 -12
  80. package/build/utils/math.js.map +1 -1
  81. package/build/utils/values.js +3 -66
  82. package/build/utils/values.js.map +1 -1
  83. package/build/view/component.js +1 -2
  84. package/build/view/component.js.map +1 -1
  85. package/build-module/color-palette/utils.js +0 -6
  86. package/build-module/color-palette/utils.js.map +1 -1
  87. package/build-module/color-picker/hsv-color-picker.native.js +84 -0
  88. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -0
  89. package/build-module/color-picker/hue-picker.native.js +185 -0
  90. package/build-module/color-picker/hue-picker.native.js.map +1 -0
  91. package/build-module/color-picker/index.native.js +2 -1
  92. package/build-module/color-picker/index.native.js.map +1 -1
  93. package/build-module/color-picker/saturation-picker.native.js +168 -0
  94. package/build-module/color-picker/saturation-picker.native.js.map +1 -0
  95. package/build-module/item-group/item/component.js +0 -1
  96. package/build-module/item-group/item/component.js.map +1 -1
  97. package/build-module/item-group/item-group/component.js +0 -1
  98. package/build-module/item-group/item-group/component.js.map +1 -1
  99. package/build-module/menu-item/index.js +4 -2
  100. package/build-module/menu-item/index.js.map +1 -1
  101. package/build-module/menu-item/types.js.map +1 -1
  102. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -1
  103. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  104. package/build-module/navigation/index.js +0 -1
  105. package/build-module/navigation/index.js.map +1 -1
  106. package/build-module/navigator/navigator-provider/component.js +1 -2
  107. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  108. package/build-module/palette-edit/styles.js +10 -10
  109. package/build-module/palette-edit/styles.js.map +1 -1
  110. package/build-module/popover/index.js +42 -79
  111. package/build-module/popover/index.js.map +1 -1
  112. package/build-module/popover/overlay-middlewares.js.map +1 -1
  113. package/build-module/popover/types.js.map +1 -1
  114. package/build-module/popover/utils.js +4 -47
  115. package/build-module/popover/utils.js.map +1 -1
  116. package/build-module/progress-bar/styles.js +6 -5
  117. package/build-module/progress-bar/styles.js.map +1 -1
  118. package/build-module/sandbox/index.js +1 -1
  119. package/build-module/sandbox/index.js.map +1 -1
  120. package/build-module/search-control/index.native.js +28 -25
  121. package/build-module/search-control/index.native.js.map +1 -1
  122. package/build-module/shortcut/index.js +13 -0
  123. package/build-module/shortcut/index.js.map +1 -1
  124. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +4 -2
  125. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  126. package/build-module/slot-fill/bubbles-virtually/slot.js +14 -8
  127. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  128. package/build-module/slot-fill/index.js +6 -1
  129. package/build-module/slot-fill/index.js.map +1 -1
  130. package/build-module/snackbar/index.js +1 -1
  131. package/build-module/snackbar/index.js.map +1 -1
  132. package/build-module/spinner/index.js +0 -1
  133. package/build-module/spinner/index.js.map +1 -1
  134. package/build-module/theme/color-algorithms.js +2 -2
  135. package/build-module/theme/color-algorithms.js.map +1 -1
  136. package/build-module/theme/index.js +0 -1
  137. package/build-module/theme/index.js.map +1 -1
  138. package/build-module/toolbar/toolbar-item/index.js +1 -1
  139. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  140. package/build-module/toolbar/toolbar-item/index.native.js +1 -1
  141. package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
  142. package/build-module/tools-panel/tools-panel/component.js +0 -1
  143. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  144. package/build-module/tools-panel/tools-panel-header/component.js +5 -1
  145. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  146. package/build-module/tree-select/index.js +0 -1
  147. package/build-module/tree-select/index.js.map +1 -1
  148. package/build-module/ui/context/constants.js +0 -2
  149. package/build-module/ui/context/constants.js.map +1 -1
  150. package/build-module/ui/context/context-connect.js +1 -1
  151. package/build-module/ui/context/context-connect.js.map +1 -1
  152. package/build-module/ui/context/context-system-provider.js +1 -1
  153. package/build-module/ui/context/context-system-provider.js.map +1 -1
  154. package/build-module/ui/context/use-context-system.js +1 -1
  155. package/build-module/ui/context/use-context-system.js.map +1 -1
  156. package/build-module/unit-control/index.js +0 -1
  157. package/build-module/unit-control/index.js.map +1 -1
  158. package/build-module/utils/hooks/use-cx.js +2 -1
  159. package/build-module/utils/hooks/use-cx.js.map +1 -1
  160. package/build-module/utils/math.js +0 -11
  161. package/build-module/utils/math.js.map +1 -1
  162. package/build-module/utils/values.js +0 -60
  163. package/build-module/utils/values.js.map +1 -1
  164. package/build-module/view/component.js +1 -2
  165. package/build-module/view/component.js.map +1 -1
  166. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  167. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  168. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  169. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  170. package/build-types/animate/stories/index.story.d.ts +9 -9
  171. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  172. package/build-types/base-control/stories/index.story.d.ts +4 -4
  173. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  174. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  175. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  176. package/build-types/border-control/stories/index.story.d.ts +2 -2
  177. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  178. package/build-types/button/stories/e2e/index.story.d.ts +3 -3
  179. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  180. package/build-types/button/stories/index.story.d.ts +10 -9
  181. package/build-types/button/stories/index.story.d.ts.map +1 -1
  182. package/build-types/button-group/stories/index.story.d.ts +3 -3
  183. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  184. package/build-types/card/stories/index.story.d.ts +2 -2
  185. package/build-types/card/stories/index.story.d.ts.map +1 -1
  186. package/build-types/checkbox-control/stories/index.story.d.ts +4 -4
  187. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  188. package/build-types/circular-option-picker/stories/index.story.d.ts +2 -2
  189. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  190. package/build-types/color-indicator/stories/index.story.d.ts +3 -3
  191. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  192. package/build-types/color-palette/stories/index.story.d.ts +3 -3
  193. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  194. package/build-types/color-palette/styles.d.ts +1 -1
  195. package/build-types/color-palette/utils.d.ts +0 -1
  196. package/build-types/color-palette/utils.d.ts.map +1 -1
  197. package/build-types/color-picker/stories/index.story.d.ts +2 -2
  198. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  199. package/build-types/combobox-control/stories/index.story.d.ts +2 -2
  200. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  201. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  202. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  203. package/build-types/date-time/date/styles.d.ts +1 -1
  204. package/build-types/date-time/stories/date-time.story.d.ts +5 -5
  205. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  206. package/build-types/date-time/stories/date.story.d.ts +5 -5
  207. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  208. package/build-types/date-time/stories/time.story.d.ts +3 -3
  209. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  210. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  211. package/build-types/disabled/stories/index.story.d.ts +4 -4
  212. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  213. package/build-types/divider/stories/index.story.d.ts +5 -5
  214. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  215. package/build-types/draggable/stories/index.story.d.ts +4 -4
  216. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  217. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  218. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  219. package/build-types/dropdown/stories/index.story.d.ts +6 -5
  220. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  221. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  222. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  223. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +2 -2
  224. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  225. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  226. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  227. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +2 -2
  228. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  229. package/build-types/elevation/stories/index.story.d.ts +5 -5
  230. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  231. package/build-types/external-link/stories/index.story.d.ts +3 -3
  232. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  233. package/build-types/flex/stories/index.story.d.ts +4 -4
  234. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  235. package/build-types/focal-point-picker/stories/index.story.d.ts +2 -2
  236. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  237. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +2 -2
  238. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  239. package/build-types/font-size-picker/stories/index.story.d.ts +8 -8
  240. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  241. package/build-types/form-file-upload/stories/index.story.d.ts +2 -2
  242. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  243. package/build-types/form-toggle/stories/index.story.d.ts +3 -3
  244. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  245. package/build-types/form-token-field/stories/index.story.d.ts +7 -7
  246. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  247. package/build-types/gradient-picker/stories/index.story.d.ts +2 -2
  248. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  249. package/build-types/grid/stories/index.story.d.ts +3 -3
  250. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  251. package/build-types/guide/stories/index.story.d.ts +2 -2
  252. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  253. package/build-types/h-stack/stories/e2e/index.story.d.ts +3 -3
  254. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  255. package/build-types/h-stack/stories/index.story.d.ts +3 -3
  256. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  257. package/build-types/heading/stories/index.story.d.ts +3 -3
  258. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  259. package/build-types/icon/stories/index.story.d.ts +4 -4
  260. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  261. package/build-types/input-control/stories/index.story.d.ts +2 -2
  262. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  263. package/build-types/item-group/item/component.d.ts +0 -1
  264. package/build-types/item-group/item/component.d.ts.map +1 -1
  265. package/build-types/item-group/item/hook.d.ts +1 -1
  266. package/build-types/item-group/item-group/component.d.ts +0 -1
  267. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  268. package/build-types/item-group/stories/index.story.d.ts +6 -6
  269. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  270. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  271. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  272. package/build-types/menu-group/stories/index.story.d.ts +3 -3
  273. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  274. package/build-types/menu-item/index.d.ts +5 -58
  275. package/build-types/menu-item/index.d.ts.map +1 -1
  276. package/build-types/menu-item/stories/index.story.d.ts +74 -0
  277. package/build-types/menu-item/stories/index.story.d.ts.map +1 -0
  278. package/build-types/menu-item/types.d.ts +3 -2
  279. package/build-types/menu-item/types.d.ts.map +1 -1
  280. package/build-types/menu-items-choice/stories/index.story.d.ts +3 -3
  281. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  282. package/build-types/modal/stories/index.story.d.ts +4 -4
  283. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  284. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +3 -3
  285. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  286. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +3 -3
  287. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  288. package/build-types/navigation/index.d.ts +0 -1
  289. package/build-types/navigation/index.d.ts.map +1 -1
  290. package/build-types/navigation/stories/index.story.d.ts +2 -2
  291. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  292. package/build-types/navigation/stories/utils/controlled-state.d.ts +2 -2
  293. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  294. package/build-types/navigation/stories/utils/default.d.ts +2 -2
  295. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  296. package/build-types/navigation/stories/utils/group.d.ts +2 -2
  297. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  298. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +2 -2
  299. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  300. package/build-types/navigation/stories/utils/more-examples.d.ts +2 -2
  301. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  302. package/build-types/navigation/stories/utils/search.d.ts +2 -2
  303. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  304. package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
  305. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  306. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  307. package/build-types/navigator/stories/index.story.d.ts +5 -5
  308. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  309. package/build-types/notice/stories/index.story.d.ts +3 -3
  310. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  311. package/build-types/number-control/stories/index.story.d.ts +2 -2
  312. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  313. package/build-types/palette-edit/stories/index.story.d.ts +2 -2
  314. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  315. package/build-types/palette-edit/styles.d.ts +1 -1
  316. package/build-types/palette-edit/styles.d.ts.map +1 -1
  317. package/build-types/panel/stories/index.story.d.ts +6 -6
  318. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  319. package/build-types/placeholder/stories/index.story.d.ts +3 -3
  320. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  321. package/build-types/popover/index.d.ts.map +1 -1
  322. package/build-types/popover/overlay-middlewares.d.ts +2 -2
  323. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  324. package/build-types/popover/stories/index.story.d.ts +7 -7
  325. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  326. package/build-types/popover/types.d.ts +6 -0
  327. package/build-types/popover/types.d.ts.map +1 -1
  328. package/build-types/popover/utils.d.ts +1 -21
  329. package/build-types/popover/utils.d.ts.map +1 -1
  330. package/build-types/progress-bar/stories/index.story.d.ts +3 -3
  331. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  332. package/build-types/progress-bar/styles.d.ts.map +1 -1
  333. package/build-types/query-controls/stories/index.story.d.ts +4 -4
  334. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  335. package/build-types/radio-control/stories/index.story.d.ts +3 -3
  336. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  337. package/build-types/range-control/stories/index.story.d.ts +9 -9
  338. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  339. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  340. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  341. package/build-types/responsive-wrapper/stories/index.story.d.ts +3 -3
  342. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  343. package/build-types/sandbox/index.d.ts.map +1 -1
  344. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  345. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  346. package/build-types/scroll-lock/stories/index.story.d.ts +3 -3
  347. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  348. package/build-types/scrollable/stories/index.story.d.ts +3 -3
  349. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  350. package/build-types/search-control/stories/index.story.d.ts +2 -16
  351. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  352. package/build-types/select-control/stories/index.story.d.ts +2 -2
  353. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  354. package/build-types/shortcut/index.d.ts +13 -0
  355. package/build-types/shortcut/index.d.ts.map +1 -1
  356. package/build-types/shortcut/stories/index.story.d.ts +13 -0
  357. package/build-types/shortcut/stories/index.story.d.ts.map +1 -0
  358. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +1 -0
  359. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  360. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -6
  361. package/build-types/slot-fill/index.d.ts +1 -1
  362. package/build-types/slot-fill/index.d.ts.map +1 -1
  363. package/build-types/snackbar/stories/index.story.d.ts +7 -7
  364. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  365. package/build-types/snackbar/stories/list.story.d.ts +3 -3
  366. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  367. package/build-types/spacer/stories/index.story.d.ts +3 -3
  368. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  369. package/build-types/spinner/index.d.ts +0 -1
  370. package/build-types/spinner/index.d.ts.map +1 -1
  371. package/build-types/spinner/stories/index.story.d.ts +4 -4
  372. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  373. package/build-types/surface/stories/index.story.d.ts +3 -3
  374. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  375. package/build-types/tab-panel/stories/index.story.d.ts +2 -2
  376. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  377. package/build-types/text-control/stories/index.story.d.ts +4 -4
  378. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  379. package/build-types/text-highlight/stories/index.story.d.ts +3 -3
  380. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  381. package/build-types/textarea-control/stories/index.story.d.ts +3 -3
  382. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  383. package/build-types/theme/index.d.ts +0 -1
  384. package/build-types/theme/index.d.ts.map +1 -1
  385. package/build-types/theme/stories/index.story.d.ts +4 -4
  386. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  387. package/build-types/tip/stories/index.story.d.ts +3 -3
  388. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  389. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  390. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  391. package/build-types/toggle-group-control/stories/index.story.d.ts +6 -6
  392. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  393. package/build-types/toolbar/stories/index.story.d.ts +2 -2
  394. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  395. package/build-types/tools-panel/stories/index.story.d.ts +8 -8
  396. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  397. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  398. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  399. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  400. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  401. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  402. package/build-types/tree-select/index.d.ts +0 -1
  403. package/build-types/tree-select/index.d.ts.map +1 -1
  404. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  405. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  406. package/build-types/truncate/stories/index.story.d.ts +4 -4
  407. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  408. package/build-types/ui/context/constants.d.ts +0 -2
  409. package/build-types/ui/context/constants.d.ts.map +1 -1
  410. package/build-types/unit-control/index.d.ts +0 -1
  411. package/build-types/unit-control/index.d.ts.map +1 -1
  412. package/build-types/unit-control/stories/index.story.d.ts +7 -7
  413. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  414. package/build-types/utils/hooks/use-cx.d.ts +2 -1
  415. package/build-types/utils/hooks/use-cx.d.ts.map +1 -1
  416. package/build-types/utils/math.d.ts +0 -8
  417. package/build-types/utils/math.d.ts.map +1 -1
  418. package/build-types/utils/values.d.ts +0 -13
  419. package/build-types/utils/values.d.ts.map +1 -1
  420. package/build-types/v-stack/stories/e2e/index.story.d.ts +3 -3
  421. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  422. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  423. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  424. package/build-types/view/component.d.ts +0 -1
  425. package/build-types/view/component.d.ts.map +1 -1
  426. package/build-types/view/stories/index.story.d.ts +3 -3
  427. package/build-types/view/stories/index.story.d.ts.map +1 -1
  428. package/build-types/visually-hidden/stories/index.story.d.ts +5 -5
  429. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  430. package/build-types/z-stack/stories/index.story.d.ts +3 -3
  431. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  432. package/package.json +20 -20
  433. package/src/alignment-matrix-control/stories/index.story.tsx +8 -4
  434. package/src/alignment-matrix-control/test/index.tsx +6 -2
  435. package/src/angle-picker-control/stories/index.story.tsx +4 -4
  436. package/src/animate/stories/index.story.tsx +13 -11
  437. package/src/base-control/stories/index.story.tsx +6 -10
  438. package/src/border-box-control/stories/index.story.tsx +6 -10
  439. package/src/border-control/stories/index.story.tsx +9 -15
  440. package/src/button/stories/e2e/index.story.tsx +3 -3
  441. package/src/button/stories/index.story.tsx +11 -11
  442. package/src/button-group/stories/index.story.tsx +5 -7
  443. package/src/card/stories/index.story.tsx +6 -6
  444. package/src/checkbox-control/stories/index.story.tsx +8 -7
  445. package/src/circular-option-picker/stories/index.story.tsx +20 -5
  446. package/src/color-indicator/stories/index.story.tsx +5 -7
  447. package/src/color-palette/stories/index.story.tsx +13 -22
  448. package/src/color-palette/test/index.tsx +15 -9
  449. package/src/color-palette/test/utils.ts +0 -15
  450. package/src/color-palette/utils.ts +0 -7
  451. package/src/color-picker/hsv-color-picker.native.js +88 -0
  452. package/src/color-picker/hue-picker.native.js +194 -0
  453. package/src/color-picker/index.native.js +2 -1
  454. package/src/color-picker/saturation-picker.native.js +163 -0
  455. package/src/color-picker/stories/index.story.tsx +4 -4
  456. package/src/color-picker/style.native.scss +23 -0
  457. package/src/combobox-control/stories/index.story.tsx +4 -4
  458. package/src/confirm-dialog/stories/index.story.js +1 -1
  459. package/src/custom-gradient-picker/stories/index.story.tsx +4 -4
  460. package/src/date-time/stories/date-time.story.tsx +9 -11
  461. package/src/date-time/stories/date.story.tsx +9 -10
  462. package/src/date-time/stories/time.story.tsx +5 -5
  463. package/src/dimension-control/stories/index.story.tsx +4 -4
  464. package/src/disabled/stories/index.story.tsx +5 -5
  465. package/src/divider/stories/index.story.tsx +7 -7
  466. package/src/draggable/stories/index.story.tsx +5 -7
  467. package/src/drop-zone/stories/index.story.tsx +4 -4
  468. package/src/dropdown/stories/index.story.tsx +8 -6
  469. package/src/dropdown-menu/stories/index.story.tsx +4 -4
  470. package/src/dropdown-menu-v2/stories/index.story.tsx +28 -11
  471. package/src/duotone-picker/stories/duotone-picker.story.tsx +4 -7
  472. package/src/duotone-picker/stories/duotone-swatch.story.tsx +4 -4
  473. package/src/elevation/stories/index.story.tsx +8 -8
  474. package/src/external-link/stories/index.story.tsx +5 -7
  475. package/src/flex/stories/index.story.tsx +7 -7
  476. package/src/focal-point-picker/stories/index.story.tsx +4 -4
  477. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -3
  478. package/src/font-size-picker/stories/index.story.tsx +11 -11
  479. package/src/form-file-upload/stories/index.story.tsx +4 -4
  480. package/src/form-toggle/stories/index.story.tsx +5 -8
  481. package/src/form-token-field/stories/index.story.tsx +11 -12
  482. package/src/gradient-picker/stories/index.story.tsx +4 -4
  483. package/src/grid/stories/index.story.tsx +5 -5
  484. package/src/guide/stories/index.story.tsx +3 -3
  485. package/src/h-stack/stories/e2e/index.story.tsx +4 -4
  486. package/src/h-stack/stories/index.story.tsx +5 -5
  487. package/src/heading/stories/index.story.tsx +4 -4
  488. package/src/icon/stories/index.story.tsx +6 -6
  489. package/src/input-control/stories/index.story.tsx +6 -4
  490. package/src/item-group/item/component.tsx +0 -1
  491. package/src/item-group/item-group/component.tsx +0 -1
  492. package/src/item-group/stories/index.story.tsx +12 -13
  493. package/src/keyboard-shortcuts/stories/index.story.tsx +4 -4
  494. package/src/menu-group/stories/index.story.tsx +6 -6
  495. package/src/menu-item/README.md +1 -1
  496. package/src/menu-item/index.tsx +5 -2
  497. package/src/menu-item/stories/index.story.tsx +80 -0
  498. package/src/menu-item/types.ts +3 -2
  499. package/src/menu-items-choice/stories/index.story.tsx +5 -7
  500. package/src/mobile/link-settings/link-settings-navigation.native.js +1 -1
  501. package/src/modal/stories/index.story.tsx +5 -10
  502. package/src/navigable-container/stories/navigable-menu.story.tsx +4 -4
  503. package/src/navigable-container/stories/tabbable-container.story.tsx +4 -4
  504. package/src/navigation/index.tsx +0 -1
  505. package/src/navigation/stories/index.story.tsx +17 -3
  506. package/src/navigation/stories/utils/controlled-state.tsx +2 -2
  507. package/src/navigation/stories/utils/default.tsx +2 -2
  508. package/src/navigation/stories/utils/group.tsx +2 -2
  509. package/src/navigation/stories/utils/hide-if-empty.tsx +2 -2
  510. package/src/navigation/stories/utils/more-examples.tsx +2 -2
  511. package/src/navigation/stories/utils/search.tsx +2 -2
  512. package/src/navigator/navigator-provider/component.tsx +0 -1
  513. package/src/navigator/stories/index.story.tsx +10 -11
  514. package/src/notice/stories/index.story.tsx +7 -7
  515. package/src/number-control/stories/index.story.tsx +4 -4
  516. package/src/palette-edit/stories/index.story.tsx +4 -4
  517. package/src/palette-edit/styles.js +0 -1
  518. package/src/panel/stories/index.story.tsx +10 -12
  519. package/src/placeholder/stories/index.story.tsx +5 -7
  520. package/src/popover/README.md +2 -2
  521. package/src/popover/index.tsx +69 -103
  522. package/src/popover/overlay-middlewares.tsx +2 -2
  523. package/src/popover/stories/index.story.tsx +8 -10
  524. package/src/popover/test/index.tsx +15 -1
  525. package/src/popover/types.ts +6 -0
  526. package/src/popover/utils.ts +5 -56
  527. package/src/progress-bar/stories/index.story.tsx +5 -7
  528. package/src/progress-bar/styles.ts +4 -1
  529. package/src/query-controls/stories/index.story.tsx +6 -7
  530. package/src/radio-control/stories/index.story.tsx +5 -7
  531. package/src/radio-group/stories/index.story.js +1 -0
  532. package/src/range-control/stories/index.story.tsx +13 -19
  533. package/src/resizable-box/stories/index.story.tsx +4 -4
  534. package/src/responsive-wrapper/stories/index.story.tsx +5 -6
  535. package/src/sandbox/index.tsx +4 -1
  536. package/src/sandbox/stories/index.story.tsx +4 -6
  537. package/src/scroll-lock/stories/index.story.tsx +4 -4
  538. package/src/scrollable/stories/index.story.tsx +5 -5
  539. package/src/search-control/index.native.js +39 -27
  540. package/src/search-control/stories/index.story.tsx +4 -4
  541. package/src/select-control/stories/index.story.tsx +4 -4
  542. package/src/shortcut/index.tsx +13 -0
  543. package/src/shortcut/stories/index.story.tsx +33 -0
  544. package/src/slot-fill/README.md +5 -5
  545. package/src/slot-fill/bubbles-virtually/slot-fill-context.js +3 -0
  546. package/src/slot-fill/bubbles-virtually/slot.js +17 -5
  547. package/src/slot-fill/index.js +6 -1
  548. package/src/slot-fill/stories/index.story.js +3 -1
  549. package/src/slot-fill/test/__snapshots__/slot.js.snap +12 -4
  550. package/src/snackbar/stories/index.story.tsx +11 -14
  551. package/src/snackbar/stories/list.story.tsx +4 -4
  552. package/src/spacer/stories/index.story.tsx +5 -5
  553. package/src/spinner/index.tsx +0 -1
  554. package/src/spinner/stories/index.story.tsx +6 -6
  555. package/src/surface/stories/index.story.tsx +5 -5
  556. package/src/tab-panel/stories/index.story.tsx +6 -14
  557. package/src/tab-panel/test/index.tsx +9 -25
  558. package/src/text/test/index.tsx +1 -1
  559. package/src/text-control/stories/index.story.tsx +8 -7
  560. package/src/text-highlight/stories/index.story.tsx +5 -7
  561. package/src/textarea-control/stories/index.story.tsx +5 -7
  562. package/src/theme/index.tsx +0 -1
  563. package/src/theme/stories/index.story.tsx +7 -7
  564. package/src/tip/stories/index.story.tsx +5 -5
  565. package/src/toggle-control/stories/index.story.tsx +4 -4
  566. package/src/toggle-group-control/stories/index.story.tsx +18 -12
  567. package/src/toolbar/stories/index.story.tsx +14 -4
  568. package/src/tools-panel/stories/index.story.tsx +18 -13
  569. package/src/tools-panel/tools-panel/component.tsx +0 -1
  570. package/src/tools-panel/tools-panel-header/component.tsx +3 -0
  571. package/src/tooltip/stories/index.story.js +1 -1
  572. package/src/tree-grid/stories/index.story.tsx +5 -3
  573. package/src/tree-select/index.tsx +0 -1
  574. package/src/tree-select/stories/index.story.tsx +4 -4
  575. package/src/truncate/stories/index.story.tsx +6 -8
  576. package/src/ui/context/constants.js +0 -2
  577. package/src/unit-control/index.tsx +0 -1
  578. package/src/unit-control/stories/index.story.tsx +11 -10
  579. package/src/utils/hooks/use-cx.ts +2 -1
  580. package/src/utils/math.js +0 -11
  581. package/src/utils/values.js +0 -81
  582. package/src/v-stack/stories/e2e/index.story.tsx +4 -4
  583. package/src/v-stack/stories/index.story.tsx +4 -4
  584. package/src/view/component.tsx +0 -1
  585. package/src/view/stories/index.story.tsx +5 -5
  586. package/src/visually-hidden/stories/index.story.tsx +8 -8
  587. package/src/z-stack/stories/index.story.tsx +5 -5
  588. package/tsconfig.tsbuildinfo +1 -1
  589. package/build/popover/limit-shift.js +0 -129
  590. package/build/popover/limit-shift.js.map +0 -1
  591. package/build/ui/utils/get-high-dpi.js +0 -16
  592. package/build/ui/utils/get-high-dpi.js.map +0 -1
  593. package/build/utils/browsers.js +0 -32
  594. package/build/utils/browsers.js.map +0 -1
  595. package/build/utils/events.js +0 -43
  596. package/build/utils/events.js.map +0 -1
  597. package/build-module/popover/limit-shift.js +0 -122
  598. package/build-module/popover/limit-shift.js.map +0 -1
  599. package/build-module/ui/utils/get-high-dpi.js +0 -11
  600. package/build-module/ui/utils/get-high-dpi.js.map +0 -1
  601. package/build-module/utils/browsers.js +0 -25
  602. package/build-module/utils/browsers.js.map +0 -1
  603. package/build-module/utils/events.js +0 -37
  604. package/build-module/utils/events.js.map +0 -1
  605. package/build-types/alignment-matrix-control/stories/index.d.ts +0 -14
  606. package/build-types/alignment-matrix-control/stories/index.d.ts.map +0 -1
  607. package/build-types/angle-picker-control/stories/index.d.ts +0 -15
  608. package/build-types/angle-picker-control/stories/index.d.ts.map +0 -1
  609. package/build-types/animate/stories/index.d.ts +0 -18
  610. package/build-types/animate/stories/index.d.ts.map +0 -1
  611. package/build-types/base-control/stories/index.d.ts +0 -25
  612. package/build-types/base-control/stories/index.d.ts.map +0 -1
  613. package/build-types/border-box-control/stories/index.d.ts +0 -17
  614. package/build-types/border-box-control/stories/index.d.ts.map +0 -1
  615. package/build-types/border-control/stories/index.d.ts +0 -119
  616. package/build-types/border-control/stories/index.d.ts.map +0 -1
  617. package/build-types/button/stories/e2e/index.d.ts +0 -15
  618. package/build-types/button/stories/e2e/index.d.ts.map +0 -1
  619. package/build-types/button/stories/index.d.ts +0 -20
  620. package/build-types/button/stories/index.d.ts.map +0 -1
  621. package/build-types/button-group/stories/index.d.ts +0 -12
  622. package/build-types/button-group/stories/index.d.ts.map +0 -1
  623. package/build-types/card/stories/index.d.ts +0 -32
  624. package/build-types/card/stories/index.d.ts.map +0 -1
  625. package/build-types/checkbox-control/stories/index.d.ts +0 -13
  626. package/build-types/checkbox-control/stories/index.d.ts.map +0 -1
  627. package/build-types/circular-option-picker/stories/index.d.ts +0 -14
  628. package/build-types/circular-option-picker/stories/index.d.ts.map +0 -1
  629. package/build-types/color-indicator/stories/index.d.ts +0 -12
  630. package/build-types/color-indicator/stories/index.d.ts.map +0 -1
  631. package/build-types/color-palette/stories/index.d.ts +0 -46
  632. package/build-types/color-palette/stories/index.d.ts.map +0 -1
  633. package/build-types/color-picker/stories/index.d.ts +0 -19
  634. package/build-types/color-picker/stories/index.d.ts.map +0 -1
  635. package/build-types/combobox-control/stories/index.d.ts +0 -18
  636. package/build-types/combobox-control/stories/index.d.ts.map +0 -1
  637. package/build-types/custom-gradient-picker/stories/index.d.ts +0 -12
  638. package/build-types/custom-gradient-picker/stories/index.d.ts.map +0 -1
  639. package/build-types/date-time/stories/date-time.d.ts +0 -14
  640. package/build-types/date-time/stories/date-time.d.ts.map +0 -1
  641. package/build-types/date-time/stories/date.d.ts +0 -14
  642. package/build-types/date-time/stories/date.d.ts.map +0 -1
  643. package/build-types/date-time/stories/time.d.ts +0 -12
  644. package/build-types/date-time/stories/time.d.ts.map +0 -1
  645. package/build-types/dimension-control/stories/index.d.ts +0 -12
  646. package/build-types/dimension-control/stories/index.d.ts.map +0 -1
  647. package/build-types/disabled/stories/index.d.ts +0 -13
  648. package/build-types/disabled/stories/index.d.ts.map +0 -1
  649. package/build-types/divider/stories/index.d.ts +0 -11
  650. package/build-types/divider/stories/index.d.ts.map +0 -1
  651. package/build-types/draggable/stories/index.d.ts +0 -20
  652. package/build-types/draggable/stories/index.d.ts.map +0 -1
  653. package/build-types/drop-zone/stories/index.d.ts +0 -12
  654. package/build-types/drop-zone/stories/index.d.ts.map +0 -1
  655. package/build-types/dropdown/stories/index.d.ts +0 -23
  656. package/build-types/dropdown/stories/index.d.ts.map +0 -1
  657. package/build-types/dropdown-menu/stories/index.d.ts +0 -14
  658. package/build-types/dropdown-menu/stories/index.d.ts.map +0 -1
  659. package/build-types/dropdown-menu-v2/stories/index.d.ts +0 -11
  660. package/build-types/dropdown-menu-v2/stories/index.d.ts.map +0 -1
  661. package/build-types/duotone-picker/stories/duotone-picker.d.ts +0 -12
  662. package/build-types/duotone-picker/stories/duotone-picker.d.ts.map +0 -1
  663. package/build-types/duotone-picker/stories/duotone-swatch.d.ts +0 -14
  664. package/build-types/duotone-picker/stories/duotone-swatch.d.ts.map +0 -1
  665. package/build-types/elevation/stories/index.d.ts +0 -22
  666. package/build-types/elevation/stories/index.d.ts.map +0 -1
  667. package/build-types/external-link/stories/index.d.ts +0 -12
  668. package/build-types/external-link/stories/index.d.ts.map +0 -1
  669. package/build-types/flex/stories/index.d.ts +0 -13
  670. package/build-types/flex/stories/index.d.ts.map +0 -1
  671. package/build-types/focal-point-picker/stories/index.d.ts +0 -15
  672. package/build-types/focal-point-picker/stories/index.d.ts.map +0 -1
  673. package/build-types/font-size-picker/stories/e2e/index.d.ts +0 -16
  674. package/build-types/font-size-picker/stories/e2e/index.d.ts.map +0 -1
  675. package/build-types/font-size-picker/stories/index.d.ts +0 -31
  676. package/build-types/font-size-picker/stories/index.d.ts.map +0 -1
  677. package/build-types/form-file-upload/stories/index.d.ts +0 -23
  678. package/build-types/form-file-upload/stories/index.d.ts.map +0 -1
  679. package/build-types/form-toggle/stories/index.d.ts +0 -12
  680. package/build-types/form-toggle/stories/index.d.ts.map +0 -1
  681. package/build-types/form-token-field/stories/index.d.ts +0 -26
  682. package/build-types/form-token-field/stories/index.d.ts.map +0 -1
  683. package/build-types/gradient-picker/stories/index.d.ts +0 -14
  684. package/build-types/gradient-picker/stories/index.d.ts.map +0 -1
  685. package/build-types/grid/stories/index.d.ts +0 -9
  686. package/build-types/grid/stories/index.d.ts.map +0 -1
  687. package/build-types/guide/stories/index.d.ts +0 -9
  688. package/build-types/guide/stories/index.d.ts.map +0 -1
  689. package/build-types/h-stack/stories/e2e/index.d.ts +0 -9
  690. package/build-types/h-stack/stories/e2e/index.d.ts.map +0 -1
  691. package/build-types/h-stack/stories/index.d.ts +0 -9
  692. package/build-types/h-stack/stories/index.d.ts.map +0 -1
  693. package/build-types/heading/stories/index.d.ts +0 -12
  694. package/build-types/heading/stories/index.d.ts.map +0 -1
  695. package/build-types/icon/stories/index.d.ts +0 -22
  696. package/build-types/icon/stories/index.d.ts.map +0 -1
  697. package/build-types/input-control/stories/index.d.ts +0 -28
  698. package/build-types/input-control/stories/index.d.ts.map +0 -1
  699. package/build-types/item-group/stories/index.d.ts +0 -15
  700. package/build-types/item-group/stories/index.d.ts.map +0 -1
  701. package/build-types/keyboard-shortcuts/stories/index.d.ts +0 -12
  702. package/build-types/keyboard-shortcuts/stories/index.d.ts.map +0 -1
  703. package/build-types/menu-group/stories/index.d.ts +0 -17
  704. package/build-types/menu-group/stories/index.d.ts.map +0 -1
  705. package/build-types/menu-items-choice/stories/index.d.ts +0 -12
  706. package/build-types/menu-items-choice/stories/index.d.ts.map +0 -1
  707. package/build-types/modal/stories/index.d.ts +0 -10
  708. package/build-types/modal/stories/index.d.ts.map +0 -1
  709. package/build-types/navigable-container/stories/navigable-menu.d.ts +0 -12
  710. package/build-types/navigable-container/stories/navigable-menu.d.ts.map +0 -1
  711. package/build-types/navigable-container/stories/tabbable-container.d.ts +0 -12
  712. package/build-types/navigable-container/stories/tabbable-container.d.ts.map +0 -1
  713. package/build-types/navigation/stories/index.d.ts +0 -18
  714. package/build-types/navigation/stories/index.d.ts.map +0 -1
  715. package/build-types/navigator/stories/index.d.ts +0 -11
  716. package/build-types/navigator/stories/index.d.ts.map +0 -1
  717. package/build-types/notice/stories/index.d.ts +0 -17
  718. package/build-types/notice/stories/index.d.ts.map +0 -1
  719. package/build-types/number-control/stories/index.d.ts +0 -25
  720. package/build-types/number-control/stories/index.d.ts.map +0 -1
  721. package/build-types/palette-edit/stories/index.d.ts +0 -13
  722. package/build-types/palette-edit/stories/index.d.ts.map +0 -1
  723. package/build-types/panel/stories/index.d.ts +0 -19
  724. package/build-types/panel/stories/index.d.ts.map +0 -1
  725. package/build-types/placeholder/stories/index.d.ts +0 -12
  726. package/build-types/placeholder/stories/index.d.ts.map +0 -1
  727. package/build-types/popover/limit-shift.d.ts +0 -87
  728. package/build-types/popover/limit-shift.d.ts.map +0 -1
  729. package/build-types/popover/stories/e2e/index.d.ts +0 -8
  730. package/build-types/popover/stories/e2e/index.d.ts.map +0 -1
  731. package/build-types/popover/stories/index.d.ts +0 -13
  732. package/build-types/popover/stories/index.d.ts.map +0 -1
  733. package/build-types/progress-bar/stories/index.d.ts +0 -12
  734. package/build-types/progress-bar/stories/index.d.ts.map +0 -1
  735. package/build-types/query-controls/stories/index.d.ts +0 -13
  736. package/build-types/query-controls/stories/index.d.ts.map +0 -1
  737. package/build-types/radio-control/stories/index.d.ts +0 -12
  738. package/build-types/radio-control/stories/index.d.ts.map +0 -1
  739. package/build-types/range-control/stories/index.d.ts +0 -48
  740. package/build-types/range-control/stories/index.d.ts.map +0 -1
  741. package/build-types/resizable-box/stories/index.d.ts +0 -61
  742. package/build-types/resizable-box/stories/index.d.ts.map +0 -1
  743. package/build-types/responsive-wrapper/stories/index.d.ts +0 -22
  744. package/build-types/responsive-wrapper/stories/index.d.ts.map +0 -1
  745. package/build-types/sandbox/stories/index.d.ts +0 -12
  746. package/build-types/sandbox/stories/index.d.ts.map +0 -1
  747. package/build-types/scroll-lock/stories/index.d.ts +0 -9
  748. package/build-types/scroll-lock/stories/index.d.ts.map +0 -1
  749. package/build-types/scrollable/stories/index.d.ts +0 -9
  750. package/build-types/scrollable/stories/index.d.ts.map +0 -1
  751. package/build-types/search-control/stories/index.d.ts +0 -47
  752. package/build-types/search-control/stories/index.d.ts.map +0 -1
  753. package/build-types/select-control/stories/index.d.ts +0 -19
  754. package/build-types/select-control/stories/index.d.ts.map +0 -1
  755. package/build-types/snackbar/stories/index.d.ts +0 -16
  756. package/build-types/snackbar/stories/index.d.ts.map +0 -1
  757. package/build-types/snackbar/stories/list.d.ts +0 -12
  758. package/build-types/snackbar/stories/list.d.ts.map +0 -1
  759. package/build-types/spacer/stories/index.d.ts +0 -12
  760. package/build-types/spacer/stories/index.d.ts.map +0 -1
  761. package/build-types/spinner/stories/index.d.ts +0 -13
  762. package/build-types/spinner/stories/index.d.ts.map +0 -1
  763. package/build-types/surface/stories/index.d.ts +0 -12
  764. package/build-types/surface/stories/index.d.ts.map +0 -1
  765. package/build-types/tab-panel/stories/index.d.ts +0 -16
  766. package/build-types/tab-panel/stories/index.d.ts.map +0 -1
  767. package/build-types/text-control/stories/index.d.ts +0 -13
  768. package/build-types/text-control/stories/index.d.ts.map +0 -1
  769. package/build-types/text-highlight/stories/index.d.ts +0 -12
  770. package/build-types/text-highlight/stories/index.d.ts.map +0 -1
  771. package/build-types/textarea-control/stories/index.d.ts +0 -12
  772. package/build-types/textarea-control/stories/index.d.ts.map +0 -1
  773. package/build-types/theme/stories/index.d.ts +0 -17
  774. package/build-types/theme/stories/index.d.ts.map +0 -1
  775. package/build-types/tip/stories/index.d.ts +0 -12
  776. package/build-types/tip/stories/index.d.ts.map +0 -1
  777. package/build-types/toggle-control/stories/index.d.ts +0 -13
  778. package/build-types/toggle-control/stories/index.d.ts.map +0 -1
  779. package/build-types/toggle-group-control/stories/index.d.ts +0 -27
  780. package/build-types/toggle-group-control/stories/index.d.ts.map +0 -1
  781. package/build-types/toolbar/stories/index.d.ts +0 -14
  782. package/build-types/toolbar/stories/index.d.ts.map +0 -1
  783. package/build-types/tools-panel/stories/index.d.ts +0 -17
  784. package/build-types/tools-panel/stories/index.d.ts.map +0 -1
  785. package/build-types/tree-grid/stories/index.d.ts +0 -13
  786. package/build-types/tree-grid/stories/index.d.ts.map +0 -1
  787. package/build-types/tree-select/stories/index.d.ts +0 -12
  788. package/build-types/tree-select/stories/index.d.ts.map +0 -1
  789. package/build-types/truncate/stories/index.d.ts +0 -13
  790. package/build-types/truncate/stories/index.d.ts.map +0 -1
  791. package/build-types/ui/control-group/component.d.ts +0 -27
  792. package/build-types/ui/control-group/component.d.ts.map +0 -1
  793. package/build-types/ui/control-group/context.d.ts +0 -4
  794. package/build-types/ui/control-group/context.d.ts.map +0 -1
  795. package/build-types/ui/control-group/hook.d.ts +0 -266
  796. package/build-types/ui/control-group/hook.d.ts.map +0 -1
  797. package/build-types/ui/control-group/index.d.ts +0 -4
  798. package/build-types/ui/control-group/index.d.ts.map +0 -1
  799. package/build-types/ui/control-group/styles.d.ts +0 -8
  800. package/build-types/ui/control-group/styles.d.ts.map +0 -1
  801. package/build-types/ui/control-group/types.d.ts +0 -27
  802. package/build-types/ui/control-group/types.d.ts.map +0 -1
  803. package/build-types/ui/control-label/component.d.ts +0 -23
  804. package/build-types/ui/control-label/component.d.ts.map +0 -1
  805. package/build-types/ui/control-label/hook.d.ts +0 -265
  806. package/build-types/ui/control-label/hook.d.ts.map +0 -1
  807. package/build-types/ui/control-label/index.d.ts +0 -3
  808. package/build-types/ui/control-label/index.d.ts.map +0 -1
  809. package/build-types/ui/control-label/styles.d.ts +0 -7
  810. package/build-types/ui/control-label/styles.d.ts.map +0 -1
  811. package/build-types/ui/control-label/types.d.ts +0 -9
  812. package/build-types/ui/control-label/types.d.ts.map +0 -1
  813. package/build-types/ui/form-group/form-group-content.d.ts +0 -7
  814. package/build-types/ui/form-group/form-group-content.d.ts.map +0 -1
  815. package/build-types/ui/form-group/form-group-context.d.ts +0 -11
  816. package/build-types/ui/form-group/form-group-context.d.ts.map +0 -1
  817. package/build-types/ui/form-group/form-group-help.d.ts +0 -18
  818. package/build-types/ui/form-group/form-group-help.d.ts.map +0 -1
  819. package/build-types/ui/form-group/form-group-label.d.ts +0 -8
  820. package/build-types/ui/form-group/form-group-label.d.ts.map +0 -1
  821. package/build-types/ui/form-group/form-group-styles.d.ts +0 -2
  822. package/build-types/ui/form-group/form-group-styles.d.ts.map +0 -1
  823. package/build-types/ui/form-group/form-group.d.ts +0 -53
  824. package/build-types/ui/form-group/form-group.d.ts.map +0 -1
  825. package/build-types/ui/form-group/index.d.ts +0 -4
  826. package/build-types/ui/form-group/index.d.ts.map +0 -1
  827. package/build-types/ui/form-group/types.d.ts +0 -30
  828. package/build-types/ui/form-group/types.d.ts.map +0 -1
  829. package/build-types/ui/form-group/use-form-group.d.ts +0 -593
  830. package/build-types/ui/form-group/use-form-group.d.ts.map +0 -1
  831. package/build-types/ui/index.d.ts +0 -6
  832. package/build-types/ui/index.d.ts.map +0 -1
  833. package/build-types/ui/spinner/component.d.ts +0 -13
  834. package/build-types/ui/spinner/component.d.ts.map +0 -1
  835. package/build-types/ui/spinner/index.d.ts +0 -2
  836. package/build-types/ui/spinner/index.d.ts.map +0 -1
  837. package/build-types/ui/spinner/styles.d.ts +0 -13
  838. package/build-types/ui/spinner/styles.d.ts.map +0 -1
  839. package/build-types/ui/spinner/utils.d.ts +0 -3
  840. package/build-types/ui/spinner/utils.d.ts.map +0 -1
  841. package/build-types/ui/utils/get-high-dpi.d.ts +0 -3
  842. package/build-types/ui/utils/get-high-dpi.d.ts.map +0 -1
  843. package/build-types/unit-control/stories/index.d.ts +0 -33
  844. package/build-types/unit-control/stories/index.d.ts.map +0 -1
  845. package/build-types/utils/browsers.d.ts +0 -11
  846. package/build-types/utils/browsers.d.ts.map +0 -1
  847. package/build-types/utils/events.d.ts +0 -11
  848. package/build-types/utils/events.d.ts.map +0 -1
  849. package/build-types/v-stack/stories/e2e/index.d.ts +0 -9
  850. package/build-types/v-stack/stories/e2e/index.d.ts.map +0 -1
  851. package/build-types/v-stack/stories/index.d.ts +0 -13
  852. package/build-types/v-stack/stories/index.d.ts.map +0 -1
  853. package/build-types/view/stories/index.d.ts +0 -12
  854. package/build-types/view/stories/index.d.ts.map +0 -1
  855. package/build-types/visually-hidden/stories/index.d.ts +0 -14
  856. package/build-types/visually-hidden/stories/index.d.ts.map +0 -1
  857. package/build-types/z-stack/stories/index.d.ts +0 -6
  858. package/build-types/z-stack/stories/index.d.ts.map +0 -1
  859. package/src/popover/limit-shift.ts +0 -205
  860. package/src/ui/utils/get-high-dpi.ts +0 -20
  861. package/src/utils/browsers.js +0 -36
  862. package/src/utils/events.ts +0 -50
  863. package/src/utils/test/events.js +0 -63
  864. package/src/utils/test/values.js +0 -101
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentMeta, ComponentStory } from '@storybook/react';
4
+ import type { Meta, StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
@@ -10,9 +10,11 @@ import InputControl from '..';
10
10
  import { InputControlPrefixWrapper } from '../input-prefix-wrapper';
11
11
  import { InputControlSuffixWrapper } from '../input-suffix-wrapper';
12
12
 
13
- const meta: ComponentMeta< typeof InputControl > = {
13
+ const meta: Meta< typeof InputControl > = {
14
14
  title: 'Components (Experimental)/InputControl',
15
15
  component: InputControl,
16
+ // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
17
+ subcomponents: { InputControlPrefixWrapper, InputControlSuffixWrapper },
16
18
  argTypes: {
17
19
  __unstableInputWidth: { control: { type: 'text' } },
18
20
  __unstableStateReducer: { control: { type: null } },
@@ -24,12 +26,12 @@ const meta: ComponentMeta< typeof InputControl > = {
24
26
  },
25
27
  parameters: {
26
28
  controls: { expanded: true },
27
- docs: { source: { state: 'open' } },
29
+ docs: { canvas: { sourceState: 'shown' } },
28
30
  },
29
31
  };
30
32
  export default meta;
31
33
 
32
- const Template: ComponentStory< typeof InputControl > = ( args ) => (
34
+ const Template: StoryFn< typeof InputControl > = ( args ) => (
33
35
  <InputControl { ...args } />
34
36
  );
35
37
 
@@ -29,7 +29,6 @@ function UnconnectedItem(
29
29
  * `Item` is used in combination with `ItemGroup` to display a list of items
30
30
  * grouped and styled together.
31
31
  *
32
- * @example
33
32
  * ```jsx
34
33
  * import {
35
34
  * __experimentalItemGroup as ItemGroup,
@@ -44,7 +44,6 @@ function UnconnectedItemGroup(
44
44
  /**
45
45
  * `ItemGroup` displays a list of `Item`s grouped and styled together.
46
46
  *
47
- * @example
48
47
  * ```jsx
49
48
  * import {
50
49
  * __experimentalItemGroup as ItemGroup,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentMeta, ComponentStory } from '@storybook/react';
4
+ import type { Meta, StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
@@ -11,8 +11,10 @@ import { Item } from '../item/component';
11
11
 
12
12
  type ItemProps = React.ComponentPropsWithoutRef< typeof Item >;
13
13
 
14
- const meta: ComponentMeta< typeof ItemGroup > = {
14
+ const meta: Meta< typeof ItemGroup > = {
15
15
  component: ItemGroup,
16
+ // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
17
+ subcomponents: { Item },
16
18
  title: 'Components (Experimental)/ItemGroup',
17
19
  argTypes: {
18
20
  as: { control: { type: null } },
@@ -20,7 +22,7 @@ const meta: ComponentMeta< typeof ItemGroup > = {
20
22
  },
21
23
  parameters: {
22
24
  controls: { expanded: true },
23
- docs: { source: { state: 'open' } },
25
+ docs: { canvas: { sourceState: 'shown' } },
24
26
  },
25
27
  };
26
28
  export default meta;
@@ -29,11 +31,11 @@ const mapPropsToItem = ( props: ItemProps, index: number ) => (
29
31
  <Item { ...props } key={ index } />
30
32
  );
31
33
 
32
- const Template: ComponentStory< typeof ItemGroup > = ( props ) => (
34
+ const Template: StoryFn< typeof ItemGroup > = ( props ) => (
33
35
  <ItemGroup { ...props } />
34
36
  );
35
37
 
36
- export const Default: ComponentStory< typeof ItemGroup > = Template.bind( {} );
38
+ export const Default: StoryFn< typeof ItemGroup > = Template.bind( {} );
37
39
  Default.args = {
38
40
  children: (
39
41
  [
@@ -61,8 +63,9 @@ Default.args = {
61
63
  ).map( mapPropsToItem ),
62
64
  };
63
65
 
64
- export const NonClickableItems: ComponentStory< typeof ItemGroup > =
65
- Template.bind( {} );
66
+ export const NonClickableItems: StoryFn< typeof ItemGroup > = Template.bind(
67
+ {}
68
+ );
66
69
  NonClickableItems.args = {
67
70
  children: (
68
71
  [
@@ -78,9 +81,7 @@ NonClickableItems.args = {
78
81
  ).map( mapPropsToItem ),
79
82
  };
80
83
 
81
- export const CustomItemSize: ComponentStory< typeof ItemGroup > = Template.bind(
82
- {}
83
- );
84
+ export const CustomItemSize: StoryFn< typeof ItemGroup > = Template.bind( {} );
84
85
  CustomItemSize.args = {
85
86
  children: (
86
87
  [
@@ -97,9 +98,7 @@ CustomItemSize.args = {
97
98
  ).map( mapPropsToItem ),
98
99
  };
99
100
 
100
- export const WithBorder: ComponentStory< typeof ItemGroup > = Template.bind(
101
- {}
102
- );
101
+ export const WithBorder: StoryFn< typeof ItemGroup > = Template.bind( {} );
103
102
  WithBorder.args = {
104
103
  ...Default.args,
105
104
  isBordered: true,
@@ -1,24 +1,24 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentMeta, ComponentStory } from '@storybook/react';
4
+ import type { Meta, StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
9
  import KeyboardShortcuts from '..';
10
10
 
11
- const meta: ComponentMeta< typeof KeyboardShortcuts > = {
11
+ const meta: Meta< typeof KeyboardShortcuts > = {
12
12
  component: 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;
20
20
 
21
- const Template: ComponentStory< typeof KeyboardShortcuts > = ( props ) => (
21
+ const Template: StoryFn< typeof KeyboardShortcuts > = ( props ) => (
22
22
  <KeyboardShortcuts { ...props } />
23
23
  );
24
24
 
@@ -13,9 +13,9 @@ import MenuItemsChoice from '../../menu-items-choice';
13
13
  /**
14
14
  * External dependencies
15
15
  */
16
- import type { ComponentMeta, ComponentStory } from '@storybook/react';
16
+ import type { Meta, StoryFn } from '@storybook/react';
17
17
 
18
- const meta: ComponentMeta< typeof MenuGroup > = {
18
+ const meta: Meta< typeof MenuGroup > = {
19
19
  title: 'Components/MenuGroup',
20
20
  component: MenuGroup,
21
21
  argTypes: {
@@ -23,12 +23,12 @@ 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;
30
30
 
31
- const Template: ComponentStory< typeof MenuGroup > = ( args ) => {
31
+ const Template: StoryFn< typeof MenuGroup > = ( args ) => {
32
32
  return (
33
33
  <MenuGroup { ...args }>
34
34
  <MenuItem>Menu Item 1</MenuItem>
@@ -37,9 +37,9 @@ const Template: ComponentStory< typeof MenuGroup > = ( args ) => {
37
37
  );
38
38
  };
39
39
 
40
- export const Default: ComponentStory< typeof MenuGroup > = Template.bind( {} );
40
+ export const Default: StoryFn< typeof MenuGroup > = Template.bind( {} );
41
41
 
42
- const MultiGroupsTemplate: ComponentStory< typeof MenuGroup > = ( args ) => {
42
+ const MultiGroupsTemplate: StoryFn< typeof MenuGroup > = ( args ) => {
43
43
  const [ mode, setMode ] = useState( 'visual' );
44
44
  const choices = [
45
45
  {
@@ -70,7 +70,7 @@ Determines where to display the provided `icon`.
70
70
  - Type: `boolean`
71
71
  - Required: No
72
72
 
73
- Whether or not the menu item is currently selected.
73
+ Whether or not the menu item is currently selected. `isSelected` is only taken into account when the `role` prop is either `"menuitemcheckbox"` or `"menuitemradio"`.
74
74
 
75
75
  ### `shortcut`
76
76
 
@@ -18,7 +18,7 @@ import Icon from '../icon';
18
18
  import type { WordPressComponentProps } from '../ui/context';
19
19
  import type { MenuItemProps } from './types';
20
20
 
21
- export function MenuItem(
21
+ function UnforwardedMenuItem(
22
22
  props: WordPressComponentProps< MenuItemProps, 'button', false >,
23
23
  ref: ForwardedRef< HTMLButtonElement >
24
24
  ) {
@@ -97,6 +97,7 @@ export function MenuItem(
97
97
  * <MenuItem
98
98
  * icon={ isActive ? 'yes' : 'no' }
99
99
  * isSelected={ isActive }
100
+ * role="menuitemcheckbox"
100
101
  * onClick={ () => setIsActive( ( state ) => ! state ) }
101
102
  * >
102
103
  * Toggle
@@ -105,4 +106,6 @@ export function MenuItem(
105
106
  * };
106
107
  * ```
107
108
  */
108
- export default forwardRef( MenuItem );
109
+ export const MenuItem = forwardRef( UnforwardedMenuItem );
110
+
111
+ export default MenuItem;
@@ -0,0 +1,80 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { Meta, StoryFn } from '@storybook/react';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { link, more, check } from '@wordpress/icons';
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+ import MenuGroup from '../../menu-group';
15
+ import MenuItem from '..';
16
+ import Shortcut from '../../shortcut';
17
+
18
+ const meta: Meta< typeof MenuItem > = {
19
+ component: MenuItem,
20
+ title: 'Components/MenuItem',
21
+ argTypes: {
22
+ children: { control: { type: null } },
23
+ icon: {
24
+ control: { type: 'select' },
25
+ options: [ 'check', 'link', 'more' ],
26
+ mapping: {
27
+ check,
28
+ link,
29
+ more,
30
+ },
31
+ },
32
+ },
33
+ parameters: {
34
+ controls: {
35
+ expanded: true,
36
+ },
37
+ docs: { canvas: { sourceState: 'shown' } },
38
+ },
39
+ };
40
+ export default meta;
41
+
42
+ const Template: StoryFn< typeof MenuItem > = ( props ) => {
43
+ return (
44
+ <MenuGroup>
45
+ <MenuItem { ...props }>Menu Item 1</MenuItem>
46
+ </MenuGroup>
47
+ );
48
+ };
49
+
50
+ export const Default: StoryFn< typeof MenuItem > = Template.bind( {} );
51
+
52
+ /**
53
+ * When the `role` prop is either `"menuitemcheckbox"` or `"menuitemradio"`, the
54
+ * `isSelected` prop should be used so screen readers can tell which item is currently selected.
55
+ */
56
+ export const IsSelected = Template.bind( {} );
57
+ IsSelected.args = {
58
+ ...Default.args,
59
+ isSelected: true,
60
+ role: 'menuitemcheckbox',
61
+ };
62
+
63
+ export const WithIcon = Template.bind( {} );
64
+ WithIcon.args = {
65
+ ...Default.args,
66
+ icon: link,
67
+ iconPosition: 'left',
68
+ };
69
+
70
+ export const WithInfo = Template.bind( {} );
71
+ WithInfo.args = {
72
+ ...Default.args,
73
+ info: 'Menu Item description',
74
+ };
75
+
76
+ export const WithSuffix = Template.bind( {} );
77
+ WithSuffix.args = {
78
+ ...Default.args,
79
+ suffix: <Shortcut shortcut="Ctrl+M"></Shortcut>,
80
+ };
@@ -8,7 +8,7 @@ import type { ReactNode } from 'react';
8
8
  */
9
9
  import type { ButtonAsButtonProps } from '../button/types';
10
10
 
11
- export type MenuItemProps = ButtonAsButtonProps & {
11
+ export type MenuItemProps = Pick< ButtonAsButtonProps, 'isDestructive' > & {
12
12
  /**
13
13
  * A CSS `class` to give to the container element.
14
14
  */
@@ -33,7 +33,8 @@ export type MenuItemProps = ButtonAsButtonProps & {
33
33
  */
34
34
  iconPosition?: ButtonAsButtonProps[ 'iconPosition' ];
35
35
  /**
36
- * Whether or not the menu item is currently selected.
36
+ * Whether or not the menu item is currently selected, `isSelected` is only taken into
37
+ * account when the `role` prop is either `"menuitemcheckbox"` or `"menuitemradio"`.
37
38
  */
38
39
  isSelected?: boolean;
39
40
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentMeta, ComponentStory } from '@storybook/react';
4
+ import type { Meta, StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -14,7 +14,7 @@ import { useState } from '@wordpress/element';
14
14
  import MenuItemsChoice from '..';
15
15
  import MenuGroup from '../../menu-group';
16
16
 
17
- const meta: ComponentMeta< typeof MenuItemsChoice > = {
17
+ const meta: Meta< typeof MenuItemsChoice > = {
18
18
  component: MenuItemsChoice,
19
19
  title: 'Components/MenuItemsChoice',
20
20
  argTypes: {
@@ -26,12 +26,12 @@ 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;
33
33
 
34
- const Template: ComponentStory< typeof MenuItemsChoice > = ( {
34
+ const Template: StoryFn< typeof MenuItemsChoice > = ( {
35
35
  onHover,
36
36
  onSelect,
37
37
  choices,
@@ -53,9 +53,7 @@ const Template: ComponentStory< typeof MenuItemsChoice > = ( {
53
53
  );
54
54
  };
55
55
 
56
- export const Default: ComponentStory< typeof MenuItemsChoice > = Template.bind(
57
- {}
58
- );
56
+ export const Default: StoryFn< typeof MenuItemsChoice > = Template.bind( {} );
59
57
 
60
58
  Default.args = {
61
59
  choices: [
@@ -23,7 +23,7 @@ function LinkSettingsNavigation( props ) {
23
23
  isVisible={ props.isVisible }
24
24
  onClose={ props.onClose }
25
25
  onDismiss={ props.onDismiss }
26
- testID={ props.testID }
26
+ testID="link-settings-navigation"
27
27
  hideHeader
28
28
  hasNavigation
29
29
  >
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentStory, ComponentMeta } from '@storybook/react';
4
+ import type { StoryFn, Meta } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -17,7 +17,7 @@ import InputControl from '../../input-control';
17
17
  import Modal from '../';
18
18
  import type { ModalProps } from '../types';
19
19
 
20
- const meta: ComponentMeta< typeof Modal > = {
20
+ const meta: Meta< typeof Modal > = {
21
21
  component: Modal,
22
22
  title: 'Components/Modal',
23
23
  argTypes: {
@@ -46,10 +46,7 @@ const meta: ComponentMeta< typeof Modal > = {
46
46
  };
47
47
  export default meta;
48
48
 
49
- const Template: ComponentStory< typeof Modal > = ( {
50
- onRequestClose,
51
- ...args
52
- } ) => {
49
+ const Template: StoryFn< typeof Modal > = ( { onRequestClose, ...args } ) => {
53
50
  const [ isOpen, setOpen ] = useState( false );
54
51
  const openModal = () => setOpen( true );
55
52
  const closeModal: ModalProps[ 'onRequestClose' ] = ( event ) => {
@@ -91,7 +88,7 @@ const Template: ComponentStory< typeof Modal > = ( {
91
88
  );
92
89
  };
93
90
 
94
- export const Default: ComponentStory< typeof Modal > = Template.bind( {} );
91
+ export const Default: StoryFn< typeof Modal > = Template.bind( {} );
95
92
  Default.args = {
96
93
  title: 'Title',
97
94
  };
@@ -114,9 +111,7 @@ const LikeButton = () => {
114
111
  );
115
112
  };
116
113
 
117
- export const WithHeaderActions: ComponentStory< typeof Modal > = Template.bind(
118
- {}
119
- );
114
+ export const WithHeaderActions: StoryFn< typeof Modal > = Template.bind( {} );
120
115
  WithHeaderActions.args = {
121
116
  ...Default.args,
122
117
  headerActions: <LikeButton />,
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentMeta, ComponentStory } from '@storybook/react';
4
+ import type { Meta, StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
9
  import { NavigableMenu } from '..';
10
10
 
11
- const meta: ComponentMeta< typeof NavigableMenu > = {
11
+ const meta: Meta< typeof NavigableMenu > = {
12
12
  title: 'Components/NavigableMenu',
13
13
  component: NavigableMenu,
14
14
  argTypes: {
@@ -19,12 +19,12 @@ 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;
26
26
 
27
- export const Default: ComponentStory< typeof NavigableMenu > = ( args ) => {
27
+ export const Default: StoryFn< typeof NavigableMenu > = ( args ) => {
28
28
  return (
29
29
  <>
30
30
  <button>Before navigable menu</button>
@@ -1,14 +1,14 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentMeta, ComponentStory } from '@storybook/react';
4
+ import type { Meta, StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
9
  import { TabbableContainer } from '..';
10
10
 
11
- const meta: ComponentMeta< typeof TabbableContainer > = {
11
+ const meta: Meta< typeof TabbableContainer > = {
12
12
  title: 'Components/TabbableContainer',
13
13
  component: TabbableContainer,
14
14
  argTypes: {
@@ -19,12 +19,12 @@ 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;
26
26
 
27
- export const Default: ComponentStory< typeof TabbableContainer > = ( args ) => {
27
+ export const Default: StoryFn< typeof TabbableContainer > = ( args ) => {
28
28
  return (
29
29
  <>
30
30
  <button>Before tabbable container</button>
@@ -28,7 +28,6 @@ const noop = () => {};
28
28
  /**
29
29
  * Render a navigation list with optional groupings and hierarchy.
30
30
  *
31
- * @example
32
31
  * ```jsx
33
32
  * import {
34
33
  * __experimentalNavigation as Navigation,
@@ -1,12 +1,16 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentMeta } from '@storybook/react';
4
+ import type { Meta } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
9
  import { Navigation } from '..';
10
+ import { NavigationBackButton } from '../back-button';
11
+ import { NavigationGroup } from '../group';
12
+ import { NavigationItem } from '../item';
13
+ import { NavigationMenu } from '../menu';
10
14
  import { DefaultStory } from './utils/default';
11
15
  import { GroupStory } from './utils/group';
12
16
  import { ControlledStateStory } from './utils/controlled-state';
@@ -15,9 +19,19 @@ import { MoreExamplesStory } from './utils/more-examples';
15
19
  import { HideIfEmptyStory } from './utils/hide-if-empty';
16
20
  import './style.css';
17
21
 
18
- const meta: ComponentMeta< typeof Navigation > = {
22
+ const meta: Meta< typeof Navigation > = {
19
23
  title: 'Components (Experimental)/Navigation',
20
24
  component: Navigation,
25
+ subcomponents: {
26
+ // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
27
+ NavigationBackButton,
28
+ // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
29
+ NavigationGroup,
30
+ // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
31
+ NavigationItem,
32
+ // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
33
+ NavigationMenu,
34
+ },
21
35
  argTypes: {
22
36
  activeItem: { control: { type: null } },
23
37
  activeMenu: { control: { type: null } },
@@ -29,7 +43,7 @@ const meta: ComponentMeta< typeof Navigation > = {
29
43
  controls: {
30
44
  expanded: true,
31
45
  },
32
- docs: { source: { state: 'open' } },
46
+ docs: { canvas: { sourceState: 'shown' } },
33
47
  },
34
48
  };
35
49
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentStory } from '@storybook/react';
4
+ import type { StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -16,7 +16,7 @@ import { Navigation } from '../..';
16
16
  import { NavigationItem } from '../../item';
17
17
  import { NavigationMenu } from '../../menu';
18
18
 
19
- export const ControlledStateStory: ComponentStory< typeof Navigation > = ( {
19
+ export const ControlledStateStory: StoryFn< typeof Navigation > = ( {
20
20
  className,
21
21
  ...props
22
22
  } ) => {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentStory } from '@storybook/react';
4
+ import type { StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -15,7 +15,7 @@ import { Navigation } from '../..';
15
15
  import { NavigationItem } from '../../item';
16
16
  import { NavigationMenu } from '../../menu';
17
17
 
18
- export const DefaultStory: ComponentStory< typeof Navigation > = ( {
18
+ export const DefaultStory: StoryFn< typeof Navigation > = ( {
19
19
  className,
20
20
  ...props
21
21
  } ) => {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentStory } from '@storybook/react';
4
+ import type { StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -16,7 +16,7 @@ import { NavigationItem } from '../../item';
16
16
  import { NavigationMenu } from '../../menu';
17
17
  import { NavigationGroup } from '../../group';
18
18
 
19
- export const GroupStory: ComponentStory< typeof Navigation > = ( {
19
+ export const GroupStory: StoryFn< typeof Navigation > = ( {
20
20
  className,
21
21
  ...props
22
22
  } ) => {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentStory } from '@storybook/react';
4
+ import type { StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * Internal dependencies
@@ -10,7 +10,7 @@ import { Navigation } from '../..';
10
10
  import { NavigationItem } from '../../item';
11
11
  import { NavigationMenu } from '../../menu';
12
12
 
13
- export const HideIfEmptyStory: ComponentStory< typeof Navigation > = ( {
13
+ export const HideIfEmptyStory: StoryFn< typeof Navigation > = ( {
14
14
  className,
15
15
  ...props
16
16
  } ) => {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentStory } from '@storybook/react';
4
+ import type { StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -17,7 +17,7 @@ import { NavigationGroup } from '../../group';
17
17
  import { NavigationItem } from '../../item';
18
18
  import { NavigationMenu } from '../../menu';
19
19
 
20
- export const MoreExamplesStory: ComponentStory< typeof Navigation > = ( {
20
+ export const MoreExamplesStory: StoryFn< typeof Navigation > = ( {
21
21
  className,
22
22
  ...props
23
23
  } ) => {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { ComponentStory } from '@storybook/react';
4
+ import type { StoryFn } from '@storybook/react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -29,7 +29,7 @@ const searchItems = [
29
29
  { item: 'waldo', title: 'Waldo' },
30
30
  ];
31
31
 
32
- export const SearchStory: ComponentStory< typeof Navigation > = ( {
32
+ export const SearchStory: StoryFn< typeof Navigation > = ( {
33
33
  className,
34
34
  ...props
35
35
  } ) => {