@wordpress/components 23.0.0 → 23.2.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 (457) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/CONTRIBUTING.md +0 -21
  3. package/LICENSE.md +1 -1
  4. package/build/autocomplete/index.js +1 -3
  5. package/build/autocomplete/index.js.map +1 -1
  6. package/build/border-box-control/border-box-control/component.js +0 -3
  7. package/build/border-box-control/border-box-control/component.js.map +1 -1
  8. package/build/border-box-control/border-box-control/hook.js +0 -2
  9. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  10. package/build/border-box-control/border-box-control-split-controls/component.js +0 -2
  11. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  12. package/build/border-box-control/border-box-control-split-controls/hook.js +0 -2
  13. package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  14. package/build/border-control/border-control/component.js +0 -2
  15. package/build/border-control/border-control/component.js.map +1 -1
  16. package/build/border-control/border-control/hook.js +0 -2
  17. package/build/border-control/border-control/hook.js.map +1 -1
  18. package/build/border-control/border-control-dropdown/component.js +6 -11
  19. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  20. package/build/border-control/border-control-dropdown/hook.js +0 -2
  21. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  22. package/build/color-palette/index.js +5 -8
  23. package/build/color-palette/index.js.map +1 -1
  24. package/build/color-picker/component.js +1 -0
  25. package/build/color-picker/component.js.map +1 -1
  26. package/build/color-picker/styles.js +8 -10
  27. package/build/color-picker/styles.js.map +1 -1
  28. package/build/combobox-control/index.js +5 -1
  29. package/build/combobox-control/index.js.map +1 -1
  30. package/build/dimension-control/index.js.map +1 -1
  31. package/build/dropdown/index.js +45 -10
  32. package/build/dropdown/index.js.map +1 -1
  33. package/build/focal-point-picker/utils.js +1 -1
  34. package/build/focal-point-picker/utils.js.map +1 -1
  35. package/build/gradient-picker/index.js +1 -2
  36. package/build/gradient-picker/index.js.map +1 -1
  37. package/build/higher-order/navigate-regions/index.js +4 -3
  38. package/build/higher-order/navigate-regions/index.js.map +1 -1
  39. package/build/index.js +7 -25
  40. package/build/index.js.map +1 -1
  41. package/build/index.native.js +8 -18
  42. package/build/index.native.js.map +1 -1
  43. package/build/item-group/item/component.js +27 -3
  44. package/build/item-group/item/component.js.map +1 -1
  45. package/build/item-group/item-group/component.js +26 -3
  46. package/build/item-group/item-group/component.js.map +1 -1
  47. package/build/item-group/styles.js +14 -14
  48. package/build/item-group/styles.js.map +1 -1
  49. package/build/mobile/bottom-sheet/picker-cell.native.js +1 -9
  50. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  51. package/build/mobile/global-styles-context/utils.native.js +30 -12
  52. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  53. package/build/panel/row.js +5 -3
  54. package/build/panel/row.js.map +1 -1
  55. package/build/query-controls/index.js +1 -0
  56. package/build/query-controls/index.js.map +1 -1
  57. package/build/resizable-box/index.js +5 -4
  58. package/build/resizable-box/index.js.map +1 -1
  59. package/build/responsive-wrapper/index.js +18 -1
  60. package/build/responsive-wrapper/index.js.map +1 -1
  61. package/build/responsive-wrapper/types.js +6 -0
  62. package/build/responsive-wrapper/types.js.map +1 -0
  63. package/build/sandbox/index.js +35 -24
  64. package/build/sandbox/index.js.map +1 -1
  65. package/build/sandbox/types.js +6 -0
  66. package/build/sandbox/types.js.map +1 -0
  67. package/build/tab-panel/index.js +15 -9
  68. package/build/tab-panel/index.js.map +1 -1
  69. package/build/toolbar/index.js +42 -60
  70. package/build/toolbar/index.js.map +1 -1
  71. package/build/toolbar/toolbar/index.js +74 -0
  72. package/build/toolbar/toolbar/index.js.map +1 -0
  73. package/build/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
  74. package/build/toolbar/toolbar/toolbar-container.js.map +1 -0
  75. package/build/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
  76. package/build/toolbar/toolbar/toolbar-container.native.js.map +1 -0
  77. package/build/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
  78. package/build/toolbar/toolbar-button/index.js.map +1 -0
  79. package/build/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
  80. package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -0
  81. package/build/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
  82. package/build/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -0
  83. package/build/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
  84. package/build/toolbar/toolbar-context/index.js.map +1 -0
  85. package/build/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
  86. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -0
  87. package/build/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
  88. package/build/toolbar/toolbar-group/index.js.map +1 -0
  89. package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
  90. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -0
  91. package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
  92. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -0
  93. package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
  94. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -0
  95. package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
  96. package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -0
  97. package/build/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
  98. package/build/toolbar/toolbar-item/index.js.map +1 -0
  99. package/build/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
  100. package/build/toolbar/toolbar-item/index.native.js.map +1 -0
  101. package/build/tree-grid/index.js +3 -3
  102. package/build/tree-grid/index.js.map +1 -1
  103. package/build-module/autocomplete/index.js +1 -2
  104. package/build-module/autocomplete/index.js.map +1 -1
  105. package/build-module/border-box-control/border-box-control/component.js +0 -3
  106. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  107. package/build-module/border-box-control/border-box-control/hook.js +0 -2
  108. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  109. package/build-module/border-box-control/border-box-control-split-controls/component.js +0 -2
  110. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  111. package/build-module/border-box-control/border-box-control-split-controls/hook.js +0 -2
  112. package/build-module/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
  113. package/build-module/border-control/border-control/component.js +0 -2
  114. package/build-module/border-control/border-control/component.js.map +1 -1
  115. package/build-module/border-control/border-control/hook.js +0 -2
  116. package/build-module/border-control/border-control/hook.js.map +1 -1
  117. package/build-module/border-control/border-control-dropdown/component.js +6 -11
  118. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  119. package/build-module/border-control/border-control-dropdown/hook.js +0 -2
  120. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  121. package/build-module/color-palette/index.js +5 -8
  122. package/build-module/color-palette/index.js.map +1 -1
  123. package/build-module/color-picker/component.js +1 -0
  124. package/build-module/color-picker/component.js.map +1 -1
  125. package/build-module/color-picker/styles.js +8 -9
  126. package/build-module/color-picker/styles.js.map +1 -1
  127. package/build-module/combobox-control/index.js +5 -1
  128. package/build-module/combobox-control/index.js.map +1 -1
  129. package/build-module/dimension-control/index.js +1 -2
  130. package/build-module/dimension-control/index.js.map +1 -1
  131. package/build-module/dropdown/index.js +44 -10
  132. package/build-module/dropdown/index.js.map +1 -1
  133. package/build-module/focal-point-picker/utils.js +1 -1
  134. package/build-module/focal-point-picker/utils.js.map +1 -1
  135. package/build-module/gradient-picker/index.js +1 -2
  136. package/build-module/gradient-picker/index.js.map +1 -1
  137. package/build-module/higher-order/navigate-regions/index.js +4 -3
  138. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  139. package/build-module/index.js +1 -7
  140. package/build-module/index.js.map +1 -1
  141. package/build-module/index.native.js +1 -6
  142. package/build-module/index.native.js.map +1 -1
  143. package/build-module/item-group/item/component.js +26 -2
  144. package/build-module/item-group/item/component.js.map +1 -1
  145. package/build-module/item-group/item-group/component.js +25 -2
  146. package/build-module/item-group/item-group/component.js.map +1 -1
  147. package/build-module/item-group/styles.js +14 -14
  148. package/build-module/item-group/styles.js.map +1 -1
  149. package/build-module/mobile/bottom-sheet/picker-cell.native.js +1 -8
  150. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  151. package/build-module/mobile/global-styles-context/utils.native.js +31 -13
  152. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  153. package/build-module/panel/row.js +5 -3
  154. package/build-module/panel/row.js.map +1 -1
  155. package/build-module/query-controls/index.js +1 -0
  156. package/build-module/query-controls/index.js.map +1 -1
  157. package/build-module/resizable-box/index.js +3 -2
  158. package/build-module/resizable-box/index.js.map +1 -1
  159. package/build-module/responsive-wrapper/index.js +20 -1
  160. package/build-module/responsive-wrapper/index.js.map +1 -1
  161. package/build-module/responsive-wrapper/types.js +2 -0
  162. package/build-module/responsive-wrapper/types.js.map +1 -0
  163. package/build-module/sandbox/index.js +37 -23
  164. package/build-module/sandbox/index.js.map +1 -1
  165. package/build-module/sandbox/types.js +2 -0
  166. package/build-module/sandbox/types.js.map +1 -0
  167. package/build-module/tab-panel/index.js +15 -8
  168. package/build-module/tab-panel/index.js.map +1 -1
  169. package/build-module/toolbar/index.js +6 -58
  170. package/build-module/toolbar/index.js.map +1 -1
  171. package/build-module/toolbar/toolbar/index.js +59 -0
  172. package/build-module/toolbar/toolbar/index.js.map +1 -0
  173. package/build-module/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
  174. package/{build → build-module/toolbar}/toolbar/toolbar-container.js.map +1 -1
  175. package/build-module/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
  176. package/build-module/toolbar/toolbar/toolbar-container.native.js.map +1 -0
  177. package/build-module/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
  178. package/build-module/toolbar/toolbar-button/index.js.map +1 -0
  179. package/build-module/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
  180. package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -0
  181. package/build-module/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
  182. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -0
  183. package/build-module/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
  184. package/build-module/toolbar/toolbar-context/index.js.map +1 -0
  185. package/build-module/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
  186. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -0
  187. package/build-module/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
  188. package/build-module/toolbar/toolbar-group/index.js.map +1 -0
  189. package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
  190. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -0
  191. package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
  192. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -0
  193. package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
  194. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -0
  195. package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
  196. package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -0
  197. package/build-module/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
  198. package/build-module/toolbar/toolbar-item/index.js.map +1 -0
  199. package/build-module/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
  200. package/build-module/toolbar/toolbar-item/index.native.js.map +1 -0
  201. package/build-module/tree-grid/index.js +3 -3
  202. package/build-module/tree-grid/index.js.map +1 -1
  203. package/build-style/style-rtl.css +19 -32
  204. package/build-style/style.css +19 -32
  205. package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
  206. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  207. package/build-types/border-box-control/border-box-control/hook.d.ts +0 -1
  208. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  209. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
  210. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  211. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +0 -1
  212. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  213. package/build-types/border-box-control/stories/index.d.ts +1 -1
  214. package/build-types/border-control/border-control/component.d.ts +1 -1
  215. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  216. package/build-types/border-control/border-control/hook.d.ts +0 -1
  217. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  218. package/build-types/border-control/border-control-dropdown/component.d.ts +1 -1
  219. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  220. package/build-types/border-control/border-control-dropdown/hook.d.ts +0 -1
  221. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  222. package/build-types/border-control/stories/index.d.ts +6 -6
  223. package/build-types/border-control/stories/index.d.ts.map +1 -1
  224. package/build-types/border-control/types.d.ts +1 -1
  225. package/build-types/border-control/types.d.ts.map +1 -1
  226. package/build-types/color-palette/index.d.ts +2 -3
  227. package/build-types/color-palette/index.d.ts.map +1 -1
  228. package/build-types/color-palette/stories/index.d.ts +2 -9
  229. package/build-types/color-palette/stories/index.d.ts.map +1 -1
  230. package/build-types/color-palette/types.d.ts +3 -16
  231. package/build-types/color-palette/types.d.ts.map +1 -1
  232. package/build-types/color-picker/component.d.ts.map +1 -1
  233. package/build-types/color-picker/styles.d.ts.map +1 -1
  234. package/build-types/dashicon/types.d.ts +0 -4
  235. package/build-types/dashicon/types.d.ts.map +1 -1
  236. package/build-types/disabled/stories/index.d.ts.map +1 -1
  237. package/build-types/dropdown/index.d.ts +29 -1
  238. package/build-types/dropdown/index.d.ts.map +1 -1
  239. package/build-types/dropdown/stories/index.d.ts +23 -0
  240. package/build-types/dropdown/stories/index.d.ts.map +1 -0
  241. package/build-types/dropdown/test/index.d.ts +2 -0
  242. package/build-types/dropdown/test/index.d.ts.map +1 -0
  243. package/build-types/dropdown/types.d.ts +101 -0
  244. package/build-types/dropdown/types.d.ts.map +1 -1
  245. package/build-types/focal-point-picker/utils.d.ts.map +1 -1
  246. package/build-types/icon/stories/index.d.ts +22 -0
  247. package/build-types/icon/stories/index.d.ts.map +1 -0
  248. package/build-types/item-group/item/component.d.ts +24 -2
  249. package/build-types/item-group/item/component.d.ts.map +1 -1
  250. package/build-types/item-group/item-group/component.d.ts +23 -2
  251. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  252. package/build-types/item-group/stories/index.d.ts +15 -0
  253. package/build-types/item-group/stories/index.d.ts.map +1 -0
  254. package/build-types/item-group/styles.d.ts.map +1 -1
  255. package/build-types/radio-context/index.d.ts +6 -0
  256. package/build-types/radio-context/index.d.ts.map +1 -0
  257. package/build-types/resizable-box/index.d.ts +6 -7
  258. package/build-types/resizable-box/index.d.ts.map +1 -1
  259. package/build-types/resizable-box/stories/index.d.ts +61 -0
  260. package/build-types/resizable-box/stories/index.d.ts.map +1 -0
  261. package/build-types/responsive-wrapper/index.d.ts +24 -0
  262. package/build-types/responsive-wrapper/index.d.ts.map +1 -0
  263. package/build-types/responsive-wrapper/stories/index.d.ts +12 -0
  264. package/build-types/responsive-wrapper/stories/index.d.ts.map +1 -0
  265. package/build-types/responsive-wrapper/types.d.ts +22 -0
  266. package/build-types/responsive-wrapper/types.d.ts.map +1 -0
  267. package/build-types/sandbox/index.d.ts +19 -0
  268. package/build-types/sandbox/index.d.ts.map +1 -0
  269. package/build-types/sandbox/stories/index.d.ts +12 -0
  270. package/build-types/sandbox/stories/index.d.ts.map +1 -0
  271. package/build-types/sandbox/test/index.d.ts +2 -0
  272. package/build-types/sandbox/test/index.d.ts.map +1 -0
  273. package/build-types/sandbox/types.d.ts +36 -0
  274. package/build-types/sandbox/types.d.ts.map +1 -0
  275. package/build-types/tab-panel/index.d.ts.map +1 -1
  276. package/build-types/tab-panel/stories/index.d.ts +1 -0
  277. package/build-types/tab-panel/stories/index.d.ts.map +1 -1
  278. package/build-types/tab-panel/types.d.ts +10 -4
  279. package/build-types/tab-panel/types.d.ts.map +1 -1
  280. package/package.json +17 -17
  281. package/src/autocomplete/index.js +1 -3
  282. package/src/autocomplete/test/index.js +2 -0
  283. package/src/base-control/test/index.tsx +1 -0
  284. package/src/border-box-control/border-box-control/component.tsx +0 -7
  285. package/src/border-box-control/border-box-control/hook.ts +0 -2
  286. package/src/border-box-control/border-box-control-split-controls/component.tsx +0 -2
  287. package/src/border-box-control/border-box-control-split-controls/hook.ts +0 -2
  288. package/src/border-box-control/test/index.js +2 -0
  289. package/src/border-control/border-control/component.tsx +0 -4
  290. package/src/border-control/border-control/hook.ts +0 -2
  291. package/src/border-control/border-control-dropdown/component.tsx +11 -17
  292. package/src/border-control/border-control-dropdown/hook.ts +0 -2
  293. package/src/border-control/stories/index.tsx +0 -1
  294. package/src/border-control/test/index.js +70 -67
  295. package/src/border-control/types.ts +1 -4
  296. package/src/box-control/test/index.js +2 -0
  297. package/src/checkbox-control/test/index.tsx +2 -0
  298. package/src/color-palette/index.tsx +12 -12
  299. package/src/color-palette/stories/index.tsx +0 -13
  300. package/src/color-palette/test/index.tsx +2 -0
  301. package/src/color-palette/types.ts +3 -17
  302. package/src/color-picker/component.tsx +1 -0
  303. package/src/color-picker/stories/index.js +20 -60
  304. package/src/color-picker/styles.ts +0 -5
  305. package/src/color-picker/test/index.js +2 -0
  306. package/src/combobox-control/index.js +9 -1
  307. package/src/combobox-control/test/index.js +2 -0
  308. package/src/confirm-dialog/test/index.js +2 -0
  309. package/src/dashicon/types.ts +0 -6
  310. package/src/date-time/date/test/index.tsx +2 -0
  311. package/src/date-time/time/test/index.tsx +2 -0
  312. package/src/dimension-control/index.js +2 -3
  313. package/src/dimension-control/test/index.test.js +2 -0
  314. package/src/disabled/stories/index.tsx +6 -2
  315. package/src/disabled/test/index.tsx +2 -0
  316. package/src/dropdown/README.md +41 -46
  317. package/src/dropdown/{index.js → index.tsx} +57 -13
  318. package/src/dropdown/stories/{index.js → index.tsx} +21 -8
  319. package/src/dropdown/test/{index.js → index.tsx} +9 -9
  320. package/src/dropdown/types.ts +107 -0
  321. package/src/dropdown-menu/README.md +2 -3
  322. package/src/dropdown-menu/test/index.js +2 -0
  323. package/src/external-link/test/index.tsx +2 -0
  324. package/src/focal-point-picker/stories/index.tsx +1 -1
  325. package/src/focal-point-picker/test/index.js +2 -0
  326. package/src/focal-point-picker/utils.ts +4 -1
  327. package/src/font-size-picker/test/index.tsx +2 -0
  328. package/src/form-file-upload/test/index.tsx +2 -0
  329. package/src/form-toggle/test/index.tsx +2 -0
  330. package/src/form-token-field/test/index.tsx +3 -0
  331. package/src/gradient-picker/index.js +1 -2
  332. package/src/gradient-picker/stories/index.js +0 -1
  333. package/src/guide/stories/index.js +14 -41
  334. package/src/guide/test/index.js +2 -0
  335. package/src/higher-order/navigate-regions/index.js +5 -2
  336. package/src/higher-order/navigate-regions/style.scss +13 -39
  337. package/src/higher-order/with-filters/test/index.js +70 -74
  338. package/src/higher-order/with-focus-outside/test/index.js +2 -0
  339. package/src/higher-order/with-focus-return/test/index.js +2 -0
  340. package/src/higher-order/with-notices/test/index.js +1 -0
  341. package/src/icon/stories/index.tsx +103 -0
  342. package/src/index.js +8 -7
  343. package/src/index.native.js +8 -6
  344. package/src/input-control/test/index.js +3 -0
  345. package/src/isolated-event-container/test/index.js +2 -0
  346. package/src/item-group/item/component.tsx +26 -2
  347. package/src/item-group/item-group/component.tsx +25 -2
  348. package/src/item-group/stories/index.tsx +103 -0
  349. package/src/item-group/styles.ts +1 -0
  350. package/src/item-group/test/__snapshots__/index.js.snap +11 -10
  351. package/src/mobile/bottom-sheet/picker-cell.native.js +1 -6
  352. package/src/mobile/global-styles-context/utils.native.js +17 -16
  353. package/src/modal/test/index.tsx +1 -3
  354. package/src/navigable-container/test/navigable-menu.js +2 -0
  355. package/src/navigable-container/test/tababble-container.js +2 -0
  356. package/src/navigation/test/index.js +2 -0
  357. package/src/navigator/test/index.tsx +2 -0
  358. package/src/notice/stories/index.js +30 -58
  359. package/src/notice/test/index.js +8 -3
  360. package/src/number-control/test/index.tsx +2 -0
  361. package/src/panel/row.js +3 -3
  362. package/src/panel/stories/index.js +62 -80
  363. package/src/panel/test/__snapshots__/body.js.snap +9 -0
  364. package/src/panel/test/body.js +71 -62
  365. package/src/placeholder/style.scss +1 -1
  366. package/src/placeholder/test/index.tsx +3 -0
  367. package/src/query-controls/index.js +1 -0
  368. package/src/resizable-box/README.md +2 -2
  369. package/src/resizable-box/index.tsx +7 -6
  370. package/src/resizable-box/stories/index.tsx +92 -0
  371. package/src/responsive-wrapper/README.md +29 -0
  372. package/src/responsive-wrapper/{index.js → index.tsx} +23 -2
  373. package/src/responsive-wrapper/stories/index.tsx +38 -0
  374. package/src/responsive-wrapper/types.ts +20 -0
  375. package/src/sandbox/README.md +45 -2
  376. package/src/sandbox/{index.js → index.tsx} +47 -24
  377. package/src/sandbox/stories/index.tsx +32 -0
  378. package/src/sandbox/test/{index.js → index.tsx} +9 -4
  379. package/src/sandbox/types.ts +34 -0
  380. package/src/select-control/test/select-control.tsx +2 -0
  381. package/src/slot-fill/stories/index.js +12 -17
  382. package/src/style.scss +3 -3
  383. package/src/tab-panel/README.md +1 -0
  384. package/src/tab-panel/index.tsx +20 -7
  385. package/src/tab-panel/stories/index.tsx +20 -0
  386. package/src/tab-panel/test/index.tsx +91 -0
  387. package/src/tab-panel/types.ts +10 -4
  388. package/src/text-highlight/test/index.tsx +1 -0
  389. package/src/toggle-group-control/test/index.tsx +2 -0
  390. package/src/toolbar/index.js +6 -52
  391. package/src/toolbar/stories/index.js +2 -9
  392. package/src/{toolbar-button/stories/index.js → toolbar/stories/toolbar-button.js} +1 -2
  393. package/src/{toolbar-group/stories/index.js → toolbar/stories/toolbar-group.js} +1 -1
  394. package/src/toolbar/test/index.js +1 -2
  395. package/src/{toolbar-group/test/index.js → toolbar/test/toolbar-group.js} +3 -1
  396. package/src/toolbar/{README.md → toolbar/README.md} +0 -0
  397. package/src/toolbar/toolbar/index.js +52 -0
  398. package/src/toolbar/{style.native.scss → toolbar/style.native.scss} +0 -0
  399. package/src/toolbar/{style.scss → toolbar/style.scss} +1 -1
  400. package/src/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
  401. package/src/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
  402. package/src/{toolbar-button → toolbar/toolbar-button}/README.md +0 -0
  403. package/src/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
  404. package/src/{toolbar-button → toolbar/toolbar-button}/style.scss +0 -0
  405. package/src/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
  406. package/src/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
  407. package/src/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
  408. package/src/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/README.md +0 -0
  409. package/src/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
  410. package/src/{toolbar-group → toolbar/toolbar-group}/README.md +0 -0
  411. package/src/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
  412. package/src/{toolbar-group → toolbar/toolbar-group}/style.native.scss +0 -0
  413. package/src/{toolbar-group → toolbar/toolbar-group}/style.scss +0 -0
  414. package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
  415. package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
  416. package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
  417. package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
  418. package/src/{toolbar-item → toolbar/toolbar-item}/README.md +0 -0
  419. package/src/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
  420. package/src/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
  421. package/src/tooltip/stories/index.js +68 -78
  422. package/src/tooltip/test/index.js +2 -0
  423. package/src/tree-grid/index.js +2 -4
  424. package/src/unit-control/test/index.tsx +3 -0
  425. package/src/utils/hooks/test/use-latest-ref.js +2 -0
  426. package/tsconfig.json +0 -7
  427. package/tsconfig.tsbuildinfo +1 -1
  428. package/build/toolbar/toolbar-container.native.js.map +0 -1
  429. package/build/toolbar-button/index.js.map +0 -1
  430. package/build/toolbar-button/toolbar-button-container.js.map +0 -1
  431. package/build/toolbar-button/toolbar-button-container.native.js.map +0 -1
  432. package/build/toolbar-context/index.js.map +0 -1
  433. package/build/toolbar-dropdown-menu/index.js.map +0 -1
  434. package/build/toolbar-group/index.js.map +0 -1
  435. package/build/toolbar-group/toolbar-group-collapsed.js.map +0 -1
  436. package/build/toolbar-group/toolbar-group-collapsed.native.js.map +0 -1
  437. package/build/toolbar-group/toolbar-group-container.js.map +0 -1
  438. package/build/toolbar-group/toolbar-group-container.native.js.map +0 -1
  439. package/build/toolbar-item/index.js.map +0 -1
  440. package/build/toolbar-item/index.native.js.map +0 -1
  441. package/build-module/toolbar/toolbar-container.js.map +0 -1
  442. package/build-module/toolbar/toolbar-container.native.js.map +0 -1
  443. package/build-module/toolbar-button/index.js.map +0 -1
  444. package/build-module/toolbar-button/toolbar-button-container.js.map +0 -1
  445. package/build-module/toolbar-button/toolbar-button-container.native.js.map +0 -1
  446. package/build-module/toolbar-context/index.js.map +0 -1
  447. package/build-module/toolbar-dropdown-menu/index.js.map +0 -1
  448. package/build-module/toolbar-group/index.js.map +0 -1
  449. package/build-module/toolbar-group/toolbar-group-collapsed.js.map +0 -1
  450. package/build-module/toolbar-group/toolbar-group-collapsed.native.js.map +0 -1
  451. package/build-module/toolbar-group/toolbar-group-container.js.map +0 -1
  452. package/build-module/toolbar-group/toolbar-group-container.native.js.map +0 -1
  453. package/build-module/toolbar-item/index.js.map +0 -1
  454. package/build-module/toolbar-item/index.native.js.map +0 -1
  455. package/src/icon/stories/index.js +0 -128
  456. package/src/item-group/stories/index.js +0 -270
  457. package/src/resizable-box/stories/index.js +0 -97
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar/index.js"],"names":["classnames","forwardRef","deprecated","ToolbarGroup","ToolbarContainer","Toolbar","ref","className","label","props","since","alternative","link","finalClassName"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,gBAAP,MAA6B,qBAA7B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,OAAT,OAAkDC,GAAlD,EAAwD;AAAA,MAAtC;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,KAAb;AAAoB,OAAGC;AAAvB,GAAsC;;AACvD,MAAK,CAAED,KAAP,EAAe;AACdN,IAAAA,UAAU,CAAE,kCAAF,EAAsC;AAC/CQ,MAAAA,KAAK,EAAE,KADwC;AAE/CC,MAAAA,WAAW,EAAE,wBAFkC;AAG/CC,MAAAA,IAAI,EAAE;AAHyC,KAAtC,CAAV;AAKA,WAAO,cAAC,YAAD,eAAmBH,KAAnB;AAA2B,MAAA,SAAS,EAAGF;AAAvC,OAAP;AACA,GARsD,CASvD;;;AACA,QAAMM,cAAc,GAAGb,UAAU,CAChC,+BADgC,EAEhCO,SAFgC,CAAjC;AAIA,SACC,cAAC,gBAAD;AACC,IAAA,SAAS,EAAGM,cADb;AAEC,IAAA,KAAK,EAAGL,KAFT;AAGC,IAAA,GAAG,EAAGF;AAHP,KAIMG,KAJN,EADD;AAQA;;AAED,eAAeR,UAAU,CAAEI,OAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport ToolbarGroup from '../toolbar-group';\nimport ToolbarContainer from './toolbar-container';\n\n/**\n * Renders a toolbar.\n *\n * To add controls, simply pass `ToolbarButton` components as children.\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] Class to set on the container div.\n * @param {string} [props.label] ARIA label for toolbar container.\n * @param {Object} ref React Element ref.\n */\nfunction Toolbar( { className, label, ...props }, ref ) {\n\tif ( ! label ) {\n\t\tdeprecated( 'Using Toolbar without label prop', {\n\t\t\tsince: '5.6',\n\t\t\talternative: 'ToolbarGroup component',\n\t\t\tlink: 'https://developer.wordpress.org/block-editor/components/toolbar/',\n\t\t} );\n\t\treturn <ToolbarGroup { ...props } className={ className } />;\n\t}\n\t// `ToolbarGroup` already uses components-toolbar for compatibility reasons.\n\tconst finalClassName = classnames(\n\t\t'components-accessible-toolbar',\n\t\tclassName\n\t);\n\treturn (\n\t\t<ToolbarContainer\n\t\t\tclassName={ finalClassName }\n\t\t\tlabel={ label }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( Toolbar );\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-container.js"],"names":["ToolbarContainer","ref","label","props","toolbarState","loop","baseId","id","rtl"],"mappings":";;;;;;;;;AAQA;;;;AALA;;AAMA;;AAKA;;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAGA,SAASA,gBAAT,OAAgDC,GAAhD,EAAsD;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AACrD;AACA;AACA;AACA,QAAMC,YAAY,GAAG,8BAAiB;AACrCC,IAAAA,IAAI,EAAE,IAD+B;AAErCC,IAAAA,MAAM,EAAEH,KAAK,CAACI,EAFuB;AAGrCC,IAAAA,GAAG,EAAE;AAHgC,GAAjB,CAArB;AAMA,SACC;AACA,gCAAC,uBAAD,CAAgB,QAAhB;AAAyB,MAAA,KAAK,EAAGJ;AAAjC,OACC,4BAAC,gBAAD;AACC,MAAA,GAAG,EAAGH,GADP;AAEC,oBAAaC;AAFd,OAGME,YAHN,EAIMD,KAJN,EADD;AAFD;AAWA;;eAEc,yBAAYH,gBAAZ,C","sourcesContent":["/**\n * External dependencies\n */\nimport { useToolbarState, Toolbar } from 'reakit/Toolbar';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\n\nfunction ToolbarContainer( { label, ...props }, ref ) {\n\t// https://reakit.io/docs/basic-concepts/#state-hooks\n\t// Passing baseId for server side rendering (which includes snapshots)\n\t// If an id prop is passed to Toolbar, toolbar items will use it as a base for their ids\n\tconst toolbarState = useToolbarState( {\n\t\tloop: true,\n\t\tbaseId: props.id,\n\t\trtl: isRTL(),\n\t} );\n\n\treturn (\n\t\t// This will provide state for `ToolbarButton`'s\n\t\t<ToolbarContext.Provider value={ toolbarState }>\n\t\t\t<Toolbar\n\t\t\t\tref={ ref }\n\t\t\t\taria-label={ label }\n\t\t\t\t{ ...toolbarState }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</ToolbarContext.Provider>\n\t);\n}\n\nexport default forwardRef( ToolbarContainer );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar/toolbar-container.js"],"names":["useToolbarState","Toolbar","forwardRef","isRTL","ToolbarContext","ToolbarContainer","ref","label","props","toolbarState","loop","baseId","id","rtl"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,OAA1B,QAAyC,gBAAzC;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;;AAEA,SAASC,gBAAT,OAAgDC,GAAhD,EAAsD;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AACrD;AACA;AACA;AACA,QAAMC,YAAY,GAAGT,eAAe,CAAE;AACrCU,IAAAA,IAAI,EAAE,IAD+B;AAErCC,IAAAA,MAAM,EAAEH,KAAK,CAACI,EAFuB;AAGrCC,IAAAA,GAAG,EAAEV,KAAK;AAH2B,GAAF,CAApC;AAMA,SACC;AACA,kBAAC,cAAD,CAAgB,QAAhB;AAAyB,MAAA,KAAK,EAAGM;AAAjC,OACC,cAAC,OAAD;AACC,MAAA,GAAG,EAAGH,GADP;AAEC,oBAAaC;AAFd,OAGME,YAHN,EAIMD,KAJN,EADD;AAFD;AAWA;;AAED,eAAeN,UAAU,CAAEG,gBAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport { useToolbarState, Toolbar } from 'reakit/Toolbar';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\n\nfunction ToolbarContainer( { label, ...props }, ref ) {\n\t// https://reakit.io/docs/basic-concepts/#state-hooks\n\t// Passing baseId for server side rendering (which includes snapshots)\n\t// If an id prop is passed to Toolbar, toolbar items will use it as a base for their ids\n\tconst toolbarState = useToolbarState( {\n\t\tloop: true,\n\t\tbaseId: props.id,\n\t\trtl: isRTL(),\n\t} );\n\n\treturn (\n\t\t// This will provide state for `ToolbarButton`'s\n\t\t<ToolbarContext.Provider value={ toolbarState }>\n\t\t\t<Toolbar\n\t\t\t\tref={ ref }\n\t\t\t\taria-label={ label }\n\t\t\t\t{ ...toolbarState }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</ToolbarContext.Provider>\n\t);\n}\n\nexport default forwardRef( ToolbarContainer );\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar/toolbar-container.native.js"],"names":["View","ToolbarContainer","children"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;;AAEA,MAAMC,gBAAgB,GAAG;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SAAoB,cAAC,IAAD,QAAQA,QAAR,CAApB;AAAA,CAAzB;;AAEA,eAAeD,gBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\nconst ToolbarContainer = ( { children } ) => <View>{ children }</View>;\n\nexport default ToolbarContainer;\n"]}
@@ -14,7 +14,7 @@ import { useContext, forwardRef } from '@wordpress/element';
14
14
  * Internal dependencies
15
15
  */
16
16
 
17
- import Button from '../button';
17
+ import Button from '../../button';
18
18
  import ToolbarItem from '../toolbar-item';
19
19
  import ToolbarContext from '../toolbar-context';
20
20
  import ToolbarButtonContainer from './toolbar-button-container';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-button/index.js"],"names":["classnames","useContext","forwardRef","Button","ToolbarItem","ToolbarContext","ToolbarButtonContainer","ToolbarButton","ref","containerClassName","className","extraProps","children","title","isActive","isDisabled","props","accessibleToolbarState","icon","shortcut","subscript","event","stopPropagation","onClick","toolbarItemProps"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AACA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AACA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,4BAAnC;;AAEA,SAASC,aAAT,OAWCC,G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,GAMGZ,QANH,CAPF,CADD;AAmBA;;AAED,eAAeV,UAAU,CAAEK,aAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\n\nfunction ToolbarButton(\n\t{\n\t\tcontainerClassName,\n\t\tclassName,\n\t\textraProps,\n\t\tchildren,\n\t\ttitle,\n\t\tisActive,\n\t\tisDisabled,\n\t\t...props\n\t},\n\tref\n) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarButtonContainer className={ containerClassName }>\n\t\t\t\t<Button\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ props.icon }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tshortcut={ props.shortcut }\n\t\t\t\t\tdata-subscript={ props.subscript }\n\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tif ( props.onClick ) {\n\t\t\t\t\t\t\tprops.onClick( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-toolbar__control',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\tdata-toolbar-item\n\t\t\t\t\t{ ...extraProps }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t</ToolbarButtonContainer>\n\t\t);\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to Button. This means that ToolbarButton has the same API as\n\t// Button.\n\treturn (\n\t\t<ToolbarItem\n\t\t\tclassName={ classnames( 'components-toolbar-button', className ) }\n\t\t\t{ ...extraProps }\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\t{ ...toolbarItemProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarButton );\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-button/toolbar-button-container.js"],"names":["ToolbarButtonContainer","props","className","children"],"mappings":";;AAAA,MAAMA,sBAAsB,GAAKC,KAAF,IAC9B;AAAK,EAAA,SAAS,EAAGA,KAAK,CAACC;AAAvB,GAAqCD,KAAK,CAACE,QAA3C,CADD;;AAGA,eAAeH,sBAAf","sourcesContent":["const ToolbarButtonContainer = ( props ) => (\n\t<div className={ props.className }>{ props.children }</div>\n);\nexport default ToolbarButtonContainer;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-button/toolbar-button-container.native.js"],"names":["View","props","children"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;AAEA,gBAAiBC,KAAF,IAAa,cAAC,IAAD,QAAQA,KAAK,CAACC,QAAd,CAA5B","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\nexport default ( props ) => <View>{ props.children }</View>;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-context/index.js"],"names":["createContext","ToolbarContext"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,oBAA9B;AAEA,MAAMC,cAAc,GAAGD,aAAa,EAApC;AAEA,eAAeC,cAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nconst ToolbarContext = createContext();\n\nexport default ToolbarContext;\n"]}
@@ -11,7 +11,7 @@ import { forwardRef, useContext } from '@wordpress/element';
11
11
 
12
12
  import ToolbarItem from '../toolbar-item';
13
13
  import ToolbarContext from '../toolbar-context';
14
- import DropdownMenu from '../dropdown-menu';
14
+ import DropdownMenu from '../../dropdown-menu';
15
15
 
16
16
  function ToolbarDropdownMenu(props, ref) {
17
17
  const accessibleToolbarState = useContext(ToolbarContext);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-dropdown-menu/index.js"],"names":["forwardRef","useContext","ToolbarItem","ToolbarContext","DropdownMenu","ToolbarDropdownMenu","props","ref","accessibleToolbarState","toggleProps","toolbarItemProps","variant","popoverProps"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,qBAAzB;;AAEA,SAASC,mBAAT,CAA8BC,KAA9B,EAAqCC,GAArC,EAA2C;AAC1C,QAAMC,sBAAsB,GAAGP,UAAU,CAAEE,cAAF,CAAzC;;AAEA,MAAK,CAAEK,sBAAP,EAAgC;AAC/B,WAAO,cAAC,YAAD,EAAmBF,KAAnB,CAAP;AACA,GALyC,CAO1C;AACA;AACA;;;AACA,SACC,cAAC,WAAD;AAAa,IAAA,GAAG,EAAGC;AAAnB,KAA8BD,KAAK,CAACG,WAApC,GACKC,gBAAF,IACD,cAAC,YAAD,eACMJ,KADN;AAEC,IAAA,YAAY,EAAG;AACdK,MAAAA,OAAO,EAAE,SADK;AAEd,SAAGL,KAAK,CAACM;AAFK,KAFhB;AAMC,IAAA,WAAW,EAAGF;AANf,KAFF,CADD;AAcA;;AAED,eAAeV,UAAU,CAAEK,mBAAF,CAAzB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport DropdownMenu from '../../dropdown-menu';\n\nfunction ToolbarDropdownMenu( props, ref ) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn <DropdownMenu { ...props } />;\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu\n\t// has the same API as DropdownMenu.\n\treturn (\n\t\t<ToolbarItem ref={ ref } { ...props.toggleProps }>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\tvariant: 'toolbar',\n\t\t\t\t\t\t...props.popoverProps,\n\t\t\t\t\t} }\n\t\t\t\t\ttoggleProps={ toolbarItemProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarDropdownMenu );\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/index.js"],"names":["classnames","useContext","ToolbarButton","ToolbarGroupContainer","ToolbarGroupCollapsed","ToolbarContext","ToolbarGroup","controls","children","className","isCollapsed","title","props","accessibleToolbarState","length","finalClassName","controlSets","Array","isArray","flatMap","controlSet","indexOfSet","map","control","indexOfControl","join"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,qBAAP,MAAkC,2BAAlC;AACA,OAAOC,qBAAP,MAAkC,2BAAlC;AACA,OAAOC,cAAP,MA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f,cAAC,aAAD;AACC,IAAA,GAAG,EAAG,CAAEH,UAAF,EAAcG,cAAd,EAA+BC,IAA/B,EADP;AAEC,IAAA,kBAAkB,EACjBJ,UAAU,GAAG,CAAb,IAAkBG,cAAc,KAAK,CAArC,GACG,kBADH,GAEG;AALL,KAOMD,OAPN,EADD,CADC,CADH,EAcGf,QAdH,CADD;AAkBA;;AAED,eAAeF,YAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarButton from '../toolbar-button';\nimport ToolbarGroupContainer from './toolbar-group-container';\nimport ToolbarGroupCollapsed from './toolbar-group-collapsed';\nimport ToolbarContext from '../toolbar-context';\n\n/**\n * Renders a collapsible group of controls\n *\n * The `controls` prop accepts an array of sets. A set is an array of controls.\n * Controls have the following shape:\n *\n * ```\n * {\n * icon: string,\n * title: string,\n * subscript: string,\n * onClick: Function,\n * isActive: boolean,\n * isDisabled: boolean\n * }\n * ```\n *\n * For convenience it is also possible to pass only an array of controls. It is\n * then assumed this is the only set.\n *\n * Either `controls` or `children` is required, otherwise this components\n * renders nothing.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.controls] The controls to render in this toolbar.\n * @param {WPElement} [props.children] Any other things to render inside the toolbar besides the controls.\n * @param {string} [props.className] Class to set on the container div.\n * @param {boolean} [props.isCollapsed] Turns ToolbarGroup into a dropdown menu.\n * @param {string} [props.title] ARIA label for dropdown menu if is collapsed.\n */\nfunction ToolbarGroup( {\n\tcontrols = [],\n\tchildren,\n\tclassName,\n\tisCollapsed,\n\ttitle,\n\t...props\n} ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ( ! controls || ! controls.length ) && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst finalClassName = classnames(\n\t\t// Unfortunately, there's legacy code referencing to `.components-toolbar`\n\t\t// So we can't get rid of it\n\t\taccessibleToolbarState\n\t\t\t? 'components-toolbar-group'\n\t\t\t: 'components-toolbar',\n\t\tclassName\n\t);\n\n\t// Normalize controls to nested array of objects (sets of controls)\n\tlet controlSets = controls;\n\tif ( ! Array.isArray( controlSets[ 0 ] ) ) {\n\t\tcontrolSets = [ controlSets ];\n\t}\n\n\tif ( isCollapsed ) {\n\t\treturn (\n\t\t\t<ToolbarGroupCollapsed\n\t\t\t\tlabel={ title }\n\t\t\t\tcontrols={ controlSets }\n\t\t\t\tclassName={ finalClassName }\n\t\t\t\tchildren={ children }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ToolbarGroupContainer className={ finalClassName } { ...props }>\n\t\t\t{ controlSets?.flatMap( ( controlSet, indexOfSet ) =>\n\t\t\t\tcontrolSet.map( ( control, indexOfControl ) => (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tkey={ [ indexOfSet, indexOfControl ].join() }\n\t\t\t\t\t\tcontainerClassName={\n\t\t\t\t\t\t\tindexOfSet > 0 && indexOfControl === 0\n\t\t\t\t\t\t\t\t? 'has-left-divider'\n\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...control }\n\t\t\t\t\t/>\n\t\t\t\t) )\n\t\t\t) }\n\t\t\t{ children }\n\t\t</ToolbarGroupContainer>\n\t);\n}\n\nexport default ToolbarGroup;\n"]}
@@ -9,7 +9,7 @@ import { useContext } from '@wordpress/element';
9
9
  * Internal dependencies
10
10
  */
11
11
 
12
- import DropdownMenu from '../dropdown-menu';
12
+ import DropdownMenu from '../../dropdown-menu';
13
13
  import ToolbarContext from '../toolbar-context';
14
14
  import ToolbarItem from '../toolbar-item';
15
15
 
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-collapsed.js"],"names":["useContext","DropdownMenu","ToolbarContext","ToolbarItem","ToolbarGroupCollapsed","controls","toggleProps","props","accessibleToolbarState","renderDropdownMenu","internalToggleProps"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,qBAAzB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;;AAEA,SAASC,qBAAT,OAA2E;AAAA,MAA3C;AAAEC,IAAAA,QAAQ,GAAG,EAAb;AAAiBC,IAAAA,WAAjB;AAA8B,OAAGC;AAAjC,GAA2C;AAC1E;AACA;AACA,QAAMC,sBAAsB,GAAGR,UAAU,CAAEE,cAAF,CAAzC;;AAEA,QAAMO,kBAAkB,GAAKC,mBAAF,IAC1B,cAAC,YAAD;AACC,IAAA,QAAQ,EAAGL,QADZ;AAEC,IAAA,WAAW,EAAG,EACb,GAAGK,mBADU;AAEb,2BAAqB;AAFR;AAFf,KAMMH,KANN,EADD;;AAWA,MAAKC,sBAAL,EAA8B;AAC7B,WACC,cAAC,WAAD,EAAkBF,WAAlB,EAAkCG,kBAAlC,CADD;AAGA;;AAED,SAAOA,kBAAkB,CAAEH,WAAF,CAAzB;AACA;;AAED,eAAeF,qBAAf","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarItem from '../toolbar-item';\n\nfunction ToolbarGroupCollapsed( { controls = [], toggleProps, ...props } ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tconst renderDropdownMenu = ( internalToggleProps ) => (\n\t\t<DropdownMenu\n\t\t\tcontrols={ controls }\n\t\t\ttoggleProps={ {\n\t\t\t\t...internalToggleProps,\n\t\t\t\t'data-toolbar-item': true,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n\n\tif ( accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarItem { ...toggleProps }>{ renderDropdownMenu }</ToolbarItem>\n\t\t);\n\t}\n\n\treturn renderDropdownMenu( toggleProps );\n}\n\nexport default ToolbarGroupCollapsed;\n"]}
@@ -14,7 +14,7 @@ import { withPreferredColorScheme } from '@wordpress/compose';
14
14
  * Internal dependencies
15
15
  */
16
16
 
17
- import DropdownMenu from '../dropdown-menu';
17
+ import DropdownMenu from '../../dropdown-menu';
18
18
  import styles from './style.scss';
19
19
 
20
20
  function ToolbarGroupCollapsed(_ref) {
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-collapsed.native.js"],"names":["View","withPreferredColorScheme","DropdownMenu","styles","ToolbarGroupCollapsed","controls","getStylesFromColorScheme","passedStyle","props","container","containerDark"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;AACA;AACA;AACA;;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AACA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,qBAAzB;AACA,OAAOC,MAAP,MAAmB,cAAnB;;AAEA,SAASC,qBAAT,OAKI;AAAA,MAL4B;AAC/BC,IAAAA,QAAQ,GAAG,EADoB;AAE/BC,IAAAA,wBAF+B;AAG/BC,IAAAA,WAH+B;AAI/B,OAAGC;AAJ4B,GAK5B;AACH,SACC,cAAC,IAAD;AACC,IAAA,KAAK,EAAG,CACPF,wBAAwB,CACvBH,MAAM,CAACM,SADgB,EAEvBN,MAAM,CAACO,aAFgB,CADjB,EAKPH,WALO;AADT,KASC,cAAC,YAAD;AAAc,IAAA,QAAQ,EAAGF;AAAzB,KAAyCG,KAAzC,EATD,CADD;AAaA;;AAED,eAAeP,wBAAwB,CAAEG,qBAAF,CAAvC","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { withPreferredColorScheme } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport styles from './style.scss';\n\nfunction ToolbarGroupCollapsed( {\n\tcontrols = [],\n\tgetStylesFromColorScheme,\n\tpassedStyle,\n\t...props\n} ) {\n\treturn (\n\t\t<View\n\t\t\tstyle={ [\n\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\tstyles.container,\n\t\t\t\t\tstyles.containerDark\n\t\t\t\t),\n\t\t\t\tpassedStyle,\n\t\t\t] }\n\t\t>\n\t\t\t<DropdownMenu controls={ controls } { ...props } />\n\t\t</View>\n\t);\n}\n\nexport default withPreferredColorScheme( ToolbarGroupCollapsed );\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-container.js"],"names":["ToolbarGroupContainer","className","children","props"],"mappings":";;;AAAA,MAAMA,qBAAqB,GAAG;AAAA,MAAE;AAAEC,IAAAA,SAAF;AAAaC,IAAAA,QAAb;AAAuB,OAAGC;AAA1B,GAAF;AAAA,SAC7B;AAAK,IAAA,SAAS,EAAGF;AAAjB,KAAkCE,KAAlC,GACGD,QADH,CAD6B;AAAA,CAA9B;;AAKA,eAAeF,qBAAf","sourcesContent":["const ToolbarGroupContainer = ( { className, children, ...props } ) => (\n\t<div className={ className } { ...props }>\n\t\t{ children }\n\t</div>\n);\nexport default ToolbarGroupContainer;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-container.native.js"],"names":["View","withPreferredColorScheme","styles","ToolbarGroupContainer","getStylesFromColorScheme","passedStyle","children","container","containerDark"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;AAEA;AACA;AACA;;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;;AAEA,MAAMC,qBAAqB,GAAG;AAAA,MAAE;AAC/BC,IAAAA,wBAD+B;AAE/BC,IAAAA,WAF+B;AAG/BC,IAAAA;AAH+B,GAAF;AAAA,SAK7B,cAAC,IAAD;AACC,IAAA,KAAK,EAAG,CACPF,wBAAwB,CAAEF,MAAM,CAACK,SAAT,EAAoBL,MAAM,CAACM,aAA3B,CADjB,EAEPH,WAFO;AADT,KAMGC,QANH,CAL6B;AAAA,CAA9B;;AAeA,eAAeL,wBAAwB,CAAEE,qBAAF,CAAvC","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nconst ToolbarGroupContainer = ( {\n\tgetStylesFromColorScheme,\n\tpassedStyle,\n\tchildren,\n} ) => (\n\t<View\n\t\tstyle={ [\n\t\t\tgetStylesFromColorScheme( styles.container, styles.containerDark ),\n\t\t\tpassedStyle,\n\t\t] }\n\t>\n\t\t{ children }\n\t</View>\n);\n\nexport default withPreferredColorScheme( ToolbarGroupContainer );\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-item/index.js"],"names":["ToolbarItem","BaseToolbarItem","forwardRef","useContext","warning","ToolbarContext","ref","children","as","Component","props","accessibleToolbarState","allProps"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,eAAxB,QAA+C,gBAA/C;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AACA,OAAOC,OAAP,MAAoB,oBAApB;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;;AAEA,SAASL,WAAT,OAA6DM,GAA7D,EAAmE;AAAA,MAA7C;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,EAAE,EAAEC,SAAhB;AAA2B,OAAGC;AAA9B,GAA6C;AAClE,QAAMC,sBAAsB,GAAGR,UAAU,CAAEE,cAAF,CAAzC;;AAEA,MAAK,OAAOE,QAAP,KAAoB,UAApB,IAAkC,CAAEE,SAAzC,EAAqD;AACpD,6FAAAL,OAAO,CACN,yIACC,2EAFK,CAAP;AAIA,WAAO,IAAP;AACA;;AAED,QAAMQ,QAAQ,GAAG,EAAE,GAAGF,KAAL;AAAYJ,IAAAA,GAAZ;AAAiB,yBAAqB;AAAtC,GAAjB;;AAEA,MAAK,CAAEK,sBAAP,EAAgC;AAC/B,QAAKF,SAAL,EAAiB;AAChB,aAAO,cAAC,SAAD,EAAgBG,QAAhB,EAA6BL,QAA7B,CAAP;AACA;;AACD,WAAOA,QAAQ,CAAEK,QAAF,CAAf;AACA;;AAED,SACC,cAAC,eAAD,eACMD,sBADN,EAEMC,QAFN;AAGC,IAAA,EAAE,EAAGH;AAHN,MAKGF,QALH,CADD;AASA;;AAED,eAAeL,UAAU,CAAEF,WAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport { ToolbarItem as BaseToolbarItem } from 'reakit/Toolbar';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\n\nfunction ToolbarItem( { children, as: Component, ...props }, ref ) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( typeof children !== 'function' && ! Component ) {\n\t\twarning(\n\t\t\t'`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' +\n\t\t\t\t'See https://developer.wordpress.org/block-editor/components/toolbar-item/'\n\t\t);\n\t\treturn null;\n\t}\n\n\tconst allProps = { ...props, ref, 'data-toolbar-item': true };\n\n\tif ( ! accessibleToolbarState ) {\n\t\tif ( Component ) {\n\t\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t\t}\n\t\treturn children( allProps );\n\t}\n\n\treturn (\n\t\t<BaseToolbarItem\n\t\t\t{ ...accessibleToolbarState }\n\t\t\t{ ...allProps }\n\t\t\tas={ Component }\n\t\t>\n\t\t\t{ children }\n\t\t</BaseToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarItem );\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-item/index.native.js"],"names":["forwardRef","warning","ToolbarItem","ref","children","props"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,oBAA3B;AACA,OAAOC,OAAP,MAAoB,oBAApB;;AAEA,SAASC,WAAT,OAA8CC,GAA9C,EAAoD;AAAA,MAA9B;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAA8B;;AACnD,MAAK,OAAOD,QAAP,KAAoB,UAAzB,EAAsC;AACrC,6FAAAH,OAAO,CACN,yFADM,CAAP;AAGA,WAAO,IAAP;AACA;;AACD,SAAOG,QAAQ,CAAE,EAAE,GAAGC,KAAL;AAAYF,IAAAA;AAAZ,GAAF,CAAf;AACA;;AAED,eAAeH,UAAU,CAAEE,WAAF,CAAzB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\nfunction ToolbarItem( { children, ...props }, ref ) {\n\tif ( typeof children !== 'function' ) {\n\t\twarning(\n\t\t\t'`ToolbarItem` is a generic headless component that accepts only function children props'\n\t\t);\n\t\treturn null;\n\t}\n\treturn children( { ...props, ref } );\n}\n\nexport default forwardRef( ToolbarItem );\n"]}
@@ -138,15 +138,15 @@ function TreeGrid(_ref, ref) {
138
138
  onExpandRow(activeRow);
139
139
  event.preventDefault();
140
140
  return;
141
- } // If a row is focused, and it is expanded, focuses the rightmost cell in the row.
141
+ } // If a row is focused, and it is expanded, focuses the next cell in the row.
142
142
 
143
143
 
144
144
  const focusableItems = getRowFocusables(activeRow);
145
145
 
146
146
  if (focusableItems.length > 0) {
147
- var _focusableItems;
147
+ var _focusableItems$nextI;
148
148
 
149
- (_focusableItems = focusableItems[focusableItems.length - 1]) === null || _focusableItems === void 0 ? void 0 : _focusableItems.focus();
149
+ (_focusableItems$nextI = focusableItems[nextIndex]) === null || _focusableItems$nextI === void 0 ? void 0 : _focusableItems$nextI.focus();
150
150
  }
151
151
  } // Prevent key use for anything else. For example, Voiceover
152
152
  // will start reading text on continued use of left/right arrow
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/tree-grid/index.js"],"names":["focus","forwardRef","useCallback","UP","DOWN","LEFT","RIGHT","HOME","END","RovingTabIndexContainer","getRowFocusables","rowElement","focusablesInRow","focusable","find","sequential","length","filter","closest","TreeGrid","ref","children","onExpandRow","onCollapseRow","onFocusRow","applicationAriaLabel","props","onKeyDown","event","keyCode","metaKey","ctrlKey","altKey","hasModifierKeyPressed","includes","stopPropagation","activeElement","document","currentTarget","treeGridElement","contains","activeRow","currentColumnIndex","indexOf","canExpandCollapse","cannotFocusNextColumn","getAttribute","nextIndex","Math","max","min","preventDefault","level","parseInt","rows","Array","from","querySelectorAll","parentRow","currentRowIndex","i","focusableItems","nextRowIndex","focusablesInNextRow","default","TreeGridRow","TreeGridCell","TreeGridItem"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,KAAT,QAAsB,gBAAtB;AACA,SAASC,UAAT,EAAqBC,WAArB,QAAwC,oBAAxC;AACA,SAASC,EAAT,EAAaC,IAAb,EAAmBC,IAAnB,EAAyBC,KAAzB,EAAgCC,IAAhC,EAAsCC,GAAtC,QAAiD,qBAAjD;AAEA;AACA;AACA;;AACA,OAAOC,uBAAP,MAAoC,oBAApC;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,gBAAT,CAA2BC,UAA3B,EAAwC;AACvC,QAAMC,eAAe,GAAGZ,KAAK,CAACa,SAAN,CAAgBC,IAAhB,CAAsBH,UAAtB,EAAkC;AACzDI,IAAAA,UAAU,EAAE;AAD6C,GAAlC,CAAxB;;AAIA,MAAK,CAAEH,eAAF,IAAqB,CAAEA,eAAe,CAACI,MAA5C,EAAqD;AACpD;AACA;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AAK,IAAA,IAAI,EAAC,aAAV;AAAwB,kBAAaC;AAArC,KACC,oCACMC,KADN;AAEC,IAAA,IAAI,EAAC,UAFN;AAGC,IAAA,SAAS,EAAGC,SAHb;AAIC,IAAA,GAAG,EAAGP;AAJP,MAMC,6BAASC,QAAT,CAND,CADD,CAND,CADD;AAmBA;AACA;;AAED,eAAepB,UAAU,CAAEkB,QAAF,CAAzB;AACA,SAAS6C,OAAO,IAAIC,WAApB,QAAuC,OAAvC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,QAAxC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,QAAxC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT, HOME, END } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexContainer from './roving-tab-index';\n\n/**\n * Return focusables in a row element, excluding those from other branches\n * nested within the row.\n *\n * @param {Element} rowElement The DOM element representing the row.\n *\n * @return {?Array} The array of focusables in the row.\n */\nfunction getRowFocusables( rowElement ) {\n\tconst focusablesInRow = focus.focusable.find( rowElement, {\n\t\tsequential: true,\n\t} );\n\n\tif ( ! focusablesInRow || ! focusablesInRow.length ) {\n\t\treturn;\n\t}\n\n\treturn focusablesInRow.filter( ( focusable ) => {\n\t\treturn focusable.closest( '[role=\"row\"]' ) === rowElement;\n\t} );\n}\n\n/**\n * Renders both a table and tbody element, used to create a tree hierarchy.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/components/src/tree-grid/README.md\n * @param {Object} props Component props.\n * @param {WPElement} props.children Children to be rendered.\n * @param {Function} props.onExpandRow Callback to fire when row is expanded.\n * @param {Function} props.onCollapseRow Callback to fire when row is collapsed.\n * @param {Function} props.onFocusRow Callback to fire when moving focus to a different row.\n * @param {string} props.applicationAriaLabel Label to use for the application role.\n * @param {Object} ref A ref to the underlying DOM table element.\n */\nfunction TreeGrid(\n\t{\n\t\tchildren,\n\t\tonExpandRow = () => {},\n\t\tonCollapseRow = () => {},\n\t\tonFocusRow = () => {},\n\t\tapplicationAriaLabel,\n\t\t...props\n\t},\n\tref\n) {\n\tconst onKeyDown = useCallback(\n\t\t( event ) => {\n\t\t\tconst { keyCode, metaKey, ctrlKey, altKey } = event;\n\n\t\t\t// The shift key is intentionally absent from the following list,\n\t\t\t// to enable shift + up/down to select items from the list.\n\t\t\tconst hasModifierKeyPressed = metaKey || ctrlKey || altKey;\n\n\t\t\tif (\n\t\t\t\thasModifierKeyPressed ||\n\t\t\t\t! [ UP, DOWN, LEFT, RIGHT, HOME, END ].includes( keyCode )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The event will be handled, stop propagation.\n\t\t\tevent.stopPropagation();\n\n\t\t\tconst { activeElement } = document;\n\t\t\tconst { currentTarget: treeGridElement } = event;\n\t\t\tif ( ! treeGridElement.contains( activeElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Calculate the columnIndex of the active element.\n\t\t\tconst activeRow = activeElement.closest( '[role=\"row\"]' );\n\t\t\tconst focusablesInRow = getRowFocusables( activeRow );\n\t\t\tconst currentColumnIndex = focusablesInRow.indexOf( activeElement );\n\t\t\tconst canExpandCollapse = 0 === currentColumnIndex;\n\t\t\tconst cannotFocusNextColumn =\n\t\t\t\tcanExpandCollapse &&\n\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'false' &&\n\t\t\t\tkeyCode === RIGHT;\n\n\t\t\tif ( [ LEFT, RIGHT ].includes( keyCode ) ) {\n\t\t\t\t// Calculate to the next element.\n\t\t\t\tlet nextIndex;\n\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\tnextIndex = Math.max( 0, currentColumnIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextIndex = Math.min(\n\t\t\t\t\t\tcurrentColumnIndex + 1,\n\t\t\t\t\t\tfocusablesInRow.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is at the left most column.\n\t\t\t\tif ( canExpandCollapse ) {\n\t\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\t\t// Left:\n\t\t\t\t\t\t// If a row is focused, and it is expanded, collapses the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'true'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonCollapseRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, moves to the parent row (if there is one).\n\t\t\t\t\t\tconst level = Math.max(\n\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\tactiveRow?.getAttribute( 'aria-level' ) ?? 1,\n\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t) - 1,\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst rows = Array.from(\n\t\t\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlet parentRow = activeRow;\n\t\t\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\t\t\tfor ( let i = currentRowIndex; i >= 0; i-- ) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\t\trows[ i ].getAttribute( 'aria-level' ),\n\t\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t\t) === level\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tparentRow = rows[ i ];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgetRowFocusables( parentRow )?.[ 0 ]?.focus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( keyCode === RIGHT ) {\n\t\t\t\t\t\t// Right:\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, expands the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) ===\n\t\t\t\t\t\t\t'false'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonExpandRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is expanded, focuses the rightmost cell in the row.\n\t\t\t\t\t\tconst focusableItems = getRowFocusables( activeRow );\n\t\t\t\t\t\tif ( focusableItems.length > 0 ) {\n\t\t\t\t\t\t\tfocusableItems[\n\t\t\t\t\t\t\t\tfocusableItems.length - 1\n\t\t\t\t\t\t\t]?.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start reading text on continued use of left/right arrow\n\t\t\t\t\t// keys.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Focus the next element. If at most left column and row is collapsed, moving right is not allowed as this will expand. However, if row is collapsed, moving left is allowed.\n\t\t\t\tif ( cannotFocusNextColumn ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfocusablesInRow[ nextIndex ].focus();\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( [ UP, DOWN ].includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === UP ) {\n\t\t\t\t\tnextRowIndex = Math.max( 0, currentRowIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = Math.min(\n\t\t\t\t\t\tcurrentRowIndex + 1,\n\t\t\t\t\t\trows.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( [ HOME, END ].includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === HOME ) {\n\t\t\t\t\tnextRowIndex = 0;\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = rows.length - 1;\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ onExpandRow, onCollapseRow, onFocusRow ]\n\t);\n\n\t/* Disable reason: A treegrid is implemented using a table element. */\n\t/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n\treturn (\n\t\t<RovingTabIndexContainer>\n\t\t\t{\n\t\t\t\t// Prevent browser mode from triggering in NVDA by wrapping List View\n\t\t\t\t// in a role=application wrapper.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/issues/43729\n\t\t\t }\n\t\t\t<div role=\"application\" aria-label={ applicationAriaLabel }>\n\t\t\t\t<table\n\t\t\t\t\t{ ...props }\n\t\t\t\t\trole=\"treegrid\"\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<tbody>{ children }</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</RovingTabIndexContainer>\n\t);\n\t/* eslint-enable jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\nexport default forwardRef( TreeGrid );\nexport { default as TreeGridRow } from './row';\nexport { default as TreeGridCell } from './cell';\nexport { default as TreeGridItem } from './item';\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/tree-grid/index.js"],"names":["focus","forwardRef","useCallback","UP","DOWN","LEFT","RIGHT","HOME","END","RovingTabIndexContainer","getRowFocusables","rowElement","focusablesInRow","focusable","find","sequential","length","filter","closest","TreeGrid","ref","children","onExpandRow","onCollapseRow","onFocusRow","applicationAriaLabel","props","onKeyDown","event","keyCode","metaKey","ctrlKey","altKey","hasModifierKeyPressed","includes","stopPropagation","activeElement","document","currentTarget","treeGridElement","contains","activeRow","currentColumnIndex","indexOf","canExpandCollapse","cannotFocusNextColumn","getAttribute","nextIndex","Math","max","min","preventDefault","level","parseInt","rows","Array","from","querySelectorAll","parentRow","currentRowIndex","i","focusableItems","nextRowIndex","focusablesInNextRow","default","TreeGridRow","TreeGridCell","TreeGridItem"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,KAAT,QAAsB,gBA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/C;;;AACA,YAAMJ,SAAS,GAAGC,IAAI,CAACE,GAAL,CACjBR,kBADiB,EAEjBqB,mBAAmB,CAAC/C,MAApB,GAA6B,CAFZ,CAAlB;AAIA+C,MAAAA,mBAAmB,CAAEhB,SAAF,CAAnB,CAAiC/C,KAAjC,GA1C+C,CA4C/C;AACA;;AACAwB,MAAAA,UAAU,CAAEI,KAAF,EAASa,SAAT,EAAoBa,IAAI,CAAEQ,YAAF,CAAxB,CAAV,CA9C+C,CAgD/C;AACA;;AACAlC,MAAAA,KAAK,CAACuB,cAAN;AACA;AACD,GA/N2B,EAgO5B,CAAE7B,WAAF,EAAeC,aAAf,EAA8BC,UAA9B,CAhO4B,CAA7B;AAmOA;;AACA;;AACA,SACC,cAAC,uBAAD,QAMC;AAAK,IAAA,IAAI,EAAC,aAAV;AAAwB,kBAAaC;AAArC,KACC,oCACMC,KADN;AAEC,IAAA,IAAI,EAAC,UAFN;AAGC,IAAA,SAAS,EAAGC,SAHb;AAIC,IAAA,GAAG,EAAGP;AAJP,MAMC,6BAASC,QAAT,CAND,CADD,CAND,CADD;AAmBA;AACA;;AAED,eAAepB,UAAU,CAAEkB,QAAF,CAAzB;AACA,SAAS6C,OAAO,IAAIC,WAApB,QAAuC,OAAvC;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,QAAxC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,QAAxC","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT, HOME, END } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexContainer from './roving-tab-index';\n\n/**\n * Return focusables in a row element, excluding those from other branches\n * nested within the row.\n *\n * @param {Element} rowElement The DOM element representing the row.\n *\n * @return {?Array} The array of focusables in the row.\n */\nfunction getRowFocusables( rowElement ) {\n\tconst focusablesInRow = focus.focusable.find( rowElement, {\n\t\tsequential: true,\n\t} );\n\n\tif ( ! focusablesInRow || ! focusablesInRow.length ) {\n\t\treturn;\n\t}\n\n\treturn focusablesInRow.filter( ( focusable ) => {\n\t\treturn focusable.closest( '[role=\"row\"]' ) === rowElement;\n\t} );\n}\n\n/**\n * Renders both a table and tbody element, used to create a tree hierarchy.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/components/src/tree-grid/README.md\n * @param {Object} props Component props.\n * @param {WPElement} props.children Children to be rendered.\n * @param {Function} props.onExpandRow Callback to fire when row is expanded.\n * @param {Function} props.onCollapseRow Callback to fire when row is collapsed.\n * @param {Function} props.onFocusRow Callback to fire when moving focus to a different row.\n * @param {string} props.applicationAriaLabel Label to use for the application role.\n * @param {Object} ref A ref to the underlying DOM table element.\n */\nfunction TreeGrid(\n\t{\n\t\tchildren,\n\t\tonExpandRow = () => {},\n\t\tonCollapseRow = () => {},\n\t\tonFocusRow = () => {},\n\t\tapplicationAriaLabel,\n\t\t...props\n\t},\n\tref\n) {\n\tconst onKeyDown = useCallback(\n\t\t( event ) => {\n\t\t\tconst { keyCode, metaKey, ctrlKey, altKey } = event;\n\n\t\t\t// The shift key is intentionally absent from the following list,\n\t\t\t// to enable shift + up/down to select items from the list.\n\t\t\tconst hasModifierKeyPressed = metaKey || ctrlKey || altKey;\n\n\t\t\tif (\n\t\t\t\thasModifierKeyPressed ||\n\t\t\t\t! [ UP, DOWN, LEFT, RIGHT, HOME, END ].includes( keyCode )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// The event will be handled, stop propagation.\n\t\t\tevent.stopPropagation();\n\n\t\t\tconst { activeElement } = document;\n\t\t\tconst { currentTarget: treeGridElement } = event;\n\t\t\tif ( ! treeGridElement.contains( activeElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Calculate the columnIndex of the active element.\n\t\t\tconst activeRow = activeElement.closest( '[role=\"row\"]' );\n\t\t\tconst focusablesInRow = getRowFocusables( activeRow );\n\t\t\tconst currentColumnIndex = focusablesInRow.indexOf( activeElement );\n\t\t\tconst canExpandCollapse = 0 === currentColumnIndex;\n\t\t\tconst cannotFocusNextColumn =\n\t\t\t\tcanExpandCollapse &&\n\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'false' &&\n\t\t\t\tkeyCode === RIGHT;\n\n\t\t\tif ( [ LEFT, RIGHT ].includes( keyCode ) ) {\n\t\t\t\t// Calculate to the next element.\n\t\t\t\tlet nextIndex;\n\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\tnextIndex = Math.max( 0, currentColumnIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextIndex = Math.min(\n\t\t\t\t\t\tcurrentColumnIndex + 1,\n\t\t\t\t\t\tfocusablesInRow.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is at the left most column.\n\t\t\t\tif ( canExpandCollapse ) {\n\t\t\t\t\tif ( keyCode === LEFT ) {\n\t\t\t\t\t\t// Left:\n\t\t\t\t\t\t// If a row is focused, and it is expanded, collapses the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) === 'true'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonCollapseRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, moves to the parent row (if there is one).\n\t\t\t\t\t\tconst level = Math.max(\n\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\tactiveRow?.getAttribute( 'aria-level' ) ?? 1,\n\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t) - 1,\n\t\t\t\t\t\t\t1\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst rows = Array.from(\n\t\t\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlet parentRow = activeRow;\n\t\t\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\t\t\tfor ( let i = currentRowIndex; i >= 0; i-- ) {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tparseInt(\n\t\t\t\t\t\t\t\t\trows[ i ].getAttribute( 'aria-level' ),\n\t\t\t\t\t\t\t\t\t10\n\t\t\t\t\t\t\t\t) === level\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tparentRow = rows[ i ];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgetRowFocusables( parentRow )?.[ 0 ]?.focus();\n\t\t\t\t\t}\n\t\t\t\t\tif ( keyCode === RIGHT ) {\n\t\t\t\t\t\t// Right:\n\t\t\t\t\t\t// If a row is focused, and it is collapsed, expands the current row.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tactiveRow.getAttribute( 'aria-expanded' ) ===\n\t\t\t\t\t\t\t'false'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tonExpandRow( activeRow );\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// If a row is focused, and it is expanded, focuses the next cell in the row.\n\t\t\t\t\t\tconst focusableItems = getRowFocusables( activeRow );\n\t\t\t\t\t\tif ( focusableItems.length > 0 ) {\n\t\t\t\t\t\t\tfocusableItems[ nextIndex ]?.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start reading text on continued use of left/right arrow\n\t\t\t\t\t// keys.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Focus the next element. If at most left column and row is collapsed, moving right is not allowed as this will expand. However, if row is collapsed, moving left is allowed.\n\t\t\t\tif ( cannotFocusNextColumn ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tfocusablesInRow[ nextIndex ].focus();\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( [ UP, DOWN ].includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === UP ) {\n\t\t\t\t\tnextRowIndex = Math.max( 0, currentRowIndex - 1 );\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = Math.min(\n\t\t\t\t\t\tcurrentRowIndex + 1,\n\t\t\t\t\t\trows.length - 1\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t} else if ( [ HOME, END ].includes( keyCode ) ) {\n\t\t\t\t// Calculate the rowIndex of the next row.\n\t\t\t\tconst rows = Array.from(\n\t\t\t\t\ttreeGridElement.querySelectorAll( '[role=\"row\"]' )\n\t\t\t\t);\n\t\t\t\tconst currentRowIndex = rows.indexOf( activeRow );\n\t\t\t\tlet nextRowIndex;\n\n\t\t\t\tif ( keyCode === HOME ) {\n\t\t\t\t\tnextRowIndex = 0;\n\t\t\t\t} else {\n\t\t\t\t\tnextRowIndex = rows.length - 1;\n\t\t\t\t}\n\n\t\t\t\t// Focus is either at the top or bottom edge of the grid. Do nothing.\n\t\t\t\tif ( nextRowIndex === currentRowIndex ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will start navigating horizontally when reaching the vertical\n\t\t\t\t\t// bounds of a table.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Get the focusables in the next row.\n\t\t\t\tconst focusablesInNextRow = getRowFocusables(\n\t\t\t\t\trows[ nextRowIndex ]\n\t\t\t\t);\n\n\t\t\t\t// If for some reason there are no focusables in the next row, do nothing.\n\t\t\t\tif ( ! focusablesInNextRow || ! focusablesInNextRow.length ) {\n\t\t\t\t\t// Prevent key use for anything else. For example, Voiceover\n\t\t\t\t\t// will still focus text when using arrow keys, while this\n\t\t\t\t\t// component should limit navigation to focusables.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Try to focus the element in the next row that's at a similar column to the activeElement.\n\t\t\t\tconst nextIndex = Math.min(\n\t\t\t\t\tcurrentColumnIndex,\n\t\t\t\t\tfocusablesInNextRow.length - 1\n\t\t\t\t);\n\t\t\t\tfocusablesInNextRow[ nextIndex ].focus();\n\n\t\t\t\t// Let consumers know the row that was originally focused,\n\t\t\t\t// and the row that is now in focus.\n\t\t\t\tonFocusRow( event, activeRow, rows[ nextRowIndex ] );\n\n\t\t\t\t// Prevent key use for anything else. This ensures Voiceover\n\t\t\t\t// doesn't try to handle key navigation.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t[ onExpandRow, onCollapseRow, onFocusRow ]\n\t);\n\n\t/* Disable reason: A treegrid is implemented using a table element. */\n\t/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n\treturn (\n\t\t<RovingTabIndexContainer>\n\t\t\t{\n\t\t\t\t// Prevent browser mode from triggering in NVDA by wrapping List View\n\t\t\t\t// in a role=application wrapper.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/issues/43729\n\t\t\t }\n\t\t\t<div role=\"application\" aria-label={ applicationAriaLabel }>\n\t\t\t\t<table\n\t\t\t\t\t{ ...props }\n\t\t\t\t\trole=\"treegrid\"\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t<tbody>{ children }</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</RovingTabIndexContainer>\n\t);\n\t/* eslint-enable jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\nexport default forwardRef( TreeGrid );\nexport { default as TreeGridRow } from './row';\nexport { default as TreeGridCell } from './cell';\nexport { default as TreeGridItem } from './item';\n"]}
@@ -59,15 +59,15 @@
59
59
  * @param {string} hex - the hexadecimal value to convert
60
60
  * @return {string} comma separated rgb values
61
61
  */
62
- /**
63
- * Breakpoint mixins
64
- */
65
62
  /**
66
63
  * Long content fade mixin
67
64
  *
68
65
  * Creates a fading overlay to signify that the content is longer
69
66
  * than the space allows.
70
67
  */
68
+ /**
69
+ * Breakpoint mixins
70
+ */
71
71
  /**
72
72
  * Focus styles.
73
73
  */
@@ -1648,39 +1648,26 @@ body.is-dragging-components-draggable {
1648
1648
  position: relative;
1649
1649
  }
1650
1650
 
1651
- .is-focusing-regions [role=region]:focus {
1651
+ .is-focusing-regions [role=region]:focus::after {
1652
+ position: absolute;
1653
+ top: 0;
1654
+ right: 0;
1655
+ left: 0;
1656
+ bottom: 0;
1657
+ content: "";
1658
+ pointer-events: none;
1652
1659
  outline: 4px solid var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
1653
1660
  outline-offset: -4px;
1661
+ z-index: 1000000;
1654
1662
  }
1655
- .is-focusing-regions [role=region]:focus .interface-navigable-region__stacker {
1656
- position: relative;
1657
- z-index: -1;
1658
- }
1659
- .is-focusing-regions.is-distraction-free .interface-interface-skeleton__header .interface-navigable-region__stacker,
1660
- .is-focusing-regions.is-distraction-free .interface-interface-skeleton__header .edit-post-header {
1661
- outline: inherit;
1662
- outline-offset: inherit;
1663
- }
1664
- .is-focusing-regions .interface-interface-skeleton__sidebar .interface-navigable-region__stacker,
1665
- .is-focusing-regions .interface-interface-skeleton__sidebar .edit-post-layout__toggle-sidebar-panel {
1666
- outline: inherit;
1667
- outline-offset: inherit;
1668
- }
1669
- .is-focusing-regions .interface-interface-skeleton__actions .interface-navigable-region__stacker,
1670
- .is-focusing-regions .interface-interface-skeleton__actions .edit-post-layout__toggle-publish-panel {
1671
- outline: inherit;
1672
- outline-offset: inherit;
1673
- }
1674
- .is-focusing-regions [role=region].interface-interface-skeleton__actions:focus .editor-post-publish-panel {
1663
+ .is-focusing-regions.is-distraction-free .interface-interface-skeleton__header .edit-post-header,
1664
+ .is-focusing-regions .interface-interface-skeleton__sidebar .edit-post-layout__toggle-sidebar-panel,
1665
+ .is-focusing-regions .interface-interface-skeleton__actions .edit-post-layout__toggle-publish-panel,
1666
+ .is-focusing-regions .editor-post-publish-panel {
1675
1667
  outline: 4px solid var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
1676
1668
  outline-offset: -4px;
1677
1669
  }
1678
1670
 
1679
- .interface-navigable-region__stacker {
1680
- height: 100%;
1681
- width: 100%;
1682
- }
1683
-
1684
1671
  .components-menu-group + .components-menu-group {
1685
1672
  margin-top: 8px;
1686
1673
  padding-top: 8px;
@@ -2193,7 +2180,7 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2193
2180
  .components-placeholder__label > svg,
2194
2181
  .components-placeholder__label .dashicon,
2195
2182
  .components-placeholder__label .block-editor-block-icon {
2196
- margin-left: 1ch;
2183
+ margin-left: 12px;
2197
2184
  fill: currentColor;
2198
2185
  }
2199
2186
  @media (forced-colors: active) {
@@ -3202,8 +3189,8 @@ body.lockscroll {
3202
3189
  padding-right: 16px;
3203
3190
  padding-left: 16px;
3204
3191
  }
3205
- .components-accessible-toolbar .components-button:focus:enabled,
3206
- .components-toolbar .components-button:focus:enabled {
3192
+ .components-accessible-toolbar .components-button:focus:not(:disabled),
3193
+ .components-toolbar .components-button:focus:not(:disabled) {
3207
3194
  box-shadow: none;
3208
3195
  outline: none;
3209
3196
  }
@@ -59,15 +59,15 @@
59
59
  * @param {string} hex - the hexadecimal value to convert
60
60
  * @return {string} comma separated rgb values
61
61
  */
62
- /**
63
- * Breakpoint mixins
64
- */
65
62
  /**
66
63
  * Long content fade mixin
67
64
  *
68
65
  * Creates a fading overlay to signify that the content is longer
69
66
  * than the space allows.
70
67
  */
68
+ /**
69
+ * Breakpoint mixins
70
+ */
71
71
  /**
72
72
  * Focus styles.
73
73
  */
@@ -1651,39 +1651,26 @@ body.is-dragging-components-draggable {
1651
1651
  position: relative;
1652
1652
  }
1653
1653
 
1654
- .is-focusing-regions [role=region]:focus {
1654
+ .is-focusing-regions [role=region]:focus::after {
1655
+ position: absolute;
1656
+ top: 0;
1657
+ left: 0;
1658
+ right: 0;
1659
+ bottom: 0;
1660
+ content: "";
1661
+ pointer-events: none;
1655
1662
  outline: 4px solid var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
1656
1663
  outline-offset: -4px;
1664
+ z-index: 1000000;
1657
1665
  }
1658
- .is-focusing-regions [role=region]:focus .interface-navigable-region__stacker {
1659
- position: relative;
1660
- z-index: -1;
1661
- }
1662
- .is-focusing-regions.is-distraction-free .interface-interface-skeleton__header .interface-navigable-region__stacker,
1663
- .is-focusing-regions.is-distraction-free .interface-interface-skeleton__header .edit-post-header {
1664
- outline: inherit;
1665
- outline-offset: inherit;
1666
- }
1667
- .is-focusing-regions .interface-interface-skeleton__sidebar .interface-navigable-region__stacker,
1668
- .is-focusing-regions .interface-interface-skeleton__sidebar .edit-post-layout__toggle-sidebar-panel {
1669
- outline: inherit;
1670
- outline-offset: inherit;
1671
- }
1672
- .is-focusing-regions .interface-interface-skeleton__actions .interface-navigable-region__stacker,
1673
- .is-focusing-regions .interface-interface-skeleton__actions .edit-post-layout__toggle-publish-panel {
1674
- outline: inherit;
1675
- outline-offset: inherit;
1676
- }
1677
- .is-focusing-regions [role=region].interface-interface-skeleton__actions:focus .editor-post-publish-panel {
1666
+ .is-focusing-regions.is-distraction-free .interface-interface-skeleton__header .edit-post-header,
1667
+ .is-focusing-regions .interface-interface-skeleton__sidebar .edit-post-layout__toggle-sidebar-panel,
1668
+ .is-focusing-regions .interface-interface-skeleton__actions .edit-post-layout__toggle-publish-panel,
1669
+ .is-focusing-regions .editor-post-publish-panel {
1678
1670
  outline: 4px solid var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));
1679
1671
  outline-offset: -4px;
1680
1672
  }
1681
1673
 
1682
- .interface-navigable-region__stacker {
1683
- height: 100%;
1684
- width: 100%;
1685
- }
1686
-
1687
1674
  .components-menu-group + .components-menu-group {
1688
1675
  margin-top: 8px;
1689
1676
  padding-top: 8px;
@@ -2198,7 +2185,7 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2198
2185
  .components-placeholder__label > svg,
2199
2186
  .components-placeholder__label .dashicon,
2200
2187
  .components-placeholder__label .block-editor-block-icon {
2201
- margin-right: 1ch;
2188
+ margin-right: 12px;
2202
2189
  fill: currentColor;
2203
2190
  }
2204
2191
  @media (forced-colors: active) {
@@ -3212,8 +3199,8 @@ body.lockscroll {
3212
3199
  padding-left: 16px;
3213
3200
  padding-right: 16px;
3214
3201
  }
3215
- .components-accessible-toolbar .components-button:focus:enabled,
3216
- .components-toolbar .components-button:focus:enabled {
3202
+ .components-accessible-toolbar .components-button:focus:not(:disabled),
3203
+ .components-toolbar .components-button:focus:not(:disabled) {
3217
3204
  box-shadow: none;
3218
3205
  outline: none;
3219
3206
  }
@@ -49,7 +49,7 @@ import type { LabelProps, BorderControlProps } from '../../border-control/types'
49
49
  * };
50
50
  * ```
51
51
  */
52
- export declare const BorderBoxControl: import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalHasMultipleOrigins" | "__experimentalIsRenderedInSidebar"> & {
52
+ export declare const BorderBoxControl: import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar"> & {
53
53
  disableCustomColors?: boolean | undefined;
54
54
  } & LabelProps & Pick<BorderControlProps, "size" | "enableStyle"> & {
55
55
  onChange: (value: import("../types").AnyBorder) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-box-control/border-box-control/component.tsx"],"names":[],"mappings":";AAoBA,OAAO,KAAK,EACX,UAAU,EACV,kBAAkB,EAClB,MAAM,4BAA4B,CAAC;AAoIpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,gBAAgB;;;;;;;8CAG5B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-box-control/border-box-control/component.tsx"],"names":[],"mappings":";AAoBA,OAAO,KAAK,EACX,UAAU,EACV,kBAAkB,EAClB,MAAM,4BAA4B,CAAC;AA6HpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,eAAO,MAAM,gBAAgB;;;;;;;8CAG5B,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -18,7 +18,6 @@ export declare function useBorderBoxControl(props: WordPressComponentProps<Borde
18
18
  size: "default" | "__unstable-large";
19
19
  splitValue: Borders | undefined;
20
20
  wrapperClassName: string;
21
- __experimentalHasMultipleOrigins: boolean;
22
21
  __experimentalIsRenderedInSidebar: boolean;
23
22
  disableCustomColors?: boolean | undefined;
24
23
  hideLabelFromVision?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/border-box-control/border-box-control/hook.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE3E,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,uBAAuB,CAAE,qBAAqB,EAAE,KAAK,CAAE;;;;;;;;;;+BAuElD,MAAM,GAAG,SAAS,QACvB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CjB"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/border-box-control/border-box-control/hook.ts"],"names":[],"mappings":";AAkBA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE3E,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,uBAAuB,CAAE,qBAAqB,EAAE,KAAK,CAAE;;;;;;;;;;+BAsElD,MAAM,GAAG,SAAS,QACvB,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CjB"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare const ConnectedBorderBoxControlSplitControls: import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalHasMultipleOrigins" | "__experimentalIsRenderedInSidebar"> & {
2
+ declare const ConnectedBorderBoxControlSplitControls: import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar"> & {
3
3
  disableCustomColors?: boolean | undefined;
4
4
  } & Pick<import("../types").BorderBoxControlProps, "size" | "enableStyle"> & {
5
5
  onChange: (value: import("../../border-control/types").Border | undefined, side: keyof import("../types").Borders) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-box-control/border-box-control-split-controls/component.tsx"],"names":[],"mappings":";AAoHA,QAAA,MAAM,sCAAsC;;;;;;;6CAG3C,CAAC;AACF,eAAe,sCAAsC,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-box-control/border-box-control-split-controls/component.tsx"],"names":[],"mappings":";AAkHA,QAAA,MAAM,sCAAsC;;;;;;;6CAG3C,CAAC;AACF,eAAe,sCAAsC,CAAC"}
@@ -9,7 +9,6 @@ export declare function useBorderBoxControlSplitControls(props: WordPressCompone
9
9
  enableStyle: boolean;
10
10
  rightAlignedClassName: string;
11
11
  size: "default" | "__unstable-large";
12
- __experimentalHasMultipleOrigins: boolean;
13
12
  __experimentalIsRenderedInSidebar: boolean;
14
13
  disableCustomColors?: boolean | undefined;
15
14
  onChange: (value: import("../../border-control/types").Border | undefined, side: keyof import("../types").Borders) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/border-box-control/border-box-control-split-controls/hook.ts"],"names":[],"mappings":";AASA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,wBAAgB,gCAAgC,CAC/C,KAAK,EAAE,uBAAuB,CAAE,kBAAkB,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuC3D"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/border-box-control/border-box-control-split-controls/hook.ts"],"names":[],"mappings":";AASA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,wBAAgB,gCAAgC,CAC/C,KAAK,EAAE,uBAAuB,CAAE,kBAAkB,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqC3D"}
@@ -6,7 +6,7 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react';
6
6
  import { BorderBoxControl } from '../';
7
7
  declare const meta: ComponentMeta<typeof BorderBoxControl>;
8
8
  export default meta;
9
- export declare const Default: ComponentStory<import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalHasMultipleOrigins" | "__experimentalIsRenderedInSidebar"> & {
9
+ export declare const Default: ComponentStory<import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar"> & {
10
10
  disableCustomColors?: boolean | undefined;
11
11
  } & import("../../border-control/types").LabelProps & Pick<import("../../border-control/types").BorderControlProps, "size" | "enableStyle"> & {
12
12
  onChange: (value: import("../types").AnyBorder) => void;
@@ -34,7 +34,7 @@ import type { LabelProps } from '../types';
34
34
  * };
35
35
  * ```
36
36
  */
37
- export declare const BorderControl: import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalHasMultipleOrigins" | "__experimentalIsRenderedInSidebar"> & {
37
+ export declare const BorderControl: import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar"> & {
38
38
  disableCustomColors?: boolean | undefined;
39
39
  } & LabelProps & {
40
40
  disableUnits?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-control/border-control/component.tsx"],"names":[],"mappings":";AAkBA,OAAO,KAAK,EAAsB,UAAU,EAAE,MAAM,UAAU,CAAC;AA0G/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;8CAGzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-control/border-control/component.tsx"],"names":[],"mappings":";AAkBA,OAAO,KAAK,EAAsB,UAAU,EAAE,MAAM,UAAU,CAAC;AAsG/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;8CAGzB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -17,7 +17,6 @@ export declare function useBorderControl(props: WordPressComponentProps<BorderCo
17
17
  widthUnit: string;
18
18
  widthValue: number | undefined;
19
19
  size: "default" | "__unstable-large";
20
- __experimentalHasMultipleOrigins: boolean;
21
20
  __experimentalIsRenderedInSidebar: boolean;
22
21
  disableCustomColors?: boolean | undefined;
23
22
  hideLabelFromVision?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/border-control/border-control/hook.ts"],"names":[],"mappings":";AAUA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAc3D,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,uBAAuB,CAAE,kBAAkB,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqI3D"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/border-control/border-control/hook.ts"],"names":[],"mappings":";AAUA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAc3D,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,uBAAuB,CAAE,kBAAkB,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmI3D"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare const ConnectedBorderControlDropdown: import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalHasMultipleOrigins" | "__experimentalIsRenderedInSidebar"> & {
2
+ declare const ConnectedBorderControlDropdown: import("../../ui/context").WordPressComponent<"div", Pick<import("../../color-palette/types").ColorPaletteProps, "colors" | "enableAlpha" | "__experimentalIsRenderedInSidebar"> & {
3
3
  disableCustomColors?: boolean | undefined;
4
4
  } & Pick<import("../types").BorderControlProps, "size" | "enableStyle"> & {
5
5
  border?: import("../types").Border | undefined;