@wordpress/components 23.1.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 (280) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE.md +1 -1
  3. package/build/color-picker/component.js +1 -0
  4. package/build/color-picker/component.js.map +1 -1
  5. package/build/color-picker/styles.js +8 -10
  6. package/build/color-picker/styles.js.map +1 -1
  7. package/build/combobox-control/index.js +5 -1
  8. package/build/combobox-control/index.js.map +1 -1
  9. package/build/focal-point-picker/utils.js +1 -1
  10. package/build/focal-point-picker/utils.js.map +1 -1
  11. package/build/index.js +7 -17
  12. package/build/index.js.map +1 -1
  13. package/build/index.native.js +8 -18
  14. package/build/index.native.js.map +1 -1
  15. package/build/item-group/item/component.js +27 -3
  16. package/build/item-group/item/component.js.map +1 -1
  17. package/build/item-group/item-group/component.js +26 -3
  18. package/build/item-group/item-group/component.js.map +1 -1
  19. package/build/item-group/styles.js +14 -14
  20. package/build/item-group/styles.js.map +1 -1
  21. package/build/panel/row.js +5 -3
  22. package/build/panel/row.js.map +1 -1
  23. package/build/query-controls/index.js +1 -0
  24. package/build/query-controls/index.js.map +1 -1
  25. package/build/resizable-box/index.js +5 -4
  26. package/build/resizable-box/index.js.map +1 -1
  27. package/build/responsive-wrapper/index.js +18 -1
  28. package/build/responsive-wrapper/index.js.map +1 -1
  29. package/build/responsive-wrapper/types.js +6 -0
  30. package/build/responsive-wrapper/types.js.map +1 -0
  31. package/build/sandbox/index.js +35 -24
  32. package/build/sandbox/index.js.map +1 -1
  33. package/build/sandbox/types.js +6 -0
  34. package/build/sandbox/types.js.map +1 -0
  35. package/build/tab-panel/index.js +10 -5
  36. package/build/tab-panel/index.js.map +1 -1
  37. package/build/toolbar/index.js +42 -60
  38. package/build/toolbar/index.js.map +1 -1
  39. package/build/toolbar/toolbar/index.js +74 -0
  40. package/build/toolbar/toolbar/index.js.map +1 -0
  41. package/build/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
  42. package/build/toolbar/toolbar/toolbar-container.js.map +1 -0
  43. package/build/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
  44. package/build/toolbar/toolbar/toolbar-container.native.js.map +1 -0
  45. package/build/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
  46. package/build/toolbar/toolbar-button/index.js.map +1 -0
  47. package/build/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
  48. package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -0
  49. package/build/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
  50. package/build/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -0
  51. package/build/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
  52. package/build/toolbar/toolbar-context/index.js.map +1 -0
  53. package/build/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
  54. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -0
  55. package/build/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
  56. package/build/toolbar/toolbar-group/index.js.map +1 -0
  57. package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
  58. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -0
  59. package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
  60. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -0
  61. package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
  62. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -0
  63. package/build/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
  64. package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -0
  65. package/build/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
  66. package/build/toolbar/toolbar-item/index.js.map +1 -0
  67. package/build/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
  68. package/build/toolbar/toolbar-item/index.native.js.map +1 -0
  69. package/build/tree-grid/index.js +3 -3
  70. package/build/tree-grid/index.js.map +1 -1
  71. package/build-module/color-picker/component.js +1 -0
  72. package/build-module/color-picker/component.js.map +1 -1
  73. package/build-module/color-picker/styles.js +8 -9
  74. package/build-module/color-picker/styles.js.map +1 -1
  75. package/build-module/combobox-control/index.js +5 -1
  76. package/build-module/combobox-control/index.js.map +1 -1
  77. package/build-module/focal-point-picker/utils.js +1 -1
  78. package/build-module/focal-point-picker/utils.js.map +1 -1
  79. package/build-module/index.js +1 -6
  80. package/build-module/index.js.map +1 -1
  81. package/build-module/index.native.js +1 -6
  82. package/build-module/index.native.js.map +1 -1
  83. package/build-module/item-group/item/component.js +26 -2
  84. package/build-module/item-group/item/component.js.map +1 -1
  85. package/build-module/item-group/item-group/component.js +25 -2
  86. package/build-module/item-group/item-group/component.js.map +1 -1
  87. package/build-module/item-group/styles.js +14 -14
  88. package/build-module/item-group/styles.js.map +1 -1
  89. package/build-module/panel/row.js +5 -3
  90. package/build-module/panel/row.js.map +1 -1
  91. package/build-module/query-controls/index.js +1 -0
  92. package/build-module/query-controls/index.js.map +1 -1
  93. package/build-module/resizable-box/index.js +3 -2
  94. package/build-module/resizable-box/index.js.map +1 -1
  95. package/build-module/responsive-wrapper/index.js +20 -1
  96. package/build-module/responsive-wrapper/index.js.map +1 -1
  97. package/build-module/responsive-wrapper/types.js +2 -0
  98. package/build-module/responsive-wrapper/types.js.map +1 -0
  99. package/build-module/sandbox/index.js +37 -23
  100. package/build-module/sandbox/index.js.map +1 -1
  101. package/build-module/sandbox/types.js +2 -0
  102. package/build-module/sandbox/types.js.map +1 -0
  103. package/build-module/tab-panel/index.js +10 -5
  104. package/build-module/tab-panel/index.js.map +1 -1
  105. package/build-module/toolbar/index.js +6 -58
  106. package/build-module/toolbar/index.js.map +1 -1
  107. package/build-module/toolbar/toolbar/index.js +59 -0
  108. package/build-module/toolbar/toolbar/index.js.map +1 -0
  109. package/build-module/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
  110. package/{build → build-module/toolbar}/toolbar/toolbar-container.js.map +1 -1
  111. package/build-module/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
  112. package/build-module/toolbar/toolbar/toolbar-container.native.js.map +1 -0
  113. package/build-module/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
  114. package/build-module/toolbar/toolbar-button/index.js.map +1 -0
  115. package/build-module/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
  116. package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -0
  117. package/build-module/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
  118. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -0
  119. package/build-module/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
  120. package/build-module/toolbar/toolbar-context/index.js.map +1 -0
  121. package/build-module/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
  122. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -0
  123. package/build-module/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
  124. package/build-module/toolbar/toolbar-group/index.js.map +1 -0
  125. package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
  126. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -0
  127. package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
  128. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -0
  129. package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
  130. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -0
  131. package/build-module/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
  132. package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -0
  133. package/build-module/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
  134. package/build-module/toolbar/toolbar-item/index.js.map +1 -0
  135. package/build-module/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
  136. package/build-module/toolbar/toolbar-item/index.native.js.map +1 -0
  137. package/build-module/tree-grid/index.js +3 -3
  138. package/build-module/tree-grid/index.js.map +1 -1
  139. package/build-style/style-rtl.css +1 -1
  140. package/build-style/style.css +1 -1
  141. package/build-types/color-picker/component.d.ts.map +1 -1
  142. package/build-types/color-picker/styles.d.ts.map +1 -1
  143. package/build-types/dashicon/types.d.ts +0 -4
  144. package/build-types/dashicon/types.d.ts.map +1 -1
  145. package/build-types/focal-point-picker/utils.d.ts.map +1 -1
  146. package/build-types/item-group/item/component.d.ts +24 -2
  147. package/build-types/item-group/item/component.d.ts.map +1 -1
  148. package/build-types/item-group/item-group/component.d.ts +23 -2
  149. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  150. package/build-types/item-group/stories/index.d.ts +15 -0
  151. package/build-types/item-group/stories/index.d.ts.map +1 -0
  152. package/build-types/item-group/styles.d.ts.map +1 -1
  153. package/build-types/radio-context/index.d.ts +6 -0
  154. package/build-types/radio-context/index.d.ts.map +1 -0
  155. package/build-types/resizable-box/index.d.ts +6 -7
  156. package/build-types/resizable-box/index.d.ts.map +1 -1
  157. package/build-types/resizable-box/stories/index.d.ts +61 -0
  158. package/build-types/resizable-box/stories/index.d.ts.map +1 -0
  159. package/build-types/responsive-wrapper/index.d.ts +24 -0
  160. package/build-types/responsive-wrapper/index.d.ts.map +1 -0
  161. package/build-types/responsive-wrapper/stories/index.d.ts +12 -0
  162. package/build-types/responsive-wrapper/stories/index.d.ts.map +1 -0
  163. package/build-types/responsive-wrapper/types.d.ts +22 -0
  164. package/build-types/responsive-wrapper/types.d.ts.map +1 -0
  165. package/build-types/sandbox/index.d.ts +19 -0
  166. package/build-types/sandbox/index.d.ts.map +1 -0
  167. package/build-types/sandbox/stories/index.d.ts +12 -0
  168. package/build-types/sandbox/stories/index.d.ts.map +1 -0
  169. package/build-types/sandbox/test/index.d.ts +2 -0
  170. package/build-types/sandbox/test/index.d.ts.map +1 -0
  171. package/build-types/sandbox/types.d.ts +36 -0
  172. package/build-types/sandbox/types.d.ts.map +1 -0
  173. package/build-types/tab-panel/index.d.ts.map +1 -1
  174. package/build-types/tab-panel/stories/index.d.ts +1 -0
  175. package/build-types/tab-panel/stories/index.d.ts.map +1 -1
  176. package/build-types/tab-panel/types.d.ts +10 -4
  177. package/build-types/tab-panel/types.d.ts.map +1 -1
  178. package/package.json +17 -17
  179. package/src/color-picker/component.tsx +1 -0
  180. package/src/color-picker/stories/index.js +20 -60
  181. package/src/color-picker/styles.ts +0 -5
  182. package/src/combobox-control/index.js +9 -1
  183. package/src/dashicon/types.ts +0 -6
  184. package/src/focal-point-picker/stories/index.tsx +1 -1
  185. package/src/focal-point-picker/utils.ts +4 -1
  186. package/src/guide/stories/index.js +14 -41
  187. package/src/index.js +8 -6
  188. package/src/index.native.js +8 -6
  189. package/src/item-group/item/component.tsx +26 -2
  190. package/src/item-group/item-group/component.tsx +25 -2
  191. package/src/item-group/stories/index.tsx +103 -0
  192. package/src/item-group/styles.ts +1 -0
  193. package/src/item-group/test/__snapshots__/index.js.snap +11 -10
  194. package/src/notice/stories/index.js +30 -58
  195. package/src/panel/row.js +3 -3
  196. package/src/panel/stories/index.js +62 -80
  197. package/src/placeholder/style.scss +1 -1
  198. package/src/query-controls/index.js +1 -0
  199. package/src/resizable-box/README.md +2 -2
  200. package/src/resizable-box/index.tsx +7 -6
  201. package/src/resizable-box/stories/index.tsx +92 -0
  202. package/src/responsive-wrapper/README.md +29 -0
  203. package/src/responsive-wrapper/{index.js → index.tsx} +23 -2
  204. package/src/responsive-wrapper/stories/index.tsx +38 -0
  205. package/src/responsive-wrapper/types.ts +20 -0
  206. package/src/sandbox/README.md +45 -2
  207. package/src/sandbox/{index.js → index.tsx} +47 -24
  208. package/src/sandbox/stories/index.tsx +32 -0
  209. package/src/sandbox/test/{index.js → index.tsx} +9 -4
  210. package/src/sandbox/types.ts +34 -0
  211. package/src/slot-fill/stories/index.js +12 -17
  212. package/src/style.scss +3 -3
  213. package/src/tab-panel/README.md +1 -0
  214. package/src/tab-panel/index.tsx +19 -5
  215. package/src/tab-panel/stories/index.tsx +20 -0
  216. package/src/tab-panel/test/index.tsx +89 -0
  217. package/src/tab-panel/types.ts +10 -4
  218. package/src/toolbar/index.js +6 -52
  219. package/src/toolbar/stories/index.js +2 -9
  220. package/src/{toolbar-button/stories/index.js → toolbar/stories/toolbar-button.js} +1 -2
  221. package/src/{toolbar-group/stories/index.js → toolbar/stories/toolbar-group.js} +1 -1
  222. package/src/toolbar/test/index.js +1 -2
  223. package/src/{toolbar-group/test/index.js → toolbar/test/toolbar-group.js} +1 -1
  224. package/src/toolbar/{README.md → toolbar/README.md} +0 -0
  225. package/src/toolbar/toolbar/index.js +52 -0
  226. package/src/toolbar/{style.native.scss → toolbar/style.native.scss} +0 -0
  227. package/src/toolbar/{style.scss → toolbar/style.scss} +0 -0
  228. package/src/toolbar/{toolbar-container.js → toolbar/toolbar-container.js} +0 -0
  229. package/src/toolbar/{toolbar-container.native.js → toolbar/toolbar-container.native.js} +0 -0
  230. package/src/{toolbar-button → toolbar/toolbar-button}/README.md +0 -0
  231. package/src/{toolbar-button → toolbar/toolbar-button}/index.js +1 -1
  232. package/src/{toolbar-button → toolbar/toolbar-button}/style.scss +0 -0
  233. package/src/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.js +0 -0
  234. package/src/{toolbar-button → toolbar/toolbar-button}/toolbar-button-container.native.js +0 -0
  235. package/src/{toolbar-context → toolbar/toolbar-context}/index.js +0 -0
  236. package/src/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/README.md +0 -0
  237. package/src/{toolbar-dropdown-menu → toolbar/toolbar-dropdown-menu}/index.js +1 -1
  238. package/src/{toolbar-group → toolbar/toolbar-group}/README.md +0 -0
  239. package/src/{toolbar-group → toolbar/toolbar-group}/index.js +0 -0
  240. package/src/{toolbar-group → toolbar/toolbar-group}/style.native.scss +0 -0
  241. package/src/{toolbar-group → toolbar/toolbar-group}/style.scss +0 -0
  242. package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.js +1 -1
  243. package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-collapsed.native.js +1 -1
  244. package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.js +0 -0
  245. package/src/{toolbar-group → toolbar/toolbar-group}/toolbar-group-container.native.js +0 -0
  246. package/src/{toolbar-item → toolbar/toolbar-item}/README.md +0 -0
  247. package/src/{toolbar-item → toolbar/toolbar-item}/index.js +0 -0
  248. package/src/{toolbar-item → toolbar/toolbar-item}/index.native.js +0 -0
  249. package/src/tree-grid/index.js +2 -4
  250. package/tsconfig.json +0 -7
  251. package/tsconfig.tsbuildinfo +1 -1
  252. package/build/toolbar/toolbar-container.native.js.map +0 -1
  253. package/build/toolbar-button/index.js.map +0 -1
  254. package/build/toolbar-button/toolbar-button-container.js.map +0 -1
  255. package/build/toolbar-button/toolbar-button-container.native.js.map +0 -1
  256. package/build/toolbar-context/index.js.map +0 -1
  257. package/build/toolbar-dropdown-menu/index.js.map +0 -1
  258. package/build/toolbar-group/index.js.map +0 -1
  259. package/build/toolbar-group/toolbar-group-collapsed.js.map +0 -1
  260. package/build/toolbar-group/toolbar-group-collapsed.native.js.map +0 -1
  261. package/build/toolbar-group/toolbar-group-container.js.map +0 -1
  262. package/build/toolbar-group/toolbar-group-container.native.js.map +0 -1
  263. package/build/toolbar-item/index.js.map +0 -1
  264. package/build/toolbar-item/index.native.js.map +0 -1
  265. package/build-module/toolbar/toolbar-container.js.map +0 -1
  266. package/build-module/toolbar/toolbar-container.native.js.map +0 -1
  267. package/build-module/toolbar-button/index.js.map +0 -1
  268. package/build-module/toolbar-button/toolbar-button-container.js.map +0 -1
  269. package/build-module/toolbar-button/toolbar-button-container.native.js.map +0 -1
  270. package/build-module/toolbar-context/index.js.map +0 -1
  271. package/build-module/toolbar-dropdown-menu/index.js.map +0 -1
  272. package/build-module/toolbar-group/index.js.map +0 -1
  273. package/build-module/toolbar-group/toolbar-group-collapsed.js.map +0 -1
  274. package/build-module/toolbar-group/toolbar-group-collapsed.native.js.map +0 -1
  275. package/build-module/toolbar-group/toolbar-group-container.js.map +0 -1
  276. package/build-module/toolbar-group/toolbar-group-container.native.js.map +0 -1
  277. package/build-module/toolbar-item/index.js.map +0 -1
  278. package/build-module/toolbar-item/index.native.js.map +0 -1
  279. package/src/item-group/stories/index.js +0 -270
  280. package/src/resizable-box/stories/index.js +0 -97
@@ -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,QAAM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CAAxB,CAAV,CA9C+C,CAgD/C;AACA;;AACAlC,MAAAA,KAAK,CAACuB,cAAN;AACA;AACD,GAjO2B,EAkO5B,CAAE7B,WAAF,EAAeC,aAAf,EAA8BC,UAA9B,CAlO4B,CAA7B;AAqOA;;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 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,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;;AAED,SAAOJ,eAAe,CAACK,MAAhB,CAA0BJ,SAAF,IAAiB;AAC/C,WAAOA,SAAS,CAACK,OAAV,CAAmB,cAAnB,MAAwCP,UAA/C;AACA,GAFM,CAAP;AAGA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,SAASQ,QAAT,OASCC,GATD,EAUE;AAAA,MATD;AACCC,IAAAA,QADD;AAECC,IAAAA,WAAW,GAAG,MAAM,CAAE,CAFvB;AAGCC,IAAAA,aAAa,GAAG,MAAM,CAAE,CAHzB;AAICC,IAAAA,UAAU,GAAG,MAAM,CAAE,CAJtB;AAKCC,IAAAA,oBALD;AAMC,OAAGC;AANJ,GASC;AACD,QAAMC,SAAS,GAAGzB,WAAW,CAC1B0B,KAAF,IAAa;AACZ,UAAM;AAAEC,MAAAA,OAA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3C4C,IAAI,CAAEQ,YAAF,CADuC,CAA5C,CAxB+C,CA4B/C;;AACA,UAAK,CAAEC,mBAAF,IAAyB,CAAEA,mBAAmB,CAAC/C,MAApD,EAA6D;AAC5D;AACA;AACA;AACAY,QAAAA,KAAK,CAACuB,cAAN;AACA;AACA,OAnC8C,CAqC/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"]}
@@ -2180,7 +2180,7 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2180
2180
  .components-placeholder__label > svg,
2181
2181
  .components-placeholder__label .dashicon,
2182
2182
  .components-placeholder__label .block-editor-block-icon {
2183
- margin-left: 1ch;
2183
+ margin-left: 12px;
2184
2184
  fill: currentColor;
2185
2185
  }
2186
2186
  @media (forced-colors: active) {
@@ -2185,7 +2185,7 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
2185
2185
  .components-placeholder__label > svg,
2186
2186
  .components-placeholder__label .dashicon,
2187
2187
  .components-placeholder__label .block-editor-block-icon {
2188
- margin-right: 1ch;
2188
+ margin-right: 12px;
2189
2189
  fill: currentColor;
2190
2190
  }
2191
2191
  @media (forced-colors: active) {
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/color-picker/component.tsx"],"names":[],"mappings":";AAkCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,MAAM,WAAW,gBAAgB;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,SAAS,CAAC;CACvB;AAiFD,QAAA,MAAM,oBAAoB,iHAA+C,CAAC;AAE1E,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/color-picker/component.tsx"],"names":[],"mappings":";AAkCA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIzC,MAAM,WAAW,gBAAgB;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,SAAS,CAAC;CACvB;AAkFD,QAAA,MAAM,oBAAoB,iHAA+C,CAAC;AAE1E,eAAe,oBAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/color-picker/styles.ts"],"names":[],"mappings":";AAuBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;UAIhC,CAAC;AAEF,eAAO,MAAM,aAAa;;UAMzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGxB,CAAC;AASF,eAAO,MAAM,6BAA6B;;;yGAKzC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;UAG9C,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;UAK7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;yGAiD3B,CAAC;AAEF,eAAO,MAAM,UAAU;;UAStB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/color-picker/styles.ts"],"names":[],"mappings":";AAsBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;UAIhC,CAAC;AAEF,eAAO,MAAM,aAAa;;UAMzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGxB,CAAC;AASF,eAAO,MAAM,6BAA6B;;;yGAKzC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;UAG9C,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;UAK7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;yGA6C3B,CAAC;AAEF,eAAO,MAAM,UAAU;;UAStB,CAAC"}
@@ -3,10 +3,6 @@ export declare type DashiconProps = {
3
3
  * The icon name
4
4
  */
5
5
  icon: IconKey;
6
- /**
7
- * Class name
8
- */
9
- className?: string;
10
6
  /**
11
7
  * Size of the icon
12
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dashicon/types.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,OAAO,GAChB,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,aAAa,GACb,aAAa,GACb,iBAAiB,GACjB,eAAe,GACf,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,YAAY,GACZ,aAAa,GACb,aAAa,GACb,UAAU,GACV,OAAO,GACP,cAAc,GACd,kBAAkB,GAClB,YAAY,GACZ,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,aAAa,GACb,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,gBAAgB,GAChB,iBAAiB,GACjB,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,aAAa,GACb,cAAc,GACd,eAAe,GACf,UAAU,GACV,oBAAoB,GACpB,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,eAAe,GACf,UAAU,GACV,MAAM,GACN,oBAAoB,GACpB,wBAAwB,GACxB,2BAA2B,GAC3B,qBAAqB,GACrB,kBAAkB,GAClB,mBAAmB,GACnB,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,kBAAkB,GAClB,oBAAoB,GACpB,UAAU,GACV,aAAa,GACb,gBAAgB,GACh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X,YAAY,GACZ,OAAO,GACP,YAAY,GACZ,QAAQ,GACR,WAAW,GACX,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,KAAK,GACL,YAAY,GACZ,aAAa,GACb,WAAW,GACX,QAAQ,GACR,OAAO,GACP,SAAS,GACT,WAAW,GACX,eAAe,GACf,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,GACR,KAAK,GACL,UAAU,GACV,aAAa,GACb,MAAM,GACN,WAAW,GACX,aAAa,GACb,WAAW,GACX,aAAa,GACb,SAAS,GACT,MAAM,GACN,aAAa,GACb,OAAO,GACP,QAAQ,GACR,SAAS,GACT,aAAa,GACb,MAAM,GACN,sBAAsB,GACtB,kBAAkB,GAClB,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GACpB,mBAAmB,GACnB,uBAAuB,GACvB,oBAAoB,GACpB,UAAU,GACV,eAAe,GACf,WAAW,GACX,MAAM,GACN,SAAS,GACT,KAAK,GACL,SAAS,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dashicon/types.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,OAAO,GAChB,kBAAkB,GAClB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,aAAa,GACb,aAAa,GACb,iBAAiB,GACjB,eAAe,GACf,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GAC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AAY,GACZ,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,kBAAkB,GAClB,kBAAkB,GAClB,oBAAoB,GACpB,mBAAmB,GACnB,uBAAuB,GACvB,oBAAoB,GACpB,UAAU,GACV,eAAe,GACf,WAAW,GACX,MAAM,GACN,SAAS,GACT,KAAK,GACL,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/focal-point-picker/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAeF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAE,QAAQ,SAAK,GAAI,MAAM,CAGpD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,QAAQ,GAAE,MAAW,GAAI,OAAO,CAG5D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAE,QAAQ,EAAE,MAAM,GAAI,MAAM,CAE/D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/focal-point-picker/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAeF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAE,QAAQ,SAAK,GAAI,MAAM,CAGpD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAE,QAAQ,GAAE,MAAW,GAAI,OAAO,CAM5D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAE,QAAQ,EAAE,MAAM,GAAI,MAAM,CAE/D"}
@@ -3,6 +3,28 @@
3
3
  * Internal dependencies
4
4
  */
5
5
  import type { ItemProps } from '../types';
6
- declare const _default: import("../../ui/context").WordPressComponent<"div", ItemProps & import("react").RefAttributes<any>, true>;
7
- export default _default;
6
+ /**
7
+ * `Item` is used in combination with `ItemGroup` to display a list of items
8
+ * grouped and styled together.
9
+ *
10
+ * @example
11
+ * ```jsx
12
+ * import {
13
+ * __experimentalItemGroup as ItemGroup,
14
+ * __experimentalItem as Item,
15
+ * } from '@wordpress/components';
16
+ *
17
+ * function Example() {
18
+ * return (
19
+ * <ItemGroup>
20
+ * <Item>Code</Item>
21
+ * <Item>is</Item>
22
+ * <Item>Poetry</Item>
23
+ * </ItemGroup>
24
+ * );
25
+ * }
26
+ * ```
27
+ */
28
+ export declare const Item: import("../../ui/context").WordPressComponent<"div", ItemProps & import("react").RefAttributes<any>, true>;
29
+ export default Item;
8
30
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/item-group/item/component.tsx"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;;AAkB1C,wBAA8C"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/item-group/item/component.tsx"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAkB1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,IAAI,4GAA4C,CAAC;AAE9D,eAAe,IAAI,CAAC"}
@@ -1,5 +1,26 @@
1
1
  /// <reference types="react" />
2
2
  import type { ItemGroupProps } from '../types';
3
- declare const _default: import("../../ui/context").WordPressComponent<"div", ItemGroupProps & import("react").RefAttributes<any>, true>;
4
- export default _default;
3
+ /**
4
+ * `ItemGroup` displays a list of `Item`s grouped and styled together.
5
+ *
6
+ * @example
7
+ * ```jsx
8
+ * import {
9
+ * __experimentalItemGroup as ItemGroup,
10
+ * __experimentalItem as Item,
11
+ * } from '@wordpress/components';
12
+ *
13
+ * function Example() {
14
+ * return (
15
+ * <ItemGroup>
16
+ * <Item>Code</Item>
17
+ * <Item>is</Item>
18
+ * <Item>Poetry</Item>
19
+ * </ItemGroup>
20
+ * );
21
+ * }
22
+ * ```
23
+ */
24
+ export declare const ItemGroup: import("../../ui/context").WordPressComponent<"div", ItemGroupProps & import("react").RefAttributes<any>, true>;
25
+ export default ItemGroup;
5
26
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/item-group/item-group/component.tsx"],"names":[],"mappings":";AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;;AA8B/C,wBAAwD"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/item-group/item-group/component.tsx"],"names":[],"mappings":";AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AA8B/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,SAAS,iHAAsD,CAAC;AAE7E,eAAe,SAAS,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import { ItemGroup } from '../item-group/component';
9
+ declare const meta: ComponentMeta<typeof ItemGroup>;
10
+ export default meta;
11
+ export declare const Default: ComponentStory<typeof ItemGroup>;
12
+ export declare const NonClickableItems: ComponentStory<typeof ItemGroup>;
13
+ export declare const CustomItemSize: ComponentStory<typeof ItemGroup>;
14
+ export declare const WithBorder: ComponentStory<typeof ItemGroup>;
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/item-group/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAKpD,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,SAAS,CAY1C,CAAC;AACF,eAAe,IAAI,CAAC;AAUpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,SAAS,CAAwB,CAAC;AAuB/E,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAE,OAAO,SAAS,CAC5C,CAAC;AAgBrB,eAAO,MAAM,cAAc,EAAE,cAAc,CAAE,OAAO,SAAS,CAE5D,CAAC;AAiBF,eAAO,MAAM,UAAU,EAAE,cAAc,CAAE,OAAO,SAAS,CAExD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/item-group/styles.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,2CAiB1B,CAAC;AAEF,eAAO,MAAM,WAAW,2CAGvB,CAAC;AAEF,eAAO,MAAM,IAAI,2CAKhB,CAAC;AAEF,eAAO,MAAM,QAAQ,2CAEpB,CAAC;AAEF,eAAO,MAAM,SAAS,2CAQrB,CAAC;AAIF,eAAO,MAAM,YAAY,2CAExB,CAAC;AAEF,eAAO,MAAM,OAAO,2CAYnB,CAAC;AAeF,eAAO,MAAM,SAAS;;;;CAUrB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/item-group/styles.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,cAAc,2CAiB1B,CAAC;AAEF,eAAO,MAAM,WAAW,2CAGvB,CAAC;AAEF,eAAO,MAAM,IAAI,2CAMhB,CAAC;AAEF,eAAO,MAAM,QAAQ,2CAEpB,CAAC;AAEF,eAAO,MAAM,SAAS,2CAQrB,CAAC;AAIF,eAAO,MAAM,YAAY,2CAExB,CAAC;AAEF,eAAO,MAAM,OAAO,2CAYnB,CAAC;AAeF,eAAO,MAAM,SAAS;;;;CAUrB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export default RadioContext;
2
+ declare const RadioContext: import("react").Context<{
3
+ state: null;
4
+ setState: () => void;
5
+ }>;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radio-context/index.js"],"names":[],"mappings":";AAKA;;;GAGI"}
@@ -1,12 +1,11 @@
1
1
  import { Resizable } from 're-resizable';
2
2
  import type { ResizableProps } from 're-resizable';
3
3
  import type { ReactNode } from 'react';
4
- declare const _default: import("react").ForwardRefExoticComponent<ResizableProps & {
5
- className: string;
4
+ export declare const ResizableBox: import("react").ForwardRefExoticComponent<ResizableProps & {
6
5
  children: ReactNode;
7
- showHandle: boolean;
8
- __experimentalShowTooltip: boolean;
9
- __experimentalTooltipProps: Pick<{
6
+ showHandle?: boolean | undefined;
7
+ __experimentalShowTooltip?: boolean | undefined;
8
+ __experimentalTooltipProps?: (Pick<{
10
9
  theme?: import("@emotion/react").Theme | undefined;
11
10
  as?: import("react").ElementType<any> | undefined;
12
11
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
@@ -23,7 +22,7 @@ declare const _default: import("react").ForwardRefExoticComponent<ResizableProps
23
22
  position?: import("./resize-tooltip/utils").Position | undefined;
24
23
  showPx?: boolean | undefined;
25
24
  zIndex?: number | undefined;
26
- }, "position" | "zIndex" | "key" | "as" | keyof import("react").HTMLAttributes<HTMLDivElement> | "theme" | "axis" | "isVisible" | "fadeTimeout" | "onResize" | "showPx" | "labelRef"> & import("react").RefAttributes<HTMLDivElement>;
25
+ }, "position" | "zIndex" | "key" | "as" | keyof import("react").HTMLAttributes<HTMLDivElement> | "theme" | "axis" | "isVisible" | "fadeTimeout" | "onResize" | "showPx" | "labelRef"> & import("react").RefAttributes<HTMLDivElement>) | undefined;
27
26
  } & import("react").RefAttributes<Resizable>>;
28
- export default _default;
27
+ export default ResizableBox;
29
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resizable-box/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAmHrD,wBAA0C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resizable-box/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAC;AAkHrD,eAAO,MAAM,YAAY;cAnCd,SAAS;;;;;;;;;;;;;;;;;;;;;6CAmC6C,CAAC;AAElE,eAAe,YAAY,CAAC"}
@@ -0,0 +1,61 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * External dependencies
4
+ */
5
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import ResizableBox from '..';
10
+ declare const meta: ComponentMeta<typeof ResizableBox>;
11
+ export default meta;
12
+ export declare const Default: ComponentStory<import("react").ForwardRefExoticComponent<import("re-resizable").ResizableProps & {
13
+ children: import("react").ReactNode;
14
+ showHandle?: boolean | undefined;
15
+ __experimentalShowTooltip?: boolean | undefined;
16
+ __experimentalTooltipProps?: (Pick<{
17
+ theme?: import("@emotion/react").Theme | undefined;
18
+ as?: import("react").ElementType<any> | undefined;
19
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
20
+ 'aria-hidden'?: boolean | undefined;
21
+ axis?: import("../resize-tooltip/utils").Axis | undefined;
22
+ className?: string | undefined;
23
+ fadeTimeout?: number | undefined;
24
+ isVisible?: boolean | undefined;
25
+ labelRef?: import("react").Ref<HTMLDivElement> | undefined;
26
+ onResize?: ((data: {
27
+ width: number | null;
28
+ height: number | null;
29
+ }) => void) | undefined;
30
+ position?: import("../resize-tooltip/utils").Position | undefined;
31
+ showPx?: boolean | undefined;
32
+ zIndex?: number | undefined;
33
+ }, "position" | "zIndex" | "key" | "as" | keyof import("react").HTMLAttributes<HTMLDivElement> | "theme" | "axis" | "isVisible" | "fadeTimeout" | "onResize" | "showPx" | "labelRef"> & import("react").RefAttributes<HTMLDivElement>) | undefined;
34
+ } & import("react").RefAttributes<import("re-resizable").Resizable>>>;
35
+ /**
36
+ * The `enable` prop can be used to disable resizing in specific directions.
37
+ */
38
+ export declare const DisabledDirections: ComponentStory<import("react").ForwardRefExoticComponent<import("re-resizable").ResizableProps & {
39
+ children: import("react").ReactNode;
40
+ showHandle?: boolean | undefined;
41
+ __experimentalShowTooltip?: boolean | undefined;
42
+ __experimentalTooltipProps?: (Pick<{
43
+ theme?: import("@emotion/react").Theme | undefined;
44
+ as?: import("react").ElementType<any> | undefined;
45
+ } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
46
+ 'aria-hidden'?: boolean | undefined;
47
+ axis?: import("../resize-tooltip/utils").Axis | undefined;
48
+ className?: string | undefined;
49
+ fadeTimeout?: number | undefined;
50
+ isVisible?: boolean | undefined;
51
+ labelRef?: import("react").Ref<HTMLDivElement> | undefined;
52
+ onResize?: ((data: {
53
+ width: number | null;
54
+ height: number | null;
55
+ }) => void) | undefined;
56
+ position?: import("../resize-tooltip/utils").Position | undefined;
57
+ showPx?: boolean | undefined;
58
+ zIndex?: number | undefined;
59
+ }, "position" | "zIndex" | "key" | "as" | keyof import("react").HTMLAttributes<HTMLDivElement> | "theme" | "axis" | "isVisible" | "fadeTimeout" | "onResize" | "showPx" | "labelRef"> & import("react").RefAttributes<HTMLDivElement>) | undefined;
60
+ } & import("react").RefAttributes<import("re-resizable").Resizable>>>;
61
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resizable-box/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAO9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,YAAY,CAY7C,CAAC;AACF,eAAe,IAAI,CAAC;AA6BpB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;qEAAsB,CAAC;AAkB3C;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;qEAAsB,CAAC"}
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Internal dependencies
4
+ */
5
+ import type { ResponsiveWrapperProps } from './types';
6
+ /**
7
+ * A wrapper component that maintains its aspect ratio when resized.
8
+ *
9
+ * ```jsx
10
+ * import { ResponsiveWrapper } from '@wordpress/components';
11
+ *
12
+ * const MyResponsiveWrapper = () => (
13
+ * <ResponsiveWrapper naturalWidth={ 2000 } naturalHeight={ 680 }>
14
+ * <img
15
+ * src="https://s.w.org/style/images/about/WordPress-logotype-standard.png"
16
+ * alt="WordPress"
17
+ * />
18
+ * </ResponsiveWrapper>
19
+ * );
20
+ * ```
21
+ */
22
+ declare function ResponsiveWrapper({ naturalWidth, naturalHeight, children, isInline, }: ResponsiveWrapperProps): JSX.Element | null;
23
+ export default ResponsiveWrapper;
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responsive-wrapper/index.tsx"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,iBAAS,iBAAiB,CAAE,EAC3B,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,QAAgB,GAChB,EAAE,sBAAsB,sBAyBxB;AAED,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import ResponsiveWrapper from '..';
9
+ declare const meta: ComponentMeta<typeof ResponsiveWrapper>;
10
+ export default meta;
11
+ export declare const Default: ComponentStory<typeof ResponsiveWrapper>;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/responsive-wrapper/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,iBAAiB,MAAM,IAAI,CAAC;AAEnC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,iBAAiB,CAUlD,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,0CAAsB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ export declare type ResponsiveWrapperProps = {
3
+ /**
4
+ * The intrinsic width of the element to wrap. Will be used to determine the aspect ratio.
5
+ */
6
+ naturalWidth: number;
7
+ /**
8
+ * The intrinsic height of the element to wrap. Will be used to determine the aspect ratio.
9
+ */
10
+ naturalHeight: number;
11
+ /**
12
+ * The element to wrap.
13
+ */
14
+ children: React.ReactElement;
15
+ /**
16
+ * If true, the wrapper will be `span` instead of `div`.
17
+ *
18
+ * @default false
19
+ */
20
+ isInline?: boolean;
21
+ };
22
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/responsive-wrapper/types.ts"],"names":[],"mappings":";AAAA,oBAAY,sBAAsB,GAAG;IACpC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Internal dependencies
4
+ */
5
+ import type { SandBoxProps } from './types';
6
+ /**
7
+ * This component provides an isolated environment for arbitrary HTML via iframes.
8
+ *
9
+ * ```jsx
10
+ * import { SandBox } from '@wordpress/components';
11
+ *
12
+ * const MySandBox = () => (
13
+ * <SandBox html="<p>Content</p>" title="SandBox" type="embed" />
14
+ * );
15
+ * ```
16
+ */
17
+ declare function SandBox({ html, title, type, styles, scripts, onFocus, }: SandBoxProps): JSX.Element;
18
+ export default SandBox;
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.tsx"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAoG5C;;;;;;;;;;GAUG;AACH,iBAAS,OAAO,CAAE,EACjB,IAAS,EACT,KAAU,EACV,IAAI,EACJ,MAAW,EACX,OAAY,EACZ,OAAO,GACP,EAAE,YAAY,eA4Jd;AAED,eAAe,OAAO,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import SandBox from '..';
9
+ declare const meta: ComponentMeta<typeof SandBox>;
10
+ export default meta;
11
+ export declare const Default: ComponentStory<typeof SandBox>;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sandbox/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE;;GAEG;AACH,OAAO,OAAO,MAAM,IAAI,CAAC;AAEzB,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,OAAO,CAWxC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,gCAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sandbox/test/index.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ /// <reference types="react" />
2
+ export declare type SandBoxProps = {
3
+ /**
4
+ * The HTML to render in the body of the iframe document.
5
+ *
6
+ * @default ''
7
+ */
8
+ html?: string;
9
+ /**
10
+ * The `<title>` of the iframe document.
11
+ *
12
+ * @default ''
13
+ */
14
+ title?: string;
15
+ /**
16
+ * The CSS class name to apply to the `<html>` and `<body>` elements of the iframe.
17
+ */
18
+ type?: string;
19
+ /**
20
+ * An array of CSS strings to inject into the `<head>` of the iframe document.
21
+ *
22
+ * @default []
23
+ */
24
+ styles?: string[];
25
+ /**
26
+ * An array of script URLs to inject as `<script>` tags into the bottom of the `<body>` of the iframe document.
27
+ *
28
+ * @default []
29
+ */
30
+ scripts?: string[];
31
+ /**
32
+ * The `onFocus` callback for the iframe.
33
+ */
34
+ onFocus?: React.DOMAttributes<HTMLIFrameElement>['onFocus'];
35
+ };
36
+ //# sourceMappingURL=types.d.ts.map